@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/button/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-button");
|
package/button/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { Context, subscribeContext } from "../utils/context.js";
|
|
2
|
+
import { isAttrEqual, updateAttribute, updateBooleanAttribute, isAttrTrue, updateLiteralAttribute, getLiteralAttribute, getAttribute, getBooleanAttribute } from "../utils/dom.js";
|
|
3
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
5
|
+
import { requestSubmitForm } from "../utils/form.js";
|
|
6
|
+
import { sizeExValues, DEFAULT_SIZE } from "../utils/size.js";
|
|
7
|
+
import { typeValues, formTypeValues } from "./utils.js";
|
|
8
8
|
const templateHTML = '<style>:host{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-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}:host([disabled]){cursor:initial}#button{all:initial;display:block;position:relative;width:100%;height:var(--sinch-local-size);user-select:none;--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);--sinch-global-color-icon:var(--sinch-local-color-icon)}:host([data-size="l"])>#button{--sinch-local-size:var(--sinch-comp-button-size-container-l);--sinch-local-padding:var(--sinch-comp-button-spacing-padding-l, 16px);--sinch-local-gap:var(--sinch-comp-button-spacing-gap-l, 12px);--sinch-button-set-size-shape-radius:var(--sinch-comp-button-shape-radius-size-l);--sinch-local-font:var(--sinch-comp-button-font-size-l-text);--sinch-global-size-icon:var(--sinch-comp-button-size-icon-l)}:host([data-size="m"])>#button{--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-button-set-size-shape-radius:var(--sinch-comp-button-shape-radius-size-m);--sinch-local-font:var(--sinch-comp-button-font-size-m-text);--sinch-global-size-icon:var(--sinch-comp-button-size-icon-m)}:host([data-size="s"])>#button{--sinch-local-size:var(--sinch-comp-button-size-container-s);--sinch-local-padding:var(--sinch-comp-button-spacing-padding-s, 16px);--sinch-local-gap:var(--sinch-comp-button-spacing-gap-s, 12px);--sinch-button-set-size-shape-radius:var(--sinch-comp-button-shape-radius-size-s);--sinch-local-font:var(--sinch-comp-button-font-size-s-text);--sinch-global-size-icon:var(--sinch-comp-button-size-icon-s)}:host([data-size=xs])>#button{--sinch-local-size:var(--sinch-comp-button-size-container-xs);--sinch-local-padding:var(--sinch-comp-button-spacing-padding-xs, 8px);--sinch-local-gap:var(--sinch-comp-button-spacing-gap-xs, 8px);--sinch-button-set-size-shape-radius:var(--sinch-comp-button-shape-radius-size-xs);--sinch-local-font:var(--sinch-comp-button-font-size-s-text);--sinch-global-size-icon:var(--sinch-comp-button-size-icon-xs)}:host(:is([text=""],:not([text])))>#button{--sinch-local-padding:var(--sinch-comp-button-spacing-icon-only-padding-m, 8px)}:host([data-size="l"]:is([text=""],:not([text])))>#button{--sinch-local-padding:var(--sinch-comp-button-spacing-icon-only-padding-l, 8px)}:host([data-size="s"]:is([text=""],:not([text])))>#button{--sinch-local-padding:var(--sinch-comp-button-spacing-icon-only-padding-s, 4px)}:host([data-size=xs]:is([text=""],:not([text])))>#button{--sinch-local-padding:var(--sinch-comp-button-spacing-icon-only-padding-xs, 4px)}:host([type=primary])>#button{--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(:not([type]))>#button,:host([type=secondary])>#button{--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])>#button,:host([type=tertiary])>#button{--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(:not([type]):is([text=""],:not([text])))>#button,:host([type=subtle-secondary])>#button{--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])>#button{--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])>#button{--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])>#button{--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-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)>#button{--sinch-local-shadow:var(--sinch-comp-button-shadow-primary-focus)}:host(:not([type]):focus-visible)>#button,:host([type=secondary]:focus-visible)>#button{--sinch-local-shadow:var(--sinch-comp-button-shadow-secondary-focus)}:host([type=subtle-primary]:focus-visible)>#button,:host([type=tertiary]:focus-visible)>#button{--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-focus)}:host(:not([type]):is([text=""],:not([text])):focus-visible)>#button,:host([type=subtle-secondary]:focus-visible)>#button{--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-focus)}:host([type=cta-primary]:focus-visible)>#button{--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-primary-focus)}:host([type=cta-secondary]:focus-visible)>#button{--sinch-local-shadow:var(--sinch-comp-button-shadow-cta-secondary-focus)}:host([type=destructive]:focus-visible)>#button{--sinch-local-shadow:var(--sinch-comp-button-shadow-danger-focus)}:host([toggled]:not([disabled])[type=subtle-primary])>#button{--sinch-local-color-background:var(--sinch-comp-button-color-subtle-primary-toggled-background-initial)}:host([toggled]:not([disabled]):not([type]):is([text=""],:not([text])))>#button,:host([toggled]:not([disabled])[type=subtle-secondary])>#button{--sinch-local-color-background:var(--sinch-comp-button-color-subtle-secondary-toggled-background-initial)}:host([type=primary]:hover)>#button{--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)>#button{--sinch-local-color-background:var(--sinch-comp-button-color-primary-default-background-active);--sinch-local-shadow:var(--sinch-comp-button-shadow-primary-active)}:host(:not([type]):hover)>#button,:host([type=secondary]:hover)>#button{--sinch-local-color-background:var(--sinch-comp-button-color-secondary-default-background-hover);--sinch-local-shadow:var(--sinch-comp-button-shadow-secondary-hover)}:host(:not([type]):active)>#button,:host([type=secondary]:active)>#button{--sinch-local-color-background:var(--sinch-comp-button-color-secondary-default-background-active)}:host([type=subtle-primary]:hover)>#button,:host([type=tertiary]:hover)>#button{--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)>#button,:host([type=tertiary]:active)>#button{--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(:not([type]):is([text=""],:not([text])):hover)>#button,:host([type=subtle-secondary]:hover)>#button{--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(:not([type]):is([text=""],:not([text])):active)>#button,:host([type=subtle-secondary]:active)>#button{--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)>#button{--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)>#button{--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)>#button{--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)>#button{--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)>#button{--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)>#button{--sinch-local-color-background:var(--sinch-comp-button-color-danger-default-background-active);--sinch-local-shadow:var(--sinch-comp-button-shadow-danger-active)}:host([toggled]:not([disabled])[type=subtle-primary]:hover)>#button{--sinch-local-color-background:var(--sinch-comp-button-color-subtle-primary-toggled-background-hover);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-hover)}:host([toggled]:not([disabled])[type=subtle-primary]:active)>#button{--sinch-local-color-background:var(--sinch-comp-button-color-subtle-primary-toggled-background-active);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-active)}:host([toggled]:not([disabled]):not([type]):is([text=""],:not([text])):hover)>#button,:host([toggled]:not([disabled])[type=subtle-secondary]:hover)>#button{--sinch-local-color-background:var(--sinch-comp-button-color-subtle-secondary-toggled-background-hover);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-hover)}:host([toggled]:not([disabled]):not([type]):is([text=""],:not([text])):active)>#button,:host([toggled]:not([disabled])[type=subtle-secondary]:active)>#button{--sinch-local-color-background:var(--sinch-comp-button-color-subtle-secondary-toggled-background-active);--sinch-local-shadow:var(--sinch-comp-button-shadow-subtle-active)}:host([type=primary][disabled])>#button{--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(:not([type])[disabled])>#button,:host([type=secondary][disabled])>#button{--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])>#button,:host([type=tertiary][disabled])>#button{--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(:not([type]):is([text=""],:not([text]))[disabled])>#button,:host([type=subtle-secondary][disabled])>#button{--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])>#button{--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])>#button{--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])>#button{--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)}#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(:not([disabled]):active) #button::before{border-width:2px}:host(:focus-visible) #button::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}#content{position:relative;display:flex;align-items:center;justify-content:center;gap:var(--sinch-local-gap);width:100%;height:100%;padding:0 var(--sinch-local-padding);box-sizing:border-box;pointer-events:none;overflow:hidden}#text{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(:is([text=""],:not([text]))) :is(#left-icon,#right-icon,#text){display:none}::slotted(*){display:block}:host([type=link]){display:inline;vertical-align:unset;user-select:auto}:host([type=link][disabled]){cursor:initial}:host([type=link])>#button{display:contents}:host([type=link]) #button::after,:host([type=link]) #button::before{content:none;display:none}:host([type=link]) #content{position:static;display:inline;overflow:visible;box-sizing:border-box;width:auto;height:auto;padding:0;pointer-events:auto;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([type=link]:hover) #content{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([type=link]:focus-visible) #content{outline:2px solid var(--sinch-comp-link-color-default-outline-focus);outline-offset:2px}:host([type=link][disabled]) #content{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)}:host([type=link]) #text{white-space:var(--sinch-global-text-white-space,normal);font:inherit;color:inherit;text-decoration:inherit;overflow:visible;text-overflow:unset;flex-shrink:unset;min-width:unset}:host([type=link]) ::slotted(*){display:inline-block;vertical-align:-.2em;--sinch-global-size-icon:1em}:host([type=link]) ::slotted([slot=left-icon]){margin-right:.25em}:host([type=link]) ::slotted([slot=icon]),:host([type=link]) ::slotted([slot=right-icon]){margin-left:.25em}</style><div id="button" inert><div id="content"><slot id="left-icon" name="left-icon"></slot><slot id="icon" name="icon"></slot><span id="text"></span><slot id="right-icon" name="right-icon"></slot></div></div>';
|
|
9
9
|
const template = document.createElement("template");
|
|
10
10
|
template.innerHTML = templateHTML;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-button-group");
|
package/button-group/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { typeValues } from "../button/utils.js";
|
|
2
|
+
import { updateLiteralAttribute, getLiteralAttribute } from "../utils/dom.js";
|
|
3
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
|
+
import { sizeExValues, DEFAULT_SIZE } from "../utils/size.js";
|
|
5
5
|
const templateHTML = '<style>:host{display:block}#wrapper{display:flex;box-sizing:border-box;width:100%;height:100%}</style><div id="wrapper"><slot></slot></div>';
|
|
6
6
|
const template = document.createElement("template");
|
|
7
7
|
template.innerHTML = templateHTML;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-button-group-item");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { updateAttribute, getAttribute, updateBooleanAttribute, getBooleanAttribute } from "../utils/dom.js";
|
|
2
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
3
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
4
4
|
const templateHTML = '<style>:host{display:block;--sinch-local-divider-color:var(--sinch-comp-button-color-secondary-default-text-initial)}#wrapper{display:flex;box-sizing:border-box;width:100%;height:100%;position:relative}:host(:is(:not(:first-of-type))) #wrapper::before{content:"";position:absolute;inset:0;background-color:var(--sinch-local-divider-color);opacity:.3;pointer-events:none;z-index:2;top:10%;bottom:10%;left:-.5px;width:1px}:host([type=primary]) #wrapper::before{--sinch-local-divider-color:var(--sinch-comp-button-color-primary-default-text-initial)}:host([type=secondary]) #wrapper::before{--sinch-local-divider-color:var(--sinch-comp-button-color-secondary-default-text-initial)}:host([type=subtle-primary]) #wrapper::before{--sinch-local-divider-color:var(--sinch-comp-button-color-subtle-primary-default-text-initial)}:host([type=subtle-secondary]) #wrapper::before{--sinch-local-divider-color:var(--sinch-comp-button-color-subtle-secondary-default-text-initial)}:host([type=cta-primary]) #wrapper::before{--sinch-local-divider-color:var(--sinch-comp-button-color-cta-primary-default-text-initial)}:host([type=cta-secondary]) #wrapper::before{--sinch-local-divider-color:var(--sinch-comp-button-color-cta-secondary-default-text-initial)}:host([type=destructive]) #wrapper::before{--sinch-local-divider-color:var(--sinch-comp-button-color-danger-default-text-initial)}#sinch-button-element{display:flex;box-sizing:border-box;width:100%;height:100%;--sinch-button-shape-radius-base:0;--sinch-button-shape-radius-top-right:0;--sinch-button-shape-radius-top-left:0;--sinch-button-shape-radius-bottom-right:0;--sinch-button-shape-radius-bottom-left:0}:host(:is(:first-of-type)) #sinch-button-element{--sinch-button-shape-radius-top-left:var(--sinch-comp-button-shape-radius-size-m);--sinch-button-shape-radius-bottom-left:var(--sinch-comp-button-shape-radius-size-m)}:host(:is(:last-of-type)) #sinch-button-element{--sinch-button-shape-radius-top-right:var(--sinch-comp-button-shape-radius-size-m);--sinch-button-shape-radius-bottom-right:var(--sinch-comp-button-shape-radius-size-m)}:host([size="l"]:is(:first-of-type)) #sinch-button-element{--sinch-button-shape-radius-top-left:var(--sinch-comp-button-shape-radius-size-l);--sinch-button-shape-radius-bottom-left:var(--sinch-comp-button-shape-radius-size-l)}:host([size="l"]:is(:last-of-type)) #sinch-button-element{--sinch-button-shape-radius-top-right:var(--sinch-comp-button-shape-radius-size-l);--sinch-button-shape-radius-bottom-right:var(--sinch-comp-button-shape-radius-size-l)}:host([size="m"]:is(:first-of-type)) #sinch-button-element{--sinch-button-shape-radius-top-left:var(--sinch-comp-button-shape-radius-size-m);--sinch-button-shape-radius-bottom-left:var(--sinch-comp-button-shape-radius-size-m)}:host([size="m"]:is(:last-of-type)) #sinch-button-element{--sinch-button-shape-radius-top-right:var(--sinch-comp-button-shape-radius-size-m);--sinch-button-shape-radius-bottom-right:var(--sinch-comp-button-shape-radius-size-m)}:host([size="s"]:is(:first-of-type)) #sinch-button-element{--sinch-button-shape-radius-top-left:var(--sinch-comp-button-shape-radius-size-s);--sinch-button-shape-radius-bottom-left:var(--sinch-comp-button-shape-radius-size-s)}:host([size="s"]:is(:last-of-type)) #sinch-button-element{--sinch-button-shape-radius-top-right:var(--sinch-comp-button-shape-radius-size-s);--sinch-button-shape-radius-bottom-right:var(--sinch-comp-button-shape-radius-size-s)}:host([size=xs]:is(:first-of-type)) #sinch-button-element{--sinch-button-shape-radius-top-left:var(--sinch-comp-button-shape-radius-size-xs);--sinch-button-shape-radius-bottom-left:var(--sinch-comp-button-shape-radius-size-xs)}:host([size=xs]:is(:last-of-type)) #sinch-button-element{--sinch-button-shape-radius-top-right:var(--sinch-comp-button-shape-radius-size-xs);--sinch-button-shape-radius-bottom-right:var(--sinch-comp-button-shape-radius-size-xs)}:host(:is(:not(:first-of-type,:last-of-type))) #sinch-button-element:not(:active){--sinch-button-border-left:none;--sinch-button-border-right:none}:host(:is(:first-of-type)) #sinch-button-element:not(:active){--sinch-button-border-right:none}:host(:is(:last-of-type)) #sinch-button-element:not(:active){--sinch-button-border-left:none}:host(:is([text=""],:not([text]))) :is(#left-icon,#right-icon,#text){display:none}::slotted(*){display:block}</style><div id="wrapper"><sinch-button id="sinch-button-element"><slot id="left-icon" name="left-icon" slot="left-icon"></slot><slot id="icon" name="icon" slot="icon"></slot><slot id="right-icon" name="right-icon" slot="right-icon"></slot></sinch-button></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-card-container");
|
package/card-container/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}#wrapper{height:100%;padding:20px 0;box-sizing:border-box;background-color:var(--sinch-comp-card-color-default-background-initial);border-radius:var(--sinch-comp-card-shape-radius);border:1px solid var(--sinch-comp-card-color-default-border-initial)}#scroll{overflow:auto;height:100%;box-sizing:border-box;padding:4px 24px}</style><div id="wrapper"><div id="scroll"><slot></slot></div></div>';
|
|
3
3
|
const template = document.createElement("template");
|
|
4
4
|
template.innerHTML = templateHTML;
|
package/card-v2/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-card-v2");
|
package/card-v2/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { updateBooleanAttribute, updateAttribute, getBooleanAttribute, setClass, isAttrTrue } from "../utils/dom.js";
|
|
2
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
3
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
4
4
|
const templateHTML = '<style>:host{display:flex}.empty{display:none!important}#card{border-radius:var(--sinch-comp-card-v2-shape-radius);border:1px solid var(--sinch-comp-card-v2-color-default-border-initial);background-color:var(--sinch-comp-card-v2-color-default-background-initial);box-shadow:var(--sinch-comp-card-v2-shadow-initial);overflow:hidden;transition:.15s linear;display:flex;flex-direction:column;flex:1}#card-media{display:block;overflow:hidden}#body{display:flex;flex-direction:column;padding:16px;gap:8px;align-self:stretch;flex:1}#card-title{display:flex;flex-direction:row;align-items:center;gap:8px;align-self:stretch}#card-content{display:flex;gap:10px;align-self:stretch}#card-footer{display:flex;flex-direction:row;align-items:center;gap:16px;align-self:stretch;margin-top:auto}:host([selected]:not([selected=false])) #card{background-color:var(--sinch-comp-card-v2-color-selected-background-initial);border-color:var(--sinch-comp-card-v2-color-selected-border-initial);cursor:pointer}:host([clickable]:not([clickable=false])) #card{cursor:pointer}:host([disabled]:not([disabled=false])) #card{box-shadow:var(--sinch-comp-card-v2-shadow-disabled);background-color:var(--sinch-comp-card-v2-color-default-background-disabled);border-color:var(--sinch-comp-card-v2-color-default-border-disabled);cursor:not-allowed}:host([clickable]:not([clickable=false]):is(:not([disabled]),[disabled=false]):hover) #card{background-color:var(--sinch-comp-card-v2-color-default-background-hover);border-color:var(--sinch-comp-card-v2-color-default-border-hover);box-shadow:var(--sinch-comp-card-v2-shadow-hover)}:host([clickable]:not([clickable=false]):is(:not([disabled]),[disabled=false]):active) #card{background-color:var(--sinch-comp-card-v2-color-default-background-active);border-color:var(--sinch-comp-card-v2-color-default-border-active);box-shadow:var(--sinch-comp-card-v2-shadow-active)}:host([selected]:not([selected=false]):is(:not([disabled]),[disabled=false]):hover) #card{background-color:var(--sinch-comp-card-v2-color-selected-background-hover);border-color:var(--sinch-comp-card-v2-color-selected-border-hover)}:host([selected]:not([selected=false]):is(:not([disabled]),[disabled=false]):active) #card{background-color:var(--sinch-comp-card-v2-color-selected-background-active);border-color:var(--sinch-comp-card-v2-color-selected-border-active)}:host([selected]:not([selected=false])[disabled]:not([disabled=false])) #card{background-color:var(--sinch-comp-card-v2-color-selected-background-disabled);border-color:var(--sinch-comp-card-v2-color-selected-border-disabled)}::slotted([slot=content]){max-width:100%;color:var(--sinch-comp-card-v2-color-default-description-initial);font:var(--sinch-comp-card-v2-font-description)}::slotted([slot=title]){max-width:100%}::slotted([slot=footer]){max-width:100%}:host([selected]:not([selected=false])) ::slotted([slot=content]){color:var(--sinch-comp-card-v2-color-selected-description-initial)}:host([disabled]:not([disabled=false])) ::slotted([slot=content]){color:var(--sinch-comp-card-v2-color-default-description-disabled)}:host([selected]:not([selected=false])[disabled]:not([disabled=false])) ::slotted([slot=content]){color:var(--sinch-comp-card-v2-color-selected-description-disabled)}</style><div id="card"><div id="card-media"><slot name="media"></slot></div><div id="body"><div id="card-title"><slot name="title"></slot></div><div id="card-content"><slot name="content"></slot></div><div id="card-footer"><slot name="footer"></slot></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-card-v2-title");
|
package/card-v2-title/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { updateBooleanAttribute, getAttribute, updateAttribute, getBooleanAttribute, isAttrTrue } from "../utils/dom.js";
|
|
2
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
3
3
|
const templateHTML = '<style>:host{display:block}#title{display:flex;align-items:center;flex-direction:row}#title-text{font:var(--sinch-comp-card-v2-font-title);color:var(--sinch-comp-card-v2-color-default-title-initial)}#title-icon{display:flex}:host([orientation=vertical]) #title{align-items:start;flex-direction:column}:host([disabled]:not([disabled=false])) #title-text{color:var(--sinch-comp-card-v2-color-default-title-disabled)}:host([selected]:not([selected=false])[disabled]:not([disabled=false])) #title-text{color:var(--sinch-comp-card-v2-color-selected-title-disabled)}::slotted([slot=icon]){--sinch-global-color-icon:var(--sinch-comp-card-v2-color-default-icon-initial);--sinch-global-size-icon:var(--sinch-comp-card-v2-size-icon);margin-right:8px;margin-bottom:0}:host([orientation=vertical]) ::slotted([slot=icon]){margin-right:0;margin-bottom:8px}:host([selected]:not([selected=false])) ::slotted([slot=icon]){--sinch-global-color-icon:var(--sinch-comp-card-v2-color-selected-icon-initial)}:host([disabled]:not([disabled=false])) ::slotted([slot=icon]){--sinch-global-color-icon:var(--sinch-comp-card-v2-color-default-icon-disabled)}:host([selected]:not([selected=false])[disabled]:not([disabled=false])) ::slotted([slot=icon]){--sinch-global-color-icon:var(--sinch-comp-card-v2-color-selected-icon-disabled)}</style><div id="title"><div id="title-icon"><slot name="icon"></slot></div><sinch-text id="title-text" type="m"></sinch-text></div>';
|
|
4
4
|
const template = document.createElement("template");
|
|
5
5
|
template.innerHTML = templateHTML;
|
package/checkbox/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-checkbox");
|
package/checkbox/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import "../rich-text/index.js";
|
|
2
|
+
import { getBooleanAttribute, isAttrEqual, updateBooleanAttribute, isAttrTrue, updateExplicitBooleanAttribute, updateAttribute, getAttribute } from "../utils/dom.js";
|
|
3
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
5
|
+
import { setFormValue } from "../utils/form.js";
|
|
6
6
|
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{display:flex;flex-direction:row;box-sizing:border-box;width:100%;min-height:24px;--sinch-local-color-background:var(--sinch-comp-checkbox-color-default-background-initial);--sinch-local-color-background-hover:var(--sinch-comp-checkbox-color-default-background-hover);--sinch-local-color-background-active:var(--sinch-comp-checkbox-color-default-background-active);--sinch-local-color-border:var(--sinch-comp-checkbox-color-default-border-initial);--sinch-local-color-border-hover:var(--sinch-comp-checkbox-color-default-border-hover);--sinch-local-color-border-active:var(--sinch-comp-checkbox-color-default-border-active);--sinch-local-color-text:var(--sinch-comp-checkbox-color-default-text-initial)}:host([invalid])>#wrapper{--sinch-local-color-background:var(--sinch-comp-checkbox-color-invalid-background-initial);--sinch-local-color-background-hover:var(--sinch-comp-checkbox-color-invalid-background-hover);--sinch-local-color-background-active:var(--sinch-comp-checkbox-color-invalid-background-active);--sinch-local-color-border:var(--sinch-comp-checkbox-color-invalid-border-initial);--sinch-local-color-border-hover:var(--sinch-comp-checkbox-color-invalid-border-hover);--sinch-local-color-border-active:var(--sinch-comp-checkbox-color-invalid-border-active);--sinch-local-color-text:var(--sinch-comp-checkbox-color-invalid-text-initial)}:host([checked])>#wrapper{--sinch-local-color-background:var(--sinch-comp-checkbox-color-checked-background-initial);--sinch-local-color-background-hover:var(--sinch-comp-checkbox-color-checked-background-hover);--sinch-local-color-background-active:var(--sinch-comp-checkbox-color-checked-background-active);--sinch-local-color-border:var(--sinch-comp-checkbox-color-checked-border-initial);--sinch-local-color-border-hover:var(--sinch-comp-checkbox-color-checked-border-hover);--sinch-local-color-border-active:var(--sinch-comp-checkbox-color-checked-border-active)}:host([disabled])>#wrapper{--sinch-local-color-background:var(--sinch-comp-checkbox-color-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-checkbox-color-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-checkbox-color-disabled-text-initial)}:host([disabled][checked])>#wrapper{--sinch-local-color-background:var(--sinch-comp-checkbox-color-checked-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-checkbox-color-checked-disabled-border-initial)}#checkbox{width:18px;height:18px;cursor:pointer}:host([disabled]) #checkbox{cursor:initial}#icon-container{position:relative;width:18px;height:18px;align-self:flex-start;margin-top:3px}#checkbox::before{content:"";position:absolute;inset:-3px;border:2px solid var(--sinch-comp-checkbox-color-default-outline-focus);border-radius:calc(var(--sinch-comp-checkbox-shape-radius) + 3px);transition:opacity .1s linear;opacity:0;box-sizing:border-box;pointer-events:none}:host(:focus-visible) #checkbox::before{opacity:1}#checkbox::after{content:"";position:absolute;width:18px;height:18px;inset:0;margin:auto;background-color:var(--sinch-local-color-background);border:1px solid var(--sinch-local-color-border);border-radius:var(--sinch-comp-checkbox-shape-radius);transition:background-color .1s linear;box-sizing:border-box;pointer-events:none}:host(:hover:not([disabled])) #checkbox::after{background-color:var(--sinch-local-color-background-hover);border-color:var(--sinch-local-color-border-hover)}:host(:active:not([disabled])) #checkbox::after{background-color:var(--sinch-local-color-background-active);border-color:var(--sinch-local-color-border-active)}#icon-checkmark,#icon-indeterminate{position:absolute;left:1px;top:1px;width:16px;height:16px;transition:opacity .1s linear;opacity:0;pointer-events:none;fill:var(--sinch-sys-color-surface-primary-default)}:host(:not([indeterminate])[checked]) #icon-checkmark{opacity:1}:host([indeterminate][checked]) #icon-indeterminate{opacity:1}@media (prefers-reduced-motion){#checkbox::after,#checkbox::before,#icon-checkmark,#icon-indeterminate{transition:none}}#label{flex:1;align-self:center;padding-left:8px;font:var(--sinch-comp-checkbox-font-label);cursor:pointer;--sinch-global-color-text:var(--sinch-local-color-text)}:host(:not([text])) #label,:host([text=""]) #label{display:none}:host([disabled]) #label{cursor:initial}</style><div id="wrapper"><div id="icon-container"><div id="checkbox"></div><svg id="icon-checkmark" viewBox="0 0 24 24" aria-hidden="true"><path d="M9 16.17 5.53 12.7a.996.996 0 1 0-1.41 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71a.996.996 0 1 0-1.41-1.41L9 16.17Z"/></svg> <svg id="icon-indeterminate" viewBox="0 0 24 24" aria-hidden="true"><path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1Z"/></svg></div><sinch-rich-text id="label"></sinch-rich-text></div>';
|
|
7
7
|
const template = document.createElement("template");
|
|
8
8
|
template.innerHTML = templateHTML;
|
package/chip/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-chip");
|
package/chip/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import "../index.
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import "../text/index.js";
|
|
2
|
+
import "../icon/index.js";
|
|
3
|
+
import { isAttrEqual, updateBooleanAttribute, isAttrTrue, updateAttribute, getAttribute, getBooleanAttribute } from "../utils/dom.js";
|
|
4
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
5
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
6
|
+
import { getChipColorBg, getChipColorFg } from "./utils.js";
|
|
7
7
|
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0;cursor:pointer}#button{all:initial;position:relative;display:flex;flex-direction:row;align-items:center;gap:4px;width:100%;height:var(--sinch-comp-chip-size-container-m);padding:0 5px 0 9px;border:1px solid var(--sinch-comp-chip-border);border-radius:var(--sinch-comp-chip-shape-radius);background-color:var(--sinch-comp-chip-color-neutral-default-background-initial);box-sizing:border-box;--sinch-global-color-text:var(--sinch-comp-chip-color-neutral-default-foreground-initial);--sinch-global-color-icon:var(--sinch-comp-chip-color-neutral-default-foreground-initial);--sinch-global-size-icon:var(--sinch-comp-chip-size-icon-m)}:host(:focus-visible)>#button::after{content:"";position:absolute;inset:-4px;border-radius:calc(var(--sinch-comp-chip-shape-radius) + 4px);border:2px solid var(--sinch-comp-chip-color-outiline-focus);pointer-events:none}#text{flex:1;--sinch-comp-text-font:var(--sinch-comp-chip-font-size-m-label)}:host([small]) #button{height:var(--sinch-comp-chip-size-container-s);padding:0 3px 0 7px;--sinch-global-size-icon:var(--sinch-comp-chip-size-icon-s)}:host([small]) #text{--sinch-comp-text-font:var(--sinch-comp-chip-font-size-s-label)}::slotted([slot=icon]){margin-left:-4px}</style><div id="button" inert><slot name="icon"></slot><sinch-text id="text" type="xs" ellipsis></sinch-text><slot name="right-icon"><sinch-icon icons-version="2" name="circle-cross" id="icon-close"></sinch-icon></slot></div>';
|
|
8
8
|
const template = document.createElement("template");
|
|
9
9
|
template.innerHTML = templateHTML;
|
package/code-tag/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-code-tag");
|
package/code-tag/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getAttribute, updateAttribute } from "../utils/dom.js";
|
|
2
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
3
3
|
const templateHTML = '<style>:host{display:inline}#content{font:var(--sinch-comp-code-tag-font-text);font-size:inherit;line-height:inherit;color:var(--sinch-comp-code-tag-color-default-text-initial);border:1px solid var(--sinch-comp-code-tag-color-default-border-initial);background-color:var(--sinch-comp-code-tag-color-default-background-initial);padding:0 .25em;border-radius:var(--sinch-comp-code-tag-shape-radius);white-space:var(--sinch-global-text-white-space,normal)}</style><span id="content"></span>';
|
|
4
4
|
const template = document.createElement("template");
|
|
5
5
|
template.innerHTML = templateHTML;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-color-menu");
|
package/color-menu/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { subscribeContext } from "../utils/context.js";
|
|
2
|
+
import { updateAttribute, getAttribute, updateIntegerAttribute, getIntegerAttribute, attrValueToPixels, updateBooleanAttribute, updateExplicitBooleanAttribute, getBooleanAttribute } 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;outline:0}#listbox{display:flex;flex-direction:row;flex-wrap:wrap;padding:4px 10px;overflow-y:auto}#listbox.empty{display:none}</style><div id="listbox" role="presentation"><slot id="options"></slot></div>';
|
|
8
8
|
const NUM_COLS_DEFAULT = 5;
|
|
9
9
|
const ITEM_WIDTH = 44;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-color-menu-option");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import "../index.
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import "../color-swatch/index.js";
|
|
2
|
+
import "../tooltip/index.js";
|
|
3
|
+
import { isSwatchColor, getSwatchColorFg } from "../color-swatch/utils.js";
|
|
4
|
+
import { updateAttribute, getAttribute } from "../utils/dom.js";
|
|
5
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
6
6
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{width:44px;height:56px;padding:12px 6px;box-sizing:border-box}#swatch-wrapper{position:relative;cursor:pointer;width:32px;height:32px}#swatch-wrapper::after{content:"";position:absolute;width:34px;height:34px;inset:-3px;border:2px solid var(--sinch-comp-color-menu-option-color-default-border-initial);border-radius:50%;pointer-events:none}:host([data-checked]) #swatch-wrapper::after{border-color:var(--sinch-comp-color-menu-option-color-default-border-selected)}:host([data-selected]) #swatch-wrapper::after{border-color:var(--sinch-comp-color-menu-option-color-default-border-focus)}:host(:hover) #swatch-wrapper::after{border-color:var(--sinch-comp-color-menu-option-color-default-border-hover)}:host(:active) #swatch-wrapper::after{border-color:var(--sinch-comp-color-menu-option-color-default-border-active)}</style><div id="wrapper"><sinch-tooltip id="tooltip"><div id="swatch-wrapper"><sinch-color-swatch id="swatch"></sinch-color-swatch></div></sinch-tooltip></div>';
|
|
7
7
|
const template = document.createElement("template");
|
|
8
8
|
template.innerHTML = templateHTML;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SKINTONE_SWATCH_COLORS, SWATCH_COLORS } from "
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
|
+
import { SKINTONE_SWATCH_COLORS, SWATCH_COLORS } from "../types.js";
|
|
3
3
|
defineCustomElement("sinch-color-swatch");
|
|
4
4
|
export {
|
|
5
5
|
SKINTONE_SWATCH_COLORS,
|
package/color-swatch/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { SKINTONE_SWATCH_COLORS, SWATCH_COLORS } from "./
|
|
1
|
+
import "../text/index.js";
|
|
2
|
+
import { getAttribute, updateAttribute, setClass } from "../utils/dom.js";
|
|
3
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
|
+
import { isSwatchColor, getSwatchColorBg } from "./utils.js";
|
|
5
|
+
import { SKINTONE_SWATCH_COLORS, SWATCH_COLORS } from "./types.js";
|
|
6
6
|
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle}#wrapper{width:var(--sinch-global-size-icon,32px);height:var(--sinch-global-size-icon,32px);border-radius:50%}#wrapper.no-color{background:linear-gradient(45deg,var(--sinch-ref-color-violet-200),var(--sinch-ref-color-honey-200),var(--sinch-ref-color-grass-200),var(--sinch-ref-color-ocean-200),var(--sinch-ref-color-violet-200))}</style><div id="wrapper"></div>';
|
|
7
7
|
const template = document.createElement("template");
|
|
8
8
|
template.innerHTML = templateHTML;
|
|
@@ -16,6 +16,7 @@ class ColorSwatch extends NectaryElement {
|
|
|
16
16
|
}
|
|
17
17
|
connectedCallback() {
|
|
18
18
|
super.connectedCallback();
|
|
19
|
+
this.#updateA11yRole();
|
|
19
20
|
this.#updateColor();
|
|
20
21
|
}
|
|
21
22
|
disconnectedCallback() {
|
|
@@ -30,6 +31,10 @@ class ColorSwatch extends NectaryElement {
|
|
|
30
31
|
this.#updateColor();
|
|
31
32
|
break;
|
|
32
33
|
}
|
|
34
|
+
case "aria-label": {
|
|
35
|
+
this.#updateA11yRole();
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
get name() {
|
|
@@ -59,6 +64,7 @@ class ColorSwatch extends NectaryElement {
|
|
|
59
64
|
if (exitingAriaLabel == null || isSwatchColor(exitingAriaLabel)) {
|
|
60
65
|
updateAttribute(this, "aria-label", colorName);
|
|
61
66
|
}
|
|
67
|
+
this.#updateA11yRole();
|
|
62
68
|
const bg = getSwatchColorBg(colorName);
|
|
63
69
|
this.#$wrapper.style.setProperty("background-color", bg);
|
|
64
70
|
setClass(this.#$wrapper, "no-color", false);
|
|
@@ -67,6 +73,14 @@ class ColorSwatch extends NectaryElement {
|
|
|
67
73
|
setClass(this.#$wrapper, "no-color", false);
|
|
68
74
|
}
|
|
69
75
|
}
|
|
76
|
+
#updateA11yRole() {
|
|
77
|
+
const ariaLabel = getAttribute(this, "aria-label");
|
|
78
|
+
if (ariaLabel != null) {
|
|
79
|
+
updateAttribute(this, "role", "img");
|
|
80
|
+
} else {
|
|
81
|
+
updateAttribute(this, "role", null);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
70
84
|
}
|
|
71
85
|
defineCustomElement("sinch-color-swatch", ColorSwatch);
|
|
72
86
|
export {
|
package/color-swatch/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SwatchColors } from './types';
|
|
2
2
|
export declare const isSwatchColor: (value?: string) => value is SwatchColors;
|
|
3
|
-
export declare const getSwatchColorBg: (id: SwatchColors) => "var(--sinch-comp-color-swatch-color-
|
|
4
|
-
export declare const getSwatchColorFg: (id: SwatchColors) => "var(--sinch-comp-color-swatch-color-
|
|
3
|
+
export declare const getSwatchColorBg: (id: SwatchColors) => "var(--sinch-comp-color-swatch-color-default-background)" | "var(--sinch-comp-color-swatch-color-blue-background)" | "var(--sinch-comp-color-swatch-color-dark-blue-background)" | "var(--sinch-comp-color-swatch-color-dark-gray-background)" | "var(--sinch-comp-color-swatch-color-dark-green-background)" | "var(--sinch-comp-color-swatch-color-dark-orange-background)" | "var(--sinch-comp-color-swatch-color-dark-pink-background)" | "var(--sinch-comp-color-swatch-color-dark-red-background)" | "var(--sinch-comp-color-swatch-color-dark-violet-background)" | "var(--sinch-comp-color-swatch-color-dark-yellow-background)" | "var(--sinch-comp-color-swatch-color-gray-background)" | "var(--sinch-comp-color-swatch-color-green-background)" | "var(--sinch-comp-color-swatch-color-light-blue-background)" | "var(--sinch-comp-color-swatch-color-light-gray-background)" | "var(--sinch-comp-color-swatch-color-light-green-background)" | "var(--sinch-comp-color-swatch-color-light-orange-background)" | "var(--sinch-comp-color-swatch-color-light-pink-background)" | "var(--sinch-comp-color-swatch-color-light-red-background)" | "var(--sinch-comp-color-swatch-color-light-violet-background)" | "var(--sinch-comp-color-swatch-color-light-yellow-background)" | "var(--sinch-comp-color-swatch-color-orange-background)" | "var(--sinch-comp-color-swatch-color-pink-background)" | "var(--sinch-comp-color-swatch-color-red-background)" | "var(--sinch-comp-color-swatch-color-violet-background)" | "var(--sinch-comp-color-swatch-color-yellow-background)" | "var(--sinch-comp-color-swatch-color-skintone-dark-background)" | "var(--sinch-comp-color-swatch-color-skintone-default-background)" | "var(--sinch-comp-color-swatch-color-skintone-light-background)" | "var(--sinch-comp-color-swatch-color-skintone-light-medium-background)" | "var(--sinch-comp-color-swatch-color-skintone-medium-background)" | "var(--sinch-comp-color-swatch-color-skintone-medium-dark-background)";
|
|
4
|
+
export declare const getSwatchColorFg: (id: SwatchColors) => "var(--sinch-comp-color-swatch-color-default-foreground)" | "var(--sinch-comp-color-swatch-color-blue-foreground)" | "var(--sinch-comp-color-swatch-color-dark-blue-foreground)" | "var(--sinch-comp-color-swatch-color-dark-gray-foreground)" | "var(--sinch-comp-color-swatch-color-dark-green-foreground)" | "var(--sinch-comp-color-swatch-color-dark-orange-foreground)" | "var(--sinch-comp-color-swatch-color-dark-pink-foreground)" | "var(--sinch-comp-color-swatch-color-dark-red-foreground)" | "var(--sinch-comp-color-swatch-color-dark-violet-foreground)" | "var(--sinch-comp-color-swatch-color-dark-yellow-foreground)" | "var(--sinch-comp-color-swatch-color-gray-foreground)" | "var(--sinch-comp-color-swatch-color-green-foreground)" | "var(--sinch-comp-color-swatch-color-light-blue-foreground)" | "var(--sinch-comp-color-swatch-color-light-gray-foreground)" | "var(--sinch-comp-color-swatch-color-light-green-foreground)" | "var(--sinch-comp-color-swatch-color-light-orange-foreground)" | "var(--sinch-comp-color-swatch-color-light-pink-foreground)" | "var(--sinch-comp-color-swatch-color-light-red-foreground)" | "var(--sinch-comp-color-swatch-color-light-violet-foreground)" | "var(--sinch-comp-color-swatch-color-light-yellow-foreground)" | "var(--sinch-comp-color-swatch-color-orange-foreground)" | "var(--sinch-comp-color-swatch-color-pink-foreground)" | "var(--sinch-comp-color-swatch-color-red-foreground)" | "var(--sinch-comp-color-swatch-color-violet-foreground)" | "var(--sinch-comp-color-swatch-color-yellow-foreground)" | "var(--sinch-comp-color-swatch-color-skintone-dark-foreground)" | "var(--sinch-comp-color-swatch-color-skintone-default-foreground)" | "var(--sinch-comp-color-swatch-color-skintone-light-foreground)" | "var(--sinch-comp-color-swatch-color-skintone-light-medium-foreground)" | "var(--sinch-comp-color-swatch-color-skintone-medium-foreground)" | "var(--sinch-comp-color-swatch-color-skintone-medium-dark-foreground)";
|
package/color-swatch/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-date-picker");
|
package/date-picker/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import "../index.
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import "../icon/index.js";
|
|
2
|
+
import "../text/index.js";
|
|
3
|
+
import { packCsv, unpackCsv } from "../utils/csv.js";
|
|
4
|
+
import { getBooleanAttribute, updateAttribute, getAttribute, updateBooleanAttribute, setClass, isAttrTrue } from "../utils/dom.js";
|
|
5
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
6
|
+
import { getRect } from "../utils/rect.js";
|
|
7
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
8
|
+
import { getTargetAttribute } from "../utils/event-target.js";
|
|
9
|
+
import { setFormValue } from "../utils/form.js";
|
|
10
|
+
import { getDayNames, getMonthNames, isoToDate, clampMaxDate, clampMinDate, decMonth, incMonth, decYear, incYear, today, isDateBetween, areDatesEqual, sortDates, dateToIso, isValidDate, isDateOnScreen, cloneDate, getCalendarMonth, canGoPrevMonth, canGoNextMonth, canGoPrevYear, canGoNextYear } from "./utils.js";
|
|
11
11
|
const templateHTML = '<style>:host{display:block;outline:0}#content{width:fit-content;box-sizing:border-box;padding:16px;display:flex;flex-direction:column;gap:8px}#month{display:flex;flex-direction:column;row-gap:8px}.week{display:flex;flex-direction:row;column-gap:8px}.week.empty{display:none}.day{all:initial;font:var(--sinch-comp-date-picker-font-day);width:24px;height:24px;line-height:22px;color:var(--sinch-comp-date-picker-day-color-default-text-initial);background-color:var(--sinch-comp-date-picker-day-color-default-background-initial);border:1px solid var(--sinch-comp-date-picker-day-color-default-border-initial);border-radius:var(--sinch-comp-date-picker-day-shape-radius);text-align:center;box-sizing:border-box;user-select:none;cursor:pointer}.day:focus-visible{outline:1px solid var(--sinch-comp-date-picker-day-color-default-outline-focus);outline-offset:1px}.day:disabled{cursor:initial;color:var(--sinch-comp-date-picker-day-color-disabled-text-initial)}.day:enabled:hover{background-color:var(--sinch-comp-date-picker-day-color-default-background-hover)}.day:enabled.range{background-color:var(--sinch-comp-date-picker-day-color-default-range-background)}.day:enabled.selected{color:var(--sinch-comp-date-picker-day-color-checked-text-initial);background-color:var(--sinch-comp-date-picker-day-color-checked-background-initial);border-color:var(--sinch-comp-date-picker-day-color-checked-border-initial)}.day.today{font:var(--sinch-comp-date-picker-font-today);color:var(--sinch-comp-date-picker-today-color-default-text-initial);background-color:var(--sinch-comp-date-picker-today-color-default-background-initial);border-color:var(--sinch-comp-date-picker-today-color-default-border-initial)}.day.today:hover{background-color:var(--sinch-comp-date-picker-today-color-default-background-hover)}.day.today:disabled{color:var(--sinch-comp-date-picker-today-color-disabled-text-initial);border-color:var(--sinch-comp-date-picker-today-color-disabled-border-initial)}.day.today.selected{color:var(--sinch-comp-date-picker-today-color-checked-text-initial);background-color:var(--sinch-comp-date-picker-today-color-checked-background-initial);border-color:var(--sinch-comp-date-picker-today-color-checked-border-initial)}#week-day-names{display:flex;flex-direction:row;gap:8px;height:24px}.week-day-name{font:var(--sinch-comp-date-picker-font-weekday);color:var(--sinch-comp-date-picker-weekday-color-default-text-initial);text-align:center;width:24px;height:24px;line-height:24px;user-select:none;text-transform:uppercase}#content-header{display:flex;flex-direction:row;height:32px;align-items:center}#date{flex:1;text-align:center;text-transform:capitalize;--sinch-com-text-font:var(--sinch-comp-date-picker-font-header);--sinch-global-color-text:var(--sinch-comp-date-picker-header-color-default-text-initial)}#prev-year{margin-left:-4px}#next-year{margin-right:-4px}</style><div id="content"><div id="content-header"><sinch-button id="prev-year" size="s"><sinch-icon icons-version="2" name="fa-angles-left" id="icon-prev-year" slot="icon"></sinch-icon></sinch-button><sinch-button id="prev-month" size="s"><sinch-icon icons-version="2" name="fa-angle-left" id="icon-prev-month" slot="icon"></sinch-icon></sinch-button><sinch-text id="date" type="m" emphasized aria-live="polite"></sinch-text><sinch-button id="next-month" size="s"><sinch-icon icons-version="2" name="fa-angle-right" id="icon-next-month" slot="icon"></sinch-icon></sinch-button><sinch-button id="next-year" size="s"><sinch-icon icons-version="2" name="fa-angles-right" id="icon-next-year" slot="icon"></sinch-icon></sinch-button></div><div id="week-day-names"><div class="week-day-name"></div><div class="week-day-name"></div><div class="week-day-name"></div><div class="week-day-name"></div><div class="week-day-name"></div><div class="week-day-name"></div><div class="week-day-name"></div></div><div id="month"><div class="week"><button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button></div><div class="week"><button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button></div><div class="week"><button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button></div><div class="week"><button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button></div><div class="week"><button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button></div><div class="week"><button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button> <button class="day"></button></div></div></div>';
|
|
12
12
|
const template = document.createElement("template");
|
|
13
13
|
template.innerHTML = templateHTML;
|
package/dialog/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-dialog");
|
package/dialog/index.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ export declare class Dialog extends NectaryElement {
|
|
|
18
18
|
get hideCloseButton(): boolean;
|
|
19
19
|
set preventClose(isPrevented: boolean);
|
|
20
20
|
get preventClose(): boolean;
|
|
21
|
-
get dialogRect():
|
|
22
|
-
get closeButtonRect():
|
|
21
|
+
get dialogRect(): import("../types").TRect;
|
|
22
|
+
get closeButtonRect(): import("../types").TRect;
|
|
23
23
|
}
|
package/dialog/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "../index.
|
|
2
|
-
import "../index.
|
|
3
|
-
import "../index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import "../icon/index.js";
|
|
2
|
+
import "../stop-events/index.js";
|
|
3
|
+
import "../title/index.js";
|
|
4
|
+
import { isAttrEqual, updateBooleanAttribute, isAttrTrue, updateAttribute, getAttribute, getBooleanAttribute, setClass } from "../utils/dom.js";
|
|
5
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
6
|
+
import { getRect } from "../utils/rect.js";
|
|
7
|
+
import { getReactEventHandler } from "../utils/get-react-event-handler.js";
|
|
8
|
+
import { isTargetEqual } from "../utils/event-target.js";
|
|
9
|
+
import { isScrollDisabled, disableScroll, enableScroll } from "../utils/scroll-lock.js";
|
|
10
10
|
const templateHTML = '<style>:host{display:contents;--sinch-comp-dialog-max-width:512px;--sinch-comp-dialog-max-height:90vh;--sinch-comp-dialog-width:fit-content;--sinch-dialog-close-button-display:unset}#dialog{position:fixed;left:0;right:0;margin:auto;display:flex;flex-direction:column;padding:24px 0;width:var(--sinch-comp-dialog-width);max-width:var(--sinch-comp-dialog-max-width);max-height:var(--sinch-comp-dialog-max-height);border-radius:var(--sinch-comp-dialog-shape-radius);box-sizing:border-box;contain:content;background-color:var(--sinch-comp-dialog-color-default-background-initial);border:none;box-shadow:var(--sinch-comp-dialog-shadow);outline:0}#dialog:not([open]){display:none}dialog::backdrop{background-color:#000;opacity:.55}#header{display:flex;flex-direction:row;align-items:flex-start;margin-bottom:12px;padding:0 24px;gap:8px;--sinch-global-size-icon:24px;--sinch-global-color-icon:var(--sinch-comp-dialog-color-default-icon-initial)}#caption{--sinch-global-color-text:var(--sinch-comp-dialog-color-default-title-initial);--sinch-comp-title-font:var(--sinch-comp-dialog-font-title)}#content{min-height:0;overflow:auto;padding:4px 24px}#action{display:flex;flex-direction:row;justify-content:flex-end;gap:16px;margin-top:20px;padding:0 24px}#action.empty{display:none}#close{display:var(--sinch-dialog-close-button-display,initial);position:relative;left:4px;top:-4px;margin-left:auto}:host([hide-close-button]) #close{display:none}</style><dialog id="dialog"><div id="header"><slot id="icon" name="icon"></slot><sinch-title id="caption" type="m" level="3"></sinch-title><sinch-button id="close" size="s"><sinch-icon icons-version="2" name="fa-xmark" id="icon-close" slot="icon"></sinch-icon></sinch-button></div><div id="content"><sinch-stop-events events="close"><slot name="content"></slot></sinch-stop-events></div><div id="action"><sinch-stop-events events="close"><slot name="buttons"></slot></sinch-stop-events></div></dialog>';
|
|
11
11
|
const template = document.createElement("template");
|
|
12
12
|
template.innerHTML = templateHTML;
|
package/emoji/global/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-emoji");
|
package/emoji/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { updateAttribute, getAttribute } from "../utils/dom.js";
|
|
2
|
+
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
3
|
+
import { getEmojiUrl, getEmojiBaseUrl } from "./utils.js";
|
|
4
4
|
const templateHTML = '<style>:host{display:contents;--sinch-comp-emoji-vertical-align:initial}#image{vertical-align:var(--sinch-comp-emoji-vertical-align);pointer-events:none;width:var(--sinch-global-size-icon,48px);height:var(--sinch-global-size-icon,48px)}</style><img id="image" src="" alt="" loading="lazy">';
|
|
5
5
|
const template = document.createElement("template");
|
|
6
6
|
template.innerHTML = templateHTML;
|
package/emoji/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getAttribute, getCssVar, updateAttribute } from "../utils/dom.js";
|
|
2
2
|
const vs16RegExp = /\uFE0F/g;
|
|
3
3
|
const zeroWidthJoiner = String.fromCharCode(8205);
|
|
4
4
|
const removeVS16s = (rawEmoji) => rawEmoji.indexOf(zeroWidthJoiner) < 0 ? rawEmoji.replace(vs16RegExp, "") : rawEmoji;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCustomElement } from "../../utils/element.js";
|
|
2
2
|
defineCustomElement("sinch-emoji-picker");
|