@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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VAR_PREFIX = exports.CLASS_PREFIX = void 0;
|
|
4
|
+
// The single source of truth for crisp's CSS namespace (issue #276).
|
|
5
|
+
//
|
|
6
|
+
// Every class and custom property the stylesheet puts into a consumer's
|
|
7
|
+
// GLOBAL scope goes through one of these two prefixes. Classes are generated
|
|
8
|
+
// in two places that must agree byte-for-byte — `build/generate-recipes.mjs`
|
|
9
|
+
// (the CSS selectors) and `core/resolve.ts` (the runtime `className` string) —
|
|
10
|
+
// and custom properties in two more — `build/generate-tokens.mjs` (the `:root`
|
|
11
|
+
// declarations) and `tokens/contract.ts` (the `var(--…)` references recipes
|
|
12
|
+
// read them through). All four import CLASS_PREFIX/VAR_PREFIX from here;
|
|
13
|
+
// nothing else hardcodes "crisp-".
|
|
14
|
+
exports.CLASS_PREFIX = "crisp-";
|
|
15
|
+
// Applied after the leading "--" a custom property always starts with, e.g.
|
|
16
|
+
// `--${VAR_PREFIX}bg-surface` -> `--crisp-bg-surface`.
|
|
17
|
+
exports.VAR_PREFIX = "crisp-";
|
package/dist/cjs/core/resolve.js
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveRecipe = resolveRecipe;
|
|
4
4
|
const cx_1 = require("./cx");
|
|
5
|
+
const namespace_1 = require("./namespace");
|
|
5
6
|
const falsyToString = (v) => typeof v === "boolean" ? `${v}` : v === 0 ? "0" : v;
|
|
6
7
|
function resolveRecipe(config) {
|
|
7
8
|
const { name, base, variants, defaultVariants, compoundVariants } = config;
|
|
9
|
+
const prefixedName = `${namespace_1.CLASS_PREFIX}${name}`;
|
|
8
10
|
return (props) => {
|
|
9
11
|
const classes = [];
|
|
10
12
|
if (base)
|
|
11
|
-
classes.push(
|
|
13
|
+
classes.push(prefixedName);
|
|
12
14
|
if (variants) {
|
|
13
15
|
for (const variant of Object.keys(variants)) {
|
|
14
16
|
const variantProp = props?.[variant];
|
|
@@ -19,7 +21,7 @@ function resolveRecipe(config) {
|
|
|
19
21
|
if (key == null)
|
|
20
22
|
continue;
|
|
21
23
|
if (variants[variant]?.[key] !== undefined) {
|
|
22
|
-
classes.push(`${
|
|
24
|
+
classes.push(`${prefixedName}--${variant}_${key}`);
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
const withoutUndefined = props
|
|
@@ -36,7 +38,7 @@ function resolveRecipe(config) {
|
|
|
36
38
|
? val.includes(merged[k])
|
|
37
39
|
: merged[k] === val);
|
|
38
40
|
if (matches)
|
|
39
|
-
classes.push(`${
|
|
41
|
+
classes.push(`${prefixedName}--compound_${i}`);
|
|
40
42
|
});
|
|
41
43
|
}
|
|
42
44
|
return (0, cx_1.cx)(classes, props?.class, props?.className);
|
|
@@ -102,9 +102,9 @@ function AppShell({ sidebar, children, width: widthProp, defaultWidth = 275, onW
|
|
|
102
102
|
window.addEventListener("pointerup", onUp);
|
|
103
103
|
};
|
|
104
104
|
const toggleCollapse = () => setCollapsed(!collapsed);
|
|
105
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, appshell_recipe_1.appshellRecipe)({ className }), ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: "appshell-side", "data-collapsed": collapsed ? "" : undefined, style: {
|
|
105
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, appshell_recipe_1.appshellRecipe)({ className }), ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: "crisp-appshell-side", "data-collapsed": collapsed ? "" : undefined, style: {
|
|
106
106
|
width: collapsed ? 0 : width,
|
|
107
107
|
transition: dragging ? "none" : "width .14s ease",
|
|
108
|
-
}, children: [(0, jsx_runtime_1.jsx)("div", { className: "appshell-side-inner", style: { width }, children: sidebar(toggleCollapse) }), !collapsed && ((0, jsx_runtime_1.jsx)("div", { className: "appshell-resize", "data-dragging": dragging ? "" : undefined, "aria-hidden": "true", onPointerDown: startResize }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "appshell-main", children: [collapsed && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "appshell-expand", "aria-label": expandLabel, onClick: () => setCollapsed(false), children: (0, jsx_runtime_1.jsx)(lucide_react_1.PanelLeft, { "data-rtl-flip": "", size: 15, strokeWidth: 1.75 }) })), children] })] }));
|
|
108
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { className: "crisp-appshell-side-inner", style: { width }, children: sidebar(toggleCollapse) }), !collapsed && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-appshell-resize", "data-dragging": dragging ? "" : undefined, "aria-hidden": "true", onPointerDown: startResize }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "crisp-appshell-main", children: [collapsed && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "crisp-appshell-expand", "aria-label": expandLabel, onClick: () => setCollapsed(false), children: (0, jsx_runtime_1.jsx)(lucide_react_1.PanelLeft, { "data-rtl-flip": "", size: 15, strokeWidth: 1.75 }) })), children] })] }));
|
|
109
109
|
}
|
|
110
110
|
AppShell.displayName = "AppShell";
|
|
@@ -10,14 +10,14 @@ const config = (0, core_1.defineRecipe)({
|
|
|
10
10
|
name: "appshell",
|
|
11
11
|
base: `
|
|
12
12
|
display: flex; height: 100%; width: 100%; overflow: hidden; background: ${tokens_1.contract.bgSurface}; font-family: ${tokens_1.contract.font.sans}; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
13
|
-
& .appshell-side { position: relative; flex-shrink: 0; overflow: hidden; }
|
|
14
|
-
& .appshell-side-inner { height: 100%; }
|
|
15
|
-
& .appshell-resize { position: absolute; top: 0; inset-inline-end: 0; width: 10px; height: 100%; cursor: col-resize; z-index: 5; touch-action: none; }
|
|
16
|
-
& .appshell-resize::after { content: ""; position: absolute; top: 0; inset-inline-end: 0; width: 1px; height: 100%; background: ${tokens_1.contract.borderSubtle}; transition: background-color .16s, height .16s; }
|
|
17
|
-
& .appshell-resize:hover::after, & .appshell-resize[data-dragging]::after { width: 2px; background: ${tokens_1.contract.bgBrandSolid}; }
|
|
18
|
-
& .appshell-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
|
|
19
|
-
& .appshell-expand { position: absolute; top: ${tokens_1.contract.space["2"]}; inset-inline-start: ${tokens_1.contract.space["2"]}; z-index: 6; display: inline-flex; align-items: center; justify-content: center; width: ${tokens_1.contract.size.row}; height: ${tokens_1.contract.size.row}; padding: 0; border: none; border-radius: ${tokens_1.contract.radius.md}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderSubtle}; background: ${tokens_1.contract.bgSurface}; color: ${tokens_1.contract.fgMuted}; font-family: inherit; cursor: pointer; transition: background-color .12s; }
|
|
20
|
-
& .appshell-expand:hover { background: ${tokens_1.contract.bgRaised}; color: ${tokens_1.contract.fgPrimary}; }
|
|
13
|
+
& .crisp-appshell-side { position: relative; flex-shrink: 0; overflow: hidden; }
|
|
14
|
+
& .crisp-appshell-side-inner { height: 100%; }
|
|
15
|
+
& .crisp-appshell-resize { position: absolute; top: 0; inset-inline-end: 0; width: 10px; height: 100%; cursor: col-resize; z-index: 5; touch-action: none; }
|
|
16
|
+
& .crisp-appshell-resize::after { content: ""; position: absolute; top: 0; inset-inline-end: 0; width: 1px; height: 100%; background: ${tokens_1.contract.borderSubtle}; transition: background-color .16s, height .16s; }
|
|
17
|
+
& .crisp-appshell-resize:hover::after, & .crisp-appshell-resize[data-dragging]::after { width: 2px; background: ${tokens_1.contract.bgBrandSolid}; }
|
|
18
|
+
& .crisp-appshell-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
|
|
19
|
+
& .crisp-appshell-expand { position: absolute; top: ${tokens_1.contract.space["2"]}; inset-inline-start: ${tokens_1.contract.space["2"]}; z-index: 6; display: inline-flex; align-items: center; justify-content: center; width: ${tokens_1.contract.size.row}; height: ${tokens_1.contract.size.row}; padding: 0; border: none; border-radius: ${tokens_1.contract.radius.md}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderSubtle}; background: ${tokens_1.contract.bgSurface}; color: ${tokens_1.contract.fgMuted}; font-family: inherit; cursor: pointer; transition: background-color .12s; }
|
|
20
|
+
& .crisp-appshell-expand:hover { background: ${tokens_1.contract.bgRaised}; color: ${tokens_1.contract.fgPrimary}; }
|
|
21
21
|
|
|
22
22
|
${core_1.rtlFlipCss}
|
|
23
23
|
`,
|
|
@@ -16,6 +16,6 @@ function AuthShell({ progress, logo, title, children, preview, footer, className
|
|
|
16
16
|
const pct = hasProgress
|
|
17
17
|
? Math.round(Math.max(0, Math.min(1, progress)) * 100)
|
|
18
18
|
: 0;
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, authshell_recipe_1.authshellRecipe)({ className }), ...rest, children: [hasProgress && ((0, jsx_runtime_1.jsx)("div", { className: "authshell-progress", role: "progressbar", "aria-valuenow": pct, "aria-valuemin": 0, "aria-valuemax": 100, children: (0, jsx_runtime_1.jsx)("div", { className: "authshell-progress-fill", style: { width: `${pct}%` } }) })), logo != null && (0, jsx_runtime_1.jsx)("div", { className: "authshell-logo", children: logo }), (0, jsx_runtime_1.jsxs)("div", { className: "authshell-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "authshell-pane", children: (0, jsx_runtime_1.jsxs)("div", { className: "authshell-body", children: [title != null && (0, jsx_runtime_1.jsx)("div", { className: "authshell-title", children: title }), (0, jsx_runtime_1.jsx)("div", { className: "authshell-form", children: children })] }) }), preview != null && (0, jsx_runtime_1.jsx)("div", { className: "authshell-preview", children: preview })] }), footer != null && (0, jsx_runtime_1.jsx)("div", { className: "authshell-footer", children: footer })] }));
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, authshell_recipe_1.authshellRecipe)({ className }), ...rest, children: [hasProgress && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-authshell-progress", role: "progressbar", "aria-valuenow": pct, "aria-valuemin": 0, "aria-valuemax": 100, children: (0, jsx_runtime_1.jsx)("div", { className: "crisp-authshell-progress-fill", style: { width: `${pct}%` } }) })), logo != null && (0, jsx_runtime_1.jsx)("div", { className: "crisp-authshell-logo", children: logo }), (0, jsx_runtime_1.jsxs)("div", { className: "crisp-authshell-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "crisp-authshell-pane", children: (0, jsx_runtime_1.jsxs)("div", { className: "crisp-authshell-body", children: [title != null && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-authshell-title", children: title })), (0, jsx_runtime_1.jsx)("div", { className: "crisp-authshell-form", children: children })] }) }), preview != null && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-authshell-preview", children: preview }))] }), footer != null && (0, jsx_runtime_1.jsx)("div", { className: "crisp-authshell-footer", children: footer })] }));
|
|
20
20
|
}
|
|
21
21
|
AuthShell.displayName = "AuthShell";
|
|
@@ -16,40 +16,40 @@ const config = (0, core_1.defineRecipe)({
|
|
|
16
16
|
background: ${tokens_1.contract.bgSurface}; font-family: ${tokens_1.contract.font.sans}; font-size: ${tokens_1.contract.text.lg}; line-height: 20px; color: ${tokens_1.contract.fgPrimary};
|
|
17
17
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
18
18
|
|
|
19
|
-
& .authshell-progress { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: ${tokens_1.contract.borderDefault}; }
|
|
20
|
-
& .authshell-progress-fill { height: 2px; background: ${tokens_1.contract.fgPrimary}; border-radius: 4px; transition: width .2s; }
|
|
19
|
+
& .crisp-authshell-progress { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: ${tokens_1.contract.borderDefault}; }
|
|
20
|
+
& .crisp-authshell-progress-fill { height: 2px; background: ${tokens_1.contract.fgPrimary}; border-radius: 4px; transition: width .2s; }
|
|
21
21
|
|
|
22
|
-
& .authshell-logo { margin-top: ${tokens_1.contract.space["8"]}; height: 24px; display: flex; align-items: center; }
|
|
22
|
+
& .crisp-authshell-logo { margin-top: ${tokens_1.contract.space["8"]}; height: 24px; display: flex; align-items: center; }
|
|
23
23
|
|
|
24
|
-
& .authshell-card { margin-top: ${tokens_1.contract.space["6"]}; display: flex; height: 692px; border-radius: 20px; border: 1px solid ${tokens_1.contract.borderSubtle}; overflow: hidden; }
|
|
24
|
+
& .crisp-authshell-card { margin-top: ${tokens_1.contract.space["6"]}; display: flex; height: 692px; border-radius: 20px; border: 1px solid ${tokens_1.contract.borderSubtle}; overflow: hidden; }
|
|
25
25
|
|
|
26
|
-
& .authshell-pane { flex: 0 0 564px; padding: 72px; display: flex; flex-direction: column; box-sizing: border-box; }
|
|
26
|
+
& .crisp-authshell-pane { flex: 0 0 564px; padding: 72px; display: flex; flex-direction: column; box-sizing: border-box; }
|
|
27
27
|
|
|
28
|
-
& .authshell-preview { flex: 0 0 564px; padding: 96px 64px; background: ${tokens_1.contract.bgSubtle}; border-inline-start: 1px solid color-mix(in srgb, ${tokens_1.contract.fgPrimary} 5%, transparent); position: relative; overflow: hidden; box-sizing: border-box; }
|
|
29
|
-
& .authshell-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(color-mix(in srgb, ${tokens_1.contract.bgSubtle} 0%, transparent) 0%, ${tokens_1.contract.bgSubtle} 100%); pointer-events: none; }
|
|
28
|
+
& .crisp-authshell-preview { flex: 0 0 564px; padding: 96px 64px; background: ${tokens_1.contract.bgSubtle}; border-inline-start: 1px solid color-mix(in srgb, ${tokens_1.contract.fgPrimary} 5%, transparent); position: relative; overflow: hidden; box-sizing: border-box; }
|
|
29
|
+
& .crisp-authshell-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(color-mix(in srgb, ${tokens_1.contract.bgSubtle} 0%, transparent) 0%, ${tokens_1.contract.bgSubtle} 100%); pointer-events: none; }
|
|
30
30
|
|
|
31
|
-
& .authshell-body { width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: ${tokens_1.contract.space["8"]}; align-items: center; }
|
|
31
|
+
& .crisp-authshell-body { width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: ${tokens_1.contract.space["8"]}; align-items: center; }
|
|
32
32
|
|
|
33
|
-
& .authshell-title { font-size: 20px; line-height: 24px; font-weight: ${tokens_1.contract.weight.semibold}; letter-spacing: -0.4px; color: ${tokens_1.contract.fgPrimary}; align-self: stretch; }
|
|
33
|
+
& .crisp-authshell-title { font-size: 20px; line-height: 24px; font-weight: ${tokens_1.contract.weight.semibold}; letter-spacing: -0.4px; color: ${tokens_1.contract.fgPrimary}; align-self: stretch; }
|
|
34
34
|
|
|
35
|
-
& .authshell-form { align-self: stretch; display: flex; flex-direction: column; gap: 28px; }
|
|
35
|
+
& .crisp-authshell-form { align-self: stretch; display: flex; flex-direction: column; gap: 28px; }
|
|
36
36
|
|
|
37
|
-
& .authshell-footer { margin-top: ${tokens_1.contract.space["6"]}; display: flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; font-size: ${tokens_1.contract.text.sm}; line-height: 16px; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 63%, transparent); }
|
|
38
|
-
& .authshell-footer a { color: inherit; font-weight: ${tokens_1.contract.weight.medium}; text-decoration: underline; }
|
|
37
|
+
& .crisp-authshell-footer { margin-top: ${tokens_1.contract.space["6"]}; display: flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; font-size: ${tokens_1.contract.text.sm}; line-height: 16px; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 63%, transparent); }
|
|
38
|
+
& .crisp-authshell-footer a { color: inherit; font-weight: ${tokens_1.contract.weight.medium}; text-decoration: underline; }
|
|
39
39
|
|
|
40
40
|
/* Auth-surface control treatment: flatter than the in-app chrome — a plain
|
|
41
41
|
hairline ring instead of elevation.field's soft glow, and a 36px (not
|
|
42
|
-
40px) submit. Scoped to .authshell-body so a consumer keeps using
|
|
42
|
+
40px) submit. Scoped to .crisp-authshell-body so a consumer keeps using
|
|
43
43
|
crisp's Input / FormField / Button and gets the auth treatment for free. */
|
|
44
|
-
& .authshell-body .formfield-label { font-size: ${tokens_1.contract.text.sm}; line-height: 16px; font-weight: ${tokens_1.contract.weight.medium}; letter-spacing: -0.12px; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 50%, transparent); padding-inline-start: ${tokens_1.contract.space["1"]}; }
|
|
45
|
-
& .authshell-body .formfield { gap: ${tokens_1.contract.space["1"]}; }
|
|
46
|
-
& .authshell-body .input { height: 34px; padding-inline: ${tokens_1.contract.space["2.5"]}; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; letter-spacing: -0.14px; transition: box-shadow .14s, background-color .14s; }
|
|
47
|
-
& .authshell-body .input:focus { box-shadow: inset 0 0 0 1px ${tokens_1.contract.bgBrandSolid}; }
|
|
44
|
+
& .crisp-authshell-body .crisp-formfield-label { font-size: ${tokens_1.contract.text.sm}; line-height: 16px; font-weight: ${tokens_1.contract.weight.medium}; letter-spacing: -0.12px; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 50%, transparent); padding-inline-start: ${tokens_1.contract.space["1"]}; }
|
|
45
|
+
& .crisp-authshell-body .crisp-formfield { gap: ${tokens_1.contract.space["1"]}; }
|
|
46
|
+
& .crisp-authshell-body .crisp-input { height: 34px; padding-inline: ${tokens_1.contract.space["2.5"]}; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; letter-spacing: -0.14px; transition: box-shadow .14s, background-color .14s; }
|
|
47
|
+
& .crisp-authshell-body .crisp-input:focus { box-shadow: inset 0 0 0 1px ${tokens_1.contract.bgBrandSolid}; }
|
|
48
48
|
/* Same three-layer brand shadow as Button's primary intent, but the auth
|
|
49
49
|
button's inset ring is measured at rgba(0,0,0,0.06) — a hairline, not
|
|
50
50
|
the in-app button's rgba(255,255,255,0.07) highlight. */
|
|
51
|
-
& .authshell-body .button { height: 36px; padding-inline: ${tokens_1.contract.space["3"]}; border-radius: 10px; }
|
|
52
|
-
& .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); }
|
|
51
|
+
& .crisp-authshell-body .crisp-button { height: 36px; padding-inline: ${tokens_1.contract.space["3"]}; border-radius: 10px; }
|
|
52
|
+
& .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); }
|
|
53
53
|
|
|
54
54
|
/* The preview pane drops out in JS on narrow viewports (measured: two
|
|
55
55
|
panes at 1393px, one at 954px), so 1200px is a chosen threshold inside
|
|
@@ -58,7 +58,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
58
58
|
a viewport query would keep the 1130px card and overflow it. Asking the
|
|
59
59
|
shell's own width is what "there isn't room for the preview" means. */
|
|
60
60
|
container-type: inline-size;
|
|
61
|
-
@container (max-width: 1200px) { & .authshell-preview { display: none; } }`,
|
|
61
|
+
@container (max-width: 1200px) { & .crisp-authshell-preview { display: none; } }`,
|
|
62
62
|
variants: {},
|
|
63
63
|
defaultVariants: {},
|
|
64
64
|
compoundVariants: [],
|
|
@@ -86,7 +86,7 @@ function Board({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLa
|
|
|
86
86
|
};
|
|
87
87
|
return ((0, jsx_runtime_1.jsxs)("div", { ref: rootRef, className: (0, board_recipe_1.boardRecipe)({ className }), ...rest, children: [columns.map((col) => {
|
|
88
88
|
const colCards = cards.filter((c) => c.columnId === col.id);
|
|
89
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "board-col", "data-over": overCol === col.id ? "" : undefined, onDragOver: (e) => {
|
|
89
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "crisp-board-col", "data-over": overCol === col.id ? "" : undefined, onDragOver: (e) => {
|
|
90
90
|
if (!dragId)
|
|
91
91
|
return;
|
|
92
92
|
e.preventDefault();
|
|
@@ -101,7 +101,7 @@ function Board({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLa
|
|
|
101
101
|
move(dragId, col.id);
|
|
102
102
|
setDragId(null);
|
|
103
103
|
setOverCol(null);
|
|
104
|
-
}, children: [(0, jsx_runtime_1.jsxs)("div", { className: "board-col-header", children: [col.accent && ((0, jsx_runtime_1.jsx)("span", { className: "board-col-dot", style: { background: col.accent } })), (0, jsx_runtime_1.jsx)("span", { className: "board-col-title", children: col.title }), (0, jsx_runtime_1.jsx)("span", { className: "board-col-count", children: colCards.length }), onNewCard && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "board-col-add", "aria-label": `Add to ${col.title}`, onClick: () => onNewCard(col.id), children: "+" }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "board-col-body", role: "list", "aria-label": col.title, children: [onNewCard && ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: "board-newcard", onClick: () => onNewCard(col.id), children: ["+ ", newCardLabel] })), colCards.map((card) => ((0, jsx_runtime_1.jsx)("div", { className: "board-card", role: "listitem",
|
|
104
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { className: "crisp-board-col-header", children: [col.accent && ((0, jsx_runtime_1.jsx)("span", { className: "crisp-board-col-dot", style: { background: col.accent } })), (0, jsx_runtime_1.jsx)("span", { className: "crisp-board-col-title", children: col.title }), (0, jsx_runtime_1.jsx)("span", { className: "crisp-board-col-count", children: colCards.length }), onNewCard && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "crisp-board-col-add", "aria-label": `Add to ${col.title}`, onClick: () => onNewCard(col.id), children: "+" }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "crisp-board-col-body", role: "list", "aria-label": col.title, children: [onNewCard && ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: "crisp-board-newcard", onClick: () => onNewCard(col.id), children: ["+ ", newCardLabel] })), colCards.map((card) => ((0, jsx_runtime_1.jsx)("div", { className: "crisp-board-card", role: "listitem",
|
|
105
105
|
// 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
|
|
106
106
|
tabIndex: 0, "aria-label": getCardLabel?.(card), "data-card-id": card.id, draggable: true, "data-dragging": dragId === card.id ? "" : undefined, onDragStart: () => setDragId(card.id), onDragEnd: () => {
|
|
107
107
|
setDragId(null);
|
|
@@ -120,6 +120,6 @@ function Board({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLa
|
|
|
120
120
|
if (delta && moveByKey(card, delta))
|
|
121
121
|
e.preventDefault();
|
|
122
122
|
}, children: renderCard(card) }, card.id)))] })] }, col.id));
|
|
123
|
-
}), (0, jsx_runtime_1.jsx)("div", { className: "board-live", role: "status", "aria-live": "polite", children: announcement })] }));
|
|
123
|
+
}), (0, jsx_runtime_1.jsx)("div", { className: "crisp-board-live", role: "status", "aria-live": "polite", children: announcement })] }));
|
|
124
124
|
}
|
|
125
125
|
Board.displayName = "Board";
|
|
@@ -9,24 +9,24 @@ const tokens_1 = require("../../tokens");
|
|
|
9
9
|
const config = (0, core_1.defineRecipe)({
|
|
10
10
|
name: "board",
|
|
11
11
|
base: `display: flex; gap: ${tokens_1.contract.space["3"]}; height: 100%; box-sizing: border-box; padding: ${tokens_1.contract.space["3"]}; overflow-x: auto; align-items: flex-start; font-family: ${tokens_1.contract.font.sans};
|
|
12
|
-
& .board-col { display: flex; flex-direction: column; width: 280px; flex-shrink: 0; max-height: 100%; box-sizing: border-box; }
|
|
13
|
-
& .board-col-header { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; height: 36px; padding: 0 ${tokens_1.contract.space["1"]}; flex-shrink: 0; }
|
|
14
|
-
& .board-col-dot { width: 9px; height: 9px; border-radius: ${tokens_1.contract.radius.full}; flex-shrink: 0; }
|
|
15
|
-
& .board-col-title { font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.semibold}; color: ${tokens_1.contract.fgPrimary}; }
|
|
16
|
-
& .board-col-count { font-size: ${tokens_1.contract.text.md}; color: ${tokens_1.contract.fgMuted}; }
|
|
17
|
-
& .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: ${tokens_1.contract.radius.md}; background: none; color: ${tokens_1.contract.fgMuted}; font-family: inherit; cursor: pointer; }
|
|
18
|
-
& .board-col-add:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
19
|
-
& .board-col-body { display: flex; flex-direction: column; gap: ${tokens_1.contract.space["2"]}; flex: 1; min-height: 48px; padding: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.lg}; overflow-y: auto; transition: background 0.12s; }
|
|
20
|
-
& .board-col[data-over] .board-col-body { background: color-mix(in srgb, ${tokens_1.contract.bgBrandSolid} 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.bgBrandSolid} 30%, transparent); }
|
|
21
|
-
& .board-newcard { display: flex; align-items: center; justify-content: center; gap: ${tokens_1.contract.space["1.5"]}; height: 32px; flex-shrink: 0; border: none; border-radius: ${tokens_1.contract.radius.md}; background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, transparent); color: ${tokens_1.contract.fgMuted}; font-family: inherit; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; cursor: pointer; }
|
|
22
|
-
& .board-newcard:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 7%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
23
|
-
& .board-card { display: flex; flex-direction: column; gap: ${tokens_1.contract.space["2"]}; box-sizing: border-box; padding: ${tokens_1.contract.space["2.5"]} ${tokens_1.contract.space["3"]}; border-radius: ${tokens_1.contract.radius.lg}; background: ${tokens_1.contract.bgSurface}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderSubtle}, 0 1px 2px rgba(0,0,0,0.04); cursor: grab; }
|
|
24
|
-
& .board-card:active { cursor: grabbing; }
|
|
25
|
-
& .board-card[data-dragging] { opacity: 0.4; }
|
|
26
|
-
& .board-card:focus { outline: none; }
|
|
27
|
-
& .board-card:focus-visible { outline: 2px solid ${tokens_1.contract.bgBrandSolid}; outline-offset: 1px; }
|
|
12
|
+
& .crisp-board-col { display: flex; flex-direction: column; width: 280px; flex-shrink: 0; max-height: 100%; box-sizing: border-box; }
|
|
13
|
+
& .crisp-board-col-header { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; height: 36px; padding: 0 ${tokens_1.contract.space["1"]}; flex-shrink: 0; }
|
|
14
|
+
& .crisp-board-col-dot { width: 9px; height: 9px; border-radius: ${tokens_1.contract.radius.full}; flex-shrink: 0; }
|
|
15
|
+
& .crisp-board-col-title { font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.semibold}; color: ${tokens_1.contract.fgPrimary}; }
|
|
16
|
+
& .crisp-board-col-count { font-size: ${tokens_1.contract.text.md}; color: ${tokens_1.contract.fgMuted}; }
|
|
17
|
+
& .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: ${tokens_1.contract.radius.md}; background: none; color: ${tokens_1.contract.fgMuted}; font-family: inherit; cursor: pointer; }
|
|
18
|
+
& .crisp-board-col-add:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
19
|
+
& .crisp-board-col-body { display: flex; flex-direction: column; gap: ${tokens_1.contract.space["2"]}; flex: 1; min-height: 48px; padding: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.lg}; overflow-y: auto; transition: background 0.12s; }
|
|
20
|
+
& .crisp-board-col[data-over] .crisp-board-col-body { background: color-mix(in srgb, ${tokens_1.contract.bgBrandSolid} 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.bgBrandSolid} 30%, transparent); }
|
|
21
|
+
& .crisp-board-newcard { display: flex; align-items: center; justify-content: center; gap: ${tokens_1.contract.space["1.5"]}; height: 32px; flex-shrink: 0; border: none; border-radius: ${tokens_1.contract.radius.md}; background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, transparent); color: ${tokens_1.contract.fgMuted}; font-family: inherit; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; cursor: pointer; }
|
|
22
|
+
& .crisp-board-newcard:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 7%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
23
|
+
& .crisp-board-card { display: flex; flex-direction: column; gap: ${tokens_1.contract.space["2"]}; box-sizing: border-box; padding: ${tokens_1.contract.space["2.5"]} ${tokens_1.contract.space["3"]}; border-radius: ${tokens_1.contract.radius.lg}; background: ${tokens_1.contract.bgSurface}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderSubtle}, 0 1px 2px rgba(0,0,0,0.04); cursor: grab; }
|
|
24
|
+
& .crisp-board-card:active { cursor: grabbing; }
|
|
25
|
+
& .crisp-board-card[data-dragging] { opacity: 0.4; }
|
|
26
|
+
& .crisp-board-card:focus { outline: none; }
|
|
27
|
+
& .crisp-board-card:focus-visible { outline: 2px solid ${tokens_1.contract.bgBrandSolid}; outline-offset: 1px; }
|
|
28
28
|
/* announced, never drawn */
|
|
29
|
-
& .board-live {
|
|
29
|
+
& .crisp-board-live {
|
|
30
30
|
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
31
31
|
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
32
32
|
}`,
|
|
@@ -257,9 +257,9 @@ function Command({ open, onOpenChange, items = exports.defaultCommandItems, plac
|
|
|
257
257
|
};
|
|
258
258
|
if (!dlg.open)
|
|
259
259
|
return null;
|
|
260
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Portal, { children: (0, jsx_runtime_1.jsxs)("div", { className: (0, command_recipe_1.commandRecipe)(), children: [(0, jsx_runtime_1.jsx)("div", { ...dlg.getBackdropProps(), className: "command-backdrop" }), (0, jsx_runtime_1.jsx)("div", { ...dlg.getPositionerProps(), className: "command-positioner", children: (0, jsx_runtime_1.jsx)("div", { ...rest, ...(0, core_1.withDescribedBy)(dlg.getContentProps(), describedBy), className: (0, core_1.cx)("command-content", className), children: (0, jsx_runtime_1.jsxs)("div", { className: "command-card", children: [(0, jsx_runtime_1.jsxs)("div", { className: "command-control", children: [(0, jsx_runtime_1.jsx)("label", { ...combo.getLabelProps(), className: "command-srlabel", children: ariaLabel }), (0, jsx_runtime_1.jsx)(IconSearch, {}), (0, jsx_runtime_1.jsx)("input", { ref: inputRef, ...combo.getInputProps(), className: "command-input", placeholder: placeholder })] }), (0, jsx_runtime_1.jsx)("div", { ...combo.getContentProps(), className: "command-list", children: filteredItems.length === 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "command-empty", children: emptyLabel })) : (filteredItems.map((item, i) => {
|
|
260
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Portal, { children: (0, jsx_runtime_1.jsxs)("div", { className: (0, command_recipe_1.commandRecipe)(), children: [(0, jsx_runtime_1.jsx)("div", { ...dlg.getBackdropProps(), className: "crisp-command-backdrop" }), (0, jsx_runtime_1.jsx)("div", { ...dlg.getPositionerProps(), className: "crisp-command-positioner", children: (0, jsx_runtime_1.jsx)("div", { ...rest, ...(0, core_1.withDescribedBy)(dlg.getContentProps(), describedBy), className: (0, core_1.cx)("crisp-command-content", className), children: (0, jsx_runtime_1.jsxs)("div", { className: "crisp-command-card", children: [(0, jsx_runtime_1.jsxs)("div", { className: "crisp-command-control", children: [(0, jsx_runtime_1.jsx)("label", { ...combo.getLabelProps(), className: "crisp-command-srlabel", children: ariaLabel }), (0, jsx_runtime_1.jsx)(IconSearch, {}), (0, jsx_runtime_1.jsx)("input", { ref: inputRef, ...combo.getInputProps(), className: "crisp-command-input", placeholder: placeholder })] }), (0, jsx_runtime_1.jsx)("div", { ...combo.getContentProps(), className: "crisp-command-list", children: filteredItems.length === 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "crisp-command-empty", children: emptyLabel })) : (filteredItems.map((item, i) => {
|
|
261
261
|
const Icon = item.icon;
|
|
262
262
|
const showGroup = item.group && item.group !== filteredItems[i - 1]?.group;
|
|
263
|
-
return ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [showGroup && ((0, jsx_runtime_1.jsx)("div", { className: "command-group-label", "aria-hidden": "true", children: item.group })), (0, jsx_runtime_1.jsxs)("div", { ...combo.getItemProps({ item }), className: "command-item", children: [(0, jsx_runtime_1.jsx)(Icon, {}), (0, jsx_runtime_1.jsx)("span", { className: "command-item-label", children: item.label }), item.shortcut && ((0, jsx_runtime_1.jsx)("span", { className: "command-item-shortcut", children: item.shortcut.map((key) => ((0, jsx_runtime_1.jsx)(kbd_1.Kbd, { children: key }, key))) }))] })] }, item.id));
|
|
264
|
-
})) }), (0, jsx_runtime_1.jsxs)("div", { className: "command-footer", children: [(0, jsx_runtime_1.jsxs)("span", { className: "command-footer-nav", children: [(0, jsx_runtime_1.jsx)(kbd_1.Kbd, { children: "\u2191" }), (0, jsx_runtime_1.jsx)(kbd_1.Kbd, { children: "\u2193" }), navigateLabel] }), (0, jsx_runtime_1.jsxs)("button", { type: "button", className: "command-footer-action", disabled: !highlightedItem, onClick: () => runItem(highlightedItem), children: [(0, jsx_runtime_1.jsx)("span", { className: "command-footer-action-label", children: highlightedItem?.label ?? selectLabel }), (0, jsx_runtime_1.jsx)("span", { className: "command-footer-key", children: "\u21B5" })] })] })] }) }) })] }) }));
|
|
263
|
+
return ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [showGroup && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-command-group-label", "aria-hidden": "true", children: item.group })), (0, jsx_runtime_1.jsxs)("div", { ...combo.getItemProps({ item }), className: "crisp-command-item", children: [(0, jsx_runtime_1.jsx)(Icon, {}), (0, jsx_runtime_1.jsx)("span", { className: "crisp-command-item-label", children: item.label }), item.shortcut && ((0, jsx_runtime_1.jsx)("span", { className: "crisp-command-item-shortcut", children: item.shortcut.map((key) => ((0, jsx_runtime_1.jsx)(kbd_1.Kbd, { children: key }, key))) }))] })] }, item.id));
|
|
264
|
+
})) }), (0, jsx_runtime_1.jsxs)("div", { className: "crisp-command-footer", children: [(0, jsx_runtime_1.jsxs)("span", { className: "crisp-command-footer-nav", children: [(0, jsx_runtime_1.jsx)(kbd_1.Kbd, { children: "\u2191" }), (0, jsx_runtime_1.jsx)(kbd_1.Kbd, { children: "\u2193" }), navigateLabel] }), (0, jsx_runtime_1.jsxs)("button", { type: "button", className: "crisp-command-footer-action", disabled: !highlightedItem, onClick: () => runItem(highlightedItem), children: [(0, jsx_runtime_1.jsx)("span", { className: "crisp-command-footer-action-label", children: highlightedItem?.label ?? selectLabel }), (0, jsx_runtime_1.jsx)("span", { className: "crisp-command-footer-key", children: "\u21B5" })] })] })] }) }) })] }) }));
|
|
265
265
|
}
|
|
@@ -6,36 +6,36 @@ const tokens_1 = require("../../tokens");
|
|
|
6
6
|
const config = (0, core_1.defineRecipe)({
|
|
7
7
|
name: "command",
|
|
8
8
|
base: `display: contents; font-family: ${tokens_1.contract.font.sans}
|
|
9
|
-
; & .command-content, & .command-card { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
|
10
|
-
& .command-backdrop { position: fixed; inset: 0; z-index: 50; background: transparent; }
|
|
11
|
-
& .command-positioner { position: fixed; inset: 0; z-index: 51; display: flex; align-items: flex-start; justify-content: center; padding: 15vh ${tokens_1.contract.space["4"]} ${tokens_1.contract.space["4"]}; }
|
|
12
|
-
& .command-content { position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 90vw; max-width: 748px; max-height: 70vh; padding: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius["2xl"]}; background: color-mix(in srgb, ${tokens_1.contract.bgOverlayFrost} 60%, transparent); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); box-shadow: ${tokens_1.elevation.modal}; opacity: 1; transform: scale(1); transition: opacity 0.2s ease, transform 0.2s ease; @starting-style { opacity: 0; transform: scale(0.97); } }
|
|
13
|
-
& .command-card { display: flex; flex-direction: column; flex: 1; min-height: 0; box-sizing: border-box; border-radius: ${tokens_1.contract.radius.xl}; background: ${tokens_1.contract.bgSurface}; box-shadow: 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.fgPrimary} 8%, transparent); overflow: hidden; }
|
|
14
|
-
& .command-control { display: flex; align-items: center; gap: ${tokens_1.contract.space["2.5"]}; height: 52px; flex-shrink: 0; padding: 0 ${tokens_1.contract.space["4"]}; border-bottom: 1px solid ${tokens_1.contract.borderSubtle}; color: ${tokens_1.contract.fgMuted}; }
|
|
15
|
-
& .command-control svg { flex-shrink: 0; }
|
|
9
|
+
; & .crisp-command-content, & .crisp-command-card { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
|
10
|
+
& .crisp-command-backdrop { position: fixed; inset: 0; z-index: 50; background: transparent; }
|
|
11
|
+
& .crisp-command-positioner { position: fixed; inset: 0; z-index: 51; display: flex; align-items: flex-start; justify-content: center; padding: 15vh ${tokens_1.contract.space["4"]} ${tokens_1.contract.space["4"]}; }
|
|
12
|
+
& .crisp-command-content { position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 90vw; max-width: 748px; max-height: 70vh; padding: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius["2xl"]}; background: color-mix(in srgb, ${tokens_1.contract.bgOverlayFrost} 60%, transparent); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); box-shadow: ${tokens_1.elevation.modal}; opacity: 1; transform: scale(1); transition: opacity 0.2s ease, transform 0.2s ease; @starting-style { opacity: 0; transform: scale(0.97); } }
|
|
13
|
+
& .crisp-command-card { display: flex; flex-direction: column; flex: 1; min-height: 0; box-sizing: border-box; border-radius: ${tokens_1.contract.radius.xl}; background: ${tokens_1.contract.bgSurface}; box-shadow: 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.fgPrimary} 8%, transparent); overflow: hidden; }
|
|
14
|
+
& .crisp-command-control { display: flex; align-items: center; gap: ${tokens_1.contract.space["2.5"]}; height: 52px; flex-shrink: 0; padding: 0 ${tokens_1.contract.space["4"]}; border-bottom: 1px solid ${tokens_1.contract.borderSubtle}; color: ${tokens_1.contract.fgMuted}; }
|
|
15
|
+
& .crisp-command-control svg { flex-shrink: 0; }
|
|
16
16
|
/* The palette's label element. It exists for the assistive tree only: zag's
|
|
17
17
|
combobox names the input through it and points the listbox's
|
|
18
18
|
aria-labelledby at it, and without it both were unnamed and the reference
|
|
19
19
|
resolved to nothing (#225). Clipped rather than display:none, which would
|
|
20
20
|
take it out of the tree it exists for. */
|
|
21
|
-
& .command-srlabel { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
22
|
-
& .command-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: ${tokens_1.contract.font.sans}; font-size: ${tokens_1.contract.text.xl}; color: ${tokens_1.contract.fgPrimary}; }
|
|
23
|
-
& .command-input::placeholder { color: ${tokens_1.contract.fgMuted}; }
|
|
24
|
-
& .command-list { flex: 1; min-height: 0; overflow-y: auto; padding: ${tokens_1.contract.space["1"]} ${tokens_1.contract.space["2.5"]}; display: flex; flex-direction: column; gap: ${tokens_1.contract.space.px}; }
|
|
25
|
-
& .command-empty { padding: ${tokens_1.contract.space["8"]} ${tokens_1.contract.space["3"]}; text-align: center; font-size: ${tokens_1.contract.text.md}; color: ${tokens_1.contract.fgMuted}; }
|
|
26
|
-
& .command-item { box-sizing: border-box; display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; height: 36px; padding-inline: ${tokens_1.contract.space["2.5"]}; border-radius: ${tokens_1.contract.radius.xl}; font-size: ${tokens_1.contract.text.lg}; color: ${tokens_1.contract.fgPrimary}; cursor: pointer; }
|
|
27
|
-
& .command-item svg { flex-shrink: 0; color: ${tokens_1.contract.fgMuted}; }
|
|
28
|
-
& .command-item[data-highlighted] { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, transparent); }
|
|
29
|
-
& .command-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
30
|
-
& .command-item-shortcut { margin-inline-start: auto; flex-shrink: 0; display: flex; align-items: center; gap: ${tokens_1.contract.space["0.5"]}; }
|
|
31
|
-
& .command-group-label { padding: ${tokens_1.contract.space["2"]} ${tokens_1.contract.space["2.5"]} ${tokens_1.contract.space["1"]}; font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 63%, transparent); }
|
|
32
|
-
& .command-list > .command-group-label:first-child { padding-top: ${tokens_1.contract.space["1"]}; }
|
|
33
|
-
& .command-footer { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; height: 44px; padding: 0 ${tokens_1.contract.space["2.5"]}; border-top: 1px solid ${tokens_1.contract.borderSubtle}; }
|
|
34
|
-
& .command-footer-nav { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; font-size: ${tokens_1.contract.text.sm}; color: ${tokens_1.contract.fgMuted}; }
|
|
35
|
-
& .command-footer-action { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; height: 28px; max-width: 60%; padding: 0 ${tokens_1.contract.space["1"]} 0 ${tokens_1.contract.space["2.5"]}; border: none; border-radius: ${tokens_1.contract.radius.md}; background: ${tokens_1.contract.bgBrandSolid}; color: ${tokens_1.contract.fgOnBrand}; font-family: inherit; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; cursor: pointer; }
|
|
36
|
-
& .command-footer-action:disabled { opacity: 0.5; cursor: default; }
|
|
37
|
-
& .command-footer-action-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
38
|
-
& .command-footer-key { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.sm}; background: rgba(255,255,255,0.22); font-size: ${tokens_1.contract.text.xs}; }
|
|
21
|
+
& .crisp-command-srlabel { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
22
|
+
& .crisp-command-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: ${tokens_1.contract.font.sans}; font-size: ${tokens_1.contract.text.xl}; color: ${tokens_1.contract.fgPrimary}; }
|
|
23
|
+
& .crisp-command-input::placeholder { color: ${tokens_1.contract.fgMuted}; }
|
|
24
|
+
& .crisp-command-list { flex: 1; min-height: 0; overflow-y: auto; padding: ${tokens_1.contract.space["1"]} ${tokens_1.contract.space["2.5"]}; display: flex; flex-direction: column; gap: ${tokens_1.contract.space.px}; }
|
|
25
|
+
& .crisp-command-empty { padding: ${tokens_1.contract.space["8"]} ${tokens_1.contract.space["3"]}; text-align: center; font-size: ${tokens_1.contract.text.md}; color: ${tokens_1.contract.fgMuted}; }
|
|
26
|
+
& .crisp-command-item { box-sizing: border-box; display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; height: 36px; padding-inline: ${tokens_1.contract.space["2.5"]}; border-radius: ${tokens_1.contract.radius.xl}; font-size: ${tokens_1.contract.text.lg}; color: ${tokens_1.contract.fgPrimary}; cursor: pointer; }
|
|
27
|
+
& .crisp-command-item svg { flex-shrink: 0; color: ${tokens_1.contract.fgMuted}; }
|
|
28
|
+
& .crisp-command-item[data-highlighted] { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, transparent); }
|
|
29
|
+
& .crisp-command-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
30
|
+
& .crisp-command-item-shortcut { margin-inline-start: auto; flex-shrink: 0; display: flex; align-items: center; gap: ${tokens_1.contract.space["0.5"]}; }
|
|
31
|
+
& .crisp-command-group-label { padding: ${tokens_1.contract.space["2"]} ${tokens_1.contract.space["2.5"]} ${tokens_1.contract.space["1"]}; font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 63%, transparent); }
|
|
32
|
+
& .crisp-command-list > .crisp-command-group-label:first-child { padding-top: ${tokens_1.contract.space["1"]}; }
|
|
33
|
+
& .crisp-command-footer { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; height: 44px; padding: 0 ${tokens_1.contract.space["2.5"]}; border-top: 1px solid ${tokens_1.contract.borderSubtle}; }
|
|
34
|
+
& .crisp-command-footer-nav { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; font-size: ${tokens_1.contract.text.sm}; color: ${tokens_1.contract.fgMuted}; }
|
|
35
|
+
& .crisp-command-footer-action { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; height: 28px; max-width: 60%; padding: 0 ${tokens_1.contract.space["1"]} 0 ${tokens_1.contract.space["2.5"]}; border: none; border-radius: ${tokens_1.contract.radius.md}; background: ${tokens_1.contract.bgBrandSolid}; color: ${tokens_1.contract.fgOnBrand}; font-family: inherit; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; cursor: pointer; }
|
|
36
|
+
& .crisp-command-footer-action:disabled { opacity: 0.5; cursor: default; }
|
|
37
|
+
& .crisp-command-footer-action-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
38
|
+
& .crisp-command-footer-key { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.sm}; background: rgba(255,255,255,0.22); font-size: ${tokens_1.contract.text.xs}; }
|
|
39
39
|
`,
|
|
40
40
|
variants: {},
|
|
41
41
|
defaultVariants: {},
|
|
@@ -9,6 +9,6 @@ const entitycard_recipe_1 = require("./entitycard.recipe");
|
|
|
9
9
|
* right-aligned date. Rendered as a button so the whole card is clickable.
|
|
10
10
|
*/
|
|
11
11
|
function EntityCard({ author, title, excerpt, footer, date, onClick, "aria-label": ariaLabel, className, ...rest }) {
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: (0, entitycard_recipe_1.entitycardRecipe)({ className }), ...rest, onClick: onClick, "aria-label": ariaLabel, children: [author != null && (0, jsx_runtime_1.jsx)("span", { className: "entitycard-author", children: author }), (0, jsx_runtime_1.jsx)("span", { className: "entitycard-title", children: title }), excerpt != null && (0, jsx_runtime_1.jsx)("span", { className: "entitycard-excerpt", children: excerpt }), (0, jsx_runtime_1.jsx)("span", { className: "entitycard-spacer" }), (footer != null || date != null) && ((0, jsx_runtime_1.jsxs)("span", { className: "entitycard-foot", children: [footer, date != null && (0, jsx_runtime_1.jsx)("span", { className: "entitycard-date", children: date })] }))] }));
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: (0, entitycard_recipe_1.entitycardRecipe)({ className }), ...rest, onClick: onClick, "aria-label": ariaLabel, children: [author != null && ((0, jsx_runtime_1.jsx)("span", { className: "crisp-entitycard-author", children: author })), (0, jsx_runtime_1.jsx)("span", { className: "crisp-entitycard-title", children: title }), excerpt != null && ((0, jsx_runtime_1.jsx)("span", { className: "crisp-entitycard-excerpt", children: excerpt })), (0, jsx_runtime_1.jsx)("span", { className: "crisp-entitycard-spacer" }), (footer != null || date != null) && ((0, jsx_runtime_1.jsxs)("span", { className: "crisp-entitycard-foot", children: [footer, date != null && ((0, jsx_runtime_1.jsx)("span", { className: "crisp-entitycard-date", children: date }))] }))] }));
|
|
13
13
|
}
|
|
14
14
|
EntityCard.displayName = "EntityCard";
|
|
@@ -17,13 +17,13 @@ const config = (0, core_1.defineRecipe)({
|
|
|
17
17
|
&:hover { box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderDefault}, 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
|
|
18
18
|
&:focus-visible { outline: 2px solid ${tokens_1.contract.bgBrandSolid}; outline-offset: 2px; }
|
|
19
19
|
|
|
20
|
-
& .entitycard-author { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgMuted}; }
|
|
21
|
-
& .entitycard-title { margin-top: ${tokens_1.contract.space["2"]}; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.semibold}; letter-spacing: -0.1px; color: ${tokens_1.contract.fgPrimary}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
22
|
-
& .entitycard-excerpt { margin-top: ${tokens_1.contract.space["1"]}; font-size: ${tokens_1.contract.text.md}; line-height: 18px; color: ${tokens_1.contract.fgMuted}; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
23
|
-
& .entitycard-spacer { flex: 1; min-height: ${tokens_1.contract.space["3"]}; }
|
|
24
|
-
& .entitycard-foot { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; padding-top: ${tokens_1.contract.space["2.5"]}; margin-top: ${tokens_1.contract.space["1"]}; border-top: 1px solid ${tokens_1.contract.borderSubtle}; font-size: ${tokens_1.contract.text.sm}; color: ${tokens_1.contract.fgMuted}; }
|
|
25
|
-
& .entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${tokens_1.contract.fgPrimary}; }
|
|
26
|
-
& .entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }`,
|
|
20
|
+
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgMuted}; }
|
|
21
|
+
& .crisp-entitycard-title { margin-top: ${tokens_1.contract.space["2"]}; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.semibold}; letter-spacing: -0.1px; color: ${tokens_1.contract.fgPrimary}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
22
|
+
& .crisp-entitycard-excerpt { margin-top: ${tokens_1.contract.space["1"]}; font-size: ${tokens_1.contract.text.md}; line-height: 18px; color: ${tokens_1.contract.fgMuted}; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
23
|
+
& .crisp-entitycard-spacer { flex: 1; min-height: ${tokens_1.contract.space["3"]}; }
|
|
24
|
+
& .crisp-entitycard-foot { display: flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; padding-top: ${tokens_1.contract.space["2.5"]}; margin-top: ${tokens_1.contract.space["1"]}; border-top: 1px solid ${tokens_1.contract.borderSubtle}; font-size: ${tokens_1.contract.text.sm}; color: ${tokens_1.contract.fgMuted}; }
|
|
25
|
+
& .crisp-entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${tokens_1.contract.fgPrimary}; }
|
|
26
|
+
& .crisp-entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }`,
|
|
27
27
|
variants: {},
|
|
28
28
|
defaultVariants: {},
|
|
29
29
|
compoundVariants: [],
|
|
@@ -100,9 +100,9 @@ function FlowCanvas({ nodes, edges, onNodesChange, renderNode, nodeWidth = 240,
|
|
|
100
100
|
...rest.style,
|
|
101
101
|
backgroundSize: `${GRID * zoom}px ${GRID * zoom}px`,
|
|
102
102
|
backgroundPosition: `${pan.x}px ${pan.y}px`,
|
|
103
|
-
}, role: "application", "aria-label": ariaLabel ?? "Flow canvas", onPointerDown: onBackgroundPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flowcanvas-viewport", style: {
|
|
103
|
+
}, role: "application", "aria-label": ariaLabel ?? "Flow canvas", onPointerDown: onBackgroundPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, children: [(0, jsx_runtime_1.jsxs)("div", { className: "crisp-flowcanvas-viewport", style: {
|
|
104
104
|
transform: `translate(${pan.x}px, ${pan.y}px) scale(${zoom})`,
|
|
105
|
-
}, children: [(0, jsx_runtime_1.jsxs)("svg", { className: "flowcanvas-edges", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("title", { children: edgesLabel }), edges.map((edge) => {
|
|
105
|
+
}, children: [(0, jsx_runtime_1.jsxs)("svg", { className: "crisp-flowcanvas-edges", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("title", { children: edgesLabel }), edges.map((edge) => {
|
|
106
106
|
const a = byId.get(edge.from);
|
|
107
107
|
const b = byId.get(edge.to);
|
|
108
108
|
if (!a || !b)
|
|
@@ -112,12 +112,12 @@ function FlowCanvas({ nodes, edges, onNodesChange, renderNode, nodeWidth = 240,
|
|
|
112
112
|
const tx = b.x;
|
|
113
113
|
const ty = b.y + nodeHeight / 2;
|
|
114
114
|
const c = Math.max(30, Math.abs(tx - sx) / 2);
|
|
115
|
-
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("path", { className: "flowcanvas-edge", d: `M ${sx} ${sy} C ${sx + c} ${sy}, ${tx - c} ${ty}, ${tx} ${ty}` }), (0, jsx_runtime_1.jsx)("circle", { className: "flowcanvas-edge-dot", cx: sx, cy: sy, r: 3 }), (0, jsx_runtime_1.jsx)("circle", { className: "flowcanvas-edge-dot", cx: tx, cy: ty, r: 3 })] }, `${edge.from}-${edge.to}`));
|
|
116
|
-
})] }), nodes.map((node) => ((0, jsx_runtime_1.jsx)("div", { className: "flowcanvas-node", "data-dragging": drag.current &&
|
|
115
|
+
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("path", { className: "crisp-flowcanvas-edge", d: `M ${sx} ${sy} C ${sx + c} ${sy}, ${tx - c} ${ty}, ${tx} ${ty}` }), (0, jsx_runtime_1.jsx)("circle", { className: "crisp-flowcanvas-edge-dot", cx: sx, cy: sy, r: 3 }), (0, jsx_runtime_1.jsx)("circle", { className: "crisp-flowcanvas-edge-dot", cx: tx, cy: ty, r: 3 })] }, `${edge.from}-${edge.to}`));
|
|
116
|
+
})] }), nodes.map((node) => ((0, jsx_runtime_1.jsx)("div", { className: "crisp-flowcanvas-node", "data-dragging": drag.current &&
|
|
117
117
|
"id" in drag.current &&
|
|
118
118
|
drag.current.id === node.id
|
|
119
119
|
? ""
|
|
120
|
-
: undefined, style: { left: node.x, top: node.y, width: nodeWidth }, onPointerDown: (e) => onNodePointerDown(e, node), children: renderNode(node) }, node.id)))] }), (0, jsx_runtime_1.jsxs)("div", { className: "flowcanvas-toolbar", children: [(0, jsx_runtime_1.jsx)("button", { type: "button", className: "flowcanvas-tool", "aria-label": zoomOutLabel, onClick: () => setZoom((z) => clampZoom(z - 0.1)), children: (0, jsx_runtime_1.jsx)(lucide_react_1.Minus, { size: 16, strokeWidth: 2 }) }), (0, jsx_runtime_1.jsxs)("span", { className: "flowcanvas-tool flowcanvas-tool-zoom", "aria-live": "polite", children: [Math.round(zoom * 100), "%"] }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "flowcanvas-tool", "aria-label": zoomInLabel, onClick: () => setZoom((z) => clampZoom(z + 0.1)), children: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 16, strokeWidth: 2 }) }), (0, jsx_runtime_1.jsx)("span", { className: "flowcanvas-tool-sep" }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "flowcanvas-tool", onClick: () => {
|
|
120
|
+
: undefined, style: { left: node.x, top: node.y, width: nodeWidth }, onPointerDown: (e) => onNodePointerDown(e, node), children: renderNode(node) }, node.id)))] }), (0, jsx_runtime_1.jsxs)("div", { className: "crisp-flowcanvas-toolbar", children: [(0, jsx_runtime_1.jsx)("button", { type: "button", className: "crisp-flowcanvas-tool", "aria-label": zoomOutLabel, onClick: () => setZoom((z) => clampZoom(z - 0.1)), children: (0, jsx_runtime_1.jsx)(lucide_react_1.Minus, { size: 16, strokeWidth: 2 }) }), (0, jsx_runtime_1.jsxs)("span", { className: "crisp-flowcanvas-tool crisp-flowcanvas-tool-zoom", "aria-live": "polite", children: [Math.round(zoom * 100), "%"] }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "crisp-flowcanvas-tool", "aria-label": zoomInLabel, onClick: () => setZoom((z) => clampZoom(z + 0.1)), children: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 16, strokeWidth: 2 }) }), (0, jsx_runtime_1.jsx)("span", { className: "crisp-flowcanvas-tool-sep" }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "crisp-flowcanvas-tool", onClick: () => {
|
|
121
121
|
setZoom(1);
|
|
122
122
|
setPan({ x: 40, y: 40 });
|
|
123
123
|
}, children: resetLabel })] })] }));
|
|
@@ -9,17 +9,17 @@ const config = (0, core_1.defineRecipe)({
|
|
|
9
9
|
name: "flowcanvas",
|
|
10
10
|
base: `position: relative; overflow: hidden; box-sizing: border-box; width: 100%; height: 100%; background-color: ${tokens_1.contract.bgSurface}; background-image: radial-gradient(circle, color-mix(in srgb, ${tokens_1.contract.fgPrimary} 14%, transparent) 1px, transparent 1px); font-family: ${tokens_1.contract.font.sans}; cursor: grab; touch-action: none; user-select: none;
|
|
11
11
|
&[data-panning] { cursor: grabbing; }
|
|
12
|
-
& .flowcanvas-viewport { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
|
|
13
|
-
& .flowcanvas-edges { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
|
|
14
|
-
& .flowcanvas-edge { fill: none; stroke: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 28%, transparent); stroke-width: 1.5; }
|
|
15
|
-
& .flowcanvas-edge-dot { fill: ${tokens_1.contract.bgBrandSolid}; }
|
|
16
|
-
& .flowcanvas-node { position: absolute; cursor: grab; }
|
|
17
|
-
& .flowcanvas-node[data-dragging] { cursor: grabbing; z-index: 10; }
|
|
18
|
-
& .flowcanvas-toolbar { position: absolute; bottom: ${tokens_1.contract.space["4"]}; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; padding: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.lg}; background: ${tokens_1.contract.bgRaised}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderDefault}, 0 4px 14px -4px rgba(28,40,64,0.16); }
|
|
19
|
-
& .flowcanvas-tool { display: inline-flex; align-items: center; justify-content: center; gap: ${tokens_1.contract.space["1"]}; height: 30px; min-width: 30px; padding: 0 ${tokens_1.contract.space["2"]}; margin: 0; border: none; border-radius: ${tokens_1.contract.radius.md}; background: none; color: ${tokens_1.contract.fgMuted}; font-family: inherit; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; cursor: pointer; }
|
|
20
|
-
& .flowcanvas-tool:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
21
|
-
& .flowcanvas-tool-zoom { min-width: 48px; }
|
|
22
|
-
& .flowcanvas-tool-sep { width: 1px; height: 18px; background: ${tokens_1.contract.borderSubtle}; }`,
|
|
12
|
+
& .crisp-flowcanvas-viewport { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
|
|
13
|
+
& .crisp-flowcanvas-edges { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
|
|
14
|
+
& .crisp-flowcanvas-edge { fill: none; stroke: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 28%, transparent); stroke-width: 1.5; }
|
|
15
|
+
& .crisp-flowcanvas-edge-dot { fill: ${tokens_1.contract.bgBrandSolid}; }
|
|
16
|
+
& .crisp-flowcanvas-node { position: absolute; cursor: grab; }
|
|
17
|
+
& .crisp-flowcanvas-node[data-dragging] { cursor: grabbing; z-index: 10; }
|
|
18
|
+
& .crisp-flowcanvas-toolbar { position: absolute; bottom: ${tokens_1.contract.space["4"]}; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; padding: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.lg}; background: ${tokens_1.contract.bgRaised}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderDefault}, 0 4px 14px -4px rgba(28,40,64,0.16); }
|
|
19
|
+
& .crisp-flowcanvas-tool { display: inline-flex; align-items: center; justify-content: center; gap: ${tokens_1.contract.space["1"]}; height: 30px; min-width: 30px; padding: 0 ${tokens_1.contract.space["2"]}; margin: 0; border: none; border-radius: ${tokens_1.contract.radius.md}; background: none; color: ${tokens_1.contract.fgMuted}; font-family: inherit; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; cursor: pointer; }
|
|
20
|
+
& .crisp-flowcanvas-tool:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
21
|
+
& .crisp-flowcanvas-tool-zoom { min-width: 48px; }
|
|
22
|
+
& .crisp-flowcanvas-tool-sep { width: 1px; height: 18px; background: ${tokens_1.contract.borderSubtle}; }`,
|
|
23
23
|
variants: {},
|
|
24
24
|
defaultVariants: {},
|
|
25
25
|
compoundVariants: [],
|
|
@@ -56,6 +56,6 @@ function Inbox({ notifications = [], title = "Notifications", tabs, activeTab, o
|
|
|
56
56
|
select: (id) => onTabChange?.(id),
|
|
57
57
|
listRef,
|
|
58
58
|
});
|
|
59
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, inbox_recipe_1.inboxRecipe)({ className }), ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: "inbox-head", children: [(0, jsx_runtime_1.jsx)("div", { className: "inbox-title", children: title }), tabs && tabs.length > 0 && ((0, jsx_runtime_1.jsx)("div", { ref: listRef, className: "inbox-tabs", role: "tablist", "aria-label": tabsLabel, onKeyDown: onKeyDown, children: tabs.map((t) => ((0, jsx_runtime_1.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 && ((0, jsx_runtime_1.jsxs)("span", { className: "inbox-tab-count", children: ["(", t.count, ")"] }))] }, t.id))) }))] }), notifications.length === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "inbox-empty", children: [(0, jsx_runtime_1.jsx)("span", { className: "inbox-empty-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Bell, { size: 40, strokeWidth: 1.25 }) }), (0, jsx_runtime_1.jsx)("div", { className: "inbox-empty-title", children: emptyTitle }), emptySubtitle != null && ((0, jsx_runtime_1.jsx)("div", { className: "inbox-empty-sub", children: emptySubtitle })), emptyAction != null && ((0, jsx_runtime_1.jsx)("div", { className: "inbox-empty-action", children: emptyAction }))] })) : ((0, jsx_runtime_1.jsx)("div", { className: "inbox-list", children: notifications.map((n) => ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: "inbox-row", onClick: n.onClick, children: [n.avatar != null && ((0, jsx_runtime_1.jsx)("span", { className: "inbox-row-avatar", children: n.avatar })), (0, jsx_runtime_1.jsxs)("span", { className: "inbox-row-body", children: [(0, jsx_runtime_1.jsx)("span", { className: "inbox-row-msg", children: n.message }), n.time != null && ((0, jsx_runtime_1.jsx)("span", { className: "inbox-row-time", children: n.time }))] }), n.unread && (0, jsx_runtime_1.jsx)("span", { className: "inbox-row-unread" })] }, n.id))) }))] }));
|
|
59
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, inbox_recipe_1.inboxRecipe)({ className }), ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: "crisp-inbox-head", children: [(0, jsx_runtime_1.jsx)("div", { className: "crisp-inbox-title", children: title }), tabs && tabs.length > 0 && ((0, jsx_runtime_1.jsx)("div", { ref: listRef, className: "crisp-inbox-tabs", role: "tablist", "aria-label": tabsLabel, onKeyDown: onKeyDown, children: tabs.map((t) => ((0, jsx_runtime_1.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 && ((0, jsx_runtime_1.jsxs)("span", { className: "crisp-inbox-tab-count", children: ["(", t.count, ")"] }))] }, t.id))) }))] }), notifications.length === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "crisp-inbox-empty", children: [(0, jsx_runtime_1.jsx)("span", { className: "crisp-inbox-empty-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Bell, { size: 40, strokeWidth: 1.25 }) }), (0, jsx_runtime_1.jsx)("div", { className: "crisp-inbox-empty-title", children: emptyTitle }), emptySubtitle != null && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-inbox-empty-sub", children: emptySubtitle })), emptyAction != null && ((0, jsx_runtime_1.jsx)("div", { className: "crisp-inbox-empty-action", children: emptyAction }))] })) : ((0, jsx_runtime_1.jsx)("div", { className: "crisp-inbox-list", children: notifications.map((n) => ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: "crisp-inbox-row", onClick: n.onClick, children: [n.avatar != null && ((0, jsx_runtime_1.jsx)("span", { className: "crisp-inbox-row-avatar", children: n.avatar })), (0, jsx_runtime_1.jsxs)("span", { className: "crisp-inbox-row-body", children: [(0, jsx_runtime_1.jsx)("span", { className: "crisp-inbox-row-msg", children: n.message }), n.time != null && ((0, jsx_runtime_1.jsx)("span", { className: "crisp-inbox-row-time", children: n.time }))] }), n.unread && (0, jsx_runtime_1.jsx)("span", { className: "crisp-inbox-row-unread" })] }, n.id))) }))] }));
|
|
60
60
|
}
|
|
61
61
|
Inbox.displayName = "Inbox";
|
|
@@ -14,30 +14,30 @@ const config = (0, core_1.defineRecipe)({
|
|
|
14
14
|
box-shadow: inset 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent), 0 8px 28px -6px rgba(28,40,64,0.16), 0 2px 6px -2px rgba(28,40,64,0.10);
|
|
15
15
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
16
16
|
|
|
17
|
-
& .inbox-head { padding: ${tokens_1.contract.space["3"]} ${tokens_1.contract.space["3"]} 0; }
|
|
18
|
-
& .inbox-title { font-size: ${tokens_1.contract.text.xl}; line-height: 28px; font-weight: ${tokens_1.contract.weight.semibold}; letter-spacing: -0.3px; color: ${tokens_1.contract.fgPrimary}; }
|
|
19
|
-
& .inbox-tabs { display: flex; gap: ${tokens_1.contract.space["3"]}; margin-top: ${tokens_1.contract.space["2"]}; box-shadow: inset 0 -1px 0 ${tokens_1.contract.borderSubtle}; }
|
|
20
|
-
& .inbox-tab { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; height: 32px; padding: 0 2px; margin: 0; border: none; background: none; font-family: inherit; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgMuted}; cursor: pointer; box-shadow: inset 0 -2px 0 transparent; transition: color .12s, box-shadow .12s; }
|
|
21
|
-
& .inbox-tab:hover { color: ${tokens_1.contract.fgPrimary}; }
|
|
22
|
-
& .inbox-tab[data-active] { color: ${tokens_1.contract.bgBrandSolid}; box-shadow: inset 0 -2px 0 ${tokens_1.contract.bgBrandSolid}; }
|
|
23
|
-
& .inbox-tab-count { font-size: ${tokens_1.contract.text.sm}; color: ${tokens_1.contract.fgMuted}; }
|
|
24
|
-
& .inbox-tab[data-active] .inbox-tab-count { color: ${tokens_1.contract.bgBrandSolid}; }
|
|
17
|
+
& .crisp-inbox-head { padding: ${tokens_1.contract.space["3"]} ${tokens_1.contract.space["3"]} 0; }
|
|
18
|
+
& .crisp-inbox-title { font-size: ${tokens_1.contract.text.xl}; line-height: 28px; font-weight: ${tokens_1.contract.weight.semibold}; letter-spacing: -0.3px; color: ${tokens_1.contract.fgPrimary}; }
|
|
19
|
+
& .crisp-inbox-tabs { display: flex; gap: ${tokens_1.contract.space["3"]}; margin-top: ${tokens_1.contract.space["2"]}; box-shadow: inset 0 -1px 0 ${tokens_1.contract.borderSubtle}; }
|
|
20
|
+
& .crisp-inbox-tab { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1.5"]}; height: 32px; padding: 0 2px; margin: 0; border: none; background: none; font-family: inherit; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgMuted}; cursor: pointer; box-shadow: inset 0 -2px 0 transparent; transition: color .12s, box-shadow .12s; }
|
|
21
|
+
& .crisp-inbox-tab:hover { color: ${tokens_1.contract.fgPrimary}; }
|
|
22
|
+
& .crisp-inbox-tab[data-active] { color: ${tokens_1.contract.bgBrandSolid}; box-shadow: inset 0 -2px 0 ${tokens_1.contract.bgBrandSolid}; }
|
|
23
|
+
& .crisp-inbox-tab-count { font-size: ${tokens_1.contract.text.sm}; color: ${tokens_1.contract.fgMuted}; }
|
|
24
|
+
& .crisp-inbox-tab[data-active] .crisp-inbox-tab-count { color: ${tokens_1.contract.bgBrandSolid}; }
|
|
25
25
|
|
|
26
|
-
& .inbox-list { flex: 1; min-height: 0; overflow-y: auto; padding: ${tokens_1.contract.space["1"]}; display: flex; flex-direction: column; gap: 1px; }
|
|
27
|
-
& .inbox-row { display: flex; align-items: flex-start; gap: ${tokens_1.contract.space["2.5"]}; padding: ${tokens_1.contract.space["2"]} ${tokens_1.contract.space["2"]}; margin: 0; border: none; border-radius: ${tokens_1.contract.radius.md}; background: none; font-family: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
28
|
-
& .inbox-row:hover { background: ${tokens_1.contract.bgRaised}; }
|
|
29
|
-
& .inbox-row-avatar { flex-shrink: 0; margin-top: 1px; }
|
|
30
|
-
& .inbox-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
31
|
-
& .inbox-row-msg { font-size: ${tokens_1.contract.text.lg}; line-height: 18px; color: ${tokens_1.contract.fgPrimary}; }
|
|
32
|
-
& .inbox-row-msg b { font-weight: ${tokens_1.contract.weight.semibold}; }
|
|
33
|
-
& .inbox-row-time { font-size: ${tokens_1.contract.text.sm}; color: ${tokens_1.contract.fgMuted}; }
|
|
34
|
-
& .inbox-row-unread { flex-shrink: 0; width: 8px; height: 8px; margin-top: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.full}; background: ${tokens_1.contract.bgBrandSolid}; }
|
|
26
|
+
& .crisp-inbox-list { flex: 1; min-height: 0; overflow-y: auto; padding: ${tokens_1.contract.space["1"]}; display: flex; flex-direction: column; gap: 1px; }
|
|
27
|
+
& .crisp-inbox-row { display: flex; align-items: flex-start; gap: ${tokens_1.contract.space["2.5"]}; padding: ${tokens_1.contract.space["2"]} ${tokens_1.contract.space["2"]}; margin: 0; border: none; border-radius: ${tokens_1.contract.radius.md}; background: none; font-family: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
28
|
+
& .crisp-inbox-row:hover { background: ${tokens_1.contract.bgRaised}; }
|
|
29
|
+
& .crisp-inbox-row-avatar { flex-shrink: 0; margin-top: 1px; }
|
|
30
|
+
& .crisp-inbox-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
31
|
+
& .crisp-inbox-row-msg { font-size: ${tokens_1.contract.text.lg}; line-height: 18px; color: ${tokens_1.contract.fgPrimary}; }
|
|
32
|
+
& .crisp-inbox-row-msg b { font-weight: ${tokens_1.contract.weight.semibold}; }
|
|
33
|
+
& .crisp-inbox-row-time { font-size: ${tokens_1.contract.text.sm}; color: ${tokens_1.contract.fgMuted}; }
|
|
34
|
+
& .crisp-inbox-row-unread { flex-shrink: 0; width: 8px; height: 8px; margin-top: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.full}; background: ${tokens_1.contract.bgBrandSolid}; }
|
|
35
35
|
|
|
36
|
-
& .inbox-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: ${tokens_1.contract.space["1"]}; padding: ${tokens_1.contract.space["6"]} ${tokens_1.contract.space["4"]}; text-align: center; }
|
|
37
|
-
& .inbox-empty-icon { display: inline-flex; margin-bottom: ${tokens_1.contract.space["2"]}; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 22%, transparent); }
|
|
38
|
-
& .inbox-empty-title { font-size: ${tokens_1.contract.text.xl}; font-weight: ${tokens_1.contract.weight.semibold}; color: ${tokens_1.contract.fgPrimary}; }
|
|
39
|
-
& .inbox-empty-sub { font-size: ${tokens_1.contract.text.md}; line-height: 18px; color: ${tokens_1.contract.fgMuted}; max-width: 260px; }
|
|
40
|
-
& .inbox-empty-action { margin-top: ${tokens_1.contract.space["2"]}; }`,
|
|
36
|
+
& .crisp-inbox-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: ${tokens_1.contract.space["1"]}; padding: ${tokens_1.contract.space["6"]} ${tokens_1.contract.space["4"]}; text-align: center; }
|
|
37
|
+
& .crisp-inbox-empty-icon { display: inline-flex; margin-bottom: ${tokens_1.contract.space["2"]}; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 22%, transparent); }
|
|
38
|
+
& .crisp-inbox-empty-title { font-size: ${tokens_1.contract.text.xl}; font-weight: ${tokens_1.contract.weight.semibold}; color: ${tokens_1.contract.fgPrimary}; }
|
|
39
|
+
& .crisp-inbox-empty-sub { font-size: ${tokens_1.contract.text.md}; line-height: 18px; color: ${tokens_1.contract.fgMuted}; max-width: 260px; }
|
|
40
|
+
& .crisp-inbox-empty-action { margin-top: ${tokens_1.contract.space["2"]}; }`,
|
|
41
41
|
variants: {},
|
|
42
42
|
defaultVariants: {},
|
|
43
43
|
compoundVariants: [],
|