@fluentui/web-components 2.5.10 → 3.0.0-alpha.1
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 +16 -32
- package/CHANGELOG.md +6 -15
- package/dist/dts/index-rollup.d.ts +0 -7
- package/dist/dts/index.d.ts +1 -49
- 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/index-rollup.js +0 -11
- package/dist/esm/index.js +1 -49
- 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 +6 -19807
- package/dist/web-components.d.ts +1 -2980
- package/dist/web-components.js +2 -21988
- package/dist/web-components.min.js +1 -254
- package/docs/api-report.md +1 -1723
- package/package.json +13 -5
- package/public/theme-switch.ts +13 -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/badge/badge.stories.d.ts +0 -14
- package/dist/dts/badge/badge.styles.d.ts +0 -3
- package/dist/dts/badge/index.d.ts +0 -29
- 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/fluent-design-system.d.ts +0 -9
- 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/index.d.ts +0 -5
- 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.stories.js +0 -27
- package/dist/esm/badge/badge.styles.js +0 -40
- package/dist/esm/badge/badge.vscode.definition.json +0 -60
- package/dist/esm/badge/index.js +0 -45
- 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/recipe.js +0 -1
- 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/fluent-design-system.js +0 -11
- 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/index.js +0 -5
- 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/public/switches.ts +0 -24
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { DesignToken, disabledCursor, } from '@microsoft/fast-foundation';
|
|
3
|
-
import { SystemColors } from '@microsoft/fast-web-utilities';
|
|
4
|
-
import { accentFillRest, controlCornerRadius, disabledOpacity, focusStrokeWidth, neutralFillInputFocus, neutralFillInputHover, neutralFillInputRecipe, neutralFillInputRest, neutralFillSecondaryFocus, neutralFillSecondaryHover, neutralFillSecondaryRecipe, neutralFillSecondaryRest, neutralForegroundHintRecipe, neutralForegroundRest, neutralStrokeInputHover, neutralStrokeInputRest, neutralStrokeRest, strokeWidth, } from '../../design-tokens';
|
|
5
|
-
import { typeRampBase } from '../patterns/type-ramp';
|
|
6
|
-
import { heightNumber } from '../size';
|
|
7
|
-
import { focusTreatmentBase } from '../focus';
|
|
8
|
-
const placeholderRest = DesignToken.create('input-placeholder-rest').withDefault((target) => {
|
|
9
|
-
const baseRecipe = neutralFillInputRecipe.getValueFor(target);
|
|
10
|
-
const hintRecipe = neutralForegroundHintRecipe.getValueFor(target);
|
|
11
|
-
return hintRecipe.evaluate(target, baseRecipe.evaluate(target).rest);
|
|
12
|
-
});
|
|
13
|
-
const placeholderHover = DesignToken.create('input-placeholder-hover').withDefault((target) => {
|
|
14
|
-
const baseRecipe = neutralFillInputRecipe.getValueFor(target);
|
|
15
|
-
const hintRecipe = neutralForegroundHintRecipe.getValueFor(target);
|
|
16
|
-
return hintRecipe.evaluate(target, baseRecipe.evaluate(target).hover);
|
|
17
|
-
});
|
|
18
|
-
const filledPlaceholderRest = DesignToken.create('input-filled-placeholder-rest').withDefault((target) => {
|
|
19
|
-
const baseRecipe = neutralFillSecondaryRecipe.getValueFor(target);
|
|
20
|
-
const hintRecipe = neutralForegroundHintRecipe.getValueFor(target);
|
|
21
|
-
return hintRecipe.evaluate(target, baseRecipe.evaluate(target).rest);
|
|
22
|
-
});
|
|
23
|
-
const filledPlaceholderHover = DesignToken.create('input-filled-placeholder-hover').withDefault((target) => {
|
|
24
|
-
const baseRecipe = neutralFillSecondaryRecipe.getValueFor(target);
|
|
25
|
-
const hintRecipe = neutralForegroundHintRecipe.getValueFor(target);
|
|
26
|
-
return hintRecipe.evaluate(target, baseRecipe.evaluate(target).hover);
|
|
27
|
-
});
|
|
28
|
-
/**
|
|
29
|
-
* The base styles for input controls, without `appearance` visual differences.
|
|
30
|
-
*
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
export const baseInputStyles = (context, definition, logicalControlSelector) => css `
|
|
34
|
-
:host {
|
|
35
|
-
${typeRampBase}
|
|
36
|
-
color: ${neutralForegroundRest};
|
|
37
|
-
fill: currentcolor;
|
|
38
|
-
user-select: none;
|
|
39
|
-
position: relative;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
${logicalControlSelector} {
|
|
43
|
-
box-sizing: border-box;
|
|
44
|
-
position: relative;
|
|
45
|
-
color: inherit;
|
|
46
|
-
border: calc(${strokeWidth} * 1px) solid transparent;
|
|
47
|
-
border-radius: calc(${controlCornerRadius} * 1px);
|
|
48
|
-
height: calc(${heightNumber} * 1px);
|
|
49
|
-
font-family: inherit;
|
|
50
|
-
font-size: inherit;
|
|
51
|
-
line-height: inherit;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.control {
|
|
55
|
-
width: 100%;
|
|
56
|
-
outline: none;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.label {
|
|
60
|
-
display: block;
|
|
61
|
-
color: ${neutralForegroundRest};
|
|
62
|
-
cursor: pointer;
|
|
63
|
-
${typeRampBase}
|
|
64
|
-
margin-bottom: 4px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.label__hidden {
|
|
68
|
-
display: none;
|
|
69
|
-
visibility: hidden;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
:host([disabled]) ${logicalControlSelector},
|
|
73
|
-
:host([readonly]) ${logicalControlSelector},
|
|
74
|
-
:host([disabled]) .label,
|
|
75
|
-
:host([readonly]) .label,
|
|
76
|
-
:host([disabled]) .control,
|
|
77
|
-
:host([readonly]) .control {
|
|
78
|
-
cursor: ${disabledCursor};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:host([disabled]) {
|
|
82
|
-
opacity: ${disabledOpacity};
|
|
83
|
-
}
|
|
84
|
-
`;
|
|
85
|
-
/**
|
|
86
|
-
* The styles for active and focus interactions for input controls.
|
|
87
|
-
*
|
|
88
|
-
* @internal
|
|
89
|
-
*/
|
|
90
|
-
export const inputStateStyles = (context, definition, logicalControlSelector) => css `
|
|
91
|
-
@media (forced-colors: none) {
|
|
92
|
-
:host(:not([disabled]):active)::after {
|
|
93
|
-
left: 50%;
|
|
94
|
-
width: 40%;
|
|
95
|
-
transform: translateX(-50%);
|
|
96
|
-
border-bottom-left-radius: 0;
|
|
97
|
-
border-bottom-right-radius: 0;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
:host(:not([disabled]):focus-within)::after {
|
|
101
|
-
left: 0;
|
|
102
|
-
width: 100%;
|
|
103
|
-
transform: none;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
:host(:not([disabled]):active)::after,
|
|
107
|
-
:host(:not([disabled]):focus-within:not(:active))::after {
|
|
108
|
-
content: '';
|
|
109
|
-
position: absolute;
|
|
110
|
-
height: calc(${focusStrokeWidth} * 1px);
|
|
111
|
-
bottom: 0;
|
|
112
|
-
border-bottom: calc(${focusStrokeWidth} * 1px) solid ${accentFillRest};
|
|
113
|
-
border-bottom-left-radius: calc(${controlCornerRadius} * 1px);
|
|
114
|
-
border-bottom-right-radius: calc(${controlCornerRadius} * 1px);
|
|
115
|
-
z-index: 2;
|
|
116
|
-
transition: all 300ms cubic-bezier(0.1, 0.9, 0.2, 1);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
`;
|
|
120
|
-
/**
|
|
121
|
-
* The visual styles for inputs with `appearance='outline'`.
|
|
122
|
-
*
|
|
123
|
-
* @internal
|
|
124
|
-
*/
|
|
125
|
-
export const inputOutlineStyles = (context, definition, logicalControlSelector, interactivitySelector = ':not([disabled]):not(:focus-within)') => css `
|
|
126
|
-
${logicalControlSelector} {
|
|
127
|
-
background: padding-box linear-gradient(${neutralFillInputRest}, ${neutralFillInputRest}),
|
|
128
|
-
border-box ${neutralStrokeInputRest};
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
:host(${interactivitySelector}:hover) ${logicalControlSelector} {
|
|
132
|
-
background: padding-box linear-gradient(${neutralFillInputHover}, ${neutralFillInputHover}),
|
|
133
|
-
border-box ${neutralStrokeInputHover};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
:host(:not([disabled]):focus-within) ${logicalControlSelector} {
|
|
137
|
-
background: padding-box linear-gradient(${neutralFillInputFocus}, ${neutralFillInputFocus}),
|
|
138
|
-
border-box ${neutralStrokeInputRest};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
:host([disabled]) ${logicalControlSelector} {
|
|
142
|
-
background: padding-box linear-gradient(${neutralFillInputRest}, ${neutralFillInputRest}),
|
|
143
|
-
border-box ${neutralStrokeRest};
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.control::placeholder {
|
|
147
|
-
color: ${placeholderRest};
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
:host(${interactivitySelector}:hover) .control::placeholder {
|
|
151
|
-
color: ${placeholderHover};
|
|
152
|
-
}
|
|
153
|
-
`;
|
|
154
|
-
/**
|
|
155
|
-
* The visual styles for inputs with `appearance='filled'`.
|
|
156
|
-
*
|
|
157
|
-
* @internal
|
|
158
|
-
*/
|
|
159
|
-
export const inputFilledStyles = (context, definition, logicalControlSelector, interactivitySelector = ':not([disabled]):not(:focus-within)') => css `
|
|
160
|
-
${logicalControlSelector} {
|
|
161
|
-
background: ${neutralFillSecondaryRest};
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
:host(${interactivitySelector}:hover) ${logicalControlSelector} {
|
|
165
|
-
background: ${neutralFillSecondaryHover};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
:host(:not([disabled]):focus-within) ${logicalControlSelector} {
|
|
169
|
-
background: ${neutralFillSecondaryFocus};
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
:host([disabled]) ${logicalControlSelector} {
|
|
173
|
-
background: ${neutralFillSecondaryRest};
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.control::placeholder {
|
|
177
|
-
color: ${filledPlaceholderRest};
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
:host(${interactivitySelector}:hover) .control::placeholder {
|
|
181
|
-
color: ${filledPlaceholderHover};
|
|
182
|
-
}
|
|
183
|
-
`;
|
|
184
|
-
/**
|
|
185
|
-
* @internal
|
|
186
|
-
*/
|
|
187
|
-
export const inputForcedColorStyles = (context, definition, logicalControlSelector, interactivitySelector = ':not([disabled]):not(:focus-within)') => css `
|
|
188
|
-
:host {
|
|
189
|
-
color: ${SystemColors.ButtonText};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
${logicalControlSelector} {
|
|
193
|
-
background: ${SystemColors.ButtonFace};
|
|
194
|
-
border-color: ${SystemColors.ButtonText};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
:host(${interactivitySelector}:hover) ${logicalControlSelector},
|
|
198
|
-
:host(:not([disabled]):focus-within) ${logicalControlSelector} {
|
|
199
|
-
border-color: ${SystemColors.Highlight};
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
:host([disabled]) ${logicalControlSelector} {
|
|
203
|
-
opacity: 1;
|
|
204
|
-
background: ${SystemColors.ButtonFace};
|
|
205
|
-
border-color: ${SystemColors.GrayText};
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.control::placeholder,
|
|
209
|
-
:host(${interactivitySelector}:hover) .control::placeholder {
|
|
210
|
-
color: ${SystemColors.CanvasText};
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
:host(:not([disabled]):focus) ${logicalControlSelector} {
|
|
214
|
-
${focusTreatmentBase}
|
|
215
|
-
outline-color: ${SystemColors.Highlight};
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
:host([disabled]) {
|
|
219
|
-
opacity: 1;
|
|
220
|
-
color: ${SystemColors.GrayText};
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
:host([disabled]) ::placeholder,
|
|
224
|
-
:host([disabled]) ::-webkit-input-placeholder {
|
|
225
|
-
color: ${SystemColors.GrayText};
|
|
226
|
-
}
|
|
227
|
-
`;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { cssPartial } from '@microsoft/fast-element';
|
|
2
|
-
import { bodyFont, typeRampBaseFontSize, typeRampBaseFontVariations, typeRampBaseLineHeight, typeRampMinus1FontSize, typeRampMinus1FontVariations, typeRampMinus1LineHeight, typeRampMinus2FontSize, typeRampMinus2FontVariations, typeRampMinus2LineHeight, typeRampPlus1FontSize, typeRampPlus1FontVariations, typeRampPlus1LineHeight, typeRampPlus2FontSize, typeRampPlus2FontVariations, typeRampPlus2LineHeight, typeRampPlus3FontSize, typeRampPlus3FontVariations, typeRampPlus3LineHeight, typeRampPlus4FontSize, typeRampPlus4FontVariations, typeRampPlus4LineHeight, typeRampPlus5FontSize, typeRampPlus5FontVariations, typeRampPlus5LineHeight, typeRampPlus6FontSize, typeRampPlus6FontVariations, typeRampPlus6LineHeight, } from '../../design-tokens';
|
|
3
|
-
/** @public */
|
|
4
|
-
export const typeRampBase = cssPartial `
|
|
5
|
-
font-family: ${bodyFont};
|
|
6
|
-
font-size: ${typeRampBaseFontSize};
|
|
7
|
-
line-height: ${typeRampBaseLineHeight};
|
|
8
|
-
font-weight: initial;
|
|
9
|
-
font-variation-settings: ${typeRampBaseFontVariations};
|
|
10
|
-
`;
|
|
11
|
-
/** @public */
|
|
12
|
-
export const typeRampMinus1 = cssPartial `
|
|
13
|
-
font-family: ${bodyFont};
|
|
14
|
-
font-size: ${typeRampMinus1FontSize};
|
|
15
|
-
line-height: ${typeRampMinus1LineHeight};
|
|
16
|
-
font-weight: initial;
|
|
17
|
-
font-variation-settings: ${typeRampMinus1FontVariations};
|
|
18
|
-
`;
|
|
19
|
-
/** @public */
|
|
20
|
-
export const typeRampMinus2 = cssPartial `
|
|
21
|
-
font-family: ${bodyFont};
|
|
22
|
-
font-size: ${typeRampMinus2FontSize};
|
|
23
|
-
line-height: ${typeRampMinus2LineHeight};
|
|
24
|
-
font-weight: initial;
|
|
25
|
-
font-variation-settings: ${typeRampMinus2FontVariations};
|
|
26
|
-
`;
|
|
27
|
-
/** @public */
|
|
28
|
-
export const typeRampPlus1 = cssPartial `
|
|
29
|
-
font-family: ${bodyFont};
|
|
30
|
-
font-size: ${typeRampPlus1FontSize};
|
|
31
|
-
line-height: ${typeRampPlus1LineHeight};
|
|
32
|
-
font-weight: initial;
|
|
33
|
-
font-variation-settings: ${typeRampPlus1FontVariations};
|
|
34
|
-
`;
|
|
35
|
-
/** @public */
|
|
36
|
-
export const typeRampPlus2 = cssPartial `
|
|
37
|
-
font-family: ${bodyFont};
|
|
38
|
-
font-size: ${typeRampPlus2FontSize};
|
|
39
|
-
line-height: ${typeRampPlus2LineHeight};
|
|
40
|
-
font-weight: initial;
|
|
41
|
-
font-variation-settings: ${typeRampPlus2FontVariations};
|
|
42
|
-
`;
|
|
43
|
-
/** @public */
|
|
44
|
-
export const typeRampPlus3 = cssPartial `
|
|
45
|
-
font-family: ${bodyFont};
|
|
46
|
-
font-size: ${typeRampPlus3FontSize};
|
|
47
|
-
line-height: ${typeRampPlus3LineHeight};
|
|
48
|
-
font-weight: initial;
|
|
49
|
-
font-variation-settings: ${typeRampPlus3FontVariations};
|
|
50
|
-
`;
|
|
51
|
-
/** @public */
|
|
52
|
-
export const typeRampPlus4 = cssPartial `
|
|
53
|
-
font-family: ${bodyFont};
|
|
54
|
-
font-size: ${typeRampPlus4FontSize};
|
|
55
|
-
line-height: ${typeRampPlus4LineHeight};
|
|
56
|
-
font-weight: initial;
|
|
57
|
-
font-variation-settings: ${typeRampPlus4FontVariations};
|
|
58
|
-
`;
|
|
59
|
-
/** @public */
|
|
60
|
-
export const typeRampPlus5 = cssPartial `
|
|
61
|
-
font-family: ${bodyFont};
|
|
62
|
-
font-size: ${typeRampPlus5FontSize};
|
|
63
|
-
line-height: ${typeRampPlus5LineHeight};
|
|
64
|
-
font-weight: initial;
|
|
65
|
-
font-variation-settings: ${typeRampPlus5FontVariations};
|
|
66
|
-
`;
|
|
67
|
-
/** @public */
|
|
68
|
-
export const typeRampPlus6 = cssPartial `
|
|
69
|
-
font-family: ${bodyFont};
|
|
70
|
-
font-size: ${typeRampPlus6FontSize};
|
|
71
|
-
line-height: ${typeRampPlus6LineHeight};
|
|
72
|
-
font-weight: initial;
|
|
73
|
-
font-variation-settings: ${typeRampPlus6FontVariations};
|
|
74
|
-
`;
|
package/dist/esm/styles/size.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { cssPartial } from '@microsoft/fast-element';
|
|
2
|
-
import { baseHeightMultiplier, density, designUnit } from '../design-tokens';
|
|
3
|
-
/**
|
|
4
|
-
* A formula to retrieve the control height.
|
|
5
|
-
* Use this as the value of any CSS property that
|
|
6
|
-
* accepts a pixel size.
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export const heightNumber = cssPartial `(${baseHeightMultiplier} + ${density}) * ${designUnit}`;
|
package/dist/esm/switch/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Switch, switchTemplate as template } from '@microsoft/fast-foundation';
|
|
2
|
-
import { switchStyles as styles } from './switch.styles';
|
|
3
|
-
/**
|
|
4
|
-
* The Fluent Switch Custom Element. Implements {@link @microsoft/fast-foundation#Switch},
|
|
5
|
-
* {@link @microsoft/fast-foundation#SwitchTemplate}
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
* @remarks
|
|
10
|
-
* HTML Element: \<fluent-switch\>
|
|
11
|
-
*/
|
|
12
|
-
export const fluentSwitch = Switch.compose({
|
|
13
|
-
baseName: 'switch',
|
|
14
|
-
template,
|
|
15
|
-
styles,
|
|
16
|
-
switch: `
|
|
17
|
-
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
18
|
-
<rect x="2" y="2" width="12" height="12" rx="6"/>
|
|
19
|
-
</svg>
|
|
20
|
-
`,
|
|
21
|
-
});
|
|
22
|
-
/**
|
|
23
|
-
* Styles for Switch
|
|
24
|
-
* @public
|
|
25
|
-
*/
|
|
26
|
-
export const switchStyles = styles;
|
|
27
|
-
/**
|
|
28
|
-
* Switch Base class
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
export { Switch };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { fluentSwitch } from './index';
|
|
2
|
-
export default {
|
|
3
|
-
title: 'Components/Switch',
|
|
4
|
-
component: fluentSwitch,
|
|
5
|
-
argTypes: {
|
|
6
|
-
checked: {
|
|
7
|
-
control: { type: 'boolean' },
|
|
8
|
-
},
|
|
9
|
-
disabled: {
|
|
10
|
-
control: { type: 'boolean' },
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
const SwitchTemplate = ({ checked, disabled, label }) => `
|
|
15
|
-
<fluent-switch
|
|
16
|
-
${checked ? 'checked' : ''}
|
|
17
|
-
${disabled ? 'disabled' : ''}
|
|
18
|
-
>${label}
|
|
19
|
-
<span slot="checked-message">On</span>
|
|
20
|
-
<span slot="unchecked-message">Off</span>
|
|
21
|
-
</fluent-switch>
|
|
22
|
-
`;
|
|
23
|
-
export const Switch = SwitchTemplate.bind({});
|
|
24
|
-
Switch.args = {
|
|
25
|
-
label: 'Label',
|
|
26
|
-
checked: false,
|
|
27
|
-
disabled: false,
|
|
28
|
-
};
|
|
29
|
-
const example = `
|
|
30
|
-
<fluent-switch>
|
|
31
|
-
<span slot="checked-message">On</span>
|
|
32
|
-
<span slot="unchecked-message">Off</span>
|
|
33
|
-
<label for="direction-switch">Captions:</label>
|
|
34
|
-
</fluent-switch>
|
|
35
|
-
`;
|
|
36
|
-
Switch.parameters = {
|
|
37
|
-
docs: {
|
|
38
|
-
source: {
|
|
39
|
-
code: example,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { SystemColors } from '@microsoft/fast-web-utilities';
|
|
3
|
-
import { disabledCursor, display, focusVisible, forcedColorsStylesheetBehavior, } from '@microsoft/fast-foundation';
|
|
4
|
-
import { DirectionalStyleSheetBehavior, heightNumber } from '../styles';
|
|
5
|
-
import { accentFillActive, accentFillHover, accentFillRest, bodyFont, designUnit, disabledOpacity, foregroundOnAccentActive, foregroundOnAccentHover, foregroundOnAccentRest, neutralFillInputAltActive, neutralFillInputAltFocus, neutralFillInputAltHover, neutralFillInputAltRest, neutralForegroundRest, neutralStrokeStrongActive, neutralStrokeStrongHover, neutralStrokeStrongRest, strokeWidth, } from '../design-tokens';
|
|
6
|
-
import { typeRampBase } from '../styles/patterns/type-ramp';
|
|
7
|
-
import { focusTreatmentTight } from '../styles/focus';
|
|
8
|
-
export const switchStyles = (context, definition) => css `
|
|
9
|
-
:host([hidden]) {
|
|
10
|
-
display: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
${display('inline-flex')} :host {
|
|
14
|
-
align-items: center;
|
|
15
|
-
outline: none;
|
|
16
|
-
font-family: ${bodyFont};
|
|
17
|
-
${
|
|
18
|
-
/*
|
|
19
|
-
* Chromium likes to select label text or the default slot when
|
|
20
|
-
* the checkbox is clicked. Maybe there is a better solution here?
|
|
21
|
-
*/ ''} user-select: none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:host(.disabled) {
|
|
25
|
-
opacity: ${disabledOpacity};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host(.disabled) .label,
|
|
29
|
-
:host(.readonly) .label,
|
|
30
|
-
:host(.disabled) .switch,
|
|
31
|
-
:host(.readonly) .switch,
|
|
32
|
-
:host(.disabled) .status-message,
|
|
33
|
-
:host(.readonly) .status-message {
|
|
34
|
-
cursor: ${disabledCursor};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.switch {
|
|
38
|
-
position: relative;
|
|
39
|
-
box-sizing: border-box;
|
|
40
|
-
width: calc(((${heightNumber} / 2) + ${designUnit}) * 2px);
|
|
41
|
-
height: calc(((${heightNumber} / 2) + ${designUnit}) * 1px);
|
|
42
|
-
background: ${neutralFillInputAltRest};
|
|
43
|
-
border-radius: calc(${heightNumber} * 1px);
|
|
44
|
-
border: calc(${strokeWidth} * 1px) solid ${neutralStrokeStrongRest};
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host(:not(.disabled):hover) .switch {
|
|
49
|
-
background: ${neutralFillInputAltHover};
|
|
50
|
-
border-color: ${neutralStrokeStrongHover};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host(:not(.disabled):active) .switch {
|
|
54
|
-
background: ${neutralFillInputAltActive};
|
|
55
|
-
border-color: ${neutralStrokeStrongActive};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
:host(:${focusVisible}) .switch {
|
|
59
|
-
${focusTreatmentTight}
|
|
60
|
-
background: ${neutralFillInputAltFocus};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:host(.checked) .switch {
|
|
64
|
-
background: ${accentFillRest};
|
|
65
|
-
border-color: transparent;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
:host(.checked:not(.disabled):hover) .switch {
|
|
69
|
-
background: ${accentFillHover};
|
|
70
|
-
border-color: transparent;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
:host(.checked:not(.disabled):active) .switch {
|
|
74
|
-
background: ${accentFillActive};
|
|
75
|
-
border-color: transparent;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
slot[name='switch'] {
|
|
79
|
-
position: absolute;
|
|
80
|
-
display: flex;
|
|
81
|
-
border: 1px solid transparent; /* Spacing included in the transform reference box */
|
|
82
|
-
fill: ${neutralForegroundRest};
|
|
83
|
-
transition: all 0.2s ease-in-out;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.status-message {
|
|
87
|
-
color: ${neutralForegroundRest};
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
${typeRampBase}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.label__hidden {
|
|
93
|
-
display: none;
|
|
94
|
-
visibility: hidden;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.label {
|
|
98
|
-
color: ${neutralForegroundRest};
|
|
99
|
-
${typeRampBase}
|
|
100
|
-
margin-inline-end: calc(${designUnit} * 2px + 2px);
|
|
101
|
-
cursor: pointer;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
::slotted([slot="checked-message"]),
|
|
105
|
-
::slotted([slot="unchecked-message"]) {
|
|
106
|
-
margin-inline-start: calc(${designUnit} * 2px + 2px);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
:host(.checked) .switch {
|
|
110
|
-
background: ${accentFillRest};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:host(.checked) .switch slot[name='switch'] {
|
|
114
|
-
fill: ${foregroundOnAccentRest};
|
|
115
|
-
filter: drop-shadow(0px 1px 1px rgba(0, 0, 0, 0.15));
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
:host(.checked:not(.disabled)) .switch:hover {
|
|
119
|
-
background: ${accentFillHover};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
:host(.checked:not(.disabled)) .switch:hover slot[name='switch'] {
|
|
123
|
-
fill: ${foregroundOnAccentHover};
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
:host(.checked:not(.disabled)) .switch:active {
|
|
127
|
-
background: ${accentFillActive};
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
:host(.checked:not(.disabled)) .switch:active slot[name='switch'] {
|
|
131
|
-
fill: ${foregroundOnAccentActive};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.unchecked-message {
|
|
135
|
-
display: block;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.checked-message {
|
|
139
|
-
display: none;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
:host(.checked) .unchecked-message {
|
|
143
|
-
display: none;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
:host(.checked) .checked-message {
|
|
147
|
-
display: block;
|
|
148
|
-
}
|
|
149
|
-
`.withBehaviors(new DirectionalStyleSheetBehavior(css `
|
|
150
|
-
slot[name='switch'] {
|
|
151
|
-
left: 0;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
:host(.checked) slot[name='switch'] {
|
|
155
|
-
left: 100%;
|
|
156
|
-
transform: translateX(-100%);
|
|
157
|
-
}
|
|
158
|
-
`, css `
|
|
159
|
-
slot[name='switch'] {
|
|
160
|
-
right: 0;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
:host(.checked) slot[name='switch'] {
|
|
164
|
-
right: 100%;
|
|
165
|
-
transform: translateX(100%);
|
|
166
|
-
}
|
|
167
|
-
`), forcedColorsStylesheetBehavior(css `
|
|
168
|
-
:host(:not(.disabled)) .switch slot[name='switch'] {
|
|
169
|
-
forced-color-adjust: none;
|
|
170
|
-
fill: ${SystemColors.FieldText};
|
|
171
|
-
}
|
|
172
|
-
.switch {
|
|
173
|
-
background: ${SystemColors.Field};
|
|
174
|
-
border-color: ${SystemColors.FieldText};
|
|
175
|
-
}
|
|
176
|
-
:host(.checked) .switch {
|
|
177
|
-
background: ${SystemColors.Highlight};
|
|
178
|
-
border-color: ${SystemColors.Highlight};
|
|
179
|
-
}
|
|
180
|
-
:host(:not(.disabled):hover) .switch ,
|
|
181
|
-
:host(:not(.disabled):active) .switch,
|
|
182
|
-
:host(.checked:not(.disabled):hover) .switch {
|
|
183
|
-
background: ${SystemColors.HighlightText};
|
|
184
|
-
border-color: ${SystemColors.Highlight};
|
|
185
|
-
}
|
|
186
|
-
:host(.checked:not(.disabled)) .switch slot[name="switch"] {
|
|
187
|
-
fill: ${SystemColors.HighlightText};
|
|
188
|
-
}
|
|
189
|
-
:host(.checked:not(.disabled):hover) .switch slot[name='switch'] {
|
|
190
|
-
fill: ${SystemColors.Highlight};
|
|
191
|
-
}
|
|
192
|
-
:host(:${focusVisible}) .switch {
|
|
193
|
-
forced-color-adjust: none;
|
|
194
|
-
background: ${SystemColors.Field};
|
|
195
|
-
border-color: ${SystemColors.Highlight};
|
|
196
|
-
outline-color: ${SystemColors.FieldText};
|
|
197
|
-
}
|
|
198
|
-
:host(.disabled) {
|
|
199
|
-
opacity: 1;
|
|
200
|
-
}
|
|
201
|
-
:host(.disabled) slot[name='switch'] {
|
|
202
|
-
forced-color-adjust: none;
|
|
203
|
-
fill: ${SystemColors.GrayText};
|
|
204
|
-
}
|
|
205
|
-
:host(.disabled) .switch {
|
|
206
|
-
background: ${SystemColors.Field};
|
|
207
|
-
border-color: ${SystemColors.GrayText};
|
|
208
|
-
}
|
|
209
|
-
.status-message,
|
|
210
|
-
.label {
|
|
211
|
-
color: ${SystemColors.FieldText};
|
|
212
|
-
}
|
|
213
|
-
`));
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1.1,
|
|
3
|
-
"tags": [
|
|
4
|
-
{
|
|
5
|
-
"name": "fluent-switch",
|
|
6
|
-
"title": "Switch",
|
|
7
|
-
"description": "The Fluent UI switch element",
|
|
8
|
-
"attributes": [
|
|
9
|
-
{
|
|
10
|
-
"name": "checked",
|
|
11
|
-
"title": "Checked",
|
|
12
|
-
"description": "Provides the default checked value",
|
|
13
|
-
"required": false,
|
|
14
|
-
"type": "boolean"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"name": "name",
|
|
18
|
-
"title": "Name",
|
|
19
|
-
"description": "This element's value will be surfaced during form submission under the provided name",
|
|
20
|
-
"type": "string",
|
|
21
|
-
"default": "",
|
|
22
|
-
"required": false
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "required",
|
|
26
|
-
"title": "Required",
|
|
27
|
-
"description": "Require the field to be completed prior to form submission",
|
|
28
|
-
"type": "boolean",
|
|
29
|
-
"default": false,
|
|
30
|
-
"required": false
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "disabled",
|
|
34
|
-
"title": "Disabled",
|
|
35
|
-
"description": "Sets the disabled state of the switch",
|
|
36
|
-
"type": "boolean",
|
|
37
|
-
"default": false,
|
|
38
|
-
"required": false
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "readonly",
|
|
42
|
-
"title": "Readonly",
|
|
43
|
-
"description": "When true, the control will be immutable by user interaction",
|
|
44
|
-
"type": "boolean",
|
|
45
|
-
"default": false,
|
|
46
|
-
"required": false
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"slots": [
|
|
50
|
-
{
|
|
51
|
-
"name": "",
|
|
52
|
-
"title": "Default slot",
|
|
53
|
-
"description": "The content of the switch represents its visual label"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"name": "checked-message",
|
|
57
|
-
"title": "Checked message slot",
|
|
58
|
-
"description": "Visible content representing the checked state"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"name": "unchecked-message",
|
|
62
|
-
"title": "Unchecked message slot",
|
|
63
|
-
"description": "Visible content representing the unchecked state"
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
}
|
package/dist/esm/tabs/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Tabs, tabsTemplate as template } from '@microsoft/fast-foundation';
|
|
2
|
-
import { tabsStyles as styles } from './tabs.styles';
|
|
3
|
-
/**
|
|
4
|
-
* The Fluent Tabs Custom Element. Implements {@link @microsoft/fast-foundation#Tabs},
|
|
5
|
-
* {@link @microsoft/fast-foundation#tabsTemplate}
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
* @remarks
|
|
10
|
-
* HTML Element: \<fluent-tabs\>
|
|
11
|
-
*/
|
|
12
|
-
export const fluentTabs = Tabs.compose({
|
|
13
|
-
baseName: 'tabs',
|
|
14
|
-
template,
|
|
15
|
-
styles,
|
|
16
|
-
});
|
|
17
|
-
export * from './tab';
|
|
18
|
-
export * from './tab-panel';
|
|
19
|
-
/**
|
|
20
|
-
* Styles for Tabs
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
export const tabsStyles = styles;
|
|
24
|
-
/**
|
|
25
|
-
* Tabs base class
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
export { Tabs };
|