@crisp-ui-kit/crisp 0.2.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -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/base.css +25 -0
- package/dist/board.css +9 -1
- package/dist/bulkbar.css +11 -3
- package/dist/button.css +16 -2
- 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 +180 -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 +11 -3
- package/dist/datatable.css +106 -0
- package/dist/datatable.d.ts +7 -0
- package/dist/datepicker.css +165 -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 +11 -3
- 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 +33 -0
- package/dist/esm/components/accordion/accordion.recipe.js +23 -0
- package/dist/esm/components/accordion/index.js +2 -0
- package/dist/esm/components/avatar/avatar.js +8 -0
- package/dist/esm/components/avatar/avatar.recipe.js +39 -0
- package/dist/esm/components/avatar/index.js +2 -0
- package/dist/esm/components/avatargroup/avatargroup.js +16 -0
- package/dist/esm/components/avatargroup/avatargroup.recipe.js +15 -0
- package/dist/esm/components/avatargroup/index.js +2 -0
- package/dist/esm/components/badge/badge.js +8 -0
- package/dist/esm/components/badge/badge.recipe.js +65 -0
- package/dist/esm/components/badge/index.js +2 -0
- package/dist/esm/components/barchart/barchart.js +42 -0
- package/dist/esm/components/barchart/barchart.recipe.js +31 -0
- package/dist/esm/components/barchart/index.js +2 -0
- package/dist/esm/components/breadcrumb/breadcrumb.js +17 -0
- package/dist/esm/components/breadcrumb/breadcrumb.recipe.js +18 -0
- package/dist/esm/components/breadcrumb/index.js +2 -0
- package/dist/esm/components/bulkbar/bulkbar.js +16 -0
- package/dist/esm/components/bulkbar/bulkbar.recipe.js +28 -0
- package/dist/esm/components/bulkbar/index.js +2 -0
- package/dist/esm/components/button/button.js +26 -0
- package/dist/esm/components/button/button.recipe.js +55 -0
- package/dist/esm/components/button/index.js +2 -0
- package/dist/esm/components/callout/callout.js +22 -0
- package/dist/esm/components/callout/callout.recipe.js +26 -0
- package/dist/esm/components/callout/index.js +2 -0
- package/dist/esm/components/card/card.js +15 -0
- package/dist/esm/components/card/card.recipe.js +28 -0
- package/dist/esm/components/card/index.js +2 -0
- package/dist/esm/components/checkbox/checkbox.js +20 -0
- package/dist/esm/components/checkbox/checkbox.recipe.js +31 -0
- package/dist/esm/components/checkbox/index.js +2 -0
- 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.js +42 -0
- package/dist/esm/components/contextmenu/contextmenu.recipe.js +21 -0
- package/dist/esm/components/contextmenu/index.js +2 -0
- package/dist/esm/components/datatable/datatable.js +472 -0
- package/dist/esm/components/datatable/datatable.recipe.js +110 -0
- package/dist/esm/components/datatable/index.js +2 -0
- package/dist/esm/components/datepicker/datepicker.js +108 -0
- package/dist/esm/components/datepicker/datepicker.recipe.js +177 -0
- package/dist/esm/components/datepicker/index.js +2 -0
- 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 +48 -0
- package/dist/esm/components/dialog/dialog.recipe.js +32 -0
- package/dist/esm/components/dialog/index.js +2 -0
- package/dist/esm/components/divider/divider.js +7 -0
- package/dist/esm/components/divider/divider.recipe.js +14 -0
- package/dist/esm/components/divider/index.js +2 -0
- package/dist/esm/components/donutchart/donutchart.js +38 -0
- package/dist/esm/components/donutchart/donutchart.recipe.js +27 -0
- package/dist/esm/components/donutchart/index.js +2 -0
- package/dist/esm/components/drawer/drawer.js +42 -0
- package/dist/esm/components/drawer/drawer.recipe.js +27 -0
- package/dist/esm/components/drawer/index.js +2 -0
- package/dist/esm/components/emptystate/emptystate.js +7 -0
- package/dist/esm/components/emptystate/emptystate.recipe.js +31 -0
- package/dist/esm/components/emptystate/index.js +2 -0
- package/dist/esm/components/formfield/formfield.js +14 -0
- package/dist/esm/components/formfield/formfield.recipe.js +19 -0
- package/dist/esm/components/formfield/index.js +2 -0
- package/dist/esm/components/input/index.js +2 -0
- package/dist/esm/components/input/input.js +11 -0
- package/dist/esm/components/input/input.recipe.js +56 -0
- package/dist/esm/components/kbd/index.js +2 -0
- package/dist/esm/components/kbd/kbd.js +8 -0
- package/dist/esm/components/kbd/kbd.recipe.js +20 -0
- package/dist/esm/components/linechart/index.js +2 -0
- package/dist/esm/components/linechart/linechart.js +54 -0
- package/dist/esm/components/linechart/linechart.recipe.js +32 -0
- package/dist/esm/components/menu/index.js +3 -0
- package/dist/esm/components/menu/menu-keyboard.js +80 -0
- package/dist/esm/components/menu/menu.js +104 -0
- package/dist/esm/components/menu/menu.recipe.js +51 -0
- package/dist/esm/components/multiselect/index.js +2 -0
- package/dist/esm/components/multiselect/multiselect.js +125 -0
- package/dist/esm/components/multiselect/multiselect.recipe.js +68 -0
- package/dist/esm/components/popover/index.js +2 -0
- package/dist/esm/components/popover/popover.js +70 -0
- package/dist/esm/components/popover/popover.recipe.js +18 -0
- package/dist/esm/components/progress/index.js +2 -0
- package/dist/esm/components/progress/progress.js +23 -0
- package/dist/esm/components/progress/progress.recipe.js +17 -0
- package/dist/esm/components/radiogroup/index.js +2 -0
- package/dist/esm/components/radiogroup/radiogroup.js +46 -0
- package/dist/esm/components/radiogroup/radiogroup.recipe.js +37 -0
- 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/index.js +2 -0
- package/dist/esm/components/segmented/segmented.js +59 -0
- package/dist/esm/components/segmented/segmented.recipe.js +20 -0
- package/dist/esm/components/select/index.js +2 -0
- package/dist/esm/components/select/select.js +144 -0
- package/dist/esm/components/select/select.recipe.js +76 -0
- package/dist/esm/components/skeleton/index.js +2 -0
- package/dist/esm/components/skeleton/skeleton.js +10 -0
- package/dist/esm/components/skeleton/skeleton.recipe.js +14 -0
- package/dist/esm/components/spinner/index.js +2 -0
- package/dist/esm/components/spinner/spinner.js +12 -0
- package/dist/esm/components/spinner/spinner.recipe.js +13 -0
- package/dist/esm/components/stagebar/index.js +2 -0
- package/dist/esm/components/stagebar/stagebar.js +23 -0
- package/dist/esm/components/stagebar/stagebar.recipe.js +14 -0
- package/dist/esm/components/statcard/index.js +2 -0
- package/dist/esm/components/statcard/statcard.js +12 -0
- package/dist/esm/components/statcard/statcard.recipe.js +34 -0
- package/dist/esm/components/switch/index.js +2 -0
- package/dist/esm/components/switch/switch.js +22 -0
- package/dist/esm/components/switch/switch.recipe.js +26 -0
- package/dist/esm/components/table/index.js +2 -0
- package/dist/esm/components/table/table.js +30 -0
- package/dist/esm/components/table/table.recipe.js +40 -0
- package/dist/esm/components/tabletoolbar/index.js +2 -0
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +79 -0
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +199 -0
- package/dist/esm/components/tabletoolbar/tabletoolbar.recipe.js +23 -0
- package/dist/esm/components/tabs/index.js +2 -0
- package/dist/esm/components/tabs/tabs.js +70 -0
- package/dist/esm/components/tabs/tabs.recipe.js +33 -0
- package/dist/esm/components/textarea/index.js +2 -0
- package/dist/esm/components/textarea/textarea.js +20 -0
- package/dist/esm/components/textarea/textarea.recipe.js +43 -0
- package/dist/esm/components/toast/index.js +2 -0
- package/dist/esm/components/toast/toast.js +58 -0
- package/dist/esm/components/toast/toast.recipe.js +28 -0
- package/dist/esm/components/tooltip/index.js +2 -0
- package/dist/esm/components/tooltip/tooltip.js +59 -0
- package/dist/esm/components/tooltip/tooltip.recipe.js +13 -0
- 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/core/cx.js +1 -0
- package/dist/esm/core/define.js +3 -0
- package/dist/esm/core/index.js +4 -0
- package/dist/esm/core/primitive.js +13 -0
- package/dist/esm/core/resolve.js +41 -0
- package/dist/esm/core/types.js +1 -0
- package/dist/esm/index.js +76 -0
- package/dist/esm/product/appshell/appshell.js +68 -0
- package/dist/esm/product/appshell/appshell.recipe.js +27 -0
- package/dist/esm/product/appshell/index.js +2 -0
- 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 +42 -0
- package/dist/esm/product/board/board.recipe.js +28 -0
- package/dist/esm/product/board/index.js +2 -0
- package/dist/esm/product/command/command.js +201 -0
- package/dist/esm/product/command/command.recipe.js +44 -0
- package/dist/esm/product/command/index.js +2 -0
- package/dist/esm/product/entitycard/entitycard.js +11 -0
- package/dist/esm/product/entitycard/entitycard.recipe.js +29 -0
- package/dist/esm/product/entitycard/index.js +2 -0
- package/dist/esm/product/flowcanvas/flowcanvas.js +85 -0
- package/dist/esm/product/flowcanvas/flowcanvas.recipe.js +25 -0
- package/dist/esm/product/flowcanvas/index.js +2 -0
- package/dist/esm/product/inbox/inbox.js +13 -0
- package/dist/esm/product/inbox/inbox.recipe.js +43 -0
- package/dist/esm/product/inbox/index.js +2 -0
- package/dist/esm/product/listpage/index.js +2 -0
- package/dist/esm/product/listpage/listpage.js +21 -0
- package/dist/esm/product/listpage/listpage.recipe.js +43 -0
- package/dist/esm/product/navitem/index.js +1 -0
- package/dist/esm/product/navitem/navitem.js +8 -0
- package/dist/esm/product/navitem/navitem.recipe.js +33 -0
- package/dist/esm/product/onboarding/index.js +2 -0
- package/dist/esm/product/onboarding/onboarding.js +14 -0
- package/dist/esm/product/onboarding/onboarding.recipe.js +41 -0
- package/dist/esm/product/recordpage/index.js +2 -0
- package/dist/esm/product/recordpage/recordpage.js +372 -0
- package/dist/esm/product/recordpage/recordpage.recipe.js +159 -0
- package/dist/esm/product/recordpanel/index.js +2 -0
- package/dist/esm/product/recordpanel/recordpanel.js +47 -0
- package/dist/esm/product/recordpanel/recordpanel.recipe.js +48 -0
- package/dist/esm/product/recordstable/company-logos.js +26 -0
- package/dist/esm/product/recordstable/index.js +2 -0
- package/dist/esm/product/recordstable/recordstable.js +1054 -0
- package/dist/esm/product/recordstable/recordstable.recipe.js +149 -0
- package/dist/esm/product/recordstable/recordstable.tag.js +18 -0
- package/dist/esm/product/richtext/index.js +2 -0
- package/dist/esm/product/richtext/richtext.js +111 -0
- package/dist/esm/product/richtext/richtext.recipe.js +40 -0
- package/dist/esm/product/settingssection/index.js +2 -0
- package/dist/esm/product/settingssection/settingssection.js +11 -0
- package/dist/esm/product/settingssection/settingssection.recipe.js +20 -0
- package/dist/esm/product/settingsshell/index.js +2 -0
- package/dist/esm/product/settingsshell/settingsshell.js +23 -0
- package/dist/esm/product/settingsshell/settingsshell.recipe.js +43 -0
- package/dist/esm/product/sidebar/index.js +2 -0
- package/dist/esm/product/sidebar/sidebar.js +112 -0
- package/dist/esm/product/sidebar/sidebar.recipe.js +43 -0
- package/dist/esm/product/tasklist/index.js +2 -0
- package/dist/esm/product/tasklist/tasklist.js +16 -0
- package/dist/esm/product/tasklist/tasklist.recipe.js +35 -0
- package/dist/esm/product/trialbanner/index.js +2 -0
- package/dist/esm/product/trialbanner/trialbanner.js +10 -0
- package/dist/esm/product/trialbanner/trialbanner.recipe.js +29 -0
- package/dist/esm/product/viewtoggle/index.js +2 -0
- package/dist/esm/product/viewtoggle/viewtoggle.js +19 -0
- package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +24 -0
- package/dist/esm/tokens/contract.js +18 -0
- package/dist/esm/tokens/elevation.js +44 -0
- package/dist/esm/tokens/index.js +5 -0
- package/dist/esm/tokens/palette.js +60 -0
- package/dist/esm/tokens/scale.js +67 -0
- package/dist/esm/tokens/semantic.js +54 -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 +13 -5
- package/dist/multiselect.css +17 -9
- 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 +9 -1
- package/dist/progress.css +8 -0
- package/dist/radiogroup.css +9 -1
- package/dist/recordpage.css +26 -16
- package/dist/recordpanel.css +25 -15
- package/dist/recordstable.css +41 -27
- 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 +22 -8
- package/dist/select.d.ts +2 -1
- 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/statcard.css +6 -0
- package/dist/statcard.d.ts +2 -2
- package/dist/styles.css +2134 -999
- package/dist/switch.css +8 -0
- package/dist/table.css +34 -0
- package/dist/table.d.ts +8 -0
- package/dist/tabletoolbar.css +78 -0
- package/dist/tabletoolbar.d.ts +7 -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 +53 -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 +153 -0
- package/dist/types/components/datatable/datatable.recipe.d.ts +3 -0
- package/dist/types/components/datatable/index.d.ts +2 -0
- 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 +4 -2
- package/dist/types/components/select/select.recipe.d.ts +12 -0
- 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 +7 -2
- package/dist/types/components/statcard/statcard.recipe.d.ts +12 -2
- package/dist/types/components/table/index.d.ts +2 -0
- package/dist/types/components/table/table.d.ts +53 -0
- package/dist/types/components/table/table.recipe.d.ts +21 -0
- package/dist/types/components/tabletoolbar/index.d.ts +2 -0
- package/dist/types/components/tabletoolbar/tabletoolbar.chrome.d.ts +2 -0
- package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +89 -0
- package/dist/types/components/tabletoolbar/tabletoolbar.recipe.d.ts +3 -0
- 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 +8 -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/company-logos.d.ts +1 -0
- package/dist/types/product/recordstable/recordstable.d.ts +131 -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/index.d.ts +1 -1
- package/dist/types/product/sidebar/sidebar.d.ts +93 -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 +26 -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 +88 -0
- package/dist/types/tokens/scale.d.ts +7 -0
- package/dist/types/tokens/semantic.d.ts +31 -0
- package/dist/viewtoggle.css +11 -3
- package/dist/wheelpicker.css +68 -0
- package/dist/wheelpicker.d.ts +7 -0
- package/package.json +351 -9
- package/dist/index.js +0 -9690
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
|
+
import { contract as c } from "../../tokens/index.js";
|
|
3
|
+
// The entity-list page shell — measured from Attio's Reports / Sequences / Tasks
|
|
4
|
+
// / Notes list views: a view-bar toolbar (leading Sort/Filter, trailing view
|
|
5
|
+
// toggle / settings / New, and a record count), an optional dashed "Favorites"
|
|
6
|
+
// region, then a list with column headers and time-grouped 52px rows.
|
|
7
|
+
const config = defineRecipe({
|
|
8
|
+
name: "listpage",
|
|
9
|
+
base: `display: flex; flex-direction: column; min-height: 0; box-sizing: border-box; font-family: ${c.font.sans}; color: ${c.fgPrimary};
|
|
10
|
+
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
11
|
+
|
|
12
|
+
& .listpage-toolbar { display: flex; align-items: center; gap: ${c.space["2"]}; height: 52px; flex-shrink: 0; padding: 0 ${c.space["3"]}; }
|
|
13
|
+
& .listpage-toolbar-lead { display: flex; align-items: center; gap: ${c.space["2"]}; }
|
|
14
|
+
& .listpage-count { margin-inline-start: auto; font-size: ${c.text.md}; color: ${c.fgMuted}; white-space: nowrap; }
|
|
15
|
+
& .listpage-toolbar-trail { display: flex; align-items: center; gap: ${c.space["2"]}; }
|
|
16
|
+
& .listpage-count + .listpage-toolbar-trail { margin-inline-start: ${c.space["3"]}; }
|
|
17
|
+
|
|
18
|
+
& .listpage-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 ${c.space["3"]} ${c.space["3"]}; }
|
|
19
|
+
|
|
20
|
+
& .listpage-section-label { padding: ${c.space["2"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
21
|
+
& .listpage-favorites { display: flex; align-items: center; justify-content: center; min-height: 200px; padding: ${c.space["6"]}; border-radius: ${c.radius.xl};
|
|
22
|
+
background: repeating-linear-gradient(0deg, transparent, transparent) padding-box,
|
|
23
|
+
border-box; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 8%, transparent); }
|
|
24
|
+
& .listpage-favorites[data-dashed] { box-shadow: none; border: 1px dashed color-mix(in srgb, ${c.fgPrimary} 14%, transparent); }
|
|
25
|
+
|
|
26
|
+
& .listpage-colhead { display: flex; align-items: center; gap: ${c.space["2.5"]}; height: 40px; padding: 0 ${c.space["2"]}; box-shadow: inset 0 -1px 0 ${c.borderSubtle}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
27
|
+
& .listpage-colhead-cell { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; }
|
|
28
|
+
|
|
29
|
+
& .listpage-group { display: flex; align-items: center; gap: ${c.space["1.5"]}; height: 36px; padding: 0 ${c.space["2"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
30
|
+
& .listpage-group-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); font-size: ${c.text.xs}; color: ${c.fgMuted}; }
|
|
31
|
+
|
|
32
|
+
& .listpage-row { display: flex; align-items: center; gap: ${c.space["2.5"]}; width: 100%; height: 52px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-top: 1px solid ${c.borderSubtle}; background: none; font-family: inherit; color: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
33
|
+
& .listpage-row:focus-visible { outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; }
|
|
34
|
+
& .listpage-row:hover { background: color-mix(in srgb, ${c.fgPrimary} 3%, transparent); }
|
|
35
|
+
& .listpage-row-title { font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; }
|
|
36
|
+
|
|
37
|
+
& .listpage-empty { padding: ${c.space["8"]} ${c.space["4"]}; text-align: center; font-size: ${c.text.md}; color: ${c.fgMuted}; }`,
|
|
38
|
+
variants: {},
|
|
39
|
+
defaultVariants: {},
|
|
40
|
+
compoundVariants: [],
|
|
41
|
+
});
|
|
42
|
+
export const listpageRecipe = resolveRecipe(config);
|
|
43
|
+
export default config;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NavItem } from "./navitem.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Primitive } from "../../core/index.js";
|
|
4
|
+
import { navitemRecipe } from "./navitem.recipe.js";
|
|
5
|
+
export const NavItem = React.forwardRef(({ active, icon, trailing, className, children, ...props }, ref) => {
|
|
6
|
+
return (_jsxs(Primitive.a, { ref: ref, "data-active": active || undefined, className: navitemRecipe({ className }), ...props, children: [icon, _jsx("span", { className: "navitem-label", children: children }), trailing != null && (_jsx("span", { className: "navitem-trailing", children: trailing }))] }));
|
|
7
|
+
});
|
|
8
|
+
NavItem.displayName = "NavItem";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
|
+
import { contract as c } from "../../tokens/index.js";
|
|
3
|
+
const config = defineRecipe({
|
|
4
|
+
name: "navitem",
|
|
5
|
+
base: `box-sizing: border-box; display: flex; align-items: center; gap: ${c.space["1.5"]}
|
|
6
|
+
; height: 28px; padding-inline: ${c.space["2"]}
|
|
7
|
+
; padding-inline-end: ${c.space["1"]}
|
|
8
|
+
; border-radius: ${c.radius.lg}
|
|
9
|
+
; font-family: ${c.font.sans}
|
|
10
|
+
; font-size: ${c.text.lg}
|
|
11
|
+
; font-weight: ${c.weight.medium}
|
|
12
|
+
; letter-spacing: -0.14px; line-height: 20px; color: ${c.fgPrimary}
|
|
13
|
+
; text-decoration: none; cursor: pointer; user-select: none; width: 100%; transition: background-color 0.16s; & .navitem-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
14
|
+
& .navitem-trailing { margin-inline-start: auto; display: inline-flex; align-items: center; flex-shrink: 0; }
|
|
15
|
+
&:hover { background: color-mix(in srgb, ${c.fgPrimary} 2%, transparent); }
|
|
16
|
+
&[data-active] { background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); }
|
|
17
|
+
`,
|
|
18
|
+
variants: {},
|
|
19
|
+
defaultVariants: {},
|
|
20
|
+
compoundVariants: [],
|
|
21
|
+
});
|
|
22
|
+
export const navitemRecipe = Object.assign(resolveRecipe(config), {
|
|
23
|
+
config,
|
|
24
|
+
meta: {
|
|
25
|
+
row: {
|
|
26
|
+
height: "28px",
|
|
27
|
+
borderRadius: "9px",
|
|
28
|
+
fontSize: "14px",
|
|
29
|
+
fontWeight: "500",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
export default config;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Check, ChevronDown, MoreHorizontal } from "lucide-react";
|
|
3
|
+
import { onboardingRecipe } from "./onboarding.recipe.js";
|
|
4
|
+
/**
|
|
5
|
+
* An onboarding checklist card — measured from Attio's floating "Getting
|
|
6
|
+
* started" widget. Title + optional menu/minimize, a segmented progress bar,
|
|
7
|
+
* and step rows (completed rows strike through with a brand check).
|
|
8
|
+
*/
|
|
9
|
+
export function OnboardingChecklist({ title = "Getting started", steps, encouragement = "Keep it up!", onStepClick, onMenu, onMinimize, className, optionsLabel = "Checklist options", minimizeLabel = "Minimize", progressLabel = "Onboarding progress", }) {
|
|
10
|
+
const total = steps.length;
|
|
11
|
+
const done = steps.filter((s) => s.done).length;
|
|
12
|
+
return (_jsxs("div", { className: onboardingRecipe({ className }), children: [_jsxs("div", { className: "onboarding-head", children: [_jsx("span", { className: "onboarding-title", children: title }), onMenu && (_jsx("button", { type: "button", className: "onboarding-iconbtn", "aria-label": optionsLabel, onClick: onMenu, children: _jsx(MoreHorizontal, { size: 16, strokeWidth: 1.75 }) })), onMinimize && (_jsx("button", { type: "button", className: "onboarding-iconbtn", "aria-label": minimizeLabel, onClick: onMinimize, children: _jsx(ChevronDown, { size: 16, strokeWidth: 1.75 }) }))] }), _jsxs("span", { className: "onboarding-sub", children: [_jsxs("b", { children: [done, "/", total] }), " ", "steps completed", encouragement ? _jsxs(_Fragment, { children: [" \u00B7 ", encouragement] }) : null] }), _jsx("div", { className: "onboarding-progress", role: "progressbar", "aria-valuenow": done, "aria-valuemin": 0, "aria-valuemax": total, "aria-label": progressLabel, children: Array.from({ length: total }, (_, i) => (_jsx("span", { className: "onboarding-seg", "data-done": i < done ? "" : undefined }, i))) }), _jsx("div", { className: "onboarding-steps", children: steps.map((s) => (_jsxs("button", { type: "button", className: "onboarding-step", "data-done": s.done ? "" : undefined, disabled: s.done, onClick: s.done ? undefined : () => onStepClick?.(s.id), children: [_jsx("span", { className: "onboarding-step-icon", children: s.icon }), _jsx("span", { className: "onboarding-step-label", children: s.label }), _jsx("span", { className: "onboarding-step-check", children: s.done && _jsx(Check, { size: 12, strokeWidth: 3 }) })] }, s.id))) })] }));
|
|
13
|
+
}
|
|
14
|
+
OnboardingChecklist.displayName = "OnboardingChecklist";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
|
+
import { contract as c } from "../../tokens/index.js";
|
|
3
|
+
// An onboarding checklist card — measured from Attio's floating "Getting started"
|
|
4
|
+
// widget: a title + menu/minimize header, a "N/total steps" subtitle, a
|
|
5
|
+
// segmented progress bar (filled pills brand, rest 4% ink), then step rows with
|
|
6
|
+
// an icon + label; completed rows strike through and show a brand check.
|
|
7
|
+
const config = defineRecipe({
|
|
8
|
+
name: "onboarding",
|
|
9
|
+
base: `display: flex; flex-direction: column; box-sizing: border-box; width: 272px; padding: ${c.space["3"]}; gap: ${c.space["2"]};
|
|
10
|
+
border-radius: ${c.radius.xl}; background: ${c.bgSurface}; font-family: ${c.font.sans};
|
|
11
|
+
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
12
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 6%, transparent), 0 8px 28px -6px rgba(28,40,64,0.16), 0 2px 6px -2px rgba(28,40,64,0.10);
|
|
13
|
+
|
|
14
|
+
& .onboarding-head { display: flex; align-items: center; gap: ${c.space["1"]}; }
|
|
15
|
+
& .onboarding-title { flex: 1; min-width: 0; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; }
|
|
16
|
+
& .onboarding-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: ${c.size.chip}; flex-shrink: 0; padding: 0; margin: 0; border: none; border-radius: ${c.radius.sm}; background: none; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; transition: background-color .12s, color .12s; }
|
|
17
|
+
& .onboarding-iconbtn:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
18
|
+
|
|
19
|
+
& .onboarding-sub { font-size: ${c.text.sm}; color: color-mix(in srgb, ${c.fgPrimary} 50%, transparent); }
|
|
20
|
+
& .onboarding-sub b { font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; }
|
|
21
|
+
|
|
22
|
+
& .onboarding-progress { display: flex; gap: ${c.space["1"]}; margin: ${c.space["0.5"]} 0 ${c.space["1"]}; }
|
|
23
|
+
& .onboarding-seg { flex: 1; height: 4px; border-radius: ${c.radius.full}; background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); transition: background-color .2s ease; }
|
|
24
|
+
& .onboarding-seg[data-done] { background: ${c.bgBrandSolid}; }
|
|
25
|
+
|
|
26
|
+
& .onboarding-steps { display: flex; flex-direction: column; }
|
|
27
|
+
& .onboarding-step { display: flex; align-items: center; gap: ${c.space["2"]}; height: 36px; padding: 0 ${c.space["1"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
28
|
+
& .onboarding-step:hover { background: ${c.bgRaised}; }
|
|
29
|
+
& .onboarding-step-icon { display: inline-flex; flex-shrink: 0; color: ${c.fgMuted}; }
|
|
30
|
+
& .onboarding-step-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
31
|
+
& .onboarding-step-check { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex-shrink: 0; border-radius: ${c.radius.full}; color: transparent; }
|
|
32
|
+
& .onboarding-step[data-done] { cursor: default; }
|
|
33
|
+
& .onboarding-step[data-done] .onboarding-step-icon, & .onboarding-step[data-done] .onboarding-step-label { color: ${c.fgMuted}; text-decoration: line-through; }
|
|
34
|
+
& .onboarding-step[data-done]:hover { background: none; }
|
|
35
|
+
& .onboarding-step[data-done] .onboarding-step-check { background: ${c.bgBrandSolid}; color: ${c.fgOnBrand}; }`,
|
|
36
|
+
variants: {},
|
|
37
|
+
defaultVariants: {},
|
|
38
|
+
compoundVariants: [],
|
|
39
|
+
});
|
|
40
|
+
export const onboardingRecipe = resolveRecipe(config);
|
|
41
|
+
export default config;
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Activity as ActivityIcon, CalendarClock, ChevronDown, CircleDollarSign, Copy, DollarSign, FileText, Folder, Inbox, Landmark, LayoutGrid, Mail, Maximize2, Minimize2, MoreHorizontal, Pencil, Phone, Plus, Search, Share2, Sparkles, SquareCheck, Star, Trash2, Users, UsersRound, X, Zap, } from "lucide-react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Avatar } from "../../components/avatar/index.js";
|
|
5
|
+
import { Checkbox } from "../../components/checkbox/index.js";
|
|
6
|
+
import { Menu, MenuItem, MenuSeparator } from "../../components/menu/index.js";
|
|
7
|
+
import { Tabs } from "../../components/tabs/index.js";
|
|
8
|
+
import { tagTone, } from "../recordstable/index.js";
|
|
9
|
+
import { recordpageRecipe } from "./recordpage.recipe.js";
|
|
10
|
+
function valueEmpty(v) {
|
|
11
|
+
return v == null || v === "" || (Array.isArray(v) && v.length === 0);
|
|
12
|
+
}
|
|
13
|
+
export const recordPageLabels = {
|
|
14
|
+
breadcrumb: "Breadcrumb",
|
|
15
|
+
editRecord: "Edit record",
|
|
16
|
+
recordActions: "Record actions",
|
|
17
|
+
addToFavourites: "Add to favourites",
|
|
18
|
+
removeFromFavourites: "Remove from favourites",
|
|
19
|
+
copyRecordLink: "Copy record link",
|
|
20
|
+
deleteRecord: "Delete record",
|
|
21
|
+
linkRecords: "Link records",
|
|
22
|
+
logANote: "Log a note",
|
|
23
|
+
createATask: "Create a task",
|
|
24
|
+
fullScreen: "Full screen",
|
|
25
|
+
exitFullScreen: "Exit full screen",
|
|
26
|
+
resizeDetails: "Resize details column",
|
|
27
|
+
composeEmail: "Compose email",
|
|
28
|
+
askAttio: "Ask Attio",
|
|
29
|
+
addToList: "Add to list",
|
|
30
|
+
highlights: "Highlights",
|
|
31
|
+
recordDetails: "Record Details",
|
|
32
|
+
searchFields: "Search fields",
|
|
33
|
+
closeSearch: "Close search",
|
|
34
|
+
searchPlaceholder: "Search…",
|
|
35
|
+
viewAllValues: "View all values",
|
|
36
|
+
setAValue: "Set a value…",
|
|
37
|
+
viewAll: "View all",
|
|
38
|
+
showLess: "Show less",
|
|
39
|
+
viewLess: "View less",
|
|
40
|
+
newNote: "New note",
|
|
41
|
+
newTask: "New task",
|
|
42
|
+
cancel: "Cancel",
|
|
43
|
+
noNotesYet: "No notes yet.",
|
|
44
|
+
noTasksYet: "No tasks yet.",
|
|
45
|
+
nothingHereYet: "Nothing here yet.",
|
|
46
|
+
you: "You",
|
|
47
|
+
justNow: "Just now",
|
|
48
|
+
tabs: {
|
|
49
|
+
overview: "Overview",
|
|
50
|
+
activity: "Activity",
|
|
51
|
+
emails: "Emails",
|
|
52
|
+
calls: "Calls",
|
|
53
|
+
team: "Team",
|
|
54
|
+
lists: "Lists",
|
|
55
|
+
notes: "Notes",
|
|
56
|
+
tasks: "Tasks",
|
|
57
|
+
files: "Files",
|
|
58
|
+
},
|
|
59
|
+
highlightLabels: {
|
|
60
|
+
connectionStrength: "Connection strength",
|
|
61
|
+
nextInteraction: "Next calendar interaction",
|
|
62
|
+
team: "Team",
|
|
63
|
+
estimatedArr: "Estimated ARR",
|
|
64
|
+
fundingRaised: "Funding raised",
|
|
65
|
+
employeeRange: "Employee range",
|
|
66
|
+
associatedDeals: "Associated deals",
|
|
67
|
+
},
|
|
68
|
+
highlightEmpty: {
|
|
69
|
+
connectionStrength: "No connection",
|
|
70
|
+
nextInteraction: "No interaction",
|
|
71
|
+
team: "No team",
|
|
72
|
+
estimatedArr: "No ARR",
|
|
73
|
+
fundingRaised: "No funding raised",
|
|
74
|
+
employeeRange: "No range",
|
|
75
|
+
associatedDeals: "No deals",
|
|
76
|
+
},
|
|
77
|
+
domainSetTo: (value) => (_jsxs(_Fragment, { children: ["Domain set to ", _jsx("b", { children: value })] })),
|
|
78
|
+
taggedCategories: (count) => (_jsxs(_Fragment, { children: ["Tagged ", _jsx("b", { children: count }), " categories"] })),
|
|
79
|
+
};
|
|
80
|
+
function TagsValue({ values }) {
|
|
81
|
+
const [expanded, setExpanded] = React.useState(false);
|
|
82
|
+
const overflow = values.length - 1;
|
|
83
|
+
const shown = expanded ? values : values.slice(0, 1);
|
|
84
|
+
return (_jsxs(_Fragment, { children: [shown.map((t) => (_jsx("span", { className: "recordstable-tag", "data-tone": tagTone(t), children: t }, t))), !expanded && overflow > 0 && (_jsxs("button", { type: "button", className: "recordpage-morevalues", onClick: () => setExpanded(true), children: ["+", overflow] }))] }));
|
|
85
|
+
}
|
|
86
|
+
function FieldValue({ col, row, labels, }) {
|
|
87
|
+
const v = row[col.key];
|
|
88
|
+
if (valueEmpty(v))
|
|
89
|
+
return _jsx("span", { className: "recordpage-empty", children: labels.setAValue });
|
|
90
|
+
switch (col.type) {
|
|
91
|
+
case "tags":
|
|
92
|
+
return _jsx(TagsValue, { values: v });
|
|
93
|
+
case "number":
|
|
94
|
+
return _jsx(_Fragment, { children: typeof v === "number" ? v.toLocaleString() : v });
|
|
95
|
+
case "url":
|
|
96
|
+
return (_jsx("a", { className: "recordpage-link", href: `https://${v}`, target: "_blank", rel: "noreferrer", children: String(v) }));
|
|
97
|
+
default:
|
|
98
|
+
return _jsx(_Fragment, { children: String(v) });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function SectionHead({ title, count, action, }) {
|
|
102
|
+
return (_jsxs("div", { className: "recordpage-section-head", children: [_jsx("span", { className: "recordpage-section-title", children: title }), count != null && (_jsx("span", { className: "recordpage-section-count", children: count })), _jsx("span", { className: "recordpage-section-spacer" }), action] }));
|
|
103
|
+
}
|
|
104
|
+
// A note/task composer: a textarea (or input) with Cancel / submit actions.
|
|
105
|
+
function Composer({ placeholder, submitLabel, multiline, onSubmit, onCancel, labels, }) {
|
|
106
|
+
const [text, setText] = React.useState("");
|
|
107
|
+
const commit = () => {
|
|
108
|
+
const t = text.trim();
|
|
109
|
+
if (t)
|
|
110
|
+
onSubmit(t);
|
|
111
|
+
};
|
|
112
|
+
return (_jsxs("div", { className: "recordpage-composer", children: [_jsx("textarea", {
|
|
113
|
+
// biome-ignore lint/a11y/noAutofocus: focusing the just-opened composer is expected
|
|
114
|
+
autoFocus: true, placeholder: placeholder, value: text, rows: multiline ? 3 : 1, onChange: (e) => setText(e.target.value), onKeyDown: (e) => {
|
|
115
|
+
if (e.key === "Enter" && (!multiline || e.metaKey)) {
|
|
116
|
+
e.preventDefault();
|
|
117
|
+
commit();
|
|
118
|
+
}
|
|
119
|
+
if (e.key === "Escape")
|
|
120
|
+
onCancel();
|
|
121
|
+
} }), _jsxs("div", { className: "recordpage-composer-actions", children: [_jsx("button", { type: "button", className: "recordpage-btn", onClick: onCancel, children: labels.cancel }), _jsx("button", { type: "button", className: "recordpage-btn recordpage-btn--primary", disabled: !text.trim(), onClick: commit, children: submitLabel })] })] }));
|
|
122
|
+
}
|
|
123
|
+
function NotesSection({ notes, onAdd, labels, }) {
|
|
124
|
+
const [open, setOpen] = React.useState(false);
|
|
125
|
+
return (_jsxs("section", { children: [_jsx(SectionHead, { title: labels.tabs.notes, count: notes.length, action: _jsxs("button", { type: "button", className: "recordpage-addbtn", onClick: () => setOpen(true), children: [_jsx(Plus, { size: 14, strokeWidth: 2 }), labels.newNote] }) }), open && (_jsx(Composer, { labels: labels, multiline: true, placeholder: "Write a note\u2026 (\u2318\u21B5 to save)", submitLabel: "Save note", onCancel: () => setOpen(false), onSubmit: (t) => {
|
|
126
|
+
onAdd(t);
|
|
127
|
+
setOpen(false);
|
|
128
|
+
} })), notes.length === 0 && !open ? (_jsx("div", { className: "recordpage-emptystate", children: labels.noNotesYet })) : (notes.map((n) => (_jsxs("div", { className: "recordpage-note", children: [_jsx(Avatar, { size: "sm", shape: "circle", tone: "neutral", children: "Y" }), _jsxs("div", { className: "recordpage-note-body", children: [_jsxs("div", { className: "recordpage-note-head", children: [_jsx("span", { className: "recordpage-note-author", children: labels.you }), _jsx("span", { className: "recordpage-note-time", children: n.time })] }), _jsx("div", { className: "recordpage-note-text", children: n.text })] })] }, n.id))))] }));
|
|
129
|
+
}
|
|
130
|
+
function TasksSection({ tasks, onAdd, onToggle, labels, }) {
|
|
131
|
+
const [open, setOpen] = React.useState(false);
|
|
132
|
+
return (_jsxs("section", { children: [_jsx(SectionHead, { title: labels.tabs.tasks, count: tasks.length, action: _jsxs("button", { type: "button", className: "recordpage-addbtn", onClick: () => setOpen(true), children: [_jsx(Plus, { size: 14, strokeWidth: 2 }), labels.newTask] }) }), open && (_jsx(Composer, { labels: labels, placeholder: "Task name\u2026 (\u21B5 to add)", submitLabel: "Add task", onCancel: () => setOpen(false), onSubmit: (t) => {
|
|
133
|
+
onAdd(t);
|
|
134
|
+
setOpen(false);
|
|
135
|
+
} })), tasks.length === 0 && !open ? (_jsx("div", { className: "recordpage-emptystate", children: labels.noTasksYet })) : (tasks.map((t) => (_jsxs("div", { className: "recordpage-task", "data-done": t.done ? "" : undefined, children: [_jsx(Checkbox, { checked: t.done, onChange: () => onToggle(t.id), "aria-label": t.text }), _jsx("span", { className: "recordpage-task-text", children: t.text })] }, t.id))))] }));
|
|
136
|
+
}
|
|
137
|
+
function EmptyCard({ icon, children, }) {
|
|
138
|
+
return (_jsxs("div", { className: "recordpage-emptycard", children: [icon, children] }));
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The full-page company record view — the page Attio opens when you click into a
|
|
142
|
+
* record (as opposed to the peek [RecordPanel]). A top breadcrumb bar with
|
|
143
|
+
* favourite/edit/compose/… actions, a 320px left attribute column, and a tabbed
|
|
144
|
+
* main area: Overview stacks Highlights, an Activity feed, and Notes / Tasks /
|
|
145
|
+
* Emails sections (Notes & Tasks are live — add and check things off). Drop it
|
|
146
|
+
* into the app's main content area.
|
|
147
|
+
*/
|
|
148
|
+
export function RecordPage({ record, columns, collection = "Records", labels, onBack, onToggleFull, full, className, }) {
|
|
149
|
+
const t = React.useMemo(() => ({
|
|
150
|
+
...recordPageLabels,
|
|
151
|
+
...labels,
|
|
152
|
+
tabs: { ...recordPageLabels.tabs, ...labels?.tabs },
|
|
153
|
+
highlightLabels: {
|
|
154
|
+
...recordPageLabels.highlightLabels,
|
|
155
|
+
...labels?.highlightLabels,
|
|
156
|
+
},
|
|
157
|
+
highlightEmpty: {
|
|
158
|
+
...recordPageLabels.highlightEmpty,
|
|
159
|
+
...labels?.highlightEmpty,
|
|
160
|
+
},
|
|
161
|
+
}), [labels]);
|
|
162
|
+
const [favorite, setFavorite] = React.useState(false);
|
|
163
|
+
const [notes, setNotes] = React.useState([]);
|
|
164
|
+
const [tasks, setTasks] = React.useState([]);
|
|
165
|
+
const [showAllActivity, setShowAllActivity] = React.useState(false);
|
|
166
|
+
// Collapsible + searchable Record Details, like Attio.
|
|
167
|
+
const [detailsOpen, setDetailsOpen] = React.useState(true);
|
|
168
|
+
const [searchOpen, setSearchOpen] = React.useState(false);
|
|
169
|
+
const [fieldQuery, setFieldQuery] = React.useState("");
|
|
170
|
+
const [showAllValues, setShowAllValues] = React.useState(false);
|
|
171
|
+
// Drag-resizable left details column, like Attio.
|
|
172
|
+
const [detailsW, setDetailsW] = React.useState(320);
|
|
173
|
+
const [resizing, setResizing] = React.useState(false);
|
|
174
|
+
const dragRef = React.useRef(null);
|
|
175
|
+
const onResizeDown = (e) => {
|
|
176
|
+
dragRef.current = { x: e.clientX, w: detailsW };
|
|
177
|
+
setResizing(true);
|
|
178
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
179
|
+
};
|
|
180
|
+
const onResizeMove = (e) => {
|
|
181
|
+
if (!dragRef.current)
|
|
182
|
+
return;
|
|
183
|
+
const next = dragRef.current.w + (e.clientX - dragRef.current.x);
|
|
184
|
+
setDetailsW(Math.max(300, Math.min(560, next)));
|
|
185
|
+
};
|
|
186
|
+
const onResizeUp = (e) => {
|
|
187
|
+
dragRef.current = null;
|
|
188
|
+
setResizing(false);
|
|
189
|
+
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
190
|
+
};
|
|
191
|
+
const idRef = React.useRef(0);
|
|
192
|
+
const nextId = () => {
|
|
193
|
+
idRef.current += 1;
|
|
194
|
+
return `n${idRef.current}`;
|
|
195
|
+
};
|
|
196
|
+
const entityCol = columns.find((col) => col.type === "entity");
|
|
197
|
+
const entity = entityCol
|
|
198
|
+
? record[entityCol.key]
|
|
199
|
+
: undefined;
|
|
200
|
+
const name = entity?.name ?? "Record";
|
|
201
|
+
const fields = columns.filter((col) => col.type !== "entity");
|
|
202
|
+
const q = fieldQuery.trim().toLowerCase();
|
|
203
|
+
const matchedFields = q
|
|
204
|
+
? fields.filter((col) => col.label.toLowerCase().includes(q))
|
|
205
|
+
: fields;
|
|
206
|
+
// Attio shows the first 5 fields; "View all values" reveals the rest.
|
|
207
|
+
const FIELD_LIMIT = 5;
|
|
208
|
+
const canRevealFields = !q && matchedFields.length > FIELD_LIMIT;
|
|
209
|
+
const shownFields = canRevealFields && !showAllValues
|
|
210
|
+
? matchedFields.slice(0, FIELD_LIMIT)
|
|
211
|
+
: matchedFields;
|
|
212
|
+
const byKey = React.useMemo(() => new Map(columns.map((col) => [col.key, col])), [columns]);
|
|
213
|
+
// Attio's Overview "Highlights" — a fixed set of enrichment stats (measured
|
|
214
|
+
// from the live app), a couple derived from the record, the rest empty.
|
|
215
|
+
const arrVal = record.arr;
|
|
216
|
+
const empVal = record.employees;
|
|
217
|
+
const compactUsd = (n) => n >= 1e9
|
|
218
|
+
? `$${Math.round(n / 1e9)}B`
|
|
219
|
+
: n >= 1e6
|
|
220
|
+
? `$${Math.round(n / 1e6)}M`
|
|
221
|
+
: `$${n.toLocaleString()}`;
|
|
222
|
+
const empRange = (n) => n >= 100000
|
|
223
|
+
? "100K+"
|
|
224
|
+
: n >= 10000
|
|
225
|
+
? "10K–100K"
|
|
226
|
+
: n >= 1000
|
|
227
|
+
? "1K–10K"
|
|
228
|
+
: "<1K";
|
|
229
|
+
const highlights = [
|
|
230
|
+
{
|
|
231
|
+
label: t.highlightLabels.connectionStrength,
|
|
232
|
+
icon: Zap,
|
|
233
|
+
value: null,
|
|
234
|
+
empty: t.highlightEmpty.connectionStrength,
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
label: t.highlightLabels.nextInteraction,
|
|
238
|
+
icon: CalendarClock,
|
|
239
|
+
value: null,
|
|
240
|
+
empty: t.highlightEmpty.nextInteraction,
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
label: t.highlightLabels.team,
|
|
244
|
+
icon: Users,
|
|
245
|
+
value: null,
|
|
246
|
+
empty: t.highlightEmpty.team,
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
label: t.highlightLabels.estimatedArr,
|
|
250
|
+
icon: DollarSign,
|
|
251
|
+
value: typeof arrVal === "number" ? compactUsd(arrVal) : null,
|
|
252
|
+
empty: t.highlightEmpty.estimatedArr,
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
label: t.highlightLabels.fundingRaised,
|
|
256
|
+
icon: Landmark,
|
|
257
|
+
value: null,
|
|
258
|
+
empty: t.highlightEmpty.fundingRaised,
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
label: t.highlightLabels.employeeRange,
|
|
262
|
+
icon: UsersRound,
|
|
263
|
+
value: typeof empVal === "number" ? empRange(empVal) : null,
|
|
264
|
+
empty: t.highlightEmpty.employeeRange,
|
|
265
|
+
},
|
|
266
|
+
];
|
|
267
|
+
const ti = { size: 15, strokeWidth: 1.75 };
|
|
268
|
+
const tabs = [
|
|
269
|
+
{ value: "overview", label: t.tabs.overview, icon: _jsx(LayoutGrid, { ...ti }) },
|
|
270
|
+
{
|
|
271
|
+
value: "activity",
|
|
272
|
+
label: t.tabs.activity,
|
|
273
|
+
icon: _jsx(ActivityIcon, { ...ti }),
|
|
274
|
+
},
|
|
275
|
+
{ value: "emails", label: t.tabs.emails, icon: _jsx(Mail, { ...ti }), badge: 0 },
|
|
276
|
+
{ value: "calls", label: t.tabs.calls, icon: _jsx(Phone, { ...ti }), badge: 0 },
|
|
277
|
+
{ value: "team", label: t.tabs.team, icon: _jsx(Users, { ...ti }), badge: 0 },
|
|
278
|
+
{
|
|
279
|
+
value: "notes",
|
|
280
|
+
label: t.tabs.notes,
|
|
281
|
+
icon: _jsx(FileText, { ...ti }),
|
|
282
|
+
badge: notes.length,
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
value: "tasks",
|
|
286
|
+
label: t.tabs.tasks,
|
|
287
|
+
icon: _jsx(SquareCheck, { ...ti }),
|
|
288
|
+
badge: tasks.length,
|
|
289
|
+
},
|
|
290
|
+
{ value: "files", label: t.tabs.files, icon: _jsx(Folder, { ...ti }) },
|
|
291
|
+
{
|
|
292
|
+
value: "deals",
|
|
293
|
+
label: t.highlightLabels.associatedDeals,
|
|
294
|
+
icon: _jsx(CircleDollarSign, { ...ti }),
|
|
295
|
+
badge: 0,
|
|
296
|
+
},
|
|
297
|
+
];
|
|
298
|
+
const addNote = (text) => setNotes((n) => [{ id: nextId(), text, time: t.justNow }, ...n]);
|
|
299
|
+
const addTask = (text) => setTasks((t) => [{ id: nextId(), text, done: false }, ...t]);
|
|
300
|
+
const toggleTask = (id) => setTasks((t) => t.map((x) => (x.id === id ? { ...x, done: !x.done } : x)));
|
|
301
|
+
// A small, plausible activity feed derived from the record's own fields.
|
|
302
|
+
const domain = byKey.get("domain");
|
|
303
|
+
const cats = byKey.get("categories");
|
|
304
|
+
const activity = [
|
|
305
|
+
domain && !valueEmpty(record[domain.key])
|
|
306
|
+
? {
|
|
307
|
+
id: "domain",
|
|
308
|
+
text: _jsx(_Fragment, { children: t.domainSetTo(String(record[domain.key])) }),
|
|
309
|
+
time: "2 hours ago",
|
|
310
|
+
}
|
|
311
|
+
: null,
|
|
312
|
+
cats && !valueEmpty(record[cats.key])
|
|
313
|
+
? {
|
|
314
|
+
id: "cats",
|
|
315
|
+
text: t.taggedCategories(record[cats.key].length),
|
|
316
|
+
time: "1 day ago",
|
|
317
|
+
}
|
|
318
|
+
: null,
|
|
319
|
+
{
|
|
320
|
+
id: "created",
|
|
321
|
+
text: (_jsxs(_Fragment, { children: [_jsx("b", { children: name }), " record was created"] })),
|
|
322
|
+
time: "1 day ago",
|
|
323
|
+
},
|
|
324
|
+
].filter(Boolean);
|
|
325
|
+
const shownActivity = showAllActivity ? activity : activity.slice(0, 2);
|
|
326
|
+
const activityFeed = (_jsxs("section", { children: [_jsx(SectionHead, { title: t.tabs.activity, action: activity.length > 2 ? (_jsx("button", { type: "button", className: "recordpage-viewall recordpage-viewall--inline", onClick: () => setShowAllActivity((s) => !s), children: showAllActivity ? t.showLess : t.viewAll })) : undefined }), _jsx("div", { className: "recordpage-feed", children: shownActivity.map((a) => (_jsxs("div", { className: "recordpage-feed-item", children: [_jsx("span", { className: "recordpage-feed-dot", children: _jsx(ActivityIcon, { size: 13, strokeWidth: 2 }) }), _jsxs("div", { className: "recordpage-feed-body", children: [a.text, _jsx("div", { className: "recordpage-feed-time", children: a.time })] })] }, a.id))) })] }));
|
|
327
|
+
const emailsEmpty = (_jsxs(EmptyCard, { icon: _jsx(Inbox, { size: 22, strokeWidth: 1.5 }), children: ["No emails logged with ", name, " yet."] }));
|
|
328
|
+
const panel = (active) => {
|
|
329
|
+
switch (active) {
|
|
330
|
+
case "overview":
|
|
331
|
+
return (_jsxs("div", { className: "recordpage-panel", children: [_jsxs("section", { children: [_jsx("div", { className: "recordpage-section-title", children: t.highlights }), _jsx("div", { className: "recordpage-hl-card", children: _jsx("div", { className: "recordpage-hl-grid", children: highlights.map((h) => (_jsxs("div", { className: "recordpage-hl-cell", children: [_jsx(h.icon, { className: "recordpage-hl-icon", size: 15, strokeWidth: 1.75 }), _jsx("div", { className: "recordpage-hl-label", children: h.label }), _jsx("div", { className: "recordpage-hl-value", children: h.value ?? (_jsx("span", { className: "recordpage-hl-value--empty", children: h.empty })) })] }, h.label))) }) })] }), activityFeed, _jsxs("section", { children: [_jsx(SectionHead, { title: t.tabs.emails, count: 0 }), emailsEmpty] }), _jsx(NotesSection, { notes: notes, onAdd: addNote, labels: t }), _jsx(TasksSection, { tasks: tasks, onAdd: addTask, onToggle: toggleTask, labels: t })] }));
|
|
332
|
+
case "activity":
|
|
333
|
+
return _jsx("div", { className: "recordpage-panel", children: activityFeed });
|
|
334
|
+
case "notes":
|
|
335
|
+
return (_jsx("div", { className: "recordpage-panel", children: _jsx(NotesSection, { notes: notes, onAdd: addNote, labels: t }) }));
|
|
336
|
+
case "tasks":
|
|
337
|
+
return (_jsx("div", { className: "recordpage-panel", children: _jsx(TasksSection, { tasks: tasks, onAdd: addTask, onToggle: toggleTask, labels: t }) }));
|
|
338
|
+
case "emails":
|
|
339
|
+
return _jsx("div", { className: "recordpage-panel", children: emailsEmpty });
|
|
340
|
+
default:
|
|
341
|
+
return (_jsx("div", { className: "recordpage-panel", children: _jsx(EmptyCard, { icon: _jsx(Folder, { size: 22, strokeWidth: 1.5 }), children: t.nothingHereYet }) }));
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
return (_jsxs("div", { className: recordpageRecipe({ className }), children: [_jsxs("div", { className: "recordpage-topbar", children: [_jsxs("nav", { className: "recordpage-crumbs", "aria-label": t.breadcrumb, children: [_jsx("button", { type: "button", className: "recordpage-crumb", onClick: onBack, "aria-label": `Back to ${collection}`, children: collection }), _jsx("span", { className: "recordpage-crumb-sep", children: "/" }), _jsx("span", { className: "recordpage-crumb-name", children: name })] }), _jsxs("div", { className: "recordpage-actions", children: [_jsxs("button", { type: "button", className: "recordpage-action recordpage-action--ghost", children: [_jsx(Sparkles, { size: 14, strokeWidth: 1.75, color: "var(--bg-brand-solid)" }), t.askAttio] }), onToggleFull && (_jsx("button", { type: "button", className: "recordpage-action recordpage-action--icon", onClick: onToggleFull, "aria-label": full ? t.exitFullScreen : t.fullScreen, children: full ? (_jsx(Minimize2, { size: 15, strokeWidth: 1.75 })) : (_jsx(Maximize2, { size: 15, strokeWidth: 1.75 })) })), _jsxs(Menu, { align: "end", "aria-label": t.recordActions, trigger: _jsx("button", { type: "button", className: "recordpage-action recordpage-action--icon", "aria-label": t.recordActions, children: _jsx(MoreHorizontal, { size: 16, strokeWidth: 1.75 }) }), children: [_jsx(MenuItem, { icon: _jsx(Copy, { size: 15, strokeWidth: 1.75 }), shortcut: "\u2318C", children: t.copyRecordLink }), _jsx(MenuItem, { icon: _jsx(Plus, { size: 15, strokeWidth: 1.75 }), children: t.addToList }), _jsx(MenuItem, { icon: _jsx(Star, { size: 15, strokeWidth: 1.75 }), onSelect: () => setFavorite((f) => !f), children: favorite ? t.removeFromFavourites : t.addToFavourites }), _jsx(MenuSeparator, {}), _jsx(MenuItem, { icon: _jsx(Trash2, { size: 15, strokeWidth: 1.75 }), danger: true, shortcut: "\u232B", children: t.deleteRecord })] })] })] }), _jsxs("div", { className: "recordpage-body", children: [_jsxs("aside", { className: "recordpage-details", style: { width: detailsW }, children: [_jsxs("div", { className: "recordpage-entity", children: [entity?.avatar ? (_jsx("img", { className: "recordpage-entity-logo", src: entity.avatar, alt: "" })) : (_jsx(Avatar, { size: "lg", shape: "rounded", tone: "brand", children: name.charAt(0) })), _jsx("span", { className: "recordpage-entity-name", children: name }), _jsx("button", { type: "button", className: "recordpage-entity-iconbtn", "aria-label": t.editRecord, children: _jsx(Pencil, { size: 15, strokeWidth: 1.75 }) }), _jsx("button", { type: "button", className: "recordpage-entity-iconbtn", "data-active": favorite ? "" : undefined, "aria-pressed": favorite, onClick: () => setFavorite((f) => !f), "aria-label": favorite ? t.removeFromFavourites : t.addToFavourites, children: _jsx(Star, { size: 15, strokeWidth: 1.75 }) })] }), _jsxs("div", { className: "recordpage-quickactions", children: [_jsxs("button", { type: "button", className: "recordpage-compose", children: [_jsx(Mail, { size: 16, strokeWidth: 1.75 }), t.composeEmail] }), _jsx("button", { type: "button", className: "recordpage-quickbtn", "aria-label": t.copyRecordLink, children: _jsx(Copy, { size: 15, strokeWidth: 1.75 }) }), _jsx("button", { type: "button", className: "recordpage-quickbtn", "aria-label": t.logANote, children: _jsx(FileText, { size: 15, strokeWidth: 1.75 }) }), _jsx("button", { type: "button", className: "recordpage-quickbtn", "aria-label": t.linkRecords, children: _jsx(Share2, { size: 15, strokeWidth: 1.75 }) }), _jsx("button", { type: "button", className: "recordpage-quickbtn", "aria-label": t.createATask, children: _jsx(SquareCheck, { size: 15, strokeWidth: 1.75 }) })] }), _jsxs("div", { className: "recordpage-section", children: [_jsxs("div", { className: "recordpage-detailhead", children: [searchOpen ? (_jsx("input", {
|
|
345
|
+
// biome-ignore lint/a11y/noAutofocus: focusing the just-opened field search is expected
|
|
346
|
+
autoFocus: true, type: "text", className: "recordpage-fieldsearch", placeholder: t.searchPlaceholder, "aria-label": t.searchFields, value: fieldQuery, onChange: (e) => setFieldQuery(e.target.value), onKeyDown: (e) => {
|
|
347
|
+
if (e.key === "Escape") {
|
|
348
|
+
setSearchOpen(false);
|
|
349
|
+
setFieldQuery("");
|
|
350
|
+
}
|
|
351
|
+
} })) : (_jsxs("button", { type: "button", className: "recordpage-collapse", "data-collapsed": detailsOpen ? undefined : "", "aria-expanded": detailsOpen, onClick: () => setDetailsOpen((o) => !o), children: [t.recordDetails, _jsx(ChevronDown, { className: "recordpage-chev", size: 12, strokeWidth: 2.5 })] })), _jsx("button", { type: "button", className: "recordpage-detailsearch", "data-active": searchOpen ? "" : undefined, "aria-label": searchOpen ? t.closeSearch : t.searchFields, "aria-pressed": searchOpen, onClick: () => {
|
|
352
|
+
setSearchOpen((s) => !s);
|
|
353
|
+
setFieldQuery("");
|
|
354
|
+
if (!searchOpen)
|
|
355
|
+
setDetailsOpen(true);
|
|
356
|
+
}, children: searchOpen ? (_jsx(X, { size: 14, strokeWidth: 1.75 })) : (_jsx(Search, { size: 14, strokeWidth: 1.75 })) })] }), detailsOpen &&
|
|
357
|
+
(shownFields.length > 0 ? (_jsxs(_Fragment, { children: [shownFields.map((col) => (_jsxs("div", { className: "recordpage-field", children: [_jsxs("span", { className: "recordpage-field-label", children: [col.icon ? (_jsx(col.icon, { size: 15, strokeWidth: 1.75 })) : null, _jsx("span", { className: "recordpage-field-label-text", children: col.label })] }), _jsx("span", { className: "recordpage-field-value", children: _jsx(FieldValue, { col: col, row: record, labels: t }) })] }, col.key))), canRevealFields && (_jsx("button", { type: "button", className: "recordpage-viewall recordpage-viewall--section", onClick: () => {
|
|
358
|
+
// Attio: revealing all fields also opens the (focused)
|
|
359
|
+
// field search; collapsing closes it.
|
|
360
|
+
const next = !showAllValues;
|
|
361
|
+
setShowAllValues(next);
|
|
362
|
+
setSearchOpen(next);
|
|
363
|
+
if (!next)
|
|
364
|
+
setFieldQuery("");
|
|
365
|
+
}, children: showAllValues ? t.viewLess : t.viewAllValues }))] })) : (_jsxs("div", { className: "recordpage-noresults", children: ["No fields match \u201C", fieldQuery, "\u201D."] })))] }), _jsxs("div", { className: "recordpage-section", children: [_jsx(SectionHead, { title: t.tabs.lists, action: _jsxs("button", { type: "button", className: "recordpage-addbtn", children: [_jsx(Plus, { size: 14, strokeWidth: 2 }), t.addToList] }) }), _jsx("div", { className: "recordpage-emptystate", children: "This record has not been added to any lists." })] })] }), _jsx("div", { className: "recordpage-resizer", "data-active": resizing ? "" : undefined, role: "separator", "aria-orientation": "vertical", "aria-label": t.resizeDetails, "aria-valuenow": Math.round(detailsW), "aria-valuemin": 300, "aria-valuemax": 560, tabIndex: 0, onPointerDown: onResizeDown, onPointerMove: onResizeMove, onPointerUp: onResizeUp, onKeyDown: (e) => {
|
|
366
|
+
if (e.key === "ArrowLeft")
|
|
367
|
+
setDetailsW((w) => Math.max(300, w - 16));
|
|
368
|
+
else if (e.key === "ArrowRight")
|
|
369
|
+
setDetailsW((w) => Math.min(560, w + 16));
|
|
370
|
+
} }), _jsx("main", { className: "recordpage-main", children: _jsx(Tabs, { tabs: tabs, defaultValue: "overview", "aria-label": `${name} record`, children: panel }) })] })] }));
|
|
371
|
+
}
|
|
372
|
+
RecordPage.displayName = "RecordPage";
|