@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
|
@@ -66,9 +66,9 @@ export function AppShell({ sidebar, children, width: widthProp, defaultWidth = 2
|
|
|
66
66
|
window.addEventListener("pointerup", onUp);
|
|
67
67
|
};
|
|
68
68
|
const toggleCollapse = () => setCollapsed(!collapsed);
|
|
69
|
-
return (_jsxs("div", { className: appshellRecipe({ className }), ...rest, children: [_jsxs("div", { className: "appshell-side", "data-collapsed": collapsed ? "" : undefined, style: {
|
|
69
|
+
return (_jsxs("div", { className: appshellRecipe({ className }), ...rest, children: [_jsxs("div", { className: "crisp-appshell-side", "data-collapsed": collapsed ? "" : undefined, style: {
|
|
70
70
|
width: collapsed ? 0 : width,
|
|
71
71
|
transition: dragging ? "none" : "width .14s ease",
|
|
72
|
-
}, children: [_jsx("div", { className: "appshell-side-inner", style: { width }, children: sidebar(toggleCollapse) }), !collapsed && (_jsx("div", { className: "appshell-resize", "data-dragging": dragging ? "" : undefined, "aria-hidden": "true", onPointerDown: startResize }))] }), _jsxs("div", { className: "appshell-main", children: [collapsed && (_jsx("button", { type: "button", className: "appshell-expand", "aria-label": expandLabel, onClick: () => setCollapsed(false), children: _jsx(PanelLeft, { "data-rtl-flip": "", size: 15, strokeWidth: 1.75 }) })), children] })] }));
|
|
72
|
+
}, children: [_jsx("div", { className: "crisp-appshell-side-inner", style: { width }, children: sidebar(toggleCollapse) }), !collapsed && (_jsx("div", { className: "crisp-appshell-resize", "data-dragging": dragging ? "" : undefined, "aria-hidden": "true", onPointerDown: startResize }))] }), _jsxs("div", { className: "crisp-appshell-main", children: [collapsed && (_jsx("button", { type: "button", className: "crisp-appshell-expand", "aria-label": expandLabel, onClick: () => setCollapsed(false), children: _jsx(PanelLeft, { "data-rtl-flip": "", size: 15, strokeWidth: 1.75 }) })), children] })] }));
|
|
73
73
|
}
|
|
74
74
|
AppShell.displayName = "AppShell";
|
|
@@ -7,14 +7,14 @@ const config = defineRecipe({
|
|
|
7
7
|
name: "appshell",
|
|
8
8
|
base: `
|
|
9
9
|
display: flex; height: 100%; width: 100%; overflow: hidden; background: ${c.bgSurface}; font-family: ${c.font.sans}; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
10
|
-
& .appshell-side { position: relative; flex-shrink: 0; overflow: hidden; }
|
|
11
|
-
& .appshell-side-inner { height: 100%; }
|
|
12
|
-
& .appshell-resize { position: absolute; top: 0; inset-inline-end: 0; width: 10px; height: 100%; cursor: col-resize; z-index: 5; touch-action: none; }
|
|
13
|
-
& .appshell-resize::after { content: ""; position: absolute; top: 0; inset-inline-end: 0; width: 1px; height: 100%; background: ${c.borderSubtle}; transition: background-color .16s, height .16s; }
|
|
14
|
-
& .appshell-resize:hover::after, & .appshell-resize[data-dragging]::after { width: 2px; background: ${c.bgBrandSolid}; }
|
|
15
|
-
& .appshell-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
|
|
16
|
-
& .appshell-expand { position: absolute; top: ${c.space["2"]}; inset-inline-start: ${c.space["2"]}; z-index: 6; display: inline-flex; align-items: center; justify-content: center; width: ${c.size.row}; height: ${c.size.row}; padding: 0; border: none; border-radius: ${c.radius.md}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}; background: ${c.bgSurface}; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; transition: background-color .12s; }
|
|
17
|
-
& .appshell-expand:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
10
|
+
& .crisp-appshell-side { position: relative; flex-shrink: 0; overflow: hidden; }
|
|
11
|
+
& .crisp-appshell-side-inner { height: 100%; }
|
|
12
|
+
& .crisp-appshell-resize { position: absolute; top: 0; inset-inline-end: 0; width: 10px; height: 100%; cursor: col-resize; z-index: 5; touch-action: none; }
|
|
13
|
+
& .crisp-appshell-resize::after { content: ""; position: absolute; top: 0; inset-inline-end: 0; width: 1px; height: 100%; background: ${c.borderSubtle}; transition: background-color .16s, height .16s; }
|
|
14
|
+
& .crisp-appshell-resize:hover::after, & .crisp-appshell-resize[data-dragging]::after { width: 2px; background: ${c.bgBrandSolid}; }
|
|
15
|
+
& .crisp-appshell-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
|
|
16
|
+
& .crisp-appshell-expand { position: absolute; top: ${c.space["2"]}; inset-inline-start: ${c.space["2"]}; z-index: 6; display: inline-flex; align-items: center; justify-content: center; width: ${c.size.row}; height: ${c.size.row}; padding: 0; border: none; border-radius: ${c.radius.md}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}; background: ${c.bgSurface}; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; transition: background-color .12s; }
|
|
17
|
+
& .crisp-appshell-expand:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
18
18
|
|
|
19
19
|
${rtlFlipCss}
|
|
20
20
|
`,
|
|
@@ -13,6 +13,6 @@ export function AuthShell({ progress, logo, title, children, preview, footer, cl
|
|
|
13
13
|
const pct = hasProgress
|
|
14
14
|
? Math.round(Math.max(0, Math.min(1, progress)) * 100)
|
|
15
15
|
: 0;
|
|
16
|
-
return (_jsxs("div", { className: authshellRecipe({ className }), ...rest, children: [hasProgress && (_jsx("div", { className: "authshell-progress", role: "progressbar", "aria-valuenow": pct, "aria-valuemin": 0, "aria-valuemax": 100, children: _jsx("div", { className: "authshell-progress-fill", style: { width: `${pct}%` } }) })), logo != null && _jsx("div", { className: "authshell-logo", children: logo }), _jsxs("div", { className: "authshell-card", children: [_jsx("div", { className: "authshell-pane", children: _jsxs("div", { className: "authshell-body", children: [title != null && _jsx("div", { className: "authshell-title", children: title }), _jsx("div", { className: "authshell-form", children: children })] }) }), preview != null && _jsx("div", { className: "authshell-preview", children: preview })] }), footer != null && _jsx("div", { className: "authshell-footer", children: footer })] }));
|
|
16
|
+
return (_jsxs("div", { className: authshellRecipe({ className }), ...rest, children: [hasProgress && (_jsx("div", { className: "crisp-authshell-progress", role: "progressbar", "aria-valuenow": pct, "aria-valuemin": 0, "aria-valuemax": 100, children: _jsx("div", { className: "crisp-authshell-progress-fill", style: { width: `${pct}%` } }) })), logo != null && _jsx("div", { className: "crisp-authshell-logo", children: logo }), _jsxs("div", { className: "crisp-authshell-card", children: [_jsx("div", { className: "crisp-authshell-pane", children: _jsxs("div", { className: "crisp-authshell-body", children: [title != null && (_jsx("div", { className: "crisp-authshell-title", children: title })), _jsx("div", { className: "crisp-authshell-form", children: children })] }) }), preview != null && (_jsx("div", { className: "crisp-authshell-preview", children: preview }))] }), footer != null && _jsx("div", { className: "crisp-authshell-footer", children: footer })] }));
|
|
17
17
|
}
|
|
18
18
|
AuthShell.displayName = "AuthShell";
|
|
@@ -13,40 +13,40 @@ const config = defineRecipe({
|
|
|
13
13
|
background: ${c.bgSurface}; font-family: ${c.font.sans}; font-size: ${c.text.lg}; line-height: 20px; color: ${c.fgPrimary};
|
|
14
14
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
15
15
|
|
|
16
|
-
& .authshell-progress { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: ${c.borderDefault}; }
|
|
17
|
-
& .authshell-progress-fill { height: 2px; background: ${c.fgPrimary}; border-radius: 4px; transition: width .2s; }
|
|
16
|
+
& .crisp-authshell-progress { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: ${c.borderDefault}; }
|
|
17
|
+
& .crisp-authshell-progress-fill { height: 2px; background: ${c.fgPrimary}; border-radius: 4px; transition: width .2s; }
|
|
18
18
|
|
|
19
|
-
& .authshell-logo { margin-top: ${c.space["8"]}; height: 24px; display: flex; align-items: center; }
|
|
19
|
+
& .crisp-authshell-logo { margin-top: ${c.space["8"]}; height: 24px; display: flex; align-items: center; }
|
|
20
20
|
|
|
21
|
-
& .authshell-card { margin-top: ${c.space["6"]}; display: flex; height: 692px; border-radius: 20px; border: 1px solid ${c.borderSubtle}; overflow: hidden; }
|
|
21
|
+
& .crisp-authshell-card { margin-top: ${c.space["6"]}; display: flex; height: 692px; border-radius: 20px; border: 1px solid ${c.borderSubtle}; overflow: hidden; }
|
|
22
22
|
|
|
23
|
-
& .authshell-pane { flex: 0 0 564px; padding: 72px; display: flex; flex-direction: column; box-sizing: border-box; }
|
|
23
|
+
& .crisp-authshell-pane { flex: 0 0 564px; padding: 72px; display: flex; flex-direction: column; box-sizing: border-box; }
|
|
24
24
|
|
|
25
|
-
& .authshell-preview { flex: 0 0 564px; padding: 96px 64px; background: ${c.bgSubtle}; border-inline-start: 1px solid color-mix(in srgb, ${c.fgPrimary} 5%, transparent); position: relative; overflow: hidden; box-sizing: border-box; }
|
|
26
|
-
& .authshell-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(color-mix(in srgb, ${c.bgSubtle} 0%, transparent) 0%, ${c.bgSubtle} 100%); pointer-events: none; }
|
|
25
|
+
& .crisp-authshell-preview { flex: 0 0 564px; padding: 96px 64px; background: ${c.bgSubtle}; border-inline-start: 1px solid color-mix(in srgb, ${c.fgPrimary} 5%, transparent); position: relative; overflow: hidden; box-sizing: border-box; }
|
|
26
|
+
& .crisp-authshell-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(color-mix(in srgb, ${c.bgSubtle} 0%, transparent) 0%, ${c.bgSubtle} 100%); pointer-events: none; }
|
|
27
27
|
|
|
28
|
-
& .authshell-body { width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: ${c.space["8"]}; align-items: center; }
|
|
28
|
+
& .crisp-authshell-body { width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: ${c.space["8"]}; align-items: center; }
|
|
29
29
|
|
|
30
|
-
& .authshell-title { font-size: 20px; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.4px; color: ${c.fgPrimary}; align-self: stretch; }
|
|
30
|
+
& .crisp-authshell-title { font-size: 20px; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.4px; color: ${c.fgPrimary}; align-self: stretch; }
|
|
31
31
|
|
|
32
|
-
& .authshell-form { align-self: stretch; display: flex; flex-direction: column; gap: 28px; }
|
|
32
|
+
& .crisp-authshell-form { align-self: stretch; display: flex; flex-direction: column; gap: 28px; }
|
|
33
33
|
|
|
34
|
-
& .authshell-footer { margin-top: ${c.space["6"]}; display: flex; align-items: center; gap: ${c.space["1"]}; font-size: ${c.text.sm}; line-height: 16px; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); }
|
|
35
|
-
& .authshell-footer a { color: inherit; font-weight: ${c.weight.medium}; text-decoration: underline; }
|
|
34
|
+
& .crisp-authshell-footer { margin-top: ${c.space["6"]}; display: flex; align-items: center; gap: ${c.space["1"]}; font-size: ${c.text.sm}; line-height: 16px; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); }
|
|
35
|
+
& .crisp-authshell-footer a { color: inherit; font-weight: ${c.weight.medium}; text-decoration: underline; }
|
|
36
36
|
|
|
37
37
|
/* Auth-surface control treatment: flatter than the in-app chrome — a plain
|
|
38
38
|
hairline ring instead of elevation.field's soft glow, and a 36px (not
|
|
39
|
-
40px) submit. Scoped to .authshell-body so a consumer keeps using
|
|
39
|
+
40px) submit. Scoped to .crisp-authshell-body so a consumer keeps using
|
|
40
40
|
crisp's Input / FormField / Button and gets the auth treatment for free. */
|
|
41
|
-
& .authshell-body .formfield-label { font-size: ${c.text.sm}; line-height: 16px; font-weight: ${c.weight.medium}; letter-spacing: -0.12px; color: color-mix(in srgb, ${c.fgPrimary} 50%, transparent); padding-inline-start: ${c.space["1"]}; }
|
|
42
|
-
& .authshell-body .formfield { gap: ${c.space["1"]}; }
|
|
43
|
-
& .authshell-body .input { height: 34px; padding-inline: ${c.space["2.5"]}; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 6%, transparent); font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; letter-spacing: -0.14px; transition: box-shadow .14s, background-color .14s; }
|
|
44
|
-
& .authshell-body .input:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
41
|
+
& .crisp-authshell-body .crisp-formfield-label { font-size: ${c.text.sm}; line-height: 16px; font-weight: ${c.weight.medium}; letter-spacing: -0.12px; color: color-mix(in srgb, ${c.fgPrimary} 50%, transparent); padding-inline-start: ${c.space["1"]}; }
|
|
42
|
+
& .crisp-authshell-body .crisp-formfield { gap: ${c.space["1"]}; }
|
|
43
|
+
& .crisp-authshell-body .crisp-input { height: 34px; padding-inline: ${c.space["2.5"]}; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 6%, transparent); font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; letter-spacing: -0.14px; transition: box-shadow .14s, background-color .14s; }
|
|
44
|
+
& .crisp-authshell-body .crisp-input:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
45
45
|
/* Same three-layer brand shadow as Button's primary intent, but the auth
|
|
46
46
|
button's inset ring is measured at rgba(0,0,0,0.06) — a hairline, not
|
|
47
47
|
the in-app button's rgba(255,255,255,0.07) highlight. */
|
|
48
|
-
& .authshell-body .button { height: 36px; padding-inline: ${c.space["3"]}; border-radius: 10px; }
|
|
49
|
-
& .authshell-body .button--intent_primary { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08); }
|
|
48
|
+
& .crisp-authshell-body .crisp-button { height: 36px; padding-inline: ${c.space["3"]}; border-radius: 10px; }
|
|
49
|
+
& .crisp-authshell-body .crisp-button--intent_primary { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08); }
|
|
50
50
|
|
|
51
51
|
/* The preview pane drops out in JS on narrow viewports (measured: two
|
|
52
52
|
panes at 1393px, one at 954px), so 1200px is a chosen threshold inside
|
|
@@ -55,7 +55,7 @@ const config = defineRecipe({
|
|
|
55
55
|
a viewport query would keep the 1130px card and overflow it. Asking the
|
|
56
56
|
shell's own width is what "there isn't room for the preview" means. */
|
|
57
57
|
container-type: inline-size;
|
|
58
|
-
@container (max-width: 1200px) { & .authshell-preview { display: none; } }`,
|
|
58
|
+
@container (max-width: 1200px) { & .crisp-authshell-preview { display: none; } }`,
|
|
59
59
|
variants: {},
|
|
60
60
|
defaultVariants: {},
|
|
61
61
|
compoundVariants: [],
|
|
@@ -50,7 +50,7 @@ export function Board({ columns, cards, onCardsChange, renderCard, onNewCard, ne
|
|
|
50
50
|
};
|
|
51
51
|
return (_jsxs("div", { ref: rootRef, className: boardRecipe({ className }), ...rest, children: [columns.map((col) => {
|
|
52
52
|
const colCards = cards.filter((c) => c.columnId === col.id);
|
|
53
|
-
return (_jsxs("div", { className: "board-col", "data-over": overCol === col.id ? "" : undefined, onDragOver: (e) => {
|
|
53
|
+
return (_jsxs("div", { className: "crisp-board-col", "data-over": overCol === col.id ? "" : undefined, onDragOver: (e) => {
|
|
54
54
|
if (!dragId)
|
|
55
55
|
return;
|
|
56
56
|
e.preventDefault();
|
|
@@ -65,7 +65,7 @@ export function Board({ columns, cards, onCardsChange, renderCard, onNewCard, ne
|
|
|
65
65
|
move(dragId, col.id);
|
|
66
66
|
setDragId(null);
|
|
67
67
|
setOverCol(null);
|
|
68
|
-
}, children: [_jsxs("div", { className: "board-col-header", children: [col.accent && (_jsx("span", { className: "board-col-dot", style: { background: col.accent } })), _jsx("span", { className: "board-col-title", children: col.title }), _jsx("span", { className: "board-col-count", children: colCards.length }), onNewCard && (_jsx("button", { type: "button", className: "board-col-add", "aria-label": `Add to ${col.title}`, onClick: () => onNewCard(col.id), children: "+" }))] }), _jsxs("div", { className: "board-col-body", role: "list", "aria-label": col.title, children: [onNewCard && (_jsxs("button", { type: "button", className: "board-newcard", onClick: () => onNewCard(col.id), children: ["+ ", newCardLabel] })), colCards.map((card) => (_jsx("div", { className: "board-card", role: "listitem",
|
|
68
|
+
}, children: [_jsxs("div", { className: "crisp-board-col-header", children: [col.accent && (_jsx("span", { className: "crisp-board-col-dot", style: { background: col.accent } })), _jsx("span", { className: "crisp-board-col-title", children: col.title }), _jsx("span", { className: "crisp-board-col-count", children: colCards.length }), onNewCard && (_jsx("button", { type: "button", className: "crisp-board-col-add", "aria-label": `Add to ${col.title}`, onClick: () => onNewCard(col.id), children: "+" }))] }), _jsxs("div", { className: "crisp-board-col-body", role: "list", "aria-label": col.title, children: [onNewCard && (_jsxs("button", { type: "button", className: "crisp-board-newcard", onClick: () => onNewCard(col.id), children: ["+ ", newCardLabel] })), colCards.map((card) => (_jsx("div", { className: "crisp-board-card", role: "listitem",
|
|
69
69
|
// biome-ignore lint/a11y/noNoninteractiveTabindex: the rule assumes a listitem cannot be operated. This one carries the board's only keyboard path to move a card, so it has to be reachable by Tab
|
|
70
70
|
tabIndex: 0, "aria-label": getCardLabel?.(card), "data-card-id": card.id, draggable: true, "data-dragging": dragId === card.id ? "" : undefined, onDragStart: () => setDragId(card.id), onDragEnd: () => {
|
|
71
71
|
setDragId(null);
|
|
@@ -84,6 +84,6 @@ export function Board({ columns, cards, onCardsChange, renderCard, onNewCard, ne
|
|
|
84
84
|
if (delta && moveByKey(card, delta))
|
|
85
85
|
e.preventDefault();
|
|
86
86
|
}, children: renderCard(card) }, card.id)))] })] }, col.id));
|
|
87
|
-
}), _jsx("div", { className: "board-live", role: "status", "aria-live": "polite", children: announcement })] }));
|
|
87
|
+
}), _jsx("div", { className: "crisp-board-live", role: "status", "aria-live": "polite", children: announcement })] }));
|
|
88
88
|
}
|
|
89
89
|
Board.displayName = "Board";
|
|
@@ -6,24 +6,24 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
6
6
|
const config = defineRecipe({
|
|
7
7
|
name: "board",
|
|
8
8
|
base: `display: flex; gap: ${c.space["3"]}; height: 100%; box-sizing: border-box; padding: ${c.space["3"]}; overflow-x: auto; align-items: flex-start; font-family: ${c.font.sans};
|
|
9
|
-
& .board-col { display: flex; flex-direction: column; width: 280px; flex-shrink: 0; max-height: 100%; box-sizing: border-box; }
|
|
10
|
-
& .board-col-header { display: flex; align-items: center; gap: ${c.space["2"]}; height: 36px; padding: 0 ${c.space["1"]}; flex-shrink: 0; }
|
|
11
|
-
& .board-col-dot { width: 9px; height: 9px; border-radius: ${c.radius.full}; flex-shrink: 0; }
|
|
12
|
-
& .board-col-title { font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
|
|
13
|
-
& .board-col-count { font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
14
|
-
& .board-col-add { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-inline-start: auto; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; }
|
|
15
|
-
& .board-col-add:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
|
|
16
|
-
& .board-col-body { display: flex; flex-direction: column; gap: ${c.space["2"]}; flex: 1; min-height: 48px; padding: ${c.space["1"]}; border-radius: ${c.radius.lg}; overflow-y: auto; transition: background 0.12s; }
|
|
17
|
-
& .board-col[data-over] .board-col-body { background: color-mix(in srgb, ${c.bgBrandSolid} 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgBrandSolid} 30%, transparent); }
|
|
18
|
-
& .board-newcard { display: flex; align-items: center; justify-content: center; gap: ${c.space["1.5"]}; height: 32px; flex-shrink: 0; border: none; border-radius: ${c.radius.md}; background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
|
|
19
|
-
& .board-newcard:hover { background: color-mix(in srgb, ${c.fgPrimary} 7%, transparent); color: ${c.fgPrimary}; }
|
|
20
|
-
& .board-card { display: flex; flex-direction: column; gap: ${c.space["2"]}; box-sizing: border-box; padding: ${c.space["2.5"]} ${c.space["3"]}; border-radius: ${c.radius.lg}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}, 0 1px 2px rgba(0,0,0,0.04); cursor: grab; }
|
|
21
|
-
& .board-card:active { cursor: grabbing; }
|
|
22
|
-
& .board-card[data-dragging] { opacity: 0.4; }
|
|
23
|
-
& .board-card:focus { outline: none; }
|
|
24
|
-
& .board-card:focus-visible { outline: 2px solid ${c.bgBrandSolid}; outline-offset: 1px; }
|
|
9
|
+
& .crisp-board-col { display: flex; flex-direction: column; width: 280px; flex-shrink: 0; max-height: 100%; box-sizing: border-box; }
|
|
10
|
+
& .crisp-board-col-header { display: flex; align-items: center; gap: ${c.space["2"]}; height: 36px; padding: 0 ${c.space["1"]}; flex-shrink: 0; }
|
|
11
|
+
& .crisp-board-col-dot { width: 9px; height: 9px; border-radius: ${c.radius.full}; flex-shrink: 0; }
|
|
12
|
+
& .crisp-board-col-title { font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
|
|
13
|
+
& .crisp-board-col-count { font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
14
|
+
& .crisp-board-col-add { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-inline-start: auto; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; }
|
|
15
|
+
& .crisp-board-col-add:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
|
|
16
|
+
& .crisp-board-col-body { display: flex; flex-direction: column; gap: ${c.space["2"]}; flex: 1; min-height: 48px; padding: ${c.space["1"]}; border-radius: ${c.radius.lg}; overflow-y: auto; transition: background 0.12s; }
|
|
17
|
+
& .crisp-board-col[data-over] .crisp-board-col-body { background: color-mix(in srgb, ${c.bgBrandSolid} 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgBrandSolid} 30%, transparent); }
|
|
18
|
+
& .crisp-board-newcard { display: flex; align-items: center; justify-content: center; gap: ${c.space["1.5"]}; height: 32px; flex-shrink: 0; border: none; border-radius: ${c.radius.md}; background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
|
|
19
|
+
& .crisp-board-newcard:hover { background: color-mix(in srgb, ${c.fgPrimary} 7%, transparent); color: ${c.fgPrimary}; }
|
|
20
|
+
& .crisp-board-card { display: flex; flex-direction: column; gap: ${c.space["2"]}; box-sizing: border-box; padding: ${c.space["2.5"]} ${c.space["3"]}; border-radius: ${c.radius.lg}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}, 0 1px 2px rgba(0,0,0,0.04); cursor: grab; }
|
|
21
|
+
& .crisp-board-card:active { cursor: grabbing; }
|
|
22
|
+
& .crisp-board-card[data-dragging] { opacity: 0.4; }
|
|
23
|
+
& .crisp-board-card:focus { outline: none; }
|
|
24
|
+
& .crisp-board-card:focus-visible { outline: 2px solid ${c.bgBrandSolid}; outline-offset: 1px; }
|
|
25
25
|
/* announced, never drawn */
|
|
26
|
-
& .board-live {
|
|
26
|
+
& .crisp-board-live {
|
|
27
27
|
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
28
28
|
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
29
29
|
}`,
|
|
@@ -220,9 +220,9 @@ export function Command({ open, onOpenChange, items = defaultCommandItems, place
|
|
|
220
220
|
};
|
|
221
221
|
if (!dlg.open)
|
|
222
222
|
return null;
|
|
223
|
-
return (_jsx(Portal, { children: _jsxs("div", { className: commandRecipe(), children: [_jsx("div", { ...dlg.getBackdropProps(), className: "command-backdrop" }), _jsx("div", { ...dlg.getPositionerProps(), className: "command-positioner", children: _jsx("div", { ...rest, ...withDescribedBy(dlg.getContentProps(), describedBy), className: cx("command-content", className), children: _jsxs("div", { className: "command-card", children: [_jsxs("div", { className: "command-control", children: [_jsx("label", { ...combo.getLabelProps(), className: "command-srlabel", children: ariaLabel }), _jsx(IconSearch, {}), _jsx("input", { ref: inputRef, ...combo.getInputProps(), className: "command-input", placeholder: placeholder })] }), _jsx("div", { ...combo.getContentProps(), className: "command-list", children: filteredItems.length === 0 ? (_jsx("div", { className: "command-empty", children: emptyLabel })) : (filteredItems.map((item, i) => {
|
|
223
|
+
return (_jsx(Portal, { children: _jsxs("div", { className: commandRecipe(), children: [_jsx("div", { ...dlg.getBackdropProps(), className: "crisp-command-backdrop" }), _jsx("div", { ...dlg.getPositionerProps(), className: "crisp-command-positioner", children: _jsx("div", { ...rest, ...withDescribedBy(dlg.getContentProps(), describedBy), className: cx("crisp-command-content", className), children: _jsxs("div", { className: "crisp-command-card", children: [_jsxs("div", { className: "crisp-command-control", children: [_jsx("label", { ...combo.getLabelProps(), className: "crisp-command-srlabel", children: ariaLabel }), _jsx(IconSearch, {}), _jsx("input", { ref: inputRef, ...combo.getInputProps(), className: "crisp-command-input", placeholder: placeholder })] }), _jsx("div", { ...combo.getContentProps(), className: "crisp-command-list", children: filteredItems.length === 0 ? (_jsx("div", { className: "crisp-command-empty", children: emptyLabel })) : (filteredItems.map((item, i) => {
|
|
224
224
|
const Icon = item.icon;
|
|
225
225
|
const showGroup = item.group && item.group !== filteredItems[i - 1]?.group;
|
|
226
|
-
return (_jsxs(React.Fragment, { children: [showGroup && (_jsx("div", { className: "command-group-label", "aria-hidden": "true", children: item.group })), _jsxs("div", { ...combo.getItemProps({ item }), className: "command-item", children: [_jsx(Icon, {}), _jsx("span", { className: "command-item-label", children: item.label }), item.shortcut && (_jsx("span", { className: "command-item-shortcut", children: item.shortcut.map((key) => (_jsx(Kbd, { children: key }, key))) }))] })] }, item.id));
|
|
227
|
-
})) }), _jsxs("div", { className: "command-footer", children: [_jsxs("span", { className: "command-footer-nav", children: [_jsx(Kbd, { children: "\u2191" }), _jsx(Kbd, { children: "\u2193" }), navigateLabel] }), _jsxs("button", { type: "button", className: "command-footer-action", disabled: !highlightedItem, onClick: () => runItem(highlightedItem), children: [_jsx("span", { className: "command-footer-action-label", children: highlightedItem?.label ?? selectLabel }), _jsx("span", { className: "command-footer-key", children: "\u21B5" })] })] })] }) }) })] }) }));
|
|
226
|
+
return (_jsxs(React.Fragment, { children: [showGroup && (_jsx("div", { className: "crisp-command-group-label", "aria-hidden": "true", children: item.group })), _jsxs("div", { ...combo.getItemProps({ item }), className: "crisp-command-item", children: [_jsx(Icon, {}), _jsx("span", { className: "crisp-command-item-label", children: item.label }), item.shortcut && (_jsx("span", { className: "crisp-command-item-shortcut", children: item.shortcut.map((key) => (_jsx(Kbd, { children: key }, key))) }))] })] }, item.id));
|
|
227
|
+
})) }), _jsxs("div", { className: "crisp-command-footer", children: [_jsxs("span", { className: "crisp-command-footer-nav", children: [_jsx(Kbd, { children: "\u2191" }), _jsx(Kbd, { children: "\u2193" }), navigateLabel] }), _jsxs("button", { type: "button", className: "crisp-command-footer-action", disabled: !highlightedItem, onClick: () => runItem(highlightedItem), children: [_jsx("span", { className: "crisp-command-footer-action-label", children: highlightedItem?.label ?? selectLabel }), _jsx("span", { className: "crisp-command-footer-key", children: "\u21B5" })] })] })] }) }) })] }) }));
|
|
228
228
|
}
|
|
@@ -3,36 +3,36 @@ import { contract as c, elevation as e } from "../../tokens/index.js";
|
|
|
3
3
|
const config = defineRecipe({
|
|
4
4
|
name: "command",
|
|
5
5
|
base: `display: contents; font-family: ${c.font.sans}
|
|
6
|
-
; & .command-content, & .command-card { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
|
7
|
-
& .command-backdrop { position: fixed; inset: 0; z-index: 50; background: transparent; }
|
|
8
|
-
& .command-positioner { position: fixed; inset: 0; z-index: 51; display: flex; align-items: flex-start; justify-content: center; padding: 15vh ${c.space["4"]} ${c.space["4"]}; }
|
|
9
|
-
& .command-content { position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 90vw; max-width: 748px; max-height: 70vh; padding: ${c.space["1"]}; border-radius: ${c.radius["2xl"]}; background: color-mix(in srgb, ${c.bgOverlayFrost} 60%, transparent); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); box-shadow: ${e.modal}; opacity: 1; transform: scale(1); transition: opacity 0.2s ease, transform 0.2s ease; @starting-style { opacity: 0; transform: scale(0.97); } }
|
|
10
|
-
& .command-card { display: flex; flex-direction: column; flex: 1; min-height: 0; box-sizing: border-box; border-radius: ${c.radius.xl}; background: ${c.bgSurface}; box-shadow: 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 8%, transparent); overflow: hidden; }
|
|
11
|
-
& .command-control { display: flex; align-items: center; gap: ${c.space["2.5"]}; height: 52px; flex-shrink: 0; padding: 0 ${c.space["4"]}; border-bottom: 1px solid ${c.borderSubtle}; color: ${c.fgMuted}; }
|
|
12
|
-
& .command-control svg { flex-shrink: 0; }
|
|
6
|
+
; & .crisp-command-content, & .crisp-command-card { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
|
7
|
+
& .crisp-command-backdrop { position: fixed; inset: 0; z-index: 50; background: transparent; }
|
|
8
|
+
& .crisp-command-positioner { position: fixed; inset: 0; z-index: 51; display: flex; align-items: flex-start; justify-content: center; padding: 15vh ${c.space["4"]} ${c.space["4"]}; }
|
|
9
|
+
& .crisp-command-content { position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 90vw; max-width: 748px; max-height: 70vh; padding: ${c.space["1"]}; border-radius: ${c.radius["2xl"]}; background: color-mix(in srgb, ${c.bgOverlayFrost} 60%, transparent); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); box-shadow: ${e.modal}; opacity: 1; transform: scale(1); transition: opacity 0.2s ease, transform 0.2s ease; @starting-style { opacity: 0; transform: scale(0.97); } }
|
|
10
|
+
& .crisp-command-card { display: flex; flex-direction: column; flex: 1; min-height: 0; box-sizing: border-box; border-radius: ${c.radius.xl}; background: ${c.bgSurface}; box-shadow: 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 8%, transparent); overflow: hidden; }
|
|
11
|
+
& .crisp-command-control { display: flex; align-items: center; gap: ${c.space["2.5"]}; height: 52px; flex-shrink: 0; padding: 0 ${c.space["4"]}; border-bottom: 1px solid ${c.borderSubtle}; color: ${c.fgMuted}; }
|
|
12
|
+
& .crisp-command-control svg { flex-shrink: 0; }
|
|
13
13
|
/* The palette's label element. It exists for the assistive tree only: zag's
|
|
14
14
|
combobox names the input through it and points the listbox's
|
|
15
15
|
aria-labelledby at it, and without it both were unnamed and the reference
|
|
16
16
|
resolved to nothing (#225). Clipped rather than display:none, which would
|
|
17
17
|
take it out of the tree it exists for. */
|
|
18
|
-
& .command-srlabel { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
19
|
-
& .command-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: ${c.font.sans}; font-size: ${c.text.xl}; color: ${c.fgPrimary}; }
|
|
20
|
-
& .command-input::placeholder { color: ${c.fgMuted}; }
|
|
21
|
-
& .command-list { flex: 1; min-height: 0; overflow-y: auto; padding: ${c.space["1"]} ${c.space["2.5"]}; display: flex; flex-direction: column; gap: ${c.space.px}; }
|
|
22
|
-
& .command-empty { padding: ${c.space["8"]} ${c.space["3"]}; text-align: center; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
23
|
-
& .command-item { box-sizing: border-box; display: flex; align-items: center; gap: ${c.space["2"]}; height: 36px; padding-inline: ${c.space["2.5"]}; border-radius: ${c.radius.xl}; font-size: ${c.text.lg}; color: ${c.fgPrimary}; cursor: pointer; }
|
|
24
|
-
& .command-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
25
|
-
& .command-item[data-highlighted] { background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); }
|
|
26
|
-
& .command-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
27
|
-
& .command-item-shortcut { margin-inline-start: auto; flex-shrink: 0; display: flex; align-items: center; gap: ${c.space["0.5"]}; }
|
|
28
|
-
& .command-group-label { padding: ${c.space["2"]} ${c.space["2.5"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); }
|
|
29
|
-
& .command-list > .command-group-label:first-child { padding-top: ${c.space["1"]}; }
|
|
30
|
-
& .command-footer { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; height: 44px; padding: 0 ${c.space["2.5"]}; border-top: 1px solid ${c.borderSubtle}; }
|
|
31
|
-
& .command-footer-nav { display: flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
32
|
-
& .command-footer-action { display: flex; align-items: center; gap: ${c.space["2"]}; height: 28px; max-width: 60%; padding: 0 ${c.space["1"]} 0 ${c.space["2.5"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgBrandSolid}; color: ${c.fgOnBrand}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
|
|
33
|
-
& .command-footer-action:disabled { opacity: 0.5; cursor: default; }
|
|
34
|
-
& .command-footer-action-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
35
|
-
& .command-footer-key { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; background: rgba(255,255,255,0.22); font-size: ${c.text.xs}; }
|
|
18
|
+
& .crisp-command-srlabel { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
19
|
+
& .crisp-command-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: ${c.font.sans}; font-size: ${c.text.xl}; color: ${c.fgPrimary}; }
|
|
20
|
+
& .crisp-command-input::placeholder { color: ${c.fgMuted}; }
|
|
21
|
+
& .crisp-command-list { flex: 1; min-height: 0; overflow-y: auto; padding: ${c.space["1"]} ${c.space["2.5"]}; display: flex; flex-direction: column; gap: ${c.space.px}; }
|
|
22
|
+
& .crisp-command-empty { padding: ${c.space["8"]} ${c.space["3"]}; text-align: center; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
23
|
+
& .crisp-command-item { box-sizing: border-box; display: flex; align-items: center; gap: ${c.space["2"]}; height: 36px; padding-inline: ${c.space["2.5"]}; border-radius: ${c.radius.xl}; font-size: ${c.text.lg}; color: ${c.fgPrimary}; cursor: pointer; }
|
|
24
|
+
& .crisp-command-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
25
|
+
& .crisp-command-item[data-highlighted] { background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); }
|
|
26
|
+
& .crisp-command-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
27
|
+
& .crisp-command-item-shortcut { margin-inline-start: auto; flex-shrink: 0; display: flex; align-items: center; gap: ${c.space["0.5"]}; }
|
|
28
|
+
& .crisp-command-group-label { padding: ${c.space["2"]} ${c.space["2.5"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); }
|
|
29
|
+
& .crisp-command-list > .crisp-command-group-label:first-child { padding-top: ${c.space["1"]}; }
|
|
30
|
+
& .crisp-command-footer { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; height: 44px; padding: 0 ${c.space["2.5"]}; border-top: 1px solid ${c.borderSubtle}; }
|
|
31
|
+
& .crisp-command-footer-nav { display: flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
32
|
+
& .crisp-command-footer-action { display: flex; align-items: center; gap: ${c.space["2"]}; height: 28px; max-width: 60%; padding: 0 ${c.space["1"]} 0 ${c.space["2.5"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgBrandSolid}; color: ${c.fgOnBrand}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
|
|
33
|
+
& .crisp-command-footer-action:disabled { opacity: 0.5; cursor: default; }
|
|
34
|
+
& .crisp-command-footer-action-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
35
|
+
& .crisp-command-footer-key { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; background: rgba(255,255,255,0.22); font-size: ${c.text.xs}; }
|
|
36
36
|
`,
|
|
37
37
|
variants: {},
|
|
38
38
|
defaultVariants: {},
|
|
@@ -6,6 +6,6 @@ import { entitycardRecipe } from "./entitycard.recipe.js";
|
|
|
6
6
|
* right-aligned date. Rendered as a button so the whole card is clickable.
|
|
7
7
|
*/
|
|
8
8
|
export function EntityCard({ author, title, excerpt, footer, date, onClick, "aria-label": ariaLabel, className, ...rest }) {
|
|
9
|
-
return (_jsxs("button", { type: "button", className: entitycardRecipe({ className }), ...rest, onClick: onClick, "aria-label": ariaLabel, children: [author != null && _jsx("span", { className: "entitycard-author", children: author }), _jsx("span", { className: "entitycard-title", children: title }), excerpt != null && _jsx("span", { className: "entitycard-excerpt", children: excerpt }), _jsx("span", { className: "entitycard-spacer" }), (footer != null || date != null) && (_jsxs("span", { className: "entitycard-foot", children: [footer, date != null && _jsx("span", { className: "entitycard-date", children: date })] }))] }));
|
|
9
|
+
return (_jsxs("button", { type: "button", className: entitycardRecipe({ className }), ...rest, onClick: onClick, "aria-label": ariaLabel, children: [author != null && (_jsx("span", { className: "crisp-entitycard-author", children: author })), _jsx("span", { className: "crisp-entitycard-title", children: title }), excerpt != null && (_jsx("span", { className: "crisp-entitycard-excerpt", children: excerpt })), _jsx("span", { className: "crisp-entitycard-spacer" }), (footer != null || date != null) && (_jsxs("span", { className: "crisp-entitycard-foot", children: [footer, date != null && (_jsx("span", { className: "crisp-entitycard-date", children: date }))] }))] }));
|
|
10
10
|
}
|
|
11
11
|
EntityCard.displayName = "EntityCard";
|
|
@@ -14,13 +14,13 @@ const config = defineRecipe({
|
|
|
14
14
|
&:hover { box-shadow: inset 0 0 0 1px ${c.borderDefault}, 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
|
|
15
15
|
&:focus-visible { outline: 2px solid ${c.bgBrandSolid}; outline-offset: 2px; }
|
|
16
16
|
|
|
17
|
-
& .entitycard-author { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
18
|
-
& .entitycard-title { margin-top: ${c.space["2"]}; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; letter-spacing: -0.1px; color: ${c.fgPrimary}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
19
|
-
& .entitycard-excerpt { margin-top: ${c.space["1"]}; font-size: ${c.text.md}; line-height: 18px; color: ${c.fgMuted}; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
20
|
-
& .entitycard-spacer { flex: 1; min-height: ${c.space["3"]}; }
|
|
21
|
-
& .entitycard-foot { display: flex; align-items: center; gap: ${c.space["1.5"]}; padding-top: ${c.space["2.5"]}; margin-top: ${c.space["1"]}; border-top: 1px solid ${c.borderSubtle}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
22
|
-
& .entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${c.fgPrimary}; }
|
|
23
|
-
& .entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }`,
|
|
17
|
+
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
18
|
+
& .crisp-entitycard-title { margin-top: ${c.space["2"]}; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; letter-spacing: -0.1px; color: ${c.fgPrimary}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
19
|
+
& .crisp-entitycard-excerpt { margin-top: ${c.space["1"]}; font-size: ${c.text.md}; line-height: 18px; color: ${c.fgMuted}; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
20
|
+
& .crisp-entitycard-spacer { flex: 1; min-height: ${c.space["3"]}; }
|
|
21
|
+
& .crisp-entitycard-foot { display: flex; align-items: center; gap: ${c.space["1.5"]}; padding-top: ${c.space["2.5"]}; margin-top: ${c.space["1"]}; border-top: 1px solid ${c.borderSubtle}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
22
|
+
& .crisp-entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${c.fgPrimary}; }
|
|
23
|
+
& .crisp-entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }`,
|
|
24
24
|
variants: {},
|
|
25
25
|
defaultVariants: {},
|
|
26
26
|
compoundVariants: [],
|
|
@@ -64,9 +64,9 @@ export function FlowCanvas({ nodes, edges, onNodesChange, renderNode, nodeWidth
|
|
|
64
64
|
...rest.style,
|
|
65
65
|
backgroundSize: `${GRID * zoom}px ${GRID * zoom}px`,
|
|
66
66
|
backgroundPosition: `${pan.x}px ${pan.y}px`,
|
|
67
|
-
}, role: "application", "aria-label": ariaLabel ?? "Flow canvas", onPointerDown: onBackgroundPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, children: [_jsxs("div", { className: "flowcanvas-viewport", style: {
|
|
67
|
+
}, role: "application", "aria-label": ariaLabel ?? "Flow canvas", onPointerDown: onBackgroundPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, children: [_jsxs("div", { className: "crisp-flowcanvas-viewport", style: {
|
|
68
68
|
transform: `translate(${pan.x}px, ${pan.y}px) scale(${zoom})`,
|
|
69
|
-
}, children: [_jsxs("svg", { className: "flowcanvas-edges", "aria-hidden": "true", children: [_jsx("title", { children: edgesLabel }), edges.map((edge) => {
|
|
69
|
+
}, children: [_jsxs("svg", { className: "crisp-flowcanvas-edges", "aria-hidden": "true", children: [_jsx("title", { children: edgesLabel }), edges.map((edge) => {
|
|
70
70
|
const a = byId.get(edge.from);
|
|
71
71
|
const b = byId.get(edge.to);
|
|
72
72
|
if (!a || !b)
|
|
@@ -76,12 +76,12 @@ export function FlowCanvas({ nodes, edges, onNodesChange, renderNode, nodeWidth
|
|
|
76
76
|
const tx = b.x;
|
|
77
77
|
const ty = b.y + nodeHeight / 2;
|
|
78
78
|
const c = Math.max(30, Math.abs(tx - sx) / 2);
|
|
79
|
-
return (_jsxs("g", { children: [_jsx("path", { className: "flowcanvas-edge", d: `M ${sx} ${sy} C ${sx + c} ${sy}, ${tx - c} ${ty}, ${tx} ${ty}` }), _jsx("circle", { className: "flowcanvas-edge-dot", cx: sx, cy: sy, r: 3 }), _jsx("circle", { className: "flowcanvas-edge-dot", cx: tx, cy: ty, r: 3 })] }, `${edge.from}-${edge.to}`));
|
|
80
|
-
})] }), nodes.map((node) => (_jsx("div", { className: "flowcanvas-node", "data-dragging": drag.current &&
|
|
79
|
+
return (_jsxs("g", { children: [_jsx("path", { className: "crisp-flowcanvas-edge", d: `M ${sx} ${sy} C ${sx + c} ${sy}, ${tx - c} ${ty}, ${tx} ${ty}` }), _jsx("circle", { className: "crisp-flowcanvas-edge-dot", cx: sx, cy: sy, r: 3 }), _jsx("circle", { className: "crisp-flowcanvas-edge-dot", cx: tx, cy: ty, r: 3 })] }, `${edge.from}-${edge.to}`));
|
|
80
|
+
})] }), nodes.map((node) => (_jsx("div", { className: "crisp-flowcanvas-node", "data-dragging": drag.current &&
|
|
81
81
|
"id" in drag.current &&
|
|
82
82
|
drag.current.id === node.id
|
|
83
83
|
? ""
|
|
84
|
-
: undefined, style: { left: node.x, top: node.y, width: nodeWidth }, onPointerDown: (e) => onNodePointerDown(e, node), children: renderNode(node) }, node.id)))] }), _jsxs("div", { className: "flowcanvas-toolbar", children: [_jsx("button", { type: "button", className: "flowcanvas-tool", "aria-label": zoomOutLabel, onClick: () => setZoom((z) => clampZoom(z - 0.1)), children: _jsx(Minus, { size: 16, strokeWidth: 2 }) }), _jsxs("span", { className: "flowcanvas-tool flowcanvas-tool-zoom", "aria-live": "polite", children: [Math.round(zoom * 100), "%"] }), _jsx("button", { type: "button", className: "flowcanvas-tool", "aria-label": zoomInLabel, onClick: () => setZoom((z) => clampZoom(z + 0.1)), children: _jsx(Plus, { size: 16, strokeWidth: 2 }) }), _jsx("span", { className: "flowcanvas-tool-sep" }), _jsx("button", { type: "button", className: "flowcanvas-tool", onClick: () => {
|
|
84
|
+
: undefined, style: { left: node.x, top: node.y, width: nodeWidth }, onPointerDown: (e) => onNodePointerDown(e, node), children: renderNode(node) }, node.id)))] }), _jsxs("div", { className: "crisp-flowcanvas-toolbar", children: [_jsx("button", { type: "button", className: "crisp-flowcanvas-tool", "aria-label": zoomOutLabel, onClick: () => setZoom((z) => clampZoom(z - 0.1)), children: _jsx(Minus, { size: 16, strokeWidth: 2 }) }), _jsxs("span", { className: "crisp-flowcanvas-tool crisp-flowcanvas-tool-zoom", "aria-live": "polite", children: [Math.round(zoom * 100), "%"] }), _jsx("button", { type: "button", className: "crisp-flowcanvas-tool", "aria-label": zoomInLabel, onClick: () => setZoom((z) => clampZoom(z + 0.1)), children: _jsx(Plus, { size: 16, strokeWidth: 2 }) }), _jsx("span", { className: "crisp-flowcanvas-tool-sep" }), _jsx("button", { type: "button", className: "crisp-flowcanvas-tool", onClick: () => {
|
|
85
85
|
setZoom(1);
|
|
86
86
|
setPan({ x: 40, y: 40 });
|
|
87
87
|
}, children: resetLabel })] })] }));
|
|
@@ -6,17 +6,17 @@ const config = defineRecipe({
|
|
|
6
6
|
name: "flowcanvas",
|
|
7
7
|
base: `position: relative; overflow: hidden; box-sizing: border-box; width: 100%; height: 100%; background-color: ${c.bgSurface}; background-image: radial-gradient(circle, color-mix(in srgb, ${c.fgPrimary} 14%, transparent) 1px, transparent 1px); font-family: ${c.font.sans}; cursor: grab; touch-action: none; user-select: none;
|
|
8
8
|
&[data-panning] { cursor: grabbing; }
|
|
9
|
-
& .flowcanvas-viewport { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
|
|
10
|
-
& .flowcanvas-edges { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
|
|
11
|
-
& .flowcanvas-edge { fill: none; stroke: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); stroke-width: 1.5; }
|
|
12
|
-
& .flowcanvas-edge-dot { fill: ${c.bgBrandSolid}; }
|
|
13
|
-
& .flowcanvas-node { position: absolute; cursor: grab; }
|
|
14
|
-
& .flowcanvas-node[data-dragging] { cursor: grabbing; z-index: 10; }
|
|
15
|
-
& .flowcanvas-toolbar { position: absolute; bottom: ${c.space["4"]}; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: ${c.space["1"]}; padding: ${c.space["1"]}; border-radius: ${c.radius.lg}; background: ${c.bgRaised}; box-shadow: inset 0 0 0 1px ${c.borderDefault}, 0 4px 14px -4px rgba(28,40,64,0.16); }
|
|
16
|
-
& .flowcanvas-tool { display: inline-flex; align-items: center; justify-content: center; gap: ${c.space["1"]}; height: 30px; min-width: 30px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
|
|
17
|
-
& .flowcanvas-tool:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
|
|
18
|
-
& .flowcanvas-tool-zoom { min-width: 48px; }
|
|
19
|
-
& .flowcanvas-tool-sep { width: 1px; height: 18px; background: ${c.borderSubtle}; }`,
|
|
9
|
+
& .crisp-flowcanvas-viewport { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
|
|
10
|
+
& .crisp-flowcanvas-edges { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
|
|
11
|
+
& .crisp-flowcanvas-edge { fill: none; stroke: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); stroke-width: 1.5; }
|
|
12
|
+
& .crisp-flowcanvas-edge-dot { fill: ${c.bgBrandSolid}; }
|
|
13
|
+
& .crisp-flowcanvas-node { position: absolute; cursor: grab; }
|
|
14
|
+
& .crisp-flowcanvas-node[data-dragging] { cursor: grabbing; z-index: 10; }
|
|
15
|
+
& .crisp-flowcanvas-toolbar { position: absolute; bottom: ${c.space["4"]}; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: ${c.space["1"]}; padding: ${c.space["1"]}; border-radius: ${c.radius.lg}; background: ${c.bgRaised}; box-shadow: inset 0 0 0 1px ${c.borderDefault}, 0 4px 14px -4px rgba(28,40,64,0.16); }
|
|
16
|
+
& .crisp-flowcanvas-tool { display: inline-flex; align-items: center; justify-content: center; gap: ${c.space["1"]}; height: 30px; min-width: 30px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
|
|
17
|
+
& .crisp-flowcanvas-tool:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
|
|
18
|
+
& .crisp-flowcanvas-tool-zoom { min-width: 48px; }
|
|
19
|
+
& .crisp-flowcanvas-tool-sep { width: 1px; height: 18px; background: ${c.borderSubtle}; }`,
|
|
20
20
|
variants: {},
|
|
21
21
|
defaultVariants: {},
|
|
22
22
|
compoundVariants: [],
|
|
@@ -20,6 +20,6 @@ export function Inbox({ notifications = [], title = "Notifications", tabs, activ
|
|
|
20
20
|
select: (id) => onTabChange?.(id),
|
|
21
21
|
listRef,
|
|
22
22
|
});
|
|
23
|
-
return (_jsxs("div", { className: inboxRecipe({ className }), ...rest, children: [_jsxs("div", { className: "inbox-head", children: [_jsx("div", { className: "inbox-title", children: title }), tabs && tabs.length > 0 && (_jsx("div", { ref: listRef, className: "inbox-tabs", role: "tablist", "aria-label": tabsLabel, onKeyDown: onKeyDown, children: tabs.map((t) => (_jsxs("button", { type: "button", role: "tab", "aria-selected": t.id === activeTab, tabIndex: tabIndexFor(t.id), "data-value": t.id, disabled: t.disabled, className: "inbox-tab", "data-active": t.id === activeTab ? "" : undefined, onClick: () => onTabChange?.(t.id), children: [t.label, t.count != null && (_jsxs("span", { className: "inbox-tab-count", children: ["(", t.count, ")"] }))] }, t.id))) }))] }), notifications.length === 0 ? (_jsxs("div", { className: "inbox-empty", children: [_jsx("span", { className: "inbox-empty-icon", children: _jsx(Bell, { size: 40, strokeWidth: 1.25 }) }), _jsx("div", { className: "inbox-empty-title", children: emptyTitle }), emptySubtitle != null && (_jsx("div", { className: "inbox-empty-sub", children: emptySubtitle })), emptyAction != null && (_jsx("div", { className: "inbox-empty-action", children: emptyAction }))] })) : (_jsx("div", { className: "inbox-list", children: notifications.map((n) => (_jsxs("button", { type: "button", className: "inbox-row", onClick: n.onClick, children: [n.avatar != null && (_jsx("span", { className: "inbox-row-avatar", children: n.avatar })), _jsxs("span", { className: "inbox-row-body", children: [_jsx("span", { className: "inbox-row-msg", children: n.message }), n.time != null && (_jsx("span", { className: "inbox-row-time", children: n.time }))] }), n.unread && _jsx("span", { className: "inbox-row-unread" })] }, n.id))) }))] }));
|
|
23
|
+
return (_jsxs("div", { className: inboxRecipe({ className }), ...rest, children: [_jsxs("div", { className: "crisp-inbox-head", children: [_jsx("div", { className: "crisp-inbox-title", children: title }), tabs && tabs.length > 0 && (_jsx("div", { ref: listRef, className: "crisp-inbox-tabs", role: "tablist", "aria-label": tabsLabel, onKeyDown: onKeyDown, children: tabs.map((t) => (_jsxs("button", { type: "button", role: "tab", "aria-selected": t.id === activeTab, tabIndex: tabIndexFor(t.id), "data-value": t.id, disabled: t.disabled, className: "crisp-inbox-tab", "data-active": t.id === activeTab ? "" : undefined, onClick: () => onTabChange?.(t.id), children: [t.label, t.count != null && (_jsxs("span", { className: "crisp-inbox-tab-count", children: ["(", t.count, ")"] }))] }, t.id))) }))] }), notifications.length === 0 ? (_jsxs("div", { className: "crisp-inbox-empty", children: [_jsx("span", { className: "crisp-inbox-empty-icon", children: _jsx(Bell, { size: 40, strokeWidth: 1.25 }) }), _jsx("div", { className: "crisp-inbox-empty-title", children: emptyTitle }), emptySubtitle != null && (_jsx("div", { className: "crisp-inbox-empty-sub", children: emptySubtitle })), emptyAction != null && (_jsx("div", { className: "crisp-inbox-empty-action", children: emptyAction }))] })) : (_jsx("div", { className: "crisp-inbox-list", children: notifications.map((n) => (_jsxs("button", { type: "button", className: "crisp-inbox-row", onClick: n.onClick, children: [n.avatar != null && (_jsx("span", { className: "crisp-inbox-row-avatar", children: n.avatar })), _jsxs("span", { className: "crisp-inbox-row-body", children: [_jsx("span", { className: "crisp-inbox-row-msg", children: n.message }), n.time != null && (_jsx("span", { className: "crisp-inbox-row-time", children: n.time }))] }), n.unread && _jsx("span", { className: "crisp-inbox-row-unread" })] }, n.id))) }))] }));
|
|
24
24
|
}
|
|
25
25
|
Inbox.displayName = "Inbox";
|
|
@@ -11,30 +11,30 @@ const config = defineRecipe({
|
|
|
11
11
|
box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 6%, transparent), 0 8px 28px -6px rgba(28,40,64,0.16), 0 2px 6px -2px rgba(28,40,64,0.10);
|
|
12
12
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
13
13
|
|
|
14
|
-
& .inbox-head { padding: ${c.space["3"]} ${c.space["3"]} 0; }
|
|
15
|
-
& .inbox-title { font-size: ${c.text.xl}; line-height: 28px; font-weight: ${c.weight.semibold}; letter-spacing: -0.3px; color: ${c.fgPrimary}; }
|
|
16
|
-
& .inbox-tabs { display: flex; gap: ${c.space["3"]}; margin-top: ${c.space["2"]}; box-shadow: inset 0 -1px 0 ${c.borderSubtle}; }
|
|
17
|
-
& .inbox-tab { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; height: 32px; padding: 0 2px; margin: 0; border: none; background: none; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; cursor: pointer; box-shadow: inset 0 -2px 0 transparent; transition: color .12s, box-shadow .12s; }
|
|
18
|
-
& .inbox-tab:hover { color: ${c.fgPrimary}; }
|
|
19
|
-
& .inbox-tab[data-active] { color: ${c.bgBrandSolid}; box-shadow: inset 0 -2px 0 ${c.bgBrandSolid}; }
|
|
20
|
-
& .inbox-tab-count { font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
21
|
-
& .inbox-tab[data-active] .inbox-tab-count { color: ${c.bgBrandSolid}; }
|
|
14
|
+
& .crisp-inbox-head { padding: ${c.space["3"]} ${c.space["3"]} 0; }
|
|
15
|
+
& .crisp-inbox-title { font-size: ${c.text.xl}; line-height: 28px; font-weight: ${c.weight.semibold}; letter-spacing: -0.3px; color: ${c.fgPrimary}; }
|
|
16
|
+
& .crisp-inbox-tabs { display: flex; gap: ${c.space["3"]}; margin-top: ${c.space["2"]}; box-shadow: inset 0 -1px 0 ${c.borderSubtle}; }
|
|
17
|
+
& .crisp-inbox-tab { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; height: 32px; padding: 0 2px; margin: 0; border: none; background: none; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; cursor: pointer; box-shadow: inset 0 -2px 0 transparent; transition: color .12s, box-shadow .12s; }
|
|
18
|
+
& .crisp-inbox-tab:hover { color: ${c.fgPrimary}; }
|
|
19
|
+
& .crisp-inbox-tab[data-active] { color: ${c.bgBrandSolid}; box-shadow: inset 0 -2px 0 ${c.bgBrandSolid}; }
|
|
20
|
+
& .crisp-inbox-tab-count { font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
21
|
+
& .crisp-inbox-tab[data-active] .crisp-inbox-tab-count { color: ${c.bgBrandSolid}; }
|
|
22
22
|
|
|
23
|
-
& .inbox-list { flex: 1; min-height: 0; overflow-y: auto; padding: ${c.space["1"]}; display: flex; flex-direction: column; gap: 1px; }
|
|
24
|
-
& .inbox-row { display: flex; align-items: flex-start; gap: ${c.space["2.5"]}; padding: ${c.space["2"]} ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; font-family: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
25
|
-
& .inbox-row:hover { background: ${c.bgRaised}; }
|
|
26
|
-
& .inbox-row-avatar { flex-shrink: 0; margin-top: 1px; }
|
|
27
|
-
& .inbox-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
28
|
-
& .inbox-row-msg { font-size: ${c.text.lg}; line-height: 18px; color: ${c.fgPrimary}; }
|
|
29
|
-
& .inbox-row-msg b { font-weight: ${c.weight.semibold}; }
|
|
30
|
-
& .inbox-row-time { font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
31
|
-
& .inbox-row-unread { flex-shrink: 0; width: 8px; height: 8px; margin-top: ${c.space["1"]}; border-radius: ${c.radius.full}; background: ${c.bgBrandSolid}; }
|
|
23
|
+
& .crisp-inbox-list { flex: 1; min-height: 0; overflow-y: auto; padding: ${c.space["1"]}; display: flex; flex-direction: column; gap: 1px; }
|
|
24
|
+
& .crisp-inbox-row { display: flex; align-items: flex-start; gap: ${c.space["2.5"]}; padding: ${c.space["2"]} ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; font-family: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
25
|
+
& .crisp-inbox-row:hover { background: ${c.bgRaised}; }
|
|
26
|
+
& .crisp-inbox-row-avatar { flex-shrink: 0; margin-top: 1px; }
|
|
27
|
+
& .crisp-inbox-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
28
|
+
& .crisp-inbox-row-msg { font-size: ${c.text.lg}; line-height: 18px; color: ${c.fgPrimary}; }
|
|
29
|
+
& .crisp-inbox-row-msg b { font-weight: ${c.weight.semibold}; }
|
|
30
|
+
& .crisp-inbox-row-time { font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
31
|
+
& .crisp-inbox-row-unread { flex-shrink: 0; width: 8px; height: 8px; margin-top: ${c.space["1"]}; border-radius: ${c.radius.full}; background: ${c.bgBrandSolid}; }
|
|
32
32
|
|
|
33
|
-
& .inbox-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: ${c.space["1"]}; padding: ${c.space["6"]} ${c.space["4"]}; text-align: center; }
|
|
34
|
-
& .inbox-empty-icon { display: inline-flex; margin-bottom: ${c.space["2"]}; color: color-mix(in srgb, ${c.fgPrimary} 22%, transparent); }
|
|
35
|
-
& .inbox-empty-title { font-size: ${c.text.xl}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
|
|
36
|
-
& .inbox-empty-sub { font-size: ${c.text.md}; line-height: 18px; color: ${c.fgMuted}; max-width: 260px; }
|
|
37
|
-
& .inbox-empty-action { margin-top: ${c.space["2"]}; }`,
|
|
33
|
+
& .crisp-inbox-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: ${c.space["1"]}; padding: ${c.space["6"]} ${c.space["4"]}; text-align: center; }
|
|
34
|
+
& .crisp-inbox-empty-icon { display: inline-flex; margin-bottom: ${c.space["2"]}; color: color-mix(in srgb, ${c.fgPrimary} 22%, transparent); }
|
|
35
|
+
& .crisp-inbox-empty-title { font-size: ${c.text.xl}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
|
|
36
|
+
& .crisp-inbox-empty-sub { font-size: ${c.text.md}; line-height: 18px; color: ${c.fgMuted}; max-width: 260px; }
|
|
37
|
+
& .crisp-inbox-empty-action { margin-top: ${c.space["2"]}; }`,
|
|
38
38
|
variants: {},
|
|
39
39
|
defaultVariants: {},
|
|
40
40
|
compoundVariants: [],
|
|
@@ -4,9 +4,9 @@ import { listpageRecipe } from "./listpage.recipe.js";
|
|
|
4
4
|
* Renders a real `<button>` when `onClick` is given, else a plain row. */
|
|
5
5
|
export function ListRow({ children, onClick, }) {
|
|
6
6
|
if (onClick) {
|
|
7
|
-
return (_jsx("button", { type: "button", className: "listpage-row", onClick: onClick, children: children }));
|
|
7
|
+
return (_jsx("button", { type: "button", className: "crisp-listpage-row", onClick: onClick, children: children }));
|
|
8
8
|
}
|
|
9
|
-
return _jsx("div", { className: "listpage-row", children: children });
|
|
9
|
+
return _jsx("div", { className: "crisp-listpage-row", children: children });
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* The entity-list page shell — measured from Reports/Sequences/Tasks/
|
|
@@ -16,6 +16,6 @@ export function ListRow({ children, onClick, }) {
|
|
|
16
16
|
*/
|
|
17
17
|
export function ListPage({ leading, trailing, count, favorites, favoritesLabel = "Favorites", columns, groups, emptyLabel = "Nothing here yet", className, ...rest }) {
|
|
18
18
|
const total = groups?.reduce((s, g) => s + g.rows.length, 0) ?? 0;
|
|
19
|
-
return (_jsxs("div", { className: listpageRecipe({ className }), ...rest, children: [_jsxs("div", { className: "listpage-toolbar", children: [_jsx("div", { className: "listpage-toolbar-lead", children: leading }), count != null && _jsx("div", { className: "listpage-count", children: count }), trailing != null && (_jsx("div", { className: "listpage-toolbar-trail", children: trailing }))] }), _jsxs("div", { className: "listpage-body", children: [favorites != null && (_jsxs(_Fragment, { children: [_jsx("div", { className: "listpage-section-label", children: favoritesLabel }), _jsx("div", { className: "listpage-favorites", "data-dashed": "", children: favorites })] })), columns && columns.length > 0 && (_jsx("div", { className: "listpage-colhead", children: columns.map((col, i) => (_jsxs("span", { className: "listpage-colhead-cell", children: [col.icon, col.label] }, i))) })), total === 0 && !groups?.length ? (_jsx("div", { className: "listpage-empty", children: emptyLabel })) : (groups?.map((g) => (_jsxs("div", { children: [_jsxs("div", { className: "listpage-group", children: [g.label, g.count != null && (_jsx("span", { className: "listpage-group-count", children: g.count }))] }), g.rows] }, g.id))))] })] }));
|
|
19
|
+
return (_jsxs("div", { className: listpageRecipe({ className }), ...rest, children: [_jsxs("div", { className: "crisp-listpage-toolbar", children: [_jsx("div", { className: "crisp-listpage-toolbar-lead", children: leading }), count != null && _jsx("div", { className: "crisp-listpage-count", children: count }), trailing != null && (_jsx("div", { className: "crisp-listpage-toolbar-trail", children: trailing }))] }), _jsxs("div", { className: "crisp-listpage-body", children: [favorites != null && (_jsxs(_Fragment, { children: [_jsx("div", { className: "crisp-listpage-section-label", children: favoritesLabel }), _jsx("div", { className: "crisp-listpage-favorites", "data-dashed": "", children: favorites })] })), columns && columns.length > 0 && (_jsx("div", { className: "crisp-listpage-colhead", children: columns.map((col, i) => (_jsxs("span", { className: "crisp-listpage-colhead-cell", children: [col.icon, col.label] }, i))) })), total === 0 && !groups?.length ? (_jsx("div", { className: "crisp-listpage-empty", children: emptyLabel })) : (groups?.map((g) => (_jsxs("div", { children: [_jsxs("div", { className: "crisp-listpage-group", children: [g.label, g.count != null && (_jsx("span", { className: "crisp-listpage-group-count", children: g.count }))] }), g.rows] }, g.id))))] })] }));
|
|
20
20
|
}
|
|
21
21
|
ListPage.displayName = "ListPage";
|
|
@@ -9,32 +9,32 @@ const config = defineRecipe({
|
|
|
9
9
|
base: `display: flex; flex-direction: column; min-height: 0; 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
|
-
& .listpage-toolbar { display: flex; align-items: center; gap: ${c.space["2"]}; height: 52px; flex-shrink: 0; padding: 0 ${c.space["3"]}; }
|
|
13
|
-
& .listpage-toolbar-lead { display: flex; align-items: center; gap: ${c.space["2"]}; }
|
|
14
|
-
& .listpage-count { margin-inline-start: auto; font-size: ${c.text.md}; color: ${c.fgMuted}; white-space: nowrap; }
|
|
15
|
-
& .listpage-toolbar-trail { display: flex; align-items: center; gap: ${c.space["2"]}; }
|
|
16
|
-
& .listpage-count + .listpage-toolbar-trail { margin-inline-start: ${c.space["3"]}; }
|
|
12
|
+
& .crisp-listpage-toolbar { display: flex; align-items: center; gap: ${c.space["2"]}; height: 52px; flex-shrink: 0; padding: 0 ${c.space["3"]}; }
|
|
13
|
+
& .crisp-listpage-toolbar-lead { display: flex; align-items: center; gap: ${c.space["2"]}; }
|
|
14
|
+
& .crisp-listpage-count { margin-inline-start: auto; font-size: ${c.text.md}; color: ${c.fgMuted}; white-space: nowrap; }
|
|
15
|
+
& .crisp-listpage-toolbar-trail { display: flex; align-items: center; gap: ${c.space["2"]}; }
|
|
16
|
+
& .crisp-listpage-count + .crisp-listpage-toolbar-trail { margin-inline-start: ${c.space["3"]}; }
|
|
17
17
|
|
|
18
|
-
& .listpage-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 ${c.space["3"]} ${c.space["3"]}; }
|
|
18
|
+
& .crisp-listpage-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 ${c.space["3"]} ${c.space["3"]}; }
|
|
19
19
|
|
|
20
|
-
& .listpage-section-label { padding: ${c.space["2"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
21
|
-
& .listpage-favorites { display: flex; align-items: center; justify-content: center; min-height: 200px; padding: ${c.space["6"]}; border-radius: ${c.radius.xl};
|
|
20
|
+
& .crisp-listpage-section-label { padding: ${c.space["2"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
21
|
+
& .crisp-listpage-favorites { display: flex; align-items: center; justify-content: center; min-height: 200px; padding: ${c.space["6"]}; border-radius: ${c.radius.xl};
|
|
22
22
|
background: repeating-linear-gradient(0deg, transparent, transparent) padding-box,
|
|
23
23
|
border-box; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 8%, transparent); }
|
|
24
|
-
& .listpage-favorites[data-dashed] { box-shadow: none; border: 1px dashed color-mix(in srgb, ${c.fgPrimary} 14%, transparent); }
|
|
24
|
+
& .crisp-listpage-favorites[data-dashed] { box-shadow: none; border: 1px dashed color-mix(in srgb, ${c.fgPrimary} 14%, transparent); }
|
|
25
25
|
|
|
26
|
-
& .listpage-colhead { display: flex; align-items: center; gap: ${c.space["2.5"]}; height: 40px; padding: 0 ${c.space["2"]}; box-shadow: inset 0 -1px 0 ${c.borderSubtle}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
27
|
-
& .listpage-colhead-cell { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; }
|
|
26
|
+
& .crisp-listpage-colhead { display: flex; align-items: center; gap: ${c.space["2.5"]}; height: 40px; padding: 0 ${c.space["2"]}; box-shadow: inset 0 -1px 0 ${c.borderSubtle}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
27
|
+
& .crisp-listpage-colhead-cell { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; }
|
|
28
28
|
|
|
29
|
-
& .listpage-group { display: flex; align-items: center; gap: ${c.space["1.5"]}; height: 36px; padding: 0 ${c.space["2"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
30
|
-
& .listpage-group-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); font-size: ${c.text.xs}; color: ${c.fgMuted}; }
|
|
29
|
+
& .crisp-listpage-group { display: flex; align-items: center; gap: ${c.space["1.5"]}; height: 36px; padding: 0 ${c.space["2"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
30
|
+
& .crisp-listpage-group-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); font-size: ${c.text.xs}; color: ${c.fgMuted}; }
|
|
31
31
|
|
|
32
|
-
& .listpage-row { display: flex; align-items: center; gap: ${c.space["2.5"]}; width: 100%; height: 52px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-top: 1px solid ${c.borderSubtle}; background: none; font-family: inherit; color: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
33
|
-
& .listpage-row:focus-visible { outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; }
|
|
34
|
-
& .listpage-row:hover { background: color-mix(in srgb, ${c.fgPrimary} 3%, transparent); }
|
|
35
|
-
& .listpage-row-title { font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; }
|
|
32
|
+
& .crisp-listpage-row { display: flex; align-items: center; gap: ${c.space["2.5"]}; width: 100%; height: 52px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-top: 1px solid ${c.borderSubtle}; background: none; font-family: inherit; color: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
33
|
+
& .crisp-listpage-row:focus-visible { outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; }
|
|
34
|
+
& .crisp-listpage-row:hover { background: color-mix(in srgb, ${c.fgPrimary} 3%, transparent); }
|
|
35
|
+
& .crisp-listpage-row-title { font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; }
|
|
36
36
|
|
|
37
|
-
& .listpage-empty { padding: ${c.space["8"]} ${c.space["4"]}; text-align: center; font-size: ${c.text.md}; color: ${c.fgMuted}; }`,
|
|
37
|
+
& .crisp-listpage-empty { padding: ${c.space["8"]} ${c.space["4"]}; text-align: center; font-size: ${c.text.md}; color: ${c.fgMuted}; }`,
|
|
38
38
|
variants: {},
|
|
39
39
|
defaultVariants: {},
|
|
40
40
|
compoundVariants: [],
|
|
@@ -3,6 +3,6 @@ import * as React from "react";
|
|
|
3
3
|
import { Primitive } from "../../core/index.js";
|
|
4
4
|
import { navitemRecipe } from "./navitem.recipe.js";
|
|
5
5
|
export const NavItem = React.forwardRef(({ active, icon, trailing, className, children, ...props }, ref) => {
|
|
6
|
-
return (_jsxs(Primitive.a, { ref: ref, "data-active": active || undefined, className: navitemRecipe({ className }), ...props, children: [icon, _jsx("span", { className: "navitem-label", children: children }), trailing != null && (_jsx("span", { className: "navitem-trailing", children: trailing }))] }));
|
|
6
|
+
return (_jsxs(Primitive.a, { ref: ref, "data-active": active || undefined, className: navitemRecipe({ className }), ...props, children: [icon, _jsx("span", { className: "crisp-navitem-label", children: children }), trailing != null && (_jsx("span", { className: "crisp-navitem-trailing", children: trailing }))] }));
|
|
7
7
|
});
|
|
8
8
|
NavItem.displayName = "NavItem";
|