@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,149 @@
|
|
|
1
|
+
import { toolbarChromeBody, toolbarChromeHead, } from "../../components/tabletoolbar/tabletoolbar.chrome.js";
|
|
2
|
+
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
3
|
+
import { contract as c } from "../../tokens/index.js";
|
|
4
|
+
import { recordTagCss } from "./recordstable.tag.js";
|
|
5
|
+
// Attio's record grid, measured: 36px rows, 1px borderSubtle (#eeeff1) grid
|
|
6
|
+
// lines on BOTH axes, sticky checkbox + entity (first) columns, entity = 16px
|
|
7
|
+
// avatar + 14px/500 name, 28px toolbar controls, a floating bulk-action bar.
|
|
8
|
+
//
|
|
9
|
+
// The toolbar's measured chrome now lives in the TableToolbar primitive
|
|
10
|
+
// (components/tabletoolbar/tabletoolbar.chrome.ts) and is emitted below under
|
|
11
|
+
// this surface's own class prefix, so RecordsTable's markup is unchanged. The
|
|
12
|
+
// three rules between the two halves are RecordsTable's own and must stay
|
|
13
|
+
// mid-block: they depend on following the .menu rule in source order.
|
|
14
|
+
const config = defineRecipe({
|
|
15
|
+
name: "recordstable",
|
|
16
|
+
base: `
|
|
17
|
+
box-sizing: border-box; position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; width: 100%; font-family: ${c.font.sans}; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
18
|
+
& * { box-sizing: border-box; }
|
|
19
|
+
|
|
20
|
+
/* toolbar */
|
|
21
|
+
${toolbarChromeHead("recordstable")}
|
|
22
|
+
& .recordstable-ctx { z-index: 60; }
|
|
23
|
+
& .recordstable-th[data-drop] { box-shadow: inset 2px 0 0 ${c.bgBrandSolid}; }
|
|
24
|
+
& .recordstable-th-inner[draggable="true"]:active { cursor: grabbing; }
|
|
25
|
+
${toolbarChromeBody("recordstable")}
|
|
26
|
+
|
|
27
|
+
/* scroll frame + table */
|
|
28
|
+
& .recordstable-scroll { flex: 1; min-height: 0; overflow: auto; background: ${c.bgSurface}; border-top: 1px solid ${c.borderSubtle}; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, ${c.fgPrimary} 22%, transparent) transparent; }
|
|
29
|
+
& .recordstable-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
|
|
30
|
+
& .recordstable-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, ${c.fgPrimary} 20%, transparent); border-radius: ${c.radius.full}; border: 2px solid ${c.bgSurface}; background-clip: padding-box; }
|
|
31
|
+
& .recordstable-scroll::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, ${c.fgPrimary} 34%, transparent); background-clip: padding-box; }
|
|
32
|
+
& .recordstable-scroll::-webkit-scrollbar-corner { background: transparent; }
|
|
33
|
+
& .recordstable-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
|
|
34
|
+
& .recordstable-th, & .recordstable-td { position: relative; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border-bottom: 1px solid ${c.borderSubtle}; border-inline-end: 1px solid ${c.borderSubtle}; text-align: start; white-space: nowrap; overflow: hidden; }
|
|
35
|
+
& .recordstable-th { position: sticky; top: 0; z-index: 2; padding: 0; height: ${c.size.tableHeader}; background: ${c.bgSurface}; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; letter-spacing: -0.14px; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); user-select: none; }
|
|
36
|
+
& .recordstable-th-inner { display: flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["2"]}; border: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: start; cursor: pointer; }
|
|
37
|
+
& .recordstable-th-inner svg { flex-shrink: 0; color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); }
|
|
38
|
+
& .recordstable-th-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
|
|
39
|
+
& .recordstable-th-rename { width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0; border: none; outline: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; }
|
|
40
|
+
& .recordstable-th-rename:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
41
|
+
& .recordstable-sort { flex-shrink: 0; opacity: 0.4; transition: opacity .12s; color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); }
|
|
42
|
+
& .recordstable-th:hover .recordstable-sort, & .recordstable-th[data-sorted] .recordstable-sort { opacity: 1; }
|
|
43
|
+
& .recordstable-th[data-sorted="desc"] .recordstable-sort svg { transform: rotate(180deg); }
|
|
44
|
+
|
|
45
|
+
/* column resize handle */
|
|
46
|
+
& .recordstable-resize { position: absolute; top: 0; right: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
|
|
47
|
+
& .recordstable-resize::after { content: ""; position: absolute; top: 0; left: 3px; width: 2px; height: 100%; background: ${c.bgBrandSolid}; opacity: 0; transition: opacity .12s; }
|
|
48
|
+
& .recordstable-resize:hover::after, & .recordstable-resize[data-resizing]::after { opacity: 1; }
|
|
49
|
+
|
|
50
|
+
/* add-column header */
|
|
51
|
+
& .recordstable-addcol { min-width: 44px; }
|
|
52
|
+
& .recordstable-addcol button { display: flex; align-items: center; justify-content: center; width: 44px; height: 100%; border: none; background: none; color: ${c.fgMuted}; cursor: pointer; }
|
|
53
|
+
& .recordstable-addcol button:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
54
|
+
|
|
55
|
+
/* cells */
|
|
56
|
+
& .recordstable-td { font-size: ${c.text.lg}; color: ${c.fgPrimary}; background: ${c.bgSurface}; cursor: default; }
|
|
57
|
+
& .recordstable-td--editable { cursor: text; }
|
|
58
|
+
/* keyboard/click cell selection (spreadsheet-style) */
|
|
59
|
+
& .recordstable-td[data-selected] { outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; border-radius: ${c.radius.sm}; z-index: 3; }
|
|
60
|
+
& .recordstable-scroll:focus { outline: none; }
|
|
61
|
+
/* picker cells (status / date / reference) host a ghost control edge-to-edge */
|
|
62
|
+
& .recordstable-td--picker { padding: 0; }
|
|
63
|
+
& .recordstable-td--picker .select-trigger, & .recordstable-td--picker .datepicker-trigger, & .recordstable-td--picker .multiselect-trigger { width: 100%; height: 100%; min-height: 0; border-radius: 0; box-shadow: none; padding: 0 ${c.space["2"]}; }
|
|
64
|
+
& .recordstable-td--picker .multiselect-trigger:hover { background: none; }
|
|
65
|
+
& .recordstable-td--picker .multiselect-trigger[data-open] { box-shadow: inset 0 0 0 1.5px ${c.bgBrandSolid}; }
|
|
66
|
+
/* tag cell: one compact clipped line of full chips, no chevron (opens the picker on click) */
|
|
67
|
+
& .recordstable-td--picker .multiselect-chips { flex-wrap: nowrap; overflow: hidden; }
|
|
68
|
+
& .recordstable-td--picker .multiselect-chips .recordstable-tag { flex-shrink: 0; max-width: none; }
|
|
69
|
+
& .recordstable-td--picker .multiselect-chevron { display: none; }
|
|
70
|
+
& .recordstable-td--picker .multiselect-placeholder { color: ${c.fgMuted}; }
|
|
71
|
+
& .recordstable-status { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; }
|
|
72
|
+
& .recordstable-status-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: ${c.radius.full}; }
|
|
73
|
+
& .recordstable-cell { display: flex; align-items: center; gap: ${c.space["2"]}; height: 100%; min-width: 0; }
|
|
74
|
+
& .recordstable-cell--num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
|
|
75
|
+
& .recordstable-cell--tags { gap: ${c.space["1"]}; }
|
|
76
|
+
${recordTagCss}
|
|
77
|
+
& .recordstable-muted { color: ${c.fgMuted}; }
|
|
78
|
+
& .recordstable-entity { display: flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; text-decoration: none; }
|
|
79
|
+
& .recordstable-entity:hover .recordstable-entity-name { text-decoration: underline; }
|
|
80
|
+
& .recordstable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
81
|
+
& button.recordstable-entity-name--link { margin: 0; padding: 0; border: none; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-align: start; cursor: pointer; max-width: 100%; }
|
|
82
|
+
& .recordstable-fav { width: ${c.size.icon}; height: ${c.size.icon}; border-radius: ${c.radius.sm}; flex-shrink: 0; object-fit: cover; background: ${c.bgRaised}; }
|
|
83
|
+
& .recordstable-open { position: absolute; inset-inline-end: ${c.space["1"]}; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: none; border-radius: ${c.radius.sm}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderDefault}; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; opacity: 0; transition: opacity .12s, background-color .12s; z-index: 3; }
|
|
84
|
+
& .recordstable-open:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
85
|
+
& tbody tr:hover .recordstable-open { opacity: 1; }
|
|
86
|
+
& .recordstable-link { color: ${c.fgPrimary}; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
|
|
87
|
+
& .recordstable-link:hover { text-decoration: underline; }
|
|
88
|
+
|
|
89
|
+
/* inline edit input */
|
|
90
|
+
& .recordstable-edit { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["2"]}; border: none; outline: 2px solid ${c.bgBrandSolid}; outline-offset: -2px; border-radius: ${c.radius.sm}; background: ${c.bgSurface}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; z-index: 5; }
|
|
91
|
+
& .recordstable-edit--num { text-align: end; font-variant-numeric: tabular-nums; }
|
|
92
|
+
|
|
93
|
+
/* selection / hover / sticky */
|
|
94
|
+
& .recordstable-col-check { width: 40px; min-width: 40px; padding: 0; }
|
|
95
|
+
& .recordstable-check-inner { display: flex; align-items: center; justify-content: center; height: 100%; }
|
|
96
|
+
& .recordstable-col-check, & .recordstable-col-entity { position: sticky; z-index: 3; background: ${c.bgSurface}; }
|
|
97
|
+
& .recordstable-col-check { left: 0; }
|
|
98
|
+
& .recordstable-col-entity { left: 40px; clip-path: inset(0 -38px 0 0); transition: box-shadow .2s ease; }
|
|
99
|
+
& thead .recordstable-col-check, & thead .recordstable-col-entity { z-index: 4; }
|
|
100
|
+
/* soft shadow on the sticky column edge once the grid is scrolled horizontally */
|
|
101
|
+
& .recordstable-scroll[data-scrolled] .recordstable-col-entity { box-shadow: 6px 0 16px 4px rgba(0,0,0,0.12); }
|
|
102
|
+
/* AI-enriched values carry a purple wash. Measured from Attio:
|
|
103
|
+
a full-bleed overlay at #9b69ff 4% (== bgPurple), composited OVER
|
|
104
|
+
whatever row-state background the cell already has, which is why it
|
|
105
|
+
is an ::after and not a background. */
|
|
106
|
+
& .recordstable-td[data-enriched]::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: color-mix(in srgb, ${c.bgPurple} 4%, transparent); }
|
|
107
|
+
& tbody tr:hover .recordstable-td { background: color-mix(in srgb, ${c.fgPrimary} 4%, ${c.bgSurface}); }
|
|
108
|
+
& tbody tr[data-selected] .recordstable-td { background: color-mix(in srgb, ${c.bgBrandSolid} 10%, ${c.bgSurface}); }
|
|
109
|
+
& tbody tr[data-selected]:hover .recordstable-td { background: color-mix(in srgb, ${c.fgPrimary} 4%, color-mix(in srgb, ${c.bgBrandSolid} 10%, ${c.bgSurface})); }
|
|
110
|
+
& .recordstable-th:last-child, & .recordstable-td:last-child { border-inline-end: none; }
|
|
111
|
+
|
|
112
|
+
/* add-row footer */
|
|
113
|
+
& .recordstable-addrow { display: flex; align-items: center; gap: ${c.space["2"]}; width: 100%; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border: none; border-top: 1px solid ${c.borderSubtle}; background: ${c.bgSurface}; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.lg}; cursor: pointer; }
|
|
114
|
+
& .recordstable-addrow:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
115
|
+
/* zero-row empty state — centred in the body region (headers + summary stay) */
|
|
116
|
+
& .recordstable-empty { display: flex; align-items: center; justify-content: center; min-height: 320px; padding: ${c.space["8"]} ${c.space["4"]}; }
|
|
117
|
+
|
|
118
|
+
/* summary footer — per-column aggregation, sticky to the bottom */
|
|
119
|
+
& .recordstable-sum { position: sticky; bottom: 0; z-index: 2; height: ${c.size.tableRow}; padding: 0; border-top: 1px solid ${c.borderSubtle}; border-inline-end: 1px solid ${c.borderSubtle}; background: ${c.bgSurface}; }
|
|
120
|
+
& tfoot .recordstable-col-check, & tfoot .recordstable-col-entity { position: sticky; bottom: 0; z-index: 3; }
|
|
121
|
+
& .recordstable-sum:last-child { border-inline-end: none; }
|
|
122
|
+
& .recordstable-sum-btn { display: flex; align-items: center; justify-content: flex-end; gap: ${c.space["1.5"]}; width: 100%; height: 100%; margin: 0; padding: 0 ${c.space["3"]}; border: none; background: none; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; cursor: pointer; white-space: nowrap; overflow: hidden; }
|
|
123
|
+
& .recordstable-sum-btn:hover { background: ${c.bgRaised}; }
|
|
124
|
+
& .recordstable-sum-label { color: color-mix(in srgb, ${c.fgPrimary} 45%, transparent); text-transform: capitalize; }
|
|
125
|
+
& .recordstable-sum-value { color: ${c.fgPrimary}; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
|
|
126
|
+
& .recordstable-sumgroup { width: 100%; height: 100%; }
|
|
127
|
+
& .recordstable-pin { flex-shrink: 0; margin-inline-start: ${c.space["1"]}; color: ${c.bgWarning}; fill: color-mix(in srgb, ${c.bgWarning} 35%, transparent); }
|
|
128
|
+
& .recordstable-sum-btn[data-empty] { opacity: 0; justify-content: flex-start; }
|
|
129
|
+
& .recordstable-sum-btn[data-empty]:hover { opacity: 1; }
|
|
130
|
+
|
|
131
|
+
/* bulk action bar lives in its own component now — see components/bulkbar */
|
|
132
|
+
& .recordstable-bulk-sep { width: 1px; height: 20px; margin: 0 ${c.space["0.5"]}; background: ${c.borderSubtle}; }
|
|
133
|
+
& .recordstable-bulk-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: none; border-radius: ${c.radius.md}; background: transparent; color: ${c.fgMuted}; cursor: pointer; }
|
|
134
|
+
& .recordstable-bulk-close:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
135
|
+
`,
|
|
136
|
+
variants: {},
|
|
137
|
+
defaultVariants: {},
|
|
138
|
+
compoundVariants: [],
|
|
139
|
+
});
|
|
140
|
+
export const recordstableRecipe = Object.assign(resolveRecipe(config), {
|
|
141
|
+
config,
|
|
142
|
+
meta: {
|
|
143
|
+
row: {
|
|
144
|
+
height: "36px",
|
|
145
|
+
gridLine: "1px",
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
export default config;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { contract as c } from "../../tokens/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* The record tag/chip, measured from Attio: 22px tall, `padding: 0 4px`,
|
|
4
|
+
* `border-radius: ${c.radius.chip}`, 14px/20px at weight 500, and a 1px inset ring in the
|
|
5
|
+
* tone's colour.
|
|
6
|
+
*
|
|
7
|
+
* Shared because RecordsTable and RecordPanel render the *same* chip. It used
|
|
8
|
+
* to be pasted into both recipes, and the two copies had already started to
|
|
9
|
+
* drift — adding the measured inset ring meant patching the same rules twice.
|
|
10
|
+
*/
|
|
11
|
+
export const recordTagCss = `& .recordstable-tag { display: inline-flex; align-items: center; height: ${c.size.chip}; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.chip}; font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium}; white-space: nowrap; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 82%, transparent); box-shadow: inset 0 0 0 1px ${c.borderSubtle}; }
|
|
12
|
+
& .recordstable-tag[data-tone="brand"] { background: color-mix(in srgb, ${c.bgBrandSolid} 14%, transparent); color: color-mix(in srgb, ${c.bgBrandSolid} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgBrandSolid} 30%, transparent); }
|
|
13
|
+
& .recordstable-tag[data-tone="success"] { background: color-mix(in srgb, ${c.bgSuccess} 16%, transparent); color: color-mix(in srgb, ${c.bgSuccess} 78%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgSuccess} 30%, transparent); }
|
|
14
|
+
& .recordstable-tag[data-tone="warning"] { background: color-mix(in srgb, ${c.bgWarning} 18%, transparent); color: color-mix(in srgb, ${c.bgWarning} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgWarning} 30%, transparent); }
|
|
15
|
+
& .recordstable-tag[data-tone="danger"] { background: color-mix(in srgb, ${c.bgDanger} 15%, transparent); color: color-mix(in srgb, ${c.bgDanger} 80%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgDanger} 30%, transparent); }
|
|
16
|
+
& .recordstable-tag[data-tone="purple"] { background: color-mix(in srgb, ${c.bgPurple} 16%, transparent); color: color-mix(in srgb, ${c.bgPurple} 80%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgPurple} 30%, transparent); }
|
|
17
|
+
& .recordstable-tag[data-tone="cyan"] { background: color-mix(in srgb, ${c.bgCyan} 18%, transparent); color: color-mix(in srgb, ${c.bgCyan} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgCyan} 30%, transparent); }
|
|
18
|
+
& .recordstable-tag[data-tone="orange"] { background: color-mix(in srgb, ${c.bgOrange} 16%, transparent); color: color-mix(in srgb, ${c.bgOrange} 82%, ${c.fgPrimary}); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgOrange} 30%, transparent); }`;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Bold, Heading1, Heading2, Italic, Link2, List, ListOrdered, Quote, Strikethrough, Underline, } from "lucide-react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { richtextRecipe } from "./richtext.recipe.js";
|
|
5
|
+
const exec = (cmd, value) => document.execCommand(cmd, false, value);
|
|
6
|
+
/**
|
|
7
|
+
* A block rich-text editor — measured from Attio's Notes editor. A large title,
|
|
8
|
+
* a prose body (headings, lists, quote, marks, links), and a floating toolbar
|
|
9
|
+
* that appears over a text selection. Built on contentEditable, dependency-free.
|
|
10
|
+
* Uncontrolled: seed with `defaultTitle`/`defaultHtml`, read via `onChange`.
|
|
11
|
+
*/
|
|
12
|
+
export function RichTextEditor({ defaultTitle = "", defaultHtml = "", titlePlaceholder = "Untitled", placeholder = "Start writing, or press a toolbar button…", onChange, className, titleLabel = "Title", bodyLabel = "Note body", }) {
|
|
13
|
+
const titleRef = React.useRef(null);
|
|
14
|
+
const bodyRef = React.useRef(null);
|
|
15
|
+
const [bar, setBar] = React.useState(null);
|
|
16
|
+
const [active, setActive] = React.useState({});
|
|
17
|
+
const syncEmpty = (el) => {
|
|
18
|
+
if (el)
|
|
19
|
+
el.toggleAttribute("data-empty", (el.textContent ?? "") === "");
|
|
20
|
+
};
|
|
21
|
+
const emit = React.useCallback(() => {
|
|
22
|
+
onChange?.({
|
|
23
|
+
title: titleRef.current?.textContent ?? "",
|
|
24
|
+
html: bodyRef.current?.innerHTML ?? "",
|
|
25
|
+
});
|
|
26
|
+
}, [onChange]);
|
|
27
|
+
// seed the uncontrolled editable nodes once
|
|
28
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: seed once on mount
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
if (titleRef.current)
|
|
31
|
+
titleRef.current.textContent = defaultTitle;
|
|
32
|
+
if (bodyRef.current)
|
|
33
|
+
bodyRef.current.innerHTML = defaultHtml;
|
|
34
|
+
syncEmpty(titleRef.current);
|
|
35
|
+
syncEmpty(bodyRef.current);
|
|
36
|
+
}, []);
|
|
37
|
+
const blockTag = () => {
|
|
38
|
+
const sel = window.getSelection();
|
|
39
|
+
let node = sel?.anchorNode;
|
|
40
|
+
while (node && node !== bodyRef.current) {
|
|
41
|
+
if (node.nodeType === 1 &&
|
|
42
|
+
/^(H1|H2|H3|BLOCKQUOTE|LI)$/.test(node.tagName))
|
|
43
|
+
return node.tagName.toLowerCase();
|
|
44
|
+
node = node.parentElement;
|
|
45
|
+
}
|
|
46
|
+
return "p";
|
|
47
|
+
};
|
|
48
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: blockTag only reads stable refs
|
|
49
|
+
const updateBar = React.useCallback(() => {
|
|
50
|
+
const sel = window.getSelection();
|
|
51
|
+
const body = bodyRef.current;
|
|
52
|
+
if (!sel ||
|
|
53
|
+
sel.isCollapsed ||
|
|
54
|
+
sel.rangeCount === 0 ||
|
|
55
|
+
!body ||
|
|
56
|
+
!body.contains(sel.anchorNode)) {
|
|
57
|
+
setBar(null);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const rect = sel.getRangeAt(0).getBoundingClientRect();
|
|
61
|
+
if (rect.width === 0 && rect.height === 0) {
|
|
62
|
+
setBar(null);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
setBar({ x: rect.left + rect.width / 2, y: rect.top - 8 });
|
|
66
|
+
const tag = blockTag();
|
|
67
|
+
setActive({
|
|
68
|
+
bold: document.queryCommandState("bold"),
|
|
69
|
+
italic: document.queryCommandState("italic"),
|
|
70
|
+
underline: document.queryCommandState("underline"),
|
|
71
|
+
strikeThrough: document.queryCommandState("strikeThrough"),
|
|
72
|
+
h1: tag === "h1",
|
|
73
|
+
h2: tag === "h2",
|
|
74
|
+
ul: document.queryCommandState("insertUnorderedList"),
|
|
75
|
+
ol: document.queryCommandState("insertOrderedList"),
|
|
76
|
+
blockquote: tag === "blockquote",
|
|
77
|
+
});
|
|
78
|
+
}, []);
|
|
79
|
+
React.useEffect(() => {
|
|
80
|
+
const h = () => updateBar();
|
|
81
|
+
document.addEventListener("selectionchange", h);
|
|
82
|
+
return () => document.removeEventListener("selectionchange", h);
|
|
83
|
+
}, [updateBar]);
|
|
84
|
+
const run = (cmd, value) => {
|
|
85
|
+
bodyRef.current?.focus();
|
|
86
|
+
exec(cmd, value);
|
|
87
|
+
updateBar();
|
|
88
|
+
syncEmpty(bodyRef.current);
|
|
89
|
+
emit();
|
|
90
|
+
};
|
|
91
|
+
const toggleBlock = (tag) => {
|
|
92
|
+
run("formatBlock", blockTag() === tag ? "p" : tag);
|
|
93
|
+
};
|
|
94
|
+
const addLink = () => {
|
|
95
|
+
const url = window.prompt("Link URL");
|
|
96
|
+
if (url)
|
|
97
|
+
run("createLink", url);
|
|
98
|
+
};
|
|
99
|
+
// mousedown on the toolbar must not clear the selection
|
|
100
|
+
const keepSel = (e) => e.preventDefault();
|
|
101
|
+
const tool = (key, label, icon, onClick) => (_jsx("button", { type: "button", className: "rte-tool", "aria-label": label, "aria-pressed": !!active[key], "data-active": active[key] ? "" : undefined, onMouseDown: keepSel, onClick: onClick, children: icon }));
|
|
102
|
+
const ic = { size: 15, strokeWidth: 2 };
|
|
103
|
+
return (_jsxs("div", { className: richtextRecipe({ className }), children: [_jsx("div", { ref: titleRef, className: "rte-title", contentEditable: true, suppressContentEditableWarning: true, role: "textbox", tabIndex: 0, "aria-label": titleLabel, "data-placeholder": titlePlaceholder, onInput: () => {
|
|
104
|
+
syncEmpty(titleRef.current);
|
|
105
|
+
emit();
|
|
106
|
+
} }), _jsx("div", { ref: bodyRef, className: "rte-body", contentEditable: true, suppressContentEditableWarning: true, role: "textbox", tabIndex: 0, "aria-multiline": "true", "aria-label": bodyLabel, "data-placeholder": placeholder, onInput: () => {
|
|
107
|
+
syncEmpty(bodyRef.current);
|
|
108
|
+
emit();
|
|
109
|
+
}, onMouseUp: updateBar, onKeyUp: updateBar }), bar && (_jsxs("div", { className: "rte-toolbar", style: { left: bar.x, top: bar.y }, children: [tool("bold", "Bold", _jsx(Bold, { ...ic }), () => run("bold")), tool("italic", "Italic", _jsx(Italic, { ...ic }), () => run("italic")), tool("underline", "Underline", _jsx(Underline, { ...ic }), () => run("underline")), tool("strikeThrough", "Strikethrough", _jsx(Strikethrough, { ...ic }), () => run("strikeThrough")), tool("link", "Link", _jsx(Link2, { ...ic }), addLink), _jsx("span", { className: "rte-tool-sep" }), tool("h1", "Heading 1", _jsx(Heading1, { ...ic }), () => toggleBlock("h1")), tool("h2", "Heading 2", _jsx(Heading2, { ...ic }), () => toggleBlock("h2")), tool("ul", "Bullet list", _jsx(List, { ...ic }), () => run("insertUnorderedList")), tool("ol", "Numbered list", _jsx(ListOrdered, { ...ic }), () => run("insertOrderedList")), tool("blockquote", "Quote", _jsx(Quote, { ...ic }), () => toggleBlock("blockquote"))] }))] }));
|
|
110
|
+
}
|
|
111
|
+
RichTextEditor.displayName = "RichTextEditor";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
|
+
import { contract as c } from "../../tokens/index.js";
|
|
3
|
+
// A block rich-text editor — measured from Attio's Notes editor: a large 32/36
|
|
4
|
+
// title, a 14/20 prose body (headings, lists, quote, code, marks, links), and a
|
|
5
|
+
// floating selection toolbar. Built on contentEditable so it stays dependency-
|
|
6
|
+
// free. Placeholders show via [data-empty]::before.
|
|
7
|
+
const config = defineRecipe({
|
|
8
|
+
name: "richtext",
|
|
9
|
+
base: `display: flex; flex-direction: column; box-sizing: border-box; font-family: ${c.font.sans}; color: ${c.fgPrimary};
|
|
10
|
+
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
11
|
+
|
|
12
|
+
& .rte-title { font-size: 32px; line-height: 36px; font-weight: ${c.weight.semibold}; letter-spacing: -0.6px; color: ${c.fgPrimary}; outline: none; }
|
|
13
|
+
& .rte-title[data-empty]::before { content: attr(data-placeholder); color: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); pointer-events: none; }
|
|
14
|
+
|
|
15
|
+
& .rte-body { margin-top: ${c.space["3"]}; font-size: ${c.text.lg}; line-height: 20px; color: ${c.fgPrimary}; outline: none; }
|
|
16
|
+
& .rte-body[data-empty]::before { content: attr(data-placeholder); color: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); pointer-events: none; }
|
|
17
|
+
& .rte-body > * { margin: 0; }
|
|
18
|
+
& .rte-body > * + * { margin-top: ${c.space["2"]}; }
|
|
19
|
+
& .rte-body h1 { font-size: ${c.text.xl}; line-height: 28px; font-weight: ${c.weight.semibold}; letter-spacing: -0.3px; margin-top: ${c.space["4"]}; }
|
|
20
|
+
& .rte-body h2 { font-size: 17px; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.2px; margin-top: ${c.space["3"]}; }
|
|
21
|
+
& .rte-body h3 { font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.semibold}; margin-top: ${c.space["2.5"]}; }
|
|
22
|
+
& .rte-body ul, & .rte-body ol { padding-inline-start: ${c.space["5"]}; }
|
|
23
|
+
& .rte-body li { margin-top: ${c.space["1"]}; }
|
|
24
|
+
& .rte-body blockquote { padding-inline-start: ${c.space["3"]}; border-inline-start: 2px solid ${c.borderDefault}; color: ${c.fgMuted}; }
|
|
25
|
+
& .rte-body code { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: ${c.text.md}; padding: 1px ${c.space["1"]}; border-radius: ${c.radius.sm}; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); }
|
|
26
|
+
& .rte-body a { color: ${c.bgBrandSolid}; text-decoration: underline; text-underline-offset: 2px; }
|
|
27
|
+
& .rte-body strong { font-weight: ${c.weight.semibold}; }
|
|
28
|
+
|
|
29
|
+
& .rte-toolbar { position: fixed; z-index: 70; display: inline-flex; align-items: center; gap: 2px; padding: ${c.space["0.5"]}; border-radius: ${c.radius.md}; background: #20242c; box-shadow: 0 8px 28px -6px rgba(0,0,0,0.36), 0 2px 6px -2px rgba(0,0,0,0.24); transform: translate(-50%, -100%); opacity: 1; transition: opacity 0.1s ease; }
|
|
30
|
+
& .rte-toolbar { @starting-style { opacity: 0; } }
|
|
31
|
+
& .rte-tool { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; margin: 0; border: none; border-radius: ${c.radius.sm}; background: none; color: rgba(255,255,255,0.86); font-family: inherit; cursor: pointer; transition: background-color .1s; }
|
|
32
|
+
& .rte-tool:hover { background: rgba(255,255,255,0.12); color: #fff; }
|
|
33
|
+
& .rte-tool[data-active] { color: ${c.bgBrandSolid}; }
|
|
34
|
+
& .rte-tool-sep { width: 1px; height: 16px; margin: 0 2px; background: rgba(255,255,255,0.16); }`,
|
|
35
|
+
variants: {},
|
|
36
|
+
defaultVariants: {},
|
|
37
|
+
compoundVariants: [],
|
|
38
|
+
});
|
|
39
|
+
export const richtextRecipe = resolveRecipe(config);
|
|
40
|
+
export default config;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { settingssectionRecipe } from "./settingssection.recipe.js";
|
|
3
|
+
/**
|
|
4
|
+
* A settings section — measured from Attio's Settings pages. A title + optional
|
|
5
|
+
* subtitle and trailing action, then a gapped stack of rows (pair with
|
|
6
|
+
* FormField). Compose several inside a settings content pane.
|
|
7
|
+
*/
|
|
8
|
+
export function SettingsSection({ title, description, action, children, className, ...rest }) {
|
|
9
|
+
return (_jsxs("section", { className: settingssectionRecipe({ className }), ...rest, children: [_jsxs("div", { className: "settingssection-head", children: [_jsxs("div", { className: "settingssection-heading", children: [_jsx("div", { className: "settingssection-title", children: title }), description != null && (_jsx("div", { className: "settingssection-sub", children: description }))] }), action != null && (_jsx("div", { className: "settingssection-action", children: action }))] }), children != null && (_jsx("div", { className: "settingssection-body", children: children }))] }));
|
|
10
|
+
}
|
|
11
|
+
SettingsSection.displayName = "SettingsSection";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
|
+
import { contract as c } from "../../tokens/index.js";
|
|
3
|
+
// A settings section — measured from Attio's Settings pages: a 16px/600 title
|
|
4
|
+
// with an optional subtitle, then a stack of rows (form fields, toggles…). Rows
|
|
5
|
+
// gap evenly; an optional trailing action sits on the title row.
|
|
6
|
+
const config = defineRecipe({
|
|
7
|
+
name: "settingssection",
|
|
8
|
+
base: `display: flex; flex-direction: column; box-sizing: border-box; font-family: ${c.font.sans};
|
|
9
|
+
& .settingssection-head { display: flex; align-items: flex-start; gap: ${c.space["2"]}; }
|
|
10
|
+
& .settingssection-heading { flex: 1; min-width: 0; }
|
|
11
|
+
& .settingssection-title { font-size: ${c.text.xl}; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.2px; color: ${c.fgPrimary}; }
|
|
12
|
+
& .settingssection-sub { margin-top: ${c.space["0.5"]}; font-size: ${c.text.md}; line-height: 18px; color: ${c.fgMuted}; }
|
|
13
|
+
& .settingssection-action { flex-shrink: 0; }
|
|
14
|
+
& .settingssection-body { display: flex; flex-direction: column; gap: ${c.space["4"]}; margin-top: ${c.space["3"]}; }`,
|
|
15
|
+
variants: {},
|
|
16
|
+
defaultVariants: {},
|
|
17
|
+
compoundVariants: [],
|
|
18
|
+
});
|
|
19
|
+
export const settingssectionRecipe = resolveRecipe(config);
|
|
20
|
+
export default config;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft, Search } from "lucide-react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { settingsshellRecipe } from "./settingsshell.recipe.js";
|
|
5
|
+
/**
|
|
6
|
+
* The Settings layout — measured from Attio's Settings. A left nav (back header,
|
|
7
|
+
* search, grouped items) beside a scrolling content pane. The search filters the
|
|
8
|
+
* nav by label. Fills the height its container gives it.
|
|
9
|
+
*/
|
|
10
|
+
export function SettingsShell({ title = "Settings", onBack, groups, activeItem, onSelect, searchable = true, searchPlaceholder = "Search settings…", children, className, navLabel = "Settings", emptyLabel = "No settings found", ...rest }) {
|
|
11
|
+
const [query, setQuery] = React.useState("");
|
|
12
|
+
const q = query.trim().toLowerCase();
|
|
13
|
+
const filtered = q
|
|
14
|
+
? groups
|
|
15
|
+
.map((g) => ({
|
|
16
|
+
...g,
|
|
17
|
+
items: g.items.filter((i) => i.label.toLowerCase().includes(q)),
|
|
18
|
+
}))
|
|
19
|
+
.filter((g) => g.items.length > 0)
|
|
20
|
+
: groups;
|
|
21
|
+
return (_jsxs("div", { className: settingsshellRecipe({ className }), ...rest, children: [_jsxs("nav", { className: "settingsshell-nav", "aria-label": navLabel, children: [_jsxs("button", { type: "button", className: "settingsshell-back", onClick: onBack, children: [_jsx(ChevronLeft, { size: 16, strokeWidth: 2 }), title] }), searchable && (_jsxs("div", { className: "settingsshell-search", children: [_jsx(Search, { size: 15, strokeWidth: 1.75 }), _jsx("input", { type: "text", placeholder: searchPlaceholder, "aria-label": searchPlaceholder, value: query, onChange: (e) => setQuery(e.target.value) })] })), _jsx("div", { className: "settingsshell-groups", children: filtered.length === 0 ? (_jsx("div", { className: "settingsshell-empty", children: emptyLabel })) : (filtered.map((g, gi) => (_jsxs("div", { className: "settingsshell-group", children: [g.label != null && (_jsx("div", { className: "settingsshell-group-label", children: g.label })), g.items.map((it) => (_jsxs("button", { type: "button", className: "settingsshell-item", "aria-current": it.id === activeItem ? "page" : undefined, "data-active": it.id === activeItem ? "" : undefined, onClick: () => onSelect(it.id), children: [it.icon, _jsx("span", { className: "settingsshell-item-label", children: it.label })] }, it.id)))] }, gi)))) })] }), _jsx("div", { className: "settingsshell-content", children: children })] }));
|
|
22
|
+
}
|
|
23
|
+
SettingsShell.displayName = "SettingsShell";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
|
+
import { contract as c } from "../../tokens/index.js";
|
|
3
|
+
// The Settings layout — measured from Attio's Settings: a 256px left nav with a
|
|
4
|
+
// back header, a search field, and grouped nav items (active row raised), beside
|
|
5
|
+
// a scrolling content pane. Sits inside whatever height its container gives it.
|
|
6
|
+
const config = defineRecipe({
|
|
7
|
+
name: "settingsshell",
|
|
8
|
+
base: `display: flex; min-height: 0; box-sizing: border-box; font-family: ${c.font.sans}; color: ${c.fgPrimary};
|
|
9
|
+
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
10
|
+
|
|
11
|
+
& .settingsshell-nav { display: flex; flex-direction: column; width: 256px; flex-shrink: 0; min-height: 0; padding: ${c.space["3"]}; border-inline-end: 1px solid ${c.borderSubtle}; }
|
|
12
|
+
& .settingsshell-back { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; height: 28px; padding: 0 ${c.space["1"]}; margin: 0 0 ${c.space["2"]}; border: none; background: none; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; cursor: pointer; border-radius: ${c.radius.md}; }
|
|
13
|
+
& .settingsshell-back svg { color: ${c.fgMuted}; }
|
|
14
|
+
& .settingsshell-back:hover svg { color: ${c.fgPrimary}; }
|
|
15
|
+
|
|
16
|
+
& .settingsshell-search { display: flex; align-items: center; gap: ${c.space["2"]}; height: 32px; margin-bottom: ${c.space["2"]}; padding: 0 ${c.space["2.5"]}; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderDefault}; color: ${c.fgMuted}; }
|
|
17
|
+
/* The field box owns the ring, so focus has to move it -- the inner
|
|
18
|
+
input kills its own outline. Measured on Attio: a focused field's
|
|
19
|
+
input carries box-shadow: none while its wrapper carries
|
|
20
|
+
inset 0 0 0 1px #266df0. */
|
|
21
|
+
& .settingsshell-search:focus-within { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
22
|
+
& .settingsshell-search svg { flex-shrink: 0; }
|
|
23
|
+
& .settingsshell-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; }
|
|
24
|
+
& .settingsshell-search input::placeholder { color: ${c.fgMuted}; }
|
|
25
|
+
|
|
26
|
+
& .settingsshell-groups { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: ${c.space["2.5"]}; }
|
|
27
|
+
& .settingsshell-group { display: flex; flex-direction: column; gap: 1px; }
|
|
28
|
+
& .settingsshell-group-label { padding: ${c.space["1"]} ${c.space["2"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
|
|
29
|
+
& .settingsshell-item { display: flex; align-items: center; gap: ${c.space["2"]}; height: 30px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
30
|
+
& .settingsshell-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
|
|
31
|
+
& .settingsshell-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
32
|
+
& .settingsshell-item:hover { background: ${c.bgRaised}; }
|
|
33
|
+
& .settingsshell-item[data-active] { background: ${c.bgRaised}; font-weight: ${c.weight.medium}; }
|
|
34
|
+
& .settingsshell-item[data-active] svg { color: ${c.fgPrimary}; }
|
|
35
|
+
& .settingsshell-empty { padding: ${c.space["3"]} ${c.space["2"]}; font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
36
|
+
|
|
37
|
+
& .settingsshell-content { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: ${c.space["6"]} ${c.space["8"]}; }`,
|
|
38
|
+
variants: {},
|
|
39
|
+
defaultVariants: {},
|
|
40
|
+
compoundVariants: [],
|
|
41
|
+
});
|
|
42
|
+
export const settingsshellRecipe = resolveRecipe(config);
|
|
43
|
+
export default config;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Building2, ChartNoAxesColumn, ChevronDown, CircleDollarSign, FileText, House, Inbox, LayoutGrid, Mail, MessageSquare, PanelLeft, Phone, Search, Send, SquareCheck, User, UserPlus, Users, Waypoints, } from "lucide-react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Avatar } from "../../components/avatar/index.js";
|
|
5
|
+
import { Badge } from "../../components/badge/index.js";
|
|
6
|
+
import { Button } from "../../components/button/index.js";
|
|
7
|
+
import { Primitive } from "../../core/index.js";
|
|
8
|
+
import { Command } from "../command/index.js";
|
|
9
|
+
import { NavItem } from "../navitem/index.js";
|
|
10
|
+
import { sidebarRecipe } from "./sidebar.recipe.js";
|
|
11
|
+
const IconHome = ({ className }) => (_jsx(House, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
12
|
+
const IconTasks = ({ className }) => (_jsx(SquareCheck, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
13
|
+
const IconNotes = ({ className }) => (_jsx(FileText, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
14
|
+
const IconEmails = ({ className }) => (_jsx(Mail, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
15
|
+
const IconCalls = ({ className }) => (_jsx(Phone, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
16
|
+
const IconReports = ({ className }) => (_jsx(ChartNoAxesColumn, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
17
|
+
const IconSequences = ({ className }) => (_jsx(Send, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
18
|
+
const IconWorkflows = ({ className }) => (_jsx(Waypoints, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
19
|
+
const IconChevronDown = ({ className }) => (_jsx(ChevronDown, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
20
|
+
const IconSearch = ({ className }) => (_jsx(Search, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
21
|
+
const IconInbox = ({ className }) => (_jsx(Inbox, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
22
|
+
const IconInvite = ({ className }) => (_jsx(UserPlus, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
23
|
+
const IconChat = ({ className }) => (_jsx(MessageSquare, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
24
|
+
const IconCollapsePanel = ({ className }) => (_jsx(PanelLeft, { className: className, size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
25
|
+
const IconChevronMini = () => (_jsx(ChevronDown, { size: 12, strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
26
|
+
const GlyphCompanies = () => (_jsx(Building2, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
27
|
+
const GlyphPeople = () => (_jsx(User, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
28
|
+
const GlyphDeals = () => (_jsx(CircleDollarSign, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
29
|
+
const GlyphUsers = () => (_jsx(Users, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
30
|
+
const GlyphWorkspaces = () => (_jsx(LayoutGrid, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
31
|
+
/** The measured Attio workspace switcher — the default `workspace` prop. */
|
|
32
|
+
export const ATTIO_SIDEBAR_WORKSPACE = {
|
|
33
|
+
name: "techpartners",
|
|
34
|
+
avatarLabel: "T",
|
|
35
|
+
avatarTone: "cyan",
|
|
36
|
+
};
|
|
37
|
+
/** The measured Attio main nav — the default `items` prop. */
|
|
38
|
+
export const ATTIO_SIDEBAR_ITEMS = [
|
|
39
|
+
{ label: "Home", icon: IconHome },
|
|
40
|
+
{
|
|
41
|
+
label: "Tasks",
|
|
42
|
+
icon: IconTasks,
|
|
43
|
+
active: true,
|
|
44
|
+
trailing: (_jsx(Badge, { tone: "brand", variant: "solid", size: "small", children: "1" })),
|
|
45
|
+
},
|
|
46
|
+
{ label: "Notes", icon: IconNotes },
|
|
47
|
+
{ label: "Emails", icon: IconEmails },
|
|
48
|
+
{ label: "Calls", icon: IconCalls },
|
|
49
|
+
{ label: "Reports", icon: IconReports },
|
|
50
|
+
{ label: "Sequences", icon: IconSequences },
|
|
51
|
+
{ label: "Workflows", icon: IconWorkflows },
|
|
52
|
+
];
|
|
53
|
+
/** The measured Attio Records section — the default `recordsSection` prop. */
|
|
54
|
+
export const ATTIO_SIDEBAR_RECORDS_SECTION = {
|
|
55
|
+
label: "Records",
|
|
56
|
+
items: [
|
|
57
|
+
{ label: "Companies", tone: "brand", glyph: GlyphCompanies },
|
|
58
|
+
{ label: "People", tone: "brand", glyph: GlyphPeople },
|
|
59
|
+
{ label: "Deals", tone: "orange", glyph: GlyphDeals },
|
|
60
|
+
{ label: "Users", tone: "cyan", glyph: GlyphUsers },
|
|
61
|
+
{ label: "Workspaces", tone: "purple", glyph: GlyphWorkspaces },
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
/** The measured Attio Lists section — the default `listsSection` prop. */
|
|
65
|
+
export const ATTIO_SIDEBAR_LISTS_SECTION = {
|
|
66
|
+
label: "Lists",
|
|
67
|
+
newListLabel: "+ New list",
|
|
68
|
+
};
|
|
69
|
+
/** The measured Attio Chats section — the default `chatsSection` prop. */
|
|
70
|
+
export const ATTIO_SIDEBAR_CHATS_SECTION = {
|
|
71
|
+
label: "Chats",
|
|
72
|
+
items: [{ label: "In-app notification for deal wins", icon: IconChat }],
|
|
73
|
+
};
|
|
74
|
+
/** The measured Attio footer copy — the default `footer` prop. */
|
|
75
|
+
export const ATTIO_SIDEBAR_FOOTER = {
|
|
76
|
+
gettingStartedLabel: "Getting started 1/6",
|
|
77
|
+
inviteLabel: "Invite team members",
|
|
78
|
+
trialText: "13 days left on trial!",
|
|
79
|
+
trialActionLabel: "Keep Pro",
|
|
80
|
+
};
|
|
81
|
+
function SectionHeader({ label, open, onToggle, }) {
|
|
82
|
+
return (_jsxs("button", { type: "button", className: "sidebar-section-header", "data-collapsed": open ? undefined : "", "aria-expanded": open, onClick: onToggle, children: [_jsx(IconChevronMini, {}), _jsx("span", { children: label })] }));
|
|
83
|
+
}
|
|
84
|
+
export const Sidebar = React.forwardRef(({ className, asChild, onToggleCollapse, collapseLabel = "Collapse sidebar", inboxLabel = "Inbox", workspace = ATTIO_SIDEBAR_WORKSPACE, items = ATTIO_SIDEBAR_ITEMS, recordsSection = ATTIO_SIDEBAR_RECORDS_SECTION, listsSection = ATTIO_SIDEBAR_LISTS_SECTION, chatsSection = ATTIO_SIDEBAR_CHATS_SECTION, footer = ATTIO_SIDEBAR_FOOTER, ...props }, ref) => {
|
|
85
|
+
const [collapsedSections, setCollapsedSections] = React.useState(() => new Set());
|
|
86
|
+
const [commandOpen, setCommandOpen] = React.useState(false);
|
|
87
|
+
React.useEffect(() => {
|
|
88
|
+
function handleKeyDown(event) {
|
|
89
|
+
if ((event.metaKey || event.ctrlKey) &&
|
|
90
|
+
event.key.toLowerCase() === "k") {
|
|
91
|
+
event.preventDefault();
|
|
92
|
+
setCommandOpen(true);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
96
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
97
|
+
}, []);
|
|
98
|
+
const toggleSection = React.useCallback((key) => {
|
|
99
|
+
setCollapsedSections((prev) => {
|
|
100
|
+
const next = new Set(prev);
|
|
101
|
+
if (next.has(key)) {
|
|
102
|
+
next.delete(key);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
next.add(key);
|
|
106
|
+
}
|
|
107
|
+
return next;
|
|
108
|
+
});
|
|
109
|
+
}, []);
|
|
110
|
+
return (_jsxs(Primitive.div, { ref: ref, asChild: asChild, className: sidebarRecipe({ className }), ...props, children: [_jsxs("div", { className: "sidebar-ws", children: [_jsx(Avatar, { size: "lg", shape: "rounded", tone: workspace.avatarTone, children: workspace.avatarLabel }), _jsx("span", { className: "sidebar-ws-name", children: workspace.name }), _jsx(IconChevronDown, {}), _jsx(Button, { intent: "ghost", size: "sm", shape: "icon", className: "sidebar-ws-collapse", "aria-label": collapseLabel, onClick: onToggleCollapse, children: _jsx(IconCollapsePanel, {}) })] }), _jsxs("div", { className: "sidebar-searchrow", children: [_jsxs("button", { type: "button", className: "sidebar-search", onClick: () => setCommandOpen(true), children: [_jsx(IconSearch, {}), _jsx("span", { className: "sidebar-search-label", children: "Search" }), _jsx("span", { className: "sidebar-search-kbd", children: "\u2318K" })] }), _jsx(Button, { intent: "neutral", size: "sm", shape: "icon", "aria-label": inboxLabel, children: _jsx(IconInbox, {}) })] }), _jsx("div", { className: "sidebar-divider" }), _jsx("div", { className: "sidebar-section", children: items.map(({ label, icon: ItemIcon, active, trailing }) => (_jsx(NavItem, { href: "#", active: active, icon: _jsx(ItemIcon, {}), trailing: trailing, children: label }, label))) }), _jsx(SectionHeader, { label: recordsSection.label, open: !collapsedSections.has("records"), onToggle: () => toggleSection("records") }), _jsx("div", { className: "sidebar-section", "data-collapsed": collapsedSections.has("records") ? "" : undefined, children: recordsSection.items.map(({ label, tone, glyph: Glyph }) => (_jsx(NavItem, { href: "#", icon: _jsx(Avatar, { size: "sm", shape: "rounded", tone: tone, children: _jsx(Glyph, {}) }), children: label }, label))) }), _jsx(SectionHeader, { label: listsSection.label, open: !collapsedSections.has("lists"), onToggle: () => toggleSection("lists") }), _jsx("div", { className: "sidebar-section", "data-collapsed": collapsedSections.has("lists") ? "" : undefined, children: _jsx("button", { type: "button", className: "sidebar-newlist", children: listsSection.newListLabel }) }), _jsx(SectionHeader, { label: chatsSection.label, open: !collapsedSections.has("chats"), onToggle: () => toggleSection("chats") }), _jsx("div", { className: "sidebar-section", "data-collapsed": collapsedSections.has("chats") ? "" : undefined, children: chatsSection.items.map(({ label, icon: ItemIcon }) => (_jsx(NavItem, { href: "#", icon: _jsx(ItemIcon, {}), children: label }, label))) }), _jsxs("div", { className: "sidebar-footer", children: [_jsx(Button, { intent: "neutral", size: "sm", className: "sidebar-pill", children: footer.gettingStartedLabel }), _jsx(NavItem, { href: "#", icon: _jsx(IconInvite, {}), children: footer.inviteLabel }), _jsx("div", { className: "sidebar-divider" }), _jsxs("div", { className: "sidebar-trial", children: [_jsx("span", { children: footer.trialText }), _jsx(Button, { intent: "neutral", size: "sm", children: footer.trialActionLabel })] })] }), _jsx(Command, { open: commandOpen, onOpenChange: setCommandOpen })] }));
|
|
111
|
+
});
|
|
112
|
+
Sidebar.displayName = "Sidebar";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
|
+
import { contract as c, elevation as e } from "../../tokens/index.js";
|
|
3
|
+
const config = defineRecipe({
|
|
4
|
+
name: "sidebar",
|
|
5
|
+
base: `box-sizing: border-box; display: flex; flex-direction: column; width: 275px; height: 100%; background: ${c.bgSidebar}
|
|
6
|
+
; border-inline-end: 1px solid ${c.borderSubtle}
|
|
7
|
+
; padding: ${c.space["2"]}
|
|
8
|
+
; font-family: ${c.font.sans}
|
|
9
|
+
; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-y: auto; & .sidebar-section { display: flex; flex-direction: column; gap: ${c.space.px}; margin-top: ${c.space["2"]}; }
|
|
10
|
+
& .sidebar-section[data-collapsed] { display: none; }
|
|
11
|
+
& .sidebar-label { font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["0.5"]}; }
|
|
12
|
+
& .sidebar-section-header { display: flex; align-items: center; gap: ${c.space["1"]}; width: 100%; margin: 0; border: none; background: none; padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["0.5"]}; font-family: ${c.font.sans}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; cursor: pointer; }
|
|
13
|
+
& .sidebar-section-header svg { flex-shrink: 0; transition: transform .15s ease; }
|
|
14
|
+
& .sidebar-section-header[data-collapsed] svg { transform: rotate(-90deg); }
|
|
15
|
+
& .sidebar-ws { display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.header}; padding: 0 ${c.space["2"]}; border-radius: ${c.radius.lg}; cursor: pointer; transition: background-color 0.16s; }
|
|
16
|
+
& .sidebar-ws:hover { background: color-mix(in srgb, ${c.fgPrimary} 5%, transparent); }
|
|
17
|
+
& .sidebar-ws-name { font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
18
|
+
& .sidebar-ws-collapse { margin-inline-start: auto; }
|
|
19
|
+
& .sidebar-searchrow { display: flex; align-items: center; gap: ${c.space["1.5"]}; margin-top: ${c.space["2.5"]}; padding-inline-end: ${c.space["2"]}; }
|
|
20
|
+
& .sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: ${c.space["0.5"]}; }
|
|
21
|
+
& .sidebar-trial { display: flex; align-items: center; justify-content: space-between; gap: ${c.space["2"]}; padding: ${c.space["1.5"]} ${c.space["2"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
|
|
22
|
+
& .sidebar-search { box-sizing: border-box; flex: 1; min-width: 0; display: flex; align-items: center; gap: ${c.space["2"]}; height: ${c.size.row}; margin: 0; padding: 0 ${c.space["1"]} 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: ${e.field}; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.lg}; text-align: start; cursor: pointer; transition: background-color 0.14s; }
|
|
23
|
+
& .sidebar-search:hover { background: ${c.bgRaised}; }
|
|
24
|
+
& .sidebar-search-label { flex: 1; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; }
|
|
25
|
+
& .sidebar-search-kbd { margin-inline-start: auto; display: inline-flex; align-items: center; height: 18px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 8%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 50%, transparent); font-size: ${c.text.xs}; }
|
|
26
|
+
& .sidebar-pill { border-radius: ${c.radius.full}; align-self: center; width: auto; height: 32px; padding-inline: ${c.space["4"]}; }
|
|
27
|
+
& .sidebar-divider { height: 0; border: none; border-top: 1px solid ${c.borderSubtle}; margin: ${c.space["2"]} calc(-1 * ${c.space["2"]}) 0; }
|
|
28
|
+
& .sidebar-newlist { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; height: ${c.size.row}; border-radius: ${c.radius.md}; border: 1px dashed ${c.borderDefault}; background: transparent; color: ${c.fgMuted}; font-family: ${c.font.sans}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
|
|
29
|
+
& .sidebar-newlist:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
30
|
+
`,
|
|
31
|
+
variants: {},
|
|
32
|
+
defaultVariants: {},
|
|
33
|
+
compoundVariants: [],
|
|
34
|
+
});
|
|
35
|
+
export const sidebarRecipe = Object.assign(resolveRecipe(config), {
|
|
36
|
+
config,
|
|
37
|
+
meta: {
|
|
38
|
+
container: {
|
|
39
|
+
width: "275px",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
export default config;
|