@fusion.dev/helix-headless 0.142.1 → 0.144.0
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/custom-elements.json +25381 -1202
- package/dist/accordion/item/accordion-item.d.ts +38 -2
- package/dist/accordion/item/accordion-item.js +38 -6
- package/dist/accordion/root/accordion-root.d.ts +23 -1
- package/dist/accordion/root/accordion-root.js +39 -3
- package/dist/announcement/root/announcement-root.d.ts +11 -7
- package/dist/announcement/root/announcement-root.js +1 -1
- package/dist/app-header/root/app-header-root.d.ts +21 -0
- package/dist/app-header/root/app-header-root.js +31 -5
- package/dist/area-chart/root/area-chart-root.d.ts +12 -4
- package/dist/area-chart/root/area-chart-root.js +39 -11
- package/dist/avatar/group/avatar-group.d.ts +24 -3
- package/dist/avatar/group/avatar-group.js +34 -2
- package/dist/avatar/root/avatar-root.d.ts +17 -1
- package/dist/avatar/root/avatar-root.js +31 -10
- package/dist/badge/root/badge-root.d.ts +12 -0
- package/dist/badge/root/badge-root.js +1 -1
- package/dist/bar-chart/root/bar-chart-root.d.ts +30 -5
- package/dist/bar-chart/root/bar-chart-root.js +58 -21
- package/dist/blockquote/root/blockquote-root.d.ts +12 -7
- package/dist/blockquote/root/blockquote-root.js +6 -4
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -3
- package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -1
- package/dist/button/root/button-root.d.ts +84 -1
- package/dist/button/root/button-root.js +81 -3
- package/dist/callout/root/callout-root.d.ts +32 -6
- package/dist/callout/root/callout-root.js +26 -7
- package/dist/canvas/root/canvas-root.d.ts +1 -0
- package/dist/canvas/root/canvas-root.js +10 -1
- package/dist/card/root/card-root.d.ts +30 -1
- package/dist/card/root/card-root.js +38 -5
- package/dist/carousel/root/carousel-root.d.ts +47 -5
- package/dist/carousel/root/carousel-root.js +53 -21
- package/dist/chat/composer/chat-composer.d.ts +13 -11
- package/dist/chat/composer/chat-composer.js +6 -12
- package/dist/chat/message/chat-message.js +8 -1
- package/dist/chat/root/chat-root.d.ts +1 -0
- package/dist/chat/root/chat-root.js +2 -1
- package/dist/checkbox/root/checkbox-root.d.ts +7 -0
- package/dist/checkbox/root/checkbox-root.js +9 -3
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +116 -33
- package/dist/checkbox-group/root/checkbox-group-root.js +141 -44
- package/dist/code/root/code-root.d.ts +1 -1
- package/dist/code-block/lines.d.ts +13 -0
- package/dist/code-block/lines.js +2 -0
- package/dist/code-block/root/code-block-root.d.ts +49 -0
- package/dist/code-block/root/code-block-root.js +44 -3
- package/dist/color-input/root/color-input-root.d.ts +60 -2
- package/dist/color-input/root/color-input-root.js +55 -7
- package/dist/color-picker/channels.d.ts +26 -0
- package/dist/color-picker/channels.js +84 -0
- package/dist/color-picker/root/color-picker-root.d.ts +118 -12
- package/dist/color-picker/root/color-picker-root.js +183 -13
- package/dist/combobox/root/combobox-root.d.ts +126 -3
- package/dist/combobox/root/combobox-root.js +224 -21
- package/dist/command/root/command-root.d.ts +47 -10
- package/dist/command/root/command-root.js +45 -4
- package/dist/copy-button/from.d.ts +22 -0
- package/dist/copy-button/from.js +28 -0
- package/dist/copy-button/root/copy-button-root.d.ts +48 -7
- package/dist/copy-button/root/copy-button-root.js +54 -8
- package/dist/data-table/root/data-table-root.d.ts +164 -10
- package/dist/data-table/root/data-table-root.js +488 -57
- package/dist/date-input/root/date-input-root.d.ts +123 -9
- package/dist/date-input/root/date-input-root.js +147 -45
- package/dist/date-picker/root/date-picker-root.d.ts +229 -18
- package/dist/date-picker/root/date-picker-root.js +342 -46
- package/dist/dialog/description.d.ts +9 -0
- package/dist/dialog/description.js +14 -0
- package/dist/dialog/root/dialog-root.d.ts +101 -10
- package/dist/dialog/root/dialog-root.js +83 -4
- package/dist/donut-chart/root/donut-chart-root.d.ts +61 -16
- package/dist/donut-chart/root/donut-chart-root.js +48 -13
- package/dist/drawer/root/drawer-root.d.ts +93 -7
- package/dist/drawer/root/drawer-root.js +126 -5
- package/dist/drawer/swipe-start.d.ts +9 -0
- package/dist/drawer/swipe-start.js +12 -0
- package/dist/drilldown/item/drilldown-item.d.ts +16 -13
- package/dist/drilldown/item/drilldown-item.js +6 -2
- package/dist/drilldown/root/drilldown-root.d.ts +21 -5
- package/dist/drilldown/root/drilldown-root.js +26 -10
- package/dist/element-events.generated.js +42 -13
- package/dist/empty/root/empty-root.d.ts +1 -1
- package/dist/file-input/root/file-input-root.d.ts +65 -1
- package/dist/file-input/root/file-input-root.js +76 -12
- package/dist/file-input/screen.d.ts +35 -0
- package/dist/file-input/screen.js +49 -0
- package/dist/filter-input/menu/filter-menu.d.ts +9 -0
- package/dist/filter-input/menu/filter-menu.js +8 -0
- package/dist/filter-input/root/filter-input-root.d.ts +43 -6
- package/dist/filter-input/root/filter-input-root.js +89 -10
- package/dist/filter-input/suggest.d.ts +17 -0
- package/dist/filter-input/suggest.js +23 -0
- package/dist/format-date/options.d.ts +33 -0
- package/dist/format-date/options.js +42 -0
- package/dist/format-date/root/format-date-root.d.ts +62 -3
- package/dist/format-date/root/format-date-root.js +78 -37
- package/dist/graph/root/graph-root.d.ts +24 -3
- package/dist/graph/root/graph-root.js +66 -12
- package/dist/heatmap/root/buckets.d.ts +2 -1
- package/dist/heatmap/root/buckets.js +5 -1
- package/dist/heatmap/root/heatmap-root.d.ts +47 -9
- package/dist/heatmap/root/heatmap-root.js +46 -18
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.js +2 -0
- package/dist/icon/registry.d.ts +37 -0
- package/dist/icon/registry.js +83 -0
- package/dist/icon/root/icon-root.d.ts +53 -6
- package/dist/icon/root/icon-root.js +72 -4
- package/dist/icon/root/index.d.ts +2 -0
- package/dist/icon/root/index.js +2 -0
- package/dist/icon/set.d.ts +1 -0
- package/dist/icon/set.js +3 -0
- package/dist/icon-button/root/icon-button-root.d.ts +1 -1
- package/dist/image/root/image-root.d.ts +23 -2
- package/dist/image/root/image-root.js +23 -4
- package/dist/input/root/input-root.d.ts +62 -9
- package/dist/input/root/input-root.js +61 -5
- package/dist/kbd/root/kbd-root.d.ts +26 -11
- package/dist/kbd/root/kbd-root.js +35 -38
- package/dist/kbd/shortcut.d.ts +18 -0
- package/dist/kbd/shortcut.js +35 -0
- package/dist/legend/hidden-series.d.ts +8 -0
- package/dist/legend/hidden-series.js +13 -0
- package/dist/legend/root/legend-root.d.ts +63 -0
- package/dist/legend/root/legend-root.js +61 -7
- package/dist/lightbox/item/lightbox-item.d.ts +17 -1
- package/dist/lightbox/item/lightbox-item.js +10 -1
- package/dist/lightbox/root/lightbox-root.d.ts +77 -6
- package/dist/lightbox/root/lightbox-root.js +116 -5
- package/dist/line-chart/root/line-chart-root.d.ts +29 -4
- package/dist/line-chart/root/line-chart-root.js +58 -17
- package/dist/list/item/list-item.d.ts +11 -5
- package/dist/list/item/list-item.js +5 -6
- package/dist/listbox/range.d.ts +17 -0
- package/dist/listbox/range.js +5 -0
- package/dist/listbox/root/listbox-root.d.ts +184 -4
- package/dist/listbox/root/listbox-root.js +229 -23
- package/dist/loader/busy.d.ts +17 -0
- package/dist/loader/busy.js +24 -0
- package/dist/loader/root/loader-root.d.ts +37 -0
- package/dist/loader/root/loader-root.js +52 -3
- package/dist/map/root/map-root.d.ts +19 -4
- package/dist/map/root/map-root.js +36 -7
- package/dist/megamenu/root/megamenu-root.d.ts +10 -1
- package/dist/megamenu/root/megamenu-root.js +10 -1
- package/dist/menu/item/menu-item.d.ts +41 -12
- package/dist/menu/item/menu-item.js +46 -3
- package/dist/menu/root/menu-root.d.ts +32 -2
- package/dist/menu/root/menu-root.js +48 -8
- package/dist/meter/root/meter-root.d.ts +13 -0
- package/dist/meter/root/meter-root.js +24 -5
- package/dist/navigation/root/navigation-root.d.ts +10 -2
- package/dist/navigation/root/navigation-root.js +13 -2
- package/dist/notifications/feed-keys.d.ts +10 -0
- package/dist/notifications/feed-keys.js +14 -0
- package/dist/notifications/group/notification-group.d.ts +1 -0
- package/dist/notifications/notification/notification.d.ts +29 -0
- package/dist/notifications/notification/notification.js +51 -3
- package/dist/notifications/root/notifications-root.d.ts +49 -0
- package/dist/notifications/root/notifications-root.js +76 -2
- package/dist/number-input/root/number-input-root.d.ts +109 -7
- package/dist/number-input/root/number-input-root.js +109 -21
- package/dist/object-inspector/root/object-inspector-root.d.ts +49 -5
- package/dist/object-inspector/root/object-inspector-root.js +92 -12
- package/dist/option/root/option-root.d.ts +58 -6
- package/dist/option/root/option-root.js +35 -5
- package/dist/outline/root/outline-root.d.ts +13 -2
- package/dist/outline/root/outline-root.js +4 -2
- package/dist/pagination/root/pagination-root.d.ts +19 -1
- package/dist/pagination/root/pagination-root.js +49 -9
- package/dist/pagination/size/pagination-size.d.ts +13 -3
- package/dist/pagination/size/pagination-size.js +7 -0
- package/dist/pin-input/format.d.ts +7 -0
- package/dist/pin-input/format.js +16 -0
- package/dist/pin-input/root/pin-input-root.d.ts +37 -0
- package/dist/pin-input/root/pin-input-root.js +48 -7
- package/dist/popover/root/popover-root.d.ts +78 -3
- package/dist/popover/root/popover-root.js +74 -5
- package/dist/progress/root/progress-root.d.ts +23 -1
- package/dist/progress/root/progress-root.js +40 -10
- package/dist/qr-code/export.d.ts +31 -0
- package/dist/qr-code/export.js +10 -0
- package/dist/qr-code/root/qr-code-root.d.ts +45 -0
- package/dist/qr-code/root/qr-code-root.js +78 -3
- package/dist/radio/group/radio-group.d.ts +64 -0
- package/dist/radio/group/radio-group.js +66 -12
- package/dist/radio/root/radio-root.d.ts +8 -5
- package/dist/radio/root/radio-root.js +1 -2
- package/dist/rating/root/rating-root.d.ts +49 -1
- package/dist/rating/root/rating-root.js +69 -10
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +17 -3
- package/dist/scatter-chart/root/scatter-chart-root.js +40 -14
- package/dist/select/root/select-root.d.ts +93 -3
- package/dist/select/root/select-root.js +111 -13
- package/dist/skeleton/root/skeleton-root.d.ts +39 -3
- package/dist/skeleton/root/skeleton-root.js +33 -4
- package/dist/skip-link/root/skip-link-root.d.ts +10 -0
- package/dist/skip-link/root/skip-link-root.js +15 -1
- package/dist/slider/root/slider-root.d.ts +59 -2
- package/dist/slider/root/slider-root.js +82 -8
- package/dist/sparkline/root/sparkline-root.d.ts +9 -10
- package/dist/speed-dial/item/speed-dial-item.d.ts +11 -5
- package/dist/speed-dial/item/speed-dial-item.js +7 -2
- package/dist/speed-dial/root/speed-dial-root.d.ts +15 -4
- package/dist/speed-dial/root/speed-dial-root.js +19 -5
- package/dist/splitter/root/splitter-root.d.ts +28 -6
- package/dist/splitter/root/splitter-root.js +35 -1
- package/dist/stat/root/stat-root.d.ts +9 -1
- package/dist/stat/root/stat-root.js +15 -2
- package/dist/steps/root/steps-root.js +1 -1
- package/dist/steps/step/step.d.ts +1 -0
- package/dist/steps/step/step.js +1 -1
- package/dist/switch/root/switch-root.d.ts +14 -2
- package/dist/switch/root/switch-root.js +7 -1
- package/dist/table/cell/table-cell.d.ts +24 -4
- package/dist/table/cell/table-cell.js +21 -1
- package/dist/table/column/table-column.d.ts +32 -6
- package/dist/table/column/table-column.js +36 -6
- package/dist/table/root/table-root.d.ts +94 -3
- package/dist/table/root/table-root.js +128 -5
- package/dist/table/row/table-row.d.ts +7 -0
- package/dist/table/row/table-row.js +9 -1
- package/dist/tabs/root/tabs-root.d.ts +6 -1
- package/dist/tabs/root/tabs-root.js +6 -2
- package/dist/tag/group/tag-group.d.ts +107 -0
- package/dist/tag/group/tag-group.js +157 -0
- package/dist/tag/index.d.ts +1 -0
- package/dist/tag/index.js +1 -0
- package/dist/tag/root/tag-root.d.ts +83 -1
- package/dist/tag/root/tag-root.js +87 -17
- package/dist/tag/selection.d.ts +10 -0
- package/dist/tag/selection.js +12 -0
- package/dist/textarea/grow.d.ts +22 -0
- package/dist/textarea/grow.js +20 -0
- package/dist/textarea/root/textarea-root.d.ts +13 -0
- package/dist/textarea/root/textarea-root.js +10 -2
- package/dist/time-input/root/time-input-root.d.ts +71 -6
- package/dist/time-input/root/time-input-root.js +110 -44
- package/dist/time-picker/root/time-picker-root.d.ts +155 -26
- package/dist/time-picker/root/time-picker-root.js +192 -63
- package/dist/toast/hotkey.d.ts +22 -0
- package/dist/toast/hotkey.js +23 -0
- package/dist/toast/item/toast-item.d.ts +16 -1
- package/dist/toast/item/toast-item.js +41 -13
- package/dist/toast/root/toast-root.d.ts +105 -8
- package/dist/toast/root/toast-root.js +209 -4
- package/dist/toggle/group/toggle-group.d.ts +95 -16
- package/dist/toggle/group/toggle-group.js +99 -13
- package/dist/toggle/root/toggle-root.d.ts +26 -11
- package/dist/toggle/root/toggle-root.js +14 -6
- package/dist/toolbar/root/toolbar-root.d.ts +55 -15
- package/dist/toolbar/root/toolbar-root.js +99 -16
- package/dist/tooltip/focus-target.d.ts +6 -0
- package/dist/tooltip/focus-target.js +9 -0
- package/dist/tooltip/root/tooltip-root.d.ts +73 -15
- package/dist/tooltip/root/tooltip-root.js +96 -7
- package/dist/tour/naming.d.ts +30 -0
- package/dist/tour/naming.js +10 -0
- package/dist/tour/root/tour-root.d.ts +67 -3
- package/dist/tour/root/tour-root.js +105 -17
- package/dist/tour/stop/tour-stop.d.ts +65 -3
- package/dist/tour/stop/tour-stop.js +61 -11
- package/dist/tour/wait.d.ts +11 -0
- package/dist/tour/wait.js +19 -0
- package/dist/tree/item/tree-item.d.ts +21 -5
- package/dist/tree/item/tree-item.js +14 -4
- package/dist/tree/root/tree-root.d.ts +29 -5
- package/dist/tree/root/tree-root.js +64 -8
- package/dist/trend/root/trend-root.d.ts +36 -1
- package/dist/trend/root/trend-root.js +41 -15
- package/dist/video/root/keys.d.ts +5 -0
- package/dist/video/root/keys.js +13 -1
- package/dist/video/root/video-root.d.ts +19 -0
- package/dist/video/root/video-root.js +48 -4
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +20 -2
- package/dist/video-playlist/menu/video-playlist-menu.js +27 -5
- package/dist/video-playlist/root/video-playlist-root.js +6 -3
- package/dist/virtual-list/root/virtual-list-root.d.ts +52 -4
- package/dist/virtual-list/root/virtual-list-root.js +103 -21
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +9140 -1149
- package/types/svelte.d.ts +1 -0
- package/types/vue.d.ts +2089 -267
|
@@ -2,7 +2,7 @@ import { AriaForwardController, HelixFormElement } from '@fusion.dev/helix-core'
|
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
import '../../date-picker/index.js';
|
|
4
4
|
import '../../tag/index.js';
|
|
5
|
-
declare const HelixHeadlessDateInput_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinPickerEditingInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinPickerFieldInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinTokensInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerValueInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinFieldInterface) & typeof HelixFormElement;
|
|
5
|
+
declare const HelixHeadlessDateInput_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinSegmentedFieldInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinPickerEditingInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinPickerFieldInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinTokensInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerValueInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinFieldInterface) & typeof HelixFormElement;
|
|
6
6
|
/**
|
|
7
7
|
* @summary A date, typed or picked from a calendar.
|
|
8
8
|
*
|
|
@@ -13,7 +13,19 @@ declare const HelixHeadlessDateInput_base: (new (...args: any[]) => import("@fus
|
|
|
13
13
|
*
|
|
14
14
|
* You can type a date as well as pick one. The native `<input type="date">`
|
|
15
15
|
* gives a picker and locale formatting but allows almost no styling, so the
|
|
16
|
-
* field is a text field.
|
|
16
|
+
* field is a text field. Typing sends `input` on each keystroke and `change`
|
|
17
|
+
* when you leave the field, as a text field does. A date picked from the
|
|
18
|
+
* calendar sends both.
|
|
19
|
+
*
|
|
20
|
+
* The trigger and ArrowDown open the calendar with focus on the selected day,
|
|
21
|
+
* Tab moves between the calendar's controls without leaving it, and Escape
|
|
22
|
+
* closes it and returns focus to the field. A press into the field opens the
|
|
23
|
+
* calendar too. Tab into the field opens nothing, and Tab out of the field
|
|
24
|
+
* closes the calendar.
|
|
25
|
+
*
|
|
26
|
+
* With `segmented`, the field is a row of segments in place of the text: a
|
|
27
|
+
* month, a day and a year in the order the locale writes them, each set with
|
|
28
|
+
* digits or the arrow keys. Alt+Down opens the calendar from a segment.
|
|
17
29
|
*
|
|
18
30
|
* @since 0.1.0
|
|
19
31
|
* @status stable
|
|
@@ -23,6 +35,8 @@ declare const HelixHeadlessDateInput_base: (new (...args: any[]) => import("@fus
|
|
|
23
35
|
*
|
|
24
36
|
* @slot feedback - The error message under the field.
|
|
25
37
|
* @slot hint - The help text under the field.
|
|
38
|
+
* @slot next-icon - The icon on the calendar's next month control.
|
|
39
|
+
* @slot previous-icon - The icon on the calendar's previous month control.
|
|
26
40
|
* @slot trigger - The icon on the button that opens the calendar.
|
|
27
41
|
*
|
|
28
42
|
* @event {Event} change - Fired after the value changes.
|
|
@@ -30,18 +44,21 @@ declare const HelixHeadlessDateInput_base: (new (...args: any[]) => import("@fus
|
|
|
30
44
|
* @event {HelixBeforeCloseEvent} helix-before-close - Fired before the calendar closes. Cancelable: call `preventDefault()` to keep it open.
|
|
31
45
|
* @event {HelixBeforeOpenEvent} helix-before-open - Fired before the calendar opens. Cancelable: call `preventDefault()` to keep it closed.
|
|
32
46
|
* @event {Event} input - Fired after the value changes.
|
|
33
|
-
* @event {
|
|
47
|
+
* @event {ToggleEvent} toggle - Fired when the calendar opens or closes, with `newState` and `oldState`.
|
|
34
48
|
*
|
|
35
49
|
* @csspart control - The text input.
|
|
36
50
|
* @csspart date - One held date, as a tag, in `multiple`.
|
|
51
|
+
* @csspart date-cell - The tag's grid cell, which a tag draws only inside a tag group.
|
|
37
52
|
* @csspart date-dismiss - The remove button, when `dismissible`.
|
|
38
53
|
* @csspart date-dismiss-mark - The icon on the remove button, shown when no icon is slotted.
|
|
39
54
|
* @csspart date-label - The label, trimmed to its capitals and baseline.
|
|
55
|
+
* @csspart date-link - The tag's link around its label, which a tag draws only with `href`.
|
|
40
56
|
* @csspart date-start - The category before the label.
|
|
41
57
|
* @csspart feedback - The error message under the field.
|
|
42
58
|
* @csspart field - The box that holds the text and the trigger.
|
|
43
59
|
* @csspart hint - The help text under the field, shown while there is no error.
|
|
44
60
|
* @csspart label - The label above the field.
|
|
61
|
+
* @csspart literal - The text the locale writes between two segments, such as a slash, in `segmented`.
|
|
45
62
|
* @csspart picker - The date picker inside the panel.
|
|
46
63
|
* @csspart picker-cell - One cell in a row of days. A range colors these cells.
|
|
47
64
|
* @csspart picker-cell-range-end - The cell of a range's last day. Applied with `picker-cell`.
|
|
@@ -55,15 +72,25 @@ declare const HelixHeadlessDateInput_base: (new (...args: any[]) => import("@fus
|
|
|
55
72
|
* @csspart picker-grid - The grid of days.
|
|
56
73
|
* @csspart picker-header - The month name and its controls.
|
|
57
74
|
* @csspart picker-heading - The month and year being shown.
|
|
75
|
+
* @csspart picker-heading-button - The calendar's heading as a button that shows the months or the years, where `max-view` is set.
|
|
58
76
|
* @csspart picker-month - One month, with its header and its grid.
|
|
59
77
|
* @csspart picker-months - The row of months.
|
|
60
78
|
* @csspart picker-next - The control that moves to the next month.
|
|
61
79
|
* @csspart picker-next-mark - The icon on the next month control.
|
|
80
|
+
* @csspart picker-period - One month or one year, in the calendar's months and years views.
|
|
81
|
+
* @csspart picker-period-current - This month or this year, beside `picker-period`.
|
|
82
|
+
* @csspart picker-period-disabled - A month or a year wholly outside `min` and `max`, beside `picker-period`.
|
|
83
|
+
* @csspart picker-period-row - One row of three months or years.
|
|
84
|
+
* @csspart picker-period-selected - The month or the year on show, beside `picker-period`.
|
|
85
|
+
* @csspart picker-periods - The grid of months or years.
|
|
62
86
|
* @csspart picker-previous - The control that moves to the previous month.
|
|
63
87
|
* @csspart picker-previous-mark - The icon on the previous month control.
|
|
64
88
|
* @csspart picker-week - One row of days.
|
|
65
89
|
* @csspart picker-weekday - A column header naming a day of the week.
|
|
66
90
|
* @csspart rest - The count of dates beyond the ones shown. It is a `<button>` with `expandable` and a `<span>` without it.
|
|
91
|
+
* @csspart segment - One part of the date, a year, a month or a day, in `segmented`.
|
|
92
|
+
* @csspart segment-placeholder - A segment with nothing in it yet. Applied with `segment`.
|
|
93
|
+
* @csspart segments - The row of segments that holds the date, in `segmented`.
|
|
67
94
|
* @csspart surface - The floating panel.
|
|
68
95
|
* @csspart tags - The row the dates sit in.
|
|
69
96
|
* @csspart trigger - The control that opens the calendar.
|
|
@@ -82,6 +109,12 @@ export declare class HelixHeadlessDateInput extends HelixHeadlessDateInput_base
|
|
|
82
109
|
* postal code can never be filled in for a reader.
|
|
83
110
|
*/
|
|
84
111
|
autocomplete: string;
|
|
112
|
+
/**
|
|
113
|
+
* The name of the calendar's grid of days, read by screen readers.
|
|
114
|
+
*/
|
|
115
|
+
calendarLabel: string;
|
|
116
|
+
/** Typed, so a keystroke is announced as `input` alone. See `announcesInput`. */
|
|
117
|
+
protected readonly announcesInput = true;
|
|
85
118
|
/**
|
|
86
119
|
* How a date is written in the field: `short` through `full`, or ISO.
|
|
87
120
|
*
|
|
@@ -108,19 +141,35 @@ export declare class HelixHeadlessDateInput extends HelixHeadlessDateInput_base
|
|
|
108
141
|
*/
|
|
109
142
|
dateStyle: 'full' | 'iso' | 'long' | 'medium' | 'short';
|
|
110
143
|
/**
|
|
111
|
-
*
|
|
144
|
+
* What each day in the calendar shows, in place of its number: a function
|
|
145
|
+
* given the date as `YYYY-MM-DD`. Handed to the calendar; see Date Picker's
|
|
146
|
+
* `dayContent`.
|
|
147
|
+
*/
|
|
148
|
+
dayContent?: ((date: string) => unknown) | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* Dates that cannot be chosen, as `YYYY-MM-DD`, separated by commas or
|
|
151
|
+
* spaces.
|
|
112
152
|
*/
|
|
113
153
|
disableDates: string;
|
|
114
154
|
/**
|
|
115
155
|
* Days of the week that cannot be chosen, from `0` for Sunday to `6` for
|
|
116
|
-
* Saturday.
|
|
156
|
+
* Saturday, separated by commas or spaces.
|
|
117
157
|
*/
|
|
118
158
|
disableDays: string;
|
|
119
159
|
/**
|
|
120
160
|
* The day in the calendar's first column, from `0` for Sunday to `6` for
|
|
121
161
|
* Saturday.
|
|
162
|
+
*
|
|
163
|
+
* Absent follows `locale`, where the engine knows the week of that language,
|
|
164
|
+
* and is Sunday otherwise.
|
|
122
165
|
*/
|
|
123
|
-
firstDayOfWeek
|
|
166
|
+
firstDayOfWeek?: number;
|
|
167
|
+
/**
|
|
168
|
+
* A rule for which dates cannot be chosen: a function given the date as
|
|
169
|
+
* `YYYY-MM-DD` that returns `true` to bar it. The calendar offers such a date
|
|
170
|
+
* as unavailable, and a typed one is invalid, as with `disable-dates`.
|
|
171
|
+
*/
|
|
172
|
+
isDateUnavailable?: ((date: string) => boolean) | undefined;
|
|
124
173
|
/**
|
|
125
174
|
* The language tag for the names of months and days in the calendar.
|
|
126
175
|
*/
|
|
@@ -129,6 +178,11 @@ export declare class HelixHeadlessDateInput extends HelixHeadlessDateInput_base
|
|
|
129
178
|
* The latest date that can be chosen, as `YYYY-MM-DD`.
|
|
130
179
|
*/
|
|
131
180
|
max: string;
|
|
181
|
+
/**
|
|
182
|
+
* How far the calendar's heading steps back from the days: `month` or
|
|
183
|
+
* `year`. Handed to the calendar; see Date Picker's `max-view`.
|
|
184
|
+
*/
|
|
185
|
+
maxView?: 'month' | 'year';
|
|
132
186
|
/**
|
|
133
187
|
* The earliest date that can be chosen, as `YYYY-MM-DD`.
|
|
134
188
|
*/
|
|
@@ -182,10 +236,39 @@ export declare class HelixHeadlessDateInput extends HelixHeadlessDateInput_base
|
|
|
182
236
|
*/
|
|
183
237
|
protected placed(room: number | undefined): void;
|
|
184
238
|
protected willUpdate(changed: PropertyValues): void;
|
|
239
|
+
/**
|
|
240
|
+
* The name of the calendar's heading where it shows the months, with
|
|
241
|
+
* `{heading}` filled in.
|
|
242
|
+
*/
|
|
243
|
+
monthViewLabel: string;
|
|
244
|
+
/**
|
|
245
|
+
* The name of the calendar's control that moves to the next month.
|
|
246
|
+
*/
|
|
247
|
+
nextLabel: string;
|
|
248
|
+
/**
|
|
249
|
+
* The name of the calendar's control that moves forward a year.
|
|
250
|
+
*/
|
|
251
|
+
nextYearLabel: string;
|
|
252
|
+
/**
|
|
253
|
+
* The name of the calendar's control that moves forward a page of years.
|
|
254
|
+
*/
|
|
255
|
+
nextYearsLabel: string;
|
|
185
256
|
/**
|
|
186
257
|
* The text the field shows before a date is entered.
|
|
187
258
|
*/
|
|
188
259
|
placeholder: string;
|
|
260
|
+
/**
|
|
261
|
+
* The name of the calendar's control that moves to the previous month.
|
|
262
|
+
*/
|
|
263
|
+
previousLabel: string;
|
|
264
|
+
/**
|
|
265
|
+
* The name of the calendar's control that moves back a year.
|
|
266
|
+
*/
|
|
267
|
+
previousYearLabel: string;
|
|
268
|
+
/**
|
|
269
|
+
* The name of the calendar's control that moves back a page of years.
|
|
270
|
+
*/
|
|
271
|
+
previousYearsLabel: string;
|
|
189
272
|
/**
|
|
190
273
|
* The message shown when a range holds more than two dates.
|
|
191
274
|
*
|
|
@@ -221,6 +304,14 @@ export declare class HelixHeadlessDateInput extends HelixHeadlessDateInput_base
|
|
|
221
304
|
* platform's base.
|
|
222
305
|
*/
|
|
223
306
|
step: number;
|
|
307
|
+
/**
|
|
308
|
+
* The message shown when a date is not on `step`.
|
|
309
|
+
*/
|
|
310
|
+
stepMismatchMessage?: string;
|
|
311
|
+
/**
|
|
312
|
+
* The name of the button that opens the calendar, read by screen readers.
|
|
313
|
+
*/
|
|
314
|
+
triggerLabel: string;
|
|
224
315
|
/**
|
|
225
316
|
* What the calendar should show, which is only ever a whole date.
|
|
226
317
|
*
|
|
@@ -230,6 +321,13 @@ export declare class HelixHeadlessDateInput extends HelixHeadlessDateInput_base
|
|
|
230
321
|
* complete.
|
|
231
322
|
*/
|
|
232
323
|
private get picked();
|
|
324
|
+
/**
|
|
325
|
+
* Segments hold one date, so `range` and `multiple` keep the line of text,
|
|
326
|
+
* whose separators and tags are how those modes write several.
|
|
327
|
+
*/
|
|
328
|
+
protected get segmentable(): boolean;
|
|
329
|
+
protected get segmentedKind(): 'date';
|
|
330
|
+
protected get segmentLocale(): string;
|
|
233
331
|
/** One date, written the way `dateStyle` asks for. */
|
|
234
332
|
private written;
|
|
235
333
|
protected get display(): string;
|
|
@@ -259,10 +357,14 @@ export declare class HelixHeadlessDateInput extends HelixHeadlessDateInput_base
|
|
|
259
357
|
/** What is wrong with the dates, which the text input cannot say. */
|
|
260
358
|
protected validate(): string;
|
|
261
359
|
/**
|
|
262
|
-
* The
|
|
360
|
+
* The message shown when `disable-dates` or `disable-days` bars a date.
|
|
263
361
|
*/
|
|
264
|
-
|
|
265
|
-
|
|
362
|
+
unavailableMessage?: string;
|
|
363
|
+
/**
|
|
364
|
+
* The name of the calendar's heading where it shows a page of years, with
|
|
365
|
+
* `{heading}` filled in.
|
|
366
|
+
*/
|
|
367
|
+
yearViewLabel: string;
|
|
266
368
|
/**
|
|
267
369
|
* The calendar the field opens, behind a seam the styled tier can move.
|
|
268
370
|
*
|
|
@@ -273,6 +375,18 @@ export declare class HelixHeadlessDateInput extends HelixHeadlessDateInput_base
|
|
|
273
375
|
* one from the same template.
|
|
274
376
|
*/
|
|
275
377
|
protected renderPicker(): TemplateResult;
|
|
378
|
+
/**
|
|
379
|
+
* Passes an icon slotted on the field to the calendar's slot of that name.
|
|
380
|
+
*
|
|
381
|
+
* **Forwarded only while the field holds one.** A forwarded slot is assigned
|
|
382
|
+
* to the calendar's slot even when it is empty, and an assigned slot does
|
|
383
|
+
* not show its fallback, so the calendar's own caret went missing whenever
|
|
384
|
+
* the field had no icon. With no `slot` attribute the forwarding slot is
|
|
385
|
+
* assigned nowhere, as the calendar has no default slot, and it still hears
|
|
386
|
+
* an icon arrive or leave.
|
|
387
|
+
*/
|
|
388
|
+
private renderIconSlot;
|
|
389
|
+
private readonly handleIconChange;
|
|
276
390
|
/**
|
|
277
391
|
* One chosen date, as a tag, behind a seam the styled tier can move.
|
|
278
392
|
*
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { AriaForwardController, valueAsDate as asDate, customElement, fillTemplate, dateAsValue as fromDate, HelixFormElement, isDateValue, MixinControllerOpen, MixinControllerValue, MixinField, MixinPickerEditing, MixinPickerField, MixinTokens, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { AriaForwardController, valueAsDate as asDate, barredBy, customElement, fillTemplate, dateAsValue as fromDate, HelixFormElement, isDateValue, MixinControllerOpen, MixinControllerValue, MixinField, MixinPickerEditing, MixinPickerField, MixinSegmentedField, MixinTokens, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { calendarBlank } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { nothing } from 'lit';
|
|
10
10
|
import { property, state } from 'lit/decorators.js';
|
|
@@ -17,26 +17,35 @@ const dates = (value) => value
|
|
|
17
17
|
.split(',')
|
|
18
18
|
.map((one) => one.trim())
|
|
19
19
|
.filter(Boolean);
|
|
20
|
-
let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinPickerEditing(MixinPickerField(MixinControllerOpen(MixinTokens(MixinControllerValue(MixinField(HelixFormElement)))))) {
|
|
20
|
+
let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinSegmentedField(MixinPickerEditing(MixinPickerField(MixinControllerOpen(MixinTokens(MixinControllerValue(MixinField(HelixFormElement))))))) {
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
23
23
|
this.aria = new AriaForwardController(this, {
|
|
24
|
-
target: () => this.partNamed('control'),
|
|
24
|
+
target: () => this.partNamed('control') ?? this.segmentGroup,
|
|
25
25
|
});
|
|
26
26
|
this.autocomplete = '';
|
|
27
|
+
this.calendarLabel = 'Date Picker';
|
|
28
|
+
this.announcesInput = true;
|
|
27
29
|
this.dateStyle = 'long';
|
|
28
30
|
this.disableDates = '';
|
|
29
31
|
this.disableDays = '';
|
|
30
|
-
this.firstDayOfWeek = 0;
|
|
31
32
|
this.locale = '';
|
|
32
33
|
this.max = '';
|
|
33
34
|
this.min = '';
|
|
34
35
|
this.months = 1;
|
|
35
36
|
this.fitted = undefined;
|
|
36
37
|
this.wide = undefined;
|
|
38
|
+
this.monthViewLabel = '{heading}. Choose a month';
|
|
39
|
+
this.nextLabel = 'Next month';
|
|
40
|
+
this.nextYearLabel = 'Next year';
|
|
41
|
+
this.nextYearsLabel = 'Later years';
|
|
37
42
|
this.placeholder = 'YYYY-MM-DD';
|
|
43
|
+
this.previousLabel = 'Previous month';
|
|
44
|
+
this.previousYearLabel = 'Previous year';
|
|
45
|
+
this.previousYearsLabel = 'Earlier years';
|
|
38
46
|
this.removeLabel = 'Remove {name}';
|
|
39
47
|
this.step = 1;
|
|
48
|
+
this.triggerLabel = 'Choose a date';
|
|
40
49
|
this.draft = '';
|
|
41
50
|
this.handleInput = (event) => {
|
|
42
51
|
event.stopPropagation();
|
|
@@ -59,30 +68,37 @@ let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinPickerEdi
|
|
|
59
68
|
if (event.key === 'Enter' && isDateValue(this.draft)) {
|
|
60
69
|
event.preventDefault();
|
|
61
70
|
if (!held.includes(this.draft)) {
|
|
62
|
-
this.
|
|
71
|
+
this.requestPicked([...held, this.draft].join(','));
|
|
63
72
|
}
|
|
64
73
|
this.draft = '';
|
|
65
74
|
}
|
|
66
75
|
else if (event.key === 'Backspace' && this.draft === '' && held.length > 0) {
|
|
67
|
-
this.
|
|
76
|
+
this.requestPicked(held.slice(0, -1).join(','));
|
|
68
77
|
}
|
|
69
78
|
};
|
|
70
79
|
this.removeDate = (date) => {
|
|
71
|
-
this.
|
|
80
|
+
this.requestPicked(dates(this.value)
|
|
72
81
|
.filter((one) => one !== date)
|
|
73
82
|
.join(','));
|
|
74
83
|
};
|
|
75
84
|
this.handleCalendarChange = (event) => {
|
|
76
85
|
event.stopPropagation();
|
|
77
86
|
const { value } = event.detail;
|
|
78
|
-
this.
|
|
87
|
+
if (!this.requestPicked(value)) {
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
this.restore();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
79
92
|
this.restore();
|
|
80
93
|
if (this.mode === undefined) {
|
|
81
94
|
this.requestOpen(false);
|
|
82
95
|
this.updateComplete.then(() => this.returnFocus());
|
|
83
96
|
}
|
|
84
97
|
};
|
|
85
|
-
this.
|
|
98
|
+
this.yearViewLabel = '{heading}. Choose a year';
|
|
99
|
+
this.handleIconChange = () => {
|
|
100
|
+
this.requestUpdate();
|
|
101
|
+
};
|
|
86
102
|
}
|
|
87
103
|
placed(room) {
|
|
88
104
|
const all = Math.max(1, Math.floor(this.months) || 1);
|
|
@@ -109,6 +125,15 @@ let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinPickerEdi
|
|
|
109
125
|
const held = dates(this.value);
|
|
110
126
|
return held.length > 0 && held.every(isDateValue) ? held.join(',') : '';
|
|
111
127
|
}
|
|
128
|
+
get segmentable() {
|
|
129
|
+
return this.mode === undefined;
|
|
130
|
+
}
|
|
131
|
+
get segmentedKind() {
|
|
132
|
+
return 'date';
|
|
133
|
+
}
|
|
134
|
+
get segmentLocale() {
|
|
135
|
+
return this.locale;
|
|
136
|
+
}
|
|
112
137
|
written(date) {
|
|
113
138
|
if (this.dateStyle === 'iso' || !isDateValue(date)) {
|
|
114
139
|
return date;
|
|
@@ -160,17 +185,21 @@ let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinPickerEdi
|
|
|
160
185
|
max: this.written(this.max),
|
|
161
186
|
});
|
|
162
187
|
}
|
|
188
|
+
const why = held.map((one) => {
|
|
189
|
+
const date = asDate(one);
|
|
190
|
+
return date ? barredBy(date, this) : null;
|
|
191
|
+
});
|
|
192
|
+
if (why.includes('listed')) {
|
|
193
|
+
return this.unavailableMessage || 'Choose a date that is available.';
|
|
194
|
+
}
|
|
195
|
+
if (why.includes('step')) {
|
|
196
|
+
return this.stepMismatchMessage || 'Choose one of the dates the calendar offers.';
|
|
197
|
+
}
|
|
163
198
|
if (this.mode === 'range' && held.length > 2) {
|
|
164
199
|
return this.rangeLengthMessage || 'A range is two dates.';
|
|
165
200
|
}
|
|
166
201
|
return '';
|
|
167
202
|
}
|
|
168
|
-
updated(changed) {
|
|
169
|
-
super.updated(changed);
|
|
170
|
-
if (this.open && changed.has('open')) {
|
|
171
|
-
this.partNamed('picker')?.focus();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
203
|
renderPicker() {
|
|
175
204
|
return html `<${this.tag('date-picker')}
|
|
176
205
|
part="picker"
|
|
@@ -178,9 +207,12 @@ let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinPickerEdi
|
|
|
178
207
|
cell-range-middle: picker-cell-range-middle, cell-range-start: picker-cell-range-start,
|
|
179
208
|
day: picker-day, day-disabled: picker-day-disabled, day-outside: picker-day-outside,
|
|
180
209
|
day-selected: picker-day-selected, day-today: picker-day-today, grid: picker-grid,
|
|
181
|
-
header: picker-header, heading: picker-heading,
|
|
182
|
-
next: picker-next,
|
|
183
|
-
next-mark: picker-next-mark,
|
|
210
|
+
header: picker-header, heading: picker-heading, heading-button: picker-heading-button,
|
|
211
|
+
month: picker-month, months: picker-months, next: picker-next,
|
|
212
|
+
next-mark: picker-next-mark, period: picker-period, period-current: picker-period-current,
|
|
213
|
+
period-disabled: picker-period-disabled, period-row: picker-period-row,
|
|
214
|
+
period-selected: picker-period-selected, periods: picker-periods,
|
|
215
|
+
previous: picker-previous, previous-mark: picker-previous-mark,
|
|
184
216
|
week: picker-week, weekday: picker-weekday"
|
|
185
217
|
?invalid=${this.resolvedFeedback !== ''}
|
|
186
218
|
mode=${this.mode ?? nothing}
|
|
@@ -188,20 +220,43 @@ let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinPickerEdi
|
|
|
188
220
|
.value=${this.picked}
|
|
189
221
|
disable-dates=${this.disableDates || nothing}
|
|
190
222
|
disable-days=${this.disableDays || nothing}
|
|
191
|
-
first-day-of-week=${this.firstDayOfWeek}
|
|
223
|
+
first-day-of-week=${this.firstDayOfWeek ?? nothing}
|
|
224
|
+
label=${this.calendarLabel}
|
|
192
225
|
locale=${this.locale || nothing}
|
|
193
226
|
max=${this.max || nothing}
|
|
227
|
+
max-view=${this.maxView ?? nothing}
|
|
194
228
|
min=${this.min || nothing}
|
|
229
|
+
month-view-label=${this.monthViewLabel}
|
|
230
|
+
next-label=${this.nextLabel}
|
|
231
|
+
next-year-label=${this.nextYearLabel}
|
|
232
|
+
next-years-label=${this.nextYearsLabel}
|
|
233
|
+
previous-label=${this.previousLabel}
|
|
234
|
+
previous-year-label=${this.previousYearLabel}
|
|
235
|
+
previous-years-label=${this.previousYearsLabel}
|
|
195
236
|
step=${this.step}
|
|
237
|
+
year-view-label=${this.yearViewLabel}
|
|
238
|
+
.dayContent=${this.dayContent}
|
|
239
|
+
.isDateUnavailable=${this.isDateUnavailable}
|
|
196
240
|
@helix-before-change=${this.handleCalendarChange}
|
|
197
241
|
@change=${this.stopInner}
|
|
198
242
|
@input=${this.stopInner}
|
|
199
|
-
|
|
243
|
+
>
|
|
244
|
+
${this.renderIconSlot('previous-icon')}
|
|
245
|
+
${this.renderIconSlot('next-icon')}
|
|
246
|
+
</${this.tag('date-picker')}>`;
|
|
247
|
+
}
|
|
248
|
+
renderIconSlot(name) {
|
|
249
|
+
const given = this.querySelector?.(`:scope > [slot="${name}"]`) != null;
|
|
250
|
+
return html `<slot
|
|
251
|
+
name=${name}
|
|
252
|
+
slot=${given ? name : nothing}
|
|
253
|
+
@slotchange=${this.handleIconChange}
|
|
254
|
+
></slot>`;
|
|
200
255
|
}
|
|
201
256
|
renderTag(date) {
|
|
202
257
|
return html `<${this.tag('tag')}
|
|
203
258
|
part="date"
|
|
204
|
-
exportparts="dismiss: date-dismiss, dismiss-mark: date-dismiss-mark, label: date-label, start: date-start"
|
|
259
|
+
exportparts="cell: date-cell, dismiss: date-dismiss, dismiss-mark: date-dismiss-mark, label: date-label, link: date-link, start: date-start"
|
|
205
260
|
dismissible
|
|
206
261
|
dismiss-label=${fillTemplate(this.removeLabel, { name: this.written(date) })}
|
|
207
262
|
?disabled=${this.isDisabled}
|
|
@@ -223,36 +278,41 @@ let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinPickerEdi
|
|
|
223
278
|
${this.mode === 'multiple'
|
|
224
279
|
? this.renderTokenRow(this.shownDates.map((date) => this.renderTag(date)), this.restCount)
|
|
225
280
|
: nothing}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
281
|
+
${this.segmentsShown
|
|
282
|
+
? this.renderSegments()
|
|
283
|
+
: html `<input
|
|
284
|
+
part="control"
|
|
285
|
+
id=${this.controlId}
|
|
286
|
+
type="text"
|
|
287
|
+
.value=${this.display}
|
|
288
|
+
name=${this.name || nothing}
|
|
289
|
+
placeholder=${this.mode === 'multiple' && dates(this.value).length > 0
|
|
290
|
+
? nothing
|
|
291
|
+
: this.placeholder || nothing}
|
|
292
|
+
autocomplete=${this.autocomplete || nothing}
|
|
293
|
+
inputmode="numeric"
|
|
294
|
+
aria-describedby=${this.describedBy ?? nothing}
|
|
295
|
+
aria-invalid=${this.invalidity ?? nothing}
|
|
296
|
+
?disabled=${this.isDisabled}
|
|
297
|
+
?readonly=${this.readOnly}
|
|
298
|
+
?required=${this.required}
|
|
299
|
+
@blur=${this.handleBlur}
|
|
300
|
+
@change=${this.handleCommit}
|
|
301
|
+
@focus=${this.handleFocus}
|
|
302
|
+
@input=${this.handleInput}
|
|
303
|
+
@keydown=${this.handleDraftKey}
|
|
304
|
+
@keypress=${this.handleKeypress}
|
|
305
|
+
/>`}
|
|
247
306
|
<button
|
|
248
307
|
part="trigger"
|
|
249
308
|
type="button"
|
|
250
309
|
aria-controls="surface"
|
|
310
|
+
aria-disabled=${this.readOnly ? 'true' : nothing}
|
|
251
311
|
aria-expanded=${this.open ? 'true' : 'false'}
|
|
252
312
|
aria-haspopup="dialog"
|
|
253
313
|
aria-label=${this.triggerLabel}
|
|
254
314
|
?disabled=${this.isDisabled}
|
|
255
|
-
@click=${
|
|
315
|
+
@click=${this.handleTriggerClick}
|
|
256
316
|
>
|
|
257
317
|
${this.renderTrigger()}
|
|
258
318
|
</button>
|
|
@@ -287,9 +347,15 @@ let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinPickerEdi
|
|
|
287
347
|
__decorate([
|
|
288
348
|
property()
|
|
289
349
|
], HelixHeadlessDateInput.prototype, "autocomplete", void 0);
|
|
350
|
+
__decorate([
|
|
351
|
+
property({ attribute: 'calendar-label' })
|
|
352
|
+
], HelixHeadlessDateInput.prototype, "calendarLabel", void 0);
|
|
290
353
|
__decorate([
|
|
291
354
|
property({ attribute: 'date-style' })
|
|
292
355
|
], HelixHeadlessDateInput.prototype, "dateStyle", void 0);
|
|
356
|
+
__decorate([
|
|
357
|
+
property({ attribute: false })
|
|
358
|
+
], HelixHeadlessDateInput.prototype, "dayContent", void 0);
|
|
293
359
|
__decorate([
|
|
294
360
|
property({ attribute: 'disable-dates' })
|
|
295
361
|
], HelixHeadlessDateInput.prototype, "disableDates", void 0);
|
|
@@ -299,12 +365,18 @@ __decorate([
|
|
|
299
365
|
__decorate([
|
|
300
366
|
property({ attribute: 'first-day-of-week', type: Number })
|
|
301
367
|
], HelixHeadlessDateInput.prototype, "firstDayOfWeek", void 0);
|
|
368
|
+
__decorate([
|
|
369
|
+
property({ attribute: false })
|
|
370
|
+
], HelixHeadlessDateInput.prototype, "isDateUnavailable", void 0);
|
|
302
371
|
__decorate([
|
|
303
372
|
property()
|
|
304
373
|
], HelixHeadlessDateInput.prototype, "locale", void 0);
|
|
305
374
|
__decorate([
|
|
306
375
|
property()
|
|
307
376
|
], HelixHeadlessDateInput.prototype, "max", void 0);
|
|
377
|
+
__decorate([
|
|
378
|
+
property({ attribute: 'max-view' })
|
|
379
|
+
], HelixHeadlessDateInput.prototype, "maxView", void 0);
|
|
308
380
|
__decorate([
|
|
309
381
|
property()
|
|
310
382
|
], HelixHeadlessDateInput.prototype, "min", void 0);
|
|
@@ -317,9 +389,30 @@ __decorate([
|
|
|
317
389
|
__decorate([
|
|
318
390
|
state()
|
|
319
391
|
], HelixHeadlessDateInput.prototype, "fitted", void 0);
|
|
392
|
+
__decorate([
|
|
393
|
+
property({ attribute: 'month-view-label' })
|
|
394
|
+
], HelixHeadlessDateInput.prototype, "monthViewLabel", void 0);
|
|
395
|
+
__decorate([
|
|
396
|
+
property({ attribute: 'next-label' })
|
|
397
|
+
], HelixHeadlessDateInput.prototype, "nextLabel", void 0);
|
|
398
|
+
__decorate([
|
|
399
|
+
property({ attribute: 'next-year-label' })
|
|
400
|
+
], HelixHeadlessDateInput.prototype, "nextYearLabel", void 0);
|
|
401
|
+
__decorate([
|
|
402
|
+
property({ attribute: 'next-years-label' })
|
|
403
|
+
], HelixHeadlessDateInput.prototype, "nextYearsLabel", void 0);
|
|
320
404
|
__decorate([
|
|
321
405
|
property()
|
|
322
406
|
], HelixHeadlessDateInput.prototype, "placeholder", void 0);
|
|
407
|
+
__decorate([
|
|
408
|
+
property({ attribute: 'previous-label' })
|
|
409
|
+
], HelixHeadlessDateInput.prototype, "previousLabel", void 0);
|
|
410
|
+
__decorate([
|
|
411
|
+
property({ attribute: 'previous-year-label' })
|
|
412
|
+
], HelixHeadlessDateInput.prototype, "previousYearLabel", void 0);
|
|
413
|
+
__decorate([
|
|
414
|
+
property({ attribute: 'previous-years-label' })
|
|
415
|
+
], HelixHeadlessDateInput.prototype, "previousYearsLabel", void 0);
|
|
323
416
|
__decorate([
|
|
324
417
|
property({ attribute: 'range-length-message' })
|
|
325
418
|
], HelixHeadlessDateInput.prototype, "rangeLengthMessage", void 0);
|
|
@@ -336,11 +429,20 @@ __decorate([
|
|
|
336
429
|
property({ type: Number })
|
|
337
430
|
], HelixHeadlessDateInput.prototype, "step", void 0);
|
|
338
431
|
__decorate([
|
|
339
|
-
|
|
340
|
-
], HelixHeadlessDateInput.prototype, "
|
|
432
|
+
property({ attribute: 'step-mismatch-message' })
|
|
433
|
+
], HelixHeadlessDateInput.prototype, "stepMismatchMessage", void 0);
|
|
341
434
|
__decorate([
|
|
342
435
|
property({ attribute: 'trigger-label' })
|
|
343
436
|
], HelixHeadlessDateInput.prototype, "triggerLabel", void 0);
|
|
437
|
+
__decorate([
|
|
438
|
+
state()
|
|
439
|
+
], HelixHeadlessDateInput.prototype, "draft", void 0);
|
|
440
|
+
__decorate([
|
|
441
|
+
property({ attribute: 'unavailable-message' })
|
|
442
|
+
], HelixHeadlessDateInput.prototype, "unavailableMessage", void 0);
|
|
443
|
+
__decorate([
|
|
444
|
+
property({ attribute: 'year-view-label' })
|
|
445
|
+
], HelixHeadlessDateInput.prototype, "yearViewLabel", void 0);
|
|
344
446
|
HelixHeadlessDateInput = __decorate([
|
|
345
447
|
customElement('helix-headless-date-input')
|
|
346
448
|
], HelixHeadlessDateInput);
|