@fluentui/web-components 3.0.0-alpha.3 → 3.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +24 -1
- package/CHANGELOG.md +11 -2
- package/dist/esm/badge/badge.definition.js +1 -0
- package/dist/esm/badge/badge.definition.js.map +1 -0
- package/dist/esm/badge/badge.js +1 -0
- package/dist/esm/badge/badge.js.map +1 -0
- package/dist/esm/badge/badge.options.js +1 -0
- package/dist/esm/badge/badge.options.js.map +1 -0
- package/dist/esm/badge/badge.styles.js +1 -0
- package/dist/esm/badge/badge.styles.js.map +1 -0
- package/dist/esm/badge/badge.template.js +1 -0
- package/dist/esm/badge/badge.template.js.map +1 -0
- package/dist/esm/badge/define.js +1 -0
- package/dist/esm/badge/define.js.map +1 -0
- package/dist/esm/badge/index.js +1 -0
- package/dist/esm/badge/index.js.map +1 -0
- package/dist/esm/counter-badge/counter-badge.definition.js +1 -0
- package/dist/esm/counter-badge/counter-badge.definition.js.map +1 -0
- package/dist/esm/counter-badge/counter-badge.js +1 -0
- package/dist/esm/counter-badge/counter-badge.js.map +1 -0
- package/dist/esm/counter-badge/counter-badge.options.js +1 -0
- package/dist/esm/counter-badge/counter-badge.options.js.map +1 -0
- package/dist/esm/counter-badge/counter-badge.styles.js +1 -0
- package/dist/esm/counter-badge/counter-badge.styles.js.map +1 -0
- package/dist/esm/counter-badge/counter-badge.template.js +1 -0
- package/dist/esm/counter-badge/counter-badge.template.js.map +1 -0
- package/dist/esm/counter-badge/define.js +1 -0
- package/dist/esm/counter-badge/define.js.map +1 -0
- package/dist/esm/counter-badge/index.js +1 -0
- package/dist/esm/counter-badge/index.js.map +1 -0
- package/dist/esm/fluent-design-system.js +1 -0
- package/dist/esm/fluent-design-system.js.map +1 -0
- package/dist/esm/index-rollup.js +1 -0
- package/dist/esm/index-rollup.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/progress-bar/define.js +1 -0
- package/dist/esm/progress-bar/define.js.map +1 -0
- package/dist/esm/progress-bar/index.js +1 -0
- package/dist/esm/progress-bar/index.js.map +1 -0
- package/dist/esm/progress-bar/progress-bar.definition.js +1 -0
- package/dist/esm/progress-bar/progress-bar.definition.js.map +1 -0
- package/dist/esm/progress-bar/progress-bar.js +1 -0
- package/dist/esm/progress-bar/progress-bar.js.map +1 -0
- package/dist/esm/progress-bar/progress-bar.options.js +1 -0
- package/dist/esm/progress-bar/progress-bar.options.js.map +1 -0
- package/dist/esm/progress-bar/progress-bar.styles.js +1 -0
- package/dist/esm/progress-bar/progress-bar.styles.js.map +1 -0
- package/dist/esm/progress-bar/progress-bar.template.js +1 -0
- package/dist/esm/progress-bar/progress-bar.template.js.map +1 -0
- package/dist/esm/spinner/define.js +1 -0
- package/dist/esm/spinner/define.js.map +1 -0
- package/dist/esm/spinner/index.js +1 -0
- package/dist/esm/spinner/index.js.map +1 -0
- package/dist/esm/spinner/spinner.definition.js +1 -0
- package/dist/esm/spinner/spinner.definition.js.map +1 -0
- package/dist/esm/spinner/spinner.js +1 -0
- package/dist/esm/spinner/spinner.js.map +1 -0
- package/dist/esm/spinner/spinner.options.js +1 -0
- package/dist/esm/spinner/spinner.options.js.map +1 -0
- package/dist/esm/spinner/spinner.styles.js +1 -0
- package/dist/esm/spinner/spinner.styles.js.map +1 -0
- package/dist/esm/spinner/spinner.template.js +1 -0
- package/dist/esm/spinner/spinner.template.js.map +1 -0
- package/dist/esm/styles/index.js +1 -0
- package/dist/esm/styles/index.js.map +1 -0
- package/dist/esm/styles/partials/badge.partials.js +1 -0
- package/dist/esm/styles/partials/badge.partials.js.map +1 -0
- package/dist/esm/styles/partials/index.js +1 -0
- package/dist/esm/styles/partials/index.js.map +1 -0
- package/dist/esm/text/define.js +1 -0
- package/dist/esm/text/define.js.map +1 -0
- package/dist/esm/text/index.js +1 -0
- package/dist/esm/text/index.js.map +1 -0
- package/dist/esm/text/text.definition.js +1 -0
- package/dist/esm/text/text.definition.js.map +1 -0
- package/dist/esm/text/text.js +1 -0
- package/dist/esm/text/text.js.map +1 -0
- package/dist/esm/text/text.options.js +1 -0
- package/dist/esm/text/text.options.js.map +1 -0
- package/dist/esm/text/text.styles.js +1 -0
- package/dist/esm/text/text.styles.js.map +1 -0
- package/dist/esm/text/text.template.js +1 -0
- package/dist/esm/text/text.template.js.map +1 -0
- package/dist/esm/theme/design-tokens.js +1 -0
- package/dist/esm/theme/design-tokens.js.map +1 -0
- package/dist/esm/theme/index.js +1 -0
- package/dist/esm/theme/index.js.map +1 -0
- package/dist/esm/theme/set-theme.js +1 -0
- package/dist/esm/theme/set-theme.js.map +1 -0
- package/dist/fluent-web-components.api.json +7 -7
- package/dist/web-components.d.ts +4 -3
- package/docs/api-report.md +4 -3
- package/package.json +7 -10
- package/.eslintrc.json +0 -62
- package/build/clean.cjs +0 -29
- package/build/transform-fragments.js +0 -29
- package/dist/dts/badge/badge.stories.d.ts +0 -12
- package/dist/dts/counter-badge/counter-badge.stories.d.ts +0 -14
- package/dist/dts/progress-bar/progress-bar.stories.d.ts +0 -9
- package/dist/dts/spinner/spinner.stories.d.ts +0 -8
- package/dist/dts/text/text.stories.d.ts +0 -8
- package/dist/dts/theme/theme.stories.d.ts +0 -5
- package/dist/esm/badge/badge.stories.js +0 -108
- package/dist/esm/counter-badge/counter-badge.stories.js +0 -102
- package/dist/esm/progress-bar/progress-bar.stories.js +0 -60
- package/dist/esm/spinner/spinner.stories.js +0 -45
- package/dist/esm/text/text.stories.js +0 -111
- package/dist/esm/theme/theme.stories.js +0 -21
- package/public/SegoeUI-VF.ttf +0 -0
- package/public/favicon.ico +0 -0
- package/public/favicon.png +0 -0
- package/public/theme-switch.ts +0 -13
- package/rollup.config.js +0 -58
- package/storybook-typings.d.ts +0 -4
|
@@ -11941,7 +11941,7 @@
|
|
|
11941
11941
|
},
|
|
11942
11942
|
{
|
|
11943
11943
|
"kind": "Class",
|
|
11944
|
-
"canonicalReference": "@fluentui/web-components!
|
|
11944
|
+
"canonicalReference": "@fluentui/web-components!ProgressBar_2:class",
|
|
11945
11945
|
"docComment": "/**\n * The base class used for constructing a fluent-progress-bar custom element\n *\n * @public\n */\n",
|
|
11946
11946
|
"excerptTokens": [
|
|
11947
11947
|
{
|
|
@@ -11959,12 +11959,12 @@
|
|
|
11959
11959
|
}
|
|
11960
11960
|
],
|
|
11961
11961
|
"releaseTag": "Public",
|
|
11962
|
-
"name": "
|
|
11962
|
+
"name": "ProgressBar_2",
|
|
11963
11963
|
"preserveMemberOrder": false,
|
|
11964
11964
|
"members": [
|
|
11965
11965
|
{
|
|
11966
11966
|
"kind": "Property",
|
|
11967
|
-
"canonicalReference": "@fluentui/web-components!
|
|
11967
|
+
"canonicalReference": "@fluentui/web-components!ProgressBar_2#shape:member",
|
|
11968
11968
|
"docComment": "/**\n * The shape of the progress bar\n *\n * @remarks\n *\n * HTML Attribute: shape\n *\n * @public\n */\n",
|
|
11969
11969
|
"excerptTokens": [
|
|
11970
11970
|
{
|
|
@@ -11994,7 +11994,7 @@
|
|
|
11994
11994
|
},
|
|
11995
11995
|
{
|
|
11996
11996
|
"kind": "Property",
|
|
11997
|
-
"canonicalReference": "@fluentui/web-components!
|
|
11997
|
+
"canonicalReference": "@fluentui/web-components!ProgressBar_2#thickness:member",
|
|
11998
11998
|
"docComment": "/**\n * The thickness of the progress bar\n *\n * @remarks\n *\n * HTML Attribute: thickness\n *\n * @public\n */\n",
|
|
11999
11999
|
"excerptTokens": [
|
|
12000
12000
|
{
|
|
@@ -12024,7 +12024,7 @@
|
|
|
12024
12024
|
},
|
|
12025
12025
|
{
|
|
12026
12026
|
"kind": "Property",
|
|
12027
|
-
"canonicalReference": "@fluentui/web-components!
|
|
12027
|
+
"canonicalReference": "@fluentui/web-components!ProgressBar_2#validationState:member",
|
|
12028
12028
|
"docComment": "/**\n * The validation state of the progress bar\n *\n * @remarks\n *\n * HTML Attribute: validation-state\n *\n * @public\n */\n",
|
|
12029
12029
|
"excerptTokens": [
|
|
12030
12030
|
{
|
|
@@ -12088,7 +12088,7 @@
|
|
|
12088
12088
|
{
|
|
12089
12089
|
"kind": "Reference",
|
|
12090
12090
|
"text": "ProgressBar",
|
|
12091
|
-
"canonicalReference": "@fluentui/web-components!
|
|
12091
|
+
"canonicalReference": "@fluentui/web-components!ProgressBar_2:class"
|
|
12092
12092
|
},
|
|
12093
12093
|
{
|
|
12094
12094
|
"kind": "Content",
|
|
@@ -12212,7 +12212,7 @@
|
|
|
12212
12212
|
{
|
|
12213
12213
|
"kind": "Reference",
|
|
12214
12214
|
"text": "ProgressBar",
|
|
12215
|
-
"canonicalReference": "@fluentui/web-components!
|
|
12215
|
+
"canonicalReference": "@fluentui/web-components!ProgressBar_2:class"
|
|
12216
12216
|
},
|
|
12217
12217
|
{
|
|
12218
12218
|
"kind": "Content",
|
package/dist/web-components.d.ts
CHANGED
|
@@ -1030,7 +1030,7 @@ export declare const lineHeightHero900: CSSDesignToken<string>;
|
|
|
1030
1030
|
* The base class used for constructing a fluent-progress-bar custom element
|
|
1031
1031
|
* @public
|
|
1032
1032
|
*/
|
|
1033
|
-
|
|
1033
|
+
declare class ProgressBar_2 extends FASTProgress {
|
|
1034
1034
|
/**
|
|
1035
1035
|
* The thickness of the progress bar
|
|
1036
1036
|
*
|
|
@@ -1054,6 +1054,7 @@ export declare class ProgressBar extends FASTProgress {
|
|
|
1054
1054
|
*/
|
|
1055
1055
|
validationState: ProgressBarValidationState | null;
|
|
1056
1056
|
}
|
|
1057
|
+
export { ProgressBar_2 as ProgressBar }
|
|
1057
1058
|
|
|
1058
1059
|
/**
|
|
1059
1060
|
* The Fluent ProgressBar Element.
|
|
@@ -1063,7 +1064,7 @@ export declare class ProgressBar extends FASTProgress {
|
|
|
1063
1064
|
* @remarks
|
|
1064
1065
|
* HTML Element: \<fluent-progress-bar\>
|
|
1065
1066
|
*/
|
|
1066
|
-
export declare const ProgressBarDefinition: FASTElementDefinition<typeof
|
|
1067
|
+
export declare const ProgressBarDefinition: FASTElementDefinition<typeof ProgressBar_2>;
|
|
1067
1068
|
|
|
1068
1069
|
/**
|
|
1069
1070
|
* ProgressBarShape Constants
|
|
@@ -1085,7 +1086,7 @@ export declare type ProgressBarShape = ValuesOf<typeof ProgressBarShape>;
|
|
|
1085
1086
|
*/
|
|
1086
1087
|
export declare const ProgressBarStyles: ElementStyles;
|
|
1087
1088
|
|
|
1088
|
-
export declare const ProgressBarTemplate: ElementViewTemplate<
|
|
1089
|
+
export declare const ProgressBarTemplate: ElementViewTemplate<ProgressBar_2>;
|
|
1089
1090
|
|
|
1090
1091
|
/**
|
|
1091
1092
|
* ProgressBarThickness Constants
|
package/docs/api-report.md
CHANGED
|
@@ -1204,14 +1204,15 @@ export const lineHeightHero800: CSSDesignToken<string>;
|
|
|
1204
1204
|
export const lineHeightHero900: CSSDesignToken<string>;
|
|
1205
1205
|
|
|
1206
1206
|
// @public
|
|
1207
|
-
|
|
1207
|
+
class ProgressBar_2 extends FASTProgress {
|
|
1208
1208
|
shape: ProgressBarShape;
|
|
1209
1209
|
thickness: ProgressBarThickness;
|
|
1210
1210
|
validationState: ProgressBarValidationState | null;
|
|
1211
1211
|
}
|
|
1212
|
+
export { ProgressBar_2 as ProgressBar }
|
|
1212
1213
|
|
|
1213
1214
|
// @public
|
|
1214
|
-
export const ProgressBarDefinition: FASTElementDefinition<typeof
|
|
1215
|
+
export const ProgressBarDefinition: FASTElementDefinition<typeof ProgressBar_2>;
|
|
1215
1216
|
|
|
1216
1217
|
// @public
|
|
1217
1218
|
export const ProgressBarShape: {
|
|
@@ -1226,7 +1227,7 @@ export type ProgressBarShape = ValuesOf<typeof ProgressBarShape>;
|
|
|
1226
1227
|
export const ProgressBarStyles: ElementStyles;
|
|
1227
1228
|
|
|
1228
1229
|
// @public (undocumented)
|
|
1229
|
-
export const ProgressBarTemplate: ElementViewTemplate<
|
|
1230
|
+
export const ProgressBarTemplate: ElementViewTemplate<ProgressBar_2>;
|
|
1230
1231
|
|
|
1231
1232
|
// @public
|
|
1232
1233
|
export const ProgressBarThickness: {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fluentui/web-components",
|
|
3
3
|
"description": "A library of Fluent Web Components",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "3.0.0-alpha.
|
|
5
|
+
"version": "3.0.0-alpha.4",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Microsoft",
|
|
8
8
|
"url": "https://discord.gg/FcSNfg4"
|
|
@@ -48,22 +48,19 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"tsc": "tsc",
|
|
50
50
|
"api-extractor": "api-extractor",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"build": "
|
|
55
|
-
"dev": "tsc -p ./tsconfig.json -w",
|
|
56
|
-
"tdd": "yarn dev & yarn test-chrome:watch",
|
|
57
|
-
"prepare": "yarn clean && yarn build",
|
|
51
|
+
"compile": "node ./scripts/compile",
|
|
52
|
+
"clean": "node ./scripts/clean dist",
|
|
53
|
+
"generate-api": "api-extractor run --local",
|
|
54
|
+
"build": "yarn compile && rollup -c && yarn generate-api",
|
|
58
55
|
"lint": "eslint . --ext .ts",
|
|
59
56
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
60
57
|
"format": "prettier -w 'src/**/(*.ts|*.html)' --ignore-path ../../.prettierignore",
|
|
61
58
|
"format:check": "yarn format -c",
|
|
62
59
|
"code-style": "yarn format:check && yarn lint",
|
|
63
|
-
"start": "yarn start-storybook -p 6006 --docs",
|
|
60
|
+
"start": "yarn start-storybook -p 6006 --docs --no-manager-cache",
|
|
64
61
|
"start-storybook": "node node_modules/@storybook/html/bin/index",
|
|
65
62
|
"build-storybook": "node node_modules/@storybook/html/bin/build -o ./dist/storybook --docs",
|
|
66
|
-
"test": "yarn
|
|
63
|
+
"test": "yarn test-chrome:verbose",
|
|
67
64
|
"test-node": "mocha --reporter min --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
|
|
68
65
|
"test-node:verbose": "mocha --reporter spec --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
|
|
69
66
|
"test-chrome": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage",
|
package/.eslintrc.json
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"parser": "@typescript-eslint/parser",
|
|
4
|
-
"plugins": ["@typescript-eslint", "import"],
|
|
5
|
-
"extends": [
|
|
6
|
-
"eslint:recommended",
|
|
7
|
-
"plugin:@typescript-eslint/eslint-recommended",
|
|
8
|
-
"plugin:@typescript-eslint/recommended",
|
|
9
|
-
"prettier"
|
|
10
|
-
],
|
|
11
|
-
"settings": {
|
|
12
|
-
"react": {
|
|
13
|
-
"version": "latest"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"rules": {
|
|
17
|
-
"no-extra-boolean-cast": "off",
|
|
18
|
-
"no-prototype-builtins": "off",
|
|
19
|
-
"no-fallthrough": "off",
|
|
20
|
-
"no-unexpected-multiline": "off",
|
|
21
|
-
"import/order": "error",
|
|
22
|
-
"sort-imports": [
|
|
23
|
-
"error",
|
|
24
|
-
{
|
|
25
|
-
"ignoreCase": true,
|
|
26
|
-
"ignoreDeclarationSort": true
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"comma-dangle": "off",
|
|
30
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
31
|
-
"@typescript-eslint/no-use-before-define": "off",
|
|
32
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
33
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
34
|
-
"@typescript-eslint/camelcase": "off",
|
|
35
|
-
"@typescript-eslint/no-inferrable-types": "off",
|
|
36
|
-
"@typescript-eslint/no-unused-vars": [
|
|
37
|
-
"warn",
|
|
38
|
-
{
|
|
39
|
-
"args": "none"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
43
|
-
"@typescript-eslint/naming-convention": [
|
|
44
|
-
"error",
|
|
45
|
-
{
|
|
46
|
-
"selector": "default",
|
|
47
|
-
"format": ["UPPER_CASE", "camelCase", "PascalCase"],
|
|
48
|
-
"leadingUnderscore": "allow"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"selector": "property",
|
|
52
|
-
"format": null // disable for property names because of our foo__expanded convention for JSS
|
|
53
|
-
// TODO: I think we can come up with a regex that ignores variables with __ in them
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"selector": "variable",
|
|
57
|
-
"format": null // disable for variable names because of our foo__expanded convention for JSS
|
|
58
|
-
// TODO: I think we can come up with a regex that ignores variables with __ in them
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
}
|
package/build/clean.cjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility for cleaning directories.
|
|
3
|
-
* Usage: node build/clean.js %path%
|
|
4
|
-
*/
|
|
5
|
-
const path = require('path');
|
|
6
|
-
const rimraf = require('rimraf');
|
|
7
|
-
const argv = require('yargs').argv;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* All paths passed to the clean script
|
|
11
|
-
*/
|
|
12
|
-
const paths = argv._;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Function to remove a given path
|
|
16
|
-
*/
|
|
17
|
-
function cleanPath(cleanPath) {
|
|
18
|
-
const removePath = path.resolve(process.cwd(), cleanPath);
|
|
19
|
-
rimraf(removePath, () => {
|
|
20
|
-
console.log(removePath, 'cleaned');
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Clean all paths
|
|
26
|
-
*/
|
|
27
|
-
if (Array.isArray(paths)) {
|
|
28
|
-
paths.forEach(cleanPath);
|
|
29
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef */
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Reduces extra spaces in HTML tagged templates.
|
|
5
|
-
*
|
|
6
|
-
* @param {string} data - the fragment value
|
|
7
|
-
* @returns string
|
|
8
|
-
*/
|
|
9
|
-
export function transformHTMLFragment(data) {
|
|
10
|
-
data = data.replace(/\s*([<>])\s*/g, '$1'); // remove spaces before and after angle brackets
|
|
11
|
-
return data.replace(/\s{2,}/g, ' '); // Collapse all sequences to 1 space
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Reduces extra spaces in CSS tagged templates.
|
|
16
|
-
*
|
|
17
|
-
* Breakdown of this regex:
|
|
18
|
-
* (?:\s*\/\*(?:.|\s)+?\*\/\s*) Remove comments (non-capturing)
|
|
19
|
-
* (?:;)\s+(?=\}) Remove semicolons and spaces followed by property list end (non-capturing)
|
|
20
|
-
* \s+(?=\{) Remove spaces before property list start (non-capturing)
|
|
21
|
-
* (?<=:)\s+ Remove spaces after property declarations (non-capturing)
|
|
22
|
-
* \s*([{};,])\s* Remove extra spaces before and after braces, semicolons, and commas (captures)
|
|
23
|
-
*
|
|
24
|
-
* @param {string} data - the fragment value
|
|
25
|
-
* @returns string
|
|
26
|
-
*/
|
|
27
|
-
export function transformCSSFragment(data) {
|
|
28
|
-
return data.replace(/(?:\s*\/\*(?:.|\s)+?\*\/\s*)|(?:;)\s+(?=\})|\s+(?=\{)|(?<=:)\s+|\s*([{};,])\s*/g, '$1');
|
|
29
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Args, Meta } from '@storybook/html';
|
|
2
|
-
import type { Badge as FluentBadge } from './badge.js';
|
|
3
|
-
import './define.js';
|
|
4
|
-
declare type BadgeStoryArgs = Args & FluentBadge;
|
|
5
|
-
declare type BadgeStoryMeta = Meta<BadgeStoryArgs>;
|
|
6
|
-
declare const _default: BadgeStoryMeta;
|
|
7
|
-
export default _default;
|
|
8
|
-
export declare const Badge: any;
|
|
9
|
-
export declare const Appearance: (args: Args) => Element | DocumentFragment | null;
|
|
10
|
-
export declare const Color: (args: Args) => Element | DocumentFragment | null;
|
|
11
|
-
export declare const Shape: (args: Args) => Element | DocumentFragment | null;
|
|
12
|
-
export declare const Size: BadgeStoryMeta;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Args, Meta } from '@storybook/html';
|
|
2
|
-
import type { CounterBadge as FluentCounterBadge } from './counter-badge.js';
|
|
3
|
-
import './define.js';
|
|
4
|
-
declare type CounterBadgeStoryArgs = Args & FluentCounterBadge;
|
|
5
|
-
declare type CounterBadgeStoryMeta = Meta<CounterBadgeStoryArgs>;
|
|
6
|
-
declare const _default: CounterBadgeStoryMeta;
|
|
7
|
-
export default _default;
|
|
8
|
-
export declare const CounterBadge: any;
|
|
9
|
-
export declare const Appearance: (args: Args) => Element | DocumentFragment | null;
|
|
10
|
-
export declare const Color: (args: Args) => Element | DocumentFragment | null;
|
|
11
|
-
export declare const Shape: (args: Args) => Element | DocumentFragment | null;
|
|
12
|
-
export declare const Size: CounterBadgeStoryMeta;
|
|
13
|
-
export declare const Dot: (args: Args) => Element | DocumentFragment | null;
|
|
14
|
-
export declare const ShowZero: (args: Args) => Element | DocumentFragment | null;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Args, Meta } from '@storybook/html';
|
|
2
|
-
import type { ProgressBar as FluentProgressBar } from './progress-bar.js';
|
|
3
|
-
import './define.js';
|
|
4
|
-
declare type ProgressStoryArgs = Args & FluentProgressBar;
|
|
5
|
-
declare type ProgressStoryMeta = Meta<ProgressStoryArgs>;
|
|
6
|
-
declare const _default: ProgressStoryMeta;
|
|
7
|
-
export default _default;
|
|
8
|
-
export declare const Progress: any;
|
|
9
|
-
export declare const ProgressIndeterminate: (args: Args) => Element | DocumentFragment | null;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Args, Meta } from '@storybook/html';
|
|
2
|
-
import './define.js';
|
|
3
|
-
declare type SpinnerStoryArgs = Args;
|
|
4
|
-
declare type SpinnerStoryMeta = Meta<SpinnerStoryArgs>;
|
|
5
|
-
declare const _default: SpinnerStoryMeta;
|
|
6
|
-
export default _default;
|
|
7
|
-
export declare const Spinner: any;
|
|
8
|
-
export declare const SpinnerInverted: (args: Args) => Element | DocumentFragment | null;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Args, Meta } from '@storybook/html';
|
|
2
|
-
import type { Text as FluentText } from './text.js';
|
|
3
|
-
import './define.js';
|
|
4
|
-
declare type TextStoryArgs = Args & FluentText;
|
|
5
|
-
declare type TextStoryMeta = Meta<TextStoryArgs>;
|
|
6
|
-
declare const _default: TextStoryMeta;
|
|
7
|
-
export default _default;
|
|
8
|
-
export declare const Text: any;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { html, when } from '@microsoft/fast-element';
|
|
2
|
-
import { renderComponent } from '../__test__/helpers.js';
|
|
3
|
-
import { BadgeAppearance, BadgeColor, BadgeShape, BadgeSize } from './badge.options.js';
|
|
4
|
-
import './define.js';
|
|
5
|
-
const storyTemplate = html `
|
|
6
|
-
<fluent-badge appearance="${x => x.appearance}" color="${x => x.color}" shape="${x => x.shape}" size="${x => x.size}">
|
|
7
|
-
${when(x => x.iconPosition === 'start', html `<svg
|
|
8
|
-
slot="start"
|
|
9
|
-
aria-hidden="true"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
width="1em"
|
|
12
|
-
height="1em"
|
|
13
|
-
preserveAspectRatio="xMidYMid meet"
|
|
14
|
-
viewBox="0 0 20 20"
|
|
15
|
-
>
|
|
16
|
-
<path
|
|
17
|
-
fill="currentColor"
|
|
18
|
-
d="M14.69 11.503c1 0 1.81.81 1.81 1.81v.689h-.005c-.034.78-.248 1.757-1.123 2.555C14.416 17.43 12.765 18 10 18c-2.766 0-4.416-.57-5.372-1.443c-.875-.798-1.089-1.776-1.123-2.555H3.5v-.69c0-.999.81-1.809 1.81-1.809h9.38ZM6.5 3A1.5 1.5 0 0 0 5 4.5v4A1.5 1.5 0 0 0 6.5 10h7A1.5 1.5 0 0 0 15 8.5v-4A1.5 1.5 0 0 0 13.5 3h-3v-.5A.48.48 0 0 0 10 2c-.276 0-.5.23-.5.5V3h-3ZM7 6.5a1 1 0 1 1 2 0a1 1 0 0 1-2 0Zm4 0a1 1 0 1 1 2 0a1 1 0 0 1-2 0Z"
|
|
19
|
-
/>
|
|
20
|
-
</svg>`)}
|
|
21
|
-
${x => x.content}
|
|
22
|
-
${when(x => x.iconPosition === 'end', html `<svg
|
|
23
|
-
slot="start"
|
|
24
|
-
aria-hidden="true"
|
|
25
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
-
width="1em"
|
|
27
|
-
height="1em"
|
|
28
|
-
preserveAspectRatio="xMidYMid meet"
|
|
29
|
-
viewBox="0 0 20 20"
|
|
30
|
-
>
|
|
31
|
-
<path
|
|
32
|
-
fill="currentColor"
|
|
33
|
-
d="M14.69 11.503c1 0 1.81.81 1.81 1.81v.689h-.005c-.034.78-.248 1.757-1.123 2.555C14.416 17.43 12.765 18 10 18c-2.766 0-4.416-.57-5.372-1.443c-.875-.798-1.089-1.776-1.123-2.555H3.5v-.69c0-.999.81-1.809 1.81-1.809h9.38ZM6.5 3A1.5 1.5 0 0 0 5 4.5v4A1.5 1.5 0 0 0 6.5 10h7A1.5 1.5 0 0 0 15 8.5v-4A1.5 1.5 0 0 0 13.5 3h-3v-.5A.48.48 0 0 0 10 2c-.276 0-.5.23-.5.5V3h-3ZM7 6.5a1 1 0 1 1 2 0a1 1 0 0 1-2 0Zm4 0a1 1 0 1 1 2 0a1 1 0 0 1-2 0Z"
|
|
34
|
-
/>
|
|
35
|
-
</svg>`)}
|
|
36
|
-
</fluent-badge>
|
|
37
|
-
`;
|
|
38
|
-
export default {
|
|
39
|
-
title: 'Components/Badge/Badge',
|
|
40
|
-
args: {
|
|
41
|
-
content: null,
|
|
42
|
-
},
|
|
43
|
-
argTypes: {
|
|
44
|
-
appearance: {
|
|
45
|
-
options: Object.values(BadgeAppearance),
|
|
46
|
-
control: {
|
|
47
|
-
type: 'select',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
color: {
|
|
51
|
-
options: Object.values(BadgeColor),
|
|
52
|
-
control: {
|
|
53
|
-
type: 'select',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
shape: {
|
|
57
|
-
options: Object.values(BadgeShape),
|
|
58
|
-
control: {
|
|
59
|
-
type: 'select',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
size: {
|
|
63
|
-
options: Object.values(BadgeSize),
|
|
64
|
-
control: {
|
|
65
|
-
type: 'select',
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
iconPosition: {
|
|
69
|
-
options: ['none', 'start', 'end'],
|
|
70
|
-
control: {
|
|
71
|
-
type: 'select',
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
content: {
|
|
75
|
-
control: 'text',
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
export const Badge = renderComponent(storyTemplate).bind({});
|
|
80
|
-
export const Appearance = renderComponent(html `
|
|
81
|
-
<fluent-badge appearance="filled">filled</fluent-badge>
|
|
82
|
-
<fluent-badge appearance="ghost">ghost</fluent-badge>
|
|
83
|
-
<fluent-badge appearance="outline">outline</fluent-badge>
|
|
84
|
-
<fluent-badge appearance="tint">tint</fluent-badge>
|
|
85
|
-
`);
|
|
86
|
-
export const Color = renderComponent(html `
|
|
87
|
-
<fluent-badge color="brand">brand</fluent-badge>
|
|
88
|
-
<fluent-badge color="danger">danger</fluent-badge>
|
|
89
|
-
<fluent-badge color="important">important</fluent-badge>
|
|
90
|
-
<fluent-badge color="informative">informative</fluent-badge>
|
|
91
|
-
<fluent-badge color="severe">severe</fluent-badge>
|
|
92
|
-
<fluent-badge color="subtle">subtle</fluent-badge>
|
|
93
|
-
<fluent-badge color="success">success</fluent-badge>
|
|
94
|
-
<fluent-badge color="warning">warning</fluent-badge>
|
|
95
|
-
`);
|
|
96
|
-
export const Shape = renderComponent(html `
|
|
97
|
-
<fluent-badge shape="circular"></fluent-badge>
|
|
98
|
-
<fluent-badge shape="rounded"></fluent-badge>
|
|
99
|
-
<fluent-badge shape="square"></fluent-badge>
|
|
100
|
-
`);
|
|
101
|
-
export const Size = renderComponent(html `
|
|
102
|
-
<fluent-badge size="tiny"></fluent-badge>
|
|
103
|
-
<fluent-badge size="extra-small"></fluent-badge>
|
|
104
|
-
<fluent-badge size="small"></fluent-badge>
|
|
105
|
-
<fluent-badge size="medium"></fluent-badge>
|
|
106
|
-
<fluent-badge size="large"></fluent-badge>
|
|
107
|
-
<fluent-badge size="extra-large"></fluent-badge>
|
|
108
|
-
`);
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { html } from '@microsoft/fast-element';
|
|
2
|
-
import { renderComponent } from '../__test__/helpers.js';
|
|
3
|
-
import { CounterBadgeAppearance, CounterBadgeColor, CounterBadgeShape, CounterBadgeSize, } from './counter-badge.options.js';
|
|
4
|
-
import './define.js';
|
|
5
|
-
// TODO: Currently cannot show icon or content
|
|
6
|
-
// in the counter badge stories because it projects as slotted content
|
|
7
|
-
const storyTemplate = html `
|
|
8
|
-
<fluent-counter-badge
|
|
9
|
-
appearance="${x => x.appearance}"
|
|
10
|
-
color="${x => x.color}"
|
|
11
|
-
shape="${x => x.shape}"
|
|
12
|
-
size="${x => x.size}"
|
|
13
|
-
count="${x => x.count}"
|
|
14
|
-
overflow-count="${x => x.overflowCount}"
|
|
15
|
-
?show-zero="${x => x.showZero}"
|
|
16
|
-
?dot="${x => x.dot}"
|
|
17
|
-
></fluent-counter-badge>
|
|
18
|
-
`;
|
|
19
|
-
export default {
|
|
20
|
-
title: 'Components/Badge/Counter Badge',
|
|
21
|
-
args: {
|
|
22
|
-
dot: false,
|
|
23
|
-
showZero: false,
|
|
24
|
-
appearance: CounterBadgeAppearance.filled,
|
|
25
|
-
color: CounterBadgeColor.brand,
|
|
26
|
-
shape: CounterBadgeShape.circular,
|
|
27
|
-
count: 5,
|
|
28
|
-
},
|
|
29
|
-
argTypes: {
|
|
30
|
-
appearance: {
|
|
31
|
-
options: Object.values(CounterBadgeAppearance),
|
|
32
|
-
control: {
|
|
33
|
-
type: 'select',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
color: {
|
|
37
|
-
options: Object.values(CounterBadgeColor),
|
|
38
|
-
control: {
|
|
39
|
-
type: 'select',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
shape: {
|
|
43
|
-
options: Object.values(CounterBadgeShape),
|
|
44
|
-
control: {
|
|
45
|
-
type: 'select',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
size: {
|
|
49
|
-
options: Object.values(CounterBadgeSize),
|
|
50
|
-
control: {
|
|
51
|
-
type: 'select',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
iconPosition: {
|
|
55
|
-
options: ['none', 'start', 'end'],
|
|
56
|
-
control: {
|
|
57
|
-
type: 'select',
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
dot: {
|
|
61
|
-
control: 'boolean',
|
|
62
|
-
},
|
|
63
|
-
showZero: {
|
|
64
|
-
control: 'boolean',
|
|
65
|
-
},
|
|
66
|
-
count: {
|
|
67
|
-
control: 'number',
|
|
68
|
-
},
|
|
69
|
-
overflowCount: {
|
|
70
|
-
control: 'text',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
export const CounterBadge = renderComponent(storyTemplate).bind({});
|
|
75
|
-
export const Appearance = renderComponent(html `
|
|
76
|
-
<fluent-counter-badge count="5" appearance="filled"></fluent-counter-badge>
|
|
77
|
-
<fluent-counter-badge count="5" appearance="ghost"></fluent-counter-badge>
|
|
78
|
-
`);
|
|
79
|
-
export const Color = renderComponent(html `
|
|
80
|
-
<fluent-counter-badge count="5" color="brand"></fluent-counter-badge>
|
|
81
|
-
<fluent-counter-badge count="5" color="danger"></fluent-counter-badge>
|
|
82
|
-
<fluent-counter-badge count="5" color="important"></fluent-counter-badge>
|
|
83
|
-
<fluent-counter-badge count="5" color="informative"></fluent-counter-badge>
|
|
84
|
-
<fluent-counter-badge count="5" color="severe"></fluent-counter-badge>
|
|
85
|
-
<fluent-counter-badge count="5" color="subtle"></fluent-counter-badge>
|
|
86
|
-
<fluent-counter-badge count="5" color="success"></fluent-counter-badge>
|
|
87
|
-
<fluent-counter-badge count="5" color="warning"></fluent-counter-badge>
|
|
88
|
-
`);
|
|
89
|
-
export const Shape = renderComponent(html `
|
|
90
|
-
<fluent-counter-badge count="5" shape="circular"></fluent-counter-badge>
|
|
91
|
-
<fluent-counter-badge count="5" shape="rounded"></fluent-counter-badge>
|
|
92
|
-
`);
|
|
93
|
-
export const Size = renderComponent(html `
|
|
94
|
-
<fluent-counter-badge size="tiny"></fluent-counter-badge>
|
|
95
|
-
<fluent-counter-badge size="extra-small"></fluent-counter-badge>
|
|
96
|
-
<fluent-counter-badge size="small"></fluent-counter-badge>
|
|
97
|
-
<fluent-counter-badge size="medium"></fluent-counter-badge>
|
|
98
|
-
<fluent-counter-badge size="large"></fluent-counter-badge>
|
|
99
|
-
<fluent-counter-badge size="extra-large"></fluent-counter-badge>
|
|
100
|
-
`);
|
|
101
|
-
export const Dot = renderComponent(html `<fluent-counter-badge dot></fluent-counter-badge>`);
|
|
102
|
-
export const ShowZero = renderComponent(html `<fluent-counter-badge show-zero></fluent-counter-badge>`);
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { html } from '@microsoft/fast-element';
|
|
2
|
-
import { renderComponent } from '../__test__/helpers.js';
|
|
3
|
-
import { ProgressBarShape, ProgressBarThickness, ProgressBarValidationState } from './progress-bar.options.js';
|
|
4
|
-
import './define.js';
|
|
5
|
-
const storyTemplate = html `
|
|
6
|
-
<fluent-progress-bar
|
|
7
|
-
thickness=${x => x.thickness}
|
|
8
|
-
shape=${x => x.shape}
|
|
9
|
-
max=${x => x.max}
|
|
10
|
-
aria-valuemax=${x => x.max}
|
|
11
|
-
aria-valuenow=${x => x.value}
|
|
12
|
-
value=${x => x.value}
|
|
13
|
-
validation-state=${x => x.validationState}
|
|
14
|
-
></fluent-progress-bar>
|
|
15
|
-
`;
|
|
16
|
-
export default {
|
|
17
|
-
title: 'Components/ProgressBar',
|
|
18
|
-
args: {
|
|
19
|
-
max: 100,
|
|
20
|
-
value: 15,
|
|
21
|
-
thickness: 'medium',
|
|
22
|
-
shape: 'rounded',
|
|
23
|
-
validationState: null,
|
|
24
|
-
},
|
|
25
|
-
argTypes: {
|
|
26
|
-
max: {
|
|
27
|
-
control: 'number',
|
|
28
|
-
defaultValue: 100,
|
|
29
|
-
},
|
|
30
|
-
value: {
|
|
31
|
-
control: 'number',
|
|
32
|
-
defaultValue: 15,
|
|
33
|
-
},
|
|
34
|
-
thickness: {
|
|
35
|
-
control: {
|
|
36
|
-
type: 'select',
|
|
37
|
-
},
|
|
38
|
-
options: Object.values(ProgressBarThickness),
|
|
39
|
-
defaultValue: 'medium',
|
|
40
|
-
},
|
|
41
|
-
shape: {
|
|
42
|
-
options: Object.values(ProgressBarShape),
|
|
43
|
-
control: {
|
|
44
|
-
type: 'select',
|
|
45
|
-
},
|
|
46
|
-
defaultValue: 'rounded',
|
|
47
|
-
},
|
|
48
|
-
validationState: {
|
|
49
|
-
options: Object.values(ProgressBarValidationState),
|
|
50
|
-
control: {
|
|
51
|
-
type: 'select',
|
|
52
|
-
},
|
|
53
|
-
defaultValue: null,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
export const Progress = renderComponent(storyTemplate).bind({});
|
|
58
|
-
export const ProgressIndeterminate = renderComponent(html `
|
|
59
|
-
<fluent-progress-bar title="Indeterminate Bar" aria-label="Indeterminate progress bar"></fluent-progress-bar>
|
|
60
|
-
`);
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { html } from '@microsoft/fast-element';
|
|
2
|
-
import { renderComponent } from '../__test__/helpers.js';
|
|
3
|
-
import { SpinnerAppearance, SpinnerSize } from './spinner.options.js';
|
|
4
|
-
import './define.js';
|
|
5
|
-
const storyTemplate = html `
|
|
6
|
-
<fluent-spinner appearance=${x => x.appearance} size=${x => x.size}></fluent-spinner>
|
|
7
|
-
`;
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Components/Spinner',
|
|
10
|
-
argTypes: {
|
|
11
|
-
appearance: {
|
|
12
|
-
description: 'The appearance of the spinner',
|
|
13
|
-
table: {
|
|
14
|
-
defaultValue: { summary: 'primary' },
|
|
15
|
-
},
|
|
16
|
-
control: {
|
|
17
|
-
type: 'select',
|
|
18
|
-
options: Object.values(SpinnerAppearance),
|
|
19
|
-
},
|
|
20
|
-
defaultValue: 'primary',
|
|
21
|
-
},
|
|
22
|
-
size: {
|
|
23
|
-
description: 'The size of the spinner',
|
|
24
|
-
table: {
|
|
25
|
-
defaultValue: { summary: 'medium' },
|
|
26
|
-
},
|
|
27
|
-
control: {
|
|
28
|
-
type: 'select',
|
|
29
|
-
options: Object.values(SpinnerSize),
|
|
30
|
-
},
|
|
31
|
-
defaultValue: 'medium',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
parameters: {
|
|
35
|
-
status: {
|
|
36
|
-
type: 'experimental',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
export const Spinner = renderComponent(storyTemplate).bind({});
|
|
41
|
-
export const SpinnerInverted = renderComponent(html `
|
|
42
|
-
<div style="background-color: #0f6cbd; padding: 20px;">
|
|
43
|
-
<fluent-spinner appearance="inverted" size="medium"></fluent-spinner>
|
|
44
|
-
</div>
|
|
45
|
-
`);
|