@crisp-ui-kit/crisp 0.31.6 → 0.32.1
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/NOTICE +88 -0
- package/README.md +22 -0
- package/dist/accordion.css +13 -13
- package/dist/accordion.layered.css +23 -0
- package/dist/appshell.css +11 -11
- package/dist/appshell.layered.css +25 -0
- package/dist/authshell.css +23 -23
- package/dist/authshell.layered.css +59 -0
- package/dist/avatar.css +23 -23
- package/dist/avatar.layered.css +41 -0
- package/dist/avatargroup.css +2 -2
- package/dist/avatargroup.layered.css +7 -0
- package/dist/badge.css +31 -31
- package/dist/badge.layered.css +51 -0
- package/dist/barchart.css +15 -15
- package/dist/barchart.layered.css +25 -0
- package/dist/base.css +4 -4
- package/dist/board.css +20 -20
- package/dist/board.layered.css +34 -0
- package/dist/breadcrumb.css +8 -8
- package/dist/breadcrumb.layered.css +13 -0
- package/dist/bulkbar.css +13 -13
- package/dist/bulkbar.layered.css +23 -0
- package/dist/button.css +21 -21
- package/dist/button.layered.css +46 -0
- package/dist/callout.css +15 -15
- package/dist/callout.layered.css +18 -0
- package/dist/card.css +14 -14
- package/dist/card.layered.css +30 -0
- package/dist/checkbox.css +9 -9
- package/dist/checkbox.layered.css +21 -0
- package/dist/cjs/components/accordion/accordion.js +1 -1
- package/dist/cjs/components/accordion/accordion.recipe.js +10 -10
- package/dist/cjs/components/badge/badge.js +1 -1
- package/dist/cjs/components/badge/badge.recipe.js +1 -1
- package/dist/cjs/components/barchart/barchart.js +3 -3
- package/dist/cjs/components/barchart/barchart.recipe.js +14 -14
- package/dist/cjs/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/cjs/components/breadcrumb/breadcrumb.recipe.js +6 -6
- package/dist/cjs/components/bulkbar/bulkbar.js +2 -2
- package/dist/cjs/components/bulkbar/bulkbar.recipe.js +10 -10
- package/dist/cjs/components/callout/callout.js +1 -1
- package/dist/cjs/components/callout/callout.recipe.js +9 -9
- package/dist/cjs/components/card/card.js +3 -3
- package/dist/cjs/components/card/card.recipe.js +5 -5
- package/dist/cjs/components/columncalc/columncalc.js +1 -1
- package/dist/cjs/components/columncalc/columncalc.recipe.js +16 -9
- package/dist/cjs/components/contextmenu/contextmenu.js +4 -4
- package/dist/cjs/components/contextmenu/contextmenu.recipe.js +9 -9
- package/dist/cjs/components/datatable/datatable.js +32 -22
- package/dist/cjs/components/datatable/datatable.recipe.js +57 -57
- package/dist/cjs/components/datepicker/datepicker.js +12 -12
- package/dist/cjs/components/datepicker/datepicker.recipe.js +45 -45
- package/dist/cjs/components/datepickerfield/datepickerfield.js +2 -2
- package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +9 -9
- package/dist/cjs/components/dialog/dialog.js +5 -5
- package/dist/cjs/components/dialog/dialog.recipe.js +16 -16
- package/dist/cjs/components/donutchart/donutchart.js +1 -1
- package/dist/cjs/components/donutchart/donutchart.recipe.js +12 -12
- package/dist/cjs/components/drawer/drawer.js +3 -3
- package/dist/cjs/components/drawer/drawer.recipe.js +14 -14
- package/dist/cjs/components/emptystate/emptystate.js +1 -1
- package/dist/cjs/components/emptystate/emptystate.recipe.js +9 -9
- package/dist/cjs/components/fileupload/fileupload.js +3 -3
- package/dist/cjs/components/fileupload/fileupload.recipe.js +23 -23
- package/dist/cjs/components/formfield/formfield.js +1 -1
- package/dist/cjs/components/formfield/formfield.recipe.js +5 -5
- package/dist/cjs/components/input/input.js +1 -1
- package/dist/cjs/components/input/input.recipe.js +6 -6
- package/dist/cjs/components/linechart/linechart.js +4 -4
- package/dist/cjs/components/linechart/linechart.recipe.js +14 -14
- package/dist/cjs/components/menu/menu.js +6 -6
- package/dist/cjs/components/menu/menu.recipe.js +19 -19
- package/dist/cjs/components/multiselect/multiselect.js +5 -5
- package/dist/cjs/components/multiselect/multiselect.recipe.js +29 -29
- package/dist/cjs/components/popover/popover.js +1 -1
- package/dist/cjs/components/popover/popover.recipe.js +3 -3
- package/dist/cjs/components/progress/progress.js +2 -2
- package/dist/cjs/components/progress/progress.recipe.js +3 -3
- package/dist/cjs/components/quantitypicker/quantitypicker.js +2 -2
- package/dist/cjs/components/quantitypicker/quantitypicker.recipe.js +16 -16
- package/dist/cjs/components/radiogroup/radiogroup.js +1 -1
- package/dist/cjs/components/radiogroup/radiogroup.recipe.js +14 -14
- package/dist/cjs/components/resizablepanel/resizablepanel.js +3 -3
- package/dist/cjs/components/resizablepanel/resizablepanel.recipe.js +24 -24
- package/dist/cjs/components/segmented/segmented.js +4 -4
- package/dist/cjs/components/segmented/segmented.recipe.js +7 -7
- package/dist/cjs/components/select/select.js +3 -3
- package/dist/cjs/components/select/select.recipe.js +25 -25
- package/dist/cjs/components/slider/slider.js +2 -2
- package/dist/cjs/components/slider/slider.recipe.js +15 -15
- package/dist/cjs/components/stagebar/stagebar.js +1 -1
- package/dist/cjs/components/stagebar/stagebar.recipe.js +1 -1
- package/dist/cjs/components/statcard/statcard.js +1 -1
- package/dist/cjs/components/statcard/statcard.recipe.js +9 -9
- package/dist/cjs/components/switch/switch.js +1 -1
- package/dist/cjs/components/switch/switch.recipe.js +2 -2
- package/dist/cjs/components/table/table.js +1 -1
- package/dist/cjs/components/table/table.recipe.js +1 -1
- package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +65 -64
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +13 -13
- package/dist/cjs/components/tabs/tabs.js +4 -4
- package/dist/cjs/components/tabs/tabs.recipe.js +12 -12
- package/dist/cjs/components/textarea/textarea.js +2 -2
- package/dist/cjs/components/textarea/textarea.recipe.js +11 -11
- package/dist/cjs/components/toast/toast.js +4 -4
- package/dist/cjs/components/toast/toast.recipe.js +14 -14
- package/dist/cjs/components/wheelpicker/wheelpicker.js +2 -2
- package/dist/cjs/components/wheelpicker/wheelpicker.recipe.js +19 -19
- package/dist/cjs/core/namespace.js +17 -0
- package/dist/cjs/core/resolve.js +5 -3
- package/dist/cjs/product/appshell/appshell.js +2 -2
- package/dist/cjs/product/appshell/appshell.recipe.js +8 -8
- package/dist/cjs/product/authshell/authshell.js +1 -1
- package/dist/cjs/product/authshell/authshell.recipe.js +20 -20
- package/dist/cjs/product/board/board.js +3 -3
- package/dist/cjs/product/board/board.recipe.js +17 -17
- package/dist/cjs/product/command/command.js +3 -3
- package/dist/cjs/product/command/command.recipe.js +25 -25
- package/dist/cjs/product/entitycard/entitycard.js +1 -1
- package/dist/cjs/product/entitycard/entitycard.recipe.js +7 -7
- package/dist/cjs/product/flowcanvas/flowcanvas.js +5 -5
- package/dist/cjs/product/flowcanvas/flowcanvas.recipe.js +11 -11
- package/dist/cjs/product/inbox/inbox.js +1 -1
- package/dist/cjs/product/inbox/inbox.recipe.js +22 -22
- package/dist/cjs/product/listpage/listpage.js +3 -3
- package/dist/cjs/product/listpage/listpage.recipe.js +18 -18
- package/dist/cjs/product/navitem/navitem.js +1 -1
- package/dist/cjs/product/navitem/navitem.recipe.js +2 -2
- package/dist/cjs/product/onboarding/onboarding.js +1 -1
- package/dist/cjs/product/onboarding/onboarding.recipe.js +19 -19
- package/dist/cjs/product/recordpage/recordpage.js +24 -24
- package/dist/cjs/product/recordpage/recordpage.recipe.js +117 -117
- package/dist/cjs/product/recordpanel/recordpanel.js +4 -4
- package/dist/cjs/product/recordpanel/recordpanel.recipe.js +15 -15
- package/dist/cjs/product/recordstable/recordstable.js +48 -48
- package/dist/cjs/product/recordstable/recordstable.recipe.js +87 -87
- package/dist/cjs/product/recordstable/recordstable.tag.js +8 -8
- package/dist/cjs/product/richtext/richtext.js +4 -4
- package/dist/cjs/product/richtext/richtext.recipe.js +21 -21
- package/dist/cjs/product/settingssection/settingssection.js +1 -1
- package/dist/cjs/product/settingssection/settingssection.recipe.js +6 -6
- package/dist/cjs/product/settingsshell/settingsshell.js +1 -1
- package/dist/cjs/product/settingsshell/settingsshell.recipe.js +20 -20
- package/dist/cjs/product/sidebar/sidebar.js +2 -2
- package/dist/cjs/product/sidebar/sidebar.recipe.js +21 -21
- package/dist/cjs/product/tasklist/tasklist.js +2 -2
- package/dist/cjs/product/tasklist/tasklist.recipe.js +14 -14
- package/dist/cjs/product/trialbanner/trialbanner.js +1 -1
- package/dist/cjs/product/trialbanner/trialbanner.recipe.js +6 -6
- package/dist/cjs/product/viewtoggle/viewtoggle.js +1 -1
- package/dist/cjs/product/viewtoggle/viewtoggle.recipe.js +4 -4
- package/dist/cjs/tokens/contract.js +3 -2
- package/dist/columncalc.css +19 -12
- package/dist/columncalc.layered.css +35 -0
- package/dist/command.css +28 -28
- package/dist/command.layered.css +44 -0
- package/dist/contextmenu.css +12 -12
- package/dist/contextmenu.layered.css +22 -0
- package/dist/datatable.css +66 -66
- package/dist/datatable.layered.css +108 -0
- package/dist/datepicker.css +86 -86
- package/dist/datepicker.layered.css +179 -0
- package/dist/datepickerfield.css +19 -19
- package/dist/datepickerfield.layered.css +29 -0
- package/dist/dialog.css +19 -19
- package/dist/dialog.layered.css +29 -0
- package/dist/divider.css +2 -2
- package/dist/divider.layered.css +7 -0
- package/dist/donutchart.css +15 -15
- package/dist/donutchart.layered.css +26 -0
- package/dist/drawer.css +17 -17
- package/dist/drawer.layered.css +27 -0
- package/dist/emptystate.css +15 -15
- package/dist/emptystate.layered.css +22 -0
- package/dist/entitycard.css +14 -14
- package/dist/entitycard.layered.css +28 -0
- package/dist/esm/components/accordion/accordion.js +1 -1
- package/dist/esm/components/accordion/accordion.recipe.js +10 -10
- package/dist/esm/components/badge/badge.js +1 -1
- package/dist/esm/components/badge/badge.recipe.js +1 -1
- package/dist/esm/components/barchart/barchart.js +3 -3
- package/dist/esm/components/barchart/barchart.recipe.js +14 -14
- package/dist/esm/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/esm/components/breadcrumb/breadcrumb.recipe.js +6 -6
- package/dist/esm/components/bulkbar/bulkbar.js +2 -2
- package/dist/esm/components/bulkbar/bulkbar.recipe.js +10 -10
- package/dist/esm/components/callout/callout.js +1 -1
- package/dist/esm/components/callout/callout.recipe.js +9 -9
- package/dist/esm/components/card/card.js +3 -3
- package/dist/esm/components/card/card.recipe.js +5 -5
- package/dist/esm/components/columncalc/columncalc.js +1 -1
- package/dist/esm/components/columncalc/columncalc.recipe.js +16 -9
- package/dist/esm/components/contextmenu/contextmenu.js +4 -4
- package/dist/esm/components/contextmenu/contextmenu.recipe.js +9 -9
- package/dist/esm/components/datatable/datatable.js +32 -22
- package/dist/esm/components/datatable/datatable.recipe.js +57 -57
- package/dist/esm/components/datepicker/datepicker.js +12 -12
- package/dist/esm/components/datepicker/datepicker.recipe.js +45 -45
- package/dist/esm/components/datepickerfield/datepickerfield.js +2 -2
- package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +9 -9
- package/dist/esm/components/dialog/dialog.js +5 -5
- package/dist/esm/components/dialog/dialog.recipe.js +16 -16
- package/dist/esm/components/donutchart/donutchart.js +1 -1
- package/dist/esm/components/donutchart/donutchart.recipe.js +12 -12
- package/dist/esm/components/drawer/drawer.js +3 -3
- package/dist/esm/components/drawer/drawer.recipe.js +14 -14
- package/dist/esm/components/emptystate/emptystate.js +1 -1
- package/dist/esm/components/emptystate/emptystate.recipe.js +9 -9
- package/dist/esm/components/fileupload/fileupload.js +3 -3
- package/dist/esm/components/fileupload/fileupload.recipe.js +23 -23
- package/dist/esm/components/formfield/formfield.js +1 -1
- package/dist/esm/components/formfield/formfield.recipe.js +5 -5
- package/dist/esm/components/input/input.js +1 -1
- package/dist/esm/components/input/input.recipe.js +6 -6
- package/dist/esm/components/linechart/linechart.js +4 -4
- package/dist/esm/components/linechart/linechart.recipe.js +14 -14
- package/dist/esm/components/menu/menu.js +6 -6
- package/dist/esm/components/menu/menu.recipe.js +19 -19
- package/dist/esm/components/multiselect/multiselect.js +5 -5
- package/dist/esm/components/multiselect/multiselect.recipe.js +29 -29
- package/dist/esm/components/popover/popover.js +1 -1
- package/dist/esm/components/popover/popover.recipe.js +3 -3
- package/dist/esm/components/progress/progress.js +2 -2
- package/dist/esm/components/progress/progress.recipe.js +3 -3
- package/dist/esm/components/quantitypicker/quantitypicker.js +2 -2
- package/dist/esm/components/quantitypicker/quantitypicker.recipe.js +16 -16
- package/dist/esm/components/radiogroup/radiogroup.js +1 -1
- package/dist/esm/components/radiogroup/radiogroup.recipe.js +14 -14
- package/dist/esm/components/resizablepanel/resizablepanel.js +3 -3
- package/dist/esm/components/resizablepanel/resizablepanel.recipe.js +24 -24
- package/dist/esm/components/segmented/segmented.js +4 -4
- package/dist/esm/components/segmented/segmented.recipe.js +7 -7
- package/dist/esm/components/select/select.js +3 -3
- package/dist/esm/components/select/select.recipe.js +25 -25
- package/dist/esm/components/slider/slider.js +2 -2
- package/dist/esm/components/slider/slider.recipe.js +15 -15
- package/dist/esm/components/stagebar/stagebar.js +1 -1
- package/dist/esm/components/stagebar/stagebar.recipe.js +1 -1
- package/dist/esm/components/statcard/statcard.js +1 -1
- package/dist/esm/components/statcard/statcard.recipe.js +9 -9
- package/dist/esm/components/switch/switch.js +1 -1
- package/dist/esm/components/switch/switch.recipe.js +2 -2
- package/dist/esm/components/table/table.js +1 -1
- package/dist/esm/components/table/table.recipe.js +1 -1
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +65 -64
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +13 -13
- package/dist/esm/components/tabs/tabs.js +4 -4
- package/dist/esm/components/tabs/tabs.recipe.js +12 -12
- package/dist/esm/components/textarea/textarea.js +2 -2
- package/dist/esm/components/textarea/textarea.recipe.js +11 -11
- package/dist/esm/components/toast/toast.js +4 -4
- package/dist/esm/components/toast/toast.recipe.js +14 -14
- package/dist/esm/components/wheelpicker/wheelpicker.js +2 -2
- package/dist/esm/components/wheelpicker/wheelpicker.recipe.js +19 -19
- package/dist/esm/core/namespace.js +14 -0
- package/dist/esm/core/resolve.js +5 -3
- package/dist/esm/product/appshell/appshell.js +2 -2
- package/dist/esm/product/appshell/appshell.recipe.js +8 -8
- package/dist/esm/product/authshell/authshell.js +1 -1
- package/dist/esm/product/authshell/authshell.recipe.js +20 -20
- package/dist/esm/product/board/board.js +3 -3
- package/dist/esm/product/board/board.recipe.js +17 -17
- package/dist/esm/product/command/command.js +3 -3
- package/dist/esm/product/command/command.recipe.js +25 -25
- package/dist/esm/product/entitycard/entitycard.js +1 -1
- package/dist/esm/product/entitycard/entitycard.recipe.js +7 -7
- package/dist/esm/product/flowcanvas/flowcanvas.js +5 -5
- package/dist/esm/product/flowcanvas/flowcanvas.recipe.js +11 -11
- package/dist/esm/product/inbox/inbox.js +1 -1
- package/dist/esm/product/inbox/inbox.recipe.js +22 -22
- package/dist/esm/product/listpage/listpage.js +3 -3
- package/dist/esm/product/listpage/listpage.recipe.js +18 -18
- package/dist/esm/product/navitem/navitem.js +1 -1
- package/dist/esm/product/navitem/navitem.recipe.js +2 -2
- package/dist/esm/product/onboarding/onboarding.js +1 -1
- package/dist/esm/product/onboarding/onboarding.recipe.js +19 -19
- package/dist/esm/product/recordpage/recordpage.js +24 -24
- package/dist/esm/product/recordpage/recordpage.recipe.js +117 -117
- package/dist/esm/product/recordpanel/recordpanel.js +4 -4
- package/dist/esm/product/recordpanel/recordpanel.recipe.js +15 -15
- package/dist/esm/product/recordstable/recordstable.js +48 -48
- package/dist/esm/product/recordstable/recordstable.recipe.js +87 -87
- package/dist/esm/product/recordstable/recordstable.tag.js +8 -8
- package/dist/esm/product/richtext/richtext.js +4 -4
- package/dist/esm/product/richtext/richtext.recipe.js +21 -21
- package/dist/esm/product/settingssection/settingssection.js +1 -1
- package/dist/esm/product/settingssection/settingssection.recipe.js +6 -6
- package/dist/esm/product/settingsshell/settingsshell.js +1 -1
- package/dist/esm/product/settingsshell/settingsshell.recipe.js +20 -20
- package/dist/esm/product/sidebar/sidebar.js +2 -2
- package/dist/esm/product/sidebar/sidebar.recipe.js +21 -21
- package/dist/esm/product/tasklist/tasklist.js +2 -2
- package/dist/esm/product/tasklist/tasklist.recipe.js +14 -14
- package/dist/esm/product/trialbanner/trialbanner.js +1 -1
- package/dist/esm/product/trialbanner/trialbanner.recipe.js +6 -6
- package/dist/esm/product/viewtoggle/viewtoggle.js +1 -1
- package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +4 -4
- package/dist/esm/tokens/contract.js +3 -2
- package/dist/fileupload.css +46 -46
- package/dist/fileupload.layered.css +91 -0
- package/dist/flowcanvas.css +13 -13
- package/dist/flowcanvas.layered.css +17 -0
- package/dist/formfield.css +7 -7
- package/dist/formfield.layered.css +10 -0
- package/dist/inbox.css +26 -26
- package/dist/inbox.layered.css +41 -0
- package/dist/input.css +17 -17
- package/dist/input.layered.css +45 -0
- package/dist/kbd.css +2 -2
- package/dist/kbd.layered.css +5 -0
- package/dist/linechart.css +14 -14
- package/dist/linechart.layered.css +17 -0
- package/dist/listpage.css +22 -22
- package/dist/listpage.layered.css +41 -0
- package/dist/menu.css +29 -29
- package/dist/menu.layered.css +48 -0
- package/dist/multiselect.css +42 -42
- package/dist/multiselect.layered.css +63 -0
- package/dist/navitem.css +14 -14
- package/dist/navitem.layered.css +25 -0
- package/dist/onboarding.css +24 -24
- package/dist/onboarding.layered.css +39 -0
- package/dist/popover.css +6 -6
- package/dist/popover.layered.css +16 -0
- package/dist/progress.css +7 -7
- package/dist/progress.layered.css +17 -0
- package/dist/quantitypicker.css +34 -34
- package/dist/quantitypicker.layered.css +80 -0
- package/dist/radiogroup.css +18 -18
- package/dist/radiogroup.layered.css +33 -0
- package/dist/recordpage.css +122 -122
- package/dist/recordpage.layered.css +153 -0
- package/dist/recordpanel.css +31 -31
- package/dist/recordpanel.layered.css +50 -0
- package/dist/recordstable.css +162 -162
- package/dist/recordstable.layered.css +222 -0
- package/dist/resizablepanel.css +26 -26
- package/dist/resizablepanel.layered.css +55 -0
- package/dist/richtext.css +24 -24
- package/dist/richtext.layered.css +38 -0
- package/dist/segmented.css +10 -10
- package/dist/segmented.layered.css +20 -0
- package/dist/select.css +43 -43
- package/dist/select.layered.css +72 -0
- package/dist/settingssection.css +8 -8
- package/dist/settingssection.layered.css +11 -0
- package/dist/settingsshell.css +23 -23
- package/dist/settingsshell.layered.css +44 -0
- package/dist/sidebar.css +27 -27
- package/dist/sidebar.layered.css +40 -0
- package/dist/skeleton.css +4 -4
- package/dist/skeleton.layered.css +15 -0
- package/dist/slider.css +23 -23
- package/dist/slider.layered.css +58 -0
- package/dist/spinner.css +3 -3
- package/dist/spinner.layered.css +14 -0
- package/dist/stagebar.css +4 -4
- package/dist/stagebar.layered.css +14 -0
- package/dist/statcard.css +14 -14
- package/dist/statcard.layered.css +21 -0
- package/dist/styles.css +1816 -1725
- package/dist/styles.layered.css +2932 -0
- package/dist/switch.css +7 -7
- package/dist/switch.layered.css +22 -0
- package/dist/table.css +16 -16
- package/dist/table.layered.css +36 -0
- package/dist/tabletoolbar.css +67 -67
- package/dist/tabletoolbar.layered.css +80 -0
- package/dist/tabs.css +15 -15
- package/dist/tabs.layered.css +29 -0
- package/dist/tasklist.css +17 -17
- package/dist/tasklist.layered.css +34 -0
- package/dist/textarea.css +18 -18
- package/dist/textarea.layered.css +42 -0
- package/dist/toast.css +17 -17
- package/dist/toast.layered.css +27 -0
- package/dist/tokens.css +199 -115
- package/dist/tooltip.css +3 -3
- package/dist/tooltip.layered.css +13 -0
- package/dist/trialbanner.css +13 -13
- package/dist/trialbanner.layered.css +28 -0
- package/dist/types/core/namespace.d.ts +2 -0
- package/dist/viewtoggle.css +10 -10
- package/dist/viewtoggle.layered.css +23 -0
- package/dist/wheelpicker.css +29 -29
- package/dist/wheelpicker.layered.css +70 -0
- package/licenses/Apache-2.0.txt +201 -0
- package/package.json +5 -2
|
@@ -44,7 +44,7 @@ const config = defineRecipe({
|
|
|
44
44
|
|
|
45
45
|
&[data-invalid] { box-shadow: inset 0 0 0 2px ${c.bgDanger}; }
|
|
46
46
|
|
|
47
|
-
& .quantitypicker-button {
|
|
47
|
+
& .crisp-quantitypicker-button {
|
|
48
48
|
display: inline-flex; flex-shrink: 0; box-sizing: border-box;
|
|
49
49
|
align-items: center; justify-content: center;
|
|
50
50
|
border: none; padding: 0; cursor: pointer;
|
|
@@ -52,28 +52,28 @@ const config = defineRecipe({
|
|
|
52
52
|
transition: background-color .15s ease, outline-color .15s ease;
|
|
53
53
|
outline: 2px solid transparent; outline-offset: 2px;
|
|
54
54
|
}
|
|
55
|
-
& .quantitypicker-button:focus-visible { outline-color: ${c.strokeFocusRing}; }
|
|
56
|
-
& .quantitypicker-button:not([data-disabled]):hover { background: ${c.bgRaised}; }
|
|
57
|
-
& .quantitypicker-button[data-loading] { background: ${c.bgRaised}; }
|
|
58
|
-
& .quantitypicker-button[data-disabled] { cursor: not-allowed; color: ${c.fgDisabled}; }
|
|
55
|
+
& .crisp-quantitypicker-button:focus-visible { outline-color: ${c.strokeFocusRing}; }
|
|
56
|
+
& .crisp-quantitypicker-button:not([data-disabled]):hover { background: ${c.bgRaised}; }
|
|
57
|
+
& .crisp-quantitypicker-button[data-loading] { background: ${c.bgRaised}; }
|
|
58
|
+
& .crisp-quantitypicker-button[data-disabled] { cursor: not-allowed; color: ${c.fgDisabled}; }
|
|
59
59
|
|
|
60
|
-
& .quantitypicker-value {
|
|
60
|
+
& .crisp-quantitypicker-value {
|
|
61
61
|
display: grid; flex-grow: 1; flex-shrink: 0; box-sizing: border-box;
|
|
62
62
|
align-items: center; justify-content: center;
|
|
63
63
|
padding-inline: ${c.space["2"]};
|
|
64
64
|
font-weight: ${c.weight.medium}; color: ${c.fgPrimary};
|
|
65
65
|
}
|
|
66
|
-
& .quantitypicker-value[data-disabled] { color: ${c.fgDisabled}; }
|
|
67
|
-
& .quantitypicker-placeholder {
|
|
66
|
+
& .crisp-quantitypicker-value[data-disabled] { color: ${c.fgDisabled}; }
|
|
67
|
+
& .crisp-quantitypicker-placeholder {
|
|
68
68
|
grid-column: 1; grid-row: 1; visibility: hidden;
|
|
69
69
|
font-variant-numeric: tabular-nums;
|
|
70
70
|
}
|
|
71
|
-
& .quantitypicker-text {
|
|
71
|
+
& .crisp-quantitypicker-text {
|
|
72
72
|
grid-column: 1; grid-row: 1; text-align: center;
|
|
73
73
|
font-variant-numeric: tabular-nums;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
& .quantitypicker-divider {
|
|
76
|
+
& .crisp-quantitypicker-divider {
|
|
77
77
|
flex-shrink: 0; width: 1px; height: ${c.space["4"]};
|
|
78
78
|
background: ${c.borderSubtle};
|
|
79
79
|
}
|
|
@@ -82,18 +82,18 @@ const config = defineRecipe({
|
|
|
82
82
|
size: {
|
|
83
83
|
small: `
|
|
84
84
|
height: 36px; border-radius: ${c.radius.md};
|
|
85
|
-
& .quantitypicker-button { width: 36px; height: 36px; border-radius: ${c.radius.md}; }
|
|
86
|
-
& .quantitypicker-value { font-size: ${c.text.xl}; line-height: 22px; }
|
|
85
|
+
& .crisp-quantitypicker-button { width: 36px; height: 36px; border-radius: ${c.radius.md}; }
|
|
86
|
+
& .crisp-quantitypicker-value { font-size: ${c.text.xl}; line-height: 22px; }
|
|
87
87
|
`,
|
|
88
88
|
medium: `
|
|
89
89
|
height: 40px; border-radius: ${c.radius.md};
|
|
90
|
-
& .quantitypicker-button { width: 40px; height: 40px; border-radius: ${c.radius.md}; }
|
|
91
|
-
& .quantitypicker-value { font-size: ${c.text.xl}; line-height: 22px; }
|
|
90
|
+
& .crisp-quantitypicker-button { width: 40px; height: 40px; border-radius: ${c.radius.md}; }
|
|
91
|
+
& .crisp-quantitypicker-value { font-size: ${c.text.xl}; line-height: 22px; }
|
|
92
92
|
`,
|
|
93
93
|
large: `
|
|
94
94
|
height: 52px; border-radius: ${c.radius.xl};
|
|
95
|
-
& .quantitypicker-button { width: 52px; height: 52px; border-radius: ${c.radius.xl}; }
|
|
96
|
-
& .quantitypicker-value { font-size: 18px; line-height: 24px; }
|
|
95
|
+
& .crisp-quantitypicker-button { width: 52px; height: 52px; border-radius: ${c.radius.xl}; }
|
|
96
|
+
& .crisp-quantitypicker-value { font-size: 18px; line-height: 24px; }
|
|
97
97
|
`,
|
|
98
98
|
},
|
|
99
99
|
/** `fill` stretches to the row it sits in; seed's `layout_fill`. */
|
|
@@ -41,6 +41,6 @@ export function Radio({ value, label, children, disabled }) {
|
|
|
41
41
|
const checked = ctx.value === value;
|
|
42
42
|
return (_jsx("button", { type: "button", role: "radio", "aria-checked": checked, disabled: disabled, "data-value": value, "data-checked": checked ? "" : undefined,
|
|
43
43
|
// roving tabindex: the selected (or first, when none) radio is tabbable
|
|
44
|
-
tabIndex: checked ? 0 : -1, className: "radio", onClick: () => ctx.select(value), children: ctx.variant === "card" ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "radio-preview", children: children }), _jsx("span", { className: "radio-cardfoot", children: _jsx("span", { className: "radio-label", children: label }) })] })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "radio-dot" }), _jsx("span", { className: "radio-label", children: label ?? children })] })) }));
|
|
44
|
+
tabIndex: checked ? 0 : -1, className: "crisp-radio", onClick: () => ctx.select(value), children: ctx.variant === "card" ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "crisp-radio-preview", children: children }), _jsx("span", { className: "crisp-radio-cardfoot", children: _jsx("span", { className: "crisp-radio-label", children: label }) })] })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "crisp-radio-dot" }), _jsx("span", { className: "crisp-radio-label", children: label ?? children })] })) }));
|
|
45
45
|
}
|
|
46
46
|
Radio.displayName = "Radio";
|
|
@@ -10,22 +10,22 @@ const config = defineRecipe({
|
|
|
10
10
|
display: flex; flex-direction: column; gap: ${c.space["1"]}; font-family: ${c.font.sans};
|
|
11
11
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
12
12
|
|
|
13
|
-
& .radio { display: flex; align-items: center; gap: ${c.space["2"]}; margin: 0; padding: ${c.space["1"]} ${c.space["1"]}; border: none; background: none; border-radius: ${c.radius.md}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; text-align: start; cursor: pointer; }
|
|
14
|
-
& .radio:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
15
|
-
& .radio:focus-visible { outline: none; }
|
|
16
|
-
& .radio-dot { position: relative; flex-shrink: 0; width: 16px; height: 16px; border-radius: ${c.radius.full}; box-shadow: inset 0 0 0 1.5px ${c.borderDefault}; transition: box-shadow .12s ease; }
|
|
17
|
-
& .radio:hover .radio-dot { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, ${c.fgPrimary} 40%, transparent); }
|
|
18
|
-
& .radio[data-checked] .radio-dot { box-shadow: inset 0 0 0 1.5px ${c.bgBrandSolid}; }
|
|
19
|
-
& .radio[data-checked] .radio-dot::after { content: ""; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-radius: ${c.radius.full}; background: ${c.bgBrandSolid}; }
|
|
20
|
-
& .radio:focus-visible .radio-dot { outline: 2px solid ${c.bgBrandSolid}; outline-offset: 2px; }
|
|
21
|
-
& .radio-label { min-width: 0; }
|
|
13
|
+
& .crisp-radio { display: flex; align-items: center; gap: ${c.space["2"]}; margin: 0; padding: ${c.space["1"]} ${c.space["1"]}; border: none; background: none; border-radius: ${c.radius.md}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; text-align: start; cursor: pointer; }
|
|
14
|
+
& .crisp-radio:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
15
|
+
& .crisp-radio:focus-visible { outline: none; }
|
|
16
|
+
& .crisp-radio-dot { position: relative; flex-shrink: 0; width: 16px; height: 16px; border-radius: ${c.radius.full}; box-shadow: inset 0 0 0 1.5px ${c.borderDefault}; transition: box-shadow .12s ease; }
|
|
17
|
+
& .crisp-radio:hover .crisp-radio-dot { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, ${c.fgPrimary} 40%, transparent); }
|
|
18
|
+
& .crisp-radio[data-checked] .crisp-radio-dot { box-shadow: inset 0 0 0 1.5px ${c.bgBrandSolid}; }
|
|
19
|
+
& .crisp-radio[data-checked] .crisp-radio-dot::after { content: ""; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-radius: ${c.radius.full}; background: ${c.bgBrandSolid}; }
|
|
20
|
+
& .crisp-radio:focus-visible .crisp-radio-dot { outline: 2px solid ${c.bgBrandSolid}; outline-offset: 2px; }
|
|
21
|
+
& .crisp-radio-label { min-width: 0; }
|
|
22
22
|
|
|
23
23
|
&[data-variant="card"] { flex-direction: row; flex-wrap: wrap; gap: ${c.space["3"]}; }
|
|
24
|
-
&[data-variant="card"] .radio { flex: 1 1 150px; min-width: 150px; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border-radius: ${c.radius["2xl"]}; box-shadow: inset 0 0 0 1px ${c.borderDefault}; overflow: hidden; transition: box-shadow .12s ease; }
|
|
25
|
-
&[data-variant="card"] .radio:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 22%, transparent); }
|
|
26
|
-
&[data-variant="card"] .radio[data-checked] { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
27
|
-
&[data-variant="card"] .radio-preview { flex: 1; min-height: 0; background: ${c.bgRaised}; }
|
|
28
|
-
&[data-variant="card"] .radio-cardfoot { display: flex; align-items: center; gap: ${c.space["2"]}; padding: ${c.space["2"]} ${c.space["2.5"]}; border-top: 1px solid ${c.borderSubtle}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; }
|
|
24
|
+
&[data-variant="card"] .crisp-radio { flex: 1 1 150px; min-width: 150px; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border-radius: ${c.radius["2xl"]}; box-shadow: inset 0 0 0 1px ${c.borderDefault}; overflow: hidden; transition: box-shadow .12s ease; }
|
|
25
|
+
&[data-variant="card"] .crisp-radio:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 22%, transparent); }
|
|
26
|
+
&[data-variant="card"] .crisp-radio[data-checked] { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
27
|
+
&[data-variant="card"] .crisp-radio-preview { flex: 1; min-height: 0; background: ${c.bgRaised}; }
|
|
28
|
+
&[data-variant="card"] .crisp-radio-cardfoot { display: flex; align-items: center; gap: ${c.space["2"]}; padding: ${c.space["2"]} ${c.space["2.5"]}; border-top: 1px solid ${c.borderSubtle}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; }
|
|
29
29
|
`,
|
|
30
30
|
variants: {},
|
|
31
31
|
defaultVariants: {},
|
|
@@ -128,8 +128,8 @@ export function ResizablePanel({ side = "left", size, defaultSize = 280, onSizeC
|
|
|
128
128
|
minWidth: min,
|
|
129
129
|
maxWidth: maxStyle,
|
|
130
130
|
};
|
|
131
|
-
return (_jsxs("div", { ref: containerRef, className: resizablepanelRecipe({ className }), ...rest, children: [_jsx("div", { className: "resizablepanel-spacer", style: floating ? { width: 0 } : { width, minWidth: min, maxWidth: maxStyle } }), _jsxs("div", { ref: panelRef, className: "resizablepanel-panel", "data-side": side, "data-floating": floating ? "true" : "false", style: panelSizeStyle, children: [_jsx("div", { className: "resizablepanel-inner", children: children }), _jsx("div", { className: handleVariant === "column"
|
|
132
|
-
? "resizablepanel-handle resizablepanel-handle--column"
|
|
133
|
-
: "resizablepanel-handle", "data-side": side, "data-dragging": dragging ? "true" : undefined, "data-handle": "", onPointerDown: onHandlePointerDown, onPointerMove: onHandlePointerMove, onPointerUp: onHandlePointerUp, children: handleVariant === "column" && (_jsx("span", { className: "resizablepanel-handle-inner", "aria-hidden": "true" })) })] })] }));
|
|
131
|
+
return (_jsxs("div", { ref: containerRef, className: resizablepanelRecipe({ className }), ...rest, children: [_jsx("div", { className: "crisp-resizablepanel-spacer", style: floating ? { width: 0 } : { width, minWidth: min, maxWidth: maxStyle } }), _jsxs("div", { ref: panelRef, className: "crisp-resizablepanel-panel", "data-side": side, "data-floating": floating ? "true" : "false", style: panelSizeStyle, children: [_jsx("div", { className: "crisp-resizablepanel-inner", children: children }), _jsx("div", { className: handleVariant === "column"
|
|
132
|
+
? "crisp-resizablepanel-handle crisp-resizablepanel-handle--column"
|
|
133
|
+
: "crisp-resizablepanel-handle", "data-side": side, "data-dragging": dragging ? "true" : undefined, "data-handle": "", onPointerDown: onHandlePointerDown, onPointerMove: onHandlePointerMove, onPointerUp: onHandlePointerUp, children: handleVariant === "column" && (_jsx("span", { className: "crisp-resizablepanel-handle-inner", "aria-hidden": "true" })) })] })] }));
|
|
134
134
|
}
|
|
135
135
|
ResizablePanel.displayName = "ResizablePanel";
|
|
@@ -17,46 +17,46 @@ const config = defineRecipe({
|
|
|
17
17
|
name: "resizablepanel",
|
|
18
18
|
base: `
|
|
19
19
|
position: relative; display: flex; height: 100%;
|
|
20
|
-
& .resizablepanel-spacer { flex: 0 0 auto; height: 100%; transition: width 0.14s; }
|
|
21
|
-
& .resizablepanel-panel { position: absolute; top: 0; bottom: 0; box-sizing: border-box; overflow: hidden; background: ${c.bgSurface}; }
|
|
22
|
-
& .resizablepanel-panel[data-side="left"] { left: 0; }
|
|
23
|
-
& .resizablepanel-panel[data-side="right"] { right: 0; }
|
|
20
|
+
& .crisp-resizablepanel-spacer { flex: 0 0 auto; height: 100%; transition: width 0.14s; }
|
|
21
|
+
& .crisp-resizablepanel-panel { position: absolute; top: 0; bottom: 0; box-sizing: border-box; overflow: hidden; background: ${c.bgSurface}; }
|
|
22
|
+
& .crisp-resizablepanel-panel[data-side="left"] { left: 0; }
|
|
23
|
+
& .crisp-resizablepanel-panel[data-side="right"] { right: 0; }
|
|
24
24
|
|
|
25
25
|
/* docked */
|
|
26
|
-
& .resizablepanel-panel[data-floating="false"] { border-radius: 0; box-shadow: none; }
|
|
27
|
-
& .resizablepanel-panel[data-floating="false"][data-side="left"] { border-inline-end: 1px solid ${c.borderSubtle}; }
|
|
28
|
-
& .resizablepanel-panel[data-floating="false"][data-side="right"] { border-inline-start: 1px solid ${c.borderSubtle}; }
|
|
26
|
+
& .crisp-resizablepanel-panel[data-floating="false"] { border-radius: 0; box-shadow: none; }
|
|
27
|
+
& .crisp-resizablepanel-panel[data-floating="false"][data-side="left"] { border-inline-end: 1px solid ${c.borderSubtle}; }
|
|
28
|
+
& .crisp-resizablepanel-panel[data-floating="false"][data-side="right"] { border-inline-start: 1px solid ${c.borderSubtle}; }
|
|
29
29
|
|
|
30
30
|
/* floating — position: fixed, 8px gutter, r10, the measured floating elevation.
|
|
31
31
|
Rest is transform: none (Lesson 27); the off-canvas value is the @starting-style enter only. */
|
|
32
|
-
& .resizablepanel-panel[data-floating="true"] { position: fixed; top: ${c.space["2"]}; bottom: ${c.space["2"]}; border-inline-end: none; border-inline-start: none; border-radius: 10px; box-shadow: ${e.floating}; transform: none; transition: transform 0.14s, padding 0.14s; }
|
|
33
|
-
& .resizablepanel-panel[data-floating="true"][data-side="left"] { padding: ${c.space["2"]} 0 ${c.space["2"]} ${c.space["2"]}; @starting-style { transform: translateX(calc(-100% - ${c.space["2"]})); } }
|
|
34
|
-
& .resizablepanel-panel[data-floating="true"][data-side="right"] { padding: ${c.space["2"]} ${c.space["2"]} ${c.space["2"]} 0; @starting-style { transform: translateX(calc(100% + ${c.space["2"]})); } }
|
|
32
|
+
& .crisp-resizablepanel-panel[data-floating="true"] { position: fixed; top: ${c.space["2"]}; bottom: ${c.space["2"]}; border-inline-end: none; border-inline-start: none; border-radius: 10px; box-shadow: ${e.floating}; transform: none; transition: transform 0.14s, padding 0.14s; }
|
|
33
|
+
& .crisp-resizablepanel-panel[data-floating="true"][data-side="left"] { padding: ${c.space["2"]} 0 ${c.space["2"]} ${c.space["2"]}; @starting-style { transform: translateX(calc(-100% - ${c.space["2"]})); } }
|
|
34
|
+
& .crisp-resizablepanel-panel[data-floating="true"][data-side="right"] { padding: ${c.space["2"]} ${c.space["2"]} ${c.space["2"]} 0; @starting-style { transform: translateX(calc(100% + ${c.space["2"]})); } }
|
|
35
35
|
|
|
36
|
-
& .resizablepanel-inner { height: 100%; opacity: 1; }
|
|
37
|
-
& .resizablepanel-panel[data-floating="true"] .resizablepanel-inner { opacity: 1; transition: opacity 0.14s; @starting-style { opacity: 0; } }
|
|
36
|
+
& .crisp-resizablepanel-inner { height: 100%; opacity: 1; }
|
|
37
|
+
& .crisp-resizablepanel-panel[data-floating="true"] .crisp-resizablepanel-inner { opacity: 1; transition: opacity 0.14s; @starting-style { opacity: 0; } }
|
|
38
38
|
|
|
39
39
|
/* handle — variant "panel" (default): a 10px hit target, its ::before the
|
|
40
40
|
only visible divider (1px rest -> 2px on hover/drag, brand-solid). */
|
|
41
|
-
& .resizablepanel-handle { position: absolute; top: 0; width: 10px; height: 100%; z-index: 2; cursor: col-resize; background: transparent; touch-action: none; }
|
|
42
|
-
& .resizablepanel-handle[data-side="left"] { right: 0; }
|
|
43
|
-
& .resizablepanel-handle[data-side="right"] { left: 0; }
|
|
44
|
-
& .resizablepanel-handle::before { content: ""; position: absolute; top: 0; width: 1px; height: 100%; background: ${c.borderSubtle}; transition: background-color 0.16s, height 0.16s; }
|
|
45
|
-
& .resizablepanel-handle[data-side="left"]::before { right: 0; }
|
|
46
|
-
& .resizablepanel-handle[data-side="right"]::before { left: 0; }
|
|
47
|
-
& .resizablepanel-handle:hover::before, & .resizablepanel-handle[data-dragging="true"]::before { width: 2px; background: ${c.bgBrandSolid}; }
|
|
41
|
+
& .crisp-resizablepanel-handle { position: absolute; top: 0; width: 10px; height: 100%; z-index: 2; cursor: col-resize; background: transparent; touch-action: none; }
|
|
42
|
+
& .crisp-resizablepanel-handle[data-side="left"] { right: 0; }
|
|
43
|
+
& .crisp-resizablepanel-handle[data-side="right"] { left: 0; }
|
|
44
|
+
& .crisp-resizablepanel-handle::before { content: ""; position: absolute; top: 0; width: 1px; height: 100%; background: ${c.borderSubtle}; transition: background-color 0.16s, height 0.16s; }
|
|
45
|
+
& .crisp-resizablepanel-handle[data-side="left"]::before { right: 0; }
|
|
46
|
+
& .crisp-resizablepanel-handle[data-side="right"]::before { left: 0; }
|
|
47
|
+
& .crisp-resizablepanel-handle:hover::before, & .crisp-resizablepanel-handle[data-dragging="true"]::before { width: 2px; background: ${c.bgBrandSolid}; }
|
|
48
48
|
|
|
49
49
|
/* handle — variant "column": a wider 7px hit target straddling a 1px
|
|
50
50
|
divider (table column edges), with a real 3px inner bar whose opacity
|
|
51
51
|
comes in on a 100ms DELAY — distinct from the panel variant's instant
|
|
52
52
|
::before swap. */
|
|
53
|
-
/* .resizablepanel-handle.resizablepanel-handle--column (both classes) to
|
|
53
|
+
/* .crisp-resizablepanel-handle.crisp-resizablepanel-handle--column (both classes) to
|
|
54
54
|
out-specificity the base [data-side] left/right rules above, which
|
|
55
55
|
otherwise tie-break by source order alone and would win. */
|
|
56
|
-
& .resizablepanel-handle.resizablepanel-handle--column { display: flex; align-items: center; justify-content: center; width: 7px; left: -3px; right: -3px; z-index: 1; cursor: col-resize; }
|
|
57
|
-
& .resizablepanel-handle--column::before { content: none; }
|
|
58
|
-
& .resizablepanel-handle-inner { width: 3px; height: 100%; border-radius: 3px; background: ${c.bgBrandSolid}; opacity: 0; transition: opacity 0.1s 0.1s; }
|
|
59
|
-
& .resizablepanel-handle--column:hover .resizablepanel-handle-inner, & .resizablepanel-handle--column[data-dragging="true"] .resizablepanel-handle-inner { opacity: 1; }
|
|
56
|
+
& .crisp-resizablepanel-handle.crisp-resizablepanel-handle--column { display: flex; align-items: center; justify-content: center; width: 7px; left: -3px; right: -3px; z-index: 1; cursor: col-resize; }
|
|
57
|
+
& .crisp-resizablepanel-handle--column::before { content: none; }
|
|
58
|
+
& .crisp-resizablepanel-handle-inner { width: 3px; height: 100%; border-radius: 3px; background: ${c.bgBrandSolid}; opacity: 0; transition: opacity 0.1s 0.1s; }
|
|
59
|
+
& .crisp-resizablepanel-handle--column:hover .crisp-resizablepanel-handle-inner, & .crisp-resizablepanel-handle--column[data-dragging="true"] .crisp-resizablepanel-handle-inner { opacity: 1; }
|
|
60
60
|
`,
|
|
61
61
|
variants: {},
|
|
62
62
|
defaultVariants: {},
|
|
@@ -18,7 +18,7 @@ export function Segmented({ options, value, defaultValue, onValueChange, "aria-l
|
|
|
18
18
|
// biome-ignore lint/correctness/useExhaustiveDependencies: re-measure when the value or option set changes
|
|
19
19
|
React.useLayoutEffect(() => {
|
|
20
20
|
const root = rootRef.current;
|
|
21
|
-
const el = root?.querySelector(".segmented-item[data-selected]");
|
|
21
|
+
const el = root?.querySelector(".crisp-segmented-item[data-selected]");
|
|
22
22
|
if (!el) {
|
|
23
23
|
setThumb(null);
|
|
24
24
|
return;
|
|
@@ -37,15 +37,15 @@ export function Segmented({ options, value, defaultValue, onValueChange, "aria-l
|
|
|
37
37
|
// A `<label for>` cannot name a div, and this root is a role="radiogroup"
|
|
38
38
|
// (#247).
|
|
39
39
|
useLabelAssociation(rootRef);
|
|
40
|
-
return (_jsxs("div", { ref: rootRef, className: segmentedRecipe({ className }), ...rest, role: "radiogroup", "aria-label": ariaLabel, onKeyDown: onKeyDown, children: [thumb && (_jsx("span", { className: "segmented-thumb", "aria-hidden": "true", style: {
|
|
40
|
+
return (_jsxs("div", { ref: rootRef, className: segmentedRecipe({ className }), ...rest, role: "radiogroup", "aria-label": ariaLabel, onKeyDown: onKeyDown, children: [thumb && (_jsx("span", { className: "crisp-segmented-thumb", "aria-hidden": "true", style: {
|
|
41
41
|
width: thumb.width,
|
|
42
42
|
transform: `translateX(${thumb.left}px)`,
|
|
43
43
|
} })), options.map((opt) => {
|
|
44
44
|
const on = opt.value === selected;
|
|
45
45
|
const iconOnly = opt.label == null && opt.icon != null;
|
|
46
46
|
return (_jsxs("button", { type: "button", role: "radio", "aria-checked": on, "aria-label": opt["aria-label"], disabled: opt.disabled, "data-selected": on ? "" : undefined, "data-value": opt.value, tabIndex: on ? 0 : -1, className: iconOnly
|
|
47
|
-
? "segmented-item segmented-item--icon"
|
|
48
|
-
: "segmented-item", onClick: () => select(opt.value), children: [opt.icon, opt.label] }, opt.value));
|
|
47
|
+
? "crisp-segmented-item crisp-segmented-item--icon"
|
|
48
|
+
: "crisp-segmented-item", onClick: () => select(opt.value), children: [opt.icon, opt.label] }, opt.value));
|
|
49
49
|
})] }));
|
|
50
50
|
}
|
|
51
51
|
Segmented.displayName = "Segmented";
|
|
@@ -5,13 +5,13 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
5
5
|
const config = defineRecipe({
|
|
6
6
|
name: "segmented",
|
|
7
7
|
base: `position: relative; display: inline-flex; align-items: center; gap: ${c.space["0.5"]}; box-sizing: border-box; padding: ${c.space["0.5"]}; border-radius: ${c.radius.lg}; background: color-mix(in srgb, ${c.fgPrimary} 5%, transparent); font-family: ${c.font.sans};
|
|
8
|
-
& .segmented-thumb { position: absolute; top: ${c.space["0.5"]}; left: 0; height: 26px; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}, 0 1px 2px rgba(0,0,0,0.06); pointer-events: none; z-index: 0; transition: transform .2s cubic-bezier(.4,0,.2,1), width .2s cubic-bezier(.4,0,.2,1); }
|
|
9
|
-
& .segmented-item { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: ${c.space["1.5"]}; height: 26px; padding: 0 ${c.space["2.5"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; white-space: nowrap; cursor: pointer; transition: color 0.15s ease; }
|
|
10
|
-
& .segmented-item svg { flex-shrink: 0; }
|
|
11
|
-
& .segmented-item:hover { color: ${c.fgPrimary}; }
|
|
12
|
-
& .segmented-item[data-selected] { color: ${c.fgPrimary}; }
|
|
13
|
-
& .segmented-item[disabled] { opacity: 0.4; cursor: default; }
|
|
14
|
-
& .segmented-item--icon { width: 26px; padding: 0; }`,
|
|
8
|
+
& .crisp-segmented-thumb { position: absolute; top: ${c.space["0.5"]}; left: 0; height: 26px; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}, 0 1px 2px rgba(0,0,0,0.06); pointer-events: none; z-index: 0; transition: transform .2s cubic-bezier(.4,0,.2,1), width .2s cubic-bezier(.4,0,.2,1); }
|
|
9
|
+
& .crisp-segmented-item { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: ${c.space["1.5"]}; height: 26px; padding: 0 ${c.space["2.5"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; white-space: nowrap; cursor: pointer; transition: color 0.15s ease; }
|
|
10
|
+
& .crisp-segmented-item svg { flex-shrink: 0; }
|
|
11
|
+
& .crisp-segmented-item:hover { color: ${c.fgPrimary}; }
|
|
12
|
+
& .crisp-segmented-item[data-selected] { color: ${c.fgPrimary}; }
|
|
13
|
+
& .crisp-segmented-item[disabled] { opacity: 0.4; cursor: default; }
|
|
14
|
+
& .crisp-segmented-item--icon { width: 26px; padding: 0; }`,
|
|
15
15
|
variants: {},
|
|
16
16
|
defaultVariants: {},
|
|
17
17
|
compoundVariants: [],
|
|
@@ -123,12 +123,12 @@ export function Select({ options, value, defaultValue, onValueChange, name, requ
|
|
|
123
123
|
return (_jsxs("div", { ref: rootRef, className: selectRecipe({ variant, width, className }), ...rest, children: [name && (selected || required) && (_jsx("input", { className: "crisp-formvalue", style: formValueStyle, name: name, value: selected ?? "", required: required, tabIndex: -1, "aria-hidden": "true",
|
|
124
124
|
// controlled by the listbox above; `readOnly` would bar it from
|
|
125
125
|
// validation, which is the only reason this input is not hidden
|
|
126
|
-
onChange: () => { } })), _jsxs("button", { ref: triggerRef, type: "button", id: id, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": open, "aria-controls": open ? listboxId : undefined, "aria-activedescendant": searchable ? undefined : activeId, "aria-label": ariaLabel, disabled: disabled, "data-open": open ? "" : undefined, className: "select-trigger", onClick: () => (open ? setOpen(false) : openMenu()), onKeyDown: onTriggerKeyDown, children: [_jsx("span", { className: "select-value", children: selectedOption ? (_jsxs(_Fragment, { children: [selectedOption.color && (_jsx("span", { className: "select-option-dot", style: { background: selectedOption.color } })), selectedOption.label] })) : (_jsx("span", { className: "select-placeholder", children: placeholder })) }), _jsx(ChevronDown, { className: "select-chevron", size: 16, strokeWidth: 1.75 })] }), open && (_jsxs("div", { id: listboxId, className: "select-listbox", role: "listbox", "aria-label": ariaLabel, "data-up": up ? "" : undefined, style: pos, children: [searchable && (_jsxs("div", { className: "select-search", children: [_jsx(Search, { size: 15, strokeWidth: 1.75 }), _jsx("input", { ref: searchRef, type: "text", placeholder: searchPlaceholder, "aria-label": searchPlaceholder, "aria-controls": listboxId, "aria-activedescendant": activeId, value: query, onChange: (e) => {
|
|
126
|
+
onChange: () => { } })), _jsxs("button", { ref: triggerRef, type: "button", id: id, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": open, "aria-controls": open ? listboxId : undefined, "aria-activedescendant": searchable ? undefined : activeId, "aria-label": ariaLabel, disabled: disabled, "data-open": open ? "" : undefined, className: "crisp-select-trigger", onClick: () => (open ? setOpen(false) : openMenu()), onKeyDown: onTriggerKeyDown, children: [_jsx("span", { className: "crisp-select-value", children: selectedOption ? (_jsxs(_Fragment, { children: [selectedOption.color && (_jsx("span", { className: "crisp-select-option-dot", style: { background: selectedOption.color } })), selectedOption.label] })) : (_jsx("span", { className: "crisp-select-placeholder", children: placeholder })) }), _jsx(ChevronDown, { className: "crisp-select-chevron", size: 16, strokeWidth: 1.75 })] }), open && (_jsxs("div", { id: listboxId, className: "crisp-select-listbox", role: "listbox", "aria-label": ariaLabel, "data-up": up ? "" : undefined, style: pos, children: [searchable && (_jsxs("div", { className: "crisp-select-search", children: [_jsx(Search, { size: 15, strokeWidth: 1.75 }), _jsx("input", { ref: searchRef, type: "text", placeholder: searchPlaceholder, "aria-label": searchPlaceholder, "aria-controls": listboxId, "aria-activedescendant": activeId, value: query, onChange: (e) => {
|
|
127
127
|
setQuery(e.target.value);
|
|
128
128
|
setHighlight(0);
|
|
129
|
-
}, onKeyDown: onNavKeys })] })), filtered.length === 0 ? (_jsx("div", { className: "select-empty", children: emptyLabel })) : (filtered.map((opt, i) => {
|
|
129
|
+
}, onKeyDown: onNavKeys })] })), filtered.length === 0 ? (_jsx("div", { className: "crisp-select-empty", children: emptyLabel })) : (filtered.map((opt, i) => {
|
|
130
130
|
const isSel = opt.value === selected;
|
|
131
|
-
return (_jsxs("button", { type: "button", id: optionId(i), role: "option", "aria-selected": isSel, tabIndex: -1, disabled: opt.disabled, "data-disabled": opt.disabled ? "" : undefined, "data-highlighted": i === highlight ? "" : undefined, className: "select-option", onClick: () => pick(opt), onMouseEnter: () => setHighlight(i), children: [opt.color && (_jsx("span", { className: "select-option-dot", style: { background: opt.color } })), _jsx("span", { className: "select-option-label", children: opt.label }), isSel && (_jsx(Check, { className: "select-option-check", size: 15, strokeWidth: 2 }))] }, opt.value));
|
|
131
|
+
return (_jsxs("button", { type: "button", id: optionId(i), role: "option", "aria-selected": isSel, tabIndex: -1, disabled: opt.disabled, "data-disabled": opt.disabled ? "" : undefined, "data-highlighted": i === highlight ? "" : undefined, className: "crisp-select-option", onClick: () => pick(opt), onMouseEnter: () => setHighlight(i), children: [opt.color && (_jsx("span", { className: "crisp-select-option-dot", style: { background: opt.color } })), _jsx("span", { className: "crisp-select-option-label", children: opt.label }), isSel && (_jsx(Check, { className: "crisp-select-option-check", size: 15, strokeWidth: 2 }))] }, opt.value));
|
|
132
132
|
}))] }))] }));
|
|
133
133
|
}
|
|
134
134
|
Select.displayName = "Select";
|
|
@@ -12,45 +12,45 @@ const config = defineRecipe({
|
|
|
12
12
|
position: relative; display: inline-flex; font-family: ${c.font.sans};
|
|
13
13
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
14
14
|
|
|
15
|
-
& .select-trigger {
|
|
15
|
+
& .crisp-select-trigger {
|
|
16
16
|
box-sizing: border-box; display: inline-flex; align-items: center; gap: ${c.space["1.5"]};
|
|
17
17
|
height: ${c.size.menuRow}; width: 100%; min-width: 0; margin: 0; padding: 0 ${c.space["1.5"]} 0 ${c.space["2"]};
|
|
18
18
|
border: none; border-radius: ${c.radius.md}; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 7%, transparent);
|
|
19
19
|
font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; cursor: pointer;
|
|
20
20
|
transition: background-color .12s ease, box-shadow .12s ease;
|
|
21
21
|
}
|
|
22
|
-
& .select-trigger:hover { background: ${c.bgRaised}; }
|
|
23
|
-
& .select-trigger[data-open], & .select-trigger:focus-visible { outline: none; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; background: ${c.bgSurface}; }
|
|
24
|
-
& .select-trigger:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
25
|
-
& .select-value { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
|
|
26
|
-
& .select-placeholder { color: ${c.fgMuted}; }
|
|
27
|
-
& .select-chevron { flex-shrink: 0; color: ${c.fgMuted}; transition: transform .15s ease; }
|
|
28
|
-
& .select-trigger[data-open] .select-chevron { transform: rotate(180deg); }
|
|
22
|
+
& .crisp-select-trigger:hover { background: ${c.bgRaised}; }
|
|
23
|
+
& .crisp-select-trigger[data-open], & .crisp-select-trigger:focus-visible { outline: none; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; background: ${c.bgSurface}; }
|
|
24
|
+
& .crisp-select-trigger:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
25
|
+
& .crisp-select-value { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
|
|
26
|
+
& .crisp-select-placeholder { color: ${c.fgMuted}; }
|
|
27
|
+
& .crisp-select-chevron { flex-shrink: 0; color: ${c.fgMuted}; transition: transform .15s ease; }
|
|
28
|
+
& .crisp-select-trigger[data-open] .crisp-select-chevron { transform: rotate(180deg); }
|
|
29
29
|
|
|
30
|
-
& .select-listbox {
|
|
30
|
+
& .crisp-select-listbox {
|
|
31
31
|
position: fixed; z-index: 60; box-sizing: border-box; display: flex; flex-direction: column; gap: ${c.space.px};
|
|
32
32
|
max-height: 280px; overflow-y: auto; padding: ${c.space["1"]};
|
|
33
33
|
border-radius: ${c.radius.xl}; background: ${c.bgPopover};
|
|
34
34
|
box-shadow: ${e.floating};
|
|
35
35
|
transform-origin: top left; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease;
|
|
36
36
|
}
|
|
37
|
-
& .select-listbox[data-up] { transform-origin: bottom; }
|
|
38
|
-
& .select-listbox { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
39
|
-
& .select-search { display: flex; align-items: center; gap: ${c.space["2"]}; height: 34px; flex-shrink: 0; margin: calc(-1 * ${c.space["1"]}) calc(-1 * ${c.space["1"]}) ${c.space["1"]}; padding: 0 ${c.space["2.5"]}; border-bottom: 1px solid ${c.borderSubtle}; color: ${c.fgMuted}; }
|
|
40
|
-
& .select-search svg { flex-shrink: 0; }
|
|
41
|
-
& .select-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
|
|
42
|
-
& .select-search input::placeholder { color: ${c.fgMuted}; }
|
|
43
|
-
& .select-empty { padding: ${c.space["3"]} ${c.space["2"]}; text-align: center; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
44
|
-
& .select-option {
|
|
37
|
+
& .crisp-select-listbox[data-up] { transform-origin: bottom; }
|
|
38
|
+
& .crisp-select-listbox { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
39
|
+
& .crisp-select-search { display: flex; align-items: center; gap: ${c.space["2"]}; height: 34px; flex-shrink: 0; margin: calc(-1 * ${c.space["1"]}) calc(-1 * ${c.space["1"]}) ${c.space["1"]}; padding: 0 ${c.space["2.5"]}; border-bottom: 1px solid ${c.borderSubtle}; color: ${c.fgMuted}; }
|
|
40
|
+
& .crisp-select-search svg { flex-shrink: 0; }
|
|
41
|
+
& .crisp-select-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
|
|
42
|
+
& .crisp-select-search input::placeholder { color: ${c.fgMuted}; }
|
|
43
|
+
& .crisp-select-empty { padding: ${c.space["3"]} ${c.space["2"]}; text-align: center; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
44
|
+
& .crisp-select-option {
|
|
45
45
|
box-sizing: border-box; display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.menuRow}; flex-shrink: 0;
|
|
46
46
|
padding: 0 ${c.space["2"]}; margin: 0; border: none; background: none; border-radius: ${c.radius.md};
|
|
47
47
|
font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; text-align: start; cursor: pointer; white-space: nowrap;
|
|
48
48
|
}
|
|
49
|
-
& .select-option[data-highlighted] { background: ${c.bgRaised}; }
|
|
50
|
-
& .select-option[data-disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
51
|
-
& .select-option-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: ${c.radius.full}; }
|
|
52
|
-
& .select-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
53
|
-
& .select-option-check { flex-shrink: 0; color: ${c.bgBrandSolid}; }
|
|
49
|
+
& .crisp-select-option[data-highlighted] { background: ${c.bgRaised}; }
|
|
50
|
+
& .crisp-select-option[data-disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
51
|
+
& .crisp-select-option-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: ${c.radius.full}; }
|
|
52
|
+
& .crisp-select-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
53
|
+
& .crisp-select-option-check { flex-shrink: 0; color: ${c.bgBrandSolid}; }
|
|
54
54
|
`,
|
|
55
55
|
variants: {
|
|
56
56
|
// ghost: borderless at rest (transparent), reveals a subtle fill on hover —
|
|
@@ -58,9 +58,9 @@ const config = defineRecipe({
|
|
|
58
58
|
variant: {
|
|
59
59
|
default: "",
|
|
60
60
|
ghost: `
|
|
61
|
-
& .select-trigger { background: transparent; box-shadow: none; }
|
|
62
|
-
& .select-trigger:hover { background: ${c.bgRaised}; box-shadow: none; }
|
|
63
|
-
& .select-trigger[data-open], & .select-trigger:focus-visible { background: transparent; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
61
|
+
& .crisp-select-trigger { background: transparent; box-shadow: none; }
|
|
62
|
+
& .crisp-select-trigger:hover { background: ${c.bgRaised}; box-shadow: none; }
|
|
63
|
+
& .crisp-select-trigger[data-open], & .crisp-select-trigger:focus-visible { background: transparent; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
64
64
|
`,
|
|
65
65
|
},
|
|
66
66
|
// full (default): fills its container, as before. auto: sizes to content.
|
|
@@ -25,7 +25,7 @@ function Thumbs({ ariaLabel, labelledBy, thumbLabel, idBase, }) {
|
|
|
25
25
|
const suffixId = `${idBase}-thumb-${i}`;
|
|
26
26
|
return (_jsxs(React.Fragment
|
|
27
27
|
// biome-ignore lint/suspicious/noArrayIndexKey: thumbs are positional — the index IS the identity the engine addresses them by
|
|
28
|
-
, { children: [suffix && labelledBy && !ariaLabel && (_jsx("span", { id: suffixId, className: "slider-thumblabel", children: suffix })), _jsx(SliderThumb, { thumbIndex: i, className: "slider-thumb", "aria-label": ariaLabel
|
|
28
|
+
, { children: [suffix && labelledBy && !ariaLabel && (_jsx("span", { id: suffixId, className: "crisp-slider-thumblabel", children: suffix })), _jsx(SliderThumb, { thumbIndex: i, className: "crisp-slider-thumb", "aria-label": ariaLabel
|
|
29
29
|
? suffix
|
|
30
30
|
? `${ariaLabel} ${suffix}`
|
|
31
31
|
: ariaLabel
|
|
@@ -65,5 +65,5 @@ export function Slider({ className, thumbLabel = defaultThumbLabel, ...props })
|
|
|
65
65
|
label.id = `${el.id}-label`;
|
|
66
66
|
setFoundLabelId(label.id);
|
|
67
67
|
}, [ariaLabel, labelledByProp]);
|
|
68
|
-
return (_jsx(SliderRoot, { ref: rootRef, ...props, className: sliderRecipe({ className }), children: _jsxs("span", { className: "slider-control", children: [_jsx("span", { className: "slider-track", children: _jsx(SliderRange, { className: "slider-range" }) }), _jsx(Thumbs, { ariaLabel: ariaLabel, labelledBy: labelledByProp ?? foundLabelId, thumbLabel: thumbLabel, idBase: idBase })] }) }));
|
|
68
|
+
return (_jsx(SliderRoot, { ref: rootRef, ...props, className: sliderRecipe({ className }), children: _jsxs("span", { className: "crisp-slider-control", children: [_jsx("span", { className: "crisp-slider-track", children: _jsx(SliderRange, { className: "crisp-slider-range" }) }), _jsx(Thumbs, { ariaLabel: ariaLabel, labelledBy: labelledByProp ?? foundLabelId, thumbLabel: thumbLabel, idBase: idBase })] }) }));
|
|
69
69
|
}
|
|
@@ -26,44 +26,44 @@ const config = defineRecipe({
|
|
|
26
26
|
|
|
27
27
|
/* the position words ("minimum"/"maximum") that ARIA concatenates onto a
|
|
28
28
|
thumb's name — read, never drawn */
|
|
29
|
-
& .slider-thumblabel {
|
|
29
|
+
& .crisp-slider-thumblabel {
|
|
30
30
|
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
31
31
|
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
32
32
|
}
|
|
33
|
-
& .slider-control { position: relative; height: 26px; display: flex; align-items: center; }
|
|
33
|
+
& .crisp-slider-control { position: relative; height: 26px; display: flex; align-items: center; }
|
|
34
34
|
|
|
35
|
-
& .slider-track {
|
|
35
|
+
& .crisp-slider-track {
|
|
36
36
|
position: relative; flex-grow: 1; height: ${c.space["1"]};
|
|
37
37
|
border-radius: ${c.radius.full}; background: ${c.bgNeutralWeak};
|
|
38
38
|
overflow: hidden;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
& .slider-range { position: absolute; height: 100%; background: ${c.bgBrandSolid}; }
|
|
42
|
-
& .slider-range[data-dir="ltr"] { left: var(--range-start); right: var(--range-end); }
|
|
43
|
-
& .slider-range[data-dir="rtl"] { right: var(--range-start); left: var(--range-end); }
|
|
41
|
+
& .crisp-slider-range { position: absolute; height: 100%; background: ${c.bgBrandSolid}; }
|
|
42
|
+
& .crisp-slider-range[data-dir="ltr"] { left: var(--range-start); right: var(--range-end); }
|
|
43
|
+
& .crisp-slider-range[data-dir="rtl"] { right: var(--range-start); left: var(--range-end); }
|
|
44
44
|
|
|
45
|
-
& .slider-thumb {
|
|
45
|
+
& .crisp-slider-thumb {
|
|
46
46
|
position: absolute; top: 50%;
|
|
47
47
|
width: ${c.space["5"]}; height: ${c.space["5"]};
|
|
48
48
|
transform: translate(-50%, -50%);
|
|
49
49
|
border: none; background: none; padding: 0;
|
|
50
50
|
}
|
|
51
|
-
& .slider-thumb[data-dir="ltr"] { left: calc(var(--thumb-position) * 1% + var(--thumb-offset)); }
|
|
52
|
-
& .slider-thumb[data-dir="rtl"] { right: calc(var(--thumb-position) * 1% + var(--thumb-offset)); }
|
|
53
|
-
& .slider-thumb::after {
|
|
51
|
+
& .crisp-slider-thumb[data-dir="ltr"] { left: calc(var(--thumb-position) * 1% + var(--thumb-offset)); }
|
|
52
|
+
& .crisp-slider-thumb[data-dir="rtl"] { right: calc(var(--thumb-position) * 1% + var(--thumb-offset)); }
|
|
53
|
+
& .crisp-slider-thumb::after {
|
|
54
54
|
content: ""; position: absolute; inset: 0;
|
|
55
55
|
border-radius: ${c.radius.full}; background: #fff; box-shadow: ${e.field};
|
|
56
56
|
outline: 2px solid transparent; outline-offset: 2px;
|
|
57
57
|
transition: transform .2s ease, outline-color .2s ease;
|
|
58
58
|
cursor: grab;
|
|
59
59
|
}
|
|
60
|
-
& .slider-thumb[data-thumb-dragging]::after { transform: scale(1.2); cursor: grabbing; }
|
|
61
|
-
& .slider-thumb:focus { outline: none; }
|
|
62
|
-
& .slider-thumb:focus-visible::after { outline-color: ${c.strokeFocusRing}; }
|
|
60
|
+
& .crisp-slider-thumb[data-thumb-dragging]::after { transform: scale(1.2); cursor: grabbing; }
|
|
61
|
+
& .crisp-slider-thumb:focus { outline: none; }
|
|
62
|
+
& .crisp-slider-thumb:focus-visible::after { outline-color: ${c.strokeFocusRing}; }
|
|
63
63
|
|
|
64
64
|
&[data-disabled] { cursor: not-allowed; }
|
|
65
|
-
&[data-disabled] .slider-range { background: ${c.fgDisabled}; }
|
|
66
|
-
&[data-disabled] .slider-thumb::after { cursor: not-allowed; }
|
|
65
|
+
&[data-disabled] .crisp-slider-range { background: ${c.fgDisabled}; }
|
|
66
|
+
&[data-disabled] .crisp-slider-thumb::after { cursor: not-allowed; }
|
|
67
67
|
`,
|
|
68
68
|
variants: {},
|
|
69
69
|
defaultVariants: {},
|
|
@@ -13,7 +13,7 @@ export function StageBar({ stages, current, "aria-label": ariaLabel, className,
|
|
|
13
13
|
return (_jsx("div", { className: stagebarRecipe({ className }), ...rest, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": stages.length, "aria-valuenow": currentIndex + 1, "aria-valuetext": currentStage?.label, "aria-label": ariaLabel, children: stages.map((stage, i) => {
|
|
14
14
|
const color = stage.color ?? DEFAULT;
|
|
15
15
|
const on = i === currentIndex;
|
|
16
|
-
return (_jsx("span", { className: "stagebar-seg", style: {
|
|
16
|
+
return (_jsx("span", { className: "crisp-stagebar-seg", style: {
|
|
17
17
|
background: on
|
|
18
18
|
? color
|
|
19
19
|
: `color-mix(in srgb, ${color} 18%, transparent)`,
|
|
@@ -5,7 +5,7 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
5
5
|
const config = defineRecipe({
|
|
6
6
|
name: "stagebar",
|
|
7
7
|
base: `display: flex; align-items: center; gap: ${c.space["0.5"]}; width: 100%; height: 6px; font-family: ${c.font.sans};
|
|
8
|
-
& .stagebar-seg { flex: 1; height: 100%; border-radius: ${c.radius.full}; transition: background 0.2s ease; }`,
|
|
8
|
+
& .crisp-stagebar-seg { flex: 1; height: 100%; border-radius: ${c.radius.full}; transition: background 0.2s ease; }`,
|
|
9
9
|
variants: {},
|
|
10
10
|
defaultVariants: {},
|
|
11
11
|
compoundVariants: [],
|
|
@@ -7,6 +7,6 @@ import { statcardRecipe } from "./statcard.recipe.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export function StatCard({ label, icon, value, delta, deltaSuffix = "%", caption, card, className, ...rest }) {
|
|
9
9
|
const trend = delta == null ? null : delta > 0 ? "up" : delta < 0 ? "down" : "flat";
|
|
10
|
-
return (_jsxs("div", { className: statcardRecipe({ card, className }), ...rest, children: [_jsxs("span", { className: "statcard-label", children: [icon, label] }), _jsx("span", { className: "statcard-value", children: value }), (trend != null || caption != null) && (_jsxs("span", { className: "statcard-foot", children: [trend != null && (_jsxs("span", { className: "statcard-delta", "data-trend": trend, children: [trend === "up" && _jsx(ArrowUp, { size: 12, strokeWidth: 2.5 }), trend === "down" && _jsx(ArrowDown, { size: 12, strokeWidth: 2.5 }), Math.abs(delta), deltaSuffix] })), caption] }))] }));
|
|
10
|
+
return (_jsxs("div", { className: statcardRecipe({ card, className }), ...rest, children: [_jsxs("span", { className: "crisp-statcard-label", children: [icon, label] }), _jsx("span", { className: "crisp-statcard-value", children: value }), (trend != null || caption != null) && (_jsxs("span", { className: "crisp-statcard-foot", children: [trend != null && (_jsxs("span", { className: "crisp-statcard-delta", "data-trend": trend, children: [trend === "up" && _jsx(ArrowUp, { size: 12, strokeWidth: 2.5 }), trend === "down" && _jsx(ArrowDown, { size: 12, strokeWidth: 2.5 }), Math.abs(delta), deltaSuffix] })), caption] }))] }));
|
|
11
11
|
}
|
|
12
12
|
StatCard.displayName = "StatCard";
|
|
@@ -7,15 +7,15 @@ const config = defineRecipe({
|
|
|
7
7
|
name: "statcard",
|
|
8
8
|
base: `display: flex; flex-direction: column; gap: ${c.space["1.5"]}; box-sizing: border-box; font-family: ${c.font.sans};
|
|
9
9
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
10
|
-
& .statcard-label { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
11
|
-
& .statcard-label svg { color: ${c.fgMuted}; }
|
|
12
|
-
& .statcard-value { font-size: 28px; line-height: 32px; font-weight: ${c.weight.semibold}; letter-spacing: -0.4px; color: ${c.fgPrimary}; }
|
|
13
|
-
& .statcard-foot { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
14
|
-
& .statcard-delta { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; }
|
|
15
|
-
& .statcard-delta svg { flex-shrink: 0; }
|
|
16
|
-
& .statcard-delta[data-trend="up"] { background: color-mix(in srgb, ${c.bgSuccess} 16%, transparent); color: color-mix(in srgb, ${c.bgSuccess} 80%, ${c.fgPrimary}); }
|
|
17
|
-
& .statcard-delta[data-trend="down"] { background: color-mix(in srgb, ${c.bgDanger} 15%, transparent); color: color-mix(in srgb, ${c.bgDanger} 80%, ${c.fgPrimary}); }
|
|
18
|
-
& .statcard-delta[data-trend="flat"] { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgMuted}; }`,
|
|
10
|
+
& .crisp-statcard-label { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
11
|
+
& .crisp-statcard-label svg { color: ${c.fgMuted}; }
|
|
12
|
+
& .crisp-statcard-value { font-size: 28px; line-height: 32px; font-weight: ${c.weight.semibold}; letter-spacing: -0.4px; color: ${c.fgPrimary}; }
|
|
13
|
+
& .crisp-statcard-foot { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
14
|
+
& .crisp-statcard-delta { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; }
|
|
15
|
+
& .crisp-statcard-delta svg { flex-shrink: 0; }
|
|
16
|
+
& .crisp-statcard-delta[data-trend="up"] { background: color-mix(in srgb, ${c.bgSuccess} 16%, transparent); color: color-mix(in srgb, ${c.bgSuccess} 80%, ${c.fgPrimary}); }
|
|
17
|
+
& .crisp-statcard-delta[data-trend="down"] { background: color-mix(in srgb, ${c.bgDanger} 15%, transparent); color: color-mix(in srgb, ${c.bgDanger} 80%, ${c.fgPrimary}); }
|
|
18
|
+
& .crisp-statcard-delta[data-trend="flat"] { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgMuted}; }`,
|
|
19
19
|
variants: {
|
|
20
20
|
// Opt-in chrome for consumers who want the tile self-contained instead of
|
|
21
21
|
// hand-wrapping it in <Card><CardBody>. Not measured as part of the
|
|
@@ -27,6 +27,6 @@ export const Switch = React.forwardRef(({ checked, defaultChecked = false, onChe
|
|
|
27
27
|
if (checked === undefined)
|
|
28
28
|
setInternal((v) => !v);
|
|
29
29
|
onCheckedChange?.(!on);
|
|
30
|
-
}, ...props, children: _jsx("span", { className: "switch-thumb" }) }), name && (on || required) && (_jsx("input", { className: "crisp-formvalue", style: formValueStyle, type: "checkbox", name: name, value: value, checked: on, required: required, tabIndex: -1, "aria-hidden": "true", onChange: () => { } }))] }));
|
|
30
|
+
}, ...props, children: _jsx("span", { className: "crisp-switch-thumb" }) }), name && (on || required) && (_jsx("input", { className: "crisp-formvalue", style: formValueStyle, type: "checkbox", name: name, value: value, checked: on, required: required, tabIndex: -1, "aria-hidden": "true", onChange: () => { } }))] }));
|
|
31
31
|
});
|
|
32
32
|
Switch.displayName = "Switch";
|
|
@@ -9,9 +9,9 @@ const config = defineRecipe({
|
|
|
9
9
|
display: inline-flex; align-items: center; flex-shrink: 0; width: 24px; height: 16px; padding: 0; margin: 0;
|
|
10
10
|
border: none; border-radius: ${c.radius.full}; background: color-mix(in srgb, ${c.fgPrimary} 9%, transparent);
|
|
11
11
|
cursor: pointer; transition: background-color .2s ease; -webkit-tap-highlight-color: transparent;
|
|
12
|
-
& .switch-thumb { width: 12px; height: 12px; margin: 0 2px; border-radius: ${c.radius.full}; background: #fff; transition: transform .2s ease; }
|
|
12
|
+
& .crisp-switch-thumb { width: 12px; height: 12px; margin: 0 2px; border-radius: ${c.radius.full}; background: #fff; transition: transform .2s ease; }
|
|
13
13
|
&[data-checked] { background: ${c.bgBrandSolid}; }
|
|
14
|
-
&[data-checked] .switch-thumb { transform: translateX(8px); }
|
|
14
|
+
&[data-checked] .crisp-switch-thumb { transform: translateX(8px); }
|
|
15
15
|
&:focus-visible { outline: 2px solid ${c.bgBrandSolid}; outline-offset: 2px; }
|
|
16
16
|
&:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
17
17
|
`,
|
|
@@ -12,7 +12,7 @@ export const Table = React.forwardRef(({ interactive, surface, className, wrappe
|
|
|
12
12
|
interactive,
|
|
13
13
|
surface,
|
|
14
14
|
className: wrapperClassName,
|
|
15
|
-
}), children: _jsx("div", { ...scrollProps, className: `table-scroll${scrollProps?.className ? ` ${scrollProps.className}` : ""}`, children: _jsx("table", { ref: ref, className: className, ...props, children: children }) }) })));
|
|
15
|
+
}), children: _jsx("div", { ...scrollProps, className: `crisp-table-scroll${scrollProps?.className ? ` ${scrollProps.className}` : ""}`, children: _jsx("table", { ref: ref, className: className, ...props, children: children }) }) })));
|
|
16
16
|
Table.displayName = "Table";
|
|
17
17
|
export const TableHeader = React.forwardRef((props, ref) => _jsx("thead", { ref: ref, ...props }));
|
|
18
18
|
TableHeader.displayName = "TableHeader";
|
|
@@ -8,7 +8,7 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
8
8
|
const config = defineRecipe({
|
|
9
9
|
name: "table",
|
|
10
10
|
base: `display: block; box-sizing: border-box; background: ${c.bgSurface};
|
|
11
|
-
& .table-scroll { overflow-x: auto; }
|
|
11
|
+
& .crisp-table-scroll { overflow-x: auto; }
|
|
12
12
|
& table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: ${c.font.sans}; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
|
|
13
13
|
& th, & td { position: relative; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border-bottom: 1px solid ${c.borderSubtle}; border-inline-end: 1px solid ${c.borderSubtle}; text-align: start; vertical-align: middle; white-space: nowrap; overflow: hidden; }
|
|
14
14
|
& th { height: ${c.size.tableHeader}; background: ${c.bgSurface}; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; letter-spacing: -0.14px; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); user-select: none; }
|