@nectary/components 2.12.0 → 2.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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/index.js +83 -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/inline-alert/index.js +0 -83
- 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}/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,644 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _utils = require('../utils');
|
|
4
|
+
var _size = require('../utils/size');
|
|
5
|
+
var _utils2 = require('./utils');
|
|
6
|
+
const templateHTML = '<style>:host{all:initial;display:inline-block;vertical-align:middle}#wrapper{position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;border-radius:var(--sinch-local-shape-radius);width:100%;height:var(--sinch-local-size);background-color:var(--sinch-comp-input-color-default-background-initial);--sinch-local-size:var(--sinch-comp-input-size-container-m);--sinch-global-size-icon:var(--sinch-comp-input-size-icon-m);--sinch-local-shape-radius:var(--sinch-comp-input-shape-radius-size-m)}:host([data-size="l"])>#wrapper{--sinch-local-size:var(--sinch-comp-input-size-container-l);--sinch-global-size-icon:var(--sinch-comp-input-size-icon-l);--sinch-local-shape-radius:var(--sinch-comp-input-shape-radius-size-l)}:host([data-size="m"])>#wrapper{--sinch-local-size:var(--sinch-comp-input-size-container-m);--sinch-global-size-icon:var(--sinch-comp-input-size-icon-m);--sinch-local-shape-radius:var(--sinch-comp-input-shape-radius-size-m)}:host([data-size="s"])>#wrapper{--sinch-local-size:var(--sinch-comp-input-size-container-s);--sinch-global-size-icon:var(--sinch-comp-input-size-icon-s);--sinch-local-shape-radius:var(--sinch-comp-input-shape-radius-size-s)}#input-wrapper{position:relative;flex:1;flex-basis:0;min-width:0;align-self:stretch}#input{all:initial;width:100%;height:100%;padding:0 12px;box-sizing:border-box;font:var(--sinch-comp-input-font-input);color:var(--sinch-comp-input-color-default-text-initial)}#input::placeholder{font:var(--sinch-comp-input-font-placeholder)!important;color:var(--sinch-comp-input-color-default-text-placeholder);opacity:1}#input:disabled{color:var(--sinch-comp-input-color-disabled-text-initial);-webkit-text-fill-color:var(--sinch-comp-input-color-disabled-text-initial)}#input-mask{display:none;position:absolute;inset:0;padding:0 12px;pointer-events:none;color:var(--sinch-comp-input-color-default-text-placeholder);white-space:pre;height:fit-content;margin:auto 0;overflow:hidden}#border{position:absolute;border:1px solid var(--sinch-comp-input-color-default-border-initial);border-radius:var(--sinch-local-shape-radius);inset:0;pointer-events:none}:host([disabled]) #border{border-color:var(--sinch-comp-input-color-disabled-border-initial)}#input-wrapper:focus-within+#border{border-color:var(--sinch-comp-input-color-default-border-focus);border-width:2px}#input-mask,:host([mask]) #input{font:var(--sinch-sys-font-body-monospace-m)}:host([mask]) #input-mask{display:block}:host([invalid]:not([disabled])) #input-wrapper:not(:focus-within)+#border{border-color:var(--sinch-comp-input-color-invalid-border-initial)}#input[type=password]:not(:placeholder-shown){font-size:1.5em;letter-spacing:.1em}#icon-wrapper{position:relative;height:100%}#icon{position:absolute;display:flex;align-items:center;left:12px;top:0;bottom:0;pointer-events:none;--sinch-global-color-icon:var(--sinch-comp-input-color-default-icon-initial)}:host([disabled]) #icon{--sinch-global-color-icon:var(--sinch-comp-input-color-disabled-icon-initial)}#icon-wrapper.empty{display:none}#icon-wrapper.empty~#input-wrapper>#input,#icon-wrapper.empty~#input-wrapper>#input-mask{padding-left:12px}#icon-wrapper:not(.empty)~#input-wrapper>#input,#icon-wrapper:not(.empty)~#input-wrapper>#input-mask{padding-left:calc(var(--sinch-global-size-icon) + 20px)}#right{display:flex;flex-direction:row;align-self:stretch;align-items:center;gap:4px;padding-right:4px}#right.empty{display:none}#left{display:flex;flex-direction:row;align-self:stretch;align-items:center;gap:4px;padding-left:4px}#left.empty{display:none}</style><div id="wrapper"><div id="left"><slot name="left"></slot></div><div id="icon-wrapper"><div id="icon"><slot name="icon"></slot></div></div><div id="input-wrapper"><div id="input-mask"></div><input id="input" type="text"/></div><div id="border"></div><div id="right"><slot name="right"></slot></div></div>';
|
|
7
|
+
const template = document.createElement('template');
|
|
8
|
+
template.innerHTML = templateHTML;
|
|
9
|
+
(0, _utils.defineCustomElement)('sinch-input', class extends _utils.NectaryElement {
|
|
10
|
+
#$input;
|
|
11
|
+
#$inputMask;
|
|
12
|
+
#$iconSlot;
|
|
13
|
+
#$iconWrapper;
|
|
14
|
+
#$rightSlot;
|
|
15
|
+
#$rightWrapper;
|
|
16
|
+
#$leftSlot;
|
|
17
|
+
#$leftWrapper;
|
|
18
|
+
#$wrapper;
|
|
19
|
+
#selectionStart = 0;
|
|
20
|
+
#selectionEnd = 0;
|
|
21
|
+
#isCompositionInProgress = false;
|
|
22
|
+
#compositionBeginValue = '';
|
|
23
|
+
#wasClearedByMask = false;
|
|
24
|
+
#controller = null;
|
|
25
|
+
#sizeContext;
|
|
26
|
+
#maskSymbols = null;
|
|
27
|
+
constructor() {
|
|
28
|
+
super();
|
|
29
|
+
const shadowRoot = this.attachShadow({
|
|
30
|
+
delegatesFocus: true
|
|
31
|
+
});
|
|
32
|
+
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
33
|
+
this.#$input = shadowRoot.querySelector('#input');
|
|
34
|
+
this.#$inputMask = shadowRoot.querySelector('#input-mask');
|
|
35
|
+
this.#$iconSlot = shadowRoot.querySelector('slot[name="icon"]');
|
|
36
|
+
this.#$iconWrapper = shadowRoot.querySelector('#icon-wrapper');
|
|
37
|
+
this.#$rightSlot = shadowRoot.querySelector('slot[name="right"]');
|
|
38
|
+
this.#$rightWrapper = shadowRoot.querySelector('#right');
|
|
39
|
+
this.#$leftSlot = shadowRoot.querySelector('slot[name="left"]');
|
|
40
|
+
this.#$leftWrapper = shadowRoot.querySelector('#left');
|
|
41
|
+
this.#$wrapper = shadowRoot.querySelector('#wrapper');
|
|
42
|
+
this.#sizeContext = new _utils.Context(this.#$wrapper, 'size');
|
|
43
|
+
this.#controller = new AbortController();
|
|
44
|
+
}
|
|
45
|
+
connectedCallback() {
|
|
46
|
+
super.connectedCallback();
|
|
47
|
+
this.role = 'textbox';
|
|
48
|
+
if (this.#controller === null) {
|
|
49
|
+
this.#controller = new AbortController();
|
|
50
|
+
}
|
|
51
|
+
const options = {
|
|
52
|
+
signal: this.#controller.signal
|
|
53
|
+
};
|
|
54
|
+
this.#$input.addEventListener('input', this.#onInput, options);
|
|
55
|
+
this.#$input.addEventListener('cut', this.#onCut, options);
|
|
56
|
+
this.#$input.addEventListener('copy', this.#onCopy, options);
|
|
57
|
+
this.#$input.addEventListener('paste', this.#onPaste, options);
|
|
58
|
+
this.#$input.addEventListener('compositionstart', this.#onCompositionStart, options);
|
|
59
|
+
this.#$input.addEventListener('compositionend', this.#onCompositionEnd, options);
|
|
60
|
+
this.#$input.addEventListener('focus', this.#onInputFocus, options);
|
|
61
|
+
this.#$input.addEventListener('blur', this.#onInputBlur, options);
|
|
62
|
+
this.#$iconSlot.addEventListener('slotchange', this.#onIconSlotChange, options);
|
|
63
|
+
this.#$leftSlot.addEventListener('slotchange', this.#onLeftSlotChange, options);
|
|
64
|
+
this.#$rightSlot.addEventListener('slotchange', this.#onRightSlotChange, options);
|
|
65
|
+
this.addEventListener('-change', this.#onChangeReactHandler, options);
|
|
66
|
+
this.addEventListener('-focus', this.#onFocusReactHandler, options);
|
|
67
|
+
this.addEventListener('-blur', this.#onBlurReactHandler, options);
|
|
68
|
+
this.addEventListener('-copy', this.#onCopyReactHandler, options);
|
|
69
|
+
this.addEventListener('-cut', this.#onCutReactHandler, options);
|
|
70
|
+
this.addEventListener('-paste', this.#onPasteReactHandler, options);
|
|
71
|
+
this.#sizeContext.listen(this.#controller.signal);
|
|
72
|
+
(0, _utils.subscribeContext)(this, 'size', this.#onContextSize, this.#controller.signal);
|
|
73
|
+
this.#onIconSlotChange();
|
|
74
|
+
this.#onLeftSlotChange();
|
|
75
|
+
this.#onRightSlotChange();
|
|
76
|
+
this.#onSizeUpdate();
|
|
77
|
+
}
|
|
78
|
+
disconnectedCallback() {
|
|
79
|
+
super.disconnectedCallback();
|
|
80
|
+
this.#controller.abort();
|
|
81
|
+
this.#controller = null;
|
|
82
|
+
}
|
|
83
|
+
static get observedAttributes() {
|
|
84
|
+
return ['type', 'value', 'placeholder', 'mask', 'invalid', 'disabled', 'size', 'autocomplete', 'autofocus', 'data-size', 'aria-label'];
|
|
85
|
+
}
|
|
86
|
+
attributeChangedCallback(name, oldVal, newVal) {
|
|
87
|
+
switch (name) {
|
|
88
|
+
case 'type':
|
|
89
|
+
{
|
|
90
|
+
(0, _utils.updateLiteralAttribute)(this.#$input, _utils2.inputTypes, 'type', newVal);
|
|
91
|
+
(0, _utils.updateAttribute)(this.#$input, 'spellcheck', newVal === 'password' ? 'false' : null);
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
case 'value':
|
|
95
|
+
{
|
|
96
|
+
const nextVal = newVal ?? '';
|
|
97
|
+
const prevVal = this.#$input.value;
|
|
98
|
+
if (this.#wasClearedByMask) {
|
|
99
|
+
this.#wasClearedByMask = false;
|
|
100
|
+
if (nextVal.length === 0) {
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (this.#maskSymbols !== null) {
|
|
105
|
+
const {
|
|
106
|
+
value,
|
|
107
|
+
placeholder
|
|
108
|
+
} = (0, _utils2.splitValueAndMask)(nextVal, this.#maskSymbols);
|
|
109
|
+
this.#$input.value = value;
|
|
110
|
+
this.#$inputMask.textContent = placeholder;
|
|
111
|
+
if ((0, _utils.isElementFocused)(this.#$input)) {
|
|
112
|
+
this.#setSelectionRange(this.#selectionEnd, this.#selectionEnd);
|
|
113
|
+
}
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
if (nextVal !== prevVal) {
|
|
117
|
+
this.#$input.value = nextVal;
|
|
118
|
+
if ((0, _utils.isElementFocused)(this.#$input)) {
|
|
119
|
+
this.#setSelectionRange(this.#selectionEnd, this.#selectionEnd);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
case 'placeholder':
|
|
125
|
+
{
|
|
126
|
+
this.#updatePlaceholder();
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
case 'mask':
|
|
130
|
+
{
|
|
131
|
+
this.#updateMask();
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
case 'invalid':
|
|
135
|
+
{
|
|
136
|
+
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const isInvalid = (0, _utils.isAttrTrue)(newVal);
|
|
140
|
+
this.ariaInvalid = isInvalid.toString();
|
|
141
|
+
this.#$input.ariaInvalid = this.ariaInvalid;
|
|
142
|
+
(0, _utils.updateBooleanAttribute)(this, name, isInvalid);
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
case 'disabled':
|
|
146
|
+
{
|
|
147
|
+
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const isDisabled = (0, _utils.isAttrTrue)(newVal);
|
|
151
|
+
this.#$input.disabled = isDisabled;
|
|
152
|
+
(0, _utils.updateBooleanAttribute)(this, name, isDisabled);
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
case 'autofocus':
|
|
156
|
+
{
|
|
157
|
+
if ((0, _utils.isAttrEqual)(oldVal, newVal)) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const isAutofocus = (0, _utils.isAttrTrue)(newVal);
|
|
161
|
+
this.#$input.autofocus = isAutofocus;
|
|
162
|
+
(0, _utils.updateBooleanAttribute)(this, name, isAutofocus);
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
case 'size':
|
|
166
|
+
{
|
|
167
|
+
(0, _utils.updateAttribute)(this, 'data-size', newVal);
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
case 'data-size':
|
|
171
|
+
{
|
|
172
|
+
this.#onSizeUpdate();
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
case 'autocomplete':
|
|
176
|
+
{
|
|
177
|
+
(0, _utils.updateAttribute)(this.#$input, name, newVal);
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
case 'aria-label':
|
|
181
|
+
{
|
|
182
|
+
this.#$input.ariaLabel = newVal;
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
set type(value) {
|
|
188
|
+
(0, _utils.updateAttribute)(this, 'type', value);
|
|
189
|
+
}
|
|
190
|
+
get type() {
|
|
191
|
+
return (0, _utils.getLiteralAttribute)(this, _utils2.inputTypes, 'type', 'text');
|
|
192
|
+
}
|
|
193
|
+
set value(value) {
|
|
194
|
+
(0, _utils.updateAttribute)(this, 'value', value);
|
|
195
|
+
}
|
|
196
|
+
get value() {
|
|
197
|
+
return (0, _utils.getAttribute)(this, 'value', '');
|
|
198
|
+
}
|
|
199
|
+
set mask(value) {
|
|
200
|
+
(0, _utils.updateAttribute)(this, 'mask', value);
|
|
201
|
+
}
|
|
202
|
+
get mask() {
|
|
203
|
+
return (0, _utils.getAttribute)(this, 'mask');
|
|
204
|
+
}
|
|
205
|
+
set placeholder(value) {
|
|
206
|
+
(0, _utils.updateAttribute)(this, 'placeholder', value);
|
|
207
|
+
}
|
|
208
|
+
get placeholder() {
|
|
209
|
+
return (0, _utils.getAttribute)(this, 'placeholder');
|
|
210
|
+
}
|
|
211
|
+
set invalid(isInvalid) {
|
|
212
|
+
(0, _utils.updateBooleanAttribute)(this, 'invalid', isInvalid);
|
|
213
|
+
}
|
|
214
|
+
get invalid() {
|
|
215
|
+
return (0, _utils.getBooleanAttribute)(this, 'invalid');
|
|
216
|
+
}
|
|
217
|
+
set disabled(isDisabled) {
|
|
218
|
+
(0, _utils.updateBooleanAttribute)(this, 'disabled', isDisabled);
|
|
219
|
+
}
|
|
220
|
+
get disabled() {
|
|
221
|
+
return (0, _utils.getBooleanAttribute)(this, 'disabled');
|
|
222
|
+
}
|
|
223
|
+
set autofocus(isAutofocus) {
|
|
224
|
+
(0, _utils.updateBooleanAttribute)(this, 'autofocus', isAutofocus);
|
|
225
|
+
}
|
|
226
|
+
get autofocus() {
|
|
227
|
+
return (0, _utils.getBooleanAttribute)(this, 'autofocus');
|
|
228
|
+
}
|
|
229
|
+
set size(size) {
|
|
230
|
+
(0, _utils.updateLiteralAttribute)(this, _size.sizeValues, 'size', size);
|
|
231
|
+
}
|
|
232
|
+
get size() {
|
|
233
|
+
return (0, _utils.getLiteralAttribute)(this, _size.sizeValues, 'size', _size.DEFAULT_SIZE);
|
|
234
|
+
}
|
|
235
|
+
set autocomplete(value) {
|
|
236
|
+
(0, _utils.updateAttribute)(this, 'autocomplete', value);
|
|
237
|
+
}
|
|
238
|
+
get autocomplete() {
|
|
239
|
+
return (0, _utils.getAttribute)(this, 'autocomplete', '');
|
|
240
|
+
}
|
|
241
|
+
get selectionStart() {
|
|
242
|
+
return this.#$input.selectionStart;
|
|
243
|
+
}
|
|
244
|
+
set selectionStart(value) {
|
|
245
|
+
this.#$input.selectionStart = value;
|
|
246
|
+
}
|
|
247
|
+
get selectionEnd() {
|
|
248
|
+
return this.#$input.selectionEnd;
|
|
249
|
+
}
|
|
250
|
+
set selectionEnd(value) {
|
|
251
|
+
this.#$input.selectionEnd = value;
|
|
252
|
+
}
|
|
253
|
+
get selectionDirection() {
|
|
254
|
+
return this.#$input.selectionDirection;
|
|
255
|
+
}
|
|
256
|
+
set selectionDirection(value) {
|
|
257
|
+
this.#$input.selectionDirection = value;
|
|
258
|
+
}
|
|
259
|
+
setSelectionRange(selectionStart, selectionEnd) {
|
|
260
|
+
this.#setSelectionRange(selectionStart, selectionEnd);
|
|
261
|
+
}
|
|
262
|
+
get focusable() {
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
focus() {
|
|
266
|
+
this.#$input.focus();
|
|
267
|
+
}
|
|
268
|
+
blur() {
|
|
269
|
+
this.#$input.blur();
|
|
270
|
+
}
|
|
271
|
+
#setSelectionRange = (start, end, direction) => {
|
|
272
|
+
if (this.type !== 'number') {
|
|
273
|
+
this.#$input.setSelectionRange(start, end, direction);
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
#onCompositionStart = () => {
|
|
277
|
+
this.#isCompositionInProgress = true;
|
|
278
|
+
if (this.#maskSymbols !== null) {
|
|
279
|
+
const selectionStart = this.#$input.selectionStart;
|
|
280
|
+
this.#compositionBeginValue = this.#$input.value;
|
|
281
|
+
if (selectionStart === this.#$input.value.length) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
const {
|
|
285
|
+
value,
|
|
286
|
+
placeholder
|
|
287
|
+
} = (0, _utils2.beginMaskedComposition)(this.#$input.value, this.#maskSymbols, selectionStart);
|
|
288
|
+
this.#$input.value = value;
|
|
289
|
+
this.#setSelectionRange(selectionStart, selectionStart);
|
|
290
|
+
this.#$inputMask.textContent = placeholder;
|
|
291
|
+
this.#compositionBeginValue = value;
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
#onCompositionEnd = e => {
|
|
295
|
+
this.#isCompositionInProgress = false;
|
|
296
|
+
if (this.#maskSymbols !== null) {
|
|
297
|
+
const value = this.#$input.value;
|
|
298
|
+
const wasValueInserted = value.length !== this.#compositionBeginValue.length;
|
|
299
|
+
const res = (0, _utils2.endMaskedComposition)(value, e.data, this.#maskSymbols, this.#$input.selectionStart, wasValueInserted);
|
|
300
|
+
this.#compositionBeginValue = '';
|
|
301
|
+
if (res !== null) {
|
|
302
|
+
const {
|
|
303
|
+
value,
|
|
304
|
+
placeholder,
|
|
305
|
+
mergedValue,
|
|
306
|
+
cursorPos
|
|
307
|
+
} = res;
|
|
308
|
+
this.#$input.value = value;
|
|
309
|
+
this.#setSelectionRange(cursorPos, cursorPos);
|
|
310
|
+
this.#$inputMask.textContent = placeholder;
|
|
311
|
+
if (mergedValue.length > 0) {
|
|
312
|
+
this.#selectionStart = cursorPos;
|
|
313
|
+
this.#selectionEnd = cursorPos;
|
|
314
|
+
this.#dispatchChangeEvent(mergedValue);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
if ((res === null || res.mergedValue.length === 0) && this.value.length !== 0) {
|
|
318
|
+
this.#dispatchMaskClearChangeEvent();
|
|
319
|
+
}
|
|
320
|
+
} else {
|
|
321
|
+
this.#onInput();
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
#onMaskBeforeInput = e => {
|
|
325
|
+
this.#handleMaskBeforeInput(e.inputType, e.data);
|
|
326
|
+
e.preventDefault();
|
|
327
|
+
};
|
|
328
|
+
#handleMaskBeforeInput(inputType, data) {
|
|
329
|
+
const selectionStart = this.#$input.selectionStart ?? 0;
|
|
330
|
+
const selectionEnd = this.#$input.selectionEnd ?? 0;
|
|
331
|
+
let res = null;
|
|
332
|
+
switch (inputType) {
|
|
333
|
+
case 'insertText':
|
|
334
|
+
{
|
|
335
|
+
res = (0, _utils2.insertText)(this.#$input.value, data, this.#maskSymbols, selectionStart, selectionEnd);
|
|
336
|
+
break;
|
|
337
|
+
}
|
|
338
|
+
case 'insertFromPaste':
|
|
339
|
+
{
|
|
340
|
+
res = (0, _utils2.insertFromPaste)(this.#$input.value, data, this.#maskSymbols, selectionStart, selectionEnd);
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
case 'deleteByCut':
|
|
344
|
+
case 'deleteContent':
|
|
345
|
+
case 'deleteContentBackward':
|
|
346
|
+
{
|
|
347
|
+
res = (0, _utils2.deleteContentBackward)(this.#$input.value, this.#maskSymbols, selectionStart, selectionEnd);
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
case 'deleteContentForward':
|
|
351
|
+
{
|
|
352
|
+
res = (0, _utils2.deleteContentForward)(this.#$input.value, this.#maskSymbols, selectionStart, selectionEnd);
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
if (res !== null) {
|
|
357
|
+
const {
|
|
358
|
+
value,
|
|
359
|
+
placeholder,
|
|
360
|
+
mergedValue,
|
|
361
|
+
cursorPos
|
|
362
|
+
} = res;
|
|
363
|
+
this.#$input.value = value;
|
|
364
|
+
this.#setSelectionRange(cursorPos, cursorPos);
|
|
365
|
+
this.#$inputMask.textContent = placeholder;
|
|
366
|
+
if (mergedValue.length > 0) {
|
|
367
|
+
this.#selectionStart = cursorPos;
|
|
368
|
+
this.#selectionEnd = cursorPos;
|
|
369
|
+
this.#dispatchChangeEvent(mergedValue);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
if ((res === null || res.mergedValue.length === 0) && this.value.length !== 0) {
|
|
373
|
+
this.#dispatchMaskClearChangeEvent();
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
#handleBeforeInput(inputType, data) {
|
|
377
|
+
const selectionStart = this.#$input.selectionStart ?? 0;
|
|
378
|
+
const selectionEnd = this.#$input.selectionEnd ?? 0;
|
|
379
|
+
switch (inputType) {
|
|
380
|
+
case 'insertFromPaste':
|
|
381
|
+
{
|
|
382
|
+
if (data === null) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const value = this.value;
|
|
386
|
+
const cursorPos = selectionStart + data.length;
|
|
387
|
+
const nextValue = value.substring(0, selectionStart) + data + value.substring(selectionEnd);
|
|
388
|
+
this.#selectionStart = cursorPos;
|
|
389
|
+
this.#selectionEnd = cursorPos;
|
|
390
|
+
this.#dispatchChangeEvent(nextValue);
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
case 'deleteByCut':
|
|
394
|
+
{
|
|
395
|
+
const value = this.value;
|
|
396
|
+
const cursorPos = selectionStart;
|
|
397
|
+
const nextValue = value.substring(0, selectionStart) + value.substring(selectionEnd);
|
|
398
|
+
this.#selectionStart = cursorPos;
|
|
399
|
+
this.#selectionEnd = cursorPos;
|
|
400
|
+
this.#dispatchChangeEvent(nextValue);
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
#onInput = () => {
|
|
406
|
+
if (this.#isCompositionInProgress) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
if (this.#maskSymbols !== null) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
const nextValue = this.#$input.value;
|
|
413
|
+
const prevValue = this.value;
|
|
414
|
+
if (prevValue !== nextValue) {
|
|
415
|
+
const nextSelectionStart = this.#$input.selectionStart;
|
|
416
|
+
const nextSelectionEnd = this.#$input.selectionEnd;
|
|
417
|
+
this.#$input.value = prevValue;
|
|
418
|
+
this.#setSelectionRange(this.#selectionStart, this.#selectionEnd);
|
|
419
|
+
this.#selectionStart = nextSelectionStart;
|
|
420
|
+
this.#selectionEnd = nextSelectionEnd;
|
|
421
|
+
this.#dispatchChangeEvent(nextValue);
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
#onMaskInputAutofillChange = () => {
|
|
425
|
+
const nextVal = this.#$input.value;
|
|
426
|
+
if (this.#maskSymbols !== null) {
|
|
427
|
+
const {
|
|
428
|
+
value,
|
|
429
|
+
placeholder,
|
|
430
|
+
mergedValue,
|
|
431
|
+
cursorPos
|
|
432
|
+
} = (0, _utils2.splitValueAndMask)(nextVal, this.#maskSymbols);
|
|
433
|
+
this.#$input.value = value;
|
|
434
|
+
this.#setSelectionRange(cursorPos, cursorPos);
|
|
435
|
+
this.#$inputMask.textContent = placeholder;
|
|
436
|
+
if (mergedValue.length > 0) {
|
|
437
|
+
this.#selectionStart = cursorPos;
|
|
438
|
+
this.#selectionEnd = cursorPos;
|
|
439
|
+
this.#dispatchChangeEvent(mergedValue);
|
|
440
|
+
} else {
|
|
441
|
+
this.#dispatchMaskClearChangeEvent();
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
#onCopy = e => {
|
|
446
|
+
const value = this.#$input.value;
|
|
447
|
+
const selectionStart = this.#$input.selectionStart ?? 0;
|
|
448
|
+
const selectionEnd = this.#$input.selectionEnd ?? 0;
|
|
449
|
+
if (e.clipboardData === null || selectionStart === selectionEnd) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
const copiedValue = this.#maskSymbols === null ? value.substring(selectionStart, selectionEnd) : (0, _utils2.getMergedValueSliced)(value, this.#maskSymbols, selectionStart, selectionEnd);
|
|
453
|
+
let replacedValue = null;
|
|
454
|
+
const replaceWith = value => {
|
|
455
|
+
replacedValue = value ?? null;
|
|
456
|
+
};
|
|
457
|
+
if (this.#maskSymbols !== null) {
|
|
458
|
+
e.preventDefault();
|
|
459
|
+
e.clipboardData.setData('text/plain', copiedValue);
|
|
460
|
+
}
|
|
461
|
+
const event = new CustomEvent('-copy', {
|
|
462
|
+
detail: {
|
|
463
|
+
value: copiedValue,
|
|
464
|
+
replaceWith
|
|
465
|
+
},
|
|
466
|
+
cancelable: true
|
|
467
|
+
});
|
|
468
|
+
this.dispatchEvent(event);
|
|
469
|
+
if (event.defaultPrevented || replacedValue !== null) {
|
|
470
|
+
e.preventDefault();
|
|
471
|
+
}
|
|
472
|
+
if (replacedValue !== null) {
|
|
473
|
+
e.clipboardData.setData('text/plain', replacedValue);
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
#onCut = e => {
|
|
477
|
+
const value = this.#$input.value;
|
|
478
|
+
const selectionStart = this.#$input.selectionStart ?? 0;
|
|
479
|
+
const selectionEnd = this.#$input.selectionEnd ?? 0;
|
|
480
|
+
if (e.clipboardData === null || selectionStart === selectionEnd) {
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
const copiedValue = this.#maskSymbols === null ? value.substring(selectionStart, selectionEnd) : (0, _utils2.getMergedValueSliced)(value, this.#maskSymbols, selectionStart, selectionEnd);
|
|
484
|
+
let replacedValue = null;
|
|
485
|
+
const replaceWith = value => {
|
|
486
|
+
replacedValue = value ?? null;
|
|
487
|
+
};
|
|
488
|
+
if (this.#maskSymbols !== null) {
|
|
489
|
+
e.preventDefault();
|
|
490
|
+
e.clipboardData.setData('text/plain', copiedValue);
|
|
491
|
+
}
|
|
492
|
+
const event = new CustomEvent('-cut', {
|
|
493
|
+
detail: {
|
|
494
|
+
value: copiedValue,
|
|
495
|
+
replaceWith
|
|
496
|
+
},
|
|
497
|
+
cancelable: true
|
|
498
|
+
});
|
|
499
|
+
this.dispatchEvent(event);
|
|
500
|
+
if (event.defaultPrevented || replacedValue !== null) {
|
|
501
|
+
e.preventDefault();
|
|
502
|
+
}
|
|
503
|
+
if (replacedValue !== null) {
|
|
504
|
+
e.clipboardData.setData('text/plain', replacedValue);
|
|
505
|
+
if (this.#maskSymbols !== null) {
|
|
506
|
+
this.#handleMaskBeforeInput('deleteByCut', null);
|
|
507
|
+
} else {
|
|
508
|
+
this.#handleBeforeInput('deleteByCut', null);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
#onPaste = e => {
|
|
513
|
+
const pasteValue = e.clipboardData?.getData('text/plain') ?? '';
|
|
514
|
+
let replacedValue = '';
|
|
515
|
+
const replaceWith = value => {
|
|
516
|
+
replacedValue = value ?? '';
|
|
517
|
+
};
|
|
518
|
+
const event = new CustomEvent('-paste', {
|
|
519
|
+
detail: {
|
|
520
|
+
value: pasteValue,
|
|
521
|
+
replaceWith
|
|
522
|
+
},
|
|
523
|
+
cancelable: true
|
|
524
|
+
});
|
|
525
|
+
this.dispatchEvent(event);
|
|
526
|
+
if (event.defaultPrevented) {
|
|
527
|
+
e.preventDefault();
|
|
528
|
+
}
|
|
529
|
+
if (replacedValue.length === 0) {
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
e.preventDefault();
|
|
533
|
+
if (this.#maskSymbols !== null) {
|
|
534
|
+
this.#handleMaskBeforeInput('insertFromPaste', replacedValue);
|
|
535
|
+
} else {
|
|
536
|
+
this.#handleBeforeInput('insertFromPaste', replacedValue);
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
#dispatchMaskClearChangeEvent() {
|
|
540
|
+
this.#wasClearedByMask = true;
|
|
541
|
+
this.#dispatchChangeEvent('');
|
|
542
|
+
}
|
|
543
|
+
#dispatchChangeEvent(value) {
|
|
544
|
+
if (value === this.value) {
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
this.dispatchEvent(new CustomEvent('-change', {
|
|
548
|
+
detail: value
|
|
549
|
+
}));
|
|
550
|
+
}
|
|
551
|
+
#onContextSize = e => {
|
|
552
|
+
if (this.hasAttribute('size')) {
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
switch (e.detail) {
|
|
556
|
+
case 'l':
|
|
557
|
+
{
|
|
558
|
+
this.setAttribute('data-size', 'm');
|
|
559
|
+
break;
|
|
560
|
+
}
|
|
561
|
+
default:
|
|
562
|
+
{
|
|
563
|
+
this.setAttribute('data-size', 's');
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
#updateMask() {
|
|
568
|
+
if (this.mask !== null) {
|
|
569
|
+
if (this.#maskSymbols === null) {
|
|
570
|
+
this.#$input.addEventListener('beforeinput', this.#onMaskBeforeInput, {
|
|
571
|
+
signal: this.#controller.signal
|
|
572
|
+
});
|
|
573
|
+
this.#$input.addEventListener('change', this.#onMaskInputAutofillChange, {
|
|
574
|
+
signal: this.#controller.signal
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
this.#maskSymbols = (0, _utils2.getMaskSymbols)(this.mask);
|
|
578
|
+
const {
|
|
579
|
+
value,
|
|
580
|
+
placeholder
|
|
581
|
+
} = (0, _utils2.splitValueAndMask)(this.#$input.value, this.#maskSymbols);
|
|
582
|
+
this.#$input.value = value;
|
|
583
|
+
this.#$inputMask.textContent = placeholder;
|
|
584
|
+
} else {
|
|
585
|
+
this.#maskSymbols = null;
|
|
586
|
+
this.#$input.removeEventListener('beforeinput', this.#onMaskBeforeInput);
|
|
587
|
+
this.#$input.removeEventListener('change', this.#onMaskInputAutofillChange);
|
|
588
|
+
}
|
|
589
|
+
this.#updatePlaceholder();
|
|
590
|
+
}
|
|
591
|
+
#updatePlaceholder() {
|
|
592
|
+
if (this.#maskSymbols === null) {
|
|
593
|
+
const value = this.placeholder;
|
|
594
|
+
this.#$input.placeholder = value ?? '';
|
|
595
|
+
(0, _utils.updateAttribute)(this, 'aria-placeholder', value);
|
|
596
|
+
} else {
|
|
597
|
+
(0, _utils.updateAttribute)(this, 'aria-placeholder', null);
|
|
598
|
+
this.#$input.placeholder = '';
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
#onIconSlotChange = () => {
|
|
602
|
+
const isEmpty = this.#$iconSlot.assignedElements().length === 0;
|
|
603
|
+
(0, _utils.setClass)(this.#$iconWrapper, 'empty', isEmpty);
|
|
604
|
+
};
|
|
605
|
+
#onLeftSlotChange = () => {
|
|
606
|
+
const isEmpty = this.#$leftSlot.assignedElements().length === 0;
|
|
607
|
+
(0, _utils.setClass)(this.#$leftWrapper, 'empty', isEmpty);
|
|
608
|
+
};
|
|
609
|
+
#onRightSlotChange = () => {
|
|
610
|
+
const isEmpty = this.#$rightSlot.assignedElements().length === 0;
|
|
611
|
+
(0, _utils.setClass)(this.#$rightWrapper, 'empty', isEmpty);
|
|
612
|
+
};
|
|
613
|
+
#onInputFocus = () => {
|
|
614
|
+
this.dispatchEvent(new CustomEvent('-focus'));
|
|
615
|
+
};
|
|
616
|
+
#onInputBlur = () => {
|
|
617
|
+
this.dispatchEvent(new CustomEvent('-blur'));
|
|
618
|
+
};
|
|
619
|
+
#onSizeUpdate() {
|
|
620
|
+
if (!this.isDomConnected) {
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
const size = this.getAttribute('data-size') ?? _size.DEFAULT_SIZE;
|
|
624
|
+
this.#sizeContext.dispatch(size);
|
|
625
|
+
}
|
|
626
|
+
#onChangeReactHandler = e => {
|
|
627
|
+
(0, _utils.getReactEventHandler)(this, 'on-change')?.(e);
|
|
628
|
+
};
|
|
629
|
+
#onFocusReactHandler = () => {
|
|
630
|
+
(0, _utils.getReactEventHandler)(this, 'on-focus')?.();
|
|
631
|
+
};
|
|
632
|
+
#onBlurReactHandler = () => {
|
|
633
|
+
(0, _utils.getReactEventHandler)(this, 'on-blur')?.();
|
|
634
|
+
};
|
|
635
|
+
#onCopyReactHandler = e => {
|
|
636
|
+
(0, _utils.getReactEventHandler)(this, 'on-copy')?.(e);
|
|
637
|
+
};
|
|
638
|
+
#onCutReactHandler = e => {
|
|
639
|
+
(0, _utils.getReactEventHandler)(this, 'on-cut')?.(e);
|
|
640
|
+
};
|
|
641
|
+
#onPasteReactHandler = e => {
|
|
642
|
+
(0, _utils.getReactEventHandler)(this, 'on-paste')?.(e);
|
|
643
|
+
};
|
|
644
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|