@fluentui/web-components 2.5.11 → 3.0.0-alpha.2
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/.eslintrc.json +62 -0
- package/CHANGELOG.json +64 -36
- package/CHANGELOG.md +14 -20
- package/build/{clean.js → clean.cjs} +0 -0
- package/dist/dts/badge/badge.d.ts +49 -0
- package/dist/dts/badge/badge.definition.d.ts +11 -0
- package/dist/dts/badge/badge.options.d.ts +73 -0
- package/dist/dts/badge/badge.stories.d.ts +10 -12
- package/dist/dts/badge/badge.styles.d.ts +4 -3
- package/dist/dts/badge/badge.template.d.ts +9 -0
- package/dist/{esm/color/recipe.js → dts/badge/define.d.ts} +0 -0
- package/dist/dts/badge/index.d.ts +5 -29
- package/dist/dts/counter-badge/counter-badge.d.ts +90 -0
- package/dist/dts/counter-badge/counter-badge.definition.d.ts +11 -0
- package/dist/dts/counter-badge/counter-badge.options.d.ts +69 -0
- package/dist/dts/counter-badge/counter-badge.stories.d.ts +14 -0
- package/dist/dts/counter-badge/counter-badge.styles.d.ts +4 -0
- package/dist/dts/counter-badge/counter-badge.template.d.ts +7 -0
- package/dist/dts/counter-badge/define.d.ts +1 -0
- package/dist/dts/counter-badge/index.d.ts +5 -0
- package/dist/dts/fluent-design-system.d.ts +5 -9
- package/dist/dts/index-rollup.d.ts +1 -8
- package/dist/dts/index.d.ts +5 -49
- package/dist/dts/progress-bar/define.d.ts +1 -0
- package/dist/dts/progress-bar/index.d.ts +5 -0
- package/dist/dts/progress-bar/progress-bar.d.ts +30 -0
- package/dist/dts/progress-bar/progress-bar.definition.d.ts +10 -0
- package/dist/dts/progress-bar/progress-bar.options.d.ts +41 -0
- package/dist/dts/progress-bar/progress-bar.stories.d.ts +9 -0
- package/dist/dts/progress-bar/progress-bar.styles.d.ts +4 -0
- package/dist/dts/progress-bar/progress-bar.template.d.ts +3 -0
- package/dist/dts/styles/index.d.ts +1 -5
- package/dist/dts/styles/partials/badge.partials.d.ts +28 -0
- package/dist/dts/styles/partials/index.d.ts +1 -0
- package/dist/dts/text/define.d.ts +1 -0
- package/dist/dts/text/index.d.ts +5 -0
- package/dist/dts/text/text.d.ts +91 -0
- package/dist/dts/text/text.definition.d.ts +10 -0
- package/dist/dts/text/text.options.d.ts +67 -0
- package/dist/dts/text/text.stories.d.ts +8 -0
- package/dist/dts/text/text.styles.d.ts +4 -0
- package/dist/dts/text/text.template.d.ts +6 -0
- package/dist/dts/theme/design-tokens.d.ts +379 -0
- package/dist/dts/theme/index.d.ts +2 -0
- package/dist/dts/theme/set-theme.d.ts +6 -0
- package/dist/dts/{anchored-region/anchored-region.stories.d.ts → theme/theme.stories.d.ts} +1 -2
- package/dist/esm/badge/badge.definition.js +18 -0
- package/dist/esm/badge/badge.js +42 -0
- package/dist/esm/badge/badge.options.js +45 -0
- package/dist/esm/badge/badge.stories.js +101 -20
- package/dist/esm/badge/badge.styles.js +25 -36
- package/dist/esm/badge/badge.template.js +14 -0
- package/dist/esm/badge/define.js +3 -0
- package/dist/esm/badge/index.js +5 -45
- package/dist/esm/counter-badge/counter-badge.definition.js +18 -0
- package/dist/esm/counter-badge/counter-badge.js +89 -0
- package/dist/esm/counter-badge/counter-badge.options.js +42 -0
- package/dist/esm/counter-badge/counter-badge.stories.js +102 -0
- package/dist/esm/counter-badge/counter-badge.styles.js +30 -0
- package/dist/esm/counter-badge/counter-badge.template.js +12 -0
- package/dist/esm/counter-badge/define.js +3 -0
- package/dist/esm/counter-badge/index.js +5 -0
- package/dist/esm/fluent-design-system.js +5 -11
- package/dist/esm/index-rollup.js +1 -12
- package/dist/esm/index.js +5 -49
- package/dist/esm/progress-bar/define.js +3 -0
- package/dist/esm/progress-bar/index.js +5 -0
- package/dist/esm/progress-bar/progress-bar.definition.js +17 -0
- package/dist/esm/progress-bar/progress-bar.js +18 -0
- package/dist/esm/progress-bar/progress-bar.options.js +25 -0
- package/dist/esm/progress-bar/progress-bar.stories.js +60 -0
- package/dist/esm/progress-bar/progress-bar.styles.js +155 -0
- package/dist/esm/progress-bar/progress-bar.template.js +5 -0
- package/dist/esm/styles/index.js +1 -5
- package/dist/esm/styles/partials/badge.partials.js +272 -0
- package/dist/esm/styles/partials/index.js +1 -0
- package/dist/esm/text/define.js +3 -0
- package/dist/esm/text/index.js +5 -0
- package/dist/esm/text/text.definition.js +17 -0
- package/dist/esm/text/text.js +91 -0
- package/dist/esm/text/text.options.js +45 -0
- package/dist/esm/text/text.stories.js +111 -0
- package/dist/esm/text/text.styles.js +104 -0
- package/dist/esm/text/text.template.js +5 -0
- package/dist/esm/theme/design-tokens.js +381 -0
- package/dist/esm/theme/index.js +2 -0
- package/dist/esm/theme/set-theme.js +11 -0
- package/dist/esm/theme/theme.stories.js +21 -0
- package/dist/fluent-web-components.api.json +6683 -12477
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/web-components.d.ts +895 -2490
- package/dist/web-components.js +5181 -20475
- package/dist/web-components.min.js +269 -239
- package/docs/api-report.md +783 -1074
- package/package.json +53 -17
- package/public/theme-switch.ts +13 -0
- package/rollup.config.js +5 -0
- package/dist/dts/_docs/design-system/color-explorer/app.d.ts +0 -25
- package/dist/dts/_docs/design-system/color-explorer/colors.d.ts +0 -13
- package/dist/dts/_docs/design-system/color-explorer/component-types.d.ts +0 -6
- package/dist/dts/_docs/design-system/color-explorer/components/color-block.d.ts +0 -10
- package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.d.ts +0 -190
- package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.form-associated.d.ts +0 -15
- package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.styles.d.ts +0 -3
- package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.template.d.ts +0 -8
- package/dist/dts/_docs/design-system/color-explorer/components/color-picker/index.d.ts +0 -9
- package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.d.ts +0 -8
- package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.styles.d.ts +0 -1
- package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.template.d.ts +0 -2
- package/dist/dts/_docs/design-system/color-explorer/components/control-pane/index.d.ts +0 -6
- package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.d.ts +0 -5
- package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.styles.d.ts +0 -1
- package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.template.d.ts +0 -2
- package/dist/dts/_docs/design-system/color-explorer/components/gradient/index.d.ts +0 -6
- package/dist/dts/_docs/design-system/color-explorer/components/layer-background/index.d.ts +0 -21
- package/dist/dts/_docs/design-system/color-explorer/components/sample-app/index.d.ts +0 -6
- package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.d.ts +0 -3
- package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.styles.d.ts +0 -1
- package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.template.d.ts +0 -1
- package/dist/dts/_docs/design-system/color-explorer/components/sample-page/index.d.ts +0 -6
- package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.d.ts +0 -3
- package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.styles.d.ts +0 -1
- package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.template.d.ts +0 -1
- package/dist/dts/_docs/design-system/color-explorer/components/swatch.d.ts +0 -30
- package/dist/dts/_docs/design-system/color-explorer/custom-elements.d.ts +0 -7
- package/dist/dts/_docs/design-system/color-explorer/index.d.ts +0 -2
- package/dist/dts/accordion/accordion-item/accordion-item.styles.d.ts +0 -3
- package/dist/dts/accordion/accordion-item/index.d.ts +0 -17
- package/dist/dts/accordion/accordion.stories.d.ts +0 -15
- package/dist/dts/accordion/accordion.styles.d.ts +0 -3
- package/dist/dts/accordion/index.d.ts +0 -22
- package/dist/dts/anchor/anchor.stories.d.ts +0 -14
- package/dist/dts/anchor/anchor.styles.d.ts +0 -3
- package/dist/dts/anchor/index.d.ts +0 -49
- package/dist/dts/anchored-region/anchored-region.styles.d.ts +0 -3
- package/dist/dts/anchored-region/index.d.ts +0 -21
- package/dist/dts/breadcrumb/breadcrumb.stories.d.ts +0 -15
- package/dist/dts/breadcrumb/breadcrumb.styles.d.ts +0 -3
- package/dist/dts/breadcrumb/index.d.ts +0 -21
- package/dist/dts/breadcrumb-item/breadcrumb-item.stories.d.ts +0 -15
- package/dist/dts/breadcrumb-item/breadcrumb-item.styles.d.ts +0 -3
- package/dist/dts/breadcrumb-item/index.d.ts +0 -21
- package/dist/dts/button/button.stories.d.ts +0 -21
- package/dist/dts/button/button.styles.d.ts +0 -3
- package/dist/dts/button/index.d.ts +0 -48
- package/dist/dts/calendar/calendar.stories.d.ts +0 -86
- package/dist/dts/calendar/calendar.styles.d.ts +0 -7
- package/dist/dts/calendar/index.d.ts +0 -18
- package/dist/dts/card/card.stories.d.ts +0 -15
- package/dist/dts/card/card.styles.d.ts +0 -3
- package/dist/dts/card/index.d.ts +0 -46
- package/dist/dts/checkbox/checkbox.stories.d.ts +0 -28
- package/dist/dts/checkbox/checkbox.styles.d.ts +0 -3
- package/dist/dts/checkbox/index.d.ts +0 -16
- package/dist/dts/color/palette.d.ts +0 -73
- package/dist/dts/color/recipe.d.ts +0 -20
- package/dist/dts/color/recipes/contrast-and-delta-swatch-set.d.ts +0 -11
- package/dist/dts/color/recipes/contrast-swatch.d.ts +0 -12
- package/dist/dts/color/recipes/delta-swatch-set.d.ts +0 -36
- package/dist/dts/color/recipes/delta-swatch.d.ts +0 -12
- package/dist/dts/color/recipes/focus-stroke.d.ts +0 -10
- package/dist/dts/color/recipes/foreground-on-accent.d.ts +0 -11
- package/dist/dts/color/recipes/gradient-shadow-stroke.d.ts +0 -7
- package/dist/dts/color/recipes/gradient-swatch.d.ts +0 -36
- package/dist/dts/color/recipes/neutral-layer-1.d.ts +0 -10
- package/dist/dts/color/recipes/neutral-layer-2.d.ts +0 -6
- package/dist/dts/color/recipes/neutral-layer-3.d.ts +0 -6
- package/dist/dts/color/recipes/neutral-layer-4.d.ts +0 -6
- package/dist/dts/color/recipes/neutral-layer-floating.d.ts +0 -6
- package/dist/dts/color/recipes/underline-stroke.d.ts +0 -7
- package/dist/dts/color/swatch.d.ts +0 -31
- package/dist/dts/color/utilities/base-layer-luminance.d.ts +0 -11
- package/dist/dts/color/utilities/binary-search.d.ts +0 -4
- package/dist/dts/color/utilities/color-constants.d.ts +0 -14
- package/dist/dts/color/utilities/direction-by-is-dark.d.ts +0 -5
- package/dist/dts/color/utilities/is-dark.d.ts +0 -9
- package/dist/dts/color/utilities/relative-luminance.d.ts +0 -13
- package/dist/dts/combobox/combobox.stories.d.ts +0 -36
- package/dist/dts/combobox/combobox.styles.d.ts +0 -3
- package/dist/dts/combobox/index.d.ts +0 -43
- package/dist/dts/component-definitions.d.ts +0 -43
- package/dist/dts/custom-elements.d.ts +0 -103
- package/dist/dts/data-grid/data-grid-cell.styles.d.ts +0 -3
- package/dist/dts/data-grid/data-grid-row.styles.d.ts +0 -3
- package/dist/dts/data-grid/data-grid.stories.d.ts +0 -15
- package/dist/dts/data-grid/data-grid.styles.d.ts +0 -3
- package/dist/dts/data-grid/index.d.ts +0 -45
- package/dist/dts/design-system-provider/index.d.ts +0 -582
- package/dist/dts/design-tokens.d.ts +0 -519
- package/dist/dts/dialog/dialog.stories.d.ts +0 -25
- package/dist/dts/dialog/dialog.styles.d.ts +0 -3
- package/dist/dts/dialog/index.d.ts +0 -21
- package/dist/dts/divider/divider.stories.d.ts +0 -6
- package/dist/dts/divider/divider.styles.d.ts +0 -3
- package/dist/dts/divider/index.d.ts +0 -21
- package/dist/dts/flipper/flipper.stories.d.ts +0 -17
- package/dist/dts/flipper/flipper.styles.d.ts +0 -3
- package/dist/dts/flipper/index.d.ts +0 -21
- package/dist/dts/horizontal-scroll/horizontal-scroll.stories.d.ts +0 -15
- package/dist/dts/horizontal-scroll/horizontal-scroll.styles.d.ts +0 -12
- package/dist/dts/horizontal-scroll/index.d.ts +0 -25
- package/dist/dts/listbox/index.d.ts +0 -19
- package/dist/dts/listbox/listbox.stories.d.ts +0 -6
- package/dist/dts/listbox/listbox.styles.d.ts +0 -3
- package/dist/dts/listbox-option/index.d.ts +0 -17
- package/dist/dts/listbox-option/listbox-option.stories.d.ts +0 -23
- package/dist/dts/listbox-option/listbox-option.styles.d.ts +0 -3
- package/dist/dts/menu/index.d.ts +0 -26
- package/dist/dts/menu/menu.stories.d.ts +0 -6
- package/dist/dts/menu/menu.styles.d.ts +0 -3
- package/dist/dts/menu-item/index.d.ts +0 -21
- package/dist/dts/menu-item/menu-item.stories.d.ts +0 -18
- package/dist/dts/menu-item/menu-item.styles.d.ts +0 -3
- package/dist/dts/number-field/index.d.ts +0 -41
- package/dist/dts/number-field/number-field.stories.d.ts +0 -71
- package/dist/dts/number-field/number-field.styles.d.ts +0 -3
- package/dist/dts/progress/index.d.ts +0 -2
- package/dist/dts/progress/progress/index.d.ts +0 -22
- package/dist/dts/progress/progress/progress.stories.d.ts +0 -15
- package/dist/dts/progress/progress/progress.styles.d.ts +0 -3
- package/dist/dts/progress/progress-ring/index.d.ts +0 -22
- package/dist/dts/progress/progress-ring/progress-ring.stories.d.ts +0 -15
- package/dist/dts/progress/progress-ring/progress-ring.styles.d.ts +0 -3
- package/dist/dts/radio/index.d.ts +0 -21
- package/dist/dts/radio/radio.stories.d.ts +0 -23
- package/dist/dts/radio/radio.styles.d.ts +0 -3
- package/dist/dts/radio-group/index.d.ts +0 -21
- package/dist/dts/radio-group/radio-group.stories.d.ts +0 -18
- package/dist/dts/radio-group/radio-group.styles.d.ts +0 -3
- package/dist/dts/search/index.d.ts +0 -38
- package/dist/dts/search/search.stories.d.ts +0 -75
- package/dist/dts/search/search.styles.d.ts +0 -3
- package/dist/dts/search/search.template.d.ts +0 -6
- package/dist/dts/select/index.d.ts +0 -44
- package/dist/dts/select/select.stories.d.ts +0 -28
- package/dist/dts/select/select.styles.d.ts +0 -13
- package/dist/dts/skeleton/index.d.ts +0 -21
- package/dist/dts/skeleton/skeleton.stories.d.ts +0 -20
- package/dist/dts/skeleton/skeleton.styles.d.ts +0 -3
- package/dist/dts/slider/index.d.ts +0 -21
- package/dist/dts/slider/slider.stories.d.ts +0 -14
- package/dist/dts/slider/slider.styles.d.ts +0 -3
- package/dist/dts/slider-label/index.d.ts +0 -21
- package/dist/dts/slider-label/slider-label.stories.d.ts +0 -23
- package/dist/dts/slider-label/slider-label.styles.d.ts +0 -3
- package/dist/dts/styles/direction.d.ts +0 -34
- package/dist/dts/styles/elevation.d.ts +0 -64
- package/dist/dts/styles/focus.d.ts +0 -13
- package/dist/dts/styles/patterns/button.styles.d.ts +0 -31
- package/dist/dts/styles/patterns/index.d.ts +0 -3
- package/dist/dts/styles/patterns/input.styles.d.ts +0 -30
- package/dist/dts/styles/patterns/type-ramp.d.ts +0 -18
- package/dist/dts/styles/size.d.ts +0 -7
- package/dist/dts/switch/index.d.ts +0 -21
- package/dist/dts/switch/switch.stories.d.ts +0 -18
- package/dist/dts/switch/switch.styles.d.ts +0 -3
- package/dist/dts/tabs/index.d.ts +0 -23
- package/dist/dts/tabs/tab/index.d.ts +0 -21
- package/dist/dts/tabs/tab/tab.styles.d.ts +0 -3
- package/dist/dts/tabs/tab-panel/index.d.ts +0 -21
- package/dist/dts/tabs/tab-panel/tab-panel.styles.d.ts +0 -3
- package/dist/dts/tabs/tabs.stories.d.ts +0 -19
- package/dist/dts/tabs/tabs.styles.d.ts +0 -3
- package/dist/dts/text-area/index.d.ts +0 -45
- package/dist/dts/text-area/text-area.stories.d.ts +0 -41
- package/dist/dts/text-area/text-area.styles.d.ts +0 -3
- package/dist/dts/text-field/index.d.ts +0 -45
- package/dist/dts/text-field/text-field.stories.d.ts +0 -81
- package/dist/dts/text-field/text-field.styles.d.ts +0 -3
- package/dist/dts/toolbar/index.d.ts +0 -17
- package/dist/dts/toolbar/toolbar.stories.d.ts +0 -9
- package/dist/dts/toolbar/toolbar.styles.d.ts +0 -3
- package/dist/dts/tooltip/index.d.ts +0 -21
- package/dist/dts/tooltip/tooltip.stories.d.ts +0 -14
- package/dist/dts/tooltip/tooltip.styles.d.ts +0 -3
- package/dist/dts/tree-item/index.d.ts +0 -22
- package/dist/dts/tree-item/tree-item.stories.d.ts +0 -18
- package/dist/dts/tree-item/tree-item.styles.d.ts +0 -4
- package/dist/dts/tree-view/index.d.ts +0 -22
- package/dist/dts/tree-view/tree-view.stories.d.ts +0 -13
- package/dist/dts/tree-view/tree-view.styles.d.ts +0 -3
- package/dist/dts/utilities/behaviors.d.ts +0 -12
- package/dist/dts/utilities/type-ramp.d.ts +0 -12
- package/dist/esm/_docs/design-system/color-explorer/app.js +0 -247
- package/dist/esm/_docs/design-system/color-explorer/colors.js +0 -24
- package/dist/esm/_docs/design-system/color-explorer/component-types.js +0 -7
- package/dist/esm/_docs/design-system/color-explorer/components/color-block.js +0 -408
- package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.form-associated.js +0 -16
- package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.js +0 -297
- package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.styles.js +0 -124
- package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.template.js +0 -130
- package/dist/esm/_docs/design-system/color-explorer/components/color-picker/index.js +0 -15
- package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.js +0 -24
- package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.styles.js +0 -19
- package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.template.js +0 -52
- package/dist/esm/_docs/design-system/color-explorer/components/control-pane/index.js +0 -18
- package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.js +0 -11
- package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.styles.js +0 -31
- package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.template.js +0 -21
- package/dist/esm/_docs/design-system/color-explorer/components/gradient/index.js +0 -18
- package/dist/esm/_docs/design-system/color-explorer/components/layer-background/index.js +0 -70
- package/dist/esm/_docs/design-system/color-explorer/components/sample-app/index.js +0 -18
- package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.js +0 -3
- package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.styles.js +0 -166
- package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.template.js +0 -97
- package/dist/esm/_docs/design-system/color-explorer/components/sample-page/index.js +0 -18
- package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.js +0 -3
- package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.styles.js +0 -130
- package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.template.js +0 -82
- package/dist/esm/_docs/design-system/color-explorer/components/swatch.js +0 -163
- package/dist/esm/_docs/design-system/color-explorer/custom-elements.js +0 -3
- package/dist/esm/_docs/design-system/color-explorer/index.js +0 -14
- package/dist/esm/accordion/accordion-item/accordion-item.styles.js +0 -154
- package/dist/esm/accordion/accordion-item/accordion-item.vscode.definition.json +0 -67
- package/dist/esm/accordion/accordion-item/index.js +0 -32
- package/dist/esm/accordion/accordion.stories.js +0 -66
- package/dist/esm/accordion/accordion.styles.js +0 -13
- package/dist/esm/accordion/accordion.vscode.definition.json +0 -35
- package/dist/esm/accordion/index.js +0 -27
- package/dist/esm/anchor/anchor.stories.js +0 -34
- package/dist/esm/anchor/anchor.styles.js +0 -5
- package/dist/esm/anchor/anchor.vscode.definition.json +0 -138
- package/dist/esm/anchor/index.js +0 -67
- package/dist/esm/anchored-region/anchored-region.stories.js +0 -133
- package/dist/esm/anchored-region/anchored-region.styles.js +0 -7
- package/dist/esm/anchored-region/anchored-region.vscode.definition.json +0 -140
- package/dist/esm/anchored-region/index.js +0 -26
- package/dist/esm/badge/badge.vscode.definition.json +0 -60
- package/dist/esm/breadcrumb/breadcrumb.stories.js +0 -20
- package/dist/esm/breadcrumb/breadcrumb.styles.js +0 -13
- package/dist/esm/breadcrumb/breadcrumb.vscode.definition.json +0 -18
- package/dist/esm/breadcrumb/index.js +0 -26
- package/dist/esm/breadcrumb-item/breadcrumb-item.stories.js +0 -16
- package/dist/esm/breadcrumb-item/breadcrumb-item.styles.js +0 -96
- package/dist/esm/breadcrumb-item/breadcrumb-item.vscode.definition.json +0 -50
- package/dist/esm/breadcrumb-item/index.js +0 -34
- package/dist/esm/button/button.stories.js +0 -40
- package/dist/esm/button/button.styles.js +0 -24
- package/dist/esm/button/button.vscode.definition.json +0 -158
- package/dist/esm/button/index.js +0 -67
- package/dist/esm/calendar/calendar.stories.js +0 -115
- package/dist/esm/calendar/calendar.styles.js +0 -132
- package/dist/esm/calendar/index.js +0 -31
- package/dist/esm/card/card.stories.js +0 -30
- package/dist/esm/card/card.styles.js +0 -28
- package/dist/esm/card/card.vscode.definition.json +0 -33
- package/dist/esm/card/index.js +0 -79
- package/dist/esm/checkbox/checkbox.stories.js +0 -43
- package/dist/esm/checkbox/checkbox.styles.js +0 -161
- package/dist/esm/checkbox/checkbox.vscode.definition.json +0 -69
- package/dist/esm/checkbox/index.js +0 -31
- package/dist/esm/color/palette.js +0 -250
- package/dist/esm/color/recipes/contrast-and-delta-swatch-set.js +0 -28
- package/dist/esm/color/recipes/contrast-swatch.js +0 -12
- package/dist/esm/color/recipes/delta-swatch-set.js +0 -53
- package/dist/esm/color/recipes/delta-swatch.js +0 -13
- package/dist/esm/color/recipes/focus-stroke.js +0 -14
- package/dist/esm/color/recipes/foreground-on-accent.js +0 -21
- package/dist/esm/color/recipes/gradient-shadow-stroke.js +0 -54
- package/dist/esm/color/recipes/gradient-swatch.js +0 -36
- package/dist/esm/color/recipes/neutral-layer-1.js +0 -13
- package/dist/esm/color/recipes/neutral-layer-2.js +0 -7
- package/dist/esm/color/recipes/neutral-layer-3.js +0 -7
- package/dist/esm/color/recipes/neutral-layer-4.js +0 -7
- package/dist/esm/color/recipes/neutral-layer-floating.js +0 -7
- package/dist/esm/color/recipes/underline-stroke.js +0 -31
- package/dist/esm/color/swatch.js +0 -53
- package/dist/esm/color/utilities/base-layer-luminance.js +0 -14
- package/dist/esm/color/utilities/binary-search.js +0 -15
- package/dist/esm/color/utilities/color-constants.js +0 -19
- package/dist/esm/color/utilities/direction-by-is-dark.js +0 -7
- package/dist/esm/color/utilities/is-dark.js +0 -17
- package/dist/esm/color/utilities/relative-luminance.js +0 -8
- package/dist/esm/combobox/combobox.stories.js +0 -84
- package/dist/esm/combobox/combobox.styles.js +0 -40
- package/dist/esm/combobox/combobox.vscode.definition.json +0 -121
- package/dist/esm/combobox/index.js +0 -63
- package/dist/esm/component-definitions.js +0 -84
- package/dist/esm/custom-elements.js +0 -102
- package/dist/esm/data-grid/data-grid-cell.styles.js +0 -36
- package/dist/esm/data-grid/data-grid-cell.vscode.definition.json +0 -34
- package/dist/esm/data-grid/data-grid-row.styles.js +0 -24
- package/dist/esm/data-grid/data-grid-row.vscode.definition.json +0 -34
- package/dist/esm/data-grid/data-grid.stories.js +0 -381
- package/dist/esm/data-grid/data-grid.styles.js +0 -8
- package/dist/esm/data-grid/data-grid.vscode.definition.json +0 -34
- package/dist/esm/data-grid/index.js +0 -60
- package/dist/esm/design-system-provider/design-system-provider.vscode.definition.json +0 -510
- package/dist/esm/design-system-provider/index.js +0 -518
- package/dist/esm/design-tokens.js +0 -685
- package/dist/esm/dialog/dialog.stories.js +0 -36
- package/dist/esm/dialog/dialog.styles.js +0 -47
- package/dist/esm/dialog/dialog.vscode.definition.json +0 -67
- package/dist/esm/dialog/index.js +0 -26
- package/dist/esm/divider/divider.stories.js +0 -17
- package/dist/esm/divider/divider.styles.js +0 -11
- package/dist/esm/divider/divider.vscode.definition.json +0 -29
- package/dist/esm/divider/index.js +0 -26
- package/dist/esm/flipper/flipper.stories.js +0 -31
- package/dist/esm/flipper/flipper.styles.js +0 -84
- package/dist/esm/flipper/flipper.vscode.definition.json +0 -56
- package/dist/esm/flipper/index.js +0 -36
- package/dist/esm/horizontal-scroll/horizontal-scroll.stories.js +0 -81
- package/dist/esm/horizontal-scroll/horizontal-scroll.styles.js +0 -138
- package/dist/esm/horizontal-scroll/horizontal-scroll.vscode.definition.json +0 -85
- package/dist/esm/horizontal-scroll/index.js +0 -47
- package/dist/esm/listbox/index.js +0 -24
- package/dist/esm/listbox/listbox.stories.js +0 -29
- package/dist/esm/listbox/listbox.styles.js +0 -21
- package/dist/esm/listbox/listbox.vscode.definition.json +0 -40
- package/dist/esm/listbox-option/index.js +0 -22
- package/dist/esm/listbox-option/listbox-option.stories.js +0 -38
- package/dist/esm/listbox-option/listbox-option.styles.js +0 -133
- package/dist/esm/listbox-option/listbox-option.vscode.definition.json +0 -45
- package/dist/esm/menu/index.js +0 -36
- package/dist/esm/menu/menu.stories.js +0 -56
- package/dist/esm/menu/menu.styles.js +0 -42
- package/dist/esm/menu/menu.vscode.definition.json +0 -18
- package/dist/esm/menu-item/index.js +0 -41
- package/dist/esm/menu-item/menu-item.stories.js +0 -34
- package/dist/esm/menu-item/menu-item.styles.js +0 -265
- package/dist/esm/menu-item/menu-item.vscode.definition.json +0 -82
- package/dist/esm/number-field/index.js +0 -57
- package/dist/esm/number-field/number-field.stories.js +0 -83
- package/dist/esm/number-field/number-field.styles.js +0 -71
- package/dist/esm/number-field/number-field.vscode.definition.json +0 -167
- package/dist/esm/progress/index.js +0 -2
- package/dist/esm/progress/progress/index.js +0 -33
- package/dist/esm/progress/progress/progress.stories.js +0 -59
- package/dist/esm/progress/progress/progress.styles.js +0 -119
- package/dist/esm/progress/progress/progress.vscode.definition.json +0 -56
- package/dist/esm/progress/progress-ring/index.js +0 -45
- package/dist/esm/progress/progress-ring/progress-ring.stories.js +0 -59
- package/dist/esm/progress/progress-ring/progress-ring.styles.js +0 -79
- package/dist/esm/progress/progress-ring/progress-ring.vscode.definition.json +0 -56
- package/dist/esm/radio/index.js +0 -31
- package/dist/esm/radio/radio.stories.js +0 -41
- package/dist/esm/radio/radio.styles.js +0 -152
- package/dist/esm/radio/radio.vscode.definition.json +0 -63
- package/dist/esm/radio-group/index.js +0 -26
- package/dist/esm/radio-group/radio-group.stories.js +0 -42
- package/dist/esm/radio-group/radio-group.styles.js +0 -21
- package/dist/esm/radio-group/radio-group.vscode.definition.json +0 -64
- package/dist/esm/search/index.js +0 -52
- package/dist/esm/search/search.stories.js +0 -83
- package/dist/esm/search/search.styles.js +0 -104
- package/dist/esm/search/search.template.js +0 -82
- package/dist/esm/search/search.vscode.definition.json +0 -145
- package/dist/esm/select/index.js +0 -61
- package/dist/esm/select/select.stories.js +0 -53
- package/dist/esm/select/select.styles.js +0 -139
- package/dist/esm/select/select.vscode.definition.json +0 -79
- package/dist/esm/skeleton/index.js +0 -26
- package/dist/esm/skeleton/skeleton.stories.js +0 -37
- package/dist/esm/skeleton/skeleton.styles.js +0 -77
- package/dist/esm/skeleton/skeleton.vscode.definition.json +0 -49
- package/dist/esm/slider/index.js +0 -29
- package/dist/esm/slider/slider.stories.js +0 -40
- package/dist/esm/slider/slider.styles.js +0 -162
- package/dist/esm/slider/slider.vscode.definition.json +0 -101
- package/dist/esm/slider-label/index.js +0 -26
- package/dist/esm/slider-label/slider-label.stories.js +0 -40
- package/dist/esm/slider-label/slider-label.styles.js +0 -77
- package/dist/esm/slider-label/slider-label.vscode.definition.json +0 -43
- package/dist/esm/styles/direction.js +0 -73
- package/dist/esm/styles/elevation.js +0 -74
- package/dist/esm/styles/focus.js +0 -21
- package/dist/esm/styles/patterns/button.styles.js +0 -427
- package/dist/esm/styles/patterns/index.js +0 -3
- package/dist/esm/styles/patterns/input.styles.js +0 -227
- package/dist/esm/styles/patterns/type-ramp.js +0 -74
- package/dist/esm/styles/size.js +0 -9
- package/dist/esm/switch/index.js +0 -31
- package/dist/esm/switch/switch.stories.js +0 -42
- package/dist/esm/switch/switch.styles.js +0 -213
- package/dist/esm/switch/switch.vscode.definition.json +0 -68
- package/dist/esm/tabs/index.js +0 -28
- package/dist/esm/tabs/tab/index.js +0 -26
- package/dist/esm/tabs/tab/tab.styles.js +0 -75
- package/dist/esm/tabs/tab/tab.vscode.definition.json +0 -17
- package/dist/esm/tabs/tab-panel/index.js +0 -26
- package/dist/esm/tabs/tab-panel/tab-panel.styles.js +0 -11
- package/dist/esm/tabs/tab-panel/tab-panel.vscode.definition.json +0 -17
- package/dist/esm/tabs/tabs.stories.js +0 -105
- package/dist/esm/tabs/tabs.styles.js +0 -98
- package/dist/esm/tabs/tabs.vscode.definition.json +0 -50
- package/dist/esm/text-area/index.js +0 -56
- package/dist/esm/text-area/text-area.stories.js +0 -56
- package/dist/esm/text-area/text-area.styles.js +0 -39
- package/dist/esm/text-area/text-area.vscode.definition.json +0 -141
- package/dist/esm/text-field/index.js +0 -56
- package/dist/esm/text-field/text-field.stories.js +0 -88
- package/dist/esm/text-field/text-field.styles.js +0 -48
- package/dist/esm/text-field/text-field.vscode.definition.json +0 -150
- package/dist/esm/toolbar/index.js +0 -23
- package/dist/esm/toolbar/toolbar.stories.js +0 -9
- package/dist/esm/toolbar/toolbar.styles.js +0 -73
- package/dist/esm/tooltip/index.js +0 -31
- package/dist/esm/tooltip/tooltip.stories.js +0 -34
- package/dist/esm/tooltip/tooltip.styles.js +0 -107
- package/dist/esm/tooltip/tooltip.vscode.definition.json +0 -56
- package/dist/esm/tree-item/index.js +0 -32
- package/dist/esm/tree-item/tree-item.stories.js +0 -34
- package/dist/esm/tree-item/tree-item.styles.js +0 -227
- package/dist/esm/tree-item/tree-item.vscode.definition.json +0 -63
- package/dist/esm/tree-view/index.js +0 -27
- package/dist/esm/tree-view/tree-view.stories.js +0 -99
- package/dist/esm/tree-view/tree-view.styles.js +0 -14
- package/dist/esm/tree-view/tree-view.vscode.definition.json +0 -26
- package/dist/esm/utilities/behaviors.js +0 -13
- package/dist/esm/utilities/type-ramp.js +0 -12
- package/karma.conf.js +0 -147
- package/public/switches.ts +0 -24
package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.template.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { html } from '@microsoft/fast-element';
|
|
2
|
-
// import MoreIcon from "@fluentui/svg-icons/icons/more_horizontal_20_regular.svg";
|
|
3
|
-
// import DownloadIcon from "@fluentui/svg-icons/icons/arrow_download_20_regular.svg";
|
|
4
|
-
// import PlayIcon from "@fluentui/svg-icons/icons/play_20_regular.svg";
|
|
5
|
-
export const samplePageTemplate = html `
|
|
6
|
-
<template>
|
|
7
|
-
<fluent-card>
|
|
8
|
-
<div class="image-container">
|
|
9
|
-
<fluent-badge fill="primary" color="primary" class="badge"> Badge </fluent-badge>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="text-container">
|
|
12
|
-
<h3>Example card</h3>
|
|
13
|
-
<p>
|
|
14
|
-
At purus lectus quis habitant commodo, cras. Aliquam malesuada velit a tortor. Felis orci tellus netus risus
|
|
15
|
-
et ultricies augue aliquet. Suscipit mattis mus amet nibh...
|
|
16
|
-
</p>
|
|
17
|
-
<fluent-divider></fluent-divider>
|
|
18
|
-
<div class="sample-control">
|
|
19
|
-
<span class="sample-control-icon"></span>
|
|
20
|
-
<span class="sample-control-text">Label</span>
|
|
21
|
-
<div class="sample-control-actions">
|
|
22
|
-
<fluent-button appearance="stealth" aria-label="Example 'more' button">
|
|
23
|
-
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
24
|
-
<path
|
|
25
|
-
d="M6.25 10a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zm5 0a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zM15 11.25a1.25 1.25 0 100-2.5 1.25 1.25 0 000 2.5z"
|
|
26
|
-
/>
|
|
27
|
-
</svg>
|
|
28
|
-
</fluent-button>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</fluent-card>
|
|
33
|
-
<div class="preview-controls">
|
|
34
|
-
<fluent-progress aria-label="Example progress bar"></fluent-progress>
|
|
35
|
-
<fluent-menu aria-label="Example menu">
|
|
36
|
-
<fluent-menu-item role="menuitem" aria-label="Example menu item"> Menu item 1 </fluent-menu-item>
|
|
37
|
-
<fluent-menu-item role="menuitem" aria-label="Example menu item"> Menu item 2 </fluent-menu-item>
|
|
38
|
-
<fluent-menu-item role="menuitem" aria-label="Example menu item"> Menu item 3 </fluent-menu-item>
|
|
39
|
-
<fluent-divider></fluent-divider>
|
|
40
|
-
<fluent-menu-item role="menuitem" aria-label="Example menu item"> Menu item 4 </fluent-menu-item>
|
|
41
|
-
</fluent-menu>
|
|
42
|
-
<div class="control-container">
|
|
43
|
-
<fluent-radio-group class="example-radios" name="example radio group" orientation="vertical">
|
|
44
|
-
<fluent-radio aria-label="Example radio 1">Radio 1</fluent-radio>
|
|
45
|
-
<fluent-radio aria-label="Example radio 2">Radio 2</fluent-radio>
|
|
46
|
-
</fluent-radio-group>
|
|
47
|
-
<div class="control-container-grid">
|
|
48
|
-
<fluent-switch aria-label="Example toggle">Toggle</fluent-switch>
|
|
49
|
-
<fluent-checkbox class="checkbox" aria-label="Example checkbox"> Checkbox </fluent-checkbox>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
<fluent-text-field placeholder="Text field" aria-label="Example text field"></fluent-text-field>
|
|
53
|
-
<div class="control-container-2">
|
|
54
|
-
<fluent-slider aria-label="Example slider"></fluent-slider>
|
|
55
|
-
<fluent-flipper></fluent-flipper>
|
|
56
|
-
<fluent-flipper disabled></fluent-flipper>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="control-container">
|
|
59
|
-
<fluent-button appearance="accent" aria-label="Example 'download' button">
|
|
60
|
-
Button
|
|
61
|
-
<span slot="start">
|
|
62
|
-
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
63
|
-
<path
|
|
64
|
-
d="M15.5 17a.5.5 0 01.09 1H4.5a.5.5 0 01-.09-1H15.5zM10 2a.5.5 0 01.5.41V14.3l3.64-3.65a.5.5 0 01.64-.06l.07.06c.17.17.2.44.06.63l-.06.07-4.5 4.5a.5.5 0 01-.25.14L10 16a.5.5 0 01-.4-.2l-4.46-4.45a.5.5 0 01.64-.76l.07.06 3.65 3.64V2.5c0-.27.22-.5.5-.5z"
|
|
65
|
-
/>
|
|
66
|
-
</svg>
|
|
67
|
-
</span>
|
|
68
|
-
</fluent-button>
|
|
69
|
-
<fluent-button appearance="neutral" aria-label="Example 'play' button">
|
|
70
|
-
Button
|
|
71
|
-
<span slot="start">
|
|
72
|
-
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
73
|
-
<path
|
|
74
|
-
d="M17.22 8.69a1.5 1.5 0 010 2.62l-10 5.5A1.5 1.5 0 015 15.5v-11A1.5 1.5 0 017.22 3.2l10 5.5zm-.48 1.75a.5.5 0 000-.88l-10-5.5A.5.5 0 006 4.5v11c0 .38.4.62.74.44l10-5.5z"
|
|
75
|
-
/>
|
|
76
|
-
</svg>
|
|
77
|
-
</span>
|
|
78
|
-
</fluent-button>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</template>
|
|
82
|
-
`;
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { contrastRatio, parseColor } from '@microsoft/fast-colors';
|
|
3
|
-
import { attr, css, customElement, html, observable } from '@microsoft/fast-element';
|
|
4
|
-
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
5
|
-
import { elevation, fillColor, neutralForegroundHint } from '../../../../index-rollup';
|
|
6
|
-
export var SwatchTypes;
|
|
7
|
-
(function (SwatchTypes) {
|
|
8
|
-
SwatchTypes["fill"] = "fill";
|
|
9
|
-
SwatchTypes["foreground"] = "foreground";
|
|
10
|
-
SwatchTypes["outline"] = "outline";
|
|
11
|
-
})(SwatchTypes || (SwatchTypes = {}));
|
|
12
|
-
const template = html `
|
|
13
|
-
<template class="${x => x.type}">
|
|
14
|
-
<div class="icon" style="${x => x.iconStyle}" title="${x => x.contrastMessage}"></div>
|
|
15
|
-
<code class="recipe-name"> ${x => x.recipeName} </code>
|
|
16
|
-
<code class="hex-code"> ${x => x.colorValue} </code>
|
|
17
|
-
</template>
|
|
18
|
-
`;
|
|
19
|
-
const styles = css `
|
|
20
|
-
:host {
|
|
21
|
-
display: grid;
|
|
22
|
-
grid-template-columns: auto 1fr auto;
|
|
23
|
-
grid-template-rows: auto;
|
|
24
|
-
align-items: center;
|
|
25
|
-
width: 100%;
|
|
26
|
-
padding: 4px 0;
|
|
27
|
-
box-sizing: border-box;
|
|
28
|
-
color: ${neutralForegroundHint};
|
|
29
|
-
font-size: 12px;
|
|
30
|
-
grid-column-gap: 16px;
|
|
31
|
-
justify-items: start;
|
|
32
|
-
}
|
|
33
|
-
:host(.foreground) .icon {
|
|
34
|
-
border: 1px solid black;
|
|
35
|
-
}
|
|
36
|
-
:host(.foreground) .icon::before {
|
|
37
|
-
font-size: 13px;
|
|
38
|
-
content: 'A';
|
|
39
|
-
font-weight: 400;
|
|
40
|
-
}
|
|
41
|
-
.icon {
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
justify-content: center;
|
|
45
|
-
width: 20px;
|
|
46
|
-
height: 20px;
|
|
47
|
-
border-radius: 2px;
|
|
48
|
-
box-sizing: border-box;
|
|
49
|
-
--elevation: 4;
|
|
50
|
-
${elevation}
|
|
51
|
-
}
|
|
52
|
-
.recipe-name {
|
|
53
|
-
grid-column: 2;
|
|
54
|
-
grid-row: 1;
|
|
55
|
-
}
|
|
56
|
-
.hex-code {
|
|
57
|
-
grid-column: 3;
|
|
58
|
-
grid-row: 1;
|
|
59
|
-
}
|
|
60
|
-
`;
|
|
61
|
-
let AppSwatch = class AppSwatch extends FoundationElement {
|
|
62
|
-
foregroundRecipeChanged() {
|
|
63
|
-
this.updateObservables();
|
|
64
|
-
}
|
|
65
|
-
fillRecipeChanged() {
|
|
66
|
-
this.updateObservables();
|
|
67
|
-
}
|
|
68
|
-
outlineRecipeChanged() {
|
|
69
|
-
this.updateObservables();
|
|
70
|
-
}
|
|
71
|
-
connectedCallback() {
|
|
72
|
-
super.connectedCallback();
|
|
73
|
-
const fillColorChangeHandler = () => {
|
|
74
|
-
this.updateObservables();
|
|
75
|
-
};
|
|
76
|
-
fillColor.subscribe({
|
|
77
|
-
handleChange: fillColorChangeHandler,
|
|
78
|
-
}, this);
|
|
79
|
-
this.updateObservables();
|
|
80
|
-
}
|
|
81
|
-
updateObservables() {
|
|
82
|
-
this.updateIconStyle();
|
|
83
|
-
this.updateContrastMessage();
|
|
84
|
-
this.updateColorValue();
|
|
85
|
-
}
|
|
86
|
-
tokenCSS(token) {
|
|
87
|
-
return token && typeof token.createCSS === 'function' ? token.createCSS() : '';
|
|
88
|
-
}
|
|
89
|
-
evaluateToken(token) {
|
|
90
|
-
return (token === null || token === void 0 ? void 0 : token.getValueFor(this).toColorString()) || '';
|
|
91
|
-
}
|
|
92
|
-
updateIconStyle() {
|
|
93
|
-
const background = `background-color: ${this.tokenCSS(this.fillRecipe)}`;
|
|
94
|
-
this.iconStyle =
|
|
95
|
-
this.type === SwatchTypes.outline
|
|
96
|
-
? `border: 4px solid ${this.tokenCSS(this.outlineRecipe)}; ${background}`
|
|
97
|
-
: this.type === SwatchTypes.foreground
|
|
98
|
-
? `color: ${this.tokenCSS(this.foregroundRecipe)}; ${background}`
|
|
99
|
-
: background;
|
|
100
|
-
}
|
|
101
|
-
formatContrast(a, b) {
|
|
102
|
-
return a && b
|
|
103
|
-
? contrastRatio(parseColor(this.evaluateToken(a)), parseColor(this.evaluateToken(b))).toFixed(2)
|
|
104
|
-
: '';
|
|
105
|
-
}
|
|
106
|
-
formatBackgroundContrast(a, b) {
|
|
107
|
-
return `BG contrast: ${this.formatContrast(a, b)} : 1`;
|
|
108
|
-
}
|
|
109
|
-
formatForegroundContrast(a, b) {
|
|
110
|
-
return `Text contrast: ${this.formatContrast(a, b)} : 1`;
|
|
111
|
-
}
|
|
112
|
-
updateContrastMessage() {
|
|
113
|
-
const backgroundContrastMessage = this.formatBackgroundContrast(this.type === SwatchTypes.foreground
|
|
114
|
-
? this.foregroundRecipe
|
|
115
|
-
: this.type === SwatchTypes.outline
|
|
116
|
-
? this.outlineRecipe
|
|
117
|
-
: this.fillRecipe, this.type === SwatchTypes.foreground || this.type === SwatchTypes.outline ? this.fillRecipe : fillColor);
|
|
118
|
-
this.contrastMessage =
|
|
119
|
-
this.type === SwatchTypes.fill
|
|
120
|
-
? backgroundContrastMessage.concat('\n', this.formatForegroundContrast(this.fillRecipe, this.foregroundRecipe))
|
|
121
|
-
: backgroundContrastMessage;
|
|
122
|
-
}
|
|
123
|
-
updateColorValue() {
|
|
124
|
-
const recipe = this.type === SwatchTypes.outline
|
|
125
|
-
? this.outlineRecipe
|
|
126
|
-
: this.type === SwatchTypes.foreground
|
|
127
|
-
? this.foregroundRecipe
|
|
128
|
-
: this.fillRecipe;
|
|
129
|
-
this.colorValue = this.evaluateToken(recipe).toUpperCase();
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
__decorate([
|
|
133
|
-
attr
|
|
134
|
-
], AppSwatch.prototype, "type", void 0);
|
|
135
|
-
__decorate([
|
|
136
|
-
attr({ attribute: 'recipe-name' })
|
|
137
|
-
], AppSwatch.prototype, "recipeName", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
observable
|
|
140
|
-
], AppSwatch.prototype, "foregroundRecipe", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
observable
|
|
143
|
-
], AppSwatch.prototype, "fillRecipe", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
observable
|
|
146
|
-
], AppSwatch.prototype, "outlineRecipe", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
observable
|
|
149
|
-
], AppSwatch.prototype, "iconStyle", void 0);
|
|
150
|
-
__decorate([
|
|
151
|
-
observable
|
|
152
|
-
], AppSwatch.prototype, "contrastMessage", void 0);
|
|
153
|
-
__decorate([
|
|
154
|
-
observable
|
|
155
|
-
], AppSwatch.prototype, "colorValue", void 0);
|
|
156
|
-
AppSwatch = __decorate([
|
|
157
|
-
customElement({
|
|
158
|
-
name: 'app-swatch',
|
|
159
|
-
template,
|
|
160
|
-
styles,
|
|
161
|
-
})
|
|
162
|
-
], AppSwatch);
|
|
163
|
-
export { AppSwatch };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { allComponents as fluentComponents, provideFluentDesignSystem } from '../../../index-rollup';
|
|
2
|
-
import { fastToolingColorPicker } from './components/color-picker';
|
|
3
|
-
import { App } from './app';
|
|
4
|
-
import { appComponents } from './custom-elements';
|
|
5
|
-
export function init() {
|
|
6
|
-
provideFluentDesignSystem()
|
|
7
|
-
.register(fluentComponents)
|
|
8
|
-
.withPrefix('fast-tooling')
|
|
9
|
-
.register(fastToolingColorPicker())
|
|
10
|
-
.withPrefix('app')
|
|
11
|
-
.register(appComponents);
|
|
12
|
-
}
|
|
13
|
-
App;
|
|
14
|
-
export { App } from './app';
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { DesignToken, display, focusVisible, forcedColorsStylesheetBehavior, } from '@microsoft/fast-foundation';
|
|
3
|
-
import { SystemColors } from '@microsoft/fast-web-utilities';
|
|
4
|
-
import { controlCornerRadius, designUnit, layerCornerRadius, neutralFillLayerAltRest, neutralFillLayerRecipe, neutralFillLayerRest, neutralFillStealthRecipe, neutralForegroundRest, neutralStrokeLayerRest, strokeWidth, } from '../../design-tokens';
|
|
5
|
-
import { focusTreatmentBase } from '../../styles/focus';
|
|
6
|
-
import { typeRampBase } from '../../styles/patterns/type-ramp';
|
|
7
|
-
import { heightNumber } from '../../styles/size';
|
|
8
|
-
const neutralFillStealthRestOnNeutralFillLayerRest = DesignToken.create('neutral-fill-stealth-rest-on-neutral-fill-layer-rest').withDefault((target) => {
|
|
9
|
-
const baseRecipe = neutralFillLayerRecipe.getValueFor(target);
|
|
10
|
-
const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);
|
|
11
|
-
return buttonRecipe.evaluate(target, baseRecipe.evaluate(target).rest).rest;
|
|
12
|
-
});
|
|
13
|
-
const neutralFillStealthHoverOnNeutralFillLayerRest = DesignToken.create('neutral-fill-stealth-hover-on-neutral-fill-layer-rest').withDefault((target) => {
|
|
14
|
-
const baseRecipe = neutralFillLayerRecipe.getValueFor(target);
|
|
15
|
-
const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);
|
|
16
|
-
return buttonRecipe.evaluate(target, baseRecipe.evaluate(target).rest).hover;
|
|
17
|
-
});
|
|
18
|
-
const neutralFillStealthActiveOnNeutralFillLayerRest = DesignToken.create('neutral-fill-stealth-active-on-neutral-fill-layer-rest').withDefault((target) => {
|
|
19
|
-
const baseRecipe = neutralFillLayerRecipe.getValueFor(target);
|
|
20
|
-
const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);
|
|
21
|
-
return buttonRecipe.evaluate(target, baseRecipe.evaluate(target).rest).active;
|
|
22
|
-
});
|
|
23
|
-
export const accordionItemStyles = (context, definition) => css `
|
|
24
|
-
${display('flex')} :host {
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
${typeRampBase};
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
background: ${neutralFillLayerRest};
|
|
29
|
-
color: ${neutralForegroundRest};
|
|
30
|
-
border: calc(${strokeWidth} * 1px) solid ${neutralStrokeLayerRest};
|
|
31
|
-
border-radius: calc(${layerCornerRadius} * 1px);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.region {
|
|
35
|
-
display: none;
|
|
36
|
-
padding: calc(${designUnit} * 2 * 1px);
|
|
37
|
-
background: ${neutralFillLayerAltRest};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.heading {
|
|
41
|
-
display: grid;
|
|
42
|
-
position: relative;
|
|
43
|
-
grid-template-columns: auto 1fr auto auto;
|
|
44
|
-
align-items: center;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.button {
|
|
48
|
-
appearance: none;
|
|
49
|
-
border: none;
|
|
50
|
-
background: none;
|
|
51
|
-
grid-column: 2;
|
|
52
|
-
grid-row: 1;
|
|
53
|
-
outline: none;
|
|
54
|
-
margin: calc(${designUnit} * 3 * 1px) 0;
|
|
55
|
-
padding: 0 calc(${designUnit} * 2 * 1px);
|
|
56
|
-
text-align: left;
|
|
57
|
-
color: inherit;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
font: inherit;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.button::before {
|
|
63
|
-
content: '';
|
|
64
|
-
position: absolute;
|
|
65
|
-
top: calc(${strokeWidth} * -1px);
|
|
66
|
-
left: calc(${strokeWidth} * -1px);
|
|
67
|
-
right: calc(${strokeWidth} * -1px);
|
|
68
|
-
bottom: calc(${strokeWidth} * -1px);
|
|
69
|
-
cursor: pointer;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.button:${focusVisible}::before {
|
|
73
|
-
${focusTreatmentBase}
|
|
74
|
-
border-radius: calc(${layerCornerRadius} * 1px);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
:host(.expanded) .button:${focusVisible}::before {
|
|
78
|
-
border-bottom-left-radius: 0;
|
|
79
|
-
border-bottom-right-radius: 0;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
:host(.expanded) .region {
|
|
83
|
-
display: block;
|
|
84
|
-
border-top: calc(${strokeWidth} * 1px) solid ${neutralStrokeLayerRest};
|
|
85
|
-
border-bottom-left-radius: calc((${layerCornerRadius} - ${strokeWidth}) * 1px);
|
|
86
|
-
border-bottom-right-radius: calc((${layerCornerRadius} - ${strokeWidth}) * 1px);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.icon {
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
justify-content: center;
|
|
93
|
-
grid-column: 4;
|
|
94
|
-
pointer-events: none;
|
|
95
|
-
background: ${neutralFillStealthRestOnNeutralFillLayerRest};
|
|
96
|
-
border-radius: calc(${controlCornerRadius} * 1px);
|
|
97
|
-
fill: currentcolor;
|
|
98
|
-
width: calc(${heightNumber} * 1px);
|
|
99
|
-
height: calc(${heightNumber} * 1px);
|
|
100
|
-
margin: calc(${designUnit} * 2 * 1px);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.heading:hover .icon {
|
|
104
|
-
background: ${neutralFillStealthHoverOnNeutralFillLayerRest};
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.heading:active .icon {
|
|
108
|
-
background: ${neutralFillStealthActiveOnNeutralFillLayerRest};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
slot[name='collapsed-icon'] {
|
|
112
|
-
display: flex;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
:host(.expanded) slot[name='collapsed-icon'] {
|
|
116
|
-
display: none;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
slot[name='expanded-icon'] {
|
|
120
|
-
display: none;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
:host(.expanded) slot[name='expanded-icon'] {
|
|
124
|
-
display: flex;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.start {
|
|
128
|
-
display: flex;
|
|
129
|
-
align-items: center;
|
|
130
|
-
padding-inline-start: calc(${designUnit} * 2 * 1px);
|
|
131
|
-
justify-content: center;
|
|
132
|
-
grid-column: 1;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.end {
|
|
136
|
-
display: flex;
|
|
137
|
-
align-items: center;
|
|
138
|
-
justify-content: center;
|
|
139
|
-
grid-column: 3;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.icon,
|
|
143
|
-
.start,
|
|
144
|
-
.end {
|
|
145
|
-
position: relative;
|
|
146
|
-
}
|
|
147
|
-
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
148
|
-
.button:${focusVisible}::before {
|
|
149
|
-
outline-color: ${SystemColors.Highlight};
|
|
150
|
-
}
|
|
151
|
-
.icon {
|
|
152
|
-
fill: ${SystemColors.ButtonText};
|
|
153
|
-
}
|
|
154
|
-
`));
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1.1,
|
|
3
|
-
"tags": [
|
|
4
|
-
{
|
|
5
|
-
"name": "fluent-accordion-item",
|
|
6
|
-
"title": "Accordion item",
|
|
7
|
-
"description": "The Fluent UI accordion item element",
|
|
8
|
-
"attributes": [
|
|
9
|
-
{
|
|
10
|
-
"name": "heading-level",
|
|
11
|
-
"title": "Level",
|
|
12
|
-
"description": "The aria-level value (1-6) for the item heading, representing its semantic hierarchy",
|
|
13
|
-
"type": "number",
|
|
14
|
-
"default": 2,
|
|
15
|
-
"required": false
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "expanded",
|
|
19
|
-
"title": "Expanded",
|
|
20
|
-
"description": "The expanded state of the item",
|
|
21
|
-
"type": "boolean",
|
|
22
|
-
"default": false,
|
|
23
|
-
"required": false
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "id",
|
|
27
|
-
"title": "ID",
|
|
28
|
-
"description": "The HTML ID attribute for the invoking element",
|
|
29
|
-
"type": "string",
|
|
30
|
-
"required": false
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"slots": [
|
|
34
|
-
{
|
|
35
|
-
"name": "",
|
|
36
|
-
"title": "Default slot",
|
|
37
|
-
"description": "The contents of the item"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "heading",
|
|
41
|
-
"title": "Heading slot",
|
|
42
|
-
"description": "The heading of the accordion item"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"name": "start",
|
|
46
|
-
"title": "Start slot",
|
|
47
|
-
"description": "Contents of the start slot are positioned before the heading"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"name": "end",
|
|
51
|
-
"title": "End slot",
|
|
52
|
-
"description": "Contents of the end slot are positioned after the heading and before the expand/collapse icons"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "expanded-icon",
|
|
56
|
-
"title": "Expanded icon slot",
|
|
57
|
-
"description": "Slot to provide a custom icon representing the expanded state"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"name": "collapsed-icon",
|
|
61
|
-
"title": "Collapsed icon slot",
|
|
62
|
-
"description": "Slot to provide a custom icon representing the collapsed state"
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { AccordionItem, accordionItemTemplate as template } from '@microsoft/fast-foundation';
|
|
2
|
-
import { accordionItemStyles as styles } from './accordion-item.styles';
|
|
3
|
-
/**
|
|
4
|
-
* The Fluent Accordion Item Element. Implements {@link @microsoft/fast-foundation#AccordionItem},
|
|
5
|
-
* {@link @microsoft/fast-foundation#accordionItemTemplate}
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
* @remarks
|
|
10
|
-
* HTML Element: \<fluent-accordion-item\>
|
|
11
|
-
*/
|
|
12
|
-
export const fluentAccordionItem = AccordionItem.compose({
|
|
13
|
-
baseName: 'accordion-item',
|
|
14
|
-
template,
|
|
15
|
-
styles,
|
|
16
|
-
collapsedIcon: `
|
|
17
|
-
<svg width="12" height="12" xmlns="http://www.w3.org/2000/svg">
|
|
18
|
-
<path d="M2.15 4.65c.2-.2.5-.2.7 0L6 7.79l3.15-3.14a.5.5 0 11.7.7l-3.5 3.5a.5.5 0 01-.7 0l-3.5-3.5a.5.5 0 010-.7z"/>
|
|
19
|
-
</svg>
|
|
20
|
-
`,
|
|
21
|
-
expandedIcon: `
|
|
22
|
-
<svg width="12" height="12" xmlns="http://www.w3.org/2000/svg">
|
|
23
|
-
<path d="M2.15 7.35c.2.2.5.2.7 0L6 4.21l3.15 3.14a.5.5 0 10.7-.7l-3.5-3.5a.5.5 0 00-.7 0l-3.5 3.5a.5.5 0 000 .7z"/>
|
|
24
|
-
</svg>
|
|
25
|
-
`,
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* Styles for AccordionItem
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
export const accordionItemStyles = styles;
|
|
32
|
-
export { AccordionItem };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { fluentAccordion } from './index';
|
|
2
|
-
export default {
|
|
3
|
-
title: 'Components/Accordion',
|
|
4
|
-
component: fluentAccordion,
|
|
5
|
-
argTypes: {
|
|
6
|
-
expandMode: {
|
|
7
|
-
options: ['single', 'multi'],
|
|
8
|
-
control: { type: 'radio' },
|
|
9
|
-
defaultValue: 'multi',
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
const AccordionTemplate = ({ expandMode }) => `
|
|
14
|
-
<fluent-accordion
|
|
15
|
-
${expandMode ? `expand-mode="${expandMode}"` : ''}
|
|
16
|
-
>
|
|
17
|
-
<fluent-accordion-item expanded>
|
|
18
|
-
<div slot="start">
|
|
19
|
-
<button>1</button>
|
|
20
|
-
</div>
|
|
21
|
-
<div slot="end">
|
|
22
|
-
<button>1</button>
|
|
23
|
-
</div>
|
|
24
|
-
<span slot="heading">Panel one</span>
|
|
25
|
-
Panel one content
|
|
26
|
-
</fluent-accordion-item>
|
|
27
|
-
<fluent-accordion-item>
|
|
28
|
-
<span slot="heading">Panel two</span>
|
|
29
|
-
Panel two content
|
|
30
|
-
</fluent-accordion-item>
|
|
31
|
-
<fluent-accordion-item expanded>
|
|
32
|
-
<span slot="heading">Panel three</span>
|
|
33
|
-
Panel three content
|
|
34
|
-
</fluent-accordion-item>
|
|
35
|
-
</fluent-accordion>
|
|
36
|
-
`;
|
|
37
|
-
export const Accordion = AccordionTemplate.bind({});
|
|
38
|
-
const example = `
|
|
39
|
-
<fluent-accordion>
|
|
40
|
-
<fluent-accordion-item expanded>
|
|
41
|
-
<div slot="start">
|
|
42
|
-
<button>1</button>
|
|
43
|
-
</div>
|
|
44
|
-
<div slot="end">
|
|
45
|
-
<button>1</button>
|
|
46
|
-
</div>
|
|
47
|
-
<span slot="heading">Panel one</span>
|
|
48
|
-
Panel one content
|
|
49
|
-
</fluent-accordion-item>
|
|
50
|
-
<fluent-accordion-item>
|
|
51
|
-
<span slot="heading">Panel two</span>
|
|
52
|
-
Panel two content
|
|
53
|
-
</fluent-accordion-item>
|
|
54
|
-
<fluent-accordion-item expanded>
|
|
55
|
-
<span slot="heading">Panel three</span>
|
|
56
|
-
Panel three content
|
|
57
|
-
</fluent-accordion-item>
|
|
58
|
-
</fluent-accordion>
|
|
59
|
-
`;
|
|
60
|
-
Accordion.parameters = {
|
|
61
|
-
docs: {
|
|
62
|
-
source: {
|
|
63
|
-
code: example,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { display } from '@microsoft/fast-foundation';
|
|
3
|
-
import { designUnit, neutralForegroundRest } from '../design-tokens';
|
|
4
|
-
import { typeRampBase } from '../styles/patterns/type-ramp';
|
|
5
|
-
export const accordionStyles = (context, definition) => css `
|
|
6
|
-
${display('flex')} :host {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
${typeRampBase}
|
|
10
|
-
color: ${neutralForegroundRest};
|
|
11
|
-
gap: calc(${designUnit} * 1px);
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1.1,
|
|
3
|
-
"tags": [
|
|
4
|
-
{
|
|
5
|
-
"name": "fluent-accordion",
|
|
6
|
-
"title": "Accordion",
|
|
7
|
-
"description": "The Fluent UI accordion element",
|
|
8
|
-
"attributes": [
|
|
9
|
-
{
|
|
10
|
-
"name": "expand-mode",
|
|
11
|
-
"title": "Expand mode",
|
|
12
|
-
"description": "The way items are allowed to expand",
|
|
13
|
-
"type": "string",
|
|
14
|
-
"values": [
|
|
15
|
-
{
|
|
16
|
-
"name": "single"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "multi"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"default": "multi",
|
|
23
|
-
"required": false
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"slots": [
|
|
27
|
-
{
|
|
28
|
-
"name": "item",
|
|
29
|
-
"title": "Item slot",
|
|
30
|
-
"description": "The default slot for accordion items"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Accordion, accordionTemplate as template } from '@microsoft/fast-foundation';
|
|
2
|
-
import { accordionStyles as styles } from './accordion.styles';
|
|
3
|
-
export * from './accordion-item/index';
|
|
4
|
-
/**
|
|
5
|
-
* The Fluent Accordion Element. Implements {@link @microsoft/fast-foundation#Accordion},
|
|
6
|
-
* {@link @microsoft/fast-foundation#accordionTemplate}
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @public
|
|
10
|
-
* @remarks
|
|
11
|
-
* HTML Element: \<fluent-accordion\>
|
|
12
|
-
*/
|
|
13
|
-
export const fluentAccordion = Accordion.compose({
|
|
14
|
-
baseName: 'accordion',
|
|
15
|
-
template,
|
|
16
|
-
styles,
|
|
17
|
-
});
|
|
18
|
-
/**
|
|
19
|
-
* Styles for Accordion
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export const accordionStyles = styles;
|
|
23
|
-
/**
|
|
24
|
-
* Base class for Accordion
|
|
25
|
-
* @public
|
|
26
|
-
*/
|
|
27
|
-
export { Accordion };
|