@fluentui/web-components 3.0.0-beta.3 → 3.0.0-beta.30
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.md +420 -103
- package/README.md +46 -15
- package/dist/dts/accordion/accordion.bench.d.ts +3 -0
- package/dist/dts/accordion/accordion.d.ts +47 -3
- package/dist/dts/accordion/accordion.definition.d.ts +0 -4
- package/dist/dts/accordion/accordion.options.d.ts +14 -0
- package/dist/dts/accordion/accordion.template.d.ts +4 -0
- package/dist/dts/accordion/index.d.ts +2 -1
- package/dist/dts/accordion-item/accordion-item.bench.d.ts +3 -0
- package/dist/dts/accordion-item/accordion-item.d.ts +78 -6
- package/dist/dts/accordion-item/accordion-item.definition.d.ts +0 -3
- package/dist/dts/accordion-item/accordion-item.options.d.ts +3 -3
- package/dist/dts/accordion-item/accordion-item.template.d.ts +2 -1
- package/dist/dts/accordion-item/index.d.ts +3 -2
- package/dist/dts/anchor-button/anchor-button.bench.d.ts +3 -0
- package/dist/dts/anchor-button/anchor-button.d.ts +144 -26
- package/dist/dts/anchor-button/anchor-button.definition.d.ts +0 -3
- package/dist/dts/anchor-button/anchor-button.options.d.ts +43 -5
- package/dist/dts/anchor-button/anchor-button.template.d.ts +7 -2
- package/dist/dts/anchor-button/index.d.ts +4 -3
- package/dist/dts/avatar/avatar.bench.d.ts +3 -0
- package/dist/dts/avatar/avatar.d.ts +22 -2
- package/dist/dts/avatar/avatar.options.d.ts +7 -7
- package/dist/dts/avatar/index.d.ts +2 -2
- package/dist/dts/badge/badge.bench.d.ts +3 -0
- package/dist/dts/badge/badge.d.ts +1 -1
- package/dist/dts/badge/badge.definition.d.ts +0 -3
- package/dist/dts/badge/badge.options.d.ts +7 -7
- package/dist/dts/badge/index.d.ts +2 -2
- package/dist/dts/button/button.bench.d.ts +3 -0
- package/dist/dts/button/button.d.ts +243 -22
- package/dist/dts/button/button.definition.d.ts +2 -3
- package/dist/dts/button/button.options.d.ts +42 -6
- package/dist/dts/button/button.styles.d.ts +9 -0
- package/dist/dts/button/button.template.d.ts +8 -0
- package/dist/dts/button/index.d.ts +5 -4
- package/dist/dts/checkbox/checkbox.bench.d.ts +3 -0
- package/dist/dts/checkbox/checkbox.d.ts +282 -16
- package/dist/dts/checkbox/checkbox.options.d.ts +15 -12
- package/dist/dts/checkbox/checkbox.template.d.ts +7 -1
- package/dist/dts/checkbox/index.d.ts +4 -3
- package/dist/dts/compound-button/compound-button.bench.d.ts +3 -0
- package/dist/dts/compound-button/compound-button.definition.d.ts +0 -3
- package/dist/dts/compound-button/compound-button.options.d.ts +9 -9
- package/dist/dts/compound-button/index.d.ts +2 -2
- package/dist/dts/counter-badge/counter-badge.bench.d.ts +3 -0
- package/dist/dts/counter-badge/counter-badge.d.ts +1 -1
- package/dist/dts/counter-badge/counter-badge.definition.d.ts +0 -4
- package/dist/dts/counter-badge/counter-badge.options.d.ts +6 -6
- package/dist/dts/counter-badge/index.d.ts +2 -2
- package/dist/dts/dialog/define.d.ts +1 -0
- package/dist/dts/dialog/dialog.bench.d.ts +3 -0
- package/dist/dts/dialog/dialog.d.ts +58 -0
- package/dist/dts/dialog/dialog.definition.d.ts +9 -0
- package/dist/dts/dialog/dialog.options.d.ts +11 -0
- package/dist/dts/dialog/dialog.styles.d.ts +4 -0
- package/dist/dts/dialog/dialog.template.d.ts +7 -0
- package/dist/dts/dialog/index.d.ts +5 -0
- package/dist/dts/dialog-body/define.d.ts +1 -0
- package/dist/dts/dialog-body/dialog-body.bench.d.ts +3 -0
- package/dist/dts/dialog-body/dialog-body.d.ts +14 -0
- package/dist/dts/dialog-body/dialog-body.definition.d.ts +9 -0
- package/dist/dts/dialog-body/dialog-body.styles.d.ts +4 -0
- package/dist/dts/dialog-body/dialog-body.template.d.ts +6 -0
- package/dist/dts/dialog-body/index.d.ts +4 -0
- package/dist/dts/divider/divider.bench.d.ts +3 -0
- package/dist/dts/divider/divider.d.ts +47 -11
- package/dist/dts/divider/divider.options.d.ts +32 -8
- package/dist/dts/divider/divider.template.d.ts +1 -0
- package/dist/dts/divider/index.d.ts +2 -2
- package/dist/dts/field/define.d.ts +1 -0
- package/dist/dts/field/field.bench.d.ts +3 -0
- package/dist/dts/field/field.d.ts +99 -0
- package/dist/dts/field/field.definition.d.ts +9 -0
- package/dist/dts/field/field.options.d.ts +41 -0
- package/dist/dts/field/field.styles.d.ts +6 -0
- package/dist/dts/field/field.template.d.ts +6 -0
- package/dist/dts/field/index.d.ts +6 -0
- package/dist/dts/form-associated/form-associated.d.ts +104 -0
- package/dist/dts/image/image.bench.d.ts +3 -0
- package/dist/dts/image/image.options.d.ts +3 -3
- package/dist/dts/image/index.d.ts +2 -2
- package/dist/dts/index-rollup.d.ts +32 -1
- package/dist/dts/index.d.ts +53 -30
- package/dist/dts/label/index.d.ts +2 -1
- package/dist/dts/label/label.bench.d.ts +3 -0
- package/dist/dts/label/label.d.ts +0 -2
- package/dist/dts/label/label.options.d.ts +3 -3
- package/dist/dts/link/define.d.ts +1 -0
- package/dist/dts/link/index.d.ts +4 -0
- package/dist/dts/link/link.bench.d.ts +3 -0
- package/dist/dts/link/link.d.ts +33 -0
- package/dist/dts/link/link.definition.d.ts +7 -0
- package/dist/dts/link/link.options.d.ts +52 -0
- package/dist/dts/link/link.styles.d.ts +1 -0
- package/dist/dts/link/link.template.d.ts +12 -0
- package/dist/dts/menu/index.d.ts +1 -1
- package/dist/dts/menu/menu.bench.d.ts +3 -0
- package/dist/dts/menu/menu.d.ts +27 -25
- package/dist/dts/menu-button/index.d.ts +4 -3
- package/dist/dts/menu-button/menu-button.bench.d.ts +3 -0
- package/dist/dts/menu-button/menu-button.definition.d.ts +0 -3
- package/dist/dts/menu-button/menu-button.options.d.ts +6 -6
- package/dist/dts/menu-item/index.d.ts +5 -3
- package/dist/dts/menu-item/menu-item.bench.d.ts +3 -0
- package/dist/dts/menu-item/menu-item.d.ts +162 -5
- package/dist/dts/menu-item/menu-item.definition.d.ts +0 -4
- package/dist/dts/menu-item/menu-item.options.d.ts +30 -0
- package/dist/dts/menu-item/menu-item.template.d.ts +2 -1
- package/dist/dts/menu-list/index.d.ts +1 -1
- package/dist/dts/menu-list/menu-list.bench.d.ts +3 -0
- package/dist/dts/menu-list/menu-list.d.ts +71 -4
- package/dist/dts/menu-list/menu-list.definition.d.ts +0 -4
- package/dist/dts/menu-list/menu-list.template.d.ts +1 -0
- package/dist/dts/patterns/aria-globals.d.ts +189 -0
- package/dist/dts/patterns/index.d.ts +2 -0
- package/dist/dts/patterns/start-end.d.ts +44 -0
- package/dist/dts/progress-bar/index.d.ts +2 -2
- package/dist/dts/progress-bar/progress-bar.bench.d.ts +3 -0
- package/dist/dts/progress-bar/progress-bar.d.ts +60 -10
- package/dist/dts/progress-bar/progress-bar.options.d.ts +4 -4
- package/dist/dts/progress-bar/progress-bar.template.d.ts +1 -0
- package/dist/dts/radio/index.d.ts +2 -1
- package/dist/dts/radio/radio.bench.d.ts +3 -0
- package/dist/dts/radio/radio.d.ts +54 -3
- package/dist/dts/radio/radio.form-associated.d.ts +14 -0
- package/dist/dts/radio/radio.template.d.ts +2 -1
- package/dist/dts/radio-group/index.d.ts +2 -2
- package/dist/dts/radio-group/radio-group.bench.d.ts +3 -0
- package/dist/dts/radio-group/radio-group.d.ts +91 -2
- package/dist/dts/radio-group/radio-group.options.d.ts +17 -0
- package/dist/dts/radio-group/radio-group.template.d.ts +1 -0
- package/dist/dts/slider/index.d.ts +3 -2
- package/dist/dts/slider/slider-utilities.d.ts +5 -0
- package/dist/dts/slider/slider.bench.d.ts +3 -0
- package/dist/dts/slider/slider.d.ts +195 -5
- package/dist/dts/slider/slider.form-associated.d.ts +14 -0
- package/dist/dts/slider/slider.options.d.ts +44 -3
- package/dist/dts/slider/slider.template.d.ts +4 -2
- package/dist/dts/spinner/index.d.ts +2 -2
- package/dist/dts/spinner/spinner.bench.d.ts +3 -0
- package/dist/dts/spinner/spinner.d.ts +9 -4
- package/dist/dts/spinner/spinner.definition.d.ts +0 -4
- package/dist/dts/spinner/spinner.options.d.ts +3 -3
- package/dist/dts/spinner/spinner.template.d.ts +1 -2
- package/dist/dts/styles/partials/index.d.ts +1 -0
- package/dist/dts/styles/partials/typography.partials.d.ts +18 -0
- package/dist/dts/switch/index.d.ts +3 -2
- package/dist/dts/switch/switch.bench.d.ts +3 -0
- package/dist/dts/switch/switch.d.ts +6 -12
- package/dist/dts/switch/switch.form-associated.d.ts +14 -0
- package/dist/dts/switch/switch.options.d.ts +2 -2
- package/dist/dts/switch/switch.template.d.ts +2 -1
- package/dist/dts/tab/index.d.ts +4 -3
- package/dist/dts/tab/tab.bench.d.ts +3 -0
- package/dist/dts/tab/tab.d.ts +17 -2
- package/dist/dts/tab/tab.template.d.ts +3 -3
- package/dist/dts/tab-panel/index.d.ts +1 -1
- package/dist/dts/tab-panel/tab-panel.bench.d.ts +3 -0
- package/dist/dts/tab-panel/tab-panel.d.ts +2 -2
- package/dist/dts/tab-panel/tab-panel.template.d.ts +4 -1
- package/dist/dts/tabs/index.d.ts +5 -4
- package/dist/dts/tabs/tabs.bench.d.ts +3 -0
- package/dist/dts/tabs/tabs.d.ts +102 -13
- package/dist/dts/tabs/tabs.options.d.ts +23 -5
- package/dist/dts/tabs/tabs.template.d.ts +5 -1
- package/dist/dts/text/index.d.ts +2 -2
- package/dist/dts/text/text.bench.d.ts +3 -0
- package/dist/dts/text/text.options.d.ts +5 -5
- package/dist/dts/text-input/index.d.ts +5 -5
- package/dist/dts/text-input/text-input.bench.d.ts +3 -0
- package/dist/dts/text-input/text-input.d.ts +395 -11
- package/dist/dts/text-input/text-input.definition.d.ts +2 -3
- package/dist/dts/text-input/text-input.options.d.ts +31 -10
- package/dist/dts/text-input/text-input.styles.d.ts +5 -2
- package/dist/dts/text-input/text-input.template.d.ts +8 -1
- package/dist/dts/theme/design-tokens.d.ts +2180 -384
- package/dist/dts/theme/set-theme.d.ts +6 -3
- package/dist/dts/toggle-button/index.d.ts +5 -4
- package/dist/dts/toggle-button/toggle-button.bench.d.ts +3 -0
- package/dist/dts/toggle-button/toggle-button.d.ts +29 -26
- package/dist/dts/toggle-button/toggle-button.definition.d.ts +0 -2
- package/dist/dts/toggle-button/toggle-button.options.d.ts +6 -6
- package/dist/dts/toggle-button/toggle-button.styles.d.ts +7 -0
- package/dist/dts/utils/behaviors/match-media-stylesheet-behavior.d.ts +124 -0
- package/dist/dts/utils/benchmark-dependencies/tokens.d.ts +1 -0
- package/dist/dts/utils/benchmark-wrapper.d.ts +2 -0
- package/dist/dts/utils/direction.d.ts +10 -0
- package/dist/dts/utils/display.d.ts +17 -0
- package/dist/dts/utils/element-internals.d.ts +20 -0
- package/dist/dts/utils/index.d.ts +6 -0
- package/dist/dts/utils/template-helpers.d.ts +16 -0
- package/dist/dts/utils/typings.d.ts +6 -0
- package/dist/dts/utils/whitespace-filter.d.ts +12 -0
- package/dist/esm/accordion/accordion.bench.js +30 -0
- package/dist/esm/accordion/accordion.bench.js.map +1 -0
- package/dist/esm/accordion/accordion.definition.js +0 -4
- package/dist/esm/accordion/accordion.definition.js.map +1 -1
- package/dist/esm/accordion/accordion.js +211 -3
- package/dist/esm/accordion/accordion.js.map +1 -1
- package/dist/esm/accordion/accordion.options.js +9 -0
- package/dist/esm/accordion/accordion.options.js.map +1 -0
- package/dist/esm/accordion/accordion.styles.js +1 -1
- package/dist/esm/accordion/accordion.styles.js.map +1 -1
- package/dist/esm/accordion/accordion.template.js +11 -1
- package/dist/esm/accordion/accordion.template.js.map +1 -1
- package/dist/esm/accordion/index.js +2 -1
- package/dist/esm/accordion/index.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.bench.js +14 -0
- package/dist/esm/accordion-item/accordion-item.bench.js.map +1 -0
- package/dist/esm/accordion-item/accordion-item.definition.js +0 -3
- package/dist/esm/accordion-item/accordion-item.definition.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.js +80 -10
- package/dist/esm/accordion-item/accordion-item.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.styles.js +1 -1
- package/dist/esm/accordion-item/accordion-item.styles.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.template.js +47 -2
- package/dist/esm/accordion-item/accordion-item.template.js.map +1 -1
- package/dist/esm/accordion-item/index.js +2 -2
- package/dist/esm/accordion-item/index.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.bench.js +11 -0
- package/dist/esm/anchor-button/anchor-button.bench.js.map +1 -0
- package/dist/esm/anchor-button/anchor-button.definition.js +0 -6
- package/dist/esm/anchor-button/anchor-button.definition.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.js +123 -64
- package/dist/esm/anchor-button/anchor-button.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.options.js +26 -0
- package/dist/esm/anchor-button/anchor-button.options.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.styles.js +8 -8
- package/dist/esm/anchor-button/anchor-button.styles.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.template.js +21 -1
- package/dist/esm/anchor-button/anchor-button.template.js.map +1 -1
- package/dist/esm/anchor-button/index.js +3 -3
- package/dist/esm/anchor-button/index.js.map +1 -1
- package/dist/esm/avatar/avatar.bench.js +10 -0
- package/dist/esm/avatar/avatar.bench.js.map +1 -0
- package/dist/esm/avatar/avatar.js +43 -23
- package/dist/esm/avatar/avatar.js.map +1 -1
- package/dist/esm/avatar/avatar.styles.js +36 -36
- package/dist/esm/avatar/avatar.styles.js.map +1 -1
- package/dist/esm/avatar/avatar.template.js +2 -4
- package/dist/esm/avatar/avatar.template.js.map +1 -1
- package/dist/esm/avatar/index.js +2 -2
- package/dist/esm/avatar/index.js.map +1 -1
- package/dist/esm/badge/badge.bench.js +11 -0
- package/dist/esm/badge/badge.bench.js.map +1 -0
- package/dist/esm/badge/badge.definition.js +0 -3
- package/dist/esm/badge/badge.definition.js.map +1 -1
- package/dist/esm/badge/badge.js +2 -7
- package/dist/esm/badge/badge.js.map +1 -1
- package/dist/esm/badge/badge.styles.js +8 -1
- package/dist/esm/badge/badge.styles.js.map +1 -1
- package/dist/esm/badge/badge.template.js +2 -2
- package/dist/esm/badge/badge.template.js.map +1 -1
- package/dist/esm/badge/index.js +2 -2
- package/dist/esm/badge/index.js.map +1 -1
- package/dist/esm/button/button.bench.js +11 -0
- package/dist/esm/button/button.bench.js.map +1 -0
- package/dist/esm/button/button.definition.js +2 -6
- package/dist/esm/button/button.definition.js.map +1 -1
- package/dist/esm/button/button.js +264 -42
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/button/button.options.js +20 -0
- package/dist/esm/button/button.options.js.map +1 -1
- package/dist/esm/button/button.styles.js +79 -70
- package/dist/esm/button/button.styles.js.map +1 -1
- package/dist/esm/button/button.template.js +23 -1
- package/dist/esm/button/button.template.js.map +1 -1
- package/dist/esm/button/index.js +4 -4
- package/dist/esm/button/index.js.map +1 -1
- package/dist/esm/checkbox/checkbox.bench.js +11 -0
- package/dist/esm/checkbox/checkbox.bench.js.map +1 -0
- package/dist/esm/checkbox/checkbox.definition.js +1 -1
- package/dist/esm/checkbox/checkbox.definition.js.map +1 -1
- package/dist/esm/checkbox/checkbox.js +371 -13
- package/dist/esm/checkbox/checkbox.js.map +1 -1
- package/dist/esm/checkbox/checkbox.options.js +0 -8
- package/dist/esm/checkbox/checkbox.options.js.map +1 -1
- package/dist/esm/checkbox/checkbox.styles.js +145 -123
- package/dist/esm/checkbox/checkbox.styles.js.map +1 -1
- package/dist/esm/checkbox/checkbox.template.js +34 -17
- package/dist/esm/checkbox/checkbox.template.js.map +1 -1
- package/dist/esm/checkbox/index.js +3 -3
- package/dist/esm/checkbox/index.js.map +1 -1
- package/dist/esm/compound-button/compound-button.bench.js +15 -0
- package/dist/esm/compound-button/compound-button.bench.js.map +1 -0
- package/dist/esm/compound-button/compound-button.definition.js +0 -6
- package/dist/esm/compound-button/compound-button.definition.js.map +1 -1
- package/dist/esm/compound-button/compound-button.options.js.map +1 -1
- package/dist/esm/compound-button/compound-button.styles.js +7 -7
- package/dist/esm/compound-button/compound-button.template.js +4 -40
- package/dist/esm/compound-button/compound-button.template.js.map +1 -1
- package/dist/esm/compound-button/index.js +2 -2
- package/dist/esm/compound-button/index.js.map +1 -1
- package/dist/esm/counter-badge/counter-badge.bench.js +11 -0
- package/dist/esm/counter-badge/counter-badge.bench.js.map +1 -0
- package/dist/esm/counter-badge/counter-badge.definition.js +0 -4
- package/dist/esm/counter-badge/counter-badge.definition.js.map +1 -1
- package/dist/esm/counter-badge/counter-badge.js +2 -7
- package/dist/esm/counter-badge/counter-badge.js.map +1 -1
- package/dist/esm/counter-badge/index.js +2 -2
- package/dist/esm/counter-badge/index.js.map +1 -1
- package/dist/esm/dialog/define.js +4 -0
- package/dist/esm/dialog/define.js.map +1 -0
- package/dist/esm/dialog/dialog.bench.js +11 -0
- package/dist/esm/dialog/dialog.bench.js.map +1 -0
- package/dist/esm/dialog/dialog.definition.js +17 -0
- package/dist/esm/dialog/dialog.definition.js.map +1 -0
- package/dist/esm/dialog/dialog.js +91 -0
- package/dist/esm/dialog/dialog.js.map +1 -0
- package/dist/esm/dialog/dialog.options.js +10 -0
- package/dist/esm/dialog/dialog.options.js.map +1 -0
- package/dist/esm/dialog/dialog.styles.js +86 -0
- package/dist/esm/dialog/dialog.styles.js.map +1 -0
- package/dist/esm/dialog/dialog.template.js +24 -0
- package/dist/esm/dialog/dialog.template.js.map +1 -0
- package/dist/esm/dialog/index.js +6 -0
- package/dist/esm/dialog/index.js.map +1 -0
- package/dist/esm/dialog-body/define.js +4 -0
- package/dist/esm/dialog-body/define.js.map +1 -0
- package/dist/esm/dialog-body/dialog-body.bench.js +11 -0
- package/dist/esm/dialog-body/dialog-body.bench.js.map +1 -0
- package/dist/esm/dialog-body/dialog-body.definition.js +17 -0
- package/dist/esm/dialog-body/dialog-body.definition.js.map +1 -0
- package/dist/esm/dialog-body/dialog-body.js +22 -0
- package/dist/esm/dialog-body/dialog-body.js.map +1 -0
- package/dist/esm/dialog-body/dialog-body.styles.js +79 -0
- package/dist/esm/dialog-body/dialog-body.styles.js.map +1 -0
- package/dist/esm/dialog-body/dialog-body.template.js +42 -0
- package/dist/esm/dialog-body/dialog-body.template.js.map +1 -0
- package/dist/esm/dialog-body/index.js +5 -0
- package/dist/esm/dialog-body/index.js.map +1 -0
- package/dist/esm/divider/divider.bench.js +10 -0
- package/dist/esm/divider/divider.bench.js.map +1 -0
- package/dist/esm/divider/divider.js +56 -11
- package/dist/esm/divider/divider.js.map +1 -1
- package/dist/esm/divider/divider.options.js +14 -5
- package/dist/esm/divider/divider.options.js.map +1 -1
- package/dist/esm/divider/divider.styles.js +1 -1
- package/dist/esm/divider/divider.styles.js.map +1 -1
- package/dist/esm/divider/divider.template.js +4 -1
- package/dist/esm/divider/divider.template.js.map +1 -1
- package/dist/esm/divider/index.js +2 -2
- package/dist/esm/divider/index.js.map +1 -1
- package/dist/esm/field/define.js +4 -0
- package/dist/esm/field/define.js.map +1 -0
- package/dist/esm/field/field.bench.js +10 -0
- package/dist/esm/field/field.bench.js.map +1 -0
- package/dist/esm/field/field.definition.js +20 -0
- package/dist/esm/field/field.definition.js.map +1 -0
- package/dist/esm/field/field.js +139 -0
- package/dist/esm/field/field.js.map +1 -0
- package/dist/esm/field/field.options.js +27 -0
- package/dist/esm/field/field.options.js.map +1 -0
- package/dist/esm/field/field.styles.js +186 -0
- package/dist/esm/field/field.styles.js.map +1 -0
- package/dist/esm/field/field.template.js +26 -0
- package/dist/esm/field/field.template.js.map +1 -0
- package/dist/esm/field/index.js +6 -0
- package/dist/esm/field/index.js.map +1 -0
- package/dist/esm/form-associated/form-associated.js +458 -0
- package/dist/esm/form-associated/form-associated.js.map +1 -0
- package/dist/esm/image/image.bench.js +14 -0
- package/dist/esm/image/image.bench.js.map +1 -0
- package/dist/esm/image/image.js +1 -6
- package/dist/esm/image/image.js.map +1 -1
- package/dist/esm/image/index.js +2 -2
- package/dist/esm/image/index.js.map +1 -1
- package/dist/esm/index-rollup.js +32 -1
- package/dist/esm/index-rollup.js.map +1 -1
- package/dist/esm/index.js +39 -30
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/label/index.js +2 -1
- package/dist/esm/label/index.js.map +1 -1
- package/dist/esm/label/label.bench.js +11 -0
- package/dist/esm/label/label.bench.js.map +1 -0
- package/dist/esm/label/label.js +1 -6
- package/dist/esm/label/label.js.map +1 -1
- package/dist/esm/label/label.styles.js +13 -6
- package/dist/esm/label/label.styles.js.map +1 -1
- package/dist/esm/link/define.js +4 -0
- package/dist/esm/link/define.js.map +1 -0
- package/dist/esm/link/index.js +5 -0
- package/dist/esm/link/index.js.map +1 -0
- package/dist/esm/link/link.bench.js +11 -0
- package/dist/esm/link/link.bench.js.map +1 -0
- package/dist/esm/link/link.definition.js +15 -0
- package/dist/esm/link/link.definition.js.map +1 -0
- package/dist/esm/link/link.js +36 -0
- package/dist/esm/link/link.js.map +1 -0
- package/dist/esm/link/link.options.js +21 -0
- package/dist/esm/link/link.options.js.map +1 -0
- package/dist/esm/link/link.styles.js +67 -0
- package/dist/esm/link/link.styles.js.map +1 -0
- package/dist/esm/link/link.template.js +22 -0
- package/dist/esm/link/link.template.js.map +1 -0
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/menu/index.js.map +1 -1
- package/dist/esm/menu/menu.bench.js +31 -0
- package/dist/esm/menu/menu.bench.js.map +1 -0
- package/dist/esm/menu/menu.js +26 -29
- package/dist/esm/menu/menu.js.map +1 -1
- package/dist/esm/menu-button/index.js +3 -3
- package/dist/esm/menu-button/index.js.map +1 -1
- package/dist/esm/menu-button/menu-button.bench.js +11 -0
- package/dist/esm/menu-button/menu-button.bench.js.map +1 -0
- package/dist/esm/menu-button/menu-button.definition.js +0 -6
- package/dist/esm/menu-button/menu-button.definition.js.map +1 -1
- package/dist/esm/menu-button/menu-button.options.js.map +1 -1
- package/dist/esm/menu-button/menu-button.template.js +6 -2
- package/dist/esm/menu-button/menu-button.template.js.map +1 -1
- package/dist/esm/menu-item/index.js +4 -3
- package/dist/esm/menu-item/index.js.map +1 -1
- package/dist/esm/menu-item/menu-item.bench.js +11 -0
- package/dist/esm/menu-item/menu-item.bench.js.map +1 -0
- package/dist/esm/menu-item/menu-item.definition.js +0 -4
- package/dist/esm/menu-item/menu-item.definition.js.map +1 -1
- package/dist/esm/menu-item/menu-item.js +265 -4
- package/dist/esm/menu-item/menu-item.js.map +1 -1
- package/dist/esm/menu-item/menu-item.options.js +27 -0
- package/dist/esm/menu-item/menu-item.options.js.map +1 -0
- package/dist/esm/menu-item/menu-item.styles.js +1 -1
- package/dist/esm/menu-item/menu-item.styles.js.map +1 -1
- package/dist/esm/menu-item/menu-item.template.js +57 -2
- package/dist/esm/menu-item/menu-item.template.js.map +1 -1
- package/dist/esm/menu-list/index.js +1 -1
- package/dist/esm/menu-list/index.js.map +1 -1
- package/dist/esm/menu-list/menu-list.bench.js +21 -0
- package/dist/esm/menu-list/menu-list.bench.js.map +1 -0
- package/dist/esm/menu-list/menu-list.definition.js +0 -4
- package/dist/esm/menu-list/menu-list.definition.js.map +1 -1
- package/dist/esm/menu-list/menu-list.js +262 -11
- package/dist/esm/menu-list/menu-list.js.map +1 -1
- package/dist/esm/menu-list/menu-list.styles.js +1 -1
- package/dist/esm/menu-list/menu-list.styles.js.map +1 -1
- package/dist/esm/menu-list/menu-list.template.js +13 -1
- package/dist/esm/menu-list/menu-list.template.js.map +1 -1
- package/dist/esm/patterns/aria-globals.js +72 -0
- package/dist/esm/patterns/aria-globals.js.map +1 -0
- package/dist/esm/patterns/index.js +3 -0
- package/dist/esm/patterns/index.js.map +1 -0
- package/dist/esm/patterns/start-end.js +29 -0
- package/dist/esm/patterns/start-end.js.map +1 -0
- package/dist/esm/progress-bar/index.js +2 -2
- package/dist/esm/progress-bar/index.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.bench.js +10 -0
- package/dist/esm/progress-bar/progress-bar.bench.js.map +1 -0
- package/dist/esm/progress-bar/progress-bar.js +66 -13
- package/dist/esm/progress-bar/progress-bar.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.options.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.styles.js +49 -128
- package/dist/esm/progress-bar/progress-bar.styles.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.template.js +11 -5
- package/dist/esm/progress-bar/progress-bar.template.js.map +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/radio/index.js.map +1 -1
- package/dist/esm/radio/radio.bench.js +11 -0
- package/dist/esm/radio/radio.bench.js.map +1 -0
- package/dist/esm/radio/radio.form-associated.js +14 -0
- package/dist/esm/radio/radio.form-associated.js.map +1 -0
- package/dist/esm/radio/radio.js +91 -3
- package/dist/esm/radio/radio.js.map +1 -1
- package/dist/esm/radio/radio.styles.js +1 -1
- package/dist/esm/radio/radio.styles.js.map +1 -1
- package/dist/esm/radio/radio.template.js +28 -2
- package/dist/esm/radio/radio.template.js.map +1 -1
- package/dist/esm/radio-group/index.js +2 -2
- package/dist/esm/radio-group/index.js.map +1 -1
- package/dist/esm/radio-group/radio-group.bench.js +21 -0
- package/dist/esm/radio-group/radio-group.bench.js.map +1 -0
- package/dist/esm/radio-group/radio-group.js +347 -9
- package/dist/esm/radio-group/radio-group.js.map +1 -1
- package/dist/esm/radio-group/radio-group.options.js +7 -0
- package/dist/esm/radio-group/radio-group.options.js.map +1 -0
- package/dist/esm/radio-group/radio-group.styles.js +1 -1
- package/dist/esm/radio-group/radio-group.styles.js.map +1 -1
- package/dist/esm/radio-group/radio-group.template.js +30 -1
- package/dist/esm/radio-group/radio-group.template.js.map +1 -1
- package/dist/esm/slider/index.js +2 -2
- package/dist/esm/slider/index.js.map +1 -1
- package/dist/esm/slider/slider-utilities.js +12 -0
- package/dist/esm/slider/slider-utilities.js.map +1 -0
- package/dist/esm/slider/slider.bench.js +10 -0
- package/dist/esm/slider/slider.bench.js.map +1 -0
- package/dist/esm/slider/slider.form-associated.js +14 -0
- package/dist/esm/slider/slider.form-associated.js.map +1 -0
- package/dist/esm/slider/slider.js +433 -22
- package/dist/esm/slider/slider.js.map +1 -1
- package/dist/esm/slider/slider.options.js +11 -1
- package/dist/esm/slider/slider.options.js.map +1 -1
- package/dist/esm/slider/slider.styles.js +1 -1
- package/dist/esm/slider/slider.styles.js.map +1 -1
- package/dist/esm/slider/slider.template.js +39 -2
- package/dist/esm/slider/slider.template.js.map +1 -1
- package/dist/esm/spinner/index.js +2 -2
- package/dist/esm/spinner/index.js.map +1 -1
- package/dist/esm/spinner/spinner.bench.js +10 -0
- package/dist/esm/spinner/spinner.bench.js.map +1 -0
- package/dist/esm/spinner/spinner.definition.js +0 -4
- package/dist/esm/spinner/spinner.definition.js.map +1 -1
- package/dist/esm/spinner/spinner.js +13 -9
- package/dist/esm/spinner/spinner.js.map +1 -1
- package/dist/esm/spinner/spinner.styles.js +3 -17
- package/dist/esm/spinner/spinner.styles.js.map +1 -1
- package/dist/esm/spinner/spinner.template.js +8 -21
- package/dist/esm/spinner/spinner.template.js.map +1 -1
- package/dist/esm/styles/partials/badge.partials.js +1 -1
- package/dist/esm/styles/partials/badge.partials.js.map +1 -1
- package/dist/esm/styles/partials/index.js +1 -0
- package/dist/esm/styles/partials/index.js.map +1 -1
- package/dist/esm/styles/partials/typography.partials.js +105 -0
- package/dist/esm/styles/partials/typography.partials.js.map +1 -0
- package/dist/esm/switch/index.js +2 -2
- package/dist/esm/switch/index.js.map +1 -1
- package/dist/esm/switch/switch.bench.js +11 -0
- package/dist/esm/switch/switch.bench.js.map +1 -0
- package/dist/esm/switch/switch.form-associated.js +14 -0
- package/dist/esm/switch/switch.form-associated.js.map +1 -0
- package/dist/esm/switch/switch.js +2 -12
- package/dist/esm/switch/switch.js.map +1 -1
- package/dist/esm/switch/switch.styles.js +38 -58
- package/dist/esm/switch/switch.styles.js.map +1 -1
- package/dist/esm/switch/switch.template.js +15 -1
- package/dist/esm/switch/switch.template.js.map +1 -1
- package/dist/esm/tab/index.js +3 -3
- package/dist/esm/tab/index.js.map +1 -1
- package/dist/esm/tab/tab.bench.js +11 -0
- package/dist/esm/tab/tab.bench.js.map +1 -0
- package/dist/esm/tab/tab.js +9 -3
- package/dist/esm/tab/tab.js.map +1 -1
- package/dist/esm/tab/tab.styles.js +1 -1
- package/dist/esm/tab/tab.styles.js.map +1 -1
- package/dist/esm/tab/tab.template.js +1 -1
- package/dist/esm/tab/tab.template.js.map +1 -1
- package/dist/esm/tab-panel/index.js +1 -1
- package/dist/esm/tab-panel/index.js.map +1 -1
- package/dist/esm/tab-panel/tab-panel.bench.js +13 -0
- package/dist/esm/tab-panel/tab-panel.bench.js.map +1 -0
- package/dist/esm/tab-panel/tab-panel.js +2 -2
- package/dist/esm/tab-panel/tab-panel.js.map +1 -1
- package/dist/esm/tab-panel/tab-panel.styles.js +1 -1
- package/dist/esm/tab-panel/tab-panel.styles.js.map +1 -1
- package/dist/esm/tab-panel/tab-panel.template.js +8 -1
- package/dist/esm/tab-panel/tab-panel.template.js.map +1 -1
- package/dist/esm/tabs/index.js +4 -4
- package/dist/esm/tabs/index.js.map +1 -1
- package/dist/esm/tabs/tabs.bench.js +32 -0
- package/dist/esm/tabs/tabs.bench.js.map +1 -0
- package/dist/esm/tabs/tabs.js +292 -20
- package/dist/esm/tabs/tabs.js.map +1 -1
- package/dist/esm/tabs/tabs.options.js +6 -2
- package/dist/esm/tabs/tabs.options.js.map +1 -1
- package/dist/esm/tabs/tabs.styles.js +1 -1
- package/dist/esm/tabs/tabs.styles.js.map +1 -1
- package/dist/esm/tabs/tabs.template.js +14 -1
- package/dist/esm/tabs/tabs.template.js.map +1 -1
- package/dist/esm/text/index.js +2 -2
- package/dist/esm/text/index.js.map +1 -1
- package/dist/esm/text/text.bench.js +13 -0
- package/dist/esm/text/text.bench.js.map +1 -0
- package/dist/esm/text/text.js +1 -6
- package/dist/esm/text/text.js.map +1 -1
- package/dist/esm/text/text.styles.js +49 -25
- package/dist/esm/text/text.styles.js.map +1 -1
- package/dist/esm/text-input/index.js +4 -5
- package/dist/esm/text-input/index.js.map +1 -1
- package/dist/esm/text-input/text-input.bench.js +10 -0
- package/dist/esm/text-input/text-input.bench.js.map +1 -0
- package/dist/esm/text-input/text-input.definition.js +5 -3
- package/dist/esm/text-input/text-input.definition.js.map +1 -1
- package/dist/esm/text-input/text-input.js +398 -11
- package/dist/esm/text-input/text-input.js.map +1 -1
- package/dist/esm/text-input/text-input.options.js +35 -2
- package/dist/esm/text-input/text-input.options.js.map +1 -1
- package/dist/esm/text-input/text-input.styles.js +22 -12
- package/dist/esm/text-input/text-input.styles.js.map +1 -1
- package/dist/esm/text-input/text-input.template.js +55 -2
- package/dist/esm/text-input/text-input.template.js.map +1 -1
- package/dist/esm/theme/design-tokens.js +2181 -386
- package/dist/esm/theme/design-tokens.js.map +1 -1
- package/dist/esm/theme/set-theme.js +26 -3
- package/dist/esm/theme/set-theme.js.map +1 -1
- package/dist/esm/toggle-button/index.js +4 -4
- package/dist/esm/toggle-button/index.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.bench.js +11 -0
- package/dist/esm/toggle-button/toggle-button.bench.js.map +1 -0
- package/dist/esm/toggle-button/toggle-button.definition.js +0 -5
- package/dist/esm/toggle-button/toggle-button.definition.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.js +43 -91
- package/dist/esm/toggle-button/toggle-button.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.options.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.styles.js +31 -26
- package/dist/esm/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.template.js +1 -1
- package/dist/esm/toggle-button/toggle-button.template.js.map +1 -1
- package/dist/esm/utils/behaviors/match-media-stylesheet-behavior.js +142 -0
- package/dist/esm/utils/behaviors/match-media-stylesheet-behavior.js.map +1 -0
- package/dist/esm/utils/benchmark-dependencies/tokens.js +2 -0
- package/dist/esm/utils/benchmark-dependencies/tokens.js.map +1 -0
- package/dist/esm/utils/benchmark-wrapper.js +18 -0
- package/dist/esm/utils/benchmark-wrapper.js.map +1 -0
- package/dist/esm/utils/direction.js +15 -0
- package/dist/esm/utils/direction.js.map +1 -0
- package/dist/esm/utils/display.js +15 -0
- package/dist/esm/utils/display.js.map +1 -0
- package/dist/esm/utils/element-internals.js +32 -0
- package/dist/esm/utils/element-internals.js.map +1 -0
- package/dist/esm/utils/get-initials.js.map +1 -1
- package/dist/esm/utils/index.js +7 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/template-helpers.js +19 -0
- package/dist/esm/utils/template-helpers.js.map +1 -0
- package/dist/esm/utils/typings.js +3 -0
- package/dist/esm/utils/typings.js.map +1 -0
- package/dist/esm/utils/whitespace-filter.js +13 -0
- package/dist/esm/utils/whitespace-filter.js.map +1 -0
- package/dist/web-components.d.ts +6220 -1635
- package/dist/web-components.js +5383 -6596
- package/dist/web-components.min.js +337 -191
- package/package.json +40 -13
- package/dist/fluent-web-components.api.json +0 -19686
- package/dist/storybook/108.78b731e00015540915a8.manager.bundle.js +0 -1
- package/dist/storybook/108.b31ec3a1.iframe.bundle.js +0 -1
- package/dist/storybook/316.bc4aabd3.iframe.bundle.js +0 -2
- package/dist/storybook/316.bc4aabd3.iframe.bundle.js.LICENSE.txt +0 -17
- package/dist/storybook/401.7edec720.iframe.bundle.js +0 -2
- package/dist/storybook/401.7edec720.iframe.bundle.js.LICENSE.txt +0 -12
- package/dist/storybook/401.c9bdfaf0dda8b194127f.manager.bundle.js +0 -2
- package/dist/storybook/401.c9bdfaf0dda8b194127f.manager.bundle.js.LICENSE.txt +0 -12
- package/dist/storybook/491.77b24750.iframe.bundle.js +0 -1
- package/dist/storybook/591.f5bf0d78d2f203de19f5.manager.bundle.js +0 -2
- package/dist/storybook/591.f5bf0d78d2f203de19f5.manager.bundle.js.LICENSE.txt +0 -94
- package/dist/storybook/677.939f187f.iframe.bundle.js +0 -462
- package/dist/storybook/677.939f187f.iframe.bundle.js.LICENSE.txt +0 -46
- package/dist/storybook/677.939f187f.iframe.bundle.js.map +0 -1
- package/dist/storybook/709.22096ad4.iframe.bundle.js +0 -2
- package/dist/storybook/709.22096ad4.iframe.bundle.js.LICENSE.txt +0 -8
- package/dist/storybook/709.b131e33993a6b94d7ad8.manager.bundle.js +0 -2
- package/dist/storybook/709.b131e33993a6b94d7ad8.manager.bundle.js.LICENSE.txt +0 -8
- package/dist/storybook/721.46fa9f53.iframe.bundle.js +0 -2
- package/dist/storybook/721.46fa9f53.iframe.bundle.js.LICENSE.txt +0 -31
- package/dist/storybook/721.c225c101a0a55a8f98eb.manager.bundle.js +0 -2
- package/dist/storybook/721.c225c101a0a55a8f98eb.manager.bundle.js.LICENSE.txt +0 -31
- package/dist/storybook/858.da40ed98.iframe.bundle.js +0 -1
- package/dist/storybook/858.e08e25a6901d2e21e9d8.manager.bundle.js +0 -1
- package/dist/storybook/950.674e7934b4a26a022608.manager.bundle.js +0 -1
- package/dist/storybook/954.630c5748.iframe.bundle.js +0 -1
- package/dist/storybook/954.7f985e2fdf9f15a7748b.manager.bundle.js +0 -1
- package/dist/storybook/SegoeUI-VF.ttf +0 -0
- package/dist/storybook/favicon.ico +0 -0
- package/dist/storybook/favicon.png +0 -0
- package/dist/storybook/iframe.html +0 -364
- package/dist/storybook/index.html +0 -165
- package/dist/storybook/main.5d7b916dc1e37293b1d8.manager.bundle.js +0 -1
- package/dist/storybook/main.b782e9fb.iframe.bundle.js +0 -2
- package/dist/storybook/main.b782e9fb.iframe.bundle.js.LICENSE.txt +0 -1
- package/dist/storybook/project.json +0 -1
- package/dist/storybook/runtime~main.5d918fe7.iframe.bundle.js +0 -1
- package/dist/storybook/runtime~main.dbf00b470fe610082919.manager.bundle.js +0 -1
- package/dist/storybook/shell.css +0 -83
- package/dist/storybook/theme-switch.ts +0 -13
- package/docs/api-report.md +0 -2427
- package/playwright.config.ts +0 -25
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.bench.js","sourceRoot":"","sources":["../../../src/text/text.bench.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAE/C,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IACnD,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/C,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/esm/text/text.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { attr, FASTElement } from '@microsoft/fast-element';
|
|
8
3
|
/**
|
|
9
4
|
* The base class used for constructing a fluent-text custom element
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/text/text.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/text/text.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG5D;;;GAGG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE;;;;;;;;WAQG;QAEH,WAAM,GAAY,KAAK,CAAC;QAExB;;;;;;WAMG;QAEH,aAAQ,GAAY,KAAK,CAAC;QAE1B;;;;;;WAMG;QAEH,WAAM,GAAY,KAAK,CAAC;QAExB;;;;;;WAMG;QAEH,cAAS,GAAY,KAAK,CAAC;QAE3B;;;;;;WAMG;QAEH,kBAAa,GAAY,KAAK,CAAC;QAE/B;;;;;;WAMG;QAEH,UAAK,GAAY,KAAK,CAAC;IA0CzB,CAAC;CAAA;AA5FC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oCACF;AAUxB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;sCACA;AAU1B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oCACF;AAUxB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;uCACC;AAU3B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;2CACK;AAU/B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;mCACH;AAWvB;IADC,IAAI;kCACW;AAUhB;IADC,IAAI;kCACW;AAUhB;IADC,IAAI;oCACe;AAUpB;IADC,IAAI;mCACa"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { display } from '
|
|
2
|
+
import { display } from '../utils/index.js';
|
|
3
3
|
import { fontFamilyBase, fontFamilyMonospace, fontFamilyNumeric, fontSizeBase100, fontSizeBase200, fontSizeBase300, fontSizeBase400, fontSizeBase500, fontSizeBase600, fontSizeHero1000, fontSizeHero700, fontSizeHero800, fontSizeHero900, fontWeightBold, fontWeightMedium, fontWeightRegular, fontWeightSemibold, lineHeightBase100, lineHeightBase200, lineHeightBase300, lineHeightBase400, lineHeightBase500, lineHeightBase600, lineHeightHero1000, lineHeightHero700, lineHeightHero800, lineHeightHero900, } from '../theme/design-tokens.js';
|
|
4
4
|
/** Text styles
|
|
5
5
|
* @public
|
|
@@ -24,87 +24,111 @@ export const styles = css `
|
|
|
24
24
|
display: inline;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
:host([nowrap]) ::slotted(*)
|
|
27
|
+
:host([nowrap]) ::slotted(*),
|
|
28
|
+
:host([nowrap]) {
|
|
28
29
|
white-space: nowrap;
|
|
29
30
|
overflow: hidden;
|
|
30
31
|
}
|
|
31
|
-
:host([truncate]) ::slotted(*)
|
|
32
|
+
:host([truncate]) ::slotted(*),
|
|
33
|
+
:host([truncate]) {
|
|
32
34
|
text-overflow: ellipsis;
|
|
33
35
|
}
|
|
34
36
|
:host([block]),
|
|
35
|
-
:host([block]) ::slotted(*)
|
|
37
|
+
:host([block]) ::slotted(*),
|
|
38
|
+
:host([block]) {
|
|
36
39
|
display: block;
|
|
37
40
|
}
|
|
38
|
-
:host([italic]) ::slotted(*)
|
|
41
|
+
:host([italic]) ::slotted(*),
|
|
42
|
+
:host([italic]) {
|
|
39
43
|
font-style: italic;
|
|
40
44
|
}
|
|
41
|
-
:host([underline]) ::slotted(*)
|
|
45
|
+
:host([underline]) ::slotted(*),
|
|
46
|
+
:host([underline]) {
|
|
42
47
|
text-decoration-line: underline;
|
|
43
48
|
}
|
|
44
|
-
:host([strikethrough]) ::slotted(*)
|
|
49
|
+
:host([strikethrough]) ::slotted(*),
|
|
50
|
+
:host([strikethrough]) {
|
|
45
51
|
text-decoration-line: line-through;
|
|
46
52
|
}
|
|
47
|
-
:host([underline][strikethrough]) ::slotted(*)
|
|
53
|
+
:host([underline][strikethrough]) ::slotted(*),
|
|
54
|
+
:host([underline][strikethrough]) {
|
|
48
55
|
text-decoration-line: line-through underline;
|
|
49
56
|
}
|
|
50
|
-
:host([size='100']) ::slotted(*)
|
|
57
|
+
:host([size='100']) ::slotted(*),
|
|
58
|
+
:host([size='100']) {
|
|
51
59
|
font-size: ${fontSizeBase100};
|
|
52
60
|
line-height: ${lineHeightBase100};
|
|
53
61
|
}
|
|
54
|
-
:host([size='200']) ::slotted(*)
|
|
62
|
+
:host([size='200']) ::slotted(*),
|
|
63
|
+
:host([size='200']) {
|
|
55
64
|
font-size: ${fontSizeBase200};
|
|
56
65
|
line-height: ${lineHeightBase200};
|
|
57
66
|
}
|
|
58
|
-
:host([size='400']) ::slotted(*)
|
|
67
|
+
:host([size='400']) ::slotted(*),
|
|
68
|
+
:host([size='400']) {
|
|
59
69
|
font-size: ${fontSizeBase400};
|
|
60
70
|
line-height: ${lineHeightBase400};
|
|
61
71
|
}
|
|
62
|
-
:host([size='500']) ::slotted(*)
|
|
72
|
+
:host([size='500']) ::slotted(*),
|
|
73
|
+
:host([size='500']) {
|
|
63
74
|
font-size: ${fontSizeBase500};
|
|
64
75
|
line-height: ${lineHeightBase500};
|
|
65
76
|
}
|
|
66
|
-
:host([size='600']) ::slotted(*)
|
|
77
|
+
:host([size='600']) ::slotted(*),
|
|
78
|
+
:host([size='600']) {
|
|
67
79
|
font-size: ${fontSizeBase600};
|
|
68
80
|
line-height: ${lineHeightBase600};
|
|
69
81
|
}
|
|
70
|
-
:host([size='700']) ::slotted(*)
|
|
82
|
+
:host([size='700']) ::slotted(*),
|
|
83
|
+
:host([size='700']) {
|
|
71
84
|
font-size: ${fontSizeHero700};
|
|
72
85
|
line-height: ${lineHeightHero700};
|
|
73
86
|
}
|
|
74
|
-
:host([size='800']) ::slotted(*)
|
|
87
|
+
:host([size='800']) ::slotted(*),
|
|
88
|
+
:host([size='800']) {
|
|
75
89
|
font-size: ${fontSizeHero800};
|
|
76
90
|
line-height: ${lineHeightHero800};
|
|
77
91
|
}
|
|
78
|
-
:host([size='900']) ::slotted(*)
|
|
92
|
+
:host([size='900']) ::slotted(*),
|
|
93
|
+
:host([size='900']) {
|
|
79
94
|
font-size: ${fontSizeHero900};
|
|
80
95
|
line-height: ${lineHeightHero900};
|
|
81
96
|
}
|
|
82
|
-
:host([size='1000']) ::slotted(*)
|
|
97
|
+
:host([size='1000']) ::slotted(*),
|
|
98
|
+
:host([size='1000']) {
|
|
83
99
|
font-size: ${fontSizeHero1000};
|
|
84
100
|
line-height: ${lineHeightHero1000};
|
|
85
101
|
}
|
|
86
|
-
:host([font='monospace']) ::slotted(*)
|
|
102
|
+
:host([font='monospace']) ::slotted(*),
|
|
103
|
+
:host([font='monospace']) {
|
|
87
104
|
font-family: ${fontFamilyMonospace};
|
|
88
105
|
}
|
|
89
|
-
:host([font='numeric']) ::slotted(*)
|
|
106
|
+
:host([font='numeric']) ::slotted(*),
|
|
107
|
+
:host([font='numeric']) {
|
|
90
108
|
font-family: ${fontFamilyNumeric};
|
|
91
109
|
}
|
|
92
|
-
:host([weight='medium']) ::slotted(*)
|
|
110
|
+
:host([weight='medium']) ::slotted(*),
|
|
111
|
+
:host([weight='medium']) {
|
|
93
112
|
font-weight: ${fontWeightMedium};
|
|
94
113
|
}
|
|
95
|
-
:host([weight='semibold']) ::slotted(*)
|
|
114
|
+
:host([weight='semibold']) ::slotted(*),
|
|
115
|
+
:host([weight='semibold']) {
|
|
96
116
|
font-weight: ${fontWeightSemibold};
|
|
97
117
|
}
|
|
98
|
-
:host([weight='bold']) ::slotted(*)
|
|
118
|
+
:host([weight='bold']) ::slotted(*),
|
|
119
|
+
:host([weight='bold']) {
|
|
99
120
|
font-weight: ${fontWeightBold};
|
|
100
121
|
}
|
|
101
|
-
:host([align='center']) ::slotted(*)
|
|
122
|
+
:host([align='center']) ::slotted(*),
|
|
123
|
+
:host([align='center']) {
|
|
102
124
|
text-align: center;
|
|
103
125
|
}
|
|
104
|
-
:host([align='end']) ::slotted(*)
|
|
126
|
+
:host([align='end']) ::slotted(*),
|
|
127
|
+
:host([align='end']) {
|
|
105
128
|
text-align: end;
|
|
106
129
|
}
|
|
107
|
-
:host([align='justify']) ::slotted(*)
|
|
130
|
+
:host([align='justify']) ::slotted(*),
|
|
131
|
+
:host([align='justify']) {
|
|
108
132
|
text-align: justify;
|
|
109
133
|
}
|
|
110
134
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../src/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../src/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,QAAQ,CAAC;;;;;;;mBAOF,cAAc;iBAChB,eAAe;mBACb,iBAAiB;mBACjB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyCnB,eAAe;mBACb,iBAAiB;;;;iBAInB,eAAe;mBACb,iBAAiB;;;;iBAInB,eAAe;mBACb,iBAAiB;;;;iBAInB,eAAe;mBACb,iBAAiB;;;;iBAInB,eAAe;mBACb,iBAAiB;;;;iBAInB,eAAe;mBACb,iBAAiB;;;;iBAInB,eAAe;mBACb,iBAAiB;;;;iBAInB,eAAe;mBACb,iBAAiB;;;;iBAInB,gBAAgB;mBACd,kBAAkB;;;;mBAIlB,mBAAmB;;;;mBAInB,iBAAiB;;;;mBAIjB,gBAAgB;;;;mBAIhB,kBAAkB;;;;mBAIlB,cAAc;;;;;;;;;;;;;;CAchC,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export * from './text-input.js';
|
|
2
|
-
export * from './text-input.options.js';
|
|
3
|
-
export { template as TextInputTemplate } from './text-input.template.js';
|
|
4
|
-
export { styles as TextInputStyles } from './text-input.styles.js';
|
|
5
1
|
export { definition as TextInputDefinition } from './text-input.definition.js';
|
|
6
|
-
export {
|
|
2
|
+
export { TextInput } from './text-input.js';
|
|
3
|
+
export { TextInputAppearance, TextInputControlSize, TextInputType } from './text-input.options.js';
|
|
4
|
+
export { styles as TextInputStyles } from './text-input.styles.js';
|
|
5
|
+
export { template as TextInputTemplate } from './text-input.template.js';
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text-input/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnG,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FluentDesignSystem } from '../fluent-design-system.js';
|
|
2
|
+
import { definition } from './text-input.definition.js';
|
|
3
|
+
definition.define(FluentDesignSystem.registry);
|
|
4
|
+
const itemRenderer = () => {
|
|
5
|
+
const textInput = document.createElement('fluent-text-input');
|
|
6
|
+
return textInput;
|
|
7
|
+
};
|
|
8
|
+
export default itemRenderer;
|
|
9
|
+
export { tests } from '../utils/benchmark-wrapper.js';
|
|
10
|
+
//# sourceMappingURL=text-input.bench.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-input.bench.js","sourceRoot":"","sources":["../../../src/text-input/text-input.bench.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAE/C,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC9D,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -3,16 +3,18 @@ import { TextInput } from './text-input.js';
|
|
|
3
3
|
import { styles } from './text-input.styles.js';
|
|
4
4
|
import { template } from './text-input.template.js';
|
|
5
5
|
/**
|
|
6
|
-
* The Fluent TextInput Element.
|
|
7
|
-
*
|
|
6
|
+
* The Fluent TextInput Element definition.
|
|
8
7
|
*
|
|
9
8
|
* @public
|
|
10
9
|
* @remarks
|
|
11
|
-
* HTML Element:
|
|
10
|
+
* HTML Element: `<fluent-text-input>`
|
|
12
11
|
*/
|
|
13
12
|
export const definition = TextInput.compose({
|
|
14
13
|
name: `${FluentDesignSystem.prefix}-text-input`,
|
|
15
14
|
template,
|
|
16
15
|
styles,
|
|
16
|
+
shadowOptions: {
|
|
17
|
+
delegatesFocus: true,
|
|
18
|
+
},
|
|
17
19
|
});
|
|
18
20
|
//# sourceMappingURL=text-input.definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.definition.js","sourceRoot":"","sources":["../../../src/text-input/text-input.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"text-input.definition.js","sourceRoot":"","sources":["../../../src/text-input/text-input.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC;IAC1C,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,aAAa;IAC/C,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACb,cAAc,EAAE,IAAI;KACrB;CACF,CAAC,CAAC"}
|
|
@@ -1,21 +1,408 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import { attr } from '@microsoft/fast-element';
|
|
8
|
-
import { FASTTextField } from '@microsoft/fast-foundation/text-field.js';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr, FASTElement, nullableNumberConverter, Observable, observable } from '@microsoft/fast-element';
|
|
3
|
+
import { StartEnd } from '../patterns/start-end.js';
|
|
4
|
+
import { applyMixins } from '../utils/apply-mixins.js';
|
|
5
|
+
import { ImplicitSubmissionBlockingTypes, TextInputType } from './text-input.options.js';
|
|
9
6
|
/**
|
|
10
|
-
*
|
|
7
|
+
* A Text Input Custom HTML Element.
|
|
8
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input | `<input>`} element.
|
|
9
|
+
*
|
|
10
|
+
* @slot start - Content which can be provided before the input
|
|
11
|
+
* @slot end - Content which can be provided after the input
|
|
12
|
+
* @slot - The default slot for button content
|
|
13
|
+
* @csspart label - The internal `<label>` element
|
|
14
|
+
* @csspart root - the root container for the internal control
|
|
15
|
+
* @csspart control - The internal `<input>` control
|
|
11
16
|
* @public
|
|
12
17
|
*/
|
|
13
|
-
export class TextInput extends
|
|
18
|
+
export class TextInput extends FASTElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
/**
|
|
22
|
+
* Allows setting a type or mode of text.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
* @remarks
|
|
26
|
+
* HTML Attribute: `type`
|
|
27
|
+
*/
|
|
28
|
+
this.type = TextInputType.text;
|
|
29
|
+
/**
|
|
30
|
+
* The current value of the input.
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
this._value = this.initialValue;
|
|
35
|
+
/**
|
|
36
|
+
* Indicates that the value has been changed by the user.
|
|
37
|
+
*
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
this.dirtyValue = false;
|
|
41
|
+
/**
|
|
42
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
43
|
+
*
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
this.elementInternals = this.attachInternals();
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Updates the control label visibility based on the presence of default slotted content.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
defaultSlottedNodesChanged(prev, next) {
|
|
54
|
+
if (this.$fastController.isConnected) {
|
|
55
|
+
this.controlLabel.hidden = !(next === null || next === void 0 ? void 0 : next.length);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Sets the value of the element to the initial value.
|
|
60
|
+
*
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
initialValueChanged() {
|
|
64
|
+
if (!this.dirtyValue) {
|
|
65
|
+
this.value = this.initialValue;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Syncs the `ElementInternals.ariaReadOnly` property when the `readonly` property changes.
|
|
70
|
+
*
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
readOnlyChanged() {
|
|
74
|
+
if (this.$fastController.isConnected) {
|
|
75
|
+
this.elementInternals.ariaReadOnly = `${!!this.readOnly}`;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Syncs the element's internal `aria-required` state with the `required` attribute.
|
|
80
|
+
*
|
|
81
|
+
* @param previous - the previous required state
|
|
82
|
+
* @param next - the current required state
|
|
83
|
+
*
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
requiredChanged(previous, next) {
|
|
87
|
+
if (this.$fastController.isConnected) {
|
|
88
|
+
this.elementInternals.ariaRequired = `${!!next}`;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The element's validity state.
|
|
93
|
+
*
|
|
94
|
+
* @public
|
|
95
|
+
* @remarks
|
|
96
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
|
|
97
|
+
*/
|
|
98
|
+
get validity() {
|
|
99
|
+
return this.elementInternals.validity;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The validation message.
|
|
103
|
+
*
|
|
104
|
+
* @public
|
|
105
|
+
* @remarks
|
|
106
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validationMessage | `ElementInternals.validationMessage`} property.
|
|
107
|
+
*/
|
|
108
|
+
get validationMessage() {
|
|
109
|
+
return this.elementInternals.validationMessage || this.control.validationMessage;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The current value of the input.
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
get value() {
|
|
116
|
+
Observable.track(this, 'value');
|
|
117
|
+
return this._value;
|
|
118
|
+
}
|
|
119
|
+
set value(value) {
|
|
120
|
+
this._value = value;
|
|
121
|
+
if (this.$fastController.isConnected) {
|
|
122
|
+
this.control.value = value;
|
|
123
|
+
this.setFormValue(value);
|
|
124
|
+
this.setValidity();
|
|
125
|
+
Observable.notify(this, 'value');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Determines if the control can be submitted for constraint validation.
|
|
130
|
+
*
|
|
131
|
+
* @public
|
|
132
|
+
* @remarks
|
|
133
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/willValidate | `ElementInternals.willValidate`} property.
|
|
134
|
+
*/
|
|
135
|
+
get willValidate() {
|
|
136
|
+
return this.elementInternals.willValidate;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The associated form element.
|
|
140
|
+
*
|
|
141
|
+
* @public
|
|
142
|
+
* @remarks
|
|
143
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/form | `ElementInternals.form`} property.
|
|
144
|
+
*/
|
|
145
|
+
get form() {
|
|
146
|
+
return this.elementInternals.form;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Handles the internal control's `keypress` event.
|
|
150
|
+
*
|
|
151
|
+
* @internal
|
|
152
|
+
*/
|
|
153
|
+
beforeinputHandler(e) {
|
|
154
|
+
if (e.inputType === 'insertLineBreak') {
|
|
155
|
+
this.implicitSubmit();
|
|
156
|
+
}
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Change event handler for inner control.
|
|
161
|
+
*
|
|
162
|
+
* @internal
|
|
163
|
+
* @privateRemarks
|
|
164
|
+
* "Change" events are not `composable` so they will not permeate the shadow DOM boundary. This function effectively
|
|
165
|
+
* proxies the change event, emitting a `change` event whenever the internal control emits a `change` event.
|
|
166
|
+
*/
|
|
167
|
+
changeHandler(e) {
|
|
168
|
+
this.setValidity();
|
|
169
|
+
this.$emit('change', e, {
|
|
170
|
+
bubbles: true,
|
|
171
|
+
composed: true,
|
|
172
|
+
});
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Checks the validity of the element and returns the result.
|
|
177
|
+
*
|
|
178
|
+
* @public
|
|
179
|
+
* @remarks
|
|
180
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
|
|
181
|
+
*/
|
|
182
|
+
checkValidity() {
|
|
183
|
+
return this.elementInternals.checkValidity();
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Clicks the inner control when the component is clicked.
|
|
187
|
+
*
|
|
188
|
+
* @param e - the event object
|
|
189
|
+
*/
|
|
190
|
+
clickHandler(e) {
|
|
191
|
+
var _a;
|
|
192
|
+
if (this.isSameNode(e.target)) {
|
|
193
|
+
(_a = this.control) === null || _a === void 0 ? void 0 : _a.click();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
connectedCallback() {
|
|
197
|
+
super.connectedCallback();
|
|
198
|
+
this.setFormValue(this.value);
|
|
199
|
+
this.setValidity();
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Focuses the inner control when the component is focused.
|
|
203
|
+
*
|
|
204
|
+
* @param e - the event object
|
|
205
|
+
* @public
|
|
206
|
+
*/
|
|
207
|
+
focusinHandler(e) {
|
|
208
|
+
var _a;
|
|
209
|
+
(_a = this.control) === null || _a === void 0 ? void 0 : _a.focus();
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Resets the value to its initial value when the form is reset.
|
|
213
|
+
*
|
|
214
|
+
* @internal
|
|
215
|
+
*/
|
|
216
|
+
formResetCallback() {
|
|
217
|
+
this.value = this.initialValue;
|
|
218
|
+
this.dirtyValue = false;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Handles implicit form submission when the user presses the "Enter" key.
|
|
222
|
+
*
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
225
|
+
implicitSubmit() {
|
|
226
|
+
if (!this.elementInternals.form) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
if (this.elementInternals.form.elements.length === 1) {
|
|
230
|
+
this.elementInternals.form.requestSubmit();
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
const formElements = [...this.elementInternals.form.elements];
|
|
234
|
+
// Try submitting with the first submit button, if any
|
|
235
|
+
const submitButton = formElements.find(x => x.getAttribute('type') === 'submit');
|
|
236
|
+
if (submitButton) {
|
|
237
|
+
submitButton.click();
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
// Determine if there is only one implicit submission blocking element
|
|
241
|
+
const filteredElements = formElements.filter(x => { var _a; return ImplicitSubmissionBlockingTypes.includes((_a = x.getAttribute('type')) !== null && _a !== void 0 ? _a : ''); });
|
|
242
|
+
if (filteredElements.length > 1) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
this.elementInternals.form.requestSubmit();
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Handles the internal control's `input` event.
|
|
249
|
+
*
|
|
250
|
+
* @internal
|
|
251
|
+
*/
|
|
252
|
+
inputHandler(e) {
|
|
253
|
+
this.dirtyValue = true;
|
|
254
|
+
this.value = this.control.value;
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Handles the internal control's `keydown` event.
|
|
259
|
+
*
|
|
260
|
+
* @param e - the event object
|
|
261
|
+
* @internal
|
|
262
|
+
*/
|
|
263
|
+
keydownHandler(e) {
|
|
264
|
+
if (e.key === 'Enter') {
|
|
265
|
+
this.implicitSubmit();
|
|
266
|
+
}
|
|
267
|
+
return true;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Selects all the text in the text field.
|
|
271
|
+
*
|
|
272
|
+
* @public
|
|
273
|
+
* @privateRemarks
|
|
274
|
+
* The `select` event does not permeate the shadow DOM boundary. This function effectively proxies the event,
|
|
275
|
+
* emitting a `select` event whenever the internal control emits a `select` event
|
|
276
|
+
*
|
|
277
|
+
*/
|
|
278
|
+
select() {
|
|
279
|
+
this.control.select();
|
|
280
|
+
this.$emit('select');
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Sets the custom validity message.
|
|
284
|
+
* @param message - The message to set
|
|
285
|
+
*
|
|
286
|
+
* @public
|
|
287
|
+
*/
|
|
288
|
+
setCustomValidity(message) {
|
|
289
|
+
this.elementInternals.setValidity({ customError: true }, message);
|
|
290
|
+
this.reportValidity();
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Reports the validity of the element.
|
|
294
|
+
*
|
|
295
|
+
* @public
|
|
296
|
+
* @remarks
|
|
297
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
|
|
298
|
+
*/
|
|
299
|
+
reportValidity() {
|
|
300
|
+
return this.elementInternals.reportValidity();
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
|
|
304
|
+
*
|
|
305
|
+
* @internal
|
|
306
|
+
*/
|
|
307
|
+
setFormValue(value, state) {
|
|
308
|
+
this.elementInternals.setFormValue(value, value !== null && value !== void 0 ? value : state);
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Sets the validity of the control.
|
|
312
|
+
*
|
|
313
|
+
* @param flags - Validity flags. If not provided, the control's `validity` will be used.
|
|
314
|
+
* @param message - Optional message to supply. If not provided, the control's `validationMessage` will be used. If the control does not have a `validationMessage`, the message will be empty.
|
|
315
|
+
* @param anchor - Optional anchor to use for the validation message. If not provided, the control will be used.
|
|
316
|
+
*
|
|
317
|
+
* @internal
|
|
318
|
+
*/
|
|
319
|
+
setValidity(flags = this.control.validity, message = this.validationMessage, anchor = this.control) {
|
|
320
|
+
if (this.$fastController.isConnected) {
|
|
321
|
+
if (this.disabled) {
|
|
322
|
+
this.elementInternals.setValidity({});
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
this.elementInternals.setValidity(flags, message, anchor);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
14
328
|
}
|
|
329
|
+
/**
|
|
330
|
+
* The form-associated flag.
|
|
331
|
+
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
332
|
+
*
|
|
333
|
+
* @public
|
|
334
|
+
*/
|
|
335
|
+
TextInput.formAssociated = true;
|
|
336
|
+
__decorate([
|
|
337
|
+
attr
|
|
338
|
+
], TextInput.prototype, "appearance", void 0);
|
|
339
|
+
__decorate([
|
|
340
|
+
attr
|
|
341
|
+
], TextInput.prototype, "autocomplete", void 0);
|
|
342
|
+
__decorate([
|
|
343
|
+
attr({ mode: 'boolean' })
|
|
344
|
+
], TextInput.prototype, "autofocus", void 0);
|
|
15
345
|
__decorate([
|
|
16
346
|
attr({ attribute: 'control-size' })
|
|
17
347
|
], TextInput.prototype, "controlSize", void 0);
|
|
348
|
+
__decorate([
|
|
349
|
+
observable
|
|
350
|
+
], TextInput.prototype, "defaultSlottedNodes", void 0);
|
|
18
351
|
__decorate([
|
|
19
352
|
attr
|
|
20
|
-
], TextInput.prototype, "
|
|
353
|
+
], TextInput.prototype, "dirname", void 0);
|
|
354
|
+
__decorate([
|
|
355
|
+
attr({ mode: 'boolean' })
|
|
356
|
+
], TextInput.prototype, "disabled", void 0);
|
|
357
|
+
__decorate([
|
|
358
|
+
attr({ attribute: 'form' })
|
|
359
|
+
], TextInput.prototype, "formAttribute", void 0);
|
|
360
|
+
__decorate([
|
|
361
|
+
attr({ attribute: 'value', mode: 'fromView' })
|
|
362
|
+
], TextInput.prototype, "initialValue", void 0);
|
|
363
|
+
__decorate([
|
|
364
|
+
attr
|
|
365
|
+
], TextInput.prototype, "list", void 0);
|
|
366
|
+
__decorate([
|
|
367
|
+
attr({ converter: nullableNumberConverter })
|
|
368
|
+
], TextInput.prototype, "maxlength", void 0);
|
|
369
|
+
__decorate([
|
|
370
|
+
attr({ converter: nullableNumberConverter })
|
|
371
|
+
], TextInput.prototype, "minlength", void 0);
|
|
372
|
+
__decorate([
|
|
373
|
+
attr({ mode: 'boolean' })
|
|
374
|
+
], TextInput.prototype, "multiple", void 0);
|
|
375
|
+
__decorate([
|
|
376
|
+
attr
|
|
377
|
+
], TextInput.prototype, "name", void 0);
|
|
378
|
+
__decorate([
|
|
379
|
+
attr
|
|
380
|
+
], TextInput.prototype, "pattern", void 0);
|
|
381
|
+
__decorate([
|
|
382
|
+
attr
|
|
383
|
+
], TextInput.prototype, "placeholder", void 0);
|
|
384
|
+
__decorate([
|
|
385
|
+
attr({ attribute: 'readonly', mode: 'boolean' })
|
|
386
|
+
], TextInput.prototype, "readOnly", void 0);
|
|
387
|
+
__decorate([
|
|
388
|
+
attr({ mode: 'boolean' })
|
|
389
|
+
], TextInput.prototype, "required", void 0);
|
|
390
|
+
__decorate([
|
|
391
|
+
attr({ converter: nullableNumberConverter })
|
|
392
|
+
], TextInput.prototype, "size", void 0);
|
|
393
|
+
__decorate([
|
|
394
|
+
attr({
|
|
395
|
+
converter: {
|
|
396
|
+
fromView: value => (typeof value === 'string' ? ['true', ''].includes(value.trim().toLowerCase()) : null),
|
|
397
|
+
toView: value => value.toString(),
|
|
398
|
+
},
|
|
399
|
+
})
|
|
400
|
+
], TextInput.prototype, "spellcheck", void 0);
|
|
401
|
+
__decorate([
|
|
402
|
+
attr
|
|
403
|
+
], TextInput.prototype, "type", void 0);
|
|
404
|
+
__decorate([
|
|
405
|
+
observable
|
|
406
|
+
], TextInput.prototype, "controlLabel", void 0);
|
|
407
|
+
applyMixins(TextInput, StartEnd);
|
|
21
408
|
//# sourceMappingURL=text-input.js.map
|