Skip to content

Commit b67e872

Browse files
committed
WIP internalize @microsoft/fast-components
1 parent 7d078b2 commit b67e872

File tree

224 files changed

+14893
-7708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+14893
-7708
lines changed

LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,31 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2525
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2626
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
---
30+
31+
This project code source is modified from `@microsoft/fast-components` licensed under
32+
33+
FAST - https://www.fast.design/
34+
35+
MIT License
36+
37+
Copyright (c) Microsoft Corporation. All rights reserved.
38+
39+
Permission is hereby granted, free of charge, to any person obtaining a copy
40+
of this software and associated documentation files (the "Software"), to deal
41+
in the Software without restriction, including without limitation the rights
42+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
43+
copies of the Software, and to permit persons to whom the Software is
44+
furnished to do so, subject to the following conditions:
45+
46+
The above copyright notice and this permission notice shall be included in all
47+
copies or substantial portions of the Software.
48+
49+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
50+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
51+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
52+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
53+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
54+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55+
SOFTWARE

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"main": "dist/esm/index.js",
2222
"types": "dist/dts/index.d.ts",
2323
"sideEffects": false,
24+
"type": "module",
2425
"scripts": {
2526
"start": "storybook dev -p 6006",
2627
"start:ci": "storybook dev -p 6006 --ci --quiet",
@@ -41,7 +42,6 @@
4142
},
4243
"dependencies": {
4344
"@microsoft/fast-colors": "^5.3.1",
44-
"@microsoft/fast-components": "^2.30.6",
4545
"@microsoft/fast-element": "^1.12.0",
4646
"@microsoft/fast-foundation": "^2.49.4",
4747
"@microsoft/fast-web-utilities": "^5.4.1"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Component schema
2+
3+
The `component.schema.json` is used to test against JSON schemas for each component. It should mirror the definition created by [Open UI](https://github.com/WICG/open-ui/blob/master/research/src/schemas/component.schema.json5).
4+
s
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"$id": "component.schema.json",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"title": "Component",
5+
"description": "A UI Component definition.",
6+
"type": "object",
7+
"additionalProperties": false,
8+
"properties": {
9+
"name": {
10+
"description": "The name of the component as defined in the design system.",
11+
"type": "string"
12+
},
13+
"openUIName": {
14+
"description": "The name of the component as defined in OpenUI.",
15+
"type": "string"
16+
},
17+
"url": {
18+
"description": "The url to the component doc page.",
19+
"type": "string"
20+
},
21+
"definition": {
22+
"type": "string",
23+
"description": "This should be the formal definition of the component. It usually describes it's intended purpose."
24+
},
25+
"anatomy": {
26+
"type": "array",
27+
"items": {
28+
"type": "object",
29+
"description": "Each named part that makes up the whole of the component.",
30+
"properties": {
31+
"name": {
32+
"type": "string"
33+
},
34+
"description": {
35+
"type": "string"
36+
}
37+
},
38+
"required": [
39+
"name"
40+
]
41+
},
42+
"uniqueItems": true
43+
},
44+
"implementations": {
45+
"type": "array",
46+
"items": {
47+
"oneOf": [
48+
{
49+
"type": "object",
50+
"properties": {
51+
"type": {
52+
"type": "string",
53+
"const": "web-component"
54+
},
55+
"implementation": {
56+
"$ref": "vscode-html-customdata"
57+
}
58+
},
59+
"required": [
60+
"type",
61+
"implementation"
62+
]
63+
}
64+
]
65+
}
66+
},
67+
"concepts": {
68+
"type": "array",
69+
"items": {
70+
"type": "object",
71+
"additionalProperties": false,
72+
"properties": {
73+
"name": {
74+
"type": "string"
75+
},
76+
"description": {
77+
"type": "string"
78+
},
79+
"category": {
80+
"type": "string"
81+
},
82+
"openUIName": {
83+
"type": "string"
84+
},
85+
"image": {
86+
"type": "string"
87+
}
88+
},
89+
"required": [
90+
"name",
91+
"image"
92+
]
93+
}
94+
}
95+
},
96+
"required": [
97+
"name",
98+
"url"
99+
]
100+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function importAll(r: __WebpackModuleApi.RequireContext): void {
2+
r.keys().forEach(r);
3+
}
4+
5+
// Explicitly add to browser test
6+
importAll(require.context("../", true, /\.spec\.js$/));
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* eslint-disable */
2+
if (window.document && !window.document.createRange) {
3+
window.document.createRange = () => ({
4+
setStart: () => {},
5+
setEnd: () => {},
6+
// @ts-ignore
7+
commonAncestorContainer: {
8+
nodeName: "BODY",
9+
ownerDocument: document,
10+
},
11+
});
12+
}

0 commit comments

Comments
 (0)