@crisp-ui-kit/crisp 0.31.5 → 0.32.0
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 +21 -19
- 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/dialog-description.js +1 -1
- package/dist/cjs/core/namespace.js +17 -0
- package/dist/cjs/core/resolve.js +5 -3
- package/dist/cjs/index.js +1 -1
- 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/cjs/tokens/elevation.js +4 -4
- package/dist/cjs/tokens/palette.js +2 -2
- package/dist/cjs/tokens/scale.js +6 -6
- package/dist/cjs/tokens/semantic.js +1 -1
- 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 +21 -19
- 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/dialog-description.js +1 -1
- package/dist/esm/core/namespace.js +14 -0
- package/dist/esm/core/resolve.js +5 -3
- package/dist/esm/index.js +1 -1
- 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/esm/tokens/elevation.js +4 -4
- package/dist/esm/tokens/palette.js +2 -2
- package/dist/esm/tokens/scale.js +6 -6
- package/dist/esm/tokens/semantic.js +1 -1
- 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/dialog-description.d.ts +1 -1
- package/dist/types/core/namespace.d.ts +2 -0
- package/dist/types/tokens/elevation.d.ts +4 -4
- 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
|
@@ -33,6 +33,6 @@ export function DonutChart({ data, size = 120, thickness = 14, centerValue, cent
|
|
|
33
33
|
});
|
|
34
34
|
const summary = ariaLabel ??
|
|
35
35
|
`Donut chart: ${data.map((d) => `${d.label} ${format(d.value)}`).join(", ")}`;
|
|
36
|
-
return (_jsxs("div", { className: donutchartRecipe({ className }), ...rest, role: "img", "aria-label": summary, children: [_jsxs("div", { className: "donutchart-ring", style: { width: size, height: size }, children: [_jsxs("svg", { className: "donutchart-svg", width: size, height: size, viewBox: "0 0 42 42", "aria-hidden": "true", children: [_jsx("circle", { className: "donutchart-track", cx: 21, cy: 21, r: R, strokeWidth: (thickness / size) * 42 }), slices.map((s) => (_jsx("circle", { className: "donutchart-seg", cx: 21, cy: 21, r: R, stroke: s.color, strokeWidth: (thickness / size) * 42, strokeDasharray: `${s.pct} ${100 - s.pct}`, strokeDashoffset: s.offset, children: _jsx("title", { children: `${s.label}: ${format(s.value)}` }) }, s.label)))] }), _jsxs("div", { className: "donutchart-center", children: [_jsx("span", { className: "donutchart-total", children: centerValue ?? format(total) }), centerCaption != null && (_jsx("span", { className: "donutchart-caption", children: centerCaption }))] })] }), legend && (_jsx("div", { className: "donutchart-legend", children: slices.map((s) => (_jsxs("span", { className: "donutchart-item", children: [_jsx("span", { className: "donutchart-swatch", style: { background: s.color } }), _jsx("span", { className: "donutchart-name", children: s.label }), _jsx("span", { className: "donutchart-val", children: format(s.value) })] }, s.label))) }))] }));
|
|
36
|
+
return (_jsxs("div", { className: donutchartRecipe({ className }), ...rest, role: "img", "aria-label": summary, children: [_jsxs("div", { className: "crisp-donutchart-ring", style: { width: size, height: size }, children: [_jsxs("svg", { className: "crisp-donutchart-svg", width: size, height: size, viewBox: "0 0 42 42", "aria-hidden": "true", children: [_jsx("circle", { className: "crisp-donutchart-track", cx: 21, cy: 21, r: R, strokeWidth: (thickness / size) * 42 }), slices.map((s) => (_jsx("circle", { className: "crisp-donutchart-seg", cx: 21, cy: 21, r: R, stroke: s.color, strokeWidth: (thickness / size) * 42, strokeDasharray: `${s.pct} ${100 - s.pct}`, strokeDashoffset: s.offset, children: _jsx("title", { children: `${s.label}: ${format(s.value)}` }) }, s.label)))] }), _jsxs("div", { className: "crisp-donutchart-center", children: [_jsx("span", { className: "crisp-donutchart-total", children: centerValue ?? format(total) }), centerCaption != null && (_jsx("span", { className: "crisp-donutchart-caption", children: centerCaption }))] })] }), legend && (_jsx("div", { className: "crisp-donutchart-legend", children: slices.map((s) => (_jsxs("span", { className: "crisp-donutchart-item", children: [_jsx("span", { className: "crisp-donutchart-swatch", style: { background: s.color } }), _jsx("span", { className: "crisp-donutchart-name", children: s.label }), _jsx("span", { className: "crisp-donutchart-val", children: format(s.value) })] }, s.label))) }))] }));
|
|
37
37
|
}
|
|
38
38
|
DonutChart.displayName = "DonutChart";
|
|
@@ -7,18 +7,18 @@ const config = defineRecipe({
|
|
|
7
7
|
name: "donutchart",
|
|
8
8
|
base: `display: inline-flex; align-items: center; gap: ${c.space["4"]}; box-sizing: border-box; font-family: ${c.font.sans};
|
|
9
9
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
10
|
-
& .donutchart-ring { position: relative; flex-shrink: 0; }
|
|
11
|
-
& .donutchart-svg { display: block; }
|
|
12
|
-
& .donutchart-seg { fill: none; transition: stroke-dasharray 0.3s ease; }
|
|
13
|
-
& .donutchart-track { fill: none; stroke: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); }
|
|
14
|
-
& .donutchart-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
|
|
15
|
-
& .donutchart-total { font-size: ${c.text.xl}; font-weight: ${c.weight.semibold}; letter-spacing: -0.3px; color: ${c.fgPrimary}; }
|
|
16
|
-
& .donutchart-caption { font-size: ${c.text.xs}; color: ${c.fgMuted}; }
|
|
17
|
-
& .donutchart-legend { display: flex; flex-direction: column; gap: ${c.space["1.5"]}; min-width: 0; }
|
|
18
|
-
& .donutchart-item { display: inline-flex; align-items: center; gap: ${c.space["2"]}; font-size: ${c.text.md}; color: ${c.fgPrimary}; }
|
|
19
|
-
& .donutchart-swatch { width: 10px; height: 10px; flex-shrink: 0; border-radius: 3px; }
|
|
20
|
-
& .donutchart-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${c.fgMuted}; }
|
|
21
|
-
& .donutchart-val { flex-shrink: 0; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; }`,
|
|
10
|
+
& .crisp-donutchart-ring { position: relative; flex-shrink: 0; }
|
|
11
|
+
& .crisp-donutchart-svg { display: block; }
|
|
12
|
+
& .crisp-donutchart-seg { fill: none; transition: stroke-dasharray 0.3s ease; }
|
|
13
|
+
& .crisp-donutchart-track { fill: none; stroke: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); }
|
|
14
|
+
& .crisp-donutchart-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
|
|
15
|
+
& .crisp-donutchart-total { font-size: ${c.text.xl}; font-weight: ${c.weight.semibold}; letter-spacing: -0.3px; color: ${c.fgPrimary}; }
|
|
16
|
+
& .crisp-donutchart-caption { font-size: ${c.text.xs}; color: ${c.fgMuted}; }
|
|
17
|
+
& .crisp-donutchart-legend { display: flex; flex-direction: column; gap: ${c.space["1.5"]}; min-width: 0; }
|
|
18
|
+
& .crisp-donutchart-item { display: inline-flex; align-items: center; gap: ${c.space["2"]}; font-size: ${c.text.md}; color: ${c.fgPrimary}; }
|
|
19
|
+
& .crisp-donutchart-swatch { width: 10px; height: 10px; flex-shrink: 0; border-radius: 3px; }
|
|
20
|
+
& .crisp-donutchart-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${c.fgMuted}; }
|
|
21
|
+
& .crisp-donutchart-val { flex-shrink: 0; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; }`,
|
|
22
22
|
variants: {},
|
|
23
23
|
defaultVariants: {},
|
|
24
24
|
compoundVariants: [],
|
|
@@ -32,12 +32,12 @@ export function Drawer({ open, onOpenChange, side = "right", title, icon, "aria-
|
|
|
32
32
|
const api = dialog.connect(service, normalizeProps);
|
|
33
33
|
if (!api.open)
|
|
34
34
|
return null;
|
|
35
|
-
return (_jsx(Portal, { children: _jsxs("div", { className: drawerRecipe(), children: [_jsx("div", { ...api.getBackdropProps(), className: "drawer-backdrop" }), _jsx("div", { ...api.getPositionerProps(), className: "drawer-positioner", "data-side": side, children: _jsxs("div", { ...rest, ...withDescribedBy(api.getContentProps(), describedBy), className: cx("drawer-content", className), children: [title != null && (_jsxs("div", { className: "drawer-header", children: [icon, _jsx("span", { ...api.getTitleProps(), className: "drawer-title", children: title }), _jsx("button", { type: "button", ...api.getCloseTriggerProps(), className: "drawer-close", "aria-label": closeLabel, children: _jsx(X, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })] })), children] }) })] }) }));
|
|
35
|
+
return (_jsx(Portal, { children: _jsxs("div", { className: drawerRecipe(), children: [_jsx("div", { ...api.getBackdropProps(), className: "crisp-drawer-backdrop" }), _jsx("div", { ...api.getPositionerProps(), className: "crisp-drawer-positioner", "data-side": side, children: _jsxs("div", { ...rest, ...withDescribedBy(api.getContentProps(), describedBy), className: cx("crisp-drawer-content", className), children: [title != null && (_jsxs("div", { className: "crisp-drawer-header", children: [icon, _jsx("span", { ...api.getTitleProps(), className: "crisp-drawer-title", children: title }), _jsx("button", { type: "button", ...api.getCloseTriggerProps(), className: "crisp-drawer-close", "aria-label": closeLabel, children: _jsx(X, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })] })), children] }) })] }) }));
|
|
36
36
|
}
|
|
37
37
|
Drawer.displayName = "Drawer";
|
|
38
38
|
export function DrawerBody({ children }) {
|
|
39
|
-
return _jsx("div", { className: "drawer-body", children: children });
|
|
39
|
+
return _jsx("div", { className: "crisp-drawer-body", children: children });
|
|
40
40
|
}
|
|
41
41
|
export function DrawerFooter({ children }) {
|
|
42
|
-
return _jsx("div", { className: "drawer-footer", children: children });
|
|
42
|
+
return _jsx("div", { className: "crisp-drawer-footer", children: children });
|
|
43
43
|
}
|
|
@@ -5,20 +5,20 @@ import { contract as c, elevation as e } from "../../tokens/index.js";
|
|
|
5
5
|
const config = defineRecipe({
|
|
6
6
|
name: "drawer",
|
|
7
7
|
base: `display: contents; font-family: ${c.font.sans};
|
|
8
|
-
& .drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, ${c.fgPrimary} 18%, transparent); opacity: 1; transition: opacity 0.2s ease; @starting-style { opacity: 0; } }
|
|
9
|
-
& .drawer-positioner { position: fixed; inset: 0; z-index: 61; display: flex; box-sizing: border-box; padding: ${c.space["2"]}; }
|
|
10
|
-
& .drawer-positioner[data-side="right"] { justify-content: flex-end; }
|
|
11
|
-
& .drawer-positioner[data-side="left"] { justify-content: flex-start; }
|
|
12
|
-
& .drawer-content { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; position: relative; display: flex; flex-direction: column; box-sizing: border-box; overflow: hidden; width: 420px; max-width: 100%; height: 100%; background: ${c.bgSurface}; border-radius: ${c.radius.xl}; box-shadow: ${e.floating}; transform: none; transition: transform 0.24s cubic-bezier(.32,.72,0,1); }
|
|
13
|
-
& .drawer-positioner[data-side="right"] .drawer-content { @starting-style { transform: translateX(calc(100% + ${c.space["2"]})); } }
|
|
14
|
-
& .drawer-positioner[data-side="left"] .drawer-content { @starting-style { transform: translateX(calc(-100% - ${c.space["2"]})); } }
|
|
15
|
-
& .drawer-header { display: flex; align-items: center; gap: ${c.space["2"]}; flex-shrink: 0; height: 52px; padding: 0 ${c.space["2"]} 0 ${c.space["4"]}; border-bottom: 1px solid ${c.borderSubtle}; }
|
|
16
|
-
& .drawer-header svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
17
|
-
& .drawer-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
|
|
18
|
-
& .drawer-close { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; margin: 0; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; }
|
|
19
|
-
& .drawer-close:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
|
|
20
|
-
& .drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: ${c.space["4"]}; }
|
|
21
|
-
& .drawer-footer { display: flex; align-items: center; justify-content: flex-end; gap: ${c.space["3"]}; flex-shrink: 0; min-height: 56px; padding: 0 ${c.space["4"]}; border-top: 1px solid ${c.borderSubtle}; }`,
|
|
8
|
+
& .crisp-drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, ${c.fgPrimary} 18%, transparent); opacity: 1; transition: opacity 0.2s ease; @starting-style { opacity: 0; } }
|
|
9
|
+
& .crisp-drawer-positioner { position: fixed; inset: 0; z-index: 61; display: flex; box-sizing: border-box; padding: ${c.space["2"]}; }
|
|
10
|
+
& .crisp-drawer-positioner[data-side="right"] { justify-content: flex-end; }
|
|
11
|
+
& .crisp-drawer-positioner[data-side="left"] { justify-content: flex-start; }
|
|
12
|
+
& .crisp-drawer-content { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; position: relative; display: flex; flex-direction: column; box-sizing: border-box; overflow: hidden; width: 420px; max-width: 100%; height: 100%; background: ${c.bgSurface}; border-radius: ${c.radius.xl}; box-shadow: ${e.floating}; transform: none; transition: transform 0.24s cubic-bezier(.32,.72,0,1); }
|
|
13
|
+
& .crisp-drawer-positioner[data-side="right"] .crisp-drawer-content { @starting-style { transform: translateX(calc(100% + ${c.space["2"]})); } }
|
|
14
|
+
& .crisp-drawer-positioner[data-side="left"] .crisp-drawer-content { @starting-style { transform: translateX(calc(-100% - ${c.space["2"]})); } }
|
|
15
|
+
& .crisp-drawer-header { display: flex; align-items: center; gap: ${c.space["2"]}; flex-shrink: 0; height: 52px; padding: 0 ${c.space["2"]} 0 ${c.space["4"]}; border-bottom: 1px solid ${c.borderSubtle}; }
|
|
16
|
+
& .crisp-drawer-header svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
17
|
+
& .crisp-drawer-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
|
|
18
|
+
& .crisp-drawer-close { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; margin: 0; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; }
|
|
19
|
+
& .crisp-drawer-close:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
|
|
20
|
+
& .crisp-drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: ${c.space["4"]}; }
|
|
21
|
+
& .crisp-drawer-footer { display: flex; align-items: center; justify-content: flex-end; gap: ${c.space["3"]}; flex-shrink: 0; min-height: 56px; padding: 0 ${c.space["4"]}; border-top: 1px solid ${c.borderSubtle}; }`,
|
|
22
22
|
variants: {},
|
|
23
23
|
defaultVariants: {},
|
|
24
24
|
compoundVariants: [],
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { emptystateRecipe } from "./emptystate.recipe.js";
|
|
3
3
|
/** A centred empty-state panel — icon, title, description, optional action. */
|
|
4
4
|
export function EmptyState({ icon, title, description, action, variant, className, ...rest }) {
|
|
5
|
-
return (_jsxs("div", { className: emptystateRecipe({ variant, className }), ...rest, children: [icon && _jsx("span", { className: "emptystate-icon", children: icon }), _jsx("div", { className: "emptystate-title", children: title }), description != null && (_jsx("div", { className: "emptystate-desc", children: description })), action && _jsx("div", { className: "emptystate-action", children: action })] }));
|
|
5
|
+
return (_jsxs("div", { className: emptystateRecipe({ variant, className }), ...rest, children: [icon && _jsx("span", { className: "crisp-emptystate-icon", children: icon }), _jsx("div", { className: "crisp-emptystate-title", children: title }), description != null && (_jsx("div", { className: "crisp-emptystate-desc", children: description })), action && _jsx("div", { className: "crisp-emptystate-action", children: action })] }));
|
|
6
6
|
}
|
|
7
7
|
EmptyState.displayName = "EmptyState";
|
|
@@ -4,24 +4,24 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
4
4
|
const config = defineRecipe({
|
|
5
5
|
name: "emptystate",
|
|
6
6
|
base: `display: flex; flex-direction: column; align-items: center; justify-content: center; gap: ${c.space["1.5"]}; box-sizing: border-box; padding: ${c.space["8"]} ${c.space["4"]}; text-align: center; font-family: ${c.font.sans};
|
|
7
|
-
& .emptystate-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: ${c.space["1"]}; border-radius: ${c.radius.xl}; background: color-mix(in srgb, ${c.fgPrimary} 5%, transparent); color: ${c.fgMuted}; }
|
|
8
|
-
& .emptystate-title { font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
|
|
9
|
-
& .emptystate-desc { max-width: 320px; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
10
|
-
& .emptystate-action { margin-top: ${c.space["2"]}; }`,
|
|
7
|
+
& .crisp-emptystate-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: ${c.space["1"]}; border-radius: ${c.radius.xl}; background: color-mix(in srgb, ${c.fgPrimary} 5%, transparent); color: ${c.fgMuted}; }
|
|
8
|
+
& .crisp-emptystate-title { font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
|
|
9
|
+
& .crisp-emptystate-desc { max-width: 320px; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
10
|
+
& .crisp-emptystate-action { margin-top: ${c.space["2"]}; }`,
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
13
13
|
// compact icon tile (default)
|
|
14
14
|
default: ``,
|
|
15
15
|
// a large icon on a dotted-grid backdrop — a Developers/Reports empty state
|
|
16
|
-
illustrated: `& .emptystate-icon { width: 132px; height: 96px; margin-bottom: ${c.space["2"]}; border-radius: 0; color: color-mix(in srgb, ${c.fgPrimary} 22%, transparent); background: radial-gradient(circle, color-mix(in srgb, ${c.fgPrimary} 12%, transparent) 1.2px, transparent 1.2px) 0 0 / 16px 16px; }`,
|
|
16
|
+
illustrated: `& .crisp-emptystate-icon { width: 132px; height: 96px; margin-bottom: ${c.space["2"]}; border-radius: 0; color: color-mix(in srgb, ${c.fgPrimary} 22%, transparent); background: radial-gradient(circle, color-mix(in srgb, ${c.fgPrimary} 12%, transparent) 1.2px, transparent 1.2px) 0 0 / 16px 16px; }`,
|
|
17
17
|
// A full-view empty state (measured from a filtered-to-zero records table):
|
|
18
18
|
// a 45px ringed circle icon, a 20/24 semibold heading, a 14/20 medium muted body,
|
|
19
19
|
// then a primary action. Gaps are 16 / 8 / 16 (icon→title→desc→action).
|
|
20
20
|
page: `gap: ${c.space["2"]};
|
|
21
|
-
& .emptystate-icon { width: 45px; height: 45px; margin-bottom: ${c.space["2"]}; border-radius: ${c.radius.full}; border: 1px solid ${c.borderSubtle}; background: none; color: ${c.fgMuted}; }
|
|
22
|
-
& .emptystate-title { font-size: 20px; line-height: 24px; }
|
|
23
|
-
& .emptystate-desc { max-width: 266px; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; line-height: 20px; }
|
|
24
|
-
& .emptystate-action { margin-top: ${c.space["2"]}; }`,
|
|
21
|
+
& .crisp-emptystate-icon { width: 45px; height: 45px; margin-bottom: ${c.space["2"]}; border-radius: ${c.radius.full}; border: 1px solid ${c.borderSubtle}; background: none; color: ${c.fgMuted}; }
|
|
22
|
+
& .crisp-emptystate-title { font-size: 20px; line-height: 24px; }
|
|
23
|
+
& .crisp-emptystate-desc { max-width: 266px; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; line-height: 20px; }
|
|
24
|
+
& .crisp-emptystate-action { margin-top: ${c.space["2"]}; }`,
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
defaultVariants: { variant: "default" },
|
|
@@ -86,9 +86,9 @@ export function FileUpload({ className, labels, "aria-label": ariaLabel, accept,
|
|
|
86
86
|
// file goes, and a container that disappears with the item cannot say where
|
|
87
87
|
// focus should land next.
|
|
88
88
|
const rootRef = React.useRef(null);
|
|
89
|
-
const focusAfterRemoval = useFocusAfterRemoval(rootRef, ".fileupload-remove", dropzoneRef);
|
|
90
|
-
return (_jsxs("div", { ref: rootRef, ...rest, className: fileuploadRecipe({ className }), children: [_jsxs("button", { ...dropzoneProps, ref: dropzoneRef, type: "button", className: "fileupload-zone", tabIndex: disabled ? -1 : 0, "aria-label": ariaLabel ?? t.hint, disabled: disabled, "data-dragging": dragging ? "" : undefined, "data-disabled": disabled ? "" : undefined, "data-invalid": invalid ? "" : undefined, onClick: () => openFilePicker(), children: [_jsx("span", { className: "fileupload-title", children: t.title }), _jsx("span", { className: "fileupload-hint", children: t.hint })] }), _jsx("input", { ...hiddenInputProps, ref: inputRef, className: "fileupload-input" }), acceptedFileEntries.length > 0 && (_jsx("ul", { className: "fileupload-list", children: acceptedFileEntries.map((entry, i) => (_jsxs("li", { className: "fileupload-item", "data-status": entry.status, children: [_jsx("span", { className: "fileupload-item-name", children: entry.file.name }), entry.status === "uploading" && entry.progress != null && (_jsx("span", { className: "fileupload-progress", role: "progressbar", "aria-valuenow": Math.round(entry.progress), "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": entry.file.name, children: _jsx("span", { className: "fileupload-progress-fill", style: { width: `${entry.progress}%` } }) })), _jsx("span", { className: "fileupload-item-size", children: formatSize(entry.file.size) }), _jsx("button", { type: "button", className: "fileupload-remove", "aria-label": `${t.remove}: ${entry.file.name}`, onClick: () => {
|
|
89
|
+
const focusAfterRemoval = useFocusAfterRemoval(rootRef, ".crisp-fileupload-remove", dropzoneRef);
|
|
90
|
+
return (_jsxs("div", { ref: rootRef, ...rest, className: fileuploadRecipe({ className }), children: [_jsxs("button", { ...dropzoneProps, ref: dropzoneRef, type: "button", className: "crisp-fileupload-zone", tabIndex: disabled ? -1 : 0, "aria-label": ariaLabel ?? t.hint, disabled: disabled, "data-dragging": dragging ? "" : undefined, "data-disabled": disabled ? "" : undefined, "data-invalid": invalid ? "" : undefined, onClick: () => openFilePicker(), children: [_jsx("span", { className: "crisp-fileupload-title", children: t.title }), _jsx("span", { className: "crisp-fileupload-hint", children: t.hint })] }), _jsx("input", { ...hiddenInputProps, ref: inputRef, className: "crisp-fileupload-input" }), acceptedFileEntries.length > 0 && (_jsx("ul", { className: "crisp-fileupload-list", children: acceptedFileEntries.map((entry, i) => (_jsxs("li", { className: "crisp-fileupload-item", "data-status": entry.status, children: [_jsx("span", { className: "crisp-fileupload-item-name", children: entry.file.name }), entry.status === "uploading" && entry.progress != null && (_jsx("span", { className: "crisp-fileupload-progress", role: "progressbar", "aria-valuenow": Math.round(entry.progress), "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": entry.file.name, children: _jsx("span", { className: "crisp-fileupload-progress-fill", style: { width: `${entry.progress}%` } }) })), _jsx("span", { className: "crisp-fileupload-item-size", children: formatSize(entry.file.size) }), _jsx("button", { type: "button", className: "crisp-fileupload-remove", "aria-label": `${t.remove}: ${entry.file.name}`, onClick: () => {
|
|
91
91
|
focusAfterRemoval(i);
|
|
92
92
|
removeFileEntry(entry.id);
|
|
93
|
-
}, children: _jsx(X, { size: 13, strokeWidth: 2 }) })] }, entry.id))) })), _jsx("ul", { className: "fileupload-errors", "aria-live": "polite", children: rejections.map((r) => (_jsx("li", { className: "fileupload-error", children: `${r.file.name}: ${r.errors.map((e) => t.errors[e] ?? e).join(" ")}` }, r.file.name))) })] }));
|
|
93
|
+
}, children: _jsx(X, { size: 13, strokeWidth: 2 }) })] }, entry.id))) })), _jsx("ul", { className: "crisp-fileupload-errors", "aria-live": "polite", children: rejections.map((r) => (_jsx("li", { className: "crisp-fileupload-error", children: `${r.file.name}: ${r.errors.map((e) => t.errors[e] ?? e).join(" ")}` }, r.file.name))) })] }));
|
|
94
94
|
}
|
|
@@ -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";
|