@vonage/vivid 3.26.0 → 3.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/accordion/index.js +0 -2
- package/accordion-item/index.js +0 -2
- package/alert/index.js +0 -2
- package/avatar/index.js +0 -2
- package/badge/index.js +0 -2
- package/banner/index.js +0 -2
- package/breadcrumb-item/index.js +0 -2
- package/button/index.js +0 -2
- package/calendar/index.js +0 -1
- package/calendar-event/index.js +0 -2
- package/card/index.js +0 -2
- package/checkbox/index.js +0 -2
- package/combobox/index.js +0 -3
- package/custom-elements.json +440 -51
- package/data-grid/index.js +1 -5
- package/dialog/index.js +0 -2
- package/empty-state/index.js +0 -2
- package/fab/index.js +0 -2
- package/file-picker/index.js +24 -0
- package/header/index.js +1 -1
- package/icon/index.js +0 -2
- package/index.d.ts +3 -3
- package/index.js +31 -35
- package/layout/index.js +1 -1
- package/lib/accordion/accordion.d.ts +5 -5
- package/lib/accordion/accordion.template.d.ts +3 -3
- package/lib/accordion/definition.d.ts +2 -2
- package/lib/accordion/index.d.ts +1 -1
- package/lib/accordion-item/accordion-item.d.ts +12 -12
- package/lib/accordion-item/accordion-item.template.d.ts +4 -4
- package/lib/accordion-item/definition.d.ts +1 -1
- package/lib/accordion-item/index.d.ts +1 -1
- package/lib/action-group/action-group.d.ts +11 -11
- package/lib/action-group/action-group.template.d.ts +4 -4
- package/lib/action-group/definition.d.ts +2 -2
- package/lib/action-group/index.d.ts +1 -1
- package/lib/alert/alert.d.ts +22 -22
- package/lib/alert/alert.template.d.ts +4 -4
- package/lib/alert/definition.d.ts +2 -2
- package/lib/alert/index.d.ts +1 -1
- package/lib/avatar/avatar.d.ts +14 -14
- package/lib/avatar/avatar.template.d.ts +4 -4
- package/lib/avatar/definition.d.ts +2 -2
- package/lib/avatar/index.d.ts +1 -1
- package/lib/badge/badge.d.ts +14 -14
- package/lib/badge/badge.template.d.ts +4 -4
- package/lib/badge/definition.d.ts +4 -4
- package/lib/badge/index.d.ts +1 -1
- package/lib/banner/banner.d.ts +20 -20
- package/lib/banner/banner.template.d.ts +4 -4
- package/lib/banner/definition.d.ts +2 -2
- package/lib/banner/index.d.ts +1 -1
- package/lib/breadcrumb/breadcrumb.d.ts +3 -3
- package/lib/breadcrumb/breadcrumb.template.d.ts +4 -4
- package/lib/breadcrumb/definition.d.ts +1 -1
- package/lib/breadcrumb/index.d.ts +1 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -5
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +4 -4
- package/lib/breadcrumb-item/definition.d.ts +1 -1
- package/lib/breadcrumb-item/index.d.ts +1 -1
- package/lib/button/button.d.ts +18 -18
- package/lib/button/button.template.d.ts +4 -4
- package/lib/button/definition.d.ts +2 -2
- package/lib/button/index.d.ts +1 -1
- package/lib/calendar/calendar.d.ts +13 -13
- package/lib/calendar/calendar.template.d.ts +4 -4
- package/lib/calendar/definition.d.ts +1 -1
- package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -2
- package/lib/calendar/helpers/calendar.event-context.d.ts +6 -6
- package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -9
- package/lib/calendar/index.d.ts +1 -1
- package/lib/calendar-event/calendar-event.d.ts +13 -13
- package/lib/calendar-event/calendar-event.template.d.ts +4 -4
- package/lib/calendar-event/definition.d.ts +2 -2
- package/lib/calendar-event/index.d.ts +1 -1
- package/lib/card/card.d.ts +10 -10
- package/lib/card/card.template.d.ts +4 -4
- package/lib/card/definition.d.ts +1 -1
- package/lib/card/index.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +10 -11
- package/lib/checkbox/checkbox.template.d.ts +4 -4
- package/lib/checkbox/definition.d.ts +1 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/combobox/combobox.d.ts +12 -13
- package/lib/combobox/combobox.template.d.ts +4 -4
- package/lib/combobox/definition.d.ts +3 -4
- package/lib/combobox/index.d.ts +1 -1
- package/lib/components.d.ts +52 -52
- package/lib/data-grid/data-grid-cell.d.ts +22 -22
- package/lib/data-grid/data-grid-cell.template.d.ts +4 -4
- package/lib/data-grid/data-grid-row.d.ts +4 -4
- package/lib/data-grid/data-grid-row.template.d.ts +3 -3
- package/lib/data-grid/data-grid.d.ts +20 -20
- package/lib/data-grid/data-grid.options.d.ts +38 -38
- package/lib/data-grid/data-grid.template.d.ts +3 -3
- package/lib/data-grid/definition.d.ts +6 -6
- package/lib/data-grid/index.d.ts +1 -1
- package/lib/dialog/definition.d.ts +2 -2
- package/lib/dialog/dialog.d.ts +26 -26
- package/lib/dialog/dialog.template.d.ts +4 -4
- package/lib/dialog/index.d.ts +1 -1
- package/lib/divider/definition.d.ts +1 -1
- package/lib/divider/divider.d.ts +3 -3
- package/lib/divider/divider.template.d.ts +4 -4
- package/lib/divider/index.d.ts +1 -1
- package/lib/elevation/definition.d.ts +1 -1
- package/lib/elevation/elevation.d.ts +5 -5
- package/lib/elevation/elevation.template.d.ts +4 -4
- package/lib/elevation/index.d.ts +1 -1
- package/lib/empty-state/definition.d.ts +3 -3
- package/lib/empty-state/empty-state.d.ts +5 -5
- package/lib/empty-state/empty-state.template.d.ts +4 -4
- package/lib/empty-state/index.d.ts +1 -1
- package/lib/enums.d.ts +60 -60
- package/lib/fab/definition.d.ts +4 -4
- package/lib/fab/fab.d.ts +12 -12
- package/lib/fab/fab.template.d.ts +4 -4
- package/lib/fab/index.d.ts +1 -1
- package/lib/file-picker/definition.d.ts +3 -0
- package/lib/file-picker/file-picker.d.ts +22 -0
- package/lib/file-picker/file-picker.template.d.ts +4 -0
- package/lib/file-picker/index.d.ts +1 -0
- package/lib/focus/definition.d.ts +3 -3
- package/lib/focus/focus.d.ts +3 -3
- package/lib/focus/focus.template.d.ts +4 -4
- package/lib/focus/index.d.ts +1 -1
- package/lib/header/definition.d.ts +3 -3
- package/lib/header/header.d.ts +5 -5
- package/lib/header/header.template.d.ts +4 -4
- package/lib/header/index.d.ts +1 -1
- package/lib/icon/definition.d.ts +4 -4
- package/lib/icon/icon.d.ts +12 -12
- package/lib/icon/icon.placeholder.d.ts +1 -1
- package/lib/icon/icon.template.d.ts +4 -4
- package/lib/icon/index.d.ts +1 -1
- package/lib/layout/definition.d.ts +4 -4
- package/lib/layout/index.d.ts +1 -1
- package/lib/layout/layout.d.ts +17 -17
- package/lib/layout/layout.template.d.ts +4 -4
- package/lib/listbox/definition.d.ts +4 -4
- package/lib/listbox/index.d.ts +1 -1
- package/lib/listbox/listbox.d.ts +6 -6
- package/lib/listbox/listbox.template.d.ts +4 -4
- package/lib/menu/definition.d.ts +12 -12
- package/lib/menu/index.d.ts +1 -1
- package/lib/menu/menu.d.ts +16 -14
- package/lib/menu/menu.template.d.ts +3 -3
- package/lib/menu-item/definition.d.ts +3 -3
- package/lib/menu-item/index.d.ts +1 -1
- package/lib/menu-item/menu-item.d.ts +14 -14
- package/lib/menu-item/menu-item.template.d.ts +4 -4
- package/lib/nav/definition.d.ts +3 -3
- package/lib/nav/index.d.ts +1 -1
- package/lib/nav/nav.d.ts +3 -3
- package/lib/nav/nav.template.d.ts +4 -4
- package/lib/nav-disclosure/definition.d.ts +3 -3
- package/lib/nav-disclosure/index.d.ts +1 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +10 -10
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -4
- package/lib/nav-item/definition.d.ts +3 -3
- package/lib/nav-item/index.d.ts +1 -1
- package/lib/nav-item/nav-item.d.ts +7 -7
- package/lib/nav-item/nav-item.template.d.ts +4 -4
- package/lib/note/definition.d.ts +4 -4
- package/lib/note/index.d.ts +1 -1
- package/lib/note/note.d.ts +10 -10
- package/lib/note/note.template.d.ts +4 -4
- package/lib/number-field/definition.d.ts +5 -5
- package/lib/number-field/index.d.ts +1 -1
- package/lib/number-field/number-field.d.ts +13 -13
- package/lib/number-field/number-field.template.d.ts +4 -4
- package/lib/option/definition.d.ts +3 -3
- package/lib/option/index.d.ts +1 -1
- package/lib/option/option.d.ts +12 -12
- package/lib/option/option.template.d.ts +4 -4
- package/lib/pagination/definition.d.ts +3 -3
- package/lib/pagination/index.d.ts +1 -1
- package/lib/pagination/pagination.d.ts +18 -18
- package/lib/pagination/pagination.template.d.ts +4 -4
- package/lib/popup/definition.d.ts +5 -5
- package/lib/popup/index.d.ts +1 -1
- package/lib/popup/popup.d.ts +21 -21
- package/lib/popup/popup.template.d.ts +4 -4
- package/lib/progress/definition.d.ts +4 -4
- package/lib/progress/index.d.ts +1 -1
- package/lib/progress/progress.d.ts +9 -9
- package/lib/progress/progress.template.d.ts +5 -5
- package/lib/progress-ring/definition.d.ts +4 -4
- package/lib/progress-ring/index.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +7 -7
- package/lib/progress-ring/progress-ring.template.d.ts +4 -4
- package/lib/radio/definition.d.ts +3 -3
- package/lib/radio/index.d.ts +1 -1
- package/lib/radio/radio.d.ts +7 -7
- package/lib/radio/radio.template.d.ts +4 -4
- package/lib/radio-group/definition.d.ts +11 -11
- package/lib/radio-group/index.d.ts +1 -1
- package/lib/radio-group/radio-group.d.ts +4 -4
- package/lib/radio-group/radio-group.template.d.ts +4 -4
- package/lib/select/definition.d.ts +4 -4
- package/lib/select/index.d.ts +1 -1
- package/lib/select/select.d.ts +17 -18
- package/lib/select/select.template.d.ts +4 -4
- package/lib/side-drawer/definition.d.ts +3 -3
- package/lib/side-drawer/index.d.ts +1 -1
- package/lib/side-drawer/side-drawer.d.ts +9 -9
- package/lib/side-drawer/side-drawer.template.d.ts +4 -4
- package/lib/slider/definition.d.ts +3 -3
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/slider.d.ts +4 -4
- package/lib/slider/slider.template.d.ts +4 -4
- package/lib/switch/definition.d.ts +4 -4
- package/lib/switch/index.d.ts +1 -1
- package/lib/switch/switch.d.ts +7 -7
- package/lib/switch/switch.template.d.ts +4 -4
- package/lib/tab/definition.d.ts +4 -4
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/tab.d.ts +14 -14
- package/lib/tab/tab.template.d.ts +3 -3
- package/lib/tab-panel/definition.d.ts +3 -3
- package/lib/tab-panel/index.d.ts +1 -1
- package/lib/tab-panel/tab-panel.d.ts +3 -3
- package/lib/tab-panel/tab-panel.template.d.ts +2 -2
- package/lib/tabs/definition.d.ts +3 -3
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/tabs.d.ts +15 -15
- package/lib/tabs/tabs.template.d.ts +2 -2
- package/lib/tag/definition.d.ts +4 -4
- package/lib/tag/index.d.ts +1 -1
- package/lib/tag/tag.d.ts +22 -22
- package/lib/tag/tag.template.d.ts +4 -4
- package/lib/tag-group/definition.d.ts +3 -3
- package/lib/tag-group/index.d.ts +1 -1
- package/lib/tag-group/tag-group.d.ts +3 -3
- package/lib/tag-group/tag-group.template.d.ts +4 -4
- package/lib/text-anchor/definition.d.ts +3 -3
- package/lib/text-anchor/index.d.ts +1 -1
- package/lib/text-anchor/text-anchor.d.ts +7 -7
- package/lib/text-anchor/text-anchor.template.d.ts +4 -4
- package/lib/text-area/definition.d.ts +4 -4
- package/lib/text-area/index.d.ts +1 -1
- package/lib/text-area/text-area.d.ts +8 -9
- package/lib/text-area/text-area.template.d.ts +4 -4
- package/lib/text-field/definition.d.ts +4 -4
- package/lib/text-field/index.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +13 -14
- package/lib/text-field/text-field.template.d.ts +4 -4
- package/lib/toggletip/definition.d.ts +3 -3
- package/lib/toggletip/index.d.ts +1 -1
- package/lib/toggletip/toggletip.d.ts +15 -15
- package/lib/toggletip/toggletip.template.d.ts +4 -4
- package/lib/tooltip/definition.d.ts +3 -3
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tooltip/tooltip.d.ts +14 -14
- package/lib/tooltip/tooltip.template.d.ts +4 -4
- package/lib/tree-item/definition.d.ts +3 -3
- package/lib/tree-item/index.d.ts +1 -1
- package/lib/tree-item/tree-item.d.ts +7 -7
- package/lib/tree-item/tree-item.template.d.ts +4 -4
- package/lib/tree-view/definition.d.ts +3 -3
- package/lib/tree-view/index.d.ts +1 -1
- package/lib/tree-view/tree-view.d.ts +3 -3
- package/lib/tree-view/tree-view.template.d.ts +2 -2
- package/listbox/index.js +17 -21
- package/menu/index.js +2 -5
- package/menu-item/index.js +1 -4
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +1 -3
- package/nav-item/index.js +1 -3
- package/note/index.js +1 -3
- package/number-field/index.js +1 -4
- package/option/index.js +0 -2
- package/package.json +10 -8
- package/pagination/index.js +2 -6
- package/popup/index.js +0 -3
- package/progress/index.js +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.js +3 -3
- package/select/index.js +1 -4
- package/shared/affix.js +2 -5
- package/shared/anchor.js +2 -1
- package/shared/apply-mixins.js +1 -1
- package/shared/definition.js +7 -9
- package/shared/definition10.js +13 -17
- package/shared/definition11.js +6 -9
- package/shared/definition12.js +16 -18
- package/shared/definition13.js +6 -8
- package/shared/definition14.js +7 -12
- package/shared/definition15.js +43 -52
- package/shared/definition16.js +8 -71
- package/shared/definition17.js +36 -45
- package/shared/definition18.js +19 -24
- package/shared/definition19.js +45 -49
- package/shared/definition2.js +24 -28
- package/shared/definition20.js +390 -281
- package/shared/definition21.js +12 -16
- package/shared/definition22.js +82 -168
- package/shared/definition23.js +35 -41
- package/shared/definition24.js +6 -8
- package/shared/definition25.js +10 -14
- package/shared/definition26.js +40 -42
- package/shared/definition27.js +2285 -48
- package/shared/definition28.js +46 -38
- package/shared/definition29.js +38 -370
- package/shared/definition3.js +5 -9
- package/shared/definition30.js +348 -302
- package/shared/definition31.js +365 -14
- package/shared/definition32.js +12 -71
- package/shared/definition33.js +63 -26
- package/shared/definition34.js +24 -40
- package/shared/definition35.js +32 -436
- package/shared/definition36.js +428 -217
- package/shared/definition37.js +175 -77
- package/shared/definition38.js +50 -34
- package/shared/definition39.js +36 -430
- package/shared/definition4.js +3 -5
- package/shared/definition40.js +358 -589
- package/shared/definition41.js +644 -75
- package/shared/definition42.js +70 -587
- package/shared/definition43.js +503 -84
- package/shared/definition44.js +124 -52
- package/shared/definition45.js +57 -19
- package/shared/definition46.js +17 -487
- package/shared/definition47.js +477 -102
- package/shared/definition48.js +109 -19
- package/shared/definition49.js +17 -276
- package/shared/definition5.js +7 -8
- package/shared/definition50.js +253 -101
- package/shared/definition51.js +114 -629
- package/shared/definition52.js +92 -85
- package/shared/definition53.js +112 -70
- package/shared/definition54.js +65 -294
- package/shared/definition55.js +303 -0
- package/shared/definition6.js +17 -23
- package/shared/definition7.js +44 -47
- package/shared/definition8.js +3 -5
- package/shared/definition9.js +13 -17
- package/shared/design-system/index.d.ts +3 -3
- package/shared/focus2.js +1 -3
- package/shared/form-associated.js +1 -1
- package/shared/form-elements.js +16 -20
- package/shared/icon.js +2 -1171
- package/shared/index.js +41 -1549
- package/shared/listbox.js +1 -1
- package/shared/patterns/affix.d.ts +9 -9
- package/shared/patterns/focus.d.ts +3 -3
- package/shared/patterns/form-elements/form-elements.d.ts +57 -57
- package/shared/patterns/form-elements/index.d.ts +1 -1
- package/shared/patterns/index.d.ts +3 -3
- package/shared/repeat.js +1 -1
- package/shared/text-anchor.template.js +38 -40
- package/shared/text-field.js +1 -1
- package/shared/text-field2.js +1 -1
- package/shared/when.js +19 -5
- package/side-drawer/index.js +1 -1
- package/slider/index.js +1 -4
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +17 -17
- package/styles/tokens/theme-light.css +17 -17
- package/switch/index.js +1 -3
- package/tab/index.js +1 -3
- package/tab-panel/index.js +1 -1
- package/tabs/index.js +3 -5
- package/tag/index.js +1 -3
- package/tag-group/index.js +1 -1
- package/text-anchor/index.js +0 -2
- package/text-area/index.js +1 -3
- package/text-field/index.js +1 -3
- package/toggletip/index.js +1 -5
- package/tooltip/index.js +1 -4
- package/tree-item/index.js +2 -4
- package/tree-view/index.js +1 -1
- package/vivid.api.json +210 -848
- package/shared/es.object.assign.js +0 -68
- package/shared/es.regexp.to-string.js +0 -61
- package/shared/es.string.includes.js +0 -83
- package/shared/string-trim.js +0 -40
- package/shared/to-string.js +0 -51
package/shared/definition34.js
CHANGED
|
@@ -1,49 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as html, r as registerFactory } from './index.js';
|
|
2
2
|
import { i as iconRegistries } from './definition3.js';
|
|
3
|
+
import { f as focusRegistries } from './definition4.js';
|
|
3
4
|
import { b as AffixIcon } from './affix.js';
|
|
4
|
-
import './
|
|
5
|
-
import './form-elements.js';
|
|
5
|
+
import { T as TextAnchor } from './text-anchor.js';
|
|
6
6
|
import { a as applyMixins } from './apply-mixins.js';
|
|
7
|
-
import {
|
|
8
|
-
import { w as when } from './when.js';
|
|
9
|
-
import { c as classNames } from './class-names.js';
|
|
7
|
+
import { t as textAnchorTemplate } from './text-anchor.template.js';
|
|
10
8
|
|
|
11
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
9
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Aug 2023 18:00:27 GMT\n */\n.control {\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n font: var(--vvd-typography-base);\n gap: 12px;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n text-decoration: none;\n vertical-align: middle;\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.control:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.control:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.control:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.control:where(.selected, [aria-current]):where(:hover, .hover) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary-increment);\n --_appearance-color-outline: transparent;\n}\n.control {\n /* @cssprop [--vvd-nav-item-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-nav-item-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-nav-item-accent-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-nav-item-accent-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-nav-item-accent-primary-increment=var(--vvd-color-neutral-800)] */\n --_connotation-color-primary-increment: var(--vvd-nav-item-accent-primary-increment, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-nav-item-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-nav-item-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-nav-item-accent-soft=var(--vvd-color-neutral-100)] */\n --_connotation-color-soft: var(--vvd-nav-item-accent-soft, var(--vvd-color-neutral-100));\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control.icon-only {\n display: flex;\n block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n inline-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n place-content: center;\n}\n.control:not(.icon-only) {\n padding-inline: 16px;\n}\n\n.control:not(:focus-visible) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n line-height: 1;\n}";
|
|
12
10
|
|
|
13
|
-
class
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
let _ = t => t,
|
|
19
|
-
_t,
|
|
20
|
-
_t2,
|
|
21
|
-
_t3;
|
|
22
|
-
const getClasses = ({
|
|
23
|
-
connotation
|
|
24
|
-
}) => classNames('base', `connotation-${connotation}`);
|
|
25
|
-
function getHeaderTemplate() {
|
|
26
|
-
return html(_t || (_t = _`<div class="headline">${0}</div>`), x => x.headline);
|
|
11
|
+
class NavItem extends TextAnchor {
|
|
12
|
+
getBodyTemplate() {
|
|
13
|
+
return html`<slot name="meta"></slot>`;
|
|
14
|
+
}
|
|
27
15
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<div class="text">
|
|
34
|
-
${0}
|
|
35
|
-
<slot class="message"></slot>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
`), getClasses, when(x => x.icon, html(_t3 || (_t3 = _`<${0} class="icon" name="${0}"></${0}>`), iconTag, x => x.icon, iconTag)), when(x => x.headline, getHeaderTemplate()));
|
|
39
|
-
};
|
|
16
|
+
applyMixins(NavItem, AffixIcon);
|
|
17
|
+
|
|
18
|
+
const NavItemTemplate = (context, definition) => html`
|
|
19
|
+
${textAnchorTemplate(context)}
|
|
20
|
+
`;
|
|
40
21
|
|
|
41
|
-
const
|
|
42
|
-
baseName: '
|
|
43
|
-
template:
|
|
44
|
-
styles: css_248z
|
|
22
|
+
const navItemDefinition = NavItem.compose({
|
|
23
|
+
baseName: 'nav-item',
|
|
24
|
+
template: NavItemTemplate,
|
|
25
|
+
styles: css_248z,
|
|
26
|
+
shadowOptions: {
|
|
27
|
+
delegatesFocus: true
|
|
28
|
+
}
|
|
45
29
|
});
|
|
46
|
-
const
|
|
47
|
-
const
|
|
30
|
+
const navItemRegistries = [navItemDefinition(), ...iconRegistries, ...focusRegistries];
|
|
31
|
+
const registerNavItem = registerFactory(navItemRegistries);
|
|
48
32
|
|
|
49
|
-
export {
|
|
33
|
+
export { navItemRegistries as a, navItemDefinition as n, registerNavItem as r };
|
package/shared/definition35.js
CHANGED
|
@@ -1,449 +1,45 @@
|
|
|
1
|
-
import { F as FoundationElement,
|
|
2
|
-
import {
|
|
3
|
-
import { D as Divider, d as dividerRegistries } from './definition24.js';
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { i as iconRegistries } from './definition3.js';
|
|
4
3
|
import { b as AffixIcon } from './affix.js';
|
|
5
4
|
import './focus.js';
|
|
6
|
-
import
|
|
7
|
-
import { S as StartEnd } from './start-end.js';
|
|
5
|
+
import './form-elements.js';
|
|
8
6
|
import { a as applyMixins } from './apply-mixins.js';
|
|
9
|
-
import {
|
|
10
|
-
import { F as FormAssociated } from './form-associated.js';
|
|
11
|
-
import { b as keyArrowDown, c as keyArrowUp } from './key-codes.js';
|
|
12
|
-
import './es.regexp.to-string.js';
|
|
13
|
-
import { f as focusTemplateFactory } from './focus2.js';
|
|
7
|
+
import { I as Icon } from './icon.js';
|
|
14
8
|
import { w as when } from './when.js';
|
|
15
|
-
import { r as ref } from './ref.js';
|
|
16
9
|
import { c as classNames } from './class-names.js';
|
|
17
10
|
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* A form-associated base class for the {@link @microsoft/fast-foundation#(NumberField:class)} component.
|
|
22
|
-
*
|
|
23
|
-
* @internal
|
|
24
|
-
*/
|
|
25
|
-
class FormAssociatedNumberField extends FormAssociated(_NumberField) {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
this.proxy = document.createElement("input");
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* A Number Field Custom HTML Element.
|
|
34
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number | <input type="number" /> element }.
|
|
35
|
-
*
|
|
36
|
-
* @slot start - Content which can be provided before the number field input
|
|
37
|
-
* @slot end - Content which can be provided after the number field input
|
|
38
|
-
* @slot - The default slot for the label
|
|
39
|
-
* @slot step-up-glyph - The glyph for the step up control
|
|
40
|
-
* @slot step-down-glyph - The glyph for the step down control
|
|
41
|
-
* @csspart label - The label
|
|
42
|
-
* @csspart root - The element wrapping the control, including start and end slots
|
|
43
|
-
* @csspart control - The element representing the input
|
|
44
|
-
* @csspart controls - The step up and step down controls
|
|
45
|
-
* @csspart step-up - The step up control
|
|
46
|
-
* @csspart step-down - The step down control
|
|
47
|
-
* @fires input - Fires a custom 'input' event when the value has changed
|
|
48
|
-
* @fires change - Fires a custom 'change' event when the value has changed
|
|
49
|
-
*
|
|
50
|
-
* @public
|
|
51
|
-
*/
|
|
52
|
-
class NumberField$1 extends FormAssociatedNumberField {
|
|
53
|
-
constructor() {
|
|
54
|
-
super(...arguments);
|
|
55
|
-
/**
|
|
56
|
-
* When true, spin buttons will not be rendered
|
|
57
|
-
* @public
|
|
58
|
-
* @remarks
|
|
59
|
-
* HTML Attribute: autofocus
|
|
60
|
-
*/
|
|
61
|
-
this.hideStep = false;
|
|
62
|
-
/**
|
|
63
|
-
* Amount to increment or decrement the value by
|
|
64
|
-
* @public
|
|
65
|
-
* @remarks
|
|
66
|
-
* HTMLAttribute: step
|
|
67
|
-
*/
|
|
68
|
-
this.step = 1;
|
|
69
|
-
/**
|
|
70
|
-
* Flag to indicate that the value change is from the user input
|
|
71
|
-
* @internal
|
|
72
|
-
*/
|
|
73
|
-
this.isUserInput = false;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Ensures that the max is greater than the min and that the value
|
|
77
|
-
* is less than the max
|
|
78
|
-
* @param previous - the previous max value
|
|
79
|
-
* @param next - updated max value
|
|
80
|
-
*
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
|
-
maxChanged(previous, next) {
|
|
84
|
-
var _a;
|
|
85
|
-
this.max = Math.max(next, (_a = this.min) !== null && _a !== void 0 ? _a : next);
|
|
86
|
-
const min = Math.min(this.min, this.max);
|
|
87
|
-
if (this.min !== undefined && this.min !== min) {
|
|
88
|
-
this.min = min;
|
|
89
|
-
}
|
|
90
|
-
this.value = this.getValidValue(this.value);
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Ensures that the min is less than the max and that the value
|
|
94
|
-
* is greater than the min
|
|
95
|
-
* @param previous - previous min value
|
|
96
|
-
* @param next - updated min value
|
|
97
|
-
*
|
|
98
|
-
* @internal
|
|
99
|
-
*/
|
|
100
|
-
minChanged(previous, next) {
|
|
101
|
-
var _a;
|
|
102
|
-
this.min = Math.min(next, (_a = this.max) !== null && _a !== void 0 ? _a : next);
|
|
103
|
-
const max = Math.max(this.min, this.max);
|
|
104
|
-
if (this.max !== undefined && this.max !== max) {
|
|
105
|
-
this.max = max;
|
|
106
|
-
}
|
|
107
|
-
this.value = this.getValidValue(this.value);
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* The value property, typed as a number.
|
|
111
|
-
*
|
|
112
|
-
* @public
|
|
113
|
-
*/
|
|
114
|
-
get valueAsNumber() {
|
|
115
|
-
return parseFloat(super.value);
|
|
116
|
-
}
|
|
117
|
-
set valueAsNumber(next) {
|
|
118
|
-
this.value = next.toString();
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Validates that the value is a number between the min and max
|
|
122
|
-
* @param previous - previous stored value
|
|
123
|
-
* @param next - value being updated
|
|
124
|
-
* @param updateControl - should the text field be updated with value, defaults to true
|
|
125
|
-
* @internal
|
|
126
|
-
*/
|
|
127
|
-
valueChanged(previous, next) {
|
|
128
|
-
this.value = this.getValidValue(next);
|
|
129
|
-
if (next !== this.value) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
if (this.control && !this.isUserInput) {
|
|
133
|
-
this.control.value = this.value;
|
|
134
|
-
}
|
|
135
|
-
super.valueChanged(previous, this.value);
|
|
136
|
-
if (previous !== undefined && !this.isUserInput) {
|
|
137
|
-
this.$emit("input");
|
|
138
|
-
this.$emit("change");
|
|
139
|
-
}
|
|
140
|
-
this.isUserInput = false;
|
|
141
|
-
}
|
|
142
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
143
|
-
validate() {
|
|
144
|
-
super.validate(this.control);
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Sets the internal value to a valid number between the min and max properties
|
|
148
|
-
* @param value - user input
|
|
149
|
-
*
|
|
150
|
-
* @internal
|
|
151
|
-
*/
|
|
152
|
-
getValidValue(value) {
|
|
153
|
-
var _a, _b;
|
|
154
|
-
let validValue = parseFloat(parseFloat(value).toPrecision(12));
|
|
155
|
-
if (isNaN(validValue)) {
|
|
156
|
-
validValue = "";
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
validValue = Math.min(validValue, (_a = this.max) !== null && _a !== void 0 ? _a : validValue);
|
|
160
|
-
validValue = Math.max(validValue, (_b = this.min) !== null && _b !== void 0 ? _b : validValue).toString();
|
|
161
|
-
}
|
|
162
|
-
return validValue;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Increments the value using the step value
|
|
166
|
-
*
|
|
167
|
-
* @public
|
|
168
|
-
*/
|
|
169
|
-
stepUp() {
|
|
170
|
-
const value = parseFloat(this.value);
|
|
171
|
-
const stepUpValue = !isNaN(value)
|
|
172
|
-
? value + this.step
|
|
173
|
-
: this.min > 0
|
|
174
|
-
? this.min
|
|
175
|
-
: this.max < 0
|
|
176
|
-
? this.max
|
|
177
|
-
: !this.min
|
|
178
|
-
? this.step
|
|
179
|
-
: 0;
|
|
180
|
-
this.value = stepUpValue.toString();
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Decrements the value using the step value
|
|
184
|
-
*
|
|
185
|
-
* @public
|
|
186
|
-
*/
|
|
187
|
-
stepDown() {
|
|
188
|
-
const value = parseFloat(this.value);
|
|
189
|
-
const stepDownValue = !isNaN(value)
|
|
190
|
-
? value - this.step
|
|
191
|
-
: this.min > 0
|
|
192
|
-
? this.min
|
|
193
|
-
: this.max < 0
|
|
194
|
-
? this.max
|
|
195
|
-
: !this.min
|
|
196
|
-
? 0 - this.step
|
|
197
|
-
: 0;
|
|
198
|
-
this.value = stepDownValue.toString();
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Sets up the initial state of the number field
|
|
202
|
-
* @internal
|
|
203
|
-
*/
|
|
204
|
-
connectedCallback() {
|
|
205
|
-
super.connectedCallback();
|
|
206
|
-
this.proxy.setAttribute("type", "number");
|
|
207
|
-
this.validate();
|
|
208
|
-
this.control.value = this.value;
|
|
209
|
-
if (this.autofocus) {
|
|
210
|
-
DOM.queueUpdate(() => {
|
|
211
|
-
this.focus();
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Selects all the text in the number field
|
|
217
|
-
*
|
|
218
|
-
* @public
|
|
219
|
-
*/
|
|
220
|
-
select() {
|
|
221
|
-
this.control.select();
|
|
222
|
-
/**
|
|
223
|
-
* The select event does not permeate the shadow DOM boundary.
|
|
224
|
-
* This fn effectively proxies the select event,
|
|
225
|
-
* emitting a `select` event whenever the internal
|
|
226
|
-
* control emits a `select` event
|
|
227
|
-
*/
|
|
228
|
-
this.$emit("select");
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Handles the internal control's `input` event
|
|
232
|
-
* @internal
|
|
233
|
-
*/
|
|
234
|
-
handleTextInput() {
|
|
235
|
-
this.control.value = this.control.value.replace(/[^0-9\-+e.]/g, "");
|
|
236
|
-
this.isUserInput = true;
|
|
237
|
-
this.value = this.control.value;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Change event handler for inner control.
|
|
241
|
-
* @remarks
|
|
242
|
-
* "Change" events are not `composable` so they will not
|
|
243
|
-
* permeate the shadow DOM boundary. This fn effectively proxies
|
|
244
|
-
* the change event, emitting a `change` event whenever the internal
|
|
245
|
-
* control emits a `change` event
|
|
246
|
-
* @internal
|
|
247
|
-
*/
|
|
248
|
-
handleChange() {
|
|
249
|
-
this.$emit("change");
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Handles the internal control's `keydown` event
|
|
253
|
-
* @internal
|
|
254
|
-
*/
|
|
255
|
-
handleKeyDown(e) {
|
|
256
|
-
const key = e.key;
|
|
257
|
-
switch (key) {
|
|
258
|
-
case keyArrowUp:
|
|
259
|
-
this.stepUp();
|
|
260
|
-
return false;
|
|
261
|
-
case keyArrowDown:
|
|
262
|
-
this.stepDown();
|
|
263
|
-
return false;
|
|
264
|
-
}
|
|
265
|
-
return true;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Handles populating the input field with a validated value when
|
|
269
|
-
* leaving the input field.
|
|
270
|
-
* @internal
|
|
271
|
-
*/
|
|
272
|
-
handleBlur() {
|
|
273
|
-
this.control.value = this.value;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
__decorate([
|
|
277
|
-
attr({ attribute: "readonly", mode: "boolean" })
|
|
278
|
-
], NumberField$1.prototype, "readOnly", void 0);
|
|
279
|
-
__decorate([
|
|
280
|
-
attr({ mode: "boolean" })
|
|
281
|
-
], NumberField$1.prototype, "autofocus", void 0);
|
|
282
|
-
__decorate([
|
|
283
|
-
attr({ attribute: "hide-step", mode: "boolean" })
|
|
284
|
-
], NumberField$1.prototype, "hideStep", void 0);
|
|
285
|
-
__decorate([
|
|
286
|
-
attr
|
|
287
|
-
], NumberField$1.prototype, "placeholder", void 0);
|
|
288
|
-
__decorate([
|
|
289
|
-
attr
|
|
290
|
-
], NumberField$1.prototype, "list", void 0);
|
|
291
|
-
__decorate([
|
|
292
|
-
attr({ converter: nullableNumberConverter })
|
|
293
|
-
], NumberField$1.prototype, "maxlength", void 0);
|
|
294
|
-
__decorate([
|
|
295
|
-
attr({ converter: nullableNumberConverter })
|
|
296
|
-
], NumberField$1.prototype, "minlength", void 0);
|
|
297
|
-
__decorate([
|
|
298
|
-
attr({ converter: nullableNumberConverter })
|
|
299
|
-
], NumberField$1.prototype, "size", void 0);
|
|
300
|
-
__decorate([
|
|
301
|
-
attr({ converter: nullableNumberConverter })
|
|
302
|
-
], NumberField$1.prototype, "step", void 0);
|
|
303
|
-
__decorate([
|
|
304
|
-
attr({ converter: nullableNumberConverter })
|
|
305
|
-
], NumberField$1.prototype, "max", void 0);
|
|
306
|
-
__decorate([
|
|
307
|
-
attr({ converter: nullableNumberConverter })
|
|
308
|
-
], NumberField$1.prototype, "min", void 0);
|
|
309
|
-
__decorate([
|
|
310
|
-
observable
|
|
311
|
-
], NumberField$1.prototype, "defaultSlottedNodes", void 0);
|
|
312
|
-
applyMixins(NumberField$1, StartEnd, DelegatesARIATextbox);
|
|
313
|
-
|
|
314
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 25 Jul 2023 07:38:24 GMT\n */\n:host {\n display: inline-block;\n}\n\n.base {\n --_text-field-gutter: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) / 2.5);\n --_text-field-icon-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) / 2);\n display: inline-grid;\n width: 100%;\n gap: 4px;\n grid-template-columns: min-content 1fr max-content;\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--_connotation-color-backdrop);\n --_appearance-color-outline: var(--_connotation-color-intermediate);\n}\n.base.appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--_connotation-color-backdrop);\n --_appearance-color-outline: var(--_connotation-color-firm);\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)).appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-300);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-300);\n}\n.base:where(:disabled, .disabled).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-300);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.readonly):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-neutral-200);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(.readonly):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-600);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base.connotation-success {\n /* @cssprop [--vvd-text-field-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-text-field-success-primary, var(--vvd-color-success-500));\n /* @cssprop [--vvd-text-field-success-backdrop=var(--vvd-color-success-50)] */\n --_connotation-color-backdrop: var(--vvd-text-field-success-backdrop, var(--vvd-color-success-50));\n /* @cssprop [--vvd-text-field-success-intermediate=var(--vvd-color-success-500)] */\n --_connotation-color-intermediate: var(--vvd-text-field-success-intermediate, var(--vvd-color-success-500));\n /* @cssprop [--vvd-text-field-success-firm=var(--vvd-color-success-600)] */\n --_connotation-color-firm: var(--vvd-text-field-success-firm, var(--vvd-color-success-600));\n /* @cssprop [--vvd-text-field-success-faint=var(--vvd-color-success-50)] */\n --_connotation-color-faint: var(--vvd-text-field-success-faint, var(--vvd-color-success-50));\n /* @cssprop [--vvd-text-field-success-soft=var(--vvd-color-success-100)] */\n --_connotation-color-soft: var(--vvd-text-field-success-soft, var(--vvd-color-success-100));\n}\n.base.connotation-alert {\n /* @cssprop [--vvd-text-field-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-text-field-alert-primary, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-text-field-alert-backdrop=var(--vvd-color-alert-50)] */\n --_connotation-color-backdrop: var(--vvd-text-field-alert-backdrop, var(--vvd-color-alert-50));\n /* @cssprop [--vvd-text-field-alert-intermediate=var(--vvd-color-alert-500)] */\n --_connotation-color-intermediate: var(--vvd-text-field-alert-intermediate, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-text-field-alert-firm=var(--vvd-color-alert-600)] */\n --_connotation-color-firm: var(--vvd-text-field-alert-firm, var(--vvd-color-alert-600));\n /* @cssprop [--vvd-text-field-alert-faint=var(--vvd-color-alert-50)] */\n --_connotation-color-faint: var(--vvd-text-field-alert-faint, var(--vvd-color-alert-50));\n /* @cssprop [--vvd-text-field-alert-soft=var(--vvd-color-alert-100)] */\n --_connotation-color-soft: var(--vvd-text-field-alert-soft, var(--vvd-color-alert-100));\n}\n.base:not(.connotation-success, .connotation-alert) {\n /* @cssprop [--vvd-text-field-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-text-field-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-text-field-accent-backdrop=var(--vvd-color-canvas)] */\n --_connotation-color-backdrop: var(--vvd-text-field-accent-backdrop, var(--vvd-color-canvas));\n /* @cssprop [--vvd-text-field-accent-intermediate=var(--vvd-color-neutral-500)] */\n --_connotation-color-intermediate: var(--vvd-text-field-accent-intermediate, var(--vvd-color-neutral-500));\n /* @cssprop [--vvd-text-field-accent-firm=var(--vvd-color-canvas-text)] */\n --_connotation-color-firm: var(--vvd-text-field-accent-firm, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-text-field-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-text-field-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-text-field-accent-soft=var(--vvd-color-neutral-100)] */\n --_connotation-color-soft: var(--vvd-text-field-accent-soft, var(--vvd-color-neutral-100));\n}\n@supports (user-select: none) {\n .base {\n user-select: none;\n }\n}\n.base:not(.disabled) {\n --_low-ink-color: var(--vvd-color-neutral-600);\n}\n.base.disabled {\n --_low-ink-color: var(--_appearance-color-text);\n}\n\n.label {\n color: var(--vvd-color-canvas-text);\n contain: inline-size;\n font: var(--vvd-typography-base);\n grid-column: 1/4;\n grid-row: 1;\n}\n.char-count + .label {\n grid-column: 1/3;\n}\n\n.char-count {\n color: var(--_low-ink-color);\n font: var(--vvd-typography-base);\n grid-column: 3/4;\n}\n\n.fieldset {\n position: relative;\n display: flex;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n font: var(--vvd-typography-base);\n grid-column: 1/4;\n padding-block: 0;\n transition: color 0.2s, box-shadow 0.2s, background-color 0.2s;\n /* Shape */\n}\n.base > .fieldset {\n block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}\n.base:not(.shape-pill) .fieldset {\n border-radius: 6px;\n}\n.base.shape-pill .fieldset {\n border-radius: 24px;\n}\n\n.wrapper {\n position: relative;\n block-size: 100%;\n border-radius: inherit;\n inline-size: 100%;\n}\n\n.control {\n width: 100%;\n box-sizing: border-box;\n border: 0 none;\n appearance: none; /* for box-shadow visibility on IOS */\n background-color: transparent;\n block-size: 100%;\n border-radius: inherit;\n color: inherit;\n font: inherit;\n padding-block: 0;\n padding-inline-end: var(--_text-field-gutter);\n padding-inline-start: var(--_text-field-gutter);\n}\n.control:disabled {\n cursor: not-allowed;\n opacity: 1; /* 2. correct opacity on iOS */\n -webkit-text-fill-color: var(--_appearance-color-text); /* 1. sets text fill to current `color` for safari */\n}\n.control::placeholder, .control:disabled::placeholder {\n opacity: 1; /* 2. correct opacity on iOS */\n -webkit-text-fill-color: var(--_low-ink-color); /* 1. sets text fill to current `color` for safari */\n}\n.base.action-items .control {\n padding-inline-end: var(--text-field-inline-end-padding, calc(var(--_text-field-icon-size) + var(--_text-field-gutter)));\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n\n.action-items-wrapper {\n position: absolute;\n inset-inline-end: calc(var(--_text-field-gutter) / 4);\n}\n.base:not(.action-items) .action-items-wrapper {\n display: none;\n}\n\n.icon {\n position: absolute;\n z-index: 1;\n color: var(--_low-ink-color);\n font-size: var(--_text-field-icon-size);\n inset-inline-start: var(--_text-field-gutter);\n line-height: 1;\n}\n.icon + .wrapper .control {\n padding-inline-start: calc(var(--_text-field-icon-size) + var(--_text-field-gutter) * 2);\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n pointer-events: none;\n}\n.wrapper:not(:focus-visible, :focus-within) > .focus-indicator, .fieldset:not(:focus-visible, :focus-within) > .focus-indicator {\n display: none;\n}\n\n.control {\n padding-inline-end: 70px;\n}\n.control::-webkit-outer-spin-button, .control::-webkit-inner-spin-button {\n appearance: none;\n}\n.control-buttons {\n position: absolute;\n z-index: 1;\n right: 3px;\n display: flex;\n}\n.readonly .control-buttons, .disabled .control-buttons {\n pointer-events: none;\n}\n.control-buttons .divider {\n margin-block: 8px;\n}\n.control-buttons > * {\n flex-shrink: 0;\n}\n\n.disabled .focus-indicator {\n display: none;\n pointer-events: none;\n}";
|
|
11
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Aug 2023 18:00:27 GMT\n */\n.base {\n display: flex;\n align-items: flex-start;\n padding: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 20));\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n column-gap: 16px;\n}\n.base.connotation-success {\n /* @cssprop [--vvd-note-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-note-success-primary, var(--vvd-color-success-500));\n /* @cssprop [--vvd-note-success-intermediate=var(--vvd-color-success-500)] */\n --_connotation-color-intermediate: var(--vvd-note-success-intermediate, var(--vvd-color-success-500));\n /* @cssprop [--vvd-note-success-backdrop=var(--vvd-color-success-50)] */\n --_connotation-color-backdrop: var(--vvd-note-success-backdrop, var(--vvd-color-success-50));\n}\n.base.connotation-information {\n /* @cssprop [--vvd-note-information-primary=var(--vvd-color-information-500)] */\n --_connotation-color-primary: var(--vvd-note-information-primary, var(--vvd-color-information-500));\n /* @cssprop [--vvd-note-information-intermediate=var(--vvd-color-information-500)] */\n --_connotation-color-intermediate: var(--vvd-note-information-intermediate, var(--vvd-color-information-500));\n /* @cssprop [--vvd-note-information-backdrop=var(--vvd-color-information-50)] */\n --_connotation-color-backdrop: var(--vvd-note-information-backdrop, var(--vvd-color-information-50));\n}\n.base.connotation-alert {\n /* @cssprop [--vvd-note-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-note-alert-primary, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-note-alert-intermediate=var(--vvd-color-alert-500)] */\n --_connotation-color-intermediate: var(--vvd-note-alert-intermediate, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-note-alert-backdrop=var(--vvd-color-alert-50)] */\n --_connotation-color-backdrop: var(--vvd-note-alert-backdrop, var(--vvd-color-alert-50));\n}\n.base.connotation-warning {\n /* @cssprop [--vvd-note-warning-primary=var(--vvd-color-warning-300)] */\n --_connotation-color-primary: var(--vvd-note-warning-primary, var(--vvd-color-warning-300));\n /* @cssprop [--vvd-note-warning-intermediate=var(--vvd-color-warning-300)] */\n --_connotation-color-intermediate: var(--vvd-note-warning-intermediate, var(--vvd-color-warning-300));\n /* @cssprop [--vvd-note-warning-backdrop=var(--vvd-color-warning-50)] */\n --_connotation-color-backdrop: var(--vvd-note-warning-backdrop, var(--vvd-color-warning-50));\n}\n.base:not(.connotation-success, .connotation-information, .connotation-alert, .connotation-warning) {\n /* @cssprop [--vvd-note-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-note-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-note-accent-intermediate=var(--vvd-color-neutral-500)] */\n --_connotation-color-intermediate: var(--vvd-note-accent-intermediate, var(--vvd-color-neutral-500));\n /* @cssprop [--vvd-note-accent-backdrop=var(--vvd-color-canvas)] */\n --_connotation-color-backdrop: var(--vvd-note-accent-backdrop, var(--vvd-color-canvas));\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--_connotation-color-backdrop);\n --_appearance-color-outline: var(--_connotation-color-intermediate);\n}\n@supports (contain: content) {\n .base {\n contain: content;\n }\n}\n@supports not (contain: content) {\n .base {\n overflow: hidden;\n }\n}\n\n.icon {\n color: var(--_appearance-color-outline);\n font-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n\n.text {\n display: flex;\n min-height: 24px;\n flex-direction: column;\n flex-grow: 1;\n align-items: flex-start;\n justify-content: center;\n gap: 4px;\n text-align: start;\n}\n.text .headline {\n font: var(--vvd-typography-base-bold);\n}\n.text .message {\n font: var(--vvd-typography-base);\n}";
|
|
315
12
|
|
|
316
|
-
|
|
317
|
-
__decorate([attr, __metadata("design:type", String)],
|
|
318
|
-
__decorate([attr, __metadata("design:type", String)],
|
|
319
|
-
|
|
320
|
-
NumberField = __decorate([formElements], NumberField);
|
|
321
|
-
applyMixins(NumberField, AffixIcon, FormElementCharCount, FormElementHelperText, FormElementSuccessText);
|
|
13
|
+
class Note extends FoundationElement {}
|
|
14
|
+
__decorate([attr, __metadata("design:type", String)], Note.prototype, "headline", void 0);
|
|
15
|
+
__decorate([attr, __metadata("design:type", String)], Note.prototype, "connotation", void 0);
|
|
16
|
+
applyMixins(Note, AffixIcon);
|
|
322
17
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
const
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
successText
|
|
339
|
-
}) => classNames(['error connotation-alert', Boolean(errorValidationMessage)], ['disabled', disabled], ['has-value', Boolean(value)], ['readonly', readOnly], ['placeholder', Boolean(placeholder)], [`appearance-${appearance}`, Boolean(appearance)], [`shape-${shape}`, Boolean(shape)], ['no-label', !label], ['success connotation-success', !!successText]);
|
|
340
|
-
function renderLabel() {
|
|
341
|
-
return html(_t || (_t = _`
|
|
342
|
-
<label for="control" class="label">
|
|
343
|
-
${0}
|
|
344
|
-
</label>`), x => x.label);
|
|
345
|
-
}
|
|
346
|
-
function adjustValueByStep(numberField, direction = ADD) {
|
|
347
|
-
numberField.value = (Number(numberField.value) + direction * (numberField.step ? numberField.step : 1)).toString();
|
|
348
|
-
}
|
|
349
|
-
function setControlButtonShape(numberField) {
|
|
350
|
-
return numberField.shape === Shape.Pill ? Shape.Pill : null;
|
|
351
|
-
}
|
|
352
|
-
function getTabIndex(numberField) {
|
|
353
|
-
return numberField.disabled || numberField.readOnly ? '-1' : null;
|
|
354
|
-
}
|
|
355
|
-
function numberControlButtons(context) {
|
|
356
|
-
const buttonTag = context.tagFor(Button);
|
|
357
|
-
const dividerTag = context.tagFor(Divider);
|
|
358
|
-
return html(_t2 || (_t2 = _`
|
|
359
|
-
<div class="control-buttons"
|
|
360
|
-
?inert="${0}">
|
|
361
|
-
<${0} id="subtract" icon="minus-line"
|
|
362
|
-
aria-controls="control"
|
|
363
|
-
shape="${0}"
|
|
364
|
-
size="condensed"
|
|
365
|
-
tabindex="${0}"
|
|
366
|
-
@click="${0}"></${0}>
|
|
367
|
-
<${0} class="divider" orientation="vertical"></${0}>
|
|
368
|
-
<${0} id="add" icon="plus-line"
|
|
369
|
-
aria-controls="control"
|
|
370
|
-
shape="${0}"
|
|
371
|
-
size="condensed"
|
|
372
|
-
tabindex="${0}"
|
|
373
|
-
@click="${0}"></${0}>
|
|
374
|
-
</div>
|
|
375
|
-
`), x => x.disabled || x.readOnly, buttonTag, setControlButtonShape, getTabIndex, x => adjustValueByStep(x, SUBTRACT), buttonTag, dividerTag, dividerTag, buttonTag, setControlButtonShape, getTabIndex, x => adjustValueByStep(x), buttonTag);
|
|
376
|
-
}
|
|
377
|
-
const NumberFieldTemplate = context => {
|
|
378
|
-
const focusTemplate = focusTemplateFactory(context);
|
|
379
|
-
return html(_t3 || (_t3 = _`
|
|
380
|
-
<div class="base ${0}">
|
|
381
|
-
${0}
|
|
382
|
-
<div class="fieldset">
|
|
383
|
-
<input class="control"
|
|
384
|
-
id="control"
|
|
385
|
-
@input="${0}"
|
|
386
|
-
@change="${0}"
|
|
387
|
-
?autofocus="${0}"
|
|
388
|
-
?disabled="${0}"
|
|
389
|
-
list="${0}"
|
|
390
|
-
step="${0}"
|
|
391
|
-
max="${0}"
|
|
392
|
-
min="${0}"
|
|
393
|
-
maxlength="${0}"
|
|
394
|
-
minlength="${0}"
|
|
395
|
-
placeholder="${0}"
|
|
396
|
-
?readonly="${0}"
|
|
397
|
-
?required="${0}"
|
|
398
|
-
size="${0}"
|
|
399
|
-
autocomplete="${0}"
|
|
400
|
-
name="${0}"
|
|
401
|
-
?spellcheck="${0}"
|
|
402
|
-
:value="${0}"
|
|
403
|
-
type="text"
|
|
404
|
-
aria-atomic="${0}"
|
|
405
|
-
aria-busy="${0}"
|
|
406
|
-
aria-controls="${0}"
|
|
407
|
-
aria-current="${0}"
|
|
408
|
-
aria-describedby="${0}"
|
|
409
|
-
aria-details="${0}"
|
|
410
|
-
aria-disabled="${0}"
|
|
411
|
-
aria-errormessage="${0}"
|
|
412
|
-
aria-flowto="${0}"
|
|
413
|
-
aria-haspopup="${0}"
|
|
414
|
-
aria-hidden="${0}"
|
|
415
|
-
aria-invalid="${0}"
|
|
416
|
-
aria-keyshortcuts="${0}"
|
|
417
|
-
aria-label="${0}"
|
|
418
|
-
aria-labelledby="${0}"
|
|
419
|
-
aria-live="${0}"
|
|
420
|
-
aria-owns="${0}"
|
|
421
|
-
aria-relevant="${0}"
|
|
422
|
-
aria-roledescription="${0}"
|
|
423
|
-
${0}
|
|
424
|
-
/>
|
|
425
|
-
${0}
|
|
426
|
-
${0}
|
|
18
|
+
const getClasses = ({
|
|
19
|
+
connotation
|
|
20
|
+
}) => classNames('base', `connotation-${connotation}`);
|
|
21
|
+
function getHeaderTemplate() {
|
|
22
|
+
return html`<div class="headline">${x => x.headline}</div>`;
|
|
23
|
+
}
|
|
24
|
+
const NoteTemplate = context => {
|
|
25
|
+
const iconTag = context.tagFor(Icon);
|
|
26
|
+
return html`
|
|
27
|
+
<div class="${getClasses}">
|
|
28
|
+
${when(x => x.icon, html`<${iconTag} class="icon" name="${x => x.icon}"></${iconTag}>`)}
|
|
29
|
+
<div class="text">
|
|
30
|
+
${when(x => x.headline, getHeaderTemplate())}
|
|
31
|
+
<slot class="message"></slot>
|
|
32
|
+
</div>
|
|
427
33
|
</div>
|
|
428
|
-
|
|
429
|
-
${0}
|
|
430
|
-
${0}
|
|
431
|
-
</div>
|
|
432
|
-
`), getStateClasses, when(x => x.label, renderLabel()), x => x.handleTextInput(), x => x.handleChange(), x => x.autofocus, x => x.disabled, x => x.list, x => x.step ? x.step : null, x => x.max, x => x.min, x => x.maxlength, x => x.minlength, x => x.placeholder, x => x.readOnly, x => x.required, x => x.size, x => x.autoComplete, x => x.name, x => x.spellcheck, x => x.value, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaRelevant, x => x.ariaRoledescription, ref('control'), () => focusTemplate, () => numberControlButtons(context), when(x => {
|
|
433
|
-
var _a;
|
|
434
|
-
return !x.successText && !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
|
|
435
|
-
}, getFeedbackTemplate('helper', context)), when(x => !x.successText && x.errorValidationMessage, getFeedbackTemplate('error', context)), when(x => x.successText, getFeedbackTemplate('success', context)));
|
|
34
|
+
`;
|
|
436
35
|
};
|
|
437
36
|
|
|
438
|
-
const
|
|
439
|
-
baseName: '
|
|
440
|
-
template:
|
|
441
|
-
styles: css_248z
|
|
442
|
-
shadowOptions: {
|
|
443
|
-
delegatesFocus: true
|
|
444
|
-
}
|
|
37
|
+
const noteDefinition = Note.compose({
|
|
38
|
+
baseName: 'note',
|
|
39
|
+
template: NoteTemplate,
|
|
40
|
+
styles: css_248z
|
|
445
41
|
});
|
|
446
|
-
const
|
|
447
|
-
const
|
|
42
|
+
const noteRegistries = [noteDefinition(), ...iconRegistries];
|
|
43
|
+
const registerNote = registerFactory(noteRegistries);
|
|
448
44
|
|
|
449
|
-
export {
|
|
45
|
+
export { noteRegistries as a, noteDefinition as n, registerNote as r };
|