@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
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@layer crisp-components {
|
|
2
|
+
.crisp-entitycard {
|
|
3
|
+
display: flex; flex-direction: column; box-sizing: border-box; width: 100%; min-width: 0; text-align: start;
|
|
4
|
+
padding: var(--crisp-space-3) var(--crisp-space-4); margin: 0; border: none; border-radius: var(--crisp-radius-xl);
|
|
5
|
+
background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); color: var(--crisp-fg-primary);
|
|
6
|
+
font-family: var(--crisp-font-sans); cursor: pointer; transition: box-shadow .12s ease, background-color .12s ease;
|
|
7
|
+
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
8
|
+
|
|
9
|
+
&:hover { box-shadow: inset 0 0 0 1px var(--crisp-border-default), 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
|
|
10
|
+
&:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 2px; }
|
|
11
|
+
|
|
12
|
+
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
13
|
+
& .crisp-entitycard-title { margin-top: var(--crisp-space-2); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-semibold); letter-spacing: -0.1px; color: var(--crisp-fg-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
14
|
+
& .crisp-entitycard-excerpt { margin-top: var(--crisp-space-1); font-size: var(--crisp-text-md); line-height: 18px; color: var(--crisp-fg-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
15
|
+
& .crisp-entitycard-spacer { flex: 1; min-height: var(--crisp-space-3); }
|
|
16
|
+
& .crisp-entitycard-foot { display: flex; align-items: center; gap: var(--crisp-space-1-5); padding-top: var(--crisp-space-2-5); margin-top: var(--crisp-space-1); border-top: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); }
|
|
17
|
+
& .crisp-entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--crisp-fg-primary); }
|
|
18
|
+
& .crisp-entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@media (prefers-reduced-motion: reduce) {
|
|
22
|
+
.crisp-entitycard, .crisp-entitycard * {
|
|
23
|
+
animation-duration: 0.01ms !important;
|
|
24
|
+
animation-iteration-count: 1 !important;
|
|
25
|
+
transition-duration: 0.01ms !important;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -33,7 +33,7 @@ export function Accordion({ items, multiple, value, defaultValue, onValueChange,
|
|
|
33
33
|
// accordion's triggers silently control the first one's panels (#227).
|
|
34
34
|
const panelId = `${uid}-panel-${item.value}`;
|
|
35
35
|
const triggerId = `${uid}-trigger-${item.value}`;
|
|
36
|
-
return (_jsxs("div", { className: "accordion-item", children: [_jsxs("button", { type: "button", id: triggerId, className: "accordion-trigger", "aria-expanded": isOpen, "aria-controls": panelId, onClick: () => toggle(item.value), children: [_jsx("span", { className: "accordion-title", children: item.title }), _jsx(ChevronDown, { className: "accordion-chevron", size: 16, strokeWidth: 1.75, "aria-hidden": "true" })] }), _jsx("div", { id: panelId, className: "accordion-panel", role: "region", "aria-labelledby": triggerId, "data-open": isOpen ? "" : undefined, hidden: !isOpen, children: _jsx("div", { className: "accordion-panel-inner", children: _jsx("div", { className: "accordion-content", children: item.content }) }) })] }, item.value));
|
|
36
|
+
return (_jsxs("div", { className: "crisp-accordion-item", children: [_jsxs("button", { type: "button", id: triggerId, className: "crisp-accordion-trigger", "aria-expanded": isOpen, "aria-controls": panelId, onClick: () => toggle(item.value), children: [_jsx("span", { className: "crisp-accordion-title", children: item.title }), _jsx(ChevronDown, { className: "crisp-accordion-chevron", size: 16, strokeWidth: 1.75, "aria-hidden": "true" })] }), _jsx("div", { id: panelId, className: "crisp-accordion-panel", role: "region", "aria-labelledby": triggerId, "data-open": isOpen ? "" : undefined, hidden: !isOpen, children: _jsx("div", { className: "crisp-accordion-panel-inner", children: _jsx("div", { className: "crisp-accordion-content", children: item.content }) }) })] }, item.value));
|
|
37
37
|
}) }));
|
|
38
38
|
}
|
|
39
39
|
Accordion.displayName = "Accordion";
|
|
@@ -5,16 +5,16 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
5
5
|
const config = defineRecipe({
|
|
6
6
|
name: "accordion",
|
|
7
7
|
base: `display: flex; flex-direction: column; font-family: ${c.font.sans};
|
|
8
|
-
& .accordion-item { border-bottom: 1px solid ${c.borderSubtle}; }
|
|
9
|
-
& .accordion-trigger { display: flex; align-items: center; gap: ${c.space["2"]}; width: 100%; height: 44px; padding: 0 ${c.space["1"]}; margin: 0; border: none; background: none; color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; text-align: start; cursor: pointer; }
|
|
10
|
-
& .accordion-trigger:hover { color: ${c.fgPrimary}; }
|
|
11
|
-
& .accordion-title { flex: 1; min-width: 0; }
|
|
12
|
-
& .accordion-chevron { flex-shrink: 0; color: ${c.fgMuted}; transition: transform .2s ease; }
|
|
13
|
-
& .accordion-trigger[aria-expanded="true"] .accordion-chevron { transform: rotate(180deg); }
|
|
14
|
-
& .accordion-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .2s ease; }
|
|
15
|
-
& .accordion-panel[data-open] { grid-template-rows: 1fr; }
|
|
16
|
-
& .accordion-panel-inner { overflow: hidden; }
|
|
17
|
-
& .accordion-content { padding: 0 ${c.space["1"]} ${c.space["3"]}; font-size: ${c.text.md}; color: ${c.fgMuted}; }`,
|
|
8
|
+
& .crisp-accordion-item { border-bottom: 1px solid ${c.borderSubtle}; }
|
|
9
|
+
& .crisp-accordion-trigger { display: flex; align-items: center; gap: ${c.space["2"]}; width: 100%; height: 44px; padding: 0 ${c.space["1"]}; margin: 0; border: none; background: none; color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; text-align: start; cursor: pointer; }
|
|
10
|
+
& .crisp-accordion-trigger:hover { color: ${c.fgPrimary}; }
|
|
11
|
+
& .crisp-accordion-title { flex: 1; min-width: 0; }
|
|
12
|
+
& .crisp-accordion-chevron { flex-shrink: 0; color: ${c.fgMuted}; transition: transform .2s ease; }
|
|
13
|
+
& .crisp-accordion-trigger[aria-expanded="true"] .crisp-accordion-chevron { transform: rotate(180deg); }
|
|
14
|
+
& .crisp-accordion-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .2s ease; }
|
|
15
|
+
& .crisp-accordion-panel[data-open] { grid-template-rows: 1fr; }
|
|
16
|
+
& .crisp-accordion-panel-inner { overflow: hidden; }
|
|
17
|
+
& .crisp-accordion-content { padding: 0 ${c.space["1"]} ${c.space["3"]}; font-size: ${c.text.md}; color: ${c.fgMuted}; }`,
|
|
18
18
|
variants: {},
|
|
19
19
|
defaultVariants: {},
|
|
20
20
|
compoundVariants: [],
|
|
@@ -3,6 +3,6 @@ import * as React from "react";
|
|
|
3
3
|
import { Primitive } from "../../core/index.js";
|
|
4
4
|
import { badgeRecipe } from "./badge.recipe.js";
|
|
5
5
|
export const Badge = React.forwardRef(({ tone, size, variant, className, asChild, dot, children, ...props }, ref) => {
|
|
6
|
-
return (_jsxs(Primitive.span, { ref: ref, asChild: asChild, className: badgeRecipe({ tone, size, variant, className }), ...props, children: [dot && _jsx("span", { className: "badge-dot", "aria-hidden": "true" }), children] }));
|
|
6
|
+
return (_jsxs(Primitive.span, { ref: ref, asChild: asChild, className: badgeRecipe({ tone, size, variant, className }), ...props, children: [dot && _jsx("span", { className: "crisp-badge-dot", "aria-hidden": "true" }), children] }));
|
|
7
7
|
});
|
|
8
8
|
Badge.displayName = "Badge";
|
|
@@ -3,7 +3,7 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
3
3
|
const config = defineRecipe({
|
|
4
4
|
name: "badge",
|
|
5
5
|
base: `display: inline-flex; align-items: center; justify-content: center; gap: ${c.space["1"]}; font-family: ${c.font.sans}; font-weight: ${c.weight.medium}; letter-spacing: -0.1px; white-space: nowrap;
|
|
6
|
-
& .badge-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: ${c.radius.full}; background: currentColor; }`,
|
|
6
|
+
& .crisp-badge-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: ${c.radius.full}; background: currentColor; }`,
|
|
7
7
|
variants: {
|
|
8
8
|
tone: {
|
|
9
9
|
neutral: `background: ${c.bgRaised}; color: ${c.fgMuted}; box-shadow: inset 0 0 0 1px ${c.borderDefault};`,
|
|
@@ -33,10 +33,10 @@ export function BarChart({ data, height = 240, max, ticks = 5, color, format = (
|
|
|
33
33
|
`Bar chart: ${data.map((d) => `${d.label} ${format(d.value)}`).join(", ")}`;
|
|
34
34
|
return (_jsxs("div", { className: barchartRecipe({ className }), ...rest, style: {
|
|
35
35
|
height,
|
|
36
|
-
"--barchart-yaxis-width": yAxisWidthValue,
|
|
37
|
-
}, role: "img", "aria-label": summary, children: [_jsxs("div", { className: "barchart-body", children: [_jsx("div", { className: "barchart-yaxis", children: tickValues.map((t) => (_jsx("span", { className: "barchart-ytick", style: { bottom: `${(t / top) * 100}%` }, children: format(t) }, t))) }), _jsxs("div", { className: "barchart-plot", children: [tickValues.map((t) => (_jsx("div", { className: "barchart-grid", style: { bottom: `${(t / top) * 100}%` } }, t))), data.map((d) => (_jsx("div", { className: "barchart-col", children: _jsx("div", { className: "barchart-bar", "data-empty": d.value <= 0 ? "" : undefined, style: {
|
|
36
|
+
"--crisp-barchart-yaxis-width": yAxisWidthValue,
|
|
37
|
+
}, role: "img", "aria-label": summary, children: [_jsxs("div", { className: "crisp-barchart-body", children: [_jsx("div", { className: "crisp-barchart-yaxis", children: tickValues.map((t) => (_jsx("span", { className: "crisp-barchart-ytick", style: { bottom: `${(t / top) * 100}%` }, children: format(t) }, t))) }), _jsxs("div", { className: "crisp-barchart-plot", children: [tickValues.map((t) => (_jsx("div", { className: "crisp-barchart-grid", style: { bottom: `${(t / top) * 100}%` } }, t))), data.map((d) => (_jsx("div", { className: "crisp-barchart-col", children: _jsx("div", { className: "crisp-barchart-bar", "data-empty": d.value <= 0 ? "" : undefined, style: {
|
|
38
38
|
height: `${Math.max(0, (d.value / top) * 100)}%`,
|
|
39
39
|
background: color,
|
|
40
|
-
}, title: `${d.label}: ${format(d.value)}` }) }, d.label)))] })] }), _jsx("div", { className: "barchart-xaxis", "data-inset": "", children: data.map((d) => (_jsx("span", { className: "barchart-xlabel", children: d.label }, d.label))) }), xAxisTitle != null && (_jsx("div", { className: "barchart-axis-title", children: xAxisTitle }))] }));
|
|
40
|
+
}, title: `${d.label}: ${format(d.value)}` }) }, d.label)))] })] }), _jsx("div", { className: "crisp-barchart-xaxis", "data-inset": "", children: data.map((d) => (_jsx("span", { className: "crisp-barchart-xlabel", children: d.label }, d.label))) }), xAxisTitle != null && (_jsx("div", { className: "crisp-barchart-axis-title", children: xAxisTitle }))] }));
|
|
41
41
|
}
|
|
42
42
|
BarChart.displayName = "BarChart";
|
|
@@ -5,24 +5,24 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
5
5
|
// and category labels below. Pure CSS (no SVG), so it scales with its container.
|
|
6
6
|
const config = defineRecipe({
|
|
7
7
|
name: "barchart",
|
|
8
|
-
// --barchart-yaxis-width is the one source of truth for the value-axis
|
|
8
|
+
// --crisp-barchart-yaxis-width is the one source of truth for the value-axis
|
|
9
9
|
// gutter: the component sets it (auto-sized to the longest tick label, or
|
|
10
10
|
// pinned via `yAxisWidth`) on the root element, and it inherits down to the
|
|
11
11
|
// x-axis padding and axis title so they never drift out of alignment. 34px
|
|
12
12
|
// is only the pre-JS fallback (e.g. if `barchartRecipe` is used bare).
|
|
13
|
-
base: `display: flex; flex-direction: column; box-sizing: border-box; font-family: ${c.font.sans}; --barchart-yaxis-width: 34px;
|
|
14
|
-
& .barchart-body { display: flex; flex: 1; min-height: 0; }
|
|
15
|
-
& .barchart-yaxis { position: relative; flex-shrink: 0; width: var(--barchart-yaxis-width); }
|
|
16
|
-
& .barchart-ytick { position: absolute; inset-inline-end: ${c.space["2"]}; transform: translateY(50%); font-size: ${c.text.xs}; color: ${c.fgMuted}; white-space: nowrap; }
|
|
17
|
-
& .barchart-plot { position: relative; flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: ${c.space["3"]}; border-bottom: 1px solid ${c.borderDefault}; }
|
|
18
|
-
& .barchart-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed ${c.borderSubtle}; pointer-events: none; }
|
|
19
|
-
& .barchart-col { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
|
|
20
|
-
& .barchart-bar { width: 100%; max-width: 96px; border-radius: ${c.radius.sm} ${c.radius.sm} 0 0; background: ${c.bgBrandSolid}; transition: height 0.3s ease; }
|
|
21
|
-
& .barchart-bar[data-empty] { min-height: 2px; opacity: 0.35; }
|
|
22
|
-
& .barchart-xaxis { display: flex; gap: ${c.space["3"]}; margin-top: ${c.space["1.5"]}; }
|
|
23
|
-
& .barchart-xaxis[data-inset] { padding-inline-start: var(--barchart-yaxis-width); }
|
|
24
|
-
& .barchart-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}; }
|
|
25
|
-
& .barchart-axis-title { margin-top: ${c.space["1"]}; padding-inline-start: var(--barchart-yaxis-width); text-align: center; font-size: ${c.text.sm}; color: ${c.fgMuted}; }`,
|
|
13
|
+
base: `display: flex; flex-direction: column; box-sizing: border-box; font-family: ${c.font.sans}; --crisp-barchart-yaxis-width: 34px;
|
|
14
|
+
& .crisp-barchart-body { display: flex; flex: 1; min-height: 0; }
|
|
15
|
+
& .crisp-barchart-yaxis { position: relative; flex-shrink: 0; width: var(--crisp-barchart-yaxis-width); }
|
|
16
|
+
& .crisp-barchart-ytick { position: absolute; inset-inline-end: ${c.space["2"]}; transform: translateY(50%); font-size: ${c.text.xs}; color: ${c.fgMuted}; white-space: nowrap; }
|
|
17
|
+
& .crisp-barchart-plot { position: relative; flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: ${c.space["3"]}; border-bottom: 1px solid ${c.borderDefault}; }
|
|
18
|
+
& .crisp-barchart-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed ${c.borderSubtle}; pointer-events: none; }
|
|
19
|
+
& .crisp-barchart-col { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
|
|
20
|
+
& .crisp-barchart-bar { width: 100%; max-width: 96px; border-radius: ${c.radius.sm} ${c.radius.sm} 0 0; background: ${c.bgBrandSolid}; transition: height 0.3s ease; }
|
|
21
|
+
& .crisp-barchart-bar[data-empty] { min-height: 2px; opacity: 0.35; }
|
|
22
|
+
& .crisp-barchart-xaxis { display: flex; gap: ${c.space["3"]}; margin-top: ${c.space["1.5"]}; }
|
|
23
|
+
& .crisp-barchart-xaxis[data-inset] { padding-inline-start: var(--crisp-barchart-yaxis-width); }
|
|
24
|
+
& .crisp-barchart-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}; }
|
|
25
|
+
& .crisp-barchart-axis-title { margin-top: ${c.space["1"]}; padding-inline-start: var(--crisp-barchart-yaxis-width); text-align: center; font-size: ${c.text.sm}; color: ${c.fgMuted}; }`,
|
|
26
26
|
variants: {},
|
|
27
27
|
defaultVariants: {},
|
|
28
28
|
compoundVariants: [],
|
|
@@ -11,7 +11,7 @@ export function Breadcrumb({ items, separator, "aria-label": ariaLabel = "Breadc
|
|
|
11
11
|
return (_jsx("nav", { "aria-label": ariaLabel, className: breadcrumbRecipe({ className }), ...rest, children: items.map((item, i) => {
|
|
12
12
|
const last = i === items.length - 1;
|
|
13
13
|
const content = (_jsxs(_Fragment, { children: [item.icon, item.label] }));
|
|
14
|
-
return (_jsxs(React.Fragment, { children: [last ? (_jsx("span", { className: "breadcrumb-item", "aria-current": "page", children: content })) : item.href ? (_jsx("a", { className: "breadcrumb-item", href: item.href, children: content })) : (_jsx("button", { type: "button", className: "breadcrumb-item", onClick: item.onClick, children: content })), !last && _jsx("span", { className: "breadcrumb-sep", children: sep })] }, i));
|
|
14
|
+
return (_jsxs(React.Fragment, { children: [last ? (_jsx("span", { className: "crisp-breadcrumb-item", "aria-current": "page", children: content })) : item.href ? (_jsx("a", { className: "crisp-breadcrumb-item", href: item.href, children: content })) : (_jsx("button", { type: "button", className: "crisp-breadcrumb-item", onClick: item.onClick, children: content })), !last && _jsx("span", { className: "crisp-breadcrumb-sep", children: sep })] }, i));
|
|
15
15
|
}) }));
|
|
16
16
|
}
|
|
17
17
|
Breadcrumb.displayName = "Breadcrumb";
|
|
@@ -4,12 +4,12 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
4
4
|
const config = defineRecipe({
|
|
5
5
|
name: "breadcrumb",
|
|
6
6
|
base: `display: flex; align-items: center; gap: ${c.space["0.5"]}; font-family: ${c.font.sans}; font-size: ${c.text.lg};
|
|
7
|
-
& .breadcrumb-item { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; box-sizing: border-box; height: 24px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.md}; color: ${c.fgMuted}; text-decoration: none; white-space: nowrap; }
|
|
8
|
-
& .breadcrumb-item svg { flex-shrink: 0; }
|
|
9
|
-
& a.breadcrumb-item:hover, & button.breadcrumb-item:hover { color: ${c.fgPrimary}; background: color-mix(in srgb, ${c.fgPrimary} 5%, transparent); }
|
|
10
|
-
& button.breadcrumb-item { border: none; background: none; font: inherit; cursor: pointer; }
|
|
11
|
-
& .breadcrumb-item[aria-current] { color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; }
|
|
12
|
-
& .breadcrumb-sep { flex-shrink: 0; color: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); }
|
|
7
|
+
& .crisp-breadcrumb-item { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; box-sizing: border-box; height: 24px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.md}; color: ${c.fgMuted}; text-decoration: none; white-space: nowrap; }
|
|
8
|
+
& .crisp-breadcrumb-item svg { flex-shrink: 0; }
|
|
9
|
+
& a.crisp-breadcrumb-item:hover, & button.crisp-breadcrumb-item:hover { color: ${c.fgPrimary}; background: color-mix(in srgb, ${c.fgPrimary} 5%, transparent); }
|
|
10
|
+
& button.crisp-breadcrumb-item { border: none; background: none; font: inherit; cursor: pointer; }
|
|
11
|
+
& .crisp-breadcrumb-item[aria-current] { color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; }
|
|
12
|
+
& .crisp-breadcrumb-sep { flex-shrink: 0; color: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); }
|
|
13
13
|
${rtlFlipCss}
|
|
14
14
|
`,
|
|
15
15
|
variants: {},
|
|
@@ -8,9 +8,9 @@ import { bulkbarRecipe } from "./bulkbar.recipe.js";
|
|
|
8
8
|
* (e.g. `count > 0 && <BulkBar …/>`). Measured from a records table.
|
|
9
9
|
*/
|
|
10
10
|
export function BulkBar({ count, onClear, countLabel = "selected", countText = (count, label) => (_jsxs(_Fragment, { children: [count, " ", label] })), children, className, clearLabel = "Clear selection", ...rest }) {
|
|
11
|
-
return (_jsx("div", { className: bulkbarRecipe({ className }), ...rest, children: _jsxs("div", { className: "bulkbar-bar", children: [count != null && (_jsxs("button", { type: "button", className: "bulkbar-count", onClick: onClear, title: clearLabel, children: [countText(count, countLabel), _jsx(X, { size: 13, strokeWidth: 2, "aria-hidden": "true" })] })), children] }) }));
|
|
11
|
+
return (_jsx("div", { className: bulkbarRecipe({ className }), ...rest, children: _jsxs("div", { className: "crisp-bulkbar-bar", children: [count != null && (_jsxs("button", { type: "button", className: "crisp-bulkbar-count", onClick: onClear, title: clearLabel, children: [countText(count, countLabel), _jsx(X, { size: 13, strokeWidth: 2, "aria-hidden": "true" })] })), children] }) }));
|
|
12
12
|
}
|
|
13
13
|
BulkBar.displayName = "BulkBar";
|
|
14
14
|
/** A styled action button for use inside a `<BulkBar>` (or as a `<Menu>` trigger). */
|
|
15
|
-
export const BulkBarButton = React.forwardRef(({ icon, danger, className, children, type, ...props }, ref) => (_jsxs("button", { ref: ref, type: type ?? "button", className: `bulkbar-btn${danger ? " bulkbar-btn--danger" : ""}${className ? ` ${className}` : ""}`, ...props, children: [icon, children] })));
|
|
15
|
+
export const BulkBarButton = React.forwardRef(({ icon, danger, className, children, type, ...props }, ref) => (_jsxs("button", { ref: ref, type: type ?? "button", className: `crisp-bulkbar-btn${danger ? " crisp-bulkbar-btn--danger" : ""}${className ? ` ${className}` : ""}`, ...props, children: [icon, children] })));
|
|
16
16
|
BulkBarButton.displayName = "BulkBarButton";
|
|
@@ -10,16 +10,16 @@ import { contract as c, elevation as e } from "../../tokens/index.js";
|
|
|
10
10
|
const config = defineRecipe({
|
|
11
11
|
name: "bulkbar",
|
|
12
12
|
base: `position: absolute; left: 0; right: 0; bottom: ${c.space["4"]}; display: flex; justify-content: center; pointer-events: none; z-index: 10;
|
|
13
|
-
& .bulkbar-bar { pointer-events: auto; display: flex; align-items: center; gap: ${c.space["0.5"]}; height: 48px; padding: 0 ${c.space["1"]} 0 ${c.space["1.5"]}; border-radius: 14px; background: ${c.bgSurface}; box-shadow: ${e.floating}; color: ${c.fgPrimary}; transition: opacity .16s ease, transform .16s ease; }
|
|
14
|
-
& .bulkbar-bar { @starting-style { opacity: 0; transform: translateY(10px); } }
|
|
15
|
-
& .bulkbar-count { display: inline-flex; align-items: center; gap: ${c.space["1"]}; height: ${c.size.menuRow}; margin: 0; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
16
|
-
& .bulkbar-count:hover { background: color-mix(in srgb, ${c.fgPrimary} 8%, transparent); color: ${c.fgPrimary}; }
|
|
17
|
-
& .bulkbar-count svg { flex-shrink: 0; }
|
|
18
|
-
& .bulkbar-btn { display: inline-flex; align-items: center; gap: ${c.space["1"]}; height: ${c.size.menuRow}; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: transparent; color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
19
|
-
& .bulkbar-btn:hover { background: ${c.bgRaised}; }
|
|
20
|
-
& .bulkbar-btn--danger { color: ${c.bgDanger}; }
|
|
21
|
-
& .bulkbar-btn--danger:hover { background: color-mix(in srgb, ${c.bgDanger} 10%, transparent); }
|
|
22
|
-
& .bulkbar-btn svg { flex-shrink: 0; }`,
|
|
13
|
+
& .crisp-bulkbar-bar { pointer-events: auto; display: flex; align-items: center; gap: ${c.space["0.5"]}; height: 48px; padding: 0 ${c.space["1"]} 0 ${c.space["1.5"]}; border-radius: 14px; background: ${c.bgSurface}; box-shadow: ${e.floating}; color: ${c.fgPrimary}; transition: opacity .16s ease, transform .16s ease; }
|
|
14
|
+
& .crisp-bulkbar-bar { @starting-style { opacity: 0; transform: translateY(10px); } }
|
|
15
|
+
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: ${c.space["1"]}; height: ${c.size.menuRow}; margin: 0; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
16
|
+
& .crisp-bulkbar-count:hover { background: color-mix(in srgb, ${c.fgPrimary} 8%, transparent); color: ${c.fgPrimary}; }
|
|
17
|
+
& .crisp-bulkbar-count svg { flex-shrink: 0; }
|
|
18
|
+
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: ${c.space["1"]}; height: ${c.size.menuRow}; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: transparent; color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
19
|
+
& .crisp-bulkbar-btn:hover { background: ${c.bgRaised}; }
|
|
20
|
+
& .crisp-bulkbar-btn--danger { color: ${c.bgDanger}; }
|
|
21
|
+
& .crisp-bulkbar-btn--danger:hover { background: color-mix(in srgb, ${c.bgDanger} 10%, transparent); }
|
|
22
|
+
& .crisp-bulkbar-btn svg { flex-shrink: 0; }`,
|
|
23
23
|
variants: {},
|
|
24
24
|
defaultVariants: {},
|
|
25
25
|
compoundVariants: [],
|
|
@@ -17,6 +17,6 @@ export function Callout({ tone = "neutral", icon, title, children, action, class
|
|
|
17
17
|
const iconNode = icon === undefined
|
|
18
18
|
? Fallback && _jsx(Fallback, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" })
|
|
19
19
|
: icon;
|
|
20
|
-
return (_jsxs("div", { className: calloutRecipe({ className }), ...rest, "data-tone": tone, role: "note", children: [iconNode && _jsx("span", { className: "callout-icon", children: iconNode }), _jsxs("div", { className: "callout-body", children: [title != null && _jsx("div", { className: "callout-title", children: title }), children != null && _jsx("div", { className: "callout-desc", children: children })] }), action && _jsx("div", { className: "callout-action", children: action })] }));
|
|
20
|
+
return (_jsxs("div", { className: calloutRecipe({ className }), ...rest, "data-tone": tone, role: "note", children: [iconNode && _jsx("span", { className: "crisp-callout-icon", children: iconNode }), _jsxs("div", { className: "crisp-callout-body", children: [title != null && _jsx("div", { className: "crisp-callout-title", children: title }), children != null && (_jsx("div", { className: "crisp-callout-desc", children: children }))] }), action && _jsx("div", { className: "crisp-callout-action", children: action })] }));
|
|
21
21
|
}
|
|
22
22
|
Callout.displayName = "Callout";
|
|
@@ -5,19 +5,19 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
5
5
|
const config = defineRecipe({
|
|
6
6
|
name: "callout",
|
|
7
7
|
base: `display: flex; align-items: flex-start; gap: ${c.space["2.5"]}; box-sizing: border-box; padding: ${c.space["3"]} ${c.space["4"]}; border-radius: ${c.radius.lg}; font-family: ${c.font.sans}; font-size: ${c.text.md}; background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); color: ${c.fgPrimary};
|
|
8
|
-
& .callout-icon { flex-shrink: 0; margin-top: 1px; display: inline-flex; color: ${c.fgMuted}; }
|
|
9
|
-
& .callout-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
10
|
-
& .callout-title { font-weight: ${c.weight.semibold}; }
|
|
11
|
-
& .callout-desc { color: ${c.fgMuted}; }
|
|
12
|
-
& .callout-action { flex-shrink: 0; }
|
|
8
|
+
& .crisp-callout-icon { flex-shrink: 0; margin-top: 1px; display: inline-flex; color: ${c.fgMuted}; }
|
|
9
|
+
& .crisp-callout-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
10
|
+
& .crisp-callout-title { font-weight: ${c.weight.semibold}; }
|
|
11
|
+
& .crisp-callout-desc { color: ${c.fgMuted}; }
|
|
12
|
+
& .crisp-callout-action { flex-shrink: 0; }
|
|
13
13
|
&[data-tone="info"] { background: color-mix(in srgb, ${c.bgBrandSolid} 8%, transparent); }
|
|
14
|
-
&[data-tone="info"] .callout-icon { color: ${c.bgBrandSolid}; }
|
|
14
|
+
&[data-tone="info"] .crisp-callout-icon { color: ${c.bgBrandSolid}; }
|
|
15
15
|
&[data-tone="success"] { background: color-mix(in srgb, ${c.bgSuccess} 10%, transparent); }
|
|
16
|
-
&[data-tone="success"] .callout-icon { color: ${c.bgSuccess}; }
|
|
16
|
+
&[data-tone="success"] .crisp-callout-icon { color: ${c.bgSuccess}; }
|
|
17
17
|
&[data-tone="warning"] { background: color-mix(in srgb, ${c.bgWarning} 12%, transparent); }
|
|
18
|
-
&[data-tone="warning"] .callout-icon { color: ${c.bgWarning}; }
|
|
18
|
+
&[data-tone="warning"] .crisp-callout-icon { color: ${c.bgWarning}; }
|
|
19
19
|
&[data-tone="danger"] { background: color-mix(in srgb, ${c.bgDanger} 10%, transparent); }
|
|
20
|
-
&[data-tone="danger"] .callout-icon { color: ${c.bgDanger}; }`,
|
|
20
|
+
&[data-tone="danger"] .crisp-callout-icon { color: ${c.bgDanger}; }`,
|
|
21
21
|
variants: {},
|
|
22
22
|
defaultVariants: {},
|
|
23
23
|
compoundVariants: [],
|
|
@@ -5,11 +5,11 @@ import { cardRecipe } from "./card.recipe.js";
|
|
|
5
5
|
export const Card = React.forwardRef(({ raised, interactive, className, ...props }, ref) => (_jsx("div", { ref: ref, className: cardRecipe({ raised, interactive, className }), ...props })));
|
|
6
6
|
Card.displayName = "Card";
|
|
7
7
|
export function CardHeader({ children, icon, action, }) {
|
|
8
|
-
return (_jsxs("div", { className: "card-header", children: [icon, _jsx("span", { className: "card-title", children: children }), action] }));
|
|
8
|
+
return (_jsxs("div", { className: "crisp-card-header", children: [icon, _jsx("span", { className: "crisp-card-title", children: children }), action] }));
|
|
9
9
|
}
|
|
10
10
|
export function CardBody({ children, className, }) {
|
|
11
|
-
return (_jsx("div", { className: className ? `card-body ${className}` : "card-body", children: children }));
|
|
11
|
+
return (_jsx("div", { className: className ? `crisp-card-body ${className}` : "crisp-card-body", children: children }));
|
|
12
12
|
}
|
|
13
13
|
export function CardFooter({ children }) {
|
|
14
|
-
return _jsx("div", { className: "card-footer", children: children });
|
|
14
|
+
return _jsx("div", { className: "crisp-card-footer", children: children });
|
|
15
15
|
}
|
|
@@ -6,11 +6,11 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
6
6
|
const config = defineRecipe({
|
|
7
7
|
name: "card",
|
|
8
8
|
base: `display: flex; flex-direction: column; box-sizing: border-box; border-radius: ${c.radius.xl}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}; font-family: ${c.font.sans}; color: ${c.fgPrimary};
|
|
9
|
-
& .card-header { display: flex; align-items: center; gap: ${c.space["2"]}; flex-shrink: 0; padding: ${c.space["3"]} ${c.space["4"]}; border-bottom: 1px solid ${c.borderSubtle}; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; }
|
|
10
|
-
& .card-header svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
11
|
-
& .card-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
12
|
-
& .card-body { flex: 1; min-height: 0; padding: ${c.space["4"]}; }
|
|
13
|
-
& .card-footer { display: flex; align-items: center; justify-content: flex-end; gap: ${c.space["2"]}; flex-shrink: 0; padding: ${c.space["3"]} ${c.space["4"]}; border-top: 1px solid ${c.borderSubtle}; }`,
|
|
9
|
+
& .crisp-card-header { display: flex; align-items: center; gap: ${c.space["2"]}; flex-shrink: 0; padding: ${c.space["3"]} ${c.space["4"]}; border-bottom: 1px solid ${c.borderSubtle}; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; }
|
|
10
|
+
& .crisp-card-header svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
11
|
+
& .crisp-card-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
12
|
+
& .crisp-card-body { flex: 1; min-height: 0; padding: ${c.space["4"]}; }
|
|
13
|
+
& .crisp-card-footer { display: flex; align-items: center; justify-content: flex-end; gap: ${c.space["2"]}; flex-shrink: 0; padding: ${c.space["3"]} ${c.space["4"]}; border-top: 1px solid ${c.borderSubtle}; }`,
|
|
14
14
|
variants: {
|
|
15
15
|
raised: {
|
|
16
16
|
true: `box-shadow: inset 0 0 0 1px ${c.borderSubtle}, 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px -4px rgba(28,40,64,0.08);`,
|
|
@@ -96,5 +96,5 @@ export function ColumnCalc({ rows, value, numeric = false, defaultOp = "none", o
|
|
|
96
96
|
...(numeric ? NUMERIC_CALCS : []),
|
|
97
97
|
"none",
|
|
98
98
|
];
|
|
99
|
-
return (_jsx("span", { className: columncalcRecipe({ className }), ...rest, children: _jsxs(Menu, { trigger: _jsx("button", { type: "button", className: "columncalc-trigger", "data-align": align === "right" ? "right" : undefined, children: op === "none" || result === null ? (_jsxs(_Fragment, { children: [_jsx(Plus, { size: 12, strokeWidth: 2 }), _jsx("span", { className: "columncalc-placeholder", children: addLabel })] })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "columncalc-value", children: format(result, op) }), _jsx("span", { className: "columncalc-op", children: labelFor(op) }), _jsx(ChevronDown, { size: 12, strokeWidth: 2 })] })) }), children: [_jsx("div", { className: "columncalc-section", children: sectionLabel }), ops.map((o) => (_jsx(MenuItem, { onSelect: () => setOp(o), children: labelFor(o) }, o)))] }) }));
|
|
99
|
+
return (_jsx("span", { className: columncalcRecipe({ className }), ...rest, children: _jsxs(Menu, { trigger: _jsx("button", { type: "button", className: "crisp-columncalc-trigger", "data-align": align === "right" ? "right" : undefined, children: op === "none" || result === null ? (_jsxs(_Fragment, { children: [_jsx(Plus, { size: 12, strokeWidth: 2 }), _jsx("span", { className: "crisp-columncalc-placeholder", children: addLabel })] })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "crisp-columncalc-value", children: format(result, op) }), _jsx("span", { className: "crisp-columncalc-op", children: labelFor(op) }), _jsx(ChevronDown, { size: 12, strokeWidth: 2 })] })) }), children: [_jsx("div", { className: "crisp-columncalc-section", children: sectionLabel }), ops.map((o) => (_jsx(MenuItem, { onSelect: () => setOp(o), children: labelFor(o) }, o)))] }) }));
|
|
100
100
|
}
|
|
@@ -10,18 +10,25 @@ const config = defineRecipe({
|
|
|
10
10
|
/* Menu wraps its trigger in a flex div that sizes to content, which would
|
|
11
11
|
shrink the button back to its text. Make the wrapper fill too, so the
|
|
12
12
|
whole cell stays clickable. */
|
|
13
|
-
& .menu { width: 100%; height: 100%; }
|
|
13
|
+
& .crisp-menu { width: 100%; height: 100%; }
|
|
14
|
+
/* No radius: the trigger fills the cell, so rounding its own corners
|
|
15
|
+
leaves the cell's background showing through at the four corners as
|
|
16
|
+
soon as the hover tint paints. Everything else that fills a grid cell
|
|
17
|
+
agrees -- recordstable-sum-btn, the same summary trigger, declares no
|
|
18
|
+
radius, and datatable-grip and the embedded pickers zero theirs. An 8px
|
|
19
|
+
radius survived the chip-to-full-cell conversion and shipped rounded
|
|
20
|
+
until #282, so the spec check now guards it. */
|
|
14
21
|
/* The hit target is the WHOLE summary cell -- measured 246x37 with
|
|
15
22
|
padding 0 12px, not a content-sized chip. Clicking anywhere in the cell
|
|
16
23
|
opens the aggregation menu. */
|
|
17
|
-
& .columncalc-trigger { display: flex; align-items: center; gap: ${c.space["1"]}; width: 100%; height: 100%; min-height: ${c.size.tableRow}; margin: 0; padding: 0 ${c.space["3"]}; border: none;
|
|
18
|
-
& .columncalc-trigger:hover { background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); color: ${c.fgPrimary}; }
|
|
19
|
-
& .columncalc-trigger svg { flex-shrink: 0; opacity: 0.7; }
|
|
20
|
-
& .columncalc-trigger[data-align="right"] { justify-content: flex-end; }
|
|
21
|
-
& .columncalc-placeholder { overflow: hidden; text-overflow: ellipsis; }
|
|
22
|
-
& .columncalc-value { color: ${c.fgPrimary}; font-variant-numeric: tabular-nums; }
|
|
23
|
-
& .columncalc-op { color: ${c.fgMuted}; }
|
|
24
|
-
& .columncalc-section { padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }`,
|
|
24
|
+
& .crisp-columncalc-trigger { display: flex; align-items: center; gap: ${c.space["1"]}; width: 100%; height: 100%; min-height: ${c.size.tableRow}; margin: 0; padding: 0 ${c.space["3"]}; border: none; background: transparent; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; white-space: nowrap; cursor: pointer; transition: background-color .12s, color .12s; }
|
|
25
|
+
& .crisp-columncalc-trigger:hover { background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); color: ${c.fgPrimary}; }
|
|
26
|
+
& .crisp-columncalc-trigger svg { flex-shrink: 0; opacity: 0.7; }
|
|
27
|
+
& .crisp-columncalc-trigger[data-align="right"] { justify-content: flex-end; }
|
|
28
|
+
& .crisp-columncalc-placeholder { overflow: hidden; text-overflow: ellipsis; }
|
|
29
|
+
& .crisp-columncalc-value { color: ${c.fgPrimary}; font-variant-numeric: tabular-nums; }
|
|
30
|
+
& .crisp-columncalc-op { color: ${c.fgMuted}; }
|
|
31
|
+
& .crisp-columncalc-section { padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }`,
|
|
25
32
|
variants: {},
|
|
26
33
|
defaultVariants: {},
|
|
27
34
|
compoundVariants: [],
|
|
@@ -56,11 +56,11 @@ export function ContextMenu({ children, items, menuLabel = "Context menu", class
|
|
|
56
56
|
document.removeEventListener("keydown", onKey);
|
|
57
57
|
};
|
|
58
58
|
}, [pos, close]);
|
|
59
|
-
return (_jsxs("div", { ref: rootRef, className: contextmenuRecipe({ className }), children: [_jsx("div", { onContextMenu: open, children: children }), pos && (_jsx("div", { ref: menuRef, className: "contextmenu-content", role: "menu", "aria-label": menuLabel, style: { left: pos.x, top: pos.y }, onKeyDown: onMenuKeyDown, children: items.map((item, i) => item.separator ? (_jsx("hr", { className: "contextmenu-sep" }, i)) : (_jsxs("button", { type: "button", role: "menuitem", disabled: item.disabled, className: item.danger
|
|
60
|
-
? "contextmenu-item contextmenu-item--danger"
|
|
61
|
-
: "contextmenu-item", tabIndex: -1, onClick: () => {
|
|
59
|
+
return (_jsxs("div", { ref: rootRef, className: contextmenuRecipe({ className }), children: [_jsx("div", { onContextMenu: open, children: children }), pos && (_jsx("div", { ref: menuRef, className: "crisp-contextmenu-content", role: "menu", "aria-label": menuLabel, style: { left: pos.x, top: pos.y }, onKeyDown: onMenuKeyDown, children: items.map((item, i) => item.separator ? (_jsx("hr", { className: "crisp-contextmenu-sep" }, i)) : (_jsxs("button", { type: "button", role: "menuitem", disabled: item.disabled, className: item.danger
|
|
60
|
+
? "crisp-contextmenu-item crisp-contextmenu-item--danger"
|
|
61
|
+
: "crisp-contextmenu-item", tabIndex: -1, onClick: () => {
|
|
62
62
|
item.onSelect?.();
|
|
63
63
|
close(true);
|
|
64
|
-
}, children: [item.icon, item.label, item.shortcut && (_jsx("span", { className: "contextmenu-shortcut", children: item.shortcut }))] }, i))) }))] }));
|
|
64
|
+
}, children: [item.icon, item.label, item.shortcut && (_jsx("span", { className: "crisp-contextmenu-shortcut", children: item.shortcut }))] }, i))) }))] }));
|
|
65
65
|
}
|
|
66
66
|
ContextMenu.displayName = "ContextMenu";
|
|
@@ -4,15 +4,15 @@ import { contract as c, elevation as e } from "../../tokens/index.js";
|
|
|
4
4
|
const config = defineRecipe({
|
|
5
5
|
name: "contextmenu",
|
|
6
6
|
base: `display: contents; font-family: ${c.font.sans};
|
|
7
|
-
& .contextmenu-content { position: fixed; z-index: 60; min-width: 200px; box-sizing: border-box; padding: ${c.space["1"]}; border-radius: ${c.radius.xl}; background: ${c.bgPopover}; box-shadow: ${e.floating}; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease; transform-origin: top left; @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
8
|
-
& .contextmenu-item { display: flex; align-items: center; gap: ${c.space["2"]}; width: 100%; height: ${c.size.menuRow}; box-sizing: border-box; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.lg}; text-align: start; white-space: nowrap; cursor: pointer; }
|
|
9
|
-
& .contextmenu-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
10
|
-
& .contextmenu-item:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); }
|
|
11
|
-
& .contextmenu-item--danger { color: ${c.bgDanger}; }
|
|
12
|
-
& .contextmenu-item--danger svg { color: ${c.bgDanger}; }
|
|
13
|
-
& .contextmenu-item--danger:hover { background: color-mix(in srgb, ${c.bgDanger} 10%, transparent); }
|
|
14
|
-
& .contextmenu-shortcut { margin-inline-start: auto; padding-inline-start: ${c.space["3"]}; color: ${c.fgMuted}; font-size: ${c.text.sm}; }
|
|
15
|
-
& .contextmenu-sep { height: 1px; margin: ${c.space["1"]} 0; border: none; background: ${c.borderSubtle}; }`,
|
|
7
|
+
& .crisp-contextmenu-content { position: fixed; z-index: 60; min-width: 200px; box-sizing: border-box; padding: ${c.space["1"]}; border-radius: ${c.radius.xl}; background: ${c.bgPopover}; box-shadow: ${e.floating}; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease; transform-origin: top left; @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
8
|
+
& .crisp-contextmenu-item { display: flex; align-items: center; gap: ${c.space["2"]}; width: 100%; height: ${c.size.menuRow}; box-sizing: border-box; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.lg}; text-align: start; white-space: nowrap; cursor: pointer; }
|
|
9
|
+
& .crisp-contextmenu-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
10
|
+
& .crisp-contextmenu-item:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); }
|
|
11
|
+
& .crisp-contextmenu-item--danger { color: ${c.bgDanger}; }
|
|
12
|
+
& .crisp-contextmenu-item--danger svg { color: ${c.bgDanger}; }
|
|
13
|
+
& .crisp-contextmenu-item--danger:hover { background: color-mix(in srgb, ${c.bgDanger} 10%, transparent); }
|
|
14
|
+
& .crisp-contextmenu-shortcut { margin-inline-start: auto; padding-inline-start: ${c.space["3"]}; color: ${c.fgMuted}; font-size: ${c.text.sm}; }
|
|
15
|
+
& .crisp-contextmenu-sep { height: 1px; margin: ${c.space["1"]} 0; border: none; background: ${c.borderSubtle}; }`,
|
|
16
16
|
variants: {},
|
|
17
17
|
defaultVariants: {},
|
|
18
18
|
compoundVariants: [],
|
|
@@ -80,7 +80,7 @@ function formatCell(type, v, symbol) {
|
|
|
80
80
|
// display string belongs -- as an entity's name, a status' label -- while the
|
|
81
81
|
// raw value keeps driving structure and tone.
|
|
82
82
|
function renderTyped(col, value, avatarTone, display) {
|
|
83
|
-
const empty = _jsx("span", { className: "datatable-muted", children: "\u2014" });
|
|
83
|
+
const empty = _jsx("span", { className: "crisp-datatable-muted", children: "\u2014" });
|
|
84
84
|
switch (col.type) {
|
|
85
85
|
case "entity": {
|
|
86
86
|
const raw = (typeof value === "object" && value ? value : { name: asText(value) });
|
|
@@ -89,7 +89,7 @@ function renderTyped(col, value, avatarTone, display) {
|
|
|
89
89
|
const e = display ? { ...raw, name: display } : raw;
|
|
90
90
|
if (!e.name)
|
|
91
91
|
return empty;
|
|
92
|
-
return (_jsxs("span", { className: "datatable-entity", children: [_jsx("span", { className: "datatable-avatar", "data-tone": avatarTone === "hashed" ? toneFor(raw.name) : undefined, children: e.avatar ? (_jsx("img", { src: e.avatar, alt: "" })) : (initials(e.name).slice(0, 2)) }), _jsx("span", { className: "datatable-entity-name", children: e.name })] }));
|
|
92
|
+
return (_jsxs("span", { className: "crisp-datatable-entity", children: [_jsx("span", { className: "crisp-datatable-avatar", "data-tone": avatarTone === "hashed" ? toneFor(raw.name) : undefined, children: e.avatar ? (_jsx("img", { src: e.avatar, alt: "" })) : (initials(e.name).slice(0, 2)) }), _jsx("span", { className: "crisp-datatable-entity-name", children: e.name })] }));
|
|
93
93
|
}
|
|
94
94
|
case "tags": {
|
|
95
95
|
// asking for a format on a tag column means "render it your way" -- show
|
|
@@ -99,7 +99,7 @@ function renderTyped(col, value, avatarTone, display) {
|
|
|
99
99
|
const tags = Array.isArray(value) ? value : [];
|
|
100
100
|
if (!tags.length)
|
|
101
101
|
return empty;
|
|
102
|
-
return (_jsx("span", { className: "datatable-tags", children: tags.map((t) => (_jsx("span", { className: "datatable-tag", "data-tone": col.tones?.[t] ?? toneFor(t), children: t }, t))) }));
|
|
102
|
+
return (_jsx("span", { className: "crisp-datatable-tags", children: tags.map((t) => (_jsx("span", { className: "crisp-datatable-tag", "data-tone": col.tones?.[t] ?? toneFor(t), children: t }, t))) }));
|
|
103
103
|
}
|
|
104
104
|
case "status": {
|
|
105
105
|
const s = asText(value);
|
|
@@ -107,14 +107,14 @@ function renderTyped(col, value, avatarTone, display) {
|
|
|
107
107
|
return empty;
|
|
108
108
|
// tone is looked up by the RAW status, so formatting the label (casing,
|
|
109
109
|
// translation) can never silently repaint the chip
|
|
110
|
-
return (_jsx("span", { className: "datatable-tag", "data-tone": col.tones?.[s] ?? toneFor(s), children: display || s }));
|
|
110
|
+
return (_jsx("span", { className: "crisp-datatable-tag", "data-tone": col.tones?.[s] ?? toneFor(s), children: display || s }));
|
|
111
111
|
}
|
|
112
112
|
default: {
|
|
113
113
|
const text = display || formatCell(col.type, value, col.symbol);
|
|
114
114
|
const isNum = col.type === "number" || col.type === "currency";
|
|
115
115
|
if (!text)
|
|
116
116
|
return empty;
|
|
117
|
-
return isNum ? _jsx("span", { className: "datatable-num", children: text }) : text;
|
|
117
|
+
return isNum ? _jsx("span", { className: "crisp-datatable-num", children: text }) : text;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -417,13 +417,13 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
417
417
|
function ChevronFor({ colKey }) {
|
|
418
418
|
const dir = sortDirByKey.get(colKey);
|
|
419
419
|
if (dir)
|
|
420
|
-
return dir === "asc" ? (_jsx(ArrowUp, { className: "datatable-chevron", size: 13, strokeWidth: 2 })) : (_jsx(ArrowDown, { className: "datatable-chevron", size: 13, strokeWidth: 2 }));
|
|
421
|
-
return (_jsx(ChevronsUpDown, { className: "datatable-chevron", size: 13, strokeWidth: 2 }));
|
|
420
|
+
return dir === "asc" ? (_jsx(ArrowUp, { className: "crisp-datatable-chevron", size: 13, strokeWidth: 2 })) : (_jsx(ArrowDown, { className: "crisp-datatable-chevron", size: 13, strokeWidth: 2 }));
|
|
421
|
+
return (_jsx(ChevronsUpDown, { className: "crisp-datatable-chevron", size: 13, strokeWidth: 2 }));
|
|
422
422
|
}
|
|
423
|
-
return (_jsxs("div", { ref: gridRef, className: datatableRecipe({ className }), tabIndex: -1, onKeyDown: onGridKeyDown, ...rest, children: [(filterable || showCount || toolbar || columnMenu) && (_jsxs("div", { className: "datatable-toolbar", children: [columnMenu && (_jsxs(Menu, { align: "start", trigger: _jsxs("button", { type: "button", className: "datatable-viewsettings", children: [_jsx(SlidersHorizontal, { size: 14, strokeWidth: 1.75 }), "View settings"] }), children: [_jsx("div", { className: "datatable-group-label", children: "Columns" }), allColumns.map((c) => (_jsxs(MenuItem, { onSelect: () => c.hidden ? showColumn(c.key) : hideColumn(c.key), children: [_jsx(Check, { size: 14, strokeWidth: 2, style: { opacity: c.hidden ? 0 : 1 } }), typeof c.header === "string" ? c.header : c.key] }, c.key)))] })), filterable && (_jsxs("span", { className: "datatable-search", children: [_jsx(Search, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), _jsx("input", { type: "search", placeholder: searchPlaceholder, value: query, onChange: (e) => setQuery(e.target.value), "aria-label": searchLabel })] })), showCount && (_jsx("span", { className: "datatable-count", children: countLabel(rows.length, data.length) })), toolbar] })), _jsxs(Table, { interactive: interactive, surface: surface, style: { minWidth }, scrollProps: {
|
|
423
|
+
return (_jsxs("div", { ref: gridRef, className: datatableRecipe({ className }), tabIndex: -1, onKeyDown: onGridKeyDown, ...rest, children: [(filterable || showCount || toolbar || columnMenu) && (_jsxs("div", { className: "crisp-datatable-toolbar", children: [columnMenu && (_jsxs(Menu, { align: "start", trigger: _jsxs("button", { type: "button", className: "crisp-datatable-viewsettings", children: [_jsx(SlidersHorizontal, { size: 14, strokeWidth: 1.75 }), "View settings"] }), children: [_jsx("div", { className: "crisp-datatable-group-label", children: "Columns" }), allColumns.map((c) => (_jsxs(MenuItem, { onSelect: () => c.hidden ? showColumn(c.key) : hideColumn(c.key), children: [_jsx(Check, { size: 14, strokeWidth: 2, style: { opacity: c.hidden ? 0 : 1 } }), typeof c.header === "string" ? c.header : c.key] }, c.key)))] })), filterable && (_jsxs("span", { className: "crisp-datatable-search", children: [_jsx(Search, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), _jsx("input", { type: "search", placeholder: searchPlaceholder, value: query, onChange: (e) => setQuery(e.target.value), "aria-label": searchLabel })] })), showCount && (_jsx("span", { className: "crisp-datatable-count", children: countLabel(rows.length, data.length) })), toolbar] })), _jsxs(Table, { interactive: interactive, surface: surface, style: { minWidth }, scrollProps: {
|
|
424
424
|
onScroll: (e) => setScrolledX(e.currentTarget.scrollLeft > 0),
|
|
425
425
|
...(scrolledX ? { "data-scrolled-x": "" } : {}),
|
|
426
|
-
}, children: [_jsxs("colgroup", { children: [showGrip && _jsx("col", { style: { width: GRIP_W } }), selectable && _jsx("col", { style: { width: CHECK_W } }), columns.map((col) => (_jsx("col", { style: { width: colWidth(col) } }, col.key)))] }), _jsx(TableHeader, { children: _jsxs(TableRow, { children: [showGrip && (_jsx(TableHead, { className: "datatable-col-grip", ...stickyCol(-2) })), selectable && (_jsx(TableHead, { className: "datatable-col-check", ...stickyCol(-1), children: _jsx("span", { className: "datatable-check", children: _jsx(Checkbox, { "aria-label": selectAllLabel, checked: allSelected, indeterminate: someSelected, onChange: toggleAll }) }) })), columns.map((col, i) => {
|
|
426
|
+
}, children: [_jsxs("colgroup", { children: [showGrip && _jsx("col", { style: { width: GRIP_W } }), selectable && _jsx("col", { style: { width: CHECK_W } }), columns.map((col) => (_jsx("col", { style: { width: colWidth(col) } }, col.key)))] }), _jsx(TableHeader, { children: _jsxs(TableRow, { children: [showGrip && (_jsx(TableHead, { className: "crisp-datatable-col-grip", ...stickyCol(-2) })), selectable && (_jsx(TableHead, { className: "crisp-datatable-col-check", ...stickyCol(-1), children: _jsx("span", { className: "crisp-datatable-check", children: _jsx(Checkbox, { "aria-label": selectAllLabel, checked: allSelected, indeterminate: someSelected, onChange: toggleAll }) }) })), columns.map((col, i) => {
|
|
427
427
|
const Icon = col.icon;
|
|
428
428
|
// The sort direction was painted (`data-sorted`) and never
|
|
429
429
|
// announced: a screen reader heard the same header before and
|
|
@@ -439,10 +439,10 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
439
439
|
? "ascending"
|
|
440
440
|
: "descending"
|
|
441
441
|
: "none";
|
|
442
|
-
const inner = (_jsxs("span", { className: "datatable-th-inner", children: [Icon ? _jsx(Icon, { size: 14, strokeWidth: 1.75 }) : null, _jsx("span", { className: "datatable-th-label", children: col.header }), col.sortable ? _jsx(ChevronFor, { colKey: col.key }) : null] }));
|
|
442
|
+
const inner = (_jsxs("span", { className: "crisp-datatable-th-inner", children: [Icon ? _jsx(Icon, { size: 14, strokeWidth: 1.75 }) : null, _jsx("span", { className: "crisp-datatable-th-label", children: col.header }), col.sortable ? _jsx(ChevronFor, { colKey: col.key }) : null] }));
|
|
443
443
|
return (_jsxs(TableHead, { align: alignFor(col), "aria-sort": ariaSort, ...stickyCol(i), children: [renaming === col.key ? (_jsx("input", {
|
|
444
444
|
// biome-ignore lint/a11y/noAutofocus: the rename item opens this field
|
|
445
|
-
autoFocus: true, className: "datatable-th-rename", defaultValue: typeof col.header === "string" ? col.header : "", "aria-label": `Rename column`, onBlur: (e) => {
|
|
445
|
+
autoFocus: true, className: "crisp-datatable-th-rename", defaultValue: typeof col.header === "string" ? col.header : "", "aria-label": `Rename column`, onBlur: (e) => {
|
|
446
446
|
renameColumn(col.key, e.currentTarget.value);
|
|
447
447
|
setRenaming(null);
|
|
448
448
|
}, onKeyDown: (e) => {
|
|
@@ -452,10 +452,10 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
452
452
|
}
|
|
453
453
|
else if (e.key === "Escape")
|
|
454
454
|
setRenaming(null);
|
|
455
|
-
} })) : columnMenu ? (_jsxs(Menu, { align: "start", trigger: _jsx("button", { type: "button", className: "datatable-sort", "data-sorted": sortDirByKey.get(col.key), "aria-label": `${typeof col.header === "string"
|
|
455
|
+
} })) : columnMenu ? (_jsxs(Menu, { align: "start", trigger: _jsx("button", { type: "button", className: "crisp-datatable-sort", "data-sorted": sortDirByKey.get(col.key), "aria-label": `${typeof col.header === "string"
|
|
456
456
|
? col.header
|
|
457
|
-
: col.key} column options`, children: inner }), children: [_jsx(MenuItem, { onSelect: () => setSort({ key: col.key, dir: "asc" }), children: "Sort ascending" }), _jsx(MenuItem, { onSelect: () => setSort({ key: col.key, dir: "desc" }), children: "Sort descending" }), col.managed === false ? null : (_jsxs(_Fragment, { children: [_jsx(MenuItem, { onSelect: () => moveColumn(col.key, -1), children: "Move left" }), _jsx(MenuItem, { onSelect: () => moveColumn(col.key, 1), children: "Move right" }), _jsx(MenuItem, { onSelect: () => setRenaming(col.key), children: "Edit column label" }), _jsx(MenuItem, { onSelect: () => hideColumn(col.key), children: "Hide from view" })] }))] })) : col.sortable ? (_jsx("button", { type: "button", className: "datatable-sort", "data-sorted": sortDirByKey.get(col.key), onClick: () => cycleSort(col.key), children: inner })) : (inner), col.resizable !== false && (_jsx("span", { className: "datatable-resize", "data-resizing": resizingKey === col.key ? "" : undefined, onPointerDown: (e) => startResize(col, e), onPointerMove: moveResize, onPointerUp: endResize }))] }, col.key));
|
|
458
|
-
})] }) }), _jsx(TableBody, { children: error ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: totalCols, children: _jsx("div", { className: "datatable-empty", children: error }) }) })) : rows.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: totalCols, children: _jsx("div", { className: "datatable-empty", children: empty }) }) })) : (groupedRows.map(({ group, rows: groupRows }) => (_jsxs(React.Fragment, { children: [group !== null && (_jsx(TableRow, { children: _jsxs(TableCell, { colSpan: totalCols, className: "datatable-group", children: [_jsx("span", { className: "datatable-group-label", children: group }), _jsx("span", { className: "datatable-group-count", children: groupRows.length })] }) })), groupRows.map((row) => (_jsxs(TableRow, { "data-selected": selected.has(row.id) ? "" : undefined, "data-drop-target": showGrip &&
|
|
457
|
+
: col.key} column options`, children: inner }), children: [_jsx(MenuItem, { onSelect: () => setSort({ key: col.key, dir: "asc" }), children: "Sort ascending" }), _jsx(MenuItem, { onSelect: () => setSort({ key: col.key, dir: "desc" }), children: "Sort descending" }), col.managed === false ? null : (_jsxs(_Fragment, { children: [_jsx(MenuItem, { onSelect: () => moveColumn(col.key, -1), children: "Move left" }), _jsx(MenuItem, { onSelect: () => moveColumn(col.key, 1), children: "Move right" }), _jsx(MenuItem, { onSelect: () => setRenaming(col.key), children: "Edit column label" }), _jsx(MenuItem, { onSelect: () => hideColumn(col.key), children: "Hide from view" })] }))] })) : col.sortable ? (_jsx("button", { type: "button", className: "crisp-datatable-sort", "data-sorted": sortDirByKey.get(col.key), onClick: () => cycleSort(col.key), children: inner })) : (inner), col.resizable !== false && (_jsx("span", { className: "crisp-datatable-resize", "data-resizing": resizingKey === col.key ? "" : undefined, onPointerDown: (e) => startResize(col, e), onPointerMove: moveResize, onPointerUp: endResize }))] }, col.key));
|
|
458
|
+
})] }) }), _jsx(TableBody, { children: error ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: totalCols, children: _jsx("div", { className: "crisp-datatable-empty", children: error }) }) })) : rows.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: totalCols, children: _jsx("div", { className: "crisp-datatable-empty", children: empty }) }) })) : (groupedRows.map(({ group, rows: groupRows }) => (_jsxs(React.Fragment, { children: [group !== null && (_jsx(TableRow, { children: _jsxs(TableCell, { colSpan: totalCols, className: "crisp-datatable-group", children: [_jsx("span", { className: "crisp-datatable-group-label", children: group }), _jsx("span", { className: "crisp-datatable-group-count", children: groupRows.length })] }) })), groupRows.map((row) => (_jsxs(TableRow, { "data-selected": selected.has(row.id) ? "" : undefined, "data-drop-target": showGrip &&
|
|
459
459
|
dragRowId &&
|
|
460
460
|
dragRowId !== row.id &&
|
|
461
461
|
dropRowId === row.id
|
|
@@ -471,18 +471,18 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
471
471
|
e.preventDefault();
|
|
472
472
|
reorderRows(dragRowId, row.id);
|
|
473
473
|
}
|
|
474
|
-
: undefined, children: [showGrip && (_jsx(TableCell, { className: "datatable-col-grip", ...stickyCol(-2), onClick: (e) => e.stopPropagation(), children: _jsx("button", { type: "button", className: "datatable-grip", "aria-label": reorderRowLabel, draggable: true, onDragStart: (e) => {
|
|
474
|
+
: undefined, children: [showGrip && (_jsx(TableCell, { className: "crisp-datatable-col-grip", ...stickyCol(-2), onClick: (e) => e.stopPropagation(), children: _jsx("button", { type: "button", className: "crisp-datatable-grip", "aria-label": reorderRowLabel, draggable: true, onDragStart: (e) => {
|
|
475
475
|
setDragRowId(row.id);
|
|
476
476
|
e.dataTransfer.effectAllowed = "move";
|
|
477
477
|
}, onDragEnd: () => {
|
|
478
478
|
setDragRowId(null);
|
|
479
479
|
setDropRowId(null);
|
|
480
|
-
}, children: _jsx(GripVertical, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }) }) })), selectable && (_jsx(TableCell, { className: "datatable-col-check", ...stickyCol(-1), onClick: (e) => e.stopPropagation(), children: _jsx("span", { className: "datatable-check", children: _jsx(Checkbox, { "aria-label": selectRowLabel(row), checked: selected.has(row.id), onChange: () => toggleRow(row.id) }) }) })), columns.map((col, i) => {
|
|
480
|
+
}, children: _jsx(GripVertical, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }) }) })), selectable && (_jsx(TableCell, { className: "crisp-datatable-col-check", ...stickyCol(-1), onClick: (e) => e.stopPropagation(), children: _jsx("span", { className: "crisp-datatable-check", children: _jsx(Checkbox, { "aria-label": selectRowLabel(row), checked: selected.has(row.id), onChange: () => toggleRow(row.id) }) }) })), columns.map((col, i) => {
|
|
481
481
|
const isEditing = editing?.id === row.id && editing?.key === col.key;
|
|
482
482
|
const value = cellValue(col, row);
|
|
483
483
|
const sticky = stickyCol(i);
|
|
484
484
|
if (isEditing) {
|
|
485
|
-
return (_jsx(TableCell, { align: alignFor(col), ...sticky, onClick: (e) => e.stopPropagation(), children: _jsx("input", { className: "datatable-edit",
|
|
485
|
+
return (_jsx(TableCell, { align: alignFor(col), ...sticky, onClick: (e) => e.stopPropagation(), children: _jsx("input", { className: "crisp-datatable-edit",
|
|
486
486
|
// biome-ignore lint/a11y/noAutofocus: focus the field the moment it opens
|
|
487
487
|
autoFocus: true, ...editorFor(col), "data-editor": editorFor(col).type, defaultValue: col.type === "date"
|
|
488
488
|
? toDateInputValue(value)
|
|
@@ -493,7 +493,9 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
493
493
|
setEditing(null);
|
|
494
494
|
}, onBlur: (e) => commitEdit(row.id, col.key, e.currentTarget.value) }) }, col.key));
|
|
495
495
|
}
|
|
496
|
-
return (_jsx(TableCell, { align: alignFor(col), ...sticky, className: col.editable
|
|
496
|
+
return (_jsx(TableCell, { align: alignFor(col), ...sticky, className: col.editable
|
|
497
|
+
? "crisp-datatable-editable"
|
|
498
|
+
: undefined, "data-selected": selCell?.id === row.id && selCell?.key === col.key
|
|
497
499
|
? ""
|
|
498
500
|
: undefined, onClick: (e) => {
|
|
499
501
|
// the keyboard model's anchor; also opens the
|
|
@@ -511,6 +513,6 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
511
513
|
}, children: col.render
|
|
512
514
|
? col.render(value, row)
|
|
513
515
|
: renderTyped(col, value, avatarTone, col.format?.(value, row)) }, col.key));
|
|
514
|
-
})] }, row.id)))] }, group ?? "__ungrouped")))) }), (hasSummary || onAddRow) && (_jsxs(TableFooter, { children: [hasSummary && (_jsxs(TableRow, { children: [showGrip && _jsx(TableCell, { ...stickyCol(-2) }), selectable && _jsx(TableCell, { ...stickyCol(-1) }), columns.map((col, i) => (_jsx(TableCell, { align: alignFor(col), ...stickyCol(i), children: col.summary ? col.summary(rows) : null }, col.key)))] })), onAddRow && (_jsx(TableRow, { children: _jsx(TableCell, { className: "datatable-addcell", colSpan: totalCols, children: _jsxs("button", { type: "button", className: "datatable-addrow", onClick: onAddRow, children: [_jsx(Plus, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), addRowLabel] }) }) }))] }))] })] }));
|
|
516
|
+
})] }, row.id)))] }, group ?? "__ungrouped")))) }), (hasSummary || onAddRow) && (_jsxs(TableFooter, { children: [hasSummary && (_jsxs(TableRow, { children: [showGrip && _jsx(TableCell, { ...stickyCol(-2) }), selectable && _jsx(TableCell, { ...stickyCol(-1) }), columns.map((col, i) => (_jsx(TableCell, { align: alignFor(col), ...stickyCol(i), children: col.summary ? col.summary(rows) : null }, col.key)))] })), onAddRow && (_jsx(TableRow, { children: _jsx(TableCell, { className: "crisp-datatable-addcell", colSpan: totalCols, children: _jsxs("button", { type: "button", className: "crisp-datatable-addrow", onClick: onAddRow, children: [_jsx(Plus, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), addRowLabel] }) }) }))] }))] })] }));
|
|
515
517
|
}
|
|
516
518
|
DataTable.displayName = "DataTable";
|