@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
|
@@ -20,7 +20,7 @@ const config = defineRecipe({
|
|
|
20
20
|
display: flex; flex-direction: column; gap: ${c.space["2"]};
|
|
21
21
|
font-family: ${c.font.sans}; min-width: 0;
|
|
22
22
|
|
|
23
|
-
& .fileupload-zone {
|
|
23
|
+
& .crisp-fileupload-zone {
|
|
24
24
|
box-sizing: border-box; position: relative;
|
|
25
25
|
display: flex; flex-direction: column; align-items: center;
|
|
26
26
|
justify-content: center; gap: ${c.space["1"]};
|
|
@@ -31,53 +31,53 @@ const config = defineRecipe({
|
|
|
31
31
|
transition: background-color .12s, border-color .12s;
|
|
32
32
|
outline: 2px solid transparent; outline-offset: -2px;
|
|
33
33
|
}
|
|
34
|
-
& .fileupload-zone:hover { background: ${c.bgRaised}; }
|
|
35
|
-
& .fileupload-zone:focus-visible { outline-color: ${c.strokeFocusRing}; }
|
|
36
|
-
& .fileupload-zone[data-dragging] {
|
|
34
|
+
& .crisp-fileupload-zone:hover { background: ${c.bgRaised}; }
|
|
35
|
+
& .crisp-fileupload-zone:focus-visible { outline-color: ${c.strokeFocusRing}; }
|
|
36
|
+
& .crisp-fileupload-zone[data-dragging] {
|
|
37
37
|
border-color: ${c.bgBrandSolid};
|
|
38
38
|
background: color-mix(in srgb, ${c.bgBrandSolid} 6%, transparent);
|
|
39
39
|
}
|
|
40
|
-
& .fileupload-zone[data-disabled] { opacity: .5; cursor: not-allowed; }
|
|
41
|
-
& .fileupload-zone[data-invalid] { border-color: ${c.bgDanger}; }
|
|
40
|
+
& .crisp-fileupload-zone[data-disabled] { opacity: .5; cursor: not-allowed; }
|
|
41
|
+
& .crisp-fileupload-zone[data-invalid] { border-color: ${c.bgDanger}; }
|
|
42
42
|
|
|
43
43
|
/* "No files" 16/20 weight 600 */
|
|
44
|
-
& .fileupload-title {
|
|
44
|
+
& .crisp-fileupload-title {
|
|
45
45
|
color: ${c.fgPrimary}; font-size: ${c.text.xl}; line-height: 20px;
|
|
46
46
|
font-weight: ${c.weight.semibold};
|
|
47
47
|
}
|
|
48
48
|
/* The hint line, 14/20 weight 500 at 63% of the foreground */
|
|
49
|
-
& .fileupload-hint {
|
|
49
|
+
& .crisp-fileupload-hint {
|
|
50
50
|
color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent);
|
|
51
51
|
font-size: ${c.text.lg}; line-height: 20px;
|
|
52
52
|
font-weight: ${c.weight.medium};
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
& .fileupload-input {
|
|
55
|
+
& .crisp-fileupload-input {
|
|
56
56
|
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
57
57
|
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
& .fileupload-list { display: flex; flex-direction: column; gap: ${c.space["1"]}; margin: 0; padding: 0; list-style: none; }
|
|
60
|
+
& .crisp-fileupload-list { display: flex; flex-direction: column; gap: ${c.space["1"]}; margin: 0; padding: 0; list-style: none; }
|
|
61
61
|
/* the row height crisp measured for a data-grid row */
|
|
62
|
-
& .fileupload-item {
|
|
62
|
+
& .crisp-fileupload-item {
|
|
63
63
|
display: flex; align-items: center; gap: ${c.space["2"]};
|
|
64
64
|
min-height: ${c.size.tableRow}; padding: 0 ${c.space["2"]};
|
|
65
65
|
border-radius: ${c.radius.md}; background: ${c.bgRaised};
|
|
66
66
|
font-size: ${c.text.lg}; line-height: 20px; color: ${c.fgPrimary};
|
|
67
67
|
}
|
|
68
|
-
& .fileupload-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
69
|
-
& .fileupload-item-size { flex-shrink: 0; color: ${c.fgMuted}; font-size: ${c.text.sm}; font-variant-numeric: tabular-nums; }
|
|
70
|
-
& .fileupload-item[data-status="error"] { color: ${c.bgDanger}; }
|
|
71
|
-
& .fileupload-item[data-status="error"] .fileupload-item-size { color: ${c.bgDanger}; }
|
|
68
|
+
& .crisp-fileupload-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
69
|
+
& .crisp-fileupload-item-size { flex-shrink: 0; color: ${c.fgMuted}; font-size: ${c.text.sm}; font-variant-numeric: tabular-nums; }
|
|
70
|
+
& .crisp-fileupload-item[data-status="error"] { color: ${c.bgDanger}; }
|
|
71
|
+
& .crisp-fileupload-item[data-status="error"] .crisp-fileupload-item-size { color: ${c.bgDanger}; }
|
|
72
72
|
|
|
73
73
|
/* progress track, reusing the measured Progress geometry */
|
|
74
|
-
& .fileupload-progress {
|
|
74
|
+
& .crisp-fileupload-progress {
|
|
75
75
|
flex-shrink: 0; width: 64px; height: 4px; border-radius: ${c.radius.full};
|
|
76
76
|
background: ${c.bgNeutralWeak}; overflow: hidden;
|
|
77
77
|
}
|
|
78
|
-
& .fileupload-progress-fill { height: 100%; background: ${c.bgBrandSolid}; transition: width .2s ease; }
|
|
78
|
+
& .crisp-fileupload-progress-fill { height: 100%; background: ${c.bgBrandSolid}; transition: width .2s ease; }
|
|
79
79
|
|
|
80
|
-
& .fileupload-remove {
|
|
80
|
+
& .crisp-fileupload-remove {
|
|
81
81
|
display: inline-flex; align-items: center; justify-content: center;
|
|
82
82
|
flex-shrink: 0; width: ${c.size.icon}; height: ${c.size.icon};
|
|
83
83
|
padding: 0; border: none; border-radius: ${c.radius.sm};
|
|
@@ -85,15 +85,15 @@ const config = defineRecipe({
|
|
|
85
85
|
font-family: inherit;
|
|
86
86
|
outline: 2px solid transparent; outline-offset: -2px;
|
|
87
87
|
}
|
|
88
|
-
& .fileupload-remove:hover { color: ${c.fgPrimary}; }
|
|
89
|
-
& .fileupload-remove:focus-visible { outline-color: ${c.strokeFocusRing}; }
|
|
88
|
+
& .crisp-fileupload-remove:hover { color: ${c.fgPrimary}; }
|
|
89
|
+
& .crisp-fileupload-remove:focus-visible { outline-color: ${c.strokeFocusRing}; }
|
|
90
90
|
|
|
91
|
-
& .fileupload-errors { display: flex; flex-direction: column; gap: ${c.space["0.5"]}; margin: 0; padding: 0; list-style: none; }
|
|
91
|
+
& .crisp-fileupload-errors { display: flex; flex-direction: column; gap: ${c.space["0.5"]}; margin: 0; padding: 0; list-style: none; }
|
|
92
92
|
/* out of flow while empty, so the always-mounted live region costs no
|
|
93
93
|
layout: display:none would take it out of the accessibility tree, which
|
|
94
94
|
is the one thing it exists to be in */
|
|
95
|
-
& .fileupload-errors:empty { position: absolute; }
|
|
96
|
-
& .fileupload-error { color: ${c.bgDanger}; font-size: ${c.text.md}; line-height: 18px; }
|
|
95
|
+
& .crisp-fileupload-errors:empty { position: absolute; }
|
|
96
|
+
& .crisp-fileupload-error { color: ${c.bgDanger}; font-size: ${c.text.md}; line-height: 18px; }
|
|
97
97
|
`,
|
|
98
98
|
variants: {},
|
|
99
99
|
defaultVariants: {},
|
|
@@ -66,6 +66,6 @@ export function FormField({ label, htmlFor, required, optional, description, err
|
|
|
66
66
|
invalid: error != null,
|
|
67
67
|
required: !!required,
|
|
68
68
|
});
|
|
69
|
-
return (_jsxs("div", { className: formfieldRecipe({ className }), ...rest, children: [_jsxs("label", { className: "formfield-label", htmlFor: htmlFor, children: [label, required && (_jsx("span", { className: "formfield-required", "aria-hidden": "true", children: "*" })), optional && !required && (_jsx("span", { className: "formfield-optional", children: optional === true ? "(optional)" : optional }))] }), children, error != null ? (_jsx("span", { className: "formfield-error", id: hasMsg ? descId : undefined, children: error })) : description != null ? (_jsx("span", { className: "formfield-desc", id: hasMsg ? descId : undefined, children: description })) : null] }));
|
|
69
|
+
return (_jsxs("div", { className: formfieldRecipe({ className }), ...rest, children: [_jsxs("label", { className: "crisp-formfield-label", htmlFor: htmlFor, children: [label, required && (_jsx("span", { className: "crisp-formfield-required", "aria-hidden": "true", children: "*" })), optional && !required && (_jsx("span", { className: "crisp-formfield-optional", children: optional === true ? "(optional)" : optional }))] }), children, error != null ? (_jsx("span", { className: "crisp-formfield-error", id: hasMsg ? descId : undefined, children: error })) : description != null ? (_jsx("span", { className: "crisp-formfield-desc", id: hasMsg ? descId : undefined, children: description })) : null] }));
|
|
70
70
|
}
|
|
71
71
|
FormField.displayName = "FormField";
|
|
@@ -6,11 +6,11 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
6
6
|
const config = defineRecipe({
|
|
7
7
|
name: "formfield",
|
|
8
8
|
base: `display: flex; flex-direction: column; gap: ${c.space["1.5"]}; box-sizing: border-box; font-family: ${c.font.sans};
|
|
9
|
-
& .formfield-label { display: inline-flex; align-items: center; gap: ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
10
|
-
& .formfield-required { color: ${c.bgDanger}; }
|
|
11
|
-
& .formfield-optional { color: color-mix(in srgb, ${c.fgPrimary} 40%, transparent); font-weight: ${c.weight.regular}; }
|
|
12
|
-
& .formfield-desc { font-size: ${c.text.sm}; line-height: 16px; color: ${c.fgMuted}; }
|
|
13
|
-
& .formfield-error { font-size: ${c.text.sm}; line-height: 16px; color: ${c.bgDanger}; }`,
|
|
9
|
+
& .crisp-formfield-label { display: inline-flex; align-items: center; gap: ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
10
|
+
& .crisp-formfield-required { color: ${c.bgDanger}; }
|
|
11
|
+
& .crisp-formfield-optional { color: color-mix(in srgb, ${c.fgPrimary} 40%, transparent); font-weight: ${c.weight.regular}; }
|
|
12
|
+
& .crisp-formfield-desc { font-size: ${c.text.sm}; line-height: 16px; color: ${c.fgMuted}; }
|
|
13
|
+
& .crisp-formfield-error { font-size: ${c.text.sm}; line-height: 16px; color: ${c.bgDanger}; }`,
|
|
14
14
|
variants: {},
|
|
15
15
|
defaultVariants: {},
|
|
16
16
|
compoundVariants: [],
|
|
@@ -6,6 +6,6 @@ export const Input = React.forwardRef(({ size, invalid, className, style, ...pro
|
|
|
6
6
|
// replaced element and cannot have one. Everything the consumer passes
|
|
7
7
|
// still lands on the <input> itself, so `id`, `name`, `onChange`, form
|
|
8
8
|
// association and every native attribute behave exactly as before.
|
|
9
|
-
return (_jsx("span", { className: inputRecipe({ size, invalid, className }), style: style, children: _jsx("input", { ref: ref, className: "input-value", "aria-invalid": invalid === true || undefined, ...props }) }));
|
|
9
|
+
return (_jsx("span", { className: inputRecipe({ size, invalid, className }), style: style, children: _jsx("input", { ref: ref, className: "crisp-input-value", "aria-invalid": invalid === true || undefined, ...props }) }));
|
|
10
10
|
});
|
|
11
11
|
Input.displayName = "Input";
|
|
@@ -25,19 +25,19 @@ const config = defineRecipe({
|
|
|
25
25
|
}
|
|
26
26
|
&:focus-within::after { border-color: ${c.strokeFieldFocus}; }
|
|
27
27
|
|
|
28
|
-
& .input-value {
|
|
28
|
+
& .crisp-input-value {
|
|
29
29
|
box-sizing: border-box; flex: 1 1 auto; min-width: 0; width: 100%;
|
|
30
30
|
align-self: stretch; margin: 0; border: none; background: none; outline: none;
|
|
31
31
|
font: inherit; color: ${c.fgPrimary};
|
|
32
32
|
}
|
|
33
|
-
& .input-value::placeholder { color: ${c.fgMuted}; }
|
|
34
|
-
& .input-value:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
35
|
-
&:has(.input-value:disabled) { opacity: 1; }
|
|
33
|
+
& .crisp-input-value::placeholder { color: ${c.fgMuted}; }
|
|
34
|
+
& .crisp-input-value:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
35
|
+
&:has(.crisp-input-value:disabled) { opacity: 1; }
|
|
36
36
|
`,
|
|
37
37
|
variants: {
|
|
38
38
|
size: {
|
|
39
|
-
medium: `height: 32px; border-radius: ${c.radius.md}; & .input-value { padding-inline: ${c.space["2.5"]}; }`,
|
|
40
|
-
large: `height: 36px; border-radius: 10px; & .input-value { padding-inline: ${c.space["3"]}; }`,
|
|
39
|
+
medium: `height: 32px; border-radius: ${c.radius.md}; & .crisp-input-value { padding-inline: ${c.space["2.5"]}; }`,
|
|
40
|
+
large: `height: 36px; border-radius: 10px; & .crisp-input-value { padding-inline: ${c.space["3"]}; }`,
|
|
41
41
|
},
|
|
42
42
|
invalid: {
|
|
43
43
|
// critical outranks focus: a field that is wrong stays visibly wrong
|
|
@@ -43,12 +43,12 @@ export function LineChart({ data, height = 240, max, ticks = 5, color, area = tr
|
|
|
43
43
|
`Line chart: ${data.map((d) => `${d.label} ${format(d.value)}`).join(", ")}`;
|
|
44
44
|
return (_jsxs("div", { className: linechartRecipe({ className }), ...rest, style: {
|
|
45
45
|
height,
|
|
46
|
-
"--linechart-yaxis-width": yAxisWidthValue,
|
|
47
|
-
}, role: "img", "aria-label": summary, children: [_jsxs("div", { className: "linechart-body", children: [_jsx("div", { className: "linechart-yaxis", children: tickValues.map((t) => (_jsx("span", { className: "linechart-ytick", style: { bottom: `${(t / top) * 100}%` }, children: format(t) }, t))) }), _jsxs("div", { className: "linechart-plot", children: [tickValues.map((t) => (_jsx("div", { className: "linechart-grid", style: { bottom: `${(t / top) * 100}%` } }, t))), pts.length > 1 && (_jsxs("svg", { className: "linechart-svg", viewBox: "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [area && _jsx("path", { className: "linechart-area", d: areaPath }), _jsx("polyline", { className: "linechart-line", points: line, style: { stroke: color } })] })), dots &&
|
|
48
|
-
pts.map((p, i) => (_jsx("span", { className: "linechart-dot-html", style: {
|
|
46
|
+
"--crisp-linechart-yaxis-width": yAxisWidthValue,
|
|
47
|
+
}, role: "img", "aria-label": summary, children: [_jsxs("div", { className: "crisp-linechart-body", children: [_jsx("div", { className: "crisp-linechart-yaxis", children: tickValues.map((t) => (_jsx("span", { className: "crisp-linechart-ytick", style: { bottom: `${(t / top) * 100}%` }, children: format(t) }, t))) }), _jsxs("div", { className: "crisp-linechart-plot", children: [tickValues.map((t) => (_jsx("div", { className: "crisp-linechart-grid", style: { bottom: `${(t / top) * 100}%` } }, t))), pts.length > 1 && (_jsxs("svg", { className: "crisp-linechart-svg", viewBox: "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [area && _jsx("path", { className: "crisp-linechart-area", d: areaPath }), _jsx("polyline", { className: "crisp-linechart-line", points: line, style: { stroke: color } })] })), dots &&
|
|
48
|
+
pts.map((p, i) => (_jsx("span", { className: "crisp-linechart-dot-html", style: {
|
|
49
49
|
left: `${p.x}%`,
|
|
50
50
|
bottom: `${p.frac * 100}%`,
|
|
51
51
|
borderColor: color,
|
|
52
|
-
}, title: `${data[i].label}: ${format(data[i].value)}` }, i)))] })] }), _jsx("div", { className: "linechart-xaxis", children: data.map((d) => (_jsx("span", { className: "linechart-xlabel", children: d.label }, d.label))) }), xAxisTitle != null && (_jsx("div", { className: "linechart-axis-title", children: xAxisTitle }))] }));
|
|
52
|
+
}, title: `${data[i].label}: ${format(data[i].value)}` }, i)))] })] }), _jsx("div", { className: "crisp-linechart-xaxis", children: data.map((d) => (_jsx("span", { className: "crisp-linechart-xlabel", children: d.label }, d.label))) }), xAxisTitle != null && (_jsx("div", { className: "crisp-linechart-axis-title", children: xAxisTitle }))] }));
|
|
53
53
|
}
|
|
54
54
|
LineChart.displayName = "LineChart";
|
|
@@ -6,24 +6,24 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
6
6
|
// its box (non-scaling stroke keeps the line crisp); axes are HTML.
|
|
7
7
|
const config = defineRecipe({
|
|
8
8
|
name: "linechart",
|
|
9
|
-
// --linechart-yaxis-width is the one source of truth for the value-axis
|
|
9
|
+
// --crisp-linechart-yaxis-width is the one source of truth for the value-axis
|
|
10
10
|
// gutter: the component sets it (auto-sized to the longest tick label, or
|
|
11
11
|
// pinned via `yAxisWidth`) on the root element, and it inherits down to the
|
|
12
12
|
// x-axis padding and axis title so they never drift out of alignment. 34px
|
|
13
13
|
// is only the pre-JS fallback (e.g. if `linechartRecipe` is used bare).
|
|
14
|
-
base: `display: flex; flex-direction: column; box-sizing: border-box; font-family: ${c.font.sans}; --linechart-yaxis-width: 34px;
|
|
15
|
-
& .linechart-body { display: flex; flex: 1; min-height: 0; }
|
|
16
|
-
& .linechart-yaxis { position: relative; flex-shrink: 0; width: var(--linechart-yaxis-width); }
|
|
17
|
-
& .linechart-ytick { position: absolute; inset-inline-end: ${c.space["2"]}; transform: translateY(50%); font-size: ${c.text.xs}; color: ${c.fgMuted}; white-space: nowrap; }
|
|
18
|
-
& .linechart-plot { position: relative; flex: 1; min-width: 0; border-bottom: 1px solid ${c.borderDefault}; }
|
|
19
|
-
& .linechart-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed ${c.borderSubtle}; pointer-events: none; }
|
|
20
|
-
& .linechart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
|
|
21
|
-
& .linechart-area { fill: color-mix(in srgb, ${c.bgBrandSolid} 12%, transparent); stroke: none; }
|
|
22
|
-
& .linechart-line { fill: none; stroke: ${c.bgBrandSolid}; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
|
|
23
|
-
& .linechart-dot-html { position: absolute; width: 8px; height: 8px; box-sizing: border-box; border-radius: ${c.radius.full}; background: ${c.bgSurface}; border: 2px solid ${c.bgBrandSolid}; transform: translate(-50%, 50%); pointer-events: auto; }
|
|
24
|
-
& .linechart-xaxis { display: flex; margin-top: ${c.space["1.5"]}; padding-inline-start: var(--linechart-yaxis-width); }
|
|
25
|
-
& .linechart-xlabel { flex: 1; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
26
|
-
& .linechart-axis-title { margin-top: ${c.space["1"]}; padding-inline-start: var(--linechart-yaxis-width); text-align: center; font-size: ${c.text.sm}; color: ${c.fgMuted}; }`,
|
|
14
|
+
base: `display: flex; flex-direction: column; box-sizing: border-box; font-family: ${c.font.sans}; --crisp-linechart-yaxis-width: 34px;
|
|
15
|
+
& .crisp-linechart-body { display: flex; flex: 1; min-height: 0; }
|
|
16
|
+
& .crisp-linechart-yaxis { position: relative; flex-shrink: 0; width: var(--crisp-linechart-yaxis-width); }
|
|
17
|
+
& .crisp-linechart-ytick { position: absolute; inset-inline-end: ${c.space["2"]}; transform: translateY(50%); font-size: ${c.text.xs}; color: ${c.fgMuted}; white-space: nowrap; }
|
|
18
|
+
& .crisp-linechart-plot { position: relative; flex: 1; min-width: 0; border-bottom: 1px solid ${c.borderDefault}; }
|
|
19
|
+
& .crisp-linechart-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed ${c.borderSubtle}; pointer-events: none; }
|
|
20
|
+
& .crisp-linechart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
|
|
21
|
+
& .crisp-linechart-area { fill: color-mix(in srgb, ${c.bgBrandSolid} 12%, transparent); stroke: none; }
|
|
22
|
+
& .crisp-linechart-line { fill: none; stroke: ${c.bgBrandSolid}; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
|
|
23
|
+
& .crisp-linechart-dot-html { position: absolute; width: 8px; height: 8px; box-sizing: border-box; border-radius: ${c.radius.full}; background: ${c.bgSurface}; border: 2px solid ${c.bgBrandSolid}; transform: translate(-50%, 50%); pointer-events: auto; }
|
|
24
|
+
& .crisp-linechart-xaxis { display: flex; margin-top: ${c.space["1.5"]}; padding-inline-start: var(--crisp-linechart-yaxis-width); }
|
|
25
|
+
& .crisp-linechart-xlabel { flex: 1; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
26
|
+
& .crisp-linechart-axis-title { margin-top: ${c.space["1"]}; padding-inline-start: var(--crisp-linechart-yaxis-width); text-align: center; font-size: ${c.text.sm}; color: ${c.fgMuted}; }`,
|
|
27
27
|
variants: {},
|
|
28
28
|
defaultVariants: {},
|
|
29
29
|
compoundVariants: [],
|
|
@@ -88,27 +88,27 @@ export function Menu({ trigger, children, align = "start", open: openProp, defau
|
|
|
88
88
|
setOpen(!open);
|
|
89
89
|
},
|
|
90
90
|
});
|
|
91
|
-
return (_jsxs("div", { ref: rootRef, className: menuRecipe({ className }), children: [triggerEl, open && (_jsx(MenuContext.Provider, { value: { close }, children: _jsx("div", { ref: contentRef, className: "menu-content", role: "menu", id: surfaceId, "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : triggerId, "data-align": align, "data-up": up ? "" : undefined, style: pos, onKeyDown: onContentKeyDown, children: children }) }))] }));
|
|
91
|
+
return (_jsxs("div", { ref: rootRef, className: menuRecipe({ className }), children: [triggerEl, open && (_jsx(MenuContext.Provider, { value: { close }, children: _jsx("div", { ref: contentRef, className: "crisp-menu-content", role: "menu", id: surfaceId, "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : triggerId, "data-align": align, "data-up": up ? "" : undefined, style: pos, onKeyDown: onContentKeyDown, children: children }) }))] }));
|
|
92
92
|
}
|
|
93
93
|
Menu.displayName = "Menu";
|
|
94
94
|
export function MenuItem({ children, icon, shortcut, danger, disabled, onSelect, closeOnSelect = true, }) {
|
|
95
95
|
const ctx = React.useContext(MenuContext);
|
|
96
|
-
return (_jsxs("button", { type: "button", role: "menuitem", tabIndex: -1, disabled: disabled, "data-disabled": disabled ? "" : undefined, className: `menu-item${danger ? " menu-item--danger" : ""}`, onClick: () => {
|
|
96
|
+
return (_jsxs("button", { type: "button", role: "menuitem", tabIndex: -1, disabled: disabled, "data-disabled": disabled ? "" : undefined, className: `crisp-menu-item${danger ? " crisp-menu-item--danger" : ""}`, onClick: () => {
|
|
97
97
|
onSelect?.();
|
|
98
98
|
if (closeOnSelect)
|
|
99
99
|
ctx?.close();
|
|
100
|
-
}, children: [icon, _jsx("span", { className: "menu-item-label", children: children }), shortcut && _jsx("span", { className: "menu-item-shortcut", children: shortcut })] }));
|
|
100
|
+
}, children: [icon, _jsx("span", { className: "crisp-menu-item-label", children: children }), shortcut && _jsx("span", { className: "crisp-menu-item-shortcut", children: shortcut })] }));
|
|
101
101
|
}
|
|
102
102
|
MenuItem.displayName = "MenuItem";
|
|
103
103
|
export function MenuCheckboxItem({ children, checked, onCheckedChange, disabled, }) {
|
|
104
|
-
return (_jsxs("button", { type: "button", role: "menuitemcheckbox", "aria-checked": checked, tabIndex: -1, disabled: disabled, "data-disabled": disabled ? "" : undefined, className: "menu-item", onClick: () => onCheckedChange?.(!checked), children: [checked ? (_jsx(Check, { className: "menu-item-check", size: 15, strokeWidth: 2 })) : (_jsx("span", { className: "menu-item-check--placeholder" })), _jsx("span", { className: "menu-item-label", children: children })] }));
|
|
104
|
+
return (_jsxs("button", { type: "button", role: "menuitemcheckbox", "aria-checked": checked, tabIndex: -1, disabled: disabled, "data-disabled": disabled ? "" : undefined, className: "crisp-menu-item", onClick: () => onCheckedChange?.(!checked), children: [checked ? (_jsx(Check, { className: "crisp-menu-item-check", size: 15, strokeWidth: 2 })) : (_jsx("span", { className: "crisp-menu-item-check--placeholder" })), _jsx("span", { className: "crisp-menu-item-label", children: children })] }));
|
|
105
105
|
}
|
|
106
106
|
MenuCheckboxItem.displayName = "MenuCheckboxItem";
|
|
107
107
|
export function MenuSeparator() {
|
|
108
|
-
return _jsx("hr", { className: "menu-sep" });
|
|
108
|
+
return _jsx("hr", { className: "crisp-menu-sep" });
|
|
109
109
|
}
|
|
110
110
|
MenuSeparator.displayName = "MenuSeparator";
|
|
111
111
|
export function MenuLabel({ children }) {
|
|
112
|
-
return _jsx("div", { className: "menu-label", children: children });
|
|
112
|
+
return _jsx("div", { className: "crisp-menu-label", children: children });
|
|
113
113
|
}
|
|
114
114
|
MenuLabel.displayName = "MenuLabel";
|
|
@@ -11,37 +11,37 @@ const config = defineRecipe({
|
|
|
11
11
|
position: relative; display: inline-flex; font-family: ${c.font.sans};
|
|
12
12
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
13
13
|
|
|
14
|
-
& .menu-content {
|
|
14
|
+
& .crisp-menu-content {
|
|
15
15
|
position: fixed; z-index: 60; box-sizing: border-box; display: flex; flex-direction: column; gap: ${c.space.px};
|
|
16
16
|
min-width: 200px; max-height: 360px; overflow-y: auto; padding: ${c.space["1"]};
|
|
17
17
|
border-radius: ${c.radius.xl}; background: ${c.bgPopover};
|
|
18
18
|
box-shadow: ${e.floating};
|
|
19
19
|
transform-origin: top left; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease;
|
|
20
20
|
}
|
|
21
|
-
& .menu-content[data-align="end"] { transform-origin: top right; }
|
|
22
|
-
& .menu-content[data-up] { transform-origin: bottom left; }
|
|
23
|
-
& .menu-content[data-up][data-align="end"] { transform-origin: bottom right; }
|
|
24
|
-
& .menu-content { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
21
|
+
& .crisp-menu-content[data-align="end"] { transform-origin: top right; }
|
|
22
|
+
& .crisp-menu-content[data-up] { transform-origin: bottom left; }
|
|
23
|
+
& .crisp-menu-content[data-up][data-align="end"] { transform-origin: bottom right; }
|
|
24
|
+
& .crisp-menu-content { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
25
25
|
|
|
26
|
-
& .menu-item {
|
|
26
|
+
& .crisp-menu-item {
|
|
27
27
|
box-sizing: border-box; display: flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; height: ${c.size.menuRow}; flex-shrink: 0;
|
|
28
28
|
margin: 0; padding: 0 ${c.space["2"]}; border: none; background: none; border-radius: ${c.radius.md};
|
|
29
29
|
font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; text-align: start; cursor: pointer; white-space: nowrap;
|
|
30
30
|
}
|
|
31
|
-
& .menu-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
32
|
-
& .menu-item:focus { outline: none; }
|
|
33
|
-
& .menu-item:hover:not([data-disabled]), & .menu-item:focus-visible:not([data-disabled]), & .menu-item[data-highlighted]:not([data-disabled]) { background: ${c.bgRaised}; }
|
|
34
|
-
& .menu-item[data-disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
35
|
-
& .menu-item--danger { color: ${c.bgDanger}; }
|
|
36
|
-
& .menu-item--danger svg { color: ${c.bgDanger}; }
|
|
37
|
-
& .menu-item--danger:hover, & .menu-item--danger:focus-visible, & .menu-item--danger[data-highlighted] { background: color-mix(in srgb, ${c.bgDanger} 10%, transparent); }
|
|
38
|
-
& .menu-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
39
|
-
& .menu-item-shortcut { flex-shrink: 0; margin-inline-start: ${c.space["3"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; letter-spacing: 0.02em; }
|
|
40
|
-
& .menu-item-check { flex-shrink: 0; color: ${c.bgBrandSolid}; }
|
|
41
|
-
& .menu-item-check--placeholder { width: 15px; }
|
|
31
|
+
& .crisp-menu-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
32
|
+
& .crisp-menu-item:focus { outline: none; }
|
|
33
|
+
& .crisp-menu-item:hover:not([data-disabled]), & .crisp-menu-item:focus-visible:not([data-disabled]), & .crisp-menu-item[data-highlighted]:not([data-disabled]) { background: ${c.bgRaised}; }
|
|
34
|
+
& .crisp-menu-item[data-disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
35
|
+
& .crisp-menu-item--danger { color: ${c.bgDanger}; }
|
|
36
|
+
& .crisp-menu-item--danger svg { color: ${c.bgDanger}; }
|
|
37
|
+
& .crisp-menu-item--danger:hover, & .crisp-menu-item--danger:focus-visible, & .crisp-menu-item--danger[data-highlighted] { background: color-mix(in srgb, ${c.bgDanger} 10%, transparent); }
|
|
38
|
+
& .crisp-menu-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
39
|
+
& .crisp-menu-item-shortcut { flex-shrink: 0; margin-inline-start: ${c.space["3"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; letter-spacing: 0.02em; }
|
|
40
|
+
& .crisp-menu-item-check { flex-shrink: 0; color: ${c.bgBrandSolid}; }
|
|
41
|
+
& .crisp-menu-item-check--placeholder { width: 15px; }
|
|
42
42
|
|
|
43
|
-
& .menu-sep { height: 1px; flex-shrink: 0; border: none; margin: ${c.space["1"]} calc(-1 * ${c.space["1"]}); background: ${c.borderSubtle}; }
|
|
44
|
-
& .menu-label { padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["0.5"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
43
|
+
& .crisp-menu-sep { height: 1px; flex-shrink: 0; border: none; margin: ${c.space["1"]} calc(-1 * ${c.space["1"]}); background: ${c.borderSubtle}; }
|
|
44
|
+
& .crisp-menu-label { padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["0.5"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
45
45
|
`,
|
|
46
46
|
variants: {},
|
|
47
47
|
defaultVariants: {},
|
|
@@ -21,7 +21,7 @@ function toneFor(t) {
|
|
|
21
21
|
return TONES[h % TONES.length];
|
|
22
22
|
}
|
|
23
23
|
function Chip({ opt }) {
|
|
24
|
-
return (_jsx("span", { className: "recordstable-tag", "data-tone": opt.tone ?? toneFor(opt.value), children: opt.label }));
|
|
24
|
+
return (_jsx("span", { className: "crisp-recordstable-tag", "data-tone": opt.tone ?? toneFor(opt.value), children: opt.label }));
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* A multi-select / tag editor — measured from a cell tag picker. The
|
|
@@ -130,19 +130,19 @@ id, placeholder = "Select…", searchable = true, searchPlaceholder = "Search…
|
|
|
130
130
|
return () => document.removeEventListener("pointerdown", onDown);
|
|
131
131
|
}, [open]);
|
|
132
132
|
return (_jsxs("div", { ref: rootRef, className: multiselectRecipe({ className }), ...rest, children: [name &&
|
|
133
|
-
(value.length > 0 ? value : required ? [""] : []).map((v) => (_jsx("input", { className: "crisp-formvalue", style: formValueStyle, name: name, value: v, required: required, tabIndex: -1, "aria-hidden": "true", onChange: () => { } }, v))), _jsxs("button", { ref: triggerRef, id: id, type: "button", 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: "multiselect-trigger", onClick: () => (open ? setOpen(false) : openMenu()), onKeyDown: (e) => {
|
|
133
|
+
(value.length > 0 ? value : required ? [""] : []).map((v) => (_jsx("input", { className: "crisp-formvalue", style: formValueStyle, name: name, value: v, required: required, tabIndex: -1, "aria-hidden": "true", onChange: () => { } }, v))), _jsxs("button", { ref: triggerRef, id: id, type: "button", 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-multiselect-trigger", onClick: () => (open ? setOpen(false) : openMenu()), onKeyDown: (e) => {
|
|
134
134
|
if (open && !searchable)
|
|
135
135
|
onNavKeys(e);
|
|
136
136
|
else if (!open && (e.key === "ArrowDown" || e.key === "Enter")) {
|
|
137
137
|
e.preventDefault();
|
|
138
138
|
openMenu();
|
|
139
139
|
}
|
|
140
|
-
}, children: [_jsx("span", { className: "multiselect-chips", children: selectedOptions.length === 0 ? (_jsx("span", { className: "multiselect-placeholder", children: placeholder })) : (selectedOptions.map((o) => _jsx(Chip, { opt: o }, o.value))) }), _jsx(ChevronDown, { className: "multiselect-chevron", size: 16, strokeWidth: 1.75 })] }), open && (_jsxs("div", { id: listboxId, className: "multiselect-listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": ariaLabel, "data-up": up ? "" : undefined, style: pos, children: [searchable && (_jsxs("div", { className: "multiselect-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) => {
|
|
140
|
+
}, children: [_jsx("span", { className: "crisp-multiselect-chips", children: selectedOptions.length === 0 ? (_jsx("span", { className: "crisp-multiselect-placeholder", children: placeholder })) : (selectedOptions.map((o) => _jsx(Chip, { opt: o }, o.value))) }), _jsx(ChevronDown, { className: "crisp-multiselect-chevron", size: 16, strokeWidth: 1.75 })] }), open && (_jsxs("div", { id: listboxId, className: "crisp-multiselect-listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": ariaLabel, "data-up": up ? "" : undefined, style: pos, children: [searchable && (_jsxs("div", { className: "crisp-multiselect-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) => {
|
|
141
141
|
setQuery(e.target.value);
|
|
142
142
|
setHighlight(0);
|
|
143
|
-
}, onKeyDown: onNavKeys })] })), filtered.length === 0 ? (_jsx("div", { className: "multiselect-empty", children: emptyLabel })) : (filtered.map((opt, i) => {
|
|
143
|
+
}, onKeyDown: onNavKeys })] })), filtered.length === 0 ? (_jsx("div", { className: "crisp-multiselect-empty", children: emptyLabel })) : (filtered.map((opt, i) => {
|
|
144
144
|
const sel = selectedSet.has(opt.value);
|
|
145
|
-
return (_jsxs("button", { type: "button", id: optionId(i), role: "option", "aria-selected": sel, tabIndex: -1, "data-highlighted": i === highlight ? "" : undefined, className: "multiselect-option", onClick: () => toggle(opt.value), onMouseEnter: () => setHighlight(i), children: [_jsx("span", { className: "multiselect-option-chip", children: _jsx(Chip, { opt: opt }) }), _jsx("span", { className: "multiselect-check", children: sel && _jsx(Check, { size: 12, strokeWidth: 3 }) })] }, opt.value));
|
|
145
|
+
return (_jsxs("button", { type: "button", id: optionId(i), role: "option", "aria-selected": sel, tabIndex: -1, "data-highlighted": i === highlight ? "" : undefined, className: "crisp-multiselect-option", onClick: () => toggle(opt.value), onMouseEnter: () => setHighlight(i), children: [_jsx("span", { className: "crisp-multiselect-option-chip", children: _jsx(Chip, { opt: opt }) }), _jsx("span", { className: "crisp-multiselect-check", children: sel && _jsx(Check, { size: 12, strokeWidth: 3 }) })] }, opt.value));
|
|
146
146
|
}))] }))] }));
|
|
147
147
|
}
|
|
148
148
|
MultiSelect.displayName = "MultiSelect";
|
|
@@ -11,52 +11,52 @@ const config = defineRecipe({
|
|
|
11
11
|
position: relative; display: inline-flex; width: 100%; font-family: ${c.font.sans};
|
|
12
12
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
13
13
|
|
|
14
|
-
& .multiselect-trigger {
|
|
14
|
+
& .crisp-multiselect-trigger {
|
|
15
15
|
box-sizing: border-box; display: flex; align-items: center; gap: ${c.space["1"]}; width: 100%; min-width: 0; min-height: ${c.size.menuRow};
|
|
16
16
|
margin: 0; padding: ${c.space["0.5"]} ${c.space["1.5"]} ${c.space["0.5"]} ${c.space["2"]};
|
|
17
17
|
border: none; border-radius: ${c.radius.md}; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 7%, transparent);
|
|
18
18
|
font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; cursor: pointer; text-align: start;
|
|
19
19
|
transition: background-color .12s ease, box-shadow .12s ease;
|
|
20
20
|
}
|
|
21
|
-
& .multiselect-trigger:hover { background: ${c.bgRaised}; }
|
|
22
|
-
& .multiselect-trigger[data-open], & .multiselect-trigger:focus-visible { outline: none; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; background: ${c.bgSurface}; }
|
|
23
|
-
& .multiselect-trigger:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
24
|
-
& .multiselect-chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: ${c.space["1"]}; }
|
|
25
|
-
& .multiselect-placeholder { color: ${c.fgMuted}; }
|
|
26
|
-
& .multiselect-chevron { flex-shrink: 0; color: ${c.fgMuted}; transition: transform .15s ease; }
|
|
27
|
-
& .multiselect-trigger[data-open] .multiselect-chevron { transform: rotate(180deg); }
|
|
21
|
+
& .crisp-multiselect-trigger:hover { background: ${c.bgRaised}; }
|
|
22
|
+
& .crisp-multiselect-trigger[data-open], & .crisp-multiselect-trigger:focus-visible { outline: none; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; background: ${c.bgSurface}; }
|
|
23
|
+
& .crisp-multiselect-trigger:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
24
|
+
& .crisp-multiselect-chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: ${c.space["1"]}; }
|
|
25
|
+
& .crisp-multiselect-placeholder { color: ${c.fgMuted}; }
|
|
26
|
+
& .crisp-multiselect-chevron { flex-shrink: 0; color: ${c.fgMuted}; transition: transform .15s ease; }
|
|
27
|
+
& .crisp-multiselect-trigger[data-open] .crisp-multiselect-chevron { transform: rotate(180deg); }
|
|
28
28
|
|
|
29
|
-
& .multiselect-listbox {
|
|
29
|
+
& .crisp-multiselect-listbox {
|
|
30
30
|
position: fixed; z-index: 60; box-sizing: border-box; display: flex; flex-direction: column; gap: ${c.space.px};
|
|
31
31
|
max-height: 300px; overflow-y: auto; padding: ${c.space["1"]};
|
|
32
32
|
border-radius: ${c.radius.xl}; background: ${c.bgPopover};
|
|
33
33
|
box-shadow: ${e.floating};
|
|
34
34
|
transform-origin: top left; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease;
|
|
35
35
|
}
|
|
36
|
-
& .multiselect-listbox[data-up] { transform-origin: bottom left; }
|
|
37
|
-
& .multiselect-listbox { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
38
|
-
& .multiselect-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}; }
|
|
39
|
-
& .multiselect-search svg { flex-shrink: 0; }
|
|
40
|
-
& .multiselect-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
|
|
41
|
-
& .multiselect-search input::placeholder { color: ${c.fgMuted}; }
|
|
42
|
-
& .multiselect-option {
|
|
36
|
+
& .crisp-multiselect-listbox[data-up] { transform-origin: bottom left; }
|
|
37
|
+
& .crisp-multiselect-listbox { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
38
|
+
& .crisp-multiselect-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}; }
|
|
39
|
+
& .crisp-multiselect-search svg { flex-shrink: 0; }
|
|
40
|
+
& .crisp-multiselect-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
|
|
41
|
+
& .crisp-multiselect-search input::placeholder { color: ${c.fgMuted}; }
|
|
42
|
+
& .crisp-multiselect-option {
|
|
43
43
|
box-sizing: border-box; display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.menuRow}; flex-shrink: 0;
|
|
44
44
|
padding: 0 ${c.space["2"]}; margin: 0; border: none; background: none; border-radius: ${c.radius.md}; font-family: inherit; cursor: pointer; text-align: start;
|
|
45
45
|
}
|
|
46
|
-
& .multiselect-option[data-highlighted] { background: ${c.bgRaised}; }
|
|
47
|
-
& .multiselect-option-chip { flex: 0 1 auto; min-width: 0; overflow: hidden; }
|
|
48
|
-
& .multiselect-check { flex-shrink: 0; margin-inline-start: auto; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: ${c.radius.sm}; box-shadow: inset 0 0 0 1.5px ${c.borderDefault}; color: transparent; }
|
|
49
|
-
& .multiselect-option[aria-selected="true"] .multiselect-check { background: ${c.bgBrandSolid}; box-shadow: none; color: #fff; }
|
|
50
|
-
& .multiselect-empty { padding: ${c.space["3"]} ${c.space["2"]}; text-align: center; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
46
|
+
& .crisp-multiselect-option[data-highlighted] { background: ${c.bgRaised}; }
|
|
47
|
+
& .crisp-multiselect-option-chip { flex: 0 1 auto; min-width: 0; overflow: hidden; }
|
|
48
|
+
& .crisp-multiselect-check { flex-shrink: 0; margin-inline-start: auto; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: ${c.radius.sm}; box-shadow: inset 0 0 0 1.5px ${c.borderDefault}; color: transparent; }
|
|
49
|
+
& .crisp-multiselect-option[aria-selected="true"] .crisp-multiselect-check { background: ${c.bgBrandSolid}; box-shadow: none; color: #fff; }
|
|
50
|
+
& .crisp-multiselect-empty { padding: ${c.space["3"]} ${c.space["2"]}; text-align: center; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
51
51
|
|
|
52
|
-
& .recordstable-tag { display: inline-flex; align-items: center; height: ${c.size.chip}; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.chip}; font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 82%, transparent); }
|
|
53
|
-
& .recordstable-tag[data-tone="brand"] { background: color-mix(in srgb, ${c.bgBrandSolid} 14%, transparent); color: color-mix(in srgb, ${c.bgBrandSolid} 82%, ${c.fgPrimary}); }
|
|
54
|
-
& .recordstable-tag[data-tone="success"] { background: color-mix(in srgb, ${c.bgSuccess} 16%, transparent); color: color-mix(in srgb, ${c.bgSuccess} 78%, ${c.fgPrimary}); }
|
|
55
|
-
& .recordstable-tag[data-tone="warning"] { background: color-mix(in srgb, ${c.bgWarning} 18%, transparent); color: color-mix(in srgb, ${c.bgWarning} 82%, ${c.fgPrimary}); }
|
|
56
|
-
& .recordstable-tag[data-tone="danger"] { background: color-mix(in srgb, ${c.bgDanger} 15%, transparent); color: color-mix(in srgb, ${c.bgDanger} 80%, ${c.fgPrimary}); }
|
|
57
|
-
& .recordstable-tag[data-tone="purple"] { background: color-mix(in srgb, ${c.bgPurple} 16%, transparent); color: color-mix(in srgb, ${c.bgPurple} 80%, ${c.fgPrimary}); }
|
|
58
|
-
& .recordstable-tag[data-tone="cyan"] { background: color-mix(in srgb, ${c.bgCyan} 18%, transparent); color: color-mix(in srgb, ${c.bgCyan} 82%, ${c.fgPrimary}); }
|
|
59
|
-
& .recordstable-tag[data-tone="orange"] { background: color-mix(in srgb, ${c.bgOrange} 16%, transparent); color: color-mix(in srgb, ${c.bgOrange} 82%, ${c.fgPrimary}); }
|
|
52
|
+
& .crisp-recordstable-tag { display: inline-flex; align-items: center; height: ${c.size.chip}; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.chip}; font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 82%, transparent); }
|
|
53
|
+
& .crisp-recordstable-tag[data-tone="brand"] { background: color-mix(in srgb, ${c.bgBrandSolid} 14%, transparent); color: color-mix(in srgb, ${c.bgBrandSolid} 82%, ${c.fgPrimary}); }
|
|
54
|
+
& .crisp-recordstable-tag[data-tone="success"] { background: color-mix(in srgb, ${c.bgSuccess} 16%, transparent); color: color-mix(in srgb, ${c.bgSuccess} 78%, ${c.fgPrimary}); }
|
|
55
|
+
& .crisp-recordstable-tag[data-tone="warning"] { background: color-mix(in srgb, ${c.bgWarning} 18%, transparent); color: color-mix(in srgb, ${c.bgWarning} 82%, ${c.fgPrimary}); }
|
|
56
|
+
& .crisp-recordstable-tag[data-tone="danger"] { background: color-mix(in srgb, ${c.bgDanger} 15%, transparent); color: color-mix(in srgb, ${c.bgDanger} 80%, ${c.fgPrimary}); }
|
|
57
|
+
& .crisp-recordstable-tag[data-tone="purple"] { background: color-mix(in srgb, ${c.bgPurple} 16%, transparent); color: color-mix(in srgb, ${c.bgPurple} 80%, ${c.fgPrimary}); }
|
|
58
|
+
& .crisp-recordstable-tag[data-tone="cyan"] { background: color-mix(in srgb, ${c.bgCyan} 18%, transparent); color: color-mix(in srgb, ${c.bgCyan} 82%, ${c.fgPrimary}); }
|
|
59
|
+
& .crisp-recordstable-tag[data-tone="orange"] { background: color-mix(in srgb, ${c.bgOrange} 16%, transparent); color: color-mix(in srgb, ${c.bgOrange} 82%, ${c.fgPrimary}); }
|
|
60
60
|
`,
|
|
61
61
|
variants: {},
|
|
62
62
|
defaultVariants: {},
|
|
@@ -69,7 +69,7 @@ export function Popover({ trigger, children, align = "start", open: openProp, de
|
|
|
69
69
|
setOpen(!open);
|
|
70
70
|
},
|
|
71
71
|
});
|
|
72
|
-
return (_jsxs("div", { ref: rootRef, className: popoverRecipe({ className }), children: [triggerEl, open && (_jsx("div", { className: "popover-content", role: "dialog", id: surfaceId, "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : triggerId, "data-align": align, "data-up": up ? "" : undefined, style: pos, onKeyDown: (e) => {
|
|
72
|
+
return (_jsxs("div", { ref: rootRef, className: popoverRecipe({ className }), children: [triggerEl, open && (_jsx("div", { className: "crisp-popover-content", role: "dialog", id: surfaceId, "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : triggerId, "data-align": align, "data-up": up ? "" : undefined, style: pos, onKeyDown: (e) => {
|
|
73
73
|
if (e.key === "Escape") {
|
|
74
74
|
e.preventDefault();
|
|
75
75
|
setOpen(false);
|
|
@@ -7,9 +7,9 @@ import { contract as c, elevation as e } from "../../tokens/index.js";
|
|
|
7
7
|
const config = defineRecipe({
|
|
8
8
|
name: "popover",
|
|
9
9
|
base: `display: contents; font-family: ${c.font.sans};
|
|
10
|
-
& .popover-content { position: fixed; z-index: 60; box-sizing: border-box; min-width: 200px; max-width: min(360px, 92vw); padding: ${c.space["1"]}; border-radius: ${c.radius.xl}; background: ${c.bgPopover}; color: ${c.fgPrimary}; box-shadow: ${e.floating}; opacity: 1; transform: none; transition: opacity 0.08s ease, transform 0.08s ease; transform-origin: top left; @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
11
|
-
& .popover-content[data-align="end"] { transform-origin: top right; }
|
|
12
|
-
& .popover-content[data-up] { transform-origin: bottom left; }`,
|
|
10
|
+
& .crisp-popover-content { position: fixed; z-index: 60; box-sizing: border-box; min-width: 200px; max-width: min(360px, 92vw); padding: ${c.space["1"]}; border-radius: ${c.radius.xl}; background: ${c.bgPopover}; color: ${c.fgPrimary}; box-shadow: ${e.floating}; opacity: 1; transform: none; transition: opacity 0.08s ease, transform 0.08s ease; transform-origin: top left; @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
11
|
+
& .crisp-popover-content[data-align="end"] { transform-origin: top right; }
|
|
12
|
+
& .crisp-popover-content[data-up] { transform-origin: bottom left; }`,
|
|
13
13
|
variants: {},
|
|
14
14
|
defaultVariants: {},
|
|
15
15
|
compoundVariants: [],
|
|
@@ -16,8 +16,8 @@ export function Progress({ value, max = 100, segments, "aria-label": ariaLabel,
|
|
|
16
16
|
};
|
|
17
17
|
if (segments && segments > 0) {
|
|
18
18
|
const filled = Math.round((pct / 100) * segments);
|
|
19
|
-
return (_jsx("div", { ...aria, className: progressRecipe({ className }), ...rest, "data-segmented": "", children: Array.from({ length: segments }, (_, i) => (_jsx("span", { className: "progress-seg", "data-filled": i < filled ? "" : undefined }, i))) }));
|
|
19
|
+
return (_jsx("div", { ...aria, className: progressRecipe({ className }), ...rest, "data-segmented": "", children: Array.from({ length: segments }, (_, i) => (_jsx("span", { className: "crisp-progress-seg", "data-filled": i < filled ? "" : undefined }, i))) }));
|
|
20
20
|
}
|
|
21
|
-
return (_jsx("div", { ...aria, className: progressRecipe({ className }), ...rest, children: _jsx("span", { className: "progress-fill", style: { width: `${pct}%` } }) }));
|
|
21
|
+
return (_jsx("div", { ...aria, className: progressRecipe({ className }), ...rest, children: _jsx("span", { className: "crisp-progress-fill", style: { width: `${pct}%` } }) }));
|
|
22
22
|
}
|
|
23
23
|
Progress.displayName = "Progress";
|
|
@@ -5,10 +5,10 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
5
5
|
const config = defineRecipe({
|
|
6
6
|
name: "progress",
|
|
7
7
|
base: `display: block; box-sizing: border-box; height: 6px; border-radius: ${c.radius.full}; background: color-mix(in srgb, ${c.fgPrimary} 8%, transparent); overflow: hidden;
|
|
8
|
-
& .progress-fill { display: block; height: 100%; border-radius: ${c.radius.full}; background: ${c.bgBrandSolid}; transition: width 0.25s ease; }
|
|
8
|
+
& .crisp-progress-fill { display: block; height: 100%; border-radius: ${c.radius.full}; background: ${c.bgBrandSolid}; transition: width 0.25s ease; }
|
|
9
9
|
&[data-segmented] { display: flex; gap: ${c.space["1"]}; background: transparent; overflow: visible; }
|
|
10
|
-
&[data-segmented] .progress-seg { flex: 1; height: 100%; border-radius: ${c.radius.full}; background: color-mix(in srgb, ${c.fgPrimary} 8%, transparent); transition: background 0.2s; }
|
|
11
|
-
&[data-segmented] .progress-seg[data-filled] { background: ${c.bgBrandSolid}; }`,
|
|
10
|
+
&[data-segmented] .crisp-progress-seg { flex: 1; height: 100%; border-radius: ${c.radius.full}; background: color-mix(in srgb, ${c.fgPrimary} 8%, transparent); transition: background 0.2s; }
|
|
11
|
+
&[data-segmented] .crisp-progress-seg[data-filled] { background: ${c.bgBrandSolid}; }`,
|
|
12
12
|
variants: {},
|
|
13
13
|
defaultVariants: {},
|
|
14
14
|
compoundVariants: [],
|
|
@@ -23,7 +23,7 @@ function Value() {
|
|
|
23
23
|
// rendered text the engine's own rather than a second derivation of it.
|
|
24
24
|
const { max, getValueText, valueDisplayProps } = useQuantityPickerContext();
|
|
25
25
|
const { children: valueText, ...displayProps } = valueDisplayProps;
|
|
26
|
-
return (_jsxs("span", { ...displayProps, className: "quantitypicker-value", children: [_jsx("span", { className: "quantitypicker-placeholder", "aria-hidden": "true", children: getValueText(String(max), max) }), _jsx("span", { className: "quantitypicker-text", children: valueText })] }));
|
|
26
|
+
return (_jsxs("span", { ...displayProps, className: "crisp-quantitypicker-value", children: [_jsx("span", { className: "crisp-quantitypicker-placeholder", "aria-hidden": "true", children: getValueText(String(max), max) }), _jsx("span", { className: "crisp-quantitypicker-text", children: valueText })] }));
|
|
27
27
|
}
|
|
28
28
|
function DecrementIcon({ size }) {
|
|
29
29
|
const { isRemoveButton, decrementLoading } = useQuantityPickerContext();
|
|
@@ -59,6 +59,6 @@ export function QuantityPicker({ size = "medium", fill = false, className, name,
|
|
|
59
59
|
// A `<label for>` cannot name a div, and this root is a role="group" (#247).
|
|
60
60
|
const rootRef = React.useRef(null);
|
|
61
61
|
useLabelAssociation(rootRef);
|
|
62
|
-
return (_jsxs(QuantityPickerRoot, { ref: rootRef, ...props, className: quantitypickerRecipe({ size, fill, className }), children: [_jsx(QuantityPickerDecrementButton, { className: "quantitypicker-button", "aria-label": decrementLabel, children: _jsx(DecrementIcon, { size: size }) }), _jsx("span", { className: "quantitypicker-divider" }), _jsx(Value, {}), _jsx("span", { className: "quantitypicker-divider" }), _jsx(QuantityPickerIncrementButton, { className: "quantitypicker-button", "aria-label": incrementLabel, children: _jsx(IncrementIcon, { size: size }) }), name ? _jsx(QuantityPickerHiddenInput, { name: name }) : null] }));
|
|
62
|
+
return (_jsxs(QuantityPickerRoot, { ref: rootRef, ...props, className: quantitypickerRecipe({ size, fill, className }), children: [_jsx(QuantityPickerDecrementButton, { className: "crisp-quantitypicker-button", "aria-label": decrementLabel, children: _jsx(DecrementIcon, { size: size }) }), _jsx("span", { className: "crisp-quantitypicker-divider" }), _jsx(Value, {}), _jsx("span", { className: "crisp-quantitypicker-divider" }), _jsx(QuantityPickerIncrementButton, { className: "crisp-quantitypicker-button", "aria-label": incrementLabel, children: _jsx(IncrementIcon, { size: size }) }), name ? _jsx(QuantityPickerHiddenInput, { name: name }) : null] }));
|
|
63
63
|
}
|
|
64
64
|
QuantityPicker.displayName = "QuantityPicker";
|