@crisp-ui-kit/crisp 0.31.6 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +88 -0
- package/README.md +22 -0
- package/dist/accordion.css +13 -13
- package/dist/accordion.layered.css +23 -0
- package/dist/appshell.css +11 -11
- package/dist/appshell.layered.css +25 -0
- package/dist/authshell.css +23 -23
- package/dist/authshell.layered.css +59 -0
- package/dist/avatar.css +23 -23
- package/dist/avatar.layered.css +41 -0
- package/dist/avatargroup.css +2 -2
- package/dist/avatargroup.layered.css +7 -0
- package/dist/badge.css +31 -31
- package/dist/badge.layered.css +51 -0
- package/dist/barchart.css +15 -15
- package/dist/barchart.layered.css +25 -0
- package/dist/base.css +4 -4
- package/dist/board.css +20 -20
- package/dist/board.layered.css +34 -0
- package/dist/breadcrumb.css +8 -8
- package/dist/breadcrumb.layered.css +13 -0
- package/dist/bulkbar.css +13 -13
- package/dist/bulkbar.layered.css +23 -0
- package/dist/button.css +21 -21
- package/dist/button.layered.css +46 -0
- package/dist/callout.css +15 -15
- package/dist/callout.layered.css +18 -0
- package/dist/card.css +14 -14
- package/dist/card.layered.css +30 -0
- package/dist/checkbox.css +9 -9
- package/dist/checkbox.layered.css +21 -0
- package/dist/cjs/components/accordion/accordion.js +1 -1
- package/dist/cjs/components/accordion/accordion.recipe.js +10 -10
- package/dist/cjs/components/badge/badge.js +1 -1
- package/dist/cjs/components/badge/badge.recipe.js +1 -1
- package/dist/cjs/components/barchart/barchart.js +3 -3
- package/dist/cjs/components/barchart/barchart.recipe.js +14 -14
- package/dist/cjs/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/cjs/components/breadcrumb/breadcrumb.recipe.js +6 -6
- package/dist/cjs/components/bulkbar/bulkbar.js +2 -2
- package/dist/cjs/components/bulkbar/bulkbar.recipe.js +10 -10
- package/dist/cjs/components/callout/callout.js +1 -1
- package/dist/cjs/components/callout/callout.recipe.js +9 -9
- package/dist/cjs/components/card/card.js +3 -3
- package/dist/cjs/components/card/card.recipe.js +5 -5
- package/dist/cjs/components/columncalc/columncalc.js +1 -1
- package/dist/cjs/components/columncalc/columncalc.recipe.js +16 -9
- package/dist/cjs/components/contextmenu/contextmenu.js +4 -4
- package/dist/cjs/components/contextmenu/contextmenu.recipe.js +9 -9
- package/dist/cjs/components/datatable/datatable.js +32 -22
- package/dist/cjs/components/datatable/datatable.recipe.js +57 -57
- package/dist/cjs/components/datepicker/datepicker.js +12 -12
- package/dist/cjs/components/datepicker/datepicker.recipe.js +45 -45
- package/dist/cjs/components/datepickerfield/datepickerfield.js +2 -2
- package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +9 -9
- package/dist/cjs/components/dialog/dialog.js +5 -5
- package/dist/cjs/components/dialog/dialog.recipe.js +16 -16
- package/dist/cjs/components/donutchart/donutchart.js +1 -1
- package/dist/cjs/components/donutchart/donutchart.recipe.js +12 -12
- package/dist/cjs/components/drawer/drawer.js +3 -3
- package/dist/cjs/components/drawer/drawer.recipe.js +14 -14
- package/dist/cjs/components/emptystate/emptystate.js +1 -1
- package/dist/cjs/components/emptystate/emptystate.recipe.js +9 -9
- package/dist/cjs/components/fileupload/fileupload.js +3 -3
- package/dist/cjs/components/fileupload/fileupload.recipe.js +23 -23
- package/dist/cjs/components/formfield/formfield.js +1 -1
- package/dist/cjs/components/formfield/formfield.recipe.js +5 -5
- package/dist/cjs/components/input/input.js +1 -1
- package/dist/cjs/components/input/input.recipe.js +6 -6
- package/dist/cjs/components/linechart/linechart.js +4 -4
- package/dist/cjs/components/linechart/linechart.recipe.js +14 -14
- package/dist/cjs/components/menu/menu.js +6 -6
- package/dist/cjs/components/menu/menu.recipe.js +19 -19
- package/dist/cjs/components/multiselect/multiselect.js +5 -5
- package/dist/cjs/components/multiselect/multiselect.recipe.js +29 -29
- package/dist/cjs/components/popover/popover.js +1 -1
- package/dist/cjs/components/popover/popover.recipe.js +3 -3
- package/dist/cjs/components/progress/progress.js +2 -2
- package/dist/cjs/components/progress/progress.recipe.js +3 -3
- package/dist/cjs/components/quantitypicker/quantitypicker.js +2 -2
- package/dist/cjs/components/quantitypicker/quantitypicker.recipe.js +16 -16
- package/dist/cjs/components/radiogroup/radiogroup.js +1 -1
- package/dist/cjs/components/radiogroup/radiogroup.recipe.js +14 -14
- package/dist/cjs/components/resizablepanel/resizablepanel.js +3 -3
- package/dist/cjs/components/resizablepanel/resizablepanel.recipe.js +24 -24
- package/dist/cjs/components/segmented/segmented.js +4 -4
- package/dist/cjs/components/segmented/segmented.recipe.js +7 -7
- package/dist/cjs/components/select/select.js +3 -3
- package/dist/cjs/components/select/select.recipe.js +25 -25
- package/dist/cjs/components/slider/slider.js +2 -2
- package/dist/cjs/components/slider/slider.recipe.js +15 -15
- package/dist/cjs/components/stagebar/stagebar.js +1 -1
- package/dist/cjs/components/stagebar/stagebar.recipe.js +1 -1
- package/dist/cjs/components/statcard/statcard.js +1 -1
- package/dist/cjs/components/statcard/statcard.recipe.js +9 -9
- package/dist/cjs/components/switch/switch.js +1 -1
- package/dist/cjs/components/switch/switch.recipe.js +2 -2
- package/dist/cjs/components/table/table.js +1 -1
- package/dist/cjs/components/table/table.recipe.js +1 -1
- package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +65 -64
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +13 -13
- package/dist/cjs/components/tabs/tabs.js +4 -4
- package/dist/cjs/components/tabs/tabs.recipe.js +12 -12
- package/dist/cjs/components/textarea/textarea.js +2 -2
- package/dist/cjs/components/textarea/textarea.recipe.js +11 -11
- package/dist/cjs/components/toast/toast.js +4 -4
- package/dist/cjs/components/toast/toast.recipe.js +14 -14
- package/dist/cjs/components/wheelpicker/wheelpicker.js +2 -2
- package/dist/cjs/components/wheelpicker/wheelpicker.recipe.js +19 -19
- package/dist/cjs/core/namespace.js +17 -0
- package/dist/cjs/core/resolve.js +5 -3
- package/dist/cjs/product/appshell/appshell.js +2 -2
- package/dist/cjs/product/appshell/appshell.recipe.js +8 -8
- package/dist/cjs/product/authshell/authshell.js +1 -1
- package/dist/cjs/product/authshell/authshell.recipe.js +20 -20
- package/dist/cjs/product/board/board.js +3 -3
- package/dist/cjs/product/board/board.recipe.js +17 -17
- package/dist/cjs/product/command/command.js +3 -3
- package/dist/cjs/product/command/command.recipe.js +25 -25
- package/dist/cjs/product/entitycard/entitycard.js +1 -1
- package/dist/cjs/product/entitycard/entitycard.recipe.js +7 -7
- package/dist/cjs/product/flowcanvas/flowcanvas.js +5 -5
- package/dist/cjs/product/flowcanvas/flowcanvas.recipe.js +11 -11
- package/dist/cjs/product/inbox/inbox.js +1 -1
- package/dist/cjs/product/inbox/inbox.recipe.js +22 -22
- package/dist/cjs/product/listpage/listpage.js +3 -3
- package/dist/cjs/product/listpage/listpage.recipe.js +18 -18
- package/dist/cjs/product/navitem/navitem.js +1 -1
- package/dist/cjs/product/navitem/navitem.recipe.js +2 -2
- package/dist/cjs/product/onboarding/onboarding.js +1 -1
- package/dist/cjs/product/onboarding/onboarding.recipe.js +19 -19
- package/dist/cjs/product/recordpage/recordpage.js +24 -24
- package/dist/cjs/product/recordpage/recordpage.recipe.js +117 -117
- package/dist/cjs/product/recordpanel/recordpanel.js +4 -4
- package/dist/cjs/product/recordpanel/recordpanel.recipe.js +15 -15
- package/dist/cjs/product/recordstable/recordstable.js +48 -48
- package/dist/cjs/product/recordstable/recordstable.recipe.js +87 -87
- package/dist/cjs/product/recordstable/recordstable.tag.js +8 -8
- package/dist/cjs/product/richtext/richtext.js +4 -4
- package/dist/cjs/product/richtext/richtext.recipe.js +21 -21
- package/dist/cjs/product/settingssection/settingssection.js +1 -1
- package/dist/cjs/product/settingssection/settingssection.recipe.js +6 -6
- package/dist/cjs/product/settingsshell/settingsshell.js +1 -1
- package/dist/cjs/product/settingsshell/settingsshell.recipe.js +20 -20
- package/dist/cjs/product/sidebar/sidebar.js +2 -2
- package/dist/cjs/product/sidebar/sidebar.recipe.js +21 -21
- package/dist/cjs/product/tasklist/tasklist.js +2 -2
- package/dist/cjs/product/tasklist/tasklist.recipe.js +14 -14
- package/dist/cjs/product/trialbanner/trialbanner.js +1 -1
- package/dist/cjs/product/trialbanner/trialbanner.recipe.js +6 -6
- package/dist/cjs/product/viewtoggle/viewtoggle.js +1 -1
- package/dist/cjs/product/viewtoggle/viewtoggle.recipe.js +4 -4
- package/dist/cjs/tokens/contract.js +3 -2
- package/dist/columncalc.css +19 -12
- package/dist/columncalc.layered.css +35 -0
- package/dist/command.css +28 -28
- package/dist/command.layered.css +44 -0
- package/dist/contextmenu.css +12 -12
- package/dist/contextmenu.layered.css +22 -0
- package/dist/datatable.css +66 -66
- package/dist/datatable.layered.css +108 -0
- package/dist/datepicker.css +86 -86
- package/dist/datepicker.layered.css +179 -0
- package/dist/datepickerfield.css +19 -19
- package/dist/datepickerfield.layered.css +29 -0
- package/dist/dialog.css +19 -19
- package/dist/dialog.layered.css +29 -0
- package/dist/divider.css +2 -2
- package/dist/divider.layered.css +7 -0
- package/dist/donutchart.css +15 -15
- package/dist/donutchart.layered.css +26 -0
- package/dist/drawer.css +17 -17
- package/dist/drawer.layered.css +27 -0
- package/dist/emptystate.css +15 -15
- package/dist/emptystate.layered.css +22 -0
- package/dist/entitycard.css +14 -14
- package/dist/entitycard.layered.css +28 -0
- package/dist/esm/components/accordion/accordion.js +1 -1
- package/dist/esm/components/accordion/accordion.recipe.js +10 -10
- package/dist/esm/components/badge/badge.js +1 -1
- package/dist/esm/components/badge/badge.recipe.js +1 -1
- package/dist/esm/components/barchart/barchart.js +3 -3
- package/dist/esm/components/barchart/barchart.recipe.js +14 -14
- package/dist/esm/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/esm/components/breadcrumb/breadcrumb.recipe.js +6 -6
- package/dist/esm/components/bulkbar/bulkbar.js +2 -2
- package/dist/esm/components/bulkbar/bulkbar.recipe.js +10 -10
- package/dist/esm/components/callout/callout.js +1 -1
- package/dist/esm/components/callout/callout.recipe.js +9 -9
- package/dist/esm/components/card/card.js +3 -3
- package/dist/esm/components/card/card.recipe.js +5 -5
- package/dist/esm/components/columncalc/columncalc.js +1 -1
- package/dist/esm/components/columncalc/columncalc.recipe.js +16 -9
- package/dist/esm/components/contextmenu/contextmenu.js +4 -4
- package/dist/esm/components/contextmenu/contextmenu.recipe.js +9 -9
- package/dist/esm/components/datatable/datatable.js +32 -22
- package/dist/esm/components/datatable/datatable.recipe.js +57 -57
- package/dist/esm/components/datepicker/datepicker.js +12 -12
- package/dist/esm/components/datepicker/datepicker.recipe.js +45 -45
- package/dist/esm/components/datepickerfield/datepickerfield.js +2 -2
- package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +9 -9
- package/dist/esm/components/dialog/dialog.js +5 -5
- package/dist/esm/components/dialog/dialog.recipe.js +16 -16
- package/dist/esm/components/donutchart/donutchart.js +1 -1
- package/dist/esm/components/donutchart/donutchart.recipe.js +12 -12
- package/dist/esm/components/drawer/drawer.js +3 -3
- package/dist/esm/components/drawer/drawer.recipe.js +14 -14
- package/dist/esm/components/emptystate/emptystate.js +1 -1
- package/dist/esm/components/emptystate/emptystate.recipe.js +9 -9
- package/dist/esm/components/fileupload/fileupload.js +3 -3
- package/dist/esm/components/fileupload/fileupload.recipe.js +23 -23
- package/dist/esm/components/formfield/formfield.js +1 -1
- package/dist/esm/components/formfield/formfield.recipe.js +5 -5
- package/dist/esm/components/input/input.js +1 -1
- package/dist/esm/components/input/input.recipe.js +6 -6
- package/dist/esm/components/linechart/linechart.js +4 -4
- package/dist/esm/components/linechart/linechart.recipe.js +14 -14
- package/dist/esm/components/menu/menu.js +6 -6
- package/dist/esm/components/menu/menu.recipe.js +19 -19
- package/dist/esm/components/multiselect/multiselect.js +5 -5
- package/dist/esm/components/multiselect/multiselect.recipe.js +29 -29
- package/dist/esm/components/popover/popover.js +1 -1
- package/dist/esm/components/popover/popover.recipe.js +3 -3
- package/dist/esm/components/progress/progress.js +2 -2
- package/dist/esm/components/progress/progress.recipe.js +3 -3
- package/dist/esm/components/quantitypicker/quantitypicker.js +2 -2
- package/dist/esm/components/quantitypicker/quantitypicker.recipe.js +16 -16
- package/dist/esm/components/radiogroup/radiogroup.js +1 -1
- package/dist/esm/components/radiogroup/radiogroup.recipe.js +14 -14
- package/dist/esm/components/resizablepanel/resizablepanel.js +3 -3
- package/dist/esm/components/resizablepanel/resizablepanel.recipe.js +24 -24
- package/dist/esm/components/segmented/segmented.js +4 -4
- package/dist/esm/components/segmented/segmented.recipe.js +7 -7
- package/dist/esm/components/select/select.js +3 -3
- package/dist/esm/components/select/select.recipe.js +25 -25
- package/dist/esm/components/slider/slider.js +2 -2
- package/dist/esm/components/slider/slider.recipe.js +15 -15
- package/dist/esm/components/stagebar/stagebar.js +1 -1
- package/dist/esm/components/stagebar/stagebar.recipe.js +1 -1
- package/dist/esm/components/statcard/statcard.js +1 -1
- package/dist/esm/components/statcard/statcard.recipe.js +9 -9
- package/dist/esm/components/switch/switch.js +1 -1
- package/dist/esm/components/switch/switch.recipe.js +2 -2
- package/dist/esm/components/table/table.js +1 -1
- package/dist/esm/components/table/table.recipe.js +1 -1
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +65 -64
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +13 -13
- package/dist/esm/components/tabs/tabs.js +4 -4
- package/dist/esm/components/tabs/tabs.recipe.js +12 -12
- package/dist/esm/components/textarea/textarea.js +2 -2
- package/dist/esm/components/textarea/textarea.recipe.js +11 -11
- package/dist/esm/components/toast/toast.js +4 -4
- package/dist/esm/components/toast/toast.recipe.js +14 -14
- package/dist/esm/components/wheelpicker/wheelpicker.js +2 -2
- package/dist/esm/components/wheelpicker/wheelpicker.recipe.js +19 -19
- package/dist/esm/core/namespace.js +14 -0
- package/dist/esm/core/resolve.js +5 -3
- package/dist/esm/product/appshell/appshell.js +2 -2
- package/dist/esm/product/appshell/appshell.recipe.js +8 -8
- package/dist/esm/product/authshell/authshell.js +1 -1
- package/dist/esm/product/authshell/authshell.recipe.js +20 -20
- package/dist/esm/product/board/board.js +3 -3
- package/dist/esm/product/board/board.recipe.js +17 -17
- package/dist/esm/product/command/command.js +3 -3
- package/dist/esm/product/command/command.recipe.js +25 -25
- package/dist/esm/product/entitycard/entitycard.js +1 -1
- package/dist/esm/product/entitycard/entitycard.recipe.js +7 -7
- package/dist/esm/product/flowcanvas/flowcanvas.js +5 -5
- package/dist/esm/product/flowcanvas/flowcanvas.recipe.js +11 -11
- package/dist/esm/product/inbox/inbox.js +1 -1
- package/dist/esm/product/inbox/inbox.recipe.js +22 -22
- package/dist/esm/product/listpage/listpage.js +3 -3
- package/dist/esm/product/listpage/listpage.recipe.js +18 -18
- package/dist/esm/product/navitem/navitem.js +1 -1
- package/dist/esm/product/navitem/navitem.recipe.js +2 -2
- package/dist/esm/product/onboarding/onboarding.js +1 -1
- package/dist/esm/product/onboarding/onboarding.recipe.js +19 -19
- package/dist/esm/product/recordpage/recordpage.js +24 -24
- package/dist/esm/product/recordpage/recordpage.recipe.js +117 -117
- package/dist/esm/product/recordpanel/recordpanel.js +4 -4
- package/dist/esm/product/recordpanel/recordpanel.recipe.js +15 -15
- package/dist/esm/product/recordstable/recordstable.js +48 -48
- package/dist/esm/product/recordstable/recordstable.recipe.js +87 -87
- package/dist/esm/product/recordstable/recordstable.tag.js +8 -8
- package/dist/esm/product/richtext/richtext.js +4 -4
- package/dist/esm/product/richtext/richtext.recipe.js +21 -21
- package/dist/esm/product/settingssection/settingssection.js +1 -1
- package/dist/esm/product/settingssection/settingssection.recipe.js +6 -6
- package/dist/esm/product/settingsshell/settingsshell.js +1 -1
- package/dist/esm/product/settingsshell/settingsshell.recipe.js +20 -20
- package/dist/esm/product/sidebar/sidebar.js +2 -2
- package/dist/esm/product/sidebar/sidebar.recipe.js +21 -21
- package/dist/esm/product/tasklist/tasklist.js +2 -2
- package/dist/esm/product/tasklist/tasklist.recipe.js +14 -14
- package/dist/esm/product/trialbanner/trialbanner.js +1 -1
- package/dist/esm/product/trialbanner/trialbanner.recipe.js +6 -6
- package/dist/esm/product/viewtoggle/viewtoggle.js +1 -1
- package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +4 -4
- package/dist/esm/tokens/contract.js +3 -2
- package/dist/fileupload.css +46 -46
- package/dist/fileupload.layered.css +91 -0
- package/dist/flowcanvas.css +13 -13
- package/dist/flowcanvas.layered.css +17 -0
- package/dist/formfield.css +7 -7
- package/dist/formfield.layered.css +10 -0
- package/dist/inbox.css +26 -26
- package/dist/inbox.layered.css +41 -0
- package/dist/input.css +17 -17
- package/dist/input.layered.css +45 -0
- package/dist/kbd.css +2 -2
- package/dist/kbd.layered.css +5 -0
- package/dist/linechart.css +14 -14
- package/dist/linechart.layered.css +17 -0
- package/dist/listpage.css +22 -22
- package/dist/listpage.layered.css +41 -0
- package/dist/menu.css +29 -29
- package/dist/menu.layered.css +48 -0
- package/dist/multiselect.css +42 -42
- package/dist/multiselect.layered.css +63 -0
- package/dist/navitem.css +14 -14
- package/dist/navitem.layered.css +25 -0
- package/dist/onboarding.css +24 -24
- package/dist/onboarding.layered.css +39 -0
- package/dist/popover.css +6 -6
- package/dist/popover.layered.css +16 -0
- package/dist/progress.css +7 -7
- package/dist/progress.layered.css +17 -0
- package/dist/quantitypicker.css +34 -34
- package/dist/quantitypicker.layered.css +80 -0
- package/dist/radiogroup.css +18 -18
- package/dist/radiogroup.layered.css +33 -0
- package/dist/recordpage.css +122 -122
- package/dist/recordpage.layered.css +153 -0
- package/dist/recordpanel.css +31 -31
- package/dist/recordpanel.layered.css +50 -0
- package/dist/recordstable.css +162 -162
- package/dist/recordstable.layered.css +222 -0
- package/dist/resizablepanel.css +26 -26
- package/dist/resizablepanel.layered.css +55 -0
- package/dist/richtext.css +24 -24
- package/dist/richtext.layered.css +38 -0
- package/dist/segmented.css +10 -10
- package/dist/segmented.layered.css +20 -0
- package/dist/select.css +43 -43
- package/dist/select.layered.css +72 -0
- package/dist/settingssection.css +8 -8
- package/dist/settingssection.layered.css +11 -0
- package/dist/settingsshell.css +23 -23
- package/dist/settingsshell.layered.css +44 -0
- package/dist/sidebar.css +27 -27
- package/dist/sidebar.layered.css +40 -0
- package/dist/skeleton.css +4 -4
- package/dist/skeleton.layered.css +15 -0
- package/dist/slider.css +23 -23
- package/dist/slider.layered.css +58 -0
- package/dist/spinner.css +3 -3
- package/dist/spinner.layered.css +14 -0
- package/dist/stagebar.css +4 -4
- package/dist/stagebar.layered.css +14 -0
- package/dist/statcard.css +14 -14
- package/dist/statcard.layered.css +21 -0
- package/dist/styles.css +1816 -1725
- package/dist/styles.layered.css +2932 -0
- package/dist/switch.css +7 -7
- package/dist/switch.layered.css +22 -0
- package/dist/table.css +16 -16
- package/dist/table.layered.css +36 -0
- package/dist/tabletoolbar.css +67 -67
- package/dist/tabletoolbar.layered.css +80 -0
- package/dist/tabs.css +15 -15
- package/dist/tabs.layered.css +29 -0
- package/dist/tasklist.css +17 -17
- package/dist/tasklist.layered.css +34 -0
- package/dist/textarea.css +18 -18
- package/dist/textarea.layered.css +42 -0
- package/dist/toast.css +17 -17
- package/dist/toast.layered.css +27 -0
- package/dist/tokens.css +199 -115
- package/dist/tooltip.css +3 -3
- package/dist/tooltip.layered.css +13 -0
- package/dist/trialbanner.css +13 -13
- package/dist/trialbanner.layered.css +28 -0
- package/dist/types/core/namespace.d.ts +2 -0
- package/dist/viewtoggle.css +10 -10
- package/dist/viewtoggle.layered.css +23 -0
- package/dist/wheelpicker.css +29 -29
- package/dist/wheelpicker.layered.css +70 -0
- package/licenses/Apache-2.0.txt +201 -0
- package/package.json +5 -2
|
@@ -19,135 +19,135 @@ const config = defineRecipe({
|
|
|
19
19
|
|
|
20
20
|
/* toolbar */
|
|
21
21
|
${toolbarChromeHead("recordstable")}
|
|
22
|
-
& .recordstable-ctx { z-index: 60; }
|
|
23
|
-
& .recordstable-th[data-drop] { box-shadow: inset 2px 0 0 ${c.bgBrandSolid}; }
|
|
24
|
-
& .recordstable-th-inner[draggable="true"]:active { cursor: grabbing; }
|
|
22
|
+
& .crisp-recordstable-ctx { z-index: 60; }
|
|
23
|
+
& .crisp-recordstable-th[data-drop] { box-shadow: inset 2px 0 0 ${c.bgBrandSolid}; }
|
|
24
|
+
& .crisp-recordstable-th-inner[draggable="true"]:active { cursor: grabbing; }
|
|
25
25
|
${toolbarChromeBody("recordstable")}
|
|
26
26
|
|
|
27
27
|
/* scroll frame + table */
|
|
28
|
-
& .recordstable-scroll { flex: 1; min-height: 0; overflow: auto; background: ${c.bgSurface}; border-top: 1px solid ${c.borderSubtle}; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, ${c.fgPrimary} 22%, transparent) transparent; }
|
|
29
|
-
& .recordstable-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
|
|
30
|
-
& .recordstable-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, ${c.fgPrimary} 20%, transparent); border-radius: ${c.radius.full}; border: 2px solid ${c.bgSurface}; background-clip: padding-box; }
|
|
31
|
-
& .recordstable-scroll::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, ${c.fgPrimary} 34%, transparent); background-clip: padding-box; }
|
|
32
|
-
& .recordstable-scroll::-webkit-scrollbar-corner { background: transparent; }
|
|
33
|
-
& .recordstable-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
|
|
34
|
-
& .recordstable-th, & .recordstable-td { position: relative; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border-bottom: 1px solid ${c.borderSubtle}; border-inline-end: 1px solid ${c.borderSubtle}; text-align: start; white-space: nowrap; overflow: hidden; }
|
|
35
|
-
& .recordstable-th { position: sticky; top: 0; z-index: 2; padding: 0; height: ${c.size.tableHeader}; background: ${c.bgSurface}; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; letter-spacing: -0.14px; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); user-select: none; }
|
|
36
|
-
& .recordstable-th-inner { display: flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["2"]}; border: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: start; cursor: pointer; }
|
|
37
|
-
& .recordstable-th-inner svg { flex-shrink: 0; color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); }
|
|
38
|
-
& .recordstable-th-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
|
|
39
|
-
& .recordstable-th-rename { width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0; border: none; outline: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; }
|
|
40
|
-
& .recordstable-th-rename:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
41
|
-
& .recordstable-sort { flex-shrink: 0; opacity: 0.4; transition: opacity .12s; color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); }
|
|
42
|
-
& .recordstable-th:hover .recordstable-sort, & .recordstable-th[data-sorted] .recordstable-sort { opacity: 1; }
|
|
43
|
-
& .recordstable-th[data-sorted="desc"] .recordstable-sort svg { transform: rotate(180deg); }
|
|
28
|
+
& .crisp-recordstable-scroll { flex: 1; min-height: 0; overflow: auto; background: ${c.bgSurface}; border-top: 1px solid ${c.borderSubtle}; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, ${c.fgPrimary} 22%, transparent) transparent; }
|
|
29
|
+
& .crisp-recordstable-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
|
|
30
|
+
& .crisp-recordstable-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, ${c.fgPrimary} 20%, transparent); border-radius: ${c.radius.full}; border: 2px solid ${c.bgSurface}; background-clip: padding-box; }
|
|
31
|
+
& .crisp-recordstable-scroll::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, ${c.fgPrimary} 34%, transparent); background-clip: padding-box; }
|
|
32
|
+
& .crisp-recordstable-scroll::-webkit-scrollbar-corner { background: transparent; }
|
|
33
|
+
& .crisp-recordstable-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
|
|
34
|
+
& .crisp-recordstable-th, & .crisp-recordstable-td { position: relative; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border-bottom: 1px solid ${c.borderSubtle}; border-inline-end: 1px solid ${c.borderSubtle}; text-align: start; white-space: nowrap; overflow: hidden; }
|
|
35
|
+
& .crisp-recordstable-th { position: sticky; top: 0; z-index: 2; padding: 0; height: ${c.size.tableHeader}; background: ${c.bgSurface}; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; letter-spacing: -0.14px; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); user-select: none; }
|
|
36
|
+
& .crisp-recordstable-th-inner { display: flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["2"]}; border: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: start; cursor: pointer; }
|
|
37
|
+
& .crisp-recordstable-th-inner svg { flex-shrink: 0; color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); }
|
|
38
|
+
& .crisp-recordstable-th-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
|
|
39
|
+
& .crisp-recordstable-th-rename { width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0; border: none; outline: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; }
|
|
40
|
+
& .crisp-recordstable-th-rename:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
41
|
+
& .crisp-recordstable-sort { flex-shrink: 0; opacity: 0.4; transition: opacity .12s; color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); }
|
|
42
|
+
& .crisp-recordstable-th:hover .crisp-recordstable-sort, & .crisp-recordstable-th[data-sorted] .crisp-recordstable-sort { opacity: 1; }
|
|
43
|
+
& .crisp-recordstable-th[data-sorted="desc"] .crisp-recordstable-sort svg { transform: rotate(180deg); }
|
|
44
44
|
|
|
45
45
|
/* column resize handle */
|
|
46
|
-
& .recordstable-resize { position: absolute; top: 0; inset-inline-end: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
|
|
47
|
-
& .recordstable-resize::after { content: ""; position: absolute; top: 0; inset-inline-start: 3px; width: 2px; height: 100%; background: ${c.bgBrandSolid}; opacity: 0; transition: opacity .12s; }
|
|
48
|
-
& .recordstable-resize:hover::after, & .recordstable-resize[data-resizing]::after { opacity: 1; }
|
|
46
|
+
& .crisp-recordstable-resize { position: absolute; top: 0; inset-inline-end: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
|
|
47
|
+
& .crisp-recordstable-resize::after { content: ""; position: absolute; top: 0; inset-inline-start: 3px; width: 2px; height: 100%; background: ${c.bgBrandSolid}; opacity: 0; transition: opacity .12s; }
|
|
48
|
+
& .crisp-recordstable-resize:hover::after, & .crisp-recordstable-resize[data-resizing]::after { opacity: 1; }
|
|
49
49
|
|
|
50
50
|
/* add-column header */
|
|
51
|
-
& .recordstable-addcol { min-width: 44px; }
|
|
52
|
-
& .recordstable-addcol button { display: flex; align-items: center; justify-content: center; width: 44px; height: 100%; border: none; background: none; color: ${c.fgMuted}; cursor: pointer; }
|
|
53
|
-
& .recordstable-addcol button:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
51
|
+
& .crisp-recordstable-addcol { min-width: 44px; }
|
|
52
|
+
& .crisp-recordstable-addcol button { display: flex; align-items: center; justify-content: center; width: 44px; height: 100%; border: none; background: none; color: ${c.fgMuted}; cursor: pointer; }
|
|
53
|
+
& .crisp-recordstable-addcol button:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
54
54
|
|
|
55
55
|
/* cells */
|
|
56
56
|
/* font-weight is explicit because the first cell of each row is a
|
|
57
57
|
th[scope=row] — the record's name is what the row IS — and a th
|
|
58
58
|
defaults to bold. Measured before the change and unchanged after: 400. */
|
|
59
|
-
& .recordstable-td { font-size: ${c.text.lg}; font-weight: ${c.weight.regular}; color: ${c.fgPrimary}; background: ${c.bgSurface}; cursor: default; }
|
|
60
|
-
& .recordstable-td--editable { cursor: text; }
|
|
59
|
+
& .crisp-recordstable-td { font-size: ${c.text.lg}; font-weight: ${c.weight.regular}; color: ${c.fgPrimary}; background: ${c.bgSurface}; cursor: default; }
|
|
60
|
+
& .crisp-recordstable-td--editable { cursor: text; }
|
|
61
61
|
/* keyboard/click cell selection (spreadsheet-style) */
|
|
62
|
-
& .recordstable-td[data-selected] { outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; border-radius: ${c.radius.sm}; z-index: 3; }
|
|
63
|
-
& .recordstable-scroll:focus { outline: none; }
|
|
62
|
+
& .crisp-recordstable-td[data-selected] { outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; border-radius: ${c.radius.sm}; z-index: 3; }
|
|
63
|
+
& .crisp-recordstable-scroll:focus { outline: none; }
|
|
64
64
|
/* picker cells (status / date / reference) host a ghost control edge-to-edge */
|
|
65
|
-
& .recordstable-td--picker { padding: 0; }
|
|
66
|
-
& .recordstable-td--picker .select-trigger, & .recordstable-td--picker .datepicker-trigger, & .recordstable-td--picker .multiselect-trigger { width: 100%; height: 100%; min-height: 0; border-radius: 0; box-shadow: none; padding: 0 ${c.space["2"]}; }
|
|
67
|
-
& .recordstable-td--picker .multiselect-trigger:hover { background: none; }
|
|
68
|
-
& .recordstable-td--picker .multiselect-trigger[data-open] { box-shadow: inset 0 0 0 1.5px ${c.bgBrandSolid}; }
|
|
65
|
+
& .crisp-recordstable-td--picker { padding: 0; }
|
|
66
|
+
& .crisp-recordstable-td--picker .crisp-select-trigger, & .crisp-recordstable-td--picker .crisp-datepicker-trigger, & .crisp-recordstable-td--picker .crisp-multiselect-trigger { width: 100%; height: 100%; min-height: 0; border-radius: 0; box-shadow: none; padding: 0 ${c.space["2"]}; }
|
|
67
|
+
& .crisp-recordstable-td--picker .crisp-multiselect-trigger:hover { background: none; }
|
|
68
|
+
& .crisp-recordstable-td--picker .crisp-multiselect-trigger[data-open] { box-shadow: inset 0 0 0 1.5px ${c.bgBrandSolid}; }
|
|
69
69
|
/* tag cell: one compact clipped line of full chips, no chevron (opens the picker on click) */
|
|
70
|
-
& .recordstable-td--picker .multiselect-chips { flex-wrap: nowrap; overflow: hidden; }
|
|
71
|
-
& .recordstable-td--picker .multiselect-chips .recordstable-tag { flex-shrink: 0; max-width: none; }
|
|
72
|
-
& .recordstable-td--picker .multiselect-chevron { display: none; }
|
|
73
|
-
& .recordstable-td--picker .multiselect-placeholder { color: ${c.fgMuted}; }
|
|
74
|
-
& .recordstable-status { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; }
|
|
75
|
-
& .recordstable-status-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: ${c.radius.full}; }
|
|
76
|
-
& .recordstable-cell { display: flex; align-items: center; gap: ${c.space["2"]}; height: 100%; min-width: 0; }
|
|
77
|
-
& .recordstable-cell--num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
|
|
78
|
-
& .recordstable-cell--tags { gap: ${c.space["1"]}; }
|
|
70
|
+
& .crisp-recordstable-td--picker .crisp-multiselect-chips { flex-wrap: nowrap; overflow: hidden; }
|
|
71
|
+
& .crisp-recordstable-td--picker .crisp-multiselect-chips .crisp-recordstable-tag { flex-shrink: 0; max-width: none; }
|
|
72
|
+
& .crisp-recordstable-td--picker .crisp-multiselect-chevron { display: none; }
|
|
73
|
+
& .crisp-recordstable-td--picker .crisp-multiselect-placeholder { color: ${c.fgMuted}; }
|
|
74
|
+
& .crisp-recordstable-status { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; }
|
|
75
|
+
& .crisp-recordstable-status-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: ${c.radius.full}; }
|
|
76
|
+
& .crisp-recordstable-cell { display: flex; align-items: center; gap: ${c.space["2"]}; height: 100%; min-width: 0; }
|
|
77
|
+
& .crisp-recordstable-cell--num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
|
|
78
|
+
& .crisp-recordstable-cell--tags { gap: ${c.space["1"]}; }
|
|
79
79
|
${recordTagCss}
|
|
80
|
-
& .recordstable-muted { color: ${c.fgMuted}; }
|
|
81
|
-
& .recordstable-entity { display: flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; text-decoration: none; }
|
|
82
|
-
& .recordstable-entity:hover .recordstable-entity-name { text-decoration: underline; }
|
|
83
|
-
& .recordstable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
84
|
-
& button.recordstable-entity-name--link { margin: 0; padding: 0; border: none; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-align: start; cursor: pointer; max-width: 100%; }
|
|
85
|
-
& .recordstable-fav { width: ${c.size.icon}; height: ${c.size.icon}; border-radius: ${c.radius.sm}; flex-shrink: 0; object-fit: cover; background: ${c.bgRaised}; }
|
|
86
|
-
& .recordstable-open { position: absolute; inset-inline-end: ${c.space["1"]}; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: none; border-radius: ${c.radius.sm}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderDefault}; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; opacity: 0; transition: opacity .12s, background-color .12s; z-index: 3; }
|
|
87
|
-
& .recordstable-open:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
88
|
-
& tbody tr:hover .recordstable-open { opacity: 1; }
|
|
89
|
-
& .recordstable-link { color: ${c.fgPrimary}; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
|
|
90
|
-
& .recordstable-link:hover { text-decoration: underline; }
|
|
80
|
+
& .crisp-recordstable-muted { color: ${c.fgMuted}; }
|
|
81
|
+
& .crisp-recordstable-entity { display: flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; text-decoration: none; }
|
|
82
|
+
& .crisp-recordstable-entity:hover .crisp-recordstable-entity-name { text-decoration: underline; }
|
|
83
|
+
& .crisp-recordstable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
84
|
+
& button.crisp-recordstable-entity-name--link { margin: 0; padding: 0; border: none; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-align: start; cursor: pointer; max-width: 100%; }
|
|
85
|
+
& .crisp-recordstable-fav { width: ${c.size.icon}; height: ${c.size.icon}; border-radius: ${c.radius.sm}; flex-shrink: 0; object-fit: cover; background: ${c.bgRaised}; }
|
|
86
|
+
& .crisp-recordstable-open { position: absolute; inset-inline-end: ${c.space["1"]}; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: none; border-radius: ${c.radius.sm}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderDefault}; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; opacity: 0; transition: opacity .12s, background-color .12s; z-index: 3; }
|
|
87
|
+
& .crisp-recordstable-open:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
88
|
+
& tbody tr:hover .crisp-recordstable-open { opacity: 1; }
|
|
89
|
+
& .crisp-recordstable-link { color: ${c.fgPrimary}; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
|
|
90
|
+
& .crisp-recordstable-link:hover { text-decoration: underline; }
|
|
91
91
|
|
|
92
92
|
/* inline edit input */
|
|
93
|
-
& .recordstable-edit { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["2"]}; border: none; outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; border-radius: ${c.radius.sm}; background: ${c.bgSurface}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; z-index: 5; }
|
|
94
|
-
& .recordstable-edit--num { text-align: end; font-variant-numeric: tabular-nums; }
|
|
93
|
+
& .crisp-recordstable-edit { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["2"]}; border: none; outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; border-radius: ${c.radius.sm}; background: ${c.bgSurface}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; z-index: 5; }
|
|
94
|
+
& .crisp-recordstable-edit--num { text-align: end; font-variant-numeric: tabular-nums; }
|
|
95
95
|
|
|
96
96
|
/* selection / hover / sticky */
|
|
97
|
-
& .recordstable-col-check { width: 40px; min-width: 40px; padding: 0; }
|
|
98
|
-
& .recordstable-check-inner { display: flex; align-items: center; justify-content: center; height: 100%; }
|
|
99
|
-
& .recordstable-col-check, & .recordstable-col-entity { position: sticky; z-index: 3; background: ${c.bgSurface}; }
|
|
97
|
+
& .crisp-recordstable-col-check { width: 40px; min-width: 40px; padding: 0; }
|
|
98
|
+
& .crisp-recordstable-check-inner { display: flex; align-items: center; justify-content: center; height: 100%; }
|
|
99
|
+
& .crisp-recordstable-col-check, & .crisp-recordstable-col-entity { position: sticky; z-index: 3; background: ${c.bgSurface}; }
|
|
100
100
|
/* The sticky pin is a LOGICAL offset: with physical \`left\` these columns
|
|
101
101
|
were not pinned at all under RTL -- scrolled, they left the viewport
|
|
102
102
|
entirely (measured: viewport 13..773, check column at x=1333). Nothing in
|
|
103
103
|
JS measures these, so converting them is safe; the two properties below
|
|
104
104
|
that have no logical form get an explicit RTL rule rather than being
|
|
105
105
|
left to point the wrong way. */
|
|
106
|
-
& .recordstable-col-check { inset-inline-start: 0; }
|
|
107
|
-
& .recordstable-col-entity { inset-inline-start: 40px; clip-path: inset(0 -38px 0 0); transition: box-shadow .2s ease; }
|
|
108
|
-
[dir="rtl"] & .recordstable-col-entity { clip-path: inset(0 0 0 -38px); }
|
|
109
|
-
& thead .recordstable-col-check, & thead .recordstable-col-entity { z-index: 4; }
|
|
106
|
+
& .crisp-recordstable-col-check { inset-inline-start: 0; }
|
|
107
|
+
& .crisp-recordstable-col-entity { inset-inline-start: 40px; clip-path: inset(0 -38px 0 0); transition: box-shadow .2s ease; }
|
|
108
|
+
[dir="rtl"] & .crisp-recordstable-col-entity { clip-path: inset(0 0 0 -38px); }
|
|
109
|
+
& thead .crisp-recordstable-col-check, & thead .crisp-recordstable-col-entity { z-index: 4; }
|
|
110
110
|
/* soft shadow on the sticky column edge once the grid is scrolled horizontally */
|
|
111
|
-
& .recordstable-scroll[data-scrolled] .recordstable-col-entity { box-shadow: 6px 0 16px 4px rgba(0,0,0,0.12); }
|
|
111
|
+
& .crisp-recordstable-scroll[data-scrolled] .crisp-recordstable-col-entity { box-shadow: 6px 0 16px 4px rgba(0,0,0,0.12); }
|
|
112
112
|
/* box-shadow has no logical form either: the bleed follows the scrolled
|
|
113
113
|
content, which is the opposite side under RTL. */
|
|
114
|
-
[dir="rtl"] & .recordstable-scroll[data-scrolled] .recordstable-col-entity { box-shadow: -6px 0 16px 4px rgba(0,0,0,0.12); }
|
|
114
|
+
[dir="rtl"] & .crisp-recordstable-scroll[data-scrolled] .crisp-recordstable-col-entity { box-shadow: -6px 0 16px 4px rgba(0,0,0,0.12); }
|
|
115
115
|
/* AI-enriched values carry a purple wash. Measured live:
|
|
116
116
|
a full-bleed overlay at #9b69ff 4% (== bgPurple), composited OVER
|
|
117
117
|
whatever row-state background the cell already has, which is why it
|
|
118
118
|
is an ::after and not a background. */
|
|
119
|
-
& .recordstable-td[data-enriched]::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: color-mix(in srgb, ${c.bgPurple} 4%, transparent); }
|
|
120
|
-
& tbody tr:hover .recordstable-td { background: color-mix(in srgb, ${c.fgPrimary} 4%, ${c.bgSurface}); }
|
|
121
|
-
& tbody tr[data-selected] .recordstable-td { background: color-mix(in srgb, ${c.bgBrandSolid} 10%, ${c.bgSurface}); }
|
|
122
|
-
& tbody tr[data-selected]:hover .recordstable-td { background: color-mix(in srgb, ${c.fgPrimary} 4%, color-mix(in srgb, ${c.bgBrandSolid} 10%, ${c.bgSurface})); }
|
|
123
|
-
& .recordstable-th:last-child, & .recordstable-td:last-child { border-inline-end: none; }
|
|
119
|
+
& .crisp-recordstable-td[data-enriched]::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: color-mix(in srgb, ${c.bgPurple} 4%, transparent); }
|
|
120
|
+
& tbody tr:hover .crisp-recordstable-td { background: color-mix(in srgb, ${c.fgPrimary} 4%, ${c.bgSurface}); }
|
|
121
|
+
& tbody tr[data-selected] .crisp-recordstable-td { background: color-mix(in srgb, ${c.bgBrandSolid} 10%, ${c.bgSurface}); }
|
|
122
|
+
& tbody tr[data-selected]:hover .crisp-recordstable-td { background: color-mix(in srgb, ${c.fgPrimary} 4%, color-mix(in srgb, ${c.bgBrandSolid} 10%, ${c.bgSurface})); }
|
|
123
|
+
& .crisp-recordstable-th:last-child, & .crisp-recordstable-td:last-child { border-inline-end: none; }
|
|
124
124
|
|
|
125
125
|
/* add-row footer */
|
|
126
|
-
& .recordstable-addrow { display: flex; align-items: center; gap: ${c.space["2"]}; width: 100%; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border: none; border-top: 1px solid ${c.borderSubtle}; background: ${c.bgSurface}; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.lg}; cursor: pointer; }
|
|
127
|
-
& .recordstable-addrow:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
126
|
+
& .crisp-recordstable-addrow { display: flex; align-items: center; gap: ${c.space["2"]}; width: 100%; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border: none; border-top: 1px solid ${c.borderSubtle}; background: ${c.bgSurface}; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.lg}; cursor: pointer; }
|
|
127
|
+
& .crisp-recordstable-addrow:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
128
128
|
/* zero-row empty state — centred in the body region (headers + summary stay) */
|
|
129
|
-
& .recordstable-empty { display: flex; align-items: center; justify-content: center; min-height: 320px; padding: ${c.space["8"]} ${c.space["4"]}; }
|
|
129
|
+
& .crisp-recordstable-empty { display: flex; align-items: center; justify-content: center; min-height: 320px; padding: ${c.space["8"]} ${c.space["4"]}; }
|
|
130
130
|
|
|
131
131
|
/* summary footer — per-column aggregation, sticky to the bottom */
|
|
132
|
-
& .recordstable-sum { position: sticky; bottom: 0; z-index: 2; height: ${c.size.tableRow}; padding: 0; border-top: 1px solid ${c.borderSubtle}; border-inline-end: 1px solid ${c.borderSubtle}; background: ${c.bgSurface}; }
|
|
133
|
-
& tfoot .recordstable-col-check, & tfoot .recordstable-col-entity { position: sticky; bottom: 0; z-index: 3; }
|
|
134
|
-
& .recordstable-sum:last-child { border-inline-end: none; }
|
|
135
|
-
& .recordstable-sum-btn { display: flex; align-items: center; justify-content: flex-end; gap: ${c.space["1.5"]}; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["3"]}; border: none; background: none; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; cursor: pointer; white-space: nowrap; overflow: hidden; }
|
|
136
|
-
& .recordstable-sum-btn:hover { background: ${c.bgRaised}; }
|
|
137
|
-
& .recordstable-sum-label { color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); text-transform: capitalize; }
|
|
138
|
-
& .recordstable-sum-value { color: ${c.fgPrimary}; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
|
|
139
|
-
& .recordstable-sumgroup { width: 100%; height: 100%; }
|
|
140
|
-
& .recordstable-pin { flex-shrink: 0; margin-inline-start: ${c.space["1"]}; color: ${c.bgWarning}; fill: color-mix(in srgb, ${c.bgWarning} 35%, transparent); }
|
|
141
|
-
& .recordstable-sum-btn[data-empty] { opacity: 0; justify-content: flex-start; }
|
|
142
|
-
& .recordstable-sum-btn[data-empty]:hover { opacity: 1; }
|
|
132
|
+
& .crisp-recordstable-sum { position: sticky; bottom: 0; z-index: 2; height: ${c.size.tableRow}; padding: 0; border-top: 1px solid ${c.borderSubtle}; border-inline-end: 1px solid ${c.borderSubtle}; background: ${c.bgSurface}; }
|
|
133
|
+
& tfoot .crisp-recordstable-col-check, & tfoot .crisp-recordstable-col-entity { position: sticky; bottom: 0; z-index: 3; }
|
|
134
|
+
& .crisp-recordstable-sum:last-child { border-inline-end: none; }
|
|
135
|
+
& .crisp-recordstable-sum-btn { display: flex; align-items: center; justify-content: flex-end; gap: ${c.space["1.5"]}; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["3"]}; border: none; background: none; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; cursor: pointer; white-space: nowrap; overflow: hidden; }
|
|
136
|
+
& .crisp-recordstable-sum-btn:hover { background: ${c.bgRaised}; }
|
|
137
|
+
& .crisp-recordstable-sum-label { color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); text-transform: capitalize; }
|
|
138
|
+
& .crisp-recordstable-sum-value { color: ${c.fgPrimary}; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
|
|
139
|
+
& .crisp-recordstable-sumgroup { width: 100%; height: 100%; }
|
|
140
|
+
& .crisp-recordstable-pin { flex-shrink: 0; margin-inline-start: ${c.space["1"]}; color: ${c.bgWarning}; fill: color-mix(in srgb, ${c.bgWarning} 35%, transparent); }
|
|
141
|
+
& .crisp-recordstable-sum-btn[data-empty] { opacity: 0; justify-content: flex-start; }
|
|
142
|
+
& .crisp-recordstable-sum-btn[data-empty]:hover { opacity: 1; }
|
|
143
143
|
|
|
144
144
|
/* bulk action bar lives in its own component now — see components/bulkbar */
|
|
145
|
-
& .recordstable-bulk-sep { width: 1px; height: 20px; margin: 0 ${c.space["0.5"]}; background: ${c.borderSubtle}; }
|
|
146
|
-
& .recordstable-bulk-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: none; border-radius: ${c.radius.md}; background: transparent; color: ${c.fgMuted}; cursor: pointer; }
|
|
147
|
-
& .recordstable-bulk-close:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
145
|
+
& .crisp-recordstable-bulk-sep { width: 1px; height: 20px; margin: 0 ${c.space["0.5"]}; background: ${c.borderSubtle}; }
|
|
146
|
+
& .crisp-recordstable-bulk-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: none; border-radius: ${c.radius.md}; background: transparent; color: ${c.fgMuted}; cursor: pointer; }
|
|
147
|
+
& .crisp-recordstable-bulk-close:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
148
148
|
|
|
149
149
|
/* announced, never drawn */
|
|
150
|
-
& .recordstable-live {
|
|
150
|
+
& .crisp-recordstable-live {
|
|
151
151
|
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
152
152
|
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
153
153
|
}
|
|
@@ -8,11 +8,11 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
8
8
|
* to be pasted into both recipes, and the two copies had already started to
|
|
9
9
|
* drift — adding the measured inset ring meant patching the same rules twice.
|
|
10
10
|
*/
|
|
11
|
-
export const recordTagCss = `& .recordstable-tag { display: inline-flex; align-items: center; height: ${c.size.chip}; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.chip}; font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium}; white-space: nowrap; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 82%, transparent); box-shadow: inset 0 0 0 1px ${c.borderSubtle}; }
|
|
12
|
-
& .recordstable-tag[data-tone="brand"] { background: color-mix(in srgb, ${c.bgBrandSolid} 14%, transparent); color: color-mix(in srgb, ${c.bgBrandSolid} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgBrandSolid} 30%, transparent); }
|
|
13
|
-
& .recordstable-tag[data-tone="success"] { background: color-mix(in srgb, ${c.bgSuccess} 16%, transparent); color: color-mix(in srgb, ${c.bgSuccess} 78%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgSuccess} 30%, transparent); }
|
|
14
|
-
& .recordstable-tag[data-tone="warning"] { background: color-mix(in srgb, ${c.bgWarning} 18%, transparent); color: color-mix(in srgb, ${c.bgWarning} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgWarning} 30%, transparent); }
|
|
15
|
-
& .recordstable-tag[data-tone="danger"] { background: color-mix(in srgb, ${c.bgDanger} 15%, transparent); color: color-mix(in srgb, ${c.bgDanger} 80%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgDanger} 30%, transparent); }
|
|
16
|
-
& .recordstable-tag[data-tone="purple"] { background: color-mix(in srgb, ${c.bgPurple} 16%, transparent); color: color-mix(in srgb, ${c.bgPurple} 80%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgPurple} 30%, transparent); }
|
|
17
|
-
& .recordstable-tag[data-tone="cyan"] { background: color-mix(in srgb, ${c.bgCyan} 18%, transparent); color: color-mix(in srgb, ${c.bgCyan} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgCyan} 30%, transparent); }
|
|
18
|
-
& .recordstable-tag[data-tone="orange"] { background: color-mix(in srgb, ${c.bgOrange} 16%, transparent); color: color-mix(in srgb, ${c.bgOrange} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgOrange} 30%, transparent); }`;
|
|
11
|
+
export const recordTagCss = `& .crisp-recordstable-tag { display: inline-flex; align-items: center; height: ${c.size.chip}; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.chip}; font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium}; white-space: nowrap; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 82%, transparent); box-shadow: inset 0 0 0 1px ${c.borderSubtle}; }
|
|
12
|
+
& .crisp-recordstable-tag[data-tone="brand"] { background: color-mix(in srgb, ${c.bgBrandSolid} 14%, transparent); color: color-mix(in srgb, ${c.bgBrandSolid} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgBrandSolid} 30%, transparent); }
|
|
13
|
+
& .crisp-recordstable-tag[data-tone="success"] { background: color-mix(in srgb, ${c.bgSuccess} 16%, transparent); color: color-mix(in srgb, ${c.bgSuccess} 78%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgSuccess} 30%, transparent); }
|
|
14
|
+
& .crisp-recordstable-tag[data-tone="warning"] { background: color-mix(in srgb, ${c.bgWarning} 18%, transparent); color: color-mix(in srgb, ${c.bgWarning} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgWarning} 30%, transparent); }
|
|
15
|
+
& .crisp-recordstable-tag[data-tone="danger"] { background: color-mix(in srgb, ${c.bgDanger} 15%, transparent); color: color-mix(in srgb, ${c.bgDanger} 80%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgDanger} 30%, transparent); }
|
|
16
|
+
& .crisp-recordstable-tag[data-tone="purple"] { background: color-mix(in srgb, ${c.bgPurple} 16%, transparent); color: color-mix(in srgb, ${c.bgPurple} 80%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgPurple} 30%, transparent); }
|
|
17
|
+
& .crisp-recordstable-tag[data-tone="cyan"] { background: color-mix(in srgb, ${c.bgCyan} 18%, transparent); color: color-mix(in srgb, ${c.bgCyan} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgCyan} 30%, transparent); }
|
|
18
|
+
& .crisp-recordstable-tag[data-tone="orange"] { background: color-mix(in srgb, ${c.bgOrange} 16%, transparent); color: color-mix(in srgb, ${c.bgOrange} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgOrange} 30%, transparent); }`;
|
|
@@ -104,14 +104,14 @@ export function RichTextEditor({ defaultTitle = "", defaultHtml = "", titlePlace
|
|
|
104
104
|
* announces an un-pressed toggle that can never be pressed, which tells a
|
|
105
105
|
* screen-reader user there is a state here that does not exist.
|
|
106
106
|
*/
|
|
107
|
-
const tool = (key, label, icon, onClick, toggles = true) => (_jsx("button", { type: "button", className: "rte-tool", "aria-label": label, "aria-pressed": toggles ? !!active[key] : undefined, "data-active": active[key] ? "" : undefined, onMouseDown: keepSel, onClick: onClick, children: icon }));
|
|
107
|
+
const tool = (key, label, icon, onClick, toggles = true) => (_jsx("button", { type: "button", className: "crisp-rte-tool", "aria-label": label, "aria-pressed": toggles ? !!active[key] : undefined, "data-active": active[key] ? "" : undefined, onMouseDown: keepSel, onClick: onClick, children: icon }));
|
|
108
108
|
const ic = { size: 15, strokeWidth: 2 };
|
|
109
|
-
return (_jsxs("div", { className: richtextRecipe({ className }), ...rest, children: [_jsx("div", { ref: titleRef, className: "rte-title", contentEditable: true, suppressContentEditableWarning: true, role: "textbox", tabIndex: 0, "aria-label": titleLabel, "data-placeholder": titlePlaceholder, onInput: () => {
|
|
109
|
+
return (_jsxs("div", { className: richtextRecipe({ className }), ...rest, children: [_jsx("div", { ref: titleRef, className: "crisp-rte-title", contentEditable: true, suppressContentEditableWarning: true, role: "textbox", tabIndex: 0, "aria-label": titleLabel, "data-placeholder": titlePlaceholder, onInput: () => {
|
|
110
110
|
syncEmpty(titleRef.current);
|
|
111
111
|
emit();
|
|
112
|
-
} }), _jsx("div", { ref: bodyRef, className: "rte-body", contentEditable: true, suppressContentEditableWarning: true, role: "textbox", tabIndex: 0, "aria-multiline": "true", "aria-label": bodyLabel, "data-placeholder": placeholder, onInput: () => {
|
|
112
|
+
} }), _jsx("div", { ref: bodyRef, className: "crisp-rte-body", contentEditable: true, suppressContentEditableWarning: true, role: "textbox", tabIndex: 0, "aria-multiline": "true", "aria-label": bodyLabel, "data-placeholder": placeholder, onInput: () => {
|
|
113
113
|
syncEmpty(bodyRef.current);
|
|
114
114
|
emit();
|
|
115
|
-
}, onMouseUp: updateBar, onKeyUp: updateBar }), bar && (_jsxs("div", { className: "rte-toolbar", style: { left: bar.x, top: bar.y }, children: [tool("bold", "Bold", _jsx(Bold, { ...ic }), () => run("bold")), tool("italic", "Italic", _jsx(Italic, { ...ic }), () => run("italic")), tool("underline", "Underline", _jsx(Underline, { ...ic }), () => run("underline")), tool("strikeThrough", "Strikethrough", _jsx(Strikethrough, { ...ic }), () => run("strikeThrough")), tool("link", "Link", _jsx(Link2, { ...ic }), addLink, false), _jsx("span", { className: "rte-tool-sep" }), tool("h1", "Heading 1", _jsx(Heading1, { ...ic }), () => toggleBlock("h1")), tool("h2", "Heading 2", _jsx(Heading2, { ...ic }), () => toggleBlock("h2")), tool("ul", "Bullet list", _jsx(List, { ...ic }), () => run("insertUnorderedList")), tool("ol", "Numbered list", _jsx(ListOrdered, { ...ic }), () => run("insertOrderedList")), tool("blockquote", "Quote", _jsx(Quote, { ...ic }), () => toggleBlock("blockquote"))] }))] }));
|
|
115
|
+
}, onMouseUp: updateBar, onKeyUp: updateBar }), bar && (_jsxs("div", { className: "crisp-rte-toolbar", style: { left: bar.x, top: bar.y }, children: [tool("bold", "Bold", _jsx(Bold, { ...ic }), () => run("bold")), tool("italic", "Italic", _jsx(Italic, { ...ic }), () => run("italic")), tool("underline", "Underline", _jsx(Underline, { ...ic }), () => run("underline")), tool("strikeThrough", "Strikethrough", _jsx(Strikethrough, { ...ic }), () => run("strikeThrough")), tool("link", "Link", _jsx(Link2, { ...ic }), addLink, false), _jsx("span", { className: "crisp-rte-tool-sep" }), tool("h1", "Heading 1", _jsx(Heading1, { ...ic }), () => toggleBlock("h1")), tool("h2", "Heading 2", _jsx(Heading2, { ...ic }), () => toggleBlock("h2")), tool("ul", "Bullet list", _jsx(List, { ...ic }), () => run("insertUnorderedList")), tool("ol", "Numbered list", _jsx(ListOrdered, { ...ic }), () => run("insertOrderedList")), tool("blockquote", "Quote", _jsx(Quote, { ...ic }), () => toggleBlock("blockquote"))] }))] }));
|
|
116
116
|
}
|
|
117
117
|
RichTextEditor.displayName = "RichTextEditor";
|
|
@@ -9,29 +9,29 @@ const config = defineRecipe({
|
|
|
9
9
|
base: `display: flex; flex-direction: column; box-sizing: border-box; font-family: ${c.font.sans}; color: ${c.fgPrimary};
|
|
10
10
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
11
11
|
|
|
12
|
-
& .rte-title { font-size: 32px; line-height: 36px; font-weight: ${c.weight.semibold}; letter-spacing: -0.6px; color: ${c.fgPrimary}; outline: none; }
|
|
13
|
-
& .rte-title[data-empty]::before { content: attr(data-placeholder); color: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); pointer-events: none; }
|
|
12
|
+
& .crisp-rte-title { font-size: 32px; line-height: 36px; font-weight: ${c.weight.semibold}; letter-spacing: -0.6px; color: ${c.fgPrimary}; outline: none; }
|
|
13
|
+
& .crisp-rte-title[data-empty]::before { content: attr(data-placeholder); color: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); pointer-events: none; }
|
|
14
14
|
|
|
15
|
-
& .rte-body { margin-top: ${c.space["3"]}; font-size: ${c.text.lg}; line-height: 20px; color: ${c.fgPrimary}; outline: none; }
|
|
16
|
-
& .rte-body[data-empty]::before { content: attr(data-placeholder); color: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); pointer-events: none; }
|
|
17
|
-
& .rte-body > * { margin: 0; }
|
|
18
|
-
& .rte-body > * + * { margin-top: ${c.space["2"]}; }
|
|
19
|
-
& .rte-body h1 { font-size: ${c.text.xl}; line-height: 28px; font-weight: ${c.weight.semibold}; letter-spacing: -0.3px; margin-top: ${c.space["4"]}; }
|
|
20
|
-
& .rte-body h2 { font-size: 17px; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.2px; margin-top: ${c.space["3"]}; }
|
|
21
|
-
& .rte-body h3 { font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.semibold}; margin-top: ${c.space["2.5"]}; }
|
|
22
|
-
& .rte-body ul, & .rte-body ol { padding-inline-start: ${c.space["5"]}; }
|
|
23
|
-
& .rte-body li { margin-top: ${c.space["1"]}; }
|
|
24
|
-
& .rte-body blockquote { padding-inline-start: ${c.space["3"]}; border-inline-start: 2px solid ${c.borderDefault}; color: ${c.fgMuted}; }
|
|
25
|
-
& .rte-body code { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: ${c.text.md}; padding: 1px ${c.space["1"]}; border-radius: ${c.radius.sm}; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); }
|
|
26
|
-
& .rte-body a { color: ${c.bgBrandSolid}; text-decoration: underline; text-underline-offset: 2px; }
|
|
27
|
-
& .rte-body strong { font-weight: ${c.weight.semibold}; }
|
|
15
|
+
& .crisp-rte-body { margin-top: ${c.space["3"]}; font-size: ${c.text.lg}; line-height: 20px; color: ${c.fgPrimary}; outline: none; }
|
|
16
|
+
& .crisp-rte-body[data-empty]::before { content: attr(data-placeholder); color: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); pointer-events: none; }
|
|
17
|
+
& .crisp-rte-body > * { margin: 0; }
|
|
18
|
+
& .crisp-rte-body > * + * { margin-top: ${c.space["2"]}; }
|
|
19
|
+
& .crisp-rte-body h1 { font-size: ${c.text.xl}; line-height: 28px; font-weight: ${c.weight.semibold}; letter-spacing: -0.3px; margin-top: ${c.space["4"]}; }
|
|
20
|
+
& .crisp-rte-body h2 { font-size: 17px; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.2px; margin-top: ${c.space["3"]}; }
|
|
21
|
+
& .crisp-rte-body h3 { font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.semibold}; margin-top: ${c.space["2.5"]}; }
|
|
22
|
+
& .crisp-rte-body ul, & .crisp-rte-body ol { padding-inline-start: ${c.space["5"]}; }
|
|
23
|
+
& .crisp-rte-body li { margin-top: ${c.space["1"]}; }
|
|
24
|
+
& .crisp-rte-body blockquote { padding-inline-start: ${c.space["3"]}; border-inline-start: 2px solid ${c.borderDefault}; color: ${c.fgMuted}; }
|
|
25
|
+
& .crisp-rte-body code { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: ${c.text.md}; padding: 1px ${c.space["1"]}; border-radius: ${c.radius.sm}; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); }
|
|
26
|
+
& .crisp-rte-body a { color: ${c.bgBrandSolid}; text-decoration: underline; text-underline-offset: 2px; }
|
|
27
|
+
& .crisp-rte-body strong { font-weight: ${c.weight.semibold}; }
|
|
28
28
|
|
|
29
|
-
& .rte-toolbar { position: fixed; z-index: 70; display: inline-flex; align-items: center; gap: 2px; padding: ${c.space["0.5"]}; border-radius: ${c.radius.md}; background: #20242c; box-shadow: 0 8px 28px -6px rgba(0,0,0,0.36), 0 2px 6px -2px rgba(0,0,0,0.24); transform: translate(-50%, -100%); opacity: 1; transition: opacity 0.1s ease; }
|
|
30
|
-
& .rte-toolbar { @starting-style { opacity: 0; } }
|
|
31
|
-
& .rte-tool { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; margin: 0; border: none; border-radius: ${c.radius.sm}; background: none; color: rgba(255,255,255,0.86); font-family: inherit; cursor: pointer; transition: background-color .1s; }
|
|
32
|
-
& .rte-tool:hover { background: rgba(255,255,255,0.12); color: #fff; }
|
|
33
|
-
& .rte-tool[data-active] { color: ${c.bgBrandSolid}; }
|
|
34
|
-
& .rte-tool-sep { width: 1px; height: 16px; margin: 0 2px; background: rgba(255,255,255,0.16); }`,
|
|
29
|
+
& .crisp-rte-toolbar { position: fixed; z-index: 70; display: inline-flex; align-items: center; gap: 2px; padding: ${c.space["0.5"]}; border-radius: ${c.radius.md}; background: #20242c; box-shadow: 0 8px 28px -6px rgba(0,0,0,0.36), 0 2px 6px -2px rgba(0,0,0,0.24); transform: translate(-50%, -100%); opacity: 1; transition: opacity 0.1s ease; }
|
|
30
|
+
& .crisp-rte-toolbar { @starting-style { opacity: 0; } }
|
|
31
|
+
& .crisp-rte-tool { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; margin: 0; border: none; border-radius: ${c.radius.sm}; background: none; color: rgba(255,255,255,0.86); font-family: inherit; cursor: pointer; transition: background-color .1s; }
|
|
32
|
+
& .crisp-rte-tool:hover { background: rgba(255,255,255,0.12); color: #fff; }
|
|
33
|
+
& .crisp-rte-tool[data-active] { color: ${c.bgBrandSolid}; }
|
|
34
|
+
& .crisp-rte-tool-sep { width: 1px; height: 16px; margin: 0 2px; background: rgba(255,255,255,0.16); }`,
|
|
35
35
|
variants: {},
|
|
36
36
|
defaultVariants: {},
|
|
37
37
|
compoundVariants: [],
|
|
@@ -6,6 +6,6 @@ import { settingssectionRecipe } from "./settingssection.recipe.js";
|
|
|
6
6
|
* FormField). Compose several inside a settings content pane.
|
|
7
7
|
*/
|
|
8
8
|
export function SettingsSection({ title, description, action, children, className, ...rest }) {
|
|
9
|
-
return (_jsxs("section", { className: settingssectionRecipe({ className }), ...rest, children: [_jsxs("div", { className: "settingssection-head", children: [_jsxs("div", { className: "settingssection-heading", children: [_jsx("div", { className: "settingssection-title", children: title }), description != null && (_jsx("div", { className: "settingssection-sub", children: description }))] }), action != null && (_jsx("div", { className: "settingssection-action", children: action }))] }), children != null && (_jsx("div", { className: "settingssection-body", children: children }))] }));
|
|
9
|
+
return (_jsxs("section", { className: settingssectionRecipe({ className }), ...rest, children: [_jsxs("div", { className: "crisp-settingssection-head", children: [_jsxs("div", { className: "crisp-settingssection-heading", children: [_jsx("div", { className: "crisp-settingssection-title", children: title }), description != null && (_jsx("div", { className: "crisp-settingssection-sub", children: description }))] }), action != null && (_jsx("div", { className: "crisp-settingssection-action", children: action }))] }), children != null && (_jsx("div", { className: "crisp-settingssection-body", children: children }))] }));
|
|
10
10
|
}
|
|
11
11
|
SettingsSection.displayName = "SettingsSection";
|
|
@@ -6,12 +6,12 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
6
6
|
const config = defineRecipe({
|
|
7
7
|
name: "settingssection",
|
|
8
8
|
base: `display: flex; flex-direction: column; box-sizing: border-box; font-family: ${c.font.sans};
|
|
9
|
-
& .settingssection-head { display: flex; align-items: flex-start; gap: ${c.space["2"]}; }
|
|
10
|
-
& .settingssection-heading { flex: 1; min-width: 0; }
|
|
11
|
-
& .settingssection-title { font-size: ${c.text.xl}; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.2px; color: ${c.fgPrimary}; }
|
|
12
|
-
& .settingssection-sub { margin-top: ${c.space["0.5"]}; font-size: ${c.text.md}; line-height: 18px; color: ${c.fgMuted}; }
|
|
13
|
-
& .settingssection-action { flex-shrink: 0; }
|
|
14
|
-
& .settingssection-body { display: flex; flex-direction: column; gap: ${c.space["4"]}; margin-top: ${c.space["3"]}; }`,
|
|
9
|
+
& .crisp-settingssection-head { display: flex; align-items: flex-start; gap: ${c.space["2"]}; }
|
|
10
|
+
& .crisp-settingssection-heading { flex: 1; min-width: 0; }
|
|
11
|
+
& .crisp-settingssection-title { font-size: ${c.text.xl}; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.2px; color: ${c.fgPrimary}; }
|
|
12
|
+
& .crisp-settingssection-sub { margin-top: ${c.space["0.5"]}; font-size: ${c.text.md}; line-height: 18px; color: ${c.fgMuted}; }
|
|
13
|
+
& .crisp-settingssection-action { flex-shrink: 0; }
|
|
14
|
+
& .crisp-settingssection-body { display: flex; flex-direction: column; gap: ${c.space["4"]}; margin-top: ${c.space["3"]}; }`,
|
|
15
15
|
variants: {},
|
|
16
16
|
defaultVariants: {},
|
|
17
17
|
compoundVariants: [],
|
|
@@ -18,6 +18,6 @@ export function SettingsShell({ title = "Settings", onBack, groups, activeItem,
|
|
|
18
18
|
}))
|
|
19
19
|
.filter((g) => g.items.length > 0)
|
|
20
20
|
: groups;
|
|
21
|
-
return (_jsxs("div", { className: settingsshellRecipe({ className }), ...rest, children: [_jsxs("nav", { className: "settingsshell-nav", "aria-label": navLabel, children: [_jsxs("button", { type: "button", className: "settingsshell-back", onClick: onBack, children: [_jsx(ChevronLeft, { "data-rtl-flip": "", size: 16, strokeWidth: 2 }), title] }), searchable && (_jsxs("div", { className: "settingsshell-search", children: [_jsx(Search, { size: 15, strokeWidth: 1.75 }), _jsx("input", { type: "text", placeholder: searchPlaceholder, "aria-label": searchPlaceholder, value: query, onChange: (e) => setQuery(e.target.value) })] })), _jsx("div", { className: "settingsshell-groups", children: filtered.length === 0 ? (_jsx("div", { className: "settingsshell-empty", children: emptyLabel })) : (filtered.map((g, gi) => (_jsxs("div", { className: "settingsshell-group", children: [g.label != null && (_jsx("div", { className: "settingsshell-group-label", children: g.label })), g.items.map((it) => (_jsxs("button", { type: "button", className: "settingsshell-item", "aria-current": it.id === activeItem ? "page" : undefined, "data-active": it.id === activeItem ? "" : undefined, onClick: () => onSelect(it.id), children: [it.icon, _jsx("span", { className: "settingsshell-item-label", children: it.label })] }, it.id)))] }, gi)))) })] }), _jsx("div", { className: "settingsshell-content", children: children })] }));
|
|
21
|
+
return (_jsxs("div", { className: settingsshellRecipe({ className }), ...rest, children: [_jsxs("nav", { className: "crisp-settingsshell-nav", "aria-label": navLabel, children: [_jsxs("button", { type: "button", className: "crisp-settingsshell-back", onClick: onBack, children: [_jsx(ChevronLeft, { "data-rtl-flip": "", size: 16, strokeWidth: 2 }), title] }), searchable && (_jsxs("div", { className: "crisp-settingsshell-search", children: [_jsx(Search, { size: 15, strokeWidth: 1.75 }), _jsx("input", { type: "text", placeholder: searchPlaceholder, "aria-label": searchPlaceholder, value: query, onChange: (e) => setQuery(e.target.value) })] })), _jsx("div", { className: "crisp-settingsshell-groups", children: filtered.length === 0 ? (_jsx("div", { className: "crisp-settingsshell-empty", children: emptyLabel })) : (filtered.map((g, gi) => (_jsxs("div", { className: "crisp-settingsshell-group", children: [g.label != null && (_jsx("div", { className: "crisp-settingsshell-group-label", children: g.label })), g.items.map((it) => (_jsxs("button", { type: "button", className: "crisp-settingsshell-item", "aria-current": it.id === activeItem ? "page" : undefined, "data-active": it.id === activeItem ? "" : undefined, onClick: () => onSelect(it.id), children: [it.icon, _jsx("span", { className: "crisp-settingsshell-item-label", children: it.label })] }, it.id)))] }, gi)))) })] }), _jsx("div", { className: "crisp-settingsshell-content", children: children })] }));
|
|
22
22
|
}
|
|
23
23
|
SettingsShell.displayName = "SettingsShell";
|
|
@@ -8,33 +8,33 @@ const config = defineRecipe({
|
|
|
8
8
|
base: `display: flex; min-height: 0; box-sizing: border-box; font-family: ${c.font.sans}; color: ${c.fgPrimary};
|
|
9
9
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
10
10
|
|
|
11
|
-
& .settingsshell-nav { display: flex; flex-direction: column; width: 256px; flex-shrink: 0; min-height: 0; padding: ${c.space["3"]}; border-inline-end: 1px solid ${c.borderSubtle}; }
|
|
12
|
-
& .settingsshell-back { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; height: 28px; padding: 0 ${c.space["1"]}; margin: 0 0 ${c.space["2"]}; border: none; background: none; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; cursor: pointer; border-radius: ${c.radius.md}; }
|
|
13
|
-
& .settingsshell-back svg { color: ${c.fgMuted}; }
|
|
14
|
-
& .settingsshell-back:hover svg { color: ${c.fgPrimary}; }
|
|
11
|
+
& .crisp-settingsshell-nav { display: flex; flex-direction: column; width: 256px; flex-shrink: 0; min-height: 0; padding: ${c.space["3"]}; border-inline-end: 1px solid ${c.borderSubtle}; }
|
|
12
|
+
& .crisp-settingsshell-back { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; height: 28px; padding: 0 ${c.space["1"]}; margin: 0 0 ${c.space["2"]}; border: none; background: none; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; cursor: pointer; border-radius: ${c.radius.md}; }
|
|
13
|
+
& .crisp-settingsshell-back svg { color: ${c.fgMuted}; }
|
|
14
|
+
& .crisp-settingsshell-back:hover svg { color: ${c.fgPrimary}; }
|
|
15
15
|
|
|
16
|
-
& .settingsshell-search { display: flex; align-items: center; gap: ${c.space["2"]}; height: 32px; margin-bottom: ${c.space["2"]}; padding: 0 ${c.space["2.5"]}; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderDefault}; color: ${c.fgMuted}; }
|
|
16
|
+
& .crisp-settingsshell-search { display: flex; align-items: center; gap: ${c.space["2"]}; height: 32px; margin-bottom: ${c.space["2"]}; padding: 0 ${c.space["2.5"]}; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderDefault}; color: ${c.fgMuted}; }
|
|
17
17
|
/* The field box owns the ring, so focus has to move it -- the inner
|
|
18
18
|
input kills its own outline. Measured live: a focused field's
|
|
19
19
|
input carries box-shadow: none while its wrapper carries
|
|
20
20
|
inset 0 0 0 1px #266df0. */
|
|
21
|
-
& .settingsshell-search:focus-within { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
22
|
-
& .settingsshell-search svg { flex-shrink: 0; }
|
|
23
|
-
& .settingsshell-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
|
|
24
|
-
& .settingsshell-search input::placeholder { color: ${c.fgMuted}; }
|
|
21
|
+
& .crisp-settingsshell-search:focus-within { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
22
|
+
& .crisp-settingsshell-search svg { flex-shrink: 0; }
|
|
23
|
+
& .crisp-settingsshell-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
|
|
24
|
+
& .crisp-settingsshell-search input::placeholder { color: ${c.fgMuted}; }
|
|
25
25
|
|
|
26
|
-
& .settingsshell-groups { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: ${c.space["2.5"]}; }
|
|
27
|
-
& .settingsshell-group { display: flex; flex-direction: column; gap: 1px; }
|
|
28
|
-
& .settingsshell-group-label { padding: ${c.space["1"]} ${c.space["2"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
29
|
-
& .settingsshell-item { display: flex; align-items: center; gap: ${c.space["2"]}; height: 30px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
30
|
-
& .settingsshell-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
31
|
-
& .settingsshell-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
32
|
-
& .settingsshell-item:hover { background: ${c.bgRaised}; }
|
|
33
|
-
& .settingsshell-item[data-active] { background: ${c.bgRaised}; font-weight: ${c.weight.medium}; }
|
|
34
|
-
& .settingsshell-item[data-active] svg { color: ${c.fgPrimary}; }
|
|
35
|
-
& .settingsshell-empty { padding: ${c.space["3"]} ${c.space["2"]}; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
26
|
+
& .crisp-settingsshell-groups { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: ${c.space["2.5"]}; }
|
|
27
|
+
& .crisp-settingsshell-group { display: flex; flex-direction: column; gap: 1px; }
|
|
28
|
+
& .crisp-settingsshell-group-label { padding: ${c.space["1"]} ${c.space["2"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
29
|
+
& .crisp-settingsshell-item { display: flex; align-items: center; gap: ${c.space["2"]}; height: 30px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
30
|
+
& .crisp-settingsshell-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
31
|
+
& .crisp-settingsshell-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
32
|
+
& .crisp-settingsshell-item:hover { background: ${c.bgRaised}; }
|
|
33
|
+
& .crisp-settingsshell-item[data-active] { background: ${c.bgRaised}; font-weight: ${c.weight.medium}; }
|
|
34
|
+
& .crisp-settingsshell-item[data-active] svg { color: ${c.fgPrimary}; }
|
|
35
|
+
& .crisp-settingsshell-empty { padding: ${c.space["3"]} ${c.space["2"]}; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
36
36
|
|
|
37
|
-
& .settingsshell-content { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: ${c.space["6"]} ${c.space["8"]}; }
|
|
37
|
+
& .crisp-settingsshell-content { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: ${c.space["6"]} ${c.space["8"]}; }
|
|
38
38
|
${rtlFlipCss}
|
|
39
39
|
`,
|
|
40
40
|
variants: {},
|
|
@@ -79,7 +79,7 @@ export const ATTIO_SIDEBAR_FOOTER = {
|
|
|
79
79
|
trialActionLabel: "Keep Pro",
|
|
80
80
|
};
|
|
81
81
|
function SectionHeader({ label, open, onToggle, }) {
|
|
82
|
-
return (_jsxs("button", { type: "button", className: "sidebar-section-header", "data-collapsed": open ? undefined : "", "aria-expanded": open, onClick: onToggle, children: [_jsx(IconChevronMini, {}), _jsx("span", { children: label })] }));
|
|
82
|
+
return (_jsxs("button", { type: "button", className: "crisp-sidebar-section-header", "data-collapsed": open ? undefined : "", "aria-expanded": open, onClick: onToggle, children: [_jsx(IconChevronMini, {}), _jsx("span", { children: label })] }));
|
|
83
83
|
}
|
|
84
84
|
export const Sidebar = React.forwardRef(({ className, asChild, onToggleCollapse, collapseLabel = "Collapse sidebar", inboxLabel = "Inbox", searchLabel = "Search", workspace = ATTIO_SIDEBAR_WORKSPACE, items = ATTIO_SIDEBAR_ITEMS, recordsSection = ATTIO_SIDEBAR_RECORDS_SECTION, listsSection = ATTIO_SIDEBAR_LISTS_SECTION, chatsSection = ATTIO_SIDEBAR_CHATS_SECTION, footer = ATTIO_SIDEBAR_FOOTER, ...props }, ref) => {
|
|
85
85
|
const [collapsedSections, setCollapsedSections] = React.useState(() => new Set());
|
|
@@ -107,6 +107,6 @@ export const Sidebar = React.forwardRef(({ className, asChild, onToggleCollapse,
|
|
|
107
107
|
return next;
|
|
108
108
|
});
|
|
109
109
|
}, []);
|
|
110
|
-
return (_jsxs(Primitive.div, { ref: ref, asChild: asChild, className: sidebarRecipe({ className }), ...props, children: [_jsxs("div", { className: "sidebar-ws", children: [_jsx(Avatar, { size: "lg", shape: "rounded", tone: workspace.avatarTone, children: workspace.avatarLabel }), _jsx("span", { className: "sidebar-ws-name", children: workspace.name }), _jsx(IconChevronDown, {}), _jsx(Button, { intent: "ghost", size: "sm", shape: "icon", className: "sidebar-ws-collapse", "aria-label": collapseLabel, onClick: onToggleCollapse, children: _jsx(IconCollapsePanel, {}) })] }), _jsxs("div", { className: "sidebar-searchrow", children: [_jsxs("button", { type: "button", className: "sidebar-search", onClick: () => setCommandOpen(true), children: [_jsx(IconSearch, {}), _jsx("span", { className: "sidebar-search-label", children: searchLabel }), _jsx("span", { className: "sidebar-search-kbd", children: "\u2318K" })] }), _jsx(Button, { intent: "neutral", size: "sm", shape: "icon", "aria-label": inboxLabel, children: _jsx(IconInbox, {}) })] }), _jsx("div", { className: "sidebar-divider" }), _jsx("div", { className: "sidebar-section", children: items.map(({ label, icon: ItemIcon, active, trailing }) => (_jsx(NavItem, { href: "#", active: active, icon: _jsx(ItemIcon, {}), trailing: trailing, children: label }, label))) }), _jsx(SectionHeader, { label: recordsSection.label, open: !collapsedSections.has("records"), onToggle: () => toggleSection("records") }), _jsx("div", { className: "sidebar-section", "data-collapsed": collapsedSections.has("records") ? "" : undefined, children: recordsSection.items.map(({ label, tone, glyph: Glyph }) => (_jsx(NavItem, { href: "#", icon: _jsx(Avatar, { size: "sm", shape: "rounded", tone: tone, children: _jsx(Glyph, {}) }), children: label }, label))) }), _jsx(SectionHeader, { label: listsSection.label, open: !collapsedSections.has("lists"), onToggle: () => toggleSection("lists") }), _jsx("div", { className: "sidebar-section", "data-collapsed": collapsedSections.has("lists") ? "" : undefined, children: _jsx("button", { type: "button", className: "sidebar-newlist", children: listsSection.newListLabel }) }), _jsx(SectionHeader, { label: chatsSection.label, open: !collapsedSections.has("chats"), onToggle: () => toggleSection("chats") }), _jsx("div", { className: "sidebar-section", "data-collapsed": collapsedSections.has("chats") ? "" : undefined, children: chatsSection.items.map(({ label, icon: ItemIcon }) => (_jsx(NavItem, { href: "#", icon: _jsx(ItemIcon, {}), children: label }, label))) }), _jsxs("div", { className: "sidebar-footer", children: [_jsx(Button, { intent: "neutral", size: "sm", className: "sidebar-pill", children: footer.gettingStartedLabel }), _jsx(NavItem, { href: "#", icon: _jsx(IconInvite, {}), children: footer.inviteLabel }), _jsx("div", { className: "sidebar-divider" }), _jsxs("div", { className: "sidebar-trial", children: [_jsx("span", { children: footer.trialText }), _jsx(Button, { intent: "neutral", size: "sm", children: footer.trialActionLabel })] })] }), _jsx(Command, { open: commandOpen, onOpenChange: setCommandOpen })] }));
|
|
110
|
+
return (_jsxs(Primitive.div, { ref: ref, asChild: asChild, className: sidebarRecipe({ className }), ...props, children: [_jsxs("div", { className: "crisp-sidebar-ws", children: [_jsx(Avatar, { size: "lg", shape: "rounded", tone: workspace.avatarTone, children: workspace.avatarLabel }), _jsx("span", { className: "crisp-sidebar-ws-name", children: workspace.name }), _jsx(IconChevronDown, {}), _jsx(Button, { intent: "ghost", size: "sm", shape: "icon", className: "crisp-sidebar-ws-collapse", "aria-label": collapseLabel, onClick: onToggleCollapse, children: _jsx(IconCollapsePanel, {}) })] }), _jsxs("div", { className: "crisp-sidebar-searchrow", children: [_jsxs("button", { type: "button", className: "crisp-sidebar-search", onClick: () => setCommandOpen(true), children: [_jsx(IconSearch, {}), _jsx("span", { className: "crisp-sidebar-search-label", children: searchLabel }), _jsx("span", { className: "crisp-sidebar-search-kbd", children: "\u2318K" })] }), _jsx(Button, { intent: "neutral", size: "sm", shape: "icon", "aria-label": inboxLabel, children: _jsx(IconInbox, {}) })] }), _jsx("div", { className: "crisp-sidebar-divider" }), _jsx("div", { className: "crisp-sidebar-section", children: items.map(({ label, icon: ItemIcon, active, trailing }) => (_jsx(NavItem, { href: "#", active: active, icon: _jsx(ItemIcon, {}), trailing: trailing, children: label }, label))) }), _jsx(SectionHeader, { label: recordsSection.label, open: !collapsedSections.has("records"), onToggle: () => toggleSection("records") }), _jsx("div", { className: "crisp-sidebar-section", "data-collapsed": collapsedSections.has("records") ? "" : undefined, children: recordsSection.items.map(({ label, tone, glyph: Glyph }) => (_jsx(NavItem, { href: "#", icon: _jsx(Avatar, { size: "sm", shape: "rounded", tone: tone, children: _jsx(Glyph, {}) }), children: label }, label))) }), _jsx(SectionHeader, { label: listsSection.label, open: !collapsedSections.has("lists"), onToggle: () => toggleSection("lists") }), _jsx("div", { className: "crisp-sidebar-section", "data-collapsed": collapsedSections.has("lists") ? "" : undefined, children: _jsx("button", { type: "button", className: "crisp-sidebar-newlist", children: listsSection.newListLabel }) }), _jsx(SectionHeader, { label: chatsSection.label, open: !collapsedSections.has("chats"), onToggle: () => toggleSection("chats") }), _jsx("div", { className: "crisp-sidebar-section", "data-collapsed": collapsedSections.has("chats") ? "" : undefined, children: chatsSection.items.map(({ label, icon: ItemIcon }) => (_jsx(NavItem, { href: "#", icon: _jsx(ItemIcon, {}), children: label }, label))) }), _jsxs("div", { className: "crisp-sidebar-footer", children: [_jsx(Button, { intent: "neutral", size: "sm", className: "crisp-sidebar-pill", children: footer.gettingStartedLabel }), _jsx(NavItem, { href: "#", icon: _jsx(IconInvite, {}), children: footer.inviteLabel }), _jsx("div", { className: "crisp-sidebar-divider" }), _jsxs("div", { className: "crisp-sidebar-trial", children: [_jsx("span", { children: footer.trialText }), _jsx(Button, { intent: "neutral", size: "sm", children: footer.trialActionLabel })] })] }), _jsx(Command, { open: commandOpen, onOpenChange: setCommandOpen })] }));
|
|
111
111
|
});
|
|
112
112
|
Sidebar.displayName = "Sidebar";
|
|
@@ -6,27 +6,27 @@ const config = defineRecipe({
|
|
|
6
6
|
; border-inline-end: 1px solid ${c.borderSubtle}
|
|
7
7
|
; padding: ${c.space["2"]}
|
|
8
8
|
; font-family: ${c.font.sans}
|
|
9
|
-
; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-y: auto; & .sidebar-section { display: flex; flex-direction: column; gap: ${c.space.px}; margin-top: ${c.space["2"]}; }
|
|
10
|
-
& .sidebar-section[data-collapsed] { display: none; }
|
|
11
|
-
& .sidebar-label { font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["0.5"]}; }
|
|
12
|
-
& .sidebar-section-header { display: flex; align-items: center; gap: ${c.space["1"]}; width: 100%; margin: 0; border: none; background: none; padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["0.5"]}; font-family: ${c.font.sans}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; cursor: pointer; }
|
|
13
|
-
& .sidebar-section-header svg { flex-shrink: 0; transition: transform .15s ease; }
|
|
14
|
-
& .sidebar-section-header[data-collapsed] svg { transform: rotate(-90deg); }
|
|
15
|
-
& .sidebar-ws { display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.header}; padding: 0 ${c.space["2"]}; border-radius: ${c.radius.lg}; cursor: pointer; transition: background-color 0.16s; }
|
|
16
|
-
& .sidebar-ws:hover { background: color-mix(in srgb, ${c.fgPrimary} 5%, transparent); }
|
|
17
|
-
& .sidebar-ws-name { font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
18
|
-
& .sidebar-ws-collapse { margin-inline-start: auto; }
|
|
19
|
-
& .sidebar-searchrow { display: flex; align-items: center; gap: ${c.space["1.5"]}; margin-top: ${c.space["2.5"]}; padding-inline-end: ${c.space["2"]}; }
|
|
20
|
-
& .sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: ${c.space["0.5"]}; }
|
|
21
|
-
& .sidebar-trial { display: flex; align-items: center; justify-content: space-between; gap: ${c.space["2"]}; padding: ${c.space["1.5"]} ${c.space["2"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
22
|
-
& .sidebar-search { box-sizing: border-box; flex: 1; min-width: 0; display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.row}; margin: 0; padding: 0 ${c.space["1"]} 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: ${e.field}; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.lg}; text-align: start; cursor: pointer; transition: background-color 0.14s; }
|
|
23
|
-
& .sidebar-search:hover { background: ${c.bgRaised}; }
|
|
24
|
-
& .sidebar-search-label { flex: 1; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; }
|
|
25
|
-
& .sidebar-search-kbd { margin-inline-start: auto; display: inline-flex; align-items: center; height: 18px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 8%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 50%, transparent); font-size: ${c.text.xs}; }
|
|
26
|
-
& .sidebar-pill { border-radius: ${c.radius.full}; align-self: center; width: auto; height: 32px; padding-inline: ${c.space["4"]}; }
|
|
27
|
-
& .sidebar-divider { height: 0; border: none; border-top: 1px solid ${c.borderSubtle}; margin: ${c.space["2"]} calc(-1 * ${c.space["2"]}) 0; }
|
|
28
|
-
& .sidebar-newlist { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; height: ${c.size.row}; border-radius: ${c.radius.md}; border: 1px dashed ${c.borderDefault}; background: transparent; color: ${c.fgMuted}; font-family: ${c.font.sans}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
|
|
29
|
-
& .sidebar-newlist:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
9
|
+
; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-y: auto; & .crisp-sidebar-section { display: flex; flex-direction: column; gap: ${c.space.px}; margin-top: ${c.space["2"]}; }
|
|
10
|
+
& .crisp-sidebar-section[data-collapsed] { display: none; }
|
|
11
|
+
& .crisp-sidebar-label { font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["0.5"]}; }
|
|
12
|
+
& .crisp-sidebar-section-header { display: flex; align-items: center; gap: ${c.space["1"]}; width: 100%; margin: 0; border: none; background: none; padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["0.5"]}; font-family: ${c.font.sans}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; cursor: pointer; }
|
|
13
|
+
& .crisp-sidebar-section-header svg { flex-shrink: 0; transition: transform .15s ease; }
|
|
14
|
+
& .crisp-sidebar-section-header[data-collapsed] svg { transform: rotate(-90deg); }
|
|
15
|
+
& .crisp-sidebar-ws { display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.header}; padding: 0 ${c.space["2"]}; border-radius: ${c.radius.lg}; cursor: pointer; transition: background-color 0.16s; }
|
|
16
|
+
& .crisp-sidebar-ws:hover { background: color-mix(in srgb, ${c.fgPrimary} 5%, transparent); }
|
|
17
|
+
& .crisp-sidebar-ws-name { font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
18
|
+
& .crisp-sidebar-ws-collapse { margin-inline-start: auto; }
|
|
19
|
+
& .crisp-sidebar-searchrow { display: flex; align-items: center; gap: ${c.space["1.5"]}; margin-top: ${c.space["2.5"]}; padding-inline-end: ${c.space["2"]}; }
|
|
20
|
+
& .crisp-sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: ${c.space["0.5"]}; }
|
|
21
|
+
& .crisp-sidebar-trial { display: flex; align-items: center; justify-content: space-between; gap: ${c.space["2"]}; padding: ${c.space["1.5"]} ${c.space["2"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
22
|
+
& .crisp-sidebar-search { box-sizing: border-box; flex: 1; min-width: 0; display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.row}; margin: 0; padding: 0 ${c.space["1"]} 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: ${e.field}; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.lg}; text-align: start; cursor: pointer; transition: background-color 0.14s; }
|
|
23
|
+
& .crisp-sidebar-search:hover { background: ${c.bgRaised}; }
|
|
24
|
+
& .crisp-sidebar-search-label { flex: 1; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; }
|
|
25
|
+
& .crisp-sidebar-search-kbd { margin-inline-start: auto; display: inline-flex; align-items: center; height: 18px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 8%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 50%, transparent); font-size: ${c.text.xs}; }
|
|
26
|
+
& .crisp-sidebar-pill { border-radius: ${c.radius.full}; align-self: center; width: auto; height: 32px; padding-inline: ${c.space["4"]}; }
|
|
27
|
+
& .crisp-sidebar-divider { height: 0; border: none; border-top: 1px solid ${c.borderSubtle}; margin: ${c.space["2"]} calc(-1 * ${c.space["2"]}) 0; }
|
|
28
|
+
& .crisp-sidebar-newlist { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; height: ${c.size.row}; border-radius: ${c.radius.md}; border: 1px dashed ${c.borderDefault}; background: transparent; color: ${c.fgMuted}; font-family: ${c.font.sans}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
|
|
29
|
+
& .crisp-sidebar-newlist:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
30
30
|
|
|
31
31
|
${rtlFlipCss}
|
|
32
32
|
`,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { tasklistRecipe } from "./tasklist.recipe.js";
|
|
3
3
|
function Row({ task, onToggle, completeLabel, incompleteLabel, }) {
|
|
4
|
-
return (_jsxs("div", { className: "tasklist-row", "data-done": task.done ? "" : undefined, children: [_jsx("input", { type: "checkbox", className: "tasklist-check", checked: !!task.done, "aria-label": task.done ? incompleteLabel : completeLabel, onChange: () => onToggle?.(task.id, !task.done) }), _jsx("span", { className: "tasklist-title", children: task.title }), (task.due != null || task.meta != null) && (_jsxs("span", { className: "tasklist-meta", children: [task.due != null && (_jsx("span", { className: "tasklist-due", "data-overdue": task.overdue ? "" : undefined, children: task.due })), task.meta] }))] }));
|
|
4
|
+
return (_jsxs("div", { className: "crisp-tasklist-row", "data-done": task.done ? "" : undefined, children: [_jsx("input", { type: "checkbox", className: "crisp-tasklist-check", checked: !!task.done, "aria-label": task.done ? incompleteLabel : completeLabel, onChange: () => onToggle?.(task.id, !task.done) }), _jsx("span", { className: "crisp-tasklist-title", children: task.title }), (task.due != null || task.meta != null) && (_jsxs("span", { className: "crisp-tasklist-meta", children: [task.due != null && (_jsx("span", { className: "crisp-tasklist-due", "data-overdue": task.overdue ? "" : undefined, children: task.due })), task.meta] }))] }));
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* A task list — measured from a tasks page. Optional group headers with a
|
|
@@ -11,6 +11,6 @@ function Row({ task, onToggle, completeLabel, incompleteLabel, }) {
|
|
|
11
11
|
export function TaskList({ tasks, groups, onToggle, emptyLabel = "No tasks", className, completeLabel = "Mark complete", incompleteLabel = "Mark incomplete", ...rest }) {
|
|
12
12
|
const resolved = groups ?? (tasks?.length ? [{ label: null, tasks }] : []);
|
|
13
13
|
const total = resolved.reduce((s, g) => s + g.tasks.length, 0);
|
|
14
|
-
return (_jsx("div", { className: tasklistRecipe({ className }), ...rest, children: total === 0 ? (_jsx("div", { className: "tasklist-empty", children: emptyLabel })) : (resolved.map((g, gi) => (_jsxs("div", { children: [g.label != null && (_jsxs("div", { className: "tasklist-group", children: [g.label, _jsx("span", { className: "tasklist-group-count", children: g.tasks.length })] })), g.tasks.map((t) => (_jsx(Row, { task: t, onToggle: onToggle, completeLabel: completeLabel, incompleteLabel: incompleteLabel }, t.id)))] }, gi)))) }));
|
|
14
|
+
return (_jsx("div", { className: tasklistRecipe({ className }), ...rest, children: total === 0 ? (_jsx("div", { className: "crisp-tasklist-empty", children: emptyLabel })) : (resolved.map((g, gi) => (_jsxs("div", { children: [g.label != null && (_jsxs("div", { className: "crisp-tasklist-group", children: [g.label, _jsx("span", { className: "crisp-tasklist-group-count", children: g.tasks.length })] })), g.tasks.map((t) => (_jsx(Row, { task: t, onToggle: onToggle, completeLabel: completeLabel, incompleteLabel: incompleteLabel }, t.id)))] }, gi)))) }));
|
|
15
15
|
}
|
|
16
16
|
TaskList.displayName = "TaskList";
|