@weasel-js/ui 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/ActionBar-xA73vzzF.js +64 -0
- package/dist/chunks/ActionBar-xA73vzzF.js.map +1 -0
- package/dist/chunks/{Badge-D2aD7xVL.js → Badge-jYQjrTKc.js} +235 -264
- package/dist/chunks/{Badge-D2aD7xVL.js.map → Badge-jYQjrTKc.js.map} +1 -1
- package/dist/chunks/{BandEditor-Dd0egAgE.js → BandEditor-B4jUAHQ8.js} +13 -13
- package/dist/chunks/BandEditor-B4jUAHQ8.js.map +1 -0
- package/dist/chunks/{Button-BIdXHQOx.js → Button-XB-T75YL.js} +2 -2
- package/dist/chunks/{Button-BIdXHQOx.js.map → Button-XB-T75YL.js.map} +1 -1
- package/dist/chunks/{ButtonBar-DIQTe5GQ.js → ButtonBar-CIMKPPRS.js} +7 -9
- package/dist/chunks/{ButtonBar-DIQTe5GQ.js.map → ButtonBar-CIMKPPRS.js.map} +1 -1
- package/dist/chunks/Callout-BUn0dP_S.js +115 -0
- package/dist/chunks/Callout-BUn0dP_S.js.map +1 -0
- package/dist/chunks/Checkbox-DFn-x0JO.js +37 -0
- package/dist/chunks/Checkbox-DFn-x0JO.js.map +1 -0
- package/dist/chunks/{CloseButton-C2J7wVfo.js → CloseButton-BmNmRVtb.js} +3 -3
- package/dist/chunks/{CloseButton-C2J7wVfo.js.map → CloseButton-BmNmRVtb.js.map} +1 -1
- package/dist/chunks/ColorField-BwlelY26.js +90 -0
- package/dist/chunks/ColorField-BwlelY26.js.map +1 -0
- package/dist/chunks/{ColorModeControl-BewxA0rX.js → ColorModeControl-DaVJ-SyX.js} +3 -3
- package/dist/chunks/{ColorModeControl-BewxA0rX.js.map → ColorModeControl-DaVJ-SyX.js.map} +1 -1
- package/dist/chunks/ComboBox-DKln_mOd.js +138 -0
- package/dist/chunks/ComboBox-DKln_mOd.js.map +1 -0
- package/dist/chunks/{CurveEditor-DUVjd25R.js → CurveEditor-0EE00D6s.js} +90 -87
- package/dist/chunks/CurveEditor-0EE00D6s.js.map +1 -0
- package/dist/chunks/{DataGrid-LZ2JgY2Y.js → DataGrid-CmHJe57v.js} +23 -18
- package/dist/chunks/DataGrid-CmHJe57v.js.map +1 -0
- package/dist/chunks/DetailList-BpU50XVe.js +54 -0
- package/dist/chunks/DetailList-BpU50XVe.js.map +1 -0
- package/dist/chunks/{DetentSlider-5uQPFucv.js → DetentSlider-DNTAk8xP.js} +2 -2
- package/dist/chunks/{DetentSlider-5uQPFucv.js.map → DetentSlider-DNTAk8xP.js.map} +1 -1
- package/dist/chunks/{Dialog-DGFutQ--.js → Dialog-DKfsk5VN.js} +3 -3
- package/dist/chunks/{Dialog-DGFutQ--.js.map → Dialog-DKfsk5VN.js.map} +1 -1
- package/dist/chunks/{DragGhost-B5_hb9W9.js → DragGhost-BeYDJyLZ.js} +2 -2
- package/dist/chunks/{DragGhost-B5_hb9W9.js.map → DragGhost-BeYDJyLZ.js.map} +1 -1
- package/dist/chunks/{FallthroughDiagram-BEHiM5IS.js → FallthroughDiagram-CS1IhQaU.js} +16 -16
- package/dist/chunks/FallthroughDiagram-CS1IhQaU.js.map +1 -0
- package/dist/chunks/Field-DiX_WByH.js +25 -0
- package/dist/chunks/Field-DiX_WByH.js.map +1 -0
- package/dist/chunks/FillStrokeSwatch-C4h3rUFM.js +112 -0
- package/dist/chunks/FillStrokeSwatch-C4h3rUFM.js.map +1 -0
- package/dist/chunks/{FontFamilySelect-DkRgNtag.js → FontFamilySelect-DEvMXyZd.js} +2 -2
- package/dist/chunks/FontFamilySelect-DEvMXyZd.js.map +1 -0
- package/dist/chunks/FontWeightSelect-BLQ_LMJF.js +49 -0
- package/dist/chunks/FontWeightSelect-BLQ_LMJF.js.map +1 -0
- package/dist/chunks/{GestureRoute-C_YGl7bJ.js → GestureRoute-BXESrHI0.js} +2 -2
- package/dist/chunks/{GestureRoute-C_YGl7bJ.js.map → GestureRoute-BXESrHI0.js.map} +1 -1
- package/dist/chunks/GradientEditor-DD2OjQtn.js +325 -0
- package/dist/chunks/GradientEditor-DD2OjQtn.js.map +1 -0
- package/dist/chunks/{Icon-CcVjdq2C.js → Icon--B1ME-6c.js} +3 -1
- package/dist/chunks/Icon--B1ME-6c.js.map +1 -0
- package/dist/chunks/{InlineRange-P01ABSzo.js → InlineRange-DPjIsJB3.js} +3 -3
- package/dist/chunks/InlineRange-DPjIsJB3.js.map +1 -0
- package/dist/chunks/{Input-CHmkfYaD.js → Input-D7SDKbST.js} +10 -15
- package/dist/chunks/Input-D7SDKbST.js.map +1 -0
- package/dist/chunks/{ItemList-Cm-HUWCi.js → ItemList-CRu9y7hL.js} +2 -2
- package/dist/chunks/ItemList-CRu9y7hL.js.map +1 -0
- package/dist/chunks/{Jog-DRmfrkCg.js → Jog-BrkzdGV2.js} +8 -8
- package/dist/chunks/Jog-BrkzdGV2.js.map +1 -0
- package/dist/chunks/{LayerList-wCI1EueM.js → LayerList-Bxj1N6bj.js} +151 -153
- package/dist/chunks/LayerList-Bxj1N6bj.js.map +1 -0
- package/dist/chunks/ListEditor-OQDzG4A5.js +72 -0
- package/dist/chunks/ListEditor-OQDzG4A5.js.map +1 -0
- package/dist/chunks/MenuButton-TAFg88Lp.js +75 -0
- package/dist/chunks/MenuButton-TAFg88Lp.js.map +1 -0
- package/dist/chunks/MeshEditor-DWpvg8H6.js +199 -0
- package/dist/chunks/MeshEditor-DWpvg8H6.js.map +1 -0
- package/dist/chunks/{NumberField-BnJxcazc.js → NumberField-DS0WSiin.js} +26 -23
- package/dist/chunks/NumberField-DS0WSiin.js.map +1 -0
- package/dist/chunks/{OptionsBar-ujxYidhj.js → OptionsBar-DeTAjVb7.js} +6 -8
- package/dist/chunks/{OptionsBar-ujxYidhj.js.map → OptionsBar-DeTAjVb7.js.map} +1 -1
- package/dist/chunks/PaintField-BdmQM53v.js +63 -0
- package/dist/chunks/PaintField-BdmQM53v.js.map +1 -0
- package/dist/chunks/PaintInput-DaQMeBsI.js +132 -0
- package/dist/chunks/PaintInput-DaQMeBsI.js.map +1 -0
- package/dist/chunks/PatternPicker-B3HcMZWg.js +135 -0
- package/dist/chunks/PatternPicker-B3HcMZWg.js.map +1 -0
- package/dist/chunks/{Plot2D-CTXHkL5p.js → Plot2D-BrvQS0dh.js} +7 -7
- package/dist/chunks/Plot2D-BrvQS0dh.js.map +1 -0
- package/dist/chunks/{PointPlotter-ldI4RrU1.js → PointPlotter-BBXpQ_QD.js} +2 -2
- package/dist/chunks/{PointPlotter-ldI4RrU1.js.map → PointPlotter-BBXpQ_QD.js.map} +1 -1
- package/dist/chunks/{Powerline-DNyH885r.js → Powerline-6wIFmDik.js} +2 -2
- package/dist/chunks/{Powerline-DNyH885r.js.map → Powerline-6wIFmDik.js.map} +1 -1
- package/dist/chunks/{Prefs-ByA-x51i.js → Prefs-C4MZ28SX.js} +118 -95
- package/dist/chunks/Prefs-C4MZ28SX.js.map +1 -0
- package/dist/chunks/{Properties-DmAeQ3mk.js → Properties-DseN56WI.js} +29 -29
- package/dist/chunks/{Properties-DmAeQ3mk.js.map → Properties-DseN56WI.js.map} +1 -1
- package/dist/chunks/PropertyField-BbNqK8xr.js +743 -0
- package/dist/chunks/PropertyField-BbNqK8xr.js.map +1 -0
- package/dist/chunks/{RadioGroup-Bh4-12e-.js → RadioGroup-B70_M-gT.js} +2 -2
- package/dist/chunks/{RadioGroup-Bh4-12e-.js.map → RadioGroup-B70_M-gT.js.map} +1 -1
- package/dist/chunks/{RangeSlider-SEGE-7VF.js → RangeSlider-DO5TZVk7.js} +8 -8
- package/dist/chunks/{RangeSlider-SEGE-7VF.js.map → RangeSlider-DO5TZVk7.js.map} +1 -1
- package/dist/chunks/RecentColorsProvider-DHcfk25u.js +84 -0
- package/dist/chunks/RecentColorsProvider-DHcfk25u.js.map +1 -0
- package/dist/chunks/ResizeHandle-CbAgCQOt.js +81 -0
- package/dist/chunks/ResizeHandle-CbAgCQOt.js.map +1 -0
- package/dist/chunks/Select-ouV8O6cp.js +236 -0
- package/dist/chunks/Select-ouV8O6cp.js.map +1 -0
- package/dist/chunks/{SelectionPanel-BaQnX4Bs.js → SelectionPanel-C3WzyaZV.js} +14 -13
- package/dist/chunks/{SelectionPanel-BaQnX4Bs.js.map → SelectionPanel-C3WzyaZV.js.map} +1 -1
- package/dist/chunks/{SidebarPanel-BblDEz4G.js → SidebarPanel-AXQ0jRDx.js} +2 -2
- package/dist/chunks/{SidebarPanel-BblDEz4G.js.map → SidebarPanel-AXQ0jRDx.js.map} +1 -1
- package/dist/chunks/{Slider-YofwGOI4.js → Slider-DSrlMEq8.js} +19 -19
- package/dist/chunks/Slider-DSrlMEq8.js.map +1 -0
- package/dist/chunks/{StatusBar-Ca9Dvhhq.js → StatusBar-BEOfOX0D.js} +6 -6
- package/dist/chunks/StatusBar-BEOfOX0D.js.map +1 -0
- package/dist/chunks/SwatchGrid-9ZPiDmxd.js +78 -0
- package/dist/chunks/SwatchGrid-9ZPiDmxd.js.map +1 -0
- package/dist/chunks/SwatchStrip-Bi9iPLoh.js +577 -0
- package/dist/chunks/SwatchStrip-Bi9iPLoh.js.map +1 -0
- package/dist/chunks/{ThemeSwitcher-BlsInAmR.js → ThemeSwitcher-DiBmMh_B.js} +3 -3
- package/dist/chunks/{ThemeSwitcher-BlsInAmR.js.map → ThemeSwitcher-DiBmMh_B.js.map} +1 -1
- package/dist/chunks/{Timeline-B39cwfMB.js → Timeline-sMCH2fah.js} +293 -280
- package/dist/chunks/Timeline-sMCH2fah.js.map +1 -0
- package/dist/chunks/Toast-C3ozq11V.js +170 -0
- package/dist/chunks/Toast-C3ozq11V.js.map +1 -0
- package/dist/chunks/{ToggleBar-BTYkBXU9.js → ToggleBar-Z2jZiguF.js} +6 -8
- package/dist/chunks/{ToggleBar-BTYkBXU9.js.map → ToggleBar-Z2jZiguF.js.map} +1 -1
- package/dist/chunks/{TokenPanel-CMDAOfYH.js → TokenPanel-WtKGY2Db.js} +32 -32
- package/dist/chunks/TokenPanel-WtKGY2Db.js.map +1 -0
- package/dist/chunks/{ToolButton-CAHBa08P.js → ToolButton-BURp4YIO.js} +7 -9
- package/dist/chunks/ToolButton-BURp4YIO.js.map +1 -0
- package/dist/chunks/{ToolOptionsBar-D_GCrBAN.js → ToolOptionsBar-CZTYPoC2.js} +3 -2
- package/dist/chunks/{ToolOptionsBar-D_GCrBAN.js.map → ToolOptionsBar-CZTYPoC2.js.map} +1 -1
- package/dist/chunks/{ToolPalette-OOWN51Xx.js → ToolPalette-DKDFWOX-.js} +7 -9
- package/dist/chunks/{ToolPalette-OOWN51Xx.js.map → ToolPalette-DKDFWOX-.js.map} +1 -1
- package/dist/chunks/{Tooltip-Clg2mhSt.js → Tooltip-C6eFCYxw.js} +2 -2
- package/dist/chunks/{Tooltip-Clg2mhSt.js.map → Tooltip-C6eFCYxw.js.map} +1 -1
- package/dist/chunks/Tree-Cc8lIzgM.js.map +1 -1
- package/dist/chunks/checkbox.module-DLQV9tMX.js +5 -0
- package/dist/chunks/checkbox.module-DLQV9tMX.js.map +1 -0
- package/dist/chunks/{createKeyframeLayer-DVl321_l.js → createKeyframeLayer-DSVf13Su.js} +194 -208
- package/dist/chunks/createKeyframeLayer-DSVf13Su.js.map +1 -0
- package/dist/chunks/field.module-B27pWv0i.js +15 -0
- package/dist/chunks/field.module-B27pWv0i.js.map +1 -0
- package/dist/chunks/formatShortcut-DRQrVThu.js.map +1 -1
- package/dist/chunks/handles-CqVANLtu.js +17 -0
- package/dist/chunks/handles-CqVANLtu.js.map +1 -0
- package/dist/chunks/{icons-BhcR1l64.js → icons-Dr2-r30x.js} +2 -2
- package/dist/chunks/icons-Dr2-r30x.js.map +1 -0
- package/dist/chunks/listbox.module-BcdVJMbm.js +8 -0
- package/dist/chunks/listbox.module-BcdVJMbm.js.map +1 -0
- package/dist/chunks/model-qsAFK7_0.js +386 -0
- package/dist/chunks/model-qsAFK7_0.js.map +1 -0
- package/dist/chunks/{portalHost-yTOVuCej.js → portalHost-CE70wLzo.js} +10 -6
- package/dist/chunks/portalHost-CE70wLzo.js.map +1 -0
- package/dist/chunks/prefField-BE_Ytr2H.js +229 -0
- package/dist/chunks/prefField-BE_Ytr2H.js.map +1 -0
- package/dist/chunks/{segmentTooltip-CStYHKzd.js → segmentTooltip-CGxCOWNz.js} +2 -2
- package/dist/chunks/{segmentTooltip-CStYHKzd.js.map → segmentTooltip-CGxCOWNz.js.map} +1 -1
- package/dist/chunks/segmentedControl.module-BzGXUL5G.js +11 -0
- package/dist/chunks/segmentedControl.module-BzGXUL5G.js.map +1 -0
- package/dist/chunks/useReorderDragList-CStYKjHl.js +133 -0
- package/dist/chunks/useReorderDragList-CStYKjHl.js.map +1 -0
- package/dist/chunks/useRovingTabIndex-D7u22Ia_.js +91 -0
- package/dist/chunks/useRovingTabIndex-D7u22Ia_.js.map +1 -0
- package/dist/components/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/components/ActionBar/index.js +1 -1
- package/dist/components/Badge/bases/ChamferedRect.d.ts.map +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/BandEditor/BandEditor.d.ts +1 -0
- package/dist/components/BandEditor/BandEditor.d.ts.map +1 -1
- package/dist/components/BandEditor/index.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonBar/ButtonBar.d.ts.map +1 -1
- package/dist/components/ButtonBar/index.js +1 -1
- package/dist/components/Callout/Callout.d.ts.map +1 -1
- package/dist/components/Callout/index.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +28 -13
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CloseButton/index.js +1 -1
- package/dist/components/ColorField/ColorField.d.ts.map +1 -1
- package/dist/components/ColorField/OpacityRange.d.ts +18 -0
- package/dist/components/ColorField/OpacityRange.d.ts.map +1 -0
- package/dist/components/ColorField/index.js +1 -1
- package/dist/components/ColorModeControl/index.js +1 -1
- package/dist/components/ComboBox/ComboBox.d.ts +7 -0
- package/dist/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/dist/components/ComboBox/index.js +1 -1
- package/dist/components/CurveEditor/CurveEditor.d.ts.map +1 -1
- package/dist/components/CurveEditor/LayeredCurveEditor.d.ts.map +1 -1
- package/dist/components/CurveEditor/index.js +2 -2
- package/dist/components/DataGrid/DataGrid.d.ts +3 -0
- package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/index.js +1 -1
- package/dist/components/DetailList/DetailList.d.ts +1 -1
- package/dist/components/DetailList/DetailList.d.ts.map +1 -1
- package/dist/components/DetailList/index.js +1 -1
- package/dist/components/DetentSlider/index.js +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/DragGhost/index.js +1 -1
- package/dist/components/FallthroughDiagram/index.js +1 -1
- package/dist/components/Field/index.js +1 -1
- package/dist/components/FillStrokeSwatch/FillStrokeSwatch.d.ts +5 -2
- package/dist/components/FillStrokeSwatch/FillStrokeSwatch.d.ts.map +1 -1
- package/dist/components/FillStrokeSwatch/index.js +1 -1
- package/dist/components/FontFamilySelect/FontFamilySelect.d.ts +20 -0
- package/dist/components/FontFamilySelect/FontFamilySelect.d.ts.map +1 -1
- package/dist/components/FontFamilySelect/index.js +1 -1
- package/dist/components/FontWeightSelect/FontWeightSelect.d.ts +26 -0
- package/dist/components/FontWeightSelect/FontWeightSelect.d.ts.map +1 -0
- package/dist/components/FontWeightSelect/index.d.ts +3 -0
- package/dist/components/FontWeightSelect/index.d.ts.map +1 -0
- package/dist/components/FontWeightSelect/index.js +2 -0
- package/dist/components/GestureRoute/index.js +1 -1
- package/dist/components/GradientEditor/GradientHandles.d.ts +1 -8
- package/dist/components/GradientEditor/GradientHandles.d.ts.map +1 -1
- package/dist/components/GradientEditor/SceneGradientHandles.d.ts +7 -5
- package/dist/components/GradientEditor/SceneGradientHandles.d.ts.map +1 -1
- package/dist/components/GradientEditor/handleOverlay.d.ts +41 -0
- package/dist/components/GradientEditor/handleOverlay.d.ts.map +1 -0
- package/dist/components/GradientEditor/index.js +1 -1
- package/dist/components/InlineRange/index.js +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/ItemList/ItemList.d.ts +32 -31
- package/dist/components/ItemList/ItemList.d.ts.map +1 -1
- package/dist/components/ItemList/index.js +1 -1
- package/dist/components/Jog/index.js +1 -1
- package/dist/components/LayerList/LayerList.d.ts.map +1 -1
- package/dist/components/LayerList/index.js +1 -1
- package/dist/components/ListEditor/ListEditor.d.ts.map +1 -1
- package/dist/components/ListEditor/index.js +1 -1
- package/dist/components/MenuButton/MenuButton.d.ts.map +1 -1
- package/dist/components/MenuButton/index.js +1 -1
- package/dist/components/MeshEditor/MeshEditor.d.ts +4 -3
- package/dist/components/MeshEditor/MeshEditor.d.ts.map +1 -1
- package/dist/components/MeshEditor/MeshHandles.d.ts +38 -0
- package/dist/components/MeshEditor/MeshHandles.d.ts.map +1 -0
- package/dist/components/MeshEditor/index.d.ts +2 -0
- package/dist/components/MeshEditor/index.d.ts.map +1 -1
- package/dist/components/MeshEditor/index.js +2 -2
- package/dist/components/NumberField/NumberField.d.ts +1 -1
- package/dist/components/NumberField/NumberField.d.ts.map +1 -1
- package/dist/components/NumberField/index.js +1 -1
- package/dist/components/OptionsBar/OptionsBar.d.ts.map +1 -1
- package/dist/components/OptionsBar/index.js +1 -1
- package/dist/components/PaintField/PaintField.d.ts.map +1 -1
- package/dist/components/PaintField/index.js +1 -1
- package/dist/components/PaintInput/PaintInput.d.ts.map +1 -1
- package/dist/components/PaintInput/index.js +1 -1
- package/dist/components/PatternPicker/PatternPicker.d.ts +6 -5
- package/dist/components/PatternPicker/PatternPicker.d.ts.map +1 -1
- package/dist/components/PatternPicker/index.js +1 -1
- package/dist/components/Plot2D/index.js +1 -1
- package/dist/components/PointPlotter/index.js +1 -1
- package/dist/components/Powerline/index.js +2 -2
- package/dist/components/Prefs/PrefsForm.d.ts +22 -0
- package/dist/components/Prefs/PrefsForm.d.ts.map +1 -1
- package/dist/components/Prefs/PrefsRail.d.ts +3 -2
- package/dist/components/Prefs/PrefsRail.d.ts.map +1 -1
- package/dist/components/Prefs/PrefsRow.d.ts +4 -0
- package/dist/components/Prefs/PrefsRow.d.ts.map +1 -1
- package/dist/components/Prefs/index.js +2 -2
- package/dist/components/Prefs/prefField.d.ts +13 -0
- package/dist/components/Prefs/prefField.d.ts.map +1 -1
- package/dist/components/Properties/PropertyField.d.ts +13 -2
- package/dist/components/Properties/PropertyField.d.ts.map +1 -1
- package/dist/components/Properties/PropertyPanel.d.ts +18 -1
- package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
- package/dist/components/Properties/index.d.ts +2 -2
- package/dist/components/Properties/index.d.ts.map +1 -1
- package/dist/components/Properties/index.js +3 -3
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/RangeSlider/index.js +1 -1
- package/dist/components/RecentColors/RecentColorsProvider.d.ts +24 -0
- package/dist/components/RecentColors/RecentColorsProvider.d.ts.map +1 -0
- package/dist/components/RecentColors/index.d.ts +5 -0
- package/dist/components/RecentColors/index.d.ts.map +1 -0
- package/dist/components/RecentColors/index.js +2 -0
- package/dist/components/RecentColors/recentColors.d.ts +39 -0
- package/dist/components/RecentColors/recentColors.d.ts.map +1 -0
- package/dist/components/ResizeHandle/ResizeHandle.d.ts.map +1 -1
- package/dist/components/ResizeHandle/index.js +1 -1
- package/dist/components/Select/Select.d.ts +6 -2
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/SelectionPanel/index.js +2 -2
- package/dist/components/SelectionPanel/renderLeaf.d.ts +12 -2
- package/dist/components/SelectionPanel/renderLeaf.d.ts.map +1 -1
- package/dist/components/SidebarPanel/index.js +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/StatusBar/StatusBar.d.ts +1 -1
- package/dist/components/StatusBar/index.js +1 -1
- package/dist/components/SwatchGrid/SwatchGrid.d.ts.map +1 -1
- package/dist/components/SwatchGrid/index.js +1 -1
- package/dist/components/SwatchStrip/SwatchStrip.d.ts +44 -0
- package/dist/components/SwatchStrip/SwatchStrip.d.ts.map +1 -0
- package/dist/components/SwatchStrip/index.d.ts +5 -0
- package/dist/components/SwatchStrip/index.d.ts.map +1 -0
- package/dist/components/SwatchStrip/index.js +2 -0
- package/dist/components/SwatchStrip/palettes.d.ts +21 -0
- package/dist/components/SwatchStrip/palettes.d.ts.map +1 -0
- package/dist/components/ThemeSwitcher/index.js +1 -1
- package/dist/components/Timeline/AnimatedTimeline.d.ts +1 -0
- package/dist/components/Timeline/AnimatedTimeline.d.ts.map +1 -1
- package/dist/components/Timeline/EasingPicker.d.ts +3 -0
- package/dist/components/Timeline/EasingPicker.d.ts.map +1 -1
- package/dist/components/Timeline/LaneGraph.d.ts +1 -1
- package/dist/components/Timeline/LaneGraph.d.ts.map +1 -1
- package/dist/components/Timeline/Timeline.d.ts +10 -1
- package/dist/components/Timeline/Timeline.d.ts.map +1 -1
- package/dist/components/Timeline/Transport.d.ts +6 -0
- package/dist/components/Timeline/Transport.d.ts.map +1 -1
- package/dist/components/Timeline/index.js +1 -1
- package/dist/components/Timeline/keys.d.ts +1 -0
- package/dist/components/Timeline/keys.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts +12 -3
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/ToggleBar/ToggleBar.d.ts.map +1 -1
- package/dist/components/ToggleBar/index.js +1 -1
- package/dist/components/TokenPanel/index.js +1 -1
- package/dist/components/TokenPanel/tokenTypes.d.ts +1 -0
- package/dist/components/TokenPanel/tokenTypes.d.ts.map +1 -1
- package/dist/components/ToolButton/ToolButton.d.ts +1 -10
- package/dist/components/ToolButton/ToolButton.d.ts.map +1 -1
- package/dist/components/ToolButton/index.js +1 -1
- package/dist/components/ToolOptionsBar/index.js +1 -1
- package/dist/components/ToolPalette/ToolPalette.d.ts.map +1 -1
- package/dist/components/ToolPalette/formatShortcut.d.ts +2 -0
- package/dist/components/ToolPalette/formatShortcut.d.ts.map +1 -1
- package/dist/components/ToolPalette/index.js +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/Tree/Tree.d.ts +27 -26
- package/dist/components/Tree/Tree.d.ts.map +1 -1
- package/dist/icons/index.d.ts +51 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/paths.d.ts +2 -0
- package/dist/icons/paths.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +98 -95
- package/dist/index.js.map +1 -1
- package/dist/overlays/portalHost.d.ts +6 -0
- package/dist/overlays/portalHost.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/useAsyncOptions.d.ts.map +1 -1
- package/dist/useReorderDragList.d.ts.map +1 -1
- package/dist/useRovingTabIndex.d.ts +40 -39
- package/dist/useRovingTabIndex.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/chunks/ActionBar-DCq16yFA.js +0 -57
- package/dist/chunks/ActionBar-DCq16yFA.js.map +0 -1
- package/dist/chunks/BandEditor-Dd0egAgE.js.map +0 -1
- package/dist/chunks/Callout-ndW5_Bqx.js +0 -116
- package/dist/chunks/Callout-ndW5_Bqx.js.map +0 -1
- package/dist/chunks/Checkbox-DHXTUHO9.js +0 -47
- package/dist/chunks/Checkbox-DHXTUHO9.js.map +0 -1
- package/dist/chunks/ColorField-Yz_BkcCT.js +0 -69
- package/dist/chunks/ColorField-Yz_BkcCT.js.map +0 -1
- package/dist/chunks/ComboBox-B34H76CW.js +0 -138
- package/dist/chunks/ComboBox-B34H76CW.js.map +0 -1
- package/dist/chunks/CurveEditor-DUVjd25R.js.map +0 -1
- package/dist/chunks/DataGrid-LZ2JgY2Y.js.map +0 -1
- package/dist/chunks/DetailList-BKomDzg5.js +0 -52
- package/dist/chunks/DetailList-BKomDzg5.js.map +0 -1
- package/dist/chunks/FallthroughDiagram-BEHiM5IS.js.map +0 -1
- package/dist/chunks/Field--onYxXTF.js +0 -32
- package/dist/chunks/Field--onYxXTF.js.map +0 -1
- package/dist/chunks/FillStrokeSwatch-DNb0KXPk.js +0 -111
- package/dist/chunks/FillStrokeSwatch-DNb0KXPk.js.map +0 -1
- package/dist/chunks/FontFamilySelect-DkRgNtag.js.map +0 -1
- package/dist/chunks/GradientEditor-b7v4Ph3i.js +0 -363
- package/dist/chunks/GradientEditor-b7v4Ph3i.js.map +0 -1
- package/dist/chunks/Icon-CcVjdq2C.js.map +0 -1
- package/dist/chunks/InlineRange-P01ABSzo.js.map +0 -1
- package/dist/chunks/Input-CHmkfYaD.js.map +0 -1
- package/dist/chunks/ItemList-Cm-HUWCi.js.map +0 -1
- package/dist/chunks/Jog-DRmfrkCg.js.map +0 -1
- package/dist/chunks/LayerList-wCI1EueM.js.map +0 -1
- package/dist/chunks/ListEditor-BeA60TAA.js +0 -71
- package/dist/chunks/ListEditor-BeA60TAA.js.map +0 -1
- package/dist/chunks/MenuButton-BSqEChJE.js +0 -70
- package/dist/chunks/MenuButton-BSqEChJE.js.map +0 -1
- package/dist/chunks/MeshEditor-D1HLZcAh.js +0 -87
- package/dist/chunks/MeshEditor-D1HLZcAh.js.map +0 -1
- package/dist/chunks/NumberField-BnJxcazc.js.map +0 -1
- package/dist/chunks/PaintField-DadOELMg.js +0 -62
- package/dist/chunks/PaintField-DadOELMg.js.map +0 -1
- package/dist/chunks/PaintInput-v8Y7MDbH.js +0 -121
- package/dist/chunks/PaintInput-v8Y7MDbH.js.map +0 -1
- package/dist/chunks/PatternPicker-R_EQtw2Q.js +0 -93
- package/dist/chunks/PatternPicker-R_EQtw2Q.js.map +0 -1
- package/dist/chunks/Plot2D-CTXHkL5p.js.map +0 -1
- package/dist/chunks/Prefs-ByA-x51i.js.map +0 -1
- package/dist/chunks/PropertyField-DfIJJ5GS.js +0 -673
- package/dist/chunks/PropertyField-DfIJJ5GS.js.map +0 -1
- package/dist/chunks/ResizeHandle-rKVWyeTG.js +0 -79
- package/dist/chunks/ResizeHandle-rKVWyeTG.js.map +0 -1
- package/dist/chunks/Select-ClmKtyWg.js +0 -229
- package/dist/chunks/Select-ClmKtyWg.js.map +0 -1
- package/dist/chunks/Slider-YofwGOI4.js.map +0 -1
- package/dist/chunks/StatusBar-Ca9Dvhhq.js.map +0 -1
- package/dist/chunks/SwatchGrid-BYvA8Bmh.js +0 -73
- package/dist/chunks/SwatchGrid-BYvA8Bmh.js.map +0 -1
- package/dist/chunks/Timeline-B39cwfMB.js.map +0 -1
- package/dist/chunks/Toast-BF9GE0HC.js +0 -126
- package/dist/chunks/Toast-BF9GE0HC.js.map +0 -1
- package/dist/chunks/TokenPanel-CMDAOfYH.js.map +0 -1
- package/dist/chunks/ToolButton-CAHBa08P.js.map +0 -1
- package/dist/chunks/createKeyframeLayer-DVl321_l.js.map +0 -1
- package/dist/chunks/icons-BhcR1l64.js.map +0 -1
- package/dist/chunks/model-BaF65rnX.js +0 -365
- package/dist/chunks/model-BaF65rnX.js.map +0 -1
- package/dist/chunks/portalHost-yTOVuCej.js.map +0 -1
- package/dist/chunks/prefField-BopW9bjx.js +0 -201
- package/dist/chunks/prefField-BopW9bjx.js.map +0 -1
- package/dist/chunks/segmentedControl.module-D6SzYJD7.js +0 -11
- package/dist/chunks/segmentedControl.module-D6SzYJD7.js.map +0 -1
- package/dist/chunks/useReorderDragList-FCMoFIzH.js +0 -131
- package/dist/chunks/useReorderDragList-FCMoFIzH.js.map +0 -1
- package/dist/chunks/useRovingTabIndex-Bp_hYm_h.js +0 -65
- package/dist/chunks/useRovingTabIndex-Bp_hYm_h.js.map +0 -1
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import { n as e, o as t, r as n, t as r } from "./RecentColorsProvider-DHcfk25u.js";
|
|
2
|
+
import { t as i } from "./Select-ouV8O6cp.js";
|
|
3
|
+
import { t as a } from "./SwatchGrid-9ZPiDmxd.js";
|
|
4
|
+
import { getAlpha01 as o } from "@weasel-js/core";
|
|
5
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { useId as u, useState as d } from "react";
|
|
7
|
+
//#region src/components/SwatchStrip/palettes.ts
|
|
8
|
+
var f = {
|
|
9
|
+
id: "standard",
|
|
10
|
+
name: "Standard",
|
|
11
|
+
columns: 10,
|
|
12
|
+
colors: [
|
|
13
|
+
{
|
|
14
|
+
value: null,
|
|
15
|
+
label: "None"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
value: "#ffffffff",
|
|
19
|
+
label: "White"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
value: "#000000ff",
|
|
23
|
+
label: "Black"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
value: "#ff0000ff",
|
|
27
|
+
label: "Red"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
value: "#00ff00ff",
|
|
31
|
+
label: "Green"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
value: "#0000ffff",
|
|
35
|
+
label: "Blue"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
value: "#00ffffff",
|
|
39
|
+
label: "Cyan"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
value: "#ff00ffff",
|
|
43
|
+
label: "Magenta"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
value: "#ffff00ff",
|
|
47
|
+
label: "Yellow"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
value: "#ff8800ff",
|
|
51
|
+
label: "Orange"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
value: "#fafafaff",
|
|
55
|
+
label: "Gray 50"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
value: "#f5f5f5ff",
|
|
59
|
+
label: "Gray 100"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
value: "#e5e5e5ff",
|
|
63
|
+
label: "Gray 200"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
value: "#d4d4d4ff",
|
|
67
|
+
label: "Gray 300"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
value: "#a3a3a3ff",
|
|
71
|
+
label: "Gray 400"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
value: "#737373ff",
|
|
75
|
+
label: "Gray 500"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: "#525252ff",
|
|
79
|
+
label: "Gray 600"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
value: "#404040ff",
|
|
83
|
+
label: "Gray 700"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
value: "#262626ff",
|
|
87
|
+
label: "Gray 800"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
value: "#171717ff",
|
|
91
|
+
label: "Gray 900"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
value: "#fef2f2ff",
|
|
95
|
+
label: "Red 50"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
value: "#fee2e2ff",
|
|
99
|
+
label: "Red 100"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
value: "#fecacaff",
|
|
103
|
+
label: "Red 200"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
value: "#fca5a5ff",
|
|
107
|
+
label: "Red 300"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: "#f87171ff",
|
|
111
|
+
label: "Red 400"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
value: "#ef4444ff",
|
|
115
|
+
label: "Red 500"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
value: "#dc2626ff",
|
|
119
|
+
label: "Red 600"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
value: "#b91c1cff",
|
|
123
|
+
label: "Red 700"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
value: "#991b1bff",
|
|
127
|
+
label: "Red 800"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
value: "#7f1d1dff",
|
|
131
|
+
label: "Red 900"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
value: "#fff7edff",
|
|
135
|
+
label: "Orange 50"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
value: "#ffedd5ff",
|
|
139
|
+
label: "Orange 100"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
value: "#fed7aaff",
|
|
143
|
+
label: "Orange 200"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
value: "#fdba74ff",
|
|
147
|
+
label: "Orange 300"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
value: "#fb923cff",
|
|
151
|
+
label: "Orange 400"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
value: "#f97316ff",
|
|
155
|
+
label: "Orange 500"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
value: "#ea580cff",
|
|
159
|
+
label: "Orange 600"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
value: "#c2410cff",
|
|
163
|
+
label: "Orange 700"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
value: "#9a3412ff",
|
|
167
|
+
label: "Orange 800"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
value: "#7c2d12ff",
|
|
171
|
+
label: "Orange 900"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
value: "#fefce8ff",
|
|
175
|
+
label: "Yellow 50"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
value: "#fef9c3ff",
|
|
179
|
+
label: "Yellow 100"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
value: "#fef08aff",
|
|
183
|
+
label: "Yellow 200"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
value: "#fde047ff",
|
|
187
|
+
label: "Yellow 300"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
value: "#facc15ff",
|
|
191
|
+
label: "Yellow 400"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
value: "#eab308ff",
|
|
195
|
+
label: "Yellow 500"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
value: "#ca8a04ff",
|
|
199
|
+
label: "Yellow 600"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
value: "#a16207ff",
|
|
203
|
+
label: "Yellow 700"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
value: "#854d0eff",
|
|
207
|
+
label: "Yellow 800"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
value: "#713f12ff",
|
|
211
|
+
label: "Yellow 900"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
value: "#f0fdf4ff",
|
|
215
|
+
label: "Green 50"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
value: "#dcfce7ff",
|
|
219
|
+
label: "Green 100"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
value: "#bbf7d0ff",
|
|
223
|
+
label: "Green 200"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
value: "#86efacff",
|
|
227
|
+
label: "Green 300"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
value: "#4ade80ff",
|
|
231
|
+
label: "Green 400"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
value: "#22c55eff",
|
|
235
|
+
label: "Green 500"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
value: "#16a34aff",
|
|
239
|
+
label: "Green 600"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
value: "#15803dff",
|
|
243
|
+
label: "Green 700"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
value: "#166534ff",
|
|
247
|
+
label: "Green 800"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
value: "#14532dff",
|
|
251
|
+
label: "Green 900"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
value: "#ecfeffff",
|
|
255
|
+
label: "Cyan 50"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
value: "#cffafeff",
|
|
259
|
+
label: "Cyan 100"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
value: "#a5f3fcff",
|
|
263
|
+
label: "Cyan 200"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
value: "#67e8f9ff",
|
|
267
|
+
label: "Cyan 300"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
value: "#22d3eeff",
|
|
271
|
+
label: "Cyan 400"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
value: "#06b6d4ff",
|
|
275
|
+
label: "Cyan 500"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
value: "#0891b2ff",
|
|
279
|
+
label: "Cyan 600"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
value: "#0e7490ff",
|
|
283
|
+
label: "Cyan 700"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
value: "#155e75ff",
|
|
287
|
+
label: "Cyan 800"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
value: "#164e63ff",
|
|
291
|
+
label: "Cyan 900"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
value: "#eff6ffff",
|
|
295
|
+
label: "Blue 50"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
value: "#dbeafeff",
|
|
299
|
+
label: "Blue 100"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
value: "#bfdbfeff",
|
|
303
|
+
label: "Blue 200"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
value: "#93c5fdff",
|
|
307
|
+
label: "Blue 300"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
value: "#60a5faff",
|
|
311
|
+
label: "Blue 400"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
value: "#3b82f6ff",
|
|
315
|
+
label: "Blue 500"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
value: "#2563ebff",
|
|
319
|
+
label: "Blue 600"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
value: "#1d4ed8ff",
|
|
323
|
+
label: "Blue 700"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
value: "#1e40afff",
|
|
327
|
+
label: "Blue 800"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
value: "#1e3a8aff",
|
|
331
|
+
label: "Blue 900"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
value: "#faf5ffff",
|
|
335
|
+
label: "Purple 50"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
value: "#f3e8ffff",
|
|
339
|
+
label: "Purple 100"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
value: "#e9d5ffff",
|
|
343
|
+
label: "Purple 200"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
value: "#d8b4feff",
|
|
347
|
+
label: "Purple 300"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
value: "#c084fcff",
|
|
351
|
+
label: "Purple 400"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
value: "#a855f7ff",
|
|
355
|
+
label: "Purple 500"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
value: "#9333eaff",
|
|
359
|
+
label: "Purple 600"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
value: "#7e22ceff",
|
|
363
|
+
label: "Purple 700"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
value: "#6b21a8ff",
|
|
367
|
+
label: "Purple 800"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
value: "#581c87ff",
|
|
371
|
+
label: "Purple 900"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
value: "#fdf2f8ff",
|
|
375
|
+
label: "Pink 50"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
value: "#fce7f3ff",
|
|
379
|
+
label: "Pink 100"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
value: "#fbcfe8ff",
|
|
383
|
+
label: "Pink 200"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
value: "#f9a8d4ff",
|
|
387
|
+
label: "Pink 300"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
value: "#f472b6ff",
|
|
391
|
+
label: "Pink 400"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
value: "#ec4899ff",
|
|
395
|
+
label: "Pink 500"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
value: "#db2777ff",
|
|
399
|
+
label: "Pink 600"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
value: "#be185dff",
|
|
403
|
+
label: "Pink 700"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
value: "#9d174dff",
|
|
407
|
+
label: "Pink 800"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
value: "#831843ff",
|
|
411
|
+
label: "Pink 900"
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
}, p = {
|
|
415
|
+
id: "basic",
|
|
416
|
+
name: "Basic",
|
|
417
|
+
columns: 10,
|
|
418
|
+
colors: [
|
|
419
|
+
{
|
|
420
|
+
value: null,
|
|
421
|
+
label: "None"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
value: "#000000ff",
|
|
425
|
+
label: "Black"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
value: "#ffffffff",
|
|
429
|
+
label: "White"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
value: "#808080ff",
|
|
433
|
+
label: "Gray"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
value: "#c0c0c0ff",
|
|
437
|
+
label: "Silver"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
value: "#800000ff",
|
|
441
|
+
label: "Maroon"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
value: "#ff0000ff",
|
|
445
|
+
label: "Red"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
value: "#ffa500ff",
|
|
449
|
+
label: "Orange"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
value: "#ffff00ff",
|
|
453
|
+
label: "Yellow"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
value: "#808000ff",
|
|
457
|
+
label: "Olive"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
value: "#00ff00ff",
|
|
461
|
+
label: "Lime"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
value: "#008000ff",
|
|
465
|
+
label: "Green"
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
value: "#008080ff",
|
|
469
|
+
label: "Teal"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
value: "#00ffffff",
|
|
473
|
+
label: "Cyan"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
value: "#000080ff",
|
|
477
|
+
label: "Navy"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
value: "#0000ffff",
|
|
481
|
+
label: "Blue"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
value: "#800080ff",
|
|
485
|
+
label: "Purple"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
value: "#ff00ffff",
|
|
489
|
+
label: "Magenta"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
value: "#ffc0cbff",
|
|
493
|
+
label: "Pink"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
value: "#a52a2aff",
|
|
497
|
+
label: "Brown"
|
|
498
|
+
}
|
|
499
|
+
]
|
|
500
|
+
}, m = [f, p], h = {
|
|
501
|
+
root: "_root_hm3rh_1",
|
|
502
|
+
section: "_section_hm3rh_8",
|
|
503
|
+
heading: "_heading_hm3rh_15",
|
|
504
|
+
empty: "_empty_hm3rh_24"
|
|
505
|
+
};
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region src/components/SwatchStrip/SwatchStrip.tsx
|
|
508
|
+
function g(e) {
|
|
509
|
+
let n = t(e) ?? e;
|
|
510
|
+
if (!n.startsWith("#") || n.length !== 9) return n;
|
|
511
|
+
let r = Math.round(o(n) * 100);
|
|
512
|
+
return r === 100 ? n.slice(0, 7) : `${n.slice(0, 7)}, ${r}% opacity`;
|
|
513
|
+
}
|
|
514
|
+
function _(e, n) {
|
|
515
|
+
return e === null || n === null ? e === n : t(e) === t(n);
|
|
516
|
+
}
|
|
517
|
+
function v(t) {
|
|
518
|
+
let { value: o, onChange: f, onAltChange: p, className: v } = t, y = t.palettes ?? m, b = t.columns ?? 10, x = n(), S = t.store ?? x, C = e(S), w = u(), [T, E] = d(t.defaultPalette), D = t.palette ?? T, O = y.find((e) => e.id === D) ?? y[0], k = (e) => {
|
|
519
|
+
E(e), t.onPaletteChange?.(e);
|
|
520
|
+
}, A = C.map((e) => ({
|
|
521
|
+
value: e,
|
|
522
|
+
label: g(e)
|
|
523
|
+
})), j = (e) => o === void 0 ? void 0 : e.find((e) => _(e.value, o))?.value, M = /* @__PURE__ */ l(s, { children: [S && /* @__PURE__ */ l("section", {
|
|
524
|
+
className: h.section,
|
|
525
|
+
"aria-labelledby": w,
|
|
526
|
+
children: [/* @__PURE__ */ c("div", {
|
|
527
|
+
id: w,
|
|
528
|
+
className: h.heading,
|
|
529
|
+
children: "Recent"
|
|
530
|
+
}), A.length > 0 ? /* @__PURE__ */ c(a, {
|
|
531
|
+
"aria-label": "Recent colors",
|
|
532
|
+
options: A,
|
|
533
|
+
value: j(A),
|
|
534
|
+
columns: b,
|
|
535
|
+
onChange: f,
|
|
536
|
+
onAltChange: p
|
|
537
|
+
}) : /* @__PURE__ */ c("p", {
|
|
538
|
+
className: h.empty,
|
|
539
|
+
children: "No recent colors"
|
|
540
|
+
})]
|
|
541
|
+
}), O && /* @__PURE__ */ l("section", {
|
|
542
|
+
className: h.section,
|
|
543
|
+
children: [y.length > 1 ? /* @__PURE__ */ c(i, {
|
|
544
|
+
label: "Palette",
|
|
545
|
+
orientation: "row",
|
|
546
|
+
options: y.map((e) => ({
|
|
547
|
+
value: e.id,
|
|
548
|
+
label: e.name
|
|
549
|
+
})),
|
|
550
|
+
selectedKey: O.id,
|
|
551
|
+
onSelectionChange: k
|
|
552
|
+
}) : /* @__PURE__ */ c("div", {
|
|
553
|
+
className: h.heading,
|
|
554
|
+
children: O.name
|
|
555
|
+
}), /* @__PURE__ */ c(a, {
|
|
556
|
+
"aria-label": O.name,
|
|
557
|
+
options: O.colors,
|
|
558
|
+
value: j(O.colors),
|
|
559
|
+
columns: O.columns ?? b,
|
|
560
|
+
onChange: f,
|
|
561
|
+
onAltChange: p
|
|
562
|
+
}, O.id)]
|
|
563
|
+
})] });
|
|
564
|
+
return /* @__PURE__ */ c("div", {
|
|
565
|
+
className: [h.root, v].filter(Boolean).join(" "),
|
|
566
|
+
role: "group",
|
|
567
|
+
"aria-label": t["aria-label"] ?? "Swatches",
|
|
568
|
+
children: t.store && t.store !== x ? /* @__PURE__ */ c(r, {
|
|
569
|
+
store: t.store,
|
|
570
|
+
children: M
|
|
571
|
+
}) : M
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
//#endregion
|
|
575
|
+
export { f as a, m as i, g as n, p as r, v as t };
|
|
576
|
+
|
|
577
|
+
//# sourceMappingURL=SwatchStrip-Bi9iPLoh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwatchStrip-Bi9iPLoh.js","names":["_Fragment","s","useRecentColors","normalizeRecentColor","useRecentColorsStore","RecentColorsProvider","Select","SwatchGrid","STANDARD_PALETTE","BASIC_PALETTE","BUILTIN_PALETTES","SwatchStrip_module_default","describeColor","c","color","alpha","getAlpha01","same","a","b","SwatchStrip","props","palettes","columns","ctxStore","store","recent","recentHeading","useId","ownPalette","setOwnPalette","useState","paletteId","shown","p","choosePalette","id","recentOptions","currentIn","value","options","o","grids","Fragment","className"],"sources":["../../src/components/SwatchStrip/palettes.ts","../../src/components/SwatchStrip/SwatchStrip.module.css","../../src/components/SwatchStrip/SwatchStrip.tsx"],"sourcesContent":["import type { SwatchGridOption } from '../SwatchGrid';\n\n/** A named set of swatches offered by {@link SwatchStrip}. */\nexport interface SwatchPalette {\n /** Stable key, for the palette choice and for React. */\n id: string;\n /** What the palette picker shows. */\n name: string;\n /** `value: null` is the \"no paint\" swatch. Each `label` is the swatch's\n * accessible name, so it should say the color. */\n colors: readonly SwatchGridOption[];\n /** Swatches per row. Default: the strip's `columns`. */\n columns?: number;\n}\n\n/** No paint, the named primaries and secondaries, a gray ramp, and eight hue\n * ramps of ten shades each (50 → 900). */\nexport const STANDARD_PALETTE: SwatchPalette = {\n id: 'standard',\n name: 'Standard',\n columns: 10,\n colors: [\n { value: null, label: 'None' },\n { value: '#ffffffff', label: 'White' },\n { value: '#000000ff', label: 'Black' },\n { value: '#ff0000ff', label: 'Red' },\n { value: '#00ff00ff', label: 'Green' },\n { value: '#0000ffff', label: 'Blue' },\n { value: '#00ffffff', label: 'Cyan' },\n { value: '#ff00ffff', label: 'Magenta' },\n { value: '#ffff00ff', label: 'Yellow' },\n { value: '#ff8800ff', label: 'Orange' },\n { value: '#fafafaff', label: 'Gray 50' },\n { value: '#f5f5f5ff', label: 'Gray 100' },\n { value: '#e5e5e5ff', label: 'Gray 200' },\n { value: '#d4d4d4ff', label: 'Gray 300' },\n { value: '#a3a3a3ff', label: 'Gray 400' },\n { value: '#737373ff', label: 'Gray 500' },\n { value: '#525252ff', label: 'Gray 600' },\n { value: '#404040ff', label: 'Gray 700' },\n { value: '#262626ff', label: 'Gray 800' },\n { value: '#171717ff', label: 'Gray 900' },\n { value: '#fef2f2ff', label: 'Red 50' },\n { value: '#fee2e2ff', label: 'Red 100' },\n { value: '#fecacaff', label: 'Red 200' },\n { value: '#fca5a5ff', label: 'Red 300' },\n { value: '#f87171ff', label: 'Red 400' },\n { value: '#ef4444ff', label: 'Red 500' },\n { value: '#dc2626ff', label: 'Red 600' },\n { value: '#b91c1cff', label: 'Red 700' },\n { value: '#991b1bff', label: 'Red 800' },\n { value: '#7f1d1dff', label: 'Red 900' },\n { value: '#fff7edff', label: 'Orange 50' },\n { value: '#ffedd5ff', label: 'Orange 100' },\n { value: '#fed7aaff', label: 'Orange 200' },\n { value: '#fdba74ff', label: 'Orange 300' },\n { value: '#fb923cff', label: 'Orange 400' },\n { value: '#f97316ff', label: 'Orange 500' },\n { value: '#ea580cff', label: 'Orange 600' },\n { value: '#c2410cff', label: 'Orange 700' },\n { value: '#9a3412ff', label: 'Orange 800' },\n { value: '#7c2d12ff', label: 'Orange 900' },\n { value: '#fefce8ff', label: 'Yellow 50' },\n { value: '#fef9c3ff', label: 'Yellow 100' },\n { value: '#fef08aff', label: 'Yellow 200' },\n { value: '#fde047ff', label: 'Yellow 300' },\n { value: '#facc15ff', label: 'Yellow 400' },\n { value: '#eab308ff', label: 'Yellow 500' },\n { value: '#ca8a04ff', label: 'Yellow 600' },\n { value: '#a16207ff', label: 'Yellow 700' },\n { value: '#854d0eff', label: 'Yellow 800' },\n { value: '#713f12ff', label: 'Yellow 900' },\n { value: '#f0fdf4ff', label: 'Green 50' },\n { value: '#dcfce7ff', label: 'Green 100' },\n { value: '#bbf7d0ff', label: 'Green 200' },\n { value: '#86efacff', label: 'Green 300' },\n { value: '#4ade80ff', label: 'Green 400' },\n { value: '#22c55eff', label: 'Green 500' },\n { value: '#16a34aff', label: 'Green 600' },\n { value: '#15803dff', label: 'Green 700' },\n { value: '#166534ff', label: 'Green 800' },\n { value: '#14532dff', label: 'Green 900' },\n { value: '#ecfeffff', label: 'Cyan 50' },\n { value: '#cffafeff', label: 'Cyan 100' },\n { value: '#a5f3fcff', label: 'Cyan 200' },\n { value: '#67e8f9ff', label: 'Cyan 300' },\n { value: '#22d3eeff', label: 'Cyan 400' },\n { value: '#06b6d4ff', label: 'Cyan 500' },\n { value: '#0891b2ff', label: 'Cyan 600' },\n { value: '#0e7490ff', label: 'Cyan 700' },\n { value: '#155e75ff', label: 'Cyan 800' },\n { value: '#164e63ff', label: 'Cyan 900' },\n { value: '#eff6ffff', label: 'Blue 50' },\n { value: '#dbeafeff', label: 'Blue 100' },\n { value: '#bfdbfeff', label: 'Blue 200' },\n { value: '#93c5fdff', label: 'Blue 300' },\n { value: '#60a5faff', label: 'Blue 400' },\n { value: '#3b82f6ff', label: 'Blue 500' },\n { value: '#2563ebff', label: 'Blue 600' },\n { value: '#1d4ed8ff', label: 'Blue 700' },\n { value: '#1e40afff', label: 'Blue 800' },\n { value: '#1e3a8aff', label: 'Blue 900' },\n { value: '#faf5ffff', label: 'Purple 50' },\n { value: '#f3e8ffff', label: 'Purple 100' },\n { value: '#e9d5ffff', label: 'Purple 200' },\n { value: '#d8b4feff', label: 'Purple 300' },\n { value: '#c084fcff', label: 'Purple 400' },\n { value: '#a855f7ff', label: 'Purple 500' },\n { value: '#9333eaff', label: 'Purple 600' },\n { value: '#7e22ceff', label: 'Purple 700' },\n { value: '#6b21a8ff', label: 'Purple 800' },\n { value: '#581c87ff', label: 'Purple 900' },\n { value: '#fdf2f8ff', label: 'Pink 50' },\n { value: '#fce7f3ff', label: 'Pink 100' },\n { value: '#fbcfe8ff', label: 'Pink 200' },\n { value: '#f9a8d4ff', label: 'Pink 300' },\n { value: '#f472b6ff', label: 'Pink 400' },\n { value: '#ec4899ff', label: 'Pink 500' },\n { value: '#db2777ff', label: 'Pink 600' },\n { value: '#be185dff', label: 'Pink 700' },\n { value: '#9d174dff', label: 'Pink 800' },\n { value: '#831843ff', label: 'Pink 900' },\n ],\n};\n\n/** No paint and CSS's basic named colors, with pink and brown. */\nexport const BASIC_PALETTE: SwatchPalette = {\n id: 'basic',\n name: 'Basic',\n columns: 10,\n colors: [\n { value: null, label: 'None' },\n { value: '#000000ff', label: 'Black' },\n { value: '#ffffffff', label: 'White' },\n { value: '#808080ff', label: 'Gray' },\n { value: '#c0c0c0ff', label: 'Silver' },\n { value: '#800000ff', label: 'Maroon' },\n { value: '#ff0000ff', label: 'Red' },\n { value: '#ffa500ff', label: 'Orange' },\n { value: '#ffff00ff', label: 'Yellow' },\n { value: '#808000ff', label: 'Olive' },\n { value: '#00ff00ff', label: 'Lime' },\n { value: '#008000ff', label: 'Green' },\n { value: '#008080ff', label: 'Teal' },\n { value: '#00ffffff', label: 'Cyan' },\n { value: '#000080ff', label: 'Navy' },\n { value: '#0000ffff', label: 'Blue' },\n { value: '#800080ff', label: 'Purple' },\n { value: '#ff00ffff', label: 'Magenta' },\n { value: '#ffc0cbff', label: 'Pink' },\n { value: '#a52a2aff', label: 'Brown' },\n ],\n};\n\n/** What {@link SwatchStrip} offers when given no `palettes`. */\nexport const BUILTIN_PALETTES: readonly SwatchPalette[] = [STANDARD_PALETTE, BASIC_PALETTE];\n",".root {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-3);\n min-inline-size: 0;\n}\n\n.section {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-1);\n min-inline-size: 0;\n}\n\n.heading {\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size-xs);\n font-weight: var(--wzl-font-weight-medium);\n text-transform: var(--wzl-params-label-case, uppercase);\n letter-spacing: var(--wzl-params-label-tracking, var(--wzl-tracking-wide));\n color: var(--wzl-fg-muted);\n}\n\n.empty {\n margin: 0;\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg-muted);\n}\n","import { useId, useState, type ReactElement } from 'react';\nimport { getAlpha01 } from '@weasel-js/core';\nimport { SwatchGrid, type SwatchGridOption } from '../SwatchGrid';\nimport { Select } from '../Select';\nimport {\n RecentColorsProvider,\n normalizeRecentColor,\n useRecentColors,\n useRecentColorsStore,\n type RecentColorsStore,\n} from '../RecentColors';\nimport { BUILTIN_PALETTES, type SwatchPalette } from './palettes';\nimport s from './SwatchStrip.module.css';\n\n/** Props for {@link SwatchStrip}. */\nexport interface SwatchStripProps {\n /** The color to mark current, in either row. `null` marks \"no paint\". */\n value?: string | null;\n /** A swatch applied: click, Enter or Space. */\n onChange: (value: string | null) => void;\n /** The alternate target, as on {@link SwatchGrid}: shift-click,\n * right-click, Shift+Enter. */\n onAltChange?: (value: string | null) => void;\n /** The preset palettes on offer. Default {@link BUILTIN_PALETTES}. More\n * than one adds a picker. */\n palettes?: readonly SwatchPalette[];\n /** The shown palette's id, controlled. */\n palette?: string;\n /** The shown palette's id to start on, uncontrolled. Default: the first. */\n defaultPalette?: string;\n onPaletteChange?: (id: string) => void;\n /** Where the recent row reads from and applies record into. Default: the\n * nearest {@link RecentColorsProvider}'s. With neither there is no recent\n * row. */\n store?: RecentColorsStore;\n /** Swatches per row, for the recent row and any palette that sets none.\n * Default 10. */\n columns?: number;\n 'aria-label'?: string;\n className?: string;\n}\n\n/** A color as a screen reader should hear it: the hex, and the opacity\n * when it is not opaque. Any other CSS color reads as written. */\nexport function describeColor(color: string): string {\n const c = normalizeRecentColor(color) ?? color;\n if (!c.startsWith('#') || c.length !== 9) return c;\n const alpha = Math.round(getAlpha01(c) * 100);\n return alpha === 100 ? c.slice(0, 7) : `${c.slice(0, 7)}, ${alpha}% opacity`;\n}\n\nfunction same(a: string | null, b: string | null): boolean {\n if (a === null || b === null) return a === b;\n return normalizeRecentColor(a) === normalizeRecentColor(b);\n}\n\n/**\n * The swatches a color picker sits beside: the recently used colors, most\n * recent first, above a preset palette. Applying any swatch records it, so\n * it moves to the head of the recent row — as does a color committed\n * through any other picker under the same {@link RecentColorsProvider}.\n *\n * Like {@link SwatchGrid} it applies nothing itself; `onChange` and\n * `onAltChange` hand the color to the app.\n */\nexport function SwatchStrip(props: SwatchStripProps): ReactElement {\n const { value, onChange, onAltChange, className } = props;\n const palettes = props.palettes ?? BUILTIN_PALETTES;\n const columns = props.columns ?? 10;\n const ctxStore = useRecentColorsStore();\n const store = props.store ?? ctxStore;\n const recent = useRecentColors(store);\n const recentHeading = useId();\n\n const [ownPalette, setOwnPalette] = useState(props.defaultPalette);\n const paletteId = props.palette ?? ownPalette;\n const shown = palettes.find((p) => p.id === paletteId) ?? palettes[0];\n const choosePalette = (id: string): void => {\n setOwnPalette(id);\n props.onPaletteChange?.(id);\n };\n\n const recentOptions: SwatchGridOption[] = recent.map((c) => ({ value: c, label: describeColor(c) }));\n // Match on the color, not its spelling, so `#F00` lights `#ff0000ff`.\n const currentIn = (options: readonly SwatchGridOption[]): string | null | undefined =>\n value === undefined ? undefined : options.find((o) => same(o.value, value))?.value;\n\n const grids = (\n <>\n {store && (\n <section className={s.section} aria-labelledby={recentHeading}>\n <div id={recentHeading} className={s.heading}>Recent</div>\n {recentOptions.length > 0 ? (\n <SwatchGrid\n aria-label=\"Recent colors\"\n options={recentOptions}\n value={currentIn(recentOptions)}\n columns={columns}\n onChange={onChange}\n onAltChange={onAltChange}\n />\n ) : (\n <p className={s.empty}>No recent colors</p>\n )}\n </section>\n )}\n {shown && (\n <section className={s.section}>\n {palettes.length > 1 ? (\n <Select<string>\n label=\"Palette\"\n orientation=\"row\"\n options={palettes.map((p) => ({ value: p.id, label: p.name }))}\n selectedKey={shown.id}\n onSelectionChange={choosePalette}\n />\n ) : (\n <div className={s.heading}>{shown.name}</div>\n )}\n <SwatchGrid\n key={shown.id}\n aria-label={shown.name}\n options={shown.colors}\n value={currentIn(shown.colors)}\n columns={shown.columns ?? columns}\n onChange={onChange}\n onAltChange={onAltChange}\n />\n </section>\n )}\n </>\n );\n\n return (\n <div\n className={[s.root, className].filter(Boolean).join(' ')}\n role=\"group\"\n aria-label={props['aria-label'] ?? 'Swatches'}\n >\n {/* A store given by prop is where applies here record too. */}\n {props.store && props.store !== ctxStore\n ? <RecentColorsProvider store={props.store}>{grids}</RecentColorsProvider>\n : grids}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAiBA,IAAaQ,I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GAAD;GACE,OAAM;GACN,aAAY;GACZ,SAASgB,EAAS,KAAK,OAAO;IAAE,OAAOY,EAAE;IAAI,OAAOA,EAAE;GAAK,EAAE;GAC7D,aAAaD,EAAM;GACnB,mBAAmBE;EACpB,CAAA,IAED,kBAAC,OAAD;GAAK,WAAWlC,EAAE;GAAU,UAAAgC,EAAM;EAAU,CAAA,GAE9C,kBAAC1B,GAAD;GAEE,cAAY0B,EAAM;GAClB,SAASA,EAAM;GACf,OAAOK,EAAUL,EAAM,MAAM;GAC7B,SAASA,EAAM,WAAWV;GAChB;GACG;EACd,GAPMU,EAAM,EAOZ,CACM;CAEX,CAAA,CAAA,EAAA,CAAA;CAGJ,OACE,kBAAC,OAAD;EACE,WAAW,CAAChC,EAAE,MAAM2C,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACvD,MAAK;EACL,cAAYvB,EAAM,iBAAiB;EAGlC,UAAAA,EAAM,SAASA,EAAM,UAAUG,IAC5B,kBAACnB,GAAD;GAAsB,OAAOgB,EAAM;GAAQ,UAAAqB;EAA4B,CAAA,IACvEA;CACD,CAAA;AAET"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as e, Q as t, Z as n } from "./icons-
|
|
2
|
-
import { t as r } from "./Button-
|
|
1
|
+
import { $ as e, Q as t, Z as n } from "./icons-Dr2-r30x.js";
|
|
2
|
+
import { t as r } from "./Button-XB-T75YL.js";
|
|
3
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/ThemeSwitcher/ThemeSwitcher.tsx
|
|
5
5
|
var a = [
|
|
@@ -35,4 +35,4 @@ function o({ value: e, onChange: t, options: n = a, ariaLabel: o = "Theme", size
|
|
|
35
35
|
//#endregion
|
|
36
36
|
export { o as n, a as t };
|
|
37
37
|
|
|
38
|
-
//# sourceMappingURL=ThemeSwitcher-
|
|
38
|
+
//# sourceMappingURL=ThemeSwitcher-DiBmMh_B.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeSwitcher-
|
|
1
|
+
{"version":3,"file":"ThemeSwitcher-DiBmMh_B.js","names":["ModeLightIcon","ModeDarkIcon","ModeAutoIcon","Button","COLOR_MODE_OPTIONS","ThemeSwitcher","count","options","index","o","value","current","next","previous","name","ariaLabel","onChange","event"],"sources":["../../src/components/ThemeSwitcher/ThemeSwitcher.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport type { ColorModePreference } from '@weasel-js/theme';\nimport { ModeAutoIcon, ModeDarkIcon, ModeLightIcon } from '../../icons';\nimport { Button, type ButtonSize, type ButtonVariant } from '../Button/Button';\n\n/** One stop in a {@link ThemeSwitcher}'s rotation. */\nexport interface ThemeSwitcherOption<T extends string = string> {\n value: T;\n /** Drawn in the button while this option is current. */\n icon: ReactNode;\n /** The option's name, read in the accessible name and tooltip. */\n label: string;\n}\n\n/** The color modes, in rotation order, as {@link ThemeSwitcher} cycles them by default. */\nexport const COLOR_MODE_OPTIONS: readonly ThemeSwitcherOption<ColorModePreference>[] = [\n { value: 'auto', icon: <ModeAutoIcon size={16} />, label: 'Auto' },\n { value: 'light', icon: <ModeLightIcon size={16} />, label: 'Light' },\n { value: 'dark', icon: <ModeDarkIcon size={16} />, label: 'Dark' },\n];\n\n/** Props for {@link ThemeSwitcher}. */\nexport interface ThemeSwitcherProps<T extends string = ColorModePreference> {\n value: T;\n onChange: (next: T) => void;\n /** The rotation, in order. Defaults to {@link COLOR_MODE_OPTIONS}. */\n options?: readonly ThemeSwitcherOption<T>[];\n /** What is being switched, leading the accessible name and tooltip\n * (`Theme: Auto — click for Light`). Defaults to `'Theme'`. */\n ariaLabel?: string;\n /** Defaults to `sm`, the size of a header's icon buttons. */\n size?: ButtonSize;\n /** Defaults to `ghost`. */\n variant?: ButtonVariant;\n className?: string;\n}\n\n/**\n * One icon button that steps through a list of options: a click moves to the\n * next, a shift-click to the previous, both wrapping. It shows the current\n * option's icon, and its name and tooltip say what is current and what a\n * click chooses. The compact alternative to `ColorModeControl`'s three\n * segments. Controlled: pair the default color modes with\n * `useColorModePreference` from `@weasel-js/theme/react`.\n */\nexport function ThemeSwitcher<T extends string = ColorModePreference>({\n value,\n onChange,\n options = COLOR_MODE_OPTIONS as unknown as readonly ThemeSwitcherOption<T>[],\n ariaLabel = 'Theme',\n size = 'sm',\n variant = 'ghost',\n className,\n}: ThemeSwitcherProps<T>): ReactElement {\n const count = options.length;\n const index = Math.max(0, options.findIndex((o) => o.value === value));\n const current = options[index];\n const next = options[(index + 1) % count];\n const previous = options[(index - 1 + count) % count];\n const name = `${ariaLabel}: ${current.label} — click for ${next.label}`;\n\n return (\n <Button\n variant={variant}\n size={size}\n iconOnly\n ariaLabel={name}\n tooltip={name}\n className={className}\n onClick={(event) => onChange((event.shiftKey ? previous : next).value)}\n >\n {current.icon}\n </Button>\n );\n}\n"],"mappings":";;;;AAeA,IAAaI,IAA0E;CACrF;EAAE,OAAO;EAAQ,MAAM,kBAACF,GAAD,EAAc,MAAM,GAAK,CAAA;EAAG,OAAO;CAAO;CACjE;EAAE,OAAO;EAAS,MAAM,kBAACF,GAAD,EAAe,MAAM,GAAK,CAAA;EAAG,OAAO;CAAQ;CACpE;EAAE,OAAO;EAAQ,MAAM,kBAACC,GAAD,EAAc,MAAM,GAAK,CAAA;EAAG,OAAO;CAAO;AACnE;AA0BA,SAAgBI,EAAsD,EACpE,UACA,aACA,aAAUD,GACV,eAAY,SACZ,UAAO,MACP,aAAU,SACV,gBACsC;CACtC,IAAME,IAAQC,EAAQ,QAChBC,IAAQ,KAAK,IAAI,GAAGD,EAAQ,WAAW,MAAME,EAAE,UAAUC,CAAK,CAAC,GAC/DC,IAAUJ,EAAQC,IAClBI,IAAOL,GAASC,IAAQ,KAAKF,IAC7BO,IAAWN,GAASC,IAAQ,IAAIF,KAASA,IACzCQ,IAAO,GAAGC,EAAU,IAAIJ,EAAQ,MAAM,eAAeC,EAAK;CAEhE,OACE,kBAACT,GAAD;EACW;EACH;EACN,UAAA;EACA,WAAWW;EACX,SAASA;EACE;EACX,UAAU,MAAUE,GAAUC,EAAM,WAAWJ,IAAWD,EAAA,CAAM,KAAK;EAEpE,UAAAD,EAAQ;CACH,CAAA;AAEZ"}
|