@nectary/components 5.42.4 → 5.42.5-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/global/index.js +1 -1
- package/accordion/index.js +5 -5
- package/accordion/types.d.js +1 -0
- package/accordion-item/global/index.js +1 -1
- package/accordion-item/index.d.js +3 -0
- package/accordion-item/index.js +6 -6
- package/action-menu/global/index.d.js +1 -0
- package/action-menu/global/index.js +1 -1
- package/action-menu/index.d.js +1 -0
- package/action-menu/index.js +4 -4
- package/action-menu/types.d.js +1 -0
- package/action-menu-option/global/index.d.js +1 -0
- package/action-menu-option/global/index.js +1 -1
- package/action-menu-option/index.d.js +1 -0
- package/action-menu-option/index.js +4 -4
- package/action-menu-option/types.d.js +1 -0
- package/action-menu-option/utils.d.js +1 -0
- package/alert/global/index.d.js +1 -0
- package/alert/global/index.js +1 -1
- package/alert/index.d.js +3 -0
- package/alert/index.js +6 -6
- package/alert/types.d.js +1 -0
- package/alert/utils.d.js +1 -0
- package/avatar/colors.d.js +1 -0
- package/avatar/global/index.d.js +1 -0
- package/avatar/global/index.js +1 -1
- package/avatar/index.d.js +1 -0
- package/avatar/index.js +4 -4
- package/avatar/types.d.js +1 -0
- package/avatar/utils.d.js +1 -0
- package/badge/global/index.d.js +1 -0
- package/badge/global/index.js +1 -1
- package/badge/index.d.js +1 -0
- package/badge/index.js +5 -5
- package/badge/types.d.js +1 -0
- package/badge/utils.d.js +1 -0
- package/bundle.js +14159 -9183
- package/button/global/index.d.js +1 -0
- package/button/global/index.js +1 -1
- package/button/index.d.js +1 -0
- package/button/index.js +7 -7
- package/button/types.d.js +1 -0
- package/button/utils.d.js +1 -0
- package/button-group/global/index.d.js +1 -0
- package/button-group/global/index.js +1 -1
- package/button-group/index.d.js +1 -0
- package/button-group/index.js +4 -4
- package/button-group/types.d.js +1 -0
- package/button-group-item/global/index.d.js +1 -0
- package/button-group-item/global/index.js +1 -1
- package/button-group-item/index.d.js +1 -0
- package/button-group-item/index.js +3 -3
- package/button-group-item/types.d.js +1 -0
- package/card-container/global/index.d.js +1 -0
- package/card-container/global/index.js +1 -1
- package/card-container/index.d.js +1 -0
- package/card-container/index.js +1 -1
- package/card-container/types.d.js +1 -0
- package/card-v2/global/index.d.js +1 -0
- package/card-v2/global/index.js +1 -1
- package/card-v2/index.d.js +1 -0
- package/card-v2/index.js +3 -3
- package/card-v2/types.d.js +1 -0
- package/card-v2-title/global/index.d.js +1 -0
- package/card-v2-title/global/index.js +1 -1
- package/card-v2-title/index.d.js +1 -0
- package/card-v2-title/index.js +2 -2
- package/card-v2-title/types.d.js +1 -0
- package/checkbox/global/index.d.js +1 -0
- package/checkbox/global/index.js +1 -1
- package/checkbox/index.d.js +1 -0
- package/checkbox/index.js +5 -5
- package/checkbox/types.d.js +1 -0
- package/chip/colors.d.js +1 -0
- package/chip/global/index.d.js +1 -0
- package/chip/global/index.js +1 -1
- package/chip/index.d.js +2 -0
- package/chip/index.js +6 -6
- package/chip/types.d.js +1 -0
- package/chip/utils.d.js +1 -0
- package/code-tag/global/index.d.js +1 -0
- package/code-tag/global/index.js +1 -1
- package/code-tag/index.d.js +1 -0
- package/code-tag/index.js +2 -2
- package/code-tag/types.d.js +1 -0
- package/color-menu/global/index.d.js +1 -0
- package/color-menu/global/index.js +1 -1
- package/color-menu/index.d.js +1 -0
- package/color-menu/index.js +6 -6
- package/color-menu/types.d.js +1 -0
- package/color-menu/utils.d.js +1 -0
- package/color-menu-option/global/index.d.js +1 -0
- package/color-menu-option/global/index.js +1 -1
- package/color-menu-option/index.d.js +2 -0
- package/color-menu-option/index.js +5 -5
- package/color-menu-option/types.d.js +1 -0
- package/color-menu-option/utils.d.js +1 -0
- package/color-swatch/global/index.d.js +40 -0
- package/color-swatch/global/index.js +2 -2
- package/color-swatch/index.d.js +6 -0
- package/color-swatch/index.js +5 -5
- package/color-swatch/types.d.js +1 -0
- package/color-swatch/utils.d.js +1 -0
- package/color-swatch/utils.d.ts +2 -2
- package/color-swatch/utils.js +1 -1
- package/date-picker/global/index.d.js +1 -0
- package/date-picker/global/index.js +1 -1
- package/date-picker/index.d.js +2 -0
- package/date-picker/index.js +10 -10
- package/date-picker/types.d.js +1 -0
- package/date-picker/utils.d.js +1 -0
- package/dialog/global/index.d.js +1 -0
- package/dialog/global/index.js +1 -1
- package/dialog/index.d.js +3 -0
- package/dialog/index.d.ts +2 -2
- package/dialog/index.js +9 -9
- package/dialog/types.d.js +1 -0
- package/emoji/global/index.d.js +1 -0
- package/emoji/global/index.js +1 -1
- package/emoji/index.d.js +1 -0
- package/emoji/index.js +3 -3
- package/emoji/types.d.js +1 -0
- package/emoji/utils.d.js +1 -0
- package/emoji/utils.js +1 -1
- package/emoji-picker/global/index.d.js +1 -0
- package/emoji-picker/global/index.js +1 -1
- package/emoji-picker/index.d.js +7 -0
- package/emoji-picker/index.js +13 -16
- package/emoji-picker/types.d.js +1 -0
- package/field/global/index.d.js +1 -0
- package/field/global/index.js +1 -1
- package/field/index.d.js +1 -0
- package/field/index.js +4 -4
- package/field/types.d.js +1 -0
- package/field-v2/global/index.d.js +1 -0
- package/field-v2/global/index.js +1 -1
- package/field-v2/index.d.js +1 -0
- package/field-v2/index.js +5 -5
- package/field-v2/types.d.js +1 -0
- package/file-drop/global/index.d.js +1 -0
- package/file-drop/global/index.js +1 -1
- package/file-drop/index.d.js +2 -0
- package/file-drop/index.js +6 -6
- package/file-drop/types.d.js +1 -0
- package/file-drop/utils.d.js +1 -0
- package/file-picker/global/index.d.js +1 -0
- package/file-picker/global/index.js +1 -1
- package/file-picker/index.d.js +1 -0
- package/file-picker/index.js +4 -4
- package/file-picker/types.d.js +1 -0
- package/file-picker/utils.d.js +1 -0
- package/file-status/global/index.d.js +1 -0
- package/file-status/global/index.js +1 -1
- package/file-status/index.d.js +3 -0
- package/file-status/index.js +6 -6
- package/file-status/types.d.js +1 -0
- package/file-status/utils.d.js +1 -0
- package/flag/global/index.d.js +1 -0
- package/flag/global/index.js +1 -1
- package/flag/index.d.js +1 -0
- package/flag/index.js +3 -3
- package/flag/types.d.js +1 -0
- package/flag/utils.d.js +1 -0
- package/flag/utils.js +1 -1
- package/floating-panel/global/index.d.js +1 -0
- package/floating-panel/global/index.js +1 -1
- package/floating-panel/index.d.js +4 -0
- package/floating-panel/index.d.ts +3 -3
- package/floating-panel/index.js +10 -12
- package/floating-panel/types.d.js +1 -0
- package/floating-panel-button/index.d.js +1 -0
- package/floating-panel-button/index.js +3 -3
- package/floating-panel-button/types.d.js +1 -0
- package/floating-panel-icon-button/index.d.js +2 -0
- package/floating-panel-icon-button/index.js +4 -4
- package/floating-panel-icon-button/types.d.js +1 -0
- package/grid/global/index.d.js +1 -0
- package/grid/global/index.js +1 -1
- package/grid/index.d.js +1 -0
- package/grid/index.js +1 -1
- package/grid/types.d.js +1 -0
- package/grid-item/global/index.d.js +1 -0
- package/grid-item/global/index.js +1 -1
- package/grid-item/index.d.js +1 -0
- package/grid-item/index.js +2 -2
- package/grid-item/types.d.js +1 -0
- package/help-tooltip/global/index.d.js +1 -0
- package/help-tooltip/global/index.js +1 -1
- package/help-tooltip/index.d.js +2 -0
- package/help-tooltip/index.js +5 -5
- package/help-tooltip/types.d.js +1 -0
- package/icon/generated-icon-type.d.js +1 -0
- package/icon/global/index.d.js +1 -0
- package/icon/global/index.js +1 -1
- package/icon/index.d.js +1 -0
- package/icon/index.d.ts +1 -1
- package/icon/index.js +2 -2
- package/icon/types.d.js +1 -0
- package/inline-alert/global/index.d.js +1 -0
- package/inline-alert/global/index.js +1 -1
- package/inline-alert/index.d.js +5 -0
- package/inline-alert/index.js +8 -8
- package/inline-alert/types.d.js +1 -0
- package/inline-alert/utils.d.js +1 -0
- package/input/global/index.d.js +1 -0
- package/input/global/index.js +1 -1
- package/input/index.d.js +1 -0
- package/input/index.js +8 -8
- package/input/types.d.js +1 -0
- package/input/utils.d.js +1 -0
- package/link/global/index.d.js +1 -0
- package/link/global/index.js +1 -1
- package/link/index.d.js +2 -0
- package/link/index.js +6 -6
- package/link/types.d.js +1 -0
- package/link/utils.d.js +1 -0
- package/list/global/index.d.js +1 -0
- package/list/global/index.js +1 -1
- package/list/index.d.js +1 -0
- package/list/index.js +1 -1
- package/list/types.d.js +1 -0
- package/list-item/global/index.d.js +1 -0
- package/list-item/global/index.js +1 -1
- package/list-item/index.d.js +1 -0
- package/list-item/index.js +1 -1
- package/list-item/types.d.js +1 -0
- package/package.json +10 -10
- package/pagination/global/index.d.js +1 -0
- package/pagination/global/index.js +1 -1
- package/pagination/index.d.js +1 -0
- package/pagination/index.d.ts +2 -2
- package/pagination/index.js +6 -6
- package/pagination/types.d.js +1 -0
- package/persistent-overlay/global/index.d.js +1 -0
- package/persistent-overlay/global/index.js +1 -1
- package/persistent-overlay/index.d.js +1 -0
- package/persistent-overlay/index.js +4 -4
- package/persistent-overlay/types.d.js +1 -0
- package/pop/global/index.d.js +1 -0
- package/pop/global/index.js +1 -1
- package/pop/index.d.js +1 -0
- package/pop/index.d.ts +1 -1
- package/pop/index.js +9 -10
- package/pop/types.d.js +1 -0
- package/pop/utils.d.js +1 -0
- package/popover/global/index.d.js +1 -0
- package/popover/global/index.js +1 -1
- package/popover/index.d.js +1 -0
- package/popover/index.js +7 -7
- package/popover/types.d.js +1 -0
- package/popover/utils.d.js +1 -0
- package/progress/global/index.d.js +1 -0
- package/progress/global/index.js +1 -1
- package/progress/index.d.js +1 -0
- package/progress/index.js +3 -3
- package/progress/types.d.js +1 -0
- package/progress-stepper/global/index.d.js +1 -0
- package/progress-stepper/global/index.js +1 -1
- package/progress-stepper/index.d.js +1 -0
- package/progress-stepper/index.js +6 -6
- package/progress-stepper/types.d.js +1 -0
- package/progress-stepper-item/global/index.d.js +1 -0
- package/progress-stepper-item/global/index.js +1 -1
- package/progress-stepper-item/index.d.js +2 -0
- package/progress-stepper-item/index.js +5 -5
- package/progress-stepper-item/types.d.js +1 -0
- package/progress-stepper-item/utils.d.js +1 -0
- package/progress-stepper-item/utils.d.ts +5 -5
- package/progress-stepper-item/utils.js +1 -1
- package/progress-stepper-item-v2/global/index.d.js +1 -0
- package/progress-stepper-item-v2/global/index.js +1 -1
- package/progress-stepper-item-v2/index.d.js +2 -0
- package/progress-stepper-item-v2/index.js +5 -6
- package/progress-stepper-item-v2/types.d.js +1 -0
- package/progress-stepper-item-v2/utils.d.js +1 -0
- package/progress-stepper-item-v2/utils.d.ts +3 -3
- package/progress-stepper-item-v2/utils.js +1 -1
- package/progress-stepper-v2/compact-format.d.js +1 -0
- package/progress-stepper-v2/compact.d.js +1 -0
- package/progress-stepper-v2/compact.js +4 -5
- package/progress-stepper-v2/global/index.d.js +1 -0
- package/progress-stepper-v2/global/index.js +1 -1
- package/progress-stepper-v2/index.d.js +84 -0
- package/progress-stepper-v2/index.js +11 -14
- package/progress-stepper-v2/model.d.js +1 -0
- package/progress-stepper-v2/orientation.d.js +1 -0
- package/progress-stepper-v2/separators.d.js +1 -0
- package/progress-stepper-v2/separators.js +1 -1
- package/progress-stepper-v2/step-chip.d.js +1 -0
- package/progress-stepper-v2/step-chip.js +2 -2
- package/progress-stepper-v2/types.d.js +1 -0
- package/radio/global/index.d.js +1 -0
- package/radio/global/index.js +1 -1
- package/radio/index.d.js +1 -0
- package/radio/index.js +4 -4
- package/radio/types.d.js +1 -0
- package/radio-option/global/index.d.js +1 -0
- package/radio-option/global/index.js +1 -1
- package/radio-option/index.d.js +1 -0
- package/radio-option/index.js +2 -2
- package/radio-option/types.d.js +1 -0
- package/rich-text/global/index.d.js +1 -0
- package/rich-text/global/index.js +1 -1
- package/rich-text/index.d.js +4 -0
- package/rich-text/index.js +10 -10
- package/rich-text/types.d.js +1 -0
- package/rich-text/utils.d.js +1 -0
- package/rich-text/utils.js +1 -1
- package/rich-textarea/global/index.d.js +1 -0
- package/rich-textarea/global/index.js +1 -1
- package/rich-textarea/index.d.js +1 -0
- package/rich-textarea/index.js +8 -8
- package/rich-textarea/types.d.js +1 -0
- package/rich-textarea/utils.d.js +1 -0
- package/rich-textarea/utils.js +2 -2
- package/rich-textarea-chip/index.d.js +2 -0
- package/rich-textarea-chip/index.js +5 -5
- package/rich-textarea-chip/types.d.js +1 -0
- package/segment-collapse/global/index.d.js +1 -0
- package/segment-collapse/global/index.js +1 -1
- package/segment-collapse/index.d.js +1 -0
- package/segment-collapse/index.js +4 -4
- package/segment-collapse/types.d.js +1 -0
- package/segmented-control/global/index.d.js +1 -0
- package/segmented-control/global/index.js +1 -1
- package/segmented-control/index.d.js +1 -0
- package/segmented-control/index.js +5 -5
- package/segmented-control/types.d.js +1 -0
- package/segmented-control-option/global/index.d.js +1 -0
- package/segmented-control-option/global/index.js +1 -1
- package/segmented-control-option/index.d.js +1 -0
- package/segmented-control-option/index.js +3 -3
- package/segmented-control-option/types.d.js +1 -0
- package/segmented-icon-control/global/index.d.js +1 -0
- package/segmented-icon-control/global/index.js +1 -1
- package/segmented-icon-control/index.d.js +1 -0
- package/segmented-icon-control/index.js +6 -6
- package/segmented-icon-control/types.d.js +1 -0
- package/segmented-icon-control-option/global/index.d.js +1 -0
- package/segmented-icon-control-option/global/index.js +1 -1
- package/segmented-icon-control-option/index.d.js +1 -0
- package/segmented-icon-control-option/index.js +3 -3
- package/segmented-icon-control-option/types.d.js +1 -0
- package/select-button/global/index.d.js +1 -0
- package/select-button/global/index.js +1 -1
- package/select-button/index.d.js +2 -0
- package/select-button/index.js +7 -7
- package/select-button/types.d.js +1 -0
- package/select-menu/global/index.d.js +1 -0
- package/select-menu/global/index.js +1 -1
- package/select-menu/index.d.js +3 -0
- package/select-menu/index.js +12 -12
- package/select-menu/types.d.js +1 -0
- package/select-menu-option/global/index.d.js +1 -0
- package/select-menu-option/global/index.js +1 -1
- package/select-menu-option/index.d.js +2 -0
- package/select-menu-option/index.js +4 -4
- package/select-menu-option/types.d.js +1 -0
- package/select-menu-option/utils.d.js +1 -0
- package/sheet/global/index.d.js +1 -0
- package/sheet/global/index.js +1 -1
- package/sheet/index.d.js +1 -0
- package/sheet/index.d.ts +1 -1
- package/sheet/index.js +7 -7
- package/sheet/types.d.js +1 -0
- package/sheet-title/global/index.d.js +1 -0
- package/sheet-title/global/index.js +1 -1
- package/sheet-title/index.d.js +2 -0
- package/sheet-title/index.d.ts +1 -1
- package/sheet-title/index.js +5 -5
- package/sheet-title/types.d.js +1 -0
- package/skeleton/global/index.d.js +1 -0
- package/skeleton/global/index.js +1 -1
- package/skeleton/index.d.js +1 -0
- package/skeleton/index.js +3 -3
- package/skeleton/types.d.js +1 -0
- package/skeleton-item/global/index.d.js +1 -0
- package/skeleton-item/global/index.js +1 -1
- package/skeleton-item/index.d.js +1 -0
- package/skeleton-item/index.js +1 -1
- package/skeleton-item/types.d.js +1 -0
- package/spinner/global/index.d.js +1 -0
- package/spinner/global/index.js +1 -1
- package/spinner/index.d.js +1 -0
- package/spinner/index.js +4 -4
- package/spinner/types.d.js +1 -0
- package/standalone.js +25 -88
- package/stop-events/index.d.js +1 -0
- package/stop-events/index.js +2 -2
- package/table/global/index.d.js +1 -0
- package/table/global/index.js +1 -1
- package/table/index.d.js +1 -0
- package/table/index.js +1 -1
- package/table/types.d.js +1 -0
- package/table-body/global/index.d.js +1 -0
- package/table-body/global/index.js +1 -1
- package/table-body/index.d.js +1 -0
- package/table-body/index.js +1 -1
- package/table-body/types.d.js +1 -0
- package/table-cell/global/index.d.js +1 -0
- package/table-cell/global/index.js +1 -1
- package/table-cell/index.d.js +1 -0
- package/table-cell/index.js +3 -3
- package/table-cell/types.d.js +1 -0
- package/table-cell/utils.d.js +1 -0
- package/table-head/global/index.d.js +1 -0
- package/table-head/global/index.js +1 -1
- package/table-head/index.d.js +1 -0
- package/table-head/index.js +1 -1
- package/table-head/types.d.js +1 -0
- package/table-head-cell/global/index.d.js +1 -0
- package/table-head-cell/global/index.js +1 -1
- package/table-head-cell/index.d.js +1 -0
- package/table-head-cell/index.js +4 -4
- package/table-head-cell/types.d.js +1 -0
- package/table-row/global/index.d.js +1 -0
- package/table-row/global/index.js +1 -1
- package/table-row/index.d.js +1 -0
- package/table-row/index.js +2 -2
- package/table-row/types.d.js +1 -0
- package/tabs/global/index.d.js +1 -0
- package/tabs/global/index.js +1 -1
- package/tabs/index.d.js +1 -0
- package/tabs/index.js +6 -6
- package/tabs/types.d.js +1 -0
- package/tabs-icon-option/global/index.d.js +1 -0
- package/tabs-icon-option/global/index.js +1 -1
- package/tabs-icon-option/index.d.js +1 -0
- package/tabs-icon-option/index.js +3 -3
- package/tabs-icon-option/types.d.js +1 -0
- package/tabs-option/global/index.d.js +1 -0
- package/tabs-option/global/index.js +1 -1
- package/tabs-option/index.d.js +1 -0
- package/tabs-option/index.js +4 -4
- package/tabs-option/types.d.js +1 -0
- package/tag/colors.d.js +1 -0
- package/tag/global/index.d.js +1 -0
- package/tag/global/index.js +1 -1
- package/tag/index.d.js +2 -0
- package/tag/index.js +5 -5
- package/tag/types.d.js +1 -0
- package/tag/utils.d.js +1 -0
- package/text/global/index.d.js +1 -0
- package/text/global/index.js +1 -1
- package/text/index.d.js +1 -0
- package/text/index.js +3 -3
- package/text/types.d.js +1 -0
- package/text/utils.d.js +1 -0
- package/textarea/global/index.d.js +1 -0
- package/textarea/global/index.js +1 -1
- package/textarea/index.d.js +1 -0
- package/textarea/index.js +7 -7
- package/textarea/types.d.js +1 -0
- package/time-picker/global/index.d.js +1 -0
- package/time-picker/global/index.js +1 -1
- package/time-picker/index.d.js +2 -0
- package/time-picker/index.js +7 -8
- package/time-picker/types.d.js +1 -0
- package/time-picker/utils.d.js +1 -0
- package/title/global/index.d.js +1 -0
- package/title/global/index.js +1 -1
- package/title/index.d.js +1 -0
- package/title/index.js +3 -3
- package/title/types.d.js +1 -0
- package/title/utils.d.js +1 -0
- package/toast/global/index.d.js +1 -0
- package/toast/global/index.js +1 -1
- package/toast/index.d.js +2 -0
- package/toast/index.js +7 -7
- package/toast/types.d.js +1 -0
- package/toast/types.d.ts +2 -0
- package/toast/utils.d.js +1 -0
- package/toast-manager/global/index.d.js +1 -0
- package/toast-manager/global/index.js +1 -1
- package/toast-manager/index.d.js +2 -0
- package/toast-manager/index.js +6 -7
- package/toast-manager/types.d.js +1 -0
- package/toast-manager/utils.d.js +1 -0
- package/toggle/global/index.d.js +1 -0
- package/toggle/global/index.js +1 -1
- package/toggle/index.d.js +1 -0
- package/toggle/index.js +3 -3
- package/toggle/types.d.js +1 -0
- package/tooltip/global/index.d.js +1 -0
- package/tooltip/global/index.js +1 -1
- package/tooltip/index.d.js +2 -0
- package/tooltip/index.d.ts +1 -1
- package/tooltip/index.js +8 -9
- package/tooltip/tooltip-state.d.js +1 -0
- package/tooltip/types.d.js +1 -0
- package/tooltip/utils.d.js +1 -0
- package/utils/adapters.d.js +1 -0
- package/utils/component-names.d.js +1 -0
- package/utils/component-names.d.ts +1 -1
- package/utils/context.d.js +1 -0
- package/utils/control-keyboard-navigation.d.js +1 -0
- package/utils/control-keyboard-navigation.d.ts +1 -1
- package/utils/control-keyboard-navigation.js +2 -2
- package/utils/countries.d.js +1 -0
- package/utils/csv.d.js +1 -0
- package/utils/debounce.d.js +1 -0
- package/utils/dom.d.js +1 -0
- package/utils/element.d.js +1 -0
- package/utils/element.d.ts +16 -109
- package/utils/element.js +2 -2
- package/utils/event-target.d.js +1 -0
- package/utils/form.d.js +1 -0
- package/utils/get-react-event-handler.d.js +1 -0
- package/utils/global-components-constants.d.js +1 -0
- package/utils/global-components-manager.d.js +1 -0
- package/utils/global-components-manager.d.ts +4 -47
- package/utils/global-components-manager.js +91 -2
- package/utils/index.d.js +75 -0
- package/utils/index.js +73 -73
- package/utils/markdown.d.js +1 -0
- package/utils/placement.d.js +1 -0
- package/utils/placement.js +1 -1
- package/utils/rect.d.js +1 -0
- package/utils/rect.js +1 -1
- package/utils/scroll-lock.d.js +1 -0
- package/utils/size.d.js +1 -0
- package/utils/slot.d.js +1 -0
- package/utils/throttle.d.js +1 -0
- package/utils/uid.d.js +1 -0
- package/utils/shared/cdn-loader.js +0 -136
- package/utils/shared/deferred-promise.js +0 -10
- package/utils/shared/global-elements-manager.js +0 -150
- package/utils/shared/global-elements-store.js +0 -33
- package/utils/shared/index.d.js +0 -16
- package/utils/shared/index.js +0 -16
- package/utils/shared/nectary-element-base.js +0 -25
- /package/{utils/shared/global-elements-store.d.js → accordion/global/index.d.js} +0 -0
- /package/{utils/shared/nectary-element-base.d.js → accordion/index.d.js} +0 -0
- /package/{utils/shared/cdn-loader.d.js → accordion-item/global/index.d.js} +0 -0
- /package/{utils/shared/deferred-promise.d.js → accordion-item/types.d.js} +0 -0
- /package/{utils/shared/global-elements-manager.d.js → accordion-item/utils.d.js} +0 -0
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
const getNonEsmShModuleFile = (modulePath) => {
|
|
2
|
-
if (modulePath === "bundle") {
|
|
3
|
-
return "bundle.js";
|
|
4
|
-
}
|
|
5
|
-
return `${modulePath}/index.js`;
|
|
6
|
-
};
|
|
7
|
-
const getImportPath = (cdnUrl, version, modulePath) => {
|
|
8
|
-
if (cdnUrl.length === 0) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
const host = new URL(cdnUrl).host;
|
|
12
|
-
if (host === "esm.sh") {
|
|
13
|
-
if (version.length !== 0) {
|
|
14
|
-
return `${cdnUrl}@${version}/es2022/${modulePath}.mjs`;
|
|
15
|
-
}
|
|
16
|
-
return `${cdnUrl}/${modulePath}`;
|
|
17
|
-
}
|
|
18
|
-
const moduleFile = getNonEsmShModuleFile(modulePath);
|
|
19
|
-
if (version.length !== 0) {
|
|
20
|
-
return `${cdnUrl}/${version}/${moduleFile}`;
|
|
21
|
-
}
|
|
22
|
-
return `${cdnUrl}/latest/${moduleFile}`;
|
|
23
|
-
};
|
|
24
|
-
const getCssImportPath = (cdnUrl, version, modulePath) => {
|
|
25
|
-
if (cdnUrl.length === 0) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
const host = new URL(cdnUrl).host;
|
|
29
|
-
if (host === "esm.sh") {
|
|
30
|
-
if (cdnUrl.includes("theme-base")) {
|
|
31
|
-
modulePath = `dist/${modulePath}`;
|
|
32
|
-
}
|
|
33
|
-
if (version.length !== 0) {
|
|
34
|
-
return `${cdnUrl}@${version}/es2022/${modulePath}.css`;
|
|
35
|
-
}
|
|
36
|
-
return `${cdnUrl}/${modulePath}`;
|
|
37
|
-
}
|
|
38
|
-
if (version.length !== 0) {
|
|
39
|
-
return `${cdnUrl}/${version}/${modulePath}.js`;
|
|
40
|
-
}
|
|
41
|
-
return `${cdnUrl}/latest/${modulePath}.js`;
|
|
42
|
-
};
|
|
43
|
-
const FALLBACK_DELAY_MS = 2e3;
|
|
44
|
-
const loadModuleWithFallback = async (options) => {
|
|
45
|
-
const { cdnUrl, fallbackCdnUrl, version, modulePath, logPrefix = "CDN" } = options;
|
|
46
|
-
const importPath = getImportPath(cdnUrl, version, modulePath);
|
|
47
|
-
const fallbackImportPath = getImportPath(fallbackCdnUrl, version, modulePath);
|
|
48
|
-
const promises = [
|
|
49
|
-
import(
|
|
50
|
-
/* webpackIgnore: true */
|
|
51
|
-
importPath
|
|
52
|
-
)
|
|
53
|
-
];
|
|
54
|
-
let timeoutId = null;
|
|
55
|
-
if (fallbackImportPath !== null) {
|
|
56
|
-
promises.push(
|
|
57
|
-
new Promise((resolve) => {
|
|
58
|
-
timeoutId = setTimeout(() => resolve(import(
|
|
59
|
-
/* webpackIgnore: true */
|
|
60
|
-
fallbackImportPath
|
|
61
|
-
)), FALLBACK_DELAY_MS);
|
|
62
|
-
})
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
try {
|
|
66
|
-
const module = await Promise.any(promises);
|
|
67
|
-
if (timeoutId !== null) {
|
|
68
|
-
clearTimeout(timeoutId);
|
|
69
|
-
}
|
|
70
|
-
return module;
|
|
71
|
-
} catch (error) {
|
|
72
|
-
if (error instanceof AggregateError) {
|
|
73
|
-
console.error(`${logPrefix} primary load failed: ${importPath}`, error.errors[0]);
|
|
74
|
-
if (fallbackImportPath !== null) {
|
|
75
|
-
console.error(`${logPrefix} fallback load failed: ${fallbackImportPath}`, error.errors[1]);
|
|
76
|
-
}
|
|
77
|
-
} else {
|
|
78
|
-
console.error(`${logPrefix} failed to load module: ${importPath}`, error);
|
|
79
|
-
}
|
|
80
|
-
throw error;
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
const fetchCSS = async (url) => {
|
|
84
|
-
const res = await fetch(url);
|
|
85
|
-
if (!res.ok) {
|
|
86
|
-
throw new Error(`CSS fetch failed: ${res.status} ${url}`);
|
|
87
|
-
}
|
|
88
|
-
const css = await res.text();
|
|
89
|
-
return { default: css };
|
|
90
|
-
};
|
|
91
|
-
const loadCSSFromUrl = (url) => {
|
|
92
|
-
if (url.endsWith(".css")) {
|
|
93
|
-
return fetchCSS(url);
|
|
94
|
-
}
|
|
95
|
-
return import(
|
|
96
|
-
/* webpackIgnore: true */
|
|
97
|
-
url
|
|
98
|
-
);
|
|
99
|
-
};
|
|
100
|
-
const loadCSSModuleWithFallback = async (options) => {
|
|
101
|
-
const { cdnUrl, fallbackCdnUrl, version, modulePath, logPrefix = "CDN" } = options;
|
|
102
|
-
const importPath = getCssImportPath(cdnUrl, version, modulePath);
|
|
103
|
-
const fallbackImportPath = getCssImportPath(fallbackCdnUrl, version, modulePath);
|
|
104
|
-
const promises = [
|
|
105
|
-
loadCSSFromUrl(importPath)
|
|
106
|
-
];
|
|
107
|
-
let timeoutId = null;
|
|
108
|
-
if (fallbackImportPath !== null) {
|
|
109
|
-
promises.push(
|
|
110
|
-
new Promise((resolve) => {
|
|
111
|
-
timeoutId = setTimeout(() => resolve(loadCSSFromUrl(fallbackImportPath)), FALLBACK_DELAY_MS);
|
|
112
|
-
})
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
try {
|
|
116
|
-
const module = await Promise.any(promises);
|
|
117
|
-
if (timeoutId !== null) {
|
|
118
|
-
clearTimeout(timeoutId);
|
|
119
|
-
}
|
|
120
|
-
return module;
|
|
121
|
-
} catch (error) {
|
|
122
|
-
if (error instanceof AggregateError) {
|
|
123
|
-
console.error(`${logPrefix} primary load failed: ${importPath}`, error.errors[0]);
|
|
124
|
-
if (fallbackImportPath !== null) {
|
|
125
|
-
console.error(`${logPrefix} fallback load failed: ${fallbackImportPath}`, error.errors[1]);
|
|
126
|
-
}
|
|
127
|
-
} else {
|
|
128
|
-
console.error(`${logPrefix} failed to load module: ${importPath}`, error);
|
|
129
|
-
}
|
|
130
|
-
throw error;
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
export {
|
|
134
|
-
loadCSSModuleWithFallback,
|
|
135
|
-
loadModuleWithFallback
|
|
136
|
-
};
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { isSinchElementName, sinchElementNameToBase } from "./nectary-element-base.js";
|
|
2
|
-
import "./deferred-promise.js";
|
|
3
|
-
import { loadModuleWithFallback } from "./cdn-loader.js";
|
|
4
|
-
import { getConstructor, getStore } from "./global-elements-store.js";
|
|
5
|
-
class GlobalElementsManager {
|
|
6
|
-
config;
|
|
7
|
-
constructor(config) {
|
|
8
|
-
this.config = config;
|
|
9
|
-
}
|
|
10
|
-
getConstructor(name) {
|
|
11
|
-
return getConstructor(this.config.storeKey, name);
|
|
12
|
-
}
|
|
13
|
-
// This patch is made so that older Nectary versions automatically gets opted in to global components
|
|
14
|
-
patchCustomElements() {
|
|
15
|
-
const originalDefine = window.customElements.define.bind(window.customElements);
|
|
16
|
-
window.customElements.define = (name, constructor, options) => {
|
|
17
|
-
if (isSinchElementName(name) && this.config.baseElementNames.has(sinchElementNameToBase(name))) {
|
|
18
|
-
const nectaryConstructor = constructor;
|
|
19
|
-
if (nectaryConstructor.isGlobal) {
|
|
20
|
-
return originalDefine(name, constructor, options);
|
|
21
|
-
}
|
|
22
|
-
(async () => {
|
|
23
|
-
try {
|
|
24
|
-
const globalConstructor = await this.getConstructor(name);
|
|
25
|
-
if (globalConstructor !== null) {
|
|
26
|
-
originalDefine(name, globalConstructor, options);
|
|
27
|
-
} else {
|
|
28
|
-
console.error(`Nectary element ${name} not found, falling back to local constructor`);
|
|
29
|
-
originalDefine(name, constructor, options);
|
|
30
|
-
}
|
|
31
|
-
} catch (error) {
|
|
32
|
-
console.error(`Failed to get global constructor for ${name}:`, error);
|
|
33
|
-
originalDefine(name, constructor, options);
|
|
34
|
-
}
|
|
35
|
-
})();
|
|
36
|
-
} else {
|
|
37
|
-
return originalDefine(name, constructor, options);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
toClassName(itemName) {
|
|
42
|
-
return itemName.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
43
|
-
}
|
|
44
|
-
loadModule(modulePath) {
|
|
45
|
-
const store = getStore(this.config.storeKey);
|
|
46
|
-
return loadModuleWithFallback({
|
|
47
|
-
cdnUrl: store.cdnUrl,
|
|
48
|
-
fallbackCdnUrl: store.fallbackCdnUrl,
|
|
49
|
-
version: store.targetlibVersion,
|
|
50
|
-
modulePath,
|
|
51
|
-
logPrefix: "Nectary"
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
createLoader(modulePath, itemName) {
|
|
55
|
-
return async () => {
|
|
56
|
-
const module = await this.loadModule(modulePath);
|
|
57
|
-
const className = this.toClassName(itemName);
|
|
58
|
-
const globalConstructor = module[className];
|
|
59
|
-
if (globalConstructor == null) {
|
|
60
|
-
throw new Error(`Nectary element ${className} not found in module`);
|
|
61
|
-
}
|
|
62
|
-
globalConstructor.isGlobal = true;
|
|
63
|
-
return globalConstructor;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
async preloadBundle() {
|
|
67
|
-
const store = getStore(this.config.storeKey);
|
|
68
|
-
const module = await this.loadModule("bundle");
|
|
69
|
-
for (const itemName of this.config.baseElementNames) {
|
|
70
|
-
const className = this.toClassName(itemName);
|
|
71
|
-
const globalConstructor = module[className];
|
|
72
|
-
if (globalConstructor == null) {
|
|
73
|
-
console.error(`Nectary element ${className} not found in module`);
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
globalConstructor.isGlobal = true;
|
|
77
|
-
const sinchName = `sinch-${itemName}`;
|
|
78
|
-
store.definitions.set(sinchName, () => Promise.resolve(globalConstructor));
|
|
79
|
-
try {
|
|
80
|
-
window.customElements.define(sinchName, globalConstructor);
|
|
81
|
-
} catch (error) {
|
|
82
|
-
console.warn(error);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
async init(options) {
|
|
87
|
-
const store = getStore(this.config.storeKey);
|
|
88
|
-
if (store.hasInitialized) {
|
|
89
|
-
console.warn(`${this.constructor.name} has already been initialized`);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
store.hasInitialized = true;
|
|
93
|
-
store.cdnUrl = options.cdnUrl;
|
|
94
|
-
store.fallbackCdnUrl = options.fallbackCdnUrl ?? "";
|
|
95
|
-
store.targetlibVersion = options.targetlibVersion ?? "";
|
|
96
|
-
store.preload = options.preload ?? false;
|
|
97
|
-
try {
|
|
98
|
-
if (store.preload) {
|
|
99
|
-
await this.preloadBundle();
|
|
100
|
-
} else {
|
|
101
|
-
this.patchCustomElements();
|
|
102
|
-
const setDefinitions = () => {
|
|
103
|
-
this.config.baseElementNames.forEach((name) => {
|
|
104
|
-
const modulePath = this.getModulePath(name);
|
|
105
|
-
store.definitions.set(`sinch-${name}`, this.createLoader(modulePath, name));
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
setDefinitions();
|
|
109
|
-
const host = new URL(store.cdnUrl).host;
|
|
110
|
-
if (host === "esm.sh" && store.targetlibVersion.length === 0 && store.preload === false) {
|
|
111
|
-
const registry = await fetch(`${this.config.registryUrl}/latest`);
|
|
112
|
-
const registryData = await registry.json();
|
|
113
|
-
store.targetlibVersion = registryData.version;
|
|
114
|
-
setDefinitions();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
} finally {
|
|
118
|
-
store.loadPromise.resolve();
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
whenLoaded() {
|
|
122
|
-
const store = getStore(this.config.storeKey);
|
|
123
|
-
return store.loadPromise.promise;
|
|
124
|
-
}
|
|
125
|
-
getModulePath(name) {
|
|
126
|
-
for (const [key, value] of this.config.nameToPathMap ?? []) {
|
|
127
|
-
const splittedName = name.startsWith(key) ? name.split(key) : [name];
|
|
128
|
-
if (splittedName.length > 1) {
|
|
129
|
-
const restOfName = splittedName.slice(1).join(key);
|
|
130
|
-
return value + restOfName;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
return name;
|
|
134
|
-
}
|
|
135
|
-
async preload(name) {
|
|
136
|
-
const store = getStore(this.config.storeKey);
|
|
137
|
-
if (name === "all") {
|
|
138
|
-
await Promise.all(Array.from(store.definitions.keys()).map((n) => store.definitions.get(n)?.()));
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
if (Array.isArray(name)) {
|
|
142
|
-
await Promise.all(name.map((n) => store.definitions.get(n)?.()));
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
await store.definitions.get(name)?.();
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
export {
|
|
149
|
-
GlobalElementsManager
|
|
150
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { createDeferredPromise } from "./deferred-promise.js";
|
|
2
|
-
const getStore = (storeKey) => {
|
|
3
|
-
if (window[storeKey] != null) {
|
|
4
|
-
return window[storeKey];
|
|
5
|
-
}
|
|
6
|
-
const store = {
|
|
7
|
-
definitions: /* @__PURE__ */ new Map(),
|
|
8
|
-
hasInitialized: false,
|
|
9
|
-
targetlibVersion: "",
|
|
10
|
-
cdnUrl: "",
|
|
11
|
-
fallbackCdnUrl: "",
|
|
12
|
-
preload: false,
|
|
13
|
-
loadPromise: createDeferredPromise()
|
|
14
|
-
};
|
|
15
|
-
Object.defineProperty(window, storeKey, {
|
|
16
|
-
value: store,
|
|
17
|
-
enumerable: false,
|
|
18
|
-
writable: false,
|
|
19
|
-
configurable: false
|
|
20
|
-
});
|
|
21
|
-
return store;
|
|
22
|
-
};
|
|
23
|
-
const getConstructor = (storeKey, name) => {
|
|
24
|
-
const definitionLoader = getStore(storeKey).definitions.get(name);
|
|
25
|
-
if (definitionLoader == null) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return definitionLoader();
|
|
29
|
-
};
|
|
30
|
-
export {
|
|
31
|
-
getConstructor,
|
|
32
|
-
getStore
|
|
33
|
-
};
|
package/utils/shared/index.d.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NectaryElementBase, isSinchElementName, sinchElementNameToBase } from "./nectary-element-base.js";
|
|
2
|
-
import { createDeferredPromise } from "./deferred-promise.js";
|
|
3
|
-
import { loadCSSModuleWithFallback, loadModuleWithFallback } from "./cdn-loader.js";
|
|
4
|
-
import { getConstructor, getStore } from "./global-elements-store.js";
|
|
5
|
-
import { GlobalElementsManager } from "./global-elements-manager.js";
|
|
6
|
-
export {
|
|
7
|
-
GlobalElementsManager,
|
|
8
|
-
NectaryElementBase,
|
|
9
|
-
createDeferredPromise,
|
|
10
|
-
getConstructor,
|
|
11
|
-
getStore,
|
|
12
|
-
isSinchElementName,
|
|
13
|
-
loadCSSModuleWithFallback,
|
|
14
|
-
loadModuleWithFallback,
|
|
15
|
-
sinchElementNameToBase
|
|
16
|
-
};
|
package/utils/shared/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NectaryElementBase, isSinchElementName, sinchElementNameToBase } from "./nectary-element-base.js";
|
|
2
|
-
import { createDeferredPromise } from "./deferred-promise.js";
|
|
3
|
-
import { loadCSSModuleWithFallback, loadModuleWithFallback } from "./cdn-loader.js";
|
|
4
|
-
import { getConstructor, getStore } from "./global-elements-store.js";
|
|
5
|
-
import { GlobalElementsManager } from "./global-elements-manager.js";
|
|
6
|
-
export {
|
|
7
|
-
GlobalElementsManager,
|
|
8
|
-
NectaryElementBase,
|
|
9
|
-
createDeferredPromise,
|
|
10
|
-
getConstructor,
|
|
11
|
-
getStore,
|
|
12
|
-
isSinchElementName,
|
|
13
|
-
loadCSSModuleWithFallback,
|
|
14
|
-
loadModuleWithFallback,
|
|
15
|
-
sinchElementNameToBase
|
|
16
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const isSinchElementName = (value) => {
|
|
2
|
-
return value.startsWith("sinch-");
|
|
3
|
-
};
|
|
4
|
-
const sinchElementNameToBase = (value) => {
|
|
5
|
-
return value.split("sinch-")[1];
|
|
6
|
-
};
|
|
7
|
-
class NectaryElementBase extends HTMLElement {
|
|
8
|
-
static _isGlobal = false;
|
|
9
|
-
static get elementName() {
|
|
10
|
-
throw new Error(
|
|
11
|
-
`Class ${this.name} must implement static getter 'elementName'`
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
static get isGlobal() {
|
|
15
|
-
return this._isGlobal;
|
|
16
|
-
}
|
|
17
|
-
static set isGlobal(value) {
|
|
18
|
-
this._isGlobal = value;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export {
|
|
22
|
-
NectaryElementBase,
|
|
23
|
-
isSinchElementName,
|
|
24
|
-
sinchElementNameToBase
|
|
25
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|