@crisp-ui-kit/crisp 0.5.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/accordion.css +9 -1
- package/dist/appshell.css +12 -4
- package/dist/authshell.css +57 -0
- package/dist/authshell.d.ts +7 -0
- package/dist/avatargroup.css +2 -2
- package/dist/badge.css +4 -4
- package/dist/barchart.css +13 -5
- package/dist/board.css +9 -1
- package/dist/bulkbar.css +11 -3
- package/dist/button.css +15 -1
- package/dist/button.d.ts +2 -1
- package/dist/card.css +8 -0
- package/dist/checkbox.css +17 -1
- package/dist/cjs/components/accordion/accordion.js +69 -0
- package/dist/cjs/components/accordion/accordion.recipe.js +26 -0
- package/dist/cjs/components/accordion/index.js +7 -0
- package/dist/cjs/components/avatar/avatar.js +44 -0
- package/dist/cjs/components/avatar/avatar.recipe.js +42 -0
- package/dist/cjs/components/avatar/index.js +7 -0
- package/dist/cjs/components/avatargroup/avatargroup.js +52 -0
- package/dist/cjs/components/avatargroup/avatargroup.recipe.js +18 -0
- package/dist/cjs/components/avatargroup/index.js +7 -0
- package/dist/cjs/components/badge/badge.js +44 -0
- package/dist/cjs/components/badge/badge.recipe.js +68 -0
- package/dist/cjs/components/badge/index.js +7 -0
- package/dist/cjs/components/barchart/barchart.js +45 -0
- package/dist/cjs/components/barchart/barchart.recipe.js +34 -0
- package/dist/cjs/components/barchart/index.js +7 -0
- package/dist/cjs/components/breadcrumb/breadcrumb.js +53 -0
- package/dist/cjs/components/breadcrumb/breadcrumb.recipe.js +21 -0
- package/dist/cjs/components/breadcrumb/index.js +7 -0
- package/dist/cjs/components/bulkbar/bulkbar.js +53 -0
- package/dist/cjs/components/bulkbar/bulkbar.recipe.js +31 -0
- package/dist/cjs/components/bulkbar/index.js +8 -0
- package/dist/cjs/components/button/button.js +62 -0
- package/dist/cjs/components/button/button.recipe.js +58 -0
- package/dist/cjs/components/button/index.js +7 -0
- package/dist/cjs/components/callout/callout.js +25 -0
- package/dist/cjs/components/callout/callout.recipe.js +29 -0
- package/dist/cjs/components/callout/index.js +7 -0
- package/dist/cjs/components/card/card.js +54 -0
- package/dist/cjs/components/card/card.recipe.js +31 -0
- package/dist/cjs/components/card/index.js +10 -0
- package/dist/cjs/components/checkbox/checkbox.js +56 -0
- package/dist/cjs/components/checkbox/checkbox.recipe.js +34 -0
- package/dist/cjs/components/checkbox/index.js +7 -0
- package/dist/cjs/components/columncalc/columncalc.js +139 -0
- package/dist/cjs/components/columncalc/columncalc.recipe.js +33 -0
- package/dist/cjs/components/columncalc/index.js +10 -0
- package/dist/cjs/components/contextmenu/contextmenu.js +78 -0
- package/dist/cjs/components/contextmenu/contextmenu.recipe.js +24 -0
- package/dist/cjs/components/contextmenu/index.js +7 -0
- package/dist/cjs/components/datatable/datatable.js +508 -0
- package/dist/cjs/components/datatable/datatable.recipe.js +113 -0
- package/dist/cjs/components/datatable/index.js +7 -0
- package/dist/cjs/components/datepicker/datepicker.js +153 -0
- package/dist/cjs/components/datepicker/datepicker.recipe.js +190 -0
- package/dist/cjs/components/datepicker/index.js +19 -0
- package/dist/cjs/components/datepickerfield/datepickerfield.js +85 -0
- package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +44 -0
- package/dist/cjs/components/datepickerfield/index.js +7 -0
- package/dist/cjs/components/dialog/dialog.js +86 -0
- package/dist/cjs/components/dialog/dialog.recipe.js +35 -0
- package/dist/cjs/components/dialog/index.js +9 -0
- package/dist/cjs/components/divider/divider.js +10 -0
- package/dist/cjs/components/divider/divider.recipe.js +17 -0
- package/dist/cjs/components/divider/index.js +7 -0
- package/dist/cjs/components/donutchart/donutchart.js +41 -0
- package/dist/cjs/components/donutchart/donutchart.recipe.js +30 -0
- package/dist/cjs/components/donutchart/index.js +7 -0
- package/dist/cjs/components/drawer/drawer.js +80 -0
- package/dist/cjs/components/drawer/drawer.recipe.js +30 -0
- package/dist/cjs/components/drawer/index.js +9 -0
- package/dist/cjs/components/emptystate/emptystate.js +10 -0
- package/dist/cjs/components/emptystate/emptystate.recipe.js +34 -0
- package/dist/cjs/components/emptystate/index.js +7 -0
- package/dist/cjs/components/formfield/formfield.js +50 -0
- package/dist/cjs/components/formfield/formfield.recipe.js +22 -0
- package/dist/cjs/components/formfield/index.js +7 -0
- package/dist/cjs/components/input/index.js +7 -0
- package/dist/cjs/components/input/input.js +47 -0
- package/dist/cjs/components/input/input.recipe.js +59 -0
- package/dist/cjs/components/kbd/index.js +7 -0
- package/dist/cjs/components/kbd/kbd.js +44 -0
- package/dist/cjs/components/kbd/kbd.recipe.js +23 -0
- package/dist/cjs/components/linechart/index.js +7 -0
- package/dist/cjs/components/linechart/linechart.js +57 -0
- package/dist/cjs/components/linechart/linechart.recipe.js +35 -0
- package/dist/cjs/components/menu/index.js +14 -0
- package/dist/cjs/components/menu/menu-keyboard.js +117 -0
- package/dist/cjs/components/menu/menu.js +144 -0
- package/dist/cjs/components/menu/menu.recipe.js +54 -0
- package/dist/cjs/components/multiselect/index.js +7 -0
- package/dist/cjs/components/multiselect/multiselect.js +161 -0
- package/dist/cjs/components/multiselect/multiselect.recipe.js +71 -0
- package/dist/cjs/components/popover/index.js +7 -0
- package/dist/cjs/components/popover/popover.js +106 -0
- package/dist/cjs/components/popover/popover.recipe.js +21 -0
- package/dist/cjs/components/progress/index.js +7 -0
- package/dist/cjs/components/progress/progress.js +26 -0
- package/dist/cjs/components/progress/progress.recipe.js +20 -0
- package/dist/cjs/components/radiogroup/index.js +8 -0
- package/dist/cjs/components/radiogroup/radiogroup.js +83 -0
- package/dist/cjs/components/radiogroup/radiogroup.recipe.js +40 -0
- package/dist/cjs/components/resizablepanel/index.js +12 -0
- package/dist/cjs/components/resizablepanel/resizablepanel.js +176 -0
- package/dist/cjs/components/resizablepanel/resizablepanel.recipe.js +69 -0
- package/dist/cjs/components/segmented/index.js +7 -0
- package/dist/cjs/components/segmented/segmented.js +95 -0
- package/dist/cjs/components/segmented/segmented.recipe.js +23 -0
- package/dist/cjs/components/select/index.js +7 -0
- package/dist/cjs/components/select/select.js +180 -0
- package/dist/cjs/components/select/select.recipe.js +79 -0
- package/dist/cjs/components/skeleton/index.js +7 -0
- package/dist/cjs/components/skeleton/skeleton.js +13 -0
- package/dist/cjs/components/skeleton/skeleton.recipe.js +17 -0
- package/dist/cjs/components/spinner/index.js +7 -0
- package/dist/cjs/components/spinner/spinner.js +15 -0
- package/dist/cjs/components/spinner/spinner.recipe.js +16 -0
- package/dist/cjs/components/stagebar/index.js +7 -0
- package/dist/cjs/components/stagebar/stagebar.js +26 -0
- package/dist/cjs/components/stagebar/stagebar.recipe.js +17 -0
- package/dist/cjs/components/statcard/index.js +7 -0
- package/dist/cjs/components/statcard/statcard.js +15 -0
- package/dist/cjs/components/statcard/statcard.recipe.js +37 -0
- package/dist/cjs/components/switch/index.js +7 -0
- package/dist/cjs/components/switch/switch.js +58 -0
- package/dist/cjs/components/switch/switch.recipe.js +29 -0
- package/dist/cjs/components/table/index.js +14 -0
- package/dist/cjs/components/table/table.js +66 -0
- package/dist/cjs/components/table/table.recipe.js +43 -0
- package/dist/cjs/components/tabletoolbar/index.js +20 -0
- package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +84 -0
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +237 -0
- package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +26 -0
- package/dist/cjs/components/tabs/index.js +7 -0
- package/dist/cjs/components/tabs/tabs.js +106 -0
- package/dist/cjs/components/tabs/tabs.recipe.js +36 -0
- package/dist/cjs/components/textarea/index.js +7 -0
- package/dist/cjs/components/textarea/textarea.js +56 -0
- package/dist/cjs/components/textarea/textarea.recipe.js +46 -0
- package/dist/cjs/components/toast/index.js +8 -0
- package/dist/cjs/components/toast/toast.js +95 -0
- package/dist/cjs/components/toast/toast.recipe.js +31 -0
- package/dist/cjs/components/tooltip/index.js +7 -0
- package/dist/cjs/components/tooltip/tooltip.js +95 -0
- package/dist/cjs/components/tooltip/tooltip.recipe.js +16 -0
- package/dist/cjs/components/wheelpicker/index.js +7 -0
- package/dist/cjs/components/wheelpicker/wheelpicker.js +134 -0
- package/dist/cjs/components/wheelpicker/wheelpicker.recipe.js +95 -0
- package/dist/cjs/core/cx.js +8 -0
- package/dist/cjs/core/define.js +6 -0
- package/dist/cjs/core/index.js +11 -0
- package/dist/cjs/core/primitive.js +49 -0
- package/dist/cjs/core/resolve.js +44 -0
- package/dist/cjs/core/types.js +2 -0
- package/dist/cjs/index.js +92 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/product/appshell/appshell.js +104 -0
- package/dist/cjs/product/appshell/appshell.recipe.js +30 -0
- package/dist/cjs/product/appshell/index.js +7 -0
- package/dist/cjs/product/authshell/authshell.js +21 -0
- package/dist/cjs/product/authshell/authshell.recipe.js +67 -0
- package/dist/cjs/product/authshell/index.js +7 -0
- package/dist/cjs/product/board/board.js +78 -0
- package/dist/cjs/product/board/board.recipe.js +31 -0
- package/dist/cjs/product/board/index.js +7 -0
- package/dist/cjs/product/command/command.js +238 -0
- package/dist/cjs/product/command/command.recipe.js +47 -0
- package/dist/cjs/product/command/index.js +8 -0
- package/dist/cjs/product/entitycard/entitycard.js +14 -0
- package/dist/cjs/product/entitycard/entitycard.recipe.js +32 -0
- package/dist/cjs/product/entitycard/index.js +7 -0
- package/dist/cjs/product/flowcanvas/flowcanvas.js +121 -0
- package/dist/cjs/product/flowcanvas/flowcanvas.recipe.js +28 -0
- package/dist/cjs/product/flowcanvas/index.js +7 -0
- package/dist/cjs/product/inbox/inbox.js +16 -0
- package/dist/cjs/product/inbox/inbox.recipe.js +46 -0
- package/dist/cjs/product/inbox/index.js +7 -0
- package/dist/cjs/product/listpage/index.js +8 -0
- package/dist/cjs/product/listpage/listpage.js +25 -0
- package/dist/cjs/product/listpage/listpage.recipe.js +46 -0
- package/dist/cjs/product/navitem/index.js +5 -0
- package/dist/cjs/product/navitem/navitem.js +44 -0
- package/dist/cjs/product/navitem/navitem.recipe.js +36 -0
- package/dist/cjs/product/onboarding/index.js +7 -0
- package/dist/cjs/product/onboarding/onboarding.js +17 -0
- package/dist/cjs/product/onboarding/onboarding.recipe.js +44 -0
- package/dist/cjs/product/recordpage/index.js +7 -0
- package/dist/cjs/product/recordpage/recordpage.js +409 -0
- package/dist/cjs/product/recordpage/recordpage.recipe.js +162 -0
- package/dist/cjs/product/recordpanel/index.js +7 -0
- package/dist/cjs/product/recordpanel/recordpanel.js +83 -0
- package/dist/cjs/product/recordpanel/recordpanel.recipe.js +51 -0
- package/dist/cjs/product/recordstable/company-logos.js +29 -0
- package/dist/cjs/product/recordstable/index.js +10 -0
- package/dist/cjs/product/recordstable/recordstable.js +1092 -0
- package/dist/cjs/product/recordstable/recordstable.recipe.js +152 -0
- package/dist/cjs/product/recordstable/recordstable.tag.js +21 -0
- package/dist/cjs/product/richtext/index.js +7 -0
- package/dist/cjs/product/richtext/richtext.js +147 -0
- package/dist/cjs/product/richtext/richtext.recipe.js +43 -0
- package/dist/cjs/product/settingssection/index.js +7 -0
- package/dist/cjs/product/settingssection/settingssection.js +14 -0
- package/dist/cjs/product/settingssection/settingssection.recipe.js +23 -0
- package/dist/cjs/product/settingsshell/index.js +7 -0
- package/dist/cjs/product/settingsshell/settingsshell.js +59 -0
- package/dist/cjs/product/settingsshell/settingsshell.recipe.js +46 -0
- package/dist/cjs/product/sidebar/index.js +13 -0
- package/dist/cjs/product/sidebar/sidebar.js +148 -0
- package/dist/cjs/product/sidebar/sidebar.recipe.js +46 -0
- package/dist/cjs/product/tasklist/index.js +7 -0
- package/dist/cjs/product/tasklist/tasklist.js +19 -0
- package/dist/cjs/product/tasklist/tasklist.recipe.js +38 -0
- package/dist/cjs/product/trialbanner/index.js +7 -0
- package/dist/cjs/product/trialbanner/trialbanner.js +13 -0
- package/dist/cjs/product/trialbanner/trialbanner.recipe.js +32 -0
- package/dist/cjs/product/viewtoggle/index.js +7 -0
- package/dist/cjs/product/viewtoggle/viewtoggle.js +55 -0
- package/dist/cjs/product/viewtoggle/viewtoggle.recipe.js +27 -0
- package/dist/cjs/tokens/contract.js +21 -0
- package/dist/cjs/tokens/elevation.js +47 -0
- package/dist/cjs/tokens/index.js +18 -0
- package/dist/cjs/tokens/palette.js +63 -0
- package/dist/cjs/tokens/scale.js +70 -0
- package/dist/cjs/tokens/semantic.js +57 -0
- package/dist/columncalc.css +26 -0
- package/dist/columncalc.d.ts +7 -0
- package/dist/command.css +34 -1
- package/dist/contextmenu.css +10 -2
- package/dist/datatable.css +60 -14
- package/dist/datepicker.css +175 -19
- package/dist/datepicker.d.ts +2 -2
- package/dist/datepickerfield.css +27 -0
- package/dist/datepickerfield.d.ts +7 -0
- package/dist/dialog.css +10 -2
- package/dist/donutchart.css +8 -0
- package/dist/drawer.css +13 -5
- package/dist/entitycard.css +10 -2
- package/dist/esm/components/accordion/accordion.js +17 -16
- package/dist/esm/components/accordion/accordion.recipe.js +1 -1
- package/dist/esm/components/avatargroup/avatargroup.js +2 -2
- package/dist/esm/components/avatargroup/avatargroup.recipe.js +2 -2
- package/dist/esm/components/badge/badge.recipe.js +4 -4
- package/dist/esm/components/barchart/barchart.js +15 -2
- package/dist/esm/components/barchart/barchart.recipe.js +10 -5
- package/dist/esm/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/esm/components/bulkbar/bulkbar.js +2 -2
- package/dist/esm/components/bulkbar/bulkbar.recipe.js +4 -4
- package/dist/esm/components/button/button.js +13 -2
- package/dist/esm/components/button/button.recipe.js +20 -4
- package/dist/esm/components/callout/callout.js +2 -2
- package/dist/esm/components/checkbox/checkbox.recipe.js +9 -1
- package/dist/esm/components/columncalc/columncalc.js +100 -0
- package/dist/esm/components/columncalc/columncalc.recipe.js +30 -0
- package/dist/esm/components/columncalc/index.js +1 -0
- package/dist/esm/components/contextmenu/contextmenu.recipe.js +4 -4
- package/dist/esm/components/datatable/datatable.js +276 -49
- package/dist/esm/components/datatable/datatable.recipe.js +54 -16
- package/dist/esm/components/datepicker/datepicker.js +104 -53
- package/dist/esm/components/datepicker/datepicker.recipe.js +180 -25
- package/dist/esm/components/datepicker/index.js +1 -1
- package/dist/esm/components/datepickerfield/datepickerfield.js +49 -0
- package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +41 -0
- package/dist/esm/components/datepickerfield/index.js +2 -0
- package/dist/esm/components/dialog/dialog.js +2 -2
- package/dist/esm/components/dialog/dialog.recipe.js +4 -4
- package/dist/esm/components/divider/divider.js +2 -2
- package/dist/esm/components/donutchart/donutchart.js +2 -2
- package/dist/esm/components/drawer/drawer.js +2 -2
- package/dist/esm/components/drawer/drawer.recipe.js +6 -6
- package/dist/esm/components/emptystate/emptystate.js +2 -2
- package/dist/esm/components/formfield/formfield.js +2 -2
- package/dist/esm/components/input/input.js +6 -3
- package/dist/esm/components/input/input.recipe.js +38 -5
- package/dist/esm/components/linechart/linechart.js +15 -2
- package/dist/esm/components/linechart/linechart.recipe.js +10 -5
- package/dist/esm/components/menu/index.js +1 -0
- package/dist/esm/components/menu/menu-keyboard.js +80 -0
- package/dist/esm/components/menu/menu.js +27 -60
- package/dist/esm/components/menu/menu.recipe.js +5 -5
- package/dist/esm/components/multiselect/multiselect.js +10 -3
- package/dist/esm/components/multiselect/multiselect.recipe.js +8 -8
- package/dist/esm/components/popover/popover.js +2 -2
- package/dist/esm/components/popover/popover.recipe.js +2 -2
- package/dist/esm/components/progress/progress.js +3 -3
- package/dist/esm/components/radiogroup/radiogroup.js +2 -2
- package/dist/esm/components/radiogroup/radiogroup.recipe.js +1 -1
- package/dist/esm/components/resizablepanel/index.js +2 -0
- package/dist/esm/components/resizablepanel/resizablepanel.js +135 -0
- package/dist/esm/components/resizablepanel/resizablepanel.recipe.js +66 -0
- package/dist/esm/components/segmented/segmented.js +2 -2
- package/dist/esm/components/select/select.js +2 -2
- package/dist/esm/components/select/select.recipe.js +6 -6
- package/dist/esm/components/skeleton/skeleton.js +5 -2
- package/dist/esm/components/spinner/spinner.js +3 -2
- package/dist/esm/components/stagebar/stagebar.js +2 -2
- package/dist/esm/components/statcard/statcard.js +2 -2
- package/dist/esm/components/table/table.recipe.js +6 -6
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +3 -3
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +21 -13
- package/dist/esm/components/tabs/tabs.js +2 -2
- package/dist/esm/components/tabs/tabs.recipe.js +4 -4
- package/dist/esm/components/textarea/textarea.js +5 -5
- package/dist/esm/components/textarea/textarea.recipe.js +16 -4
- package/dist/esm/components/toast/toast.js +4 -4
- package/dist/esm/components/toast/toast.recipe.js +2 -2
- package/dist/esm/components/tooltip/tooltip.js +21 -7
- package/dist/esm/components/wheelpicker/index.js +2 -0
- package/dist/esm/components/wheelpicker/wheelpicker.js +98 -0
- package/dist/esm/components/wheelpicker/wheelpicker.recipe.js +92 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/product/appshell/appshell.js +33 -9
- package/dist/esm/product/appshell/appshell.recipe.js +4 -4
- package/dist/esm/product/authshell/authshell.js +18 -0
- package/dist/esm/product/authshell/authshell.recipe.js +64 -0
- package/dist/esm/product/authshell/index.js +2 -0
- package/dist/esm/product/board/board.js +2 -2
- package/dist/esm/product/board/board.recipe.js +1 -1
- package/dist/esm/product/command/command.js +19 -6
- package/dist/esm/product/command/command.recipe.js +27 -2
- package/dist/esm/product/entitycard/entitycard.js +2 -2
- package/dist/esm/product/entitycard/entitycard.recipe.js +2 -2
- package/dist/esm/product/flowcanvas/flowcanvas.js +4 -4
- package/dist/esm/product/inbox/inbox.recipe.js +1 -1
- package/dist/esm/product/listpage/listpage.recipe.js +3 -3
- package/dist/esm/product/navitem/navitem.recipe.js +13 -1
- package/dist/esm/product/onboarding/onboarding.js +2 -2
- package/dist/esm/product/onboarding/onboarding.recipe.js +2 -2
- package/dist/esm/product/recordpage/recordpage.js +133 -47
- package/dist/esm/product/recordpage/recordpage.recipe.js +19 -17
- package/dist/esm/product/recordpanel/recordpanel.js +4 -4
- package/dist/esm/product/recordpanel/recordpanel.recipe.js +12 -16
- package/dist/esm/product/recordstable/recordstable.js +157 -66
- package/dist/esm/product/recordstable/recordstable.recipe.js +23 -23
- package/dist/esm/product/recordstable/recordstable.tag.js +18 -0
- package/dist/esm/product/richtext/richtext.js +3 -3
- package/dist/esm/product/richtext/richtext.recipe.js +3 -3
- package/dist/esm/product/settingssection/settingssection.js +2 -2
- package/dist/esm/product/settingsshell/settingsshell.js +2 -2
- package/dist/esm/product/settingsshell/settingsshell.recipe.js +7 -2
- package/dist/esm/product/sidebar/sidebar.js +2 -2
- package/dist/esm/product/sidebar/sidebar.recipe.js +27 -2
- package/dist/esm/product/tasklist/tasklist.js +4 -4
- package/dist/esm/product/trialbanner/trialbanner.js +2 -2
- package/dist/esm/product/trialbanner/trialbanner.recipe.js +2 -2
- package/dist/esm/product/viewtoggle/viewtoggle.js +10 -2
- package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +1 -1
- package/dist/esm/tokens/elevation.js +44 -0
- package/dist/esm/tokens/index.js +1 -0
- package/dist/esm/tokens/palette.js +30 -0
- package/dist/esm/tokens/scale.js +7 -0
- package/dist/esm/tokens/semantic.js +24 -0
- package/dist/inbox.css +9 -1
- package/dist/input.css +32 -4
- package/dist/linechart.css +5 -5
- package/dist/listpage.css +11 -3
- package/dist/menu.css +11 -3
- package/dist/multiselect.css +14 -6
- package/dist/native/tokens.d.ts +16 -0
- package/dist/native/tokens.js +221 -0
- package/dist/navitem.css +21 -1
- package/dist/onboarding.css +10 -2
- package/dist/popover.css +8 -0
- package/dist/progress.css +8 -0
- package/dist/radiogroup.css +9 -1
- package/dist/recordpage.css +22 -12
- package/dist/recordpanel.css +25 -15
- package/dist/recordstable.css +37 -23
- package/dist/resizablepanel.css +53 -0
- package/dist/resizablepanel.d.ts +7 -0
- package/dist/richtext.css +11 -3
- package/dist/segmented.css +8 -0
- package/dist/select.css +12 -4
- package/dist/settingsshell.css +15 -2
- package/dist/sidebar.css +34 -1
- package/dist/skeleton.css +8 -0
- package/dist/spinner.css +8 -0
- package/dist/stagebar.css +8 -0
- package/dist/styles.css +2061 -1111
- package/dist/switch.css +8 -0
- package/dist/table.css +14 -6
- package/dist/tabletoolbar.css +8 -0
- package/dist/tabs.css +12 -4
- package/dist/tasklist.css +8 -0
- package/dist/textarea.css +23 -3
- package/dist/toast.css +10 -2
- package/dist/tokens.css +29 -0
- package/dist/tokens.json +217 -0
- package/dist/tooltip.css +8 -0
- package/dist/trialbanner.css +8 -0
- package/dist/types/components/accordion/accordion.d.ts +10 -8
- package/dist/types/components/avatargroup/avatargroup.d.ts +2 -2
- package/dist/types/components/barchart/barchart.d.ts +4 -2
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/types/components/bulkbar/bulkbar.d.ts +4 -2
- package/dist/types/components/button/button.d.ts +8 -0
- package/dist/types/components/button/button.recipe.d.ts +12 -0
- package/dist/types/components/callout/callout.d.ts +2 -2
- package/dist/types/components/columncalc/columncalc.d.ts +49 -0
- package/dist/types/components/columncalc/columncalc.recipe.d.ts +3 -0
- package/dist/types/components/columncalc/index.d.ts +1 -0
- package/dist/types/components/datatable/datatable.d.ts +58 -3
- package/dist/types/components/datepicker/datepicker.d.ts +41 -18
- package/dist/types/components/datepicker/datepicker.recipe.d.ts +25 -2
- package/dist/types/components/datepicker/index.d.ts +1 -1
- package/dist/types/components/datepickerfield/datepickerfield.d.ts +35 -0
- package/dist/types/components/datepickerfield/datepickerfield.recipe.d.ts +5 -0
- package/dist/types/components/datepickerfield/index.d.ts +2 -0
- package/dist/types/components/dialog/dialog.d.ts +3 -1
- package/dist/types/components/divider/divider.d.ts +2 -2
- package/dist/types/components/donutchart/donutchart.d.ts +2 -2
- package/dist/types/components/drawer/drawer.d.ts +3 -1
- package/dist/types/components/emptystate/emptystate.d.ts +2 -2
- package/dist/types/components/formfield/formfield.d.ts +7 -4
- package/dist/types/components/input/input.d.ts +8 -2
- package/dist/types/components/linechart/linechart.d.ts +4 -2
- package/dist/types/components/menu/index.d.ts +1 -0
- package/dist/types/components/menu/menu-keyboard.d.ts +33 -0
- package/dist/types/components/menu/menu.d.ts +7 -1
- package/dist/types/components/multiselect/multiselect.d.ts +8 -4
- package/dist/types/components/popover/popover.d.ts +4 -1
- package/dist/types/components/progress/progress.d.ts +2 -2
- package/dist/types/components/radiogroup/radiogroup.d.ts +2 -2
- package/dist/types/components/resizablepanel/index.d.ts +2 -0
- package/dist/types/components/resizablepanel/resizablepanel.d.ts +75 -0
- package/dist/types/components/resizablepanel/resizablepanel.recipe.d.ts +3 -0
- package/dist/types/components/segmented/segmented.d.ts +2 -2
- package/dist/types/components/select/select.d.ts +2 -2
- package/dist/types/components/skeleton/skeleton.d.ts +2 -2
- package/dist/types/components/spinner/spinner.d.ts +2 -2
- package/dist/types/components/stagebar/stagebar.d.ts +2 -2
- package/dist/types/components/statcard/statcard.d.ts +2 -2
- package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +28 -2
- package/dist/types/components/tabs/tabs.d.ts +2 -2
- package/dist/types/components/toast/toast.d.ts +7 -1
- package/dist/types/components/tooltip/tooltip.d.ts +8 -1
- package/dist/types/components/wheelpicker/index.d.ts +2 -0
- package/dist/types/components/wheelpicker/wheelpicker.d.ts +37 -0
- package/dist/types/components/wheelpicker/wheelpicker.recipe.d.ts +26 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/product/appshell/appshell.d.ts +16 -2
- package/dist/types/product/authshell/authshell.d.ts +28 -0
- package/dist/types/product/authshell/authshell.recipe.d.ts +3 -0
- package/dist/types/product/authshell/index.d.ts +2 -0
- package/dist/types/product/board/board.d.ts +2 -2
- package/dist/types/product/command/command.d.ts +25 -1
- package/dist/types/product/entitycard/entitycard.d.ts +2 -2
- package/dist/types/product/flowcanvas/flowcanvas.d.ts +9 -1
- package/dist/types/product/onboarding/onboarding.d.ts +7 -1
- package/dist/types/product/recordpage/recordpage.d.ts +65 -1
- package/dist/types/product/recordpanel/recordpanel.d.ts +8 -2
- package/dist/types/product/recordstable/recordstable.d.ts +90 -1
- package/dist/types/product/recordstable/recordstable.tag.d.ts +10 -0
- package/dist/types/product/richtext/richtext.d.ts +5 -1
- package/dist/types/product/settingssection/settingssection.d.ts +2 -2
- package/dist/types/product/settingsshell/settingsshell.d.ts +6 -2
- package/dist/types/product/sidebar/sidebar.d.ts +8 -0
- package/dist/types/product/tasklist/tasklist.d.ts +5 -1
- package/dist/types/product/trialbanner/trialbanner.d.ts +2 -2
- package/dist/types/product/viewtoggle/viewtoggle.d.ts +11 -5
- package/dist/types/tokens/contract.d.ts +14 -3
- package/dist/types/tokens/elevation.d.ts +44 -0
- package/dist/types/tokens/index.d.ts +1 -0
- package/dist/types/tokens/palette.d.ts +40 -0
- package/dist/types/tokens/scale.d.ts +7 -0
- package/dist/types/tokens/semantic.d.ts +19 -0
- package/dist/viewtoggle.css +9 -1
- package/dist/wheelpicker.css +68 -0
- package/dist/wheelpicker.d.ts +7 -0
- package/package.json +160 -68
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dialogRecipe = exports.DialogFooter = exports.DialogBody = exports.Dialog = void 0;
|
|
4
|
+
var dialog_1 = require("./dialog");
|
|
5
|
+
Object.defineProperty(exports, "Dialog", { enumerable: true, get: function () { return dialog_1.Dialog; } });
|
|
6
|
+
Object.defineProperty(exports, "DialogBody", { enumerable: true, get: function () { return dialog_1.DialogBody; } });
|
|
7
|
+
Object.defineProperty(exports, "DialogFooter", { enumerable: true, get: function () { return dialog_1.DialogFooter; } });
|
|
8
|
+
var dialog_recipe_1 = require("./dialog.recipe");
|
|
9
|
+
Object.defineProperty(exports, "dialogRecipe", { enumerable: true, get: function () { return dialog_recipe_1.dialogRecipe; } });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Divider = Divider;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const divider_recipe_1 = require("./divider.recipe");
|
|
6
|
+
/** A hairline separator over `borderSubtle`, horizontal or vertical. */
|
|
7
|
+
function Divider({ orientation = "horizontal", className, ...rest }) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("hr", { "aria-orientation": orientation, "data-orientation": orientation, className: (0, divider_recipe_1.dividerRecipe)({ className }), ...rest }));
|
|
9
|
+
}
|
|
10
|
+
Divider.displayName = "Divider";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dividerRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
// A hairline separator — horizontal (default) or vertical.
|
|
7
|
+
const config = (0, core_1.defineRecipe)({
|
|
8
|
+
name: "divider",
|
|
9
|
+
base: `flex-shrink: 0; border: none; margin: 0; background: ${tokens_1.contract.borderSubtle};
|
|
10
|
+
&[data-orientation="horizontal"] { width: 100%; height: 1px; }
|
|
11
|
+
&[data-orientation="vertical"] { width: 1px; align-self: stretch; min-height: 1em; }`,
|
|
12
|
+
variants: {},
|
|
13
|
+
defaultVariants: {},
|
|
14
|
+
compoundVariants: [],
|
|
15
|
+
});
|
|
16
|
+
exports.dividerRecipe = (0, core_1.resolveRecipe)(config);
|
|
17
|
+
exports.default = config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dividerRecipe = exports.Divider = void 0;
|
|
4
|
+
var divider_1 = require("./divider");
|
|
5
|
+
Object.defineProperty(exports, "Divider", { enumerable: true, get: function () { return divider_1.Divider; } });
|
|
6
|
+
var divider_recipe_1 = require("./divider.recipe");
|
|
7
|
+
Object.defineProperty(exports, "dividerRecipe", { enumerable: true, get: function () { return divider_recipe_1.dividerRecipe; } });
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DonutChart = DonutChart;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
const donutchart_recipe_1 = require("./donutchart.recipe");
|
|
7
|
+
// default categorical palette (matches the tag/avatar tones)
|
|
8
|
+
const PALETTE = [
|
|
9
|
+
tokens_1.contract.bgBrandSolid,
|
|
10
|
+
tokens_1.contract.bgCyan,
|
|
11
|
+
tokens_1.contract.bgPurple,
|
|
12
|
+
tokens_1.contract.bgOrange,
|
|
13
|
+
tokens_1.contract.bgSuccess,
|
|
14
|
+
tokens_1.contract.bgWarning,
|
|
15
|
+
tokens_1.contract.bgDanger,
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* A donut / ring chart — measured from Attio's Reports breakdown reports. SVG
|
|
19
|
+
* ring using the r=15.915 (circumference 100) trick so slices are percentages;
|
|
20
|
+
* a centred total and an optional legend. `role="img"` with a summary.
|
|
21
|
+
*/
|
|
22
|
+
function DonutChart({ data, size = 120, thickness = 14, centerValue, centerCaption, legend = true, format = (n) => n.toLocaleString(), "aria-label": ariaLabel, className, ...rest }) {
|
|
23
|
+
const total = data.reduce((s, d) => s + Math.max(0, d.value), 0);
|
|
24
|
+
const R = 15.915; // circumference ≈ 100
|
|
25
|
+
let cursor = 0;
|
|
26
|
+
const slices = data.map((d, i) => {
|
|
27
|
+
const pct = total > 0 ? (Math.max(0, d.value) / total) * 100 : 0;
|
|
28
|
+
const slice = {
|
|
29
|
+
...d,
|
|
30
|
+
color: d.color ?? PALETTE[i % PALETTE.length],
|
|
31
|
+
pct,
|
|
32
|
+
offset: 25 - cursor, // 25 = start at 12 o'clock, clockwise
|
|
33
|
+
};
|
|
34
|
+
cursor += pct;
|
|
35
|
+
return slice;
|
|
36
|
+
});
|
|
37
|
+
const summary = ariaLabel ??
|
|
38
|
+
`Donut chart: ${data.map((d) => `${d.label} ${format(d.value)}`).join(", ")}`;
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, donutchart_recipe_1.donutchartRecipe)({ className }), ...rest, role: "img", "aria-label": summary, children: [(0, jsx_runtime_1.jsxs)("div", { className: "donutchart-ring", style: { width: size, height: size }, children: [(0, jsx_runtime_1.jsxs)("svg", { className: "donutchart-svg", width: size, height: size, viewBox: "0 0 42 42", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("circle", { className: "donutchart-track", cx: 21, cy: 21, r: R, strokeWidth: (thickness / size) * 42 }), slices.map((s) => ((0, jsx_runtime_1.jsx)("circle", { className: "donutchart-seg", cx: 21, cy: 21, r: R, stroke: s.color, strokeWidth: (thickness / size) * 42, strokeDasharray: `${s.pct} ${100 - s.pct}`, strokeDashoffset: s.offset, children: (0, jsx_runtime_1.jsx)("title", { children: `${s.label}: ${format(s.value)}` }) }, s.label)))] }), (0, jsx_runtime_1.jsxs)("div", { className: "donutchart-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "donutchart-total", children: centerValue ?? format(total) }), centerCaption != null && ((0, jsx_runtime_1.jsx)("span", { className: "donutchart-caption", children: centerCaption }))] })] }), legend && ((0, jsx_runtime_1.jsx)("div", { className: "donutchart-legend", children: slices.map((s) => ((0, jsx_runtime_1.jsxs)("span", { className: "donutchart-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "donutchart-swatch", style: { background: s.color } }), (0, jsx_runtime_1.jsx)("span", { className: "donutchart-name", children: s.label }), (0, jsx_runtime_1.jsx)("span", { className: "donutchart-val", children: format(s.value) })] }, s.label))) }))] }));
|
|
40
|
+
}
|
|
41
|
+
DonutChart.displayName = "DonutChart";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.donutchartRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
// A donut / ring chart — measured from Attio's Reports breakdown reports: a
|
|
7
|
+
// segmented ring with a centred total, plus a legend of coloured swatches with
|
|
8
|
+
// labels and values. Pure SVG ring; HTML legend.
|
|
9
|
+
const config = (0, core_1.defineRecipe)({
|
|
10
|
+
name: "donutchart",
|
|
11
|
+
base: `display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["4"]}; box-sizing: border-box; font-family: ${tokens_1.contract.font.sans};
|
|
12
|
+
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
13
|
+
& .donutchart-ring { position: relative; flex-shrink: 0; }
|
|
14
|
+
& .donutchart-svg { display: block; }
|
|
15
|
+
& .donutchart-seg { fill: none; transition: stroke-dasharray 0.3s ease; }
|
|
16
|
+
& .donutchart-track { fill: none; stroke: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); }
|
|
17
|
+
& .donutchart-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
|
|
18
|
+
& .donutchart-total { font-size: ${tokens_1.contract.text.xl}; font-weight: ${tokens_1.contract.weight.semibold}; letter-spacing: -0.3px; color: ${tokens_1.contract.fgPrimary}; }
|
|
19
|
+
& .donutchart-caption { font-size: ${tokens_1.contract.text.xs}; color: ${tokens_1.contract.fgMuted}; }
|
|
20
|
+
& .donutchart-legend { display: flex; flex-direction: column; gap: ${tokens_1.contract.space["1.5"]}; min-width: 0; }
|
|
21
|
+
& .donutchart-item { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; font-size: ${tokens_1.contract.text.md}; color: ${tokens_1.contract.fgPrimary}; }
|
|
22
|
+
& .donutchart-swatch { width: 10px; height: 10px; flex-shrink: 0; border-radius: 3px; }
|
|
23
|
+
& .donutchart-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${tokens_1.contract.fgMuted}; }
|
|
24
|
+
& .donutchart-val { flex-shrink: 0; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgPrimary}; }`,
|
|
25
|
+
variants: {},
|
|
26
|
+
defaultVariants: {},
|
|
27
|
+
compoundVariants: [],
|
|
28
|
+
});
|
|
29
|
+
exports.donutchartRecipe = (0, core_1.resolveRecipe)(config);
|
|
30
|
+
exports.default = config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.donutchartRecipe = exports.DonutChart = void 0;
|
|
4
|
+
var donutchart_1 = require("./donutchart");
|
|
5
|
+
Object.defineProperty(exports, "DonutChart", { enumerable: true, get: function () { return donutchart_1.DonutChart; } });
|
|
6
|
+
var donutchart_recipe_1 = require("./donutchart.recipe");
|
|
7
|
+
Object.defineProperty(exports, "donutchartRecipe", { enumerable: true, get: function () { return donutchart_recipe_1.donutchartRecipe; } });
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Drawer = Drawer;
|
|
37
|
+
exports.DrawerBody = DrawerBody;
|
|
38
|
+
exports.DrawerFooter = DrawerFooter;
|
|
39
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
|
+
const dialog = __importStar(require("@zag-js/dialog"));
|
|
41
|
+
const react_1 = require("@zag-js/react");
|
|
42
|
+
const lucide_react_1 = require("lucide-react");
|
|
43
|
+
const React = __importStar(require("react"));
|
|
44
|
+
const drawer_recipe_1 = require("./drawer.recipe");
|
|
45
|
+
let instanceCounter = 0;
|
|
46
|
+
function useDrawerInstanceId() {
|
|
47
|
+
const idRef = React.useRef(null);
|
|
48
|
+
if (idRef.current == null) {
|
|
49
|
+
instanceCounter += 1;
|
|
50
|
+
idRef.current = `crisp-drawer-${instanceCounter}`;
|
|
51
|
+
}
|
|
52
|
+
return idRef.current;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A side sheet — composes Zag's dialog machine (focus trap, scroll lock,
|
|
56
|
+
* Escape / outside-click dismissal) with a panel that slides in from the edge.
|
|
57
|
+
* Compose the body with `DrawerBody` and actions with `DrawerFooter`.
|
|
58
|
+
*/
|
|
59
|
+
function Drawer({ open, onOpenChange, side = "right", title, icon, "aria-label": ariaLabel, closeLabel = "Close", children, }) {
|
|
60
|
+
const id = useDrawerInstanceId();
|
|
61
|
+
const service = (0, react_1.useMachine)(dialog.machine, {
|
|
62
|
+
id,
|
|
63
|
+
open,
|
|
64
|
+
onOpenChange(details) {
|
|
65
|
+
onOpenChange(details.open);
|
|
66
|
+
},
|
|
67
|
+
"aria-label": typeof title === "string" ? title : ariaLabel,
|
|
68
|
+
});
|
|
69
|
+
const api = dialog.connect(service, react_1.normalizeProps);
|
|
70
|
+
if (!api.open)
|
|
71
|
+
return null;
|
|
72
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Portal, { children: (0, jsx_runtime_1.jsxs)("div", { className: (0, drawer_recipe_1.drawerRecipe)(), children: [(0, jsx_runtime_1.jsx)("div", { ...api.getBackdropProps(), className: "drawer-backdrop" }), (0, jsx_runtime_1.jsx)("div", { ...api.getPositionerProps(), className: "drawer-positioner", "data-side": side, children: (0, jsx_runtime_1.jsxs)("div", { ...api.getContentProps(), className: "drawer-content", children: [title != null && ((0, jsx_runtime_1.jsxs)("div", { className: "drawer-header", children: [icon, (0, jsx_runtime_1.jsx)("span", { ...api.getTitleProps(), className: "drawer-title", children: title }), (0, jsx_runtime_1.jsx)("button", { type: "button", ...api.getCloseTriggerProps(), className: "drawer-close", "aria-label": closeLabel, children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })] })), children] }) })] }) }));
|
|
73
|
+
}
|
|
74
|
+
Drawer.displayName = "Drawer";
|
|
75
|
+
function DrawerBody({ children }) {
|
|
76
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "drawer-body", children: children });
|
|
77
|
+
}
|
|
78
|
+
function DrawerFooter({ children }) {
|
|
79
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "drawer-footer", children: children });
|
|
80
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.drawerRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
// A side sheet — a focus-trapped panel that slides in from the right or left,
|
|
7
|
+
// over a scrim. Shares the Dialog header/body/footer language.
|
|
8
|
+
const config = (0, core_1.defineRecipe)({
|
|
9
|
+
name: "drawer",
|
|
10
|
+
base: `display: contents; font-family: ${tokens_1.contract.font.sans};
|
|
11
|
+
& .drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 18%, transparent); opacity: 1; transition: opacity 0.2s ease; @starting-style { opacity: 0; } }
|
|
12
|
+
& .drawer-positioner { position: fixed; inset: 0; z-index: 61; display: flex; box-sizing: border-box; padding: ${tokens_1.contract.space["2"]}; }
|
|
13
|
+
& .drawer-positioner[data-side="right"] { justify-content: flex-end; }
|
|
14
|
+
& .drawer-positioner[data-side="left"] { justify-content: flex-start; }
|
|
15
|
+
& .drawer-content { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; position: relative; display: flex; flex-direction: column; box-sizing: border-box; overflow: hidden; width: 420px; max-width: 100%; height: 100%; background: ${tokens_1.contract.bgSurface}; border-radius: ${tokens_1.contract.radius.xl}; box-shadow: ${tokens_1.elevation.floating}; transform: none; transition: transform 0.24s cubic-bezier(.32,.72,0,1); }
|
|
16
|
+
& .drawer-positioner[data-side="right"] .drawer-content { @starting-style { transform: translateX(calc(100% + ${tokens_1.contract.space["2"]})); } }
|
|
17
|
+
& .drawer-positioner[data-side="left"] .drawer-content { @starting-style { transform: translateX(calc(-100% - ${tokens_1.contract.space["2"]})); } }
|
|
18
|
+
& .drawer-header { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; flex-shrink: 0; height: 52px; padding: 0 ${tokens_1.contract.space["2"]} 0 ${tokens_1.contract.space["4"]}; border-bottom: 1px solid ${tokens_1.contract.borderSubtle}; }
|
|
19
|
+
& .drawer-header svg { flex-shrink: 0; color: ${tokens_1.contract.fgMuted}; }
|
|
20
|
+
& .drawer-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.semibold}; color: ${tokens_1.contract.fgPrimary}; }
|
|
21
|
+
& .drawer-close { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; margin: 0; padding: 0; border: none; border-radius: ${tokens_1.contract.radius.md}; background: none; color: ${tokens_1.contract.fgMuted}; font-family: inherit; cursor: pointer; }
|
|
22
|
+
& .drawer-close:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
23
|
+
& .drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: ${tokens_1.contract.space["4"]}; }
|
|
24
|
+
& .drawer-footer { display: flex; align-items: center; justify-content: flex-end; gap: ${tokens_1.contract.space["3"]}; flex-shrink: 0; min-height: 56px; padding: 0 ${tokens_1.contract.space["4"]}; border-top: 1px solid ${tokens_1.contract.borderSubtle}; }`,
|
|
25
|
+
variants: {},
|
|
26
|
+
defaultVariants: {},
|
|
27
|
+
compoundVariants: [],
|
|
28
|
+
});
|
|
29
|
+
exports.drawerRecipe = (0, core_1.resolveRecipe)(config);
|
|
30
|
+
exports.default = config;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.drawerRecipe = exports.DrawerFooter = exports.DrawerBody = exports.Drawer = void 0;
|
|
4
|
+
var drawer_1 = require("./drawer");
|
|
5
|
+
Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return drawer_1.Drawer; } });
|
|
6
|
+
Object.defineProperty(exports, "DrawerBody", { enumerable: true, get: function () { return drawer_1.DrawerBody; } });
|
|
7
|
+
Object.defineProperty(exports, "DrawerFooter", { enumerable: true, get: function () { return drawer_1.DrawerFooter; } });
|
|
8
|
+
var drawer_recipe_1 = require("./drawer.recipe");
|
|
9
|
+
Object.defineProperty(exports, "drawerRecipe", { enumerable: true, get: function () { return drawer_recipe_1.drawerRecipe; } });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmptyState = EmptyState;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const emptystate_recipe_1 = require("./emptystate.recipe");
|
|
6
|
+
/** A centred empty-state panel — icon, title, description, optional action. */
|
|
7
|
+
function EmptyState({ icon, title, description, action, variant, className, ...rest }) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, emptystate_recipe_1.emptystateRecipe)({ variant, className }), ...rest, children: [icon && (0, jsx_runtime_1.jsx)("span", { className: "emptystate-icon", children: icon }), (0, jsx_runtime_1.jsx)("div", { className: "emptystate-title", children: title }), description != null && ((0, jsx_runtime_1.jsx)("div", { className: "emptystate-desc", children: description })), action && (0, jsx_runtime_1.jsx)("div", { className: "emptystate-action", children: action })] }));
|
|
9
|
+
}
|
|
10
|
+
EmptyState.displayName = "EmptyState";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptystateRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
// An empty-state panel — icon + title + description + optional action.
|
|
7
|
+
const config = (0, core_1.defineRecipe)({
|
|
8
|
+
name: "emptystate",
|
|
9
|
+
base: `display: flex; flex-direction: column; align-items: center; justify-content: center; gap: ${tokens_1.contract.space["1.5"]}; box-sizing: border-box; padding: ${tokens_1.contract.space["8"]} ${tokens_1.contract.space["4"]}; text-align: center; font-family: ${tokens_1.contract.font.sans};
|
|
10
|
+
& .emptystate-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.xl}; background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 5%, transparent); color: ${tokens_1.contract.fgMuted}; }
|
|
11
|
+
& .emptystate-title { font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.semibold}; color: ${tokens_1.contract.fgPrimary}; }
|
|
12
|
+
& .emptystate-desc { max-width: 320px; font-size: ${tokens_1.contract.text.md}; color: ${tokens_1.contract.fgMuted}; }
|
|
13
|
+
& .emptystate-action { margin-top: ${tokens_1.contract.space["2"]}; }`,
|
|
14
|
+
variants: {
|
|
15
|
+
variant: {
|
|
16
|
+
// compact icon tile (default)
|
|
17
|
+
default: ``,
|
|
18
|
+
// a large icon on a dotted-grid backdrop — Attio's Developers/Reports empty state
|
|
19
|
+
illustrated: `& .emptystate-icon { width: 132px; height: 96px; margin-bottom: ${tokens_1.contract.space["2"]}; border-radius: 0; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 22%, transparent); background: radial-gradient(circle, color-mix(in srgb, ${tokens_1.contract.fgPrimary} 12%, transparent) 1.2px, transparent 1.2px) 0 0 / 16px 16px; }`,
|
|
20
|
+
// Attio's full-view empty state (measured from a filtered-to-zero records table):
|
|
21
|
+
// a 45px ringed circle icon, a 20/24 semibold heading, a 14/20 medium muted body,
|
|
22
|
+
// then a primary action. Gaps are 16 / 8 / 16 (icon→title→desc→action).
|
|
23
|
+
page: `gap: ${tokens_1.contract.space["2"]};
|
|
24
|
+
& .emptystate-icon { width: 45px; height: 45px; margin-bottom: ${tokens_1.contract.space["2"]}; border-radius: ${tokens_1.contract.radius.full}; border: 1px solid ${tokens_1.contract.borderSubtle}; background: none; color: ${tokens_1.contract.fgMuted}; }
|
|
25
|
+
& .emptystate-title { font-size: 20px; line-height: 24px; }
|
|
26
|
+
& .emptystate-desc { max-width: 266px; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; line-height: 20px; }
|
|
27
|
+
& .emptystate-action { margin-top: ${tokens_1.contract.space["2"]}; }`,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: { variant: "default" },
|
|
31
|
+
compoundVariants: [],
|
|
32
|
+
});
|
|
33
|
+
exports.emptystateRecipe = (0, core_1.resolveRecipe)(config);
|
|
34
|
+
exports.default = config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptystateRecipe = exports.EmptyState = void 0;
|
|
4
|
+
var emptystate_1 = require("./emptystate");
|
|
5
|
+
Object.defineProperty(exports, "EmptyState", { enumerable: true, get: function () { return emptystate_1.EmptyState; } });
|
|
6
|
+
var emptystate_recipe_1 = require("./emptystate.recipe");
|
|
7
|
+
Object.defineProperty(exports, "emptystateRecipe", { enumerable: true, get: function () { return emptystate_recipe_1.emptystateRecipe; } });
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.FormField = FormField;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const formfield_recipe_1 = require("./formfield.recipe");
|
|
40
|
+
/**
|
|
41
|
+
* A labelled form field — measured from Attio's Settings forms. A muted label
|
|
42
|
+
* above any control, with an optional description or error line below. When
|
|
43
|
+
* `error` is set, it replaces the description and gets `aria-describedby` wiring.
|
|
44
|
+
*/
|
|
45
|
+
function FormField({ label, htmlFor, required, optional, description, error, children, className, ...rest }) {
|
|
46
|
+
const descId = React.useId();
|
|
47
|
+
const hasMsg = error != null || description != null;
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, formfield_recipe_1.formfieldRecipe)({ className }), ...rest, children: [(0, jsx_runtime_1.jsxs)("label", { className: "formfield-label", htmlFor: htmlFor, children: [label, required && ((0, jsx_runtime_1.jsx)("span", { className: "formfield-required", "aria-hidden": "true", children: "*" })), optional && !required && ((0, jsx_runtime_1.jsx)("span", { className: "formfield-optional", children: optional === true ? "(optional)" : optional }))] }), children, error != null ? ((0, jsx_runtime_1.jsx)("span", { className: "formfield-error", id: hasMsg ? descId : undefined, children: error })) : description != null ? ((0, jsx_runtime_1.jsx)("span", { className: "formfield-desc", id: hasMsg ? descId : undefined, children: description })) : null] }));
|
|
49
|
+
}
|
|
50
|
+
FormField.displayName = "FormField";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formfieldRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
// A labelled form field — measured from Attio's Settings forms: a 12px/500 muted
|
|
7
|
+
// label above the control, with an optional description or danger error line
|
|
8
|
+
// below. Wraps any control (Input, Select, Textarea…).
|
|
9
|
+
const config = (0, core_1.defineRecipe)({
|
|
10
|
+
name: "formfield",
|
|
11
|
+
base: `display: flex; flex-direction: column; gap: ${tokens_1.contract.space["1.5"]}; box-sizing: border-box; font-family: ${tokens_1.contract.font.sans};
|
|
12
|
+
& .formfield-label { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgMuted}; }
|
|
13
|
+
& .formfield-required { color: ${tokens_1.contract.bgDanger}; }
|
|
14
|
+
& .formfield-optional { color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 40%, transparent); font-weight: ${tokens_1.contract.weight.regular}; }
|
|
15
|
+
& .formfield-desc { font-size: ${tokens_1.contract.text.sm}; line-height: 16px; color: ${tokens_1.contract.fgMuted}; }
|
|
16
|
+
& .formfield-error { font-size: ${tokens_1.contract.text.sm}; line-height: 16px; color: ${tokens_1.contract.bgDanger}; }`,
|
|
17
|
+
variants: {},
|
|
18
|
+
defaultVariants: {},
|
|
19
|
+
compoundVariants: [],
|
|
20
|
+
});
|
|
21
|
+
exports.formfieldRecipe = (0, core_1.resolveRecipe)(config);
|
|
22
|
+
exports.default = config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formfieldRecipe = exports.FormField = void 0;
|
|
4
|
+
var formfield_1 = require("./formfield");
|
|
5
|
+
Object.defineProperty(exports, "FormField", { enumerable: true, get: function () { return formfield_1.FormField; } });
|
|
6
|
+
var formfield_recipe_1 = require("./formfield.recipe");
|
|
7
|
+
Object.defineProperty(exports, "formfieldRecipe", { enumerable: true, get: function () { return formfield_recipe_1.formfieldRecipe; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inputRecipe = exports.Input = void 0;
|
|
4
|
+
var input_1 = require("./input");
|
|
5
|
+
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return input_1.Input; } });
|
|
6
|
+
var input_recipe_1 = require("./input.recipe");
|
|
7
|
+
Object.defineProperty(exports, "inputRecipe", { enumerable: true, get: function () { return input_recipe_1.inputRecipe; } });
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Input = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const input_recipe_1 = require("./input.recipe");
|
|
40
|
+
exports.Input = React.forwardRef(({ size, invalid, className, style, ...props }, ref) => {
|
|
41
|
+
// The wrapper exists only to host the ::after focus ring — an <input> is a
|
|
42
|
+
// replaced element and cannot have one. Everything the consumer passes
|
|
43
|
+
// still lands on the <input> itself, so `id`, `name`, `onChange`, form
|
|
44
|
+
// association and every native attribute behave exactly as before.
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)("span", { className: (0, input_recipe_1.inputRecipe)({ size, invalid, className }), style: style, children: (0, jsx_runtime_1.jsx)("input", { ref: ref, className: "input-value", "aria-invalid": invalid === true || undefined, ...props }) }));
|
|
46
|
+
});
|
|
47
|
+
exports.Input.displayName = "Input";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inputRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
// Geometry is Attio's, measured: 32/36px tall, r8/r10, 10/12px side padding.
|
|
7
|
+
// The FOCUS TREATMENT is seed-design's, measured from @seed-design/css: a 2px
|
|
8
|
+
// ring on an ::after overlay that is present-but-transparent at rest, so
|
|
9
|
+
// focusing cannot shift layout the way a width change would, and animates
|
|
10
|
+
// `border-color` over 100ms. The ring colour is a high-contrast neutral rather
|
|
11
|
+
// than the brand hue — it reads as "this field has focus", not as a state.
|
|
12
|
+
//
|
|
13
|
+
// The ring needs the ::after, and ::after needs a non-replaced element, so
|
|
14
|
+
// Input renders a wrapper around the <input>. The wrapper is presentational:
|
|
15
|
+
// every consumer prop still goes to the <input>, which is what `id`, `name`,
|
|
16
|
+
// `onChange` and form semantics require.
|
|
17
|
+
const config = (0, core_1.defineRecipe)({
|
|
18
|
+
name: "input",
|
|
19
|
+
base: `
|
|
20
|
+
position: relative; box-sizing: border-box; display: inline-flex; align-items: center;
|
|
21
|
+
width: 100%; background: ${tokens_1.contract.bgSurface}; box-shadow: ${tokens_1.elevation.field};
|
|
22
|
+
font-family: ${tokens_1.contract.font.sans}; font-size: ${tokens_1.contract.text.lg}; line-height: 20px;
|
|
23
|
+
|
|
24
|
+
&::after {
|
|
25
|
+
content: ""; position: absolute; inset: 0; border-radius: inherit;
|
|
26
|
+
border: 2px solid transparent; transition: border-color .1s ease;
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
}
|
|
29
|
+
&:focus-within::after { border-color: ${tokens_1.contract.strokeFieldFocus}; }
|
|
30
|
+
|
|
31
|
+
& .input-value {
|
|
32
|
+
box-sizing: border-box; flex: 1 1 auto; min-width: 0; width: 100%;
|
|
33
|
+
align-self: stretch; margin: 0; border: none; background: none; outline: none;
|
|
34
|
+
font: inherit; color: ${tokens_1.contract.fgPrimary};
|
|
35
|
+
}
|
|
36
|
+
& .input-value::placeholder { color: ${tokens_1.contract.fgMuted}; }
|
|
37
|
+
& .input-value:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
38
|
+
&:has(.input-value:disabled) { opacity: 1; }
|
|
39
|
+
`,
|
|
40
|
+
variants: {
|
|
41
|
+
size: {
|
|
42
|
+
medium: `height: 32px; border-radius: ${tokens_1.contract.radius.md}; & .input-value { padding-inline: ${tokens_1.contract.space["2.5"]}; }`,
|
|
43
|
+
large: `height: 36px; border-radius: 10px; & .input-value { padding-inline: ${tokens_1.contract.space["3"]}; }`,
|
|
44
|
+
},
|
|
45
|
+
invalid: {
|
|
46
|
+
// critical outranks focus: a field that is wrong stays visibly wrong
|
|
47
|
+
// while you are correcting it, which is seed's behaviour too
|
|
48
|
+
true: `&::after { border-color: ${tokens_1.contract.bgDanger}; } &:focus-within::after { border-color: ${tokens_1.contract.bgDanger}; }`,
|
|
49
|
+
false: ``,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: { size: "medium", invalid: false },
|
|
53
|
+
compoundVariants: [],
|
|
54
|
+
});
|
|
55
|
+
exports.inputRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
|
|
56
|
+
config,
|
|
57
|
+
meta: { medium: { height: "32px", borderRadius: "8px", fontSize: "14px" } },
|
|
58
|
+
});
|
|
59
|
+
exports.default = config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.kbdRecipe = exports.Kbd = void 0;
|
|
4
|
+
var kbd_1 = require("./kbd");
|
|
5
|
+
Object.defineProperty(exports, "Kbd", { enumerable: true, get: function () { return kbd_1.Kbd; } });
|
|
6
|
+
var kbd_recipe_1 = require("./kbd.recipe");
|
|
7
|
+
Object.defineProperty(exports, "kbdRecipe", { enumerable: true, get: function () { return kbd_recipe_1.kbdRecipe; } });
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Kbd = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const core_1 = require("../../core");
|
|
40
|
+
const kbd_recipe_1 = require("./kbd.recipe");
|
|
41
|
+
exports.Kbd = React.forwardRef(({ className, asChild, ...props }, ref) => {
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(core_1.Primitive.span, { ref: ref, asChild: asChild, className: (0, kbd_recipe_1.kbdRecipe)({ className }), ...props }));
|
|
43
|
+
});
|
|
44
|
+
exports.Kbd.displayName = "Kbd";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.kbdRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
const config = (0, core_1.defineRecipe)({
|
|
7
|
+
name: "kbd",
|
|
8
|
+
base: `box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: ${tokens_1.contract.space["0.5"]}; min-width: 20px; height: 20px; padding-inline: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.sm}; font-family: ${tokens_1.contract.font.sans}; font-size: ${tokens_1.contract.text.xs}; font-weight: ${tokens_1.contract.weight.regular}; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 50%, transparent); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent);`,
|
|
9
|
+
variants: {},
|
|
10
|
+
defaultVariants: {},
|
|
11
|
+
compoundVariants: [],
|
|
12
|
+
});
|
|
13
|
+
exports.kbdRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
|
|
14
|
+
config,
|
|
15
|
+
meta: {
|
|
16
|
+
chip: {
|
|
17
|
+
height: "20px",
|
|
18
|
+
borderRadius: "6px",
|
|
19
|
+
fontSize: "11px",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
exports.default = config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.linechartRecipe = exports.LineChart = void 0;
|
|
4
|
+
var linechart_1 = require("./linechart");
|
|
5
|
+
Object.defineProperty(exports, "LineChart", { enumerable: true, get: function () { return linechart_1.LineChart; } });
|
|
6
|
+
var linechart_recipe_1 = require("./linechart.recipe");
|
|
7
|
+
Object.defineProperty(exports, "linechartRecipe", { enumerable: true, get: function () { return linechart_recipe_1.linechartRecipe; } });
|