@alfadocs/ui-kit-debug 0.65.0 → 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{agenda-card-Bl-SBiCh.js → agenda-card-BxSFkqgY.js} +2 -2
- package/dist/_chunks/{agenda-card-Bl-SBiCh.js.map → agenda-card-BxSFkqgY.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-Bh1KfEOG.js → agenda-tray-T-BumlGZ.js} +2 -2
- package/dist/_chunks/{agenda-tray-Bh1KfEOG.js.map → agenda-tray-T-BumlGZ.js.map} +1 -1
- package/dist/_chunks/{ai-consent-banner-Btzmk8OH.js → ai-consent-banner-Dxtx_WAh.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-Btzmk8OH.js.map → ai-consent-banner-Dxtx_WAh.js.map} +1 -1
- package/dist/_chunks/{ai-tools-rail-JnlTqfS4.js → ai-tools-rail-DfmewPUN.js} +92 -76
- package/dist/_chunks/ai-tools-rail-DfmewPUN.js.map +1 -0
- package/dist/_chunks/{alia-sidebar-CN8pA6c-.js → alia-sidebar-Ckv0yCKi.js} +2 -2
- package/dist/_chunks/{alia-sidebar-CN8pA6c-.js.map → alia-sidebar-Ckv0yCKi.js.map} +1 -1
- package/dist/_chunks/{anamnesis-card-qeLYRG79.js → anamnesis-card-N8pIKWuS.js} +2 -2
- package/dist/_chunks/{anamnesis-card-qeLYRG79.js.map → anamnesis-card-N8pIKWuS.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-BfzFjEyb.js → antenatal-schedule-timeline-35ebkcZT.js} +2 -2
- package/dist/_chunks/{antenatal-schedule-timeline-BfzFjEyb.js.map → antenatal-schedule-timeline-35ebkcZT.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-BQnJEora.js → appointment-tray-CQJ3Nbi5.js} +4 -4
- package/dist/_chunks/{appointment-tray-BQnJEora.js.map → appointment-tray-CQJ3Nbi5.js.map} +1 -1
- package/dist/_chunks/{badge-zsf5i5bH.js → badge-CqGsX32l.js} +46 -42
- package/dist/_chunks/badge-CqGsX32l.js.map +1 -0
- package/dist/_chunks/{bishop-score-x2fNqbuZ.js → bishop-score-CjsB9bM-.js} +3 -3
- package/dist/_chunks/{bishop-score-x2fNqbuZ.js.map → bishop-score-CjsB9bM-.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-C3roxbqD.js → bmi-calculator-n-823_1V.js} +3 -3
- package/dist/_chunks/{bmi-calculator-C3roxbqD.js.map → bmi-calculator-n-823_1V.js.map} +1 -1
- package/dist/_chunks/{care-plan-card-D42WD4-T.js → care-plan-card-CJei-nl9.js} +4 -4
- package/dist/_chunks/{care-plan-card-D42WD4-T.js.map → care-plan-card-CJei-nl9.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-BukNI7Uy.js → care-plan-entry-card-EmfrbHu8.js} +4 -4
- package/dist/_chunks/{care-plan-entry-card-BukNI7Uy.js.map → care-plan-entry-card-EmfrbHu8.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-BYo437dU.js → clinical-note-card-gtrxv6zn.js} +2 -2
- package/dist/_chunks/{clinical-note-card-BYo437dU.js.map → clinical-note-card-gtrxv6zn.js.map} +1 -1
- package/dist/_chunks/{color-picker-9tL7pz5y.js → color-picker-B7xsn6tX.js} +186 -167
- package/dist/_chunks/color-picker-B7xsn6tX.js.map +1 -0
- package/dist/_chunks/columns-2-BTOBZbep.js +15 -0
- package/dist/_chunks/columns-2-BTOBZbep.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-CCeJmjbd.js → contact-profile-card-7BMB85T6.js} +2 -2
- package/dist/_chunks/{contact-profile-card-CCeJmjbd.js.map → contact-profile-card-7BMB85T6.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-DrVXbIB4.js → cycle-calculator-BF0ointe.js} +3 -3
- package/dist/_chunks/{cycle-calculator-DrVXbIB4.js.map → cycle-calculator-BF0ointe.js.map} +1 -1
- package/dist/_chunks/{dependent-selector-CRWgieHm.js → dependent-selector-DpzGtr_J.js} +2 -2
- package/dist/_chunks/{dependent-selector-CRWgieHm.js.map → dependent-selector-DpzGtr_J.js.map} +1 -1
- package/dist/_chunks/{document-scanner-biBS_f6c.js → document-scanner-D2qehl3-.js} +53 -53
- package/dist/_chunks/{document-scanner-biBS_f6c.js.map → document-scanner-D2qehl3-.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-D4K1BnE2.js → due-date-calculator-DU9AEWNy.js} +4 -4
- package/dist/_chunks/{due-date-calculator-D4K1BnE2.js.map → due-date-calculator-DU9AEWNy.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-CFqQc56y.js → editable-currency-cell-renderer-BVJ04DkB.js} +914 -865
- package/dist/_chunks/editable-currency-cell-renderer-BVJ04DkB.js.map +1 -0
- package/dist/_chunks/{fetal-weight-B_pBjlO7.js → fetal-weight-BVSzOhuR.js} +3 -3
- package/dist/_chunks/{fetal-weight-B_pBjlO7.js.map → fetal-weight-BVSzOhuR.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-BETQAVkA.js → gestational-age-calculator-DBlFdoiP.js} +4 -4
- package/dist/_chunks/{gestational-age-calculator-BETQAVkA.js.map → gestational-age-calculator-DBlFdoiP.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-8zXCJgAQ.js → hcg-doubling-if4Q8aSX.js} +3 -3
- package/dist/_chunks/{hcg-doubling-8zXCJgAQ.js.map → hcg-doubling-if4Q8aSX.js.map} +1 -1
- package/dist/_chunks/{type-DZ5OMRA2.js → image-C6RM5hfF.js} +4 -16
- package/dist/_chunks/image-C6RM5hfF.js.map +1 -0
- package/dist/_chunks/{insert-result-DIAG3ltJ.js → insert-result-njqBthzT.js} +68 -57
- package/dist/_chunks/insert-result-njqBthzT.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-BXfRMiRk.js → marketplace-app-shell-Bu-HD3fy.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-BXfRMiRk.js.map → marketplace-app-shell-Bu-HD3fy.js.map} +1 -1
- package/dist/_chunks/{message-card-Bgcvfj6-.js → message-card-Bx4GmLvf.js} +9 -9
- package/dist/_chunks/{message-card-Bgcvfj6-.js.map → message-card-Bx4GmLvf.js.map} +1 -1
- package/dist/_chunks/{message-tray-saAVMeHP.js → message-tray-CVyJajVJ.js} +2 -2
- package/dist/_chunks/{message-tray-saAVMeHP.js.map → message-tray-CVyJajVJ.js.map} +1 -1
- package/dist/_chunks/{operator-hero-CM8949Hd.js → operator-hero-f_KaRhw5.js} +2 -2
- package/dist/_chunks/{operator-hero-CM8949Hd.js.map → operator-hero-f_KaRhw5.js.map} +1 -1
- package/dist/_chunks/{patient-search-Bw9ONucF.js → patient-search-DR9XUYRQ.js} +2 -2
- package/dist/_chunks/{patient-search-Bw9ONucF.js.map → patient-search-DR9XUYRQ.js.map} +1 -1
- package/dist/_chunks/{patient-shell-CF_qon7C.js → patient-shell-DrV_iekt.js} +2 -2
- package/dist/_chunks/{patient-shell-CF_qon7C.js.map → patient-shell-DrV_iekt.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-Bgso0p_l.js → patient-summary-card-ByfIU8N0.js} +4 -4
- package/dist/_chunks/{patient-summary-card-Bgso0p_l.js.map → patient-summary-card-ByfIU8N0.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-DBz3hVDz.js → payment-request-card-yTjzKQCU.js} +3 -3
- package/dist/_chunks/{payment-request-card-DBz3hVDz.js.map → payment-request-card-yTjzKQCU.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-AYyHtU9K.js → periodontal-chart-card-Dh3KgvYG.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-AYyHtU9K.js.map → periodontal-chart-card-Dh3KgvYG.js.map} +1 -1
- package/dist/_chunks/{practice-results-CVAgY2RZ.js → practice-results-DND2SAt7.js} +2 -2
- package/dist/_chunks/{practice-results-CVAgY2RZ.js.map → practice-results-DND2SAt7.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-BuzLTwjy.js → pregnancy-dating-QY-sqpvj.js} +4 -4
- package/dist/_chunks/{pregnancy-dating-BuzLTwjy.js.map → pregnancy-dating-QY-sqpvj.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-aicn7qs7.js → pregnancy-weight-gain-DOJXXNYP.js} +3 -3
- package/dist/_chunks/{pregnancy-weight-gain-aicn7qs7.js.map → pregnancy-weight-gain-DOJXXNYP.js.map} +1 -1
- package/dist/_chunks/rich-text-editor-BOQr5lHx.js +1970 -0
- package/dist/_chunks/rich-text-editor-BOQr5lHx.js.map +1 -0
- package/dist/_chunks/{scroll-area-BWqCkEGz.js → scroll-area-eccd_Uf-.js} +38 -28
- package/dist/_chunks/scroll-area-eccd_Uf-.js.map +1 -0
- package/dist/_chunks/{sidebar-DPEHzxLZ.js → sidebar-CGjIk_FQ.js} +36 -22
- package/dist/_chunks/sidebar-CGjIk_FQ.js.map +1 -0
- package/dist/_chunks/{suggestion-chip-C4kxWUIs.js → suggestion-chip-Bk4PmYTg.js} +30 -30
- package/dist/_chunks/suggestion-chip-Bk4PmYTg.js.map +1 -0
- package/dist/_chunks/{tab-bar-Xetknddo.js → tab-bar-B1ovILzh.js} +2 -2
- package/dist/_chunks/{tab-bar-Xetknddo.js.map → tab-bar-B1ovILzh.js.map} +1 -1
- package/dist/_chunks/{tag-CdA0s_VV.js → tag-BQXwuJq1.js} +41 -38
- package/dist/_chunks/tag-BQXwuJq1.js.map +1 -0
- package/dist/_chunks/{transaction-chip-BZCa6XDn.js → transaction-chip-BrW8P50O.js} +19 -19
- package/dist/_chunks/transaction-chip-BrW8P50O.js.map +1 -0
- package/dist/_chunks/trash-2-rPAKaRgB.js +18 -0
- package/dist/_chunks/trash-2-rPAKaRgB.js.map +1 -0
- package/dist/_chunks/{unit-converter-CHN2cZ4b.js → unit-converter-C1V3ACM9.js} +2 -2
- package/dist/_chunks/{unit-converter-CHN2cZ4b.js.map → unit-converter-C1V3ACM9.js.map} +1 -1
- package/dist/_chunks/{workflow-map-BX3JY1Bu.js → workflow-map-JAZryZJr.js} +137 -149
- package/dist/_chunks/workflow-map-JAZryZJr.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts.map +1 -1
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +16 -0
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts.map +1 -1
- package/dist/components/data-table/cell-renderers/tooth-cell-renderer.d.ts +12 -0
- package/dist/components/data-table/cell-renderers/tooth-cell-renderer.d.ts.map +1 -0
- package/dist/components/data-table/data-table.d.ts +1 -1
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/index.d.ts.map +1 -1
- package/dist/components/data-table/index.js +13 -12
- package/dist/components/data-table/toolbar.d.ts +5 -1
- package/dist/components/data-table/toolbar.d.ts.map +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +36 -2
- package/dist/components/rich-text-editor/editor-toolbar.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +2 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/suggestion-chip/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/tag/tag.d.ts.map +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts.map +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +26 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +27 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +26 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +27 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +26 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +27 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +26 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +27 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +26 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +27 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +26 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +27 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +26 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +27 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +26 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +27 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +26 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +27 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +26 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +25 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +26 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +27 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +26 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +27 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +26 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +27 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +26 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +27 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +26 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +27 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +26 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +25 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +26 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +27 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +26 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +25 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +509 -508
- package/dist/locales/ar.json +27 -1
- package/dist/locales/de.json +27 -1
- package/dist/locales/el.json +27 -1
- package/dist/locales/en.json +27 -1
- package/dist/locales/es.json +27 -1
- package/dist/locales/fr.json +27 -1
- package/dist/locales/hi.json +27 -1
- package/dist/locales/it.json +27 -1
- package/dist/locales/ja.json +27 -1
- package/dist/locales/nl.json +27 -1
- package/dist/locales/pl.json +27 -1
- package/dist/locales/pt.json +27 -1
- package/dist/locales/ro.json +27 -1
- package/dist/locales/ru.json +27 -1
- package/dist/locales/sq.json +27 -1
- package/dist/locales/sv.json +27 -1
- package/dist/locales/tr.json +27 -1
- package/dist/locales/zh.json +27 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +6 -3
- package/package.json +1 -1
- package/dist/_chunks/ai-tools-rail-JnlTqfS4.js.map +0 -1
- package/dist/_chunks/badge-zsf5i5bH.js.map +0 -1
- package/dist/_chunks/color-picker-9tL7pz5y.js.map +0 -1
- package/dist/_chunks/editable-currency-cell-renderer-CFqQc56y.js.map +0 -1
- package/dist/_chunks/insert-result-DIAG3ltJ.js.map +0 -1
- package/dist/_chunks/rich-text-editor-u36FqSWz.js +0 -1190
- package/dist/_chunks/rich-text-editor-u36FqSWz.js.map +0 -1
- package/dist/_chunks/scroll-area-BWqCkEGz.js.map +0 -1
- package/dist/_chunks/sidebar-DPEHzxLZ.js.map +0 -1
- package/dist/_chunks/suggestion-chip-C4kxWUIs.js.map +0 -1
- package/dist/_chunks/tag-CdA0s_VV.js.map +0 -1
- package/dist/_chunks/transaction-chip-BZCa6XDn.js.map +0 -1
- package/dist/_chunks/type-DZ5OMRA2.js.map +0 -1
- package/dist/_chunks/workflow-map-BX3JY1Bu.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as l, jsxs as h, Fragment as we } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as $e, useId as Ne, useState as
|
|
3
|
-
import * as
|
|
4
|
-
import { c as
|
|
5
|
-
import { useTranslation as
|
|
2
|
+
import { forwardRef as $e, useId as Ne, useState as z, useMemo as T, useCallback as Pe, useRef as B, useEffect as Z } from "react";
|
|
3
|
+
import * as H from "@radix-ui/react-popover";
|
|
4
|
+
import { c as ae } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { useTranslation as ye } from "react-i18next";
|
|
6
6
|
import { u as Ae } from "./form-field-context-B3APVHKx.js";
|
|
7
|
-
import { S as
|
|
7
|
+
import { S as te } from "./slider-BHWzXdjt.js";
|
|
8
8
|
import { u as Me } from "./registry-nPAVE19X.js";
|
|
9
9
|
import { C as re } from "./check-DPdL_Sm7.js";
|
|
10
10
|
import { X as Se } from "./x-CCcI3eJp.js";
|
|
11
|
-
const
|
|
11
|
+
const ze = {
|
|
12
12
|
id: "color-picker",
|
|
13
13
|
capabilities: ["pick"],
|
|
14
14
|
state: {
|
|
@@ -25,8 +25,8 @@ const Te = {
|
|
|
25
25
|
argsType: "{ hex: string }",
|
|
26
26
|
descriptionKey: "ui.agent.colorPicker.actions.setValue",
|
|
27
27
|
description: "Set the picked colour from a hex string.",
|
|
28
|
-
invoke: (e,
|
|
29
|
-
e.setValue(
|
|
28
|
+
invoke: (e, a) => {
|
|
29
|
+
e.setValue(a.hex);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
},
|
|
@@ -43,67 +43,67 @@ const Te = {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
function
|
|
47
|
-
let
|
|
48
|
-
(
|
|
49
|
-
const r = parseInt(
|
|
50
|
-
return ne(r,
|
|
46
|
+
function Te(e) {
|
|
47
|
+
let a = e.startsWith("#") ? e.slice(1) : e;
|
|
48
|
+
(a.length === 3 || a.length === 4) && (a = a.split("").map((c) => c + c).join(""));
|
|
49
|
+
const r = parseInt(a.slice(0, 2), 16) / 255, t = parseInt(a.slice(2, 4), 16) / 255, n = parseInt(a.slice(4, 6), 16) / 255, i = a.length === 8 ? parseInt(a.slice(6, 8), 16) / 255 : 1;
|
|
50
|
+
return ne(r, t, n, i);
|
|
51
51
|
}
|
|
52
|
-
function ne(e,
|
|
53
|
-
const n = Math.max(e,
|
|
54
|
-
let m = 0,
|
|
52
|
+
function ne(e, a, r, t) {
|
|
53
|
+
const n = Math.max(e, a, r), i = Math.min(e, a, r), c = (n + i) / 2;
|
|
54
|
+
let m = 0, k = 0;
|
|
55
55
|
if (n !== i) {
|
|
56
|
-
const
|
|
57
|
-
|
|
56
|
+
const x = n - i;
|
|
57
|
+
k = c > 0.5 ? x / (2 - n - i) : x / (n + i), n === e ? m = ((a - r) / x + (a < r ? 6 : 0)) / 6 : n === a ? m = ((r - e) / x + 2) / 6 : m = ((e - a) / x + 4) / 6;
|
|
58
58
|
}
|
|
59
59
|
return {
|
|
60
60
|
h: Math.round(m * 360),
|
|
61
|
-
s: Math.round(
|
|
61
|
+
s: Math.round(k * 100),
|
|
62
62
|
l: Math.round(c * 100),
|
|
63
|
-
a: Math.round(
|
|
63
|
+
a: Math.round(t * 100) / 100
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
const { r:
|
|
66
|
+
function C(e) {
|
|
67
|
+
const { r: a, g: r, b: t } = K(e), n = (c) => Math.round(c * 255).toString(16).padStart(2, "0"), i = `#${n(a)}${n(r)}${n(t)}`;
|
|
68
68
|
return e.a < 1 ? `${i}${n(e.a)}` : i;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
const { r:
|
|
70
|
+
function Ee(e) {
|
|
71
|
+
const { r: a, g: r, b: t } = K(e), n = Math.round(a * 255), i = Math.round(r * 255), c = Math.round(t * 255);
|
|
72
72
|
return e.a < 1 ? `rgba(${n}, ${i}, ${c}, ${e.a})` : `rgba(${n}, ${i}, ${c}, 1)`;
|
|
73
73
|
}
|
|
74
74
|
function K(e) {
|
|
75
|
-
const
|
|
75
|
+
const a = e.h / 360, r = e.s / 100, t = e.l / 100;
|
|
76
76
|
if (r === 0)
|
|
77
|
-
return { r:
|
|
78
|
-
const n =
|
|
77
|
+
return { r: t, g: t, b: t };
|
|
78
|
+
const n = t < 0.5 ? t * (1 + r) : t + r - t * r, i = 2 * t - n;
|
|
79
79
|
return {
|
|
80
|
-
r: G(i, n,
|
|
81
|
-
g: G(i, n,
|
|
82
|
-
b: G(i, n,
|
|
80
|
+
r: G(i, n, a + 1 / 3),
|
|
81
|
+
g: G(i, n, a),
|
|
82
|
+
b: G(i, n, a - 1 / 3)
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
function G(e,
|
|
86
|
-
let
|
|
87
|
-
return
|
|
85
|
+
function G(e, a, r) {
|
|
86
|
+
let t = r;
|
|
87
|
+
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? e + (a - e) * 6 * t : t < 1 / 2 ? a : t < 2 / 3 ? e + (a - e) * (2 / 3 - t) * 6 : e;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
switch (
|
|
89
|
+
function j(e, a) {
|
|
90
|
+
switch (a) {
|
|
91
91
|
case "hex":
|
|
92
|
-
return
|
|
92
|
+
return C(e);
|
|
93
93
|
case "hsl":
|
|
94
94
|
return e.a < 1 ? `hsla(${e.h}, ${e.s}%, ${e.l}%, ${e.a})` : `hsl(${e.h}, ${e.s}%, ${e.l}%)`;
|
|
95
95
|
case "rgba":
|
|
96
|
-
return
|
|
96
|
+
return Ee(e);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
const
|
|
101
|
-
if (!
|
|
102
|
-
if (
|
|
103
|
-
const n =
|
|
104
|
-
return !/^[0-9a-fA-F]{3,8}$/.test(n) || ![3, 4, 6, 8].includes(n.length) ? null :
|
|
99
|
+
function w(e) {
|
|
100
|
+
const a = e.trim();
|
|
101
|
+
if (!a) return null;
|
|
102
|
+
if (a.startsWith("#")) {
|
|
103
|
+
const n = a.slice(1);
|
|
104
|
+
return !/^[0-9a-fA-F]{3,8}$/.test(n) || ![3, 4, 6, 8].includes(n.length) ? null : Te(a);
|
|
105
105
|
}
|
|
106
|
-
const r =
|
|
106
|
+
const r = a.match(
|
|
107
107
|
/^hsla?\(\s*([\d.]+)\s*[,/]\s*([\d.]+)%?\s*[,/]\s*([\d.]+)%?\s*(?:[,/]\s*([\d.]+))?\s*\)$/
|
|
108
108
|
);
|
|
109
109
|
if (r)
|
|
@@ -113,27 +113,27 @@ function k(e) {
|
|
|
113
113
|
l: Math.round(parseFloat(r[3])),
|
|
114
114
|
a: r[4] !== void 0 ? parseFloat(r[4]) : 1
|
|
115
115
|
};
|
|
116
|
-
const
|
|
116
|
+
const t = a.match(
|
|
117
117
|
/^rgba?\(\s*([\d.]+)\s*[,/]\s*([\d.]+)\s*[,/]\s*([\d.]+)\s*(?:[,/]\s*([\d.]+))?\s*\)$/
|
|
118
118
|
);
|
|
119
|
-
if (
|
|
120
|
-
const n = parseFloat(
|
|
119
|
+
if (t) {
|
|
120
|
+
const n = parseFloat(t[1]) / 255, i = parseFloat(t[2]) / 255, c = parseFloat(t[3]) / 255, m = t[4] !== void 0 ? parseFloat(t[4]) : 1;
|
|
121
121
|
return ne(n, i, c, m);
|
|
122
122
|
}
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
125
125
|
function ee(e) {
|
|
126
|
-
const { r:
|
|
127
|
-
return 0.2126 * n(
|
|
126
|
+
const { r: a, g: r, b: t } = K(e), n = (i) => i <= 0.03928 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
|
|
127
|
+
return 0.2126 * n(a) + 0.7152 * n(r) + 0.0722 * n(t);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
const r = ee(e),
|
|
129
|
+
function Ie(e, a) {
|
|
130
|
+
const r = ee(e), t = ee(a), n = Math.max(r, t), i = Math.min(r, t);
|
|
131
131
|
return Math.round((n + 0.05) / (i + 0.05) * 100) / 100;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function Le(e) {
|
|
134
134
|
return e >= 4.5;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function He(e) {
|
|
137
137
|
return e >= 7;
|
|
138
138
|
}
|
|
139
139
|
const Re = [
|
|
@@ -167,7 +167,7 @@ const Re = [
|
|
|
167
167
|
{ name: "Orange 900", hex: "#e65100", textColor: "#000000" },
|
|
168
168
|
{ name: "White", hex: "#ffffff", textColor: "#000000" },
|
|
169
169
|
{ name: "Yellow 500", hex: "#ffeb3b", textColor: "#000000" }
|
|
170
|
-
],
|
|
170
|
+
], as = [
|
|
171
171
|
{ name: "Blue 300", hex: "#70738c" },
|
|
172
172
|
{ name: "Blue 500", hex: "#292e53" },
|
|
173
173
|
{ name: "Blue 700", hex: "#1d213b" },
|
|
@@ -186,7 +186,7 @@ const Re = [
|
|
|
186
186
|
{ name: "Grey 300", hex: "#f9f6f3" },
|
|
187
187
|
{ name: "Grey 500", hex: "#f6f1ed" },
|
|
188
188
|
{ name: "Grey 700", hex: "#afaba8" }
|
|
189
|
-
], u = 6, Fe =
|
|
189
|
+
], u = 6, Fe = ae(
|
|
190
190
|
[
|
|
191
191
|
"ds:inline-flex ds:items-center ds:w-full",
|
|
192
192
|
"ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:bg-[var(--background)] ds:text-[var(--foreground)]",
|
|
@@ -205,10 +205,9 @@ const Re = [
|
|
|
205
205
|
},
|
|
206
206
|
defaultVariants: { size: "md" }
|
|
207
207
|
}
|
|
208
|
-
),
|
|
208
|
+
), _e = ae(
|
|
209
209
|
[
|
|
210
210
|
"ds:relative ds:rounded-[var(--radius-sm)] ds:border-2 ds:cursor-pointer",
|
|
211
|
-
"ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]",
|
|
212
211
|
"ds:transition-[transform,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
213
212
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
214
213
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
@@ -223,21 +222,35 @@ const Re = [
|
|
|
223
222
|
selected: {
|
|
224
223
|
true: "ds:border-[var(--primary)] ds:shadow-[var(--shadow-md)]",
|
|
225
224
|
false: "ds:border-transparent"
|
|
225
|
+
},
|
|
226
|
+
// Swatch footprint. md/lg honour --min-target-size (44/48px) for touch.
|
|
227
|
+
// sm is a denser 28px swatch for toolbar/inline use — comfortably above
|
|
228
|
+
// the WCAG 2.5.8 (AA) 24px minimum, with the grid gap providing spacing.
|
|
229
|
+
// sm intentionally does NOT take the accessible-theme --min-target-size
|
|
230
|
+
// bump (48px) — a dense colour grid is opt-in and the full roving-tabindex
|
|
231
|
+
// keyboard path is the mitigation for the sub-AAA pointer target.
|
|
232
|
+
size: {
|
|
233
|
+
sm: "ds:min-w-7 ds:min-h-7",
|
|
234
|
+
md: "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]",
|
|
235
|
+
lg: "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]"
|
|
226
236
|
}
|
|
227
237
|
},
|
|
228
|
-
defaultVariants: { selected: !1 }
|
|
238
|
+
defaultVariants: { selected: !1, size: "md" }
|
|
229
239
|
}
|
|
230
|
-
),
|
|
240
|
+
), Ve = [
|
|
231
241
|
"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
232
242
|
"ds:rounded-[var(--radius-md)] ds:bg-[var(--background)] ds:text-[var(--foreground)]",
|
|
233
243
|
"ds:p-[var(--spacing-md)]"
|
|
234
|
-
].join(" "),
|
|
244
|
+
].join(" "), Oe = [
|
|
235
245
|
"ds:bg-[image:repeating-conic-gradient(var(--color-grey-700)_0%_25%,transparent_0%_50%)]",
|
|
236
246
|
"ds:bg-[size:8px_8px]"
|
|
237
|
-
].join(" "),
|
|
247
|
+
].join(" "), Be = [
|
|
238
248
|
"ds:rounded-[var(--radius-md)] ds:bg-[var(--background)] ds:text-[var(--foreground)]",
|
|
239
249
|
"ds:p-[var(--spacing-sm)]"
|
|
240
250
|
].join(" "), Ge = [
|
|
251
|
+
"ds:rounded-[var(--radius-md)] ds:bg-[var(--background)] ds:text-[var(--foreground)]",
|
|
252
|
+
"ds:p-[var(--spacing-xs)]"
|
|
253
|
+
].join(" "), je = [
|
|
241
254
|
"ds:z-[var(--z-popover)] ds:rounded-[var(--radius-md)]",
|
|
242
255
|
"ds:border ds:border-[color:var(--border)] ds:bg-[var(--background)] ds:shadow-[var(--shadow-lg)]",
|
|
243
256
|
"ds:w-72",
|
|
@@ -252,70 +265,70 @@ const Re = [
|
|
|
252
265
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
253
266
|
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50",
|
|
254
267
|
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
255
|
-
].join(" "), oe = "ds:[&>span:first-child]:bg-transparent ds:[&>span:first-child>span]:bg-transparent",
|
|
256
|
-
(e,
|
|
268
|
+
].join(" "), oe = "ds:[&>span:first-child]:bg-transparent ds:[&>span:first-child>span]:bg-transparent", Ke = $e(
|
|
269
|
+
(e, a) => {
|
|
257
270
|
const {
|
|
258
271
|
value: r,
|
|
259
|
-
defaultValue:
|
|
272
|
+
defaultValue: t,
|
|
260
273
|
onChange: n,
|
|
261
274
|
format: i = "hex",
|
|
262
275
|
allowOpacity: c = !1,
|
|
263
276
|
palette: m,
|
|
264
|
-
against:
|
|
265
|
-
size:
|
|
277
|
+
against: k,
|
|
278
|
+
size: x = "md",
|
|
266
279
|
disabled: ie = !1,
|
|
267
280
|
variant: de = "inline",
|
|
268
281
|
compact: A = !0,
|
|
269
282
|
className: W
|
|
270
|
-
} = e, { t: g } =
|
|
271
|
-
const s = r ??
|
|
283
|
+
} = e, { t: g } = ye(), P = Ae(), le = Ne(), $ = P.id || le, v = P.disabled || ie, E = r !== void 0, [U, ce] = z(() => {
|
|
284
|
+
const s = r ?? t;
|
|
272
285
|
if (s) {
|
|
273
|
-
const d =
|
|
286
|
+
const d = w(s);
|
|
274
287
|
if (d) return d;
|
|
275
288
|
}
|
|
276
289
|
return { h: 0, s: 100, l: 50, a: 1 };
|
|
277
|
-
}), o =
|
|
278
|
-
if (
|
|
279
|
-
const s =
|
|
290
|
+
}), o = T(() => {
|
|
291
|
+
if (E && r) {
|
|
292
|
+
const s = w(r);
|
|
280
293
|
if (s) return s;
|
|
281
294
|
}
|
|
282
295
|
return U;
|
|
283
|
-
}, [
|
|
296
|
+
}, [E, r, U]), b = Pe(
|
|
284
297
|
(s) => {
|
|
285
298
|
const d = c ? s : { ...s, a: 1 };
|
|
286
|
-
|
|
299
|
+
E || ce(d), n == null || n(j(d, i));
|
|
287
300
|
},
|
|
288
|
-
[c, i,
|
|
289
|
-
), [X, R] =
|
|
301
|
+
[c, i, E, n]
|
|
302
|
+
), [X, R] = z(() => C(o)), [fe, I] = z(!1), N = B(void 0), F = B(o);
|
|
290
303
|
F.current = o, Z(() => {
|
|
291
|
-
R(
|
|
304
|
+
R(C(o)), I(!1), N.current !== void 0 && (clearTimeout(N.current), N.current = void 0);
|
|
292
305
|
}, [o]), Z(() => () => {
|
|
293
306
|
N.current !== void 0 && clearTimeout(N.current);
|
|
294
307
|
}, []);
|
|
295
308
|
const ue = () => {
|
|
296
|
-
const s =
|
|
297
|
-
s ? (
|
|
298
|
-
N.current = void 0,
|
|
309
|
+
const s = w(X);
|
|
310
|
+
s ? (I(!1), b(s)) : (I(!0), N.current = setTimeout(() => {
|
|
311
|
+
N.current = void 0, I(!1), R(C(F.current));
|
|
299
312
|
}, 800));
|
|
300
|
-
},
|
|
313
|
+
}, y = T(() => m ? m.map(
|
|
301
314
|
(s) => typeof s == "string" ? { name: s.toUpperCase(), hex: s } : s
|
|
302
|
-
) : Re, [m]), he =
|
|
303
|
-
() =>
|
|
304
|
-
const d =
|
|
305
|
-
return d ?
|
|
315
|
+
) : Re, [m]), he = C(o), _ = T(
|
|
316
|
+
() => y.map((s) => {
|
|
317
|
+
const d = w(s.hex);
|
|
318
|
+
return d ? C(d).toLowerCase() : null;
|
|
306
319
|
}),
|
|
307
|
-
[
|
|
320
|
+
[y]
|
|
308
321
|
).findIndex(
|
|
309
322
|
(s) => s !== null && s === he.toLowerCase()
|
|
310
|
-
), Y =
|
|
311
|
-
|
|
323
|
+
), Y = B(null), [p, q] = z(
|
|
324
|
+
_ >= 0 ? _ : 0
|
|
312
325
|
), me = (s) => {
|
|
313
326
|
var f;
|
|
314
327
|
const d = (f = Y.current) == null ? void 0 : f.querySelectorAll('[role="gridcell"]');
|
|
315
328
|
d != null && d[s] && (d[s].focus(), q(s));
|
|
316
329
|
}, ge = (s) => {
|
|
317
|
-
if (
|
|
318
|
-
const d =
|
|
330
|
+
if (v) return;
|
|
331
|
+
const d = y.length;
|
|
319
332
|
let f = p;
|
|
320
333
|
switch (s.key) {
|
|
321
334
|
case "ArrowRight":
|
|
@@ -350,32 +363,32 @@ const Re = [
|
|
|
350
363
|
case "Enter":
|
|
351
364
|
case " ": {
|
|
352
365
|
s.preventDefault();
|
|
353
|
-
const M =
|
|
354
|
-
M &&
|
|
366
|
+
const M = w(y[p].hex);
|
|
367
|
+
M && b(M);
|
|
355
368
|
return;
|
|
356
369
|
}
|
|
357
370
|
default:
|
|
358
371
|
return;
|
|
359
372
|
}
|
|
360
373
|
s.preventDefault(), me(f);
|
|
361
|
-
}, [pe, xe] =
|
|
374
|
+
}, [pe, xe] = z(!1), ve = T(
|
|
362
375
|
() => ({
|
|
363
|
-
getValue: () =>
|
|
376
|
+
getValue: () => C(F.current),
|
|
364
377
|
setValue: (s) => {
|
|
365
|
-
const d =
|
|
366
|
-
d &&
|
|
378
|
+
const d = w(s);
|
|
379
|
+
d && b(d);
|
|
367
380
|
}
|
|
368
381
|
}),
|
|
369
|
-
[
|
|
382
|
+
[b]
|
|
370
383
|
);
|
|
371
|
-
Me(
|
|
372
|
-
const
|
|
373
|
-
if (!
|
|
374
|
-
const s = k
|
|
384
|
+
Me(ze, ve, $);
|
|
385
|
+
const L = T(() => {
|
|
386
|
+
if (!k) return null;
|
|
387
|
+
const s = w(k);
|
|
375
388
|
if (!s) return null;
|
|
376
|
-
const d =
|
|
377
|
-
return { ratio: d, aa:
|
|
378
|
-
}, [
|
|
389
|
+
const d = Ie(o, s);
|
|
390
|
+
return { ratio: d, aa: Le(d), aaa: He(d) };
|
|
391
|
+
}, [k, o]), be = (
|
|
379
392
|
// eslint-disable-next-line jsx-a11y/interactive-supports-focus -- inner gridcells are individually focusable via roving tabindex
|
|
380
393
|
/* @__PURE__ */ l(
|
|
381
394
|
"div",
|
|
@@ -385,30 +398,30 @@ const Re = [
|
|
|
385
398
|
"aria-label": g("inputs.colorPicker.paletteLabel", "Colour swatches"),
|
|
386
399
|
onKeyDown: ge,
|
|
387
400
|
className: "ds:grid ds:grid-cols-6 ds:gap-[var(--spacing-xs)]",
|
|
388
|
-
children:
|
|
401
|
+
children: y.map((s, d) => {
|
|
389
402
|
const f = Math.floor(d / u) * u;
|
|
390
|
-
return d === f ? /* @__PURE__ */ l("div", { role: "row", className: "ds:contents", children:
|
|
391
|
-
const
|
|
403
|
+
return d === f ? /* @__PURE__ */ l("div", { role: "row", className: "ds:contents", children: y.slice(f, f + u).map((S, ke) => {
|
|
404
|
+
const V = f + ke, O = V === _;
|
|
392
405
|
return (
|
|
393
406
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events -- parent grid handles keyboard navigation via onKeyDown
|
|
394
407
|
/* @__PURE__ */ l(
|
|
395
408
|
"div",
|
|
396
409
|
{
|
|
397
410
|
role: "gridcell",
|
|
398
|
-
"aria-selected":
|
|
411
|
+
"aria-selected": O,
|
|
399
412
|
"aria-label": g("inputs.colorPicker.swatchLabel", {
|
|
400
413
|
name: S.name,
|
|
401
414
|
hex: S.hex
|
|
402
415
|
}),
|
|
403
|
-
tabIndex:
|
|
416
|
+
tabIndex: V === p ? 0 : -1,
|
|
404
417
|
onClick: () => {
|
|
405
|
-
if (
|
|
406
|
-
const Q =
|
|
407
|
-
Q &&
|
|
418
|
+
if (v) return;
|
|
419
|
+
const Q = w(S.hex);
|
|
420
|
+
Q && b(Q), q(V);
|
|
408
421
|
},
|
|
409
|
-
className:
|
|
422
|
+
className: _e({ selected: O, size: x }),
|
|
410
423
|
style: { "--swatch-bg": S.hex },
|
|
411
|
-
children:
|
|
424
|
+
children: O ? /* @__PURE__ */ l(
|
|
412
425
|
re,
|
|
413
426
|
{
|
|
414
427
|
"aria-hidden": "true",
|
|
@@ -439,7 +452,7 @@ const Re = [
|
|
|
439
452
|
id: `${$}-hex`,
|
|
440
453
|
type: "text",
|
|
441
454
|
value: X,
|
|
442
|
-
disabled:
|
|
455
|
+
disabled: v,
|
|
443
456
|
onChange: (s) => R(s.target.value),
|
|
444
457
|
onBlur: ue,
|
|
445
458
|
className: `${De} ${fe ? "ds:border-[var(--destructive)]" : "ds:border-[color:var(--border)]"}`
|
|
@@ -448,42 +461,42 @@ const Re = [
|
|
|
448
461
|
] }),
|
|
449
462
|
/* @__PURE__ */ h("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
450
463
|
/* @__PURE__ */ l(
|
|
451
|
-
|
|
464
|
+
D,
|
|
452
465
|
{
|
|
453
466
|
label: g("inputs.colorPicker.hue", "Hue"),
|
|
454
467
|
gradient: "linear-gradient(to right, hsl(0,100%,50%), hsl(60,100%,50%), hsl(120,100%,50%), hsl(180,100%,50%), hsl(240,100%,50%), hsl(300,100%,50%), hsl(360,100%,50%))",
|
|
455
468
|
min: 0,
|
|
456
469
|
max: 360,
|
|
457
470
|
value: o.h,
|
|
458
|
-
onChange: (s) =>
|
|
471
|
+
onChange: (s) => b({ ...o, h: s }),
|
|
459
472
|
formatValue: (s) => `H ${s}°`,
|
|
460
|
-
disabled:
|
|
473
|
+
disabled: v
|
|
461
474
|
}
|
|
462
475
|
),
|
|
463
476
|
/* @__PURE__ */ l(
|
|
464
|
-
|
|
477
|
+
D,
|
|
465
478
|
{
|
|
466
479
|
label: g("inputs.colorPicker.saturation", "Saturation"),
|
|
467
480
|
gradient: `linear-gradient(to right, hsl(${o.h},0%,${o.l}%), hsl(${o.h},100%,${o.l}%))`,
|
|
468
481
|
min: 0,
|
|
469
482
|
max: 100,
|
|
470
483
|
value: o.s,
|
|
471
|
-
onChange: (s) =>
|
|
484
|
+
onChange: (s) => b({ ...o, s }),
|
|
472
485
|
formatValue: (s) => `S ${s}%`,
|
|
473
|
-
disabled:
|
|
486
|
+
disabled: v
|
|
474
487
|
}
|
|
475
488
|
),
|
|
476
489
|
/* @__PURE__ */ l(
|
|
477
|
-
|
|
490
|
+
D,
|
|
478
491
|
{
|
|
479
492
|
label: g("inputs.colorPicker.lightness", "Lightness"),
|
|
480
493
|
gradient: `linear-gradient(to right, hsl(${o.h},${o.s}%,0%), hsl(${o.h},${o.s}%,50%), hsl(${o.h},${o.s}%,100%))`,
|
|
481
494
|
min: 0,
|
|
482
495
|
max: 100,
|
|
483
496
|
value: o.l,
|
|
484
|
-
onChange: (s) =>
|
|
497
|
+
onChange: (s) => b({ ...o, l: s }),
|
|
485
498
|
formatValue: (s) => `L ${s}%`,
|
|
486
|
-
disabled:
|
|
499
|
+
disabled: v
|
|
487
500
|
}
|
|
488
501
|
),
|
|
489
502
|
c ? /* @__PURE__ */ h("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
@@ -492,7 +505,7 @@ const Re = [
|
|
|
492
505
|
/* @__PURE__ */ l(
|
|
493
506
|
"div",
|
|
494
507
|
{
|
|
495
|
-
className: `ds:absolute ds:inset-0 ds:rounded-[var(--radius-full)] ds:pointer-events-none ${
|
|
508
|
+
className: `ds:absolute ds:inset-0 ds:rounded-[var(--radius-full)] ds:pointer-events-none ${Oe}`,
|
|
496
509
|
"aria-hidden": "true"
|
|
497
510
|
}
|
|
498
511
|
),
|
|
@@ -507,23 +520,23 @@ const Re = [
|
|
|
507
520
|
}
|
|
508
521
|
),
|
|
509
522
|
/* @__PURE__ */ l(
|
|
510
|
-
|
|
523
|
+
te,
|
|
511
524
|
{
|
|
512
525
|
min: 0,
|
|
513
526
|
max: 100,
|
|
514
527
|
step: 1,
|
|
515
528
|
value: [Math.round(o.a * 100)],
|
|
516
|
-
onValueChange: ([s]) =>
|
|
529
|
+
onValueChange: ([s]) => b({ ...o, a: s / 100 }),
|
|
517
530
|
"aria-label": g("inputs.colorPicker.opacity", "Opacity"),
|
|
518
531
|
formatValue: (s) => `${s}%`,
|
|
519
|
-
disabled:
|
|
532
|
+
disabled: v,
|
|
520
533
|
className: oe
|
|
521
534
|
}
|
|
522
535
|
)
|
|
523
536
|
] })
|
|
524
537
|
] }) : null
|
|
525
538
|
] }),
|
|
526
|
-
|
|
539
|
+
L ? /* @__PURE__ */ h(
|
|
527
540
|
"div",
|
|
528
541
|
{
|
|
529
542
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:text-[length:var(--font-size-sm)]",
|
|
@@ -531,10 +544,10 @@ const Re = [
|
|
|
531
544
|
"aria-live": "polite",
|
|
532
545
|
children: [
|
|
533
546
|
/* @__PURE__ */ l("span", { className: "ds:tabular-nums", children: g("inputs.colorPicker.contrastRatio", {
|
|
534
|
-
ratio:
|
|
547
|
+
ratio: L.ratio.toFixed(1)
|
|
535
548
|
}) }),
|
|
536
|
-
/* @__PURE__ */ l(se, { level: "AA", passes:
|
|
537
|
-
/* @__PURE__ */ l(se, { level: "AAA", passes:
|
|
549
|
+
/* @__PURE__ */ l(se, { level: "AA", passes: L.aa, t: g }),
|
|
550
|
+
/* @__PURE__ */ l(se, { level: "AAA", passes: L.aaa, t: g })
|
|
538
551
|
]
|
|
539
552
|
}
|
|
540
553
|
) : null,
|
|
@@ -543,41 +556,47 @@ const Re = [
|
|
|
543
556
|
"div",
|
|
544
557
|
{
|
|
545
558
|
className: "ds:size-8 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:bg-[var(--swatch-bg)]",
|
|
546
|
-
style: { "--swatch-bg":
|
|
559
|
+
style: { "--swatch-bg": C(o) },
|
|
547
560
|
"aria-hidden": "true"
|
|
548
561
|
}
|
|
549
562
|
),
|
|
550
|
-
/* @__PURE__ */ l("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:tabular-nums", children:
|
|
563
|
+
/* @__PURE__ */ l("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:tabular-nums", children: j(o, i) })
|
|
551
564
|
] })
|
|
552
|
-
] }), J = /* @__PURE__ */ h(
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
565
|
+
] }), J = /* @__PURE__ */ h(
|
|
566
|
+
"div",
|
|
567
|
+
{
|
|
568
|
+
className: A ? x === "sm" ? Ge : Be : Ve,
|
|
569
|
+
children: [
|
|
570
|
+
be,
|
|
571
|
+
Ce
|
|
572
|
+
]
|
|
573
|
+
}
|
|
574
|
+
);
|
|
556
575
|
return de === "inline" ? /* @__PURE__ */ l(
|
|
557
576
|
"div",
|
|
558
577
|
{
|
|
559
|
-
ref:
|
|
578
|
+
ref: a,
|
|
560
579
|
id: $,
|
|
561
580
|
className: W,
|
|
562
|
-
"aria-describedby":
|
|
563
|
-
"aria-invalid":
|
|
564
|
-
"aria-disabled":
|
|
581
|
+
"aria-describedby": P.describedBy || void 0,
|
|
582
|
+
"aria-invalid": P.invalid || void 0,
|
|
583
|
+
"aria-disabled": v || void 0,
|
|
565
584
|
"data-component": "color-picker",
|
|
566
585
|
"data-component-id": $,
|
|
567
586
|
"data-testid": "color-picker",
|
|
568
587
|
children: J
|
|
569
588
|
}
|
|
570
|
-
) : /* @__PURE__ */ h(
|
|
571
|
-
/* @__PURE__ */ l(
|
|
589
|
+
) : /* @__PURE__ */ h(H.Root, { open: pe, onOpenChange: xe, children: [
|
|
590
|
+
/* @__PURE__ */ l(H.Trigger, { asChild: !0, disabled: v, children: /* @__PURE__ */ h(
|
|
572
591
|
"button",
|
|
573
592
|
{
|
|
574
|
-
ref:
|
|
593
|
+
ref: a,
|
|
575
594
|
type: "button",
|
|
576
595
|
id: $,
|
|
577
|
-
"aria-describedby":
|
|
578
|
-
"aria-invalid":
|
|
596
|
+
"aria-describedby": P.describedBy || void 0,
|
|
597
|
+
"aria-invalid": P.invalid || void 0,
|
|
579
598
|
"aria-label": A ? g("inputs.colorPicker.triggerLabel", "Choose a colour") : void 0,
|
|
580
|
-
className: Fe({ size:
|
|
599
|
+
className: Fe({ size: x, className: W }),
|
|
581
600
|
"data-component": "color-picker",
|
|
582
601
|
"data-component-id": $,
|
|
583
602
|
"data-testid": "color-picker-trigger",
|
|
@@ -587,29 +606,29 @@ const Re = [
|
|
|
587
606
|
{
|
|
588
607
|
className: `ds:inline-block ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:shrink-0 ds:bg-[var(--swatch-bg)]${A ? "" : " ds:me-[var(--spacing-sm)]"}`,
|
|
589
608
|
"aria-hidden": "true",
|
|
590
|
-
style: { "--swatch-bg":
|
|
609
|
+
style: { "--swatch-bg": C(o) }
|
|
591
610
|
}
|
|
592
611
|
),
|
|
593
|
-
A ? null : /* @__PURE__ */ l("span", { className: "ds:text-start ds:truncate ds:tabular-nums", children:
|
|
612
|
+
A ? null : /* @__PURE__ */ l("span", { className: "ds:text-start ds:truncate ds:tabular-nums", children: j(o, i) })
|
|
594
613
|
]
|
|
595
614
|
}
|
|
596
615
|
) }),
|
|
597
|
-
/* @__PURE__ */ l(
|
|
598
|
-
|
|
616
|
+
/* @__PURE__ */ l(H.Portal, { children: /* @__PURE__ */ l(
|
|
617
|
+
H.Content,
|
|
599
618
|
{
|
|
600
619
|
sideOffset: 4,
|
|
601
620
|
align: "start",
|
|
602
|
-
className:
|
|
621
|
+
className: je,
|
|
603
622
|
children: J
|
|
604
623
|
}
|
|
605
624
|
) })
|
|
606
625
|
] });
|
|
607
626
|
}
|
|
608
627
|
);
|
|
609
|
-
|
|
628
|
+
Ke.displayName = "ColorPicker";
|
|
610
629
|
function se({
|
|
611
630
|
level: e,
|
|
612
|
-
passes:
|
|
631
|
+
passes: a,
|
|
613
632
|
t: r
|
|
614
633
|
}) {
|
|
615
634
|
return /* @__PURE__ */ h("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
@@ -621,7 +640,7 @@ function se({
|
|
|
621
640
|
children: e
|
|
622
641
|
}
|
|
623
642
|
),
|
|
624
|
-
|
|
643
|
+
a ? /* @__PURE__ */ l(
|
|
625
644
|
re,
|
|
626
645
|
{
|
|
627
646
|
"aria-hidden": "true",
|
|
@@ -634,14 +653,14 @@ function se({
|
|
|
634
653
|
className: "ds:size-4 ds:text-[var(--destructive)]"
|
|
635
654
|
}
|
|
636
655
|
),
|
|
637
|
-
/* @__PURE__ */ l("span", { className: "ds:sr-only", children:
|
|
656
|
+
/* @__PURE__ */ l("span", { className: "ds:sr-only", children: a ? r("inputs.colorPicker.contrastPass", "Pass") : r("inputs.colorPicker.contrastFail", "Fail") })
|
|
638
657
|
] });
|
|
639
658
|
}
|
|
640
|
-
function
|
|
659
|
+
function D({
|
|
641
660
|
label: e,
|
|
642
|
-
gradient:
|
|
661
|
+
gradient: a,
|
|
643
662
|
min: r,
|
|
644
|
-
max:
|
|
663
|
+
max: t,
|
|
645
664
|
value: n,
|
|
646
665
|
onChange: i,
|
|
647
666
|
formatValue: c,
|
|
@@ -654,18 +673,18 @@ function j({
|
|
|
654
673
|
"div",
|
|
655
674
|
{
|
|
656
675
|
className: "ds:absolute ds:inset-0 ds:rounded-[var(--radius-full)] ds:pointer-events-none ds:bg-[image:var(--slider-gradient)]",
|
|
657
|
-
style: { "--slider-gradient":
|
|
676
|
+
style: { "--slider-gradient": a },
|
|
658
677
|
"aria-hidden": "true"
|
|
659
678
|
}
|
|
660
679
|
),
|
|
661
680
|
/* @__PURE__ */ l(
|
|
662
|
-
|
|
681
|
+
te,
|
|
663
682
|
{
|
|
664
683
|
min: r,
|
|
665
|
-
max:
|
|
684
|
+
max: t,
|
|
666
685
|
step: 1,
|
|
667
686
|
value: [n],
|
|
668
|
-
onValueChange: ([
|
|
687
|
+
onValueChange: ([k]) => i(k),
|
|
669
688
|
"aria-label": e,
|
|
670
689
|
formatValue: c,
|
|
671
690
|
disabled: m,
|
|
@@ -677,7 +696,7 @@ function j({
|
|
|
677
696
|
}
|
|
678
697
|
export {
|
|
679
698
|
Re as A,
|
|
680
|
-
|
|
681
|
-
|
|
699
|
+
as as B,
|
|
700
|
+
Ke as C
|
|
682
701
|
};
|
|
683
|
-
//# sourceMappingURL=color-picker-
|
|
702
|
+
//# sourceMappingURL=color-picker-B7xsn6tX.js.map
|