@nectary/components 2.12.1 → 2.12.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/cjs/accordion/index.js +88 -0
- package/lib/cjs/accordion/types.js +1 -0
- package/lib/cjs/accordion-item/index.js +97 -0
- package/lib/cjs/accordion-item/types.js +1 -0
- package/lib/cjs/accordion-item/utils.js +7 -0
- package/lib/cjs/action-menu/index.js +197 -0
- package/lib/cjs/action-menu/types.js +1 -0
- package/lib/cjs/action-menu-option/index.js +84 -0
- package/lib/cjs/action-menu-option/types.js +1 -0
- package/lib/cjs/action-menu-option/utils.js +10 -0
- package/lib/cjs/alert/index.js +50 -0
- package/lib/cjs/alert/types.js +1 -0
- package/lib/cjs/alert/utils.js +7 -0
- package/lib/cjs/avatar/index.js +96 -0
- package/lib/cjs/avatar/types.js +1 -0
- package/lib/cjs/avatar/utils.js +15 -0
- package/lib/cjs/badge/index.js +116 -0
- package/lib/cjs/badge/types.js +1 -0
- package/lib/cjs/badge/utils.js +7 -0
- package/lib/cjs/button/index.js +184 -0
- package/lib/cjs/button/types.js +1 -0
- package/lib/cjs/button/utils.js +7 -0
- package/lib/cjs/card/index.js +135 -0
- package/lib/cjs/card/types.js +1 -0
- package/lib/cjs/card-container/index.js +13 -0
- package/lib/cjs/card-container/types.js +1 -0
- package/lib/cjs/chat/index.js +13 -0
- package/lib/cjs/chat/types.js +1 -0
- package/lib/cjs/chat-block/index.js +88 -0
- package/lib/cjs/chat-block/types.js +1 -0
- package/lib/cjs/chat-bubble/index.js +43 -0
- package/lib/cjs/chat-bubble/types.js +1 -0
- package/lib/cjs/chat-bubble/utils.js +8 -0
- package/lib/cjs/checkbox/index.js +128 -0
- package/lib/cjs/checkbox/types.js +1 -0
- package/lib/cjs/chip/index.js +146 -0
- package/lib/cjs/chip/types.js +1 -0
- package/lib/cjs/chip/utils.js +14 -0
- package/lib/cjs/code-tag/index.js +33 -0
- package/lib/cjs/code-tag/types.js +1 -0
- package/lib/cjs/color-menu/index.js +310 -0
- package/lib/cjs/color-menu/types.js +1 -0
- package/lib/cjs/color-menu/utils.js +18 -0
- package/lib/cjs/color-menu-option/index.js +50 -0
- package/lib/cjs/color-menu-option/types.js +1 -0
- package/lib/cjs/color-menu-option/utils.js +18 -0
- package/lib/cjs/color-swatch/index.js +56 -0
- package/lib/cjs/color-swatch/types.js +1 -0
- package/lib/cjs/color-swatch/utils.js +14 -0
- package/lib/cjs/date-picker/index.js +383 -0
- package/lib/cjs/date-picker/types.js +1 -0
- package/lib/cjs/date-picker/utils.js +171 -0
- package/lib/cjs/dialog/index.js +146 -0
- package/lib/cjs/dialog/types.js +1 -0
- package/lib/cjs/dialog/utils.js +26 -0
- package/lib/cjs/emoji/index.js +48 -0
- package/lib/cjs/emoji/types.js +1 -0
- package/lib/cjs/emoji/utils.js +56 -0
- package/lib/cjs/emoji-picker/index.js +311 -0
- package/lib/cjs/emoji-picker/types.js +1 -0
- package/lib/cjs/field/index.js +122 -0
- package/lib/cjs/field/types.js +1 -0
- package/lib/cjs/file-drop/index.js +207 -0
- package/lib/cjs/file-drop/types.js +1 -0
- package/lib/cjs/file-drop/utils.js +39 -0
- package/lib/cjs/file-picker/index.js +105 -0
- package/lib/cjs/file-picker/types.js +1 -0
- package/lib/cjs/file-picker/utils.js +15 -0
- package/lib/cjs/file-status/index.js +63 -0
- package/lib/cjs/file-status/types.js +1 -0
- package/lib/cjs/file-status/utils.js +7 -0
- package/lib/cjs/flag/index.js +48 -0
- package/lib/cjs/flag/types.js +1 -0
- package/lib/cjs/flag/utils.js +24 -0
- package/lib/cjs/grid/index.js +13 -0
- package/lib/cjs/grid/types.js +1 -0
- package/lib/cjs/grid-item/index.js +37 -0
- package/lib/cjs/grid-item/types.js +1 -0
- package/lib/cjs/help-tooltip/index.js +76 -0
- package/lib/cjs/help-tooltip/types.js +1 -0
- package/lib/cjs/horizontal-stepper/index.js +63 -0
- package/lib/cjs/horizontal-stepper/types.js +1 -0
- package/lib/cjs/horizontal-stepper-item/index.js +63 -0
- package/lib/cjs/horizontal-stepper-item/types.js +1 -0
- package/lib/cjs/horizontal-stepper-item/utils.js +7 -0
- package/lib/cjs/icon/index.js +34 -0
- package/lib/cjs/icon/types.js +1 -0
- package/lib/cjs/icon-button/index.js +177 -0
- package/lib/cjs/icon-button/types.js +1 -0
- package/lib/cjs/icon-button/utils.js +7 -0
- package/lib/cjs/imports.d.js +1 -0
- package/lib/cjs/imports.d.ts +9 -0
- package/lib/cjs/inline-alert/index.js +85 -0
- package/lib/cjs/inline-alert/types.js +1 -0
- package/lib/cjs/inline-alert/utils.js +7 -0
- package/lib/cjs/input/index.js +644 -0
- package/lib/cjs/input/types.js +1 -0
- package/lib/cjs/input/utils.js +317 -0
- package/lib/cjs/link/index.js +152 -0
- package/lib/cjs/link/types.js +1 -0
- package/lib/cjs/list/index.js +16 -0
- package/lib/cjs/list/types.js +1 -0
- package/lib/cjs/list-item/index.js +16 -0
- package/lib/cjs/list-item/types.js +1 -0
- package/lib/cjs/pagination/index.js +149 -0
- package/lib/cjs/pagination/types.js +1 -0
- package/lib/cjs/pop/index.js +427 -0
- package/lib/cjs/pop/types.js +1 -0
- package/lib/cjs/pop/utils.js +24 -0
- package/lib/cjs/popover/index.js +148 -0
- package/lib/cjs/popover/types.js +1 -0
- package/lib/cjs/popover/utils.js +17 -0
- package/lib/cjs/progress/index.js +60 -0
- package/lib/cjs/progress/types.js +1 -0
- package/lib/cjs/progress-stepper/index.js +208 -0
- package/lib/cjs/progress-stepper/types.js +1 -0
- package/lib/cjs/progress-stepper-item/index.js +84 -0
- package/lib/cjs/progress-stepper-item/types.js +1 -0
- package/lib/cjs/progress-stepper-item/utils.js +25 -0
- package/lib/cjs/radio/index.js +156 -0
- package/lib/cjs/radio/types.js +1 -0
- package/lib/cjs/radio-option/index.js +81 -0
- package/lib/cjs/radio-option/types.js +1 -0
- package/lib/cjs/rich-text/index.js +77 -0
- package/lib/cjs/rich-text/types.js +1 -0
- package/lib/cjs/rich-text/utils.js +117 -0
- package/lib/cjs/rich-textarea/index.js +466 -0
- package/lib/cjs/rich-textarea/types.js +1 -0
- package/lib/cjs/rich-textarea/utils.js +1754 -0
- package/lib/cjs/segment/index.js +111 -0
- package/lib/cjs/segment/types.js +1 -0
- package/lib/cjs/segment/utils.js +23 -0
- package/lib/cjs/segment-collapse/index.js +62 -0
- package/lib/cjs/segment-collapse/types.js +1 -0
- package/lib/cjs/segmented-control/index.js +87 -0
- package/lib/cjs/segmented-control/types.js +1 -0
- package/lib/cjs/segmented-control-option/index.js +97 -0
- package/lib/cjs/segmented-control-option/types.js +1 -0
- package/lib/cjs/segmented-icon-control/index.js +103 -0
- package/lib/cjs/segmented-icon-control/types.js +1 -0
- package/lib/cjs/segmented-icon-control-option/index.js +84 -0
- package/lib/cjs/segmented-icon-control-option/types.js +1 -0
- package/lib/cjs/select-button/index.js +204 -0
- package/lib/cjs/select-button/types.js +1 -0
- package/lib/cjs/select-menu/index.js +341 -0
- package/lib/cjs/select-menu/types.js +1 -0
- package/lib/cjs/select-menu-option/index.js +72 -0
- package/lib/cjs/select-menu-option/types.js +1 -0
- package/lib/cjs/skeleton/index.js +110 -0
- package/lib/cjs/skeleton/types.js +1 -0
- package/lib/cjs/skeleton-item/index.js +13 -0
- package/lib/cjs/skeleton-item/types.js +1 -0
- package/lib/cjs/spinner/index.js +60 -0
- package/lib/cjs/spinner/types.js +1 -0
- package/lib/cjs/standalone.js +89 -0
- package/lib/cjs/stop-events/index.js +29 -0
- package/lib/cjs/table/index.js +16 -0
- package/lib/cjs/table/types.js +1 -0
- package/lib/cjs/table-body/index.js +16 -0
- package/lib/cjs/table-body/types.js +1 -0
- package/lib/cjs/table-cell/index.js +23 -0
- package/lib/cjs/table-cell/types.js +1 -0
- package/lib/cjs/table-cell/utils.js +7 -0
- package/lib/cjs/table-head/index.js +16 -0
- package/lib/cjs/table-head/types.js +1 -0
- package/lib/cjs/table-head-cell/index.js +59 -0
- package/lib/cjs/table-head-cell/types.js +1 -0
- package/lib/cjs/table-row/index.js +44 -0
- package/lib/cjs/table-row/types.js +1 -0
- package/lib/cjs/tabs/index.js +82 -0
- package/lib/cjs/tabs/types.js +1 -0
- package/lib/cjs/tabs-icon-option/index.js +81 -0
- package/lib/cjs/tabs-icon-option/types.js +1 -0
- package/lib/cjs/tabs-option/index.js +88 -0
- package/lib/cjs/tabs-option/types.js +1 -0
- package/lib/cjs/tag/index.js +86 -0
- package/lib/cjs/tag/types.js +1 -0
- package/lib/cjs/tag/utils.js +14 -0
- package/lib/cjs/text/index.js +66 -0
- package/lib/cjs/text/types.js +1 -0
- package/lib/cjs/text/utils.js +7 -0
- package/lib/cjs/textarea/index.js +324 -0
- package/lib/cjs/textarea/types.js +1 -0
- package/lib/cjs/tile-control/index.js +112 -0
- package/lib/cjs/tile-control/types.js +1 -0
- package/lib/cjs/tile-control-option/index.js +100 -0
- package/lib/cjs/tile-control-option/types.js +1 -0
- package/lib/cjs/time-picker/index.js +339 -0
- package/lib/cjs/time-picker/types.js +1 -0
- package/lib/cjs/time-picker/utils.js +89 -0
- package/lib/cjs/title/index.js +62 -0
- package/lib/cjs/title/types.js +1 -0
- package/lib/cjs/title/utils.js +24 -0
- package/lib/cjs/toast/index.js +88 -0
- package/lib/cjs/toast/types.js +1 -0
- package/lib/cjs/toast/utils.js +7 -0
- package/lib/cjs/toast-manager/index.js +172 -0
- package/lib/cjs/toast-manager/types.js +1 -0
- package/lib/cjs/toast-manager/utils.js +7 -0
- package/lib/cjs/toggle/index.js +143 -0
- package/lib/cjs/toggle/types.js +1 -0
- package/lib/cjs/tooltip/index.js +277 -0
- package/lib/cjs/tooltip/tooltip-state.js +133 -0
- package/lib/cjs/tooltip/types.js +1 -0
- package/lib/cjs/tooltip/utils.js +25 -0
- package/lib/cjs/types.d.js +1 -0
- package/lib/cjs/utils/context.js +92 -0
- package/lib/cjs/utils/countries.js +9 -0
- package/lib/cjs/utils/csv.js +32 -0
- package/lib/cjs/utils/debounce.js +29 -0
- package/lib/cjs/utils/dom.js +183 -0
- package/lib/cjs/utils/element.js +58 -0
- package/lib/cjs/utils/event-target.js +36 -0
- package/lib/cjs/utils/get-react-event-handler.js +15 -0
- package/lib/cjs/utils/index.js +137 -0
- package/lib/cjs/utils/markdown.js +151 -0
- package/lib/cjs/utils/rect.js +37 -0
- package/lib/cjs/utils/size.js +9 -0
- package/lib/cjs/utils/slot.js +47 -0
- package/lib/cjs/utils/throttle.js +26 -0
- package/lib/cjs/utils/uid.js +20 -0
- package/lib/cjs/vertical-stepper/index.js +59 -0
- package/lib/cjs/vertical-stepper/types.js +1 -0
- package/lib/cjs/vertical-stepper-item/index.js +63 -0
- package/lib/cjs/vertical-stepper-item/types.js +1 -0
- package/lib/cjs/vertical-stepper-item/utils.js +7 -0
- package/lib/esm/accordion/index.d.ts +11 -0
- package/lib/esm/accordion/types.d.ts +21 -0
- package/lib/esm/accordion-item/index.d.ts +14 -0
- package/lib/esm/accordion-item/types.d.ts +36 -0
- package/lib/esm/accordion-item/utils.d.ts +2 -0
- package/lib/esm/action-menu/index.d.ts +11 -0
- package/lib/esm/action-menu/types.d.ts +13 -0
- package/lib/esm/action-menu-option/index.d.ts +12 -0
- package/lib/esm/action-menu-option/types.d.ts +23 -0
- package/lib/esm/action-menu-option/utils.d.ts +2 -0
- package/lib/esm/alert/index.d.ts +14 -0
- package/lib/esm/alert/types.d.ts +18 -0
- package/lib/esm/alert/utils.d.ts +2 -0
- package/lib/esm/avatar/index.d.ts +11 -0
- package/lib/esm/avatar/types.d.ts +37 -0
- package/lib/esm/avatar/utils.d.ts +4 -0
- package/lib/esm/badge/index.d.ts +11 -0
- package/lib/esm/badge/types.d.ts +34 -0
- package/lib/esm/badge/utils.d.ts +2 -0
- package/lib/esm/button/index.d.ts +11 -0
- package/lib/esm/button/types.d.ts +53 -0
- package/lib/esm/button/utils.d.ts +2 -0
- package/lib/esm/card/index.d.ts +13 -0
- package/lib/esm/card/types.d.ts +28 -0
- package/lib/esm/card-container/index.d.ts +11 -0
- package/lib/esm/card-container/types.d.ts +3 -0
- package/lib/esm/chat/index.d.ts +11 -0
- package/lib/esm/chat/types.d.ts +3 -0
- package/lib/esm/chat-block/index.d.ts +11 -0
- package/lib/esm/chat-block/types.d.ts +30 -0
- package/lib/esm/chat-bubble/index.d.ts +11 -0
- package/lib/esm/chat-bubble/types.d.ts +20 -0
- package/lib/esm/chat-bubble/utils.d.ts +3 -0
- package/lib/esm/checkbox/index.d.ts +11 -0
- package/lib/esm/checkbox/types.d.ts +49 -0
- package/lib/esm/chip/index.d.ts +13 -0
- package/lib/esm/chip/types.d.ts +37 -0
- package/lib/esm/chip/utils.d.ts +2 -0
- package/lib/esm/code-tag/index.d.ts +11 -0
- package/lib/esm/code-tag/types.d.ts +11 -0
- package/lib/esm/color-menu/index.d.ts +11 -0
- package/lib/esm/color-menu/types.d.ts +32 -0
- package/lib/esm/color-menu/utils.d.ts +1 -0
- package/lib/esm/color-menu-option/index.d.ts +13 -0
- package/lib/esm/color-menu-option/types.d.ts +11 -0
- package/lib/esm/color-menu-option/utils.d.ts +1 -0
- package/lib/esm/color-swatch/index.d.ts +12 -0
- package/lib/esm/color-swatch/types.d.ts +11 -0
- package/lib/esm/color-swatch/utils.d.ts +2 -0
- package/lib/esm/colors.json +88 -0
- package/lib/esm/date-picker/index.d.ts +14 -0
- package/lib/esm/date-picker/types.d.ts +70 -0
- package/lib/esm/date-picker/utils.d.ts +28 -0
- package/lib/esm/dialog/index.d.ts +15 -0
- package/lib/esm/dialog/types.d.ts +28 -0
- package/lib/esm/dialog/utils.d.ts +2 -0
- package/lib/esm/emoji/index.d.ts +11 -0
- package/lib/esm/emoji/types.d.ts +11 -0
- package/lib/esm/emoji/utils.d.ts +3 -0
- package/lib/esm/emoji-picker/data.json +1 -0
- package/lib/esm/emoji-picker/index.d.ts +22 -0
- package/lib/esm/emoji-picker/types.d.ts +26 -0
- package/lib/esm/field/index.d.ts +11 -0
- package/lib/esm/field/types.d.ts +35 -0
- package/lib/esm/file-drop/index.d.ts +13 -0
- package/lib/esm/file-drop/types.d.ts +50 -0
- package/lib/esm/file-drop/utils.d.ts +2 -0
- package/lib/esm/file-picker/index.d.ts +11 -0
- package/lib/esm/file-picker/types.d.ts +32 -0
- package/lib/esm/file-picker/utils.d.ts +1 -0
- package/lib/esm/file-status/index.d.ts +14 -0
- package/lib/esm/file-status/types.d.ts +18 -0
- package/lib/esm/file-status/utils.d.ts +2 -0
- package/lib/esm/flag/index.d.ts +11 -0
- package/lib/esm/flag/types.d.ts +11 -0
- package/lib/esm/flag/utils.d.ts +1 -0
- package/lib/esm/grid/index.d.ts +11 -0
- package/lib/esm/grid/types.d.ts +3 -0
- package/lib/esm/grid-item/index.d.ts +11 -0
- package/lib/esm/grid-item/types.d.ts +17 -0
- package/lib/esm/help-tooltip/index.d.ts +13 -0
- package/lib/esm/help-tooltip/types.d.ts +3 -0
- package/lib/esm/horizontal-stepper/index.d.ts +11 -0
- package/lib/esm/horizontal-stepper/types.d.ts +13 -0
- package/lib/esm/horizontal-stepper-item/index.d.ts +14 -0
- package/lib/esm/horizontal-stepper-item/types.d.ts +24 -0
- package/lib/esm/horizontal-stepper-item/utils.d.ts +2 -0
- package/lib/esm/icon/index.d.ts +11 -0
- package/lib/esm/icon/types.d.ts +11 -0
- package/lib/esm/icon-button/index.d.ts +12 -0
- package/lib/esm/icon-button/types.d.ts +44 -0
- package/lib/esm/icon-button/utils.d.ts +2 -0
- package/lib/esm/imports.d.js +0 -0
- package/lib/esm/imports.d.ts +9 -0
- package/lib/esm/inline-alert/index.d.ts +15 -0
- package/lib/esm/inline-alert/types.d.ts +15 -0
- package/lib/esm/inline-alert/utils.d.ts +2 -0
- package/lib/esm/input/index.d.ts +11 -0
- package/lib/esm/input/types.d.ts +86 -0
- package/lib/esm/input/utils.d.ts +26 -0
- package/lib/esm/link/index.d.ts +12 -0
- package/lib/esm/link/types.d.ts +59 -0
- package/lib/esm/list/index.d.ts +11 -0
- package/lib/esm/list/types.d.ts +3 -0
- package/lib/esm/list-item/index.d.ts +11 -0
- package/lib/esm/list-item/types.d.ts +3 -0
- package/lib/esm/pagination/index.d.ts +12 -0
- package/lib/esm/pagination/types.d.ts +16 -0
- package/lib/esm/pop/index.d.ts +11 -0
- package/lib/esm/pop/types.d.ts +35 -0
- package/lib/esm/pop/utils.d.ts +4 -0
- package/lib/esm/popover/index.d.ts +12 -0
- package/lib/esm/popover/types.d.ts +38 -0
- package/lib/esm/popover/utils.d.ts +4 -0
- package/lib/esm/progress/index.d.ts +12 -0
- package/lib/esm/progress/types.d.ts +12 -0
- package/lib/esm/progress-stepper/index.d.ts +11 -0
- package/lib/esm/progress-stepper/types.d.ts +22 -0
- package/lib/esm/progress-stepper-item/index.d.ts +12 -0
- package/lib/esm/progress-stepper-item/types.d.ts +23 -0
- package/lib/esm/progress-stepper-item/utils.d.ts +11 -0
- package/lib/esm/radio/index.d.ts +11 -0
- package/lib/esm/radio/types.d.ts +14 -0
- package/lib/esm/radio-option/index.d.ts +11 -0
- package/lib/esm/radio-option/types.d.ts +18 -0
- package/lib/esm/rich-text/index.d.ts +14 -0
- package/lib/esm/rich-text/types.d.ts +12 -0
- package/lib/esm/rich-text/utils.d.ts +7 -0
- package/lib/esm/rich-textarea/index.d.ts +11 -0
- package/lib/esm/rich-textarea/types.d.ts +48 -0
- package/lib/esm/rich-textarea/utils.d.ts +39 -0
- package/lib/esm/segment/index.d.ts +12 -0
- package/lib/esm/segment/types.d.ts +16 -0
- package/lib/esm/segment/utils.d.ts +3 -0
- package/lib/esm/segment-collapse/index.d.ts +13 -0
- package/lib/esm/segment-collapse/types.d.ts +11 -0
- package/lib/esm/segmented-control/index.d.ts +11 -0
- package/lib/esm/segmented-control/types.d.ts +11 -0
- package/lib/esm/segmented-control-option/index.d.ts +11 -0
- package/lib/esm/segmented-control-option/types.d.ts +19 -0
- package/lib/esm/segmented-icon-control/index.d.ts +11 -0
- package/lib/esm/segmented-icon-control/types.d.ts +14 -0
- package/lib/esm/segmented-icon-control-option/index.d.ts +11 -0
- package/lib/esm/segmented-icon-control-option/types.d.ts +16 -0
- package/lib/esm/select-button/index.d.ts +13 -0
- package/lib/esm/select-button/types.d.ts +50 -0
- package/lib/esm/select-menu/index.d.ts +15 -0
- package/lib/esm/select-menu/types.d.ts +41 -0
- package/lib/esm/select-menu-option/index.d.ts +28 -0
- package/lib/esm/select-menu-option/types.d.ts +26 -0
- package/lib/esm/skeleton/index.d.ts +11 -0
- package/lib/esm/skeleton/types.d.ts +9 -0
- package/lib/esm/skeleton-item/index.d.ts +11 -0
- package/lib/esm/skeleton-item/types.d.ts +13 -0
- package/lib/esm/spinner/index.d.ts +11 -0
- package/lib/esm/spinner/types.d.ts +12 -0
- package/lib/esm/standalone.d.ts +85 -0
- package/lib/esm/stop-events/index.d.ts +1 -0
- package/lib/esm/table/index.d.ts +11 -0
- package/lib/esm/table/types.d.ts +3 -0
- package/lib/esm/table-body/index.d.ts +11 -0
- package/lib/esm/table-body/types.d.ts +3 -0
- package/lib/esm/table-cell/index.d.ts +11 -0
- package/lib/esm/table-cell/types.d.ts +9 -0
- package/lib/esm/table-cell/utils.d.ts +2 -0
- package/lib/esm/table-head/index.d.ts +11 -0
- package/lib/esm/table-head/types.d.ts +3 -0
- package/lib/esm/table-head-cell/index.d.ts +12 -0
- package/lib/esm/table-head-cell/types.d.ts +15 -0
- package/lib/esm/table-row/index.d.ts +11 -0
- package/lib/esm/table-row/types.d.ts +11 -0
- package/lib/esm/tabs/index.d.ts +11 -0
- package/lib/esm/tabs/types.d.ts +18 -0
- package/lib/esm/tabs-icon-option/index.d.ts +11 -0
- package/lib/esm/tabs-icon-option/types.d.ts +19 -0
- package/lib/esm/tabs-option/index.d.ts +12 -0
- package/lib/esm/tabs-option/types.d.ts +25 -0
- package/lib/esm/tag/index.d.ts +12 -0
- package/lib/esm/tag/types.d.ts +23 -0
- package/lib/esm/tag/utils.d.ts +2 -0
- package/lib/esm/text/index.d.ts +11 -0
- package/lib/esm/text/types.d.ts +30 -0
- package/lib/esm/text/utils.d.ts +2 -0
- package/lib/esm/textarea/index.d.ts +11 -0
- package/lib/esm/textarea/types.d.ts +60 -0
- package/lib/esm/tile-control/index.d.ts +11 -0
- package/lib/esm/tile-control/types.d.ts +37 -0
- package/lib/esm/tile-control-option/index.d.ts +11 -0
- package/lib/esm/tile-control-option/types.d.ts +37 -0
- package/lib/esm/time-picker/index.d.ts +15 -0
- package/lib/esm/time-picker/types.d.ts +34 -0
- package/lib/esm/time-picker/utils.d.ts +11 -0
- package/lib/esm/title/index.d.ts +11 -0
- package/lib/esm/title/types.d.ts +31 -0
- package/lib/esm/title/utils.d.ts +3 -0
- package/lib/esm/toast/index.d.ts +13 -0
- package/lib/esm/toast/types.d.ts +28 -0
- package/lib/esm/toast/utils.d.ts +2 -0
- package/lib/esm/toast-manager/index.d.ts +13 -0
- package/lib/esm/toast-manager/types.d.ts +13 -0
- package/lib/esm/toast-manager/utils.d.ts +2 -0
- package/lib/esm/toggle/index.d.ts +11 -0
- package/lib/esm/toggle/types.d.ts +23 -0
- package/lib/esm/tooltip/index.d.ts +13 -0
- package/lib/esm/tooltip/tooltip-state.d.ts +19 -0
- package/lib/esm/tooltip/types.d.ts +42 -0
- package/lib/esm/tooltip/utils.d.ts +6 -0
- package/lib/esm/types.d.ts +14 -0
- package/lib/esm/utils/context.d.ts +20 -0
- package/lib/esm/utils/countries.d.ts +6 -0
- package/lib/esm/utils/countries.json +1217 -0
- package/lib/esm/utils/csv.d.ts +5 -0
- package/lib/esm/utils/debounce.d.ts +8 -0
- package/lib/esm/utils/dom.d.ts +34 -0
- package/lib/esm/utils/element.d.ts +16 -0
- package/lib/esm/utils/element.js +48 -0
- package/lib/esm/utils/event-target.d.ts +4 -0
- package/lib/esm/utils/get-react-event-handler.d.ts +1 -0
- package/lib/esm/utils/index.d.ts +12 -0
- package/lib/esm/utils/markdown.d.ts +19 -0
- package/lib/esm/utils/rect.d.ts +4 -0
- package/lib/esm/utils/size.d.ts +5 -0
- package/lib/esm/utils/slot.d.ts +4 -0
- package/lib/esm/utils/throttle.d.ts +4 -0
- package/lib/esm/utils/uid.d.ts +1 -0
- package/lib/esm/vertical-stepper/index.d.ts +11 -0
- package/lib/esm/vertical-stepper/types.d.ts +13 -0
- package/lib/esm/vertical-stepper/types.js +1 -0
- package/lib/esm/vertical-stepper-item/index.d.ts +14 -0
- package/lib/esm/vertical-stepper-item/types.d.ts +24 -0
- package/lib/esm/vertical-stepper-item/utils.d.ts +2 -0
- package/lib/package.json +1 -0
- package/package.json +33 -11
- package/standalone.ts +0 -93
- package/utils/element.js +0 -48
- /package/{accordion → lib/cjs/accordion}/index.d.ts +0 -0
- /package/{accordion → lib/cjs/accordion}/types.d.ts +0 -0
- /package/{accordion-item → lib/cjs/accordion-item}/index.d.ts +0 -0
- /package/{accordion-item → lib/cjs/accordion-item}/types.d.ts +0 -0
- /package/{accordion-item → lib/cjs/accordion-item}/utils.d.ts +0 -0
- /package/{action-menu → lib/cjs/action-menu}/index.d.ts +0 -0
- /package/{action-menu → lib/cjs/action-menu}/types.d.ts +0 -0
- /package/{action-menu-option → lib/cjs/action-menu-option}/index.d.ts +0 -0
- /package/{action-menu-option → lib/cjs/action-menu-option}/types.d.ts +0 -0
- /package/{action-menu-option → lib/cjs/action-menu-option}/utils.d.ts +0 -0
- /package/{alert → lib/cjs/alert}/index.d.ts +0 -0
- /package/{alert → lib/cjs/alert}/types.d.ts +0 -0
- /package/{alert → lib/cjs/alert}/utils.d.ts +0 -0
- /package/{avatar → lib/cjs/avatar}/index.d.ts +0 -0
- /package/{avatar → lib/cjs/avatar}/types.d.ts +0 -0
- /package/{avatar → lib/cjs/avatar}/utils.d.ts +0 -0
- /package/{badge → lib/cjs/badge}/index.d.ts +0 -0
- /package/{badge → lib/cjs/badge}/types.d.ts +0 -0
- /package/{badge → lib/cjs/badge}/utils.d.ts +0 -0
- /package/{button → lib/cjs/button}/index.d.ts +0 -0
- /package/{button → lib/cjs/button}/types.d.ts +0 -0
- /package/{button → lib/cjs/button}/utils.d.ts +0 -0
- /package/{card → lib/cjs/card}/index.d.ts +0 -0
- /package/{card → lib/cjs/card}/types.d.ts +0 -0
- /package/{card-container → lib/cjs/card-container}/index.d.ts +0 -0
- /package/{card-container → lib/cjs/card-container}/types.d.ts +0 -0
- /package/{chat → lib/cjs/chat}/index.d.ts +0 -0
- /package/{chat → lib/cjs/chat}/types.d.ts +0 -0
- /package/{chat-block → lib/cjs/chat-block}/index.d.ts +0 -0
- /package/{chat-block → lib/cjs/chat-block}/types.d.ts +0 -0
- /package/{chat-bubble → lib/cjs/chat-bubble}/index.d.ts +0 -0
- /package/{chat-bubble → lib/cjs/chat-bubble}/types.d.ts +0 -0
- /package/{chat-bubble → lib/cjs/chat-bubble}/utils.d.ts +0 -0
- /package/{checkbox → lib/cjs/checkbox}/index.d.ts +0 -0
- /package/{checkbox → lib/cjs/checkbox}/types.d.ts +0 -0
- /package/{chip → lib/cjs/chip}/index.d.ts +0 -0
- /package/{chip → lib/cjs/chip}/types.d.ts +0 -0
- /package/{chip → lib/cjs/chip}/utils.d.ts +0 -0
- /package/{code-tag → lib/cjs/code-tag}/index.d.ts +0 -0
- /package/{code-tag → lib/cjs/code-tag}/types.d.ts +0 -0
- /package/{color-menu → lib/cjs/color-menu}/index.d.ts +0 -0
- /package/{color-menu → lib/cjs/color-menu}/types.d.ts +0 -0
- /package/{color-menu → lib/cjs/color-menu}/utils.d.ts +0 -0
- /package/{color-menu-option → lib/cjs/color-menu-option}/index.d.ts +0 -0
- /package/{color-menu-option → lib/cjs/color-menu-option}/types.d.ts +0 -0
- /package/{color-menu-option → lib/cjs/color-menu-option}/utils.d.ts +0 -0
- /package/{color-swatch → lib/cjs/color-swatch}/index.d.ts +0 -0
- /package/{color-swatch → lib/cjs/color-swatch}/types.d.ts +0 -0
- /package/{color-swatch → lib/cjs/color-swatch}/utils.d.ts +0 -0
- /package/{colors.json → lib/cjs/colors.json} +0 -0
- /package/{date-picker → lib/cjs/date-picker}/index.d.ts +0 -0
- /package/{date-picker → lib/cjs/date-picker}/types.d.ts +0 -0
- /package/{date-picker → lib/cjs/date-picker}/utils.d.ts +0 -0
- /package/{dialog → lib/cjs/dialog}/index.d.ts +0 -0
- /package/{dialog → lib/cjs/dialog}/types.d.ts +0 -0
- /package/{dialog → lib/cjs/dialog}/utils.d.ts +0 -0
- /package/{emoji → lib/cjs/emoji}/index.d.ts +0 -0
- /package/{emoji → lib/cjs/emoji}/types.d.ts +0 -0
- /package/{emoji → lib/cjs/emoji}/utils.d.ts +0 -0
- /package/{emoji-picker → lib/cjs/emoji-picker}/data.json +0 -0
- /package/{emoji-picker → lib/cjs/emoji-picker}/index.d.ts +0 -0
- /package/{emoji-picker → lib/cjs/emoji-picker}/types.d.ts +0 -0
- /package/{field → lib/cjs/field}/index.d.ts +0 -0
- /package/{field → lib/cjs/field}/types.d.ts +0 -0
- /package/{file-drop → lib/cjs/file-drop}/index.d.ts +0 -0
- /package/{file-drop → lib/cjs/file-drop}/types.d.ts +0 -0
- /package/{file-drop → lib/cjs/file-drop}/utils.d.ts +0 -0
- /package/{file-picker → lib/cjs/file-picker}/index.d.ts +0 -0
- /package/{file-picker → lib/cjs/file-picker}/types.d.ts +0 -0
- /package/{file-picker → lib/cjs/file-picker}/utils.d.ts +0 -0
- /package/{file-status → lib/cjs/file-status}/index.d.ts +0 -0
- /package/{file-status → lib/cjs/file-status}/types.d.ts +0 -0
- /package/{file-status → lib/cjs/file-status}/utils.d.ts +0 -0
- /package/{flag → lib/cjs/flag}/index.d.ts +0 -0
- /package/{flag → lib/cjs/flag}/types.d.ts +0 -0
- /package/{flag → lib/cjs/flag}/utils.d.ts +0 -0
- /package/{grid → lib/cjs/grid}/index.d.ts +0 -0
- /package/{grid → lib/cjs/grid}/types.d.ts +0 -0
- /package/{grid-item → lib/cjs/grid-item}/index.d.ts +0 -0
- /package/{grid-item → lib/cjs/grid-item}/types.d.ts +0 -0
- /package/{help-tooltip → lib/cjs/help-tooltip}/index.d.ts +0 -0
- /package/{help-tooltip → lib/cjs/help-tooltip}/types.d.ts +0 -0
- /package/{horizontal-stepper → lib/cjs/horizontal-stepper}/index.d.ts +0 -0
- /package/{horizontal-stepper → lib/cjs/horizontal-stepper}/types.d.ts +0 -0
- /package/{horizontal-stepper-item → lib/cjs/horizontal-stepper-item}/index.d.ts +0 -0
- /package/{horizontal-stepper-item → lib/cjs/horizontal-stepper-item}/types.d.ts +0 -0
- /package/{horizontal-stepper-item → lib/cjs/horizontal-stepper-item}/utils.d.ts +0 -0
- /package/{icon → lib/cjs/icon}/index.d.ts +0 -0
- /package/{icon → lib/cjs/icon}/types.d.ts +0 -0
- /package/{icon-button → lib/cjs/icon-button}/index.d.ts +0 -0
- /package/{icon-button → lib/cjs/icon-button}/types.d.ts +0 -0
- /package/{icon-button → lib/cjs/icon-button}/utils.d.ts +0 -0
- /package/{inline-alert → lib/cjs/inline-alert}/index.d.ts +0 -0
- /package/{inline-alert → lib/cjs/inline-alert}/types.d.ts +0 -0
- /package/{inline-alert → lib/cjs/inline-alert}/utils.d.ts +0 -0
- /package/{input → lib/cjs/input}/index.d.ts +0 -0
- /package/{input → lib/cjs/input}/types.d.ts +0 -0
- /package/{input → lib/cjs/input}/utils.d.ts +0 -0
- /package/{link → lib/cjs/link}/index.d.ts +0 -0
- /package/{link → lib/cjs/link}/types.d.ts +0 -0
- /package/{list → lib/cjs/list}/index.d.ts +0 -0
- /package/{list → lib/cjs/list}/types.d.ts +0 -0
- /package/{list-item → lib/cjs/list-item}/index.d.ts +0 -0
- /package/{list-item → lib/cjs/list-item}/types.d.ts +0 -0
- /package/{pagination → lib/cjs/pagination}/index.d.ts +0 -0
- /package/{pagination → lib/cjs/pagination}/types.d.ts +0 -0
- /package/{pop → lib/cjs/pop}/index.d.ts +0 -0
- /package/{pop → lib/cjs/pop}/types.d.ts +0 -0
- /package/{pop → lib/cjs/pop}/utils.d.ts +0 -0
- /package/{popover → lib/cjs/popover}/index.d.ts +0 -0
- /package/{popover → lib/cjs/popover}/types.d.ts +0 -0
- /package/{popover → lib/cjs/popover}/utils.d.ts +0 -0
- /package/{progress → lib/cjs/progress}/index.d.ts +0 -0
- /package/{progress → lib/cjs/progress}/types.d.ts +0 -0
- /package/{progress-stepper → lib/cjs/progress-stepper}/index.d.ts +0 -0
- /package/{progress-stepper → lib/cjs/progress-stepper}/types.d.ts +0 -0
- /package/{progress-stepper-item → lib/cjs/progress-stepper-item}/index.d.ts +0 -0
- /package/{progress-stepper-item → lib/cjs/progress-stepper-item}/types.d.ts +0 -0
- /package/{progress-stepper-item → lib/cjs/progress-stepper-item}/utils.d.ts +0 -0
- /package/{radio → lib/cjs/radio}/index.d.ts +0 -0
- /package/{radio → lib/cjs/radio}/types.d.ts +0 -0
- /package/{radio-option → lib/cjs/radio-option}/index.d.ts +0 -0
- /package/{radio-option → lib/cjs/radio-option}/types.d.ts +0 -0
- /package/{rich-text → lib/cjs/rich-text}/index.d.ts +0 -0
- /package/{rich-text → lib/cjs/rich-text}/types.d.ts +0 -0
- /package/{rich-text → lib/cjs/rich-text}/utils.d.ts +0 -0
- /package/{rich-textarea → lib/cjs/rich-textarea}/index.d.ts +0 -0
- /package/{rich-textarea → lib/cjs/rich-textarea}/types.d.ts +0 -0
- /package/{rich-textarea → lib/cjs/rich-textarea}/utils.d.ts +0 -0
- /package/{segment → lib/cjs/segment}/index.d.ts +0 -0
- /package/{segment → lib/cjs/segment}/types.d.ts +0 -0
- /package/{segment → lib/cjs/segment}/utils.d.ts +0 -0
- /package/{segment-collapse → lib/cjs/segment-collapse}/index.d.ts +0 -0
- /package/{segment-collapse → lib/cjs/segment-collapse}/types.d.ts +0 -0
- /package/{segmented-control → lib/cjs/segmented-control}/index.d.ts +0 -0
- /package/{segmented-control → lib/cjs/segmented-control}/types.d.ts +0 -0
- /package/{segmented-control-option → lib/cjs/segmented-control-option}/index.d.ts +0 -0
- /package/{segmented-control-option → lib/cjs/segmented-control-option}/types.d.ts +0 -0
- /package/{segmented-icon-control → lib/cjs/segmented-icon-control}/index.d.ts +0 -0
- /package/{segmented-icon-control → lib/cjs/segmented-icon-control}/types.d.ts +0 -0
- /package/{segmented-icon-control-option → lib/cjs/segmented-icon-control-option}/index.d.ts +0 -0
- /package/{segmented-icon-control-option → lib/cjs/segmented-icon-control-option}/types.d.ts +0 -0
- /package/{select-button → lib/cjs/select-button}/index.d.ts +0 -0
- /package/{select-button → lib/cjs/select-button}/types.d.ts +0 -0
- /package/{select-menu → lib/cjs/select-menu}/index.d.ts +0 -0
- /package/{select-menu → lib/cjs/select-menu}/types.d.ts +0 -0
- /package/{select-menu-option → lib/cjs/select-menu-option}/index.d.ts +0 -0
- /package/{select-menu-option → lib/cjs/select-menu-option}/types.d.ts +0 -0
- /package/{skeleton → lib/cjs/skeleton}/index.d.ts +0 -0
- /package/{skeleton → lib/cjs/skeleton}/types.d.ts +0 -0
- /package/{skeleton-item → lib/cjs/skeleton-item}/index.d.ts +0 -0
- /package/{skeleton-item → lib/cjs/skeleton-item}/types.d.ts +0 -0
- /package/{spinner → lib/cjs/spinner}/index.d.ts +0 -0
- /package/{spinner → lib/cjs/spinner}/types.d.ts +0 -0
- /package/{standalone.d.ts → lib/cjs/standalone.d.ts} +0 -0
- /package/{stop-events → lib/cjs/stop-events}/index.d.ts +0 -0
- /package/{table → lib/cjs/table}/index.d.ts +0 -0
- /package/{table → lib/cjs/table}/types.d.ts +0 -0
- /package/{table-body → lib/cjs/table-body}/index.d.ts +0 -0
- /package/{table-body → lib/cjs/table-body}/types.d.ts +0 -0
- /package/{table-cell → lib/cjs/table-cell}/index.d.ts +0 -0
- /package/{table-cell → lib/cjs/table-cell}/types.d.ts +0 -0
- /package/{table-cell → lib/cjs/table-cell}/utils.d.ts +0 -0
- /package/{table-head → lib/cjs/table-head}/index.d.ts +0 -0
- /package/{table-head → lib/cjs/table-head}/types.d.ts +0 -0
- /package/{table-head-cell → lib/cjs/table-head-cell}/index.d.ts +0 -0
- /package/{table-head-cell → lib/cjs/table-head-cell}/types.d.ts +0 -0
- /package/{table-row → lib/cjs/table-row}/index.d.ts +0 -0
- /package/{table-row → lib/cjs/table-row}/types.d.ts +0 -0
- /package/{tabs → lib/cjs/tabs}/index.d.ts +0 -0
- /package/{tabs → lib/cjs/tabs}/types.d.ts +0 -0
- /package/{tabs-icon-option → lib/cjs/tabs-icon-option}/index.d.ts +0 -0
- /package/{tabs-icon-option → lib/cjs/tabs-icon-option}/types.d.ts +0 -0
- /package/{tabs-option → lib/cjs/tabs-option}/index.d.ts +0 -0
- /package/{tabs-option → lib/cjs/tabs-option}/types.d.ts +0 -0
- /package/{tag → lib/cjs/tag}/index.d.ts +0 -0
- /package/{tag → lib/cjs/tag}/types.d.ts +0 -0
- /package/{tag → lib/cjs/tag}/utils.d.ts +0 -0
- /package/{text → lib/cjs/text}/index.d.ts +0 -0
- /package/{text → lib/cjs/text}/types.d.ts +0 -0
- /package/{text → lib/cjs/text}/utils.d.ts +0 -0
- /package/{textarea → lib/cjs/textarea}/index.d.ts +0 -0
- /package/{textarea → lib/cjs/textarea}/types.d.ts +0 -0
- /package/{tile-control → lib/cjs/tile-control}/index.d.ts +0 -0
- /package/{tile-control → lib/cjs/tile-control}/types.d.ts +0 -0
- /package/{tile-control-option → lib/cjs/tile-control-option}/index.d.ts +0 -0
- /package/{tile-control-option → lib/cjs/tile-control-option}/types.d.ts +0 -0
- /package/{time-picker → lib/cjs/time-picker}/index.d.ts +0 -0
- /package/{time-picker → lib/cjs/time-picker}/types.d.ts +0 -0
- /package/{time-picker → lib/cjs/time-picker}/utils.d.ts +0 -0
- /package/{title → lib/cjs/title}/index.d.ts +0 -0
- /package/{title → lib/cjs/title}/types.d.ts +0 -0
- /package/{title → lib/cjs/title}/utils.d.ts +0 -0
- /package/{toast → lib/cjs/toast}/index.d.ts +0 -0
- /package/{toast → lib/cjs/toast}/types.d.ts +0 -0
- /package/{toast → lib/cjs/toast}/utils.d.ts +0 -0
- /package/{toast-manager → lib/cjs/toast-manager}/index.d.ts +0 -0
- /package/{toast-manager → lib/cjs/toast-manager}/types.d.ts +0 -0
- /package/{toast-manager → lib/cjs/toast-manager}/utils.d.ts +0 -0
- /package/{toggle → lib/cjs/toggle}/index.d.ts +0 -0
- /package/{toggle → lib/cjs/toggle}/types.d.ts +0 -0
- /package/{tooltip → lib/cjs/tooltip}/index.d.ts +0 -0
- /package/{tooltip → lib/cjs/tooltip}/tooltip-state.d.ts +0 -0
- /package/{tooltip → lib/cjs/tooltip}/types.d.ts +0 -0
- /package/{tooltip → lib/cjs/tooltip}/utils.d.ts +0 -0
- /package/{types.d.ts → lib/cjs/types.d.ts} +0 -0
- /package/{utils → lib/cjs/utils}/context.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/countries.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/countries.json +0 -0
- /package/{utils → lib/cjs/utils}/csv.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/debounce.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/dom.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/element.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/event-target.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/get-react-event-handler.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/index.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/markdown.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/rect.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/size.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/slot.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/throttle.d.ts +0 -0
- /package/{utils → lib/cjs/utils}/uid.d.ts +0 -0
- /package/{vertical-stepper → lib/cjs/vertical-stepper}/index.d.ts +0 -0
- /package/{vertical-stepper → lib/cjs/vertical-stepper}/types.d.ts +0 -0
- /package/{vertical-stepper-item → lib/cjs/vertical-stepper-item}/index.d.ts +0 -0
- /package/{vertical-stepper-item → lib/cjs/vertical-stepper-item}/types.d.ts +0 -0
- /package/{vertical-stepper-item → lib/cjs/vertical-stepper-item}/utils.d.ts +0 -0
- /package/{accordion → lib/esm/accordion}/index.js +0 -0
- /package/{accordion → lib/esm/accordion}/types.js +0 -0
- /package/{accordion-item → lib/esm/accordion-item}/index.js +0 -0
- /package/{accordion-item → lib/esm/accordion-item}/types.js +0 -0
- /package/{accordion-item → lib/esm/accordion-item}/utils.js +0 -0
- /package/{action-menu → lib/esm/action-menu}/index.js +0 -0
- /package/{action-menu → lib/esm/action-menu}/types.js +0 -0
- /package/{action-menu-option → lib/esm/action-menu-option}/index.js +0 -0
- /package/{action-menu-option → lib/esm/action-menu-option}/types.js +0 -0
- /package/{action-menu-option → lib/esm/action-menu-option}/utils.js +0 -0
- /package/{alert → lib/esm/alert}/index.js +0 -0
- /package/{alert → lib/esm/alert}/types.js +0 -0
- /package/{alert → lib/esm/alert}/utils.js +0 -0
- /package/{avatar → lib/esm/avatar}/index.js +0 -0
- /package/{avatar → lib/esm/avatar}/types.js +0 -0
- /package/{avatar → lib/esm/avatar}/utils.js +0 -0
- /package/{badge → lib/esm/badge}/index.js +0 -0
- /package/{badge → lib/esm/badge}/types.js +0 -0
- /package/{badge → lib/esm/badge}/utils.js +0 -0
- /package/{button → lib/esm/button}/index.js +0 -0
- /package/{button → lib/esm/button}/types.js +0 -0
- /package/{button → lib/esm/button}/utils.js +0 -0
- /package/{card → lib/esm/card}/index.js +0 -0
- /package/{card → lib/esm/card}/types.js +0 -0
- /package/{card-container → lib/esm/card-container}/index.js +0 -0
- /package/{card-container → lib/esm/card-container}/types.js +0 -0
- /package/{chat → lib/esm/chat}/index.js +0 -0
- /package/{chat → lib/esm/chat}/types.js +0 -0
- /package/{chat-block → lib/esm/chat-block}/index.js +0 -0
- /package/{chat-block → lib/esm/chat-block}/types.js +0 -0
- /package/{chat-bubble → lib/esm/chat-bubble}/index.js +0 -0
- /package/{chat-bubble → lib/esm/chat-bubble}/types.js +0 -0
- /package/{chat-bubble → lib/esm/chat-bubble}/utils.js +0 -0
- /package/{checkbox → lib/esm/checkbox}/index.js +0 -0
- /package/{checkbox → lib/esm/checkbox}/types.js +0 -0
- /package/{chip → lib/esm/chip}/index.js +0 -0
- /package/{chip → lib/esm/chip}/types.js +0 -0
- /package/{chip → lib/esm/chip}/utils.js +0 -0
- /package/{code-tag → lib/esm/code-tag}/index.js +0 -0
- /package/{code-tag → lib/esm/code-tag}/types.js +0 -0
- /package/{color-menu → lib/esm/color-menu}/index.js +0 -0
- /package/{color-menu → lib/esm/color-menu}/types.js +0 -0
- /package/{color-menu → lib/esm/color-menu}/utils.js +0 -0
- /package/{color-menu-option → lib/esm/color-menu-option}/index.js +0 -0
- /package/{color-menu-option → lib/esm/color-menu-option}/types.js +0 -0
- /package/{color-menu-option → lib/esm/color-menu-option}/utils.js +0 -0
- /package/{color-swatch → lib/esm/color-swatch}/index.js +0 -0
- /package/{color-swatch → lib/esm/color-swatch}/types.js +0 -0
- /package/{color-swatch → lib/esm/color-swatch}/utils.js +0 -0
- /package/{date-picker → lib/esm/date-picker}/index.js +0 -0
- /package/{date-picker → lib/esm/date-picker}/types.js +0 -0
- /package/{date-picker → lib/esm/date-picker}/utils.js +0 -0
- /package/{dialog → lib/esm/dialog}/index.js +0 -0
- /package/{dialog → lib/esm/dialog}/types.js +0 -0
- /package/{dialog → lib/esm/dialog}/utils.js +0 -0
- /package/{emoji → lib/esm/emoji}/index.js +0 -0
- /package/{emoji → lib/esm/emoji}/types.js +0 -0
- /package/{emoji → lib/esm/emoji}/utils.js +0 -0
- /package/{emoji-picker → lib/esm/emoji-picker}/index.js +0 -0
- /package/{emoji-picker → lib/esm/emoji-picker}/types.js +0 -0
- /package/{field → lib/esm/field}/index.js +0 -0
- /package/{field → lib/esm/field}/types.js +0 -0
- /package/{file-drop → lib/esm/file-drop}/index.js +0 -0
- /package/{file-drop → lib/esm/file-drop}/types.js +0 -0
- /package/{file-drop → lib/esm/file-drop}/utils.js +0 -0
- /package/{file-picker → lib/esm/file-picker}/index.js +0 -0
- /package/{file-picker → lib/esm/file-picker}/types.js +0 -0
- /package/{file-picker → lib/esm/file-picker}/utils.js +0 -0
- /package/{file-status → lib/esm/file-status}/index.js +0 -0
- /package/{file-status → lib/esm/file-status}/types.js +0 -0
- /package/{file-status → lib/esm/file-status}/utils.js +0 -0
- /package/{flag → lib/esm/flag}/index.js +0 -0
- /package/{flag → lib/esm/flag}/types.js +0 -0
- /package/{flag → lib/esm/flag}/utils.js +0 -0
- /package/{grid → lib/esm/grid}/index.js +0 -0
- /package/{grid → lib/esm/grid}/types.js +0 -0
- /package/{grid-item → lib/esm/grid-item}/index.js +0 -0
- /package/{grid-item → lib/esm/grid-item}/types.js +0 -0
- /package/{help-tooltip → lib/esm/help-tooltip}/index.js +0 -0
- /package/{help-tooltip → lib/esm/help-tooltip}/types.js +0 -0
- /package/{horizontal-stepper → lib/esm/horizontal-stepper}/index.js +0 -0
- /package/{horizontal-stepper → lib/esm/horizontal-stepper}/types.js +0 -0
- /package/{horizontal-stepper-item → lib/esm/horizontal-stepper-item}/index.js +0 -0
- /package/{horizontal-stepper-item → lib/esm/horizontal-stepper-item}/types.js +0 -0
- /package/{horizontal-stepper-item → lib/esm/horizontal-stepper-item}/utils.js +0 -0
- /package/{icon → lib/esm/icon}/index.js +0 -0
- /package/{icon → lib/esm/icon}/types.js +0 -0
- /package/{icon-button → lib/esm/icon-button}/index.js +0 -0
- /package/{icon-button → lib/esm/icon-button}/types.js +0 -0
- /package/{icon-button → lib/esm/icon-button}/utils.js +0 -0
- /package/{inline-alert → lib/esm/inline-alert}/index.js +0 -0
- /package/{inline-alert → lib/esm/inline-alert}/types.js +0 -0
- /package/{inline-alert → lib/esm/inline-alert}/utils.js +0 -0
- /package/{input → lib/esm/input}/index.js +0 -0
- /package/{input → lib/esm/input}/types.js +0 -0
- /package/{input → lib/esm/input}/utils.js +0 -0
- /package/{link → lib/esm/link}/index.js +0 -0
- /package/{link → lib/esm/link}/types.js +0 -0
- /package/{list → lib/esm/list}/index.js +0 -0
- /package/{list → lib/esm/list}/types.js +0 -0
- /package/{list-item → lib/esm/list-item}/index.js +0 -0
- /package/{list-item → lib/esm/list-item}/types.js +0 -0
- /package/{pagination → lib/esm/pagination}/index.js +0 -0
- /package/{pagination → lib/esm/pagination}/types.js +0 -0
- /package/{pop → lib/esm/pop}/index.js +0 -0
- /package/{pop → lib/esm/pop}/types.js +0 -0
- /package/{pop → lib/esm/pop}/utils.js +0 -0
- /package/{popover → lib/esm/popover}/index.js +0 -0
- /package/{popover → lib/esm/popover}/types.js +0 -0
- /package/{popover → lib/esm/popover}/utils.js +0 -0
- /package/{progress → lib/esm/progress}/index.js +0 -0
- /package/{progress → lib/esm/progress}/types.js +0 -0
- /package/{progress-stepper → lib/esm/progress-stepper}/index.js +0 -0
- /package/{progress-stepper → lib/esm/progress-stepper}/types.js +0 -0
- /package/{progress-stepper-item → lib/esm/progress-stepper-item}/index.js +0 -0
- /package/{progress-stepper-item → lib/esm/progress-stepper-item}/types.js +0 -0
- /package/{progress-stepper-item → lib/esm/progress-stepper-item}/utils.js +0 -0
- /package/{radio → lib/esm/radio}/index.js +0 -0
- /package/{radio → lib/esm/radio}/types.js +0 -0
- /package/{radio-option → lib/esm/radio-option}/index.js +0 -0
- /package/{radio-option → lib/esm/radio-option}/types.js +0 -0
- /package/{rich-text → lib/esm/rich-text}/index.js +0 -0
- /package/{rich-text → lib/esm/rich-text}/types.js +0 -0
- /package/{rich-text → lib/esm/rich-text}/utils.js +0 -0
- /package/{rich-textarea → lib/esm/rich-textarea}/index.js +0 -0
- /package/{rich-textarea → lib/esm/rich-textarea}/types.js +0 -0
- /package/{rich-textarea → lib/esm/rich-textarea}/utils.js +0 -0
- /package/{segment → lib/esm/segment}/index.js +0 -0
- /package/{segment → lib/esm/segment}/types.js +0 -0
- /package/{segment → lib/esm/segment}/utils.js +0 -0
- /package/{segment-collapse → lib/esm/segment-collapse}/index.js +0 -0
- /package/{segment-collapse → lib/esm/segment-collapse}/types.js +0 -0
- /package/{segmented-control → lib/esm/segmented-control}/index.js +0 -0
- /package/{segmented-control → lib/esm/segmented-control}/types.js +0 -0
- /package/{segmented-control-option → lib/esm/segmented-control-option}/index.js +0 -0
- /package/{segmented-control-option → lib/esm/segmented-control-option}/types.js +0 -0
- /package/{segmented-icon-control → lib/esm/segmented-icon-control}/index.js +0 -0
- /package/{segmented-icon-control → lib/esm/segmented-icon-control}/types.js +0 -0
- /package/{segmented-icon-control-option → lib/esm/segmented-icon-control-option}/index.js +0 -0
- /package/{segmented-icon-control-option → lib/esm/segmented-icon-control-option}/types.js +0 -0
- /package/{select-button → lib/esm/select-button}/index.js +0 -0
- /package/{select-button → lib/esm/select-button}/types.js +0 -0
- /package/{select-menu → lib/esm/select-menu}/index.js +0 -0
- /package/{select-menu → lib/esm/select-menu}/types.js +0 -0
- /package/{select-menu-option → lib/esm/select-menu-option}/index.js +0 -0
- /package/{select-menu-option → lib/esm/select-menu-option}/types.js +0 -0
- /package/{skeleton → lib/esm/skeleton}/index.js +0 -0
- /package/{skeleton → lib/esm/skeleton}/types.js +0 -0
- /package/{skeleton-item → lib/esm/skeleton-item}/index.js +0 -0
- /package/{skeleton-item → lib/esm/skeleton-item}/types.js +0 -0
- /package/{spinner → lib/esm/spinner}/index.js +0 -0
- /package/{spinner → lib/esm/spinner}/types.js +0 -0
- /package/{standalone.js → lib/esm/standalone.js} +0 -0
- /package/{stop-events → lib/esm/stop-events}/index.js +0 -0
- /package/{table → lib/esm/table}/index.js +0 -0
- /package/{table → lib/esm/table}/types.js +0 -0
- /package/{table-body → lib/esm/table-body}/index.js +0 -0
- /package/{table-body → lib/esm/table-body}/types.js +0 -0
- /package/{table-cell → lib/esm/table-cell}/index.js +0 -0
- /package/{table-cell → lib/esm/table-cell}/types.js +0 -0
- /package/{table-cell → lib/esm/table-cell}/utils.js +0 -0
- /package/{table-head → lib/esm/table-head}/index.js +0 -0
- /package/{table-head → lib/esm/table-head}/types.js +0 -0
- /package/{table-head-cell → lib/esm/table-head-cell}/index.js +0 -0
- /package/{table-head-cell → lib/esm/table-head-cell}/types.js +0 -0
- /package/{table-row → lib/esm/table-row}/index.js +0 -0
- /package/{table-row → lib/esm/table-row}/types.js +0 -0
- /package/{tabs → lib/esm/tabs}/index.js +0 -0
- /package/{tabs → lib/esm/tabs}/types.js +0 -0
- /package/{tabs-icon-option → lib/esm/tabs-icon-option}/index.js +0 -0
- /package/{tabs-icon-option → lib/esm/tabs-icon-option}/types.js +0 -0
- /package/{tabs-option → lib/esm/tabs-option}/index.js +0 -0
- /package/{tabs-option → lib/esm/tabs-option}/types.js +0 -0
- /package/{tag → lib/esm/tag}/index.js +0 -0
- /package/{tag → lib/esm/tag}/types.js +0 -0
- /package/{tag → lib/esm/tag}/utils.js +0 -0
- /package/{text → lib/esm/text}/index.js +0 -0
- /package/{text → lib/esm/text}/types.js +0 -0
- /package/{text → lib/esm/text}/utils.js +0 -0
- /package/{textarea → lib/esm/textarea}/index.js +0 -0
- /package/{textarea → lib/esm/textarea}/types.js +0 -0
- /package/{tile-control → lib/esm/tile-control}/index.js +0 -0
- /package/{tile-control → lib/esm/tile-control}/types.js +0 -0
- /package/{tile-control-option → lib/esm/tile-control-option}/index.js +0 -0
- /package/{tile-control-option → lib/esm/tile-control-option}/types.js +0 -0
- /package/{time-picker → lib/esm/time-picker}/index.js +0 -0
- /package/{time-picker → lib/esm/time-picker}/types.js +0 -0
- /package/{time-picker → lib/esm/time-picker}/utils.js +0 -0
- /package/{title → lib/esm/title}/index.js +0 -0
- /package/{title → lib/esm/title}/types.js +0 -0
- /package/{title → lib/esm/title}/utils.js +0 -0
- /package/{toast → lib/esm/toast}/index.js +0 -0
- /package/{toast → lib/esm/toast}/types.js +0 -0
- /package/{toast → lib/esm/toast}/utils.js +0 -0
- /package/{toast-manager → lib/esm/toast-manager}/index.js +0 -0
- /package/{toast-manager → lib/esm/toast-manager}/types.js +0 -0
- /package/{toast-manager → lib/esm/toast-manager}/utils.js +0 -0
- /package/{toggle → lib/esm/toggle}/index.js +0 -0
- /package/{toggle → lib/esm/toggle}/types.js +0 -0
- /package/{tooltip → lib/esm/tooltip}/index.js +0 -0
- /package/{tooltip → lib/esm/tooltip}/tooltip-state.js +0 -0
- /package/{tooltip → lib/esm/tooltip}/types.js +0 -0
- /package/{tooltip → lib/esm/tooltip}/utils.js +0 -0
- /package/{vertical-stepper-item/types.js → lib/esm/types.d.js} +0 -0
- /package/{utils → lib/esm/utils}/context.js +0 -0
- /package/{utils → lib/esm/utils}/countries.js +0 -0
- /package/{utils → lib/esm/utils}/csv.js +0 -0
- /package/{utils → lib/esm/utils}/debounce.js +0 -0
- /package/{utils → lib/esm/utils}/dom.js +0 -0
- /package/{utils → lib/esm/utils}/event-target.js +0 -0
- /package/{utils → lib/esm/utils}/get-react-event-handler.js +0 -0
- /package/{utils → lib/esm/utils}/index.js +0 -0
- /package/{utils → lib/esm/utils}/markdown.js +0 -0
- /package/{utils → lib/esm/utils}/rect.js +0 -0
- /package/{utils → lib/esm/utils}/size.js +0 -0
- /package/{utils → lib/esm/utils}/slot.js +0 -0
- /package/{utils → lib/esm/utils}/throttle.js +0 -0
- /package/{utils → lib/esm/utils}/uid.js +0 -0
- /package/{vertical-stepper → lib/esm/vertical-stepper}/index.js +0 -0
- /package/{vertical-stepper-item → lib/esm/vertical-stepper-item}/index.js +0 -0
- /package/{vertical-stepper → lib/esm/vertical-stepper-item}/types.js +0 -0
- /package/{vertical-stepper-item → lib/esm/vertical-stepper-item}/utils.js +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _utils = require('../utils');
|
|
4
|
+
const templateHTML = '<style>:host{display:block;outline:0}#button{all:initial;position:relative;display:flex;flex-direction:column;padding:12px 16px 0;box-sizing:border-box;cursor:pointer;background-color:var(--sinch-comp-tab-color-default-background-initial);border-top-left-radius:var(--sinch-comp-tab-shape-radius);border-top-right-radius:var(--sinch-comp-tab-shape-radius);height:39px;--sinch-global-color-icon:var(--sinch-comp-tab-color-default-icon-initial);--sinch-global-size-icon:var(--sinch-comp-tab-size-icon)}#button:hover{background-color:var(--sinch-comp-tab-color-default-background-hover)}#button:focus-visible::after{content:"";position:absolute;inset:0;bottom:-3px;border:2px solid var(--sinch-comp-tab-color-default-outline-focus);border-top-left-radius:var(--sinch-comp-tab-shape-radius);border-top-right-radius:var(--sinch-comp-tab-shape-radius);pointer-events:none}#button:disabled{cursor:unset;pointer-events:none;--sinch-global-color-icon:var(--sinch-comp-tab-color-disabled-icon-initial)}:host([data-checked]) #button{--sinch-global-color-icon:var(--sinch-comp-tab-color-checked-icon-initial)}:host([data-checked]) #button::before{content:"";position:absolute;left:0;right:0;bottom:-1px;pointer-events:none;border-top:2px solid var(--sinch-comp-tab-color-checked-border-initial)}::slotted(*){display:block}</style><sinch-tooltip id="tooltip"><button id="button" tabindex="0"><slot name="icon"></slot></button></sinch-tooltip>';
|
|
5
|
+
const template = document.createElement('template');
|
|
6
|
+
template.innerHTML = templateHTML;
|
|
7
|
+
(0, _utils.defineCustomElement)('sinch-tabs-icon-option', class extends _utils.NectaryElement {
|
|
8
|
+
#$button;
|
|
9
|
+
#$tooltip;
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
const shadowRoot = this.attachShadow({
|
|
13
|
+
delegatesFocus: true
|
|
14
|
+
});
|
|
15
|
+
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
16
|
+
this.#$button = shadowRoot.querySelector('#button');
|
|
17
|
+
this.#$tooltip = shadowRoot.querySelector('#tooltip');
|
|
18
|
+
}
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
this.role = 'tab';
|
|
21
|
+
this.#$button.addEventListener('click', this.#onClick);
|
|
22
|
+
}
|
|
23
|
+
disconnectedCallback() {
|
|
24
|
+
this.#$button.removeEventListener('click', this.#onClick);
|
|
25
|
+
}
|
|
26
|
+
static get observedAttributes() {
|
|
27
|
+
return ['data-checked', 'disabled', 'aria-label'];
|
|
28
|
+
}
|
|
29
|
+
set value(value) {
|
|
30
|
+
(0, _utils.updateAttribute)(this, 'value', value);
|
|
31
|
+
}
|
|
32
|
+
get value() {
|
|
33
|
+
return (0, _utils.getAttribute)(this, 'value', '');
|
|
34
|
+
}
|
|
35
|
+
set disabled(isDisabled) {
|
|
36
|
+
(0, _utils.updateBooleanAttribute)(this, 'disabled', isDisabled);
|
|
37
|
+
}
|
|
38
|
+
get disabled() {
|
|
39
|
+
return (0, _utils.getBooleanAttribute)(this, 'disabled');
|
|
40
|
+
}
|
|
41
|
+
attributeChangedCallback(name, oldVal, newVal) {
|
|
42
|
+
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
switch (name) {
|
|
46
|
+
case 'data-checked':
|
|
47
|
+
{
|
|
48
|
+
(0, _utils.updateExplicitBooleanAttribute)(this, 'aria-selected', (0, _utils.isAttrTrue)(newVal));
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
case 'disabled':
|
|
52
|
+
{
|
|
53
|
+
const isDisabled = (0, _utils.isAttrTrue)(newVal);
|
|
54
|
+
this.#$button.disabled = isDisabled;
|
|
55
|
+
(0, _utils.updateBooleanAttribute)(this, name, isDisabled);
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
case 'aria-label':
|
|
59
|
+
{
|
|
60
|
+
(0, _utils.updateAttribute)(this.#$tooltip, 'text', newVal);
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
get focusable() {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
focus() {
|
|
69
|
+
this.#$button.focus();
|
|
70
|
+
}
|
|
71
|
+
blur() {
|
|
72
|
+
this.#$button.blur();
|
|
73
|
+
}
|
|
74
|
+
#onClick = e => {
|
|
75
|
+
e.stopPropagation();
|
|
76
|
+
this.dispatchEvent(new CustomEvent('option-change', {
|
|
77
|
+
bubbles: true,
|
|
78
|
+
detail: this.value
|
|
79
|
+
}));
|
|
80
|
+
};
|
|
81
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require('../text');
|
|
4
|
+
var _utils = require('../utils');
|
|
5
|
+
const templateHTML = '<style>:host{display:block}#button{all:initial;position:relative;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:12px 16px;box-sizing:border-box;cursor:pointer;background-color:var(--sinch-comp-tab-color-default-background-initial);border-top-left-radius:var(--sinch-comp-tab-shape-radius);border-top-right-radius:var(--sinch-comp-tab-shape-radius);height:39px;--sinch-global-color-text:var(--sinch-comp-tab-color-default-text-initial);--sinch-global-color-icon:var(--sinch-comp-tab-color-default-icon-initial);--sinch-global-size-icon:var(--sinch-comp-tab-size-icon)}#button:hover{background-color:var(--sinch-comp-tab-color-default-background-hover)}#button:focus-visible::after{content:"";position:absolute;inset:0;bottom:-3px;border:2px solid var(--sinch-comp-tab-color-default-outline-focus);border-top-left-radius:var(--sinch-comp-tab-shape-radius);border-top-right-radius:var(--sinch-comp-tab-shape-radius);pointer-events:none}#button:disabled{cursor:unset;pointer-events:none;--sinch-global-color-text:var(--sinch-comp-tab-color-disabled-text-initial);--sinch-global-color-icon:var(--sinch-comp-tab-color-disabled-icon-initial)}:host([data-checked]) #button{--sinch-global-color-text:var(--sinch-comp-tab-color-checked-text-initial);--sinch-global-color-icon:var(--sinch-comp-tab-color-checked-icon-initial)}:host([data-checked]) #button::before{content:"";position:absolute;left:0;right:0;bottom:-1px;pointer-events:none;border-top:2px solid var(--sinch-comp-tab-color-checked-border-initial)}#text{flex-shrink:1;flex-basis:auto;min-width:0;--sinch-comp-text-font:var(--sinch-comp-tab-font-label)}::slotted(*){display:block}</style><button id="button" tabindex="0"><slot name="icon"></slot><sinch-text id="text" type="m" ellipsis></sinch-text></button>';
|
|
6
|
+
const template = document.createElement('template');
|
|
7
|
+
template.innerHTML = templateHTML;
|
|
8
|
+
(0, _utils.defineCustomElement)('sinch-tabs-option', class extends _utils.NectaryElement {
|
|
9
|
+
#$button;
|
|
10
|
+
#$text;
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
const shadowRoot = this.attachShadow({
|
|
14
|
+
delegatesFocus: true
|
|
15
|
+
});
|
|
16
|
+
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
17
|
+
this.#$button = shadowRoot.querySelector('#button');
|
|
18
|
+
this.#$text = shadowRoot.querySelector('#text');
|
|
19
|
+
}
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
this.role = 'tab';
|
|
22
|
+
this.#$button.addEventListener('click', this.#onClick);
|
|
23
|
+
}
|
|
24
|
+
disconnectedCallback() {
|
|
25
|
+
this.#$button.removeEventListener('click', this.#onClick);
|
|
26
|
+
}
|
|
27
|
+
static get observedAttributes() {
|
|
28
|
+
return ['data-checked', 'disabled', 'text'];
|
|
29
|
+
}
|
|
30
|
+
attributeChangedCallback(name, oldVal, newVal) {
|
|
31
|
+
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
switch (name) {
|
|
35
|
+
case 'text':
|
|
36
|
+
{
|
|
37
|
+
this.#$text.textContent = newVal;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
case 'data-checked':
|
|
41
|
+
{
|
|
42
|
+
(0, _utils.updateExplicitBooleanAttribute)(this, 'aria-selected', (0, _utils.isAttrTrue)(newVal));
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
case 'disabled':
|
|
46
|
+
{
|
|
47
|
+
const isDisabled = (0, _utils.isAttrTrue)(newVal);
|
|
48
|
+
this.#$button.disabled = isDisabled;
|
|
49
|
+
(0, _utils.updateBooleanAttribute)(this, name, isDisabled);
|
|
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
|
+
#onClick = e => {
|
|
82
|
+
e.stopPropagation();
|
|
83
|
+
this.dispatchEvent(new CustomEvent('option-change', {
|
|
84
|
+
bubbles: true,
|
|
85
|
+
detail: this.value
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require('../text');
|
|
4
|
+
var _utils = require('../utils');
|
|
5
|
+
var _utils2 = require('./utils');
|
|
6
|
+
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{display:flex;flex-direction:row;align-items:center;gap:4px;width:100%;height:var(--sinch-comp-tag-size-container-m);padding:0 9px;border-radius:var(--sinch-comp-tag-shape-radius);background-color:var(--sinch-comp-tag-color-default-background);box-sizing:border-box;user-select:none;--sinch-global-color-text:var(--sinch-comp-tag-color-default-foreground);--sinch-global-color-icon:var(--sinch-comp-tag-color-default-foreground);--sinch-global-size-icon:var(--sinch-comp-tag-size-icon-m)}:host([small]) #wrapper{height:var(--sinch-comp-tag-size-container-s);padding:0 8px;--sinch-global-size-icon:var(--sinch-comp-tag-size-icon-s)}#text{flex:1;--sinch-comp-text-font:var(--sinch-comp-tag-font-size-m-label)}:host([small]) #text{--sinch-comp-text-font:var(--sinch-comp-tag-font-size-s-label)}::slotted(*){margin-left:-4px}</style><div id="wrapper"><slot name="icon"></slot><sinch-text id="text" type="s" ellipsis></sinch-text></div>';
|
|
7
|
+
const template = document.createElement('template');
|
|
8
|
+
template.innerHTML = templateHTML;
|
|
9
|
+
(0, _utils.defineCustomElement)('sinch-tag', class extends _utils.NectaryElement {
|
|
10
|
+
#$text;
|
|
11
|
+
#$wrapper;
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
const shadowRoot = this.attachShadow();
|
|
15
|
+
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
16
|
+
this.#$wrapper = shadowRoot.querySelector('#wrapper');
|
|
17
|
+
this.#$text = shadowRoot.querySelector('#text');
|
|
18
|
+
}
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
super.connectedCallback();
|
|
21
|
+
this.#updateColor();
|
|
22
|
+
}
|
|
23
|
+
disconnectedCallback() {
|
|
24
|
+
super.disconnectedCallback();
|
|
25
|
+
}
|
|
26
|
+
get color() {
|
|
27
|
+
return (0, _utils.getAttribute)(this, 'color');
|
|
28
|
+
}
|
|
29
|
+
set color(value) {
|
|
30
|
+
(0, _utils.updateAttribute)(this, 'color', value);
|
|
31
|
+
}
|
|
32
|
+
get text() {
|
|
33
|
+
return (0, _utils.getAttribute)(this, 'text', '');
|
|
34
|
+
}
|
|
35
|
+
set text(value) {
|
|
36
|
+
(0, _utils.updateAttribute)(this, 'text', value);
|
|
37
|
+
}
|
|
38
|
+
get small() {
|
|
39
|
+
return (0, _utils.getBooleanAttribute)(this, 'small');
|
|
40
|
+
}
|
|
41
|
+
set small(isSmall) {
|
|
42
|
+
(0, _utils.updateBooleanAttribute)(this, 'small', isSmall);
|
|
43
|
+
}
|
|
44
|
+
static get observedAttributes() {
|
|
45
|
+
return ['text', 'color', 'small'];
|
|
46
|
+
}
|
|
47
|
+
attributeChangedCallback(name, oldVal, newVal) {
|
|
48
|
+
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
switch (name) {
|
|
52
|
+
case 'color':
|
|
53
|
+
{
|
|
54
|
+
this.#updateColor();
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
case 'text':
|
|
58
|
+
{
|
|
59
|
+
this.#$text.textContent = newVal;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case 'small':
|
|
63
|
+
{
|
|
64
|
+
(0, _utils.updateBooleanAttribute)(this, name, (0, _utils.isAttrTrue)(newVal));
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
#updateColor() {
|
|
70
|
+
if (!this.isDomConnected) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const colorName = this.color;
|
|
74
|
+
if (colorName !== null && colorName.length > 0) {
|
|
75
|
+
const bg = (0, _utils2.getTagColorBg)(colorName);
|
|
76
|
+
const fg = (0, _utils2.getTagColorFg)(colorName);
|
|
77
|
+
this.#$wrapper.style.setProperty('background-color', bg);
|
|
78
|
+
this.#$wrapper.style.setProperty('--sinch-global-color-text', fg);
|
|
79
|
+
this.#$wrapper.style.setProperty('--sinch-global-color-icon', fg);
|
|
80
|
+
} else {
|
|
81
|
+
this.#$wrapper.style.removeProperty('background-color');
|
|
82
|
+
this.#$wrapper.style.removeProperty('--sinch-global-color-text');
|
|
83
|
+
this.#$wrapper.style.removeProperty('--sinch-global-color-icon');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTagColorFg = exports.getTagColorBg = void 0;
|
|
7
|
+
const getTagColorBg = id => {
|
|
8
|
+
return `var(--sinch-comp-tag-color-${id}-background)`;
|
|
9
|
+
};
|
|
10
|
+
exports.getTagColorBg = getTagColorBg;
|
|
11
|
+
const getTagColorFg = id => {
|
|
12
|
+
return `var(--sinch-comp-tag-color-${id}-foreground)`;
|
|
13
|
+
};
|
|
14
|
+
exports.getTagColorFg = getTagColorFg;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _utils = require('../utils');
|
|
4
|
+
var _utils2 = require('./utils');
|
|
5
|
+
const templateHTML = '<style>:host{text-align:var(--sinch-comp-text-align);display:block;font:var(--sinch-comp-text-font);color:var(--sinch-global-color-text,var(--sinch-sys-color-text-default));--sinch-comp-text-font:var(--sinch-sys-font-body-m);--sinch-comp-text-align:unset}:host([inline]){display:inline}:host([type="s"]){--sinch-comp-text-font:var(--sinch-sys-font-body-s)}:host([type=xs]){--sinch-comp-text-font:var(--sinch-sys-font-body-xs)}:host([type=xxs]){--sinch-comp-text-font:var(--sinch-sys-font-body-xxs)}:host([type="m"][emphasized]){--sinch-comp-text-font:var(--sinch-sys-font-body-emphasize)}:host([type="s"][emphasized]){--sinch-comp-text-font:var(--sinch-sys-font-body-emphasize-s)}:host([ellipsis]){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--sinch-global-text-white-space:nowrap}</style><slot></slot>';
|
|
6
|
+
const template = document.createElement('template');
|
|
7
|
+
template.innerHTML = templateHTML;
|
|
8
|
+
(0, _utils.defineCustomElement)('sinch-text', class extends _utils.NectaryElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
const shadowRoot = this.attachShadow();
|
|
12
|
+
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
13
|
+
}
|
|
14
|
+
connectedCallback() {
|
|
15
|
+
this.#updateRole();
|
|
16
|
+
}
|
|
17
|
+
static get observedAttributes() {
|
|
18
|
+
return ['inline', 'ellipsis', 'emphasized'];
|
|
19
|
+
}
|
|
20
|
+
attributeChangedCallback(name, oldVal, newVal) {
|
|
21
|
+
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
switch (name) {
|
|
25
|
+
case 'inline':
|
|
26
|
+
{
|
|
27
|
+
this.#updateRole();
|
|
28
|
+
(0, _utils.updateBooleanAttribute)(this, name, (0, _utils.isAttrTrue)(newVal));
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
case 'ellipsis':
|
|
32
|
+
case 'emphasized':
|
|
33
|
+
{
|
|
34
|
+
(0, _utils.updateBooleanAttribute)(this, name, (0, _utils.isAttrTrue)(newVal));
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
get type() {
|
|
40
|
+
return (0, _utils.getLiteralAttribute)(this, _utils2.typeValues, 'type');
|
|
41
|
+
}
|
|
42
|
+
set type(value) {
|
|
43
|
+
(0, _utils.updateLiteralAttribute)(this, _utils2.typeValues, 'type', value);
|
|
44
|
+
}
|
|
45
|
+
set inline(isInline) {
|
|
46
|
+
(0, _utils.updateBooleanAttribute)(this, 'inline', isInline);
|
|
47
|
+
}
|
|
48
|
+
get inline() {
|
|
49
|
+
return (0, _utils.getBooleanAttribute)(this, 'inline');
|
|
50
|
+
}
|
|
51
|
+
set ellipsis(isEllipsis) {
|
|
52
|
+
(0, _utils.updateBooleanAttribute)(this, 'ellipsis', isEllipsis);
|
|
53
|
+
}
|
|
54
|
+
get ellipsis() {
|
|
55
|
+
return (0, _utils.getBooleanAttribute)(this, 'ellipsis');
|
|
56
|
+
}
|
|
57
|
+
set emphasized(isEmphasized) {
|
|
58
|
+
(0, _utils.updateBooleanAttribute)(this, 'emphasized', isEmphasized);
|
|
59
|
+
}
|
|
60
|
+
get emphasized() {
|
|
61
|
+
return (0, _utils.getBooleanAttribute)(this, 'emphasized');
|
|
62
|
+
}
|
|
63
|
+
#updateRole() {
|
|
64
|
+
this.setAttribute('role', (0, _utils.getBooleanAttribute)(this, 'inline') ? 'text' : 'paragraph');
|
|
65
|
+
}
|
|
66
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _utils = require('../utils');
|
|
4
|
+
var _size = require('../utils/size');
|
|
5
|
+
const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-direction:column;position:relative;width:100%;box-sizing:border-box;background-color:var(--sinch-comp-textarea-color-default-background-initial);border-radius:var(--sinch-local-shape-radius);padding-right:2px;overflow:hidden;--sinch-local-shape-radius:var(--sinch-comp-textarea-shape-radius)}#input{all:initial;display:block;font:var(--sinch-comp-textarea-font-input);color:var(--sinch-comp-textarea-color-default-text-initial);resize:none;white-space:pre-wrap;overflow-wrap:break-word;padding:8px 10px 8px 12px;border:none;box-sizing:border-box}#input::placeholder{color:var(--sinch-comp-textarea-color-default-text-placeholder);opacity:1}#input:disabled{color:var(--sinch-comp-textarea-color-disabled-text-initial);-webkit-text-fill-color:var(--sinch-comp-textarea-color-disabled-text-initial)}#border{position:absolute;border:1px solid var(--sinch-comp-textarea-color-default-border-initial);border-radius:var(--sinch-local-shape-radius);inset:0;pointer-events:none}:host([invalid]) #border{border-color:var(--sinch-comp-textarea-color-invalid-border-initial)}#input:focus+#border{border-color:var(--sinch-comp-textarea-color-default-border-focus);border-width:2px}#input:disabled+#border{border-color:var(--sinch-comp-textarea-color-disabled-border-initial)}#bottom{display:flex;flex-direction:row;align-items:center;gap:8px;padding:12px 4px 4px}#bottom.empty{display:none}#resize-handle{display:none;position:absolute;width:20px;height:20px;bottom:36px;right:0;cursor:ns-resize}:host([resizable]) #resize-handle{display:block}#bottom.empty+#resize-handle{bottom:0}#resize-icon{display:block;pointer-events:none;fill:var(--sinch-comp-textarea-color-default-border-initial)}</style><div id="wrapper"><textarea id="input"></textarea><div id="border"></div><div id="bottom"><slot name="bottom"></slot></div><div id="resize-handle"><svg id="resize-icon" width="16" height="16"><path d="m14.833 4.724-9.61 9.61-.942-.944 9.61-9.609.942.943ZM15.443 10 10.5 14.943 9.557 14 14.5 9.057l.943.943Z"/></svg></div></div>';
|
|
6
|
+
const template = document.createElement('template');
|
|
7
|
+
template.innerHTML = templateHTML;
|
|
8
|
+
(0, _utils.defineCustomElement)('sinch-textarea', class extends _utils.NectaryElement {
|
|
9
|
+
#$input;
|
|
10
|
+
#$bottomSlot;
|
|
11
|
+
#$bottomWrapper;
|
|
12
|
+
#$resizeHandle;
|
|
13
|
+
#cursorPos = null;
|
|
14
|
+
#isPendingDk = false;
|
|
15
|
+
#controller = null;
|
|
16
|
+
#sizeContext;
|
|
17
|
+
#prevContentHeight = 0;
|
|
18
|
+
#dragStartY = 0;
|
|
19
|
+
#intersectionObserver = null;
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
const shadowRoot = this.attachShadow({
|
|
23
|
+
delegatesFocus: true
|
|
24
|
+
});
|
|
25
|
+
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
26
|
+
this.#$input = shadowRoot.querySelector('#input');
|
|
27
|
+
this.#$bottomSlot = shadowRoot.querySelector('slot[name="bottom"]');
|
|
28
|
+
this.#$bottomWrapper = shadowRoot.querySelector('#bottom');
|
|
29
|
+
this.#$resizeHandle = shadowRoot.querySelector('#resize-handle');
|
|
30
|
+
this.#sizeContext = new _utils.Context(this.#$bottomWrapper, 'size');
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
this.#controller = new AbortController();
|
|
35
|
+
const options = {
|
|
36
|
+
signal: this.#controller.signal
|
|
37
|
+
};
|
|
38
|
+
this.role = 'textbox';
|
|
39
|
+
this.ariaMultiLine = 'true';
|
|
40
|
+
this.#$input.addEventListener('input', this.#onInput, options);
|
|
41
|
+
this.#$input.addEventListener('compositionstart', this.#onCompositionStart, options);
|
|
42
|
+
this.#$input.addEventListener('mousedown', this.#onSelectionChange, options);
|
|
43
|
+
this.#$input.addEventListener('keydown', this.#onSelectionChange, options);
|
|
44
|
+
this.#$input.addEventListener('focus', this.#onInputFocus, options);
|
|
45
|
+
this.#$input.addEventListener('blur', this.#onInputBlur, options);
|
|
46
|
+
this.#$resizeHandle.addEventListener('mousedown', this.#onDragStart, options);
|
|
47
|
+
this.#$bottomSlot.addEventListener('slotchange', this.#onBottomSlotChange, options);
|
|
48
|
+
this.addEventListener('-change', this.#onChangeReactHandler, options);
|
|
49
|
+
this.addEventListener('-focus', this.#onFocusReactHandler, options);
|
|
50
|
+
this.addEventListener('-blur', this.#onBlurReactHandler, options);
|
|
51
|
+
this.#sizeContext.listen(this.#controller.signal);
|
|
52
|
+
this.#onBottomSlotChange();
|
|
53
|
+
this.#updateMinRows();
|
|
54
|
+
this.#onSizeUpdate();
|
|
55
|
+
}
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
super.disconnectedCallback();
|
|
58
|
+
this.#controller.abort();
|
|
59
|
+
this.#controller = null;
|
|
60
|
+
if (this.#intersectionObserver !== null) {
|
|
61
|
+
this.#intersectionObserver.disconnect();
|
|
62
|
+
this.#intersectionObserver = null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
static get observedAttributes() {
|
|
66
|
+
return ['value', 'placeholder', 'invalid', 'disabled', 'rows', 'minrows', 'resizable'];
|
|
67
|
+
}
|
|
68
|
+
attributeChangedCallback(name, oldVal, newVal) {
|
|
69
|
+
switch (name) {
|
|
70
|
+
case 'value':
|
|
71
|
+
{
|
|
72
|
+
const nextVal = newVal ?? '';
|
|
73
|
+
const prevVal = this.#$input.value;
|
|
74
|
+
if (nextVal !== prevVal) {
|
|
75
|
+
const prevCursorPos = this.#$input.selectionEnd;
|
|
76
|
+
const isPrevCursorEnd = prevCursorPos === prevVal.length;
|
|
77
|
+
const isShrinkingContent = nextVal.length < prevVal.length;
|
|
78
|
+
this.#$input.value = nextVal;
|
|
79
|
+
if (!this.resizable) {
|
|
80
|
+
if (isShrinkingContent) {
|
|
81
|
+
this.#$input.style.removeProperty('height');
|
|
82
|
+
}
|
|
83
|
+
const nextContentHeight = this.#$input.scrollHeight;
|
|
84
|
+
if (isShrinkingContent || nextContentHeight !== this.#prevContentHeight) {
|
|
85
|
+
this.#prevContentHeight = nextContentHeight;
|
|
86
|
+
this.#$input.style.setProperty('height', `${this.#prevContentHeight}px`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (!isPrevCursorEnd) {
|
|
90
|
+
this.#$input.setSelectionRange(this.#cursorPos, this.#cursorPos);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case 'placeholder':
|
|
96
|
+
{
|
|
97
|
+
this.#$input.placeholder = newVal ?? '';
|
|
98
|
+
(0, _utils.updateAttribute)(this, 'aria-placeholder', newVal);
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
case 'invalid':
|
|
102
|
+
{
|
|
103
|
+
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
const isInvalid = (0, _utils.isAttrTrue)(newVal);
|
|
107
|
+
this.ariaInvalid = isInvalid.toString();
|
|
108
|
+
(0, _utils.updateBooleanAttribute)(this, 'invalid', isInvalid);
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
case 'disabled':
|
|
112
|
+
{
|
|
113
|
+
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
const isDisabled = (0, _utils.isAttrTrue)(newVal);
|
|
117
|
+
this.#$input.disabled = isDisabled;
|
|
118
|
+
(0, _utils.updateBooleanAttribute)(this, 'disabled', isDisabled);
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
case 'rows':
|
|
122
|
+
{
|
|
123
|
+
(0, _utils.updateAttribute)(this.#$input, 'rows', newVal);
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
case 'minrows':
|
|
127
|
+
{
|
|
128
|
+
this.#updateMinRows();
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case 'resizable':
|
|
132
|
+
{
|
|
133
|
+
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
(0, _utils.updateBooleanAttribute)(this, name, (0, _utils.isAttrTrue)(newVal));
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
set value(value) {
|
|
142
|
+
(0, _utils.updateAttribute)(this, 'value', value);
|
|
143
|
+
}
|
|
144
|
+
get value() {
|
|
145
|
+
return (0, _utils.getAttribute)(this, 'value', '');
|
|
146
|
+
}
|
|
147
|
+
set placeholder(value) {
|
|
148
|
+
(0, _utils.updateAttribute)(this, 'placeholder', value);
|
|
149
|
+
}
|
|
150
|
+
get placeholder() {
|
|
151
|
+
return (0, _utils.getAttribute)(this, 'placeholder');
|
|
152
|
+
}
|
|
153
|
+
set invalid(value) {
|
|
154
|
+
(0, _utils.updateBooleanAttribute)(this, 'invalid', value);
|
|
155
|
+
}
|
|
156
|
+
get invalid() {
|
|
157
|
+
return (0, _utils.getBooleanAttribute)(this, 'invalid');
|
|
158
|
+
}
|
|
159
|
+
set disabled(isDisabled) {
|
|
160
|
+
(0, _utils.updateBooleanAttribute)(this, 'disabled', isDisabled);
|
|
161
|
+
}
|
|
162
|
+
get disabled() {
|
|
163
|
+
return (0, _utils.getBooleanAttribute)(this, 'disabled');
|
|
164
|
+
}
|
|
165
|
+
set resizable(isResizable) {
|
|
166
|
+
(0, _utils.updateBooleanAttribute)(this, 'resizable', isResizable);
|
|
167
|
+
}
|
|
168
|
+
get resizable() {
|
|
169
|
+
return (0, _utils.getBooleanAttribute)(this, 'resizable');
|
|
170
|
+
}
|
|
171
|
+
set rows(value) {
|
|
172
|
+
(0, _utils.updateAttribute)(this, 'rows', value);
|
|
173
|
+
}
|
|
174
|
+
get rows() {
|
|
175
|
+
return (0, _utils.getIntegerAttribute)(this, 'rows', 0);
|
|
176
|
+
}
|
|
177
|
+
set minRows(value) {
|
|
178
|
+
(0, _utils.updateAttribute)(this, 'minrows', value);
|
|
179
|
+
}
|
|
180
|
+
get minRows() {
|
|
181
|
+
return (0, _utils.getIntegerAttribute)(this, 'minrows', 0);
|
|
182
|
+
}
|
|
183
|
+
get selectionStart() {
|
|
184
|
+
return this.#$input.selectionStart;
|
|
185
|
+
}
|
|
186
|
+
set selectionStart(value) {
|
|
187
|
+
this.#$input.selectionStart = value;
|
|
188
|
+
}
|
|
189
|
+
get selectionEnd() {
|
|
190
|
+
return this.#$input.selectionEnd;
|
|
191
|
+
}
|
|
192
|
+
set selectionEnd(value) {
|
|
193
|
+
this.#$input.selectionEnd = value;
|
|
194
|
+
}
|
|
195
|
+
get selectionDirection() {
|
|
196
|
+
return this.#$input.selectionDirection;
|
|
197
|
+
}
|
|
198
|
+
set selectionDirection(value) {
|
|
199
|
+
this.#$input.selectionDirection = value;
|
|
200
|
+
}
|
|
201
|
+
get focusable() {
|
|
202
|
+
return true;
|
|
203
|
+
}
|
|
204
|
+
focus() {
|
|
205
|
+
this.#$input.focus();
|
|
206
|
+
}
|
|
207
|
+
blur() {
|
|
208
|
+
this.#$input.blur();
|
|
209
|
+
}
|
|
210
|
+
#updateMinRows() {
|
|
211
|
+
const minRows = this.minRows;
|
|
212
|
+
if (minRows <= 0) {
|
|
213
|
+
this.#$input.style.removeProperty('min-height');
|
|
214
|
+
if (this.#intersectionObserver !== null) {
|
|
215
|
+
this.#intersectionObserver.disconnect();
|
|
216
|
+
this.#intersectionObserver = null;
|
|
217
|
+
}
|
|
218
|
+
} else {
|
|
219
|
+
if (this.isDomConnected) {
|
|
220
|
+
this.#calcMinRows();
|
|
221
|
+
}
|
|
222
|
+
if (this.#intersectionObserver === null) {
|
|
223
|
+
this.#intersectionObserver = new IntersectionObserver(this.#intersectionObserverCallback, {
|
|
224
|
+
root: null
|
|
225
|
+
});
|
|
226
|
+
this.#intersectionObserver.observe(this.#$input);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
#intersectionObserverCallback = _ref => {
|
|
231
|
+
let [entry] = _ref;
|
|
232
|
+
if (entry != null && entry.isIntersecting) {
|
|
233
|
+
this.#calcMinRows();
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
#calcMinRows() {
|
|
237
|
+
this.#$input.rows = this.minRows;
|
|
238
|
+
this.#$input.style.setProperty('min-height', `${(0, _utils.getRect)(this.#$input).height}px`);
|
|
239
|
+
this.#$input.rows = this.rows;
|
|
240
|
+
}
|
|
241
|
+
#onCompositionStart = () => {
|
|
242
|
+
this.#isPendingDk = true;
|
|
243
|
+
};
|
|
244
|
+
#onSelectionChange = () => {
|
|
245
|
+
this.#cursorPos = this.#$input.selectionEnd;
|
|
246
|
+
};
|
|
247
|
+
#onInput = e => {
|
|
248
|
+
e.stopPropagation();
|
|
249
|
+
const nextValue = this.#$input.value;
|
|
250
|
+
const prevValue = this.value;
|
|
251
|
+
if (prevValue !== nextValue) {
|
|
252
|
+
const nextCursorPos = this.#$input.selectionEnd;
|
|
253
|
+
if (!this.#isPendingDk) {
|
|
254
|
+
this.#$input.value = prevValue;
|
|
255
|
+
const prevCursorPos = this.#cursorPos;
|
|
256
|
+
const isPrevCursorEnd = prevCursorPos === null || prevCursorPos === prevValue.length;
|
|
257
|
+
if (!isPrevCursorEnd) {
|
|
258
|
+
this.#$input.setSelectionRange(prevCursorPos, prevCursorPos);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
this.#isPendingDk = false;
|
|
262
|
+
this.#cursorPos = nextCursorPos;
|
|
263
|
+
this.dispatchEvent(new CustomEvent('-change', {
|
|
264
|
+
detail: nextValue
|
|
265
|
+
}));
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
#onDragStart = e => {
|
|
269
|
+
if (this.#dragStartY !== 0) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
this.#dragStartY = e.clientY;
|
|
273
|
+
this.#prevContentHeight = (0, _utils.getRect)(this.#$input).height;
|
|
274
|
+
window.addEventListener('mousemove', this.#onDragResize, {
|
|
275
|
+
signal: this.#controller.signal,
|
|
276
|
+
capture: true
|
|
277
|
+
});
|
|
278
|
+
window.addEventListener('mouseup', this.#onDragEnd, {
|
|
279
|
+
signal: this.#controller.signal,
|
|
280
|
+
capture: true
|
|
281
|
+
});
|
|
282
|
+
};
|
|
283
|
+
#onDragResize = e => {
|
|
284
|
+
const dy = e.clientY - this.#dragStartY;
|
|
285
|
+
const height = Math.round(Math.max(0, this.#prevContentHeight + dy));
|
|
286
|
+
this.#$input.style.setProperty('height', `${height}px`);
|
|
287
|
+
};
|
|
288
|
+
#onDragEnd = () => {
|
|
289
|
+
window.removeEventListener('mousemove', this.#onDragResize, {
|
|
290
|
+
capture: true
|
|
291
|
+
});
|
|
292
|
+
window.removeEventListener('mouseup', this.#onDragEnd, {
|
|
293
|
+
capture: true
|
|
294
|
+
});
|
|
295
|
+
this.#dragStartY = 0;
|
|
296
|
+
this.#prevContentHeight = 0;
|
|
297
|
+
};
|
|
298
|
+
#onInputFocus = () => {
|
|
299
|
+
this.dispatchEvent(new CustomEvent('-focus'));
|
|
300
|
+
};
|
|
301
|
+
#onInputBlur = () => {
|
|
302
|
+
this.dispatchEvent(new CustomEvent('-blur'));
|
|
303
|
+
};
|
|
304
|
+
#onBottomSlotChange = () => {
|
|
305
|
+
const isEmpty = this.#$bottomSlot.assignedElements().length === 0;
|
|
306
|
+
(0, _utils.setClass)(this.#$bottomWrapper, 'empty', isEmpty);
|
|
307
|
+
};
|
|
308
|
+
#onSizeUpdate() {
|
|
309
|
+
if (!this.isDomConnected) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
const size = this.getAttribute('data-size') ?? _size.DEFAULT_SIZE;
|
|
313
|
+
this.#sizeContext.dispatch(size);
|
|
314
|
+
}
|
|
315
|
+
#onChangeReactHandler = e => {
|
|
316
|
+
(0, _utils.getReactEventHandler)(this, 'on-change')?.(e);
|
|
317
|
+
};
|
|
318
|
+
#onFocusReactHandler = () => {
|
|
319
|
+
(0, _utils.getReactEventHandler)(this, 'on-focus')?.();
|
|
320
|
+
};
|
|
321
|
+
#onBlurReactHandler = () => {
|
|
322
|
+
(0, _utils.getReactEventHandler)(this, 'on-blur')?.();
|
|
323
|
+
};
|
|
324
|
+
});
|