@luzmo/analytics-components-kit 1.0.1-alpha.47 → 1.0.1-alpha.48
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/components/box-plot-options.config-SrrbDEYW.cjs +20 -0
- package/components/{box-plot-options.config-vlz5qeNq.js → box-plot-options.config-xu_i6ms7.js} +119 -44
- package/components/{bullet-chart-options.config-Bsw7N7Wl.js → bullet-chart-options.config-CDPpX1yc.js} +11 -0
- package/components/{button-base-DbkDzb71-CY6MJGqE.cjs → button-base-DbkDzb71-D0Ni0xn1.cjs} +1 -1
- package/components/{button-base-DbkDzb71-R8oqSqlY.js → button-base-DbkDzb71-Dh2Out91.js} +1 -1
- package/components/{calculate-data-item-icon-DKjZwr-x.js → calculate-data-item-icon-BiIL_s4Z.js} +1 -1
- package/components/choropleth-map-options.config-B_W9-rhe.js +381 -0
- package/components/choropleth-map-options.config-ZW8yoZH2.cjs +20 -0
- package/components/{choropleth-map-options.de-B_Agdr4T.cjs → choropleth-map-options.de-C4ko9lE4.cjs} +1 -1
- package/components/{choropleth-map-options.de-BSt-L5Vh.js → choropleth-map-options.de-CIls11eI.js} +1 -1
- package/components/{choropleth-map-options.en-Cy7WcWLG.js → choropleth-map-options.en-C7cPpmnS.js} +1 -1
- package/components/{choropleth-map-options.en-DJHAy6ek.cjs → choropleth-map-options.en-DVWBmXFe.cjs} +1 -1
- package/components/{choropleth-map-options.es-BnR-9vJv.js → choropleth-map-options.es-gQPy8Q0q.js} +1 -1
- package/components/{choropleth-map-options.es-Dr07odJo.cjs → choropleth-map-options.es-v5dYm1W3.cjs} +1 -1
- package/components/{choropleth-map-options.fr-CR5NMRR3.cjs → choropleth-map-options.fr-Bpk_J4Gw.cjs} +1 -1
- package/components/{choropleth-map-options.fr-BlwLS1Wy.js → choropleth-map-options.fr-YsTTCv_p.js} +1 -1
- package/components/{choropleth-map-options.nl-D70fr4Hl.js → choropleth-map-options.nl-CnEI0pYJ.js} +1 -1
- package/components/{choropleth-map-options.nl-BITK3ddz.cjs → choropleth-map-options.nl-CyDZDpyE.cjs} +1 -1
- package/components/{circular-gauge-options.config-Kd_WK_w-.js → circular-gauge-options.config-DAIjz4Rl.js} +59 -13
- package/components/circular-gauge-options.config-msZ4mfpN.cjs +20 -0
- package/components/{circular-gauge-options.de-BO3S8GCr.js → circular-gauge-options.de-BMzGTpZD.js} +3 -0
- package/components/{circular-gauge-options.de-BZfrQqs3.cjs → circular-gauge-options.de-CzEREduR.cjs} +1 -1
- package/components/{circular-gauge-options.en-CB-jZtE6.cjs → circular-gauge-options.en--hMYjiKb.cjs} +1 -1
- package/components/{circular-gauge-options.en-Cyhhijwg.js → circular-gauge-options.en-C6U5peDD.js} +3 -0
- package/components/{circular-gauge-options.es-DJ7ru4Wf.js → circular-gauge-options.es-Kajxp0wO.js} +5 -2
- package/components/{circular-gauge-options.es-DuQPHjcG.cjs → circular-gauge-options.es-bS5N1QyR.cjs} +1 -1
- package/components/{circular-gauge-options.fr-CFMa8H8K.cjs → circular-gauge-options.fr-VgkkhIDb.cjs} +1 -1
- package/components/{circular-gauge-options.fr-BVWliP7i.js → circular-gauge-options.fr-l5cqWrSS.js} +3 -0
- package/components/{circular-gauge-options.nl-BB_jgj5k.cjs → circular-gauge-options.nl-B-E_GXJl.cjs} +1 -1
- package/components/{circular-gauge-options.nl-DGpV7Riu.js → circular-gauge-options.nl-CAx8oTMs.js} +3 -0
- package/components/color-B6LaL8qz.cjs +20 -0
- package/components/color-DuJ4-73S.js +2867 -0
- package/components/color-palettes-BqH2Fv19.js +1852 -0
- package/components/color-palettes-DhNHcib8.cjs +20 -0
- package/components/color-range-utils-Bvo9sm5A.js +68 -0
- package/components/color-range-utils-C5yXW7ZC.cjs +20 -0
- package/components/{conditional-number-options.config-BzzAnCOB.js → conditional-number-options.config-BCEpSK9J.js} +68 -12
- package/components/conditional-number-options.config-DgzUo0xi.cjs +20 -0
- package/components/{conditional-number-options.de-BJcjBZY1.js → conditional-number-options.de-DbpKd1bd.js} +2 -2
- package/components/{conditional-number-options.de-CFnufi0r.cjs → conditional-number-options.de-R9Mtj45x.cjs} +1 -1
- package/components/{conditional-number-options.en-Wd-0YtdE.cjs → conditional-number-options.en-C-nOJ85m.cjs} +1 -1
- package/components/{conditional-number-options.en-WSrIzRGJ.js → conditional-number-options.en-DZH6utHH.js} +2 -2
- package/components/{conditional-number-options.es-BTDTe5SF.cjs → conditional-number-options.es-C41csR3J.cjs} +1 -1
- package/components/{conditional-number-options.es-BKqT0zog.js → conditional-number-options.es-_oKhivId.js} +2 -2
- package/components/{conditional-number-options.fr-D2r7Azy8.js → conditional-number-options.fr-BSSywulP.js} +2 -2
- package/components/{conditional-number-options.fr-CZ-9jzPm.cjs → conditional-number-options.fr-DgaXesnu.cjs} +1 -1
- package/components/{conditional-number-options.nl-pkRI1tLZ.js → conditional-number-options.nl-BuKNqxqm.js} +2 -2
- package/components/{conditional-number-options.nl-CfRYL6o1.cjs → conditional-number-options.nl-CJ5teRtT.cjs} +1 -1
- package/components/{date-filter-options.en-DqY3gH_W.cjs → date-filter-options.en-B7MjV7xe.cjs} +1 -1
- package/components/{date-filter-options.en-DgbZmD5M.js → date-filter-options.en-C0AmRz6f.js} +2 -1
- package/components/{date-filter-options.es-CQeWi9cD.cjs → date-filter-options.es-C__wCKac.cjs} +1 -1
- package/components/{date-filter-options.es-BI-h1lD-.js → date-filter-options.es-bN790adr.js} +4 -3
- package/components/{date-filter-options.fr-D22GM6_c.cjs → date-filter-options.fr-CFqwPRzc.cjs} +1 -1
- package/components/{date-filter-options.fr-DXLKLmhl.js → date-filter-options.fr-CNKTJNWh.js} +2 -1
- package/components/{date-filter-options.nl-CqZmwOux.cjs → date-filter-options.nl-CHOlmw93.cjs} +1 -1
- package/components/{date-filter-options.nl-DXgD8Ga_.js → date-filter-options.nl-ajUXG8Z4.js} +2 -1
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +1 -1
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +4 -4
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +6 -6
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +3 -3
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +6 -6
- package/components/display-settings-period-over-period/index.cjs +6 -6
- package/components/display-settings-period-over-period/index.js +4 -4
- package/components/draggable-data-item-level/index.cjs +1 -1
- package/components/draggable-data-item-level/index.js +3 -3
- package/components/droppable-slot/index.cjs +1 -1
- package/components/droppable-slot/index.js +2 -2
- package/components/edit-item/index.cjs +2 -2
- package/components/edit-item/index.js +57 -57
- package/components/edit-option/helpers/control-templates/color-palette-picker-template.d.ts +2 -0
- package/components/edit-option/helpers/control-templates/color-range-template.d.ts +2 -0
- package/components/edit-option/helpers/get-enum-values.d.ts +1 -0
- package/components/edit-option/index.cjs +1 -1
- package/components/edit-option/index.js +1 -1
- package/components/edit-option-action-button-group/index.cjs +1 -1
- package/components/edit-option-action-button-group/index.js +5 -5
- package/components/edit-option-base/edit-option-base.d.ts +1 -0
- package/components/{edit-option-base-CbpBi6I7.js → edit-option-base-D25zHZVl.js} +12 -9
- package/components/{edit-option-base-Db3JjWMk.cjs → edit-option-base-h5ndfVK4.cjs} +3 -3
- package/components/edit-option-color-palette-picker/edit-option-color-palette-picker.d.ts +42 -0
- package/components/edit-option-color-palette-picker/index.cjs +79 -0
- package/components/edit-option-color-palette-picker/index.d.ts +7 -0
- package/components/edit-option-color-palette-picker/index.js +405 -0
- package/components/edit-option-color-picker/edit-option-color-picker.d.ts +5 -0
- package/components/edit-option-color-picker/index.cjs +2 -424
- package/components/edit-option-color-picker/index.js +49 -5653
- package/components/edit-option-color-range/edit-option-color-range.d.ts +99 -0
- package/components/edit-option-color-range/index.cjs +85 -0
- package/components/edit-option-color-range/index.d.ts +7 -0
- package/components/edit-option-color-range/index.js +261 -0
- package/components/edit-option-multi-language-field/index.cjs +1 -1
- package/components/edit-option-multi-language-field/index.js +2 -2
- package/components/edit-option-number-field/edit-option-number-field.d.ts +2 -0
- package/components/edit-option-number-field/index.cjs +7 -3
- package/components/edit-option-number-field/index.js +28 -17
- package/components/edit-option-picker/index.cjs +1 -1
- package/components/edit-option-picker/index.js +3 -3
- package/components/edit-option-position-picker/index.cjs +1 -1
- package/components/edit-option-position-picker/index.js +2 -2
- package/components/edit-option-positions-number-field/index.cjs +1 -1
- package/components/edit-option-positions-number-field/index.js +3 -3
- package/components/edit-option-radio-button-group/index.cjs +1 -1
- package/components/edit-option-radio-button-group/index.js +3 -3
- package/components/edit-option-slider/index.cjs +1 -1
- package/components/edit-option-slider/index.js +1 -1
- package/components/edit-option-switch/index.cjs +1 -1
- package/components/edit-option-switch/index.js +1 -1
- package/components/edit-option-text-field/index.cjs +1 -1
- package/components/edit-option-text-field/index.js +2 -2
- package/components/extrapolate-color-0j_AeYkz.cjs +20 -0
- package/components/extrapolate-color-CC9CURf6.js +33 -0
- package/components/filter-data-item-picker/index.cjs +1 -1
- package/components/filter-data-item-picker/index.js +4 -4
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +1 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +1 -1
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +1 -1
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +9 -9
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +2 -2
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +2 -2
- package/components/grid/index.cjs +45 -45
- package/components/grid/index.js +2217 -5061
- package/components/heat-map-options.config-BQ-Afrbi.cjs +20 -0
- package/components/{heat-map-options.config-BAuSJV3_.js → heat-map-options.config-DQya-lag.js} +92 -13
- package/components/{heat-map-options.de-Cz5Pwwcu.cjs → heat-map-options.de-CCzVMy-R.cjs} +1 -1
- package/components/{heat-map-options.de-6onYsjdI.js → heat-map-options.de-UJbdYtlh.js} +4 -5
- package/components/{heat-map-options.en-DHX1GKcM.cjs → heat-map-options.en-Bg7i7QKn.cjs} +1 -1
- package/components/{heat-map-options.en-mwgrQFkO.js → heat-map-options.en-C0K0NGEE.js} +5 -5
- package/components/{heat-map-options.es-A-j6i3Tz.cjs → heat-map-options.es-BYyHRdIH.cjs} +1 -1
- package/components/{heat-map-options.es-Dd0KsseA.js → heat-map-options.es-DCUCh58R.js} +5 -5
- package/components/{heat-map-options.fr-C3LwETEg.cjs → heat-map-options.fr-CLB-XMRA.cjs} +1 -1
- package/components/{heat-map-options.fr-BkrrUt04.js → heat-map-options.fr-a-_Kw5S_.js} +5 -5
- package/components/{heat-map-options.nl-CXn1y4jH.cjs → heat-map-options.nl-BHrmi96k.cjs} +1 -1
- package/components/{heat-map-options.nl-DME6ILT5.js → heat-map-options.nl-BRGoOun2.js} +5 -5
- package/components/heat-table-options.config-B12JEYnp.cjs +20 -0
- package/components/{heat-table-options.config-DSu_18VG.js → heat-table-options.config-CUsDdgUr.js} +137 -21
- package/components/{heat-table-options.de-BABkUn2Y.js → heat-table-options.de-D6R0zXX0.js} +1 -1
- package/components/{heat-table-options.de-aYfCrdCP.cjs → heat-table-options.de-cnjPxQep.cjs} +1 -1
- package/components/{heat-table-options.en-CIdnDv3K.cjs → heat-table-options.en-Bjqpkm75.cjs} +1 -1
- package/components/{heat-table-options.en-BUBmMDZW.js → heat-table-options.en-Co6IDHlF.js} +1 -1
- package/components/{heat-table-options.es-Dl9D9rD_.js → heat-table-options.es-B3Kb8J1N.js} +1 -1
- package/components/{heat-table-options.es-DaK6qGQC.cjs → heat-table-options.es-IaNf_Ge4.cjs} +1 -1
- package/components/{heat-table-options.fr-BouHFs1P.cjs → heat-table-options.fr-BdZnJYlb.cjs} +1 -1
- package/components/{heat-table-options.fr-DOShw8a1.js → heat-table-options.fr-C51PmgHa.js} +1 -1
- package/components/{heat-table-options.nl-8CXDqKzS.cjs → heat-table-options.nl-DGS7vzoT.cjs} +1 -1
- package/components/{heat-table-options.nl-D6Fn7sgt.js → heat-table-options.nl-DXOd_uE6.js} +1 -1
- package/components/hexbin-map-options.config-DZERRhM8.cjs +20 -0
- package/components/{hexbin-map-options.config-DaaC88d8.js → hexbin-map-options.config-F-7uCqxb.js} +55 -20
- package/components/{hexbin-map-options.de-BuLxwJd2.js → hexbin-map-options.de-D50U2vgf.js} +1 -1
- package/components/{hexbin-map-options.de-DPYaSNHm.cjs → hexbin-map-options.de-DUp41p9I.cjs} +1 -1
- package/components/{hexbin-map-options.en-CEGMU7TX.cjs → hexbin-map-options.en-B10UanAQ.cjs} +1 -1
- package/components/{hexbin-map-options.en-CXV4sbbg.js → hexbin-map-options.en-iDuuqVpi.js} +1 -1
- package/components/{hexbin-map-options.es-urnYaXEk.cjs → hexbin-map-options.es-97IUVMSg.cjs} +1 -1
- package/components/{hexbin-map-options.es-2f7amcb6.js → hexbin-map-options.es-RRMQV0DY.js} +1 -1
- package/components/{hexbin-map-options.fr-DxRtJ3_F.cjs → hexbin-map-options.fr-Bh9Swyi3.cjs} +1 -1
- package/components/{hexbin-map-options.fr-J3g_JcSM.js → hexbin-map-options.fr-CQ7JbE9T.js} +1 -1
- package/components/{hexbin-map-options.nl-BnvrfMKQ.js → hexbin-map-options.nl-BpTRJ36m.js} +1 -1
- package/components/{hexbin-map-options.nl-GZtiTQw6.cjs → hexbin-map-options.nl-BzyMf0JQ.cjs} +1 -1
- package/components/{index-Tx5oQjbt.cjs → index--3gSNupB.cjs} +1 -1
- package/components/{index-CDpuEf8W.js → index-9LxnqLJa.js} +2 -2
- package/components/{index-MVmoiSxL.cjs → index-B7AFYrfv.cjs} +1 -1
- package/components/{index-CHFwXYcm.cjs → index-BKx2WhDB.cjs} +7 -7
- package/components/{index-cHKqEi5-.cjs → index-BSgp4MWQ.cjs} +1 -1
- package/components/{index-BHJH1eGn.js → index-BW3AUnEX.js} +1 -1
- package/components/index-BY1yDIAI.js +5672 -0
- package/components/index-Be-pSgzQ.js +174 -0
- package/components/{index-Bdy8Bz-n.js → index-BobhBKA2.js} +8 -7
- package/components/{index-CBOAQ3-E.cjs → index-Bpdwb9Js.cjs} +3 -3
- package/components/{index-BNCgbOV2.js → index-BqSQoHjg.js} +2 -2
- package/components/{index-EXO-Hsj2.cjs → index-BukPAqqU.cjs} +1 -1
- package/components/{index-Desl7GJ0.js → index-C6NpWavw.js} +3 -3
- package/components/{index-BC1LV3vH.js → index-COU9XhBt.js} +1 -1
- package/components/{index-ChDwMQlU.js → index-Cf_a7VrO.js} +12 -11
- package/components/{index-CnpJUw_z.cjs → index-CnP-Q5Bw.cjs} +1 -1
- package/components/index-DCdx3dxQ.cjs +42 -0
- package/components/index-DMhm0FM8.cjs +443 -0
- package/components/index-DRLFjkH0.cjs +249 -0
- package/components/{index-DE3d0E0P.js → index-DYmi-X87.js} +2 -2
- package/components/{index-CbuHBIDB.js → index-DeIay7ZE.js} +2 -2
- package/components/{index-Cw_HnduG.js → index-PGX2p9Ns.js} +4 -4
- package/components/{index-BqMMcuLX.cjs → index-VHrmgynd.cjs} +1 -1
- package/components/{index-CNA9joKT.cjs → index-cbfU96gS.cjs} +26 -26
- package/components/{index-DSQyBS9Z.cjs → index-fwJBhawL.cjs} +1 -1
- package/components/{index-DM0JWaVq.js → index-ydBgjAru.js} +560 -466
- package/components/index.cjs +1 -1
- package/components/index.js +62 -58
- package/components/{luzmo-icons-DnAqAQCX.js → luzmo-icons-4Tmb3sKr.js} +5 -5
- package/components/{luzmo-icons-DbwDQtuO-DSQ-uVxy.cjs → luzmo-icons-4nDFv1Lq-D6-m-VWM.cjs} +2 -2
- package/components/{luzmo-icons-DbwDQtuO-QG0fLECn.js → luzmo-icons-4nDFv1Lq-DffGNBpO.js} +7 -7
- package/components/mutation-controller-DH7YOCyj-B6sXpbgh.cjs +40 -0
- package/components/mutation-controller-DH7YOCyj-E7gpCmwh.js +71 -0
- package/components/{observe-slot-presence-CmVi0zTc-B4M1Mze7.cjs → observe-slot-presence-CmVi0zTc-NPSGFmv-.cjs} +2 -2
- package/components/{observe-slot-presence-CmVi0zTc-DCFuXW7v.js → observe-slot-presence-CmVi0zTc-hhUl4oRa.js} +5 -5
- package/components/observe-slot-text-BPfIQQtz-D4LmMIo0.cjs +66 -0
- package/components/observe-slot-text-BPfIQQtz-DLOwgi-A.js +172 -0
- package/components/route-map-options.config-CN86T7c0.js +346 -0
- package/components/route-map-options.config-D7NJePTu.cjs +20 -0
- package/components/{route-map-options.de-DrhHqbdy.js → route-map-options.de-DXYmUtv8.js} +20 -0
- package/components/{route-map-options.de-ey7CT_tQ.cjs → route-map-options.de-w5wuIvwf.cjs} +1 -1
- package/components/{route-map-options.en-DAgywIcY.js → route-map-options.en-CYMhTqyE.js} +20 -0
- package/components/{route-map-options.en-CjyQT-Ue.cjs → route-map-options.en-Co0Fbjkz.cjs} +1 -1
- package/components/{route-map-options.es-BR7NuBw0.js → route-map-options.es-BEBPlDvt.js} +20 -0
- package/components/{route-map-options.es-aEyX7m3t.cjs → route-map-options.es-Cjasm-ZQ.cjs} +1 -1
- package/components/{route-map-options.fr-42waILBL.cjs → route-map-options.fr-C1SCfKLH.cjs} +1 -1
- package/components/{route-map-options.fr-C7TkfcdY.js → route-map-options.fr-DEHQekgM.js} +20 -0
- package/components/{route-map-options.nl-X4lAer8J.cjs → route-map-options.nl-CYmB51pE.cjs} +1 -1
- package/components/{route-map-options.nl-Btd3mxx0.js → route-map-options.nl-CwUgb9Zg.js} +20 -0
- package/components/slot-contents-picker/index.cjs +1 -1
- package/components/slot-contents-picker/index.js +5 -5
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +2 -2
- package/components/slot-menu-list/index.js +1 -1
- package/components/speedometer-chart-options.config-BX9LTQBH.cjs +20 -0
- package/components/speedometer-chart-options.config-SL581yOa.js +265 -0
- package/components/spike-map-options.config-C5KewecZ.js +436 -0
- package/components/spike-map-options.config-DoBFXPmN.cjs +20 -0
- package/components/{spike-map-options.de-BxTSDs6l.js → spike-map-options.de-COZovZ7s.js} +26 -0
- package/components/spike-map-options.de-_47BiyJQ.cjs +20 -0
- package/components/spike-map-options.en-B9InMjtg.cjs +20 -0
- package/components/{spike-map-options.en-C0DCu7ul.js → spike-map-options.en-Dx9h9SIj.js} +26 -0
- package/components/{spike-map-options.es-bTfVypDV.js → spike-map-options.es-CHMMXuMS.js} +26 -0
- package/components/spike-map-options.es-e-sVsx0P.cjs +20 -0
- package/components/{spike-map-options.fr-BKzDjsKP.js → spike-map-options.fr-BcRnMqG8.js} +26 -0
- package/components/spike-map-options.fr-DPpYI3Yd.cjs +20 -0
- package/components/spike-map-options.nl-DOJHgdzZ.cjs +20 -0
- package/components/{spike-map-options.nl-BGPuQRih.js → spike-map-options.nl-DSGG2M38.js} +26 -0
- package/components/{text-field-BIADXoLC-B9oE05VF.js → text-field-ol9Ed5lQ-DbpeM4EP.js} +1 -1
- package/components/{text-field-BIADXoLC-B8w9TVmS.cjs → text-field-ol9Ed5lQ-cRqtIf_0.cjs} +1 -1
- package/custom-elements.json +369 -2
- package/index.d.ts +2 -0
- package/item-definitions/box-plot/box-plot-options.config.d.ts +51 -0
- package/item-definitions/choropleth-map/choropleth-map-options.config.d.ts +125 -0
- package/item-definitions/choropleth-map/i18n/choropleth-map-options.de.d.ts +1 -1
- package/item-definitions/choropleth-map/i18n/choropleth-map-options.en.d.ts +1 -1
- package/item-definitions/choropleth-map/i18n/choropleth-map-options.es.d.ts +1 -1
- package/item-definitions/choropleth-map/i18n/choropleth-map-options.fr.d.ts +1 -1
- package/item-definitions/choropleth-map/i18n/choropleth-map-options.nl.d.ts +1 -1
- package/item-definitions/circular-gauge/circular-gauge-options.config.d.ts +94 -0
- package/item-definitions/circular-gauge/i18n/circular-gauge-options.de.d.ts +3 -0
- package/item-definitions/circular-gauge/i18n/circular-gauge-options.en.d.ts +3 -0
- package/item-definitions/circular-gauge/i18n/circular-gauge-options.es.d.ts +3 -0
- package/item-definitions/circular-gauge/i18n/circular-gauge-options.fr.d.ts +3 -0
- package/item-definitions/circular-gauge/i18n/circular-gauge-options.nl.d.ts +3 -0
- package/item-definitions/conditional-number/conditional-number-options.config.d.ts +106 -0
- package/item-definitions/conditional-number/i18n/conditional-number-options.de.d.ts +2 -2
- package/item-definitions/conditional-number/i18n/conditional-number-options.en.d.ts +2 -2
- package/item-definitions/conditional-number/i18n/conditional-number-options.es.d.ts +2 -2
- package/item-definitions/conditional-number/i18n/conditional-number-options.fr.d.ts +2 -2
- package/item-definitions/conditional-number/i18n/conditional-number-options.nl.d.ts +2 -2
- package/item-definitions/date-filter/i18n/date-filter-options.en.d.ts +1 -0
- package/item-definitions/date-filter/i18n/date-filter-options.es.d.ts +1 -0
- package/item-definitions/date-filter/i18n/date-filter-options.fr.d.ts +1 -0
- package/item-definitions/date-filter/i18n/date-filter-options.nl.d.ts +1 -0
- package/item-definitions/heat-map/heat-map-options.config.d.ts +89 -0
- package/item-definitions/heat-map/i18n/heat-map-options.de.d.ts +4 -5
- package/item-definitions/heat-map/i18n/heat-map-options.en.d.ts +5 -5
- package/item-definitions/heat-map/i18n/heat-map-options.es.d.ts +5 -5
- package/item-definitions/heat-map/i18n/heat-map-options.fr.d.ts +5 -5
- package/item-definitions/heat-map/i18n/heat-map-options.nl.d.ts +5 -5
- package/item-definitions/heat-table/heat-table-options.config.d.ts +90 -4
- package/item-definitions/heat-table/i18n/heat-table-options.de.d.ts +1 -1
- package/item-definitions/heat-table/i18n/heat-table-options.en.d.ts +1 -1
- package/item-definitions/heat-table/i18n/heat-table-options.es.d.ts +1 -1
- package/item-definitions/heat-table/i18n/heat-table-options.fr.d.ts +1 -1
- package/item-definitions/heat-table/i18n/heat-table-options.nl.d.ts +1 -1
- package/item-definitions/hexbin-map/hexbin-map-options.config.d.ts +55 -2
- package/item-definitions/hexbin-map/i18n/hexbin-map-options.de.d.ts +1 -1
- package/item-definitions/hexbin-map/i18n/hexbin-map-options.en.d.ts +1 -1
- package/item-definitions/hexbin-map/i18n/hexbin-map-options.es.d.ts +1 -1
- package/item-definitions/hexbin-map/i18n/hexbin-map-options.fr.d.ts +1 -1
- package/item-definitions/hexbin-map/i18n/hexbin-map-options.nl.d.ts +1 -1
- package/item-definitions/route-map/i18n/route-map-options.de.d.ts +20 -0
- package/item-definitions/route-map/i18n/route-map-options.en.d.ts +20 -0
- package/item-definitions/route-map/i18n/route-map-options.es.d.ts +20 -0
- package/item-definitions/route-map/i18n/route-map-options.fr.d.ts +20 -0
- package/item-definitions/route-map/i18n/route-map-options.nl.d.ts +20 -0
- package/item-definitions/route-map/route-map-options.config.d.ts +157 -0
- package/item-definitions/shared/color-range-utils.d.ts +22 -0
- package/item-definitions/speedometer-chart/speedometer-chart-options.config.d.ts +126 -0
- package/item-definitions/spike-map/i18n/spike-map-options.de.d.ts +26 -0
- package/item-definitions/spike-map/i18n/spike-map-options.en.d.ts +26 -0
- package/item-definitions/spike-map/i18n/spike-map-options.es.d.ts +26 -0
- package/item-definitions/spike-map/i18n/spike-map-options.fr.d.ts +26 -0
- package/item-definitions/spike-map/i18n/spike-map-options.nl.d.ts +26 -0
- package/item-definitions/spike-map/spike-map-options.config.d.ts +123 -0
- package/package.json +11 -1
- package/utils/color/color-palettes.d.ts +17 -0
- package/utils/color/extrapolate-color.d.ts +1 -0
- package/components/box-plot-options.config-DJz_kt-M.cjs +0 -20
- package/components/choropleth-map-options.config-CeKXtnYB.js +0 -249
- package/components/choropleth-map-options.config-CxUOg3pw.cjs +0 -20
- package/components/circular-gauge-options.config-Cz2TGR6X.cjs +0 -20
- package/components/conditional-number-options.config-BZfgdUGh.cjs +0 -20
- package/components/heat-map-options.config-DsUXxjN0.cjs +0 -20
- package/components/heat-table-options.config-DqPL2hIY.cjs +0 -20
- package/components/hexbin-map-options.config-B_KAcDYq.cjs +0 -20
- package/components/index-BNFpjvqX.cjs +0 -195
- package/components/index-C2PPSv8E.cjs +0 -42
- package/components/index-rQxtPaJl.js +0 -174
- package/components/observe-slot-text-BPfIQQtz-DHOh38Ve.cjs +0 -86
- package/components/observe-slot-text-BPfIQQtz-v6B-1BYh.js +0 -221
- package/components/route-map-options.config-CcQXPmjN.cjs +0 -20
- package/components/route-map-options.config-u0hQqmDh.js +0 -136
- package/components/speedometer-chart-options.config-CVsSjLmh.cjs +0 -20
- package/components/speedometer-chart-options.config-Dt2feQYV.js +0 -199
- package/components/spike-map-options.config-PpPPrsR2.cjs +0 -20
- package/components/spike-map-options.config-pdbV_vwg.js +0 -218
- package/components/spike-map-options.de-BW8YhDI8.cjs +0 -20
- package/components/spike-map-options.en-fNS4A50-.cjs +0 -20
- package/components/spike-map-options.es-I-obYF7j.cjs +0 -20
- package/components/spike-map-options.fr-DWA0ZZBQ.cjs +0 -20
- package/components/spike-map-options.nl-D5Wu6E5D.cjs +0 -20
@@ -17,429 +17,7 @@
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
18
|
* SOFTWARE.
|
19
19
|
* */
|
20
|
-
"use strict";var
|
21
|
-
*
|
22
|
-
* Copyright © 2025 Luzmo
|
23
|
-
* All rights reserved.
|
24
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
25
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
26
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
27
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
28
|
-
*
|
29
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
30
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
31
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
32
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
33
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
34
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
35
|
-
* SOFTWARE.
|
36
|
-
* */const za=':host{inline-size:var(--luzmo-color-loupe-width, 48px);block-size:var(--luzmo-color-loupe-height, 64px);transform:translateY(var(--luzmo-color-loupe-animation-distance, 8px));opacity:0;transform-origin:bottom;pointer-events:none;filter:drop-shadow(var(--luzmo-color-loupe-drop-shadow-x, 0) var(--luzmo-color-loupe-drop-shadow-y, 2px) var(--luzmo-color-loupe-drop-shadow-blur, 8px) var(--luzmo-color-loupe-drop-shadow-color, rgba(0, 0, 0, .25)));transition:transform .1s ease-in-out,opacity .125s ease-in-out;position:absolute;inset-block-end:calc(var(--luzmo-color-handle-size, 16px) - var(--luzmo-color-handle-outer-border-width, 1px) + var(--luzmo-color-loupe-offset, 12px));inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2)}:host:dir(rtl),:host([dir=rtl]){inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2 - 1px)}:host([open]){opacity:1;transform:translate(0)}.luzmo-color-loupe-inner-border{fill:var(--luzmo-picked-color);stroke:var(--luzmo-color-loupe-inner-border-color, rgba(0, 0, 0, .1));stroke-width:var(--luzmo-color-loupe-inner-border-width, 1px)}.luzmo-color-loupe-outer-border{fill:none;stroke:var(--luzmo-color-loupe-outer-border-color, white);stroke-width:calc(var(--luzmo-color-loupe-outer-border-width, 2px) + 2px);transform:translate(calc((var(--luzmo-color-loupe-outer-border-width, 2px) + 2px) / 2))}.luzmo-color-loupe-checkerboard-pattern{fill:var(--luzmo-color-loupe-checkerboard-dark-color, rgb(230, 230, 230))}.luzmo-color-loupe-checkerboard-background{fill:var(--luzmo-color-loupe-checkerboard-light-color, rgb(255, 255, 255))}.luzmo-color-loupe-checkerboard-fill{fill:var(--luzmo-color-loupe-checkerboard-fill, url(#checkerboard-primary))}@media (forced-colors: active){:host{--highcontrast-colorloupe-outer-border-color: CanvasText}}svg{width:inherit;height:inherit}.loupe-clipped{clip-path:path("M23 61.575C19.0044 57.435 15.2591 53.0606 11.784 48.475C8.68949 44.4532 5.96348 40.1608 3.639 35.65C1.224 30.8 0 26.549 0 23C0.00319993 17.6937 1.84059 12.5516 5.20091 8.44488C8.56122 4.33815 13.2378 1.51928 18.4385 0.465803C23.6392 -0.587678 29.0442 0.189006 33.7378 2.66428C38.4314 5.13955 42.125 9.16122 44.193 14.048C45.3915 16.88 46.0061 19.9248 46 23C46 26.551 44.774 30.811 42.355 35.661C40.0274 40.1747 37.298 44.4698 34.2 48.494C30.7297 53.0728 26.9898 57.4409 23 61.575ZZ")}.opacity-checkerboard{position:absolute;top:2px;left:2px;block-size:100%;inline-size:100%}.opacity-checkerboard{background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2)}';var va=Object.defineProperty,pt=(r,o,e,t)=>{for(var a=void 0,l=r.length-1,s;l>=0;l--)(s=r[l])&&(a=s(o,e,a)||a);return a&&va(o,e,a),a};const gt=class extends d.It{constructor(){super(...arguments),this.open=!1,this.color="rgba(255, 0, 0, 0.5)"}render(){return d.Rt`
|
37
|
-
<div class="opacity-checkerboard loupe-clipped"></div>
|
38
|
-
<div class="luzmo-color-loupe-inner-border loupe-clipped"></div>
|
39
|
-
<div class="luzmo-color-loupe-outer-border loupe-clipped"></div>
|
40
|
-
<svg
|
41
|
-
aria-hidden="true"
|
42
|
-
class="luzmo-color-loupe is-open"
|
43
|
-
overflow="visible"
|
44
|
-
style="--luzmo-picked-color: ${this.color}; position: absolute;"
|
45
|
-
>
|
46
|
-
<defs>
|
47
|
-
<path
|
48
|
-
id="loupe-path"
|
49
|
-
d="M23 61.575C19.0044 57.435 15.2591 53.0606 11.784 48.475C8.68949 44.4532 5.96348 40.1608 3.639 35.65C1.224 30.8 0 26.549 0 23C0.00319993 17.6937 1.84059 12.5516 5.20091 8.44488C8.56122 4.33815 13.2378 1.51928 18.4385 0.465803C23.6392 -0.587678 29.0442 0.189006 33.7378 2.66428C38.4314 5.13955 42.125 9.16122 44.193 14.048C45.3915 16.88 46.0061 19.9248 46 23C46 26.551 44.774 30.811 42.355 35.661C40.0274 40.1747 37.298 44.4698 34.2 48.494C30.7297 53.0728 26.9898 57.4409 23 61.575ZZ"
|
50
|
-
transform="translate(2, 2)"
|
51
|
-
/>
|
52
|
-
<mask id="loupe-mask">
|
53
|
-
<rect x="0" y="0" height="100" width="100" fill="white" />
|
54
|
-
<use xlink:href="#path" fill="black" />
|
55
|
-
</mask>
|
56
|
-
</defs>
|
57
|
-
|
58
|
-
<g class="luzmo-color-loupe-loupe">
|
59
|
-
<g>
|
60
|
-
<use
|
61
|
-
xlink:href="#loupe-path"
|
62
|
-
mask="url(#loupe-mask)"
|
63
|
-
transform="translate(2, 2)"
|
64
|
-
class="luzmo-color-loupe-inner-border"
|
65
|
-
/>
|
66
|
-
<use
|
67
|
-
xlink:href="#loupe-path"
|
68
|
-
mask="url(#loupe-mask)"
|
69
|
-
class="luzmo-color-loupe-outer-border"
|
70
|
-
/>
|
71
|
-
</g>
|
72
|
-
</g>
|
73
|
-
</svg>
|
74
|
-
`}};gt.styles=d.at(za);let ft=gt;pt([d.zt({type:Boolean,reflect:!0})],ft.prototype,"open");pt([d.zt({type:String})],ft.prototype,"color");/*! * Lucero - The design system for Luzmo.
|
75
|
-
*
|
76
|
-
* Copyright © 2025 Luzmo
|
77
|
-
* All rights reserved.
|
78
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
79
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
80
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
81
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
82
|
-
*
|
83
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
84
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
85
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
86
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
87
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
88
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
89
|
-
* SOFTWARE.
|
90
|
-
* */const wa=()=>{if(typeof document<"u"&&!document.querySelector("style[data-luzmo-vars]")){const r=document.createElement("style");r.setAttribute("data-luzmo-vars",""),r.textContent='html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}',document.head.appendChild(r)}};wa();const ya=':host{touch-action:none;transition:inline-size var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),block-size var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),border-width var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),margin-inline var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),margin-block var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out)}:host{background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2);background-position:50%}:host(:focus){outline:none}:host{z-index:1;box-sizing:border-box;inline-size:var(--luzmo-color-handle-size, 16px);block-size:var(--luzmo-color-handle-size, 16px);margin-inline:calc(var(--luzmo-color-handle-size, 16px) / 2 * -1);margin-block:calc(var(--luzmo-color-handle-size, 16px) / 2 * -1);border-width:var(--luzmo-color-handle-border-width, 2px);border-color:var(--luzmo-color-handle-border-color, rgb(255, 255, 255));box-shadow:0 0 0 var(--luzmo-color-handle-outer-border-width, 1px) var(--luzmo-color-handle-outer-border-color, rgba(0, 0, 0, .42));transition:all var(--luzmo-color-handle-animation-duration, 0) var(--luzmo-color-handle-animation-easing, ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--luzmo-color-handle-hitarea-size, 24px) / 2);inset-block:calc(50% - var(--luzmo-color-handle-hitarea-size, 24px) / 2);inline-size:var(--luzmo-color-handle-hitarea-size, 24px);block-size:var(--luzmo-color-handle-hitarea-size, 24px);border-radius:var(--luzmo-color-handle-hitarea-border-radius, 100%)}:host([focused]),:host(:focus-visible){inline-size:var(--luzmo-color-handle-focused-size, 32px);block-size:var(--luzmo-color-handle-focused-size, 32px);margin-inline:calc(var(--luzmo-color-handle-size, 16px) * -1);margin-block:calc(var(--luzmo-color-handle-size, 16px) * -1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-color-handle-border-color-disabled, var(--luzmo-color-handle-border-color-disabled, var(--luzmo-font-color-disabled)));background:var(--highcontrast-color-handle-fill-color-disabled, var(--luzmo-color-handle-fill-color-disabled, var(--luzmo-font-color-disabled)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{inline-size:100%;block-size:100%;box-shadow:inset 0 0 0 var(--luzmo-color-handle-inner-border-width, var(--luzmo-border-width)) var(--luzmo-color-handle-inner-border-color, rgba(0, 0, 0, .42));background-color:var(--luzmo-picked-color);border-radius:100%}@media (forced-colors: active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-color-handle-border-color-disabled: GrayText;--highcontrast-color-handle-fill-color-disabled: Canvas}}';var xa=Object.defineProperty,ue=(r,o,e,t)=>{for(var a=void 0,l=r.length-1,s;l>=0;l--)(s=r[l])&&(a=s(o,e,a)||a);return a&&xa(o,e,a),a};const bt=class extends d.It{constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.open=!1,this.color="rgba(255, 0, 0, 0.5)"}handlePointerdown(o){o.pointerType==="touch"&&(this.open=!0),this.setPointerCapture(o.pointerId)}handlePointerup(o){this.open=!1,this.releasePointerCapture(o.pointerId)}render(){return d.Rt`
|
91
|
-
<div class="inner" style="background-color: ${this.color}"></div>
|
92
|
-
<luzmo-color-loupe
|
93
|
-
color=${this.color}
|
94
|
-
?open=${this.open&&!this.disabled}
|
95
|
-
></luzmo-color-loupe>
|
96
|
-
`}firstUpdated(o){super.firstUpdated(o),this.addEventListener("pointerdown",this.handlePointerdown),this.addEventListener("pointerup",this.handlePointerup),this.addEventListener("pointercancel",this.handlePointerup)}};bt.styles=d.at(ya);let Po=bt;ue([d.zt({type:Boolean,reflect:!0})],Po.prototype,"disabled");ue([d.zt({type:Boolean,reflect:!0})],Po.prototype,"focused");ue([d.zt({type:Boolean,reflect:!0})],Po.prototype,"open");ue([d.zt({type:String})],Po.prototype,"color");customElements.get("luzmo-color-handle")||customElements.define("luzmo-color-handle",Po);const Ca=Object.freeze(Object.defineProperty({__proto__:null,LuzmoColorHandle:Po},Symbol.toStringTag,{value:"Module"}));/*! * Lucero - The design system for Luzmo.
|
97
|
-
*
|
98
|
-
* Copyright © 2025 Luzmo
|
99
|
-
* All rights reserved.
|
100
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
101
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
102
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
103
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
104
|
-
*
|
105
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
106
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
107
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
108
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
109
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
110
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
111
|
-
* SOFTWARE.
|
112
|
-
* */var ka=Object.defineProperty,Ma=(r,o,e)=>o in r?ka(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e,tr=(r,o,e)=>Ma(r,typeof o!="symbol"?o+"":o,e);function $(r,o){let e=r.length;Array.isArray(r[0])||(r=[r]),Array.isArray(o[0])||(o=o.map(s=>[s]));let t=o[0].length,a=o[0].map((s,n)=>o.map(i=>i[n])),l=r.map(s=>a.map(n=>{let i=0;if(!Array.isArray(s)){for(let c of n)i+=s*c;return i}for(let c=0;c<s.length;c++)i+=s[c]*(n[c]||0);return i}));return e===1&&(l=l[0]),t===1?l.map(s=>s[0]):l}function jo(r){return mo(r)==="string"}function mo(r){return(Object.prototype.toString.call(r).match(/^\[object\s+(.*?)\]$/)[1]||"").toLowerCase()}function se(r,{precision:o,unit:e}){return po(r)?"none":zt(r,o)+(e??"")}function po(r){return Number.isNaN(r)||r instanceof Number&&(r==null?void 0:r.none)}function R(r){return po(r)?0:r}function zt(r,o){if(r===0)return 0;let e=~~r,t=0;e&&o&&(t=~~Math.log10(Math.abs(e))+1);const a=10**(o-t);return Math.floor(r*a+.5)/a}const $a={deg:1,grad:.9,rad:180/Math.PI,turn:360};function vt(r){if(!r)return;r=r.trim();const o=/^([a-z]+)\((.+?)\)$/i,e=/^-?[\d.]+$/,t=/%|deg|g?rad|turn$/,a=/\/?\s*(none|[-\w.]+(?:%|deg|g?rad|turn)?)/g;let l=r.match(o);if(l){let s=[];return l[2].replace(a,(n,i)=>{let c=i.match(t),u=i;if(c){let h=c[0],m=u.slice(0,-h.length);h==="%"?(u=new Number(m/100),u.type="<percentage>"):(u=new Number(m*$a[h]),u.type="<angle>",u.unit=h)}else e.test(u)?(u=new Number(u),u.type="<number>"):u==="none"&&(u=new Number(NaN),u.none=!0);n.startsWith("/")&&(u=u instanceof Number?u:new Number(u),u.alpha=!0),typeof u=="object"&&u instanceof Number&&(u.raw=i),s.push(u)}),{name:l[1].toLowerCase(),rawName:l[1],rawArgs:l[2],args:s}}}function wt(r){return r[r.length-1]}function Lo(r,o,e){return isNaN(r)?o:isNaN(o)?r:r+(o-r)*e}function yt(r,o,e){return(e-r)/(o-r)}function De(r,o,e){return Lo(o[0],o[1],yt(r[0],r[1],e))}function xt(r){return r.map(o=>o.split("|").map(e=>{e=e.trim();let t=e.match(/^(<[a-z]+>)\[(-?[.\d]+),\s*(-?[.\d]+)\]?$/);if(t){let a=new String(t[1]);return a.range=[+t[2],+t[3]],a}return e}))}function Ct(r,o,e){return Math.max(Math.min(e,o),r)}function he(r,o){return Math.sign(r)===Math.sign(o)?r:-r}function to(r,o){return he(Math.abs(r)**o,r)}function Te(r,o){return o===0?0:r/o}function kt(r,o,e=0,t=r.length){for(;e<t;){const a=e+t>>1;r[a]<o?e=a+1:t=a}return e}var Sa=Object.freeze({__proto__:null,bisectLeft:kt,clamp:Ct,copySign:he,interpolate:Lo,interpolateInv:yt,isNone:po,isString:jo,last:wt,mapRange:De,multiplyMatrices:$,parseCoordGrammar:xt,parseFunction:vt,serializeNumber:se,skipNone:R,spow:to,toPrecision:zt,type:mo,zdiv:Te});class _a{add(o,e,t){if(typeof arguments[0]!="string"){for(var o in arguments[0])this.add(o,arguments[0][o],arguments[1]);return}(Array.isArray(o)?o:[o]).forEach(function(a){this[a]=this[a]||[],e&&this[a][t?"unshift":"push"](e)},this)}run(o,e){this[o]=this[o]||[],this[o].forEach(function(t){t.call(e&&e.context?e.context:e,e)})}}const go=new _a;var ar,lr,sr,G={gamut_mapping:"css",precision:5,deltaE:"76",verbose:((sr=(lr=(ar=globalThis==null?void 0:globalThis.process)==null?void 0:ar.env)==null?void 0:lr.NODE_ENV)==null?void 0:sr.toLowerCase())!=="test",warn:function(r){var o,e;this.verbose&&((e=(o=globalThis==null?void 0:globalThis.console)==null?void 0:o.warn)==null||e.call(o,r))}};const D={D50:[.3457/.3585,1,(1-.3457-.3585)/.3585],D65:[.3127/.329,1,(1-.3127-.329)/.329]};function _e(r){return Array.isArray(r)?r:D[r]}function ne(r,o,e,t={}){if(r=_e(r),o=_e(o),!r||!o)throw new TypeError(`Missing white point to convert ${r?"":"from"}${!r&&!o?"/":""}${o?"":"to"}`);if(r===o)return e;let a={W1:r,W2:o,XYZ:e,options:t};if(go.run("chromatic-adaptation-start",a),a.M||(a.W1===D.D65&&a.W2===D.D50?a.M=[[1.0479297925449969,.022946870601609652,-.05019226628920524],[.02962780877005599,.9904344267538799,-.017073799063418826],[-.009243040646204504,.015055191490298152,.7518742814281371]]:a.W1===D.D50&&a.W2===D.D65&&(a.M=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]])),go.run("chromatic-adaptation-end",a),a.M)return $(a.M,a.XYZ);throw new TypeError("Only Bradford CAT with white points D50 and D65 supported for now.")}const Ea=new Set(["<number>","<percentage>","<angle>"]);function nr(r,o,e,t){return Object.entries(r.coords).map(([a,l],s)=>{let n=o.coordGrammar[s],i=t[s],c=i==null?void 0:i.type,u;if(i.none?u=n.find(f=>Ea.has(f)):u=n.find(f=>f==c),!u){let f=l.name||a;throw new TypeError(`${c??i.raw} not allowed for ${f} in ${e}()`)}let h=u.range;c==="<percentage>"&&(h||(h=[0,1]));let m=l.range||l.refRange;return h&&m&&(t[s]=De(h,m,t[s])),u})}function Mt(r,{meta:o}={}){var e,t,a,l;let s={str:(e=String(r))==null?void 0:e.trim()};if(go.run("parse-start",s),s.color)return s.color;if(s.parsed=vt(s.str),s.parsed){let n=s.parsed.name;if(n==="color"){let i=s.parsed.args.shift(),c=i.startsWith("--")?i.substring(2):`--${i}`,u=[i,c],h=s.parsed.rawArgs.indexOf("/")>0?s.parsed.args.pop():1;for(let b of g.all){let p=b.getFormat("color");if(p&&(u.includes(p.id)||(t=p.ids)!=null&&t.filter(z=>u.includes(z)).length)){const z=Object.keys(b.coords).map((y,C)=>s.parsed.args[C]||0);let w;return p.coordGrammar&&(w=nr(b,p,"color",z)),o&&Object.assign(o,{formatId:"color",types:w}),p.id.startsWith("--")&&!i.startsWith("--")&&G.warn(`${b.name} is a non-standard space and not currently supported in the CSS spec. Use prefixed color(${p.id}) instead of color(${i}).`),i.startsWith("--")&&!p.id.startsWith("--")&&G.warn(`${b.name} is a standard space and supported in the CSS spec. Use color(${p.id}) instead of prefixed color(${i}).`),{spaceId:b.id,coords:z,alpha:h}}}let m="",f=i in g.registry?i:c;if(f in g.registry){let b=(l=(a=g.registry[f].formats)==null?void 0:a.color)==null?void 0:l.id;b&&(m=`Did you mean color(${b})?`)}throw new TypeError(`Cannot parse color(${i}). `+(m||"Missing a plugin?"))}else for(let i of g.all){let c=i.getFormat(n);if(c&&c.type==="function"){let u=1;(c.lastAlpha||wt(s.parsed.args).alpha)&&(u=s.parsed.args.pop());let h=s.parsed.args,m;return c.coordGrammar&&(m=nr(i,c,n,h)),o&&Object.assign(o,{formatId:c.name,types:m}),{spaceId:i.id,coords:h,alpha:u}}}}else for(let n of g.all)for(let i in n.formats){let c=n.formats[i];if(c.type!=="custom"||c.test&&!c.test(s.str))continue;let u=c.parse(s.str);if(u)return u.alpha??(u.alpha=1),o&&(o.formatId=i),u}throw new TypeError(`Could not parse ${r} as a color. Missing a plugin?`)}function v(r){if(Array.isArray(r))return r.map(v);if(!r)throw new TypeError("Empty color reference");jo(r)&&(r=Mt(r));let o=r.space||r.spaceId;return o instanceof g||(r.space=g.get(o)),r.alpha===void 0&&(r.alpha=1),r}const Aa=75e-6,Ee=class oo{constructor(o){var e;this.id=o.id,this.name=o.name,this.base=o.base?oo.get(o.base):null,this.aliases=o.aliases,this.base&&(this.fromBase=o.fromBase,this.toBase=o.toBase);let t=o.coords??this.base.coords;for(let l in t)"name"in t[l]||(t[l].name=l);this.coords=t;let a=o.white??this.base.white??"D65";this.white=_e(a),this.formats=o.formats??{};for(let l in this.formats){let s=this.formats[l];s.type||(s.type="function"),s.name||(s.name=l)}(e=this.formats.color)!=null&&e.id||(this.formats.color={...this.formats.color??{},id:o.cssId||this.id}),o.gamutSpace?this.gamutSpace=o.gamutSpace==="self"?this:oo.get(o.gamutSpace):this.isPolar?this.gamutSpace=this.base:this.gamutSpace=this,this.gamutSpace.isUnbounded&&(this.inGamut=(l,s)=>!0),this.referred=o.referred,Object.defineProperty(this,"path",{value:Ra(this).reverse(),writable:!1,enumerable:!0,configurable:!0}),go.run("colorspace-init-end",this)}inGamut(o,{epsilon:e=Aa}={}){if(!this.equals(this.gamutSpace))return o=this.to(this.gamutSpace,o),this.gamutSpace.inGamut(o,{epsilon:e});let t=Object.values(this.coords);return o.every((a,l)=>{let s=t[l];if(s.type!=="angle"&&s.range){if(Number.isNaN(a))return!0;let[n,i]=s.range;return(n===void 0||a>=n-e)&&(i===void 0||a<=i+e)}return!0})}get isUnbounded(){return Object.values(this.coords).every(o=>!("range"in o))}get cssId(){var o,e;return((e=(o=this.formats)==null?void 0:o.color)==null?void 0:e.id)||this.id}get isPolar(){for(let o in this.coords)if(this.coords[o].type==="angle")return!0;return!1}getFormat(o){if(typeof o=="object")return o=ir(o,this),o;let e;return o==="default"?e=Object.values(this.formats)[0]:e=this.formats[o],e?(e=ir(e,this),e):null}equals(o){return o?this===o||this.id===o||this.id===o.id:!1}to(o,e){if(arguments.length===1){const n=v(o);[o,e]=[n.space,n.coords]}if(o=oo.get(o),this.equals(o))return e;e=e.map(n=>Number.isNaN(n)?0:n);let t=this.path,a=o.path,l,s;for(let n=0;n<t.length&&t[n].equals(a[n]);n++)l=t[n],s=n;if(!l)throw new Error(`Cannot convert between color spaces ${this} and ${o}: no connection space was found`);for(let n=t.length-1;n>s;n--)e=t[n].toBase(e);for(let n=s+1;n<a.length;n++)e=a[n].fromBase(e);return e}from(o,e){if(arguments.length===1){const t=v(o);[o,e]=[t.space,t.coords]}return o=oo.get(o),o.to(this,e)}toString(){return`${this.name} (${this.id})`}getMinCoords(){let o=[];for(let e in this.coords){let t=this.coords[e],a=t.range||t.refRange;o.push((a==null?void 0:a.min)??0)}return o}static get all(){return[...new Set(Object.values(oo.registry))]}static register(o,e){if(arguments.length===1&&(e=arguments[0],o=e.id),e=this.get(e),this.registry[o]&&this.registry[o]!==e)throw new Error(`Duplicate color space registration: '${o}'`);if(this.registry[o]=e,arguments.length===1&&e.aliases)for(let t of e.aliases)this.register(t,e);return e}static get(o,...e){if(!o||o instanceof oo)return o;if(mo(o)==="string"){let t=oo.registry[o.toLowerCase()];if(!t)throw new TypeError(`No color space found with id = "${o}"`);return t}if(e.length)return oo.get(...e);throw new TypeError(`${o} is not a valid color space`)}static resolveCoord(o,e){var t;let a=mo(o),l,s;if(a==="string"?o.includes(".")?[l,s]=o.split("."):[l,s]=[,o]:Array.isArray(o)?[l,s]=o:(l=o.space,s=o.coordId),l=oo.get(l),l||(l=e),!l)throw new TypeError(`Cannot resolve coordinate reference ${o}: No color space specified and relative references are not allowed here`);if(a=mo(s),a==="number"||a==="string"&&s>=0){let c=Object.entries(l.coords)[s];if(c)return{space:l,id:c[0],index:s,...c[1]}}l=oo.get(l);let n=s.toLowerCase(),i=0;for(let c in l.coords){let u=l.coords[c];if(c.toLowerCase()===n||((t=u.name)==null?void 0:t.toLowerCase())===n)return{space:l,id:c,index:i,...u};i++}throw new TypeError(`No "${s}" coordinate found in ${l.name}. Its coordinates are: ${Object.keys(l.coords).join(", ")}`)}};tr(Ee,"registry",{}),tr(Ee,"DEFAULT_FORMAT",{type:"functions",name:"color"});let g=Ee;function Ra(r){let o=[r];for(let e=r;e=e.base;)o.push(e);return o}function ir(r,{coords:o}={}){if(r.coords&&!r.coordGrammar){r.type||(r.type="function"),r.name||(r.name="color"),r.coordGrammar=xt(r.coords);let e=Object.entries(o).map(([t,a],l)=>{let s=r.coordGrammar[l][0],n=a.range||a.refRange,i=s.range,c="";return s=="<percentage>"?(i=[0,100],c="%"):s=="<angle>"&&(c="deg"),{fromRange:n,toRange:i,suffix:c}});r.serializeCoords=(t,a)=>t.map((l,s)=>{let{fromRange:n,toRange:i,suffix:c}=e[s];return n&&i&&(l=De(n,i,l)),l=se(l,{precision:a,unit:c}),l})}return r}var N=new g({id:"xyz-d65",name:"XYZ D65",coords:{x:{name:"X"},y:{name:"Y"},z:{name:"Z"}},white:"D65",formats:{color:{ids:["xyz-d65","xyz"]}},aliases:["xyz"]});let j=class extends g{constructor(o){o.coords||(o.coords={r:{range:[0,1],name:"Red"},g:{range:[0,1],name:"Green"},b:{range:[0,1],name:"Blue"}}),o.base||(o.base=N),o.toXYZ_M&&o.fromXYZ_M&&(o.toBase??(o.toBase=e=>{let t=$(o.toXYZ_M,e);return this.white!==this.base.white&&(t=ne(this.white,this.base.white,t)),t}),o.fromBase??(o.fromBase=e=>(e=ne(this.base.white,this.white,e),$(o.fromXYZ_M,e)))),o.referred??(o.referred="display"),super(o)}};function qo(r,o){return r=v(r),!o||r.space.equals(o)?r.coords.slice():(o=g.get(o),o.from(r))}function X(r,o){r=v(r);let{space:e,index:t}=g.resolveCoord(o,r.space);return qo(r,e)[t]}function je(r,o,e){return r=v(r),o=g.get(o),r.coords=o.to(r.space,e),r}je.returns="color";function no(r,o,e){if(r=v(r),arguments.length===2&&mo(arguments[1])==="object"){let t=arguments[1];for(let a in t)no(r,a,t[a])}else{typeof e=="function"&&(e=e(X(r,o)));let{space:t,index:a}=g.resolveCoord(o,r.space),l=qo(r,t);l[a]=e,je(r,t,l)}return r}no.returns="color";var qe=new g({id:"xyz-d50",name:"XYZ D50",white:"D50",base:N,fromBase:r=>ne(N.white,"D50",r),toBase:r=>ne("D50",N.white,r)});const Pa=216/24389,cr=24/116,Xo=24389/27;let fe=D.D50;var Y=new g({id:"lab",name:"Lab",coords:{l:{refRange:[0,100],name:"Lightness"},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:fe,base:qe,fromBase(r){let o=r.map((e,t)=>e/fe[t]).map(e=>e>Pa?Math.cbrt(e):(Xo*e+16)/116);return[116*o[1]-16,500*(o[0]-o[1]),200*(o[1]-o[2])]},toBase(r){let o=[];return o[1]=(r[0]+16)/116,o[0]=r[1]/500+o[1],o[2]=o[1]-r[2]/200,[o[0]>cr?Math.pow(o[0],3):(116*o[0]-16)/Xo,r[0]>8?Math.pow((r[0]+16)/116,3):r[0]/Xo,o[2]>cr?Math.pow(o[2],3):(116*o[2]-16)/Xo].map((e,t)=>e*fe[t])},formats:{lab:{coords:["<number> | <percentage>","<number> | <percentage>[-1,1]","<number> | <percentage>[-1,1]"]}}});function ao(r){return(r%360+360)%360}function Ba(r,o){if(r==="raw")return o;let[e,t]=o.map(ao),a=t-e;return r==="increasing"?a<0&&(t+=360):r==="decreasing"?a>0&&(e+=360):r==="longer"?-180<a&&a<180&&(a>0?e+=360:t+=360):r==="shorter"&&(a>180?e+=360:a<-180&&(t+=360)),[e,t]}var Do=new g({id:"lch",name:"LCH",coords:{l:{refRange:[0,100],name:"Lightness"},c:{refRange:[0,150],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:Y,fromBase(r){let[o,e,t]=r,a;const l=.02;return Math.abs(e)<l&&Math.abs(t)<l?a=NaN:a=Math.atan2(t,e)*180/Math.PI,[o,Math.sqrt(e**2+t**2),ao(a)]},toBase(r){let[o,e,t]=r;return e<0&&(e=0),isNaN(t)&&(t=0),[o,e*Math.cos(t*Math.PI/180),e*Math.sin(t*Math.PI/180)]},formats:{lch:{coords:["<number> | <percentage>","<number> | <percentage>","<number> | <angle>"]}}});const ur=25**7,ie=Math.PI,hr=180/ie,Co=ie/180;function dr(r){const o=r*r;return o*o*o*r}function $t(r,o,{kL:e=1,kC:t=1,kH:a=1}={}){[r,o]=v([r,o]);let[l,s,n]=Y.from(r),i=Do.from(Y,[l,s,n])[1],[c,u,h]=Y.from(o),m=Do.from(Y,[c,u,h])[1];i<0&&(i=0),m<0&&(m=0);let f=(i+m)/2,b=dr(f),p=.5*(1-Math.sqrt(b/(b+ur))),z=(1+p)*s,w=(1+p)*u,y=Math.sqrt(z**2+n**2),C=Math.sqrt(w**2+h**2),x=z===0&&n===0?0:Math.atan2(n,z),k=w===0&&h===0?0:Math.atan2(h,w);x<0&&(x+=2*ie),k<0&&(k+=2*ie),x*=hr,k*=hr;let S=c-l,F=C-y,E=k-x,Bo=x+k,Ge=Math.abs(E),Ho;y*C===0?Ho=0:Ge<=180?Ho=E:E>180?Ho=E-360:E<-180?Ho=E+360:G.warn("the unthinkable has happened");let Ze=2*Math.sqrt(C*y)*Math.sin(Ho*Co/2),sa=(l+c)/2,ge=(y+C)/2,Ke=dr(ge),so;y*C===0?so=Bo:Ge<=180?so=Bo/2:Bo<360?so=(Bo+360)/2:so=(Bo-360)/2;let Ve=(sa-50)**2,na=1+.015*Ve/Math.sqrt(20+Ve),Je=1+.045*ge,No=1;No-=.17*Math.cos((so-30)*Co),No+=.24*Math.cos(2*so*Co),No+=.32*Math.cos((3*so+6)*Co),No-=.2*Math.cos((4*so-63)*Co);let Qe=1+.015*ge*No,ia=30*Math.exp(-1*((so-275)/25)**2),ca=2*Math.sqrt(Ke/(Ke+ur)),ua=-1*Math.sin(2*ia*Co)*ca,Uo=(S/(e*na))**2;return Uo+=(F/(t*Je))**2,Uo+=(Ze/(a*Qe))**2,Uo+=ua*(F/(t*Je))*(Ze/(a*Qe)),Math.sqrt(Uo)}const Ha=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],Na=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],Ia=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],Oa=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]];var _o=new g({id:"oklab",name:"Oklab",coords:{l:{refRange:[0,1],name:"Lightness"},a:{refRange:[-.4,.4]},b:{refRange:[-.4,.4]}},white:"D65",base:N,fromBase(r){let o=$(Ha,r).map(e=>Math.cbrt(e));return $(Ia,o)},toBase(r){let o=$(Oa,r).map(e=>e**3);return $(Na,o)},formats:{oklab:{coords:["<percentage> | <number>","<number> | <percentage>[-1,1]","<number> | <percentage>[-1,1]"]}}});function Ae(r,o){[r,o]=v([r,o]);let[e,t,a]=_o.from(r),[l,s,n]=_o.from(o),i=e-l,c=t-s,u=a-n;return Math.sqrt(i**2+c**2+u**2)}const Fa=75e-6;function yo(r,o,{epsilon:e=Fa}={}){r=v(r),o||(o=r.space),o=g.get(o);let t=r.coords;return o!==r.space&&(t=o.from(r)),o.inGamut(t,{epsilon:e})}function Eo(r){return{space:r.space,coords:r.coords.slice(),alpha:r.alpha}}function St(r,o,e="lab"){e=g.get(e);let t=e.from(r),a=e.from(o);return Math.sqrt(t.reduce((l,s,n)=>{let i=a[n];return isNaN(s)||isNaN(i)?l:l+(i-s)**2},0))}function La(r,o){return St(r,o,"lab")}const Da=Math.PI,mr=Da/180;function Ta(r,o,{l:e=2,c:t=1}={}){[r,o]=v([r,o]);let[a,l,s]=Y.from(r),[,n,i]=Do.from(Y,[a,l,s]),[c,u,h]=Y.from(o),m=Do.from(Y,[c,u,h])[1];n<0&&(n=0),m<0&&(m=0);let f=a-c,b=n-m,p=l-u,z=s-h,w=p**2+z**2-b**2,y=.511;a>=16&&(y=.040975*a/(1+.01765*a));let C=.0638*n/(1+.0131*n)+.638,x;Number.isNaN(i)&&(i=0),i>=164&&i<=345?x=.56+Math.abs(.2*Math.cos((i+168)*mr)):x=.36+Math.abs(.4*Math.cos((i+35)*mr));let k=Math.pow(n,4),S=Math.sqrt(k/(k+1900)),F=C*(S*x+1-S),E=(f/(e*y))**2;return E+=(b/(t*C))**2,E+=w/F**2,Math.sqrt(E)}const pr=203;var We=new g({id:"xyz-abs-d65",cssId:"--xyz-abs-d65",name:"Absolute XYZ D65",coords:{x:{refRange:[0,9504.7],name:"Xa"},y:{refRange:[0,1e4],name:"Ya"},z:{refRange:[0,10888.3],name:"Za"}},base:N,fromBase(r){return r.map(o=>Math.max(o*pr,0))},toBase(r){return r.map(o=>Math.max(o/pr,0))}});const Yo=1.15,Go=.66,gr=2610/2**14,ja=2**14/2610,fr=3424/2**12,br=2413/2**7,zr=2392/2**7,qa=1.7*2523/2**5,vr=2**5/(1.7*2523),Zo=-.56,be=16295499532821565e-27,Wa=[[.41478972,.579999,.014648],[-.20151,1.120649,.0531008],[-.0166008,.2648,.6684799]],Ua=[[1.9242264357876067,-1.0047923125953657,.037651404030618],[.35031676209499907,.7264811939316552,-.06538442294808501],[-.09098281098284752,-.3127282905230739,1.5227665613052603]],Xa=[[.5,.5,0],[3.524,-4.066708,.542708],[.199076,1.096799,-1.295875]],Ya=[[1,.1386050432715393,.05804731615611886],[.9999999999999999,-.1386050432715393,-.05804731615611886],[.9999999999999998,-.09601924202631895,-.8118918960560388]];var _t=new g({id:"jzazbz",name:"Jzazbz",coords:{jz:{refRange:[0,1],name:"Jz"},az:{refRange:[-.5,.5]},bz:{refRange:[-.5,.5]}},base:We,fromBase(r){let[o,e,t]=r,a=Yo*o-(Yo-1)*t,l=Go*e-(Go-1)*o,s=$(Wa,[a,l,t]).map(function(u){let h=fr+br*(u/1e4)**gr,m=1+zr*(u/1e4)**gr;return(h/m)**qa}),[n,i,c]=$(Xa,s);return[(1+Zo)*n/(1+Zo*n)-be,i,c]},toBase(r){let[o,e,t]=r,a=(o+be)/(1+Zo-Zo*(o+be)),l=$(Ya,[a,e,t]).map(function(h){let m=fr-h**vr,f=zr*h**vr-br;return 1e4*(m/f)**ja}),[s,n,i]=$(Ua,l),c=(s+(Yo-1)*i)/Yo,u=(n+(Go-1)*c)/Go;return[c,u,i]},formats:{color:{coords:["<number> | <percentage>","<number> | <percentage>[-1,1]","<number> | <percentage>[-1,1]"]}}}),Re=new g({id:"jzczhz",name:"JzCzHz",coords:{jz:{refRange:[0,1],name:"Jz"},cz:{refRange:[0,1],name:"Chroma"},hz:{refRange:[0,360],type:"angle",name:"Hue"}},base:_t,fromBase(r){let[o,e,t]=r,a;const l=2e-4;return Math.abs(e)<l&&Math.abs(t)<l?a=NaN:a=Math.atan2(t,e)*180/Math.PI,[o,Math.sqrt(e**2+t**2),ao(a)]},toBase(r){return[r[0],r[1]*Math.cos(r[2]*Math.PI/180),r[1]*Math.sin(r[2]*Math.PI/180)]}});function Ga(r,o){[r,o]=v([r,o]);let[e,t,a]=Re.from(r),[l,s,n]=Re.from(o),i=e-l,c=t-s;Number.isNaN(a)&&Number.isNaN(n)?(a=0,n=0):Number.isNaN(a)?a=n:Number.isNaN(n)&&(n=a);let u=a-n,h=2*Math.sqrt(t*s)*Math.sin(u/2*(Math.PI/180));return Math.sqrt(i**2+c**2+h**2)}const Et=3424/4096,At=2413/128,Rt=2392/128,wr=2610/16384,Za=2523/32,Ka=16384/2610,yr=32/2523,Va=[[.3592832590121217,.6976051147779502,-.035891593232029],[-.1920808463704993,1.100476797037432,.0753748658519118],[.0070797844607479,.0748396662186362,.8433265453898765]],Ja=[[2048/4096,2048/4096,0],[6610/4096,-13613/4096,7003/4096],[17933/4096,-17390/4096,-543/4096]],Qa=[[.9999999999999998,.0086090370379328,.111029625003026],[.9999999999999998,-.0086090370379328,-.1110296250030259],[.9999999999999998,.5600313357106791,-.3206271749873188]],ol=[[2.0701522183894223,-1.3263473389671563,.2066510476294053],[.3647385209748072,.6805660249472273,-.0453045459220347],[-.0497472075358123,-.0492609666966131,1.1880659249923042]];var Pe=new g({id:"ictcp",name:"ICTCP",coords:{i:{refRange:[0,1],name:"I"},ct:{refRange:[-.5,.5],name:"CT"},cp:{refRange:[-.5,.5],name:"CP"}},base:We,fromBase(r){let o=$(Va,r);return el(o)},toBase(r){let o=rl(r);return $(ol,o)}});function el(r){let o=r.map(function(e){let t=Et+At*(e/1e4)**wr,a=1+Rt*(e/1e4)**wr;return(t/a)**Za});return $(Ja,o)}function rl(r){return $(Qa,r).map(function(o){let e=Math.max(o**yr-Et,0),t=At-Rt*o**yr;return 1e4*(e/t)**Ka})}function tl(r,o){[r,o]=v([r,o]);let[e,t,a]=Pe.from(r),[l,s,n]=Pe.from(o);return 720*Math.sqrt((e-l)**2+.25*(t-s)**2+(a-n)**2)}const al=D.D65,Pt=.42,xr=1/Pt,ze=2*Math.PI,Bt=[[.401288,.650173,-.051461],[-.250268,1.204414,.045854],[-.002079,.048952,.953127]],ll=[[1.8620678550872327,-1.0112546305316843,.14918677544445175],[.38752654323613717,.6214474419314753,-.008973985167612518],[-.015841498849333856,-.03412293802851557,1.0499644368778496]],sl=[[460,451,288],[460,-891,-261],[460,-220,-6300]],nl={dark:[.8,.525,.8],dim:[.9,.59,.9],average:[1,.69,1]},vo={h:[20.14,90,164.25,237.53,380.14],e:[.8,.7,1,1.2,.8],H:[0,100,200,300,400]},il=180/Math.PI,Cr=Math.PI/180;function Ht(r,o){return r.map(e=>{const t=to(o*Math.abs(e)*.01,Pt);return 400*he(t,e)/(t+27.13)})}function cl(r,o){const e=100/o*27.13**xr;return r.map(t=>{const a=Math.abs(t);return he(e*to(a/(400-a),xr),t)})}function ul(r){let o=ao(r);o<=vo.h[0]&&(o+=360);const e=kt(vo.h,o)-1,[t,a]=vo.h.slice(e,e+2),[l,s]=vo.e.slice(e,e+2),n=vo.H[e],i=(o-t)/l;return n+100*i/(i+(a-o)/s)}function hl(r){let o=(r%400+400)%400;const e=Math.floor(.01*o);o=o%100;const[t,a]=vo.h.slice(e,e+2),[l,s]=vo.e.slice(e,e+2);return ao((o*(s*t-l*a)-100*t*s)/(o*(s-l)-100*s))}function Nt(r,o,e,t,a){const l={};l.discounting=a,l.refWhite=r,l.surround=t;const s=r.map(b=>b*100);l.la=o,l.yb=e;const n=s[1],i=$(Bt,s);t=nl[l.surround];const c=t[0];l.c=t[1],l.nc=t[2];const u=(1/(5*l.la+1))**4;l.fl=u*l.la+.1*(1-u)*(1-u)*Math.cbrt(5*l.la),l.flRoot=l.fl**.25,l.n=l.yb/n,l.z=1.48+Math.sqrt(l.n),l.nbb=.725*l.n**-.2,l.ncb=l.nbb;const h=Math.max(Math.min(c*(1-1/3.6*Math.exp((-l.la-42)/92)),1),0);l.dRgb=i.map(b=>Lo(1,n/b,h)),l.dRgbInv=l.dRgb.map(b=>1/b);const m=i.map((b,p)=>b*l.dRgb[p]),f=Ht(m,l.fl);return l.aW=l.nbb*(2*f[0]+f[1]+.05*f[2]),l}const kr=Nt(al,64/Math.PI*.2,20,"average",!1);function Be(r,o){if(!(r.J!==void 0^r.Q!==void 0))throw new Error("Conversion requires one and only one: 'J' or 'Q'");if(!(r.C!==void 0^r.M!==void 0^r.s!==void 0))throw new Error("Conversion requires one and only one: 'C', 'M' or 's'");if(!(r.h!==void 0^r.H!==void 0))throw new Error("Conversion requires one and only one: 'h' or 'H'");if(r.J===0||r.Q===0)return[0,0,0];let e=0;r.h!==void 0?e=ao(r.h)*Cr:e=hl(r.H)*Cr;const t=Math.cos(e),a=Math.sin(e);let l=0;r.J!==void 0?l=to(r.J,1/2)*.1:r.Q!==void 0&&(l=.25*o.c*r.Q/((o.aW+4)*o.flRoot));let s=0;r.C!==void 0?s=r.C/l:r.M!==void 0?s=r.M/o.flRoot/l:r.s!==void 0&&(s=4e-4*r.s**2*(o.aW+4)/o.c);const n=to(s*Math.pow(1.64-Math.pow(.29,o.n),-.73),10/9),i=.25*(Math.cos(e+2)+3.8),c=o.aW*to(l,2/o.c/o.z),u=5e4/13*o.nc*o.ncb*i,h=c/o.nbb,m=23*(h+.305)*Te(n,23*u+n*(11*t+108*a)),f=m*t,b=m*a,p=cl($(sl,[h,f,b]).map(z=>z*1/1403),o.fl);return $(ll,p.map((z,w)=>z*o.dRgbInv[w])).map(z=>z/100)}function It(r,o){const e=r.map(C=>C*100),t=Ht($(Bt,e).map((C,x)=>C*o.dRgb[x]),o.fl),a=t[0]+(-12*t[1]+t[2])/11,l=(t[0]+t[1]-2*t[2])/9,s=(Math.atan2(l,a)%ze+ze)%ze,n=.25*(Math.cos(s+2)+3.8),i=5e4/13*o.nc*o.ncb*Te(n*Math.sqrt(a**2+l**2),t[0]+t[1]+1.05*t[2]+.305),c=to(i,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),u=o.nbb*(2*t[0]+t[1]+.05*t[2]),h=to(u/o.aW,.5*o.c*o.z),m=100*to(h,2),f=4/o.c*h*(o.aW+4)*o.flRoot,b=c*h,p=b*o.flRoot,z=ao(s*il),w=ul(z),y=50*to(o.c*c/(o.aW+4),1/2);return{J:m,C:b,h:z,s:y,Q:f,M:p,H:w}}var dl=new g({id:"cam16-jmh",cssId:"--cam16-jmh",name:"CAM16-JMh",coords:{j:{refRange:[0,100],name:"J"},m:{refRange:[0,105],name:"Colorfulness"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:N,fromBase(r){const o=It(r,kr);return[o.J,o.M,o.h]},toBase(r){return Be({J:r[0],M:r[1],h:r[2]},kr)}});const ml=D.D65,pl=216/24389,Ot=24389/27;function gl(r){return 116*(r>pl?Math.cbrt(r):(Ot*r+16)/116)-16}function He(r){return r>8?Math.pow((r+16)/116,3):r/Ot}function fl(r,o){let[e,t,a]=r,l=[],s=0;if(a===0)return[0,0,0];let n=He(a);a>0?s=.00379058511492914*a**2+.608983189401032*a+.9155088574762233:s=9514440756550361e-21*a**2+.08693057439788597*a-21.928975842194614;const i=2e-12,c=15;let u=0,h=1/0;for(;u<=c;){l=Be({J:s,C:t,h:e},o);const m=Math.abs(l[1]-n);if(m<h){if(m<=i)return l;h=m}s=s-(l[1]-n)*s/(2*l[1]),u+=1}return Be({J:s,C:t,h:e},o)}function bl(r,o){const e=gl(r[1]);if(e===0)return[0,0,0];const t=It(r,Ue);return[ao(t.h),t.C,e]}const Ue=Nt(ml,200/Math.PI*He(50),He(50)*100,"average",!1);var To=new g({id:"hct",name:"HCT",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},c:{refRange:[0,145],name:"Colorfulness"},t:{refRange:[0,100],name:"Tone"}},base:N,fromBase(r){return bl(r)},toBase(r){return fl(r,Ue)},formats:{color:{id:"--hct",coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]}}});const zl=Math.PI/180,Mr=[1,.007,.0228];function $r(r){r[1]<0&&(r=To.fromBase(To.toBase(r)));const o=Math.log(Math.max(1+Mr[2]*r[1]*Ue.flRoot,1))/Mr[2],e=r[0]*zl,t=o*Math.cos(e),a=o*Math.sin(e);return[r[2],t,a]}function vl(r,o){[r,o]=v([r,o]);let[e,t,a]=$r(To.from(r)),[l,s,n]=$r(To.from(o));return Math.sqrt((e-l)**2+(t-s)**2+(a-n)**2)}var Ao={deltaE76:La,deltaECMC:Ta,deltaE2000:$t,deltaEJz:Ga,deltaEITP:tl,deltaEOK:Ae,deltaEHCT:vl};function wl(r){const o=r?Math.floor(Math.log10(Math.abs(r))):0;return Math.max(parseFloat(`1e${o-2}`),1e-6)}const Sr={hct:{method:"hct.c",jnd:2,deltaEMethod:"hct",blackWhiteClamp:{}},"hct-tonal":{method:"hct.c",jnd:0,deltaEMethod:"hct",blackWhiteClamp:{channel:"hct.t",min:0,max:100}}};function fo(r,{method:o=G.gamut_mapping,space:e=void 0,deltaEMethod:t="",jnd:a=2,blackWhiteClamp:l={}}={}){if(r=v(r),jo(arguments[1])?e=arguments[1]:e||(e=r.space),e=g.get(e),yo(r,e,{epsilon:0}))return r;let s;if(o==="css")s=yl(r,{space:e});else{if(o!=="clip"&&!yo(r,e)){Object.prototype.hasOwnProperty.call(Sr,o)&&({method:o,jnd:a,deltaEMethod:t,blackWhiteClamp:l}=Sr[o]);let n=$t;if(t!==""){for(let c in Ao)if("deltae"+t.toLowerCase()===c.toLowerCase()){n=Ao[c];break}}let i=fo(M(r,e),{method:"clip",space:e});if(n(r,i)>a){if(Object.keys(l).length===3){let w=g.resolveCoord(l.channel),y=X(M(r,w.space),w.id);if(po(y)&&(y=0),y>=l.max)return M({space:"xyz-d65",coords:D.D65},r.space);if(y<=l.min)return M({space:"xyz-d65",coords:[0,0,0]},r.space)}let c=g.resolveCoord(o),u=c.space,h=c.id,m=M(r,u);m.coords.forEach((w,y)=>{po(w)&&(m.coords[y]=0)});let f=(c.range||c.refRange)[0],b=wl(a),p=f,z=X(m,h);for(;z-p>b;){let w=Eo(m);w=fo(w,{space:e,method:"clip"}),n(m,w)-a<b?p=X(m,h):z=X(m,h),no(m,h,(p+z)/2)}s=M(m,e)}else s=i}else s=M(r,e);if(o==="clip"||!yo(s,e,{epsilon:0})){let n=Object.values(e.coords).map(i=>i.range||[]);s.coords=s.coords.map((i,c)=>{let[u,h]=n[c];return u!==void 0&&(i=Math.max(u,i)),h!==void 0&&(i=Math.min(i,h)),i})}}return e!==r.space&&(s=M(s,r.space)),r.coords=s.coords,r}fo.returns="color";const _r={WHITE:{space:_o,coords:[1,0,0]},BLACK:{space:_o,coords:[0,0,0]}};function yl(r,{space:o}={}){r=v(r),o||(o=r.space),o=g.get(o);const e=g.get("oklch");if(o.isUnbounded)return M(r,o);const t=M(r,e);let a=t.coords[0];if(a>=1){const m=M(_r.WHITE,o);return m.alpha=r.alpha,M(m,o)}if(a<=0){const m=M(_r.BLACK,o);return m.alpha=r.alpha,M(m,o)}if(yo(t,o,{epsilon:0}))return M(t,o);function l(m){const f=M(m,o),b=Object.values(o.coords);return f.coords=f.coords.map((p,z)=>{if("range"in b[z]){const[w,y]=b[z].range;return Ct(w,p,y)}return p}),f}let s=0,n=t.coords[1],i=!0,c=Eo(t),u=l(c),h=Ae(u,c);if(h<.02)return u;for(;n-s>1e-4;){const m=(s+n)/2;if(c.coords[1]=m,i&&yo(c,o,{epsilon:0}))s=m;else if(u=l(c),h=Ae(u,c),h<.02){if(.02-h<1e-4)break;i=!1,s=m}else n=m}return u}function M(r,o,{inGamut:e}={}){r=v(r),o=g.get(o);let t=o.from(r),a={space:o,coords:t,alpha:r.alpha};return e&&(a=fo(a,e===!0?void 0:e)),a}M.returns="color";function Oo(r,{precision:o=G.precision,format:e="default",inGamut:t=!0,...a}={}){var l;let s;r=v(r);let n=e;e=r.space.getFormat(e)??r.space.getFormat("default")??g.DEFAULT_FORMAT;let i=r.coords.slice();if(t||(t=e.toGamut),t&&!yo(r)&&(i=fo(Eo(r),t===!0?void 0:t).coords),e.type==="custom")if(a.precision=o,e.serialize)s=e.serialize(i,r.alpha,a);else throw new TypeError(`format ${n} can only be used to parse colors, not for serialization`);else{let c=e.name||"color";e.serializeCoords?i=e.serializeCoords(i,o):o!==null&&(i=i.map(f=>se(f,{precision:o})));let u=[...i];if(c==="color"){let f=e.id||((l=e.ids)==null?void 0:l[0])||r.space.id;u.unshift(f)}let h=r.alpha;o!==null&&(h=se(h,{precision:o}));let m=r.alpha>=1||e.noAlpha?"":`${e.commas?",":" /"} ${h}`;s=`${c}(${u.join(e.commas?", ":" ")}${m})`}return s}const xl=[[.6369580483012914,.14461690358620832,.1688809751641721],[.2627002120112671,.6779980715188708,.05930171646986196],[0,.028072693049087428,1.060985057710791]],Cl=[[1.716651187971268,-.355670783776392,-.25336628137366],[-.666684351832489,1.616481236634939,.0157685458139111],[.017639857445311,-.042770613257809,.942103121235474]];var de=new j({id:"rec2020-linear",cssId:"--rec2020-linear",name:"Linear REC.2020",white:"D65",toXYZ_M:xl,fromXYZ_M:Cl});const Ko=1.09929682680944,Er=.018053968510807;var Ft=new j({id:"rec2020",name:"REC.2020",base:de,toBase(r){return r.map(function(o){return o<Er*4.5?o/4.5:Math.pow((o+Ko-1)/Ko,1/.45)})},fromBase(r){return r.map(function(o){return o>=Er?Ko*Math.pow(o,.45)-(Ko-1):4.5*o})}});const kl=[[.4865709486482162,.26566769316909306,.1982172852343625],[.2289745640697488,.6917385218365064,.079286914093745],[0,.04511338185890264,1.043944368900976]],Ml=[[2.493496911941425,-.9313836179191239,-.40271078445071684],[-.8294889695615747,1.7626640603183463,.023624685841943577],[.03584583024378447,-.07617238926804182,.9568845240076872]];var Lt=new j({id:"p3-linear",cssId:"--display-p3-linear",name:"Linear P3",white:"D65",toXYZ_M:kl,fromXYZ_M:Ml});const $l=[[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],B=[[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]];var Dt=new j({id:"srgb-linear",name:"Linear sRGB",white:"D65",toXYZ_M:$l,fromXYZ_M:B}),Ar={aliceblue:[240/255,248/255,1],antiquewhite:[250/255,235/255,215/255],aqua:[0,1,1],aquamarine:[127/255,1,212/255],azure:[240/255,1,1],beige:[245/255,245/255,220/255],bisque:[1,228/255,196/255],black:[0,0,0],blanchedalmond:[1,235/255,205/255],blue:[0,0,1],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,1,0],chocolate:[210/255,105/255,30/255],coral:[1,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[1,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0,1,1],darkblue:[0,0,139/255],darkcyan:[0,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0,100/255,0],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[1,140/255,0],darkorchid:[153/255,50/255,204/255],darkred:[139/255,0,0],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0,206/255,209/255],darkviolet:[148/255,0,211/255],deeppink:[1,20/255,147/255],deepskyblue:[0,191/255,1],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,1],firebrick:[178/255,34/255,34/255],floralwhite:[1,250/255,240/255],forestgreen:[34/255,139/255,34/255],fuchsia:[1,0,1],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,1],gold:[1,215/255,0],goldenrod:[218/255,165/255,32/255],gray:[128/255,128/255,128/255],green:[0,128/255,0],greenyellow:[173/255,1,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,1,240/255],hotpink:[1,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0,130/255],ivory:[1,1,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[1,240/255,245/255],lawngreen:[124/255,252/255,0],lemonchiffon:[1,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,1,1],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[1,182/255,193/255],lightsalmon:[1,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,153/255],lightslategrey:[119/255,136/255,153/255],lightsteelblue:[176/255,196/255,222/255],lightyellow:[1,1,224/255],lime:[0,1,0],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[1,0,1],maroon:[128/255,0,0],mediumaquamarine:[102/255,205/255,170/255],mediumblue:[0,0,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0,250/255,154/255],mediumturquoise:[72/255,209/255,204/255],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,1,250/255],mistyrose:[1,228/255,225/255],moccasin:[1,228/255,181/255],navajowhite:[1,222/255,173/255],navy:[0,0,128/255],oldlace:[253/255,245/255,230/255],olive:[128/255,128/255,0],olivedrab:[107/255,142/255,35/255],orange:[1,165/255,0],orangered:[1,69/255,0],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[1,239/255,213/255],peachpuff:[1,218/255,185/255],peru:[205/255,133/255,63/255],pink:[1,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],purple:[128/255,0,128/255],rebeccapurple:[102/255,51/255,153/255],red:[1,0,0],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[1,245/255,238/255],sienna:[160/255,82/255,45/255],silver:[192/255,192/255,192/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[1,250/255,250/255],springgreen:[0,1,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],teal:[0,128/255,128/255],thistle:[216/255,191/255,216/255],tomato:[1,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],white:[1,1,1],whitesmoke:[245/255,245/255,245/255],yellow:[1,1,0],yellowgreen:[154/255,205/255,50/255]};let Rr=Array(3).fill("<percentage> | <number>[0, 255]"),Pr=Array(3).fill("<number>[0, 255]");var Ro=new j({id:"srgb",name:"sRGB",base:Dt,fromBase:r=>r.map(o=>{let e=o<0?-1:1,t=o*e;return t>.0031308?e*(1.055*t**(1/2.4)-.055):12.92*o}),toBase:r=>r.map(o=>{let e=o<0?-1:1,t=o*e;return t<=.04045?o/12.92:e*((t+.055)/1.055)**2.4}),formats:{rgb:{coords:Rr},rgb_number:{name:"rgb",commas:!0,coords:Pr,noAlpha:!0},color:{},rgba:{coords:Rr,commas:!0,lastAlpha:!0},rgba_number:{name:"rgba",commas:!0,coords:Pr},hex:{type:"custom",toGamut:!0,test:r=>/^#([a-f0-9]{3,4}){1,2}$/i.test(r),parse(r){r.length<=5&&(r=r.replace(/[a-f0-9]/gi,"$&$&"));let o=[];return r.replace(/[a-f0-9]{2}/gi,e=>{o.push(parseInt(e,16)/255)}),{spaceId:"srgb",coords:o.slice(0,3),alpha:o.slice(3)[0]}},serialize:(r,o,{collapse:e=!0}={})=>{o<1&&r.push(o),r=r.map(a=>Math.round(a*255));let t=e&&r.every(a=>a%17===0);return"#"+r.map(a=>t?(a/17).toString(16):a.toString(16).padStart(2,"0")).join("")}},keyword:{type:"custom",test:r=>/^[a-z]+$/i.test(r),parse(r){r=r.toLowerCase();let o={spaceId:"srgb",coords:null,alpha:1};if(r==="transparent"?(o.coords=Ar.black,o.alpha=0):o.coords=Ar[r],o.coords)return o}}}}),Tt=new j({id:"p3",cssId:"display-p3",name:"P3",base:Lt,fromBase:Ro.fromBase,toBase:Ro.toBase});G.display_space=Ro;let Br;if(typeof CSS<"u"&&CSS.supports)for(let r of[Y,Ft,Tt]){let o=r.getMinCoords(),e=Oo({space:r,coords:o,alpha:1});if(CSS.supports("color",e)){G.display_space=r;break}}function Sl(r,{space:o=G.display_space,...e}={}){let t=Oo(r,e);if(typeof CSS>"u"||CSS.supports("color",t)||!G.display_space)t=new String(t),t.color=r;else{let a=r;if((r.coords.some(po)||po(r.alpha))&&!(Br??(Br=CSS.supports("color","hsl(none 50% 50%)")))&&(a=Eo(r),a.coords=a.coords.map(R),a.alpha=R(a.alpha),t=Oo(a,e),CSS.supports("color",t)))return t=new String(t),t.color=a,t;a=M(a,o),t=new String(Oo(a,e)),t.color=a}return t}function _l(r,o){return r=v(r),o=v(o),r.space===o.space&&r.alpha===o.alpha&&r.coords.every((e,t)=>e===o.coords[t])}function bo(r){return X(r,[N,"y"])}function jt(r,o){no(r,[N,"y"],o)}function El(r){Object.defineProperty(r.prototype,"luminance",{get(){return bo(this)},set(o){jt(this,o)}})}var Al=Object.freeze({__proto__:null,getLuminance:bo,register:El,setLuminance:jt});function Rl(r,o){r=v(r),o=v(o);let e=Math.max(bo(r),0),t=Math.max(bo(o),0);return t>e&&([e,t]=[t,e]),(e+.05)/(t+.05)}const Pl=.56,Bl=.57,Hl=.62,Nl=.65,Hr=.022,Il=1.414,Ol=.1,Fl=5e-4,Ll=1.14,Nr=.027,Dl=1.14;function Ir(r){return r>=Hr?r:r+(Hr-r)**Il}function ko(r){let o=r<0?-1:1,e=Math.abs(r);return o*Math.pow(e,2.4)}function Tl(r,o){o=v(o),r=v(r);let e,t,a,l,s,n;o=M(o,"srgb"),[l,s,n]=o.coords;let i=ko(l)*.2126729+ko(s)*.7151522+ko(n)*.072175;r=M(r,"srgb"),[l,s,n]=r.coords;let c=ko(l)*.2126729+ko(s)*.7151522+ko(n)*.072175,u=Ir(i),h=Ir(c),m=h>u;return Math.abs(h-u)<Fl?t=0:m?(e=h**Pl-u**Bl,t=e*Ll):(e=h**Nl-u**Hl,t=e*Dl),Math.abs(t)<Ol?a=0:t>0?a=t-Nr:a=t+Nr,a*100}function jl(r,o){r=v(r),o=v(o);let e=Math.max(bo(r),0),t=Math.max(bo(o),0);t>e&&([e,t]=[t,e]);let a=e+t;return a===0?0:(e-t)/a}const ql=5e4;function Wl(r,o){r=v(r),o=v(o);let e=Math.max(bo(r),0),t=Math.max(bo(o),0);return t>e&&([e,t]=[t,e]),t===0?ql:(e-t)/t}function Ul(r,o){r=v(r),o=v(o);let e=X(r,[Y,"l"]),t=X(o,[Y,"l"]);return Math.abs(e-t)}const Xl=216/24389,Or=24/116,Vo=24389/27;let ve=D.D65;var Ne=new g({id:"lab-d65",name:"Lab D65",coords:{l:{refRange:[0,100],name:"Lightness"},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:ve,base:N,fromBase(r){let o=r.map((e,t)=>e/ve[t]).map(e=>e>Xl?Math.cbrt(e):(Vo*e+16)/116);return[116*o[1]-16,500*(o[0]-o[1]),200*(o[1]-o[2])]},toBase(r){let o=[];return o[1]=(r[0]+16)/116,o[0]=r[1]/500+o[1],o[2]=o[1]-r[2]/200,[o[0]>Or?Math.pow(o[0],3):(116*o[0]-16)/Vo,r[0]>8?Math.pow((r[0]+16)/116,3):r[0]/Vo,o[2]>Or?Math.pow(o[2],3):(116*o[2]-16)/Vo].map((e,t)=>e*ve[t])},formats:{"lab-d65":{coords:["<number> | <percentage>","<number> | <percentage>[-1,1]","<number> | <percentage>[-1,1]"]}}});const we=Math.pow(5,.5)*.5+.5;function Yl(r,o){r=v(r),o=v(o);let e=X(r,[Ne,"l"]),t=X(o,[Ne,"l"]),a=Math.abs(Math.pow(e,we)-Math.pow(t,we)),l=Math.pow(a,1/we)*Math.SQRT2-40;return l<7.5?0:l}var ae=Object.freeze({__proto__:null,contrastAPCA:Tl,contrastDeltaPhi:Yl,contrastLstar:Ul,contrastMichelson:jl,contrastWCAG21:Rl,contrastWeber:Wl});function Gl(r,o,e={}){jo(e)&&(e={algorithm:e});let{algorithm:t,...a}=e;if(!t){let l=Object.keys(ae).map(s=>s.replace(/^contrast/,"")).join(", ");throw new TypeError(`contrast() function needs a contrast algorithm. Please specify one of: ${l}`)}r=v(r),o=v(o);for(let l in ae)if("contrast"+t.toLowerCase()===l.toLowerCase())return ae[l](r,o,a);throw new TypeError(`Unknown contrast algorithm: ${t}`)}function me(r){let[o,e,t]=qo(r,N),a=o+15*e+3*t;return[4*o/a,9*e/a]}function qt(r){let[o,e,t]=qo(r,N),a=o+e+t;return[o/a,e/a]}function Zl(r){Object.defineProperty(r.prototype,"uv",{get(){return me(this)}}),Object.defineProperty(r.prototype,"xy",{get(){return qt(this)}})}var Kl=Object.freeze({__proto__:null,register:Zl,uv:me,xy:qt});function Io(r,o,e={}){jo(e)&&(e={method:e});let{method:t=G.deltaE,...a}=e;for(let l in Ao)if("deltae"+t.toLowerCase()===l.toLowerCase())return Ao[l](r,o,a);throw new TypeError(`Unknown deltaE method: ${t}`)}function Vl(r,o=.25){let e=[g.get("oklch","lch"),"l"];return no(r,e,t=>t*(1+o))}function Jl(r,o=.25){let e=[g.get("oklch","lch"),"l"];return no(r,e,t=>t*(1-o))}var Ql=Object.freeze({__proto__:null,darken:Jl,lighten:Vl});function Wt(r,o,e=.5,t={}){return[r,o]=[v(r),v(o)],mo(e)==="object"&&([e,t]=[.5,e]),Wo(r,o,t)(e)}function Ut(r,o,e={}){let t;Xe(r)&&([t,e]=[r,o],[r,o]=t.rangeArgs.colors);let{maxDeltaE:a,deltaEMethod:l,steps:s=2,maxSteps:n=1e3,...i}=e;t||([r,o]=[v(r),v(o)],t=Wo(r,o,i));let c=Io(r,o),u=a>0?Math.max(s,Math.ceil(c/a)+1):s,h=[];if(n!==void 0&&(u=Math.min(u,n)),u===1)h=[{p:.5,color:t(.5)}];else{let m=1/(u-1);h=Array.from({length:u},(f,b)=>{let p=b*m;return{p,color:t(p)}})}if(a>0){let m=h.reduce((f,b,p)=>{if(p===0)return 0;let z=Io(b.color,h[p-1].color,l);return Math.max(f,z)},0);for(;m>a;){m=0;for(let f=1;f<h.length&&h.length<n;f++){let b=h[f-1],p=h[f],z=(p.p+b.p)/2,w=t(z);m=Math.max(m,Io(w,b.color),Io(w,p.color)),h.splice(f,0,{p:z,color:t(z)}),f++}}}return h=h.map(m=>m.color),h}function Wo(r,o,e={}){if(Xe(r)){let[i,c]=[r,o];return Wo(...i.rangeArgs.colors,{...i.rangeArgs.options,...c})}let{space:t,outputSpace:a,progression:l,premultiplied:s}=e;r=v(r),o=v(o),r=Eo(r),o=Eo(o);let n={colors:[r,o],options:e};if(t?t=g.get(t):t=g.registry[G.interpolationSpace]||r.space,a=a?g.get(a):t,r=M(r,t),o=M(o,t),r=fo(r),o=fo(o),t.coords.h&&t.coords.h.type==="angle"){let i=e.hue=e.hue||"shorter",c=[t,"h"],[u,h]=[X(r,c),X(o,c)];isNaN(u)&&!isNaN(h)?u=h:isNaN(h)&&!isNaN(u)&&(h=u),[u,h]=Ba(i,[u,h]),no(r,c,u),no(o,c,h)}return s&&(r.coords=r.coords.map(i=>i*r.alpha),o.coords=o.coords.map(i=>i*o.alpha)),Object.assign(i=>{i=l?l(i):i;let c=r.coords.map((m,f)=>{let b=o.coords[f];return Lo(m,b,i)}),u=Lo(r.alpha,o.alpha,i),h={space:t,coords:c,alpha:u};return s&&(h.coords=h.coords.map(m=>m/u)),a!==t&&(h=M(h,a)),h},{rangeArgs:n})}function Xe(r){return mo(r)==="function"&&!!r.rangeArgs}G.interpolationSpace="lab";function os(r){r.defineFunction("mix",Wt,{returns:"color"}),r.defineFunction("range",Wo,{returns:"function<color>"}),r.defineFunction("steps",Ut,{returns:"array<color>"})}var es=Object.freeze({__proto__:null,isRange:Xe,mix:Wt,range:Wo,register:os,steps:Ut}),Xt=new g({id:"hsl",name:"HSL",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},l:{range:[0,100],name:"Lightness"}},base:Ro,fromBase:r=>{let o=Math.max(...r),e=Math.min(...r),[t,a,l]=r,[s,n,i]=[NaN,0,(e+o)/2],c=o-e;if(c!==0){switch(n=i===0||i===1?0:(o-i)/Math.min(i,1-i),o){case t:s=(a-l)/c+(a<l?6:0);break;case a:s=(l-t)/c+2;break;case l:s=(t-a)/c+4}s=s*60}return n<0&&(s+=180,n=Math.abs(n)),s>=360&&(s-=360),[s,n*100,i*100]},toBase:r=>{let[o,e,t]=r;o=o%360,o<0&&(o+=360),e/=100,t/=100;function a(l){let s=(l+o/30)%12,n=e*Math.min(t,1-t);return t-n*Math.max(-1,Math.min(s-3,9-s,1))}return[a(0),a(8),a(4)]},formats:{hsl:{coords:["<number> | <angle>","<percentage>","<percentage>"]},hsla:{coords:["<number> | <angle>","<percentage>","<percentage>"],commas:!0,lastAlpha:!0}}}),Yt=new g({id:"hsv",name:"HSV",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},v:{range:[0,100],name:"Value"}},base:Xt,fromBase(r){let[o,e,t]=r;e/=100,t/=100;let a=t+e*Math.min(t,1-t);return[o,a===0?0:200*(1-t/a),100*a]},toBase(r){let[o,e,t]=r;e/=100,t/=100;let a=t*(1-e/2);return[o,a===0||a===1?0:(t-a)/Math.min(a,1-a)*100,a*100]},formats:{color:{id:"--hsv",coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]}}}),rs=new g({id:"hwb",name:"HWB",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},w:{range:[0,100],name:"Whiteness"},b:{range:[0,100],name:"Blackness"}},base:Yt,fromBase(r){let[o,e,t]=r;return[o,t*(100-e)/100,100-t]},toBase(r){let[o,e,t]=r;e/=100,t/=100;let a=e+t;if(a>=1){let n=e/a;return[o,0,n*100]}let l=1-t,s=l===0?0:1-e/l;return[o,s*100,l*100]},formats:{hwb:{coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]}}});const ts=[[.5766690429101305,.1855582379065463,.1882286462349947],[.29734497525053605,.6273635662554661,.07529145849399788],[.02703136138641234,.07068885253582723,.9913375368376388]],as=[[2.0415879038107465,-.5650069742788596,-.34473135077832956],[-.9692436362808795,1.8759675015077202,.04155505740717557],[.013444280632031142,-.11836239223101838,1.0151749943912054]];var Gt=new j({id:"a98rgb-linear",cssId:"--a98-rgb-linear",name:"Linear Adobe® 98 RGB compatible",white:"D65",toXYZ_M:ts,fromXYZ_M:as}),ls=new j({id:"a98rgb",cssId:"a98-rgb",name:"Adobe® 98 RGB compatible",base:Gt,toBase:r=>r.map(o=>Math.pow(Math.abs(o),563/256)*Math.sign(o)),fromBase:r=>r.map(o=>Math.pow(Math.abs(o),256/563)*Math.sign(o))});const ss=[[.7977666449006423,.13518129740053308,.0313477341283922],[.2880748288194013,.711835234241873,8993693872564e-17],[0,0,.8251046025104602]],ns=[[1.3457868816471583,-.25557208737979464,-.05110186497554526],[-.5446307051249019,1.5082477428451468,.02052744743642139],[0,0,1.2119675456389452]];var Zt=new j({id:"prophoto-linear",cssId:"--prophoto-rgb-linear",name:"Linear ProPhoto",white:"D50",base:qe,toXYZ_M:ss,fromXYZ_M:ns});const is=1/512,cs=16/512;var us=new j({id:"prophoto",cssId:"prophoto-rgb",name:"ProPhoto",base:Zt,toBase(r){return r.map(o=>o<cs?o/16:o**1.8)},fromBase(r){return r.map(o=>o>=is?o**(1/1.8):16*o)}}),hs=new g({id:"oklch",name:"Oklch",coords:{l:{refRange:[0,1],name:"Lightness"},c:{refRange:[0,.4],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},white:"D65",base:_o,fromBase(r){let[o,e,t]=r,a;const l=2e-4;return Math.abs(e)<l&&Math.abs(t)<l?a=NaN:a=Math.atan2(t,e)*180/Math.PI,[o,Math.sqrt(e**2+t**2),ao(a)]},toBase(r){let[o,e,t]=r,a,l;return isNaN(t)?(a=0,l=0):(a=e*Math.cos(t*Math.PI/180),l=e*Math.sin(t*Math.PI/180)),[o,a,l]},formats:{oklch:{coords:["<percentage> | <number>","<number> | <percentage>[0,1]","<number> | <angle>"]}}});let Kt=D.D65;const ds=216/24389,Fr=24389/27,[Lr,Dr]=me({space:N,coords:Kt});var Vt=new g({id:"luv",name:"Luv",coords:{l:{refRange:[0,100],name:"Lightness"},u:{refRange:[-215,215]},v:{refRange:[-215,215]}},white:Kt,base:N,fromBase(r){let o=[R(r[0]),R(r[1]),R(r[2])],e=o[1],[t,a]=me({space:N,coords:o});if(!Number.isFinite(t)||!Number.isFinite(a))return[0,0,0];let l=e<=ds?Fr*e:116*Math.cbrt(e)-16;return[l,13*l*(t-Lr),13*l*(a-Dr)]},toBase(r){let[o,e,t]=r;if(o===0||po(o))return[0,0,0];e=R(e),t=R(t);let a=e/(13*o)+Lr,l=t/(13*o)+Dr,s=o<=8?o/Fr:Math.pow((o+16)/116,3);return[s*(9*a/(4*l)),s,s*((12-3*a-20*l)/(4*l))]},formats:{color:{id:"--luv",coords:["<number> | <percentage>","<number> | <percentage>[-1,1]","<number> | <percentage>[-1,1]"]}}}),Ye=new g({id:"lchuv",name:"LChuv",coords:{l:{refRange:[0,100],name:"Lightness"},c:{refRange:[0,220],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:Vt,fromBase(r){let[o,e,t]=r,a;const l=.02;return Math.abs(e)<l&&Math.abs(t)<l?a=NaN:a=Math.atan2(t,e)*180/Math.PI,[o,Math.sqrt(e**2+t**2),ao(a)]},toBase(r){let[o,e,t]=r;return e<0&&(e=0),isNaN(t)&&(t=0),[o,e*Math.cos(t*Math.PI/180),e*Math.sin(t*Math.PI/180)]},formats:{color:{id:"--lchuv",coords:["<number> | <percentage>","<number> | <percentage>","<number> | <angle>"]}}});const ms=216/24389,ps=24389/27,Tr=B[0][0],jr=B[0][1],ye=B[0][2],qr=B[1][0],Wr=B[1][1],xe=B[1][2],Ur=B[2][0],Xr=B[2][1],Ce=B[2][2];function Mo(r,o,e){const t=o/(Math.sin(e)-r*Math.cos(e));return t<0?1/0:t}function ce(r){const o=Math.pow(r+16,3)/1560896,e=o>ms?o:r/ps,t=e*(284517*Tr-94839*ye),a=e*(838422*ye+769860*jr+731718*Tr),l=e*(632260*ye-126452*jr),s=e*(284517*qr-94839*xe),n=e*(838422*xe+769860*Wr+731718*qr),i=e*(632260*xe-126452*Wr),c=e*(284517*Ur-94839*Ce),u=e*(838422*Ce+769860*Xr+731718*Ur),h=e*(632260*Ce-126452*Xr);return{r0s:t/l,r0i:a*r/l,r1s:t/(l+126452),r1i:(a-769860)*r/(l+126452),g0s:s/i,g0i:n*r/i,g1s:s/(i+126452),g1i:(n-769860)*r/(i+126452),b0s:c/h,b0i:u*r/h,b1s:c/(h+126452),b1i:(u-769860)*r/(h+126452)}}function Yr(r,o){const e=o/360*Math.PI*2,t=Mo(r.r0s,r.r0i,e),a=Mo(r.r1s,r.r1i,e),l=Mo(r.g0s,r.g0i,e),s=Mo(r.g1s,r.g1i,e),n=Mo(r.b0s,r.b0i,e),i=Mo(r.b1s,r.b1i,e);return Math.min(t,a,l,s,n,i)}var gs=new g({id:"hsluv",name:"HSLuv",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},l:{range:[0,100],name:"Lightness"}},base:Ye,gamutSpace:Ro,fromBase(r){let[o,e,t]=[R(r[0]),R(r[1]),R(r[2])],a;if(o>99.9999999)a=0,o=100;else if(o<1e-8)a=0,o=0;else{let l=ce(o),s=Yr(l,t);a=e/s*100}return[t,a,o]},toBase(r){let[o,e,t]=[R(r[0]),R(r[1]),R(r[2])],a;if(t>99.9999999)t=100,a=0;else if(t<1e-8)t=0,a=0;else{let l=ce(t);a=Yr(l,o)/100*e}return[t,a,o]},formats:{color:{id:"--hsluv",coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]}}});B[0][0];B[0][1];B[0][2];B[1][0];B[1][1];B[1][2];B[2][0];B[2][1];B[2][2];function $o(r,o){return Math.abs(o)/Math.sqrt(Math.pow(r,2)+1)}function Gr(r){let o=$o(r.r0s,r.r0i),e=$o(r.r1s,r.r1i),t=$o(r.g0s,r.g0i),a=$o(r.g1s,r.g1i),l=$o(r.b0s,r.b0i),s=$o(r.b1s,r.b1i);return Math.min(o,e,t,a,l,s)}var fs=new g({id:"hpluv",name:"HPLuv",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},l:{range:[0,100],name:"Lightness"}},base:Ye,gamutSpace:"self",fromBase(r){let[o,e,t]=[R(r[0]),R(r[1]),R(r[2])],a;if(o>99.9999999)a=0,o=100;else if(o<1e-8)a=0,o=0;else{let l=ce(o),s=Gr(l);a=e/s*100}return[t,a,o]},toBase(r){let[o,e,t]=[R(r[0]),R(r[1]),R(r[2])],a;if(t>99.9999999)t=100,a=0;else if(t<1e-8)t=0,a=0;else{let l=ce(t);a=Gr(l)/100*e}return[t,a,o]},formats:{color:{id:"--hpluv",coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]}}});const Zr=203,Kr=2610/2**14,bs=2**14/2610,zs=2523/2**5,Vr=2**5/2523,Jr=3424/2**12,Qr=2413/2**7,ot=2392/2**7;var vs=new j({id:"rec2100pq",cssId:"rec2100-pq",name:"REC.2100-PQ",base:de,toBase(r){return r.map(function(o){return(Math.max(o**Vr-Jr,0)/(Qr-ot*o**Vr))**bs*1e4/Zr})},fromBase(r){return r.map(function(o){let e=Math.max(o*Zr/1e4,0),t=Jr+Qr*e**Kr,a=1+ot*e**Kr;return(t/a)**zs})}});const et=.17883277,rt=.28466892,tt=.55991073,ke=3.7743;var ws=new j({id:"rec2100hlg",cssId:"rec2100-hlg",name:"REC.2100-HLG",referred:"scene",base:de,toBase(r){return r.map(function(o){return o<=.5?o**2/3*ke:(Math.exp((o-tt)/et)+rt)/12*ke})},fromBase(r){return r.map(function(o){return o/=ke,o<=1/12?Math.sqrt(3*o):et*Math.log(12*o-rt)+tt})}});const Jt={};go.add("chromatic-adaptation-start",r=>{r.options.method&&(r.M=Qt(r.W1,r.W2,r.options.method))});go.add("chromatic-adaptation-end",r=>{r.M||(r.M=Qt(r.W1,r.W2,r.options.method))});function pe({id:r,toCone_M:o,fromCone_M:e}){Jt[r]=arguments[0]}function Qt(r,o,e="Bradford"){let t=Jt[e],[a,l,s]=$(t.toCone_M,r),[n,i,c]=$(t.toCone_M,o),u=[[n/a,0,0],[0,i/l,0],[0,0,c/s]],h=$(u,t.toCone_M);return $(t.fromCone_M,h)}pe({id:"von Kries",toCone_M:[[.40024,.7076,-.08081],[-.2263,1.16532,.0457],[0,0,.91822]],fromCone_M:[[1.8599363874558397,-1.1293816185800916,.21989740959619328],[.3611914362417676,.6388124632850422,-6370596838649899e-21],[0,0,1.0890636230968613]]});pe({id:"Bradford",toCone_M:[[.8951,.2664,-.1614],[-.7502,1.7135,.0367],[.0389,-.0685,1.0296]],fromCone_M:[[.9869929054667121,-.14705425642099013,.15996265166373122],[.4323052697233945,.5183602715367774,.049291228212855594],[-.00852866457517732,.04004282165408486,.96848669578755]]});pe({id:"CAT02",toCone_M:[[.7328,.4296,-.1624],[-.7036,1.6975,.0061],[.003,.0136,.9834]],fromCone_M:[[1.0961238208355142,-.27886900021828726,.18274517938277307],[.4543690419753592,.4735331543074117,.07209780371722911],[-.009627608738429355,-.00569803121611342,1.0153256399545427]]});pe({id:"CAT16",toCone_M:[[.401288,.650173,-.051461],[-.250268,1.204414,.045854],[-.002079,.048952,.953127]],fromCone_M:[[1.862067855087233,-1.0112546305316845,.14918677544445172],[.3875265432361372,.6214474419314753,-.008973985167612521],[-.01584149884933386,-.03412293802851557,1.0499644368778496]]});Object.assign(D,{A:[1.0985,1,.35585],C:[.98074,1,1.18232],D55:[.95682,1,.92149],D75:[.94972,1,1.22638],E:[1,1,1],F2:[.99186,1,.67393],F7:[.95041,1,1.08747],F11:[1.00962,1,.6435]});D.ACES=[.32168/.33767,1,(1-.32168-.33767)/.33767];const ys=[[.6624541811085053,.13400420645643313,.1561876870049078],[.27222871678091454,.6740817658111484,.05368951740793705],[-.005574649490394108,.004060733528982826,1.0103391003129971]],xs=[[1.6410233796943257,-.32480329418479,-.23642469523761225],[-.6636628587229829,1.6153315916573379,.016756347685530137],[.011721894328375376,-.008284441996237409,.9883948585390215]];var oa=new j({id:"acescg",cssId:"--acescg",name:"ACEScg",coords:{r:{range:[0,65504],name:"Red"},g:{range:[0,65504],name:"Green"},b:{range:[0,65504],name:"Blue"}},referred:"scene",white:D.ACES,toXYZ_M:ys,fromXYZ_M:xs});const Jo=2**-16,Me=-.35828683,Qo=(Math.log2(65504)+9.72)/17.52;var Cs=new j({id:"acescc",cssId:"--acescc",name:"ACEScc",coords:{r:{range:[Me,Qo],name:"Red"},g:{range:[Me,Qo],name:"Green"},b:{range:[Me,Qo],name:"Blue"}},referred:"scene",base:oa,toBase(r){const o=-.3013698630136986;return r.map(function(e){return e<=o?(2**(e*17.52-9.72)-Jo)*2:e<Qo?2**(e*17.52-9.72):65504})},fromBase(r){return r.map(function(o){return o<=0?(Math.log2(Jo)+9.72)/17.52:o<Jo?(Math.log2(Jo+o*.5)+9.72)/17.52:(Math.log2(o)+9.72)/17.52})}}),at=Object.freeze({__proto__:null,A98RGB:ls,A98RGB_Linear:Gt,ACEScc:Cs,ACEScg:oa,CAM16_JMh:dl,HCT:To,HPLuv:fs,HSL:Xt,HSLuv:gs,HSV:Yt,HWB:rs,ICTCP:Pe,JzCzHz:Re,Jzazbz:_t,LCH:Do,LCHuv:Ye,Lab:Y,Lab_D65:Ne,Luv:Vt,OKLCH:hs,OKLab:_o,P3:Tt,P3_Linear:Lt,ProPhoto:us,ProPhoto_Linear:Zt,REC_2020:Ft,REC_2020_Linear:de,REC_2100_HLG:ws,REC_2100_PQ:vs,XYZ_ABS_D65:We,XYZ_D50:qe,XYZ_D65:N,sRGB:Ro,sRGB_Linear:Dt});let _=class T{constructor(...o){let e;o.length===1&&(e=v(o[0]));let t,a,l;e?(t=e.space||e.spaceId,a=e.coords,l=e.alpha):[t,a,l]=o,Object.defineProperty(this,"space",{value:g.get(t),writable:!1,enumerable:!0,configurable:!0}),this.coords=a?a.slice():[0,0,0],this.alpha=l>1||l===void 0?1:l<0?0:l;for(let s=0;s<this.coords.length;s++)this.coords[s]==="NaN"&&(this.coords[s]=NaN);for(let s in this.space.coords)Object.defineProperty(this,s,{get:()=>this.get(s),set:n=>this.set(s,n)})}get spaceId(){return this.space.id}clone(){return new T(this.space,this.coords,this.alpha)}toJSON(){return{spaceId:this.spaceId,coords:this.coords,alpha:this.alpha}}display(...o){let e=Sl(this,...o);return e.color=new T(e.color),e}static get(o,...e){return o instanceof T?o:new T(o,...e)}static defineFunction(o,e,t=e){let{instance:a=!0,returns:l}=t,s=function(...n){let i=e(...n);if(l==="color")i=T.get(i);else if(l==="function<color>"){let c=i;i=function(...u){let h=c(...u);return T.get(h)},Object.assign(i,c)}else l==="array<color>"&&(i=i.map(c=>T.get(c)));return i};o in T||(T[o]=s),a&&(T.prototype[o]=function(...n){return s(this,...n)})}static defineFunctions(o){for(let e in o)T.defineFunction(e,o[e],o[e])}static extend(o){if(o.register)o.register(T);else for(let e in o)T.defineFunction(e,o[e])}};_.defineFunctions({get:X,getAll:qo,set:no,setAll:je,to:M,equals:_l,inGamut:yo,toGamut:fo,distance:St,toString:Oo});Object.assign(_,{util:Sa,hooks:go,WHITES:D,Space:g,spaces:g.registry,parse:Mt,defaults:G});for(let r of Object.keys(at))g.register(at[r]);for(let r in g.registry)Ie(r,g.registry[r]);go.add("colorspace-init-end",r=>{var o;Ie(r.id,r),(o=r.aliases)==null||o.forEach(e=>{Ie(e,r)})});function Ie(r,o){let e=r.replace(/-/g,"_");Object.defineProperty(_.prototype,e,{get(){let t=this.getAll(r);return typeof Proxy>"u"?t:new Proxy(t,{has:(a,l)=>{try{return g.resolveCoord([o,l]),!0}catch{}return Reflect.has(a,l)},get:(a,l,s)=>{if(l&&typeof l!="symbol"&&!(l in a)){let{index:n}=g.resolveCoord([o,l]);if(n>=0)return a[n]}return Reflect.get(a,l,s)},set:(a,l,s,n)=>{if(l&&typeof l!="symbol"&&!(l in a)||l>=0){let{index:i}=g.resolveCoord([o,l]);if(i>=0)return a[i]=s,this.setAll(r,a),!0}return Reflect.set(a,l,s,n)}})},set(t){this.setAll(r,t)},configurable:!0,enumerable:!0})}_.extend(Ao);_.extend({deltaE:Io});Object.assign(_,{deltaEMethods:Ao});_.extend(Ql);_.extend({contrast:Gl});_.extend(Kl);_.extend(Al);_.extend(es);_.extend(ae);class ea{constructor(o,{manageAs:e}={}){this._color=new _("hsv",[0,100,100],1),this.host=o,this.manageAs=e}get color(){return this._color}validateColorString(o){var e,t,a,l;const s={spaceId:null,coords:[0,0,0],isValid:!1,alpha:1},n=[/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d*\.?\d+)\s*\)/i,/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,/^rgba\s+(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s+(0|0?\.\d+|1)\s*$/i,/^rgb\s+(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s*$/i,/^rgba\(\s*(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s+(\d*\.?\d+)\s*\)$/i,/^rgb\(\s*(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s*\)$/i,/rgb\(\s*(100|[0-9]{1,2}%)\s*,\s*(100|[0-9]{1,2}%)\s*,\s*(100|[0-9]{1,2}%)\s*\)/i,/rgba\(\s*(100|[0-9]{1,2})%\s*,\s*(100|[0-9]{1,2})%\s*,\s*(100|[0-9]{1,2})%\s*,\s*(\d*\.?\d+)\s*\)/i],i=[/hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(\d*\.?\d+)\s*\)/i,/hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*\)/i,/^hsla\s+(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s+(\d*\.?\d+)\s*$/i,/^hsl\s+(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s*$/i,/^hsla\(\s*(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s+(\d*\.?\d+)\s*\)$/i,/^hsl\(\s*(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s*\)$/i],c=[/hsva\(\s*(\d{1,3})\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(\d*\.?\d+)\s*\)/i,/hsv\(\s*(\d{1,3})\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*\)/i,/^hsva\s+(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s+(\d*\.?\d+)\s*$/i,/^hsv\s+(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s*$/i,/^hsva\(\s*(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s+(\d*\.?\d+)\s*\)$/i,/^hsv\(\s*(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s*\)$/i],u=[/^#([A-Fa-f0-9]{6})(?:\s*([01](?:\.\d+)?))?$/,/^#([A-Fa-f0-9]{3})(?:\s*([01](?:\.\d+)?))?$/],h=(e=n.find(p=>p.test(o)))==null?void 0:e.exec(o),m=(t=i.find(p=>p.test(o)))==null?void 0:t.exec(o),f=(a=c.find(p=>p.test(o)))==null?void 0:a.exec(o),b=(l=u.find(p=>p.test(o)))==null?void 0:l.exec(o);if(h){const[,p,z,w,y]=h.filter(E=>typeof E=="string"),C=y===void 0?1:Number(y),x=E=>E.includes("%")?Number(E.replace("%",""))/100:Number(E)/255,k=x(p),S=x(z),F=x(w);s.spaceId="srgb",s.coords=[k,S,F],s.alpha=C,s.isValid=k>=0&&k<=1&&S>=0&&S<=1&&F>=0&&F<=1&&C>=0&&C<=1}else if(m){const[,p,z,w,y]=m,C=[p,z,w,y===void 0?"1":y].map(E=>Number(E.replaceAll(/[^\d.]/g,""))),[x,k,S,F]=C;s.spaceId="hsl",s.coords=[x,k,S],s.alpha=F,s.isValid=x>=0&&x<=360&&k>=0&&k<=100&&S>=0&&S<=100&&F>=0&&F<=1}else if(f){const[,p,z,w,y]=f,C=[p,z,w,y===void 0?"1":y].map(E=>Number(E.replaceAll(/[^\d.]/g,""))),[x,k,S,F]=C;s.spaceId="hsv",s.coords=[x,k,S],s.alpha=F,s.isValid=x>=0&&x<=360&&k>=0&&k<=100&&S>=0&&S<=100&&F>=0&&F<=1}else if(b){const[,p,z]=b,w=S=>(S.length===1&&(S=S+S),Number.parseInt(S,16)/255);let y,C,x;p.length===3?(y=w(p.slice(0,1)),C=w(p.slice(1,2)),x=w(p.slice(2,3))):(y=w(p.slice(0,2)),C=w(p.slice(2,4)),x=w(p.slice(4,6)));const k=z?Number(z):1;s.spaceId="srgb",s.coords=[y,C,x],s.alpha=k,s.isValid=y>=0&&y<=1&&C>=0&&C<=1&&x>=0&&x<=1&&k>=0&&k<=1}return s}get colorOrigin(){return this._colorOrigin}set colorOrigin(o){this._colorOrigin=o}set color(o){this._colorOrigin=o;let e;if(typeof o=="string"){const t=this.validateColorString(o);if(t.isValid){const[a,l,s]=t.coords;e=new _(`${t.spaceId}`,[a,l,s],t.alpha)}else try{_.parse(o)}catch{try{e=new _(`#${o}`)}catch{return}}}else if(o instanceof _)e=o;else if(!Array.isArray(o)){const{h:t,s:a,l,v:s,r:n,g:i,b:c,a:u}=o;if(t!==void 0&&a!==void 0){const h=l??s;e=new _(l===void 0?"hsv":"hsl",[Number.parseFloat(t),typeof a=="string"?Number.parseFloat(a):a*100,typeof h=="string"?Number.parseFloat(h):h*100],Number.parseFloat(u||"1"))}else n!==void 0&&i!==void 0&&c!==void 0&&(e=new _("srgb",[Number.parseFloat(n)/255,Number.parseFloat(i)/255,Number.parseFloat(c)/255],Number.parseFloat(u||"1")))}e||(e=new _(o)),this._color=this.manageAs?e.to(this.manageAs):e,this.host.requestUpdate()}get colorValue(){let o;if(typeof this._colorOrigin=="string")switch(this._colorOrigin.startsWith("#")?o="hex string":this._colorOrigin.startsWith("rgb")?o="rgb":this._colorOrigin.startsWith("hsl")?o="hsl":this._colorOrigin.startsWith("hsv")?o="hsv":o="hex",o){case"hsv":{const e=this._colorOrigin[3]==="a",{h:t,s:a,v:l}=this._color.to("hsv").hsv,s=this._color.alpha;return`hsv${e?"a":""}(${Math.round(t)}, ${Math.round(a)}%, ${Math.round(l)}%${e?`, ${s}`:""})`}case"hsl":{const e=this._colorOrigin[3]==="a",{h:t,s:a,l}=this._color.to("hsl").hsl,s=this._color.alpha;return`hsl${e?"a":""}(${Math.round(t)}, ${Math.round(a)}%, ${Math.round(l)}%${e?`, ${s}`:""})`}case"hex string":{const{r:e,g:t,b:a}=this._color.to("srgb").srgb,l=this._colorOrigin.length===5||this._colorOrigin.length===9,s=this._color.alpha,n=Math.round(e*255).toString(16),i=Math.round(t*255).toString(16),c=Math.round(a*255).toString(16),u=Math.round(s*255).toString(16);return`#${n.padStart(2,"0")}${i.padStart(2,"0")}${c.padStart(2,"0")}${l?u.padStart(2,"0"):""}`}case"hex":{const{r:e,g:t,b:a}=this._color.to("srgb").srgb,l=this._colorOrigin.length===4||this._colorOrigin.length===8,s=this._color.alpha,n=Math.round(e*255).toString(16),i=Math.round(t*255).toString(16),c=Math.round(a*255).toString(16),u=Math.round(s*255).toString(16);return`${n.padStart(2,"0")}${i.padStart(2,"0")}${c.padStart(2,"0")}${l?u.padStart(2,"0"):""}`}default:{const{r:e,g:t,b:a}=this._color.to("srgb").srgb,l=this._colorOrigin[3]==="a",s=this._color.alpha;return this._colorOrigin.search("%")>-1?`rgb${l?"a":""}(${Math.round(e*100)}%, ${Math.round(t*100)}%, ${Math.round(a*100)}%${l?`,${Math.round(s*100)}%`:""})`:`rgb${l?"a":""}(${Math.round(e*255)}, ${Math.round(t*255)}, ${Math.round(a*255)}${l?`, ${s}`:""})`}}if(this._colorOrigin)try{({spaceId:o}=new _(this._colorOrigin))}catch{const{h:e,s:t,l:a,v:l,r:s,g:n,b:i}=this._colorOrigin;e!==void 0&&t!==void 0&&a!==void 0?o="hsl":e!==void 0&&t!==void 0&&l!==void 0?o="hsv":s!==void 0&&n!==void 0&&i!==void 0&&(o="srgb")}else({spaceId:o}=this.color);switch(o){case"hsv":{const{h:e,s:t,v:a}=this._color.to("hsv").hsv;return{h:e,s:t/100,v:a/100,a:this._color.alpha}}case"hsl":{const{h:e,s:t,l:a}=this._color.to("hsl").hsl;return{h:e,s:t/100,l:a/100,a:this._color.alpha}}case"srgb":{const{r:e,g:t,b:a}=this._color.to("srgb").srgb;return this._colorOrigin&&typeof this._colorOrigin.r=="string"&&this._colorOrigin.r.search("%")?{r:`${Math.round(e*255)}%`,g:`${Math.round(t*255)}%`,b:`${Math.round(a*255)}%`,a:this._color.alpha}:{r:Math.round(e*255),g:Math.round(t*255),b:Math.round(a*255),a:this._color.alpha}}}return this._color}get hue(){return Number(this._color.to("hsl").hsl.h)}set hue(o){this._color.set("h",o),this.host.requestUpdate()}getColor(o){if(typeof o=="string"&&!["srgb","hsva","hsv","hsl","hsla"].includes(o))throw new Error("not a valid format");return this._color.to(o)}getHslString(){return this._color.to("hsl").toString()}savePreviousColor(){this._previousColor=this._color.clone()}restorePreviousColor(){this._color=this._previousColor}}/*! * Lucero - The design system for Luzmo.
|
113
|
-
*
|
114
|
-
* Copyright © 2025 Luzmo
|
115
|
-
* All rights reserved.
|
116
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
117
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
118
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
119
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
120
|
-
*
|
121
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
122
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
123
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
124
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
125
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
126
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
127
|
-
* SOFTWARE.
|
128
|
-
* */const ks=()=>{if(typeof document<"u"&&!document.querySelector("style[data-luzmo-vars]")){const r=document.createElement("style");r.setAttribute("data-luzmo-vars",""),r.textContent='html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}',document.head.appendChild(r)}};ks();const Ms="@media (forced-colors: active){:host{--highcontrast-color-area-border-color-disabled: GrayText;--highcontrast-color-area-border-color: Canvas;--highcontrast-color-area-fill-color-disabled: Canvas}.gradient,:host([disabled]){forced-color-adjust:none}}:host{cursor:default;-webkit-user-select:none;user-select:none;min-inline-size:var(--luzmo-color-area-min-width, 64px);min-block-size:var(--luzmo-color-area-min-height, 64px);inline-size:var(--luzmo-color-area-width, 192px);block-size:var(--luzmo-color-area-height, 192px);box-sizing:border-box;border-radius:var(--luzmo-color-area-border-radius, var(--luzmo-border-radius-s));border:var(--luzmo-color-area-border-width, var(--luzmo-border-width)) solid var(--highcontrast-color-area-border-color, var(--luzmo-color-area-border-color, var(--luzmo-border-color)));display:inline-block;position:relative}:host([focused]){z-index:1}:host([disabled]){pointer-events:none;background:var(--highcontrast-color-area-fill-color-disabled, var(--luzmo-color-area-disabled-background-color, var(--luzmo-dimmed-color)));border:var(--luzmo-color-area-border-width, var(--luzmo-border-width)) solid var(--highcontrast-color-area-border-color-disabled)}:host([disabled]) .gradient{display:none}.handle{transform:translate(calc(var(--luzmo-color-area-width, 192px) - var(--luzmo-border-width)));inset-block-start:0}.handle:dir(rtl),:host([dir=rtl]) .handle{inset-inline-end:0}.gradient{inline-size:100%;block-size:100%;border-radius:var(--luzmo-color-area-border-radius, var(--luzmo-border-radius-s))}.slider{opacity:0;inline-size:100%;block-size:100%;z-index:0;pointer-events:none;margin:0;position:absolute;inset-block-start:0;inset-inline-start:0}:host{touch-action:none}:host:before{pointer-events:none}.gradient{overflow:hidden}.handle{transform:translate(var(--luzmo-color-area-default-width))}::slotted(*){width:100%;height:100%}:host([dir=rtl]) .gradient{transform:scaleX(-1)}.slider[orient=vertical]{-webkit-appearance:slider-vertical;-moz-appearance:slider-vertical;appearance:slider-vertical}.slider:focus{z-index:1}.fieldset{border:0;margin:0;padding:0}";var $s=Object.defineProperty,Ss=Object.getOwnPropertyDescriptor,L=(r,o,e,t)=>{for(var a=t>1?void 0:t?Ss(o,e):o,l=r.length-1,s;l>=0;l--)(s=r[l])&&(a=(t?s(o,e,a):s(a))||a);return t&&a&&$s(o,e,a),a};let O=class extends d.It{constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.labelX="saturation",this.labelY="luminosity",this.isLTR=!0,this.languageResolver=new le.l(this),this.colorController=new ea(this,{manageAs:"hsv"}),this.activeAxis="x",this.step=.01,this.altered=0,this.activeKeys=new Set,this._valueChanged=!1,this._pointerDown=!1}static get styles(){return[d.at(Ms)]}get hue(){return this.colorController.hue}set hue(o){this.colorController.hue=o}get value(){return this.colorController.colorValue}get color(){return this.colorController.colorValue}set color(o){this.colorController.color=o}get x(){return this.colorController.color.hsv.s/100}set x(o){if(o===this.x)return;const e=this.x;this.inputX?(this.inputX.value=o.toString(),this.colorController.color.set("s",this.inputX.valueAsNumber*100)):this.colorController.color.set("s",o*100),this.requestUpdate("x",e)}get y(){return this.colorController.color.hsv.v/100}set y(o){if(o===this.y)return;const e=this.y;this.inputY&&(this.inputY.value=o.toString(),this.colorController.color.set("v",this.inputY.valueAsNumber*100)),this.requestUpdate("y",e)}focus(o={}){super.focus(o),this.forwardFocus()}forwardFocus(){this.activeAxis==="x"?this.inputX.focus():this.inputY.focus()}handleFocus(){this.focused=!0,this._valueChanged=!1}handleBlur(){this._pointerDown||(this.altered=0,this.focused=!1,this._valueChanged=!1)}handleKeydown(o){const{code:e}=o;this.focused=!0,this.altered=[o.shiftKey,o.ctrlKey,o.altKey].filter(t=>!!t).length,(e.search("Arrow")===0||e.search("Page")===0||e.search("Home")===0||e.search("End")===0)&&(o.preventDefault(),this.activeKeys.add(e),this.handleKeypress())}handleKeypress(){let o=0,e=0;const t=Math.max(this.step,this.altered*5*this.step);this.activeKeys.forEach(a=>{switch(a){case"ArrowUp":{e=t;break}case"ArrowDown":{e=t*-1;break}case"ArrowLeft":{o=this.step*(this.isLTR?-1:1);break}case"ArrowRight":{o=this.step*(this.isLTR?1:-1);break}case"PageUp":{e=t*10;break}case"PageDown":{e=t*-10;break}case"Home":{o=t*(this.isLTR?-10:10);break}case"End":{o=t*(this.isLTR?10:-10);break}}}),o!==0?(this.activeAxis="x",this.inputX.focus()):e!==0&&(this.activeAxis="y",this.inputY.focus()),this.x=Math.min(1,Math.max(this.x+o,0)),this.y=Math.min(1,Math.max(this.y+e,0)),this.colorController.savePreviousColor(),(o!==0||e!==0)&&(this._valueChanged=!0,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||this.colorController.restorePreviousColor())}handleKeyup(o){o.preventDefault();const{code:e}=o;this.activeKeys.delete(e)}handleInput(o){const{valueAsNumber:e,name:t}=o.target;this[t]=e}handleChange(o){this.handleInput(o),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))}handlePointerdown(o){if(o.button!==0){o.preventDefault();return}this._pointerDown=!0,this.colorController.savePreviousColor(),this.boundingClientRect=this.getBoundingClientRect(),o.target.setPointerCapture(o.pointerId),o.pointerType==="mouse"&&(this.focused=!0)}handlePointermove(o){const[e,t]=this.calculateHandlePosition(o);this._valueChanged=!1,this.x=e,this.y=t,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0,cancelable:!0}))}handlePointerup(o){o.preventDefault(),this._pointerDown=!1,o.target.releasePointerCapture(o.pointerId);const e=this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}));this.inputX.focus(),o.pointerType==="mouse"&&(this.focused=!1),e||this.colorController.restorePreviousColor()}calculateHandlePosition(o){if(!this.boundingClientRect)return[this.x,this.y];const e=this.boundingClientRect,t=e.left,a=e.top,l=o.clientX,s=o.clientY,n=e.width,i=e.height,c=Math.max(0,Math.min(1,(l-t)/n)),u=Math.max(0,Math.min(1,(s-a)/i));return[this.isLTR?c:1-c,1-u]}handleAreaPointerdown(o){o.button===0&&(o.stopPropagation(),o.preventDefault(),this.handle.dispatchEvent(new PointerEvent("pointerdown",o)),this.handlePointermove(o))}render(){const{width:o=0,height:e=0}=this.boundingClientRect||{},t=er.w()||er.a(),a="Color Picker",l=P.m(t?void 0:"2d slider"),s=this.labelX,n=this.labelY,i=new Intl.NumberFormat(this.languageResolver.language,{style:"percent",unitDisplay:"narrow"}).format(this.x),c=new Intl.NumberFormat(this.languageResolver.language,{style:"percent",unitDisplay:"narrow"}).format(this.y),u={background:`linear-gradient(to top, black 0%, hsla(${this.hue}, 100%, 0.01%, 0) 100%),linear-gradient(to right, white 0%, hsla(${this.hue}, 100%, 0.01%, 0) 100%), hsl(${this.hue}, 100%, 50%);`};return d.Rt`
|
129
|
-
<div
|
130
|
-
@pointerdown=${this.handleAreaPointerdown}
|
131
|
-
class="gradient"
|
132
|
-
style="background: ${u.background}"
|
133
|
-
>
|
134
|
-
<slot name="gradient"></slot>
|
135
|
-
</div>
|
136
|
-
|
137
|
-
<luzmo-color-handle
|
138
|
-
tabindex=${P.m(this.focused?void 0:"0")}
|
139
|
-
@focus=${this.forwardFocus}
|
140
|
-
?focused=${this.focused}
|
141
|
-
class="handle"
|
142
|
-
color=${this.colorController.getHslString()}
|
143
|
-
?disabled=${this.disabled}
|
144
|
-
style=${`transform: translate(${(this.isLTR?this.x:1-this.x)*o}px, ${e-this.y*e}px);`}
|
145
|
-
${le.u({start:["pointerdown",this.handlePointerdown],streamInside:["pointermove",this.handlePointermove],end:[["pointerup","pointercancel","pointerleave"],this.handlePointerup]})}
|
146
|
-
></luzmo-color-handle>
|
147
|
-
|
148
|
-
<fieldset
|
149
|
-
class="fieldset"
|
150
|
-
aria-label=${P.m(t?a:void 0)}
|
151
|
-
>
|
152
|
-
<div role="presentation">
|
153
|
-
<input
|
154
|
-
type="range"
|
155
|
-
class="slider"
|
156
|
-
name="x"
|
157
|
-
aria-label=${t?s:`${s} ${a}`}
|
158
|
-
aria-roledescription=${l}
|
159
|
-
aria-orientation="horizontal"
|
160
|
-
aria-valuetext=${t?i:`${i}, ${s}${this._valueChanged?"":`, ${c}, ${n}`}`}
|
161
|
-
min="0"
|
162
|
-
max="1"
|
163
|
-
step=${this.step}
|
164
|
-
tabindex="-1"
|
165
|
-
.value=${String(this.x)}
|
166
|
-
@input=${this.handleInput}
|
167
|
-
@change=${this.handleChange}
|
168
|
-
/>
|
169
|
-
</div>
|
170
|
-
<div role="presentation">
|
171
|
-
<input
|
172
|
-
type="range"
|
173
|
-
class="slider"
|
174
|
-
name="y"
|
175
|
-
aria-label=${t?n:`${n} ${a}`}
|
176
|
-
aria-roledescription=${l}
|
177
|
-
aria-orientation="vertical"
|
178
|
-
aria-valuetext=${t?c:`${c}, ${n}${this._valueChanged?"":`, ${i}, ${s}`}`}
|
179
|
-
orient="vertical"
|
180
|
-
min="0"
|
181
|
-
max="1"
|
182
|
-
step=${this.step}
|
183
|
-
tabindex="-1"
|
184
|
-
.value=${String(this.y)}
|
185
|
-
@input=${this.handleInput}
|
186
|
-
@change=${this.handleChange}
|
187
|
-
/>
|
188
|
-
</div>
|
189
|
-
</fieldset>
|
190
|
-
`}firstUpdated(o){super.firstUpdated(o),this.boundingClientRect=this.getBoundingClientRect(),this.addEventListener("focus",this.handleFocus),this.addEventListener("blur",this.handleBlur),this.addEventListener("keyup",this.handleKeyup),this.addEventListener("keydown",this.handleKeydown)}updated(o){if(super.updated(o),this.x!==this.inputX.valueAsNumber&&this.colorController.color.set("s",this.inputX.valueAsNumber*100),this.y!==this.inputY.valueAsNumber&&this.colorController.color.set("v",(1-this.inputY.valueAsNumber)*100),o.has("focused")&&this.focused){const e=this.inputX.parentElement,t=this.inputY.parentElement;if(!e.shadowRoot&&!t.shadowRoot){e.attachShadow({mode:"open"}),t.attachShadow({mode:"open"});const a='<div tabindex="-1"><slot></slot></div>';e.shadowRoot.innerHTML=a,t.shadowRoot.innerHTML=a}}}connectedCallback(){var o;super.connectedCallback(),!this.observer&&window.ResizeObserver&&(this.observer=new window.ResizeObserver(e=>{for(const t of e)this.boundingClientRect=t.contentRect;this.requestUpdate()})),(o=this.observer)==null||o.observe(this)}disconnectedCallback(){var o;(o=this.observer)==null||o.unobserve(this),super.disconnectedCallback()}};L([d.zt({type:String,reflect:!0})],O.prototype,"dir",2);L([d.zt({type:Boolean,reflect:!0})],O.prototype,"disabled",2);L([d.zt({type:Boolean,reflect:!0})],O.prototype,"focused",2);L([d.zt({type:String,attribute:"label-x"})],O.prototype,"labelX",2);L([d.zt({type:String,attribute:"label-y"})],O.prototype,"labelY",2);L([d.zt({type:Boolean,attribute:"is-ltr"})],O.prototype,"isLTR",2);L([P.d(".handle")],O.prototype,"handle",2);L([d.zt({type:Number})],O.prototype,"hue",1);L([d.zt({type:String})],O.prototype,"value",1);L([d.zt({type:String})],O.prototype,"color",1);L([d.zt({attribute:!1})],O.prototype,"activeAxis",2);L([d.zt({type:Number})],O.prototype,"x",1);L([d.zt({type:Number})],O.prototype,"y",1);L([d.zt({type:Number})],O.prototype,"step",2);L([P.d('[name="x"]')],O.prototype,"inputX",2);L([P.d('[name="y"]')],O.prototype,"inputY",2);customElements.get("luzmo-color-area")||customElements.define("luzmo-color-area",O);/*! * Lucero - The design system for Luzmo.
|
191
|
-
*
|
192
|
-
* Copyright © 2025 Luzmo
|
193
|
-
* All rights reserved.
|
194
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
195
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
196
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
197
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
198
|
-
*
|
199
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
200
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
201
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
202
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
203
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
204
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
205
|
-
* SOFTWARE.
|
206
|
-
* */const _s=()=>{if(typeof document<"u"&&!document.querySelector("style[data-luzmo-vars]")){const r=document.createElement("style");r.setAttribute("data-luzmo-vars",""),r.textContent='html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}',document.head.appendChild(r)}};_s();const Es=":host{position:relative}";var As=Object.defineProperty,Rs=(r,o,e,t)=>{for(var a=void 0,l=r.length-1,s;l>=0;l--)(s=r[l])&&(a=s(o,e,a)||a);return a&&As(o,e,a),a};class ra extends ma.i{constructor(){super(),this.viewColor=!1,this._value="",this.colorController=new ea(this)}static get styles(){return[...super.styles,d.at(Es)]}set value(o){if(o===this.value)return;const e=this._value;this._value=o,this.requestUpdate("value",e)}get value(){return this._value}renderColorHandle(){return this.viewColor&&this.valid?d.Rt`
|
207
|
-
<sp-color-handle
|
208
|
-
size="m"
|
209
|
-
color=${this.colorController.getColor("srgb").toString()}
|
210
|
-
></sp-color-handle>
|
211
|
-
`:d.Rt``}getColorValue(){return this.valid?this.colorController.getColor("srgb").toString():""}render(){return this.viewColor&&Promise.resolve().then(()=>Ca),d.Rt` ${super.render()} ${this.renderColorHandle()} `}checkValidity(){let o=super.checkValidity();return this.value?(this.valid=o=this.colorController.validateColorString(this.value).isValid,this.invalid=!o,this.valid&&(this.colorController.color=this.value)):this.valid=this.invalid=!1,o}}Rs([d.zt({type:Boolean,attribute:"view-color"})],ra.prototype,"viewColor");customElements.get("luzmo-color-field")||customElements.define("luzmo-color-field",ra);/*! * Lucero - The design system for Luzmo.
|
212
|
-
*
|
213
|
-
* Copyright © 2025 Luzmo
|
214
|
-
* All rights reserved.
|
215
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
216
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
217
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
218
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
219
|
-
*
|
220
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
221
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
222
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
223
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
224
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
225
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
226
|
-
* SOFTWARE.
|
227
|
-
* */function I(r,o){Ps(r)&&(r="100%");const e=Bs(r);return r=o===360?r:Math.min(o,Math.max(0,parseFloat(r))),e&&(r=parseInt(String(r*o),10)/100),Math.abs(r-o)<1e-6?1:(o===360?r=(r<0?r%o+o:r%o)/parseFloat(String(o)):r=r%o/parseFloat(String(o)),r)}function oe(r){return Math.min(1,Math.max(0,r))}function Ps(r){return typeof r=="string"&&r.indexOf(".")!==-1&&parseFloat(r)===1}function Bs(r){return typeof r=="string"&&r.indexOf("%")!==-1}function ta(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function ee(r){return Number(r)<=1?`${Number(r)*100}%`:r}function wo(r){return r.length===1?"0"+r:String(r)}function Hs(r,o,e){return{r:I(r,255)*255,g:I(o,255)*255,b:I(e,255)*255}}function lt(r,o,e){r=I(r,255),o=I(o,255),e=I(e,255);const t=Math.max(r,o,e),a=Math.min(r,o,e);let l=0,s=0;const n=(t+a)/2;if(t===a)s=0,l=0;else{const i=t-a;switch(s=n>.5?i/(2-t-a):i/(t+a),t){case r:l=(o-e)/i+(o<e?6:0);break;case o:l=(e-r)/i+2;break;case e:l=(r-o)/i+4;break}l/=6}return{h:l,s,l:n}}function $e(r,o,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(o-r)*(6*e):e<1/2?o:e<2/3?r+(o-r)*(2/3-e)*6:r}function Ns(r,o,e){let t,a,l;if(r=I(r,360),o=I(o,100),e=I(e,100),o===0)a=e,l=e,t=e;else{const s=e<.5?e*(1+o):e+o-e*o,n=2*e-s;t=$e(n,s,r+1/3),a=$e(n,s,r),l=$e(n,s,r-1/3)}return{r:t*255,g:a*255,b:l*255}}function st(r,o,e){r=I(r,255),o=I(o,255),e=I(e,255);const t=Math.max(r,o,e),a=Math.min(r,o,e);let l=0;const s=t,n=t-a,i=t===0?0:n/t;if(t===a)l=0;else{switch(t){case r:l=(o-e)/n+(o<e?6:0);break;case o:l=(e-r)/n+2;break;case e:l=(r-o)/n+4;break}l/=6}return{h:l,s:i,v:s}}function Is(r,o,e){r=I(r,360)*6,o=I(o,100),e=I(e,100);const t=Math.floor(r),a=r-t,l=e*(1-o),s=e*(1-a*o),n=e*(1-(1-a)*o),i=t%6,c=[e,s,l,l,n,e][i],u=[n,e,e,s,l,l][i],h=[l,l,n,e,e,s][i];return{r:c*255,g:u*255,b:h*255}}function nt(r,o,e,t){const a=[wo(Math.round(r).toString(16)),wo(Math.round(o).toString(16)),wo(Math.round(e).toString(16))];return t&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Os(r,o,e,t,a){const l=[wo(Math.round(r).toString(16)),wo(Math.round(o).toString(16)),wo(Math.round(e).toString(16)),wo(Ls(t))];return a&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))&&l[3].startsWith(l[3].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function Fs(r,o,e,t){const a=r/100,l=o/100,s=e/100,n=t/100,i=255*(1-a)*(1-n),c=255*(1-l)*(1-n),u=255*(1-s)*(1-n);return{r:i,g:c,b:u}}function it(r,o,e){let t=1-r/255,a=1-o/255,l=1-e/255,s=Math.min(t,a,l);return s===1?(t=0,a=0,l=0):(t=(t-s)/(1-s)*100,a=(a-s)/(1-s)*100,l=(l-s)/(1-s)*100),s*=100,{c:Math.round(t),m:Math.round(a),y:Math.round(l),k:Math.round(s)}}function Ls(r){return Math.round(parseFloat(r)*255).toString(16)}function ct(r){return U(r)/255}function U(r){return parseInt(r,16)}function Ds(r){return{r:r>>16,g:(r&65280)>>8,b:r&255}}const Oe={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Ts(r){let o={r:0,g:0,b:0},e=1,t=null,a=null,l=null,s=!1,n=!1;return typeof r=="string"&&(r=Ws(r)),typeof r=="object"&&(W(r.r)&&W(r.g)&&W(r.b)?(o=Hs(r.r,r.g,r.b),s=!0,n=String(r.r).substr(-1)==="%"?"prgb":"rgb"):W(r.h)&&W(r.s)&&W(r.v)?(t=ee(r.s),a=ee(r.v),o=Is(r.h,t,a),s=!0,n="hsv"):W(r.h)&&W(r.s)&&W(r.l)?(t=ee(r.s),l=ee(r.l),o=Ns(r.h,t,l),s=!0,n="hsl"):W(r.c)&&W(r.m)&&W(r.y)&&W(r.k)&&(o=Fs(r.c,r.m,r.y,r.k),s=!0,n="cmyk"),Object.prototype.hasOwnProperty.call(r,"a")&&(e=r.a)),e=ta(e),{ok:s,format:r.format||n,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:e}}const js="[-\\+]?\\d+%?",qs="[-\\+]?\\d*\\.\\d+%?",ho="(?:"+qs+")|(?:"+js+")",Se="[\\s|\\(]+("+ho+")[,|\\s]+("+ho+")[,|\\s]+("+ho+")\\s*\\)?",re="[\\s|\\(]+("+ho+")[,|\\s]+("+ho+")[,|\\s]+("+ho+")[,|\\s]+("+ho+")\\s*\\)?",V={CSS_UNIT:new RegExp(ho),rgb:new RegExp("rgb"+Se),rgba:new RegExp("rgba"+re),hsl:new RegExp("hsl"+Se),hsla:new RegExp("hsla"+re),hsv:new RegExp("hsv"+Se),hsva:new RegExp("hsva"+re),cmyk:new RegExp("cmyk"+re),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Ws(r){if(r=r.trim().toLowerCase(),r.length===0)return!1;let o=!1;if(Oe[r])r=Oe[r],o=!0;else if(r==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let e=V.rgb.exec(r);return e?{r:e[1],g:e[2],b:e[3]}:(e=V.rgba.exec(r),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=V.hsl.exec(r),e?{h:e[1],s:e[2],l:e[3]}:(e=V.hsla.exec(r),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=V.hsv.exec(r),e?{h:e[1],s:e[2],v:e[3]}:(e=V.hsva.exec(r),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=V.cmyk.exec(r),e?{c:e[1],m:e[2],y:e[3],k:e[4]}:(e=V.hex8.exec(r),e?{r:U(e[1]),g:U(e[2]),b:U(e[3]),a:ct(e[4]),format:o?"name":"hex8"}:(e=V.hex6.exec(r),e?{r:U(e[1]),g:U(e[2]),b:U(e[3]),format:o?"name":"hex"}:(e=V.hex4.exec(r),e?{r:U(e[1]+e[1]),g:U(e[2]+e[2]),b:U(e[3]+e[3]),a:ct(e[4]+e[4]),format:o?"name":"hex8"}:(e=V.hex3.exec(r),e?{r:U(e[1]+e[1]),g:U(e[2]+e[2]),b:U(e[3]+e[3]),format:o?"name":"hex"}:!1))))))))))}function W(r){return typeof r=="number"?!Number.isNaN(r):V.CSS_UNIT.test(r)}let H=class A{constructor(o="",e={}){if(o instanceof A)return o;typeof o=="number"&&(o=Ds(o)),this.originalInput=o;const t=Ts(o);this.originalInput=o,this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this.roundA=Math.round(100*this.a)/100,this.format=e.format??t.format,this.gradientType=e.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=t.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const o=this.toRgb();return(o.r*299+o.g*587+o.b*114)/1e3}getLuminance(){const o=this.toRgb();let e,t,a;const l=o.r/255,s=o.g/255,n=o.b/255;return l<=.03928?e=l/12.92:e=Math.pow((l+.055)/1.055,2.4),s<=.03928?t=s/12.92:t=Math.pow((s+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),.2126*e+.7152*t+.0722*a}getAlpha(){return this.a}setAlpha(o){return this.a=ta(o),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:o}=this.toHsl();return o===0}toHsv(){const o=st(this.r,this.g,this.b);return{h:o.h*360,s:o.s,v:o.v,a:this.a}}toHsvString(){const o=st(this.r,this.g,this.b),e=Math.round(o.h*360),t=Math.round(o.s*100),a=Math.round(o.v*100);return this.a===1?`hsv(${e}, ${t}%, ${a}%)`:`hsva(${e}, ${t}%, ${a}%, ${this.roundA})`}toHsl(){const o=lt(this.r,this.g,this.b);return{h:o.h*360,s:o.s,l:o.l,a:this.a}}toHslString(){const o=lt(this.r,this.g,this.b),e=Math.round(o.h*360),t=Math.round(o.s*100),a=Math.round(o.l*100);return this.a===1?`hsl(${e}, ${t}%, ${a}%)`:`hsla(${e}, ${t}%, ${a}%, ${this.roundA})`}toHex(o=!1){return nt(this.r,this.g,this.b,o)}toHexString(o=!1){return"#"+this.toHex(o)}toHex8(o=!1){return Os(this.r,this.g,this.b,this.a,o)}toHex8String(o=!1){return"#"+this.toHex8(o)}toHexShortString(o=!1){return this.a===1?this.toHexString(o):this.toHex8String(o)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const o=Math.round(this.r),e=Math.round(this.g),t=Math.round(this.b);return this.a===1?`rgb(${o}, ${e}, ${t})`:`rgba(${o}, ${e}, ${t}, ${this.roundA})`}toPercentageRgb(){const o=e=>`${Math.round(I(e,255)*100)}%`;return{r:o(this.r),g:o(this.g),b:o(this.b),a:this.a}}toPercentageRgbString(){const o=e=>Math.round(I(e,255)*100);return this.a===1?`rgb(${o(this.r)}%, ${o(this.g)}%, ${o(this.b)}%)`:`rgba(${o(this.r)}%, ${o(this.g)}%, ${o(this.b)}%, ${this.roundA})`}toCmyk(){return{...it(this.r,this.g,this.b)}}toCmykString(){const{c:o,m:e,y:t,k:a}=it(this.r,this.g,this.b);return`cmyk(${o}, ${e}, ${t}, ${a})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const o="#"+nt(this.r,this.g,this.b,!1);for(const[e,t]of Object.entries(Oe))if(o===t)return e;return!1}toString(o){const e=!!o;o=o??this.format;let t=!1;const a=this.a<1&&this.a>=0;return!e&&a&&(o.startsWith("hex")||o==="name")?o==="name"&&this.a===0?this.toName():this.toRgbString():(o==="rgb"&&(t=this.toRgbString()),o==="prgb"&&(t=this.toPercentageRgbString()),(o==="hex"||o==="hex6")&&(t=this.toHexString()),o==="hex3"&&(t=this.toHexString(!0)),o==="hex4"&&(t=this.toHex8String(!0)),o==="hex8"&&(t=this.toHex8String()),o==="name"&&(t=this.toName()),o==="hsl"&&(t=this.toHslString()),o==="hsv"&&(t=this.toHsvString()),o==="cmyk"&&(t=this.toCmykString()),t||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new A(this.toString())}lighten(o=10){const e=this.toHsl();return e.l+=o/100,e.l=oe(e.l),new A(e)}brighten(o=10){const e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(o/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(o/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(o/100)))),new A(e)}darken(o=10){const e=this.toHsl();return e.l-=o/100,e.l=oe(e.l),new A(e)}tint(o=10){return this.mix("white",o)}shade(o=10){return this.mix("black",o)}desaturate(o=10){const e=this.toHsl();return e.s-=o/100,e.s=oe(e.s),new A(e)}saturate(o=10){const e=this.toHsl();return e.s+=o/100,e.s=oe(e.s),new A(e)}greyscale(){return this.desaturate(100)}spin(o){const e=this.toHsl(),t=(e.h+o)%360;return e.h=t<0?360+t:t,new A(e)}mix(o,e=50){const t=this.toRgb(),a=new A(o).toRgb(),l=e/100,s={r:(a.r-t.r)*l+t.r,g:(a.g-t.g)*l+t.g,b:(a.b-t.b)*l+t.b,a:(a.a-t.a)*l+t.a};return new A(s)}analogous(o=6,e=30){const t=this.toHsl(),a=360/e,l=[this];for(t.h=(t.h-(a*o>>1)+720)%360;--o;)t.h=(t.h+a)%360,l.push(new A(t));return l}complement(){const o=this.toHsl();return o.h=(o.h+180)%360,new A(o)}monochromatic(o=6){const e=this.toHsv(),{h:t}=e,{s:a}=e;let{v:l}=e;const s=[],n=1/o;for(;o--;)s.push(new A({h:t,s:a,v:l})),l=(l+n)%1;return s}splitcomplement(){const o=this.toHsl(),{h:e}=o;return[this,new A({h:(e+72)%360,s:o.s,l:o.l}),new A({h:(e+216)%360,s:o.s,l:o.l})]}onBackground(o){const e=this.toRgb(),t=new A(o).toRgb(),a=e.a+t.a*(1-e.a);return new A({r:(e.r*e.a+t.r*t.a*(1-e.a))/a,g:(e.g*e.a+t.g*t.a*(1-e.a))/a,b:(e.b*e.a+t.b*t.a*(1-e.a))/a,a})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(o){const e=this.toHsl(),{h:t}=e,a=[this],l=360/o;for(let s=1;s<o;s++)a.push(new A({h:(t+s*l)%360,s:e.s,l:e.l}));return a}equals(o){const e=new A(o);return this.format==="cmyk"||e.format==="cmyk"?this.toCmykString()===e.toCmykString():this.toRgbString()===e.toRgbString()}};const ut=/^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/,ht=/(^hs[v|l]a?\s?\()\d{1,3}\.?\d*?(,?\s?)\d{1,3}/,dt=/(^hs[v|l]a?\()\d{1,3}/,te=(r,o)=>o?r.toHexString():r.toHex();class Us{constructor(o,{applyColorToState:e,extractColorFromState:t,maintains:a}){this.maintains="hue",this._hue=0,this._opacity=1,this.getColorProcesses={rgb:(l,s)=>s?l.toRgbString():l.toRgb(),prgb:(l,s)=>s?l.toPercentageRgbString():l.toPercentageRgb(),hex8:(l,s)=>s?l.toHex8String():l.toHex8(),name:l=>l.toName()||l.toRgbString(),hsl:(l,s)=>{if(this.maintains==="hue"){if(s)return l.toHslString().replace(dt,`$1${this.hue}`);const{s:u,l:h,a:m}=l.toHsl();return{h:this.hue,s:u,l:h,a:m}}if(s)return l.toHslString().replace(ht,`$1${this.hue}$2${this.saturation}`);const{s:n,l:i,a:c}=l.toHsl();return{h:this.hue,s:n,l:i,a:c}},hsv:(l,s)=>{if(this.maintains==="hue"){if(s)return l.toHsvString().replace(dt,`$1${this.hue}`);const{s:u,v:h,a:m}=l.toHsv();return{h:this.hue,s:u,v:h,a:m}}if(s)return l.toHsvString().replace(ht,`$1${this.hue}$2${this.saturation}`);const{s:n,v:i,a:c}=l.toHsv();return{h:this.hue,s:n,v:i,a:c}},hex:te,hex3:te,hex4:te,hex6:te},this._color=new H({h:0,s:1,v:1}),this._previousColor=new H({h:0,s:1,v:1}),this._format={format:"",isString:!1},this.host=o,this.applyColorToState=e,this.extractColorFromState=t,this.maintains=a||this.maintains}setColorProcess(o,e,t,a){this.maintains==="hue"?this.setColorMaintainHue(o,e,t,a):this.maintains==="saturation"&&this.setColorMaintainSaturation(o,e,t,a)}setColorMaintainHue(o,e,t,a){const{h:l,s,v:n,a:i}=this._color.toHsv();let c;if(a&&t.startsWith("hs")){const u=ut.exec(e);if(u!==null){const[,h]=u;c=Number(h)}}else if(!a&&t.startsWith("hs")){const u=o.originalInput;c=Object.values(u)[0]}this.hue=c||l,this.opacity=i??1,this.applyColorToState({h:l,s,v:n,a:i})}setColorMaintainSaturation(o,e,t,a){const{a:l}=this._color.toHsv();if(a&&t.startsWith("hs")){const s=ut.exec(e);if(s!==null){const[,n,i]=s;this.hue=Number(n),this.saturation=Number(i)}}else if(!a&&t.startsWith("hs")){const s=o.originalInput,n=Object.values(s);this.hue=n[0],this.saturation=n[1]}else{const{h:s}=o.toHsv();this.hue=s}this.opacity=l??1,this.applyColorToState(o.toHsv())}applyColorFromState(){this._color=new H(this.extractColorFromState(this))}get hue(){return this._hue}set hue(o){const e=Math.min(360,Math.max(0,o));if(e===this.hue)return;const t=this.hue,{s:a,v:l,a:s}=this._color.toHsv();this._color=new H({h:e,s:a,v:l,a:s}),this._hue=e,this.host.requestUpdate("hue",t)}get opacity(){return this._opacity}set opacity(o){const e=Math.min(1,Math.max(0,o));if(e===this.opacity)return;const t=this.opacity,{h:a,s:l,v:s}=this._color.toHsv();this._color=new H({h:a,s:l,v:s,a:e}),this._opacity=e,this.host.requestUpdate("opacity",t)}get value(){return this.color}get color(){return this.getColorProcesses[this._format.format||"hex"](this._color,this._format.isString)}set color(o){if(o===this.color)return;const e=this._color;this._color=new H(o);const t=this._color.format;let a=typeof o=="string"||o instanceof String;t.startsWith("hex")&&(a=o.startsWith("#")),this._format={format:t,isString:a},this.setColorProcess(this._color,o,t,a),this.host.requestUpdate("color",e)}getColor(o){const e={hsl:"toHsl"};return this._color[e[o]]()}setColor(o){this._color=o;const e=typeof this._color.originalInput=="string"||this._color.originalInput instanceof String;this.setColorProcess(this._color,o,this._color.format,e)}getHslString(){return this._color.toHslString()}savePreviousColor(){this._previousColor=this._color.clone()}restorePreviousColor(){this.setColor(this._previousColor)}}const Xs='.opacity-checkerboard{position:absolute;block-size:100%;inline-size:100%;background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2)}:host{--luzmo-color-slider-gradient-fallback: rgb(255 0 0) 0%, rgb(255 255 0) 17%, rgb(0 255 0) 33%, rgb(0 255 255) 50%, rgb(0 0 255) 67%, rgb(255 0 255) 83%, rgb(255 0 0) 100%;touch-action:none}:host([vertical]) .handle{inset-block-start:unset;inset-block-end:0}:host([vertical]) .slider{-webkit-appearance:slider-vertical;-moz-appearance:slider-vertical;appearance:slider-vertical}:host(:focus){outline:none}.gradient{overflow:hidden}::slotted(*){width:100%;height:100%}@media (forced-colors: active){:host{--highcontrast-color-slider-border-color: CanvasText;--highcontrast-color-slider-border-color-disabled: GrayText;--highcontrast-color-slider-background-color-disabled: Canvas;forced-color-adjust:none}}:host{--luzmo-color-handle-hitarea-border-radius: var( --luzmo-color-slider-handle-hitarea-border-radius, 0px );min-inline-size:var(--luzmo-color-slider-minimum-length, 80px);inline-size:var(--luzmo-color-slider-length, 192px);block-size:var(--luzmo-color-slider-control-track-width, 24px);-webkit-user-select:none;user-select:none;cursor:default;display:block;position:relative}:host([focused]){z-index:2}:host([disabled]){pointer-events:none}:host([disabled]) .gradient{display:none}:host([vertical]){min-block-size:var(--luzmo-color-slider-vertical-minimum-height, var(--luzmo-color-slider-minimum-length, 80px));block-size:var(--luzmo-color-slider-vertical-height, var(--luzmo-color-slider-length, 192px));min-inline-size:0;inline-size:var(--luzmo-color-slider-vertical-control-track-width, var(--luzmo-color-slider-control-track-height, 24px));display:inline-block}:host([vertical]) .handle{inset-inline-start:50%}.handle{inset-block-start:50%;inset-inline-start:0}.checkerboard{--luzmo-color-slider-border-color-local: var( --highcontrast-color-slider-border-color, var(--luzmo-color-slider-border-color, var(--luzmo-border-color)) )}.checkerboard:before{content:"";z-index:1;box-shadow:inset 0 0 0 var(--luzmo-color-slider-border-width, var(--luzmo-border-width)) var(--luzmo-color-slider-border-color-local);border-radius:var(--luzmo-color-slider-border-rounding, var(--luzmo-border-radius-s));position:absolute;top:0;right:0;bottom:0;left:0}:host([disabled]) .checkerboard{--luzmo-color-slider-border-color-local: var( --highcontrast-color-slider-border-color-disabled, var(--luzmo-color-slider-border-color-disabled, var(--luzmo-dimmed-color)) );background:var(--highcontrast-color-slider-background-color-disabled, var(--luzmo-color-slider-background-color-disabled, var(--luzmo-dimmed-color)))}.checkerboard,.gradient{inline-size:100%;block-size:100%;border-radius:var(--luzmo-color-slider-border-rounding, var(--luzmo-border-radius-s))}.gradient:dir(rtl),:host([dir=rtl]) .gradient{transform:scaleX(-1)}.slider{opacity:0;inline-size:100%;block-size:100%;z-index:0;pointer-events:none;margin:0;position:absolute;inset-block-start:0;inset-inline-start:0}';var Ys=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,K=(r,o,e,t)=>{for(var a=t>1?void 0:t?Gs(o,e):o,l=r.length-1,s;l>=0;l--)(s=r[l])&&(a=(t?s(o,e,a):s(a))||a);return t&&a&&Ys(o,e,a),a};let q=class extends Fe.r{constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.label="hue",this.vertical=!1,this.languageResolver=new le.l(this),this.colorController=new Us(this,{applyColorToState:()=>{if(this.mode==="opacity"){const o=new H(this.colorController.color);this.sliderHandlePosition=100*o.getAlpha()}else this.sliderHandlePosition=100*(this.colorController.hue/360)},extractColorFromState:o=>this.mode==="opacity"?{...o.getColor("hsl"),a:this.value}:{...o.getColor("hsl"),h:this.value},maintains:"saturation"}),this.sliderHandlePosition=0,this.step=1,this.isLTR=!0,this._altered=0,this._pointerDown=!1}static get styles(){return[d.at(Xs)]}get value(){return this.mode==="opacity"?this.colorController.opacity:this.colorController.hue}set value(o){this.mode==="opacity"?this.colorController.opacity=o:this.colorController.hue=o}get color(){return this.colorController.color}set color(o){this.colorController.color=o}get altered(){return this._altered}set altered(o){this._altered=o,this.step=Math.max(1,this.altered*10)}get focusElement(){return this.input}handleKeydown(o){const{key:e}=o;this.focused=!0,this.altered=[o.shiftKey,o.ctrlKey,o.altKey].filter(l=>!!l).length;let t=0;switch(e){case"ArrowUp":{t=this.step;break}case"ArrowDown":{t=-this.step;break}case"ArrowLeft":{t=this.step*(this.isLTR?-1:1);break}case"ArrowRight":{t=this.step*(this.isLTR?1:-1);break}default:return}o.preventDefault();const a=100/(this.mode==="opacity"?100:360);this.sliderHandlePosition=Math.min(100,Math.max(0,this.sliderHandlePosition+t*a)),this.value=this.mode==="opacity"?Math.min(1,Math.max(0,this.value+t/100)):Math.min(360,Math.max(0,this.value+t)),this.colorController.applyColorFromState(),t!==0&&(this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleInput(o){const{valueAsNumber:e}=o.target;this.value=e,this.sliderHandlePosition=100*(this.mode==="opacity"?this.value:this.value/360),this.colorController.applyColorFromState()}handleChange(o){this.handleInput(o),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}focus(o={}){super.focus(o),this.forwardFocus()}forwardFocus(){this.input.focus()}handleFocus(){this.focused=!0}handleBlur(){this._pointerDown||(this.altered=0,this.focused=!1)}handlePointerdown(o){if(o.button!==0){o.preventDefault();return}this._pointerDown=!0,this.colorController.savePreviousColor(),this.boundingClientRect=this.getBoundingClientRect(),o.target.setPointerCapture(o.pointerId),o.pointerType==="mouse"&&(this.focused=!0)}handlePointermove(o){this.sliderHandlePosition=this.calculateHandlePosition(o),this.value=(this.mode==="opacity"?1:360)*(this.sliderHandlePosition/100),this.colorController.applyColorFromState(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0,cancelable:!0}))}handlePointerup(o){this._pointerDown=!1,o.target.releasePointerCapture(o.pointerId),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||this.colorController.restorePreviousColor(),this.focus(),o.pointerType==="mouse"&&(this.focused=!1)}calculateHandlePosition(o){if(!this.boundingClientRect)return this.sliderHandlePosition;const e=this.boundingClientRect,t=this.vertical?e.top:e.left,a=this.vertical?o.clientY:o.clientX,l=this.vertical?e.height:e.width,s=Math.max(0,Math.min(1,(a-t)/l));return this.vertical||!this.isLTR?100-100*s:100*s}handleGradientPointerdown(o){o.button===0&&(o.stopPropagation(),o.preventDefault(),this.handle.dispatchEvent(new PointerEvent("pointerdown",o)),this.handlePointermove(o))}get handlePositionStyles(){return`${this.vertical?"inset-block-end":"inset-inline-start"}: ${this.sliderHandlePosition}%`}get getColorSliderStyle(){const o=this.vertical?"top":"right";if(this.mode==="opacity"){const e=new H(this.colorController.color).setAlpha(1).toRgbString();return{background:`linear-gradient(to ${o}, transparent, ${e})`}}return{background:`linear-gradient(to ${o}, var(--luzmo-color-slider-gradient, var(--luzmo-color-slider-gradient-fallback)))`}}render(){return d.Rt`
|
228
|
-
<div
|
229
|
-
class="opacity-checkerboard checkerboard"
|
230
|
-
role="presentation"
|
231
|
-
@pointerdown=${this.handleGradientPointerdown}
|
232
|
-
>
|
233
|
-
<div
|
234
|
-
class="gradient"
|
235
|
-
role="presentation"
|
236
|
-
style=${Le.p(this.getColorSliderStyle)}
|
237
|
-
>
|
238
|
-
<slot name="gradient"></slot>
|
239
|
-
</div>
|
240
|
-
</div>
|
241
|
-
<luzmo-color-handle
|
242
|
-
tabindex=${P.m(this.focused?void 0:"0")}
|
243
|
-
@focus=${this.forwardFocus}
|
244
|
-
?focused=${this.focused}
|
245
|
-
class="handle"
|
246
|
-
color=${this.mode==="opacity"?this.color:"hsl("+this.value+", 100%, 50%)"}
|
247
|
-
?disabled=${this.disabled}
|
248
|
-
style=${this.handlePositionStyles}
|
249
|
-
${le.u({start:["pointerdown",this.handlePointerdown],streamInside:["pointermove",this.handlePointermove],end:[["pointerup","pointercancel","pointerleave"],this.handlePointerup]})}
|
250
|
-
></luzmo-color-handle>
|
251
|
-
<input
|
252
|
-
type="range"
|
253
|
-
class="slider"
|
254
|
-
min="0"
|
255
|
-
max=${this.mode==="opacity"?"100":"360"}
|
256
|
-
aria-orientation=${P.m(this.vertical?"vertical":void 0)}
|
257
|
-
orient=${P.m(this.vertical?"vertical":void 0)}
|
258
|
-
step=${this.step}
|
259
|
-
aria-label=${this.label}
|
260
|
-
.value=${String(this.mode==="opacity"?this.value*100:this.value)}
|
261
|
-
aria-valuetext=${`${new Intl.NumberFormat(this.languageResolver.language,{maximumFractionDigits:0,minimumIntegerDigits:1,style:"unit",unit:this.mode==="opacity"?"percent":"degree",unitDisplay:"narrow"}).format(this.mode==="opacity"?this.value*100:this.value)}`}
|
262
|
-
@input=${this.handleInput}
|
263
|
-
@change=${this.handleChange}
|
264
|
-
@keydown=${this.handleKeydown}
|
265
|
-
/>
|
266
|
-
`}firstUpdated(o){super.firstUpdated(o),this.boundingClientRect=this.getBoundingClientRect(),this.addEventListener("focus",this.handleFocus),this.addEventListener("blur",this.handleBlur)}updated(o){o.has("mode")&&(this.handle.style.insetInlineStart="",this.handle.style.insetBlockEnd="",this.mode==="opacity"&&(this.colorController.color=new H(this.colorController.color).toRgbString(),this.handle.style.insetInlineStart=100*this.colorController.opacity+"%"))}};K([d.zt({type:String,reflect:!0})],q.prototype,"dir",2);K([d.zt({type:String,reflect:!0})],q.prototype,"mode",2);K([d.zt({type:Boolean,reflect:!0})],q.prototype,"disabled",2);K([d.zt({type:Boolean,reflect:!0})],q.prototype,"focused",2);K([P.d(".handle")],q.prototype,"handle",2);K([d.zt({type:String})],q.prototype,"label",2);K([d.zt({type:Boolean,reflect:!0})],q.prototype,"vertical",2);K([d.zt({type:Number})],q.prototype,"value",1);K([d.zt({type:Number,reflect:!0})],q.prototype,"sliderHandlePosition",2);K([d.zt({type:String})],q.prototype,"color",1);K([d.zt({type:Number})],q.prototype,"step",2);K([d.zt({type:Boolean,attribute:"is-ltr"})],q.prototype,"isLTR",2);K([P.d("input")],q.prototype,"input",2);customElements.get("luzmo-color-slider")||customElements.define("luzmo-color-slider",q);/*! * Lucero - The design system for Luzmo.
|
267
|
-
*
|
268
|
-
* Copyright © 2025 Luzmo
|
269
|
-
* All rights reserved.
|
270
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
271
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
272
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
273
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
274
|
-
*
|
275
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
276
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
277
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
278
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
279
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
280
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
281
|
-
* SOFTWARE.
|
282
|
-
* */const Zs=()=>{if(typeof document<"u"&&!document.querySelector("style[data-luzmo-vars]")){const r=document.createElement("style");r.setAttribute("data-luzmo-vars",""),r.textContent='html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}',document.head.appendChild(r)}};Zs();const Ks='@media (forced-colors: active){:host{--highcontrast-swatch-disabled-icon-color: GrayText;--highcontrast-swatch-focus-indicator-color: ButtonText;--highcontrast-swatch-background-color-selected: Background;--highcontrast-swatch-border-color-selected: Highlight;--highcontrast-swatch-border-color: ButtonText;--highcontrast-swatch-fill-foreground-color: ButtonText}.fill{forced-color-adjust:none}:host([disabled]){--highcontrast-swatch-border-color: GrayText}}:host{box-sizing:border-box;inline-size:var(--luzmo-swatch-size, var(--swatch-size));block-size:var(--luzmo-swatch-size, var(--swatch-size));-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:flex;position:relative}.disabled-icon{inline-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size));block-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size))}:host,:host:before{border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius))}:host([selected]){background-color:var(--highcontrast-swatch-background-color-selected, var(--luzmo-swatch-inner-border-color-selected, var(--swatch-inner-border-color-selected)))}:host([selected]) .fill:before{box-shadow:none;border-radius:0}:host([selected]):before{opacity:1}:host .is-image .fill:before{background-color:initial}:host([mixed-value]) .fill{background:none;background:var(--picked-color, transparent)}:host([mixed-value]) .mixed-value-icon{color:var(--swatch-dash-icon-color);display:block}:host([nothing]) .fill{background-color:initial;background-color:var(--picked-color, transparent);background-image:none}:host([nothing]) .fill:after{inline-size:var(--luzmo-swatch-slash-thickness, var(--swatch-slash-thickness));content:"";block-size:200%;background:var(--highcontrast-swatch-fill-foreground-color, var(--luzmo-swatch-slash-icon-color, var(--swatch-slash-icon-color)));position:absolute;transform:rotate(-45deg)}:host([nothing][shape=rectangle]) .fill:after{transform:rotate(-25deg)}:host([disabled]) .disabled-icon{display:block}:host:before{content:"";border-width:var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected));border-style:solid;border-color:var(--highcontrast-swatch-border-color-selected, var(--luzmo-swatch-border-color-selected, var(--swatch-border-color-selected)));opacity:0;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}:host:after{content:"";inset:calc(var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)) * -2);opacity:0;border-width:var(--luzmo-swatch-focus-indicator-width, var(--swatch-focus-indicator-width));border-style:solid;border-color:var(--highcontrast-swatch-focus-indicator-color, var(--luzmo-swatch-focus-indicator-color, var(--swatch-focus-indicator-color)));border-radius:var(--luzmo-swatch-focus-indicator-border-radius, var(--swatch-focus-indicator-border-radius));transition:opacity var(--luzmo-animation-duration) ease-in-out;position:absolute}:host(:focus-visible):after{opacity:1}.fill{inline-size:100%;block-size:100%;box-sizing:border-box;border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius));justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.fill:before{content:"";z-index:0;box-sizing:border-box;box-shadow:inset 0 0 0 var(--luzmo-swatch-border-thickness, var(--swatch-border-thickness)) var(--highcontrast-swatch-border-color, var(--luzmo-swatch-border-color, var(--swatch-border-color)));border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius));position:absolute;top:0;right:0;bottom:0;left:0}:host([border=none]) .fill:before,.fill:before{background-color:initial;background-color:var(--picked-color, transparent)}:host([border=none]) .fill:before{box-shadow:none}.mixed-value-icon{pointer-events:none;color:#0000;color:var(--picked-color, transparent);display:none}.disabled-icon{z-index:1;pointer-events:none;color:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)));stroke:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)));display:none;position:relative}.disabled-icon path:first-child{fill:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)))}.disabled-icon path:last-child{fill:var(--luzmo-swatch-icon-border-color, var(--swatch-icon-border-color))}:host([shape=rectangle]){inline-size:calc(var(--luzmo-swatch-size, var(--swatch-size)) * 2)}:host([rounding=none]),:host([rounding=none]) .fill,:host([rounding=none]) .fill:before,:host([rounding=none][selected]) .fill,:host([rounding=none][selected]) .fill:before,:host([rounding=none]):after,:host([rounding=none]):before{border-radius:0}:host([rounding=full][selected]:not([shape=rectangle])) .fill,:host([rounding=full][selected]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])),:host([rounding=full]:not([shape=rectangle])) .fill,:host([rounding=full]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])):after,:host([rounding=full]:not([shape=rectangle])):before{border-radius:100%}:host([selected]) .fill{width:calc(var(--luzmo-swatch-size, var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)));height:calc(var(--luzmo-swatch-size, var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)))}:host([selected][shape=rectangle]) .fill{width:calc(var(--luzmo-swatch-size, var(--swatch-size)) * 2 - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)))}::slotted([slot=image]){object-fit:contain;inline-size:100%;block-size:100%;transition:width var(--luzmo-animation-duration) ease-in-out,height var(--luzmo-animation-duration) ease-in-out}:host([size=xl]){--swatch-size: var(--luzmo-component-height-xl);--swatch-disabled-icon-size: 24px;--swatch-slash-thickness: 6px}:host([size=l]){--swatch-size: var(--luzmo-component-height-l);--swatch-disabled-icon-size: 20px;--swatch-slash-thickness: 5px}:host([size=s]){--swatch-size: var(--luzmo-component-height-s);--swatch-disabled-icon-size: 16px;--swatch-slash-thickness: 3px}:host([size=xs]){--swatch-size: var(--luzmo-component-height-xs);--swatch-disabled-icon-size: 16px;--swatch-slash-thickness: 2px}:host([size=xxs]){--swatch-size: var(--luzmo-component-height-xxs);--swatch-disabled-icon-size: 14px;--swatch-slash-thickness: 2px}:host{--swatch-size: var(--luzmo-component-height);--swatch-disabled-icon-size: 18px;--swatch-slash-thickness: 4px}:host{--swatch-border-radius: var(--luzmo-border-radius-s);--swatch-focus-indicator-border-radius: var(--luzmo-border-radius-s);--swatch-border-thickness: var(--luzmo-border-width);--swatch-border-thickness-selected: var(--luzmo-border-width);--swatch-focus-indicator-width: var(--luzmo-indicator-width);--swatch-focus-indicator-gap: var(--luzmo-indicator-gap);--swatch-border-color: var(--luzmo-border-color-down);--swatch-icon-border-color: var(--luzmo-border-color);--swatch-border-color-selected: var(--luzmo-border-color-full-down);--swatch-inner-border-color-selected: var(--luzmo-background-color);--swatch-disabled-icon-color: rgb(255, 255, 255);--swatch-dash-icon-color: var(--luzmo-font-color);--swatch-slash-icon-color: var(--luzmo-negative-color);--swatch-focus-indicator-color: var(--luzmo-primary)}.fill:before{background:var(--picked-color, transparent)}:host([border=none]) .fill:before{background:var(--picked-color, transparent)}:host .is-image .fill:before{background:#0000}:host .opacity-checkerboard{background:repeating-conic-gradient(var(--luzmo-swatch-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-swatch-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-swatch-checkerboard-position, left top)/calc(var(--luzmo-swatch-checkerboard-size, 8px) * 2) calc(var(--luzmo-swatch-checkerboard-size, 8px) * 2)}';var Vs=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,eo=(r,o,e,t)=>{for(var a=t>1?void 0:t?Js(o,e):o,l=r.length-1,s;l>=0;l--)(s=r[l])&&(a=(t?s(o,e,a):s(a))||a);return t&&a&&Vs(o,e,a),a};let J=class extends d.m(Fe.r,{validSizes:["xxs","xs","s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.color="",this.label="",this.mixedValue=!1,this.nothing=!1,this.role="button",this.selected=!1,this.readonly=!1,this.renderDisabled=()=>d.Rt`
|
283
|
-
<svg
|
284
|
-
xmlns="http://www.w3.org/2000/svg"
|
285
|
-
class="disabled-icon"
|
286
|
-
viewBox="0 0 20 20"
|
287
|
-
>
|
288
|
-
<path
|
289
|
-
d="M9.889,1a8.889,8.889,0,1,0,8.889,8.889A8.889,8.889,0,0,0,9.889,1Zm6.667,8.889a6.635,6.635,0,0,1-1.233,3.863l-9.3-9.3A6.667,6.667,0,0,1,16.556,9.889Zm-13.333,0A6.636,6.636,0,0,1,4.455,6.026l9.3,9.3A6.667,6.667,0,0,1,3.222,9.889Z"
|
290
|
-
stroke="none"
|
291
|
-
fill="var(--swatch-disabled-icon-color)"
|
292
|
-
/>
|
293
|
-
<path
|
294
|
-
d="M 9.888889312744141 1 C 4.979689598083496 1 1 4.979689598083496 1 9.888889312744141 C 1 14.7980899810791 4.979689598083496 18.77777862548828 9.888889312744141 18.77777862548828 C 14.7980899810791 18.77777862548828 18.77777862548828 14.7980899810791 18.77777862548828 9.888889312744141 C 18.77777862548828 4.979689598083496 14.7980899810791 1 9.888889312744141 1 M 15.32277870178223 13.75166893005371 L 6.02610969543457 4.454998970031738 C 8.059318542480469 3.009572982788086 10.72937774658203 2.820217132568359 12.9462194442749 3.964249610900879 C 15.16304969787598 5.10828971862793 16.55568885803223 7.394259452819824 16.5555591583252 9.888889312744141 C 16.55776977539062 11.27357959747314 16.126708984375 12.62425994873047 15.32277870178223 13.75166893005371 M 9.888258934020996 16.55648612976074 C 8.843273162841797 16.55648612976074 7.794573783874512 16.31111145019531 6.831318855285645 15.8139591217041 C 4.614439010620117 14.66977882385254 3.221879959106445 12.38361930847168 3.222219467163086 9.888889312744141 C 3.220088958740234 8.504219055175781 3.651140213012695 7.153559684753418 4.454998970031738 6.02610969543457 L 13.75166893005371 15.32333946228027 C 12.60186290740967 16.14075088500977 11.24825286865234 16.55648612976074 9.888258934020996 16.55648612976074 M 9.888889312744141 0 C 15.34163951873779 0 19.77777862548828 4.436139106750488 19.77777862548828 9.888889312744141 C 19.77777862548828 15.34163951873779 15.34163951873779 19.77777862548828 9.888889312744141 19.77777862548828 C 4.436139106750488 19.77777862548828 0 15.34163951873779 0 9.888889312744141 C 0 4.436139106750488 4.436139106750488 0 9.888889312744141 0 Z M 15.10232830047607 12.11699867248535 C 15.40205764770508 11.41858959197998 15.55679702758789 10.66494941711426 15.5555591583252 9.89048957824707 C 15.5556697845459 7.759209632873535 14.38009929656982 5.829549789428711 12.48761940002441 4.852889060974121 C 11.68764972686768 4.440059661865234 10.78924942016602 4.22184944152832 9.889529228210449 4.22184944152832 C 9.114802360534668 4.22184944152832 8.360831260681152 4.377038955688477 7.661839485168457 4.676509857177734 L 15.10232830047607 12.11699867248535 Z M 12.11597919464111 15.10181331634521 L 4.675475120544434 7.660861015319824 C 4.375750541687012 8.359296798706055 4.221027374267578 9.112875938415527 4.222219467163086 9.887349128723145 C 4.221929550170898 12.01874923706055 5.397418975830078 13.94855880737305 7.289958953857422 14.92533874511719 C 8.08997917175293 15.3382396697998 8.988459587097168 15.55648994445801 9.888258934020996 15.55648994445801 C 10.66298007965088 15.55648994445801 11.41698551177979 15.40128421783447 12.11597919464111 15.10181331634521 Z"
|
295
|
-
stroke="none"
|
296
|
-
fill="var(--swatch-disabled-icon-stroke-color)"
|
297
|
-
/>
|
298
|
-
</svg>
|
299
|
-
`,this.renderMixedValue=()=>So.D(So.g)}static get styles(){return[d.at(Ks)]}get value(){return this._value||this.color||this.label}set value(o){if(o===this._value)return;const e=this.value;this._value=o,this.requestUpdate("value",e)}get focusElement(){return this}toggle(o){this.readonly||(this.selected=o??!this.selected)}handleClick(){this.disabled||this.mixedValue||(this.toggle(),this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0}))||this.toggle())}handleKeydown(o){const{code:e}=o;switch(e){case"Space":{o.preventDefault(),this.addEventListener("keyup",this.handleKeyup);break}}}handleKeypress(o){const{code:e}=o;switch(e){case"Enter":case"NumpadEnter":{this.click();break}}}handleKeyup(o){const{code:e}=o;switch(e){case"Space":{this.removeEventListener("keyup",this.handleKeyup),this.click();break}}}render(){return d.Rt`
|
300
|
-
<div
|
301
|
-
class="opacity-checkerboard fill"
|
302
|
-
style=${P.m(this.color?`--picked-color: ${this.color}`:void 0)}
|
303
|
-
>
|
304
|
-
<slot name="image"></slot>
|
305
|
-
${rr.o(this.disabled,this.renderDisabled)}
|
306
|
-
${rr.o(this.mixedValue,this.renderMixedValue)}
|
307
|
-
</div>
|
308
|
-
`}willUpdate(o){var e;if(this.getAttribute("role")||this.setAttribute("role","button"),(o.has("selected")||o.has("role"))&&!this.readonly){const t=this.role==="button"?"aria-pressed":"aria-checked",a=this.role==="button"?"aria-checked":"aria-pressed";o.has("role")&&this.removeAttribute(a),this.setAttribute(t,this.selected?"true":"false")}(o.has("label")||o.has("color")||o.has("mixedValue"))&&(this.label!==this.color&&(e=this.label)!=null&&e.length?this.setAttribute("aria-label",this.label):this.color?this.setAttribute("aria-label",this.color):this.mixedValue?this.setAttribute("aria-label","Mixed"):this.removeAttribute("aria-label"))}firstUpdated(o){super.firstUpdated(o),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keypress",this.handleKeypress),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}};eo([d.zt({reflect:!0})],J.prototype,"border",2);eo([d.zt()],J.prototype,"color",2);eo([d.zt()],J.prototype,"label",2);eo([d.zt({type:Boolean,reflect:!0,attribute:"mixed-value"})],J.prototype,"mixedValue",2);eo([d.zt({type:Boolean,reflect:!0})],J.prototype,"nothing",2);eo([d.zt({reflect:!0})],J.prototype,"role",2);eo([d.zt({reflect:!0})],J.prototype,"rounding",2);eo([d.zt({type:Boolean,reflect:!0})],J.prototype,"selected",2);eo([d.zt({type:Boolean,reflect:!0})],J.prototype,"readonly",2);eo([d.zt({reflect:!0})],J.prototype,"shape",2);eo([d.zt()],J.prototype,"value",1);const Qs=":host{justify-content:flex-start;align-items:flex-start;gap:var(--luzmo-swatch-group-spacing-regular, var(--swatch-group-spacing-regular));flex-flow:wrap;display:inline-flex}:host([density=compact]){gap:var(--luzmo-swatch-group-spacing-compact, var(--swatch-group-spacing-compact))}:host([density=spacious]){gap:var(--luzmo-swatch-group-spacing-spacious, var(--swatch-group-spacing-spacious))}:host{--swatch-group-spacing-compact: 2px;--swatch-group-spacing-regular: 4px;--swatch-group-spacing-spacious: 8px}";var on=Object.defineProperty,en=Object.getOwnPropertyDescriptor,xo=(r,o,e,t)=>{for(var a=t>1?void 0:t?en(o,e):o,l=r.length-1,s;l>=0;l--)(s=r[l])&&(a=(t?s(o,e,a):s(a))||a);return t&&a&&on(o,e,a),a};class zo extends d.m(d.It,{validSizes:["xs","s","m","l"],noDefaultSize:!0}){constructor(){super(),this._selected=[],this.selectedSet=new Set,this.rovingTabindexController=new ga.m(this,{focusInIndex:o=>{let e=-1;const t=o.findIndex((a,l)=>(!o[e]&&!a.disabled&&(e=l),a.selected&&!a.disabled));return o[t]?t:e},elements:()=>this.swatches,isFocusableElement:o=>!o.disabled}),this.manageChange=async()=>{const o=new Set;this.selectedSet=new Set(this.selected),await Promise.all(this.swatches.map(e=>e.updateComplete)),this.swatches.forEach(e=>{o.add(e.value),e.selected&&this.selectedSet.add(e.value)}),this.selectedSet.forEach(e=>{o.has(e)||this.selectedSet.delete(e)}),this._selected=[...this.selectedSet],this.rovingTabindexController.clearElementCache()},new pa.a(this,{config:{attributes:!0,childList:!0,subtree:!0},callback:()=>{this.manageChange()}})}static get styles(){return[d.at(Qs)]}get selected(){return this._selected}set selected(o){if(o===this.selected)return;const e=this.selected;this._selected=o,this.requestUpdate("selected",e)}focus(o){this.rovingTabindexController.focus(o)}handleChange(o){o.stopPropagation();const e=this.selected;if(!this.selects){o.preventDefault();return}if(this.selects==="single"){const{target:t}=o;if(t.tabIndex=0,t.selected=!0,this.selectedSet.has(t.value))return;this.selectedSet.clear(),this.selectedSet.add(t.value),this.rovingTabindexController.elements.forEach(a=>{a!==t&&(a.selected=!1)})}else if(this.selects==="multiple"){const{target:t}=o;t.selected?this.selectedSet.add(t.value):this.selectedSet.delete(t.value)}this._selected=[...this.selectedSet],this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0}))||(this._selected=e,o.preventDefault())}getPassthroughSwatchActions(o){const e={};o.has("selects")&&(this.selects||o.get("selects")!==void 0)&&(e.selects=this.selects),o.has("border")&&(this.border||o.get("border")!==void 0)&&(e.border=this.border),o.has("rounding")&&(this.rounding||o.get("rounding")!==void 0)&&(e.rounding=this.rounding),o.has("size")&&(this.size!=="m"||o.get("size")!==void 0)&&(e.size=this.size),o.has("shape")&&(this.shape||o.get("shape")!==void 0)&&(e.shape=this.shape);const t=[];return Object.keys(e).length>0&&t.push(a=>{"border"in e&&(a.border=e.border),"rounding"in e&&(a.rounding=e.rounding),"shape"in e&&(a.shape=e.shape),"size"in e&&(a.size=e.size)}),t}getSelectionSwatchActions(o){const e=[];if(!o.has("selects"))return e;this.selects?this.setAttribute("role",this.selects==="single"?"radiogroup":"group"):this.removeAttribute("role");const t={single:"radio",multiple:"checkbox"},a=this.selects?t[this.selects]:"button";return e.push(l=>{l.setAttribute("role",a)}),e}render(){return d.Rt`
|
309
|
-
<slot
|
310
|
-
@change=${this.handleChange}
|
311
|
-
@slotchange=${this.manageChange}
|
312
|
-
></slot>
|
313
|
-
`}willUpdate(o){const e=[...this.getPassthroughSwatchActions(o),...this.getSelectionSwatchActions(o)];let t=new Set(this.selected);const a=new Set;o.has("selected")&&e.push(s=>{a.add(s.value),s.selected=!!(t.has(s.value)||!this.hasUpdated&&s.selected)});const l=()=>{t=new Set(this.selected),this.swatches.forEach(s=>{e.forEach(n=>{n(s)})}),o.has("selected")&&(this._selected=[...t.values()].filter(s=>a.has(s)))};this.hasUpdated?l():this.renderRoot.addEventListener("slotchange",()=>{requestAnimationFrame(l)},{once:!0})}}xo([d.zt({reflect:!0})],zo.prototype,"border",2);xo([d.zt({reflect:!0})],zo.prototype,"density",2);xo([d.zt({reflect:!0})],zo.prototype,"rounding",2);xo([d.zt({type:Array})],zo.prototype,"selected",1);xo([d.zt()],zo.prototype,"selects",2);xo([d.zt({reflect:!0})],zo.prototype,"shape",2);xo([Le.d({flatten:!0})],zo.prototype,"swatches",2);customElements.get("luzmo-swatch")||customElements.define("luzmo-swatch",J);customElements.get("luzmo-swatch-group")||customElements.define("luzmo-swatch-group",zo);/*! * Lucero - The design system for Luzmo.
|
314
|
-
*
|
315
|
-
* Copyright © 2025 Luzmo
|
316
|
-
* All rights reserved.
|
317
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
318
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
319
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
320
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
321
|
-
*
|
322
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
323
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
324
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
325
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
326
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
327
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
328
|
-
* SOFTWARE.
|
329
|
-
* */const rn=()=>{if(typeof document<"u"&&!document.querySelector("style[data-luzmo-vars]")){const r=document.createElement("style");r.setAttribute("data-luzmo-vars",""),r.textContent='html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}',document.head.appendChild(r)}};rn();const tn='@charset "UTF-8";:host{width:var(--luzmo-color-menu-width, var(--color-menu-width))}.hue-opacity-text-swatches-container{display:flex;gap:var(--luzmo-color-menu-color-controls-vertical-gap, var(--color-menu-color-controls-vertical-gap));flex-direction:column;padding:var(--luzmo-color-menu-hue-opacity-text-swatches-vertical-padding, var(--color-menu-hue-opacity-text-swatches-vertical-padding)) var(--luzmo-color-menu-hue-opacity-text-swatches-horizontal-padding, var(--color-menu-hue-opacity-text-swatches-horizontal-padding))}.swatch-sliders-container{display:flex;gap:var(--luzmo-color-menu-swatch-to-sliders-space, var(--color-menu-swatch-to-sliders-space))}.swatch-example-container{display:flex;align-items:center}.field-container{display:flex;align-items:center;gap:var(--luzmo-color-menu-format-field-to-format-space, var(--color-menu-format-field-to-format-space))}.format-container{text-transform:uppercase;position:relative;background:none;border:none;outline:none;height:var(--luzmo-color-menu-format-height, var(--color-menu-format-height));cursor:pointer;font-size:var(--luzmo-color-menu-format-font-size, var(--color-menu-format-font-size));display:flex;align-items:center;color:var(--luzmo-color-menu-format-font-color, var(--color-menu-format-font-color));gap:var(--luzmo-color-menu-format-name-to-icon, var(--color-menu-format-name-to-icon-space));padding:0 var(--luzmo-color-menu-format-horizontal-padding, var(--color-menu-format-horizontal-padding))}.format-container:hover{color:var(--luzmo-color-menu-format-font-color-hover, var(--color-menu-format-font-color-hover))}.format-container:focus-visible{outline:none}.format-container:focus-visible:after{content:"";width:100%;height:100%;position:absolute;box-sizing:border-box;left:0;top:0;border:var(--luzmo-color-menu-format-indicator-width, var(--luzmo-indicator-width)) solid var(--luzmo-color-menu-format-indicator-color, var(--luzmo-indicator-color));border-radius:var(--luzmo-color-menu-format-label-indicator-border-radius, var(--luzmo-border-radius-s))}.format-container:focus-visible,.format-container:active{color:var(--luzmo-color-menu-format-font-color-down, var(--color-menu-format-font-color-down))}.format-container .format-label{-webkit-user-select:none;user-select:none}.format-container .angle-icon{display:flex;align-items:center;height:calc(var(--color-menu-format-font-size) / 1.5)}.slider-container{display:flex;flex-direction:column;justify-content:center;gap:var(--luzmo-color-menu-slider-gap, var(--color-menu-slider-gap))}luzmo-color-area{width:100%;height:var(--luzmo-color-menu-height, var(--color-menu-height))}luzmo-color-slider{width:100%}luzmo-divider{margin:var(--luzmo-spacing-5) à}.swatches-container{display:grid;grid-template-columns:repeat(6,1fr);gap:var(--luzmo-color-menu-swatches-gap, var(--color-menu-swatches-gap))}.swatches-container luzmo-swatch{cursor:pointer}.swatches-container .swatch-choice{display:flex;align-items:center;justify-content:center}:host{--luzmo-text-field-icon-size-valid: 0px;--luzmo-text-field-icon-spacing-inline-end-valid: 1px;--luzmo-text-field-text-align: center}:host{--color-menu-width: 290px;--luzmo-text-field-width: 220px;--luzmo-color-slider-control-track-width: 8px;--color-menu-height: 140px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height);--color-menu-format-font-size: var(--luzmo-font-size-s);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-3);--color-menu-format-font-color: var(--luzmo-font-color);--color-menu-format-font-color-hover: var(--luzmo-font-color-hover);--color-menu-format-font-color-down: var(--luzmo-font-color-down);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host .swatches-container{--luzmo-swatch-size: 22px}:host([size=s]){--color-menu-width: 260px;--luzmo-text-field-width: 200px;--luzmo-color-slider-control-track-width: 8px;--color-menu-hue-opacity-text-swatches-horizontal-padding: var( --luzmo-spacing-5 );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-4 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-4);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-4);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-s);--color-menu-format-font-size: var(--luzmo-font-size-xs);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-2);--color-menu-swatches-gap: var(--luzmo-spacing-3)}:host([size=s]) .swatches-container{--luzmo-swatch-size: 20px}:host([size=l]){--color-menu-width: 350px;--luzmo-text-field-width: 240px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-format-height: var(--luzmo-component-height-l);--color-menu-format-font-size: var(--luzmo-font-size);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=l]) .swatches-container{--luzmo-swatch-size: 24px}:host([size=l]) .swatch-example-container{--luzmo-swatch-size: 56px}:host([size=xl]){--color-menu-width: 380px;--luzmo-text-field-width: 280px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-color-controls-vertical-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-swatch-to-sliders-space: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-xl);--color-menu-format-font-size: var(--luzmo-font-size-l);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-3);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=xl]) .swatches-container{--luzmo-swatch-size: 26px}:host([size=xl]) .swatch-example-container{--luzmo-swatch-size: 64px}';var an=Object.defineProperty,co=(r,o,e,t)=>{for(var a=void 0,l=r.length-1,s;l>=0;l--)(s=r[l])&&(a=s(o,e,a)||a);return a&&an(o,e,a),a};const aa=class extends d.m(Fe.r){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.noAlphaChannel=!1,this._alpha=1,this._rgbColor="rgb(255, 0, 0)",this._rgbaColor="rgb(255, 0, 0, 1)",this._previousColor="rgb(255, 0, 0)"}setColor(o){var e;const t=new H((e=o==null?void 0:o.target)==null?void 0:e.color);this._format=t.format==="name"?"rgb":t.format,this._rgbaColor=t.toRgbString(),this._alpha=this.noAlphaChannel?1:t.getAlpha(),this._rgbColor=t.setAlpha(1).toRgbString(),this.hueSliderElement.color=this._rgbColor,this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this.colorFieldElement.value=this.formatTextField(t),this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleAreaChange(o){o.stopPropagation(),o.preventDefault(),this._rgbColor=this.areaElement.color;const e=new H(this._rgbColor);this._rgbaColor=e.setAlpha(this._alpha).toRgbString(),this.colorFieldElement.value=this._rgbaColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.colorFieldElement.value=this.formatTextField(e),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}get focusElement(){return this.areaElement||this.colorFieldElement||this}handleHueSliderChange(o){o.stopPropagation(),o.preventDefault();const e=new H(this._rgbColor).toHsl();e.h=this.hueSliderElement.value;const t=new H(e);this._rgbColor=t.toRgbString(),this._rgbaColor=t.setAlpha(this._alpha).toRgbString(),this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.colorFieldElement.value=this.formatTextField(t),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleOpacitySliderChange(o){o.stopPropagation(),o.preventDefault(),this._alpha=this.opacitySliderElement.sliderHandlePosition/100;const e=new H(this._rgbColor).setAlpha(this._alpha);this._rgbaColor=e.toRgbString(),this.colorFieldElement.value=this.formatTextField(e),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleFieldChange(o){if(o.stopPropagation(),o.preventDefault(),this.colorFieldElement.checkValidity()){const e=new H(this.colorFieldElement.value);this._format=e.format,this._rgbaColor=e.toRgbString(),this._alpha=e.getAlpha(),this._rgbColor=e.setAlpha(1).toRgbString(),this.noAlphaChannel&&(this._rgbaColor=this._rgbColor,this._alpha=1),this.hueSliderElement.color=this._rgbColor,this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}}formatTextField(o){return this._format==="hsl"?o.toHslString():this._format==="hex"?this.noAlphaChannel?o.toHexString():o.toHex8String():(this._format==="name"&&(this._format="rgb"),o.toRgbString())}cycleFormat(){const o=["rgb","hsl","hex"];this._format=o[(o.indexOf(this._format)+1)%o.length];const e=new H(this.color),t=this.formatTextField(e);this.colorFieldElement.value=t}updated(o){if(o.has("color")&&this.color!==this._previousColor){this._previousColor=this.color;const e=new H(this.color);this._alpha=e.getAlpha(),this._rgbColor=e.setAlpha(1).toRgbString(),this._rgbaColor=e.setAlpha(this._alpha).toRgbString(),this.areaElement.color=this._rgbColor,this.hueSliderElement.color=this._rgbColor,this.colorFieldElement.value=this._rgbaColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this._format="rgb"}o.has("noAlphaChannel")&&!this.noAlphaChannel&&(this.opacitySliderElement.color=this._rgbaColor)}renderOpacitySlider(){return d.Rt`
|
330
|
-
<luzmo-color-slider
|
331
|
-
id="luzmo-opacity-slider"
|
332
|
-
mode="opacity"
|
333
|
-
@input=${this.handleOpacitySliderChange}
|
334
|
-
>
|
335
|
-
</luzmo-color-slider>
|
336
|
-
`}render(){var o;return d.Rt`
|
337
|
-
<div id="color-menu" tabindex="0">
|
338
|
-
<luzmo-color-area
|
339
|
-
.size=${this.size}
|
340
|
-
@input=${this.handleAreaChange}
|
341
|
-
></luzmo-color-area>
|
342
|
-
<div class="hue-opacity-text-swatches-container">
|
343
|
-
<div class="swatch-sliders-container">
|
344
|
-
<div class="swatch-example-container">
|
345
|
-
<luzmo-swatch
|
346
|
-
rounding="full"
|
347
|
-
.size=${this.noAlphaChannel&&["s","m"].includes(this.size)?"s":"l"}
|
348
|
-
readonly
|
349
|
-
></luzmo-swatch>
|
350
|
-
</div>
|
351
|
-
<div class="slider-container" style="flex-grow: 1;">
|
352
|
-
<luzmo-color-slider
|
353
|
-
id="luzmo-hue-slider"
|
354
|
-
@input=${this.handleHueSliderChange}
|
355
|
-
>
|
356
|
-
</luzmo-color-slider>
|
357
|
-
${this.noAlphaChannel?"":this.renderOpacitySlider()}
|
358
|
-
</div>
|
359
|
-
</div>
|
360
|
-
<div class="field-container">
|
361
|
-
<luzmo-color-field
|
362
|
-
.size=${this.size}
|
363
|
-
@input=${this.handleFieldChange}
|
364
|
-
>
|
365
|
-
</luzmo-color-field>
|
366
|
-
<button
|
367
|
-
class="format-container"
|
368
|
-
aria-label="Color format"
|
369
|
-
@click=${this.cycleFormat}
|
370
|
-
tabindex="0"
|
371
|
-
>
|
372
|
-
<div class="format-label">${this._format}</div>
|
373
|
-
<div class="change-format-icon">
|
374
|
-
<div class="angle-icon">${So.D(So.v)}</div>
|
375
|
-
<div class="angle-icon">${So.D(So.s)}</div>
|
376
|
-
</div>
|
377
|
-
</button>
|
378
|
-
</div>
|
379
|
-
${((o=this.swatches)==null?void 0:o.length)>0?d.Rt`
|
380
|
-
<luzmo-divider></luzmo-divider>
|
381
|
-
<div class="swatches-container">
|
382
|
-
${this.swatches.map(e=>d.Rt`
|
383
|
-
<div class="swatch-choice">
|
384
|
-
<luzmo-swatch
|
385
|
-
@click=${this.setColor}
|
386
|
-
.color=${e}
|
387
|
-
.size=${this.size}
|
388
|
-
readonly
|
389
|
-
>
|
390
|
-
</luzmo-swatch>
|
391
|
-
</div>
|
392
|
-
`)}
|
393
|
-
</div>
|
394
|
-
`:""}
|
395
|
-
</div>
|
396
|
-
</div>
|
397
|
-
`}};aa.styles=d.at(tn);let lo=aa;co([d.zt({type:String,reflect:!0})],lo.prototype,"color");co([d.zt({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],lo.prototype,"noAlphaChannel");co([d.zt({type:Array,reflect:!0})],lo.prototype,"swatches");co([P.d("luzmo-color-area")],lo.prototype,"areaElement");co([P.d("#luzmo-hue-slider")],lo.prototype,"hueSliderElement");co([P.d("#luzmo-opacity-slider")],lo.prototype,"opacitySliderElement");co([P.d("luzmo-color-field")],lo.prototype,"colorFieldElement");co([P.d("luzmo-swatch")],lo.prototype,"swatchElement");co([mt.n()],lo.prototype,"_format");customElements.get("luzmo-color-menu")||customElements.define("luzmo-color-menu",lo);/*! * Lucero - The design system for Luzmo.
|
398
|
-
*
|
399
|
-
* Copyright © 2025 Luzmo
|
400
|
-
* All rights reserved.
|
401
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
402
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
403
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
404
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
405
|
-
*
|
406
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
407
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
408
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
409
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
410
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
411
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
412
|
-
* SOFTWARE.
|
413
|
-
* */const ln=()=>{if(typeof document<"u"&&!document.querySelector("style[data-luzmo-vars]")){const r=document.createElement("style");r.setAttribute("data-luzmo-vars",""),r.textContent='html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}',document.head.appendChild(r)}};ln();const sn="luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";var nn=Object.defineProperty,ro=(r,o,e,t)=>{for(var a=void 0,l=r.length-1,s;l>=0;l--)(s=r[l])&&(a=s(o,e,a)||a);return a&&nn(o,e,a),a};const la=class extends d.m(d.It){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.open=!1,this.disabled=!1,this.placement="left-start",this.rounding="full",this.swatches=[],this.noAlphaChannel=!1,this._renderMenu=!1}overlayCloseEvent(){this.open=!1}overlayOpenEvent(){this.open=!0}handleColorChange(){const o=this.menuElement.color;this.color=typeof o=="string"?o:String(o),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}firstUpdated(){this.overlayElement.addEventListener("slottable-request",o=>{this._renderMenu=o.data!==Le.a})}updated(o){o.has("open")&&this.open===!0&&(this._renderMenu=!0)}renderColorMenu(){return d.Rt`
|
414
|
-
<luzmo-color-menu
|
415
|
-
.size=${this.size}
|
416
|
-
.color=${this.color}
|
417
|
-
.noAlphaChannel=${this.noAlphaChannel}
|
418
|
-
.swatches=${this.swatches}
|
419
|
-
@change=${this.handleColorChange}
|
420
|
-
></luzmo-color-menu>
|
421
|
-
`}render(){return d.Rt`
|
422
|
-
<luzmo-swatch
|
423
|
-
id="trigger"
|
424
|
-
.shape=${this.shape}
|
425
|
-
.rounding=${this.rounding}
|
426
|
-
.size=${this.size}
|
427
|
-
.color=${this.color}
|
428
|
-
.selected=${this.open&&!this.disabled}
|
429
|
-
?disabled=${this.disabled}
|
430
|
-
@luzmo-closed=${this.overlayCloseEvent}
|
431
|
-
@luzmo-opened=${this.overlayOpenEvent}
|
432
|
-
></luzmo-swatch>
|
433
|
-
<luzmo-overlay
|
434
|
-
trigger=${this.disabled?"":"trigger@click"}
|
435
|
-
.placement=${this.placement}
|
436
|
-
type="auto"
|
437
|
-
>
|
438
|
-
<luzmo-popover style="position:relative">
|
439
|
-
${this._renderMenu?this.renderColorMenu():d.Rt``}
|
440
|
-
</luzmo-popover>
|
441
|
-
</luzmo-overlay>
|
442
|
-
`}};la.styles=d.at(sn);let Q=la;ro([d.zt({type:String,reflect:!0})],Q.prototype,"color");ro([d.zt({type:Boolean,reflect:!0})],Q.prototype,"open");ro([d.zt({type:Boolean,reflect:!0})],Q.prototype,"disabled");ro([d.zt({type:String,reflect:!0})],Q.prototype,"placement");ro([d.zt({type:String,reflect:!0})],Q.prototype,"rounding");ro([d.zt({type:String,reflect:!0})],Q.prototype,"shape");ro([d.zt({type:Array,reflect:!0})],Q.prototype,"swatches");ro([d.zt({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],Q.prototype,"noAlphaChannel");ro([P.d("luzmo-color-menu")],Q.prototype,"menuElement");ro([P.d("luzmo-overlay")],Q.prototype,"overlayElement");ro([mt.n()],Q.prototype,"_renderMenu");customElements.get("luzmo-color-picker")||customElements.define("luzmo-color-picker",Q);var cn=Object.defineProperty,uo=(r,o,e,t)=>{for(var a=void 0,l=r.length-1,s;l>=0;l--)(s=r[l])&&(a=s(o,e,a)||a);return a&&cn(o,e,a),a};const Fo=class Fo extends ba.LuzmoEditOptionBase{constructor(){super(...arguments),this.value="transparent",this.disabled=!1,this.noAlphaChannel=!1,this.swatches=[],this.rounding="full",this.shape="circle",this.placement="left-start",this.debounce=50}_handleEvent(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.dispatchEvent(new CustomEvent("option-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:this.colorPicker.color}}))},this.debounce??200)}renderController(){return io.x`
|
20
|
+
"use strict";var u=Object.getPrototypeOf;var h=Reflect.get;var p=(n,i,l)=>h(u(n),l,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-DMhm0FM8.cjs");require("../index-BKx2WhDB.cjs");const t=require("../property-BV1QaY8E.cjs"),d=require("../query-D5qWDopr.cjs"),y=require("../edit-option-base-h5ndfVK4.cjs");var m=Object.defineProperty,r=(n,i,l,f)=>{for(var o=void 0,a=n.length-1,c;a>=0;a--)(c=n[a])&&(o=c(i,l,o)||o);return o&&m(i,l,o),o};const s=class s extends y.LuzmoEditOptionBase{constructor(){super(...arguments),this.value="transparent",this.disabled=!1,this.noAlphaChannel=!1,this.swatches=[],this.rounding="full",this.shape="circle",this.placement="left-start",this.debounce=50}_handleEvent(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.dispatchEvent(new CustomEvent("option-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:this.colorPicker.color}}))},this.debounce??200)}renderController(){return t.x`
|
443
21
|
<luzmo-color-picker
|
444
22
|
.color=${this.value}
|
445
23
|
.size=${this.size}
|
@@ -452,4 +30,4 @@
|
|
452
30
|
@change=${this._handleEvent}
|
453
31
|
>
|
454
32
|
</luzmo-color-picker>
|
455
|
-
`}};
|
33
|
+
`}};s.styles=[p(s,s,"styles")];let e=s;r([t.n({type:String,reflect:!0})],e.prototype,"value");r([t.n({type:Boolean,reflect:!0})],e.prototype,"disabled");r([t.n({type:Boolean,reflect:!0})],e.prototype,"noAlphaChannel");r([t.n({type:Array,reflect:!0})],e.prototype,"swatches");r([t.n({type:String,reflect:!0})],e.prototype,"rounding");r([t.n({type:String,reflect:!0})],e.prototype,"shape");r([t.n()],e.prototype,"placement");r([t.n({type:Number,reflect:!0})],e.prototype,"debounce");r([d.e("luzmo-color-picker")],e.prototype,"colorPicker");customElements.get("luzmo-edit-option-color-picker")||customElements.define("luzmo-edit-option-color-picker",e);exports.LuzmoEditOptionColorPicker=e;
|