@nectary/components 3.3.1 → 3.3.3
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 -2
- package/{lib/esm/input → input}/index.js +8 -0
- package/{lib/cjs/input → input}/types.d.ts +5 -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 -152
- 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}/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
package/lib/cjs/dialog/index.js
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require('../icon');
|
|
4
|
-
require('../stop-events');
|
|
5
|
-
require('../title');
|
|
6
|
-
var _utils = require('../utils');
|
|
7
|
-
var _utils2 = require('./utils');
|
|
8
|
-
const templateHTML = '<style>:host{display:contents;--sinch-comp-dialog-max-width:512px;--sinch-comp-dialog-max-height:90vh;--sinch-comp-dialog-width:fit-content;--sinch-dialog-close-button-display:unset}#dialog{position:fixed;left:0;right:0;margin:auto;display:flex;flex-direction:column;padding:24px 0;width:var(--sinch-comp-dialog-width);max-width:var(--sinch-comp-dialog-max-width);max-height:var(--sinch-comp-dialog-max-height);border-radius:var(--sinch-comp-dialog-shape-radius);box-sizing:border-box;contain:content;background-color:var(--sinch-comp-dialog-color-default-background-initial);border:none;box-shadow:var(--sinch-comp-dialog-shadow);outline:0}#dialog:not([open]){display:none}dialog::backdrop{background-color:#000;opacity:.55}#header{display:flex;flex-direction:row;align-items:flex-start;margin-bottom:12px;padding:0 24px;gap:8px;--sinch-global-size-icon:24px;--sinch-global-color-icon:var(--sinch-comp-dialog-color-default-icon-initial)}#caption{--sinch-global-color-text:var(--sinch-comp-dialog-color-default-title-initial);--sinch-comp-title-font:var(--sinch-comp-dialog-font-title)}#content{min-height:0;overflow:auto;padding:4px 24px}#action{display:flex;flex-direction:row;justify-content:flex-end;gap:16px;margin-top:20px;padding:0 24px}#action.empty{display:none}#close{display:var(--sinch-dialog-close-button-display,initial);position:relative;left:4px;top:-4px;margin-left:auto}</style><dialog id="dialog"><div id="header"><slot id="icon" name="icon"></slot><sinch-title id="caption" type="m" level="3"></sinch-title><sinch-button id="close" size="s"><sinch-icon id="icon-close" slot="icon" name="close"></sinch-icon></sinch-button></div><div id="content"><sinch-stop-events events="close"><slot name="content"></slot></sinch-stop-events></div><div id="action"><sinch-stop-events events="close"><slot name="buttons"></slot></sinch-stop-events></div></dialog>';
|
|
9
|
-
const template = document.createElement('template');
|
|
10
|
-
template.innerHTML = templateHTML;
|
|
11
|
-
(0, _utils.defineCustomElement)('sinch-dialog', class extends _utils.NectaryElement {
|
|
12
|
-
#$dialog;
|
|
13
|
-
#$dialogContent;
|
|
14
|
-
#$closeButton;
|
|
15
|
-
#$caption;
|
|
16
|
-
#$actionWrapper;
|
|
17
|
-
#$actionSlot;
|
|
18
|
-
#controller = null;
|
|
19
|
-
constructor() {
|
|
20
|
-
super();
|
|
21
|
-
const shadowRoot = this.attachShadow();
|
|
22
|
-
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
23
|
-
this.#$dialog = shadowRoot.querySelector('#dialog');
|
|
24
|
-
this.#$dialogContent = shadowRoot.querySelector('#content');
|
|
25
|
-
this.#$closeButton = shadowRoot.querySelector('#close');
|
|
26
|
-
this.#$caption = shadowRoot.querySelector('#caption');
|
|
27
|
-
this.#$actionWrapper = shadowRoot.querySelector('#action');
|
|
28
|
-
this.#$actionSlot = shadowRoot.querySelector('slot[name="buttons"]');
|
|
29
|
-
}
|
|
30
|
-
connectedCallback() {
|
|
31
|
-
super.connectedCallback();
|
|
32
|
-
this.#controller = new AbortController();
|
|
33
|
-
const options = {
|
|
34
|
-
signal: this.#controller.signal
|
|
35
|
-
};
|
|
36
|
-
this.role = 'dialog';
|
|
37
|
-
this.#$closeButton.addEventListener('click', this.#onCloseClick, options);
|
|
38
|
-
this.#$dialog.addEventListener('mousedown', this.#onBackdropMouseDown, options);
|
|
39
|
-
this.#$dialog.addEventListener('cancel', this.#onCancel, options);
|
|
40
|
-
this.#$actionSlot.addEventListener('slotchange', this.#onActionSlotChange, options);
|
|
41
|
-
this.addEventListener('-close', this.#onCloseReactHandler, options);
|
|
42
|
-
this.#onActionSlotChange();
|
|
43
|
-
if (this.open) {
|
|
44
|
-
this.#onExpand();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
disconnectedCallback() {
|
|
48
|
-
super.disconnectedCallback();
|
|
49
|
-
this.#onCollapse();
|
|
50
|
-
this.#controller.abort();
|
|
51
|
-
this.#controller = null;
|
|
52
|
-
}
|
|
53
|
-
static get observedAttributes() {
|
|
54
|
-
return ['caption', 'open', 'close-aria-label'];
|
|
55
|
-
}
|
|
56
|
-
attributeChangedCallback(name, oldVal, newVal) {
|
|
57
|
-
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
switch (name) {
|
|
61
|
-
case 'caption':
|
|
62
|
-
{
|
|
63
|
-
(0, _utils.updateAttribute)(this.#$caption, 'text', newVal);
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
case 'open':
|
|
67
|
-
{
|
|
68
|
-
const shouldOpen = (0, _utils.isAttrTrue)(newVal);
|
|
69
|
-
if (shouldOpen) {
|
|
70
|
-
requestAnimationFrame(() => {
|
|
71
|
-
this.#onExpand();
|
|
72
|
-
});
|
|
73
|
-
} else {
|
|
74
|
-
this.#onCollapse();
|
|
75
|
-
}
|
|
76
|
-
(0, _utils.updateBooleanAttribute)(this, 'open', shouldOpen);
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
case 'close-aria-label':
|
|
80
|
-
{
|
|
81
|
-
(0, _utils.updateAttribute)(this.#$closeButton, 'aria-label', newVal);
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
set caption(caption) {
|
|
87
|
-
(0, _utils.updateAttribute)(this, 'caption', caption);
|
|
88
|
-
}
|
|
89
|
-
get caption() {
|
|
90
|
-
return (0, _utils.getAttribute)(this, 'caption', '');
|
|
91
|
-
}
|
|
92
|
-
set open(isOpen) {
|
|
93
|
-
(0, _utils.updateBooleanAttribute)(this, 'open', isOpen);
|
|
94
|
-
}
|
|
95
|
-
get open() {
|
|
96
|
-
return (0, _utils.getBooleanAttribute)(this, 'open');
|
|
97
|
-
}
|
|
98
|
-
get dialogRect() {
|
|
99
|
-
return (0, _utils.getRect)(this.#$dialog);
|
|
100
|
-
}
|
|
101
|
-
get closeButtonRect() {
|
|
102
|
-
return (0, _utils.getRect)(this.#$closeButton);
|
|
103
|
-
}
|
|
104
|
-
#onCancel = e => {
|
|
105
|
-
if (e.cancelable) {
|
|
106
|
-
e.preventDefault();
|
|
107
|
-
} else {
|
|
108
|
-
this.#onCollapse();
|
|
109
|
-
}
|
|
110
|
-
e.stopPropagation();
|
|
111
|
-
this.#dispatchCloseEvent('escape', e.cancelable);
|
|
112
|
-
};
|
|
113
|
-
#onCloseClick = () => {
|
|
114
|
-
this.#dispatchCloseEvent('close', true);
|
|
115
|
-
};
|
|
116
|
-
#onBackdropMouseDown = e => {
|
|
117
|
-
if ((0, _utils.isTargetEqual)(e, this.#$dialog)) {
|
|
118
|
-
const rect = this.dialogRect;
|
|
119
|
-
const isInside = e.x >= rect.x && e.x < rect.x + rect.width && e.y >= rect.y && e.y < rect.y + rect.height;
|
|
120
|
-
if (!isInside) {
|
|
121
|
-
e.stopPropagation();
|
|
122
|
-
this.#dispatchCloseEvent('backdrop', e.cancelable);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
#onCloseReactHandler = e => {
|
|
127
|
-
(0, _utils.getReactEventHandler)(this, 'on-close')?.(e);
|
|
128
|
-
};
|
|
129
|
-
#dispatchCloseEvent(detail, cancelable) {
|
|
130
|
-
this.dispatchEvent(new CustomEvent('-close', {
|
|
131
|
-
detail,
|
|
132
|
-
cancelable
|
|
133
|
-
}));
|
|
134
|
-
}
|
|
135
|
-
#onExpand() {
|
|
136
|
-
if (!this.isDomConnected || this.#$dialog.open || !this.open) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
this.#$dialog.showModal();
|
|
140
|
-
(0, _utils2.disableScroll)();
|
|
141
|
-
}
|
|
142
|
-
#onCollapse() {
|
|
143
|
-
if (!this.#$dialog.open) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
this.#$dialog.close?.();
|
|
147
|
-
(0, _utils2.enableScroll)();
|
|
148
|
-
}
|
|
149
|
-
#onActionSlotChange = () => {
|
|
150
|
-
(0, _utils.setClass)(this.#$actionWrapper, 'empty', this.#$actionSlot.assignedElements().length === 0);
|
|
151
|
-
};
|
|
152
|
-
});
|
package/lib/cjs/dialog/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/lib/cjs/dialog/utils.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.enableScroll = exports.disableScroll = void 0;
|
|
7
|
-
const bodyEl = document.body;
|
|
8
|
-
const disableScroll = () => {
|
|
9
|
-
bodyEl.__dialog_counter__ = (bodyEl.__dialog_counter__ ?? 0) + 1;
|
|
10
|
-
if (bodyEl.__dialog_counter__ === 1) {
|
|
11
|
-
const scrollWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
12
|
-
bodyEl.style.overflow = 'hidden';
|
|
13
|
-
if (scrollWidth > 0) {
|
|
14
|
-
bodyEl.style.setProperty('padding-right', `${scrollWidth}px`);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
exports.disableScroll = disableScroll;
|
|
19
|
-
const enableScroll = () => {
|
|
20
|
-
bodyEl.__dialog_counter__ = Math.max(0, (bodyEl.__dialog_counter__ ?? 0) - 1);
|
|
21
|
-
if (bodyEl.__dialog_counter__ === 0) {
|
|
22
|
-
bodyEl.style.overflow = '';
|
|
23
|
-
bodyEl.style.removeProperty('padding-right');
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.enableScroll = enableScroll;
|
package/lib/cjs/emoji/index.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _utils = require('../utils');
|
|
4
|
-
var _utils2 = require('./utils');
|
|
5
|
-
const templateHTML = '<style>:host{display:contents;--sinch-comp-emoji-vertical-align:initial}#image{vertical-align:var(--sinch-comp-emoji-vertical-align);pointer-events:none;width:var(--sinch-global-size-icon,48px);height:var(--sinch-global-size-icon,48px)}</style><img id="image" src="" alt="" loading="lazy"/>';
|
|
6
|
-
const template = document.createElement('template');
|
|
7
|
-
template.innerHTML = templateHTML;
|
|
8
|
-
(0, _utils.defineCustomElement)('sinch-emoji', class extends _utils.NectaryElement {
|
|
9
|
-
#$img;
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
const shadowRoot = this.attachShadow();
|
|
13
|
-
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
14
|
-
this.#$img = shadowRoot.querySelector('#image');
|
|
15
|
-
}
|
|
16
|
-
connectedCallback() {
|
|
17
|
-
super.connectedCallback();
|
|
18
|
-
this.#updateChar();
|
|
19
|
-
}
|
|
20
|
-
disconnectedCallback() {
|
|
21
|
-
super.disconnectedCallback();
|
|
22
|
-
}
|
|
23
|
-
static get observedAttributes() {
|
|
24
|
-
return ['char'];
|
|
25
|
-
}
|
|
26
|
-
attributeChangedCallback(name, _, newVal) {
|
|
27
|
-
switch (name) {
|
|
28
|
-
case 'char':
|
|
29
|
-
{
|
|
30
|
-
this.#$img.alt = newVal ?? '';
|
|
31
|
-
this.#updateChar();
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
set char(value) {
|
|
37
|
-
(0, _utils.updateAttribute)(this, 'char', value);
|
|
38
|
-
}
|
|
39
|
-
get char() {
|
|
40
|
-
return (0, _utils.getAttribute)(this, 'char', '');
|
|
41
|
-
}
|
|
42
|
-
#updateChar() {
|
|
43
|
-
if (!this.isDomConnected) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
this.#$img.src = (0, _utils2.getEmojiUrl)((0, _utils2.getEmojiBaseUrl)(this), this.char);
|
|
47
|
-
}
|
|
48
|
-
});
|
package/lib/cjs/emoji/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/lib/cjs/emoji/utils.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.setEmojiBaseUrl = exports.getEmojiUrl = exports.getEmojiBaseUrl = void 0;
|
|
7
|
-
var _dom = require('../utils/dom');
|
|
8
|
-
const vs16RegExp = /\uFE0F/g;
|
|
9
|
-
const zeroWidthJoiner = String.fromCharCode(0x200d);
|
|
10
|
-
const removeVS16s = rawEmoji => rawEmoji.indexOf(zeroWidthJoiner) < 0 ? rawEmoji.replace(vs16RegExp, '') : rawEmoji;
|
|
11
|
-
function toCodePoints(unicodeSurrogates) {
|
|
12
|
-
const points = [];
|
|
13
|
-
let char = 0;
|
|
14
|
-
let previous = 0;
|
|
15
|
-
let i = 0;
|
|
16
|
-
while (i < unicodeSurrogates.length) {
|
|
17
|
-
char = unicodeSurrogates.charCodeAt(i++);
|
|
18
|
-
if (previous !== 0) {
|
|
19
|
-
points.push((0x10000 + (previous - 0xd800 << 10) + (char - 0xdc00)).toString(16));
|
|
20
|
-
previous = 0;
|
|
21
|
-
} else if (char > 0xd800 && char <= 0xdbff) {
|
|
22
|
-
previous = char;
|
|
23
|
-
} else {
|
|
24
|
-
points.push(char.toString(16));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return points;
|
|
28
|
-
}
|
|
29
|
-
const BASE_URL_ATTR = 'data-emoji-base-url';
|
|
30
|
-
const setEmojiBaseUrl = (emojiEl, baseUrl) => {
|
|
31
|
-
(0, _dom.updateAttribute)(emojiEl, BASE_URL_ATTR, baseUrl);
|
|
32
|
-
};
|
|
33
|
-
exports.setEmojiBaseUrl = setEmojiBaseUrl;
|
|
34
|
-
const getEmojiBaseUrl = root => {
|
|
35
|
-
let baseUrl = (0, _dom.getAttribute)(root, BASE_URL_ATTR);
|
|
36
|
-
if (baseUrl !== null) {
|
|
37
|
-
return baseUrl;
|
|
38
|
-
}
|
|
39
|
-
baseUrl = (0, _dom.getCssVar)(root, '--sinch-emoji-src-url');
|
|
40
|
-
if (baseUrl !== null) {
|
|
41
|
-
return baseUrl.replaceAll('"', '').trim();
|
|
42
|
-
}
|
|
43
|
-
return null;
|
|
44
|
-
};
|
|
45
|
-
exports.getEmojiBaseUrl = getEmojiBaseUrl;
|
|
46
|
-
const getEmojiUrl = (baseUrl, char) => {
|
|
47
|
-
if (char === null || char.length === 0 || baseUrl === null) {
|
|
48
|
-
return '';
|
|
49
|
-
}
|
|
50
|
-
let codepoints = toCodePoints(removeVS16s(char)).join('-');
|
|
51
|
-
if (codepoints === '1f441-fe0f-200d-1f5e8-fe0f') {
|
|
52
|
-
codepoints = '1f441-200d-1f5e8';
|
|
53
|
-
}
|
|
54
|
-
return baseUrl.replace('%s', codepoints);
|
|
55
|
-
};
|
|
56
|
-
exports.getEmojiUrl = getEmojiUrl;
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault');
|
|
4
|
-
require('../input');
|
|
5
|
-
require('../color-swatch');
|
|
6
|
-
require('../color-menu');
|
|
7
|
-
require('../color-menu-option');
|
|
8
|
-
require('../popover');
|
|
9
|
-
require('../tabs');
|
|
10
|
-
require('../tabs-icon-option');
|
|
11
|
-
require('../emoji');
|
|
12
|
-
require('../text');
|
|
13
|
-
require('../icon');
|
|
14
|
-
var _utils = require('../emoji/utils');
|
|
15
|
-
var _utils2 = require('../utils');
|
|
16
|
-
var _data = _interopRequireDefault(require('./data.json'));
|
|
17
|
-
const templateHTML = '<style>:host{display:block}#wrapper{width:384px;max-height:504px;display:flex;flex-direction:column;gap:8px;padding:12px 0}#toolbar{display:flex;gap:8px;padding:0 12px}#search{flex:1;min-width:0}#search-clear:not(.active){display:none}#list-wrapper{overflow-y:auto;overflow-x:hidden;width:384px;box-sizing:border-box;scrollbar-gutter:stable}#list{display:flex;flex-wrap:wrap;gap:8px;padding:4px 12px 0;width:384px;box-sizing:border-box}#not-found{display:none;width:100%;height:48px;align-items:center;justify-content:center;pointer-events:none;user-select:none;--sinch-global-color-text:var(--sinch-comp-emoji-picker-color-default-text-not-found);--sinch-comp-text-font:var(--sinch-comp-emoji-picker-font-not-found)}#not-found.active{display:flex}sinch-tabs-icon-option>svg{pointer-events:none;height:var(--sinch-global-size-icon);fill:var(--sinch-global-color-icon)}</style><div id="wrapper"><div id="toolbar"><sinch-input id="search" size="l" aria-label="Search emojis"><sinch-icon id="icon-search" slot="icon" name="search"></sinch-icon><sinch-button id="search-clear" slot="right" aria-label="Clear"><sinch-icon slot="icon" name="close"></sinch-icon></sinch-button></sinch-input><sinch-popover id="skin-popover" orientation="bottom-left" aria-label="Emoji skin tone select"><sinch-button id="skin-button" slot="target" size="l" aria-label="Select emoji skin tones"><sinch-color-swatch id="skin-swatch" slot="icon" name="skintone-default"></sinch-color-swatch></sinch-button><sinch-color-menu id="skin-menu" slot="content" cols="1" value="skintone-default" aria-label="Emoji skin tone menu"><sinch-color-menu-option value="skintone-default"></sinch-color-menu-option><sinch-color-menu-option value="skintone-light"></sinch-color-menu-option><sinch-color-menu-option value="skintone-light-medium"></sinch-color-menu-option><sinch-color-menu-option value="skintone-medium"></sinch-color-menu-option><sinch-color-menu-option value="skintone-medium-dark"></sinch-color-menu-option><sinch-color-menu-option value="skintone-dark"></sinch-color-menu-option></sinch-color-menu></sinch-popover></div><sinch-tabs id="tabs" aria-label="Emoji groups"><sinch-tabs-icon-option id="tab-emotions"><svg slot="icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M15.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm-7 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2ZM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8Zm4.41-6.11a.745.745 0 0 0-1.03.24A3.98 3.98 0 0 1 12 16c-1.38 0-2.64-.7-3.38-1.88a.747.747 0 1 0-1.27.79A5.446 5.446 0 0 0 12 17.5c1.9 0 3.63-.97 4.65-2.58.22-.35.11-.81-.24-1.03Z"/></svg></sinch-tabs-icon-option><sinch-tabs-icon-option id="tab-people"><svg slot="icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M12 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/><path d="M15.89 8.11C15.5 7.72 14.83 7 13.53 7h-2.54a5.023 5.023 0 0 1-4.92-4.15.998.998 0 0 0-.98-.85c-.61 0-1.09.54-1 1.14A7.037 7.037 0 0 0 9 8.71V21c0 .55.45 1 1 1s1-.45 1-1v-5h2v5c0 .55.45 1 1 1s1-.45 1-1V10.05l3.24 3.24a.996.996 0 1 0 1.41-1.41l-3.76-3.77Z"/></svg></sinch-tabs-icon-option><sinch-tabs-icon-option id="tab-animals"><svg slot="icon" viewBox="0 0 24 24"><path d="M17 14c-.24-.24-.44-.49-.65-.75C17.51 11.5 19 8.56 19 5c0-1.95-.74-3-2-3-1.54 0-3.96 2.06-5 5.97C10.96 4.06 8.54 2 7 2 5.74 2 5 3.05 5 5c0 3.56 1.49 6.5 2.65 8.25-.21.26-.41.51-.65.75-.25.25-2 1.39-2 3.5C5 19.98 7.02 22 9.5 22c1.5 0 2.5-.5 2.5-.5s1 .5 2.5.5c2.48 0 4.5-2.02 4.5-4.5 0-2.11-1.75-3.25-2-3.5Zm-.12-9.97c.06.17.12.48.12.97 0 2.84-1.11 5.24-2.07 6.78-.38-.26-.83-.48-1.4-.62.24-4.52 2.44-6.83 3.35-7.13ZM7 5c0-.49.06-.8.12-.97.91.3 3.11 2.61 3.36 7.13-.58.14-1.03.35-1.4.62C8.11 10.24 7 7.84 7 5Zm7.5 15c-1 0-1.8-.33-2.22-.56.42-.18.72-.71.72-.94 0-.28-.45-.5-1-.5s-1 .22-1 .5c0 .23.3.76.72.94-.42.23-1.22.56-2.22.56A2.5 2.5 0 0 1 7 17.5c0-.7.43-1.24 1-1.73.44-.36.61-.52 1.3-1.37.76-.95 1.09-1.4 2.7-1.4s1.94.45 2.7 1.4c.69.85.86 1.01 1.3 1.37.57.49 1 1.03 1 1.73a2.5 2.5 0 0 1-2.5 2.5Zm-.5-4c0 .41-.22.75-.5.75s-.5-.34-.5-.75.22-.75.5-.75.5.34.5.75Zm-3 0c0 .41-.22.75-.5.75s-.5-.34-.5-.75.22-.75.5-.75.5.34.5.75Z"/></svg></sinch-tabs-icon-option><sinch-tabs-icon-option id="tab-food"><svg slot="icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M19 19H3c-.55 0-1 .45-1 1s.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1Zm1-16H9v2.4l1.81 1.45c.12.09.19.24.19.39v4.26c0 .28-.22.5-.5.5h-4c-.28 0-.5-.22-.5-.5V7.24c0-.15.07-.3.19-.39L8 5.4V3H6c-1.1 0-2 .9-2 2v8c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm0 5h-2V5h2v3Z"/></svg></sinch-tabs-icon-option><sinch-tabs-icon-option id="tab-travel"><svg slot="icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m21.99 14.77-1.43-4.11c-.14-.4-.52-.66-.97-.66H12.4c-.46 0-.83.26-.98.66L10 14.77v5.24c0 .55.45.99 1 .99s1-.45 1-1v-1h8v1a1 1 0 0 0 2 .01l-.01-5.24Zm-10.38-1.43.69-2c.05-.2.24-.34.46-.34h6.48c.21 0 .4.14.47.34l.69 2a.5.5 0 0 1-.47.66h-7.85a.5.5 0 0 1-.47-.66Zm.38 3.66c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm8 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Z"/><path d="M14 4.5V9h1V4c0-.55-.45-1-1-1H8c-.55 0-1 .45-1 1v4H3c-.55 0-1 .45-1 1v12h1V9.5c0-.28.22-.5.5-.5h4c.28 0 .5-.22.5-.5v-4c0-.28.22-.5.5-.5h5c.28 0 .5.22.5.5Z"/><path d="M7 11H5v2h2v-2Zm5-6h-2v2h2V5ZM7 15H5v2h2v-2Zm0 4H5v2h2v-2Z"/></svg></sinch-tabs-icon-option><sinch-tabs-icon-option id="tab-sports"><svg slot="icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M19.52 2.49C17.18.15 12.9.62 9.97 3.55c-1.6 1.6-2.52 3.87-2.54 5.46-.02 1.58.26 3.89-1.35 5.5l-3.54 3.53c-.39.39-.39 1.02 0 1.42.39.39 1.02.39 1.42 0l3.53-3.54c1.61-1.61 3.92-1.33 5.5-1.35 1.58-.02 3.86-.94 5.46-2.54 2.93-2.92 3.41-7.2 1.07-9.54Zm-9.2 9.19c-1.53-1.53-1.05-4.61 1.06-6.72 2.11-2.11 5.18-2.59 6.72-1.06 1.53 1.53 1.05 4.61-1.06 6.72-2.11 2.11-5.18 2.59-6.72 1.06ZM18 17c.53 0 1.04.21 1.41.59.78.78.78 2.05 0 2.83-.37.37-.88.58-1.41.58-.53 0-1.04-.21-1.41-.59-.78-.78-.78-2.05 0-2.83.37-.37.88-.58 1.41-.58Zm0-2a3.998 3.998 0 0 0-2.83 6.83c.78.78 1.81 1.17 2.83 1.17a3.998 3.998 0 0 0 2.83-6.83A3.998 3.998 0 0 0 18 15Z"/></svg></sinch-tabs-icon-option><sinch-tabs-icon-option id="tab-objects"><svg slot="icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M12 3c-.46 0-.93.04-1.4.14-2.76.53-4.96 2.76-5.48 5.52-.48 2.61.48 5.01 2.22 6.56.43.38.66.91.66 1.47V19c0 1.1.9 2 2 2h.28a1.98 1.98 0 0 0 3.44 0H14c1.1 0 2-.9 2-2v-2.31c0-.55.22-1.09.64-1.46A6.956 6.956 0 0 0 19 10c0-3.87-3.13-7-7-7Zm.5 11h-1v-2.59L9.67 9.59l.71-.71L12 10.5l1.62-1.62.71.71-1.83 1.83V14Zm1 5c-.01 0-.02-.01-.03-.01V19h-2.94v-.01c-.01 0-.02.01-.03.01-.28 0-.5-.22-.5-.5s.22-.5.5-.5c.01 0 .02.01.03.01V18h2.94v.01c.01 0 .02-.01.03-.01.28 0 .5.22.5.5s-.22.5-.5.5Zm0-2h-3c-.28 0-.5-.22-.5-.5s.22-.5.5-.5h3c.28 0 .5.22.5.5s-.22.5-.5.5Z"/></svg></sinch-tabs-icon-option><sinch-tabs-icon-option id="tab-symbols"><svg slot="icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M10 5H4c-.55 0-1 .45-1 1s.45 1 1 1h2v3c0 .55.45 1 1 1s1-.45 1-1V7h2c.55 0 1-.45 1-1s-.45-1-1-1Zm0-3H4c-.55 0-1 .45-1 1s.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1Zm10.89 11.11a.996.996 0 0 0-1.41 0l-6.36 6.36a.996.996 0 1 0 1.41 1.41l6.36-6.36a.996.996 0 0 0 0-1.41ZM14.5 16a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm5 5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm-4-10A2.5 2.5 0 0 0 18 8.5V4h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1v3.51c-.42-.32-.93-.51-1.5-.51a2.5 2.5 0 0 0 0 5Zm-5.05 7.09a.996.996 0 1 0-1.41-1.41l-.71.71-.71-.71.35-.35a2.499 2.499 0 0 0-1.77-4.27 2.499 2.499 0 0 0-1.77 4.27l.35.35-1.06 1.06c-.98.98-.98 2.56 0 3.54.5.48 1.14.72 1.78.72.64 0 1.28-.24 1.77-.73l1.06-1.06.71.71a.996.996 0 1 0 1.41-1.41l-.71-.71.71-.71Zm-4.6-3.89a.5.5 0 0 1 .35-.15.5.5 0 0 1 .35.15c.19.2.19.51 0 .71l-.35.35-.35-.36a.5.5 0 0 1-.15-.35.5.5 0 0 1 .15-.35Zm0 5.65a.5.5 0 0 1-.35.15.5.5 0 0 1-.35-.15.5.5 0 0 1-.15-.35.5.5 0 0 1 .15-.35l1.06-1.06.71.71-1.07 1.05Z"/></svg></sinch-tabs-icon-option></sinch-tabs><div id="list-wrapper"><div id="list"></div><div id="not-found"><sinch-text type="m">No results</sinch-text></div></div></div>';
|
|
18
|
-
const groupLabels = ['Emotions', 'People', 'Animals and nature', 'Food and drinks', 'Travel and places', 'Sports and activities', 'Objects', 'Symbols and flags'];
|
|
19
|
-
const data = _data.default;
|
|
20
|
-
const template = document.createElement('template');
|
|
21
|
-
const MIN_SEARCH_LENGTH = 2;
|
|
22
|
-
const SEARCH_DEBOUNCE_TIMEOUT = 300;
|
|
23
|
-
template.innerHTML = templateHTML;
|
|
24
|
-
(0, _utils2.defineCustomElement)('sinch-emoji-picker', class extends _utils2.NectaryElement {
|
|
25
|
-
#$tabs;
|
|
26
|
-
#$searchInput;
|
|
27
|
-
#$searchClearButton;
|
|
28
|
-
#$skinPopover;
|
|
29
|
-
#$skinMenu;
|
|
30
|
-
#$skinSwatch;
|
|
31
|
-
#$skinButton;
|
|
32
|
-
#$list;
|
|
33
|
-
#$notFound;
|
|
34
|
-
#controller = null;
|
|
35
|
-
#$sh;
|
|
36
|
-
#searchDebounce;
|
|
37
|
-
#currentSkinTone = 0;
|
|
38
|
-
#prevTabsValue = null;
|
|
39
|
-
constructor() {
|
|
40
|
-
super();
|
|
41
|
-
const shadowRoot = this.attachShadow();
|
|
42
|
-
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
43
|
-
this.#$sh = shadowRoot;
|
|
44
|
-
this.#$tabs = shadowRoot.querySelector('#tabs');
|
|
45
|
-
this.#$searchInput = shadowRoot.querySelector('#search');
|
|
46
|
-
this.#$searchClearButton = shadowRoot.querySelector('#search-clear');
|
|
47
|
-
this.#$skinPopover = shadowRoot.querySelector('#skin-popover');
|
|
48
|
-
this.#$skinMenu = shadowRoot.querySelector('#skin-menu');
|
|
49
|
-
this.#$skinSwatch = shadowRoot.querySelector('#skin-swatch');
|
|
50
|
-
this.#$skinButton = shadowRoot.querySelector('#skin-button');
|
|
51
|
-
this.#$list = shadowRoot.querySelector('#list');
|
|
52
|
-
this.#$notFound = shadowRoot.querySelector('#not-found');
|
|
53
|
-
this.#searchDebounce = (0, _utils2.debounceTimeout)(SEARCH_DEBOUNCE_TIMEOUT)(this.#updateSearch);
|
|
54
|
-
}
|
|
55
|
-
connectedCallback() {
|
|
56
|
-
this.#controller = new AbortController();
|
|
57
|
-
const {
|
|
58
|
-
signal
|
|
59
|
-
} = this.#controller;
|
|
60
|
-
this.#$tabs.addEventListener('-change', this.#onTabsChange, {
|
|
61
|
-
signal
|
|
62
|
-
});
|
|
63
|
-
this.#$searchInput.addEventListener('-change', this.#onSearchChange, {
|
|
64
|
-
signal
|
|
65
|
-
});
|
|
66
|
-
this.#$searchClearButton.addEventListener('-click', this.#onSearchClearClick, {
|
|
67
|
-
signal
|
|
68
|
-
});
|
|
69
|
-
this.#$skinButton.addEventListener('-click', this.#onSkinButtonClick, {
|
|
70
|
-
signal
|
|
71
|
-
});
|
|
72
|
-
this.#$skinPopover.addEventListener('-close', this.#onSkinPopoverClose, {
|
|
73
|
-
signal
|
|
74
|
-
});
|
|
75
|
-
this.#$skinMenu.addEventListener('-change', this.#onSkinMenuChange, {
|
|
76
|
-
signal
|
|
77
|
-
});
|
|
78
|
-
this.#$list.addEventListener('click', this.#onListClick, {
|
|
79
|
-
signal
|
|
80
|
-
});
|
|
81
|
-
this.addEventListener('-change', this.#onChangeReactHandler, {
|
|
82
|
-
signal
|
|
83
|
-
});
|
|
84
|
-
this.#updateTabs();
|
|
85
|
-
this.#updateEmojis();
|
|
86
|
-
}
|
|
87
|
-
disconnectedCallback() {
|
|
88
|
-
this.#searchDebounce.cancel();
|
|
89
|
-
this.#controller.abort();
|
|
90
|
-
this.#controller = null;
|
|
91
|
-
}
|
|
92
|
-
get skinToneButtonRect() {
|
|
93
|
-
return (0, _utils2.getRect)(this.#$skinButton);
|
|
94
|
-
}
|
|
95
|
-
get searchInputRect() {
|
|
96
|
-
return (0, _utils2.getRect)(this.#$searchInput);
|
|
97
|
-
}
|
|
98
|
-
get searchClearButtonRect() {
|
|
99
|
-
return (0, _utils2.getRect)(this.#$searchClearButton);
|
|
100
|
-
}
|
|
101
|
-
nthSkinToneRect(index) {
|
|
102
|
-
return this.#$skinMenu.nthItemRect(index);
|
|
103
|
-
}
|
|
104
|
-
nthTabRect(index) {
|
|
105
|
-
return this.#$tabs.nthOptionRect(index);
|
|
106
|
-
}
|
|
107
|
-
nthEmojiRect(index) {
|
|
108
|
-
const $el = this.#$list.children[index];
|
|
109
|
-
return $el != null ? (0, _utils2.getRect)($el) : null;
|
|
110
|
-
}
|
|
111
|
-
#onListClick = e => {
|
|
112
|
-
const value = e.target.getAttribute('data-value');
|
|
113
|
-
if (value === null) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
this.dispatchEvent(new CustomEvent('-change', {
|
|
117
|
-
detail: value
|
|
118
|
-
}));
|
|
119
|
-
};
|
|
120
|
-
#onTabsChange = e => {
|
|
121
|
-
const value = e.detail;
|
|
122
|
-
(0, _utils2.updateAttribute)(this.#$tabs, 'value', value);
|
|
123
|
-
(0, _utils2.updateAttribute)(this.#$searchInput, 'value', '');
|
|
124
|
-
this.#updateEmojis();
|
|
125
|
-
};
|
|
126
|
-
#onSearchChange = e => {
|
|
127
|
-
this.#$searchInput.value = e.detail;
|
|
128
|
-
this.#searchDebounce.fn();
|
|
129
|
-
(0, _utils2.setClass)(this.#$searchClearButton, 'active', e.detail.length > 0);
|
|
130
|
-
};
|
|
131
|
-
#onSearchClearClick = () => {
|
|
132
|
-
this.#$searchInput.value = '';
|
|
133
|
-
this.#$searchInput.focus();
|
|
134
|
-
this.#searchDebounce.fn();
|
|
135
|
-
(0, _utils2.setClass)(this.#$searchClearButton, 'active', false);
|
|
136
|
-
};
|
|
137
|
-
#onChangeReactHandler = e => {
|
|
138
|
-
(0, _utils2.getReactEventHandler)(this, 'on-change')?.(e);
|
|
139
|
-
};
|
|
140
|
-
get focusable() {
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
#getDocumentRoot() {
|
|
144
|
-
return Reflect.has(this.#$sh, 'createElement') ? this.#$sh : document;
|
|
145
|
-
}
|
|
146
|
-
#updateSearch = () => {
|
|
147
|
-
const value = this.#$searchInput.value;
|
|
148
|
-
if (value.length < MIN_SEARCH_LENGTH) {
|
|
149
|
-
if (this.#isSearchMode()) {
|
|
150
|
-
if (this.#prevTabsValue !== null) {
|
|
151
|
-
this.#$tabs.setAttribute('value', this.#prevTabsValue);
|
|
152
|
-
}
|
|
153
|
-
this.#updateEmojis();
|
|
154
|
-
}
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
const currentActiveTab = this.#$tabs.getAttribute('value');
|
|
158
|
-
if (currentActiveTab !== null) {
|
|
159
|
-
this.#prevTabsValue = currentActiveTab;
|
|
160
|
-
}
|
|
161
|
-
this.#$tabs.removeAttribute('value');
|
|
162
|
-
this.#updateSearchEmojis();
|
|
163
|
-
};
|
|
164
|
-
#updateTabs() {
|
|
165
|
-
const tabOptions = this.#$tabs.querySelectorAll('sinch-tabs-icon-option');
|
|
166
|
-
const activeTabName = data[0].name;
|
|
167
|
-
const numTabs = Math.min(data.length, tabOptions.length);
|
|
168
|
-
for (let i = 0; i < numTabs; i++) {
|
|
169
|
-
const group = data[i];
|
|
170
|
-
const tabOption = tabOptions[i];
|
|
171
|
-
tabOption.setAttribute('value', group.name);
|
|
172
|
-
tabOption.setAttribute('aria-label', groupLabels[i]);
|
|
173
|
-
}
|
|
174
|
-
(0, _utils2.updateAttribute)(this.#$tabs, 'value', activeTabName);
|
|
175
|
-
}
|
|
176
|
-
*#iterateSearchEmojis(searchValue, skinTone) {
|
|
177
|
-
for (const group of data) {
|
|
178
|
-
for (const entry of group.emojis) {
|
|
179
|
-
if (entry.label.toLowerCase().includes(searchValue)) {
|
|
180
|
-
const hasSkins = entry.skins != null;
|
|
181
|
-
if (skinTone === 0 || !hasSkins) {
|
|
182
|
-
yield entry;
|
|
183
|
-
} else if (hasSkins) {
|
|
184
|
-
for (const skin of entry.skins) {
|
|
185
|
-
if (skinTone === skin.tone || Array.isArray(skin.tone) && skin.tone.includes(skinTone)) {
|
|
186
|
-
yield skin;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
*#iterateGroupEmojis(group, skinTone) {
|
|
195
|
-
for (const entry of group.emojis) {
|
|
196
|
-
const hasSkins = entry.skins != null;
|
|
197
|
-
if (skinTone === 0 || !hasSkins) {
|
|
198
|
-
yield entry;
|
|
199
|
-
} else if (hasSkins) {
|
|
200
|
-
for (const skin of entry.skins) {
|
|
201
|
-
if (skinTone === skin.tone || Array.isArray(skin.tone) && skin.tone.includes(skinTone)) {
|
|
202
|
-
yield skin;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
#updateSearchEmojis() {
|
|
209
|
-
const searchValue = this.#$searchInput.value;
|
|
210
|
-
if (searchValue.length < MIN_SEARCH_LENGTH) {
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
const doc = this.#getDocumentRoot();
|
|
214
|
-
const fragment = document.createDocumentFragment();
|
|
215
|
-
const emojiBaseUrl = (0, _utils.getEmojiBaseUrl)(this);
|
|
216
|
-
let someFound = false;
|
|
217
|
-
for (const entry of this.#iterateSearchEmojis(searchValue, this.#currentSkinTone)) {
|
|
218
|
-
const el = this.#createEmojiElement(doc, entry, emojiBaseUrl);
|
|
219
|
-
someFound = true;
|
|
220
|
-
fragment.appendChild(el);
|
|
221
|
-
}
|
|
222
|
-
(0, _utils2.setClass)(this.#$notFound, 'active', !someFound);
|
|
223
|
-
this.#$list.replaceChildren(fragment);
|
|
224
|
-
this.#$list.scrollTo(0, 0);
|
|
225
|
-
}
|
|
226
|
-
#updateEmojis() {
|
|
227
|
-
if (this.#isSearchMode()) {
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
const activeGroup = (0, _utils2.getAttribute)(this.#$tabs, 'value');
|
|
231
|
-
const group = data.find(group => group.name === activeGroup);
|
|
232
|
-
if (group == null) {
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
const doc = this.#getDocumentRoot();
|
|
236
|
-
const fragment = document.createDocumentFragment();
|
|
237
|
-
const emojiBaseUrl = (0, _utils.getEmojiBaseUrl)(this);
|
|
238
|
-
for (const entry of this.#iterateGroupEmojis(group, this.#currentSkinTone)) {
|
|
239
|
-
const el = this.#createEmojiElement(doc, entry, emojiBaseUrl);
|
|
240
|
-
fragment.appendChild(el);
|
|
241
|
-
}
|
|
242
|
-
this.#$list.replaceChildren(fragment);
|
|
243
|
-
this.#$list.scrollTo(0, 0);
|
|
244
|
-
}
|
|
245
|
-
#onSkinButtonClick = () => {
|
|
246
|
-
(0, _utils2.updateBooleanAttribute)(this.#$skinPopover, 'open', !(0, _utils2.getBooleanAttribute)(this.#$skinPopover, 'open'));
|
|
247
|
-
};
|
|
248
|
-
#onSkinPopoverClose = () => {
|
|
249
|
-
(0, _utils2.updateBooleanAttribute)(this.#$skinPopover, 'open', false);
|
|
250
|
-
};
|
|
251
|
-
#onSkinMenuChange = e => {
|
|
252
|
-
this.#$skinSwatch.name = e.detail;
|
|
253
|
-
this.#$skinMenu.value = e.detail;
|
|
254
|
-
switch (e.detail) {
|
|
255
|
-
case 'skintone-default':
|
|
256
|
-
{
|
|
257
|
-
this.#currentSkinTone = 0;
|
|
258
|
-
break;
|
|
259
|
-
}
|
|
260
|
-
case 'skintone-light':
|
|
261
|
-
{
|
|
262
|
-
this.#currentSkinTone = 1;
|
|
263
|
-
break;
|
|
264
|
-
}
|
|
265
|
-
case 'skintone-light-medium':
|
|
266
|
-
{
|
|
267
|
-
this.#currentSkinTone = 2;
|
|
268
|
-
break;
|
|
269
|
-
}
|
|
270
|
-
case 'skintone-medium':
|
|
271
|
-
{
|
|
272
|
-
this.#currentSkinTone = 3;
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
case 'skintone-medium-dark':
|
|
276
|
-
{
|
|
277
|
-
this.#currentSkinTone = 4;
|
|
278
|
-
break;
|
|
279
|
-
}
|
|
280
|
-
case 'skintone-dark':
|
|
281
|
-
{
|
|
282
|
-
this.#currentSkinTone = 5;
|
|
283
|
-
break;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
this.#onSkinPopoverClose();
|
|
287
|
-
if (this.#isSearchMode()) {
|
|
288
|
-
this.#updateSearchEmojis();
|
|
289
|
-
} else {
|
|
290
|
-
this.#updateEmojis();
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
#isSearchMode() {
|
|
294
|
-
const activeTab = (0, _utils2.getAttribute)(this.#$tabs, 'value');
|
|
295
|
-
return activeTab === null || activeTab.length === 0;
|
|
296
|
-
}
|
|
297
|
-
#createEmojiElement(doc, emoji, baseUrl) {
|
|
298
|
-
const btn = doc.createElement('sinch-button');
|
|
299
|
-
const el = doc.createElement('sinch-emoji');
|
|
300
|
-
el.setAttribute('slot', 'icon');
|
|
301
|
-
el.setAttribute('char', emoji.emoji);
|
|
302
|
-
el.setAttribute('label', emoji.label);
|
|
303
|
-
(0, _utils.setEmojiBaseUrl)(el, baseUrl);
|
|
304
|
-
btn.setAttribute('aria-label', emoji.label);
|
|
305
|
-
btn.setAttribute('size', 's');
|
|
306
|
-
btn.setAttribute('data-value', emoji.emoji);
|
|
307
|
-
btn.appendChild(el);
|
|
308
|
-
return btn;
|
|
309
|
-
}
|
|
310
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|