@weasel-js/ui 1.5.1 → 1.5.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-GZdcfdQL.js → ActionBar-CLwiY3Jg.js} +5 -5
- package/dist/chunks/ActionBar-CLwiY3Jg.js.map +1 -0
- package/dist/chunks/{ActionsBar-Fhx_40iP.js → ActionsBar-D84a4eGy.js} +2 -2
- package/dist/chunks/{ActionsBar-Fhx_40iP.js.map → ActionsBar-D84a4eGy.js.map} +1 -1
- package/dist/chunks/{Badge-Bf8Rd1R6.js → Badge-CW9pBPFl.js} +5 -5
- package/dist/chunks/Badge-CW9pBPFl.js.map +1 -0
- package/dist/chunks/{BandEditor-D8I5Uun-.js → BandEditor-jY-PFKY6.js} +12 -12
- package/dist/chunks/BandEditor-jY-PFKY6.js.map +1 -0
- package/dist/chunks/{Button-CExdkQcU.js → Button-DRSApvnK.js} +15 -15
- package/dist/chunks/Button-DRSApvnK.js.map +1 -0
- package/dist/chunks/{Callout-cx5_CWcW.js → Callout-DrNu-9Qr.js} +12 -12
- package/dist/chunks/Callout-DrNu-9Qr.js.map +1 -0
- package/dist/chunks/{Checkbox-BZZsPaVF.js → Checkbox-BOsDAY2F.js} +5 -5
- package/dist/chunks/Checkbox-BOsDAY2F.js.map +1 -0
- package/dist/chunks/{ColorField-YVf8irfr.js → ColorField-BYzgZM9o.js} +6 -6
- package/dist/chunks/ColorField-BYzgZM9o.js.map +1 -0
- package/dist/chunks/{ComboBox-D57tNYDD.js → ComboBox-Cz3f0Y_8.js} +13 -13
- package/dist/chunks/ComboBox-Cz3f0Y_8.js.map +1 -0
- package/dist/chunks/{CurveEditor-BXiMoN9d.js → CurveEditor-DXwSP-iA.js} +2 -2
- package/dist/chunks/{CurveEditor-BXiMoN9d.js.map → CurveEditor-DXwSP-iA.js.map} +1 -1
- package/dist/chunks/{DataGrid-BVdDMZkQ.js → DataGrid-C8KrYtw7.js} +11 -11
- package/dist/chunks/DataGrid-C8KrYtw7.js.map +1 -0
- package/dist/chunks/{DetentSlider-BWNSv07Z.js → DetentSlider-CAubVX0J.js} +2 -2
- package/dist/chunks/{DetentSlider-BWNSv07Z.js.map → DetentSlider-CAubVX0J.js.map} +1 -1
- package/dist/chunks/{Dialog-DuOzsR2g.js → Dialog-fGqqQ6o_.js} +9 -9
- package/dist/chunks/Dialog-fGqqQ6o_.js.map +1 -0
- package/dist/chunks/{Disclosure-9UgDzc7Z.js → Disclosure-CILDfWsU.js} +6 -6
- package/dist/chunks/Disclosure-CILDfWsU.js.map +1 -0
- package/dist/chunks/{Field-BNqvUJfg.js → Field-DWnV8WZY.js} +6 -6
- package/dist/chunks/Field-DWnV8WZY.js.map +1 -0
- package/dist/chunks/{FontFamilySelect-CO19kyOO.js → FontFamilySelect-DxfgTC3G.js} +2 -2
- package/dist/chunks/{FontFamilySelect-CO19kyOO.js.map → FontFamilySelect-DxfgTC3G.js.map} +1 -1
- package/dist/chunks/{GradientEditor-B_ymIr4Q.js → GradientEditor-rRBmf3G0.js} +7 -7
- package/dist/chunks/GradientEditor-rRBmf3G0.js.map +1 -0
- package/dist/chunks/{Icon-QhLhaGFe.js → Icon-DT0x6HaQ.js} +23 -2
- package/dist/chunks/Icon-DT0x6HaQ.js.map +1 -0
- package/dist/chunks/{Input-B9Vh7ASP.js → Input-DbMKpkXy.js} +5 -5
- package/dist/chunks/Input-DbMKpkXy.js.map +1 -0
- package/dist/chunks/{ItemList-BZJQReXD.js → ItemList-B9zYb0GE.js} +7 -7
- package/dist/chunks/ItemList-B9zYb0GE.js.map +1 -0
- package/dist/chunks/{Jog-BYrxbAQU.js → Jog-DkkTlL3_.js} +8 -8
- package/dist/chunks/Jog-DkkTlL3_.js.map +1 -0
- package/dist/chunks/{Keycaps-CGNQV2Pz.js → Keycaps-DunVpejA.js} +5 -5
- package/dist/chunks/{Keycaps-CGNQV2Pz.js.map → Keycaps-DunVpejA.js.map} +1 -1
- package/dist/chunks/{LayerStack-DOylrQcm.js → LayerStack-CfQ6GsRz.js} +18 -18
- package/dist/chunks/LayerStack-CfQ6GsRz.js.map +1 -0
- package/dist/chunks/{MenuButton-DGE-0DP0.js → MenuButton-C_4nox39.js} +7 -7
- package/dist/chunks/MenuButton-C_4nox39.js.map +1 -0
- package/dist/chunks/{MeshEditor-CHoGQ9K8.js → MeshEditor-Bipz-Ocl.js} +8 -8
- package/dist/chunks/MeshEditor-Bipz-Ocl.js.map +1 -0
- package/dist/chunks/{NumberField-CQzS6TjF.js → NumberField-CCjEDZCg.js} +9 -9
- package/dist/chunks/NumberField-CCjEDZCg.js.map +1 -0
- package/dist/chunks/{OptionsBar-BWaYG_OH.js → OptionsBar-DeQ-vUeZ.js} +2 -2
- package/dist/chunks/{OptionsBar-BWaYG_OH.js.map → OptionsBar-DeQ-vUeZ.js.map} +1 -1
- package/dist/chunks/{PaintField-BVYMu3OI.js → PaintField-jBOJ32rL.js} +8 -8
- package/dist/chunks/PaintField-jBOJ32rL.js.map +1 -0
- package/dist/chunks/{PaintInput-BzAHCKro.js → PaintInput-Qs7Rul5R.js} +10 -10
- package/dist/chunks/PaintInput-Qs7Rul5R.js.map +1 -0
- package/dist/chunks/{PatternPicker-C4OryrYi.js → PatternPicker-BMpXWboq.js} +6 -6
- package/dist/chunks/PatternPicker-BMpXWboq.js.map +1 -0
- package/dist/chunks/{Plot2D-Czvyt_vG.js → Plot2D-CXf_f7QD.js} +1 -1
- package/dist/chunks/{Plot2D-Czvyt_vG.js.map → Plot2D-CXf_f7QD.js.map} +1 -1
- package/dist/chunks/{PointPlotter-Xvb98GwB.js → PointPlotter-S_gz7VYt.js} +2 -2
- package/dist/chunks/{PointPlotter-Xvb98GwB.js.map → PointPlotter-S_gz7VYt.js.map} +1 -1
- package/dist/chunks/{Powerline-B_EH-7Z-.js → Powerline-Ak5AWUlK.js} +5 -5
- package/dist/chunks/Powerline-Ak5AWUlK.js.map +1 -0
- package/dist/chunks/Prefs-CNC8tzyN.js +308 -0
- package/dist/chunks/Prefs-CNC8tzyN.js.map +1 -0
- package/dist/chunks/{Properties-B3KU69NI.js → Properties-Rnb6TAbN.js} +230 -213
- package/dist/chunks/Properties-Rnb6TAbN.js.map +1 -0
- package/dist/chunks/{RadioGroup-C6xpdQNg.js → RadioGroup-CsVp3SEu.js} +6 -6
- package/dist/chunks/RadioGroup-CsVp3SEu.js.map +1 -0
- package/dist/chunks/{RangeSlider-CzgeGLVS.js → RangeSlider-DNr-pJpZ.js} +8 -8
- package/dist/chunks/RangeSlider-DNr-pJpZ.js.map +1 -0
- package/dist/chunks/{ResizeHandle-1Ey8AOij.js → ResizeHandle-RXFf5fXr.js} +1 -1
- package/dist/chunks/{ResizeHandle-1Ey8AOij.js.map → ResizeHandle-RXFf5fXr.js.map} +1 -1
- package/dist/chunks/Select-BEope086.js +190 -0
- package/dist/chunks/Select-BEope086.js.map +1 -0
- package/dist/chunks/SelectionPanel-CEbLS-0D.js +102 -0
- package/dist/chunks/SelectionPanel-CEbLS-0D.js.map +1 -0
- package/dist/chunks/{Sidebar-BlUjn8lD.js → Sidebar-qn_oSCNX.js} +4 -4
- package/dist/chunks/Sidebar-qn_oSCNX.js.map +1 -0
- package/dist/chunks/{SidebarPanel-BqHfz6VK.js → SidebarPanel-Bs6V21hg.js} +12 -12
- package/dist/chunks/SidebarPanel-Bs6V21hg.js.map +1 -0
- package/dist/chunks/{Slider-B2ywUZH6.js → Slider-CIIrqiFS.js} +18 -18
- package/dist/chunks/Slider-CIIrqiFS.js.map +1 -0
- package/dist/chunks/{StatusBar-BFt7Yw5O.js → StatusBar-B4L15DSm.js} +6 -6
- package/dist/chunks/StatusBar-B4L15DSm.js.map +1 -0
- package/dist/chunks/{Switch-Om3t3ASc.js → Switch-DH5POG0T.js} +5 -5
- package/dist/chunks/Switch-DH5POG0T.js.map +1 -0
- package/dist/chunks/{Tabs-EAvYywil.js → Tabs-BFHikpml.js} +5 -5
- package/dist/chunks/Tabs-BFHikpml.js.map +1 -0
- package/dist/chunks/{Timeline-BEyKaBXl.js → Timeline-DNKY_yiK.js} +40 -40
- package/dist/chunks/Timeline-DNKY_yiK.js.map +1 -0
- package/dist/chunks/{Toast-iqLDD_XZ.js → Toast-CI1UDuK6.js} +15 -15
- package/dist/chunks/Toast-CI1UDuK6.js.map +1 -0
- package/dist/chunks/{ToggleBar--9As2PWG.js → ToggleBar-CClus5Cd.js} +8 -8
- package/dist/chunks/ToggleBar-CClus5Cd.js.map +1 -0
- package/dist/chunks/TokenPanel-BPHq24dc.js +634 -0
- package/dist/chunks/TokenPanel-BPHq24dc.js.map +1 -0
- package/dist/chunks/{ToolButton-Dd-1T5aX.js → ToolButton-9QzJCmuM.js} +7 -7
- package/dist/chunks/ToolButton-9QzJCmuM.js.map +1 -0
- package/dist/chunks/{ToolGroup-BBI-W-Gm.js → ToolGroup-BJiDrH_i.js} +3 -3
- package/dist/chunks/ToolGroup-BJiDrH_i.js.map +1 -0
- package/dist/chunks/ToolOptionsBar-CAM6RcUH.js +85 -0
- package/dist/chunks/ToolOptionsBar-CAM6RcUH.js.map +1 -0
- package/dist/chunks/{ToolPalette-BmTDDpmz.js → ToolPalette-DGkKwE7D.js} +8 -8
- package/dist/chunks/ToolPalette-DGkKwE7D.js.map +1 -0
- package/dist/chunks/{Tooltip-BHre_vbI.js → Tooltip-C4YBczLq.js} +3 -3
- package/dist/chunks/Tooltip-C4YBczLq.js.map +1 -0
- package/dist/chunks/{createKeyframeLayer-7j7ukrSx.js → createKeyframeLayer-DKtO0Sw_.js} +3 -3
- package/dist/chunks/{createKeyframeLayer-7j7ukrSx.js.map → createKeyframeLayer-DKtO0Sw_.js.map} +1 -1
- package/dist/chunks/{icons-Btrs-JD7.js → icons-DFLytcui.js} +2 -2
- package/dist/chunks/{icons-Btrs-JD7.js.map → icons-DFLytcui.js.map} +1 -1
- package/dist/chunks/model-13kZ_-mE.js +483 -0
- package/dist/chunks/model-13kZ_-mE.js.map +1 -0
- package/dist/chunks/number-BHz66zQO.js +89 -0
- package/dist/chunks/number-BHz66zQO.js.map +1 -0
- package/dist/chunks/{schema-MCVT1MLv.js → schema-Dft4Cu2p.js} +1 -1
- package/dist/chunks/schema-Dft4Cu2p.js.map +1 -0
- package/dist/chunks/segmentedControl.module-DS72X1ns.js +11 -0
- package/dist/chunks/segmentedControl.module-DS72X1ns.js.map +1 -0
- package/dist/chunks/{snap-B0WQwetQ.js → snap-CEjuWOhN.js} +1 -1
- package/dist/chunks/{snap-B0WQwetQ.js.map → snap-CEjuWOhN.js.map} +1 -1
- package/dist/chunks/useRovingTabIndex-Dkpf_KhN.js.map +1 -1
- package/dist/color/oklch.d.ts +2 -1
- package/dist/color/oklch.d.ts.map +1 -1
- package/dist/components/ActionBar/index.js +1 -1
- package/dist/components/ActionsBar/index.js +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/BandEditor/index.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Callout/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/ColorField/index.js +1 -1
- package/dist/components/ComboBox/index.js +1 -1
- package/dist/components/CurveEditor/index.js +3 -3
- package/dist/components/DataGrid/index.js +1 -1
- package/dist/components/DetentSlider/index.js +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Disclosure/index.js +1 -1
- package/dist/components/Field/index.js +1 -1
- package/dist/components/FontFamilySelect/index.js +1 -1
- package/dist/components/GradientEditor/index.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/ItemList/index.js +1 -1
- package/dist/components/Jog/index.js +1 -1
- package/dist/components/Keycaps/index.js +1 -1
- package/dist/components/LayerStack/index.js +1 -1
- package/dist/components/MenuButton/index.js +1 -1
- package/dist/components/MeshEditor/index.js +1 -1
- package/dist/components/NumberField/UnitField.d.ts +2 -1
- package/dist/components/NumberField/UnitField.d.ts.map +1 -1
- package/dist/components/NumberField/index.js +1 -1
- package/dist/components/OptionsBar/index.js +1 -1
- package/dist/components/PaintField/index.js +1 -1
- package/dist/components/PaintInput/index.js +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/index.js +2 -2
- package/dist/components/Prefs/schema.d.ts +2 -1
- package/dist/components/Prefs/schema.d.ts.map +1 -1
- package/dist/components/Properties/PropertyGroup.d.ts +7 -1
- package/dist/components/Properties/PropertyGroup.d.ts.map +1 -1
- package/dist/components/Properties/PropertyPanel.d.ts +36 -38
- package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
- package/dist/components/Properties/index.d.ts +2 -4
- package/dist/components/Properties/index.d.ts.map +1 -1
- package/dist/components/Properties/index.js +2 -2
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/RangeSlider/index.js +1 -1
- package/dist/components/ResizeHandle/index.js +1 -1
- package/dist/components/Select/Select.d.ts +18 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/SelectionPanel/SelectionPanel.d.ts +3 -50
- package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -1
- package/dist/components/SelectionPanel/index.js +3 -2
- package/dist/components/SelectionPanel/model.d.ts +4 -1
- package/dist/components/SelectionPanel/model.d.ts.map +1 -1
- package/dist/components/SelectionPanel/renderLeaf.d.ts +106 -0
- package/dist/components/SelectionPanel/renderLeaf.d.ts.map +1 -0
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/SidebarPanel/index.js +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/StatusBar/index.js +1 -1
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Timeline/index.js +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/ToggleBar/index.js +1 -1
- package/dist/components/TokenPanel/TokenPanel.d.ts +10 -4
- package/dist/components/TokenPanel/TokenPanel.d.ts.map +1 -1
- package/dist/components/TokenPanel/index.d.ts +2 -2
- package/dist/components/TokenPanel/index.d.ts.map +1 -1
- package/dist/components/TokenPanel/index.js +2 -2
- package/dist/components/TokenPanel/tokenTypes.d.ts +24 -0
- package/dist/components/TokenPanel/tokenTypes.d.ts.map +1 -1
- package/dist/components/ToolButton/index.js +1 -1
- package/dist/components/ToolGroup/index.js +1 -1
- package/dist/components/ToolOptionsBar/ToolOptionsBar.d.ts +29 -18
- package/dist/components/ToolOptionsBar/ToolOptionsBar.d.ts.map +1 -1
- package/dist/components/ToolOptionsBar/index.js +1 -1
- package/dist/components/ToolPalette/ToolPalette.d.ts +5 -4
- package/dist/components/ToolPalette/ToolPalette.d.ts.map +1 -1
- package/dist/components/ToolPalette/index.js +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/format/number.d.ts +10 -1
- package/dist/format/number.d.ts.map +1 -1
- package/dist/icons/paths.d.ts +9 -1
- package/dist/icons/paths.d.ts.map +1 -1
- package/dist/index.js +69 -75
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/useRovingTabIndex.d.ts +7 -5
- package/dist/useRovingTabIndex.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/chunks/ActionBar-GZdcfdQL.js.map +0 -1
- package/dist/chunks/Badge-Bf8Rd1R6.js.map +0 -1
- package/dist/chunks/BandEditor-D8I5Uun-.js.map +0 -1
- package/dist/chunks/Button-CExdkQcU.js.map +0 -1
- package/dist/chunks/Callout-cx5_CWcW.js.map +0 -1
- package/dist/chunks/Checkbox-BZZsPaVF.js.map +0 -1
- package/dist/chunks/ColorField-YVf8irfr.js.map +0 -1
- package/dist/chunks/ComboBox-D57tNYDD.js.map +0 -1
- package/dist/chunks/DataGrid-BVdDMZkQ.js.map +0 -1
- package/dist/chunks/Dialog-DuOzsR2g.js.map +0 -1
- package/dist/chunks/Disclosure-9UgDzc7Z.js.map +0 -1
- package/dist/chunks/Field-BNqvUJfg.js.map +0 -1
- package/dist/chunks/GradientEditor-B_ymIr4Q.js.map +0 -1
- package/dist/chunks/Icon-QhLhaGFe.js.map +0 -1
- package/dist/chunks/Input-B9Vh7ASP.js.map +0 -1
- package/dist/chunks/ItemList-BZJQReXD.js.map +0 -1
- package/dist/chunks/Jog-BYrxbAQU.js.map +0 -1
- package/dist/chunks/LayerStack-DOylrQcm.js.map +0 -1
- package/dist/chunks/MenuButton-DGE-0DP0.js.map +0 -1
- package/dist/chunks/MeshEditor-CHoGQ9K8.js.map +0 -1
- package/dist/chunks/NumberField-CQzS6TjF.js.map +0 -1
- package/dist/chunks/PaintField-BVYMu3OI.js.map +0 -1
- package/dist/chunks/PaintInput-BzAHCKro.js.map +0 -1
- package/dist/chunks/PatternPicker-C4OryrYi.js.map +0 -1
- package/dist/chunks/Powerline-B_EH-7Z-.js.map +0 -1
- package/dist/chunks/Prefs-FuaJBs3t.js +0 -308
- package/dist/chunks/Prefs-FuaJBs3t.js.map +0 -1
- package/dist/chunks/Properties-B3KU69NI.js.map +0 -1
- package/dist/chunks/RadioGroup-C6xpdQNg.js.map +0 -1
- package/dist/chunks/RangeSlider-CzgeGLVS.js.map +0 -1
- package/dist/chunks/Select-BMYVh10x.js +0 -127
- package/dist/chunks/Select-BMYVh10x.js.map +0 -1
- package/dist/chunks/SelectionPanel-DTpcQidl.js +0 -572
- package/dist/chunks/SelectionPanel-DTpcQidl.js.map +0 -1
- package/dist/chunks/Sidebar-BlUjn8lD.js.map +0 -1
- package/dist/chunks/SidebarPanel-BqHfz6VK.js.map +0 -1
- package/dist/chunks/Slider-B2ywUZH6.js.map +0 -1
- package/dist/chunks/StatusBar-BFt7Yw5O.js.map +0 -1
- package/dist/chunks/Switch-Om3t3ASc.js.map +0 -1
- package/dist/chunks/Tabs-EAvYywil.js.map +0 -1
- package/dist/chunks/Timeline-BEyKaBXl.js.map +0 -1
- package/dist/chunks/Toast-iqLDD_XZ.js.map +0 -1
- package/dist/chunks/ToggleBar--9As2PWG.js.map +0 -1
- package/dist/chunks/TokenPanel-BL9hlq7x.js +0 -374
- package/dist/chunks/TokenPanel-BL9hlq7x.js.map +0 -1
- package/dist/chunks/ToolButton-Dd-1T5aX.js.map +0 -1
- package/dist/chunks/ToolGroup-BBI-W-Gm.js.map +0 -1
- package/dist/chunks/ToolOptionsBar-B2xPWzJf.js +0 -27
- package/dist/chunks/ToolOptionsBar-B2xPWzJf.js.map +0 -1
- package/dist/chunks/ToolPalette-BmTDDpmz.js.map +0 -1
- package/dist/chunks/Tooltip-BHre_vbI.js.map +0 -1
- package/dist/chunks/number-f6PydOZK.js +0 -52
- package/dist/chunks/number-f6PydOZK.js.map +0 -1
- package/dist/chunks/schema-MCVT1MLv.js.map +0 -1
- package/dist/chunks/segmentedControl.module-DmeUMYe3.js +0 -11
- package/dist/chunks/segmentedControl.module-DmeUMYe3.js.map +0 -1
- package/dist/components/Properties/PinDot.d.ts +0 -18
- package/dist/components/Properties/PinDot.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup-C6xpdQNg.js","names":[],"sources":["../../src/components/RadioGroup/RadioGroup.module.css","../../src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":[".group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n font-family: var(--wzl-font-ui);\n color: var(--wzl-fg);\n}\n\n.group[data-orientation=\"horizontal\"] {\n flex-direction: row;\n gap: 16px;\n}\n\n.legend {\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-font-weight-medium);\n color: var(--wzl-fg);\n}\n\n.radio {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n font-size: var(--wzl-font-size);\n color: var(--wzl-fg);\n user-select: none;\n -webkit-user-select: none;\n}\n\n.radio[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.dot {\n position: relative;\n flex: 0 0 auto;\n width: 14px;\n height: 14px;\n background: var(--wzl-surface-sunken);\n border: 1px solid var(--wzl-border-strong);\n border-radius: 50%;\n transition: border-color var(--wzl-motion-fast), box-shadow var(--wzl-motion-fast);\n}\n\n.radio[data-focus-visible] .dot {\n box-shadow: 0 0 0 2px var(--wzl-focus-ring);\n}\n\n.radio[data-hovered]:not([data-disabled]) .dot {\n border-color: var(--wzl-fg-muted);\n}\n\n.radio[data-selected] .dot {\n border-color: var(--wzl-accent-strong);\n}\n\n.dot::after {\n content: '';\n position: absolute;\n inset: 3px;\n border-radius: 50%;\n background: var(--wzl-accent-strong);\n transform: scale(0);\n transition: transform var(--wzl-motion-fast);\n}\n\n.radio[data-selected] .dot::after {\n transform: scale(1);\n}\n","import type { ReactNode } from 'react';\nimport {\n RadioGroup as RACRadioGroup,\n Radio as RACRadio,\n Label,\n Text,\n FieldError,\n type RadioGroupProps as RACRadioGroupProps,\n type RadioProps as RACRadioProps,\n type ValidationResult,\n} from 'react-aria-components';\nimport { fieldClasses } from '../Field/Field';\nimport s from './RadioGroup.module.css';\n\n/** Props for {@link RadioGroup}, on top of React Aria's `RadioGroup` props. */\nexport type RadioGroupProps = Omit<RACRadioGroupProps, 'children' | 'className'> & {\n label?: ReactNode;\n description?: ReactNode;\n errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);\n children?: ReactNode;\n className?: string;\n};\n\n/**\n * A set of mutually exclusive choices, wrapping React Aria's RadioGroup and\n * supplying the same label / description / errorMessage slots as `Input`.\n * Holds {@link Radio} children.\n */\nexport function RadioGroup(props: RadioGroupProps) {\n const { label, description, errorMessage, children, className, ...rest } = props;\n return (\n <RACRadioGroup\n {...rest}\n className={[s.group, fieldClasses.root, className].filter(Boolean).join(' ')}\n >\n {label !== undefined && <Label className={s.legend}>{label}</Label>}\n {children}\n {description !== undefined && (\n <Text slot=\"description\" className={fieldClasses.hint}>\n {description}\n </Text>\n )}\n <FieldError className={fieldClasses.error}>{errorMessage}</FieldError>\n </RACRadioGroup>\n );\n}\n\n/** Props for {@link Radio}, on top of React Aria's `Radio` props. */\nexport type RadioProps = Omit<RACRadioProps, 'className' | 'children'> & {\n children?: ReactNode;\n className?: string;\n};\n\n/** One choice in a {@link RadioGroup}. The label is passed as children. */\nexport function Radio({ children, className, ...rest }: RadioProps) {\n return (\n <RACRadio {...rest} className={[s.radio, className].filter(Boolean).join(' ')}>\n <span className={s.dot} />\n {children !== undefined && <span>{children}</span>}\n </RACRadio>\n );\n}\n"],"mappings":";;;;;;;;;;;AC4BA,SAAgB,EAAW,GAAwB;CACjD,IAAM,EAAE,UAAO,gBAAa,iBAAc,aAAU,cAAW,GAAG,MAAS;AAC3E,QACE,kBAAC,GAAD;EACE,GAAI;EACJ,WAAW;GAAC,EAAE;GAAO,EAAa;GAAM;GAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;YAF9E;GAIG,MAAU,KAAA,KAAa,kBAAC,GAAD;IAAO,WAAW,EAAE;cAAS;IAAc,CAAA;GAClE;GACA,MAAgB,KAAA,KACf,kBAAC,GAAD;IAAM,MAAK;IAAc,WAAW,EAAa;cAC9C;IACI,CAAA;GAET,kBAAC,GAAD;IAAY,WAAW,EAAa;cAAQ;IAA0B,CAAA;GACxD;;;AAWpB,SAAgB,EAAM,EAAE,aAAU,cAAW,GAAG,KAAoB;AAClE,QACE,kBAAC,GAAD;EAAU,GAAI;EAAM,WAAW,CAAC,EAAE,OAAO,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;YAA7E,CACE,kBAAC,QAAD,EAAM,WAAW,EAAE,KAAO,CAAA,EACzB,MAAa,KAAA,KAAa,kBAAC,QAAD,EAAO,aAAgB,CAAA,CACzC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RangeSlider-CzgeGLVS.js","names":[],"sources":["../../src/components/RangeSlider/RangeSlider.module.css","../../src/components/RangeSlider/RangeSlider.tsx"],"sourcesContent":[".slider {\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 4px;\n font-family: var(--wzl-font-ui);\n color: var(--wzl-fg);\n}\n\n.slider[data-orientation=\"vertical\"] {\n flex-direction: row;\n align-items: stretch;\n width: 28px;\n height: 160px;\n}\n\n.head {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 8px;\n}\n\n.label {\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-font-weight-medium);\n color: var(--wzl-fg);\n}\n\n.output {\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg-subtle);\n font-variant-numeric: tabular-nums;\n}\n\n.track {\n position: relative;\n height: 6px;\n background: var(--wzl-surface-sunken);\n border: 1px solid var(--wzl-border);\n border-radius: var(--wzl-radius-sm);\n}\n\n.slider[data-orientation=\"vertical\"] .track {\n width: 6px;\n height: 100%;\n}\n\n.fill {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n background: var(--wzl-accent-strong);\n border-radius: var(--wzl-radius-sm);\n}\n\n.thumb {\n width: 14px;\n height: 14px;\n background: var(--wzl-fg-muted);\n border: 1px solid var(--wzl-border-strong);\n border-radius: 50%;\n cursor: ew-resize;\n outline: none;\n transition: box-shadow var(--wzl-motion-fast);\n}\n\n.slider[data-orientation=\"vertical\"] .thumb {\n cursor: ns-resize;\n}\n\n.thumb[data-focus-visible] {\n box-shadow: 0 0 0 2px var(--wzl-focus-ring);\n}\n\n.thumb[data-dragging] {\n background: var(--wzl-accent-strong);\n}\n\n.slider[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n","import type { ReactNode } from 'react';\nimport {\n Slider as RACSlider,\n SliderOutput,\n SliderTrack,\n SliderThumb,\n Label,\n type SliderProps as RACSliderProps,\n} from 'react-aria-components';\nimport s from './RangeSlider.module.css';\n\n/** Props for {@link RangeSlider}, on top of React Aria's `Slider` props. */\nexport type RangeSliderProps = Omit<RACSliderProps, 'children' | 'className'> & {\n label?: ReactNode;\n /** Show the current value next to the label. Defaults to true when a\n * label is supplied. */\n showOutput?: boolean;\n /** Format the rendered value(s). Useful for units (`v => `${v}%``). */\n formatOutput?: (v: number | number[]) => ReactNode;\n className?: string;\n};\n\n/**\n * Linear range slider on React Aria. Single-value by default; pass an array\n * to `value` / `defaultValue` for multi-thumb. Distinct from `Slider`, which\n * is fully controlled and gives each thumb its own bounds and readout.\n *\n * The root is a column flex container and the track stretches to it, so\n * `align-items` on the root or on a wrapper that replaces it governs the\n * *horizontal* axis here and collapses the track to its content width. Style\n * the wrapper around one, not the root.\n */\nexport function RangeSlider(props: RangeSliderProps) {\n const { label, showOutput, formatOutput, className, ...rest } = props;\n const wantOutput = showOutput ?? label !== undefined;\n return (\n <RACSlider {...rest} className={[s.slider, className].filter(Boolean).join(' ')}>\n {(label !== undefined || wantOutput) && (\n <div className={s.head}>\n {label !== undefined && <Label className={s.label}>{label}</Label>}\n {wantOutput && (\n <SliderOutput className={s.output}>\n {({ state }) => {\n const v = state.values.length === 1 ? state.values[0] : state.values;\n return formatOutput ? formatOutput(v) : Array.isArray(v) ? v.join(' – ') : String(v);\n }}\n </SliderOutput>\n )}\n </div>\n )}\n <SliderTrack className={s.track}>\n {({ state }) => {\n // Single-thumb: fill from start to thumb. Multi-thumb: fill\n // between adjacent thumbs (simplest = between first and last).\n const fillStart = state.values.length > 1 ? state.getThumbPercent(0) * 100 : 0;\n const fillEnd = state.getThumbPercent(state.values.length - 1) * 100;\n return (\n <>\n <div\n className={s.fill}\n style={{ left: `${fillStart}%`, right: `${100 - fillEnd}%` }}\n />\n {state.values.map((_, i) => (\n <SliderThumb key={i} index={i} className={s.thumb} />\n ))}\n </>\n );\n }}\n </SliderTrack>\n </RACSlider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;ACgCA,SAAgB,EAAY,GAAyB;CACnD,IAAM,EAAE,UAAO,eAAY,iBAAc,cAAW,GAAG,MAAS,GAC1D,IAAa,KAAc,MAAU,KAAA;AAC3C,QACE,kBAAC,GAAD;EAAW,GAAI;EAAM,WAAW,CAAC,EAAE,QAAQ,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;YAA/E,EACI,MAAU,KAAA,KAAa,MACvB,kBAAC,OAAD;GAAK,WAAW,EAAE;aAAlB,CACG,MAAU,KAAA,KAAa,kBAAC,GAAD;IAAO,WAAW,EAAE;cAAQ;IAAc,CAAA,EACjE,KACC,kBAAC,GAAD;IAAc,WAAW,EAAE;eACvB,EAAE,eAAY;KACd,IAAM,IAAI,EAAM,OAAO,WAAW,IAAI,EAAM,OAAO,KAAK,EAAM;AAC9D,YAAO,IAAe,EAAa,EAAE,GAAG,MAAM,QAAQ,EAAE,GAAG,EAAE,KAAK,MAAM,GAAG,OAAO,EAAE;;IAEzE,CAAA,CAEb;MAER,kBAAC,GAAD;GAAa,WAAW,EAAE;cACtB,EAAE,eAAY;IAGd,IAAM,IAAY,EAAM,OAAO,SAAS,IAAI,EAAM,gBAAgB,EAAE,GAAG,MAAM,GACvE,IAAU,EAAM,gBAAgB,EAAM,OAAO,SAAS,EAAE,GAAG;AACjE,WACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,OAAD;KACE,WAAW,EAAE;KACb,OAAO;MAAE,MAAM,GAAG,EAAU;MAAI,OAAO,GAAG,MAAM,EAAQ;MAAI;KAC5D,CAAA,EACD,EAAM,OAAO,KAAK,GAAG,MACpB,kBAAC,GAAD;KAAqB,OAAO;KAAG,WAAW,EAAE;KAAS,EAAnC,EAAmC,CACrD,CACD,EAAA,CAAA;;GAGK,CAAA,CACJ"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./portalHost-CjpCnuGU.js";
|
|
2
|
-
import { n as t } from "./Field-BNqvUJfg.js";
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
import { Children as i, isValidElement as a } from "react";
|
|
5
|
-
import { Button as o, FieldError as s, Label as c, ListBox as l, ListBoxItem as u, Popover as d, Select as f, SelectValue as p, Text as m } from "react-aria-components";
|
|
6
|
-
var h = {
|
|
7
|
-
field: "_field_153xg_1",
|
|
8
|
-
trigger: "_trigger_153xg_9",
|
|
9
|
-
value: "_value_153xg_44",
|
|
10
|
-
bare: "_bare_153xg_54",
|
|
11
|
-
chevron: "_chevron_153xg_71",
|
|
12
|
-
popover: "_popover_153xg_78",
|
|
13
|
-
listbox: "_listbox_153xg_84",
|
|
14
|
-
option: "_option_153xg_97",
|
|
15
|
-
check: "_check_153xg_122",
|
|
16
|
-
fit: "_fit_153xg_135",
|
|
17
|
-
sizer: "_sizer_153xg_146"
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/components/Select/Select.tsx
|
|
21
|
-
function g(i) {
|
|
22
|
-
let { label: a, description: u, errorMessage: g, placeholder: y, options: x, children: S, selectedKey: C, defaultSelectedKey: w, onSelectionChange: T, width: E = "fill", variant: D = "field", triggerId: O, className: k, portalContainer: A, ...j } = i, { anchor: M, portalProps: N } = e(A);
|
|
23
|
-
return /* @__PURE__ */ r(f, {
|
|
24
|
-
...j,
|
|
25
|
-
selectedKey: C,
|
|
26
|
-
defaultSelectedKey: w,
|
|
27
|
-
onSelectionChange: T ? (e) => T(e) : void 0,
|
|
28
|
-
className: [
|
|
29
|
-
h.field,
|
|
30
|
-
E === "fit" && h.fit,
|
|
31
|
-
D === "bare" && h.bare,
|
|
32
|
-
t.root,
|
|
33
|
-
k
|
|
34
|
-
].filter(Boolean).join(" "),
|
|
35
|
-
children: [
|
|
36
|
-
M,
|
|
37
|
-
a !== void 0 && /* @__PURE__ */ n(c, {
|
|
38
|
-
className: t.label,
|
|
39
|
-
children: a
|
|
40
|
-
}),
|
|
41
|
-
/* @__PURE__ */ r(o, {
|
|
42
|
-
id: O,
|
|
43
|
-
className: h.trigger,
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ n(p, {
|
|
46
|
-
className: h.value,
|
|
47
|
-
children: ({ defaultChildren: e, isPlaceholder: t }) => t ? y ?? e : e
|
|
48
|
-
}),
|
|
49
|
-
E === "fit" && /* @__PURE__ */ r("span", {
|
|
50
|
-
className: h.sizer,
|
|
51
|
-
"aria-hidden": "true",
|
|
52
|
-
children: [y !== void 0 && /* @__PURE__ */ n("span", { children: y }), v(x, S).map((e, t) => /* @__PURE__ */ r("span", { children: [/* @__PURE__ */ n(_, {}), e] }, t))]
|
|
53
|
-
}),
|
|
54
|
-
/* @__PURE__ */ n("svg", {
|
|
55
|
-
className: h.chevron,
|
|
56
|
-
viewBox: "0 0 10 10",
|
|
57
|
-
"aria-hidden": "true",
|
|
58
|
-
children: /* @__PURE__ */ n("path", {
|
|
59
|
-
d: "M2 4 L5 7 L8 4",
|
|
60
|
-
fill: "none",
|
|
61
|
-
stroke: "currentColor",
|
|
62
|
-
strokeWidth: "1.5",
|
|
63
|
-
strokeLinecap: "round",
|
|
64
|
-
strokeLinejoin: "round"
|
|
65
|
-
})
|
|
66
|
-
})
|
|
67
|
-
]
|
|
68
|
-
}),
|
|
69
|
-
u !== void 0 && /* @__PURE__ */ n(m, {
|
|
70
|
-
slot: "description",
|
|
71
|
-
className: t.hint,
|
|
72
|
-
children: u
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ n(s, {
|
|
75
|
-
className: t.error,
|
|
76
|
-
children: g
|
|
77
|
-
}),
|
|
78
|
-
/* @__PURE__ */ n(d, {
|
|
79
|
-
className: h.popover,
|
|
80
|
-
"data-weasel-overlay": "",
|
|
81
|
-
...N,
|
|
82
|
-
children: /* @__PURE__ */ n(l, {
|
|
83
|
-
className: h.listbox,
|
|
84
|
-
children: x === void 0 ? S : x.map((e) => /* @__PURE__ */ n(b, {
|
|
85
|
-
id: e.value,
|
|
86
|
-
isDisabled: e.isDisabled,
|
|
87
|
-
textValue: e.textValue,
|
|
88
|
-
children: e.label
|
|
89
|
-
}, String(e.value)))
|
|
90
|
-
})
|
|
91
|
-
})
|
|
92
|
-
]
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function _() {
|
|
96
|
-
return /* @__PURE__ */ n("svg", {
|
|
97
|
-
className: h.check,
|
|
98
|
-
viewBox: "0 0 10 10",
|
|
99
|
-
"aria-hidden": "true",
|
|
100
|
-
children: /* @__PURE__ */ n("polyline", {
|
|
101
|
-
points: "1.5,5 4,7.5 8.5,3",
|
|
102
|
-
fill: "none",
|
|
103
|
-
stroke: "currentColor",
|
|
104
|
-
strokeWidth: "1.6",
|
|
105
|
-
strokeLinecap: "round",
|
|
106
|
-
strokeLinejoin: "round"
|
|
107
|
-
})
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function v(e, t) {
|
|
111
|
-
return e === void 0 ? i.toArray(t).map((e) => a(e) ? e.props.children : e) : e.map((e) => e.label);
|
|
112
|
-
}
|
|
113
|
-
function y(e, t) {
|
|
114
|
-
return t === void 0 ? typeof e == "string" || typeof e == "number" ? String(e) : void 0 : t;
|
|
115
|
-
}
|
|
116
|
-
function b({ children: e, className: t, textValue: i, ...a }) {
|
|
117
|
-
return /* @__PURE__ */ r(u, {
|
|
118
|
-
...a,
|
|
119
|
-
textValue: y(e, i),
|
|
120
|
-
className: [h.option, t].filter(Boolean).join(" "),
|
|
121
|
-
children: [/* @__PURE__ */ n(_, {}), e]
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
//#endregion
|
|
125
|
-
export { b as n, g as t };
|
|
126
|
-
|
|
127
|
-
//# sourceMappingURL=Select-BMYVh10x.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select-BMYVh10x.js","names":[],"sources":["../../src/components/Select/Select.module.css","../../src/components/Select/Select.tsx"],"sourcesContent":[".field {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n gap: 4px;\n}\n\n.trigger {\n display: flex;\n width: 100%;\n align-items: center;\n gap: 6px;\n height: var(--wzl-control-h);\n padding: 0 6px 0 10px;\n background: var(--wzl-surface-sunken);\n /* Hooks, each defaulting to what the trigger already drew: the visible box is\n this button, not the `.field` a consumer's `className` lands on, so a\n surface that has to restyle it sets these rather than reaching in here. */\n border: var(--wzl-select-border, 1px solid var(--wzl-border));\n border-radius: var(--wzl-radius-sm);\n color: var(--wzl-select-fg, var(--wzl-fg));\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size);\n line-height: 1;\n cursor: pointer;\n transition: border-color var(--wzl-motion-fast), box-shadow var(--wzl-motion-fast);\n}\n\n.trigger[data-focus-visible] {\n border-color: var(--wzl-focus-ring);\n box-shadow: 0 0 0 1px var(--wzl-focus-ring);\n}\n\n.field[data-invalid] .trigger {\n border-color: var(--wzl-danger);\n}\n\n.trigger[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.value {\n flex: 1;\n min-width: 0;\n text-align: var(--wzl-select-align, left);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* `variant='bare'`: no box. The focus ring moves to an outline, since there is no border to recolor. */\n.bare .trigger {\n padding: 0;\n background: transparent;\n border: var(--wzl-select-border, 1px solid transparent);\n}\n\n.bare .trigger[data-focus-visible] {\n border-color: transparent;\n box-shadow: none;\n outline: 1px solid var(--wzl-focus-ring);\n outline-offset: 2px;\n}\n\n.value[data-placeholder] {\n color: var(--wzl-fg-subtle);\n}\n\n.chevron {\n width: 10px;\n height: 10px;\n color: var(--wzl-fg-muted);\n flex: 0 0 auto;\n}\n\n.popover {\n min-width: var(--trigger-width);\n max-height: inherit;\n outline: none;\n}\n\n.listbox {\n background: var(--wzl-surface-raised);\n border: 1px solid var(--wzl-border);\n border-radius: var(--wzl-radius-md);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);\n padding: 4px;\n max-height: 280px;\n overflow: auto;\n outline: none;\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size);\n}\n\n.option {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 8px;\n border-radius: var(--wzl-radius-sm);\n cursor: pointer;\n color: var(--wzl-fg);\n outline: none;\n}\n\n.option[data-focused] {\n background: var(--wzl-surface-hover);\n}\n\n.option[data-selected] {\n color: var(--wzl-fg);\n font-weight: var(--wzl-font-weight-medium);\n}\n\n.option[data-disabled] {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n.check {\n width: 10px;\n height: 10px;\n flex: 0 0 auto;\n opacity: 0;\n}\n\n.option[data-selected] .check {\n opacity: 1;\n}\n\n/* `width='fit'`: a hidden stack of every option label shares the value's grid\n cell, so the trigger sizes to its widest option and never resizes on select. */\n.fit {\n width: auto;\n max-width: 100%;\n}\n\n.fit .trigger {\n display: grid;\n grid-template-columns: auto auto;\n}\n\n.fit .value,\n.fit .sizer {\n grid-area: 1 / 1;\n}\n\n.fit .chevron {\n grid-area: 1 / 2;\n}\n\n.sizer {\n display: grid;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n white-space: nowrap;\n}\n\n.sizer > * {\n grid-area: 1 / 1;\n}\n","import { Children, isValidElement, type ReactNode } from 'react';\nimport {\n Select as RACSelect,\n Label,\n Button as RACButton,\n SelectValue,\n Popover as RACPopover,\n ListBox as RACListBox,\n ListBoxItem as RACListBoxItem,\n Text,\n FieldError,\n type SelectProps as RACSelectProps,\n type ListBoxItemProps as RACListBoxItemProps,\n type ValidationResult,\n} from 'react-aria-components';\nimport { fieldClasses } from '../Field/Field';\nimport { useOverlayPortal, type OverlayPortalProps } from '../../overlays/portalHost';\nimport s from './Select.module.css';\n\n/** One option in a {@link Select}'s `options` list. */\nexport type SelectOption = {\n value: string;\n label: ReactNode;\n isDisabled?: boolean;\n /**\n * Plain-text form of `label`, for type-to-select and screen readers.\n * Only needed when `label` isn't a bare string — a label built from\n * elements has no text React Aria can read off it. A string label\n * supplies this itself.\n */\n textValue?: string;\n};\n\ntype Key = string | number;\n\n/**\n * Props for {@link Select}, on top of React Aria's `Select` props, with the\n * selection key narrowed to the option value type.\n */\nexport type SelectProps<T extends Key = string> = Omit<RACSelectProps<object>, 'children' | 'className' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange'> & {\n label?: ReactNode;\n description?: ReactNode;\n errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);\n placeholder?: string;\n /** Either pass `options` for a quick render, or `children` for full control. */\n options?: ReadonlyArray<SelectOption & { value: T }>;\n children?: ReactNode;\n selectedKey?: T | null;\n defaultSelectedKey?: T;\n onSelectionChange?: (key: T) => void;\n /**\n * `'fill'` (the default) takes the width of whatever row the select sits in.\n * `'fit'` sizes the trigger to its widest option, so it neither swallows a\n * toolbar's slack nor changes width as the selection moves.\n */\n width?: 'fill' | 'fit';\n /** `'bare'` drops the box, for a select set in a row of other chrome such as a property row. */\n variant?: 'field' | 'bare';\n /**\n * Id for the trigger button. React Aria puts a plain `id` on the wrapper,\n * which is not labelable, so an outer `<label for>` needs this to reach a\n * control the label can actually own.\n */\n triggerId?: string;\n className?: string;\n} & OverlayPortalProps;\n\n/**\n * Form select wrapping React Aria's Select. Pass either `options` for a\n * quick declarative render or `children` of `<SelectItem>` for control over\n * each row.\n *\n * The selection key type is parameterized so consumers with a string-literal\n * union for `value` (e.g. `'r' | 'g' | 'b'`) get a typed `onSelectionChange`.\n */\nexport function Select<T extends Key = string>(props: SelectProps<T>) {\n const {\n label,\n description,\n errorMessage,\n placeholder,\n options,\n children,\n selectedKey,\n defaultSelectedKey,\n onSelectionChange,\n width = 'fill',\n variant = 'field',\n triggerId,\n className,\n portalContainer,\n ...rest\n } = props;\n\n const { anchor, portalProps } = useOverlayPortal(portalContainer);\n\n return (\n <RACSelect\n {...rest}\n selectedKey={selectedKey}\n defaultSelectedKey={defaultSelectedKey}\n onSelectionChange={onSelectionChange ? (k) => onSelectionChange(k as T) : undefined}\n className={[s.field, width === 'fit' && s.fit, variant === 'bare' && s.bare, fieldClasses.root, className]\n .filter(Boolean)\n .join(' ')}\n >\n {anchor}\n {label !== undefined && <Label className={fieldClasses.label}>{label}</Label>}\n <RACButton id={triggerId} className={s.trigger}>\n <SelectValue className={s.value}>\n {({ defaultChildren, isPlaceholder }) =>\n isPlaceholder ? (placeholder ?? defaultChildren) : defaultChildren\n }\n </SelectValue>\n {width === 'fit' && (\n <span className={s.sizer} aria-hidden=\"true\">\n {placeholder !== undefined && <span>{placeholder}</span>}\n {optionLabels(options, children).map((l, i) => (\n <span key={i}>\n <CheckMark />\n {l}\n </span>\n ))}\n </span>\n )}\n <svg className={s.chevron} viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M2 4 L5 7 L8 4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </RACButton>\n {description !== undefined && (\n <Text slot=\"description\" className={fieldClasses.hint}>\n {description}\n </Text>\n )}\n <FieldError className={fieldClasses.error}>{errorMessage}</FieldError>\n {/* `data-weasel-overlay` marks DOM that belongs to this control but\n renders in a portal, outside the subtree the trigger sits in. Any\n consumer reasoning about \"did focus leave my component?\" via\n `closest()` gets the wrong answer without it — a text editor whose\n font menu lives here would end its session the moment the menu is\n clicked. */}\n <RACPopover className={s.popover} data-weasel-overlay=\"\" {...portalProps}>\n <RACListBox className={s.listbox}>\n {options !== undefined\n ? options.map((o) => (\n <SelectItem\n key={String(o.value)}\n id={o.value}\n isDisabled={o.isDisabled}\n textValue={o.textValue}\n >\n {o.label}\n </SelectItem>\n ))\n : children}\n </RACListBox>\n </RACPopover>\n </RACSelect>\n );\n}\n\n/* A selected row's mark travels into the trigger with its label, so a\n `width='fit'` sizer has to allow for it too. */\nfunction CheckMark() {\n return (\n <svg className={s.check} viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <polyline points=\"1.5,5 4,7.5 8.5,3\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n );\n}\n\n/**\n * The labels a `width='fit'` trigger measures itself against. In the children\n * form the label sits one element deep, inside a `SelectItem`.\n */\nfunction optionLabels(\n options: ReadonlyArray<SelectOption> | undefined,\n children: ReactNode,\n): ReactNode[] {\n if (options !== undefined) return options.map((o) => o.label);\n return Children.toArray(children).map((c) =>\n isValidElement<{ children?: ReactNode }>(c) ? c.props.children : c,\n );\n}\n\n/** Props for {@link SelectItem}, on top of React Aria's `ListBoxItem` props. */\nexport type SelectItemProps = Omit<RACListBoxItemProps, 'className' | 'children'> & {\n children?: ReactNode;\n className?: string;\n};\n\n/**\n * Every row renders a check mark beside its label, so from React Aria's\n * side the children are never plain text and it can't derive the string\n * type-to-select and screen readers need — it warns once per row. A string\n * label already *is* that string, so derive it rather than making every\n * call site restate it; anything richer has to say what it reads as.\n */\nfunction textValueOf(children: ReactNode, explicit: string | undefined): string | undefined {\n if (explicit !== undefined) return explicit;\n return typeof children === 'string' || typeof children === 'number'\n ? String(children)\n : undefined;\n}\n\n/**\n * One row in a {@link Select}'s list, with a leading check mark when\n * selected. A string child supplies its own `textValue`; anything richer must\n * pass one so type-to-select and screen readers have something to read.\n */\nexport function SelectItem({ children, className, textValue, ...rest }: SelectItemProps) {\n return (\n <RACListBoxItem\n {...rest}\n textValue={textValueOf(children, textValue)}\n className={[s.option, className].filter(Boolean).join(' ')}\n >\n <CheckMark />\n {children}\n </RACListBoxItem>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AC2EA,SAAgB,EAA+B,GAAuB;CACpE,IAAM,EACJ,UACA,gBACA,iBACA,gBACA,YACA,aACA,gBACA,uBACA,sBACA,WAAQ,QACR,aAAU,SACV,cACA,cACA,oBACA,GAAG,MACD,GAEE,EAAE,WAAQ,mBAAgB,EAAiB,EAAgB;AAEjE,QACE,kBAAC,GAAD;EACE,GAAI;EACS;EACO;EACpB,mBAAmB,KAAqB,MAAM,EAAkB,EAAO,GAAG,KAAA;EAC1E,WAAW;GAAC,EAAE;GAAO,MAAU,SAAS,EAAE;GAAK,MAAY,UAAU,EAAE;GAAM,EAAa;GAAM;GAAU,CACvG,OAAO,QAAQ,CACf,KAAK,IAAI;YAPd;GASG;GACA,MAAU,KAAA,KAAa,kBAAC,GAAD;IAAO,WAAW,EAAa;cAAQ;IAAc,CAAA;GAC7E,kBAAC,GAAD;IAAW,IAAI;IAAW,WAAW,EAAE;cAAvC;KACE,kBAAC,GAAD;MAAa,WAAW,EAAE;iBACtB,EAAE,oBAAiB,uBACnB,IAAiB,KAAe,IAAmB;MAEzC,CAAA;KACb,MAAU,SACT,kBAAC,QAAD;MAAM,WAAW,EAAE;MAAO,eAAY;gBAAtC,CACG,MAAgB,KAAA,KAAa,kBAAC,QAAD,EAAA,UAAO,GAAmB,CAAA,EACvD,EAAa,GAAS,EAAS,CAAC,KAAK,GAAG,MACvC,kBAAC,QAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAa,CAAA,EACZ,EACI,EAAA,EAHI,EAGJ,CACP,CACG;;KAET,kBAAC,OAAD;MAAK,WAAW,EAAE;MAAS,SAAQ;MAAY,eAAY;gBACzD,kBAAC,QAAD;OAAM,GAAE;OAAiB,MAAK;OAAO,QAAO;OAAe,aAAY;OAAM,eAAc;OAAQ,gBAAe;OAAU,CAAA;MACxH,CAAA;KACI;;GACX,MAAgB,KAAA,KACf,kBAAC,GAAD;IAAM,MAAK;IAAc,WAAW,EAAa;cAC9C;IACI,CAAA;GAET,kBAAC,GAAD;IAAY,WAAW,EAAa;cAAQ;IAA0B,CAAA;GAOtE,kBAAC,GAAD;IAAY,WAAW,EAAE;IAAS,uBAAoB;IAAG,GAAI;cAC3D,kBAAC,GAAD;KAAY,WAAW,EAAE;eACtB,MAAY,KAAA,IAWT,IAVA,EAAQ,KAAK,MACX,kBAAC,GAAD;MAEE,IAAI,EAAE;MACN,YAAY,EAAE;MACd,WAAW,EAAE;gBAEZ,EAAE;MACQ,EANN,OAAO,EAAE,MAAM,CAMT,CACb;KAEK,CAAA;IACF,CAAA;GACH;;;AAMhB,SAAS,IAAY;AACnB,QACE,kBAAC,OAAD;EAAK,WAAW,EAAE;EAAO,SAAQ;EAAY,eAAY;YACvD,kBAAC,YAAD;GAAU,QAAO;GAAoB,MAAK;GAAO,QAAO;GAAe,aAAY;GAAM,eAAc;GAAQ,gBAAe;GAAU,CAAA;EACpI,CAAA;;AAQV,SAAS,EACP,GACA,GACa;AAEb,QADI,MAAY,KAAA,IACT,EAAS,QAAQ,EAAS,CAAC,KAAK,MACrC,EAAyC,EAAE,GAAG,EAAE,MAAM,WAAW,EAClE,GAHiC,EAAQ,KAAK,MAAM,EAAE,MAAM;;AAmB/D,SAAS,EAAY,GAAqB,GAAkD;AAE1F,QADI,MAAa,KAAA,IACV,OAAO,KAAa,YAAY,OAAO,KAAa,WACvD,OAAO,EAAS,GAChB,KAAA,IAH+B;;AAWrC,SAAgB,EAAW,EAAE,aAAU,cAAW,cAAW,GAAG,KAAyB;AACvF,QACE,kBAAC,GAAD;EACE,GAAI;EACJ,WAAW,EAAY,GAAU,EAAU;EAC3C,WAAW,CAAC,EAAE,QAAQ,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;YAH5D,CAKE,kBAAC,GAAD,EAAa,CAAA,EACZ,EACc"}
|