@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,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1.1,
|
|
3
|
-
"tags": [
|
|
4
|
-
{
|
|
5
|
-
"name": "fluent-badge",
|
|
6
|
-
"title": "Badge",
|
|
7
|
-
"description": "The Fluent UI badge element",
|
|
8
|
-
"attributes": [
|
|
9
|
-
{
|
|
10
|
-
"name": "circular",
|
|
11
|
-
"title": "Circular",
|
|
12
|
-
"description": "Sets the visual appearance of the badge to circular",
|
|
13
|
-
"type": "boolean",
|
|
14
|
-
"default": false,
|
|
15
|
-
"required": false
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "fill",
|
|
19
|
-
"title": "Fill",
|
|
20
|
-
"description": "Sets the background color to a CSS custom property of the attribute value - var(--badge-fill-[value])",
|
|
21
|
-
"type": "string",
|
|
22
|
-
"required": false
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "color",
|
|
26
|
-
"title": "Color",
|
|
27
|
-
"description": "Sets the color to a CSS custom property of the attribute value - var(--badge-color-[value])",
|
|
28
|
-
"type": "string",
|
|
29
|
-
"required": false
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"name": "appearance",
|
|
33
|
-
"title": "Appearance",
|
|
34
|
-
"description": "The badge's visual treatment",
|
|
35
|
-
"type": "string",
|
|
36
|
-
"values": [
|
|
37
|
-
{
|
|
38
|
-
"name": "accent"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "lightweight"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"name": "neutral"
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"default": "lightweight",
|
|
48
|
-
"required": false
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"slots": [
|
|
52
|
-
{
|
|
53
|
-
"name": "",
|
|
54
|
-
"title": "Default slot",
|
|
55
|
-
"description": "The content of the badge"
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
}
|
package/dist/esm/badge/index.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { attr, DOM } from '@microsoft/fast-element';
|
|
3
|
-
import { Badge as FoundationBadge, badgeTemplate as template } from '@microsoft/fast-foundation';
|
|
4
|
-
import { badgeStyles as styles } from './badge.styles';
|
|
5
|
-
/**
|
|
6
|
-
* The Fluent Badge class
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export class Badge extends FoundationBadge {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.appearance = 'lightweight';
|
|
13
|
-
}
|
|
14
|
-
appearanceChanged(oldValue, newValue) {
|
|
15
|
-
if (oldValue !== newValue) {
|
|
16
|
-
DOM.queueUpdate(() => {
|
|
17
|
-
this.classList.add(newValue);
|
|
18
|
-
this.classList.remove(oldValue);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
__decorate([
|
|
24
|
-
attr({ mode: 'fromView' })
|
|
25
|
-
], Badge.prototype, "appearance", void 0);
|
|
26
|
-
/**
|
|
27
|
-
* The Fluent Badge Element. Implements {@link @microsoft/fast-foundation#Badge},
|
|
28
|
-
* {@link @microsoft/fast-foundation#badgeTemplate}
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
* @remarks
|
|
33
|
-
* HTML Element: \<fluent-badge\>
|
|
34
|
-
*/
|
|
35
|
-
export const fluentBadge = Badge.compose({
|
|
36
|
-
baseName: 'badge',
|
|
37
|
-
baseClass: FoundationBadge,
|
|
38
|
-
template,
|
|
39
|
-
styles,
|
|
40
|
-
});
|
|
41
|
-
/**
|
|
42
|
-
* Styles for Badge
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
export const badgeStyles = styles;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import BreadcrumbTemplate from './fixtures/breadcrumb.html';
|
|
2
|
-
import './index';
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/Breadcrumb',
|
|
5
|
-
};
|
|
6
|
-
export const Breadcrumb = () => BreadcrumbTemplate;
|
|
7
|
-
const example = `
|
|
8
|
-
<fluent-breadcrumb>
|
|
9
|
-
<fluent-breadcrumb-item href="#"> Breadcrumb item 1 </fluent-breadcrumb-item>
|
|
10
|
-
<fluent-breadcrumb-item href="#"> Breadcrumb item 2 </fluent-breadcrumb-item>
|
|
11
|
-
<fluent-breadcrumb-item>Breadcrumb item 3</fluent-breadcrumb-item>
|
|
12
|
-
</fluent-breadcrumb>
|
|
13
|
-
`;
|
|
14
|
-
Breadcrumb.parameters = {
|
|
15
|
-
docs: {
|
|
16
|
-
source: {
|
|
17
|
-
code: example,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { display } from '@microsoft/fast-foundation';
|
|
3
|
-
import { typeRampBase } from '../styles/patterns/type-ramp';
|
|
4
|
-
export const breadcrumbStyles = (context, definition) => css `
|
|
5
|
-
${display('inline-block')} :host {
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
${typeRampBase};
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.list {
|
|
11
|
-
display: flex;
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1.1,
|
|
3
|
-
"tags": [
|
|
4
|
-
{
|
|
5
|
-
"name": "fluent-breadcrumb",
|
|
6
|
-
"title": "Breadcrumb",
|
|
7
|
-
"description": "The Fluent UI breadcrumb element",
|
|
8
|
-
"attributes": [],
|
|
9
|
-
"slots": [
|
|
10
|
-
{
|
|
11
|
-
"name": "",
|
|
12
|
-
"title": "Default slot",
|
|
13
|
-
"description": "The content of the breadcrumb, typically composed of fluent-breadcrumb-items or anchors"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Breadcrumb, breadcrumbTemplate as template } from '@microsoft/fast-foundation';
|
|
2
|
-
import { breadcrumbStyles as styles } from './breadcrumb.styles';
|
|
3
|
-
/**
|
|
4
|
-
* The Fluent Breadcrumb Element. Implements {@link @microsoft/fast-foundation#Breadcrumb},
|
|
5
|
-
* {@link @microsoft/fast-foundation#breadcrumbTemplate}
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
* @remarks
|
|
10
|
-
* HTML Element: \<fluent-breadcrumb\>
|
|
11
|
-
*/
|
|
12
|
-
export const fluentBreadcrumb = Breadcrumb.compose({
|
|
13
|
-
baseName: 'breadcrumb',
|
|
14
|
-
template,
|
|
15
|
-
styles,
|
|
16
|
-
});
|
|
17
|
-
/**
|
|
18
|
-
* Styles for Breadcrumb
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export const breadcrumbStyles = styles;
|
|
22
|
-
/**
|
|
23
|
-
* Base class for Breadcrumb
|
|
24
|
-
* @public
|
|
25
|
-
*/
|
|
26
|
-
export { Breadcrumb };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import BreadcrumbItemTemplate from './fixtures/breadcrumb-item.html';
|
|
2
|
-
import './index';
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/Breadcrumb Item',
|
|
5
|
-
};
|
|
6
|
-
export const BreadcrumbItem = () => BreadcrumbItemTemplate;
|
|
7
|
-
const example = `
|
|
8
|
-
<fluent-breadcrumb-item href="#"> Breadcrumb item </fluent-breadcrumb-item>
|
|
9
|
-
`;
|
|
10
|
-
BreadcrumbItem.parameters = {
|
|
11
|
-
docs: {
|
|
12
|
-
source: {
|
|
13
|
-
code: example,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { display, focusVisible, forcedColorsStylesheetBehavior, } from '@microsoft/fast-foundation';
|
|
3
|
-
import { SystemColors } from '@microsoft/fast-web-utilities';
|
|
4
|
-
import { controlCornerRadius, neutralForegroundActive, neutralForegroundHover, neutralForegroundRest, } from '../design-tokens';
|
|
5
|
-
import { typeRampBase } from '../styles/patterns/type-ramp';
|
|
6
|
-
import { heightNumber } from '../styles/index';
|
|
7
|
-
import { focusTreatmentTight } from '../styles/focus';
|
|
8
|
-
export const breadcrumbItemStyles = (context, definition) => css `
|
|
9
|
-
${display('inline-flex')} :host {
|
|
10
|
-
background: transparent;
|
|
11
|
-
color: ${neutralForegroundRest};
|
|
12
|
-
fill: currentcolor;
|
|
13
|
-
box-sizing: border-box;
|
|
14
|
-
${typeRampBase};
|
|
15
|
-
min-width: calc(${heightNumber} * 1px);
|
|
16
|
-
border-radius: calc(${controlCornerRadius} * 1px);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.listitem {
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
border-radius: inherit;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.control {
|
|
26
|
-
position: relative;
|
|
27
|
-
align-items: center;
|
|
28
|
-
box-sizing: border-box;
|
|
29
|
-
color: inherit;
|
|
30
|
-
fill: inherit;
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
display: flex;
|
|
33
|
-
outline: none;
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
white-space: nowrap;
|
|
36
|
-
border-radius: inherit;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.control:hover {
|
|
40
|
-
color: ${neutralForegroundHover};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.control:active {
|
|
44
|
-
color: ${neutralForegroundActive};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.control:${focusVisible} {
|
|
48
|
-
${focusTreatmentTight}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:host(:not([href])),
|
|
52
|
-
:host([aria-current]) .control {
|
|
53
|
-
color: ${neutralForegroundRest};
|
|
54
|
-
fill: currentcolor;
|
|
55
|
-
cursor: default;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.start {
|
|
59
|
-
display: flex;
|
|
60
|
-
margin-inline-end: 6px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.end {
|
|
64
|
-
display: flex;
|
|
65
|
-
margin-inline-start: 6px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.separator {
|
|
69
|
-
display: flex;
|
|
70
|
-
}
|
|
71
|
-
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
72
|
-
:host(:not([href])),
|
|
73
|
-
.start,
|
|
74
|
-
.end,
|
|
75
|
-
.separator {
|
|
76
|
-
background: ${SystemColors.ButtonFace};
|
|
77
|
-
color: ${SystemColors.ButtonText};
|
|
78
|
-
fill: currentcolor;
|
|
79
|
-
}
|
|
80
|
-
.separator {
|
|
81
|
-
fill: ${SystemColors.ButtonText};
|
|
82
|
-
}
|
|
83
|
-
:host([href]) {
|
|
84
|
-
forced-color-adjust: none;
|
|
85
|
-
background: ${SystemColors.ButtonFace};
|
|
86
|
-
color: ${SystemColors.LinkText};
|
|
87
|
-
}
|
|
88
|
-
:host([href]) .control:hover {
|
|
89
|
-
background: ${SystemColors.LinkText};
|
|
90
|
-
color: ${SystemColors.HighlightText};
|
|
91
|
-
fill: currentcolor;
|
|
92
|
-
}
|
|
93
|
-
.control:${focusVisible} {
|
|
94
|
-
outline-color: ${SystemColors.LinkText};
|
|
95
|
-
}
|
|
96
|
-
`));
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1.1,
|
|
3
|
-
"tags": [
|
|
4
|
-
{
|
|
5
|
-
"name": "fluent-breadcrumb-item",
|
|
6
|
-
"title": "Breadcrumb item",
|
|
7
|
-
"description": "The Fluent UI breadcrumb item element",
|
|
8
|
-
"attributes": [
|
|
9
|
-
{
|
|
10
|
-
"name": "href",
|
|
11
|
-
"title": "URL",
|
|
12
|
-
"description": "The URL the item points to",
|
|
13
|
-
"type": "string",
|
|
14
|
-
"default": "",
|
|
15
|
-
"required": false
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "separator",
|
|
19
|
-
"title": "Separator",
|
|
20
|
-
"description": "Determines whether the visual separator should be rendered",
|
|
21
|
-
"type": "boolean",
|
|
22
|
-
"default": true,
|
|
23
|
-
"required": false
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"slots": [
|
|
27
|
-
{
|
|
28
|
-
"name": "",
|
|
29
|
-
"title": "Default slot",
|
|
30
|
-
"description": "The content of the item"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "separator",
|
|
34
|
-
"title": "Separator slot",
|
|
35
|
-
"description": "Slot to provide a custom icon to represent the visual separator"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"name": "start",
|
|
39
|
-
"title": "Start slot",
|
|
40
|
-
"description": "Contents of the start slot are positioned before the default content"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "end",
|
|
44
|
-
"title": "End slot",
|
|
45
|
-
"description": "Contents of the end slot are positioned after the default content"
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { BreadcrumbItem, breadcrumbItemTemplate as template } from '@microsoft/fast-foundation';
|
|
2
|
-
import { breadcrumbItemStyles as styles } from './breadcrumb-item.styles';
|
|
3
|
-
/**
|
|
4
|
-
* The Fluent BreadcrumbItem Element. Implements {@link @microsoft/fast-foundation#BreadcrumbItem},
|
|
5
|
-
* {@link @microsoft/fast-foundation#breadcrumbItemTemplate}
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
* @remarks
|
|
10
|
-
* HTML Element: \<fluent-breadcrumb-item\>
|
|
11
|
-
*/
|
|
12
|
-
export const fluentBreadcrumbItem = BreadcrumbItem.compose({
|
|
13
|
-
baseName: 'breadcrumb-item',
|
|
14
|
-
template,
|
|
15
|
-
styles,
|
|
16
|
-
shadowOptions: {
|
|
17
|
-
delegatesFocus: true,
|
|
18
|
-
},
|
|
19
|
-
separator: `
|
|
20
|
-
<svg width="12" height="12" xmlns="http://www.w3.org/2000/svg">
|
|
21
|
-
<path d="M4.65 2.15a.5.5 0 000 .7L7.79 6 4.65 9.15a.5.5 0 10.7.7l3.5-3.5a.5.5 0 000-.7l-3.5-3.5a.5.5 0 00-.7 0z"/>
|
|
22
|
-
</svg>
|
|
23
|
-
`,
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* Styles for BreadcrumbItem
|
|
27
|
-
* @public
|
|
28
|
-
*/
|
|
29
|
-
export const breadcrumbItemStyles = styles;
|
|
30
|
-
/**
|
|
31
|
-
* Base class for BreadcrumbItem
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
export { BreadcrumbItem };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { fluentButton } from './index';
|
|
2
|
-
export default {
|
|
3
|
-
title: 'Components/Button',
|
|
4
|
-
component: fluentButton,
|
|
5
|
-
argTypes: {
|
|
6
|
-
appearance: {
|
|
7
|
-
description: 'This controls the basic appearances',
|
|
8
|
-
control: { type: 'select' },
|
|
9
|
-
options: ['neutral', 'accent', 'lightweight', 'outline', 'stealth'],
|
|
10
|
-
default: 'neutral',
|
|
11
|
-
},
|
|
12
|
-
disabled: {
|
|
13
|
-
control: { type: 'boolean' },
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
const ButtonTemplate = ({ appearance, disabled, label }) => `
|
|
18
|
-
<fluent-button
|
|
19
|
-
${disabled ? 'disabled' : ''}
|
|
20
|
-
${appearance ? `appearance="${appearance}"` : ''}
|
|
21
|
-
>
|
|
22
|
-
${label}
|
|
23
|
-
</fluent-button>
|
|
24
|
-
`;
|
|
25
|
-
export const Button = ButtonTemplate.bind({});
|
|
26
|
-
Button.args = {
|
|
27
|
-
label: 'Button',
|
|
28
|
-
disabled: false,
|
|
29
|
-
appearance: 'accent',
|
|
30
|
-
};
|
|
31
|
-
const example = `
|
|
32
|
-
<fluent-button appearance="accent">Button</fluent-button>
|
|
33
|
-
`;
|
|
34
|
-
Button.parameters = {
|
|
35
|
-
docs: {
|
|
36
|
-
source: {
|
|
37
|
-
code: example,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { disabledCursor, } from '@microsoft/fast-foundation';
|
|
3
|
-
import { AccentButtonStyles, baseButtonStyles, LightweightButtonStyles, NeutralButtonStyles, OutlineButtonStyles, StealthButtonStyles, } from '../styles/';
|
|
4
|
-
import { appearanceBehavior } from '../utilities/behaviors';
|
|
5
|
-
import { disabledOpacity } from '../design-tokens';
|
|
6
|
-
const interactivitySelector = ':not([disabled])';
|
|
7
|
-
const nonInteractivitySelector = '[disabled]';
|
|
8
|
-
export const buttonStyles = (context, definition) => css `
|
|
9
|
-
:host(${interactivitySelector}) .control {
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host(${nonInteractivitySelector}) .control {
|
|
14
|
-
cursor: ${disabledCursor};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@media (forced-colors: none) {
|
|
18
|
-
:host(${nonInteractivitySelector}) .control {
|
|
19
|
-
opacity: ${disabledOpacity};
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
${baseButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)}
|
|
24
|
-
`.withBehaviors(appearanceBehavior('neutral', NeutralButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('accent', AccentButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('lightweight', LightweightButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('outline', OutlineButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('stealth', StealthButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)));
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1.1,
|
|
3
|
-
"tags": [
|
|
4
|
-
{
|
|
5
|
-
"name": "fluent-button",
|
|
6
|
-
"title": "Button",
|
|
7
|
-
"description": "The Fluent UI button element",
|
|
8
|
-
"attributes": [
|
|
9
|
-
{
|
|
10
|
-
"name": "appearance",
|
|
11
|
-
"title": "Appearance",
|
|
12
|
-
"description": "The button's visual treatment",
|
|
13
|
-
"type": "string",
|
|
14
|
-
"values": [
|
|
15
|
-
{
|
|
16
|
-
"name": "accent"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "lightweight"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "neutral"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "outline"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "stealth"
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"default": "neutral",
|
|
32
|
-
"required": false
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"name": "autofocus",
|
|
36
|
-
"title": "Autofocus",
|
|
37
|
-
"description": "Determines if the element should receive document focus on page load",
|
|
38
|
-
"type": "boolean",
|
|
39
|
-
"default": false,
|
|
40
|
-
"required": false
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "disabled",
|
|
44
|
-
"title": "Disabled",
|
|
45
|
-
"description": "Sets the disabled state of the button",
|
|
46
|
-
"type": "boolean",
|
|
47
|
-
"required": false
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"name": "form",
|
|
51
|
-
"title": "Form ID",
|
|
52
|
-
"description": "The ID of a form to associate the element to",
|
|
53
|
-
"type": "string",
|
|
54
|
-
"required": false
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"name": "formaction",
|
|
58
|
-
"title": "Form processing url",
|
|
59
|
-
"description": "The HTML formaction attribute of the button",
|
|
60
|
-
"type": "string",
|
|
61
|
-
"required": false
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"name": "formenctype",
|
|
65
|
-
"title": "Form encoding",
|
|
66
|
-
"description": "The HTML formenctype attribute of the button",
|
|
67
|
-
"type": "string",
|
|
68
|
-
"required": false
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "formmethod",
|
|
72
|
-
"title": "Form submit method",
|
|
73
|
-
"description": "The HTML formmethod attribute of the button",
|
|
74
|
-
"type": "string",
|
|
75
|
-
"required": false,
|
|
76
|
-
"values": [{ "name": "post" }, { "name": "get" }]
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"name": "formnovalidate",
|
|
80
|
-
"title": "No form validation",
|
|
81
|
-
"description": "The HTML formnovalidate attribute of the button",
|
|
82
|
-
"type": "boolean",
|
|
83
|
-
"required": false
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"name": "formtarget",
|
|
87
|
-
"title": "Form Target",
|
|
88
|
-
"description": "The HTML formtarget attribute of the button",
|
|
89
|
-
"type": "string",
|
|
90
|
-
"values": [
|
|
91
|
-
{
|
|
92
|
-
"name": "_self"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"name": "_blank"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"name": "_parent"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"name": "_top"
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"required": false
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"name": "name",
|
|
108
|
-
"title": "Name",
|
|
109
|
-
"description": "The HTML name attribute of the button",
|
|
110
|
-
"type": "string",
|
|
111
|
-
"required": false
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"name": "type",
|
|
115
|
-
"title": "Type",
|
|
116
|
-
"description": "The HTML type attribute of the button",
|
|
117
|
-
"type": "string",
|
|
118
|
-
"required": false,
|
|
119
|
-
"values": [
|
|
120
|
-
{
|
|
121
|
-
"name": "submit"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"name": "reset"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"name": "button"
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"name": "value",
|
|
133
|
-
"title": "Value",
|
|
134
|
-
"description": "The HTML value attribute of the button",
|
|
135
|
-
"type": "string",
|
|
136
|
-
"required": false
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
"slots": [
|
|
140
|
-
{
|
|
141
|
-
"name": "",
|
|
142
|
-
"title": "Default slot",
|
|
143
|
-
"description": "The content of the anchor"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"name": "start",
|
|
147
|
-
"title": "Start slot",
|
|
148
|
-
"description": "Contents of the start slot are positioned before the button content"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"name": "end",
|
|
152
|
-
"title": "End slot",
|
|
153
|
-
"description": "Contents of the end slot are positioned after the button content"
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
]
|
|
158
|
-
}
|
package/dist/esm/button/index.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { attr } from '@microsoft/fast-element';
|
|
3
|
-
import { Button as FoundationButton, buttonTemplate as template } from '@microsoft/fast-foundation';
|
|
4
|
-
import { buttonStyles as styles } from './button.styles';
|
|
5
|
-
/**
|
|
6
|
-
* The Fluent button class
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export class Button extends FoundationButton {
|
|
10
|
-
appearanceChanged(oldValue, newValue) {
|
|
11
|
-
if (oldValue !== newValue) {
|
|
12
|
-
this.classList.add(newValue);
|
|
13
|
-
this.classList.remove(oldValue);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
connectedCallback() {
|
|
20
|
-
super.connectedCallback();
|
|
21
|
-
if (!this.appearance) {
|
|
22
|
-
this.appearance = 'neutral';
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Applies 'icon-only' class when there is only an SVG in the default slot
|
|
27
|
-
*
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
defaultSlottedContentChanged() {
|
|
31
|
-
const slottedElements = this.defaultSlottedContent.filter(x => x.nodeType === Node.ELEMENT_NODE);
|
|
32
|
-
if (slottedElements.length === 1 && slottedElements[0] instanceof SVGElement) {
|
|
33
|
-
this.control.classList.add('icon-only');
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this.control.classList.remove('icon-only');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
__decorate([
|
|
41
|
-
attr
|
|
42
|
-
], Button.prototype, "appearance", void 0);
|
|
43
|
-
/**
|
|
44
|
-
* The Fluent Button Element. Implements {@link @microsoft/fast-foundation#Button},
|
|
45
|
-
* {@link @microsoft/fast-foundation#buttonTemplate}
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* @public
|
|
49
|
-
* @remarks
|
|
50
|
-
* HTML Element: \<fluent-button\>
|
|
51
|
-
*
|
|
52
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}
|
|
53
|
-
*/
|
|
54
|
-
export const fluentButton = Button.compose({
|
|
55
|
-
baseName: 'button',
|
|
56
|
-
baseClass: FoundationButton,
|
|
57
|
-
template,
|
|
58
|
-
styles,
|
|
59
|
-
shadowOptions: {
|
|
60
|
-
delegatesFocus: true,
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
/**
|
|
64
|
-
* Styles for Button
|
|
65
|
-
* @public
|
|
66
|
-
*/
|
|
67
|
-
export const buttonStyles = styles;
|