@crisp-ui-kit/crisp 0.5.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/accordion.css +9 -1
- package/dist/appshell.css +12 -4
- package/dist/authshell.css +57 -0
- package/dist/authshell.d.ts +7 -0
- package/dist/avatargroup.css +2 -2
- package/dist/badge.css +4 -4
- package/dist/barchart.css +13 -5
- package/dist/board.css +9 -1
- package/dist/bulkbar.css +11 -3
- package/dist/button.css +15 -1
- package/dist/button.d.ts +2 -1
- package/dist/card.css +8 -0
- package/dist/checkbox.css +17 -1
- package/dist/cjs/components/accordion/accordion.js +69 -0
- package/dist/cjs/components/accordion/accordion.recipe.js +26 -0
- package/dist/cjs/components/accordion/index.js +7 -0
- package/dist/cjs/components/avatar/avatar.js +44 -0
- package/dist/cjs/components/avatar/avatar.recipe.js +42 -0
- package/dist/cjs/components/avatar/index.js +7 -0
- package/dist/cjs/components/avatargroup/avatargroup.js +52 -0
- package/dist/cjs/components/avatargroup/avatargroup.recipe.js +18 -0
- package/dist/cjs/components/avatargroup/index.js +7 -0
- package/dist/cjs/components/badge/badge.js +44 -0
- package/dist/cjs/components/badge/badge.recipe.js +68 -0
- package/dist/cjs/components/badge/index.js +7 -0
- package/dist/cjs/components/barchart/barchart.js +45 -0
- package/dist/cjs/components/barchart/barchart.recipe.js +34 -0
- package/dist/cjs/components/barchart/index.js +7 -0
- package/dist/cjs/components/breadcrumb/breadcrumb.js +53 -0
- package/dist/cjs/components/breadcrumb/breadcrumb.recipe.js +21 -0
- package/dist/cjs/components/breadcrumb/index.js +7 -0
- package/dist/cjs/components/bulkbar/bulkbar.js +53 -0
- package/dist/cjs/components/bulkbar/bulkbar.recipe.js +31 -0
- package/dist/cjs/components/bulkbar/index.js +8 -0
- package/dist/cjs/components/button/button.js +62 -0
- package/dist/cjs/components/button/button.recipe.js +58 -0
- package/dist/cjs/components/button/index.js +7 -0
- package/dist/cjs/components/callout/callout.js +25 -0
- package/dist/cjs/components/callout/callout.recipe.js +29 -0
- package/dist/cjs/components/callout/index.js +7 -0
- package/dist/cjs/components/card/card.js +54 -0
- package/dist/cjs/components/card/card.recipe.js +31 -0
- package/dist/cjs/components/card/index.js +10 -0
- package/dist/cjs/components/checkbox/checkbox.js +56 -0
- package/dist/cjs/components/checkbox/checkbox.recipe.js +34 -0
- package/dist/cjs/components/checkbox/index.js +7 -0
- package/dist/cjs/components/columncalc/columncalc.js +139 -0
- package/dist/cjs/components/columncalc/columncalc.recipe.js +33 -0
- package/dist/cjs/components/columncalc/index.js +10 -0
- package/dist/cjs/components/contextmenu/contextmenu.js +78 -0
- package/dist/cjs/components/contextmenu/contextmenu.recipe.js +24 -0
- package/dist/cjs/components/contextmenu/index.js +7 -0
- package/dist/cjs/components/datatable/datatable.js +508 -0
- package/dist/cjs/components/datatable/datatable.recipe.js +113 -0
- package/dist/cjs/components/datatable/index.js +7 -0
- package/dist/cjs/components/datepicker/datepicker.js +153 -0
- package/dist/cjs/components/datepicker/datepicker.recipe.js +190 -0
- package/dist/cjs/components/datepicker/index.js +19 -0
- package/dist/cjs/components/datepickerfield/datepickerfield.js +85 -0
- package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +44 -0
- package/dist/cjs/components/datepickerfield/index.js +7 -0
- package/dist/cjs/components/dialog/dialog.js +86 -0
- package/dist/cjs/components/dialog/dialog.recipe.js +35 -0
- package/dist/cjs/components/dialog/index.js +9 -0
- package/dist/cjs/components/divider/divider.js +10 -0
- package/dist/cjs/components/divider/divider.recipe.js +17 -0
- package/dist/cjs/components/divider/index.js +7 -0
- package/dist/cjs/components/donutchart/donutchart.js +41 -0
- package/dist/cjs/components/donutchart/donutchart.recipe.js +30 -0
- package/dist/cjs/components/donutchart/index.js +7 -0
- package/dist/cjs/components/drawer/drawer.js +80 -0
- package/dist/cjs/components/drawer/drawer.recipe.js +30 -0
- package/dist/cjs/components/drawer/index.js +9 -0
- package/dist/cjs/components/emptystate/emptystate.js +10 -0
- package/dist/cjs/components/emptystate/emptystate.recipe.js +34 -0
- package/dist/cjs/components/emptystate/index.js +7 -0
- package/dist/cjs/components/formfield/formfield.js +50 -0
- package/dist/cjs/components/formfield/formfield.recipe.js +22 -0
- package/dist/cjs/components/formfield/index.js +7 -0
- package/dist/cjs/components/input/index.js +7 -0
- package/dist/cjs/components/input/input.js +47 -0
- package/dist/cjs/components/input/input.recipe.js +59 -0
- package/dist/cjs/components/kbd/index.js +7 -0
- package/dist/cjs/components/kbd/kbd.js +44 -0
- package/dist/cjs/components/kbd/kbd.recipe.js +23 -0
- package/dist/cjs/components/linechart/index.js +7 -0
- package/dist/cjs/components/linechart/linechart.js +57 -0
- package/dist/cjs/components/linechart/linechart.recipe.js +35 -0
- package/dist/cjs/components/menu/index.js +14 -0
- package/dist/cjs/components/menu/menu-keyboard.js +117 -0
- package/dist/cjs/components/menu/menu.js +144 -0
- package/dist/cjs/components/menu/menu.recipe.js +54 -0
- package/dist/cjs/components/multiselect/index.js +7 -0
- package/dist/cjs/components/multiselect/multiselect.js +161 -0
- package/dist/cjs/components/multiselect/multiselect.recipe.js +71 -0
- package/dist/cjs/components/popover/index.js +7 -0
- package/dist/cjs/components/popover/popover.js +106 -0
- package/dist/cjs/components/popover/popover.recipe.js +21 -0
- package/dist/cjs/components/progress/index.js +7 -0
- package/dist/cjs/components/progress/progress.js +26 -0
- package/dist/cjs/components/progress/progress.recipe.js +20 -0
- package/dist/cjs/components/radiogroup/index.js +8 -0
- package/dist/cjs/components/radiogroup/radiogroup.js +83 -0
- package/dist/cjs/components/radiogroup/radiogroup.recipe.js +40 -0
- package/dist/cjs/components/resizablepanel/index.js +12 -0
- package/dist/cjs/components/resizablepanel/resizablepanel.js +176 -0
- package/dist/cjs/components/resizablepanel/resizablepanel.recipe.js +69 -0
- package/dist/cjs/components/segmented/index.js +7 -0
- package/dist/cjs/components/segmented/segmented.js +95 -0
- package/dist/cjs/components/segmented/segmented.recipe.js +23 -0
- package/dist/cjs/components/select/index.js +7 -0
- package/dist/cjs/components/select/select.js +180 -0
- package/dist/cjs/components/select/select.recipe.js +79 -0
- package/dist/cjs/components/skeleton/index.js +7 -0
- package/dist/cjs/components/skeleton/skeleton.js +13 -0
- package/dist/cjs/components/skeleton/skeleton.recipe.js +17 -0
- package/dist/cjs/components/spinner/index.js +7 -0
- package/dist/cjs/components/spinner/spinner.js +15 -0
- package/dist/cjs/components/spinner/spinner.recipe.js +16 -0
- package/dist/cjs/components/stagebar/index.js +7 -0
- package/dist/cjs/components/stagebar/stagebar.js +26 -0
- package/dist/cjs/components/stagebar/stagebar.recipe.js +17 -0
- package/dist/cjs/components/statcard/index.js +7 -0
- package/dist/cjs/components/statcard/statcard.js +15 -0
- package/dist/cjs/components/statcard/statcard.recipe.js +37 -0
- package/dist/cjs/components/switch/index.js +7 -0
- package/dist/cjs/components/switch/switch.js +58 -0
- package/dist/cjs/components/switch/switch.recipe.js +29 -0
- package/dist/cjs/components/table/index.js +14 -0
- package/dist/cjs/components/table/table.js +66 -0
- package/dist/cjs/components/table/table.recipe.js +43 -0
- package/dist/cjs/components/tabletoolbar/index.js +20 -0
- package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +84 -0
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +237 -0
- package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +26 -0
- package/dist/cjs/components/tabs/index.js +7 -0
- package/dist/cjs/components/tabs/tabs.js +106 -0
- package/dist/cjs/components/tabs/tabs.recipe.js +36 -0
- package/dist/cjs/components/textarea/index.js +7 -0
- package/dist/cjs/components/textarea/textarea.js +56 -0
- package/dist/cjs/components/textarea/textarea.recipe.js +46 -0
- package/dist/cjs/components/toast/index.js +8 -0
- package/dist/cjs/components/toast/toast.js +95 -0
- package/dist/cjs/components/toast/toast.recipe.js +31 -0
- package/dist/cjs/components/tooltip/index.js +7 -0
- package/dist/cjs/components/tooltip/tooltip.js +95 -0
- package/dist/cjs/components/tooltip/tooltip.recipe.js +16 -0
- package/dist/cjs/components/wheelpicker/index.js +7 -0
- package/dist/cjs/components/wheelpicker/wheelpicker.js +134 -0
- package/dist/cjs/components/wheelpicker/wheelpicker.recipe.js +95 -0
- package/dist/cjs/core/cx.js +8 -0
- package/dist/cjs/core/define.js +6 -0
- package/dist/cjs/core/index.js +11 -0
- package/dist/cjs/core/primitive.js +49 -0
- package/dist/cjs/core/resolve.js +44 -0
- package/dist/cjs/core/types.js +2 -0
- package/dist/cjs/index.js +92 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/product/appshell/appshell.js +104 -0
- package/dist/cjs/product/appshell/appshell.recipe.js +30 -0
- package/dist/cjs/product/appshell/index.js +7 -0
- package/dist/cjs/product/authshell/authshell.js +21 -0
- package/dist/cjs/product/authshell/authshell.recipe.js +67 -0
- package/dist/cjs/product/authshell/index.js +7 -0
- package/dist/cjs/product/board/board.js +78 -0
- package/dist/cjs/product/board/board.recipe.js +31 -0
- package/dist/cjs/product/board/index.js +7 -0
- package/dist/cjs/product/command/command.js +238 -0
- package/dist/cjs/product/command/command.recipe.js +47 -0
- package/dist/cjs/product/command/index.js +8 -0
- package/dist/cjs/product/entitycard/entitycard.js +14 -0
- package/dist/cjs/product/entitycard/entitycard.recipe.js +32 -0
- package/dist/cjs/product/entitycard/index.js +7 -0
- package/dist/cjs/product/flowcanvas/flowcanvas.js +121 -0
- package/dist/cjs/product/flowcanvas/flowcanvas.recipe.js +28 -0
- package/dist/cjs/product/flowcanvas/index.js +7 -0
- package/dist/cjs/product/inbox/inbox.js +16 -0
- package/dist/cjs/product/inbox/inbox.recipe.js +46 -0
- package/dist/cjs/product/inbox/index.js +7 -0
- package/dist/cjs/product/listpage/index.js +8 -0
- package/dist/cjs/product/listpage/listpage.js +25 -0
- package/dist/cjs/product/listpage/listpage.recipe.js +46 -0
- package/dist/cjs/product/navitem/index.js +5 -0
- package/dist/cjs/product/navitem/navitem.js +44 -0
- package/dist/cjs/product/navitem/navitem.recipe.js +36 -0
- package/dist/cjs/product/onboarding/index.js +7 -0
- package/dist/cjs/product/onboarding/onboarding.js +17 -0
- package/dist/cjs/product/onboarding/onboarding.recipe.js +44 -0
- package/dist/cjs/product/recordpage/index.js +7 -0
- package/dist/cjs/product/recordpage/recordpage.js +409 -0
- package/dist/cjs/product/recordpage/recordpage.recipe.js +162 -0
- package/dist/cjs/product/recordpanel/index.js +7 -0
- package/dist/cjs/product/recordpanel/recordpanel.js +83 -0
- package/dist/cjs/product/recordpanel/recordpanel.recipe.js +51 -0
- package/dist/cjs/product/recordstable/company-logos.js +29 -0
- package/dist/cjs/product/recordstable/index.js +10 -0
- package/dist/cjs/product/recordstable/recordstable.js +1092 -0
- package/dist/cjs/product/recordstable/recordstable.recipe.js +152 -0
- package/dist/cjs/product/recordstable/recordstable.tag.js +21 -0
- package/dist/cjs/product/richtext/index.js +7 -0
- package/dist/cjs/product/richtext/richtext.js +147 -0
- package/dist/cjs/product/richtext/richtext.recipe.js +43 -0
- package/dist/cjs/product/settingssection/index.js +7 -0
- package/dist/cjs/product/settingssection/settingssection.js +14 -0
- package/dist/cjs/product/settingssection/settingssection.recipe.js +23 -0
- package/dist/cjs/product/settingsshell/index.js +7 -0
- package/dist/cjs/product/settingsshell/settingsshell.js +59 -0
- package/dist/cjs/product/settingsshell/settingsshell.recipe.js +46 -0
- package/dist/cjs/product/sidebar/index.js +13 -0
- package/dist/cjs/product/sidebar/sidebar.js +148 -0
- package/dist/cjs/product/sidebar/sidebar.recipe.js +46 -0
- package/dist/cjs/product/tasklist/index.js +7 -0
- package/dist/cjs/product/tasklist/tasklist.js +19 -0
- package/dist/cjs/product/tasklist/tasklist.recipe.js +38 -0
- package/dist/cjs/product/trialbanner/index.js +7 -0
- package/dist/cjs/product/trialbanner/trialbanner.js +13 -0
- package/dist/cjs/product/trialbanner/trialbanner.recipe.js +32 -0
- package/dist/cjs/product/viewtoggle/index.js +7 -0
- package/dist/cjs/product/viewtoggle/viewtoggle.js +55 -0
- package/dist/cjs/product/viewtoggle/viewtoggle.recipe.js +27 -0
- package/dist/cjs/tokens/contract.js +21 -0
- package/dist/cjs/tokens/elevation.js +47 -0
- package/dist/cjs/tokens/index.js +18 -0
- package/dist/cjs/tokens/palette.js +63 -0
- package/dist/cjs/tokens/scale.js +70 -0
- package/dist/cjs/tokens/semantic.js +57 -0
- package/dist/columncalc.css +26 -0
- package/dist/columncalc.d.ts +7 -0
- package/dist/command.css +34 -1
- package/dist/contextmenu.css +10 -2
- package/dist/datatable.css +60 -14
- package/dist/datepicker.css +175 -19
- package/dist/datepicker.d.ts +2 -2
- package/dist/datepickerfield.css +27 -0
- package/dist/datepickerfield.d.ts +7 -0
- package/dist/dialog.css +10 -2
- package/dist/donutchart.css +8 -0
- package/dist/drawer.css +13 -5
- package/dist/entitycard.css +10 -2
- package/dist/esm/components/accordion/accordion.js +17 -16
- package/dist/esm/components/accordion/accordion.recipe.js +1 -1
- package/dist/esm/components/avatargroup/avatargroup.js +2 -2
- package/dist/esm/components/avatargroup/avatargroup.recipe.js +2 -2
- package/dist/esm/components/badge/badge.recipe.js +4 -4
- package/dist/esm/components/barchart/barchart.js +15 -2
- package/dist/esm/components/barchart/barchart.recipe.js +10 -5
- package/dist/esm/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/esm/components/bulkbar/bulkbar.js +2 -2
- package/dist/esm/components/bulkbar/bulkbar.recipe.js +4 -4
- package/dist/esm/components/button/button.js +13 -2
- package/dist/esm/components/button/button.recipe.js +20 -4
- package/dist/esm/components/callout/callout.js +2 -2
- package/dist/esm/components/checkbox/checkbox.recipe.js +9 -1
- package/dist/esm/components/columncalc/columncalc.js +100 -0
- package/dist/esm/components/columncalc/columncalc.recipe.js +30 -0
- package/dist/esm/components/columncalc/index.js +1 -0
- package/dist/esm/components/contextmenu/contextmenu.recipe.js +4 -4
- package/dist/esm/components/datatable/datatable.js +276 -49
- package/dist/esm/components/datatable/datatable.recipe.js +54 -16
- package/dist/esm/components/datepicker/datepicker.js +104 -53
- package/dist/esm/components/datepicker/datepicker.recipe.js +180 -25
- package/dist/esm/components/datepicker/index.js +1 -1
- package/dist/esm/components/datepickerfield/datepickerfield.js +49 -0
- package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +41 -0
- package/dist/esm/components/datepickerfield/index.js +2 -0
- package/dist/esm/components/dialog/dialog.js +2 -2
- package/dist/esm/components/dialog/dialog.recipe.js +4 -4
- package/dist/esm/components/divider/divider.js +2 -2
- package/dist/esm/components/donutchart/donutchart.js +2 -2
- package/dist/esm/components/drawer/drawer.js +2 -2
- package/dist/esm/components/drawer/drawer.recipe.js +6 -6
- package/dist/esm/components/emptystate/emptystate.js +2 -2
- package/dist/esm/components/formfield/formfield.js +2 -2
- package/dist/esm/components/input/input.js +6 -3
- package/dist/esm/components/input/input.recipe.js +38 -5
- package/dist/esm/components/linechart/linechart.js +15 -2
- package/dist/esm/components/linechart/linechart.recipe.js +10 -5
- package/dist/esm/components/menu/index.js +1 -0
- package/dist/esm/components/menu/menu-keyboard.js +80 -0
- package/dist/esm/components/menu/menu.js +27 -60
- package/dist/esm/components/menu/menu.recipe.js +5 -5
- package/dist/esm/components/multiselect/multiselect.js +10 -3
- package/dist/esm/components/multiselect/multiselect.recipe.js +8 -8
- package/dist/esm/components/popover/popover.js +2 -2
- package/dist/esm/components/popover/popover.recipe.js +2 -2
- package/dist/esm/components/progress/progress.js +3 -3
- package/dist/esm/components/radiogroup/radiogroup.js +2 -2
- package/dist/esm/components/radiogroup/radiogroup.recipe.js +1 -1
- package/dist/esm/components/resizablepanel/index.js +2 -0
- package/dist/esm/components/resizablepanel/resizablepanel.js +135 -0
- package/dist/esm/components/resizablepanel/resizablepanel.recipe.js +66 -0
- package/dist/esm/components/segmented/segmented.js +2 -2
- package/dist/esm/components/select/select.js +2 -2
- package/dist/esm/components/select/select.recipe.js +6 -6
- package/dist/esm/components/skeleton/skeleton.js +5 -2
- package/dist/esm/components/spinner/spinner.js +3 -2
- package/dist/esm/components/stagebar/stagebar.js +2 -2
- package/dist/esm/components/statcard/statcard.js +2 -2
- package/dist/esm/components/table/table.recipe.js +6 -6
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +3 -3
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +21 -13
- package/dist/esm/components/tabs/tabs.js +2 -2
- package/dist/esm/components/tabs/tabs.recipe.js +4 -4
- package/dist/esm/components/textarea/textarea.js +5 -5
- package/dist/esm/components/textarea/textarea.recipe.js +16 -4
- package/dist/esm/components/toast/toast.js +4 -4
- package/dist/esm/components/toast/toast.recipe.js +2 -2
- package/dist/esm/components/tooltip/tooltip.js +21 -7
- package/dist/esm/components/wheelpicker/index.js +2 -0
- package/dist/esm/components/wheelpicker/wheelpicker.js +98 -0
- package/dist/esm/components/wheelpicker/wheelpicker.recipe.js +92 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/product/appshell/appshell.js +33 -9
- package/dist/esm/product/appshell/appshell.recipe.js +4 -4
- package/dist/esm/product/authshell/authshell.js +18 -0
- package/dist/esm/product/authshell/authshell.recipe.js +64 -0
- package/dist/esm/product/authshell/index.js +2 -0
- package/dist/esm/product/board/board.js +2 -2
- package/dist/esm/product/board/board.recipe.js +1 -1
- package/dist/esm/product/command/command.js +19 -6
- package/dist/esm/product/command/command.recipe.js +27 -2
- package/dist/esm/product/entitycard/entitycard.js +2 -2
- package/dist/esm/product/entitycard/entitycard.recipe.js +2 -2
- package/dist/esm/product/flowcanvas/flowcanvas.js +4 -4
- package/dist/esm/product/inbox/inbox.recipe.js +1 -1
- package/dist/esm/product/listpage/listpage.recipe.js +3 -3
- package/dist/esm/product/navitem/navitem.recipe.js +13 -1
- package/dist/esm/product/onboarding/onboarding.js +2 -2
- package/dist/esm/product/onboarding/onboarding.recipe.js +2 -2
- package/dist/esm/product/recordpage/recordpage.js +133 -47
- package/dist/esm/product/recordpage/recordpage.recipe.js +19 -17
- package/dist/esm/product/recordpanel/recordpanel.js +4 -4
- package/dist/esm/product/recordpanel/recordpanel.recipe.js +12 -16
- package/dist/esm/product/recordstable/recordstable.js +157 -66
- package/dist/esm/product/recordstable/recordstable.recipe.js +23 -23
- package/dist/esm/product/recordstable/recordstable.tag.js +18 -0
- package/dist/esm/product/richtext/richtext.js +3 -3
- package/dist/esm/product/richtext/richtext.recipe.js +3 -3
- package/dist/esm/product/settingssection/settingssection.js +2 -2
- package/dist/esm/product/settingsshell/settingsshell.js +2 -2
- package/dist/esm/product/settingsshell/settingsshell.recipe.js +7 -2
- package/dist/esm/product/sidebar/sidebar.js +2 -2
- package/dist/esm/product/sidebar/sidebar.recipe.js +27 -2
- package/dist/esm/product/tasklist/tasklist.js +4 -4
- package/dist/esm/product/trialbanner/trialbanner.js +2 -2
- package/dist/esm/product/trialbanner/trialbanner.recipe.js +2 -2
- package/dist/esm/product/viewtoggle/viewtoggle.js +10 -2
- package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +1 -1
- package/dist/esm/tokens/elevation.js +44 -0
- package/dist/esm/tokens/index.js +1 -0
- package/dist/esm/tokens/palette.js +30 -0
- package/dist/esm/tokens/scale.js +7 -0
- package/dist/esm/tokens/semantic.js +24 -0
- package/dist/inbox.css +9 -1
- package/dist/input.css +32 -4
- package/dist/linechart.css +5 -5
- package/dist/listpage.css +11 -3
- package/dist/menu.css +11 -3
- package/dist/multiselect.css +14 -6
- package/dist/native/tokens.d.ts +16 -0
- package/dist/native/tokens.js +221 -0
- package/dist/navitem.css +21 -1
- package/dist/onboarding.css +10 -2
- package/dist/popover.css +8 -0
- package/dist/progress.css +8 -0
- package/dist/radiogroup.css +9 -1
- package/dist/recordpage.css +22 -12
- package/dist/recordpanel.css +25 -15
- package/dist/recordstable.css +37 -23
- package/dist/resizablepanel.css +53 -0
- package/dist/resizablepanel.d.ts +7 -0
- package/dist/richtext.css +11 -3
- package/dist/segmented.css +8 -0
- package/dist/select.css +12 -4
- package/dist/settingsshell.css +15 -2
- package/dist/sidebar.css +34 -1
- package/dist/skeleton.css +8 -0
- package/dist/spinner.css +8 -0
- package/dist/stagebar.css +8 -0
- package/dist/styles.css +2061 -1111
- package/dist/switch.css +8 -0
- package/dist/table.css +14 -6
- package/dist/tabletoolbar.css +8 -0
- package/dist/tabs.css +12 -4
- package/dist/tasklist.css +8 -0
- package/dist/textarea.css +23 -3
- package/dist/toast.css +10 -2
- package/dist/tokens.css +29 -0
- package/dist/tokens.json +217 -0
- package/dist/tooltip.css +8 -0
- package/dist/trialbanner.css +8 -0
- package/dist/types/components/accordion/accordion.d.ts +10 -8
- package/dist/types/components/avatargroup/avatargroup.d.ts +2 -2
- package/dist/types/components/barchart/barchart.d.ts +4 -2
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/types/components/bulkbar/bulkbar.d.ts +4 -2
- package/dist/types/components/button/button.d.ts +8 -0
- package/dist/types/components/button/button.recipe.d.ts +12 -0
- package/dist/types/components/callout/callout.d.ts +2 -2
- package/dist/types/components/columncalc/columncalc.d.ts +49 -0
- package/dist/types/components/columncalc/columncalc.recipe.d.ts +3 -0
- package/dist/types/components/columncalc/index.d.ts +1 -0
- package/dist/types/components/datatable/datatable.d.ts +58 -3
- package/dist/types/components/datepicker/datepicker.d.ts +41 -18
- package/dist/types/components/datepicker/datepicker.recipe.d.ts +25 -2
- package/dist/types/components/datepicker/index.d.ts +1 -1
- package/dist/types/components/datepickerfield/datepickerfield.d.ts +35 -0
- package/dist/types/components/datepickerfield/datepickerfield.recipe.d.ts +5 -0
- package/dist/types/components/datepickerfield/index.d.ts +2 -0
- package/dist/types/components/dialog/dialog.d.ts +3 -1
- package/dist/types/components/divider/divider.d.ts +2 -2
- package/dist/types/components/donutchart/donutchart.d.ts +2 -2
- package/dist/types/components/drawer/drawer.d.ts +3 -1
- package/dist/types/components/emptystate/emptystate.d.ts +2 -2
- package/dist/types/components/formfield/formfield.d.ts +7 -4
- package/dist/types/components/input/input.d.ts +8 -2
- package/dist/types/components/linechart/linechart.d.ts +4 -2
- package/dist/types/components/menu/index.d.ts +1 -0
- package/dist/types/components/menu/menu-keyboard.d.ts +33 -0
- package/dist/types/components/menu/menu.d.ts +7 -1
- package/dist/types/components/multiselect/multiselect.d.ts +8 -4
- package/dist/types/components/popover/popover.d.ts +4 -1
- package/dist/types/components/progress/progress.d.ts +2 -2
- package/dist/types/components/radiogroup/radiogroup.d.ts +2 -2
- package/dist/types/components/resizablepanel/index.d.ts +2 -0
- package/dist/types/components/resizablepanel/resizablepanel.d.ts +75 -0
- package/dist/types/components/resizablepanel/resizablepanel.recipe.d.ts +3 -0
- package/dist/types/components/segmented/segmented.d.ts +2 -2
- package/dist/types/components/select/select.d.ts +2 -2
- package/dist/types/components/skeleton/skeleton.d.ts +2 -2
- package/dist/types/components/spinner/spinner.d.ts +2 -2
- package/dist/types/components/stagebar/stagebar.d.ts +2 -2
- package/dist/types/components/statcard/statcard.d.ts +2 -2
- package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +28 -2
- package/dist/types/components/tabs/tabs.d.ts +2 -2
- package/dist/types/components/toast/toast.d.ts +7 -1
- package/dist/types/components/tooltip/tooltip.d.ts +8 -1
- package/dist/types/components/wheelpicker/index.d.ts +2 -0
- package/dist/types/components/wheelpicker/wheelpicker.d.ts +37 -0
- package/dist/types/components/wheelpicker/wheelpicker.recipe.d.ts +26 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/product/appshell/appshell.d.ts +16 -2
- package/dist/types/product/authshell/authshell.d.ts +28 -0
- package/dist/types/product/authshell/authshell.recipe.d.ts +3 -0
- package/dist/types/product/authshell/index.d.ts +2 -0
- package/dist/types/product/board/board.d.ts +2 -2
- package/dist/types/product/command/command.d.ts +25 -1
- package/dist/types/product/entitycard/entitycard.d.ts +2 -2
- package/dist/types/product/flowcanvas/flowcanvas.d.ts +9 -1
- package/dist/types/product/onboarding/onboarding.d.ts +7 -1
- package/dist/types/product/recordpage/recordpage.d.ts +65 -1
- package/dist/types/product/recordpanel/recordpanel.d.ts +8 -2
- package/dist/types/product/recordstable/recordstable.d.ts +90 -1
- package/dist/types/product/recordstable/recordstable.tag.d.ts +10 -0
- package/dist/types/product/richtext/richtext.d.ts +5 -1
- package/dist/types/product/settingssection/settingssection.d.ts +2 -2
- package/dist/types/product/settingsshell/settingsshell.d.ts +6 -2
- package/dist/types/product/sidebar/sidebar.d.ts +8 -0
- package/dist/types/product/tasklist/tasklist.d.ts +5 -1
- package/dist/types/product/trialbanner/trialbanner.d.ts +2 -2
- package/dist/types/product/viewtoggle/viewtoggle.d.ts +11 -5
- package/dist/types/tokens/contract.d.ts +14 -3
- package/dist/types/tokens/elevation.d.ts +44 -0
- package/dist/types/tokens/index.d.ts +1 -0
- package/dist/types/tokens/palette.d.ts +40 -0
- package/dist/types/tokens/scale.d.ts +7 -0
- package/dist/types/tokens/semantic.d.ts +19 -0
- package/dist/viewtoggle.css +9 -1
- package/dist/wheelpicker.css +68 -0
- package/dist/wheelpicker.d.ts +7 -0
- package/package.json +160 -68
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
|
-
import { contract as c } from "../../tokens/index.js";
|
|
2
|
+
import { contract as c, elevation as e } from "../../tokens/index.js";
|
|
3
3
|
// A multiline text field, measured from Attio's settings "Personal context": an
|
|
4
4
|
// inset 1px ring (radius 8), 14px text, 6/10 padding, and an optional character
|
|
5
5
|
// counter pinned bottom-right (12px, muted). Focus rings the field brand.
|
|
@@ -11,16 +11,28 @@ const config = defineRecipe({
|
|
|
11
11
|
& .textarea-field {
|
|
12
12
|
box-sizing: border-box; display: block; width: 100%; min-height: 80px; resize: vertical;
|
|
13
13
|
margin: 0; padding: ${c.space["1.5"]} ${c.space["2.5"]}; border: none; border-radius: ${c.radius.md};
|
|
14
|
-
background: ${c.bgSurface}; box-shadow:
|
|
14
|
+
background: ${c.bgSurface}; box-shadow: ${e.field};
|
|
15
15
|
font-family: inherit; font-size: ${c.text.lg}; line-height: 20px; color: ${c.fgPrimary};
|
|
16
16
|
outline: none; transition: box-shadow .15s ease;
|
|
17
17
|
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
18
18
|
}
|
|
19
19
|
& .textarea-field::placeholder { color: ${c.fgMuted}; }
|
|
20
|
-
& .textarea-field:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
21
20
|
& .textarea-field:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
21
|
+
|
|
22
|
+
/* seed-design's focus treatment, same as Input: a 2px ring on an ::after
|
|
23
|
+
overlay that is present-but-transparent at rest, so focusing never
|
|
24
|
+
shifts the box, animating only its colour. */
|
|
25
|
+
& .textarea-wrap { position: relative; display: block; }
|
|
26
|
+
& .textarea-wrap::after {
|
|
27
|
+
content: ""; position: absolute; inset: 0; border-radius: ${c.radius.md};
|
|
28
|
+
border: 2px solid transparent; transition: border-color .1s ease;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
}
|
|
31
|
+
& .textarea-wrap:focus-within::after { border-color: ${c.strokeFieldFocus}; }
|
|
32
|
+
&[data-invalid] .textarea-wrap::after { border-color: ${c.bgDanger}; }
|
|
33
|
+
&[data-invalid] .textarea-wrap:focus-within::after { border-color: ${c.bgDanger}; }
|
|
22
34
|
&[data-counted] .textarea-field { padding-bottom: ${c.space["5"]}; }
|
|
23
|
-
& .textarea-count { position: absolute;
|
|
35
|
+
& .textarea-count { position: absolute; inset-inline-end: ${c.space["2.5"]}; bottom: ${c.space["1.5"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; pointer-events: none; }
|
|
24
36
|
& .textarea-count[data-over] { color: ${c.bgDanger}; }
|
|
25
37
|
`,
|
|
26
38
|
variants: {},
|
|
@@ -9,19 +9,19 @@ const ICONS = {
|
|
|
9
9
|
warning: TriangleAlert,
|
|
10
10
|
danger: CircleAlert,
|
|
11
11
|
};
|
|
12
|
-
function ToastCard({ item, onClose, }) {
|
|
12
|
+
function ToastCard({ item, onClose, dismissLabel, }) {
|
|
13
13
|
const Icon = ICONS[item.tone ?? "info"];
|
|
14
14
|
return (_jsxs("div", { className: "toast", role: "status", "data-tone": item.tone ?? "info", children: [_jsx("span", { className: "toast-icon", children: _jsx(Icon, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }) }), _jsxs("div", { className: "toast-body", children: [_jsx("div", { className: "toast-title", children: item.title }), item.description != null && (_jsx("div", { className: "toast-desc", children: item.description })), item.action && (_jsx("button", { type: "button", className: "toast-action", onClick: () => {
|
|
15
15
|
item.action?.onClick();
|
|
16
16
|
onClose();
|
|
17
|
-
}, children: item.action.label }))] }), _jsx("button", { type: "button", className: "toast-close", "aria-label":
|
|
17
|
+
}, children: item.action.label }))] }), _jsx("button", { type: "button", className: "toast-close", "aria-label": dismissLabel, onClick: onClose, children: _jsx(X, { size: 15, strokeWidth: 2, "aria-hidden": "true" }) })] }));
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Wrap your app in a `ToastProvider`, then call `useToast().toast({...})` from
|
|
21
21
|
* anywhere to push a notification. Toasts stack bottom-right and auto-dismiss
|
|
22
22
|
* after `duration` (default 4s; 0 keeps them until dismissed).
|
|
23
23
|
*/
|
|
24
|
-
export function ToastProvider({ children, duration = 4000, }) {
|
|
24
|
+
export function ToastProvider({ children, duration = 4000, dismissLabel = "Dismiss", regionLabel = "Notifications", }) {
|
|
25
25
|
const [items, setItems] = React.useState([]);
|
|
26
26
|
const idRef = React.useRef(0);
|
|
27
27
|
const timers = React.useRef(new Map());
|
|
@@ -47,7 +47,7 @@ export function ToastProvider({ children, duration = 4000, }) {
|
|
|
47
47
|
return () => map.forEach(clearTimeout);
|
|
48
48
|
}, []);
|
|
49
49
|
const api = React.useMemo(() => ({ toast, dismiss }), [toast, dismiss]);
|
|
50
|
-
return (_jsxs(ToastContext.Provider, { value: api, children: [children, _jsx("div", { className: toastRecipe(), children: _jsx("div", { className: "toast-viewport", role: "region", "aria-label":
|
|
50
|
+
return (_jsxs(ToastContext.Provider, { value: api, children: [children, _jsx("div", { className: toastRecipe(), children: _jsx("div", { className: "toast-viewport", role: "region", "aria-label": regionLabel, children: items.map((t) => (_jsx(ToastCard, { item: t, onClose: () => dismiss(t.id), dismissLabel: dismissLabel }, t.id))) }) })] }));
|
|
51
51
|
}
|
|
52
52
|
ToastProvider.displayName = "ToastProvider";
|
|
53
53
|
export function useToast() {
|
|
@@ -6,7 +6,7 @@ import { contract as c } from "../../tokens/index.js";
|
|
|
6
6
|
const config = defineRecipe({
|
|
7
7
|
name: "toast",
|
|
8
8
|
base: `display: contents; font-family: ${c.font.sans};
|
|
9
|
-
& .toast-viewport { position: fixed; z-index: 80;
|
|
9
|
+
& .toast-viewport { position: fixed; z-index: 80; inset-inline-end: ${c.space["4"]}; bottom: ${c.space["4"]}; display: flex; flex-direction: column; gap: ${c.space["2"]}; width: 360px; max-width: calc(100vw - ${c.space["8"]}); pointer-events: none; }
|
|
10
10
|
& .toast { pointer-events: auto; display: flex; align-items: flex-start; gap: ${c.space["2.5"]}; box-sizing: border-box; padding: ${c.space["3"]}; border-radius: ${c.radius.xl}; background: ${c.bgRaised}; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 5%, transparent), 0 8px 28px -6px rgba(28,40,64,0.16), 0 2px 6px -2px rgba(28,40,64,0.10); opacity: 1; transform: translateY(0); transition: opacity 0.15s ease, transform 0.15s ease; @starting-style { opacity: 0; transform: translateY(8px); } }
|
|
11
11
|
& .toast-icon { flex-shrink: 0; margin-top: 1px; display: inline-flex; color: ${c.fgMuted}; }
|
|
12
12
|
& .toast[data-tone="info"] .toast-icon { color: ${c.bgBrandSolid}; }
|
|
@@ -18,7 +18,7 @@ const config = defineRecipe({
|
|
|
18
18
|
& .toast-desc { font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
19
19
|
& .toast-action { align-self: flex-start; margin-top: ${c.space["1.5"]}; height: 24px; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; cursor: pointer; }
|
|
20
20
|
& .toast-action:hover { background: color-mix(in srgb, ${c.fgPrimary} 10%, transparent); }
|
|
21
|
-
& .toast-close { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: -2px -2px 0 0; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; cursor: pointer; }
|
|
21
|
+
& .toast-close { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: -2px -2px 0 0; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; }
|
|
22
22
|
& .toast-close:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }`,
|
|
23
23
|
variants: {},
|
|
24
24
|
defaultVariants: {},
|
|
@@ -8,11 +8,24 @@ import { tooltipRecipe } from "./tooltip.recipe.js";
|
|
|
8
8
|
* and hides on leave / blur / Escape. The bubble is portaled and positioned
|
|
9
9
|
* above the trigger (flipping below near the top edge).
|
|
10
10
|
*/
|
|
11
|
-
export function Tooltip({ content, children, side = "top", delay = 350, }) {
|
|
11
|
+
export function Tooltip({ content, children, side = "top", delay = 350, open: openProp, defaultOpen, onOpenChange, }) {
|
|
12
12
|
const triggerRef = React.useRef(null);
|
|
13
13
|
const timer = React.useRef(undefined);
|
|
14
14
|
const [pos, setPos] = React.useState(null);
|
|
15
|
-
const
|
|
15
|
+
const [internalOpen, setInternalOpen] = React.useState(defaultOpen ?? false);
|
|
16
|
+
const open = openProp ?? internalOpen;
|
|
17
|
+
const setOpen = React.useCallback((next) => {
|
|
18
|
+
if (openProp === undefined)
|
|
19
|
+
setInternalOpen(next);
|
|
20
|
+
onOpenChange?.(next);
|
|
21
|
+
}, [openProp, onOpenChange]);
|
|
22
|
+
// Measuring is separate from opening, so a controlled consumer that flips
|
|
23
|
+
// `open` gets placed against the trigger exactly as a hover would.
|
|
24
|
+
React.useLayoutEffect(() => {
|
|
25
|
+
if (!open) {
|
|
26
|
+
setPos(null);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
16
29
|
const el = triggerRef.current;
|
|
17
30
|
if (!el)
|
|
18
31
|
return;
|
|
@@ -23,17 +36,18 @@ export function Tooltip({ content, children, side = "top", delay = 350, }) {
|
|
|
23
36
|
top: Math.round(below ? r.bottom + 6 : r.top - 6),
|
|
24
37
|
below,
|
|
25
38
|
});
|
|
26
|
-
};
|
|
27
|
-
const
|
|
39
|
+
}, [open, side]);
|
|
40
|
+
const openAfterDelay = () => {
|
|
28
41
|
clearTimeout(timer.current);
|
|
29
|
-
timer.current = setTimeout(
|
|
42
|
+
timer.current = setTimeout(() => setOpen(true), delay);
|
|
30
43
|
};
|
|
31
44
|
const close = () => {
|
|
32
45
|
clearTimeout(timer.current);
|
|
33
|
-
|
|
46
|
+
setOpen(false);
|
|
34
47
|
};
|
|
35
48
|
React.useEffect(() => () => clearTimeout(timer.current), []);
|
|
36
|
-
return (_jsxs(_Fragment, { children: [_jsx("span", { ref: triggerRef, style: { display: "inline-flex" }, onPointerEnter:
|
|
49
|
+
return (_jsxs(_Fragment, { children: [_jsx("span", { ref: triggerRef, style: { display: "inline-flex" }, onPointerEnter: openAfterDelay, onPointerLeave: close, onFocusCapture: openAfterDelay, onBlurCapture: close, onKeyDown: (e) => e.key === "Escape" && close(), children: children }), open &&
|
|
50
|
+
pos != null &&
|
|
37
51
|
createPortal(_jsx("div", { role: "tooltip", className: tooltipRecipe(), style: {
|
|
38
52
|
left: pos.left,
|
|
39
53
|
top: pos.top,
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { wheelpickerRecipe } from "./wheelpicker.recipe.js";
|
|
4
|
+
const ITEM_HEIGHT = { small: 36, medium: 44 };
|
|
5
|
+
/**
|
|
6
|
+
* A scroll-snapping wheel, measured from seed-design. Each column snaps its
|
|
7
|
+
* rows to a centred selection band; the momentum is the browser's own, because
|
|
8
|
+
* the column is an ordinary scroll container with `scroll-snap-type: y
|
|
9
|
+
* mandatory` rather than a JavaScript animation.
|
|
10
|
+
*
|
|
11
|
+
* Keyboard: each column is a `listbox` that takes focus, with ↑/↓ moving the
|
|
12
|
+
* selection, Home/End jumping to the ends, and a visible ring on the selected
|
|
13
|
+
* row for keyboard focus only.
|
|
14
|
+
*/
|
|
15
|
+
export function WheelPicker({ columns, value: valueProp, defaultValue, onValueChange, size = "medium", className, ...rest }) {
|
|
16
|
+
const firstOf = React.useCallback(() => Object.fromEntries(columns.map((c) => [c.key, c.options[0]?.value ?? ""])), [columns]);
|
|
17
|
+
const [internal, setInternal] = React.useState(() => ({ ...firstOf(), ...defaultValue }));
|
|
18
|
+
const value = valueProp ?? internal;
|
|
19
|
+
const itemHeight = ITEM_HEIGHT[size];
|
|
20
|
+
// the listbox owns focus and points at the active row with
|
|
21
|
+
// aria-activedescendant; options are not individually tabbable, which is the
|
|
22
|
+
// ARIA listbox pattern and what lets ↑/↓ work without focus leaving the column
|
|
23
|
+
const baseId = React.useId();
|
|
24
|
+
const optionId = (colKey, value) => `${baseId}-${colKey}-${value}`;
|
|
25
|
+
const refs = React.useRef(new Map());
|
|
26
|
+
// set while a programmatic scroll is settling, so the scroll handler does not
|
|
27
|
+
// read a half-finished position and report a selection nobody picked
|
|
28
|
+
const settling = React.useRef(new Set());
|
|
29
|
+
const commit = (key, next) => {
|
|
30
|
+
if (value[key] === next)
|
|
31
|
+
return;
|
|
32
|
+
const merged = { ...value, [key]: next };
|
|
33
|
+
if (valueProp === undefined)
|
|
34
|
+
setInternal(merged);
|
|
35
|
+
onValueChange?.(merged);
|
|
36
|
+
};
|
|
37
|
+
const scrollTo = React.useCallback((key, index, behavior) => {
|
|
38
|
+
const el = refs.current.get(key);
|
|
39
|
+
if (!el || index < 0)
|
|
40
|
+
return;
|
|
41
|
+
settling.current.add(key);
|
|
42
|
+
el.scrollTo({ top: index * itemHeight, behavior });
|
|
43
|
+
// a smooth scroll has no completion event; one frame past the animation
|
|
44
|
+
// is enough for the snap to land
|
|
45
|
+
setTimeout(() => settling.current.delete(key), behavior === "smooth" ? 300 : 0);
|
|
46
|
+
}, [itemHeight]);
|
|
47
|
+
// keep each column parked on its selected row, including on first paint
|
|
48
|
+
React.useEffect(() => {
|
|
49
|
+
for (const col of columns) {
|
|
50
|
+
const i = col.options.findIndex((o) => o.value === value[col.key]);
|
|
51
|
+
scrollTo(col.key, i, "auto");
|
|
52
|
+
}
|
|
53
|
+
}, [columns, value, scrollTo]);
|
|
54
|
+
const onScroll = (col) => {
|
|
55
|
+
if (settling.current.has(col.key))
|
|
56
|
+
return;
|
|
57
|
+
const el = refs.current.get(col.key);
|
|
58
|
+
if (!el)
|
|
59
|
+
return;
|
|
60
|
+
const i = Math.round(el.scrollTop / itemHeight);
|
|
61
|
+
const opt = col.options[Math.max(0, Math.min(i, col.options.length - 1))];
|
|
62
|
+
if (opt)
|
|
63
|
+
commit(col.key, opt.value);
|
|
64
|
+
};
|
|
65
|
+
const onKeyDown = (e, col) => {
|
|
66
|
+
const i = col.options.findIndex((o) => o.value === value[col.key]);
|
|
67
|
+
const go = (next) => {
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
const clamped = Math.max(0, Math.min(next, col.options.length - 1));
|
|
70
|
+
const opt = col.options[clamped];
|
|
71
|
+
if (!opt)
|
|
72
|
+
return;
|
|
73
|
+
commit(col.key, opt.value);
|
|
74
|
+
scrollTo(col.key, clamped, "smooth");
|
|
75
|
+
};
|
|
76
|
+
if (e.key === "ArrowDown")
|
|
77
|
+
go(i + 1);
|
|
78
|
+
else if (e.key === "ArrowUp")
|
|
79
|
+
go(i - 1);
|
|
80
|
+
else if (e.key === "Home")
|
|
81
|
+
go(0);
|
|
82
|
+
else if (e.key === "End")
|
|
83
|
+
go(col.options.length - 1);
|
|
84
|
+
};
|
|
85
|
+
return (_jsxs("div", { className: wheelpickerRecipe({ size, className }), ...rest, children: [_jsx("div", { className: "wheelpicker-indicator", "aria-hidden": "true" }), _jsx("div", { className: "wheelpicker-fog", children: _jsx("div", { className: "wheelpicker-columns", children: columns.map((col) => (_jsx("div", { role: "listbox", "aria-label": col.label, "aria-activedescendant": optionId(col.key, value[col.key] ?? ""), tabIndex: 0, className: "wheelpicker-column", ref: (el) => {
|
|
86
|
+
if (el)
|
|
87
|
+
refs.current.set(col.key, el);
|
|
88
|
+
else
|
|
89
|
+
refs.current.delete(col.key);
|
|
90
|
+
}, onScroll: () => onScroll(col), onKeyDown: (e) => onKeyDown(e, col), children: col.options.map((opt) => {
|
|
91
|
+
const selected = opt.value === value[col.key];
|
|
92
|
+
return (_jsx("div", { id: optionId(col.key, opt.value), role: "option", "aria-selected": selected, "data-selected": selected ? "" : undefined, className: "wheelpicker-item", onClick: () => {
|
|
93
|
+
commit(col.key, opt.value);
|
|
94
|
+
scrollTo(col.key, col.options.indexOf(opt), "smooth");
|
|
95
|
+
}, children: opt.label }, opt.value));
|
|
96
|
+
}) }, col.key))) }) })] }));
|
|
97
|
+
}
|
|
98
|
+
WheelPicker.displayName = "WheelPicker";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
|
+
import { contract as c } from "../../tokens/index.js";
|
|
3
|
+
// seed-design's wheel picker, measured from @seed-design/css.
|
|
4
|
+
//
|
|
5
|
+
// The wheel physics are CSS, not JavaScript: each column is a scroll container
|
|
6
|
+
// with `scroll-snap-type: y mandatory` and items that snap centred, so the
|
|
7
|
+
// browser's own momentum and rubber-banding do the work. Half a viewport of
|
|
8
|
+
// padding above and below is what lets the first and last item reach the
|
|
9
|
+
// centre band.
|
|
10
|
+
//
|
|
11
|
+
// small medium
|
|
12
|
+
// viewport height 180px 220px
|
|
13
|
+
// item height 36px 44px
|
|
14
|
+
// font / line 20/27 26/35
|
|
15
|
+
// fog max height 108px 132px
|
|
16
|
+
// centre offset 72px 88px ((viewport - item) / 2)
|
|
17
|
+
const config = defineRecipe({
|
|
18
|
+
name: "wheelpicker",
|
|
19
|
+
base: `
|
|
20
|
+
position: relative; box-sizing: border-box; width: 100%; overflow: hidden;
|
|
21
|
+
background: ${c.bgSurface}; font-family: ${c.font.sans};
|
|
22
|
+
|
|
23
|
+
/* the band the selected row sits in; behind the items, never hit-tested */
|
|
24
|
+
& .wheelpicker-indicator {
|
|
25
|
+
position: absolute; z-index: 0; inset-inline: ${c.space["4"]}; top: 50%;
|
|
26
|
+
transform: translateY(-50%); border-radius: ${c.radius.md};
|
|
27
|
+
background: ${c.bgNeutralWeak}; pointer-events: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* fades the rows furthest from the centre, so the column reads as a wheel
|
|
31
|
+
rather than a list. 40% of the viewport, capped, top and bottom. */
|
|
32
|
+
& .wheelpicker-fog {
|
|
33
|
+
position: relative; z-index: 1; height: 100%; overflow: hidden;
|
|
34
|
+
mask-image: linear-gradient(
|
|
35
|
+
to bottom,
|
|
36
|
+
transparent 0,
|
|
37
|
+
#000 var(--wheelpicker-fog),
|
|
38
|
+
#000 calc(100% - var(--wheelpicker-fog)),
|
|
39
|
+
transparent 100%
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
& .wheelpicker-columns { display: flex; width: 100%; height: 100%; justify-content: center; }
|
|
43
|
+
|
|
44
|
+
& .wheelpicker-column {
|
|
45
|
+
box-sizing: border-box; flex: 0 0 auto; width: max-content; height: 100%;
|
|
46
|
+
overflow-x: hidden; overflow-y: auto;
|
|
47
|
+
overscroll-behavior-y: contain; overscroll-behavior-x: none;
|
|
48
|
+
scroll-snap-type: y mandatory; touch-action: pan-y;
|
|
49
|
+
scrollbar-width: none; -ms-overflow-style: none; outline: none;
|
|
50
|
+
padding-block: var(--wheelpicker-offset);
|
|
51
|
+
}
|
|
52
|
+
& .wheelpicker-column::-webkit-scrollbar { display: none; }
|
|
53
|
+
|
|
54
|
+
& .wheelpicker-item {
|
|
55
|
+
display: flex; align-items: center; justify-content: center;
|
|
56
|
+
scroll-snap-align: center; user-select: none; white-space: nowrap;
|
|
57
|
+
padding-inline: ${c.space["4"]}; color: ${c.fgDisabled};
|
|
58
|
+
background: none; border: none; font: inherit; cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
& .wheelpicker-item[data-selected] { color: ${c.fgPrimary}; }
|
|
61
|
+
|
|
62
|
+
/* the ring is drawn on the SELECTED row, and only for keyboard focus:
|
|
63
|
+
a pointer user has just tapped the row they meant and does not need it */
|
|
64
|
+
& .wheelpicker-column:focus-visible .wheelpicker-item[data-selected] {
|
|
65
|
+
outline: 2px solid ${c.strokeFocusRing}; outline-offset: -2px;
|
|
66
|
+
border-radius: ${c.radius.md};
|
|
67
|
+
}
|
|
68
|
+
`,
|
|
69
|
+
variants: {
|
|
70
|
+
size: {
|
|
71
|
+
small: `
|
|
72
|
+
height: 180px; --wheelpicker-offset: 72px;
|
|
73
|
+
--wheelpicker-fog: min(40%, 108px);
|
|
74
|
+
& .wheelpicker-indicator { height: 36px; }
|
|
75
|
+
& .wheelpicker-item { height: 36px; min-height: 36px; font-size: 20px; line-height: 27px; }
|
|
76
|
+
`,
|
|
77
|
+
medium: `
|
|
78
|
+
height: 220px; --wheelpicker-offset: 88px;
|
|
79
|
+
--wheelpicker-fog: min(40%, 132px);
|
|
80
|
+
& .wheelpicker-indicator { height: 44px; }
|
|
81
|
+
& .wheelpicker-item { height: 44px; min-height: 44px; font-size: 26px; line-height: 35px; }
|
|
82
|
+
`,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
defaultVariants: { size: "medium" },
|
|
86
|
+
compoundVariants: [],
|
|
87
|
+
});
|
|
88
|
+
export const wheelpickerRecipe = Object.assign(resolveRecipe(config), {
|
|
89
|
+
config,
|
|
90
|
+
meta: { medium: { height: "220px", itemHeight: "44px" } },
|
|
91
|
+
});
|
|
92
|
+
export default config;
|
package/dist/esm/index.js
CHANGED
|
@@ -13,9 +13,11 @@ export * from "./components/button/index.js";
|
|
|
13
13
|
export * from "./components/callout/index.js";
|
|
14
14
|
export * from "./components/card/index.js";
|
|
15
15
|
export * from "./components/checkbox/index.js";
|
|
16
|
+
export * from "./components/columncalc/index.js";
|
|
16
17
|
export * from "./components/contextmenu/index.js";
|
|
17
18
|
export * from "./components/datatable/index.js";
|
|
18
19
|
export * from "./components/datepicker/index.js";
|
|
20
|
+
export * from "./components/datepickerfield/index.js";
|
|
19
21
|
export * from "./components/dialog/index.js";
|
|
20
22
|
export * from "./components/divider/index.js";
|
|
21
23
|
export * from "./components/donutchart/index.js";
|
|
@@ -30,6 +32,7 @@ export * from "./components/multiselect/index.js";
|
|
|
30
32
|
export * from "./components/popover/index.js";
|
|
31
33
|
export * from "./components/progress/index.js";
|
|
32
34
|
export * from "./components/radiogroup/index.js";
|
|
35
|
+
export * from "./components/resizablepanel/index.js";
|
|
33
36
|
export * from "./components/segmented/index.js";
|
|
34
37
|
export * from "./components/select/index.js";
|
|
35
38
|
export * from "./components/skeleton/index.js";
|
|
@@ -43,12 +46,14 @@ export * from "./components/tabs/index.js";
|
|
|
43
46
|
export * from "./components/textarea/index.js";
|
|
44
47
|
export * from "./components/toast/index.js";
|
|
45
48
|
export * from "./components/tooltip/index.js";
|
|
49
|
+
export * from "./components/wheelpicker/index.js";
|
|
46
50
|
export * from "./core/index.js";
|
|
47
51
|
// product surfaces (product/) — faithful, pixel-measured rebuilds of specific
|
|
48
52
|
// Attio screens (Sidebar, RecordsTable, RecordPage, Inbox, …). Use them as-is
|
|
49
53
|
// or as composition references for your own data; `components/` above holds
|
|
50
54
|
// the generic primitives (Table, DataTable, Button, …) to build your own UI from.
|
|
51
55
|
export * from "./product/appshell/index.js";
|
|
56
|
+
export * from "./product/authshell/index.js";
|
|
52
57
|
export * from "./product/board/index.js";
|
|
53
58
|
export * from "./product/command/index.js";
|
|
54
59
|
export * from "./product/entitycard/index.js";
|
|
@@ -8,25 +8,49 @@ import { appshellRecipe } from "./appshell.recipe.js";
|
|
|
8
8
|
* collapse button to slide it away (a floating button brings it back). The
|
|
9
9
|
* sidebar pane clips rather than squishing, so its content never reflows.
|
|
10
10
|
*/
|
|
11
|
-
export function AppShell({ sidebar, children, defaultWidth = 275, minWidth = 220, maxWidth =
|
|
12
|
-
const [
|
|
13
|
-
const
|
|
11
|
+
export function AppShell({ sidebar, children, width: widthProp, defaultWidth = 275, onWidthChange, collapsed: collapsedProp, defaultCollapsed = false, onCollapsedChange, minWidth = 220, maxWidth = 350, className, expandLabel = "Expand sidebar", ...rest }) {
|
|
12
|
+
const [internalCollapsed, setInternalCollapsed] = React.useState(defaultCollapsed);
|
|
13
|
+
const collapsed = collapsedProp ?? internalCollapsed;
|
|
14
|
+
const setCollapsed = (next) => {
|
|
15
|
+
onCollapsedChange?.(next);
|
|
16
|
+
if (collapsedProp === undefined)
|
|
17
|
+
setInternalCollapsed(next);
|
|
18
|
+
};
|
|
19
|
+
const [internalWidth, setInternalWidth] = React.useState(defaultWidth);
|
|
20
|
+
// Live width while the pointer is down, so a controlled shell still tracks
|
|
21
|
+
// the drag instead of waiting for the parent to echo each move back.
|
|
22
|
+
const [dragWidth, setDragWidth] = React.useState(null);
|
|
23
|
+
const width = dragWidth ?? widthProp ?? internalWidth;
|
|
14
24
|
const [dragging, setDragging] = React.useState(false);
|
|
15
25
|
const startResize = (e) => {
|
|
16
26
|
e.preventDefault();
|
|
17
27
|
const startX = e.clientX;
|
|
18
28
|
const startW = width;
|
|
19
|
-
|
|
29
|
+
// Attio only enters the drag state once the pointer has actually moved — a
|
|
30
|
+
// click on the handle is not a drag, so the blue bar must not flash on press.
|
|
31
|
+
let moved = false;
|
|
32
|
+
let last = startW;
|
|
20
33
|
const prevSelect = document.body.style.userSelect;
|
|
21
34
|
const prevCursor = document.body.style.cursor;
|
|
22
35
|
document.body.style.userSelect = "none";
|
|
23
36
|
document.body.style.cursor = "col-resize";
|
|
24
37
|
const onMove = (ev) => {
|
|
38
|
+
if (!moved) {
|
|
39
|
+
moved = true;
|
|
40
|
+
setDragging(true);
|
|
41
|
+
}
|
|
25
42
|
const w = Math.round(Math.min(maxWidth, Math.max(minWidth, startW + (ev.clientX - startX))));
|
|
26
|
-
|
|
43
|
+
setDragWidth(w);
|
|
44
|
+
last = w;
|
|
27
45
|
};
|
|
28
46
|
const onUp = () => {
|
|
29
47
|
setDragging(false);
|
|
48
|
+
setDragWidth(null);
|
|
49
|
+
if (last !== startW) {
|
|
50
|
+
onWidthChange?.(last);
|
|
51
|
+
if (widthProp === undefined)
|
|
52
|
+
setInternalWidth(last);
|
|
53
|
+
}
|
|
30
54
|
document.body.style.userSelect = prevSelect;
|
|
31
55
|
document.body.style.cursor = prevCursor;
|
|
32
56
|
window.removeEventListener("pointermove", onMove);
|
|
@@ -35,10 +59,10 @@ export function AppShell({ sidebar, children, defaultWidth = 275, minWidth = 220
|
|
|
35
59
|
window.addEventListener("pointermove", onMove);
|
|
36
60
|
window.addEventListener("pointerup", onUp);
|
|
37
61
|
};
|
|
38
|
-
const toggleCollapse = () => setCollapsed(
|
|
39
|
-
return (_jsxs("div", { className: appshellRecipe({ className }), children: [_jsxs("div", { className: "appshell-side", "data-collapsed": collapsed ? "" : undefined, style: {
|
|
62
|
+
const toggleCollapse = () => setCollapsed(!collapsed);
|
|
63
|
+
return (_jsxs("div", { className: appshellRecipe({ className }), ...rest, children: [_jsxs("div", { className: "appshell-side", "data-collapsed": collapsed ? "" : undefined, style: {
|
|
40
64
|
width: collapsed ? 0 : width,
|
|
41
|
-
transition: dragging ? "none" : "width .
|
|
42
|
-
}, children: [_jsx("div", { className: "appshell-side-inner", style: { width }, children: sidebar(toggleCollapse) }), !collapsed && (_jsx("div", { className: "appshell-resize", "data-dragging": dragging ? "" : undefined, "aria-hidden": "true", onPointerDown: startResize }))] }), _jsxs("div", { className: "appshell-main", children: [collapsed && (_jsx("button", { type: "button", className: "appshell-expand", "aria-label":
|
|
65
|
+
transition: dragging ? "none" : "width .14s ease",
|
|
66
|
+
}, children: [_jsx("div", { className: "appshell-side-inner", style: { width }, children: sidebar(toggleCollapse) }), !collapsed && (_jsx("div", { className: "appshell-resize", "data-dragging": dragging ? "" : undefined, "aria-hidden": "true", onPointerDown: startResize }))] }), _jsxs("div", { className: "appshell-main", children: [collapsed && (_jsx("button", { type: "button", className: "appshell-expand", "aria-label": expandLabel, onClick: () => setCollapsed(false), children: _jsx(PanelLeft, { size: 15, strokeWidth: 1.75 }) })), children] })] }));
|
|
43
67
|
}
|
|
44
68
|
AppShell.displayName = "AppShell";
|
|
@@ -9,11 +9,11 @@ const config = defineRecipe({
|
|
|
9
9
|
display: flex; height: 100%; width: 100%; overflow: hidden; background: ${c.bgSurface}; font-family: ${c.font.sans}; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
10
10
|
& .appshell-side { position: relative; flex-shrink: 0; overflow: hidden; }
|
|
11
11
|
& .appshell-side-inner { height: 100%; }
|
|
12
|
-
& .appshell-resize { position: absolute; top: 0; right: 0; width:
|
|
13
|
-
& .appshell-resize::after { content: ""; position: absolute; top: 0; right: 0; width:
|
|
14
|
-
& .appshell-resize:hover::after, & .appshell-resize[data-dragging]::after { background: ${c.bgBrandSolid}; }
|
|
12
|
+
& .appshell-resize { position: absolute; top: 0; right: 0; width: 10px; height: 100%; cursor: col-resize; z-index: 5; touch-action: none; }
|
|
13
|
+
& .appshell-resize::after { content: ""; position: absolute; top: 0; right: 0; width: 1px; height: 100%; background: ${c.borderSubtle}; transition: background-color .16s, height .16s; }
|
|
14
|
+
& .appshell-resize:hover::after, & .appshell-resize[data-dragging]::after { width: 2px; background: ${c.bgBrandSolid}; }
|
|
15
15
|
& .appshell-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
|
|
16
|
-
& .appshell-expand { position: absolute; top: ${c.space["2"]};
|
|
16
|
+
& .appshell-expand { position: absolute; top: ${c.space["2"]}; inset-inline-start: ${c.space["2"]}; z-index: 6; display: inline-flex; align-items: center; justify-content: center; width: ${c.size.row}; height: ${c.size.row}; padding: 0; border: none; border-radius: ${c.radius.md}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}; background: ${c.bgSurface}; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; transition: background-color .12s; }
|
|
17
17
|
& .appshell-expand:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
|
|
18
18
|
`,
|
|
19
19
|
variants: {},
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { authshellRecipe } from "./authshell.recipe.js";
|
|
3
|
+
/**
|
|
4
|
+
* The Attio welcome/auth layout (app.attio.com/welcome/*) — measured live.
|
|
5
|
+
* A centered page frame: an optional top progress bar, a logo, a two-pane
|
|
6
|
+
* card (the form + an optional product preview, hidden under 1200px), and
|
|
7
|
+
* a footer. Auth-surface Input/FormField/Button treatment (flatter fields,
|
|
8
|
+
* 36px buttons) applies automatically to those crisp components when
|
|
9
|
+
* rendered as `children` — see authshell.recipe.ts.
|
|
10
|
+
*/
|
|
11
|
+
export function AuthShell({ progress, logo, title, children, preview, footer, className, ...rest }) {
|
|
12
|
+
const hasProgress = typeof progress === "number";
|
|
13
|
+
const pct = hasProgress
|
|
14
|
+
? Math.round(Math.max(0, Math.min(1, progress)) * 100)
|
|
15
|
+
: 0;
|
|
16
|
+
return (_jsxs("div", { className: authshellRecipe({ className }), ...rest, children: [hasProgress && (_jsx("div", { className: "authshell-progress", role: "progressbar", "aria-valuenow": pct, "aria-valuemin": 0, "aria-valuemax": 100, children: _jsx("div", { className: "authshell-progress-fill", style: { width: `${pct}%` } }) })), logo != null && _jsx("div", { className: "authshell-logo", children: logo }), _jsxs("div", { className: "authshell-card", children: [_jsx("div", { className: "authshell-pane", children: _jsxs("div", { className: "authshell-body", children: [title != null && _jsx("div", { className: "authshell-title", children: title }), _jsx("div", { className: "authshell-form", children: children })] }) }), preview != null && _jsx("div", { className: "authshell-preview", children: preview })] }), footer != null && _jsx("div", { className: "authshell-footer", children: footer })] }));
|
|
17
|
+
}
|
|
18
|
+
AuthShell.displayName = "AuthShell";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineRecipe, resolveRecipe } from "../../core/index.js";
|
|
2
|
+
import { contract as c } from "../../tokens/index.js";
|
|
3
|
+
// Attio's welcome/auth surface (app.attio.com/welcome/*) — measured live,
|
|
4
|
+
// 2026-09-15. A centered page frame holding a two-pane card: the form on the
|
|
5
|
+
// left, an optional product preview on the right, with an optional top
|
|
6
|
+
// progress bar and a footer under the card. Every value below is measured
|
|
7
|
+
// from the live app, EXCEPT the 1200px preview-hiding breakpoint (called out
|
|
8
|
+
// at the container query below) — Attio drops the pane in JS somewhere between a
|
|
9
|
+
// measured 954px and 1393px viewport width, so 1200px is chosen, not measured.
|
|
10
|
+
const config = defineRecipe({
|
|
11
|
+
name: "authshell",
|
|
12
|
+
base: `min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; position: relative;
|
|
13
|
+
background: ${c.bgSurface}; font-family: ${c.font.sans}; font-size: ${c.text.lg}; line-height: 20px; color: ${c.fgPrimary};
|
|
14
|
+
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
15
|
+
|
|
16
|
+
& .authshell-progress { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: ${c.borderDefault}; }
|
|
17
|
+
& .authshell-progress-fill { height: 2px; background: ${c.fgPrimary}; border-radius: 4px; transition: width .2s; }
|
|
18
|
+
|
|
19
|
+
& .authshell-logo { margin-top: ${c.space["8"]}; height: 24px; display: flex; align-items: center; }
|
|
20
|
+
|
|
21
|
+
& .authshell-card { margin-top: ${c.space["6"]}; display: flex; height: 692px; border-radius: 20px; border: 1px solid ${c.borderSubtle}; overflow: hidden; }
|
|
22
|
+
|
|
23
|
+
& .authshell-pane { flex: 0 0 564px; padding: 72px; display: flex; flex-direction: column; box-sizing: border-box; }
|
|
24
|
+
|
|
25
|
+
& .authshell-preview { flex: 0 0 564px; padding: 96px 64px; background: ${c.bgSubtle}; border-inline-start: 1px solid color-mix(in srgb, ${c.fgPrimary} 5%, transparent); position: relative; overflow: hidden; box-sizing: border-box; }
|
|
26
|
+
& .authshell-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(color-mix(in srgb, ${c.bgSubtle} 0%, transparent) 0%, ${c.bgSubtle} 100%); pointer-events: none; }
|
|
27
|
+
|
|
28
|
+
& .authshell-body { width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: ${c.space["8"]}; align-items: center; }
|
|
29
|
+
|
|
30
|
+
& .authshell-title { font-size: 20px; line-height: 24px; font-weight: ${c.weight.semibold}; letter-spacing: -0.4px; color: ${c.fgPrimary}; align-self: stretch; }
|
|
31
|
+
|
|
32
|
+
& .authshell-form { align-self: stretch; display: flex; flex-direction: column; gap: 28px; }
|
|
33
|
+
|
|
34
|
+
& .authshell-footer { margin-top: ${c.space["6"]}; display: flex; align-items: center; gap: ${c.space["1"]}; font-size: ${c.text.sm}; line-height: 16px; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); }
|
|
35
|
+
& .authshell-footer a { color: inherit; font-weight: ${c.weight.medium}; text-decoration: underline; }
|
|
36
|
+
|
|
37
|
+
/* Auth-surface control treatment: flatter than the in-app chrome — a plain
|
|
38
|
+
hairline ring instead of elevation.field's soft glow, and a 36px (not
|
|
39
|
+
40px) submit. Scoped to .authshell-body so a consumer keeps using
|
|
40
|
+
crisp's Input / FormField / Button and gets the auth treatment for free. */
|
|
41
|
+
& .authshell-body .formfield-label { font-size: ${c.text.sm}; line-height: 16px; font-weight: ${c.weight.medium}; letter-spacing: -0.12px; color: color-mix(in srgb, ${c.fgPrimary} 50%, transparent); padding-inline-start: ${c.space["1"]}; }
|
|
42
|
+
& .authshell-body .formfield { gap: ${c.space["1"]}; }
|
|
43
|
+
& .authshell-body .input { height: 34px; padding-inline: ${c.space["2.5"]}; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 6%, transparent); font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; letter-spacing: -0.14px; transition: box-shadow .14s, background-color .14s; }
|
|
44
|
+
& .authshell-body .input:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
|
|
45
|
+
/* Same three-layer brand shadow as Button's primary intent, but the auth
|
|
46
|
+
button's inset ring is measured at rgba(0,0,0,0.06) — a hairline, not
|
|
47
|
+
the in-app button's rgba(255,255,255,0.07) highlight. */
|
|
48
|
+
& .authshell-body .button { height: 36px; padding-inline: ${c.space["3"]}; border-radius: 10px; }
|
|
49
|
+
& .authshell-body .button--intent_primary { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08); }
|
|
50
|
+
|
|
51
|
+
/* Attio drops the preview pane in JS on narrow viewports (measured: two
|
|
52
|
+
panes at 1393px, one at 954px), so 1200px is a chosen threshold inside
|
|
53
|
+
that bracket, not a measured value. A CONTAINER query, not a media
|
|
54
|
+
query: the shell is embedded in the docs inside an ~800px column, where
|
|
55
|
+
a viewport query would keep the 1130px card and overflow it. Asking the
|
|
56
|
+
shell's own width is what "there isn't room for the preview" means. */
|
|
57
|
+
container-type: inline-size;
|
|
58
|
+
@container (max-width: 1200px) { & .authshell-preview { display: none; } }`,
|
|
59
|
+
variants: {},
|
|
60
|
+
defaultVariants: {},
|
|
61
|
+
compoundVariants: [],
|
|
62
|
+
});
|
|
63
|
+
export const authshellRecipe = resolveRecipe(config);
|
|
64
|
+
export default config;
|
|
@@ -7,7 +7,7 @@ import { boardRecipe } from "./board.recipe.js";
|
|
|
7
7
|
* (the parent owns the cards, so the move is a controlled state update).
|
|
8
8
|
* Measured from Attio's Deals pipeline.
|
|
9
9
|
*/
|
|
10
|
-
export function Board({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLabel = "New", className, }) {
|
|
10
|
+
export function Board({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLabel = "New", className, ...rest }) {
|
|
11
11
|
const [dragId, setDragId] = React.useState(null);
|
|
12
12
|
const [overCol, setOverCol] = React.useState(null);
|
|
13
13
|
const move = (cardId, toColumn) => {
|
|
@@ -16,7 +16,7 @@ export function Board({ columns, cards, onCardsChange, renderCard, onNewCard, ne
|
|
|
16
16
|
return;
|
|
17
17
|
onCardsChange?.(cards.map((c) => (c.id === cardId ? { ...c, columnId: toColumn } : c)));
|
|
18
18
|
};
|
|
19
|
-
return (_jsx("div", { className: boardRecipe({ className }), children: columns.map((col) => {
|
|
19
|
+
return (_jsx("div", { className: boardRecipe({ className }), ...rest, children: columns.map((col) => {
|
|
20
20
|
const colCards = cards.filter((c) => c.columnId === col.id);
|
|
21
21
|
return (_jsxs("div", { className: "board-col", "data-over": overCol === col.id ? "" : undefined, onDragOver: (e) => {
|
|
22
22
|
if (!dragId)
|
|
@@ -11,7 +11,7 @@ const config = defineRecipe({
|
|
|
11
11
|
& .board-col-dot { width: 9px; height: 9px; border-radius: ${c.radius.full}; flex-shrink: 0; }
|
|
12
12
|
& .board-col-title { font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
|
|
13
13
|
& .board-col-count { font-size: ${c.text.md}; color: ${c.fgMuted}; }
|
|
14
|
-
& .board-col-add { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-
|
|
14
|
+
& .board-col-add { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-inline-start: auto; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; }
|
|
15
15
|
& .board-col-add:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
|
|
16
16
|
& .board-col-body { display: flex; flex-direction: column; gap: ${c.space["2"]}; flex: 1; min-height: 48px; padding: ${c.space["1"]}; border-radius: ${c.radius.lg}; overflow-y: auto; transition: background 0.12s; }
|
|
17
17
|
& .board-col[data-over] .board-col-body { background: color-mix(in srgb, ${c.bgBrandSolid} 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgBrandSolid} 30%, transparent); }
|