@nectary/components 5.42.5-rc.0 → 5.43.1
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-item/global/index.js +1 -1
- package/accordion-item/index.js +6 -6
- package/action-menu/global/index.js +1 -1
- package/action-menu/index.js +4 -4
- package/action-menu-option/global/index.js +1 -1
- package/action-menu-option/index.js +4 -4
- package/alert/global/index.js +1 -1
- package/alert/index.js +6 -6
- package/avatar/global/index.js +1 -1
- package/avatar/index.js +4 -4
- package/badge/global/index.js +1 -1
- package/badge/index.js +5 -5
- package/bundle.js +8259 -13221
- package/button/global/index.js +1 -1
- package/button/index.js +7 -7
- package/button-group/global/index.js +1 -1
- package/button-group/index.js +4 -4
- package/button-group-item/global/index.js +1 -1
- package/button-group-item/index.js +3 -3
- package/card-container/global/index.js +1 -1
- package/card-container/index.js +1 -1
- package/card-v2/global/index.js +1 -1
- package/card-v2/index.js +3 -3
- package/card-v2-title/global/index.js +1 -1
- package/card-v2-title/index.js +2 -2
- package/checkbox/global/index.js +1 -1
- package/checkbox/index.js +5 -5
- package/chip/global/index.js +1 -1
- package/chip/index.js +6 -6
- package/code-tag/global/index.js +1 -1
- package/code-tag/index.js +2 -2
- package/color-menu/global/index.js +1 -1
- package/color-menu/index.js +6 -6
- package/color-menu-option/global/index.js +1 -1
- package/color-menu-option/index.js +5 -5
- package/color-swatch/global/index.js +2 -2
- package/color-swatch/index.js +19 -5
- package/color-swatch/utils.d.ts +2 -2
- package/color-swatch/utils.js +1 -1
- package/date-picker/global/index.js +1 -1
- package/date-picker/index.js +10 -10
- package/dialog/global/index.js +1 -1
- package/dialog/index.d.ts +2 -2
- package/dialog/index.js +9 -9
- package/emoji/global/index.js +1 -1
- package/emoji/index.js +3 -3
- package/emoji/utils.js +1 -1
- package/emoji-picker/global/index.js +1 -1
- package/emoji-picker/index.js +16 -13
- package/field/global/index.js +1 -1
- package/field/index.js +4 -4
- package/field-v2/global/index.js +1 -1
- package/field-v2/index.js +5 -5
- package/file-drop/global/index.js +1 -1
- package/file-drop/index.js +6 -6
- package/file-picker/global/index.js +1 -1
- package/file-picker/index.js +4 -4
- package/file-status/global/index.js +1 -1
- package/file-status/index.js +6 -6
- package/flag/global/index.js +1 -1
- package/flag/index.js +3 -3
- package/flag/utils.js +1 -1
- package/floating-panel/global/index.js +1 -1
- package/floating-panel/index.d.ts +3 -3
- package/floating-panel/index.js +12 -10
- package/floating-panel-button/index.js +3 -3
- package/floating-panel-icon-button/index.js +4 -4
- package/grid/global/index.js +1 -1
- package/grid/index.js +1 -1
- package/grid-item/global/index.js +1 -1
- package/grid-item/index.js +2 -2
- package/help-tooltip/global/index.js +1 -1
- package/help-tooltip/index.js +5 -5
- package/icon/generated-icon-type.d.ts +1 -1
- package/icon/global/index.js +1 -1
- package/icon/index.d.ts +1 -1
- package/icon/index.js +2 -2
- package/inline-alert/global/index.js +1 -1
- package/inline-alert/index.js +8 -8
- package/input/global/index.js +1 -1
- package/input/index.js +8 -8
- package/link/global/index.js +1 -1
- package/link/index.d.ts +2 -2
- package/link/index.js +10 -10
- package/link/types.d.ts +8 -8
- package/list/global/index.js +1 -1
- package/list/index.js +1 -1
- package/list-item/global/index.js +1 -1
- package/list-item/index.js +1 -1
- package/package.json +10 -10
- package/pagination/global/index.js +1 -1
- package/pagination/index.d.ts +2 -2
- package/pagination/index.js +6 -6
- package/persistent-overlay/global/index.js +1 -1
- package/persistent-overlay/index.js +4 -4
- package/pop/global/index.js +1 -1
- package/pop/index.d.ts +1 -1
- package/pop/index.js +10 -9
- package/popover/global/index.js +1 -1
- package/popover/index.js +7 -7
- package/progress/global/index.js +1 -1
- package/progress/index.js +3 -3
- package/progress-stepper/global/index.js +1 -1
- package/progress-stepper/index.js +6 -6
- package/progress-stepper-item/global/index.js +1 -1
- package/progress-stepper-item/index.js +5 -5
- package/progress-stepper-item/utils.d.ts +5 -5
- package/progress-stepper-item/utils.js +1 -1
- package/progress-stepper-item-v2/global/index.js +1 -1
- package/progress-stepper-item-v2/index.js +6 -5
- package/progress-stepper-item-v2/utils.d.ts +3 -3
- package/progress-stepper-item-v2/utils.js +1 -1
- package/progress-stepper-v2/compact.js +5 -4
- package/progress-stepper-v2/global/index.js +1 -1
- package/progress-stepper-v2/index.js +14 -11
- package/progress-stepper-v2/separators.js +1 -1
- package/progress-stepper-v2/step-chip.js +2 -2
- package/radio/global/index.js +1 -1
- package/radio/index.js +4 -4
- package/radio-option/global/index.js +1 -1
- package/radio-option/index.js +2 -2
- package/rich-text/global/index.js +1 -1
- package/rich-text/index.js +10 -10
- package/rich-text/utils.js +1 -1
- package/rich-textarea/global/index.js +1 -1
- package/rich-textarea/index.js +8 -8
- package/rich-textarea/utils.js +2 -2
- package/rich-textarea-chip/index.js +5 -5
- package/segment-collapse/global/index.js +1 -1
- package/segment-collapse/index.js +4 -4
- package/segmented-control/global/index.js +1 -1
- package/segmented-control/index.js +5 -5
- package/segmented-control-option/global/index.js +1 -1
- package/segmented-control-option/index.js +3 -3
- package/segmented-icon-control/global/index.js +1 -1
- package/segmented-icon-control/index.js +6 -6
- package/segmented-icon-control-option/global/index.js +1 -1
- package/segmented-icon-control-option/index.js +3 -3
- package/select-button/global/index.js +1 -1
- package/select-button/index.js +7 -7
- package/select-menu/global/index.js +1 -1
- package/select-menu/index.js +12 -12
- package/select-menu-option/global/index.js +1 -1
- package/select-menu-option/index.js +4 -4
- package/sheet/global/index.js +1 -1
- package/sheet/index.d.ts +1 -1
- package/sheet/index.js +7 -7
- package/sheet-title/global/index.js +1 -1
- package/sheet-title/index.d.ts +1 -1
- package/sheet-title/index.js +5 -5
- package/skeleton/global/index.js +1 -1
- package/skeleton/index.js +3 -3
- package/skeleton-item/global/index.js +1 -1
- package/skeleton-item/index.js +1 -1
- package/spinner/global/index.js +1 -1
- package/spinner/index.js +4 -4
- package/standalone.js +88 -25
- package/stop-events/index.js +2 -2
- package/table/global/index.js +1 -1
- package/table/index.js +1 -1
- package/table-body/global/index.js +1 -1
- package/table-body/index.js +1 -1
- package/table-cell/global/index.js +1 -1
- package/table-cell/index.js +3 -3
- package/table-head/global/index.js +1 -1
- package/table-head/index.js +1 -1
- package/table-head-cell/global/index.js +1 -1
- package/table-head-cell/index.js +4 -4
- package/table-row/global/index.js +1 -1
- package/table-row/index.js +2 -2
- package/tabs/global/index.js +1 -1
- package/tabs/index.js +6 -6
- package/tabs-icon-option/global/index.js +1 -1
- package/tabs-icon-option/index.js +3 -3
- package/tabs-option/global/index.js +1 -1
- package/tabs-option/index.js +4 -4
- package/tag/global/index.js +1 -1
- package/tag/index.js +5 -5
- package/text/global/index.js +1 -1
- package/text/index.js +3 -3
- package/textarea/global/index.js +1 -1
- package/textarea/index.js +7 -7
- package/time-picker/global/index.js +1 -1
- package/time-picker/index.js +8 -7
- package/title/global/index.js +1 -1
- package/title/index.js +3 -3
- package/toast/global/index.js +1 -1
- package/toast/index.js +7 -7
- package/toast/types.d.ts +0 -2
- package/toast-manager/global/index.js +1 -1
- package/toast-manager/index.js +7 -6
- package/toggle/global/index.js +1 -1
- package/toggle/index.js +3 -3
- package/tooltip/global/index.js +1 -1
- package/tooltip/index.d.ts +1 -1
- package/tooltip/index.js +9 -8
- package/utils/component-names.d.ts +1 -1
- package/utils/control-keyboard-navigation.d.ts +1 -1
- package/utils/control-keyboard-navigation.js +2 -2
- package/utils/element.d.ts +109 -16
- package/utils/element.js +2 -2
- package/utils/global-components-manager.d.ts +47 -4
- package/utils/global-components-manager.js +2 -91
- package/utils/index.js +73 -73
- package/utils/placement.js +1 -1
- package/utils/rect.js +1 -1
- package/utils/shared/cdn-loader.js +136 -0
- package/utils/shared/deferred-promise.js +10 -0
- package/utils/shared/global-elements-manager.js +150 -0
- package/utils/shared/global-elements-store.js +33 -0
- package/utils/shared/index.d.js +16 -0
- package/utils/shared/index.js +16 -0
- package/utils/shared/nectary-element-base.js +25 -0
- package/accordion/types.d.js +0 -1
- package/accordion-item/index.d.js +0 -3
- package/action-menu/global/index.d.js +0 -1
- package/action-menu/index.d.js +0 -1
- package/action-menu/types.d.js +0 -1
- package/action-menu-option/global/index.d.js +0 -1
- package/action-menu-option/index.d.js +0 -1
- package/action-menu-option/types.d.js +0 -1
- package/action-menu-option/utils.d.js +0 -1
- package/alert/global/index.d.js +0 -1
- package/alert/index.d.js +0 -3
- package/alert/types.d.js +0 -1
- package/alert/utils.d.js +0 -1
- package/avatar/colors.d.js +0 -1
- package/avatar/global/index.d.js +0 -1
- package/avatar/index.d.js +0 -1
- package/avatar/types.d.js +0 -1
- package/avatar/utils.d.js +0 -1
- package/badge/global/index.d.js +0 -1
- package/badge/index.d.js +0 -1
- package/badge/types.d.js +0 -1
- package/badge/utils.d.js +0 -1
- package/button/global/index.d.js +0 -1
- package/button/index.d.js +0 -1
- package/button/types.d.js +0 -1
- package/button/utils.d.js +0 -1
- package/button-group/global/index.d.js +0 -1
- package/button-group/index.d.js +0 -1
- package/button-group/types.d.js +0 -1
- package/button-group-item/global/index.d.js +0 -1
- package/button-group-item/index.d.js +0 -1
- package/button-group-item/types.d.js +0 -1
- package/card-container/global/index.d.js +0 -1
- package/card-container/index.d.js +0 -1
- package/card-container/types.d.js +0 -1
- package/card-v2/global/index.d.js +0 -1
- package/card-v2/index.d.js +0 -1
- package/card-v2/types.d.js +0 -1
- package/card-v2-title/global/index.d.js +0 -1
- package/card-v2-title/index.d.js +0 -1
- package/card-v2-title/types.d.js +0 -1
- package/checkbox/global/index.d.js +0 -1
- package/checkbox/index.d.js +0 -1
- package/checkbox/types.d.js +0 -1
- package/chip/colors.d.js +0 -1
- package/chip/global/index.d.js +0 -1
- package/chip/index.d.js +0 -2
- package/chip/types.d.js +0 -1
- package/chip/utils.d.js +0 -1
- package/code-tag/global/index.d.js +0 -1
- package/code-tag/index.d.js +0 -1
- package/code-tag/types.d.js +0 -1
- package/color-menu/global/index.d.js +0 -1
- package/color-menu/index.d.js +0 -1
- package/color-menu/types.d.js +0 -1
- package/color-menu/utils.d.js +0 -1
- package/color-menu-option/global/index.d.js +0 -1
- package/color-menu-option/index.d.js +0 -2
- package/color-menu-option/types.d.js +0 -1
- package/color-menu-option/utils.d.js +0 -1
- package/color-swatch/global/index.d.js +0 -40
- package/color-swatch/index.d.js +0 -6
- package/color-swatch/types.d.js +0 -1
- package/color-swatch/utils.d.js +0 -1
- package/date-picker/global/index.d.js +0 -1
- package/date-picker/index.d.js +0 -2
- package/date-picker/types.d.js +0 -1
- package/date-picker/utils.d.js +0 -1
- package/dialog/global/index.d.js +0 -1
- package/dialog/index.d.js +0 -3
- package/dialog/types.d.js +0 -1
- package/emoji/global/index.d.js +0 -1
- package/emoji/index.d.js +0 -1
- package/emoji/types.d.js +0 -1
- package/emoji/utils.d.js +0 -1
- package/emoji-picker/global/index.d.js +0 -1
- package/emoji-picker/index.d.js +0 -7
- package/emoji-picker/types.d.js +0 -1
- package/field/global/index.d.js +0 -1
- package/field/index.d.js +0 -1
- package/field/types.d.js +0 -1
- package/field-v2/global/index.d.js +0 -1
- package/field-v2/index.d.js +0 -1
- package/field-v2/types.d.js +0 -1
- package/file-drop/global/index.d.js +0 -1
- package/file-drop/index.d.js +0 -2
- package/file-drop/types.d.js +0 -1
- package/file-drop/utils.d.js +0 -1
- package/file-picker/global/index.d.js +0 -1
- package/file-picker/index.d.js +0 -1
- package/file-picker/types.d.js +0 -1
- package/file-picker/utils.d.js +0 -1
- package/file-status/global/index.d.js +0 -1
- package/file-status/index.d.js +0 -3
- package/file-status/types.d.js +0 -1
- package/file-status/utils.d.js +0 -1
- package/flag/global/index.d.js +0 -1
- package/flag/index.d.js +0 -1
- package/flag/types.d.js +0 -1
- package/flag/utils.d.js +0 -1
- package/floating-panel/global/index.d.js +0 -1
- package/floating-panel/index.d.js +0 -4
- package/floating-panel/types.d.js +0 -1
- package/floating-panel-button/index.d.js +0 -1
- package/floating-panel-button/types.d.js +0 -1
- package/floating-panel-icon-button/index.d.js +0 -2
- package/floating-panel-icon-button/types.d.js +0 -1
- package/grid/global/index.d.js +0 -1
- package/grid/index.d.js +0 -1
- package/grid/types.d.js +0 -1
- package/grid-item/global/index.d.js +0 -1
- package/grid-item/index.d.js +0 -1
- package/grid-item/types.d.js +0 -1
- package/help-tooltip/global/index.d.js +0 -1
- package/help-tooltip/index.d.js +0 -2
- package/help-tooltip/types.d.js +0 -1
- package/icon/generated-icon-type.d.js +0 -1
- package/icon/global/index.d.js +0 -1
- package/icon/index.d.js +0 -1
- package/icon/types.d.js +0 -1
- package/inline-alert/global/index.d.js +0 -1
- package/inline-alert/index.d.js +0 -5
- package/inline-alert/types.d.js +0 -1
- package/inline-alert/utils.d.js +0 -1
- package/input/global/index.d.js +0 -1
- package/input/index.d.js +0 -1
- package/input/types.d.js +0 -1
- package/input/utils.d.js +0 -1
- package/link/global/index.d.js +0 -1
- package/link/index.d.js +0 -2
- package/link/types.d.js +0 -1
- package/link/utils.d.js +0 -1
- package/list/global/index.d.js +0 -1
- package/list/index.d.js +0 -1
- package/list/types.d.js +0 -1
- package/list-item/global/index.d.js +0 -1
- package/list-item/index.d.js +0 -1
- package/list-item/types.d.js +0 -1
- package/pagination/global/index.d.js +0 -1
- package/pagination/index.d.js +0 -1
- package/pagination/types.d.js +0 -1
- package/persistent-overlay/global/index.d.js +0 -1
- package/persistent-overlay/index.d.js +0 -1
- package/persistent-overlay/types.d.js +0 -1
- package/pop/global/index.d.js +0 -1
- package/pop/index.d.js +0 -1
- package/pop/types.d.js +0 -1
- package/pop/utils.d.js +0 -1
- package/popover/global/index.d.js +0 -1
- package/popover/index.d.js +0 -1
- package/popover/types.d.js +0 -1
- package/popover/utils.d.js +0 -1
- package/progress/global/index.d.js +0 -1
- package/progress/index.d.js +0 -1
- package/progress/types.d.js +0 -1
- package/progress-stepper/global/index.d.js +0 -1
- package/progress-stepper/index.d.js +0 -1
- package/progress-stepper/types.d.js +0 -1
- package/progress-stepper-item/global/index.d.js +0 -1
- package/progress-stepper-item/index.d.js +0 -2
- package/progress-stepper-item/types.d.js +0 -1
- package/progress-stepper-item/utils.d.js +0 -1
- package/progress-stepper-item-v2/global/index.d.js +0 -1
- package/progress-stepper-item-v2/index.d.js +0 -2
- package/progress-stepper-item-v2/types.d.js +0 -1
- package/progress-stepper-item-v2/utils.d.js +0 -1
- package/progress-stepper-v2/compact-format.d.js +0 -1
- package/progress-stepper-v2/compact.d.js +0 -1
- package/progress-stepper-v2/global/index.d.js +0 -1
- package/progress-stepper-v2/index.d.js +0 -84
- package/progress-stepper-v2/model.d.js +0 -1
- package/progress-stepper-v2/orientation.d.js +0 -1
- package/progress-stepper-v2/separators.d.js +0 -1
- package/progress-stepper-v2/step-chip.d.js +0 -1
- package/progress-stepper-v2/types.d.js +0 -1
- package/radio/global/index.d.js +0 -1
- package/radio/index.d.js +0 -1
- package/radio/types.d.js +0 -1
- package/radio-option/global/index.d.js +0 -1
- package/radio-option/index.d.js +0 -1
- package/radio-option/types.d.js +0 -1
- package/rich-text/global/index.d.js +0 -1
- package/rich-text/index.d.js +0 -4
- package/rich-text/types.d.js +0 -1
- package/rich-text/utils.d.js +0 -1
- package/rich-textarea/global/index.d.js +0 -1
- package/rich-textarea/index.d.js +0 -1
- package/rich-textarea/types.d.js +0 -1
- package/rich-textarea/utils.d.js +0 -1
- package/rich-textarea-chip/index.d.js +0 -2
- package/rich-textarea-chip/types.d.js +0 -1
- package/segment-collapse/global/index.d.js +0 -1
- package/segment-collapse/index.d.js +0 -1
- package/segment-collapse/types.d.js +0 -1
- package/segmented-control/global/index.d.js +0 -1
- package/segmented-control/index.d.js +0 -1
- package/segmented-control/types.d.js +0 -1
- package/segmented-control-option/global/index.d.js +0 -1
- package/segmented-control-option/index.d.js +0 -1
- package/segmented-control-option/types.d.js +0 -1
- package/segmented-icon-control/global/index.d.js +0 -1
- package/segmented-icon-control/index.d.js +0 -1
- package/segmented-icon-control/types.d.js +0 -1
- package/segmented-icon-control-option/global/index.d.js +0 -1
- package/segmented-icon-control-option/index.d.js +0 -1
- package/segmented-icon-control-option/types.d.js +0 -1
- package/select-button/global/index.d.js +0 -1
- package/select-button/index.d.js +0 -2
- package/select-button/types.d.js +0 -1
- package/select-menu/global/index.d.js +0 -1
- package/select-menu/index.d.js +0 -3
- package/select-menu/types.d.js +0 -1
- package/select-menu-option/global/index.d.js +0 -1
- package/select-menu-option/index.d.js +0 -2
- package/select-menu-option/types.d.js +0 -1
- package/select-menu-option/utils.d.js +0 -1
- package/sheet/global/index.d.js +0 -1
- package/sheet/index.d.js +0 -1
- package/sheet/types.d.js +0 -1
- package/sheet-title/global/index.d.js +0 -1
- package/sheet-title/index.d.js +0 -2
- package/sheet-title/types.d.js +0 -1
- package/skeleton/global/index.d.js +0 -1
- package/skeleton/index.d.js +0 -1
- package/skeleton/types.d.js +0 -1
- package/skeleton-item/global/index.d.js +0 -1
- package/skeleton-item/index.d.js +0 -1
- package/skeleton-item/types.d.js +0 -1
- package/spinner/global/index.d.js +0 -1
- package/spinner/index.d.js +0 -1
- package/spinner/types.d.js +0 -1
- package/stop-events/index.d.js +0 -1
- package/table/global/index.d.js +0 -1
- package/table/index.d.js +0 -1
- package/table/types.d.js +0 -1
- package/table-body/global/index.d.js +0 -1
- package/table-body/index.d.js +0 -1
- package/table-body/types.d.js +0 -1
- package/table-cell/global/index.d.js +0 -1
- package/table-cell/index.d.js +0 -1
- package/table-cell/types.d.js +0 -1
- package/table-cell/utils.d.js +0 -1
- package/table-head/global/index.d.js +0 -1
- package/table-head/index.d.js +0 -1
- package/table-head/types.d.js +0 -1
- package/table-head-cell/global/index.d.js +0 -1
- package/table-head-cell/index.d.js +0 -1
- package/table-head-cell/types.d.js +0 -1
- package/table-row/global/index.d.js +0 -1
- package/table-row/index.d.js +0 -1
- package/table-row/types.d.js +0 -1
- package/tabs/global/index.d.js +0 -1
- package/tabs/index.d.js +0 -1
- package/tabs/types.d.js +0 -1
- package/tabs-icon-option/global/index.d.js +0 -1
- package/tabs-icon-option/index.d.js +0 -1
- package/tabs-icon-option/types.d.js +0 -1
- package/tabs-option/global/index.d.js +0 -1
- package/tabs-option/index.d.js +0 -1
- package/tabs-option/types.d.js +0 -1
- package/tag/colors.d.js +0 -1
- package/tag/global/index.d.js +0 -1
- package/tag/index.d.js +0 -2
- package/tag/types.d.js +0 -1
- package/tag/utils.d.js +0 -1
- package/text/global/index.d.js +0 -1
- package/text/index.d.js +0 -1
- package/text/types.d.js +0 -1
- package/text/utils.d.js +0 -1
- package/textarea/global/index.d.js +0 -1
- package/textarea/index.d.js +0 -1
- package/textarea/types.d.js +0 -1
- package/time-picker/global/index.d.js +0 -1
- package/time-picker/index.d.js +0 -2
- package/time-picker/types.d.js +0 -1
- package/time-picker/utils.d.js +0 -1
- package/title/global/index.d.js +0 -1
- package/title/index.d.js +0 -1
- package/title/types.d.js +0 -1
- package/title/utils.d.js +0 -1
- package/toast/global/index.d.js +0 -1
- package/toast/index.d.js +0 -2
- package/toast/types.d.js +0 -1
- package/toast/utils.d.js +0 -1
- package/toast-manager/global/index.d.js +0 -1
- package/toast-manager/index.d.js +0 -2
- package/toast-manager/types.d.js +0 -1
- package/toast-manager/utils.d.js +0 -1
- package/toggle/global/index.d.js +0 -1
- package/toggle/index.d.js +0 -1
- package/toggle/types.d.js +0 -1
- package/tooltip/global/index.d.js +0 -1
- package/tooltip/index.d.js +0 -2
- package/tooltip/tooltip-state.d.js +0 -1
- package/tooltip/types.d.js +0 -1
- package/tooltip/utils.d.js +0 -1
- package/utils/adapters.d.js +0 -1
- package/utils/component-names.d.js +0 -1
- package/utils/context.d.js +0 -1
- package/utils/control-keyboard-navigation.d.js +0 -1
- package/utils/countries.d.js +0 -1
- package/utils/csv.d.js +0 -1
- package/utils/debounce.d.js +0 -1
- package/utils/dom.d.js +0 -1
- package/utils/element.d.js +0 -1
- package/utils/event-target.d.js +0 -1
- package/utils/form.d.js +0 -1
- package/utils/get-react-event-handler.d.js +0 -1
- package/utils/global-components-constants.d.js +0 -1
- package/utils/global-components-manager.d.js +0 -1
- package/utils/index.d.js +0 -75
- package/utils/markdown.d.js +0 -1
- package/utils/placement.d.js +0 -1
- package/utils/rect.d.js +0 -1
- package/utils/scroll-lock.d.js +0 -1
- package/utils/size.d.js +0 -1
- package/utils/slot.d.js +0 -1
- package/utils/throttle.d.js +0 -1
- package/utils/uid.d.js +0 -1
- /package/{accordion-item/global/index.d.js → utils/shared/cdn-loader.d.js} +0 -0
- /package/{accordion-item/types.d.js → utils/shared/deferred-promise.d.js} +0 -0
- /package/{accordion-item/utils.d.js → utils/shared/global-elements-manager.d.js} +0 -0
- /package/{accordion/global/index.d.js → utils/shared/global-elements-store.d.js} +0 -0
- /package/{accordion/index.d.js → utils/shared/nectary-element-base.d.js} +0 -0
package/input/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { Context, subscribeContext } from "../utils/context.js";
|
|
2
|
+
import { getBooleanAttribute, getAttribute, updateAttribute, isAttrEqual, isAttrTrue, updateBooleanAttribute, updateLiteralAttribute, getLiteralAttribute, setClass } from "../utils/dom.js";
|
|
3
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
|
+
import { isElementFocused } from "../utils/slot.js";
|
|
5
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
6
|
+
import { setFormValue, requestSubmitForm } from "../utils/form.js";
|
|
7
|
+
import { sizeValues, DEFAULT_SIZE } from "../utils/size.js";
|
|
8
|
+
import { splitValueAndMask, inputTypes, beginMaskedComposition, endMaskedComposition, deleteContentForward, deleteContentBackward, insertFromPaste, insertText, getMergedValueSliced, getMaskSymbols } from "./utils.js";
|
|
9
9
|
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-local-padding:var(--sinch-comp-input-spacing-padding-m, 12px);--sinch-local-icon-gap:var(--sinch-comp-input-spacing-icon-gap-m, 8px);--sinch-local-slot-gap:var(--sinch-comp-input-spacing-slot-gap-m, 4px);--sinch-local-slot-padding:var(--sinch-comp-input-spacing-slot-padding-m, 4px);--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-local-padding:var(--sinch-comp-input-spacing-padding-l, 12px);--sinch-local-icon-gap:var(--sinch-comp-input-spacing-icon-gap-l, 8px);--sinch-local-slot-gap:var(--sinch-comp-input-spacing-slot-gap-l, 4px);--sinch-local-slot-padding:var(--sinch-comp-input-spacing-slot-padding-l, 4px);--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-local-padding:var(--sinch-comp-input-spacing-padding-m, 12px);--sinch-local-icon-gap:var(--sinch-comp-input-spacing-icon-gap-m, 8px);--sinch-local-slot-gap:var(--sinch-comp-input-spacing-slot-gap-m, 4px);--sinch-local-slot-padding:var(--sinch-comp-input-spacing-slot-padding-m, 4px);--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-local-padding:var(--sinch-comp-input-spacing-padding-s, 12px);--sinch-local-icon-gap:var(--sinch-comp-input-spacing-icon-gap-s, 8px);--sinch-local-slot-gap:var(--sinch-comp-input-spacing-slot-gap-s, 4px);--sinch-local-slot-padding:var(--sinch-comp-input-spacing-slot-padding-s, 4px);--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 var(--sinch-local-padding);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 var(--sinch-local-padding);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){letter-spacing:.1em}:host(:not([enforce-consistent-font-size])) #input[type=password]:not(:placeholder-shown){font-size:1.5em}:host([enforce-consistent-font-size]) #input[type=password]:not(:placeholder-shown){font-size:inherit}#icon-wrapper{position:relative;height:100%}#icon{position:absolute;display:flex;align-items:center;left:var(--sinch-local-padding);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:var(--sinch-local-padding)}#icon-wrapper:not(.empty)~#input-wrapper>#input,#icon-wrapper:not(.empty)~#input-wrapper>#input-mask{padding-left:calc(var(--sinch-local-padding) + var(--sinch-global-size-icon) + var(--sinch-local-icon-gap))}#right{display:flex;flex-direction:row;align-self:stretch;align-items:center;gap:var(--sinch-local-slot-gap);padding-right:var(--sinch-local-slot-padding)}#right.empty{display:none}#left{display:flex;flex-direction:row;align-self:stretch;align-items:center;gap:var(--sinch-local-slot-gap);padding-left:var(--sinch-local-slot-padding)}#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>';
|
|
10
10
|
const template = document.createElement("template");
|
|
11
11
|
template.innerHTML = templateHTML;
|
package/link/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-link");
|
package/link/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ export declare class Link extends NectaryElement {
|
|
|
16
16
|
set contentAsCode(value: boolean);
|
|
17
17
|
get href(): string;
|
|
18
18
|
set href(value: string);
|
|
19
|
-
set
|
|
20
|
-
get
|
|
19
|
+
set useHistory(value: boolean);
|
|
20
|
+
get useHistory(): boolean;
|
|
21
21
|
set disabled(isDisabled: boolean);
|
|
22
22
|
get disabled(): boolean;
|
|
23
23
|
set external(isExternal: boolean);
|
package/link/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import "../index.
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import "../code-tag/index.js";
|
|
2
|
+
import "../icon/index.js";
|
|
3
|
+
import { getAttribute, getBooleanAttribute, isAttrEqual, updateLiteralAttribute, updateAttribute, updateBooleanAttribute, isAttrTrue, getLiteralAttribute } from "../utils/dom.js";
|
|
4
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
5
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
6
|
+
import { linkTypeValues } from "./utils.js";
|
|
7
7
|
const templateHTML = '<style>:host{display:inline}:host(:not([type])) a{font:var(--sinch-comp-link-default-font-initial);font-size:inherit;line-height:inherit;text-decoration:var(--sinch-comp-link-default-text-decoration-initial);color:var(--sinch-comp-link-color-default-text-initial);border-radius:.5em;white-space:nowrap;--sinch-global-color-icon:var(--sinch-comp-link-color-default-icon-initial)}:host(:not([type])) a:hover{text-decoration:var(--sinch-comp-link-default-text-decoration-hover);color:var(--sinch-comp-link-color-default-text-hover);--sinch-global-color-icon:var(--sinch-comp-link-color-default-icon-hover)}:host(:not([type])) a:focus-visible{outline:2px solid var(--sinch-comp-link-color-default-outline-focus);outline-offset:2px}:host(:not([type])[standalone]){display:block}:host(:not([type])[standalone]) a{display:block;font:var(--sinch-comp-link-standalone-font-initial);font-size:inherit;line-height:inherit;text-decoration:none;width:fit-content}#external-icon,#standalone-icon{display:none;height:1em}#icon-prefix{display:none;margin-left:-.25em}:host(:not([type])[external]:not([standalone])) #external-icon{display:inline-block;margin-left:.25em;vertical-align:-.2em;--sinch-global-size-icon:1em}:host(:not([type])[standalone][external]) #external-icon{display:inline-block;vertical-align:-.4em;--sinch-global-size-icon:1.5em}:host(:not([type])[standalone]) #icon-prefix{display:inline}:host(:not([type])[standalone]:not([external])) #standalone-icon{display:inline-block;vertical-align:-.4em;--sinch-global-size-icon:1.5em}:host(:not([type])[disabled]) a{color:var(--sinch-comp-link-color-disabled-text-initial);pointer-events:none;cursor:initial;text-decoration:var(--sinch-comp-link-default-text-decoration-disabled);--sinch-global-color-icon:var(--sinch-comp-link-color-disabled-icon-initial)}#content{white-space:var(--sinch-global-text-white-space,normal)}:host(:not([type])) button{display:none;border:none;background:0 0;padding:0;margin:0;cursor:pointer;font:var(--sinch-comp-link-default-font-initial);font-size:inherit;line-height:inherit;text-decoration:var(--sinch-comp-link-default-text-decoration-initial);color:var(--sinch-comp-link-color-default-text-initial);border-radius:.5em;white-space:nowrap}:host(:not([type])) button:hover{text-decoration:var(--sinch-comp-link-default-text-decoration-hover);color:var(--sinch-comp-link-color-default-text-hover)}:host(:not([type])) button:focus-visible{outline:2px solid var(--sinch-comp-link-color-default-outline-focus);outline-offset:2px}:host(:not([type])[disabled]) button{color:var(--sinch-comp-link-color-disabled-text-initial);pointer-events:none;cursor:initial;text-decoration:var(--sinch-comp-link-default-text-decoration-disabled)}#button-content{white-space:var(--sinch-global-text-white-space,normal)}:host([preventdefault]:not([use-history])) a{display:none}:host([preventdefault]:not([use-history])) button{display:inline}:host([type]){display:inline-block;vertical-align:middle;outline:0;cursor:pointer;user-select:none;--sinch-button-shape-radius-base:var(--sinch-comp-button-shape-radius-size-m);--sinch-button-set-size-shape-radius:var(--sinch-comp-button-shape-radius-size-m);--sinch-local-shadow:var(--sinch-comp-button-shadow-secondary-initial);--sinch-button-border:1px solid;--sinch-button-border-top:var(--sinch-button-border);--sinch-button-border-bottom:var(--sinch-button-border);--sinch-button-border-left:var(--sinch-button-border);--sinch-button-border-right:var(--sinch-button-border);--sinch-button-shape-radius-top-right:unset;--sinch-button-shape-radius-top-left:unset;--sinch-button-shape-radius-bottom-right:unset;--sinch-button-shape-radius-bottom-left:unset;--sinch-local-size:var(--sinch-comp-button-size-container-m);--sinch-local-padding:var(--sinch-comp-button-spacing-padding-m, 16px);--sinch-local-gap:var(--sinch-comp-button-spacing-gap-m, 12px);--sinch-local-font:var(--sinch-comp-button-font-size-m-text);--sinch-global-size-icon:var(--sinch-comp-button-size-icon-m)}:host([type][disabled]){cursor:initial}:host([type]) a,:host([type]) button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:var(--sinch-local-size);padding:0 var(--sinch-local-padding);border:none;margin:0;background:0 0;text-decoration:none;white-space:nowrap;cursor:pointer;font:inherit;color:inherit}:host([type]) a::before,:host([type]) button::before{content:"";position:absolute;inset:0;background-color:var(--sinch-local-color-background);border-top:var(--sinch-button-border-top);border-bottom:var(--sinch-button-border-bottom);border-right:var(--sinch-button-border-right);border-left:var(--sinch-button-border-left);border-color:var(--sinch-local-color-border);border-top-right-radius:var(--sinch-button-shape-radius-top-right,var(--sinch-button-set-size-shape-radius,var(--sinch-button-shape-radius-base)));border-top-left-radius:var(--sinch-button-shape-radius-top-left,var(--sinch-button-set-size-shape-radius,var(--sinch-button-shape-radius-base)));border-bottom-right-radius:var(--sinch-button-shape-radius-bottom-right,var(--sinch-button-set-size-shape-radius,var(--sinch-button-shape-radius-base)));border-bottom-left-radius:var(--sinch-button-shape-radius-bottom-left,var(--sinch-button-set-size-shape-radius,var(--sinch-button-shape-radius-base)));box-shadow:var(--sinch-local-shadow);pointer-events:none}:host([type]:not([disabled]):active) a::before,:host([type]:not([disabled]):active) button::before{border-width:2px}:host([type]) a:focus-visible,:host([type]) button:focus-visible{outline:0}:host([type]) a:focus-visible::after,:host([type]) button:focus-visible::after{position:absolute;content:"";inset:-3px;border:2px solid var(--sinch-local-color-outline-focus);border-top-right-radius:calc(var(--sinch-button-shape-radius-top-right,var(--sinch-button-set-size-shape-radius,var(--sinch-button-shape-radius-base))) + 3px);border-top-left-radius:calc(var(--sinch-button-shape-radius-top-left,var(--sinch-button-set-size-shape-radius,var(--sinch-button-shape-radius-base))) + 3px);border-bottom-right-radius:calc(var(--sinch-button-shape-radius-bottom-right,var(--sinch-button-set-size-shape-radius,var(--sinch-button-shape-radius-base))) + 3px);border-bottom-left-radius:calc(var(--sinch-button-shape-radius-bottom-left,var(--sinch-button-set-size-shape-radius,var(--sinch-button-shape-radius-base))) + 3px);pointer-events:none}:host([type]) #button-content,:host([type]) #content{position:relative;font:var(--sinch-local-font);color:var(--sinch-local-color-text);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex-shrink:1;min-width:0}:host([type]) #external-icon,:host([type]) #icon-prefix,:host([type]) #standalone-icon{display:none}:host([type][disabled]) a,:host([type][disabled]) button{pointer-events:none;cursor:initial}:host([type=primary]){--sinch-local-color-background:var(--sinch-comp-button-color-primary-default-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-primary-default-border-initial);--sinch-local-color-text:var(--sinch-comp-button-color-primary-default-text-initial);--sinch-local-color-icon:var(--sinch-comp-button-color-primary-default-icon-initial);--sinch-local-color-outline-focus:var(--sinch-comp-button-color-primary-default-outline-focus);--sinch-local-shadow:var(--sinch-comp-button-shadow-primary-initial)}:host([type=secondary]){--sinch-local-color-background:var(--sinch-comp-button-color-secondary-default-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-secondary-default-border-initial);--sinch-local-color-outline-focus:var(--sinch-comp-button-color-secondary-default-outline-focus);--sinch-local-color-text:var(--sinch-comp-button-color-secondary-default-text-initial);--sinch-local-color-icon:var(--sinch-comp-button-color-secondary-default-icon-initial)}:host([type=subtle-primary]){--sinch-local-color-background:var(--sinch-comp-button-color-subtle-primary-default-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-subtle-primary-default-border-initial);--sinch-local-color-outline-focus:var(--sinch-comp-button-color-subtle-primary-default-outline-focus);--sinch-local-color-text:var(--sinch-comp-button-color-subtle-primary-default-text-initial);--sinch-local-color-icon:var(--sinch-comp-button-color-subtle-primary-default-icon-initial);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-initial)}:host([type=subtle-secondary]){--sinch-local-color-background:var(--sinch-comp-button-color-subtle-secondary-default-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-subtle-secondary-default-border-initial);--sinch-local-color-outline-focus:var(--sinch-comp-button-color-subtle-secondary-default-outline-focus);--sinch-local-color-text:var(--sinch-comp-button-color-subtle-secondary-default-text-initial);--sinch-local-color-icon:var(--sinch-comp-button-color-subtle-secondary-default-icon-initial);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-initial)}:host([type=cta-primary]){--sinch-local-color-background:var(--sinch-comp-button-color-cta-primary-default-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-cta-primary-default-border-initial);--sinch-local-color-outline-focus:var(--sinch-comp-button-color-cta-primary-default-outline-focus);--sinch-local-color-text:var(--sinch-comp-button-color-cta-primary-default-text-initial);--sinch-local-color-icon:var(--sinch-comp-button-color-cta-primary-default-icon-initial);--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-primary-initial)}:host([type=cta-secondary]){--sinch-local-color-background:var(--sinch-comp-button-color-cta-secondary-default-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-cta-secondary-default-border-initial);--sinch-local-color-outline-focus:var(--sinch-comp-button-color-cta-secondary-default-outline-focus);--sinch-local-color-text:var(--sinch-comp-button-color-cta-secondary-default-text-initial);--sinch-local-color-icon:var(--sinch-comp-button-color-cta-secondary-default-icon-initial);--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-secondary-initial)}:host([type=destructive]){--sinch-local-color-background:var(--sinch-comp-button-color-danger-default-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-danger-default-border-initial);--sinch-local-color-text:var(--sinch-comp-button-color-danger-default-text-initial);--sinch-local-color-outline-focus:var(--sinch-comp-button-color-danger-default-outline-focus);--sinch-local-shadow:var(--sinch-comp-button-shadow-danger-initial);--sinch-global-color-icon:var(--sinch-comp-button-color-danger-default-icon-initial)}:host([type=primary]:focus-visible){--sinch-local-shadow:var(--sinch-comp-button-shadow-primary-focus)}:host([type=secondary]:focus-visible){--sinch-local-shadow:var(--sinch-comp-button-shadow-secondary-focus)}:host([type=subtle-primary]:focus-visible){--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-focus)}:host([type=subtle-secondary]:focus-visible){--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-focus)}:host([type=cta-primary]:focus-visible){--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-primary-focus)}:host([type=cta-secondary]:focus-visible){--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-secondary-focus)}:host([type=destructive]:focus-visible){--sinch-local-shadow:var(--sinch-comp-button-shadow-danger-focus)}:host([type=primary]:hover){--sinch-local-color-background:var(--sinch-comp-button-color-primary-default-background-hover);--sinch-local-shadow:var(--sinch-comp-button-shadow-primary-hover)}:host([type=primary]:active){--sinch-local-color-background:var(--sinch-comp-button-color-primary-default-background-active);--sinch-local-shadow:var(--sinch-comp-button-shadow-primary-active)}:host([type=secondary]:hover){--sinch-local-color-background:var(--sinch-comp-button-color-secondary-default-background-hover);--sinch-local-shadow:var(--sinch-comp-button-shadow-secondary-hover)}:host([type=secondary]:active){--sinch-local-color-background:var(--sinch-comp-button-color-secondary-default-background-active)}:host([type=subtle-primary]:hover){--sinch-local-color-background:var(--sinch-comp-button-color-subtle-primary-default-background-hover);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-hover)}:host([type=subtle-primary]:active){--sinch-local-color-background:var(--sinch-comp-button-color-subtle-primary-default-background-active);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-active)}:host([type=subtle-secondary]:hover){--sinch-local-color-background:var(--sinch-comp-button-color-subtle-secondary-default-background-hover);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-hover)}:host([type=subtle-secondary]:active){--sinch-local-color-background:var(--sinch-comp-button-color-subtle-secondary-default-background-active);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-active)}:host([type=cta-primary]:hover){--sinch-local-color-background:var(--sinch-comp-button-color-cta-primary-default-background-hover);--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-primary-hover)}:host([type=cta-primary]:active){--sinch-local-color-background:var(--sinch-comp-button-color-cta-primary-default-background-active);--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-primary-active)}:host([type=cta-secondary]:hover){--sinch-local-color-background:var(--sinch-comp-button-color-cta-secondary-default-background-hover);--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-secondary-hover)}:host([type=cta-secondary]:active){--sinch-local-color-background:var(--sinch-comp-button-color-cta-secondary-default-background-active);--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-secondary-active)}:host([type=destructive]:hover){--sinch-local-color-background:var(--sinch-comp-button-color-danger-default-background-hover);--sinch-local-shadow:var(--sinch-comp-button-shadow-danger-hover)}:host([type=destructive]:active){--sinch-local-color-background:var(--sinch-comp-button-color-danger-default-background-active);--sinch-local-shadow:var(--sinch-comp-button-shadow-danger-active)}:host([type=primary][disabled]){--sinch-local-color-background:var(--sinch-comp-button-color-primary-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-primary-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-button-color-primary-disabled-text-initial);--sinch-local-shadow:var(--sinch-comp-button-shadow-primary-disabled);--sinch-global-color-icon:var(--sinch-comp-button-color-primary-disabled-icon-initial)}:host([type=secondary][disabled]){--sinch-local-color-background:var(--sinch-comp-button-color-secondary-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-secondary-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-button-color-secondary-disabled-text-initial);--sinch-local-shadow:var(--sinch-comp-button-shadow-secondary-disabled);--sinch-global-color-icon:var(--sinch-comp-button-color-secondary-disabled-icon-initial)}:host([type=subtle-primary][disabled]){--sinch-local-color-background:var(--sinch-comp-button-color-subtle-primary-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-subtle-primary-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-button-color-subtle-primary-disabled-text-initial);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-disabled);--sinch-global-color-icon:var(--sinch-comp-button-color-subtle-primary-disabled-icon-initial)}:host([type=subtle-secondary][disabled]){--sinch-local-color-background:var(--sinch-comp-button-color-subtle-secondary-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-subtle-secondary-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-button-color-subtle-secondary-disabled-text-initial);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-disabled);--sinch-global-color-icon:var(--sinch-comp-button-color-subtle-secondary-disabled-icon-initial)}:host([type=cta-primary][disabled]){--sinch-local-color-background:var(--sinch-comp-button-color-cta-primary-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-cta-primary-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-button-color-cta-primary-disabled-text-initial);--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-primary-disabled);--sinch-global-color-icon:var(--sinch-comp-button-color-cta-primary-disabled-icon-initial)}:host([type=cta-secondary][disabled]){--sinch-local-color-background:var(--sinch-comp-button-color-cta-secondary-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-cta-secondary-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-button-color-cta-secondary-disabled-text-initial);--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-secondary-disabled);--sinch-global-color-icon:var(--sinch-comp-button-color-cta-secondary-disabled-icon-initial)}:host([type=destructive][disabled]){--sinch-local-color-background:var(--sinch-comp-button-color-danger-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-button-color-danger-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-button-color-danger-disabled-text-initial);--sinch-global-color-icon:var(--sinch-comp-button-color-danger-disabled-icon-initial)}:host([type]) button{display:none}:host([type][preventdefault]:not([use-history])) a{display:none}:host([type][preventdefault]:not([use-history])) button{display:inline-flex}</style><a referrerpolicy="no-referer"><span id="content"></span> <span id="icon-prefix"> </span><sinch-icon icons-version="2" name="fa-arrow-up-right" id="external-icon"></sinch-icon><sinch-icon icons-version="2" name="fa-arrow-right" id="standalone-icon"></sinch-icon></a><button type="button"><span id="button-content"></span></button>';
|
|
8
8
|
const template = document.createElement("template");
|
|
9
9
|
template.innerHTML = templateHTML;
|
|
@@ -133,10 +133,10 @@ class Link extends NectaryElement {
|
|
|
133
133
|
set href(value) {
|
|
134
134
|
updateAttribute(this, "href", value);
|
|
135
135
|
}
|
|
136
|
-
set
|
|
136
|
+
set useHistory(value) {
|
|
137
137
|
updateBooleanAttribute(this, "use-history", value);
|
|
138
138
|
}
|
|
139
|
-
get
|
|
139
|
+
get useHistory() {
|
|
140
140
|
return getBooleanAttribute(this, "use-history");
|
|
141
141
|
}
|
|
142
142
|
set disabled(isDisabled) {
|
|
@@ -170,7 +170,7 @@ class Link extends NectaryElement {
|
|
|
170
170
|
return getBooleanAttribute(this, "preventdefault");
|
|
171
171
|
}
|
|
172
172
|
get #$activeElement() {
|
|
173
|
-
return this.preventDefault && !this
|
|
173
|
+
return this.preventDefault && !this.useHistory ? this.#$button : this.#$anchor;
|
|
174
174
|
}
|
|
175
175
|
get focusable() {
|
|
176
176
|
return true;
|
|
@@ -190,7 +190,7 @@ class Link extends NectaryElement {
|
|
|
190
190
|
#onAnchorClick = (e) => {
|
|
191
191
|
if (this.preventDefault) {
|
|
192
192
|
e.preventDefault();
|
|
193
|
-
if (this
|
|
193
|
+
if (this.useHistory) {
|
|
194
194
|
history.pushState({}, "", this.href);
|
|
195
195
|
}
|
|
196
196
|
}
|
package/link/types.d.ts
CHANGED
|
@@ -3,31 +3,31 @@ export type TSinchLinkType = 'primary' | 'secondary' | 'subtle-primary' | 'subtl
|
|
|
3
3
|
export type TSinchLinkProps = {
|
|
4
4
|
/** Text content of hyperlink */
|
|
5
5
|
text: string;
|
|
6
|
-
/** URL that hyperlink
|
|
6
|
+
/** URL that hyperlink points to */
|
|
7
7
|
href: string;
|
|
8
8
|
/** Renders the link with button visuals matching the given button type. Omit for default inline link styling. */
|
|
9
9
|
type?: TSinchLinkType;
|
|
10
10
|
/** Replaces the anchor tag behaviour to use history instead */
|
|
11
11
|
'use-history'?: boolean;
|
|
12
|
-
/**
|
|
12
|
+
/** Whether the link is disabled or not */
|
|
13
13
|
disabled?: boolean;
|
|
14
|
-
/** Sets `target="_blank" and a special external icon on the left side */
|
|
14
|
+
/** Sets `target="_blank"` and a special external icon on the left side */
|
|
15
15
|
external?: boolean;
|
|
16
16
|
/** Special standalone (`display: block`) mode with an arrow icon on the right side */
|
|
17
17
|
standalone?: boolean;
|
|
18
18
|
/** Prevents default behaviour on hyperlink click */
|
|
19
19
|
preventDefault?: boolean;
|
|
20
|
-
/** Render link text as code
|
|
21
|
-
|
|
20
|
+
/** Render link text as code */
|
|
21
|
+
'content-as-code'?: boolean;
|
|
22
22
|
/** Label that is used for a11y – might be different from `text` */
|
|
23
23
|
'aria-label': string;
|
|
24
24
|
};
|
|
25
25
|
export type TSinchLinkEvents = {
|
|
26
|
-
/** Click
|
|
26
|
+
/** Click event handler */
|
|
27
27
|
'-click'?: (e: CustomEvent<void>) => void;
|
|
28
|
-
/** Focus
|
|
28
|
+
/** Focus event handler */
|
|
29
29
|
'-focus'?: (e: CustomEvent<void>) => void;
|
|
30
|
-
/** Blur
|
|
30
|
+
/** Blur event handler */
|
|
31
31
|
'-blur'?: (e: CustomEvent<void>) => void;
|
|
32
32
|
};
|
|
33
33
|
export type TSinchLinkStyle = {
|
package/list/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-list");
|
package/list/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
2
2
|
const templateHTML = '<style>:host{display:block;height:100%}#wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;overflow-y:auto}</style><div id="wrapper"><slot></slot></div>';
|
|
3
3
|
const template = document.createElement("template");
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-list-item");
|
package/list-item/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
2
2
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{width:100%;height:100%;box-sizing:border-box;overflow:hidden;padding:8px 0;background-color:var(--sinch-comp-list-color-default-background-initial);border-bottom:1px solid var(--sinch-comp-list-color-default-border-initial)}:host(:last-child)>#wrapper{border-bottom:none}:host(:hover)>#wrapper{background-color:var(--sinch-comp-list-color-default-background-hover)}</style><div id="wrapper"><slot name="content"></slot></div>';
|
|
3
3
|
const template = document.createElement("template");
|
|
4
4
|
template.innerHTML = templateHTML;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nectary/components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.43.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"**/*/*.css",
|
|
6
6
|
"**/*/*.json",
|
|
@@ -18,9 +18,13 @@
|
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "rm -rf utils/shared && cp -r ../shared utils/shared && npx tsx ../scripts/minify-html.ts && vite build && vite build --mode bundle && npx tsc --declaration --emitDeclarationOnly && npx tsx ../scripts/tsc-alias.ts --alias '@nectary/shared=./utils/shared'",
|
|
23
|
+
"dev": "vite build --watch"
|
|
24
|
+
},
|
|
21
25
|
"dependencies": {
|
|
22
26
|
"@babel/runtime": "^7.22.15",
|
|
23
|
-
"@nectary/assets": "3.
|
|
27
|
+
"@nectary/assets": "3.6.14"
|
|
24
28
|
},
|
|
25
29
|
"devDependencies": {
|
|
26
30
|
"@babel/cli": "^7.22.15",
|
|
@@ -30,16 +34,12 @@
|
|
|
30
34
|
"@babel/preset-typescript": "^7.22.15",
|
|
31
35
|
"@types/node": "22.12.0",
|
|
32
36
|
"@types/react": "^18.2.21",
|
|
37
|
+
"babel-plugin-html-inline-minifier": "workspace:*",
|
|
33
38
|
"dts-bundle-generator": "^9.5.1",
|
|
34
39
|
"typescript": "^5.2.2",
|
|
35
|
-
"vite": "^7.0.6"
|
|
36
|
-
"babel-plugin-html-inline-minifier": "0.0.0"
|
|
40
|
+
"vite": "^7.0.6"
|
|
37
41
|
},
|
|
38
42
|
"peerDependencies": {
|
|
39
|
-
"@nectary/theme-base": "
|
|
40
|
-
},
|
|
41
|
-
"scripts": {
|
|
42
|
-
"build": "rm -rf utils/shared && cp -r ../shared utils/shared && npx tsx ../scripts/minify-html.ts && vite build && vite build --mode bundle && npx tsc --declaration --emitDeclarationOnly && npx tsx ../scripts/tsc-alias.ts --alias '@nectary/shared=./utils/shared'",
|
|
43
|
-
"dev": "vite build --watch"
|
|
43
|
+
"@nectary/theme-base": "1.17.0"
|
|
44
44
|
}
|
|
45
|
-
}
|
|
45
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-pagination");
|
package/pagination/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare class Pagination extends NectaryElement {
|
|
|
16
16
|
get focusable(): boolean;
|
|
17
17
|
focus(): void;
|
|
18
18
|
blur(): void;
|
|
19
|
-
get prevButtonRect():
|
|
20
|
-
get nextButtonRect():
|
|
19
|
+
get prevButtonRect(): TRect;
|
|
20
|
+
get nextButtonRect(): TRect;
|
|
21
21
|
nthButtonRect(index: number): TRect | null;
|
|
22
22
|
}
|
package/pagination/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import "../icon/index.js";
|
|
2
|
+
import { updateAttribute, getIntegerAttribute, setClass } from "../utils/dom.js";
|
|
3
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
|
+
import { getRect } from "../utils/rect.js";
|
|
5
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
6
|
+
import { isTargetEqual, getTargetIndexInParent } from "../utils/event-target.js";
|
|
7
7
|
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{display:flex;justify-content:center;gap:8px;width:100%;height:var(--sinch-local-size);--sinch-local-size:24px}button{all:initial;position:relative;display:flex;justify-content:center;align-items:center;min-width:var(--sinch-local-size);height:var(--sinch-local-size);cursor:pointer;border-radius:var(--sinch-comp-pagination-shape-radius);user-select:none;--sinch-global-color-icon:var(--sinch-comp-pagination-color-default-icon-default)}button:focus-visible::before{content:"";position:absolute;inset:-3px;border:2px solid var(--sinch-comp-pagination-color-default-outline-focus);border-radius:calc(var(--sinch-comp-pagination-shape-radius) + 3px);pointer-events:none}button:disabled{--sinch-global-color-icon:var(--sinch-comp-pagination-color-disabled-icon-initial);cursor:initial}button:enabled:hover{background-color:var(--sinch-comp-pagination-color-default-background-hover)}button>*{display:block;overflow:hidden;pointer-events:none}.page{font:var(--sinch-comp-pagination-font-default-page-number);color:var(--sinch-comp-pagination-color-default-text-initial);background-color:var(--sinch-comp-pagination-color-default-background-initial);padding:0 4px;box-sizing:border-box}.page.dots>span{display:none}.page.dots::after{content:"..."}.page.active{font:var(--sinch-comp-pagination-font-checked-page-number);background-color:var(--sinch-comp-pagination-color-checked-background-initial);pointer-events:none;cursor:initial}.page.active:hover{background-color:var(--sinch-comp-pagination-color-checked-background-hover)}.page.hidden{display:none}#left,#right{--sinch-icon-size:24px}</style><nav id="wrapper"><button id="left" aria-label="Go back"><sinch-icon icons-version="2" name="fa-angle-left" id="icon-left"></sinch-icon></button> <button class="page"><span>1</span></button> <button class="page active"><span>2</span></button> <button class="page"><span>3</span></button> <button class="page"><span>4</span></button> <button class="page"><span>5</span></button> <button class="page dots"><span>6</span></button> <button class="page"><span>20</span></button> <button id="right" aria-label="Go forward"><sinch-icon icons-version="2" name="fa-angle-right" id="icon-right"></sinch-icon></button></nav>';
|
|
8
8
|
const NUM_BUTTONS = 7;
|
|
9
9
|
const MIDDLE_BTN_INDEX = Math.floor(NUM_BUTTONS / 2);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-persistent-overlay");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import "../dialog/index.js";
|
|
2
|
+
import { updateAttribute, getAttribute, updateBooleanAttribute, getBooleanAttribute, isAttrTrue } from "../utils/dom.js";
|
|
3
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
5
5
|
const templateHTML = '<style>#persisted-dialog{--sinch-dialog-close-button-display:none}::slotted(*){display:block}</style><sinch-dialog id="persisted-dialog" prevent-close><div slot="icon"><slot id="icon" name="icon"></slot></div><div slot="content"><slot name="content"></slot></div><div slot="buttons"><slot name="buttons"></slot></div></sinch-dialog>';
|
|
6
6
|
const template = document.createElement("template");
|
|
7
7
|
template.innerHTML = templateHTML;
|
package/pop/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-pop");
|
package/pop/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class Pop extends NectaryElement {
|
|
|
25
25
|
set inset(inset: number);
|
|
26
26
|
get inset(): number;
|
|
27
27
|
get footprintRect(): TRect;
|
|
28
|
-
get popoverRect():
|
|
28
|
+
get popoverRect(): TRect;
|
|
29
29
|
get shouldCloseOnBackdropClick(): boolean;
|
|
30
30
|
get shouldRestoreFocusOnClose(): boolean;
|
|
31
31
|
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
package/pop/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { Context, subscribeContext } from "../utils/context.js";
|
|
2
|
+
import { getBooleanAttribute, updateBooleanAttribute, getLiteralAttribute, updateLiteralAttribute, updateIntegerAttribute, getIntegerAttribute, isAttrEqual, getScrollableParents, getTransformedAncestor, isAttrTrue } from "../utils/dom.js";
|
|
3
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
|
+
import { getRect } from "../utils/rect.js";
|
|
5
|
+
import { getFirstSlotElement, getFirstFocusableElement, isElementFocused } from "../utils/slot.js";
|
|
6
|
+
import { throttleAnimationFrame } from "../utils/throttle.js";
|
|
7
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
8
|
+
import { isTargetEqual } from "../utils/event-target.js";
|
|
9
|
+
import { getPlacementContext, toLocalRect } from "../utils/placement.js";
|
|
10
|
+
import { orientationValues, disableOverscroll, enableOverscroll, getAnchorPosition, clampPosition } from "./utils.js";
|
|
10
11
|
const templateHTML = '<style>:host{display:contents;position:relative}dialog{position:fixed;left:0;top:0;transform:translate(var(--sinch-pop-offset-x),var(--sinch-pop-offset-y));margin:0;outline:0;padding:0;border:none;box-sizing:border-box;max-width:unset;max-height:unset;z-index:var(--sinch-comp-pop-z-index,1);background:0 0;overflow:visible}dialog:not([open]){display:none}dialog::backdrop{background-color:transparent}#content{position:relative;z-index:var(--sinch-comp-pop-z-index,1)}#target-open{display:flex;flex-direction:column;position:absolute;left:0;top:0}#focus{display:none;position:absolute;width:0;height:0}</style><slot id="target" name="target" aria-haspopup="dialog" aria-expanded="false"></slot><div id="focus"></div><dialog id="dialog"><div id="target-open"><slot name="target-open"></slot></div><div id="content"><slot name="content"></slot></div></dialog>';
|
|
11
12
|
const template = document.createElement("template");
|
|
12
13
|
template.innerHTML = templateHTML;
|
package/popover/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-popover");
|
package/popover/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import "../pop/index.js";
|
|
2
|
+
import { subscribeContext } from "../utils/context.js";
|
|
3
|
+
import { updateAttribute, isAttrEqual, updateBooleanAttribute, isAttrTrue, getBooleanAttribute, getLiteralAttribute, updateLiteralAttribute, setClass } from "../utils/dom.js";
|
|
4
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
5
|
+
import { rectOverlap } from "../utils/rect.js";
|
|
6
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
7
|
+
import { getPopOrientation, orientationValues } from "./utils.js";
|
|
8
8
|
const templateHTML = '<style>:host{display:contents}#content-wrapper{position:relative;padding-top:4px;width:fit-content;min-width:100%}:host([tip]) #content-wrapper{padding-top:12px;filter:drop-shadow(var(--sinch-comp-popover-shadow))}:host([orientation^=top]) #content-wrapper{padding-top:0;padding-bottom:4px}:host([orientation=left]) #content-wrapper{padding-top:0;padding-right:4px}:host([orientation=right]) #content-wrapper{padding-top:0;padding-left:4px}:host([orientation^=top][tip]) #content-wrapper{padding-top:0;padding-bottom:12px}:host([orientation=left][tip]) #content-wrapper{padding-top:0;padding-right:12px}:host([orientation=right][tip]) #content-wrapper{padding-top:0;padding-left:12px}#content{background-color:var(--sinch-comp-popover-color-default-background-initial);border:1px solid var(--sinch-comp-popover-color-default-border-initial);border-radius:var(--sinch-comp-popover-shape-radius);box-shadow:var(--sinch-comp-popover-shadow);overflow:hidden}:host([tip]) #content{box-shadow:none}#tip{position:absolute;left:50%;top:13px;transform:translateX(-50%) rotate(180deg);transform-origin:top center;fill:var(--sinch-comp-popover-color-default-background-initial);stroke:var(--sinch-comp-popover-color-default-border-initial);stroke-linecap:square;pointer-events:none;display:none}:host([orientation^=top]) #tip{transform:translateX(-50%) rotate(0);top:calc(100% - 13px)}:host([orientation=left]) #tip{transform:translateX(-50%) rotate(-90deg);top:calc(50%);left:calc(100% - 13px)}:host([orientation=right]) #tip{transform:translateX(-50%) rotate(90deg);top:calc(50%);left:13px}:host([tip]) #tip:not(.hidden){display:block}</style><sinch-pop id="pop" inset="4"><slot name="target" slot="target"></slot><div id="content-wrapper" slot="content"><div id="content"><slot name="content"></slot></div><svg id="tip" width="16" height="9" aria-hidden="true"><path d="m0 0 8 8 8 -8"/></svg></div></sinch-pop>';
|
|
9
9
|
const TIP_SIZE = 16;
|
|
10
10
|
const template = document.createElement("template");
|
package/progress/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-progress");
|
package/progress/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import "../text/index.js";
|
|
2
|
+
import { isAttrEqual, updateBooleanAttribute, isAttrTrue, attrValueToFloat, getIntegerAttribute, updateAttribute, getBooleanAttribute } from "../utils/dom.js";
|
|
3
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
4
|
const templateHTML = '<style>:host{display:block}#wrapper{display:flex;align-items:center;height:24px}#bar,#progress{height:8px;border-radius:4px}#progress{background-color:var(--sinch-comp-progress-color-default-background-initial);flex:1;min-width:0}#bar{background-color:var(--sinch-comp-progress-color-default-bar-initial);width:0}#text{display:none;width:46px;--sinch-global-color-text:var(--sinch-comp-progress-color-default-text-initial)}:host([detailed]) #text{display:block}</style><div id="wrapper"><sinch-text id="text" type="m"></sinch-text><div id="progress"><div id="bar"></div></div></div>';
|
|
5
5
|
const template = document.createElement("template");
|
|
6
6
|
template.innerHTML = templateHTML;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-progress-stepper");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { isProgressStepperItemActive, setProgressStepperItemChecked, setProgressStepperItemActiveDescendant, setProgressStepperItemStatus, isProgressStepperItemChecked } from "../progress-stepper-item/utils.js";
|
|
2
|
+
import { updateAttribute, getAttribute } from "../utils/dom.js";
|
|
3
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
|
+
import { getRect } from "../utils/rect.js";
|
|
5
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
6
|
+
import { getTargetByAttribute } from "../utils/event-target.js";
|
|
7
7
|
const templateHTML = '<style>:host{display:block}#wrapper{display:flex;width:100%}::slotted(sinch-progress-stepper-item){flex:1;min-width:0}</style><div id="wrapper"><slot></slot></div>';
|
|
8
8
|
const template = document.createElement("template");
|
|
9
9
|
template.innerHTML = templateHTML;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-progress-stepper-item");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import "../index.
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import "../icon/index.js";
|
|
2
|
+
import "../text/index.js";
|
|
3
|
+
import { isAttrEqual, updateExplicitBooleanAttribute, updateBooleanAttribute, isAttrTrue, updateAttribute, getAttribute, getBooleanAttribute } from "../utils/dom.js";
|
|
4
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
5
|
+
import { ATTR_PROGRESS_STEPPER_ITEM_STATUS, ATTR_PROGRESS_STEPPER_ITEM_CHECKED, ATTR_PROGRESS_STEPPER_ITEM_ACTIVE_DESCENDANT, isProgressStepperItemActiveDescendant, isProgressStepperItemActive } from "./utils.js";
|
|
6
6
|
const templateHTML = '<style>:host{display:block;outline:0}#button{position:relative;display:flex;flex-direction:column;gap:4px;width:100%;height:100%;padding:8px 4px 4px;box-sizing:border-box;cursor:pointer;border-radius:var(--sinch-comp-progress-stepper-step-shape-radius)}:host([data-status=inactive])>#button{cursor:not-allowed}:host([data-status=incomplete]:hover)>#button{background-color:var(--sinch-comp-progress-stepper-step-color-incomplete-background-hover)}:host([data-status=complete]:hover)>#button{background-color:var(--sinch-comp-progress-stepper-step-color-complete-background-hover)}:host([data-status=invalid]:hover)>#button{background-color:var(--sinch-comp-progress-stepper-step-color-invalid-background-hover)}#outline{position:absolute;inset:-2px;border:2px solid var(--sinch-comp-progress-stepper-step-color-outline-focus);border-radius:calc(var(--sinch-comp-progress-stepper-step-shape-radius) + 2px);pointer-events:none;opacity:0}:host(:focus-visible) #outline{opacity:1}#text{flex-shrink:1;flex-basis:auto;min-width:0;transform:translate(0,0);will-change:transform;transition:transform .25s ease-out;padding-right:24px}:host([data-status=incomplete]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-step-color-incomplete-label-default);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-step-font-incomplete-label)}:host([data-status=complete]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-step-color-complete-label-default);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-step-font-complete-label)}:host([data-status=inactive]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-step-color-inactive-label-default);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-step-font-inactive-label)}:host([invalid]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-step-color-invalid-label-default);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-step-font-invalid-label);transform:translate(24px,0)}:host([data-status=incomplete][data-checked]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-step-color-incomplete-current-label-default);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-step-font-incomplete-current-label)}:host([data-status=complete][data-checked]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-step-color-complete-current-label-default);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-step-font-complete-current-label)}:host([invalid][data-checked]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-step-color-invalid-label-default);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-step-font-invalid-current-label)}#icon-error{position:absolute;left:0;top:4px;pointer-events:none;opacity:0;transition:opacity .25s ease-in-out;--sinch-global-color-icon:var(--sinch-comp-progress-stepper-step-color-invalid-icon-default);--sinch-global-size-icon:16px}:host([invalid]) #icon-error{opacity:1}#progress{height:8px;border-radius:4px;transition:background-color .25s ease-in-out}:host([data-status=incomplete]) #progress{background-color:var(--sinch-comp-progress-stepper-step-color-incomplete-progress-background)}:host([data-status=complete]) #progress{background-color:var(--sinch-comp-progress-stepper-step-color-complete-progress-background)}:host([data-status=inactive]) #progress{background-color:var(--sinch-comp-progress-stepper-step-color-inactive-progress-background)}:host([invalid]) #progress{background-color:var(--sinch-comp-progress-stepper-step-color-invalid-progress-background)}#bar{width:8px;height:8px;border-radius:4px;opacity:0;transition:width .25s ease-in-out,opacity .25s ease-in-out}:host([data-status=incomplete]) #bar{background-color:var(--sinch-comp-progress-stepper-step-color-incomplete-progress-bar)}:host([data-status=complete]) #bar{background-color:var(--sinch-comp-progress-stepper-step-color-complete-progress-bar);width:100%}:host([data-status=complete]:not([invalid])) #bar,:host([data-status=incomplete]:not([invalid])) #bar{opacity:1}#label-bar{position:relative}</style><div id="button"><div id="progress"><div id="bar"></div></div><div id="label-bar"><sinch-icon icons-version="2" name="triangle-exclamation" id="icon-error" aria-hidden="true"></sinch-icon><sinch-text id="text" type="m"></sinch-text></div><div id="outline"></div></div>';
|
|
7
7
|
const template = document.createElement("template");
|
|
8
8
|
template.innerHTML = templateHTML;
|
|
@@ -2,10 +2,10 @@ type TSinchProgressStepperItemStatus = 'inactive' | 'incomplete' | 'invalid' | '
|
|
|
2
2
|
export declare const ATTR_PROGRESS_STEPPER_ITEM_CHECKED = "data-checked";
|
|
3
3
|
export declare const ATTR_PROGRESS_STEPPER_ITEM_STATUS = "data-status";
|
|
4
4
|
export declare const ATTR_PROGRESS_STEPPER_ITEM_ACTIVE_DESCENDANT = "data-active-descendant";
|
|
5
|
-
export declare const isProgressStepperItemChecked: ($el: Element) =>
|
|
6
|
-
export declare const setProgressStepperItemChecked: ($el: Element, isChecked: boolean) =>
|
|
5
|
+
export declare const isProgressStepperItemChecked: ($el: Element) => boolean;
|
|
6
|
+
export declare const setProgressStepperItemChecked: ($el: Element, isChecked: boolean) => void;
|
|
7
7
|
export declare const isProgressStepperItemActive: ($el: Element) => boolean;
|
|
8
|
-
export declare const setProgressStepperItemStatus: ($el: Element, status: TSinchProgressStepperItemStatus) =>
|
|
9
|
-
export declare const isProgressStepperItemActiveDescendant: ($el: Element) =>
|
|
10
|
-
export declare const setProgressStepperItemActiveDescendant: ($el: Element, isActiveDescendant: boolean) =>
|
|
8
|
+
export declare const setProgressStepperItemStatus: ($el: Element, status: TSinchProgressStepperItemStatus) => void;
|
|
9
|
+
export declare const isProgressStepperItemActiveDescendant: ($el: Element) => boolean;
|
|
10
|
+
export declare const setProgressStepperItemActiveDescendant: ($el: Element, isActiveDescendant: boolean) => void;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute } from "../utils/dom.js";
|
|
2
2
|
const ATTR_PROGRESS_STEPPER_ITEM_CHECKED = "data-checked";
|
|
3
3
|
const ATTR_PROGRESS_STEPPER_ITEM_STATUS = "data-status";
|
|
4
4
|
const ATTR_PROGRESS_STEPPER_ITEM_ACTIVE_DESCENDANT = "data-active-descendant";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-progress-stepper-item-v2");
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import "../index.
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import "../icon/index.js";
|
|
2
|
+
import "../text/index.js";
|
|
3
|
+
import { fillProgressStepperStepChipHost } from "../progress-stepper-v2/step-chip.js";
|
|
4
|
+
import { isAttrEqual, updateBooleanAttribute, isAttrTrue, updateExplicitBooleanAttribute, updateAttribute, getAttribute, getBooleanAttribute } from "../utils/dom.js";
|
|
5
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
6
|
+
import { TAG_PROGRESS_STEPPER_ITEM, ATTR_PROGRESS_STEPPER_ITEM_STATUS, ATTR_PROGRESS_STEPPER_ITEM_CHECKED, syncProgressStepperItemsRovingTabIndexes } from "./utils.js";
|
|
6
7
|
const templateHTML = '<style>:host{display:grid;grid-template-columns:minmax(0,max-content);grid-template-rows:minmax(0,1fr);min-height:0;min-width:0;outline:0}#button{position:relative;grid-area:1/1;align-self:stretch;justify-self:stretch;display:flex;flex-direction:column;justify-content:center;gap:0;width:100%;min-width:100%;min-height:0;padding:8px 4px;box-sizing:border-box;cursor:pointer;border-radius:var(--sinch-comp-progress-stepper-v2-step-shape-radius-container)}:host([data-stepper-layout=horizontal]) #button{padding:8px 12px 8px 10px}#label-bar{position:relative;width:100%;min-width:0}:host([data-status=inactive])>#button{cursor:default}:host([data-status=incomplete]:hover)>#button{background-color:var(--sinch-comp-progress-stepper-v2-step-color-incomplete-background-hover)}:host([data-status=complete]:hover)>#button{background-color:var(--sinch-comp-progress-stepper-v2-step-color-complete-background-hover)}:host([invalid]:not([data-status=inactive]):hover)>#button{background-color:var(--sinch-comp-progress-stepper-v2-step-color-invalid-background-hover)}#outline{position:absolute;inset:-2px;border:2px solid var(--sinch-comp-progress-stepper-v2-step-color-outline-focus);border-radius:calc(var(--sinch-comp-progress-stepper-v2-step-shape-radius-container) + 2px);pointer-events:none;opacity:0}:host(:focus-visible) #outline,:host([data-force-focus-visible]) #outline{opacity:1}#text{flex-shrink:1;flex-basis:auto;min-width:0;transition:color .25s ease-out}#label-content{display:flex;align-items:center;gap:8px;min-width:0}:host([invalid]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-v2-step-color-invalid-label-initial);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-v2-step-font-label-initial)}:host(:is([data-status=incomplete],[data-status=inactive]):not([invalid])) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-v2-step-color-incomplete-label-initial);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-v2-step-font-label-initial)}:host([data-status=complete]:not([invalid])) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-v2-step-color-complete-label-initial);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-v2-step-font-label-initial)}:host([invalid][data-checked]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-v2-step-color-invalid-label-current);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-v2-step-font-label-current)}:host(:is([data-status=incomplete],[data-status=inactive]):not([invalid])[data-checked]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-v2-step-color-incomplete-label-current);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-v2-step-font-label-current)}:host([data-status=complete]:not([invalid])[data-checked]) #text{--sinch-global-color-text:var(--sinch-comp-progress-stepper-v2-step-color-complete-label-current);--sinch-comp-text-font:var(--sinch-comp-progress-stepper-v2-step-font-label-current)}</style><div id="button"><div id="label-bar"><div id="label-content"><span id="index" aria-hidden="true"></span><sinch-text id="text" type="m"></sinch-text></div></div><div id="outline"></div></div>';
|
|
7
8
|
const template = document.createElement("template");
|
|
8
9
|
template.innerHTML = templateHTML;
|
|
@@ -5,10 +5,10 @@ export declare const ATTR_PROGRESS_STEPPER_ITEM_CHECKED = "data-checked";
|
|
|
5
5
|
export declare const ATTR_PROGRESS_STEPPER_ITEM_STATUS = "data-status";
|
|
6
6
|
/** Set by `sinch-progress-stepper-v2` on default-slot items for layout-specific styling. */
|
|
7
7
|
export declare const ATTR_PROGRESS_STEPPER_ITEM_LAYOUT = "data-stepper-layout";
|
|
8
|
-
export declare const isProgressStepperItemChecked: ($el: Element) =>
|
|
9
|
-
export declare const setProgressStepperItemChecked: ($el: Element, isChecked: boolean) =>
|
|
8
|
+
export declare const isProgressStepperItemChecked: ($el: Element) => boolean;
|
|
9
|
+
export declare const setProgressStepperItemChecked: ($el: Element, isChecked: boolean) => void;
|
|
10
10
|
export declare const isProgressStepperItemActive: ($el: Element) => boolean;
|
|
11
|
-
export declare const setProgressStepperItemStatus: ($el: Element, status: TSinchProgressStepperItemStatus) =>
|
|
11
|
+
export declare const setProgressStepperItemStatus: ($el: Element, status: TSinchProgressStepperItemStatus) => void;
|
|
12
12
|
/**
|
|
13
13
|
* Nested shadow trees (e.g. `sinch-text` inside a step) break `shadowRoot.contains(active)` —
|
|
14
14
|
* walk up through shadow boundaries, and optionally use `composedPath()` from the key event.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute } from "../utils/dom.js";
|
|
2
2
|
const TAG_PROGRESS_STEPPER = "sinch-progress-stepper-v2";
|
|
3
3
|
const TAG_PROGRESS_STEPPER_ITEM = "sinch-progress-stepper-item-v2";
|
|
4
4
|
const ATTR_PROGRESS_STEPPER_ITEM_CHECKED = "data-checked";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { isProgressStepperItemActive, ATTR_PROGRESS_STEPPER_ITEM_STATUS } from "../progress-stepper-item-v2/utils.js";
|
|
2
|
+
import { subscribeContext } from "../utils/context.js";
|
|
3
|
+
import { getBooleanAttribute, updateBooleanAttribute, getAttribute, createScopedElement, updateAttribute } from "../utils/dom.js";
|
|
4
|
+
import { resolveCompactMenuAndPopAriaLabel, formatCompactTemplate, resolveCompactCounterFormat, resolveCompactTriggerAriaLabel } from "./compact-format.js";
|
|
5
|
+
import { fillProgressStepperStepChipHost } from "./step-chip.js";
|
|
5
6
|
class ProgressStepperCompactController {
|
|
6
7
|
#$actionMenu;
|
|
7
8
|
#$compactPop;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-progress-stepper-v2");
|