@crisp-ui-kit/crisp 0.5.0 → 0.7.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/README.md +14 -0
- package/dist/accordion.css +9 -1
- package/dist/appshell.css +12 -4
- package/dist/authshell.css +57 -0
- package/dist/authshell.d.ts +7 -0
- package/dist/avatargroup.css +2 -2
- package/dist/badge.css +4 -4
- package/dist/barchart.css +13 -5
- package/dist/board.css +9 -1
- package/dist/bulkbar.css +11 -3
- package/dist/button.css +15 -1
- package/dist/button.d.ts +2 -1
- package/dist/card.css +8 -0
- package/dist/checkbox.css +17 -1
- package/dist/cjs/components/accordion/accordion.js +69 -0
- package/dist/cjs/components/accordion/accordion.recipe.js +26 -0
- package/dist/cjs/components/accordion/index.js +7 -0
- package/dist/cjs/components/avatar/avatar.js +44 -0
- package/dist/cjs/components/avatar/avatar.recipe.js +42 -0
- package/dist/cjs/components/avatar/index.js +7 -0
- package/dist/cjs/components/avatargroup/avatargroup.js +52 -0
- package/dist/cjs/components/avatargroup/avatargroup.recipe.js +18 -0
- package/dist/cjs/components/avatargroup/index.js +7 -0
- package/dist/cjs/components/badge/badge.js +44 -0
- package/dist/cjs/components/badge/badge.recipe.js +68 -0
- package/dist/cjs/components/badge/index.js +7 -0
- package/dist/cjs/components/barchart/barchart.js +45 -0
- package/dist/cjs/components/barchart/barchart.recipe.js +34 -0
- package/dist/cjs/components/barchart/index.js +7 -0
- package/dist/cjs/components/breadcrumb/breadcrumb.js +53 -0
- package/dist/cjs/components/breadcrumb/breadcrumb.recipe.js +21 -0
- package/dist/cjs/components/breadcrumb/index.js +7 -0
- package/dist/cjs/components/bulkbar/bulkbar.js +53 -0
- package/dist/cjs/components/bulkbar/bulkbar.recipe.js +31 -0
- package/dist/cjs/components/bulkbar/index.js +8 -0
- package/dist/cjs/components/button/button.js +62 -0
- package/dist/cjs/components/button/button.recipe.js +58 -0
- package/dist/cjs/components/button/index.js +7 -0
- package/dist/cjs/components/callout/callout.js +25 -0
- package/dist/cjs/components/callout/callout.recipe.js +29 -0
- package/dist/cjs/components/callout/index.js +7 -0
- package/dist/cjs/components/card/card.js +54 -0
- package/dist/cjs/components/card/card.recipe.js +31 -0
- package/dist/cjs/components/card/index.js +10 -0
- package/dist/cjs/components/checkbox/checkbox.js +56 -0
- package/dist/cjs/components/checkbox/checkbox.recipe.js +34 -0
- package/dist/cjs/components/checkbox/index.js +7 -0
- package/dist/cjs/components/columncalc/columncalc.js +139 -0
- package/dist/cjs/components/columncalc/columncalc.recipe.js +33 -0
- package/dist/cjs/components/columncalc/index.js +10 -0
- package/dist/cjs/components/contextmenu/contextmenu.js +78 -0
- package/dist/cjs/components/contextmenu/contextmenu.recipe.js +24 -0
- package/dist/cjs/components/contextmenu/index.js +7 -0
- package/dist/cjs/components/datatable/datatable.js +508 -0
- package/dist/cjs/components/datatable/datatable.recipe.js +113 -0
- package/dist/cjs/components/datatable/index.js +7 -0
- package/dist/cjs/components/datepicker/datepicker.js +153 -0
- package/dist/cjs/components/datepicker/datepicker.recipe.js +190 -0
- package/dist/cjs/components/datepicker/index.js +19 -0
- package/dist/cjs/components/datepickerfield/datepickerfield.js +85 -0
- package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +44 -0
- package/dist/cjs/components/datepickerfield/index.js +7 -0
- package/dist/cjs/components/dialog/dialog.js +86 -0
- package/dist/cjs/components/dialog/dialog.recipe.js +35 -0
- package/dist/cjs/components/dialog/index.js +9 -0
- package/dist/cjs/components/divider/divider.js +10 -0
- package/dist/cjs/components/divider/divider.recipe.js +17 -0
- package/dist/cjs/components/divider/index.js +7 -0
- package/dist/cjs/components/donutchart/donutchart.js +41 -0
- package/dist/cjs/components/donutchart/donutchart.recipe.js +30 -0
- package/dist/cjs/components/donutchart/index.js +7 -0
- package/dist/cjs/components/drawer/drawer.js +80 -0
- package/dist/cjs/components/drawer/drawer.recipe.js +30 -0
- package/dist/cjs/components/drawer/index.js +9 -0
- package/dist/cjs/components/emptystate/emptystate.js +10 -0
- package/dist/cjs/components/emptystate/emptystate.recipe.js +34 -0
- package/dist/cjs/components/emptystate/index.js +7 -0
- package/dist/cjs/components/formfield/formfield.js +50 -0
- package/dist/cjs/components/formfield/formfield.recipe.js +22 -0
- package/dist/cjs/components/formfield/index.js +7 -0
- package/dist/cjs/components/input/index.js +7 -0
- package/dist/cjs/components/input/input.js +47 -0
- package/dist/cjs/components/input/input.recipe.js +59 -0
- package/dist/cjs/components/kbd/index.js +7 -0
- package/dist/cjs/components/kbd/kbd.js +44 -0
- package/dist/cjs/components/kbd/kbd.recipe.js +23 -0
- package/dist/cjs/components/linechart/index.js +7 -0
- package/dist/cjs/components/linechart/linechart.js +57 -0
- package/dist/cjs/components/linechart/linechart.recipe.js +35 -0
- package/dist/cjs/components/menu/index.js +14 -0
- package/dist/cjs/components/menu/menu-keyboard.js +117 -0
- package/dist/cjs/components/menu/menu.js +144 -0
- package/dist/cjs/components/menu/menu.recipe.js +54 -0
- package/dist/cjs/components/multiselect/index.js +7 -0
- package/dist/cjs/components/multiselect/multiselect.js +161 -0
- package/dist/cjs/components/multiselect/multiselect.recipe.js +71 -0
- package/dist/cjs/components/popover/index.js +7 -0
- package/dist/cjs/components/popover/popover.js +106 -0
- package/dist/cjs/components/popover/popover.recipe.js +21 -0
- package/dist/cjs/components/progress/index.js +7 -0
- package/dist/cjs/components/progress/progress.js +26 -0
- package/dist/cjs/components/progress/progress.recipe.js +20 -0
- package/dist/cjs/components/radiogroup/index.js +8 -0
- package/dist/cjs/components/radiogroup/radiogroup.js +83 -0
- package/dist/cjs/components/radiogroup/radiogroup.recipe.js +40 -0
- package/dist/cjs/components/resizablepanel/index.js +12 -0
- package/dist/cjs/components/resizablepanel/resizablepanel.js +176 -0
- package/dist/cjs/components/resizablepanel/resizablepanel.recipe.js +69 -0
- package/dist/cjs/components/segmented/index.js +7 -0
- package/dist/cjs/components/segmented/segmented.js +95 -0
- package/dist/cjs/components/segmented/segmented.recipe.js +23 -0
- package/dist/cjs/components/select/index.js +7 -0
- package/dist/cjs/components/select/select.js +180 -0
- package/dist/cjs/components/select/select.recipe.js +79 -0
- package/dist/cjs/components/skeleton/index.js +7 -0
- package/dist/cjs/components/skeleton/skeleton.js +13 -0
- package/dist/cjs/components/skeleton/skeleton.recipe.js +17 -0
- package/dist/cjs/components/spinner/index.js +7 -0
- package/dist/cjs/components/spinner/spinner.js +15 -0
- package/dist/cjs/components/spinner/spinner.recipe.js +16 -0
- package/dist/cjs/components/stagebar/index.js +7 -0
- package/dist/cjs/components/stagebar/stagebar.js +26 -0
- package/dist/cjs/components/stagebar/stagebar.recipe.js +17 -0
- package/dist/cjs/components/statcard/index.js +7 -0
- package/dist/cjs/components/statcard/statcard.js +15 -0
- package/dist/cjs/components/statcard/statcard.recipe.js +37 -0
- package/dist/cjs/components/switch/index.js +7 -0
- package/dist/cjs/components/switch/switch.js +58 -0
- package/dist/cjs/components/switch/switch.recipe.js +29 -0
- package/dist/cjs/components/table/index.js +14 -0
- package/dist/cjs/components/table/table.js +66 -0
- package/dist/cjs/components/table/table.recipe.js +43 -0
- package/dist/cjs/components/tabletoolbar/index.js +20 -0
- package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +84 -0
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +237 -0
- package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +26 -0
- package/dist/cjs/components/tabs/index.js +7 -0
- package/dist/cjs/components/tabs/tabs.js +106 -0
- package/dist/cjs/components/tabs/tabs.recipe.js +36 -0
- package/dist/cjs/components/textarea/index.js +7 -0
- package/dist/cjs/components/textarea/textarea.js +56 -0
- package/dist/cjs/components/textarea/textarea.recipe.js +46 -0
- package/dist/cjs/components/toast/index.js +8 -0
- package/dist/cjs/components/toast/toast.js +95 -0
- package/dist/cjs/components/toast/toast.recipe.js +31 -0
- package/dist/cjs/components/tooltip/index.js +7 -0
- package/dist/cjs/components/tooltip/tooltip.js +95 -0
- package/dist/cjs/components/tooltip/tooltip.recipe.js +16 -0
- package/dist/cjs/components/wheelpicker/index.js +7 -0
- package/dist/cjs/components/wheelpicker/wheelpicker.js +134 -0
- package/dist/cjs/components/wheelpicker/wheelpicker.recipe.js +95 -0
- package/dist/cjs/core/cx.js +8 -0
- package/dist/cjs/core/define.js +6 -0
- package/dist/cjs/core/index.js +11 -0
- package/dist/cjs/core/primitive.js +49 -0
- package/dist/cjs/core/resolve.js +44 -0
- package/dist/cjs/core/types.js +2 -0
- package/dist/cjs/index.js +92 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/product/appshell/appshell.js +104 -0
- package/dist/cjs/product/appshell/appshell.recipe.js +30 -0
- package/dist/cjs/product/appshell/index.js +7 -0
- package/dist/cjs/product/authshell/authshell.js +21 -0
- package/dist/cjs/product/authshell/authshell.recipe.js +67 -0
- package/dist/cjs/product/authshell/index.js +7 -0
- package/dist/cjs/product/board/board.js +78 -0
- package/dist/cjs/product/board/board.recipe.js +31 -0
- package/dist/cjs/product/board/index.js +7 -0
- package/dist/cjs/product/command/command.js +238 -0
- package/dist/cjs/product/command/command.recipe.js +47 -0
- package/dist/cjs/product/command/index.js +8 -0
- package/dist/cjs/product/entitycard/entitycard.js +14 -0
- package/dist/cjs/product/entitycard/entitycard.recipe.js +32 -0
- package/dist/cjs/product/entitycard/index.js +7 -0
- package/dist/cjs/product/flowcanvas/flowcanvas.js +121 -0
- package/dist/cjs/product/flowcanvas/flowcanvas.recipe.js +28 -0
- package/dist/cjs/product/flowcanvas/index.js +7 -0
- package/dist/cjs/product/inbox/inbox.js +16 -0
- package/dist/cjs/product/inbox/inbox.recipe.js +46 -0
- package/dist/cjs/product/inbox/index.js +7 -0
- package/dist/cjs/product/listpage/index.js +8 -0
- package/dist/cjs/product/listpage/listpage.js +25 -0
- package/dist/cjs/product/listpage/listpage.recipe.js +46 -0
- package/dist/cjs/product/navitem/index.js +5 -0
- package/dist/cjs/product/navitem/navitem.js +44 -0
- package/dist/cjs/product/navitem/navitem.recipe.js +36 -0
- package/dist/cjs/product/onboarding/index.js +7 -0
- package/dist/cjs/product/onboarding/onboarding.js +17 -0
- package/dist/cjs/product/onboarding/onboarding.recipe.js +44 -0
- package/dist/cjs/product/recordpage/index.js +7 -0
- package/dist/cjs/product/recordpage/recordpage.js +409 -0
- package/dist/cjs/product/recordpage/recordpage.recipe.js +162 -0
- package/dist/cjs/product/recordpanel/index.js +7 -0
- package/dist/cjs/product/recordpanel/recordpanel.js +83 -0
- package/dist/cjs/product/recordpanel/recordpanel.recipe.js +51 -0
- package/dist/cjs/product/recordstable/company-logos.js +29 -0
- package/dist/cjs/product/recordstable/index.js +10 -0
- package/dist/cjs/product/recordstable/recordstable.js +1092 -0
- package/dist/cjs/product/recordstable/recordstable.recipe.js +152 -0
- package/dist/cjs/product/recordstable/recordstable.tag.js +21 -0
- package/dist/cjs/product/richtext/index.js +7 -0
- package/dist/cjs/product/richtext/richtext.js +147 -0
- package/dist/cjs/product/richtext/richtext.recipe.js +43 -0
- package/dist/cjs/product/settingssection/index.js +7 -0
- package/dist/cjs/product/settingssection/settingssection.js +14 -0
- package/dist/cjs/product/settingssection/settingssection.recipe.js +23 -0
- package/dist/cjs/product/settingsshell/index.js +7 -0
- package/dist/cjs/product/settingsshell/settingsshell.js +59 -0
- package/dist/cjs/product/settingsshell/settingsshell.recipe.js +46 -0
- package/dist/cjs/product/sidebar/index.js +13 -0
- package/dist/cjs/product/sidebar/sidebar.js +148 -0
- package/dist/cjs/product/sidebar/sidebar.recipe.js +46 -0
- package/dist/cjs/product/tasklist/index.js +7 -0
- package/dist/cjs/product/tasklist/tasklist.js +19 -0
- package/dist/cjs/product/tasklist/tasklist.recipe.js +38 -0
- package/dist/cjs/product/trialbanner/index.js +7 -0
- package/dist/cjs/product/trialbanner/trialbanner.js +13 -0
- package/dist/cjs/product/trialbanner/trialbanner.recipe.js +32 -0
- package/dist/cjs/product/viewtoggle/index.js +7 -0
- package/dist/cjs/product/viewtoggle/viewtoggle.js +55 -0
- package/dist/cjs/product/viewtoggle/viewtoggle.recipe.js +27 -0
- package/dist/cjs/tokens/contract.js +21 -0
- package/dist/cjs/tokens/elevation.js +47 -0
- package/dist/cjs/tokens/index.js +18 -0
- package/dist/cjs/tokens/palette.js +63 -0
- package/dist/cjs/tokens/scale.js +70 -0
- package/dist/cjs/tokens/semantic.js +57 -0
- package/dist/columncalc.css +26 -0
- package/dist/columncalc.d.ts +7 -0
- package/dist/command.css +34 -1
- package/dist/contextmenu.css +10 -2
- package/dist/datatable.css +60 -14
- package/dist/datepicker.css +175 -19
- package/dist/datepicker.d.ts +2 -2
- package/dist/datepickerfield.css +27 -0
- package/dist/datepickerfield.d.ts +7 -0
- package/dist/dialog.css +10 -2
- package/dist/donutchart.css +8 -0
- package/dist/drawer.css +13 -5
- package/dist/entitycard.css +10 -2
- package/dist/esm/components/accordion/accordion.js +17 -16
- package/dist/esm/components/accordion/accordion.recipe.js +1 -1
- package/dist/esm/components/avatargroup/avatargroup.js +2 -2
- package/dist/esm/components/avatargroup/avatargroup.recipe.js +2 -2
- package/dist/esm/components/badge/badge.recipe.js +4 -4
- package/dist/esm/components/barchart/barchart.js +15 -2
- package/dist/esm/components/barchart/barchart.recipe.js +10 -5
- package/dist/esm/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/esm/components/bulkbar/bulkbar.js +2 -2
- package/dist/esm/components/bulkbar/bulkbar.recipe.js +4 -4
- package/dist/esm/components/button/button.js +13 -2
- package/dist/esm/components/button/button.recipe.js +20 -4
- package/dist/esm/components/callout/callout.js +2 -2
- package/dist/esm/components/checkbox/checkbox.recipe.js +9 -1
- package/dist/esm/components/columncalc/columncalc.js +100 -0
- package/dist/esm/components/columncalc/columncalc.recipe.js +30 -0
- package/dist/esm/components/columncalc/index.js +1 -0
- package/dist/esm/components/contextmenu/contextmenu.recipe.js +4 -4
- package/dist/esm/components/datatable/datatable.js +276 -49
- package/dist/esm/components/datatable/datatable.recipe.js +54 -16
- package/dist/esm/components/datepicker/datepicker.js +104 -53
- package/dist/esm/components/datepicker/datepicker.recipe.js +180 -25
- package/dist/esm/components/datepicker/index.js +1 -1
- package/dist/esm/components/datepickerfield/datepickerfield.js +49 -0
- package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +41 -0
- package/dist/esm/components/datepickerfield/index.js +2 -0
- package/dist/esm/components/dialog/dialog.js +2 -2
- package/dist/esm/components/dialog/dialog.recipe.js +4 -4
- package/dist/esm/components/divider/divider.js +2 -2
- package/dist/esm/components/donutchart/donutchart.js +2 -2
- package/dist/esm/components/drawer/drawer.js +2 -2
- package/dist/esm/components/drawer/drawer.recipe.js +6 -6
- package/dist/esm/components/emptystate/emptystate.js +2 -2
- package/dist/esm/components/formfield/formfield.js +2 -2
- package/dist/esm/components/input/input.js +6 -3
- package/dist/esm/components/input/input.recipe.js +38 -5
- package/dist/esm/components/linechart/linechart.js +15 -2
- package/dist/esm/components/linechart/linechart.recipe.js +10 -5
- package/dist/esm/components/menu/index.js +1 -0
- package/dist/esm/components/menu/menu-keyboard.js +80 -0
- package/dist/esm/components/menu/menu.js +27 -60
- package/dist/esm/components/menu/menu.recipe.js +5 -5
- package/dist/esm/components/multiselect/multiselect.js +10 -3
- package/dist/esm/components/multiselect/multiselect.recipe.js +8 -8
- package/dist/esm/components/popover/popover.js +2 -2
- package/dist/esm/components/popover/popover.recipe.js +2 -2
- package/dist/esm/components/progress/progress.js +3 -3
- package/dist/esm/components/radiogroup/radiogroup.js +2 -2
- package/dist/esm/components/radiogroup/radiogroup.recipe.js +1 -1
- package/dist/esm/components/resizablepanel/index.js +2 -0
- package/dist/esm/components/resizablepanel/resizablepanel.js +135 -0
- package/dist/esm/components/resizablepanel/resizablepanel.recipe.js +66 -0
- package/dist/esm/components/segmented/segmented.js +2 -2
- package/dist/esm/components/select/select.js +2 -2
- package/dist/esm/components/select/select.recipe.js +6 -6
- package/dist/esm/components/skeleton/skeleton.js +5 -2
- package/dist/esm/components/spinner/spinner.js +3 -2
- package/dist/esm/components/stagebar/stagebar.js +2 -2
- package/dist/esm/components/statcard/statcard.js +2 -2
- package/dist/esm/components/table/table.recipe.js +6 -6
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +3 -3
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +21 -13
- package/dist/esm/components/tabs/tabs.js +2 -2
- package/dist/esm/components/tabs/tabs.recipe.js +4 -4
- package/dist/esm/components/textarea/textarea.js +5 -5
- package/dist/esm/components/textarea/textarea.recipe.js +16 -4
- package/dist/esm/components/toast/toast.js +4 -4
- package/dist/esm/components/toast/toast.recipe.js +2 -2
- package/dist/esm/components/tooltip/tooltip.js +21 -7
- package/dist/esm/components/wheelpicker/index.js +2 -0
- package/dist/esm/components/wheelpicker/wheelpicker.js +98 -0
- package/dist/esm/components/wheelpicker/wheelpicker.recipe.js +92 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/product/appshell/appshell.js +33 -9
- package/dist/esm/product/appshell/appshell.recipe.js +4 -4
- package/dist/esm/product/authshell/authshell.js +18 -0
- package/dist/esm/product/authshell/authshell.recipe.js +64 -0
- package/dist/esm/product/authshell/index.js +2 -0
- package/dist/esm/product/board/board.js +2 -2
- package/dist/esm/product/board/board.recipe.js +1 -1
- package/dist/esm/product/command/command.js +19 -6
- package/dist/esm/product/command/command.recipe.js +27 -2
- package/dist/esm/product/entitycard/entitycard.js +2 -2
- package/dist/esm/product/entitycard/entitycard.recipe.js +2 -2
- package/dist/esm/product/flowcanvas/flowcanvas.js +4 -4
- package/dist/esm/product/inbox/inbox.recipe.js +1 -1
- package/dist/esm/product/listpage/listpage.recipe.js +3 -3
- package/dist/esm/product/navitem/navitem.recipe.js +13 -1
- package/dist/esm/product/onboarding/onboarding.js +2 -2
- package/dist/esm/product/onboarding/onboarding.recipe.js +2 -2
- package/dist/esm/product/recordpage/recordpage.js +133 -47
- package/dist/esm/product/recordpage/recordpage.recipe.js +19 -17
- package/dist/esm/product/recordpanel/recordpanel.js +4 -4
- package/dist/esm/product/recordpanel/recordpanel.recipe.js +12 -16
- package/dist/esm/product/recordstable/recordstable.js +157 -66
- package/dist/esm/product/recordstable/recordstable.recipe.js +23 -23
- package/dist/esm/product/recordstable/recordstable.tag.js +18 -0
- package/dist/esm/product/richtext/richtext.js +3 -3
- package/dist/esm/product/richtext/richtext.recipe.js +3 -3
- package/dist/esm/product/settingssection/settingssection.js +2 -2
- package/dist/esm/product/settingsshell/settingsshell.js +2 -2
- package/dist/esm/product/settingsshell/settingsshell.recipe.js +7 -2
- package/dist/esm/product/sidebar/sidebar.js +2 -2
- package/dist/esm/product/sidebar/sidebar.recipe.js +27 -2
- package/dist/esm/product/tasklist/tasklist.js +4 -4
- package/dist/esm/product/trialbanner/trialbanner.js +2 -2
- package/dist/esm/product/trialbanner/trialbanner.recipe.js +2 -2
- package/dist/esm/product/viewtoggle/viewtoggle.js +10 -2
- package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +1 -1
- package/dist/esm/tokens/elevation.js +44 -0
- package/dist/esm/tokens/index.js +1 -0
- package/dist/esm/tokens/palette.js +30 -0
- package/dist/esm/tokens/scale.js +7 -0
- package/dist/esm/tokens/semantic.js +24 -0
- package/dist/inbox.css +9 -1
- package/dist/input.css +32 -4
- package/dist/linechart.css +5 -5
- package/dist/listpage.css +11 -3
- package/dist/menu.css +11 -3
- package/dist/multiselect.css +14 -6
- package/dist/native/tokens.d.ts +16 -0
- package/dist/native/tokens.js +221 -0
- package/dist/navitem.css +21 -1
- package/dist/onboarding.css +10 -2
- package/dist/popover.css +8 -0
- package/dist/progress.css +8 -0
- package/dist/radiogroup.css +9 -1
- package/dist/recordpage.css +22 -12
- package/dist/recordpanel.css +25 -15
- package/dist/recordstable.css +37 -23
- package/dist/resizablepanel.css +53 -0
- package/dist/resizablepanel.d.ts +7 -0
- package/dist/richtext.css +11 -3
- package/dist/segmented.css +8 -0
- package/dist/select.css +12 -4
- package/dist/settingsshell.css +15 -2
- package/dist/sidebar.css +34 -1
- package/dist/skeleton.css +8 -0
- package/dist/spinner.css +8 -0
- package/dist/stagebar.css +8 -0
- package/dist/styles.css +2061 -1111
- package/dist/switch.css +8 -0
- package/dist/table.css +14 -6
- package/dist/tabletoolbar.css +8 -0
- package/dist/tabs.css +12 -4
- package/dist/tasklist.css +8 -0
- package/dist/textarea.css +23 -3
- package/dist/toast.css +10 -2
- package/dist/tokens.css +29 -0
- package/dist/tokens.json +217 -0
- package/dist/tooltip.css +8 -0
- package/dist/trialbanner.css +8 -0
- package/dist/types/components/accordion/accordion.d.ts +10 -8
- package/dist/types/components/avatargroup/avatargroup.d.ts +2 -2
- package/dist/types/components/barchart/barchart.d.ts +4 -2
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/types/components/bulkbar/bulkbar.d.ts +4 -2
- package/dist/types/components/button/button.d.ts +8 -0
- package/dist/types/components/button/button.recipe.d.ts +12 -0
- package/dist/types/components/callout/callout.d.ts +2 -2
- package/dist/types/components/columncalc/columncalc.d.ts +49 -0
- package/dist/types/components/columncalc/columncalc.recipe.d.ts +3 -0
- package/dist/types/components/columncalc/index.d.ts +1 -0
- package/dist/types/components/datatable/datatable.d.ts +58 -3
- package/dist/types/components/datepicker/datepicker.d.ts +41 -18
- package/dist/types/components/datepicker/datepicker.recipe.d.ts +25 -2
- package/dist/types/components/datepicker/index.d.ts +1 -1
- package/dist/types/components/datepickerfield/datepickerfield.d.ts +35 -0
- package/dist/types/components/datepickerfield/datepickerfield.recipe.d.ts +5 -0
- package/dist/types/components/datepickerfield/index.d.ts +2 -0
- package/dist/types/components/dialog/dialog.d.ts +3 -1
- package/dist/types/components/divider/divider.d.ts +2 -2
- package/dist/types/components/donutchart/donutchart.d.ts +2 -2
- package/dist/types/components/drawer/drawer.d.ts +3 -1
- package/dist/types/components/emptystate/emptystate.d.ts +2 -2
- package/dist/types/components/formfield/formfield.d.ts +7 -4
- package/dist/types/components/input/input.d.ts +8 -2
- package/dist/types/components/linechart/linechart.d.ts +4 -2
- package/dist/types/components/menu/index.d.ts +1 -0
- package/dist/types/components/menu/menu-keyboard.d.ts +33 -0
- package/dist/types/components/menu/menu.d.ts +7 -1
- package/dist/types/components/multiselect/multiselect.d.ts +8 -4
- package/dist/types/components/popover/popover.d.ts +4 -1
- package/dist/types/components/progress/progress.d.ts +2 -2
- package/dist/types/components/radiogroup/radiogroup.d.ts +2 -2
- package/dist/types/components/resizablepanel/index.d.ts +2 -0
- package/dist/types/components/resizablepanel/resizablepanel.d.ts +75 -0
- package/dist/types/components/resizablepanel/resizablepanel.recipe.d.ts +3 -0
- package/dist/types/components/segmented/segmented.d.ts +2 -2
- package/dist/types/components/select/select.d.ts +2 -2
- package/dist/types/components/skeleton/skeleton.d.ts +2 -2
- package/dist/types/components/spinner/spinner.d.ts +2 -2
- package/dist/types/components/stagebar/stagebar.d.ts +2 -2
- package/dist/types/components/statcard/statcard.d.ts +2 -2
- package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +28 -2
- package/dist/types/components/tabs/tabs.d.ts +2 -2
- package/dist/types/components/toast/toast.d.ts +7 -1
- package/dist/types/components/tooltip/tooltip.d.ts +8 -1
- package/dist/types/components/wheelpicker/index.d.ts +2 -0
- package/dist/types/components/wheelpicker/wheelpicker.d.ts +37 -0
- package/dist/types/components/wheelpicker/wheelpicker.recipe.d.ts +26 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/product/appshell/appshell.d.ts +16 -2
- package/dist/types/product/authshell/authshell.d.ts +28 -0
- package/dist/types/product/authshell/authshell.recipe.d.ts +3 -0
- package/dist/types/product/authshell/index.d.ts +2 -0
- package/dist/types/product/board/board.d.ts +2 -2
- package/dist/types/product/command/command.d.ts +25 -1
- package/dist/types/product/entitycard/entitycard.d.ts +2 -2
- package/dist/types/product/flowcanvas/flowcanvas.d.ts +9 -1
- package/dist/types/product/onboarding/onboarding.d.ts +7 -1
- package/dist/types/product/recordpage/recordpage.d.ts +65 -1
- package/dist/types/product/recordpanel/recordpanel.d.ts +8 -2
- package/dist/types/product/recordstable/recordstable.d.ts +90 -1
- package/dist/types/product/recordstable/recordstable.tag.d.ts +10 -0
- package/dist/types/product/richtext/richtext.d.ts +5 -1
- package/dist/types/product/settingssection/settingssection.d.ts +2 -2
- package/dist/types/product/settingsshell/settingsshell.d.ts +6 -2
- package/dist/types/product/sidebar/sidebar.d.ts +8 -0
- package/dist/types/product/tasklist/tasklist.d.ts +5 -1
- package/dist/types/product/trialbanner/trialbanner.d.ts +2 -2
- package/dist/types/product/viewtoggle/viewtoggle.d.ts +11 -5
- package/dist/types/tokens/contract.d.ts +14 -3
- package/dist/types/tokens/elevation.d.ts +44 -0
- package/dist/types/tokens/index.d.ts +1 -0
- package/dist/types/tokens/palette.d.ts +40 -0
- package/dist/types/tokens/scale.d.ts +7 -0
- package/dist/types/tokens/semantic.d.ts +19 -0
- package/dist/viewtoggle.css +9 -1
- package/dist/wheelpicker.css +68 -0
- package/dist/wheelpicker.d.ts +7 -0
- package/package.json +160 -68
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.authshellRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
// Attio's welcome/auth surface (app.attio.com/welcome/*) — measured live,
|
|
7
|
+
// 2026-09-15. A centered page frame holding a two-pane card: the form on the
|
|
8
|
+
// left, an optional product preview on the right, with an optional top
|
|
9
|
+
// progress bar and a footer under the card. Every value below is measured
|
|
10
|
+
// from the live app, EXCEPT the 1200px preview-hiding breakpoint (called out
|
|
11
|
+
// at the container query below) — Attio drops the pane in JS somewhere between a
|
|
12
|
+
// measured 954px and 1393px viewport width, so 1200px is chosen, not measured.
|
|
13
|
+
const config = (0, core_1.defineRecipe)({
|
|
14
|
+
name: "authshell",
|
|
15
|
+
base: `min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; position: relative;
|
|
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
|
+
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
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; }
|
|
21
|
+
|
|
22
|
+
& .authshell-logo { margin-top: ${tokens_1.contract.space["8"]}; height: 24px; display: flex; align-items: center; }
|
|
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; }
|
|
25
|
+
|
|
26
|
+
& .authshell-pane { flex: 0 0 564px; padding: 72px; display: flex; flex-direction: column; box-sizing: border-box; }
|
|
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; }
|
|
30
|
+
|
|
31
|
+
& .authshell-body { width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: ${tokens_1.contract.space["8"]}; align-items: center; }
|
|
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; }
|
|
34
|
+
|
|
35
|
+
& .authshell-form { align-self: stretch; display: flex; flex-direction: column; gap: 28px; }
|
|
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; }
|
|
39
|
+
|
|
40
|
+
/* Auth-surface control treatment: flatter than the in-app chrome — a plain
|
|
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
|
|
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}; }
|
|
48
|
+
/* Same three-layer brand shadow as Button's primary intent, but the auth
|
|
49
|
+
button's inset ring is measured at rgba(0,0,0,0.06) — a hairline, not
|
|
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); }
|
|
53
|
+
|
|
54
|
+
/* Attio drops the preview pane in JS on narrow viewports (measured: two
|
|
55
|
+
panes at 1393px, one at 954px), so 1200px is a chosen threshold inside
|
|
56
|
+
that bracket, not a measured value. A CONTAINER query, not a media
|
|
57
|
+
query: the shell is embedded in the docs inside an ~800px column, where
|
|
58
|
+
a viewport query would keep the 1130px card and overflow it. Asking the
|
|
59
|
+
shell's own width is what "there isn't room for the preview" means. */
|
|
60
|
+
container-type: inline-size;
|
|
61
|
+
@container (max-width: 1200px) { & .authshell-preview { display: none; } }`,
|
|
62
|
+
variants: {},
|
|
63
|
+
defaultVariants: {},
|
|
64
|
+
compoundVariants: [],
|
|
65
|
+
});
|
|
66
|
+
exports.authshellRecipe = (0, core_1.resolveRecipe)(config);
|
|
67
|
+
exports.default = config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.authshellRecipe = exports.AuthShell = void 0;
|
|
4
|
+
var authshell_1 = require("./authshell");
|
|
5
|
+
Object.defineProperty(exports, "AuthShell", { enumerable: true, get: function () { return authshell_1.AuthShell; } });
|
|
6
|
+
var authshell_recipe_1 = require("./authshell.recipe");
|
|
7
|
+
Object.defineProperty(exports, "authshellRecipe", { enumerable: true, get: function () { return authshell_recipe_1.authshellRecipe; } });
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Board = Board;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const board_recipe_1 = require("./board.recipe");
|
|
40
|
+
/**
|
|
41
|
+
* A kanban board with native drag-and-drop between columns. Cards are
|
|
42
|
+
* `draggable`; dropping one on a column reparents it via `onCardsChange`
|
|
43
|
+
* (the parent owns the cards, so the move is a controlled state update).
|
|
44
|
+
* Measured from Attio's Deals pipeline.
|
|
45
|
+
*/
|
|
46
|
+
function Board({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLabel = "New", className, ...rest }) {
|
|
47
|
+
const [dragId, setDragId] = React.useState(null);
|
|
48
|
+
const [overCol, setOverCol] = React.useState(null);
|
|
49
|
+
const move = (cardId, toColumn) => {
|
|
50
|
+
const card = cards.find((c) => c.id === cardId);
|
|
51
|
+
if (!card || card.columnId === toColumn)
|
|
52
|
+
return;
|
|
53
|
+
onCardsChange?.(cards.map((c) => (c.id === cardId ? { ...c, columnId: toColumn } : c)));
|
|
54
|
+
};
|
|
55
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, board_recipe_1.boardRecipe)({ className }), ...rest, children: columns.map((col) => {
|
|
56
|
+
const colCards = cards.filter((c) => c.columnId === col.id);
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "board-col", "data-over": overCol === col.id ? "" : undefined, onDragOver: (e) => {
|
|
58
|
+
if (!dragId)
|
|
59
|
+
return;
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
setOverCol(col.id);
|
|
62
|
+
}, onDragLeave: (e) => {
|
|
63
|
+
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
64
|
+
setOverCol((v) => (v === col.id ? null : v));
|
|
65
|
+
}
|
|
66
|
+
}, onDrop: (e) => {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
if (dragId)
|
|
69
|
+
move(dragId, col.id);
|
|
70
|
+
setDragId(null);
|
|
71
|
+
setOverCol(null);
|
|
72
|
+
}, 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", 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", draggable: true, "data-dragging": dragId === card.id ? "" : undefined, onDragStart: () => setDragId(card.id), onDragEnd: () => {
|
|
73
|
+
setDragId(null);
|
|
74
|
+
setOverCol(null);
|
|
75
|
+
}, children: renderCard(card) }, card.id)))] })] }, col.id));
|
|
76
|
+
}) }));
|
|
77
|
+
}
|
|
78
|
+
Board.displayName = "Board";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.boardRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
// A kanban board — measured from Attio's Deals pipeline: horizontally scrolling
|
|
7
|
+
// columns (dot + title + count header, a "New" button, a stack of draggable
|
|
8
|
+
// cards), with the hovered drop column highlighted.
|
|
9
|
+
const config = (0, core_1.defineRecipe)({
|
|
10
|
+
name: "board",
|
|
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
|
+
variants: {},
|
|
27
|
+
defaultVariants: {},
|
|
28
|
+
compoundVariants: [],
|
|
29
|
+
});
|
|
30
|
+
exports.boardRecipe = (0, core_1.resolveRecipe)(config);
|
|
31
|
+
exports.default = config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.boardRecipe = exports.Board = void 0;
|
|
4
|
+
var board_1 = require("./board");
|
|
5
|
+
Object.defineProperty(exports, "Board", { enumerable: true, get: function () { return board_1.Board; } });
|
|
6
|
+
var board_recipe_1 = require("./board.recipe");
|
|
7
|
+
Object.defineProperty(exports, "boardRecipe", { enumerable: true, get: function () { return board_recipe_1.boardRecipe; } });
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.defaultCommandItems = void 0;
|
|
37
|
+
exports.Command = Command;
|
|
38
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
+
const combobox = __importStar(require("@zag-js/combobox"));
|
|
40
|
+
const dialog = __importStar(require("@zag-js/dialog"));
|
|
41
|
+
const react_1 = require("@zag-js/react");
|
|
42
|
+
const lucide_react_1 = require("lucide-react");
|
|
43
|
+
const React = __importStar(require("react"));
|
|
44
|
+
const kbd_1 = require("../../components/kbd");
|
|
45
|
+
const command_recipe_1 = require("./command.recipe");
|
|
46
|
+
const IconHome = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.House, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
47
|
+
const IconTasks = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.SquareCheck, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
48
|
+
const IconCompanies = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
49
|
+
const IconPeople = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.User, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
50
|
+
const IconDeals = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.CircleDollarSign, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
51
|
+
const IconNewPerson = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.UserPlus, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
52
|
+
const IconNewTask = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.ListTodo, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
53
|
+
const IconSearch = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
54
|
+
const IconSettings = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.Settings, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
55
|
+
/** crisp's own generic command set (not copied from any product). */
|
|
56
|
+
exports.defaultCommandItems = [
|
|
57
|
+
{
|
|
58
|
+
id: "go-home",
|
|
59
|
+
label: "Go to Home",
|
|
60
|
+
icon: IconHome,
|
|
61
|
+
group: "Navigation",
|
|
62
|
+
shortcut: ["G", "H"],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "go-tasks",
|
|
66
|
+
label: "Go to Tasks",
|
|
67
|
+
icon: IconTasks,
|
|
68
|
+
group: "Navigation",
|
|
69
|
+
shortcut: ["G", "T"],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: "go-companies",
|
|
73
|
+
label: "Go to Companies",
|
|
74
|
+
icon: IconCompanies,
|
|
75
|
+
group: "Navigation",
|
|
76
|
+
shortcut: ["G", "C"],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "go-people",
|
|
80
|
+
label: "Go to People",
|
|
81
|
+
icon: IconPeople,
|
|
82
|
+
group: "Navigation",
|
|
83
|
+
shortcut: ["G", "P"],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "go-deals",
|
|
87
|
+
label: "Go to Deals",
|
|
88
|
+
icon: IconDeals,
|
|
89
|
+
group: "Navigation",
|
|
90
|
+
shortcut: ["G", "D"],
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: "new-company",
|
|
94
|
+
label: "New company",
|
|
95
|
+
icon: IconCompanies,
|
|
96
|
+
group: "Create",
|
|
97
|
+
keywords: ["create", "add"],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "new-person",
|
|
101
|
+
label: "New person",
|
|
102
|
+
icon: IconNewPerson,
|
|
103
|
+
group: "Create",
|
|
104
|
+
keywords: ["create", "add"],
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "new-task",
|
|
108
|
+
label: "New task",
|
|
109
|
+
icon: IconNewTask,
|
|
110
|
+
group: "Create",
|
|
111
|
+
keywords: ["create", "add"],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "search-records",
|
|
115
|
+
label: "Search records…",
|
|
116
|
+
icon: IconSearch,
|
|
117
|
+
group: "Actions",
|
|
118
|
+
keywords: ["find"],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "settings",
|
|
122
|
+
label: "Settings",
|
|
123
|
+
icon: IconSettings,
|
|
124
|
+
group: "Actions",
|
|
125
|
+
keywords: ["preferences"],
|
|
126
|
+
},
|
|
127
|
+
];
|
|
128
|
+
// A globally unique (process-lifetime) id per mounted instance, rather than
|
|
129
|
+
// React's tree-position-based useId. The dialog/combobox machines defer
|
|
130
|
+
// their outside-click/focus dismissal listeners by a frame, so a rapid
|
|
131
|
+
// unmount+remount that reused useId's tree-relative ids could let a stale
|
|
132
|
+
// registration from a just-unmounted instance resolve (by id) to a new
|
|
133
|
+
// instance's DOM node.
|
|
134
|
+
let instanceCounter = 0;
|
|
135
|
+
function useCommandInstanceId() {
|
|
136
|
+
const idRef = React.useRef(null);
|
|
137
|
+
if (idRef.current == null) {
|
|
138
|
+
instanceCounter += 1;
|
|
139
|
+
idRef.current = `crisp-command-${instanceCounter}`;
|
|
140
|
+
}
|
|
141
|
+
return idRef.current;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* ⌘K command palette. Composes a Zag dialog machine (modal, focus trap,
|
|
145
|
+
* scroll lock) with a Zag combobox machine (filterable, keyboard-navigable
|
|
146
|
+
* option list) so keyboard/focus correctness comes from the machines, not
|
|
147
|
+
* hand-rolled event handling.
|
|
148
|
+
*/
|
|
149
|
+
function Command({ open, onOpenChange, items = exports.defaultCommandItems, placeholder = "Search actions and records…", "aria-label": ariaLabel = "Command palette", navigateLabel = "Navigate", selectLabel = "Select", emptyLabel = "No matching commands", query: queryProp, onQueryChange, filterItems = true, }) {
|
|
150
|
+
const instanceId = useCommandInstanceId();
|
|
151
|
+
const dialogId = `${instanceId}-dialog`;
|
|
152
|
+
const comboId = `${instanceId}-combobox`;
|
|
153
|
+
const inputRef = React.useRef(null);
|
|
154
|
+
const [internalQuery, setInternalQuery] = React.useState("");
|
|
155
|
+
const query = queryProp !== undefined ? queryProp : internalQuery;
|
|
156
|
+
const setQuery = React.useCallback((next) => {
|
|
157
|
+
onQueryChange?.(next);
|
|
158
|
+
if (queryProp === undefined)
|
|
159
|
+
setInternalQuery(next);
|
|
160
|
+
}, [onQueryChange, queryProp]);
|
|
161
|
+
const dialogService = (0, react_1.useMachine)(dialog.machine, {
|
|
162
|
+
id: dialogId,
|
|
163
|
+
open,
|
|
164
|
+
onOpenChange(details) {
|
|
165
|
+
onOpenChange(details.open);
|
|
166
|
+
},
|
|
167
|
+
initialFocusEl: () => inputRef.current,
|
|
168
|
+
"aria-label": ariaLabel,
|
|
169
|
+
});
|
|
170
|
+
const dlg = dialog.connect(dialogService, react_1.normalizeProps);
|
|
171
|
+
const filteredItems = React.useMemo(() => {
|
|
172
|
+
if (!filterItems)
|
|
173
|
+
return items;
|
|
174
|
+
const q = query.trim().toLowerCase();
|
|
175
|
+
if (!q)
|
|
176
|
+
return items;
|
|
177
|
+
return items.filter((item) => item.label.toLowerCase().includes(q) ||
|
|
178
|
+
item.keywords?.some((k) => k.toLowerCase().includes(q)));
|
|
179
|
+
}, [items, query, filterItems]);
|
|
180
|
+
const collection = React.useMemo(() => combobox.collection({
|
|
181
|
+
items: filteredItems,
|
|
182
|
+
itemToValue: (item) => item.id,
|
|
183
|
+
itemToString: (item) => item.label,
|
|
184
|
+
}), [filteredItems]);
|
|
185
|
+
const comboService = (0, react_1.useMachine)(combobox.machine, {
|
|
186
|
+
id: comboId,
|
|
187
|
+
collection,
|
|
188
|
+
// The list is always visible while the dialog is open (not a floating
|
|
189
|
+
// popover) — the combobox is only used for its keyboard/filter machine.
|
|
190
|
+
open: true,
|
|
191
|
+
// The dialog already owns escape/outside-click dismissal; avoid a
|
|
192
|
+
// second competing dismissable layer.
|
|
193
|
+
disableLayer: true,
|
|
194
|
+
inputBehavior: "autohighlight",
|
|
195
|
+
closeOnSelect: false,
|
|
196
|
+
// Always driven from our own `query` (internal state, or the caller's
|
|
197
|
+
// controlled prop) so a caller-driven query update reaches the input,
|
|
198
|
+
// not just the reverse — the sole source of truth is `query`, not this
|
|
199
|
+
// machine's own copy.
|
|
200
|
+
inputValue: query,
|
|
201
|
+
onInputValueChange(details) {
|
|
202
|
+
setQuery(details.inputValue);
|
|
203
|
+
},
|
|
204
|
+
onSelect(details) {
|
|
205
|
+
const item = items.find((candidate) => candidate.id === details.itemValue);
|
|
206
|
+
item?.onSelect?.();
|
|
207
|
+
onOpenChange(false);
|
|
208
|
+
},
|
|
209
|
+
});
|
|
210
|
+
const combo = combobox.connect(comboService, react_1.normalizeProps);
|
|
211
|
+
// Reset the query/highlight each time the palette opens, so it never
|
|
212
|
+
// reopens showing a stale filter from the previous session.
|
|
213
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: only re-run when `open` flips — `combo` is a fresh object every render.
|
|
214
|
+
React.useLayoutEffect(() => {
|
|
215
|
+
if (!open)
|
|
216
|
+
return;
|
|
217
|
+
setQuery("");
|
|
218
|
+
combo.setInputValue("", "script");
|
|
219
|
+
combo.clearHighlightValue();
|
|
220
|
+
}, [open]);
|
|
221
|
+
// The footer's primary button mirrors the currently highlighted row (Attio
|
|
222
|
+
// shows the active action there and runs it on ↵ / click).
|
|
223
|
+
const highlightedItem = filteredItems.find((item) => item.id === combo.highlightedValue) ??
|
|
224
|
+
filteredItems[0];
|
|
225
|
+
const runItem = (item) => {
|
|
226
|
+
if (!item)
|
|
227
|
+
return;
|
|
228
|
+
item.onSelect?.();
|
|
229
|
+
onOpenChange(false);
|
|
230
|
+
};
|
|
231
|
+
if (!dlg.open)
|
|
232
|
+
return null;
|
|
233
|
+
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", { ...dlg.getContentProps(), className: "command-content", 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)(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) => {
|
|
234
|
+
const Icon = item.icon;
|
|
235
|
+
const showGroup = item.group && item.group !== filteredItems[i - 1]?.group;
|
|
236
|
+
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));
|
|
237
|
+
})) }), (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" })] })] })] }) }) })] }) }));
|
|
238
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commandRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
const config = (0, core_1.defineRecipe)({
|
|
7
|
+
name: "command",
|
|
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; }
|
|
16
|
+
& .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}; }
|
|
17
|
+
& .command-input::placeholder { color: ${tokens_1.contract.fgMuted}; }
|
|
18
|
+
& .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}; }
|
|
19
|
+
& .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}; }
|
|
20
|
+
& .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; }
|
|
21
|
+
& .command-item svg { flex-shrink: 0; color: ${tokens_1.contract.fgMuted}; }
|
|
22
|
+
& .command-item[data-highlighted] { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, transparent); }
|
|
23
|
+
& .command-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
24
|
+
& .command-item-shortcut { margin-inline-start: auto; flex-shrink: 0; display: flex; align-items: center; gap: ${tokens_1.contract.space["0.5"]}; }
|
|
25
|
+
& .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); }
|
|
26
|
+
& .command-list > .command-group-label:first-child { padding-top: ${tokens_1.contract.space["1"]}; }
|
|
27
|
+
& .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}; }
|
|
28
|
+
& .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}; }
|
|
29
|
+
& .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; }
|
|
30
|
+
& .command-footer-action:disabled { opacity: 0.5; cursor: default; }
|
|
31
|
+
& .command-footer-action-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
32
|
+
& .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}; }
|
|
33
|
+
`,
|
|
34
|
+
variants: {},
|
|
35
|
+
defaultVariants: {},
|
|
36
|
+
compoundVariants: [],
|
|
37
|
+
});
|
|
38
|
+
exports.commandRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
|
|
39
|
+
config,
|
|
40
|
+
meta: {
|
|
41
|
+
content: {
|
|
42
|
+
maxWidth: "720px",
|
|
43
|
+
borderRadius: "16px",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
exports.default = config;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commandRecipe = exports.defaultCommandItems = exports.Command = void 0;
|
|
4
|
+
var command_1 = require("./command");
|
|
5
|
+
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return command_1.Command; } });
|
|
6
|
+
Object.defineProperty(exports, "defaultCommandItems", { enumerable: true, get: function () { return command_1.defaultCommandItems; } });
|
|
7
|
+
var command_recipe_1 = require("./command.recipe");
|
|
8
|
+
Object.defineProperty(exports, "commandRecipe", { enumerable: true, get: function () { return command_recipe_1.commandRecipe; } });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntityCard = EntityCard;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const entitycard_recipe_1 = require("./entitycard.recipe");
|
|
6
|
+
/**
|
|
7
|
+
* A note / entity card — measured from Attio's Notes grid. A bordered white
|
|
8
|
+
* card with an author row, a title, a clamped excerpt, and a footer row with a
|
|
9
|
+
* right-aligned date. Rendered as a button so the whole card is clickable.
|
|
10
|
+
*/
|
|
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 })] }))] }));
|
|
13
|
+
}
|
|
14
|
+
EntityCard.displayName = "EntityCard";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.entitycardRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
// A note / entity card — measured from Attio's Notes grid: a bordered white card
|
|
7
|
+
// with an author row (avatar + name) at the top, a title, a clamped excerpt,
|
|
8
|
+
// and a footer row (avatar + name … date). The whole card is clickable.
|
|
9
|
+
const config = (0, core_1.defineRecipe)({
|
|
10
|
+
name: "entitycard",
|
|
11
|
+
base: `display: flex; flex-direction: column; box-sizing: border-box; width: 100%; min-width: 0; text-align: start;
|
|
12
|
+
padding: ${tokens_1.contract.space["3"]} ${tokens_1.contract.space["4"]}; margin: 0; border: none; border-radius: ${tokens_1.contract.radius.xl};
|
|
13
|
+
background: ${tokens_1.contract.bgSurface}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.borderSubtle}; color: ${tokens_1.contract.fgPrimary};
|
|
14
|
+
font-family: ${tokens_1.contract.font.sans}; cursor: pointer; transition: box-shadow .12s ease, background-color .12s ease;
|
|
15
|
+
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
16
|
+
|
|
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
|
+
&:focus-visible { outline: 2px solid ${tokens_1.contract.bgBrandSolid}; outline-offset: 2px; }
|
|
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; }`,
|
|
27
|
+
variants: {},
|
|
28
|
+
defaultVariants: {},
|
|
29
|
+
compoundVariants: [],
|
|
30
|
+
});
|
|
31
|
+
exports.entitycardRecipe = (0, core_1.resolveRecipe)(config);
|
|
32
|
+
exports.default = config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.entitycardRecipe = exports.EntityCard = void 0;
|
|
4
|
+
var entitycard_1 = require("./entitycard");
|
|
5
|
+
Object.defineProperty(exports, "EntityCard", { enumerable: true, get: function () { return entitycard_1.EntityCard; } });
|
|
6
|
+
var entitycard_recipe_1 = require("./entitycard.recipe");
|
|
7
|
+
Object.defineProperty(exports, "entitycardRecipe", { enumerable: true, get: function () { return entitycard_recipe_1.entitycardRecipe; } });
|