@helixui/library 1.0.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +2936 -9700
- package/dist/components/hx-accordion/hx-accordion-item.d.ts +7 -0
- package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
- package/dist/components/hx-accordion/hx-accordion.d.ts +3 -0
- package/dist/components/hx-accordion/hx-accordion.d.ts.map +1 -1
- package/dist/components/hx-accordion/index.js +1 -1
- package/dist/components/hx-action-bar/hx-action-bar.d.ts +13 -3
- package/dist/components/hx-action-bar/hx-action-bar.d.ts.map +1 -1
- package/dist/components/hx-action-bar/index.js +1 -1
- package/dist/components/hx-alert/hx-alert.d.ts +23 -0
- package/dist/components/hx-alert/hx-alert.d.ts.map +1 -1
- package/dist/components/hx-alert/hx-alert.styles.d.ts.map +1 -1
- package/dist/components/hx-alert/index.js +1 -1
- package/dist/components/hx-avatar/hx-avatar.d.ts +8 -1
- package/dist/components/hx-avatar/hx-avatar.d.ts.map +1 -1
- package/dist/components/hx-avatar/index.js +1 -1
- package/dist/components/hx-badge/hx-badge.d.ts +8 -1
- package/dist/components/hx-badge/hx-badge.d.ts.map +1 -1
- package/dist/components/hx-badge/index.js +1 -1
- package/dist/components/hx-banner/hx-banner.d.ts +11 -0
- package/dist/components/hx-banner/hx-banner.d.ts.map +1 -1
- package/dist/components/hx-banner/index.js +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts +17 -2
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/index.js +1 -1
- package/dist/components/hx-button/hx-button.d.ts +6 -0
- package/dist/components/hx-button/hx-button.d.ts.map +1 -1
- package/dist/components/hx-button/hx-button.styles.d.ts.map +1 -1
- package/dist/components/hx-button/index.js +1 -1
- package/dist/components/hx-card/hx-card.d.ts +7 -0
- package/dist/components/hx-card/hx-card.d.ts.map +1 -1
- package/dist/components/hx-card/index.js +1 -1
- package/dist/components/hx-carousel/hx-carousel-item.d.ts +2 -0
- package/dist/components/hx-carousel/hx-carousel-item.d.ts.map +1 -1
- package/dist/components/hx-carousel/hx-carousel-item.styles.d.ts +2 -0
- package/dist/components/hx-carousel/hx-carousel-item.styles.d.ts.map +1 -0
- package/dist/components/hx-carousel/hx-carousel.d.ts +27 -0
- package/dist/components/hx-carousel/hx-carousel.d.ts.map +1 -1
- package/dist/components/hx-carousel/index.js +1 -1
- package/dist/components/hx-checkbox/hx-checkbox.d.ts +18 -2
- package/dist/components/hx-checkbox/hx-checkbox.d.ts.map +1 -1
- package/dist/components/hx-checkbox/index.js +1 -1
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts +20 -4
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts.map +1 -1
- package/dist/components/hx-checkbox-group/index.js +1 -1
- package/dist/components/hx-code-snippet/hx-code-snippet.d.ts +10 -0
- package/dist/components/hx-code-snippet/hx-code-snippet.d.ts.map +1 -1
- package/dist/components/hx-code-snippet/hx-code-snippet.styles.d.ts.map +1 -1
- package/dist/components/hx-code-snippet/index.js +1 -1
- package/dist/components/hx-color-picker/hx-color-picker.d.ts +70 -2
- package/dist/components/hx-color-picker/hx-color-picker.d.ts.map +1 -1
- package/dist/components/hx-color-picker/hx-color-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-color-picker/index.js +1 -1
- package/dist/components/hx-combobox/hx-combobox.d.ts +37 -2
- package/dist/components/hx-combobox/hx-combobox.d.ts.map +1 -1
- package/dist/components/hx-combobox/hx-combobox.styles.d.ts.map +1 -1
- package/dist/components/hx-combobox/index.js +1 -1
- package/dist/components/hx-copy-button/hx-copy-button.d.ts +11 -0
- package/dist/components/hx-copy-button/hx-copy-button.d.ts.map +1 -1
- package/dist/components/hx-copy-button/index.js +1 -1
- package/dist/components/hx-counter/hx-counter.d.ts +12 -3
- package/dist/components/hx-counter/hx-counter.d.ts.map +1 -1
- package/dist/components/hx-counter/index.js +1 -1
- package/dist/components/hx-data-table/hx-data-table.d.ts +19 -2
- package/dist/components/hx-data-table/hx-data-table.d.ts.map +1 -1
- package/dist/components/hx-data-table/hx-data-table.styles.d.ts.map +1 -1
- package/dist/components/hx-data-table/index.js +1 -1
- package/dist/components/hx-date-picker/hx-date-picker.d.ts +62 -3
- package/dist/components/hx-date-picker/hx-date-picker.d.ts.map +1 -1
- package/dist/components/hx-date-picker/hx-date-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-date-picker/index.js +1 -1
- package/dist/components/hx-dialog/hx-dialog.d.ts +31 -4
- package/dist/components/hx-dialog/hx-dialog.d.ts.map +1 -1
- package/dist/components/hx-dialog/hx-dialog.styles.d.ts.map +1 -1
- package/dist/components/hx-dialog/index.js +1 -1
- package/dist/components/hx-divider/hx-divider.d.ts +4 -1
- package/dist/components/hx-divider/hx-divider.d.ts.map +1 -1
- package/dist/components/hx-divider/index.js +1 -1
- package/dist/components/hx-drawer/hx-drawer.d.ts +25 -3
- package/dist/components/hx-drawer/hx-drawer.d.ts.map +1 -1
- package/dist/components/hx-drawer/hx-drawer.styles.d.ts.map +1 -1
- package/dist/components/hx-drawer/index.js +1 -1
- package/dist/components/hx-dropdown/hx-dropdown.d.ts +15 -2
- package/dist/components/hx-dropdown/hx-dropdown.d.ts.map +1 -1
- package/dist/components/hx-dropdown/index.js +1 -1
- package/dist/components/hx-field/hx-field.d.ts +10 -2
- package/dist/components/hx-field/hx-field.d.ts.map +1 -1
- package/dist/components/hx-field/index.js +1 -1
- package/dist/components/hx-file-upload/hx-file-upload.d.ts +39 -2
- package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
- package/dist/components/hx-file-upload/hx-file-upload.styles.d.ts.map +1 -1
- package/dist/components/hx-file-upload/index.js +1 -1
- package/dist/components/hx-form/hx-form.d.ts.map +1 -1
- package/dist/components/hx-form/index.js +1 -1
- package/dist/components/hx-format-date/hx-format-date.d.ts +8 -0
- package/dist/components/hx-format-date/hx-format-date.d.ts.map +1 -1
- package/dist/components/hx-format-date/index.js +1 -1
- package/dist/components/hx-grid/hx-grid.d.ts +9 -3
- package/dist/components/hx-grid/hx-grid.d.ts.map +1 -1
- package/dist/components/hx-grid/index.js +1 -1
- package/dist/components/hx-help-text/index.js +1 -1
- package/dist/components/hx-icon/hx-icon.d.ts +10 -2
- package/dist/components/hx-icon/hx-icon.d.ts.map +1 -1
- package/dist/components/hx-icon/index.js +1 -1
- package/dist/components/hx-icon-button/hx-icon-button.d.ts +11 -0
- package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -1
- package/dist/components/hx-icon-button/index.js +1 -1
- package/dist/components/hx-image/hx-image.d.ts +8 -0
- package/dist/components/hx-image/hx-image.d.ts.map +1 -1
- package/dist/components/hx-image/index.js +1 -1
- package/dist/components/hx-link/hx-link.d.ts +3 -0
- package/dist/components/hx-link/hx-link.d.ts.map +1 -1
- package/dist/components/hx-link/hx-link.styles.d.ts.map +1 -1
- package/dist/components/hx-link/index.js +1 -1
- package/dist/components/hx-list/hx-list-item.d.ts +8 -2
- package/dist/components/hx-list/hx-list-item.d.ts.map +1 -1
- package/dist/components/hx-list/hx-list-item.styles.d.ts.map +1 -1
- package/dist/components/hx-list/hx-list.d.ts +6 -2
- package/dist/components/hx-list/hx-list.d.ts.map +1 -1
- package/dist/components/hx-list/index.js +1 -1
- package/dist/components/hx-menu/hx-menu-item.d.ts +11 -0
- package/dist/components/hx-menu/hx-menu-item.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu-item.styles.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu.d.ts +10 -1
- package/dist/components/hx-menu/hx-menu.d.ts.map +1 -1
- package/dist/components/hx-menu/index.js +1 -1
- package/dist/components/hx-meter/hx-meter.d.ts +8 -0
- package/dist/components/hx-meter/hx-meter.d.ts.map +1 -1
- package/dist/components/hx-meter/hx-meter.styles.d.ts.map +1 -1
- package/dist/components/hx-meter/index.js +1 -1
- package/dist/components/hx-nav/hx-nav.d.ts +15 -0
- package/dist/components/hx-nav/hx-nav.d.ts.map +1 -1
- package/dist/components/hx-nav/index.js +1 -1
- package/dist/components/hx-number-input/hx-number-input.d.ts +47 -1
- package/dist/components/hx-number-input/hx-number-input.d.ts.map +1 -1
- package/dist/components/hx-number-input/index.js +1 -1
- package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts +15 -0
- package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts.map +1 -1
- package/dist/components/hx-overflow-menu/index.js +1 -1
- package/dist/components/hx-pagination/hx-pagination.d.ts +30 -0
- package/dist/components/hx-pagination/hx-pagination.d.ts.map +1 -1
- package/dist/components/hx-pagination/index.js +1 -1
- package/dist/components/hx-popover/hx-popover.d.ts +53 -2
- package/dist/components/hx-popover/hx-popover.d.ts.map +1 -1
- package/dist/components/hx-popover/index.js +1 -1
- package/dist/components/hx-popup/hx-popup.d.ts +8 -0
- package/dist/components/hx-popup/hx-popup.d.ts.map +1 -1
- package/dist/components/hx-popup/hx-popup.styles.d.ts.map +1 -1
- package/dist/components/hx-popup/index.js +1 -1
- package/dist/components/hx-progress-bar/hx-progress-bar.d.ts +8 -2
- package/dist/components/hx-progress-bar/hx-progress-bar.d.ts.map +1 -1
- package/dist/components/hx-progress-bar/hx-progress-bar.styles.d.ts.map +1 -1
- package/dist/components/hx-progress-bar/index.js +1 -1
- package/dist/components/hx-progress-ring/hx-progress-ring.d.ts +8 -2
- package/dist/components/hx-progress-ring/hx-progress-ring.d.ts.map +1 -1
- package/dist/components/hx-progress-ring/index.js +1 -1
- package/dist/components/hx-prose/hx-prose.d.ts +5 -3
- package/dist/components/hx-prose/hx-prose.d.ts.map +1 -1
- package/dist/components/hx-prose/index.js +1 -1
- package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
- package/dist/components/hx-radio-group/hx-radio.d.ts +4 -2
- package/dist/components/hx-radio-group/hx-radio.d.ts.map +1 -1
- package/dist/components/hx-radio-group/hx-radio.styles.d.ts.map +1 -1
- package/dist/components/hx-radio-group/index.js +1 -1
- package/dist/components/hx-rating/hx-rating.d.ts +54 -2
- package/dist/components/hx-rating/hx-rating.d.ts.map +1 -1
- package/dist/components/hx-rating/index.js +1 -1
- package/dist/components/hx-select/hx-select.d.ts +22 -2
- package/dist/components/hx-select/hx-select.d.ts.map +1 -1
- package/dist/components/hx-select/hx-select.styles.d.ts.map +1 -1
- package/dist/components/hx-select/index.js +1 -1
- package/dist/components/hx-side-nav/hx-nav-item.d.ts +6 -0
- package/dist/components/hx-side-nav/hx-nav-item.d.ts.map +1 -1
- package/dist/components/hx-side-nav/hx-nav-item.styles.d.ts.map +1 -1
- package/dist/components/hx-side-nav/hx-side-nav.d.ts +6 -1
- package/dist/components/hx-side-nav/hx-side-nav.d.ts.map +1 -1
- package/dist/components/hx-side-nav/hx-side-nav.styles.d.ts.map +1 -1
- package/dist/components/hx-side-nav/index.js +1 -1
- package/dist/components/hx-slider/hx-slider.d.ts +22 -1
- package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
- package/dist/components/hx-slider/hx-slider.styles.d.ts.map +1 -1
- package/dist/components/hx-slider/index.js +1 -1
- package/dist/components/hx-spinner/hx-spinner.d.ts +3 -1
- package/dist/components/hx-spinner/hx-spinner.d.ts.map +1 -1
- package/dist/components/hx-spinner/index.js +1 -1
- package/dist/components/hx-split-button/hx-split-button.d.ts +12 -0
- package/dist/components/hx-split-button/hx-split-button.d.ts.map +1 -1
- package/dist/components/hx-split-button/index.js +1 -1
- package/dist/components/hx-split-panel/hx-split-panel.d.ts +32 -2
- package/dist/components/hx-split-panel/hx-split-panel.d.ts.map +1 -1
- package/dist/components/hx-split-panel/hx-split-panel.styles.d.ts.map +1 -1
- package/dist/components/hx-split-panel/index.js +1 -1
- package/dist/components/hx-stack/index.js +1 -1
- package/dist/components/hx-stat/hx-stat.d.ts +5 -1
- package/dist/components/hx-stat/hx-stat.d.ts.map +1 -1
- package/dist/components/hx-stat/index.js +1 -1
- package/dist/components/hx-status-indicator/hx-status-indicator.d.ts +13 -12
- package/dist/components/hx-status-indicator/hx-status-indicator.d.ts.map +1 -1
- package/dist/components/hx-status-indicator/index.js +1 -1
- package/dist/components/hx-steps/hx-step.d.ts +7 -9
- package/dist/components/hx-steps/hx-step.d.ts.map +1 -1
- package/dist/components/hx-steps/hx-step.styles.d.ts.map +1 -1
- package/dist/components/hx-steps/hx-steps.d.ts +3 -3
- package/dist/components/hx-steps/hx-steps.d.ts.map +1 -1
- package/dist/components/hx-steps/index.js +1 -1
- package/dist/components/hx-switch/hx-switch.d.ts +21 -1
- package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
- package/dist/components/hx-switch/index.js +1 -1
- package/dist/components/hx-table/hx-table.d.ts +7 -2
- package/dist/components/hx-table/hx-table.d.ts.map +1 -1
- package/dist/components/hx-table/hx-table.styles.d.ts.map +1 -1
- package/dist/components/hx-table/hx-th.d.ts +4 -0
- package/dist/components/hx-table/hx-th.d.ts.map +1 -1
- package/dist/components/hx-table/index.js +1 -1
- package/dist/components/hx-tabs/hx-tab.d.ts +3 -0
- package/dist/components/hx-tabs/hx-tab.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tabs.d.ts +6 -0
- package/dist/components/hx-tabs/hx-tabs.d.ts.map +1 -1
- package/dist/components/hx-tabs/index.js +1 -1
- package/dist/components/hx-tag/hx-tag.d.ts +2 -0
- package/dist/components/hx-tag/hx-tag.d.ts.map +1 -1
- package/dist/components/hx-tag/index.js +1 -1
- package/dist/components/hx-text/hx-text.d.ts +1 -0
- package/dist/components/hx-text/hx-text.d.ts.map +1 -1
- package/dist/components/hx-text/index.js +1 -1
- package/dist/components/hx-text-input/hx-text-input.d.ts +8 -3
- package/dist/components/hx-text-input/hx-text-input.d.ts.map +1 -1
- package/dist/components/hx-text-input/index.js +1 -1
- package/dist/components/hx-textarea/hx-textarea.d.ts +9 -3
- package/dist/components/hx-textarea/hx-textarea.d.ts.map +1 -1
- package/dist/components/hx-textarea/hx-textarea.styles.d.ts.map +1 -1
- package/dist/components/hx-textarea/index.js +1 -1
- package/dist/components/hx-theme/hx-theme.d.ts +2 -2
- package/dist/components/hx-theme/hx-theme.d.ts.map +1 -1
- package/dist/components/hx-time-picker/hx-time-picker.d.ts +22 -3
- package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
- package/dist/components/hx-time-picker/hx-time-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-time-picker/index.js +1 -1
- package/dist/components/hx-toast/hx-toast.d.ts +8 -0
- package/dist/components/hx-toast/hx-toast.d.ts.map +1 -1
- package/dist/components/hx-toast/hx-toast.styles.d.ts.map +1 -1
- package/dist/components/hx-toast/index.js +1 -1
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts +23 -0
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/index.js +1 -1
- package/dist/components/hx-tooltip/hx-tooltip.d.ts +57 -0
- package/dist/components/hx-tooltip/hx-tooltip.d.ts.map +1 -1
- package/dist/components/hx-tooltip/index.js +1 -1
- package/dist/components/hx-top-nav/hx-top-nav.d.ts +4 -0
- package/dist/components/hx-top-nav/hx-top-nav.d.ts.map +1 -1
- package/dist/components/hx-top-nav/index.js +1 -1
- package/dist/components/hx-tree-view/hx-tree-item.d.ts +2 -0
- package/dist/components/hx-tree-view/hx-tree-item.d.ts.map +1 -1
- package/dist/components/hx-tree-view/hx-tree-view.d.ts +11 -0
- package/dist/components/hx-tree-view/hx-tree-view.d.ts.map +1 -1
- package/dist/components/hx-tree-view/index.js +1 -1
- package/dist/index.js +70 -70
- package/dist/shared/{hx-accordion-DT8qHOay.js → hx-accordion-D1kFhdeQ.js} +15 -3
- package/dist/shared/hx-accordion-D1kFhdeQ.js.map +1 -0
- package/dist/shared/{hx-action-bar-we_WJety.js → hx-action-bar-D4bulGQP.js} +38 -31
- package/dist/shared/hx-action-bar-D4bulGQP.js.map +1 -0
- package/dist/shared/{hx-alert-D6uok29t.js → hx-alert-CSxCF2rr.js} +74 -53
- package/dist/shared/hx-alert-CSxCF2rr.js.map +1 -0
- package/dist/shared/{hx-avatar-Cep6Urm3.js → hx-avatar-Cun-O99h.js} +5 -1
- package/dist/shared/hx-avatar-Cun-O99h.js.map +1 -0
- package/dist/shared/{hx-badge-BeuWuUj_.js → hx-badge-CsFd2xtw.js} +53 -43
- package/dist/shared/hx-badge-CsFd2xtw.js.map +1 -0
- package/dist/shared/{hx-banner-DnCBJtRR.js → hx-banner-BTV-X2xF.js} +55 -43
- package/dist/shared/{hx-banner-DnCBJtRR.js.map → hx-banner-BTV-X2xF.js.map} +1 -1
- package/dist/shared/{hx-breadcrumb-item-Bj2UqhzR.js → hx-breadcrumb-item-4IwaLgaO.js} +34 -22
- package/dist/shared/hx-breadcrumb-item-4IwaLgaO.js.map +1 -0
- package/dist/shared/{hx-button-Cbhqpm5i.js → hx-button-7k-KeCYU.js} +29 -15
- package/dist/shared/hx-button-7k-KeCYU.js.map +1 -0
- package/dist/shared/{hx-card-B9j2SHyI.js → hx-card-0hT3G5hi.js} +10 -3
- package/dist/shared/hx-card-0hT3G5hi.js.map +1 -0
- package/dist/shared/{hx-carousel-item-Be0bC-7o.js → hx-carousel-item-DgeYyYZJ.js} +106 -89
- package/dist/shared/hx-carousel-item-DgeYyYZJ.js.map +1 -0
- package/dist/shared/{hx-checkbox-CuaJqEo7.js → hx-checkbox-BvjO-O41.js} +13 -6
- package/dist/shared/hx-checkbox-BvjO-O41.js.map +1 -0
- package/dist/shared/{hx-checkbox-group-ydUdV9Sx.js → hx-checkbox-group-Z5VvWzcj.js} +50 -37
- package/dist/shared/hx-checkbox-group-Z5VvWzcj.js.map +1 -0
- package/dist/shared/{hx-code-snippet-DBwIjl5p.js → hx-code-snippet-DqzPkH4K.js} +17 -1
- package/dist/shared/hx-code-snippet-DqzPkH4K.js.map +1 -0
- package/dist/shared/hx-color-picker-Da8z6AlQ.js +596 -0
- package/dist/shared/hx-color-picker-Da8z6AlQ.js.map +1 -0
- package/dist/shared/{hx-combobox-CNvY-es8.js → hx-combobox-CivfelTS.js} +93 -459
- package/dist/shared/hx-combobox-CivfelTS.js.map +1 -0
- package/dist/shared/{hx-copy-button-CLBA31to.js → hx-copy-button--0dymSvw.js} +9 -1
- package/dist/shared/{hx-copy-button-CLBA31to.js.map → hx-copy-button--0dymSvw.js.map} +1 -1
- package/dist/shared/{hx-counter-D-1NXzGs.js → hx-counter-Duf00H7p.js} +58 -49
- package/dist/shared/hx-counter-Duf00H7p.js.map +1 -0
- package/dist/shared/{hx-data-table-BwoJCFgs.js → hx-data-table-BWvd5NNx.js} +123 -89
- package/dist/shared/hx-data-table-BWvd5NNx.js.map +1 -0
- package/dist/shared/{hx-date-picker-DDcIBJir.js → hx-date-picker-6voxxxNE.js} +119 -485
- package/dist/shared/hx-date-picker-6voxxxNE.js.map +1 -0
- package/dist/shared/{hx-dialog-M7so0sRT.js → hx-dialog-DkUSnVgw.js} +72 -52
- package/dist/shared/hx-dialog-DkUSnVgw.js.map +1 -0
- package/dist/shared/{hx-divider-XgWIz4Mr.js → hx-divider-DNNs4e8q.js} +2 -1
- package/dist/shared/{hx-divider-XgWIz4Mr.js.map → hx-divider-DNNs4e8q.js.map} +1 -1
- package/dist/shared/{hx-drawer-CYxuhIQ0.js → hx-drawer-CJcRZcns.js} +85 -56
- package/dist/shared/hx-drawer-CJcRZcns.js.map +1 -0
- package/dist/shared/{hx-dropdown-7cfowTWv.js → hx-dropdown-Bo0KTM1A.js} +29 -20
- package/dist/shared/hx-dropdown-Bo0KTM1A.js.map +1 -0
- package/dist/shared/{hx-field-CDP8EXuj.js → hx-field-3MmzJ4kZ.js} +21 -13
- package/dist/shared/hx-field-3MmzJ4kZ.js.map +1 -0
- package/dist/shared/{hx-file-upload-9HbONfqt.js → hx-file-upload-ByjAgfNy.js} +103 -64
- package/dist/shared/hx-file-upload-ByjAgfNy.js.map +1 -0
- package/dist/shared/hx-form-BpS6v3Iu.js +258 -0
- package/dist/shared/hx-form-BpS6v3Iu.js.map +1 -0
- package/dist/shared/{hx-format-date-BsVr8gpD.js → hx-format-date-BdnWV2kX.js} +7 -1
- package/dist/shared/hx-format-date-BdnWV2kX.js.map +1 -0
- package/dist/shared/{hx-grid-BsDBCTbt.js → hx-grid-gEjuF0cR.js} +25 -18
- package/dist/shared/hx-grid-gEjuF0cR.js.map +1 -0
- package/dist/shared/{hx-help-text-DaOPN1iB.js → hx-help-text-BAcEGRUE.js} +2 -2
- package/dist/shared/{hx-help-text-DaOPN1iB.js.map → hx-help-text-BAcEGRUE.js.map} +1 -1
- package/dist/shared/{hx-icon--xsJztDh.js → hx-icon-CP6OnLoM.js} +6 -1
- package/dist/shared/hx-icon-CP6OnLoM.js.map +1 -0
- package/dist/shared/{hx-icon-button-iu0i_faq.js → hx-icon-button-DzH_bRtC.js} +15 -1
- package/dist/shared/{hx-icon-button-iu0i_faq.js.map → hx-icon-button-DzH_bRtC.js.map} +1 -1
- package/dist/shared/{hx-image-xyb_tHCR.js → hx-image-C6pGiI6c.js} +6 -1
- package/dist/shared/hx-image-C6pGiI6c.js.map +1 -0
- package/dist/shared/{hx-link-DfNy_UU8.js → hx-link-Tmk_YPvW.js} +46 -37
- package/dist/shared/hx-link-Tmk_YPvW.js.map +1 -0
- package/dist/shared/{hx-list-CdRNgeoP.js → hx-list-DwInEX2H.js} +63 -37
- package/dist/shared/hx-list-DwInEX2H.js.map +1 -0
- package/dist/shared/{hx-menu-divider-DR8klkFT.js → hx-menu-divider-DR4G_rqw.js} +71 -40
- package/dist/shared/hx-menu-divider-DR4G_rqw.js.map +1 -0
- package/dist/shared/{hx-meter-CZ7lnMra.js → hx-meter-uXkTZq-W.js} +77 -61
- package/dist/shared/hx-meter-uXkTZq-W.js.map +1 -0
- package/dist/shared/{hx-nav-DM6-cGKF.js → hx-nav-3JsN2Oak.js} +64 -47
- package/dist/shared/hx-nav-3JsN2Oak.js.map +1 -0
- package/dist/shared/{hx-nav-item-D54-5eUM.js → hx-nav-item-D3EJatzc.js} +40 -16
- package/dist/shared/hx-nav-item-D3EJatzc.js.map +1 -0
- package/dist/shared/{hx-number-input-BP6TIA92.js → hx-number-input-CIpL2BEh.js} +65 -34
- package/dist/shared/hx-number-input-CIpL2BEh.js.map +1 -0
- package/dist/shared/{hx-overflow-menu-CobkjAb8.js → hx-overflow-menu-2kgOJ_ht.js} +76 -64
- package/dist/shared/hx-overflow-menu-2kgOJ_ht.js.map +1 -0
- package/dist/shared/{hx-pagination-10dpXS95.js → hx-pagination-Blt-fFqV.js} +113 -94
- package/dist/shared/hx-pagination-Blt-fFqV.js.map +1 -0
- package/dist/shared/{hx-popover-ULjonbaO.js → hx-popover-DxE67miP.js} +71 -66
- package/dist/shared/hx-popover-DxE67miP.js.map +1 -0
- package/dist/shared/{hx-popup-CYf9Q5sj.js → hx-popup-Dg6n_PbY.js} +13 -1
- package/dist/shared/hx-popup-Dg6n_PbY.js.map +1 -0
- package/dist/shared/{hx-progress-bar-CnTibV63.js → hx-progress-bar-Dm_EHyng.js} +65 -47
- package/dist/shared/hx-progress-bar-Dm_EHyng.js.map +1 -0
- package/dist/shared/{hx-progress-ring-BHJBaXNk.js → hx-progress-ring-DpxBDD5d.js} +35 -28
- package/dist/shared/hx-progress-ring-DpxBDD5d.js.map +1 -0
- package/dist/shared/hx-prose-Ml_L2zje.js +59 -0
- package/dist/shared/hx-prose-Ml_L2zje.js.map +1 -0
- package/dist/shared/{hx-radio-BnKcRuQu.js → hx-radio-BywgVSEu.js} +7 -8
- package/dist/shared/hx-radio-BywgVSEu.js.map +1 -0
- package/dist/shared/{hx-rating-Y_t7Z4qb.js → hx-rating-CUWBQ0fZ.js} +131 -64
- package/dist/shared/hx-rating-CUWBQ0fZ.js.map +1 -0
- package/dist/shared/{hx-select-C50lD7NS.js → hx-select-BwDwxk-M.js} +107 -169
- package/dist/shared/hx-select-BwDwxk-M.js.map +1 -0
- package/dist/shared/hx-skeleton-BHvALyd7.js.map +1 -1
- package/dist/shared/{hx-slider-CprSNrRi.js → hx-slider-D_0EKJyk.js} +23 -7
- package/dist/shared/hx-slider-D_0EKJyk.js.map +1 -0
- package/dist/shared/{hx-spinner-BOApJ-g9.js → hx-spinner-DMn4SChS.js} +35 -28
- package/dist/shared/hx-spinner-DMn4SChS.js.map +1 -0
- package/dist/shared/{hx-split-button-CHGy4FUc.js → hx-split-button-CypgLXw1.js} +14 -3
- package/dist/shared/{hx-split-button-CHGy4FUc.js.map → hx-split-button-CypgLXw1.js.map} +1 -1
- package/dist/shared/{hx-split-panel-DYtB45Tr.js → hx-split-panel-CV_Kr4EK.js} +58 -37
- package/dist/shared/hx-split-panel-CV_Kr4EK.js.map +1 -0
- package/dist/shared/{hx-stack-CfoW7jU7.js → hx-stack-BStY1RmV.js} +29 -29
- package/dist/shared/hx-stack-BStY1RmV.js.map +1 -0
- package/dist/shared/{hx-stat-C2wfph8W.js → hx-stat-CHntLHJM.js} +18 -10
- package/dist/shared/hx-stat-CHntLHJM.js.map +1 -0
- package/dist/shared/{hx-status-indicator-oYWOkWlD.js → hx-status-indicator-C1BwEvUw.js} +15 -12
- package/dist/shared/hx-status-indicator-C1BwEvUw.js.map +1 -0
- package/dist/shared/{hx-step-DYoIumpR.js → hx-step-BIVWSPxd.js} +45 -33
- package/dist/shared/hx-step-BIVWSPxd.js.map +1 -0
- package/dist/shared/{hx-switch-DkKchcuP.js → hx-switch-BgX8kuWt.js} +12 -3
- package/dist/shared/hx-switch-BgX8kuWt.js.map +1 -0
- package/dist/shared/{hx-tab-panel-BRNcLICw.js → hx-tab-panel-DhOq67jj.js} +11 -2
- package/dist/shared/hx-tab-panel-DhOq67jj.js.map +1 -0
- package/dist/shared/{hx-tag-B3N-vZ6B.js → hx-tag-CzOTDcXI.js} +2 -1
- package/dist/shared/{hx-tag-B3N-vZ6B.js.map → hx-tag-CzOTDcXI.js.map} +1 -1
- package/dist/shared/{hx-td-CVwCGBYf.js → hx-td-h6oeW6YC.js} +43 -41
- package/dist/shared/hx-td-h6oeW6YC.js.map +1 -0
- package/dist/shared/{hx-text-NjKoQATI.js → hx-text-DTXjiviE.js} +2 -1
- package/dist/shared/{hx-text-NjKoQATI.js.map → hx-text-DTXjiviE.js.map} +1 -1
- package/dist/shared/{hx-text-input-CCZZbWQ9.js → hx-text-input-CqEdDHMU.js} +82 -65
- package/dist/shared/hx-text-input-CqEdDHMU.js.map +1 -0
- package/dist/shared/{hx-textarea-BsQdB1Rk.js → hx-textarea-BgX7rxyo.js} +21 -12
- package/dist/shared/hx-textarea-BgX7rxyo.js.map +1 -0
- package/dist/shared/hx-theme-6GDoUG8j.js.map +1 -1
- package/dist/shared/{hx-time-picker-CJcIjH3C.js → hx-time-picker-DmLu7WUC.js} +73 -273
- package/dist/shared/hx-time-picker-DmLu7WUC.js.map +1 -0
- package/dist/shared/{hx-toggle-button-D4F1soEM.js → hx-toggle-button-D1jpDvSA.js} +75 -38
- package/dist/shared/hx-toggle-button-D1jpDvSA.js.map +1 -0
- package/dist/shared/{hx-tooltip-Bk1iQRHs.js → hx-tooltip-kh7QFPKu.js} +66 -49
- package/dist/shared/hx-tooltip-kh7QFPKu.js.map +1 -0
- package/dist/shared/{hx-top-nav-D2bQpns3.js → hx-top-nav-DYlnzDaU.js} +3 -1
- package/dist/shared/{hx-top-nav-D2bQpns3.js.map → hx-top-nav-DYlnzDaU.js.map} +1 -1
- package/dist/shared/{hx-tree-item-BobGN76x.js → hx-tree-item-BP6UF_H1.js} +29 -16
- package/dist/shared/hx-tree-item-BP6UF_H1.js.map +1 -0
- package/dist/shared/{toast-factory-MvMMreTu.js → toast-factory-DTy-qN8r.js} +70 -59
- package/dist/shared/toast-factory-DTy-qN8r.js.map +1 -0
- package/dist/styles/shared-field.styles.d.ts +6 -0
- package/dist/styles/shared-field.styles.d.ts.map +1 -0
- package/package.json +2 -5
- package/dist/shared/hx-accordion-DT8qHOay.js.map +0 -1
- package/dist/shared/hx-action-bar-we_WJety.js.map +0 -1
- package/dist/shared/hx-alert-D6uok29t.js.map +0 -1
- package/dist/shared/hx-avatar-Cep6Urm3.js.map +0 -1
- package/dist/shared/hx-badge-BeuWuUj_.js.map +0 -1
- package/dist/shared/hx-breadcrumb-item-Bj2UqhzR.js.map +0 -1
- package/dist/shared/hx-button-Cbhqpm5i.js.map +0 -1
- package/dist/shared/hx-card-B9j2SHyI.js.map +0 -1
- package/dist/shared/hx-carousel-item-Be0bC-7o.js.map +0 -1
- package/dist/shared/hx-checkbox-CuaJqEo7.js.map +0 -1
- package/dist/shared/hx-checkbox-group-ydUdV9Sx.js.map +0 -1
- package/dist/shared/hx-code-snippet-DBwIjl5p.js.map +0 -1
- package/dist/shared/hx-color-picker-Bb2UPVc3.js +0 -803
- package/dist/shared/hx-color-picker-Bb2UPVc3.js.map +0 -1
- package/dist/shared/hx-combobox-CNvY-es8.js.map +0 -1
- package/dist/shared/hx-counter-D-1NXzGs.js.map +0 -1
- package/dist/shared/hx-data-table-BwoJCFgs.js.map +0 -1
- package/dist/shared/hx-date-picker-DDcIBJir.js.map +0 -1
- package/dist/shared/hx-dialog-M7so0sRT.js.map +0 -1
- package/dist/shared/hx-drawer-CYxuhIQ0.js.map +0 -1
- package/dist/shared/hx-dropdown-7cfowTWv.js.map +0 -1
- package/dist/shared/hx-field-CDP8EXuj.js.map +0 -1
- package/dist/shared/hx-file-upload-9HbONfqt.js.map +0 -1
- package/dist/shared/hx-form-BFv_N1dm.js +0 -1272
- package/dist/shared/hx-form-BFv_N1dm.js.map +0 -1
- package/dist/shared/hx-format-date-BsVr8gpD.js.map +0 -1
- package/dist/shared/hx-grid-BsDBCTbt.js.map +0 -1
- package/dist/shared/hx-icon--xsJztDh.js.map +0 -1
- package/dist/shared/hx-image-xyb_tHCR.js.map +0 -1
- package/dist/shared/hx-link-DfNy_UU8.js.map +0 -1
- package/dist/shared/hx-list-CdRNgeoP.js.map +0 -1
- package/dist/shared/hx-menu-divider-DR8klkFT.js.map +0 -1
- package/dist/shared/hx-meter-CZ7lnMra.js.map +0 -1
- package/dist/shared/hx-nav-DM6-cGKF.js.map +0 -1
- package/dist/shared/hx-nav-item-D54-5eUM.js.map +0 -1
- package/dist/shared/hx-number-input-BP6TIA92.js.map +0 -1
- package/dist/shared/hx-overflow-menu-CobkjAb8.js.map +0 -1
- package/dist/shared/hx-pagination-10dpXS95.js.map +0 -1
- package/dist/shared/hx-popover-ULjonbaO.js.map +0 -1
- package/dist/shared/hx-popup-CYf9Q5sj.js.map +0 -1
- package/dist/shared/hx-progress-bar-CnTibV63.js.map +0 -1
- package/dist/shared/hx-progress-ring-BHJBaXNk.js.map +0 -1
- package/dist/shared/hx-prose-DZh2KrMb.js +0 -876
- package/dist/shared/hx-prose-DZh2KrMb.js.map +0 -1
- package/dist/shared/hx-radio-BnKcRuQu.js.map +0 -1
- package/dist/shared/hx-rating-Y_t7Z4qb.js.map +0 -1
- package/dist/shared/hx-select-C50lD7NS.js.map +0 -1
- package/dist/shared/hx-slider-CprSNrRi.js.map +0 -1
- package/dist/shared/hx-spinner-BOApJ-g9.js.map +0 -1
- package/dist/shared/hx-split-panel-DYtB45Tr.js.map +0 -1
- package/dist/shared/hx-stack-CfoW7jU7.js.map +0 -1
- package/dist/shared/hx-stat-C2wfph8W.js.map +0 -1
- package/dist/shared/hx-status-indicator-oYWOkWlD.js.map +0 -1
- package/dist/shared/hx-step-DYoIumpR.js.map +0 -1
- package/dist/shared/hx-switch-DkKchcuP.js.map +0 -1
- package/dist/shared/hx-tab-panel-BRNcLICw.js.map +0 -1
- package/dist/shared/hx-td-CVwCGBYf.js.map +0 -1
- package/dist/shared/hx-text-input-CCZZbWQ9.js.map +0 -1
- package/dist/shared/hx-textarea-BsQdB1Rk.js.map +0 -1
- package/dist/shared/hx-time-picker-CJcIjH3C.js.map +0 -1
- package/dist/shared/hx-toggle-button-D4F1soEM.js.map +0 -1
- package/dist/shared/hx-tooltip-Bk1iQRHs.js.map +0 -1
- package/dist/shared/hx-tree-item-BobGN76x.js.map +0 -1
- package/dist/shared/toast-factory-MvMMreTu.js.map +0 -1
|
@@ -1,803 +0,0 @@
|
|
|
1
|
-
import { css as H, LitElement as O, html as p, nothing as k } from "lit";
|
|
2
|
-
import { property as m, state as F, customElement as G } from "lit/decorators.js";
|
|
3
|
-
import { styleMap as f } from "lit/directives/style-map.js";
|
|
4
|
-
import { tokenStyles as I } from "@helixui/tokens/lit";
|
|
5
|
-
const E = H`
|
|
6
|
-
:host {
|
|
7
|
-
display: inline-block;
|
|
8
|
-
position: relative;
|
|
9
|
-
font-family: var(--hx-font-family-base, sans-serif);
|
|
10
|
-
font-size: var(--hx-font-size-sm, 0.875rem);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host([disabled]) {
|
|
14
|
-
pointer-events: none;
|
|
15
|
-
opacity: var(--hx-opacity-disabled, 0.4);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* ─── Trigger ─── */
|
|
19
|
-
|
|
20
|
-
.trigger {
|
|
21
|
-
display: inline-flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
gap: var(--hx-space-2, 0.5rem);
|
|
24
|
-
padding: var(--hx-space-1, 0.25rem);
|
|
25
|
-
border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-300, #d1d5db);
|
|
26
|
-
border-radius: var(--hx-border-radius-md, 0.375rem);
|
|
27
|
-
background: var(--hx-color-neutral-0, #fff);
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
transition: border-color var(--hx-transition-fast, 0.15s ease);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.trigger:hover:not([disabled]) {
|
|
33
|
-
border-color: var(--hx-color-primary-500, #3b82f6);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.trigger:focus-visible {
|
|
37
|
-
outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);
|
|
38
|
-
outline-offset: var(--hx-focus-ring-offset, 2px);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.trigger-swatch {
|
|
42
|
-
width: 1.5rem;
|
|
43
|
-
height: 1.5rem;
|
|
44
|
-
border-radius: var(--hx-border-radius-sm, 0.25rem);
|
|
45
|
-
/* P1-6: was hardcoded rgba(0,0,0,0.1) */
|
|
46
|
-
border: var(--hx-border-width-thin, 1px) solid
|
|
47
|
-
var(--hx-color-picker-swatch-border, var(--hx-overlay-black-10, rgba(0, 0, 0, 0.1)));
|
|
48
|
-
background: var(--_preview-color, #000);
|
|
49
|
-
display: block;
|
|
50
|
-
flex-shrink: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.trigger-label {
|
|
54
|
-
font-size: var(--hx-font-size-sm, 0.875rem);
|
|
55
|
-
color: var(--hx-color-neutral-700, #374151);
|
|
56
|
-
font-family: var(--hx-font-family-mono, monospace);
|
|
57
|
-
white-space: nowrap;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* ─── Panel ─── */
|
|
61
|
-
|
|
62
|
-
.panel {
|
|
63
|
-
position: absolute;
|
|
64
|
-
z-index: var(--hx-color-picker-z-index, 1000);
|
|
65
|
-
top: calc(100% + 4px);
|
|
66
|
-
left: 0;
|
|
67
|
-
background: var(--hx-color-neutral-0, #fff);
|
|
68
|
-
/* P1-6: border width now uses token */
|
|
69
|
-
border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-200, #e5e7eb);
|
|
70
|
-
border-radius: var(--hx-border-radius-lg, 0.5rem);
|
|
71
|
-
/* P1-6: panel shadow uses component token */
|
|
72
|
-
box-shadow: 0 8px 24px
|
|
73
|
-
var(--hx-color-picker-panel-shadow, var(--hx-overlay-black-15, rgba(0, 0, 0, 0.15)));
|
|
74
|
-
padding: var(--hx-space-4, 1rem);
|
|
75
|
-
/* P2-8: panel width is now a CSS custom property */
|
|
76
|
-
width: var(--hx-color-picker-width, 260px);
|
|
77
|
-
display: flex;
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
gap: var(--hx-space-3, 0.75rem);
|
|
80
|
-
outline: none;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
:host([inline]) .panel {
|
|
84
|
-
position: static;
|
|
85
|
-
box-shadow: none;
|
|
86
|
-
border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-200, #e5e7eb);
|
|
87
|
-
border-radius: var(--hx-border-radius-lg, 0.5rem);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* ─── Gradient Grid ─── */
|
|
91
|
-
|
|
92
|
-
.gradient-grid {
|
|
93
|
-
position: relative;
|
|
94
|
-
width: 100%;
|
|
95
|
-
/* P2-8: grid height is now a CSS custom property */
|
|
96
|
-
height: var(--hx-color-picker-grid-height, 160px);
|
|
97
|
-
border-radius: var(--hx-border-radius-sm, 0.25rem);
|
|
98
|
-
cursor: crosshair;
|
|
99
|
-
overflow: hidden;
|
|
100
|
-
touch-action: none;
|
|
101
|
-
flex-shrink: 0;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* P0-1: focus ring for keyboard-operable gradient grid */
|
|
105
|
-
.gradient-grid:focus-visible {
|
|
106
|
-
outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);
|
|
107
|
-
outline-offset: var(--hx-focus-ring-offset, 2px);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.gradient-grid-bg {
|
|
111
|
-
position: absolute;
|
|
112
|
-
inset: 0;
|
|
113
|
-
background:
|
|
114
|
-
linear-gradient(to bottom, transparent, #000),
|
|
115
|
-
linear-gradient(to right, #fff, var(--_hue-color, hsl(0, 100%, 50%)));
|
|
116
|
-
pointer-events: none;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.gradient-thumb {
|
|
120
|
-
position: absolute;
|
|
121
|
-
width: 12px;
|
|
122
|
-
height: 12px;
|
|
123
|
-
border-radius: 50%;
|
|
124
|
-
/* A11y fix (WCAG 1.4.11): double-ring ensures thumb visibility on light hue backgrounds
|
|
125
|
-
(yellow, cyan) where a white-only border falls below 3:1 non-text contrast.
|
|
126
|
-
Inner dark ring at 1px provides contrast against light backgrounds;
|
|
127
|
-
outer white ring at 2px provides contrast against dark backgrounds. */
|
|
128
|
-
border: none;
|
|
129
|
-
box-shadow:
|
|
130
|
-
0 0 0 2px var(--hx-color-picker-thumb-border, var(--hx-color-neutral-0, #fff)),
|
|
131
|
-
0 0 0 3px var(--hx-color-picker-thumb-shadow, var(--hx-overlay-black-30, rgba(0, 0, 0, 0.3)));
|
|
132
|
-
transform: translate(-50%, -50%);
|
|
133
|
-
pointer-events: none;
|
|
134
|
-
top: var(--_thumb-y, 0%);
|
|
135
|
-
left: var(--_thumb-x, 100%);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/* ─── Sliders ─── */
|
|
139
|
-
|
|
140
|
-
.slider-track {
|
|
141
|
-
position: relative;
|
|
142
|
-
width: 100%;
|
|
143
|
-
height: 12px;
|
|
144
|
-
border-radius: 6px;
|
|
145
|
-
cursor: pointer;
|
|
146
|
-
touch-action: none;
|
|
147
|
-
flex-shrink: 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.slider-track:focus-visible {
|
|
151
|
-
outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);
|
|
152
|
-
outline-offset: var(--hx-focus-ring-offset, 2px);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.hue-track {
|
|
156
|
-
background: linear-gradient(
|
|
157
|
-
to right,
|
|
158
|
-
hsl(0, 100%, 50%),
|
|
159
|
-
hsl(30, 100%, 50%),
|
|
160
|
-
hsl(60, 100%, 50%),
|
|
161
|
-
hsl(90, 100%, 50%),
|
|
162
|
-
hsl(120, 100%, 50%),
|
|
163
|
-
hsl(150, 100%, 50%),
|
|
164
|
-
hsl(180, 100%, 50%),
|
|
165
|
-
hsl(210, 100%, 50%),
|
|
166
|
-
hsl(240, 100%, 50%),
|
|
167
|
-
hsl(270, 100%, 50%),
|
|
168
|
-
hsl(300, 100%, 50%),
|
|
169
|
-
hsl(330, 100%, 50%),
|
|
170
|
-
hsl(360, 100%, 50%)
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.opacity-track {
|
|
175
|
-
background-image:
|
|
176
|
-
linear-gradient(to right, transparent, var(--_hue-color, hsl(0, 100%, 50%))),
|
|
177
|
-
repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0 0 / 12px 12px;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.slider-thumb {
|
|
181
|
-
position: absolute;
|
|
182
|
-
top: 50%;
|
|
183
|
-
width: 16px;
|
|
184
|
-
height: 16px;
|
|
185
|
-
border-radius: 50%;
|
|
186
|
-
/* A11y fix (WCAG 1.4.11): double-ring ensures thumb visibility on light hue backgrounds
|
|
187
|
-
(yellow, cyan) where a white-only border falls below 3:1 non-text contrast.
|
|
188
|
-
Inner dark ring at 1px provides contrast against light backgrounds;
|
|
189
|
-
outer white ring at 2px provides contrast against dark backgrounds. */
|
|
190
|
-
border: none;
|
|
191
|
-
box-shadow:
|
|
192
|
-
0 0 0 2px var(--hx-color-picker-thumb-border, var(--hx-color-neutral-0, #fff)),
|
|
193
|
-
0 0 0 3px var(--hx-color-picker-thumb-shadow, var(--hx-overlay-black-30, rgba(0, 0, 0, 0.3)));
|
|
194
|
-
transform: translate(-50%, -50%);
|
|
195
|
-
pointer-events: none;
|
|
196
|
-
left: var(--_slider-pct, 0%);
|
|
197
|
-
background: var(--_thumb-color, hsl(0, 100%, 50%));
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* ─── Swatches ─── */
|
|
201
|
-
|
|
202
|
-
.swatches {
|
|
203
|
-
display: flex;
|
|
204
|
-
flex-wrap: wrap;
|
|
205
|
-
gap: var(--hx-space-1, 0.25rem);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.swatch-btn {
|
|
209
|
-
width: 20px;
|
|
210
|
-
height: 20px;
|
|
211
|
-
border-radius: var(--hx-border-radius-sm, 0.25rem);
|
|
212
|
-
/* P1-6: was hardcoded rgba(0,0,0,0.1) */
|
|
213
|
-
border: var(--hx-border-width-thin, 1px) solid
|
|
214
|
-
var(--hx-color-picker-swatch-border, var(--hx-overlay-black-10, rgba(0, 0, 0, 0.1)));
|
|
215
|
-
cursor: pointer;
|
|
216
|
-
padding: 0;
|
|
217
|
-
flex-shrink: 0;
|
|
218
|
-
transition: transform var(--hx-transition-fast, 0.15s ease);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.swatch-btn:hover {
|
|
222
|
-
transform: scale(1.15);
|
|
223
|
-
/* P1-6: was hardcoded rgba(0,0,0,0.3) */
|
|
224
|
-
border-color: var(
|
|
225
|
-
--hx-color-picker-swatch-border-hover,
|
|
226
|
-
var(--hx-overlay-black-30, rgba(0, 0, 0, 0.3))
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.swatch-btn:focus-visible {
|
|
231
|
-
outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);
|
|
232
|
-
outline-offset: var(--hx-focus-ring-offset, 2px);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/* ─── Input ─── */
|
|
236
|
-
|
|
237
|
-
.input-area {
|
|
238
|
-
display: flex;
|
|
239
|
-
align-items: center;
|
|
240
|
-
gap: var(--hx-space-2, 0.5rem);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.format-btn {
|
|
244
|
-
flex-shrink: 0;
|
|
245
|
-
padding: var(--hx-space-1, 0.25rem) var(--hx-space-2, 0.5rem);
|
|
246
|
-
background: var(--hx-color-neutral-100, #f3f4f6);
|
|
247
|
-
border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-300, #d1d5db);
|
|
248
|
-
border-radius: var(--hx-border-radius-sm, 0.25rem);
|
|
249
|
-
cursor: pointer;
|
|
250
|
-
font-size: var(--hx-font-size-xs, 0.75rem);
|
|
251
|
-
color: var(--hx-color-neutral-600, #4b5563);
|
|
252
|
-
text-transform: uppercase;
|
|
253
|
-
font-weight: var(--hx-font-weight-semibold, 600);
|
|
254
|
-
letter-spacing: 0.05em;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.format-btn:focus-visible {
|
|
258
|
-
outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);
|
|
259
|
-
outline-offset: var(--hx-focus-ring-offset, 2px);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.color-input {
|
|
263
|
-
flex: 1;
|
|
264
|
-
min-width: 0;
|
|
265
|
-
padding: var(--hx-space-1, 0.25rem) var(--hx-space-2, 0.5rem);
|
|
266
|
-
border: var(--hx-border-width-thin, 1px) solid var(--hx-color-neutral-300, #d1d5db);
|
|
267
|
-
border-radius: var(--hx-border-radius-sm, 0.25rem);
|
|
268
|
-
font-family: var(--hx-font-family-mono, monospace);
|
|
269
|
-
font-size: var(--hx-font-size-sm, 0.875rem);
|
|
270
|
-
color: var(--hx-color-neutral-900, #111827);
|
|
271
|
-
background: var(--hx-color-neutral-0, #fff);
|
|
272
|
-
outline: none;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.color-input:focus {
|
|
276
|
-
border-color: var(--hx-focus-ring-color, #2563eb);
|
|
277
|
-
/* P1-5: was invalid "box-shadow: ... / 0.2" syntax; replaced with valid box-shadow */
|
|
278
|
-
box-shadow: 0 0 0 2px color-mix(in srgb, var(--hx-focus-ring-color, #2563eb) 20%, transparent);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/* ─── Color preview strip in input area ─── */
|
|
282
|
-
|
|
283
|
-
.input-preview {
|
|
284
|
-
width: 24px;
|
|
285
|
-
height: 24px;
|
|
286
|
-
border-radius: var(--hx-border-radius-sm, 0.25rem);
|
|
287
|
-
/* P1-6: was hardcoded rgba(0,0,0,0.1) */
|
|
288
|
-
border: var(--hx-border-width-thin, 1px) solid
|
|
289
|
-
var(--hx-color-picker-swatch-border, var(--hx-overlay-black-10, rgba(0, 0, 0, 0.1)));
|
|
290
|
-
background: var(--_preview-color, #000);
|
|
291
|
-
flex-shrink: 0;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/* ─── Reduced Motion ─── */
|
|
295
|
-
|
|
296
|
-
@media (prefers-reduced-motion: reduce) {
|
|
297
|
-
.trigger,
|
|
298
|
-
.swatch-btn {
|
|
299
|
-
transition: none;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
`;
|
|
303
|
-
var V = Object.defineProperty, U = Object.getOwnPropertyDescriptor, c = (t, e, r, i) => {
|
|
304
|
-
for (var o = i > 1 ? void 0 : i ? U(e, r) : e, a = t.length - 1, s; a >= 0; a--)
|
|
305
|
-
(s = t[a]) && (o = (i ? s(e, r, o) : s(o)) || o);
|
|
306
|
-
return i && o && V(e, r, o), o;
|
|
307
|
-
};
|
|
308
|
-
function g(t, e, r) {
|
|
309
|
-
return Math.max(e, Math.min(r, t));
|
|
310
|
-
}
|
|
311
|
-
function A(t) {
|
|
312
|
-
let e = t.trim().replace(/^#/, "");
|
|
313
|
-
if (e.length === 3 && (e = e.replace(/(.)/g, "$1$1")), e.length === 4 && (e = e.replace(/(.)/g, "$1$1")), e.length === 6 && (e += "ff"), e.length !== 8) return null;
|
|
314
|
-
const r = parseInt(e, 16);
|
|
315
|
-
return isNaN(r) ? null : {
|
|
316
|
-
r: r >>> 24 & 255,
|
|
317
|
-
g: r >>> 16 & 255,
|
|
318
|
-
b: r >>> 8 & 255,
|
|
319
|
-
a: (r & 255) / 255
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
function $(t) {
|
|
323
|
-
return Math.round(g(t, 0, 255)).toString(16).padStart(2, "0");
|
|
324
|
-
}
|
|
325
|
-
function R(t, e) {
|
|
326
|
-
const r = `#${$(t.r)}${$(t.g)}${$(t.b)}`;
|
|
327
|
-
return e && t.a < 1 ? r + $(t.a * 255) : r;
|
|
328
|
-
}
|
|
329
|
-
function D(t) {
|
|
330
|
-
const e = t.r / 255, r = t.g / 255, i = t.b / 255, o = Math.max(e, r, i), a = Math.min(e, r, i), s = o - a, h = o === 0 ? 0 : s / o, l = o;
|
|
331
|
-
let n = 0;
|
|
332
|
-
return s !== 0 && (o === e ? n = ((r - i) / s + (r < i ? 6 : 0)) / 6 : o === r ? n = ((i - e) / s + 2) / 6 : n = ((e - r) / s + 4) / 6), { h: n * 360, s: h * 100, v: l * 100, a: t.a };
|
|
333
|
-
}
|
|
334
|
-
function S(t) {
|
|
335
|
-
const e = t.h / 360, r = t.s / 100, i = t.v / 100, o = Math.floor(e * 6), a = e * 6 - o, s = i * (1 - r), h = i * (1 - a * r), l = i * (1 - (1 - a) * r);
|
|
336
|
-
let n = 0, u = 0, v = 0;
|
|
337
|
-
switch (o % 6) {
|
|
338
|
-
case 0:
|
|
339
|
-
n = i, u = l, v = s;
|
|
340
|
-
break;
|
|
341
|
-
case 1:
|
|
342
|
-
n = h, u = i, v = s;
|
|
343
|
-
break;
|
|
344
|
-
case 2:
|
|
345
|
-
n = s, u = i, v = l;
|
|
346
|
-
break;
|
|
347
|
-
case 3:
|
|
348
|
-
n = s, u = h, v = i;
|
|
349
|
-
break;
|
|
350
|
-
case 4:
|
|
351
|
-
n = l, u = s, v = i;
|
|
352
|
-
break;
|
|
353
|
-
case 5:
|
|
354
|
-
n = i, u = s, v = h;
|
|
355
|
-
break;
|
|
356
|
-
}
|
|
357
|
-
return { r: Math.round(n * 255), g: Math.round(u * 255), b: Math.round(v * 255), a: t.a };
|
|
358
|
-
}
|
|
359
|
-
function T(t) {
|
|
360
|
-
const e = t.r / 255, r = t.g / 255, i = t.b / 255, o = Math.max(e, r, i), a = Math.min(e, r, i), s = (o + a) / 2;
|
|
361
|
-
let h = 0, l = 0;
|
|
362
|
-
if (o !== a) {
|
|
363
|
-
const n = o - a;
|
|
364
|
-
l = s > 0.5 ? n / (2 - o - a) : n / (o + a), o === e ? h = ((r - i) / n + (r < i ? 6 : 0)) / 6 : o === r ? h = ((i - e) / n + 2) / 6 : h = ((e - r) / n + 4) / 6;
|
|
365
|
-
}
|
|
366
|
-
return { h: h * 360, s: l * 100, l: s * 100, a: t.a };
|
|
367
|
-
}
|
|
368
|
-
function P(t) {
|
|
369
|
-
if (!t) return null;
|
|
370
|
-
if (t.startsWith("#")) {
|
|
371
|
-
const o = A(t);
|
|
372
|
-
return o ? D(o) : null;
|
|
373
|
-
}
|
|
374
|
-
const e = t.match(
|
|
375
|
-
/rgba?\(\s*(\d+)(?:\s*,\s*|\s+)(\d+)(?:\s*,\s*|\s+)(\d+)(?:\s*(?:\/|,)\s*([\d.]+))?\s*\)/
|
|
376
|
-
);
|
|
377
|
-
if (e) {
|
|
378
|
-
const [, o, a, s, h] = e;
|
|
379
|
-
return D({
|
|
380
|
-
r: parseInt(o ?? "0", 10),
|
|
381
|
-
g: parseInt(a ?? "0", 10),
|
|
382
|
-
b: parseInt(s ?? "0", 10),
|
|
383
|
-
a: h !== void 0 ? parseFloat(h) : 1
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
const r = t.match(
|
|
387
|
-
/hsla?\(\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)%(?:\s*,\s*|\s+)([\d.]+)%(?:\s*(?:\/|,)\s*([\d.]+))?\s*\)/
|
|
388
|
-
);
|
|
389
|
-
if (r) {
|
|
390
|
-
const [, o, a, s, h] = r, l = parseFloat(o ?? "0"), n = parseFloat(a ?? "0") / 100, u = parseFloat(s ?? "0") / 100, v = h !== void 0 ? parseFloat(h) : 1, b = (1 - Math.abs(2 * u - 1)) * n, _ = b * (1 - Math.abs(l / 60 % 2 - 1)), M = u - b / 2;
|
|
391
|
-
let x = 0, w = 0, y = 0;
|
|
392
|
-
return l < 60 ? (x = b, w = _) : l < 120 ? (x = _, w = b) : l < 180 ? (w = b, y = _) : l < 240 ? (w = _, y = b) : l < 300 ? (x = _, y = b) : (x = b, y = _), D({
|
|
393
|
-
r: Math.round((x + M) * 255),
|
|
394
|
-
g: Math.round((w + M) * 255),
|
|
395
|
-
b: Math.round((y + M) * 255),
|
|
396
|
-
a: v
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
const i = t.match(
|
|
400
|
-
/hsva?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)/
|
|
401
|
-
);
|
|
402
|
-
if (i) {
|
|
403
|
-
const [, o, a, s, h] = i;
|
|
404
|
-
return {
|
|
405
|
-
h: parseFloat(o ?? "0"),
|
|
406
|
-
s: parseFloat(a ?? "0"),
|
|
407
|
-
v: parseFloat(s ?? "0"),
|
|
408
|
-
a: h !== void 0 ? parseFloat(h) : 1
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
return null;
|
|
412
|
-
}
|
|
413
|
-
function C(t, e, r) {
|
|
414
|
-
const i = S(t);
|
|
415
|
-
switch (e) {
|
|
416
|
-
case "hex":
|
|
417
|
-
return R(i, r);
|
|
418
|
-
case "rgb":
|
|
419
|
-
return r && t.a < 1 ? `rgb(${i.r} ${i.g} ${i.b} / ${Math.round(t.a * 100) / 100})` : `rgb(${i.r} ${i.g} ${i.b})`;
|
|
420
|
-
case "hsl": {
|
|
421
|
-
const o = T(i);
|
|
422
|
-
return r && t.a < 1 ? `hsl(${Math.round(o.h)} ${Math.round(o.s)}% ${Math.round(o.l)}% / ${Math.round(t.a * 100) / 100})` : `hsl(${Math.round(o.h)} ${Math.round(o.s)}% ${Math.round(o.l)}%)`;
|
|
423
|
-
}
|
|
424
|
-
case "hsv":
|
|
425
|
-
return r && t.a < 1 ? `hsva(${Math.round(t.h)}, ${Math.round(t.s)}%, ${Math.round(t.v)}%, ${Math.round(t.a * 100) / 100})` : `hsv(${Math.round(t.h)}, ${Math.round(t.s)}%, ${Math.round(t.v)}%)`;
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
let d = class extends O {
|
|
429
|
-
constructor() {
|
|
430
|
-
super(), this.value = "#000000", this.format = "hex", this.opacity = !1, this.swatches = [], this.swatchesOnly = !1, this.disabled = !1, this.name = "", this.inline = !1, this._hsv = { h: 0, s: 0, v: 0, a: 1 }, this._open = !1, this._inputValue = "#000000", this._draggingGrid = !1, this._draggingHue = !1, this._draggingOpacity = !1, this._internals = this.attachInternals(), this._boundPointerMove = this._handlePointerMove.bind(this), this._boundPointerUp = this._handlePointerUp.bind(this), this._boundDocumentClick = this._handleDocumentClick.bind(this);
|
|
431
|
-
}
|
|
432
|
-
// ─── Lifecycle ───────────────────────────────────────────────────────────
|
|
433
|
-
connectedCallback() {
|
|
434
|
-
super.connectedCallback(), this._syncFromValue(), document.addEventListener("click", this._boundDocumentClick, !0), document.addEventListener("pointermove", this._boundPointerMove), document.addEventListener("pointerup", this._boundPointerUp);
|
|
435
|
-
}
|
|
436
|
-
disconnectedCallback() {
|
|
437
|
-
super.disconnectedCallback(), document.removeEventListener("click", this._boundDocumentClick, !0), document.removeEventListener("pointermove", this._boundPointerMove), document.removeEventListener("pointerup", this._boundPointerUp);
|
|
438
|
-
}
|
|
439
|
-
willUpdate(t) {
|
|
440
|
-
t.has("value") && this._syncFromValue();
|
|
441
|
-
}
|
|
442
|
-
// ─── Sync ────────────────────────────────────────────────────────────────
|
|
443
|
-
_syncFromValue() {
|
|
444
|
-
const t = P(this.value);
|
|
445
|
-
t && (this._hsv = t), this._inputValue = C(this._hsv, this.format, this.opacity), this._internals.setFormValue(this.value);
|
|
446
|
-
}
|
|
447
|
-
/** Called when a parent fieldset is disabled/enabled. */
|
|
448
|
-
formDisabledCallback(t) {
|
|
449
|
-
this.disabled = t;
|
|
450
|
-
}
|
|
451
|
-
_commit(t) {
|
|
452
|
-
const e = C(this._hsv, this.format, this.opacity);
|
|
453
|
-
this.value = e, this._inputValue = e, this._internals.setFormValue(e);
|
|
454
|
-
const i = {
|
|
455
|
-
bubbles: !0,
|
|
456
|
-
composed: !0,
|
|
457
|
-
detail: { value: e }
|
|
458
|
-
};
|
|
459
|
-
t === "drag" ? this.dispatchEvent(new CustomEvent("hx-input", i)) : this.dispatchEvent(new CustomEvent("hx-change", i));
|
|
460
|
-
}
|
|
461
|
-
// ─── Panel open/close ────────────────────────────────────────────────────
|
|
462
|
-
_show() {
|
|
463
|
-
this._open || this.inline || (this._open = !0);
|
|
464
|
-
}
|
|
465
|
-
_hide() {
|
|
466
|
-
this._open && (this._open = !1);
|
|
467
|
-
}
|
|
468
|
-
_handleDocumentClick(t) {
|
|
469
|
-
this._open && (t.composedPath().includes(this) || this._hide());
|
|
470
|
-
}
|
|
471
|
-
_handleTriggerClick(t) {
|
|
472
|
-
t.stopPropagation(), this._open ? this._hide() : this._show();
|
|
473
|
-
}
|
|
474
|
-
_handlePanelKeydown(t) {
|
|
475
|
-
var e, r;
|
|
476
|
-
t.key === "Escape" && (t.stopPropagation(), this._hide(), (r = (e = this.shadowRoot) == null ? void 0 : e.querySelector('[part="trigger"]')) == null || r.focus());
|
|
477
|
-
}
|
|
478
|
-
// ─── Gradient grid dragging ───────────────────────────────────────────────
|
|
479
|
-
_handleGridPointerDown(t) {
|
|
480
|
-
this.disabled || (t.preventDefault(), this._draggingGrid = !0, t.currentTarget.setPointerCapture(t.pointerId), this._updateGridFromPointer(t));
|
|
481
|
-
}
|
|
482
|
-
_updateGridFromPointer(t) {
|
|
483
|
-
var a;
|
|
484
|
-
const e = (a = this.shadowRoot) == null ? void 0 : a.querySelector('[part="grid"]');
|
|
485
|
-
if (!e) return;
|
|
486
|
-
const r = e.getBoundingClientRect(), i = g((t.clientX - r.left) / r.width, 0, 1), o = g((t.clientY - r.top) / r.height, 0, 1);
|
|
487
|
-
this._hsv = { ...this._hsv, s: i * 100, v: (1 - o) * 100 }, this._commit("drag"), this.requestUpdate();
|
|
488
|
-
}
|
|
489
|
-
// P0-1: Keyboard support for gradient grid — fixes WCAG 2.1 SC 2.1.1 failure
|
|
490
|
-
_handleGridKeydown(t) {
|
|
491
|
-
let e = 0, r = 0;
|
|
492
|
-
if (t.key === "ArrowLeft") e = -1;
|
|
493
|
-
else if (t.key === "ArrowRight") e = 1;
|
|
494
|
-
else if (t.key === "ArrowUp") r = 1;
|
|
495
|
-
else if (t.key === "ArrowDown") r = -1;
|
|
496
|
-
else if (t.key === "PageUp") r = 10;
|
|
497
|
-
else if (t.key === "PageDown") r = -10;
|
|
498
|
-
else if (t.key === "Home") {
|
|
499
|
-
this._hsv = { ...this._hsv, s: 0, v: 100 }, this._commit("change");
|
|
500
|
-
return;
|
|
501
|
-
} else if (t.key === "End") {
|
|
502
|
-
this._hsv = { ...this._hsv, s: 100, v: 0 }, this._commit("change");
|
|
503
|
-
return;
|
|
504
|
-
}
|
|
505
|
-
(e !== 0 || r !== 0) && (t.preventDefault(), this._hsv = {
|
|
506
|
-
...this._hsv,
|
|
507
|
-
s: g(this._hsv.s + e, 0, 100),
|
|
508
|
-
v: g(this._hsv.v + r, 0, 100)
|
|
509
|
-
}, this._commit("change"));
|
|
510
|
-
}
|
|
511
|
-
// ─── Hue slider dragging ─────────────────────────────────────────────────
|
|
512
|
-
_handleHuePointerDown(t) {
|
|
513
|
-
this.disabled || (t.preventDefault(), this._draggingHue = !0, t.currentTarget.setPointerCapture(t.pointerId), this._updateHueFromPointer(t));
|
|
514
|
-
}
|
|
515
|
-
_updateHueFromPointer(t) {
|
|
516
|
-
var o;
|
|
517
|
-
const e = (o = this.shadowRoot) == null ? void 0 : o.querySelector('[part="hue-slider"]');
|
|
518
|
-
if (!e) return;
|
|
519
|
-
const r = e.getBoundingClientRect(), i = g((t.clientX - r.left) / r.width, 0, 1);
|
|
520
|
-
this._hsv = { ...this._hsv, h: i * 360 }, this._commit("drag"), this.requestUpdate();
|
|
521
|
-
}
|
|
522
|
-
// ─── Opacity slider dragging ──────────────────────────────────────────────
|
|
523
|
-
_handleOpacityPointerDown(t) {
|
|
524
|
-
this.disabled || (t.preventDefault(), this._draggingOpacity = !0, t.currentTarget.setPointerCapture(t.pointerId), this._updateOpacityFromPointer(t));
|
|
525
|
-
}
|
|
526
|
-
_updateOpacityFromPointer(t) {
|
|
527
|
-
var o;
|
|
528
|
-
const e = (o = this.shadowRoot) == null ? void 0 : o.querySelector('[part="opacity-slider"]');
|
|
529
|
-
if (!e) return;
|
|
530
|
-
const r = e.getBoundingClientRect(), i = g((t.clientX - r.left) / r.width, 0, 1);
|
|
531
|
-
this._hsv = { ...this._hsv, a: i }, this._commit("drag"), this.requestUpdate();
|
|
532
|
-
}
|
|
533
|
-
// ─── Document-level pointer handlers ─────────────────────────────────────
|
|
534
|
-
_handlePointerMove(t) {
|
|
535
|
-
this._draggingGrid ? this._updateGridFromPointer(t) : this._draggingHue ? this._updateHueFromPointer(t) : this._draggingOpacity && this._updateOpacityFromPointer(t);
|
|
536
|
-
}
|
|
537
|
-
_handlePointerUp() {
|
|
538
|
-
(this._draggingGrid || this._draggingHue || this._draggingOpacity) && (this._draggingGrid = !1, this._draggingHue = !1, this._draggingOpacity = !1, this._commit("change"));
|
|
539
|
-
}
|
|
540
|
-
// ─── Keyboard handling for sliders ───────────────────────────────────────
|
|
541
|
-
_handleHueKeydown(t) {
|
|
542
|
-
let e = 0;
|
|
543
|
-
if (t.key === "ArrowLeft" || t.key === "ArrowDown") e = -1;
|
|
544
|
-
else if (t.key === "ArrowRight" || t.key === "ArrowUp") e = 1;
|
|
545
|
-
else if (t.key === "PageDown") e = -10;
|
|
546
|
-
else if (t.key === "PageUp") e = 10;
|
|
547
|
-
else if (t.key === "Home") {
|
|
548
|
-
this._hsv = { ...this._hsv, h: 0 }, this._commit("change");
|
|
549
|
-
return;
|
|
550
|
-
} else if (t.key === "End") {
|
|
551
|
-
this._hsv = { ...this._hsv, h: 360 }, this._commit("change");
|
|
552
|
-
return;
|
|
553
|
-
}
|
|
554
|
-
e !== 0 && (t.preventDefault(), this._hsv = { ...this._hsv, h: g(this._hsv.h + e, 0, 360) }, this._commit("change"));
|
|
555
|
-
}
|
|
556
|
-
_handleOpacityKeydown(t) {
|
|
557
|
-
let e = 0;
|
|
558
|
-
if (t.key === "ArrowLeft" || t.key === "ArrowDown") e = -0.01;
|
|
559
|
-
else if (t.key === "ArrowRight" || t.key === "ArrowUp") e = 0.01;
|
|
560
|
-
else if (t.key === "PageDown") e = -0.1;
|
|
561
|
-
else if (t.key === "PageUp") e = 0.1;
|
|
562
|
-
else if (t.key === "Home") {
|
|
563
|
-
this._hsv = { ...this._hsv, a: 0 }, this._commit("change");
|
|
564
|
-
return;
|
|
565
|
-
} else if (t.key === "End") {
|
|
566
|
-
this._hsv = { ...this._hsv, a: 1 }, this._commit("change");
|
|
567
|
-
return;
|
|
568
|
-
}
|
|
569
|
-
e !== 0 && (t.preventDefault(), this._hsv = { ...this._hsv, a: g(this._hsv.a + e, 0, 1) }, this._commit("change"));
|
|
570
|
-
}
|
|
571
|
-
// ─── Input ───────────────────────────────────────────────────────────────
|
|
572
|
-
// P1-7: Bound to @input (was @change) for real-time color preview while typing
|
|
573
|
-
_handleInputChange(t) {
|
|
574
|
-
const e = t.target, r = P(e.value.trim());
|
|
575
|
-
r && (this._hsv = r, this._commit("change")), this._inputValue = e.value;
|
|
576
|
-
}
|
|
577
|
-
_handleInputBlur(t) {
|
|
578
|
-
const e = t.target, r = P(e.value.trim());
|
|
579
|
-
r ? (this._hsv = r, this._commit("change")) : this._inputValue = C(this._hsv, this.format, this.opacity);
|
|
580
|
-
}
|
|
581
|
-
_handleFormatCycle() {
|
|
582
|
-
const t = ["hex", "rgb", "hsl", "hsv"], e = t.indexOf(this.format), r = t[(e + 1) % t.length];
|
|
583
|
-
r !== void 0 && (this.format = r), this._inputValue = C(this._hsv, this.format, this.opacity);
|
|
584
|
-
}
|
|
585
|
-
// ─── Swatches ────────────────────────────────────────────────────────────
|
|
586
|
-
_handleSwatchClick(t) {
|
|
587
|
-
const e = P(t);
|
|
588
|
-
e && (this._hsv = e, this._commit("change"));
|
|
589
|
-
}
|
|
590
|
-
// ─── Computed values ──────────────────────────────────────────────────────
|
|
591
|
-
_hueColor() {
|
|
592
|
-
return `hsl(${Math.round(this._hsv.h)}, 100%, 50%)`;
|
|
593
|
-
}
|
|
594
|
-
_previewColor() {
|
|
595
|
-
const t = S(this._hsv);
|
|
596
|
-
return this.opacity && this._hsv.a < 1 ? `rgb(${t.r} ${t.g} ${t.b} / ${Math.round(this._hsv.a * 100) / 100})` : `rgb(${t.r} ${t.g} ${t.b})`;
|
|
597
|
-
}
|
|
598
|
-
// ─── Render helpers ───────────────────────────────────────────────────────
|
|
599
|
-
_renderGrid() {
|
|
600
|
-
const t = `${this._hsv.s}%`, e = `${100 - this._hsv.v}%`, r = this._hueColor();
|
|
601
|
-
return p`
|
|
602
|
-
<div
|
|
603
|
-
part="grid"
|
|
604
|
-
class="gradient-grid"
|
|
605
|
-
role="slider"
|
|
606
|
-
tabindex="0"
|
|
607
|
-
aria-label="Color gradient"
|
|
608
|
-
aria-valuemin="0"
|
|
609
|
-
aria-valuemax="100"
|
|
610
|
-
aria-valuenow=${Math.round(this._hsv.s)}
|
|
611
|
-
aria-valuetext="Saturation ${Math.round(this._hsv.s)}%, Value ${Math.round(this._hsv.v)}%"
|
|
612
|
-
@pointerdown=${this._handleGridPointerDown}
|
|
613
|
-
@keydown=${this._handleGridKeydown}
|
|
614
|
-
>
|
|
615
|
-
<div class="gradient-grid-bg" style=${f({ "--_hue-color": r })}></div>
|
|
616
|
-
<div
|
|
617
|
-
class="gradient-thumb"
|
|
618
|
-
style=${f({ "--_thumb-x": t, "--_thumb-y": e })}
|
|
619
|
-
aria-hidden="true"
|
|
620
|
-
></div>
|
|
621
|
-
</div>
|
|
622
|
-
`;
|
|
623
|
-
}
|
|
624
|
-
_renderHueSlider() {
|
|
625
|
-
const t = `${this._hsv.h / 360 * 100}%`, e = this._hueColor();
|
|
626
|
-
return p`
|
|
627
|
-
<div
|
|
628
|
-
part="slider hue-slider"
|
|
629
|
-
class="slider-track hue-track"
|
|
630
|
-
role="slider"
|
|
631
|
-
tabindex="0"
|
|
632
|
-
aria-label="Hue"
|
|
633
|
-
aria-valuemin="0"
|
|
634
|
-
aria-valuemax="360"
|
|
635
|
-
aria-valuenow=${Math.round(this._hsv.h)}
|
|
636
|
-
aria-valuetext="${Math.round(this._hsv.h)}°"
|
|
637
|
-
@pointerdown=${this._handleHuePointerDown}
|
|
638
|
-
@keydown=${this._handleHueKeydown}
|
|
639
|
-
>
|
|
640
|
-
<div
|
|
641
|
-
class="slider-thumb"
|
|
642
|
-
style=${f({ "--_slider-pct": t, "--_thumb-color": e })}
|
|
643
|
-
aria-hidden="true"
|
|
644
|
-
></div>
|
|
645
|
-
</div>
|
|
646
|
-
`;
|
|
647
|
-
}
|
|
648
|
-
_renderOpacitySlider() {
|
|
649
|
-
if (!this.opacity) return k;
|
|
650
|
-
const t = `${this._hsv.a * 100}%`, e = S(this._hsv), r = `rgb(${e.r} ${e.g} ${e.b} / ${Math.round(this._hsv.a * 100) / 100})`, i = this._hueColor();
|
|
651
|
-
return p`
|
|
652
|
-
<div
|
|
653
|
-
part="slider opacity-slider"
|
|
654
|
-
class="slider-track opacity-track"
|
|
655
|
-
role="slider"
|
|
656
|
-
tabindex="0"
|
|
657
|
-
aria-label="Opacity"
|
|
658
|
-
aria-valuemin="0"
|
|
659
|
-
aria-valuemax="100"
|
|
660
|
-
aria-valuenow=${Math.round(this._hsv.a * 100)}
|
|
661
|
-
aria-valuetext="${Math.round(this._hsv.a * 100)}%"
|
|
662
|
-
style=${f({ "--_hue-color": i })}
|
|
663
|
-
@pointerdown=${this._handleOpacityPointerDown}
|
|
664
|
-
@keydown=${this._handleOpacityKeydown}
|
|
665
|
-
>
|
|
666
|
-
<div
|
|
667
|
-
class="slider-thumb"
|
|
668
|
-
style=${f({ "--_slider-pct": t, "--_thumb-color": r })}
|
|
669
|
-
aria-hidden="true"
|
|
670
|
-
></div>
|
|
671
|
-
</div>
|
|
672
|
-
`;
|
|
673
|
-
}
|
|
674
|
-
_renderSwatches() {
|
|
675
|
-
var t;
|
|
676
|
-
return (t = this.swatches) != null && t.length ? p`
|
|
677
|
-
<div part="swatches" class="swatches" role="group" aria-label="Preset colors">
|
|
678
|
-
${this.swatches.map(
|
|
679
|
-
(e) => p`
|
|
680
|
-
<button
|
|
681
|
-
type="button"
|
|
682
|
-
class="swatch-btn"
|
|
683
|
-
style=${f({ background: e })}
|
|
684
|
-
aria-label=${e}
|
|
685
|
-
title=${e}
|
|
686
|
-
@click=${() => this._handleSwatchClick(e)}
|
|
687
|
-
></button>
|
|
688
|
-
`
|
|
689
|
-
)}
|
|
690
|
-
</div>
|
|
691
|
-
` : k;
|
|
692
|
-
}
|
|
693
|
-
_renderInput() {
|
|
694
|
-
return p`
|
|
695
|
-
<div part="input" class="input-area">
|
|
696
|
-
<div
|
|
697
|
-
class="input-preview"
|
|
698
|
-
style=${f({ "--_preview-color": this._previewColor() })}
|
|
699
|
-
aria-hidden="true"
|
|
700
|
-
></div>
|
|
701
|
-
<button
|
|
702
|
-
type="button"
|
|
703
|
-
class="format-btn"
|
|
704
|
-
aria-label="Switch color format"
|
|
705
|
-
title="Switch format"
|
|
706
|
-
@click=${this._handleFormatCycle}
|
|
707
|
-
>
|
|
708
|
-
${this.format}
|
|
709
|
-
</button>
|
|
710
|
-
<input
|
|
711
|
-
type="text"
|
|
712
|
-
class="color-input"
|
|
713
|
-
.value=${this._inputValue}
|
|
714
|
-
aria-label="Color value"
|
|
715
|
-
autocomplete="off"
|
|
716
|
-
spellcheck="false"
|
|
717
|
-
@input=${this._handleInputChange}
|
|
718
|
-
@blur=${this._handleInputBlur}
|
|
719
|
-
/>
|
|
720
|
-
</div>
|
|
721
|
-
`;
|
|
722
|
-
}
|
|
723
|
-
_renderPanel() {
|
|
724
|
-
return p`
|
|
725
|
-
<div
|
|
726
|
-
class="panel"
|
|
727
|
-
role="group"
|
|
728
|
-
aria-label="Color picker"
|
|
729
|
-
tabindex="-1"
|
|
730
|
-
@keydown=${this._handlePanelKeydown}
|
|
731
|
-
>
|
|
732
|
-
${this.swatchesOnly ? k : p`${this._renderGrid()} ${this._renderHueSlider()} ${this._renderOpacitySlider()}`}
|
|
733
|
-
${this._renderSwatches()} ${this._renderInput()}
|
|
734
|
-
</div>
|
|
735
|
-
`;
|
|
736
|
-
}
|
|
737
|
-
// ─── Main render ─────────────────────────────────────────────────────────
|
|
738
|
-
render() {
|
|
739
|
-
const t = this._previewColor();
|
|
740
|
-
return this.inline ? p`
|
|
741
|
-
<div style=${f({ "--_preview-color": t })}>${this._renderPanel()}</div>
|
|
742
|
-
` : p`
|
|
743
|
-
<button
|
|
744
|
-
part="trigger"
|
|
745
|
-
type="button"
|
|
746
|
-
class="trigger"
|
|
747
|
-
aria-label="Choose color: ${this._inputValue}"
|
|
748
|
-
aria-expanded=${this._open ? "true" : k}
|
|
749
|
-
?disabled=${this.disabled}
|
|
750
|
-
style=${f({ "--_preview-color": t })}
|
|
751
|
-
@click=${this._handleTriggerClick}
|
|
752
|
-
>
|
|
753
|
-
<slot name="trigger">
|
|
754
|
-
<span class="trigger-swatch" aria-hidden="true"></span>
|
|
755
|
-
<span class="trigger-label">${this._inputValue}</span>
|
|
756
|
-
</slot>
|
|
757
|
-
</button>
|
|
758
|
-
${this._open ? this._renderPanel() : k}
|
|
759
|
-
`;
|
|
760
|
-
}
|
|
761
|
-
};
|
|
762
|
-
d.styles = [I, E];
|
|
763
|
-
d.formAssociated = !0;
|
|
764
|
-
c([
|
|
765
|
-
m({ type: String, reflect: !0 })
|
|
766
|
-
], d.prototype, "value", 2);
|
|
767
|
-
c([
|
|
768
|
-
m({ type: String, reflect: !0 })
|
|
769
|
-
], d.prototype, "format", 2);
|
|
770
|
-
c([
|
|
771
|
-
m({ type: Boolean, reflect: !0 })
|
|
772
|
-
], d.prototype, "opacity", 2);
|
|
773
|
-
c([
|
|
774
|
-
m({ attribute: !1 })
|
|
775
|
-
], d.prototype, "swatches", 2);
|
|
776
|
-
c([
|
|
777
|
-
m({ type: Boolean, reflect: !0, attribute: "swatches-only" })
|
|
778
|
-
], d.prototype, "swatchesOnly", 2);
|
|
779
|
-
c([
|
|
780
|
-
m({ type: Boolean, reflect: !0 })
|
|
781
|
-
], d.prototype, "disabled", 2);
|
|
782
|
-
c([
|
|
783
|
-
m({ type: String, reflect: !0 })
|
|
784
|
-
], d.prototype, "name", 2);
|
|
785
|
-
c([
|
|
786
|
-
m({ type: Boolean, reflect: !0 })
|
|
787
|
-
], d.prototype, "inline", 2);
|
|
788
|
-
c([
|
|
789
|
-
F()
|
|
790
|
-
], d.prototype, "_hsv", 2);
|
|
791
|
-
c([
|
|
792
|
-
F()
|
|
793
|
-
], d.prototype, "_open", 2);
|
|
794
|
-
c([
|
|
795
|
-
F()
|
|
796
|
-
], d.prototype, "_inputValue", 2);
|
|
797
|
-
d = c([
|
|
798
|
-
G("hx-color-picker")
|
|
799
|
-
], d);
|
|
800
|
-
export {
|
|
801
|
-
d as H
|
|
802
|
-
};
|
|
803
|
-
//# sourceMappingURL=hx-color-picker-Bb2UPVc3.js.map
|