@nectary/components 3.3.0 → 3.3.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/{lib/esm/dialog → dialog}/index.js +0 -3
- package/{lib/cjs/input → input}/types.d.ts +2 -0
- package/{lib/esm/input → input}/utils.d.ts +1 -1
- package/package.json +11 -38
- package/{lib/esm/persistent-overlay → persistent-overlay}/index.d.ts +0 -1
- package/{lib/esm/persistent-overlay → persistent-overlay}/index.js +0 -1
- package/standalone.ts +89 -0
- package/{lib/esm/utils → utils}/element.js +1 -1
- package/lib/cjs/accordion/index.js +0 -88
- package/lib/cjs/accordion/types.js +0 -1
- package/lib/cjs/accordion-item/index.js +0 -97
- package/lib/cjs/accordion-item/types.js +0 -1
- package/lib/cjs/accordion-item/utils.js +0 -7
- package/lib/cjs/action-menu/index.js +0 -197
- package/lib/cjs/action-menu/types.js +0 -1
- package/lib/cjs/action-menu-option/index.js +0 -84
- package/lib/cjs/action-menu-option/types.js +0 -1
- package/lib/cjs/action-menu-option/utils.js +0 -10
- package/lib/cjs/alert/index.js +0 -50
- package/lib/cjs/alert/types.js +0 -1
- package/lib/cjs/alert/utils.js +0 -7
- package/lib/cjs/avatar/index.js +0 -96
- package/lib/cjs/avatar/types.js +0 -1
- package/lib/cjs/avatar/utils.js +0 -15
- package/lib/cjs/badge/index.js +0 -116
- package/lib/cjs/badge/types.js +0 -1
- package/lib/cjs/badge/utils.js +0 -7
- package/lib/cjs/button/index.js +0 -184
- package/lib/cjs/button/types.js +0 -1
- package/lib/cjs/button/utils.js +0 -7
- package/lib/cjs/button-group/index.js +0 -51
- package/lib/cjs/button-group/types.js +0 -1
- package/lib/cjs/button-group-item/index.js +0 -81
- package/lib/cjs/button-group-item/types.js +0 -1
- package/lib/cjs/card/index.js +0 -135
- package/lib/cjs/card/types.js +0 -1
- package/lib/cjs/card-container/index.js +0 -13
- package/lib/cjs/card-container/types.js +0 -1
- package/lib/cjs/checkbox/index.js +0 -128
- package/lib/cjs/checkbox/types.js +0 -1
- package/lib/cjs/chip/index.js +0 -146
- package/lib/cjs/chip/types.js +0 -1
- package/lib/cjs/chip/utils.js +0 -14
- package/lib/cjs/code-tag/index.js +0 -33
- package/lib/cjs/code-tag/types.js +0 -1
- package/lib/cjs/color-menu/index.js +0 -310
- package/lib/cjs/color-menu/types.js +0 -1
- package/lib/cjs/color-menu/utils.js +0 -18
- package/lib/cjs/color-menu-option/index.js +0 -50
- package/lib/cjs/color-menu-option/types.js +0 -1
- package/lib/cjs/color-menu-option/utils.js +0 -18
- package/lib/cjs/color-swatch/index.js +0 -56
- package/lib/cjs/color-swatch/types.js +0 -1
- package/lib/cjs/color-swatch/utils.js +0 -14
- package/lib/cjs/date-picker/index.js +0 -382
- package/lib/cjs/date-picker/types.js +0 -1
- package/lib/cjs/date-picker/utils.js +0 -171
- package/lib/cjs/dialog/index.js +0 -153
- package/lib/cjs/dialog/types.js +0 -1
- package/lib/cjs/dialog/utils.js +0 -26
- package/lib/cjs/emoji/index.js +0 -48
- package/lib/cjs/emoji/types.js +0 -1
- package/lib/cjs/emoji/utils.js +0 -56
- package/lib/cjs/emoji-picker/index.js +0 -310
- package/lib/cjs/emoji-picker/types.js +0 -1
- package/lib/cjs/field/index.js +0 -122
- package/lib/cjs/field/types.js +0 -1
- package/lib/cjs/file-drop/index.js +0 -207
- package/lib/cjs/file-drop/types.js +0 -1
- package/lib/cjs/file-drop/utils.js +0 -39
- package/lib/cjs/file-picker/index.js +0 -105
- package/lib/cjs/file-picker/types.js +0 -1
- package/lib/cjs/file-picker/utils.js +0 -15
- package/lib/cjs/file-status/index.js +0 -63
- package/lib/cjs/file-status/types.js +0 -1
- package/lib/cjs/file-status/utils.js +0 -7
- package/lib/cjs/flag/index.js +0 -48
- package/lib/cjs/flag/types.js +0 -1
- package/lib/cjs/flag/utils.js +0 -24
- package/lib/cjs/grid/index.js +0 -13
- package/lib/cjs/grid/types.js +0 -1
- package/lib/cjs/grid-item/index.js +0 -37
- package/lib/cjs/grid-item/types.js +0 -1
- package/lib/cjs/help-tooltip/index.js +0 -76
- package/lib/cjs/help-tooltip/types.js +0 -1
- package/lib/cjs/horizontal-stepper/index.js +0 -63
- package/lib/cjs/horizontal-stepper/types.js +0 -1
- package/lib/cjs/horizontal-stepper-item/index.js +0 -63
- package/lib/cjs/horizontal-stepper-item/types.js +0 -1
- package/lib/cjs/horizontal-stepper-item/utils.js +0 -7
- package/lib/cjs/icon/index.js +0 -34
- package/lib/cjs/icon/types.js +0 -1
- package/lib/cjs/imports.d.js +0 -1
- package/lib/cjs/imports.d.ts +0 -9
- package/lib/cjs/inline-alert/index.js +0 -85
- package/lib/cjs/inline-alert/types.js +0 -1
- package/lib/cjs/inline-alert/utils.js +0 -7
- package/lib/cjs/input/index.js +0 -644
- package/lib/cjs/input/types.js +0 -1
- package/lib/cjs/input/utils.d.ts +0 -26
- package/lib/cjs/input/utils.js +0 -317
- package/lib/cjs/link/index.js +0 -152
- package/lib/cjs/link/types.js +0 -1
- package/lib/cjs/list/index.js +0 -16
- package/lib/cjs/list/types.js +0 -1
- package/lib/cjs/list-item/index.js +0 -16
- package/lib/cjs/list-item/types.js +0 -1
- package/lib/cjs/pagination/index.js +0 -149
- package/lib/cjs/pagination/types.js +0 -1
- package/lib/cjs/persistent-overlay/index.d.ts +0 -15
- package/lib/cjs/persistent-overlay/index.js +0 -106
- package/lib/cjs/persistent-overlay/types.js +0 -1
- package/lib/cjs/pop/index.js +0 -427
- package/lib/cjs/pop/types.js +0 -1
- package/lib/cjs/pop/utils.js +0 -24
- package/lib/cjs/popover/index.js +0 -148
- package/lib/cjs/popover/types.js +0 -1
- package/lib/cjs/popover/utils.js +0 -17
- package/lib/cjs/progress/index.js +0 -60
- package/lib/cjs/progress/types.js +0 -1
- package/lib/cjs/progress-stepper/index.js +0 -208
- package/lib/cjs/progress-stepper/types.js +0 -1
- package/lib/cjs/progress-stepper-item/index.js +0 -84
- package/lib/cjs/progress-stepper-item/types.js +0 -1
- package/lib/cjs/progress-stepper-item/utils.js +0 -25
- package/lib/cjs/radio/index.js +0 -156
- package/lib/cjs/radio/types.js +0 -1
- package/lib/cjs/radio-option/index.js +0 -81
- package/lib/cjs/radio-option/types.js +0 -1
- package/lib/cjs/rich-text/index.js +0 -77
- package/lib/cjs/rich-text/types.js +0 -1
- package/lib/cjs/rich-text/utils.js +0 -117
- package/lib/cjs/rich-textarea/index.js +0 -466
- package/lib/cjs/rich-textarea/types.js +0 -1
- package/lib/cjs/rich-textarea/utils.js +0 -1754
- package/lib/cjs/segment/index.js +0 -111
- package/lib/cjs/segment/types.js +0 -1
- package/lib/cjs/segment/utils.js +0 -23
- package/lib/cjs/segment-collapse/index.js +0 -61
- package/lib/cjs/segment-collapse/types.js +0 -1
- package/lib/cjs/segmented-control/index.js +0 -87
- package/lib/cjs/segmented-control/types.js +0 -1
- package/lib/cjs/segmented-control-option/index.js +0 -97
- package/lib/cjs/segmented-control-option/types.js +0 -1
- package/lib/cjs/segmented-icon-control/index.js +0 -103
- package/lib/cjs/segmented-icon-control/types.js +0 -1
- package/lib/cjs/segmented-icon-control-option/index.js +0 -84
- package/lib/cjs/segmented-icon-control-option/types.js +0 -1
- package/lib/cjs/select-button/index.js +0 -204
- package/lib/cjs/select-button/types.js +0 -1
- package/lib/cjs/select-menu/index.js +0 -366
- package/lib/cjs/select-menu/types.js +0 -1
- package/lib/cjs/select-menu-option/index.js +0 -72
- package/lib/cjs/select-menu-option/types.js +0 -1
- package/lib/cjs/skeleton/index.js +0 -110
- package/lib/cjs/skeleton/types.js +0 -1
- package/lib/cjs/skeleton-item/index.js +0 -13
- package/lib/cjs/skeleton-item/types.js +0 -1
- package/lib/cjs/spinner/index.js +0 -60
- package/lib/cjs/spinner/types.js +0 -1
- package/lib/cjs/standalone.js +0 -85
- package/lib/cjs/stop-events/index.js +0 -29
- package/lib/cjs/table/index.js +0 -16
- package/lib/cjs/table/types.js +0 -1
- package/lib/cjs/table-body/index.js +0 -16
- package/lib/cjs/table-body/types.js +0 -1
- package/lib/cjs/table-cell/index.js +0 -23
- package/lib/cjs/table-cell/types.js +0 -1
- package/lib/cjs/table-cell/utils.js +0 -7
- package/lib/cjs/table-head/index.js +0 -16
- package/lib/cjs/table-head/types.js +0 -1
- package/lib/cjs/table-head-cell/index.js +0 -59
- package/lib/cjs/table-head-cell/types.js +0 -1
- package/lib/cjs/table-row/index.js +0 -44
- package/lib/cjs/table-row/types.js +0 -1
- package/lib/cjs/tabs/index.js +0 -82
- package/lib/cjs/tabs/types.js +0 -1
- package/lib/cjs/tabs-icon-option/index.js +0 -81
- package/lib/cjs/tabs-icon-option/types.js +0 -1
- package/lib/cjs/tabs-option/index.js +0 -88
- package/lib/cjs/tabs-option/types.js +0 -1
- package/lib/cjs/tag/index.js +0 -86
- package/lib/cjs/tag/types.js +0 -1
- package/lib/cjs/tag/utils.js +0 -14
- package/lib/cjs/text/index.js +0 -66
- package/lib/cjs/text/types.js +0 -1
- package/lib/cjs/text/utils.js +0 -7
- package/lib/cjs/textarea/index.js +0 -324
- package/lib/cjs/textarea/types.js +0 -1
- package/lib/cjs/tile-control/index.js +0 -112
- package/lib/cjs/tile-control/types.js +0 -1
- package/lib/cjs/tile-control-option/index.js +0 -100
- package/lib/cjs/tile-control-option/types.js +0 -1
- package/lib/cjs/time-picker/index.js +0 -338
- package/lib/cjs/time-picker/types.js +0 -1
- package/lib/cjs/time-picker/utils.js +0 -89
- package/lib/cjs/title/index.js +0 -62
- package/lib/cjs/title/types.js +0 -1
- package/lib/cjs/title/utils.js +0 -24
- package/lib/cjs/toast/index.js +0 -88
- package/lib/cjs/toast/types.js +0 -1
- package/lib/cjs/toast/utils.js +0 -7
- package/lib/cjs/toast-manager/index.js +0 -172
- package/lib/cjs/toast-manager/types.js +0 -1
- package/lib/cjs/toast-manager/utils.js +0 -7
- package/lib/cjs/toggle/index.js +0 -143
- package/lib/cjs/toggle/types.js +0 -1
- package/lib/cjs/tooltip/index.js +0 -277
- package/lib/cjs/tooltip/tooltip-state.js +0 -133
- package/lib/cjs/tooltip/types.js +0 -1
- package/lib/cjs/tooltip/utils.js +0 -25
- package/lib/cjs/types.d.js +0 -1
- package/lib/cjs/utils/context.js +0 -92
- package/lib/cjs/utils/countries.js +0 -9
- package/lib/cjs/utils/csv.js +0 -32
- package/lib/cjs/utils/debounce.js +0 -29
- package/lib/cjs/utils/dom.js +0 -183
- package/lib/cjs/utils/element.js +0 -58
- package/lib/cjs/utils/event-target.js +0 -36
- package/lib/cjs/utils/get-react-event-handler.js +0 -15
- package/lib/cjs/utils/index.js +0 -137
- package/lib/cjs/utils/markdown.js +0 -151
- package/lib/cjs/utils/rect.js +0 -37
- package/lib/cjs/utils/size.js +0 -9
- package/lib/cjs/utils/slot.js +0 -47
- package/lib/cjs/utils/throttle.js +0 -26
- package/lib/cjs/utils/uid.js +0 -20
- package/lib/cjs/vertical-stepper/index.js +0 -59
- package/lib/cjs/vertical-stepper/types.js +0 -1
- package/lib/cjs/vertical-stepper-item/index.js +0 -63
- package/lib/cjs/vertical-stepper-item/types.js +0 -1
- package/lib/cjs/vertical-stepper-item/utils.js +0 -7
- package/lib/esm/accordion/index.d.ts +0 -11
- package/lib/esm/accordion/types.d.ts +0 -21
- package/lib/esm/accordion-item/index.d.ts +0 -14
- package/lib/esm/accordion-item/types.d.ts +0 -36
- package/lib/esm/accordion-item/utils.d.ts +0 -2
- package/lib/esm/action-menu/index.d.ts +0 -11
- package/lib/esm/action-menu/types.d.ts +0 -13
- package/lib/esm/action-menu-option/index.d.ts +0 -12
- package/lib/esm/action-menu-option/types.d.ts +0 -23
- package/lib/esm/action-menu-option/utils.d.ts +0 -2
- package/lib/esm/alert/index.d.ts +0 -14
- package/lib/esm/alert/types.d.ts +0 -18
- package/lib/esm/alert/utils.d.ts +0 -2
- package/lib/esm/avatar/index.d.ts +0 -11
- package/lib/esm/avatar/types.d.ts +0 -37
- package/lib/esm/avatar/utils.d.ts +0 -4
- package/lib/esm/badge/index.d.ts +0 -11
- package/lib/esm/badge/types.d.ts +0 -34
- package/lib/esm/badge/utils.d.ts +0 -2
- package/lib/esm/button/index.d.ts +0 -11
- package/lib/esm/button/types.d.ts +0 -53
- package/lib/esm/button/utils.d.ts +0 -2
- package/lib/esm/button-group/index.d.ts +0 -11
- package/lib/esm/button-group/types.d.ts +0 -11
- package/lib/esm/button-group-item/index.d.ts +0 -11
- package/lib/esm/button-group-item/types.d.ts +0 -18
- package/lib/esm/card/index.d.ts +0 -13
- package/lib/esm/card/types.d.ts +0 -28
- package/lib/esm/card-container/index.d.ts +0 -11
- package/lib/esm/card-container/types.d.ts +0 -3
- package/lib/esm/checkbox/index.d.ts +0 -11
- package/lib/esm/checkbox/types.d.ts +0 -49
- package/lib/esm/chip/index.d.ts +0 -13
- package/lib/esm/chip/types.d.ts +0 -37
- package/lib/esm/chip/utils.d.ts +0 -2
- package/lib/esm/code-tag/index.d.ts +0 -11
- package/lib/esm/code-tag/types.d.ts +0 -11
- package/lib/esm/color-menu/index.d.ts +0 -11
- package/lib/esm/color-menu/types.d.ts +0 -32
- package/lib/esm/color-menu/utils.d.ts +0 -1
- package/lib/esm/color-menu-option/index.d.ts +0 -13
- package/lib/esm/color-menu-option/types.d.ts +0 -11
- package/lib/esm/color-menu-option/utils.d.ts +0 -1
- package/lib/esm/color-swatch/index.d.ts +0 -12
- package/lib/esm/color-swatch/types.d.ts +0 -11
- package/lib/esm/color-swatch/utils.d.ts +0 -2
- package/lib/esm/colors.json +0 -88
- package/lib/esm/date-picker/index.d.ts +0 -13
- package/lib/esm/date-picker/types.d.ts +0 -70
- package/lib/esm/date-picker/utils.d.ts +0 -28
- package/lib/esm/dialog/index.d.ts +0 -14
- package/lib/esm/dialog/types.d.ts +0 -28
- package/lib/esm/dialog/utils.d.ts +0 -2
- package/lib/esm/emoji/index.d.ts +0 -11
- package/lib/esm/emoji/types.d.ts +0 -11
- package/lib/esm/emoji/utils.d.ts +0 -3
- package/lib/esm/emoji-picker/data.json +0 -1
- package/lib/esm/emoji-picker/index.d.ts +0 -21
- package/lib/esm/emoji-picker/types.d.ts +0 -26
- package/lib/esm/field/index.d.ts +0 -11
- package/lib/esm/field/types.d.ts +0 -35
- package/lib/esm/file-drop/index.d.ts +0 -13
- package/lib/esm/file-drop/types.d.ts +0 -50
- package/lib/esm/file-drop/utils.d.ts +0 -2
- package/lib/esm/file-picker/index.d.ts +0 -11
- package/lib/esm/file-picker/types.d.ts +0 -32
- package/lib/esm/file-picker/utils.d.ts +0 -1
- package/lib/esm/file-status/index.d.ts +0 -14
- package/lib/esm/file-status/types.d.ts +0 -18
- package/lib/esm/file-status/utils.d.ts +0 -2
- package/lib/esm/flag/index.d.ts +0 -11
- package/lib/esm/flag/types.d.ts +0 -11
- package/lib/esm/flag/utils.d.ts +0 -1
- package/lib/esm/grid/index.d.ts +0 -11
- package/lib/esm/grid/types.d.ts +0 -3
- package/lib/esm/grid-item/index.d.ts +0 -11
- package/lib/esm/grid-item/types.d.ts +0 -17
- package/lib/esm/help-tooltip/index.d.ts +0 -13
- package/lib/esm/help-tooltip/types.d.ts +0 -3
- package/lib/esm/horizontal-stepper/index.d.ts +0 -11
- package/lib/esm/horizontal-stepper/types.d.ts +0 -13
- package/lib/esm/horizontal-stepper-item/index.d.ts +0 -14
- package/lib/esm/horizontal-stepper-item/types.d.ts +0 -24
- package/lib/esm/horizontal-stepper-item/utils.d.ts +0 -2
- package/lib/esm/icon/index.d.ts +0 -11
- package/lib/esm/icon/types.d.ts +0 -11
- package/lib/esm/imports.d.js +0 -0
- package/lib/esm/imports.d.ts +0 -9
- package/lib/esm/inline-alert/index.d.ts +0 -15
- package/lib/esm/inline-alert/types.d.ts +0 -15
- package/lib/esm/inline-alert/utils.d.ts +0 -2
- package/lib/esm/input/index.d.ts +0 -11
- package/lib/esm/input/types.d.ts +0 -86
- package/lib/esm/link/index.d.ts +0 -12
- package/lib/esm/link/types.d.ts +0 -59
- package/lib/esm/list/index.d.ts +0 -11
- package/lib/esm/list/types.d.ts +0 -3
- package/lib/esm/list-item/index.d.ts +0 -11
- package/lib/esm/list-item/types.d.ts +0 -3
- package/lib/esm/pagination/index.d.ts +0 -12
- package/lib/esm/pagination/types.d.ts +0 -16
- package/lib/esm/persistent-overlay/types.d.ts +0 -22
- package/lib/esm/pop/index.d.ts +0 -11
- package/lib/esm/pop/types.d.ts +0 -35
- package/lib/esm/pop/utils.d.ts +0 -4
- package/lib/esm/popover/index.d.ts +0 -12
- package/lib/esm/popover/types.d.ts +0 -38
- package/lib/esm/popover/utils.d.ts +0 -4
- package/lib/esm/progress/index.d.ts +0 -12
- package/lib/esm/progress/types.d.ts +0 -12
- package/lib/esm/progress-stepper/index.d.ts +0 -11
- package/lib/esm/progress-stepper/types.d.ts +0 -22
- package/lib/esm/progress-stepper-item/index.d.ts +0 -12
- package/lib/esm/progress-stepper-item/types.d.ts +0 -23
- package/lib/esm/progress-stepper-item/utils.d.ts +0 -11
- package/lib/esm/radio/index.d.ts +0 -11
- package/lib/esm/radio/types.d.ts +0 -14
- package/lib/esm/radio-option/index.d.ts +0 -11
- package/lib/esm/radio-option/types.d.ts +0 -18
- package/lib/esm/rich-text/index.d.ts +0 -14
- package/lib/esm/rich-text/types.d.ts +0 -12
- package/lib/esm/rich-text/utils.d.ts +0 -7
- package/lib/esm/rich-textarea/index.d.ts +0 -11
- package/lib/esm/rich-textarea/types.d.ts +0 -48
- package/lib/esm/rich-textarea/utils.d.ts +0 -39
- package/lib/esm/segment/index.d.ts +0 -12
- package/lib/esm/segment/types.d.ts +0 -16
- package/lib/esm/segment/utils.d.ts +0 -3
- package/lib/esm/segment-collapse/index.d.ts +0 -12
- package/lib/esm/segment-collapse/types.d.ts +0 -11
- package/lib/esm/segmented-control/index.d.ts +0 -11
- package/lib/esm/segmented-control/types.d.ts +0 -11
- package/lib/esm/segmented-control-option/index.d.ts +0 -11
- package/lib/esm/segmented-control-option/types.d.ts +0 -19
- package/lib/esm/segmented-icon-control/index.d.ts +0 -11
- package/lib/esm/segmented-icon-control/types.d.ts +0 -14
- package/lib/esm/segmented-icon-control-option/index.d.ts +0 -11
- package/lib/esm/segmented-icon-control-option/types.d.ts +0 -16
- package/lib/esm/select-button/index.d.ts +0 -13
- package/lib/esm/select-button/types.d.ts +0 -50
- package/lib/esm/select-menu/index.d.ts +0 -14
- package/lib/esm/select-menu/types.d.ts +0 -45
- package/lib/esm/select-menu-option/index.d.ts +0 -28
- package/lib/esm/select-menu-option/types.d.ts +0 -26
- package/lib/esm/skeleton/index.d.ts +0 -11
- package/lib/esm/skeleton/types.d.ts +0 -9
- package/lib/esm/skeleton-item/index.d.ts +0 -11
- package/lib/esm/skeleton-item/types.d.ts +0 -13
- package/lib/esm/spinner/index.d.ts +0 -11
- package/lib/esm/spinner/types.d.ts +0 -12
- package/lib/esm/standalone.d.ts +0 -81
- package/lib/esm/stop-events/index.d.ts +0 -1
- package/lib/esm/table/index.d.ts +0 -11
- package/lib/esm/table/types.d.ts +0 -3
- package/lib/esm/table-body/index.d.ts +0 -11
- package/lib/esm/table-body/types.d.ts +0 -3
- package/lib/esm/table-cell/index.d.ts +0 -11
- package/lib/esm/table-cell/types.d.ts +0 -9
- package/lib/esm/table-cell/utils.d.ts +0 -2
- package/lib/esm/table-head/index.d.ts +0 -11
- package/lib/esm/table-head/types.d.ts +0 -3
- package/lib/esm/table-head-cell/index.d.ts +0 -12
- package/lib/esm/table-head-cell/types.d.ts +0 -15
- package/lib/esm/table-row/index.d.ts +0 -11
- package/lib/esm/table-row/types.d.ts +0 -11
- package/lib/esm/tabs/index.d.ts +0 -11
- package/lib/esm/tabs/types.d.ts +0 -18
- package/lib/esm/tabs-icon-option/index.d.ts +0 -11
- package/lib/esm/tabs-icon-option/types.d.ts +0 -19
- package/lib/esm/tabs-option/index.d.ts +0 -12
- package/lib/esm/tabs-option/types.d.ts +0 -25
- package/lib/esm/tag/index.d.ts +0 -12
- package/lib/esm/tag/types.d.ts +0 -23
- package/lib/esm/tag/utils.d.ts +0 -2
- package/lib/esm/text/index.d.ts +0 -11
- package/lib/esm/text/types.d.ts +0 -30
- package/lib/esm/text/utils.d.ts +0 -2
- package/lib/esm/textarea/index.d.ts +0 -11
- package/lib/esm/textarea/types.d.ts +0 -60
- package/lib/esm/tile-control/index.d.ts +0 -11
- package/lib/esm/tile-control/types.d.ts +0 -37
- package/lib/esm/tile-control-option/index.d.ts +0 -11
- package/lib/esm/tile-control-option/types.d.ts +0 -37
- package/lib/esm/time-picker/index.d.ts +0 -14
- package/lib/esm/time-picker/types.d.ts +0 -34
- package/lib/esm/time-picker/utils.d.ts +0 -11
- package/lib/esm/title/index.d.ts +0 -11
- package/lib/esm/title/types.d.ts +0 -31
- package/lib/esm/title/utils.d.ts +0 -3
- package/lib/esm/toast/index.d.ts +0 -13
- package/lib/esm/toast/types.d.ts +0 -28
- package/lib/esm/toast/utils.d.ts +0 -2
- package/lib/esm/toast-manager/index.d.ts +0 -13
- package/lib/esm/toast-manager/types.d.ts +0 -13
- package/lib/esm/toast-manager/utils.d.ts +0 -2
- package/lib/esm/toggle/index.d.ts +0 -11
- package/lib/esm/toggle/types.d.ts +0 -23
- package/lib/esm/tooltip/index.d.ts +0 -13
- package/lib/esm/tooltip/tooltip-state.d.ts +0 -19
- package/lib/esm/tooltip/types.d.ts +0 -42
- package/lib/esm/tooltip/utils.d.ts +0 -6
- package/lib/esm/types.d.js +0 -1
- package/lib/esm/types.d.ts +0 -14
- package/lib/esm/utils/context.d.ts +0 -20
- package/lib/esm/utils/countries.d.ts +0 -6
- package/lib/esm/utils/countries.json +0 -1217
- package/lib/esm/utils/csv.d.ts +0 -5
- package/lib/esm/utils/debounce.d.ts +0 -8
- package/lib/esm/utils/dom.d.ts +0 -34
- package/lib/esm/utils/element.d.ts +0 -16
- package/lib/esm/utils/event-target.d.ts +0 -4
- package/lib/esm/utils/get-react-event-handler.d.ts +0 -1
- package/lib/esm/utils/index.d.ts +0 -12
- package/lib/esm/utils/markdown.d.ts +0 -19
- package/lib/esm/utils/rect.d.ts +0 -4
- package/lib/esm/utils/size.d.ts +0 -5
- package/lib/esm/utils/slot.d.ts +0 -4
- package/lib/esm/utils/throttle.d.ts +0 -4
- package/lib/esm/utils/uid.d.ts +0 -1
- package/lib/esm/vertical-stepper/index.d.ts +0 -11
- package/lib/esm/vertical-stepper/types.d.ts +0 -13
- package/lib/esm/vertical-stepper-item/index.d.ts +0 -14
- package/lib/esm/vertical-stepper-item/types.d.ts +0 -24
- package/lib/esm/vertical-stepper-item/utils.d.ts +0 -2
- package/lib/package.json +0 -1
- /package/{lib/cjs/accordion → accordion}/index.d.ts +0 -0
- /package/{lib/esm/accordion → accordion}/index.js +0 -0
- /package/{lib/cjs/accordion → accordion}/types.d.ts +0 -0
- /package/{lib/esm/accordion → accordion}/types.js +0 -0
- /package/{lib/cjs/accordion-item → accordion-item}/index.d.ts +0 -0
- /package/{lib/esm/accordion-item → accordion-item}/index.js +0 -0
- /package/{lib/cjs/accordion-item → accordion-item}/types.d.ts +0 -0
- /package/{lib/esm/accordion-item → accordion-item}/types.js +0 -0
- /package/{lib/cjs/accordion-item → accordion-item}/utils.d.ts +0 -0
- /package/{lib/esm/accordion-item → accordion-item}/utils.js +0 -0
- /package/{lib/cjs/action-menu → action-menu}/index.d.ts +0 -0
- /package/{lib/esm/action-menu → action-menu}/index.js +0 -0
- /package/{lib/cjs/action-menu → action-menu}/types.d.ts +0 -0
- /package/{lib/esm/action-menu → action-menu}/types.js +0 -0
- /package/{lib/cjs/action-menu-option → action-menu-option}/index.d.ts +0 -0
- /package/{lib/esm/action-menu-option → action-menu-option}/index.js +0 -0
- /package/{lib/cjs/action-menu-option → action-menu-option}/types.d.ts +0 -0
- /package/{lib/esm/action-menu-option → action-menu-option}/types.js +0 -0
- /package/{lib/cjs/action-menu-option → action-menu-option}/utils.d.ts +0 -0
- /package/{lib/esm/action-menu-option → action-menu-option}/utils.js +0 -0
- /package/{lib/cjs/alert → alert}/index.d.ts +0 -0
- /package/{lib/esm/alert → alert}/index.js +0 -0
- /package/{lib/cjs/alert → alert}/types.d.ts +0 -0
- /package/{lib/esm/alert → alert}/types.js +0 -0
- /package/{lib/cjs/alert → alert}/utils.d.ts +0 -0
- /package/{lib/esm/alert → alert}/utils.js +0 -0
- /package/{lib/cjs/avatar → avatar}/index.d.ts +0 -0
- /package/{lib/esm/avatar → avatar}/index.js +0 -0
- /package/{lib/cjs/avatar → avatar}/types.d.ts +0 -0
- /package/{lib/esm/avatar → avatar}/types.js +0 -0
- /package/{lib/cjs/avatar → avatar}/utils.d.ts +0 -0
- /package/{lib/esm/avatar → avatar}/utils.js +0 -0
- /package/{lib/cjs/badge → badge}/index.d.ts +0 -0
- /package/{lib/esm/badge → badge}/index.js +0 -0
- /package/{lib/cjs/badge → badge}/types.d.ts +0 -0
- /package/{lib/esm/badge → badge}/types.js +0 -0
- /package/{lib/cjs/badge → badge}/utils.d.ts +0 -0
- /package/{lib/esm/badge → badge}/utils.js +0 -0
- /package/{lib/cjs/button → button}/index.d.ts +0 -0
- /package/{lib/esm/button → button}/index.js +0 -0
- /package/{lib/cjs/button → button}/types.d.ts +0 -0
- /package/{lib/esm/button → button}/types.js +0 -0
- /package/{lib/cjs/button → button}/utils.d.ts +0 -0
- /package/{lib/esm/button → button}/utils.js +0 -0
- /package/{lib/cjs/button-group → button-group}/index.d.ts +0 -0
- /package/{lib/esm/button-group → button-group}/index.js +0 -0
- /package/{lib/cjs/button-group → button-group}/types.d.ts +0 -0
- /package/{lib/esm/button-group → button-group}/types.js +0 -0
- /package/{lib/cjs/button-group-item → button-group-item}/index.d.ts +0 -0
- /package/{lib/esm/button-group-item → button-group-item}/index.js +0 -0
- /package/{lib/cjs/button-group-item → button-group-item}/types.d.ts +0 -0
- /package/{lib/esm/button-group-item → button-group-item}/types.js +0 -0
- /package/{lib/cjs/card → card}/index.d.ts +0 -0
- /package/{lib/esm/card → card}/index.js +0 -0
- /package/{lib/cjs/card → card}/types.d.ts +0 -0
- /package/{lib/esm/card → card}/types.js +0 -0
- /package/{lib/cjs/card-container → card-container}/index.d.ts +0 -0
- /package/{lib/esm/card-container → card-container}/index.js +0 -0
- /package/{lib/cjs/card-container → card-container}/types.d.ts +0 -0
- /package/{lib/esm/card-container → card-container}/types.js +0 -0
- /package/{lib/cjs/checkbox → checkbox}/index.d.ts +0 -0
- /package/{lib/esm/checkbox → checkbox}/index.js +0 -0
- /package/{lib/cjs/checkbox → checkbox}/types.d.ts +0 -0
- /package/{lib/esm/checkbox → checkbox}/types.js +0 -0
- /package/{lib/cjs/chip → chip}/index.d.ts +0 -0
- /package/{lib/esm/chip → chip}/index.js +0 -0
- /package/{lib/cjs/chip → chip}/types.d.ts +0 -0
- /package/{lib/esm/chip → chip}/types.js +0 -0
- /package/{lib/cjs/chip → chip}/utils.d.ts +0 -0
- /package/{lib/esm/chip → chip}/utils.js +0 -0
- /package/{lib/cjs/code-tag → code-tag}/index.d.ts +0 -0
- /package/{lib/esm/code-tag → code-tag}/index.js +0 -0
- /package/{lib/cjs/code-tag → code-tag}/types.d.ts +0 -0
- /package/{lib/esm/code-tag → code-tag}/types.js +0 -0
- /package/{lib/cjs/color-menu → color-menu}/index.d.ts +0 -0
- /package/{lib/esm/color-menu → color-menu}/index.js +0 -0
- /package/{lib/cjs/color-menu → color-menu}/types.d.ts +0 -0
- /package/{lib/esm/color-menu → color-menu}/types.js +0 -0
- /package/{lib/cjs/color-menu → color-menu}/utils.d.ts +0 -0
- /package/{lib/esm/color-menu → color-menu}/utils.js +0 -0
- /package/{lib/cjs/color-menu-option → color-menu-option}/index.d.ts +0 -0
- /package/{lib/esm/color-menu-option → color-menu-option}/index.js +0 -0
- /package/{lib/cjs/color-menu-option → color-menu-option}/types.d.ts +0 -0
- /package/{lib/esm/color-menu-option → color-menu-option}/types.js +0 -0
- /package/{lib/cjs/color-menu-option → color-menu-option}/utils.d.ts +0 -0
- /package/{lib/esm/color-menu-option → color-menu-option}/utils.js +0 -0
- /package/{lib/cjs/color-swatch → color-swatch}/index.d.ts +0 -0
- /package/{lib/esm/color-swatch → color-swatch}/index.js +0 -0
- /package/{lib/cjs/color-swatch → color-swatch}/types.d.ts +0 -0
- /package/{lib/esm/color-swatch → color-swatch}/types.js +0 -0
- /package/{lib/cjs/color-swatch → color-swatch}/utils.d.ts +0 -0
- /package/{lib/esm/color-swatch → color-swatch}/utils.js +0 -0
- /package/{lib/cjs/colors.json → colors.json} +0 -0
- /package/{lib/cjs/date-picker → date-picker}/index.d.ts +0 -0
- /package/{lib/esm/date-picker → date-picker}/index.js +0 -0
- /package/{lib/cjs/date-picker → date-picker}/types.d.ts +0 -0
- /package/{lib/esm/date-picker → date-picker}/types.js +0 -0
- /package/{lib/cjs/date-picker → date-picker}/utils.d.ts +0 -0
- /package/{lib/esm/date-picker → date-picker}/utils.js +0 -0
- /package/{lib/cjs/dialog → dialog}/index.d.ts +0 -0
- /package/{lib/cjs/dialog → dialog}/types.d.ts +0 -0
- /package/{lib/esm/dialog → dialog}/types.js +0 -0
- /package/{lib/cjs/dialog → dialog}/utils.d.ts +0 -0
- /package/{lib/esm/dialog → dialog}/utils.js +0 -0
- /package/{lib/cjs/emoji → emoji}/index.d.ts +0 -0
- /package/{lib/esm/emoji → emoji}/index.js +0 -0
- /package/{lib/cjs/emoji → emoji}/types.d.ts +0 -0
- /package/{lib/esm/emoji → emoji}/types.js +0 -0
- /package/{lib/cjs/emoji → emoji}/utils.d.ts +0 -0
- /package/{lib/esm/emoji → emoji}/utils.js +0 -0
- /package/{lib/cjs/emoji-picker → emoji-picker}/data.json +0 -0
- /package/{lib/cjs/emoji-picker → emoji-picker}/index.d.ts +0 -0
- /package/{lib/esm/emoji-picker → emoji-picker}/index.js +0 -0
- /package/{lib/cjs/emoji-picker → emoji-picker}/types.d.ts +0 -0
- /package/{lib/esm/emoji-picker → emoji-picker}/types.js +0 -0
- /package/{lib/cjs/field → field}/index.d.ts +0 -0
- /package/{lib/esm/field → field}/index.js +0 -0
- /package/{lib/cjs/field → field}/types.d.ts +0 -0
- /package/{lib/esm/field → field}/types.js +0 -0
- /package/{lib/cjs/file-drop → file-drop}/index.d.ts +0 -0
- /package/{lib/esm/file-drop → file-drop}/index.js +0 -0
- /package/{lib/cjs/file-drop → file-drop}/types.d.ts +0 -0
- /package/{lib/esm/file-drop → file-drop}/types.js +0 -0
- /package/{lib/cjs/file-drop → file-drop}/utils.d.ts +0 -0
- /package/{lib/esm/file-drop → file-drop}/utils.js +0 -0
- /package/{lib/cjs/file-picker → file-picker}/index.d.ts +0 -0
- /package/{lib/esm/file-picker → file-picker}/index.js +0 -0
- /package/{lib/cjs/file-picker → file-picker}/types.d.ts +0 -0
- /package/{lib/esm/file-picker → file-picker}/types.js +0 -0
- /package/{lib/cjs/file-picker → file-picker}/utils.d.ts +0 -0
- /package/{lib/esm/file-picker → file-picker}/utils.js +0 -0
- /package/{lib/cjs/file-status → file-status}/index.d.ts +0 -0
- /package/{lib/esm/file-status → file-status}/index.js +0 -0
- /package/{lib/cjs/file-status → file-status}/types.d.ts +0 -0
- /package/{lib/esm/file-status → file-status}/types.js +0 -0
- /package/{lib/cjs/file-status → file-status}/utils.d.ts +0 -0
- /package/{lib/esm/file-status → file-status}/utils.js +0 -0
- /package/{lib/cjs/flag → flag}/index.d.ts +0 -0
- /package/{lib/esm/flag → flag}/index.js +0 -0
- /package/{lib/cjs/flag → flag}/types.d.ts +0 -0
- /package/{lib/esm/flag → flag}/types.js +0 -0
- /package/{lib/cjs/flag → flag}/utils.d.ts +0 -0
- /package/{lib/esm/flag → flag}/utils.js +0 -0
- /package/{lib/cjs/grid → grid}/index.d.ts +0 -0
- /package/{lib/esm/grid → grid}/index.js +0 -0
- /package/{lib/cjs/grid → grid}/types.d.ts +0 -0
- /package/{lib/esm/grid → grid}/types.js +0 -0
- /package/{lib/cjs/grid-item → grid-item}/index.d.ts +0 -0
- /package/{lib/esm/grid-item → grid-item}/index.js +0 -0
- /package/{lib/cjs/grid-item → grid-item}/types.d.ts +0 -0
- /package/{lib/esm/grid-item → grid-item}/types.js +0 -0
- /package/{lib/cjs/help-tooltip → help-tooltip}/index.d.ts +0 -0
- /package/{lib/esm/help-tooltip → help-tooltip}/index.js +0 -0
- /package/{lib/cjs/help-tooltip → help-tooltip}/types.d.ts +0 -0
- /package/{lib/esm/help-tooltip → help-tooltip}/types.js +0 -0
- /package/{lib/cjs/horizontal-stepper → horizontal-stepper}/index.d.ts +0 -0
- /package/{lib/esm/horizontal-stepper → horizontal-stepper}/index.js +0 -0
- /package/{lib/cjs/horizontal-stepper → horizontal-stepper}/types.d.ts +0 -0
- /package/{lib/esm/horizontal-stepper → horizontal-stepper}/types.js +0 -0
- /package/{lib/cjs/horizontal-stepper-item → horizontal-stepper-item}/index.d.ts +0 -0
- /package/{lib/esm/horizontal-stepper-item → horizontal-stepper-item}/index.js +0 -0
- /package/{lib/cjs/horizontal-stepper-item → horizontal-stepper-item}/types.d.ts +0 -0
- /package/{lib/esm/horizontal-stepper-item → horizontal-stepper-item}/types.js +0 -0
- /package/{lib/cjs/horizontal-stepper-item → horizontal-stepper-item}/utils.d.ts +0 -0
- /package/{lib/esm/horizontal-stepper-item → horizontal-stepper-item}/utils.js +0 -0
- /package/{lib/cjs/icon → icon}/index.d.ts +0 -0
- /package/{lib/esm/icon → icon}/index.js +0 -0
- /package/{lib/cjs/icon → icon}/types.d.ts +0 -0
- /package/{lib/esm/icon → icon}/types.js +0 -0
- /package/{lib/cjs/inline-alert → inline-alert}/index.d.ts +0 -0
- /package/{lib/esm/inline-alert → inline-alert}/index.js +0 -0
- /package/{lib/cjs/inline-alert → inline-alert}/types.d.ts +0 -0
- /package/{lib/esm/inline-alert → inline-alert}/types.js +0 -0
- /package/{lib/cjs/inline-alert → inline-alert}/utils.d.ts +0 -0
- /package/{lib/esm/inline-alert → inline-alert}/utils.js +0 -0
- /package/{lib/cjs/input → input}/index.d.ts +0 -0
- /package/{lib/esm/input → input}/index.js +0 -0
- /package/{lib/esm/input → input}/types.js +0 -0
- /package/{lib/esm/input → input}/utils.js +0 -0
- /package/{lib/cjs/link → link}/index.d.ts +0 -0
- /package/{lib/esm/link → link}/index.js +0 -0
- /package/{lib/cjs/link → link}/types.d.ts +0 -0
- /package/{lib/esm/link → link}/types.js +0 -0
- /package/{lib/cjs/list → list}/index.d.ts +0 -0
- /package/{lib/esm/list → list}/index.js +0 -0
- /package/{lib/cjs/list → list}/types.d.ts +0 -0
- /package/{lib/esm/list → list}/types.js +0 -0
- /package/{lib/cjs/list-item → list-item}/index.d.ts +0 -0
- /package/{lib/esm/list-item → list-item}/index.js +0 -0
- /package/{lib/cjs/list-item → list-item}/types.d.ts +0 -0
- /package/{lib/esm/list-item → list-item}/types.js +0 -0
- /package/{lib/cjs/pagination → pagination}/index.d.ts +0 -0
- /package/{lib/esm/pagination → pagination}/index.js +0 -0
- /package/{lib/cjs/pagination → pagination}/types.d.ts +0 -0
- /package/{lib/esm/pagination → pagination}/types.js +0 -0
- /package/{lib/cjs/persistent-overlay → persistent-overlay}/types.d.ts +0 -0
- /package/{lib/esm/persistent-overlay → persistent-overlay}/types.js +0 -0
- /package/{lib/cjs/pop → pop}/index.d.ts +0 -0
- /package/{lib/esm/pop → pop}/index.js +0 -0
- /package/{lib/cjs/pop → pop}/types.d.ts +0 -0
- /package/{lib/esm/pop → pop}/types.js +0 -0
- /package/{lib/cjs/pop → pop}/utils.d.ts +0 -0
- /package/{lib/esm/pop → pop}/utils.js +0 -0
- /package/{lib/cjs/popover → popover}/index.d.ts +0 -0
- /package/{lib/esm/popover → popover}/index.js +0 -0
- /package/{lib/cjs/popover → popover}/types.d.ts +0 -0
- /package/{lib/esm/popover → popover}/types.js +0 -0
- /package/{lib/cjs/popover → popover}/utils.d.ts +0 -0
- /package/{lib/esm/popover → popover}/utils.js +0 -0
- /package/{lib/cjs/progress → progress}/index.d.ts +0 -0
- /package/{lib/esm/progress → progress}/index.js +0 -0
- /package/{lib/cjs/progress → progress}/types.d.ts +0 -0
- /package/{lib/esm/progress → progress}/types.js +0 -0
- /package/{lib/cjs/progress-stepper → progress-stepper}/index.d.ts +0 -0
- /package/{lib/esm/progress-stepper → progress-stepper}/index.js +0 -0
- /package/{lib/cjs/progress-stepper → progress-stepper}/types.d.ts +0 -0
- /package/{lib/esm/progress-stepper → progress-stepper}/types.js +0 -0
- /package/{lib/cjs/progress-stepper-item → progress-stepper-item}/index.d.ts +0 -0
- /package/{lib/esm/progress-stepper-item → progress-stepper-item}/index.js +0 -0
- /package/{lib/cjs/progress-stepper-item → progress-stepper-item}/types.d.ts +0 -0
- /package/{lib/esm/progress-stepper-item → progress-stepper-item}/types.js +0 -0
- /package/{lib/cjs/progress-stepper-item → progress-stepper-item}/utils.d.ts +0 -0
- /package/{lib/esm/progress-stepper-item → progress-stepper-item}/utils.js +0 -0
- /package/{lib/cjs/radio → radio}/index.d.ts +0 -0
- /package/{lib/esm/radio → radio}/index.js +0 -0
- /package/{lib/cjs/radio → radio}/types.d.ts +0 -0
- /package/{lib/esm/radio → radio}/types.js +0 -0
- /package/{lib/cjs/radio-option → radio-option}/index.d.ts +0 -0
- /package/{lib/esm/radio-option → radio-option}/index.js +0 -0
- /package/{lib/cjs/radio-option → radio-option}/types.d.ts +0 -0
- /package/{lib/esm/radio-option → radio-option}/types.js +0 -0
- /package/{lib/cjs/rich-text → rich-text}/index.d.ts +0 -0
- /package/{lib/esm/rich-text → rich-text}/index.js +0 -0
- /package/{lib/cjs/rich-text → rich-text}/types.d.ts +0 -0
- /package/{lib/esm/rich-text → rich-text}/types.js +0 -0
- /package/{lib/cjs/rich-text → rich-text}/utils.d.ts +0 -0
- /package/{lib/esm/rich-text → rich-text}/utils.js +0 -0
- /package/{lib/cjs/rich-textarea → rich-textarea}/index.d.ts +0 -0
- /package/{lib/esm/rich-textarea → rich-textarea}/index.js +0 -0
- /package/{lib/cjs/rich-textarea → rich-textarea}/types.d.ts +0 -0
- /package/{lib/esm/rich-textarea → rich-textarea}/types.js +0 -0
- /package/{lib/cjs/rich-textarea → rich-textarea}/utils.d.ts +0 -0
- /package/{lib/esm/rich-textarea → rich-textarea}/utils.js +0 -0
- /package/{lib/cjs/segment → segment}/index.d.ts +0 -0
- /package/{lib/esm/segment → segment}/index.js +0 -0
- /package/{lib/cjs/segment → segment}/types.d.ts +0 -0
- /package/{lib/esm/segment → segment}/types.js +0 -0
- /package/{lib/cjs/segment → segment}/utils.d.ts +0 -0
- /package/{lib/esm/segment → segment}/utils.js +0 -0
- /package/{lib/cjs/segment-collapse → segment-collapse}/index.d.ts +0 -0
- /package/{lib/esm/segment-collapse → segment-collapse}/index.js +0 -0
- /package/{lib/cjs/segment-collapse → segment-collapse}/types.d.ts +0 -0
- /package/{lib/esm/segment-collapse → segment-collapse}/types.js +0 -0
- /package/{lib/cjs/segmented-control → segmented-control}/index.d.ts +0 -0
- /package/{lib/esm/segmented-control → segmented-control}/index.js +0 -0
- /package/{lib/cjs/segmented-control → segmented-control}/types.d.ts +0 -0
- /package/{lib/esm/segmented-control → segmented-control}/types.js +0 -0
- /package/{lib/cjs/segmented-control-option → segmented-control-option}/index.d.ts +0 -0
- /package/{lib/esm/segmented-control-option → segmented-control-option}/index.js +0 -0
- /package/{lib/cjs/segmented-control-option → segmented-control-option}/types.d.ts +0 -0
- /package/{lib/esm/segmented-control-option → segmented-control-option}/types.js +0 -0
- /package/{lib/cjs/segmented-icon-control → segmented-icon-control}/index.d.ts +0 -0
- /package/{lib/esm/segmented-icon-control → segmented-icon-control}/index.js +0 -0
- /package/{lib/cjs/segmented-icon-control → segmented-icon-control}/types.d.ts +0 -0
- /package/{lib/esm/segmented-icon-control → segmented-icon-control}/types.js +0 -0
- /package/{lib/cjs/segmented-icon-control-option → segmented-icon-control-option}/index.d.ts +0 -0
- /package/{lib/esm/segmented-icon-control-option → segmented-icon-control-option}/index.js +0 -0
- /package/{lib/cjs/segmented-icon-control-option → segmented-icon-control-option}/types.d.ts +0 -0
- /package/{lib/esm/segmented-icon-control-option → segmented-icon-control-option}/types.js +0 -0
- /package/{lib/cjs/select-button → select-button}/index.d.ts +0 -0
- /package/{lib/esm/select-button → select-button}/index.js +0 -0
- /package/{lib/cjs/select-button → select-button}/types.d.ts +0 -0
- /package/{lib/esm/select-button → select-button}/types.js +0 -0
- /package/{lib/cjs/select-menu → select-menu}/index.d.ts +0 -0
- /package/{lib/esm/select-menu → select-menu}/index.js +0 -0
- /package/{lib/cjs/select-menu → select-menu}/types.d.ts +0 -0
- /package/{lib/esm/select-menu → select-menu}/types.js +0 -0
- /package/{lib/cjs/select-menu-option → select-menu-option}/index.d.ts +0 -0
- /package/{lib/esm/select-menu-option → select-menu-option}/index.js +0 -0
- /package/{lib/cjs/select-menu-option → select-menu-option}/types.d.ts +0 -0
- /package/{lib/esm/select-menu-option → select-menu-option}/types.js +0 -0
- /package/{lib/cjs/skeleton → skeleton}/index.d.ts +0 -0
- /package/{lib/esm/skeleton → skeleton}/index.js +0 -0
- /package/{lib/cjs/skeleton → skeleton}/types.d.ts +0 -0
- /package/{lib/esm/skeleton → skeleton}/types.js +0 -0
- /package/{lib/cjs/skeleton-item → skeleton-item}/index.d.ts +0 -0
- /package/{lib/esm/skeleton-item → skeleton-item}/index.js +0 -0
- /package/{lib/cjs/skeleton-item → skeleton-item}/types.d.ts +0 -0
- /package/{lib/esm/skeleton-item → skeleton-item}/types.js +0 -0
- /package/{lib/cjs/spinner → spinner}/index.d.ts +0 -0
- /package/{lib/esm/spinner → spinner}/index.js +0 -0
- /package/{lib/cjs/spinner → spinner}/types.d.ts +0 -0
- /package/{lib/esm/spinner → spinner}/types.js +0 -0
- /package/{lib/cjs/standalone.d.ts → standalone.d.ts} +0 -0
- /package/{lib/esm/standalone.js → standalone.js} +0 -0
- /package/{lib/cjs/stop-events → stop-events}/index.d.ts +0 -0
- /package/{lib/esm/stop-events → stop-events}/index.js +0 -0
- /package/{lib/cjs/table → table}/index.d.ts +0 -0
- /package/{lib/esm/table → table}/index.js +0 -0
- /package/{lib/cjs/table → table}/types.d.ts +0 -0
- /package/{lib/esm/table → table}/types.js +0 -0
- /package/{lib/cjs/table-body → table-body}/index.d.ts +0 -0
- /package/{lib/esm/table-body → table-body}/index.js +0 -0
- /package/{lib/cjs/table-body → table-body}/types.d.ts +0 -0
- /package/{lib/esm/table-body → table-body}/types.js +0 -0
- /package/{lib/cjs/table-cell → table-cell}/index.d.ts +0 -0
- /package/{lib/esm/table-cell → table-cell}/index.js +0 -0
- /package/{lib/cjs/table-cell → table-cell}/types.d.ts +0 -0
- /package/{lib/esm/table-cell → table-cell}/types.js +0 -0
- /package/{lib/cjs/table-cell → table-cell}/utils.d.ts +0 -0
- /package/{lib/esm/table-cell → table-cell}/utils.js +0 -0
- /package/{lib/cjs/table-head → table-head}/index.d.ts +0 -0
- /package/{lib/esm/table-head → table-head}/index.js +0 -0
- /package/{lib/cjs/table-head → table-head}/types.d.ts +0 -0
- /package/{lib/esm/table-head → table-head}/types.js +0 -0
- /package/{lib/cjs/table-head-cell → table-head-cell}/index.d.ts +0 -0
- /package/{lib/esm/table-head-cell → table-head-cell}/index.js +0 -0
- /package/{lib/cjs/table-head-cell → table-head-cell}/types.d.ts +0 -0
- /package/{lib/esm/table-head-cell → table-head-cell}/types.js +0 -0
- /package/{lib/cjs/table-row → table-row}/index.d.ts +0 -0
- /package/{lib/esm/table-row → table-row}/index.js +0 -0
- /package/{lib/cjs/table-row → table-row}/types.d.ts +0 -0
- /package/{lib/esm/table-row → table-row}/types.js +0 -0
- /package/{lib/cjs/tabs → tabs}/index.d.ts +0 -0
- /package/{lib/esm/tabs → tabs}/index.js +0 -0
- /package/{lib/cjs/tabs → tabs}/types.d.ts +0 -0
- /package/{lib/esm/tabs → tabs}/types.js +0 -0
- /package/{lib/cjs/tabs-icon-option → tabs-icon-option}/index.d.ts +0 -0
- /package/{lib/esm/tabs-icon-option → tabs-icon-option}/index.js +0 -0
- /package/{lib/cjs/tabs-icon-option → tabs-icon-option}/types.d.ts +0 -0
- /package/{lib/esm/tabs-icon-option → tabs-icon-option}/types.js +0 -0
- /package/{lib/cjs/tabs-option → tabs-option}/index.d.ts +0 -0
- /package/{lib/esm/tabs-option → tabs-option}/index.js +0 -0
- /package/{lib/cjs/tabs-option → tabs-option}/types.d.ts +0 -0
- /package/{lib/esm/tabs-option → tabs-option}/types.js +0 -0
- /package/{lib/cjs/tag → tag}/index.d.ts +0 -0
- /package/{lib/esm/tag → tag}/index.js +0 -0
- /package/{lib/cjs/tag → tag}/types.d.ts +0 -0
- /package/{lib/esm/tag → tag}/types.js +0 -0
- /package/{lib/cjs/tag → tag}/utils.d.ts +0 -0
- /package/{lib/esm/tag → tag}/utils.js +0 -0
- /package/{lib/cjs/text → text}/index.d.ts +0 -0
- /package/{lib/esm/text → text}/index.js +0 -0
- /package/{lib/cjs/text → text}/types.d.ts +0 -0
- /package/{lib/esm/text → text}/types.js +0 -0
- /package/{lib/cjs/text → text}/utils.d.ts +0 -0
- /package/{lib/esm/text → text}/utils.js +0 -0
- /package/{lib/cjs/textarea → textarea}/index.d.ts +0 -0
- /package/{lib/esm/textarea → textarea}/index.js +0 -0
- /package/{lib/cjs/textarea → textarea}/types.d.ts +0 -0
- /package/{lib/esm/textarea → textarea}/types.js +0 -0
- /package/{lib/cjs/tile-control → tile-control}/index.d.ts +0 -0
- /package/{lib/esm/tile-control → tile-control}/index.js +0 -0
- /package/{lib/cjs/tile-control → tile-control}/types.d.ts +0 -0
- /package/{lib/esm/tile-control → tile-control}/types.js +0 -0
- /package/{lib/cjs/tile-control-option → tile-control-option}/index.d.ts +0 -0
- /package/{lib/esm/tile-control-option → tile-control-option}/index.js +0 -0
- /package/{lib/cjs/tile-control-option → tile-control-option}/types.d.ts +0 -0
- /package/{lib/esm/tile-control-option → tile-control-option}/types.js +0 -0
- /package/{lib/cjs/time-picker → time-picker}/index.d.ts +0 -0
- /package/{lib/esm/time-picker → time-picker}/index.js +0 -0
- /package/{lib/cjs/time-picker → time-picker}/types.d.ts +0 -0
- /package/{lib/esm/time-picker → time-picker}/types.js +0 -0
- /package/{lib/cjs/time-picker → time-picker}/utils.d.ts +0 -0
- /package/{lib/esm/time-picker → time-picker}/utils.js +0 -0
- /package/{lib/cjs/title → title}/index.d.ts +0 -0
- /package/{lib/esm/title → title}/index.js +0 -0
- /package/{lib/cjs/title → title}/types.d.ts +0 -0
- /package/{lib/esm/title → title}/types.js +0 -0
- /package/{lib/cjs/title → title}/utils.d.ts +0 -0
- /package/{lib/esm/title → title}/utils.js +0 -0
- /package/{lib/cjs/toast → toast}/index.d.ts +0 -0
- /package/{lib/esm/toast → toast}/index.js +0 -0
- /package/{lib/cjs/toast → toast}/types.d.ts +0 -0
- /package/{lib/esm/toast → toast}/types.js +0 -0
- /package/{lib/cjs/toast → toast}/utils.d.ts +0 -0
- /package/{lib/esm/toast → toast}/utils.js +0 -0
- /package/{lib/cjs/toast-manager → toast-manager}/index.d.ts +0 -0
- /package/{lib/esm/toast-manager → toast-manager}/index.js +0 -0
- /package/{lib/cjs/toast-manager → toast-manager}/types.d.ts +0 -0
- /package/{lib/esm/toast-manager → toast-manager}/types.js +0 -0
- /package/{lib/cjs/toast-manager → toast-manager}/utils.d.ts +0 -0
- /package/{lib/esm/toast-manager → toast-manager}/utils.js +0 -0
- /package/{lib/cjs/toggle → toggle}/index.d.ts +0 -0
- /package/{lib/esm/toggle → toggle}/index.js +0 -0
- /package/{lib/cjs/toggle → toggle}/types.d.ts +0 -0
- /package/{lib/esm/toggle → toggle}/types.js +0 -0
- /package/{lib/cjs/tooltip → tooltip}/index.d.ts +0 -0
- /package/{lib/esm/tooltip → tooltip}/index.js +0 -0
- /package/{lib/cjs/tooltip → tooltip}/tooltip-state.d.ts +0 -0
- /package/{lib/esm/tooltip → tooltip}/tooltip-state.js +0 -0
- /package/{lib/cjs/tooltip → tooltip}/types.d.ts +0 -0
- /package/{lib/esm/tooltip → tooltip}/types.js +0 -0
- /package/{lib/cjs/tooltip → tooltip}/utils.d.ts +0 -0
- /package/{lib/esm/tooltip → tooltip}/utils.js +0 -0
- /package/{lib/cjs/types.d.ts → types.d.ts} +0 -0
- /package/{lib/cjs/utils → utils}/context.d.ts +0 -0
- /package/{lib/esm/utils → utils}/context.js +0 -0
- /package/{lib/cjs/utils → utils}/countries.d.ts +0 -0
- /package/{lib/esm/utils → utils}/countries.js +0 -0
- /package/{lib/cjs/utils → utils}/countries.json +0 -0
- /package/{lib/cjs/utils → utils}/csv.d.ts +0 -0
- /package/{lib/esm/utils → utils}/csv.js +0 -0
- /package/{lib/cjs/utils → utils}/debounce.d.ts +0 -0
- /package/{lib/esm/utils → utils}/debounce.js +0 -0
- /package/{lib/cjs/utils → utils}/dom.d.ts +0 -0
- /package/{lib/esm/utils → utils}/dom.js +0 -0
- /package/{lib/cjs/utils → utils}/element.d.ts +0 -0
- /package/{lib/cjs/utils → utils}/event-target.d.ts +0 -0
- /package/{lib/esm/utils → utils}/event-target.js +0 -0
- /package/{lib/cjs/utils → utils}/get-react-event-handler.d.ts +0 -0
- /package/{lib/esm/utils → utils}/get-react-event-handler.js +0 -0
- /package/{lib/cjs/utils → utils}/index.d.ts +0 -0
- /package/{lib/esm/utils → utils}/index.js +0 -0
- /package/{lib/cjs/utils → utils}/markdown.d.ts +0 -0
- /package/{lib/esm/utils → utils}/markdown.js +0 -0
- /package/{lib/cjs/utils → utils}/rect.d.ts +0 -0
- /package/{lib/esm/utils → utils}/rect.js +0 -0
- /package/{lib/cjs/utils → utils}/size.d.ts +0 -0
- /package/{lib/esm/utils → utils}/size.js +0 -0
- /package/{lib/cjs/utils → utils}/slot.d.ts +0 -0
- /package/{lib/esm/utils → utils}/slot.js +0 -0
- /package/{lib/cjs/utils → utils}/throttle.d.ts +0 -0
- /package/{lib/esm/utils → utils}/throttle.js +0 -0
- /package/{lib/cjs/utils → utils}/uid.d.ts +0 -0
- /package/{lib/esm/utils → utils}/uid.js +0 -0
- /package/{lib/cjs/vertical-stepper → vertical-stepper}/index.d.ts +0 -0
- /package/{lib/esm/vertical-stepper → vertical-stepper}/index.js +0 -0
- /package/{lib/cjs/vertical-stepper → vertical-stepper}/types.d.ts +0 -0
- /package/{lib/esm/vertical-stepper → vertical-stepper}/types.js +0 -0
- /package/{lib/cjs/vertical-stepper-item → vertical-stepper-item}/index.d.ts +0 -0
- /package/{lib/esm/vertical-stepper-item → vertical-stepper-item}/index.js +0 -0
- /package/{lib/cjs/vertical-stepper-item → vertical-stepper-item}/types.d.ts +0 -0
- /package/{lib/esm/vertical-stepper-item → vertical-stepper-item}/types.js +0 -0
- /package/{lib/cjs/vertical-stepper-item → vertical-stepper-item}/utils.d.ts +0 -0
- /package/{lib/esm/vertical-stepper-item → vertical-stepper-item}/utils.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _utils = require('../utils');
|
|
4
|
-
const templateHTML = '<style>:host{display:block;outline:0;--sinch-grid-num-columns:1}#wrapper{display:grid;grid-template-columns:repeat(var(--sinch-grid-num-columns),auto);gap:16px;width:fit-content}:host([small]) #wrapper{gap:8px}:host([cols="2"]){--sinch-grid-num-columns:2}:host([cols="3"]){--sinch-grid-num-columns:3}:host([cols="4"]){--sinch-grid-num-columns:4}:host([cols="5"]){--sinch-grid-num-columns:5}:host([cols="6"]){--sinch-grid-num-columns:6}:host([cols="7"]){--sinch-grid-num-columns:7}:host([cols="8"]){--sinch-grid-num-columns:8}:host([cols="9"]){--sinch-grid-num-columns:9}:host([cols="10"]){--sinch-grid-num-columns:10}</style><div id="wrapper"><slot></slot></div>';
|
|
5
|
-
const template = document.createElement('template');
|
|
6
|
-
template.innerHTML = templateHTML;
|
|
7
|
-
(0, _utils.defineCustomElement)('sinch-tile-control', class extends _utils.NectaryElement {
|
|
8
|
-
#$slot;
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
const shadowRoot = this.attachShadow();
|
|
12
|
-
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
13
|
-
this.#$slot = shadowRoot.querySelector('slot');
|
|
14
|
-
}
|
|
15
|
-
connectedCallback() {
|
|
16
|
-
this.setAttribute('role', 'tablist');
|
|
17
|
-
this.#$slot.addEventListener('option-change', this.#onOptionChange);
|
|
18
|
-
this.#$slot.addEventListener('slotchange', this.#onSlotChange);
|
|
19
|
-
this.addEventListener('-change', this.#onChangeReactHandler);
|
|
20
|
-
}
|
|
21
|
-
disconnectedCallback() {
|
|
22
|
-
this.#$slot.removeEventListener('option-change', this.#onOptionChange);
|
|
23
|
-
this.#$slot.removeEventListener('slotchange', this.#onSlotChange);
|
|
24
|
-
this.removeEventListener('-change', this.#onChangeReactHandler);
|
|
25
|
-
}
|
|
26
|
-
static get observedAttributes() {
|
|
27
|
-
return ['value', 'small', 'multiple'];
|
|
28
|
-
}
|
|
29
|
-
attributeChangedCallback(name, oldVal, newVal) {
|
|
30
|
-
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
switch (name) {
|
|
34
|
-
case 'value':
|
|
35
|
-
{
|
|
36
|
-
this.#onValueChange(newVal ?? '');
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
case 'small':
|
|
40
|
-
{
|
|
41
|
-
this.#onSmallChange();
|
|
42
|
-
(0, _utils.updateBooleanAttribute)(this, name, (0, _utils.isAttrTrue)(newVal));
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
case 'multiple':
|
|
46
|
-
{
|
|
47
|
-
this.#onValueChange(this.value);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
set value(value) {
|
|
52
|
-
(0, _utils.updateAttribute)(this, 'value', value);
|
|
53
|
-
}
|
|
54
|
-
get value() {
|
|
55
|
-
return (0, _utils.getAttribute)(this, 'value', '');
|
|
56
|
-
}
|
|
57
|
-
set small(isSmall) {
|
|
58
|
-
(0, _utils.updateBooleanAttribute)(this, 'small', isSmall);
|
|
59
|
-
}
|
|
60
|
-
get small() {
|
|
61
|
-
return (0, _utils.getBooleanAttribute)(this, 'small');
|
|
62
|
-
}
|
|
63
|
-
set multiple(isMultiple) {
|
|
64
|
-
(0, _utils.updateBooleanAttribute)(this, 'multiple', isMultiple);
|
|
65
|
-
}
|
|
66
|
-
get multiple() {
|
|
67
|
-
return (0, _utils.getBooleanAttribute)(this, 'multiple');
|
|
68
|
-
}
|
|
69
|
-
set cols(value) {
|
|
70
|
-
(0, _utils.updateIntegerAttribute)(this, 'cols', value);
|
|
71
|
-
}
|
|
72
|
-
get cols() {
|
|
73
|
-
return (0, _utils.getIntegerAttribute)(this, 'cols', 1);
|
|
74
|
-
}
|
|
75
|
-
#onSlotChange = () => {
|
|
76
|
-
this.#onValueChange(this.value);
|
|
77
|
-
this.#onSmallChange();
|
|
78
|
-
};
|
|
79
|
-
#onOptionChange = e => {
|
|
80
|
-
e.stopPropagation();
|
|
81
|
-
const $elem = e.target;
|
|
82
|
-
const value = e.detail;
|
|
83
|
-
const detail = this.multiple ? (0, _utils.updateCsv)(this.value, value, !(0, _utils.getBooleanAttribute)($elem, 'data-checked')) : value;
|
|
84
|
-
this.dispatchEvent(new CustomEvent('-change', {
|
|
85
|
-
detail
|
|
86
|
-
}));
|
|
87
|
-
};
|
|
88
|
-
#onValueChange(csv) {
|
|
89
|
-
if (this.multiple) {
|
|
90
|
-
const values = (0, _utils.unpackCsv)(csv);
|
|
91
|
-
for (const $option of this.#$slot.assignedElements()) {
|
|
92
|
-
const isChecked = !(0, _utils.getBooleanAttribute)($option, 'disabled') && values.includes((0, _utils.getAttribute)($option, 'value', ''));
|
|
93
|
-
(0, _utils.updateBooleanAttribute)($option, 'data-checked', isChecked);
|
|
94
|
-
}
|
|
95
|
-
} else {
|
|
96
|
-
const value = (0, _utils.getFirstCsvValue)(csv);
|
|
97
|
-
for (const $option of this.#$slot.assignedElements()) {
|
|
98
|
-
const isChecked = !(0, _utils.getBooleanAttribute)($option, 'disabled') && value === (0, _utils.getAttribute)($option, 'value', '');
|
|
99
|
-
(0, _utils.updateBooleanAttribute)($option, 'data-checked', isChecked);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
#onSmallChange() {
|
|
104
|
-
const isSmall = this.small;
|
|
105
|
-
for (const $opt of this.#$slot.assignedElements()) {
|
|
106
|
-
(0, _utils.updateBooleanAttribute)($opt, 'data-small', isSmall);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
#onChangeReactHandler = e => {
|
|
110
|
-
(0, _utils.getReactEventHandler)(this, 'on-change')?.(e);
|
|
111
|
-
};
|
|
112
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _utils = require('../utils');
|
|
4
|
-
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}button{all:initial;position:relative;display:flex;flex-direction:column;justify-content:space-between;box-sizing:border-box;width:var(--sinch-local-size);height:var(--sinch-local-size);padding:16px 8px 8px;border-radius:var(--sinch-local-shape-radius);background-color:var(--sinch-local-color-background);box-shadow:var(--sinch-local-shadow);cursor:pointer;--sinch-local-color-background:var(--sinch-comp-tile-control-color-default-background-initial);--sinch-local-color-border:var(--sinch-comp-tile-control-color-default-border-initial);--sinch-local-color-text:var(--sinch-comp-tile-control-color-default-text-initial);--sinch-local-color-icon:var(--sinch-comp-tile-control-color-default-icon-initial);--sinch-local-shadow:var(--sinch-comp-tile-control-shadow-initial);--sinch-local-shape-radius:var(--sinch-comp-tile-control-shape-radius-l);--sinch-local-size:88px;--sinch-local-size-icon:var(--sinch-comp-tile-control-size-m-icon)}button::before{content:"";position:absolute;inset:0;border:1px solid var(--sinch-local-color-border);border-radius:var(--sinch-local-shape-radius);pointer-events:none}button:focus-visible::after{position:absolute;content:"";inset:-4px;padding:2px;border:2px solid var(--sinch-comp-tile-control-color-default-outline-focus);border-radius:calc(var(--sinch-local-shape-radius) + 4px);pointer-events:none}:host([data-small])>button{padding:12px 4px 4px;--sinch-local-shape-radius:var(--sinch-comp-tile-control-shape-radius-s);--sinch-local-size:64px;--sinch-local-size-icon:var(--sinch-comp-tile-control-size-s-icon)}button:enabled:hover{--sinch-local-color-background:var(--sinch-comp-tile-control-color-default-background-hover);--sinch-local-color-border:var(--sinch-comp-tile-control-color-default-border-hover);--sinch-local-shadow:var(--sinch-comp-tile-control-shadow-hover)}:host([data-checked])>button:enabled,button:enabled:active{--sinch-local-color-background:var(--sinch-comp-tile-control-color-checked-background-initial);--sinch-local-color-border:var(--sinch-comp-tile-control-color-checked-border-initial);--sinch-local-color-text:var(--sinch-comp-tile-control-color-checked-text-initial);--sinch-local-color-icon:var(--sinch-comp-tile-control-color-checked-icon-initial);--sinch-local-shadow:var(--sinch-comp-tile-control-shadow-active)}:host([data-checked])>button:enabled::before,button:enabled:active::before{border-width:2px}button:disabled{cursor:initial;--sinch-local-color-background:var(--sinch-comp-tile-control-color-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-tile-control-color-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-tile-control-color-disabled-text-initial);--sinch-local-color-icon:var(--sinch-comp-tile-control-color-disabled-icon-initial);--sinch-local-shadow:var(--sinch-comp-tile-control-shadow-disabled)}#text{display:inline-block;min-height:20px;text-align:center;font:var(--sinch-comp-tile-control-font-label);color:var(--sinch-local-color-text);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#icon{width:var(--sinch-local-size-icon);height:var(--sinch-local-size-icon);align-self:center;--sinch-global-size-icon:var(--sinch-local-size-icon);--sinch-global-color-icon:var(--sinch-local-color-icon)}</style><button><div id="icon"><slot name="icon"></slot></div><span id="text"></span></button>';
|
|
5
|
-
const template = document.createElement('template');
|
|
6
|
-
template.innerHTML = templateHTML;
|
|
7
|
-
(0, _utils.defineCustomElement)('sinch-tile-control-option', class extends _utils.NectaryElement {
|
|
8
|
-
#$button;
|
|
9
|
-
#$text;
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
const shadowRoot = this.attachShadow();
|
|
13
|
-
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
14
|
-
this.#$button = shadowRoot.querySelector('button');
|
|
15
|
-
this.#$text = shadowRoot.querySelector('#text');
|
|
16
|
-
}
|
|
17
|
-
connectedCallback() {
|
|
18
|
-
this.setAttribute('role', 'tab');
|
|
19
|
-
this.#$button.addEventListener('click', this.#onButtonClick);
|
|
20
|
-
this.#$button.addEventListener('focus', this.#onButtonFocus);
|
|
21
|
-
this.#$button.addEventListener('blur', this.#onButtonBlur);
|
|
22
|
-
this.addEventListener('-focus', this.#onFocusReactHandler);
|
|
23
|
-
this.addEventListener('-blur', this.#onBlurReactHandler);
|
|
24
|
-
}
|
|
25
|
-
disconnectedCallback() {
|
|
26
|
-
this.#$button.removeEventListener('click', this.#onButtonClick);
|
|
27
|
-
this.#$button.removeEventListener('focus', this.#onButtonFocus);
|
|
28
|
-
this.#$button.removeEventListener('blur', this.#onButtonBlur);
|
|
29
|
-
this.removeEventListener('-focus', this.#onFocusReactHandler);
|
|
30
|
-
this.removeEventListener('-blur', this.#onBlurReactHandler);
|
|
31
|
-
}
|
|
32
|
-
static get observedAttributes() {
|
|
33
|
-
return ['data-checked', 'text', 'disabled'];
|
|
34
|
-
}
|
|
35
|
-
attributeChangedCallback(name, oldVal, newVal) {
|
|
36
|
-
switch (name) {
|
|
37
|
-
case 'text':
|
|
38
|
-
{
|
|
39
|
-
this.#$text.textContent = newVal;
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
case 'data-checked':
|
|
43
|
-
{
|
|
44
|
-
(0, _utils.updateExplicitBooleanAttribute)(this, 'aria-selected', (0, _utils.isAttrTrue)(newVal));
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
case 'disabled':
|
|
48
|
-
{
|
|
49
|
-
this.#$button.disabled = (0, _utils.isAttrTrue)(newVal);
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
set value(value) {
|
|
55
|
-
(0, _utils.updateAttribute)(this, 'value', value);
|
|
56
|
-
}
|
|
57
|
-
get value() {
|
|
58
|
-
return (0, _utils.getAttribute)(this, 'value', '');
|
|
59
|
-
}
|
|
60
|
-
set disabled(isDisabled) {
|
|
61
|
-
(0, _utils.updateBooleanAttribute)(this, 'disabled', isDisabled);
|
|
62
|
-
}
|
|
63
|
-
get disabled() {
|
|
64
|
-
return (0, _utils.getBooleanAttribute)(this, 'disabled');
|
|
65
|
-
}
|
|
66
|
-
set text(value) {
|
|
67
|
-
(0, _utils.updateAttribute)(this, 'text', value);
|
|
68
|
-
}
|
|
69
|
-
get text() {
|
|
70
|
-
return (0, _utils.getAttribute)(this, 'text', '');
|
|
71
|
-
}
|
|
72
|
-
get focusable() {
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
focus() {
|
|
76
|
-
this.#$button.focus();
|
|
77
|
-
}
|
|
78
|
-
blur() {
|
|
79
|
-
this.#$button.blur();
|
|
80
|
-
}
|
|
81
|
-
#onButtonClick = e => {
|
|
82
|
-
e.stopPropagation();
|
|
83
|
-
this.dispatchEvent(new CustomEvent('option-change', {
|
|
84
|
-
detail: this.value,
|
|
85
|
-
bubbles: true
|
|
86
|
-
}));
|
|
87
|
-
};
|
|
88
|
-
#onButtonFocus = () => {
|
|
89
|
-
this.dispatchEvent(new CustomEvent('-focus'));
|
|
90
|
-
};
|
|
91
|
-
#onButtonBlur = () => {
|
|
92
|
-
this.dispatchEvent(new CustomEvent('-blur'));
|
|
93
|
-
};
|
|
94
|
-
#onFocusReactHandler = () => {
|
|
95
|
-
(0, _utils.getReactEventHandler)(this, 'on-focus')?.();
|
|
96
|
-
};
|
|
97
|
-
#onBlurReactHandler = () => {
|
|
98
|
-
(0, _utils.getReactEventHandler)(this, 'on-blur')?.();
|
|
99
|
-
};
|
|
100
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require('../icon');
|
|
4
|
-
require('../segmented-control');
|
|
5
|
-
require('../segmented-control-option');
|
|
6
|
-
var _utils = require('../utils');
|
|
7
|
-
var _utils2 = require('./utils');
|
|
8
|
-
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{display:flex;flex-direction:column;width:248px;padding:16px;box-sizing:border-box;gap:16px}#header{position:relative;width:100%;height:48px;font:var(--sinch-comp-time-picker-header-font);line-height:48px;user-select:none;color:var(--sinch-comp-time-picker-header-color-default-text-initial)}#footer{display:flex;justify-content:center;width:100%;height:32px}#picker{position:relative;width:216px;height:216px;border-radius:50%;box-sizing:border-box;border:1px solid var(--sinch-comp-time-picker-watch-face-color-default-border-initial);background-color:var(--sinch-comp-time-picker-watch-face-color-default-background-initial)}#picker-hours,#picker-minutes{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:50%;pointer-events:none;user-select:none}.digit-hour-12,.digit-hour-24,.digit-minute{position:absolute;width:28px;height:28px;text-align:center;top:calc(50% - 14px);left:calc(50% - 14px);z-index:1;cursor:pointer}.digit-hour-12{font:var(--sinch-comp-time-picker-digit-font-default-h12);color:var(--sinch-comp-time-picker-digit-color-default-h12-initial);line-height:28px}.digit-hour-12.selected{font:var(--sinch-comp-time-picker-digit-font-checked-h12);color:var(--sinch-comp-time-picker-digit-color-checked-h12-default)}.digit-hour-24{font:var(--sinch-comp-time-picker-digit-font-default-h24);color:var(--sinch-comp-time-picker-digit-color-default-h24-initial);line-height:28px}.digit-hour-24.selected{font:var(--sinch-comp-time-picker-digit-font-checked-h24);color:var(--sinch-comp-time-picker-digit-color-checked-h24-initial)}.digit-minute{font:var(--sinch-comp-time-picker-digit-font-default-minutes);color:var(--sinch-comp-time-picker-digit-color-default-minute-initial);line-height:28px}.digit-minute.selected{font:var(--sinch-comp-time-picker-digit-font-checked-minutes);color:var(--sinch-comp-time-picker-digit-color-checked-minute-initial)}#picker-touch{position:absolute;left:0;top:0;width:100%;height:100%;cursor:pointer;border-radius:50%}#needle-hour,#needle-minute,#picker-touch::after{background-color:var(--sinch-comp-time-picker-needle-color-default-background-initial)}#needle-hour,#needle-minute{position:absolute;transform-origin:bottom center;transform:rotate(0);bottom:50%;height:50px;transition-duration:.25s;transition-timing-function:ease-in-out;transition-property:transform height;z-index:2;outline:0}@media (prefers-reduced-motion){#needle-hour,#needle-minute{transition:none}}#needle-hour{width:4px;left:calc(50% - 2px);border-radius:2px}#needle-minute{width:2px;left:calc(50% - 1px);border-radius:1px}#needle-hour:focus-visible,#needle-minute:focus-visible{background-color:var(--sinch-comp-time-picker-needle-color-default-background-focus)}#needle-minute:not(.selected)::after{content:"";position:absolute;transform:translateX(-50%);left:0;top:-16px;width:4px;height:4px;border-radius:50%;background-color:var(--sinch-comp-time-picker-digit-color-checked-minute-initial)}#picker-touch::after{content:"";position:absolute;top:50%;left:50%;width:12px;height:12px;border-radius:50%;transform:translate(-50%,-50%)}#header-hours,#header-minutes{position:absolute;padding:0 4px;width:50px;outline:0}#header-hours{right:calc(50% + 8px);text-align:right}#header-minutes{left:calc(50% + 8px)}#header-colon{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}#submit{position:absolute;right:0;top:50%;transform:translateY(-50%)}#submit-icon{--sinch-global-color-icon:var(--sinch-comp-time-picker-header-color-default-icon-initial)}:host([ampm]) .digit-hour-24{display:none}:host(:not([ampm])) #footer{display:none}</style><div id="wrapper"><div id="header"><div id="header-hours" role="meter" aria-valuemin="0" aria-valuemax="23" aria-valuenow="0" aria-valuetext="0"><span>00</span></div><div id="header-colon">:</div><div id="header-minutes" role="meter" aria-valuemin="0" aria-valuemax="59" aria-valuenow="0" aria-valuetext="0"><span>00</span></div><sinch-button id="submit" size="s" aria-label="Submit"><sinch-icon id="icon-submit" slot="icon" name="done"></sinch-icon></sinch-button></div><div id="picker" aria-hidden="true"><div id="picker-hours"></div><div id="picker-minutes"></div><div id="picker-touch"><div id="needle-hour" tabindex="0"></div><div id="needle-minute" tabindex="0"></div></div></div><div id="footer"><sinch-segmented-control id="ampm"><sinch-segmented-control-option value="am" text="AM" aria-label="AM"></sinch-segmented-control-option><sinch-segmented-control-option value="pm" text="PM" aria-label="PM"></sinch-segmented-control-option></sinch-segmented-control></div></div>';
|
|
9
|
-
const template = document.createElement('template');
|
|
10
|
-
template.innerHTML = templateHTML;
|
|
11
|
-
const PICKER_RADIUS = 216 / 2;
|
|
12
|
-
const MINUTE_DIGIT_SIZE = 30;
|
|
13
|
-
const HOUR_12_DIGIT_SIZE = 26;
|
|
14
|
-
const HOUR_24_DIGIT_SIZE = 26;
|
|
15
|
-
const MINUTE_RADIUS = PICKER_RADIUS - MINUTE_DIGIT_SIZE;
|
|
16
|
-
const HOUR_12_RADIUS = MINUTE_RADIUS - HOUR_12_DIGIT_SIZE;
|
|
17
|
-
const HOUR_24_RADIUS = HOUR_12_RADIUS - HOUR_24_DIGIT_SIZE;
|
|
18
|
-
const NEEDLE_HOUR_12_LENGTH = HOUR_12_RADIUS;
|
|
19
|
-
const NEEDLE_HOUR_24_LENGTH = HOUR_24_RADIUS;
|
|
20
|
-
const NEEDLE_MINUTE_LENGTH = MINUTE_RADIUS;
|
|
21
|
-
(0, _utils.defineCustomElement)('sinch-time-picker', class extends _utils.NectaryElement {
|
|
22
|
-
#$pickerHours;
|
|
23
|
-
#$pickerMinutes;
|
|
24
|
-
#$pickerTouch;
|
|
25
|
-
#$needleHour;
|
|
26
|
-
#$needleMinute;
|
|
27
|
-
#$headerHours;
|
|
28
|
-
#$headerHoursText;
|
|
29
|
-
#$headerMinutes;
|
|
30
|
-
#$headerMinutesText;
|
|
31
|
-
#$ampm;
|
|
32
|
-
#$submitButton;
|
|
33
|
-
#hour = 0;
|
|
34
|
-
#minute = 0;
|
|
35
|
-
#controller = null;
|
|
36
|
-
constructor() {
|
|
37
|
-
super();
|
|
38
|
-
const shadowRoot = this.attachShadow();
|
|
39
|
-
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
40
|
-
this.#$pickerHours = shadowRoot.querySelector('#picker-hours');
|
|
41
|
-
this.#$pickerMinutes = shadowRoot.querySelector('#picker-minutes');
|
|
42
|
-
this.#$pickerTouch = shadowRoot.querySelector('#picker');
|
|
43
|
-
this.#$needleHour = shadowRoot.querySelector('#needle-hour');
|
|
44
|
-
this.#$needleMinute = shadowRoot.querySelector('#needle-minute');
|
|
45
|
-
this.#$headerHours = shadowRoot.querySelector('#header-hours');
|
|
46
|
-
this.#$headerMinutes = shadowRoot.querySelector('#header-minutes');
|
|
47
|
-
this.#$headerHoursText = shadowRoot.querySelector('#header-hours > span');
|
|
48
|
-
this.#$headerMinutesText = shadowRoot.querySelector('#header-minutes > span');
|
|
49
|
-
this.#$ampm = shadowRoot.querySelector('#ampm');
|
|
50
|
-
this.#$submitButton = shadowRoot.querySelector('#submit');
|
|
51
|
-
this.#$needleMinute.style.height = `${NEEDLE_MINUTE_LENGTH}px`;
|
|
52
|
-
this.#$needleHour.style.height = `${NEEDLE_HOUR_12_LENGTH}px`;
|
|
53
|
-
const MINUTE_DIGIT_RADIUS = MINUTE_RADIUS + MINUTE_DIGIT_SIZE / 2;
|
|
54
|
-
const HOUR_12_DIGIT_RADIUS = HOUR_12_RADIUS + HOUR_12_DIGIT_SIZE / 2;
|
|
55
|
-
const HOUR_24_DIGIT_RADIUS = HOUR_24_RADIUS + HOUR_24_DIGIT_SIZE / 2;
|
|
56
|
-
const hours12Frag = document.createDocumentFragment();
|
|
57
|
-
for (let i = 0; i < 12; i++) {
|
|
58
|
-
const rad = Math.PI / 6 * (i - 3);
|
|
59
|
-
const el = document.createElement('div');
|
|
60
|
-
const x = Math.cos(rad) * HOUR_12_DIGIT_RADIUS;
|
|
61
|
-
const y = Math.sin(rad) * HOUR_12_DIGIT_RADIUS;
|
|
62
|
-
const hourDisplayValue = (0, _utils2.stringifyHourFace)(i);
|
|
63
|
-
el.className = 'digit-hour-12';
|
|
64
|
-
el.style.transform = `translate(${x}px, ${y}px)`;
|
|
65
|
-
el.textContent = hourDisplayValue;
|
|
66
|
-
hours12Frag.appendChild(el);
|
|
67
|
-
}
|
|
68
|
-
this.#$pickerHours.appendChild(hours12Frag);
|
|
69
|
-
const hours24Frag = document.createDocumentFragment();
|
|
70
|
-
for (let i = 12; i < 24; i++) {
|
|
71
|
-
const rad = Math.PI / 6 * (i - 3);
|
|
72
|
-
const el = document.createElement('div');
|
|
73
|
-
const x = Math.cos(rad) * HOUR_24_DIGIT_RADIUS;
|
|
74
|
-
const y = Math.sin(rad) * HOUR_24_DIGIT_RADIUS;
|
|
75
|
-
const hourDisplayValue = (0, _utils2.stringifyHourFace)(i);
|
|
76
|
-
el.className = 'digit-hour-24';
|
|
77
|
-
el.style.transform = `translate(${x}px, ${y}px)`;
|
|
78
|
-
el.textContent = hourDisplayValue;
|
|
79
|
-
hours24Frag.appendChild(el);
|
|
80
|
-
}
|
|
81
|
-
this.#$pickerHours.appendChild(hours24Frag);
|
|
82
|
-
const minutesFrag = document.createDocumentFragment();
|
|
83
|
-
for (let i = 0; i < 60; i += 5) {
|
|
84
|
-
const rad = Math.PI / 30 * (i - 15);
|
|
85
|
-
const el = document.createElement('div');
|
|
86
|
-
const x = Math.cos(rad) * MINUTE_DIGIT_RADIUS;
|
|
87
|
-
const y = Math.sin(rad) * MINUTE_DIGIT_RADIUS;
|
|
88
|
-
el.className = 'digit-minute';
|
|
89
|
-
el.style.transform = `translate(${x}px, ${y}px)`;
|
|
90
|
-
el.textContent = (0, _utils2.stringifyMinute)(i);
|
|
91
|
-
minutesFrag.appendChild(el);
|
|
92
|
-
}
|
|
93
|
-
this.#$pickerMinutes.appendChild(minutesFrag);
|
|
94
|
-
}
|
|
95
|
-
connectedCallback() {
|
|
96
|
-
this.#controller = new AbortController();
|
|
97
|
-
const options = {
|
|
98
|
-
signal: this.#controller.signal
|
|
99
|
-
};
|
|
100
|
-
this.#$pickerTouch.addEventListener('click', this.#onPickerClick, options);
|
|
101
|
-
this.#$ampm.addEventListener('-change', this.#onAmPmChange, options);
|
|
102
|
-
this.#$submitButton.addEventListener('click', this.#onSubmitButtonClick, options);
|
|
103
|
-
this.#$needleHour.addEventListener('keydown', this.#onHoursKeydown, options);
|
|
104
|
-
this.#$needleMinute.addEventListener('keydown', this.#onMinutesKeydown, options);
|
|
105
|
-
this.addEventListener('-change', this.#onChangeReactHandler, options);
|
|
106
|
-
}
|
|
107
|
-
disconnectedCallback() {
|
|
108
|
-
this.#controller.abort();
|
|
109
|
-
this.#controller = null;
|
|
110
|
-
}
|
|
111
|
-
static get observedAttributes() {
|
|
112
|
-
return ['value', 'ampm', 'submit-aria-label'];
|
|
113
|
-
}
|
|
114
|
-
attributeChangedCallback(name, prevValue, newVal) {
|
|
115
|
-
if ((0, _utils.isAttrEqual)(prevValue, newVal)) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
switch (name) {
|
|
119
|
-
case 'value':
|
|
120
|
-
{
|
|
121
|
-
const {
|
|
122
|
-
hours,
|
|
123
|
-
minutes
|
|
124
|
-
} = (0, _utils2.parseTime)(newVal);
|
|
125
|
-
this.#hour = hours;
|
|
126
|
-
this.#minute = minutes;
|
|
127
|
-
this.#render();
|
|
128
|
-
break;
|
|
129
|
-
}
|
|
130
|
-
case 'ampm':
|
|
131
|
-
{
|
|
132
|
-
this.#render();
|
|
133
|
-
(0, _utils.updateBooleanAttribute)(this, 'ampm', (0, _utils.isAttrTrue)(newVal));
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
|
-
case 'submit-aria-label':
|
|
137
|
-
{
|
|
138
|
-
(0, _utils.updateAttribute)(this.#$submitButton, 'aria-label', newVal);
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
set value(value) {
|
|
144
|
-
(0, _utils.updateAttribute)(this, 'value', value);
|
|
145
|
-
}
|
|
146
|
-
get value() {
|
|
147
|
-
return (0, _utils.getAttribute)(this, 'value', '');
|
|
148
|
-
}
|
|
149
|
-
set ampm(value) {
|
|
150
|
-
(0, _utils.updateBooleanAttribute)(this, 'ampm', value);
|
|
151
|
-
}
|
|
152
|
-
get ampm() {
|
|
153
|
-
return (0, _utils.getBooleanAttribute)(this, 'ampm');
|
|
154
|
-
}
|
|
155
|
-
set submitAriaLabel(value) {
|
|
156
|
-
(0, _utils.updateAttribute)(this, 'submit-aria-label', value);
|
|
157
|
-
}
|
|
158
|
-
get submitAriaLabel() {
|
|
159
|
-
return (0, _utils.getAttribute)(this, 'submit-aria-label', '');
|
|
160
|
-
}
|
|
161
|
-
get submitButtonRect() {
|
|
162
|
-
return (0, _utils.getRect)(this.#$submitButton);
|
|
163
|
-
}
|
|
164
|
-
get amButtonRect() {
|
|
165
|
-
if (!this.ampm) {
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
const $am = this.#$ampm.querySelector('[value="am"]');
|
|
169
|
-
return $am != null ? (0, _utils.getRect)($am) : null;
|
|
170
|
-
}
|
|
171
|
-
get pmButtonRect() {
|
|
172
|
-
if (!this.ampm) {
|
|
173
|
-
return null;
|
|
174
|
-
}
|
|
175
|
-
const $pm = this.#$ampm.querySelector('[value="pm"]');
|
|
176
|
-
return $pm != null ? (0, _utils.getRect)($pm) : null;
|
|
177
|
-
}
|
|
178
|
-
hourDigitRect(hour) {
|
|
179
|
-
const $digit = this.#$pickerHours.children[(0, _utils2.hourToIndex)(hour, !this.ampm)];
|
|
180
|
-
return $digit != null ? (0, _utils.getRect)($digit) : null;
|
|
181
|
-
}
|
|
182
|
-
minuteDigitRect(minute) {
|
|
183
|
-
const $digit = this.#$pickerMinutes.children[Math.round(minute / 5)];
|
|
184
|
-
return $digit != null ? (0, _utils.getRect)($digit) : null;
|
|
185
|
-
}
|
|
186
|
-
#getClickDegree(x, y) {
|
|
187
|
-
const touchRect = this.#$pickerTouch.getBoundingClientRect();
|
|
188
|
-
const cx = touchRect.width / 2;
|
|
189
|
-
const cy = touchRect.height / 2;
|
|
190
|
-
const px = x - touchRect.x;
|
|
191
|
-
const py = touchRect.height - y + touchRect.y;
|
|
192
|
-
const dx = px - cx;
|
|
193
|
-
const dy = py - cy;
|
|
194
|
-
const len = Math.sqrt(dx * dx + dy * dy);
|
|
195
|
-
const cosRad = dx / len;
|
|
196
|
-
const rad = Math.acos(cosRad * (dy < 0 ? -1 : 1));
|
|
197
|
-
const deg = rad * (180 / Math.PI);
|
|
198
|
-
let cssDeg = (deg - 90 - 360) % 360 * -1;
|
|
199
|
-
if (dy < 0) {
|
|
200
|
-
cssDeg += 180;
|
|
201
|
-
}
|
|
202
|
-
const rowIndex = len > MINUTE_RADIUS ? 0 : len > HOUR_12_RADIUS ? 1 : 2;
|
|
203
|
-
return [cssDeg, rowIndex];
|
|
204
|
-
}
|
|
205
|
-
#onPickerClick = e => {
|
|
206
|
-
const [cssDeg, rowIndex] = this.#getClickDegree(e.x, e.y);
|
|
207
|
-
const isHourRowClick = rowIndex > 0;
|
|
208
|
-
const isHour24RowClick = rowIndex > 1;
|
|
209
|
-
if (isHourRowClick) {
|
|
210
|
-
const digitIndex = Math.round(cssDeg / 30) % 12;
|
|
211
|
-
const is24 = (0, _utils.getBooleanAttribute)(this, 'ampm') === false;
|
|
212
|
-
if (is24) {
|
|
213
|
-
if (isHour24RowClick) {
|
|
214
|
-
this.#hour = digitIndex === 0 ? 0 : digitIndex + 12;
|
|
215
|
-
} else {
|
|
216
|
-
this.#hour = digitIndex === 0 ? 12 : digitIndex;
|
|
217
|
-
}
|
|
218
|
-
} else {
|
|
219
|
-
this.#hour = digitIndex + (this.#$ampm.value === 'pm' ? 12 : 0);
|
|
220
|
-
}
|
|
221
|
-
this.#$headerHours.focus();
|
|
222
|
-
} else {
|
|
223
|
-
this.#minute = Math.round(cssDeg / 6) % 60;
|
|
224
|
-
this.#$headerMinutes.focus();
|
|
225
|
-
}
|
|
226
|
-
this.#render();
|
|
227
|
-
};
|
|
228
|
-
#render() {
|
|
229
|
-
const is24 = (0, _utils.getBooleanAttribute)(this, 'ampm') === false;
|
|
230
|
-
this.#selectHour(is24);
|
|
231
|
-
this.#selectMinute();
|
|
232
|
-
this.#$headerHoursText.textContent = (0, _utils2.stringifyHour)(this.#hour, is24);
|
|
233
|
-
this.#$headerMinutesText.textContent = (0, _utils2.stringifyMinute)(this.#minute);
|
|
234
|
-
(0, _utils.updateAttribute)(this.#$headerHours, 'aria-valuenow', this.#hour);
|
|
235
|
-
(0, _utils.updateAttribute)(this.#$headerHours, 'aria-valuetext', this.#hour);
|
|
236
|
-
(0, _utils.updateAttribute)(this.#$headerMinutes, 'aria-valuenow', this.#minute);
|
|
237
|
-
(0, _utils.updateAttribute)(this.#$headerMinutes, 'aria-valuetext', this.#minute);
|
|
238
|
-
}
|
|
239
|
-
#selectHour(is24) {
|
|
240
|
-
const $hours = this.#$pickerHours.children;
|
|
241
|
-
const hourDigitIndex = this.#hour % 12;
|
|
242
|
-
const selectedIndex = (0, _utils2.hourToIndex)(this.#hour, is24);
|
|
243
|
-
const currentCssDeg = (0, _utils2.getNeedleRotationDeg)(this.#$needleHour);
|
|
244
|
-
const hourCssDeg = (0, _utils2.getShortestCssDeg)(currentCssDeg, hourDigitIndex * 30);
|
|
245
|
-
for (let i = 0; i < $hours.length; i++) {
|
|
246
|
-
(0, _utils.setClass)($hours[i], 'selected', i === selectedIndex);
|
|
247
|
-
}
|
|
248
|
-
this.#$needleHour.style.transform = `rotate(${hourCssDeg}deg)`;
|
|
249
|
-
if (is24) {
|
|
250
|
-
if (this.#hour > 0 && this.#hour <= 12) {
|
|
251
|
-
this.#$needleHour.style.height = `${NEEDLE_HOUR_12_LENGTH}px`;
|
|
252
|
-
} else {
|
|
253
|
-
this.#$needleHour.style.height = `${NEEDLE_HOUR_24_LENGTH}px`;
|
|
254
|
-
}
|
|
255
|
-
} else {
|
|
256
|
-
this.#$needleHour.style.height = `${NEEDLE_HOUR_12_LENGTH}px`;
|
|
257
|
-
}
|
|
258
|
-
this.#$ampm.setAttribute('value', this.#hour >= 0 && this.#hour < 12 ? 'am' : 'pm');
|
|
259
|
-
}
|
|
260
|
-
#selectMinute() {
|
|
261
|
-
const $minutes = this.#$pickerMinutes.children;
|
|
262
|
-
const isNeedleSelected = this.#minute % 5 === 0;
|
|
263
|
-
const selectedIndex = this.#minute / 5;
|
|
264
|
-
const currentCssDeg = (0, _utils2.getNeedleRotationDeg)(this.#$needleMinute);
|
|
265
|
-
const minuteCssDeg = (0, _utils2.getShortestCssDeg)(currentCssDeg, this.#minute * 6);
|
|
266
|
-
for (let i = 0; i < $minutes.length; i++) {
|
|
267
|
-
(0, _utils.setClass)($minutes[i], 'selected', selectedIndex === i);
|
|
268
|
-
}
|
|
269
|
-
(0, _utils.setClass)(this.#$needleMinute, 'selected', isNeedleSelected);
|
|
270
|
-
this.#$needleMinute.style.transform = `rotate(${minuteCssDeg}deg)`;
|
|
271
|
-
}
|
|
272
|
-
#onAmPmChange = e => {
|
|
273
|
-
const value = e.detail;
|
|
274
|
-
switch (value) {
|
|
275
|
-
case 'am':
|
|
276
|
-
{
|
|
277
|
-
if (this.#hour >= 12) {
|
|
278
|
-
this.#hour -= 12;
|
|
279
|
-
this.#render();
|
|
280
|
-
}
|
|
281
|
-
break;
|
|
282
|
-
}
|
|
283
|
-
case 'pm':
|
|
284
|
-
{
|
|
285
|
-
if (this.#hour < 12) {
|
|
286
|
-
this.#hour += 12;
|
|
287
|
-
this.#render();
|
|
288
|
-
}
|
|
289
|
-
break;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
#onSubmitButtonClick = () => {
|
|
294
|
-
const value = (0, _utils2.stringifyTime)(this.#hour, this.#minute);
|
|
295
|
-
this.dispatchEvent(new CustomEvent('-change', {
|
|
296
|
-
detail: value
|
|
297
|
-
}));
|
|
298
|
-
};
|
|
299
|
-
#onHoursKeydown = e => {
|
|
300
|
-
switch (e.key) {
|
|
301
|
-
case 'ArrowUp':
|
|
302
|
-
{
|
|
303
|
-
e.preventDefault();
|
|
304
|
-
this.#hour = (this.#hour + 1) % 24;
|
|
305
|
-
this.#render();
|
|
306
|
-
break;
|
|
307
|
-
}
|
|
308
|
-
case 'ArrowDown':
|
|
309
|
-
{
|
|
310
|
-
e.preventDefault();
|
|
311
|
-
this.#hour = (this.#hour + 23) % 24;
|
|
312
|
-
this.#render();
|
|
313
|
-
break;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
#onMinutesKeydown = e => {
|
|
318
|
-
switch (e.key) {
|
|
319
|
-
case 'ArrowUp':
|
|
320
|
-
{
|
|
321
|
-
e.preventDefault();
|
|
322
|
-
this.#minute = (this.#minute + 1) % 60;
|
|
323
|
-
this.#render();
|
|
324
|
-
break;
|
|
325
|
-
}
|
|
326
|
-
case 'ArrowDown':
|
|
327
|
-
{
|
|
328
|
-
e.preventDefault();
|
|
329
|
-
this.#minute = (this.#minute + 59) % 60;
|
|
330
|
-
this.#render();
|
|
331
|
-
break;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
};
|
|
335
|
-
#onChangeReactHandler = e => {
|
|
336
|
-
(0, _utils.getReactEventHandler)(this, 'on-change')?.(e);
|
|
337
|
-
};
|
|
338
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.stringifyTime = exports.stringifyMinute = exports.stringifyHourFace = exports.stringifyHour = exports.parseTime = exports.hourToIndex = exports.getShortestCssDeg = exports.getNeedleRotationDeg = void 0;
|
|
7
|
-
const parseTime = value => {
|
|
8
|
-
if (value === '' || value === null) {
|
|
9
|
-
return {
|
|
10
|
-
hours: 0,
|
|
11
|
-
minutes: 0
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
const timeParts = value.split(':');
|
|
15
|
-
const hours = parseInt(timeParts[0] ?? '00');
|
|
16
|
-
const minutes = parseInt(timeParts[1] ?? '00');
|
|
17
|
-
if (isNaN(hours) || hours > 23 || hours < 0) {
|
|
18
|
-
return {
|
|
19
|
-
hours: 0,
|
|
20
|
-
minutes: 0
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
if (isNaN(minutes) || minutes > 59 || minutes < 0) {
|
|
24
|
-
return {
|
|
25
|
-
hours: 0,
|
|
26
|
-
minutes: 0
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
hours,
|
|
31
|
-
minutes
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
exports.parseTime = parseTime;
|
|
35
|
-
const pad = value => {
|
|
36
|
-
return value.toString().padStart(2, '0');
|
|
37
|
-
};
|
|
38
|
-
const stringifyTime = (hour, minute) => {
|
|
39
|
-
return `${pad(hour)}:${pad(minute)}:00`;
|
|
40
|
-
};
|
|
41
|
-
exports.stringifyTime = stringifyTime;
|
|
42
|
-
const stringifyHour = (hour, is24) => {
|
|
43
|
-
if (is24) {
|
|
44
|
-
return pad(hour);
|
|
45
|
-
}
|
|
46
|
-
if (hour === 0 || hour === 12) {
|
|
47
|
-
return '12';
|
|
48
|
-
}
|
|
49
|
-
return pad(hour % 12);
|
|
50
|
-
};
|
|
51
|
-
exports.stringifyHour = stringifyHour;
|
|
52
|
-
const stringifyHourFace = hour => {
|
|
53
|
-
return hour === 0 ? '12' : hour === 12 ? '24' : String(hour);
|
|
54
|
-
};
|
|
55
|
-
exports.stringifyHourFace = stringifyHourFace;
|
|
56
|
-
const stringifyMinute = minute => {
|
|
57
|
-
return pad(minute);
|
|
58
|
-
};
|
|
59
|
-
exports.stringifyMinute = stringifyMinute;
|
|
60
|
-
const hourToIndex = (hour, is24) => {
|
|
61
|
-
if (is24) {
|
|
62
|
-
if (hour === 0) {
|
|
63
|
-
return 12;
|
|
64
|
-
}
|
|
65
|
-
if (hour === 12) {
|
|
66
|
-
return 0;
|
|
67
|
-
}
|
|
68
|
-
return hour;
|
|
69
|
-
}
|
|
70
|
-
return hour % 12;
|
|
71
|
-
};
|
|
72
|
-
exports.hourToIndex = hourToIndex;
|
|
73
|
-
const getNeedleRotationDeg = elem => {
|
|
74
|
-
const match = elem.style.transform.match(/^rotate\((-?\d+)deg\)$/);
|
|
75
|
-
if (match === null) {
|
|
76
|
-
return 0;
|
|
77
|
-
}
|
|
78
|
-
return Number(match[1]);
|
|
79
|
-
};
|
|
80
|
-
exports.getNeedleRotationDeg = getNeedleRotationDeg;
|
|
81
|
-
const getShortestCssDeg = (currentDeg, nextDeg) => {
|
|
82
|
-
const angle = currentDeg % 360;
|
|
83
|
-
const diff = (360 - (angle - nextDeg)) % 360;
|
|
84
|
-
if (diff > 180) {
|
|
85
|
-
return currentDeg - 360 + diff;
|
|
86
|
-
}
|
|
87
|
-
return currentDeg + diff;
|
|
88
|
-
};
|
|
89
|
-
exports.getShortestCssDeg = getShortestCssDeg;
|