@crewlethq/ui 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1714 -14
- package/dist/Accordion/Accordion.d.ts +54 -0
- package/dist/Accordion/index.d.ts +4 -0
- package/dist/Accordion/index.js +6 -0
- package/dist/Accordion-ZI2WLD5C.css +87 -0
- package/dist/AddPill/AddPill.d.ts +114 -0
- package/dist/AddPill/index.d.ts +3 -0
- package/dist/AddPill/index.js +3 -0
- package/dist/AddPill-DFWXYLIQ.css +434 -0
- package/dist/Announcer/Announcer.d.ts +15 -0
- package/dist/Announcer/index.d.ts +2 -0
- package/dist/Announcer/index.js +3 -0
- package/dist/AppShell/AppShell.d.ts +193 -0
- package/dist/AppShell/index.d.ts +3 -0
- package/dist/AppShell/index.js +6 -0
- package/dist/AppShell-NVE6LHNI.css +395 -0
- package/dist/Avatar/Avatar.d.ts +104 -0
- package/dist/Avatar/index.d.ts +3 -0
- package/dist/Avatar/index.js +2 -0
- package/dist/Avatar-P2KRQM2B.css +156 -0
- package/dist/BrandLockup/BrandLockup.d.ts +41 -0
- package/dist/BrandLockup/index.d.ts +3 -0
- package/dist/BrandLockup/index.js +2 -0
- package/dist/BrandLockup-6ISDEHPJ.css +108 -0
- package/dist/Button/Button.d.ts +88 -0
- package/dist/Button/index.d.ts +3 -0
- package/dist/Button/index.js +3 -0
- package/dist/Button-D4J6B4MA.css +302 -0
- package/dist/CalendarGrid/CalendarGrid.d.ts +87 -0
- package/dist/CalendarGrid/index.d.ts +3 -0
- package/dist/CalendarGrid/index.js +2 -0
- package/dist/CalendarGrid-V6TQ5QKS.css +128 -0
- package/dist/Callout/Callout.d.ts +47 -0
- package/dist/Callout/index.d.ts +3 -0
- package/dist/Callout/index.js +2 -0
- package/dist/Callout-S7QDWHDL.css +111 -0
- package/dist/Canvas/Canvas.d.ts +234 -0
- package/dist/Canvas/geometry.d.ts +249 -0
- package/dist/Canvas/index.d.ts +5 -0
- package/dist/Canvas/index.js +8 -0
- package/dist/Canvas/layerNode.d.ts +20 -0
- package/dist/Canvas-Q6JETCWR.css +315 -0
- package/dist/Card/Card.d.ts +142 -0
- package/dist/Card/headerSlot.d.ts +65 -0
- package/dist/Card/index.d.ts +5 -0
- package/dist/Card/index.js +6 -0
- package/dist/Card-AHX3Q2JD.css +428 -0
- package/dist/Charts/ActivityStrip.d.ts +45 -0
- package/dist/Charts/BarList.d.ts +51 -0
- package/dist/Charts/Legend.d.ts +32 -0
- package/dist/Charts/StackedBar.d.ts +38 -0
- package/dist/Charts/TimeSeries.d.ts +92 -0
- package/dist/Charts/dataColor.d.ts +20 -0
- package/dist/Charts/index.d.ts +12 -0
- package/dist/Charts/index.js +3 -0
- package/dist/Charts-D7G2BSXH.css +277 -0
- package/dist/Checkbox/Checkbox.d.ts +45 -0
- package/dist/Checkbox/index.d.ts +3 -0
- package/dist/Checkbox/index.js +2 -0
- package/dist/Checkbox-VGW26YLQ.css +111 -0
- package/dist/CodeBlock/CodeBlock.d.ts +60 -0
- package/dist/CodeBlock/index.d.ts +3 -0
- package/dist/CodeBlock/index.js +7 -0
- package/dist/CodeBlock-U2W6NNVC.css +153 -0
- package/dist/Combobox/Combobox.d.ts +89 -0
- package/dist/Combobox/index.d.ts +3 -0
- package/dist/Combobox/index.js +8 -0
- package/dist/Combobox-4FUVYIE7.css +80 -0
- package/dist/CommandPalette/CommandPalette.d.ts +77 -0
- package/dist/CommandPalette/index.d.ts +3 -0
- package/dist/CommandPalette/index.js +11 -0
- package/dist/CommandPalette-CSJDUCQA.css +115 -0
- package/dist/Container/Container.d.ts +17 -0
- package/dist/Container/index.d.ts +3 -0
- package/dist/Container/index.js +2 -0
- package/dist/Container-3TSKMGNI.css +52 -0
- package/dist/Copyable/CopyButton.d.ts +54 -0
- package/dist/Copyable/Copyable.d.ts +34 -0
- package/dist/Copyable/index.d.ts +5 -0
- package/dist/Copyable/index.js +6 -0
- package/dist/Copyable-5PNRFOLS.css +125 -0
- package/dist/Count/Count.d.ts +24 -0
- package/dist/Count/index.d.ts +3 -0
- package/dist/Count/index.js +3 -0
- package/dist/Count-ZVCJ6VPD.css +20 -0
- package/dist/DataTable/CopyableCell.d.ts +12 -0
- package/dist/DataTable/DataTable.d.ts +615 -0
- package/dist/DataTable/RowActionsMenu.d.ts +7 -0
- package/dist/DataTable/index.d.ts +7 -0
- package/dist/DataTable/index.js +14 -0
- package/dist/DataTable-ITNACQ2X.css +2020 -0
- package/dist/DataView/DataView.d.ts +109 -0
- package/dist/DataView/DataViewToolbar.d.ts +87 -0
- package/dist/DataView/FilterAxisBar.d.ts +103 -0
- package/dist/DataView/columns.d.ts +35 -0
- package/dist/DataView/filters.d.ts +184 -0
- package/dist/DataView/index.d.ts +11 -0
- package/dist/DataView/index.js +25 -0
- package/dist/DataView-256YF32J.css +441 -0
- package/dist/DateTimePicker/DateTimePicker.d.ts +91 -0
- package/dist/DateTimePicker/index.d.ts +3 -0
- package/dist/DateTimePicker/index.js +9 -0
- package/dist/DateTimePicker-22VNXRWC.css +199 -0
- package/dist/DescriptionList/DescriptionList.d.ts +36 -0
- package/dist/DescriptionList/index.d.ts +3 -0
- package/dist/DescriptionList/index.js +2 -0
- package/dist/DescriptionList-YYY3V3O6.css +59 -0
- package/dist/DiffList/DiffList.d.ts +47 -0
- package/dist/DiffList/index.d.ts +3 -0
- package/dist/DiffList/index.js +3 -0
- package/dist/DiffList-3EX64AAE.css +94 -0
- package/dist/Disclosure/Disclosure.d.ts +56 -0
- package/dist/Disclosure/anatomy.d.ts +43 -0
- package/dist/Disclosure/index.d.ts +5 -0
- package/dist/Disclosure/index.js +6 -0
- package/dist/Disclosure-VKBJJIZ7.css +176 -0
- package/dist/EmptyState/EmptyState.d.ts +39 -0
- package/dist/EmptyState/index.d.ts +3 -0
- package/dist/EmptyState/index.js +3 -0
- package/dist/EmptyState-C6HRBGT7.css +73 -0
- package/dist/EmptyValue/EmptyValue.d.ts +31 -0
- package/dist/EmptyValue/index.d.ts +3 -0
- package/dist/EmptyValue/index.js +3 -0
- package/dist/EmptyValue-4B6ODXHT.css +12 -0
- package/dist/EntityChip/EntityChip.d.ts +40 -0
- package/dist/EntityChip/index.d.ts +3 -0
- package/dist/EntityChip/index.js +3 -0
- package/dist/EntityChip-LUCPZBBG.css +64 -0
- package/dist/ErrorBoundary/ErrorBoundary.d.ts +58 -0
- package/dist/ErrorBoundary/index.d.ts +3 -0
- package/dist/ErrorBoundary/index.js +4 -0
- package/dist/ErrorBoundary-ME36CQTA.css +59 -0
- package/dist/Eyebrow/Eyebrow.d.ts +18 -0
- package/dist/Eyebrow/index.d.ts +3 -0
- package/dist/Eyebrow/index.js +2 -0
- package/dist/Eyebrow-5NREGHQH.css +46 -0
- package/dist/FilterChip/FilterChip.d.ts +68 -0
- package/dist/FilterChip/index.d.ts +3 -0
- package/dist/FilterChip/index.js +3 -0
- package/dist/FilterChip-GTGLLOXE.css +107 -0
- package/dist/Fullscreen/index.d.ts +2 -0
- package/dist/Fullscreen/index.js +1 -0
- package/dist/Fullscreen/useFullscreen.d.ts +32 -0
- package/dist/IconButton/IconButton.d.ts +45 -0
- package/dist/IconButton/index.d.ts +3 -0
- package/dist/IconButton/index.js +3 -0
- package/dist/IconButton-VQGNMJDI.css +158 -0
- package/dist/ImageUpload/ImageUpload.d.ts +37 -0
- package/dist/ImageUpload/index.d.ts +3 -0
- package/dist/ImageUpload/index.js +3 -0
- package/dist/ImageUpload-HKFIZR6D.css +193 -0
- package/dist/InlineCode/InlineCode.d.ts +37 -0
- package/dist/InlineCode/index.d.ts +3 -0
- package/dist/InlineCode/index.js +2 -0
- package/dist/InlineCode-6WSR5COL.css +65 -0
- package/dist/Input/FormField.d.ts +61 -0
- package/dist/Input/FormRow.d.ts +6 -0
- package/dist/Input/FormSection.d.ts +28 -0
- package/dist/Input/Input.d.ts +98 -0
- package/dist/Input/Label.d.ts +31 -0
- package/dist/Input/ReadOnlyField.d.ts +30 -0
- package/dist/Input/Textarea.d.ts +16 -0
- package/dist/Input/index.d.ts +15 -0
- package/dist/Input/index.js +5 -0
- package/dist/Input-2PU5CPKK.css +616 -0
- package/dist/Kbd/Kbd.d.ts +40 -0
- package/dist/Kbd/index.d.ts +3 -0
- package/dist/Kbd/index.js +3 -0
- package/dist/Kbd-W66MXQI5.css +61 -0
- package/dist/Layer/LayerHost.d.ts +23 -0
- package/dist/Layer/index.d.ts +7 -0
- package/dist/Layer/index.js +3 -0
- package/dist/Layer/place.d.ts +63 -0
- package/dist/Layer/stack.d.ts +159 -0
- package/dist/Layer-NAFSGCFA.css +23 -0
- package/dist/Layout/Layout.d.ts +104 -0
- package/dist/Layout/index.d.ts +3 -0
- package/dist/Layout/index.js +2 -0
- package/dist/Layout-2ZCV3IGF.css +171 -0
- package/dist/Link/Link.d.ts +45 -0
- package/dist/Link/index.d.ts +3 -0
- package/dist/Link/index.js +3 -0
- package/dist/Link-6BEFNMN2.css +80 -0
- package/dist/List/List.d.ts +73 -0
- package/dist/List/index.d.ts +3 -0
- package/dist/List/index.js +3 -0
- package/dist/List-XTHESXLR.css +161 -0
- package/dist/ListInput/ListInput.d.ts +68 -0
- package/dist/ListInput/index.d.ts +3 -0
- package/dist/ListInput/index.js +10 -0
- package/dist/ListInput-O7LJKOIG.css +147 -0
- package/dist/Listbox/index.d.ts +5 -0
- package/dist/Listbox/index.js +2 -0
- package/dist/Listbox/useListbox.d.ts +97 -0
- package/dist/Listbox/useOptionKeys.d.ts +64 -0
- package/dist/Listbox-X2DOTSQA.css +110 -0
- package/dist/Menu/Menu.d.ts +118 -0
- package/dist/Menu/index.d.ts +3 -0
- package/dist/Menu/index.js +7 -0
- package/dist/Menu-6DE7I66I.css +222 -0
- package/dist/Meter/Meter.d.ts +49 -0
- package/dist/Meter/index.d.ts +3 -0
- package/dist/Meter/index.js +3 -0
- package/dist/Meter-SKOOXQBC.css +87 -0
- package/dist/Modal/ConfirmModal.d.ts +74 -0
- package/dist/Modal/Modal.d.ts +154 -0
- package/dist/Modal/index.d.ts +5 -0
- package/dist/Modal/index.js +8 -0
- package/dist/Modal-XYQJ4BL6.css +484 -0
- package/dist/NewItemsNotice/NewItemsNotice.d.ts +28 -0
- package/dist/NewItemsNotice/index.d.ts +3 -0
- package/dist/NewItemsNotice/index.js +4 -0
- package/dist/NewItemsNotice-T4DSSPVV.css +60 -0
- package/dist/OrgLabel/OrgLabel.d.ts +117 -0
- package/dist/OrgLabel/index.d.ts +3 -0
- package/dist/OrgLabel/index.js +2 -0
- package/dist/OrgLabel-D7U6QJZD.css +293 -0
- package/dist/OrgNode/OrgNode.d.ts +103 -0
- package/dist/OrgNode/index.d.ts +3 -0
- package/dist/OrgNode/index.js +3 -0
- package/dist/OrgNode-BT7T2Q2X.css +214 -0
- package/dist/OrgTable/OrgTable.d.ts +113 -0
- package/dist/OrgTable/index.d.ts +3 -0
- package/dist/OrgTable/index.js +11 -0
- package/dist/OrgTable-VWMFC3TB.css +360 -0
- package/dist/PageHeader/PageHeader.d.ts +35 -0
- package/dist/PageHeader/index.d.ts +3 -0
- package/dist/PageHeader/index.js +3 -0
- package/dist/PageHeader-6EYWQXRE.css +88 -0
- package/dist/Popover/Popover.d.ts +91 -0
- package/dist/Popover/index.d.ts +3 -0
- package/dist/Popover/index.js +4 -0
- package/dist/Popover-WJGCF3ZQ.css +185 -0
- package/dist/PricingCard/PricingCard.d.ts +56 -0
- package/dist/PricingCard/index.d.ts +3 -0
- package/dist/PricingCard/index.js +4 -0
- package/dist/PricingCard-JFI7RYXP.css +278 -0
- package/dist/Prose/Prose.d.ts +33 -0
- package/dist/Prose/index.d.ts +3 -0
- package/dist/Prose/index.js +2 -0
- package/dist/Prose-BTXNFT2Q.css +99 -0
- package/dist/RelativeTime/RelativeTime.d.ts +31 -0
- package/dist/RelativeTime/clock.d.ts +9 -0
- package/dist/RelativeTime/format.d.ts +38 -0
- package/dist/RelativeTime/index.d.ts +6 -0
- package/dist/RelativeTime/index.js +4 -0
- package/dist/RelativeTime-EBAQPGO2.css +10 -0
- package/dist/SearchTrigger/SearchTrigger.d.ts +29 -0
- package/dist/SearchTrigger/index.d.ts +3 -0
- package/dist/SearchTrigger/index.js +2 -0
- package/dist/SearchTrigger-QXOYAUUY.css +79 -0
- package/dist/Section/Section.d.ts +41 -0
- package/dist/Section/index.d.ts +3 -0
- package/dist/Section/index.js +3 -0
- package/dist/Section-QRUPRIQ2.css +127 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +68 -0
- package/dist/SegmentedControl/index.d.ts +4 -0
- package/dist/SegmentedControl/index.js +5 -0
- package/dist/SegmentedControl-X3BI3XU4.css +68 -0
- package/dist/Select/Select.d.ts +138 -0
- package/dist/Select/index.d.ts +3 -0
- package/dist/Select/index.js +5 -0
- package/dist/Select-2X77FSWR.css +350 -0
- package/dist/Shortcut/index.d.ts +2 -0
- package/dist/Shortcut/index.js +4 -0
- package/dist/Shortcut/useShortcut.d.ts +68 -0
- package/dist/SidebarNav/SidebarNav.d.ts +117 -0
- package/dist/SidebarNav/index.d.ts +3 -0
- package/dist/SidebarNav/index.js +3 -0
- package/dist/SidebarNav-QGSFKZYA.css +319 -0
- package/dist/Skeleton/Skeleton.d.ts +50 -0
- package/dist/Skeleton/index.d.ts +3 -0
- package/dist/Skeleton/index.js +3 -0
- package/dist/Skeleton-V735HRGM.css +421 -0
- package/dist/StatCard/StatCard.d.ts +56 -0
- package/dist/StatCard/index.d.ts +3 -0
- package/dist/StatCard/index.js +3 -0
- package/dist/StatCard-KYPKZUWX.css +111 -0
- package/dist/StatGroup/StatGroup.d.ts +20 -0
- package/dist/StatGroup/index.d.ts +3 -0
- package/dist/StatGroup/index.js +2 -0
- package/dist/StatGroup-TGB6AEKM.css +80 -0
- package/dist/StatusDot/StatusDot.d.ts +25 -0
- package/dist/StatusDot/index.d.ts +3 -0
- package/dist/StatusDot/index.js +2 -0
- package/dist/StatusDot-HA2L2FSX.css +84 -0
- package/dist/Switch/Switch.d.ts +38 -0
- package/dist/Switch/index.d.ts +3 -0
- package/dist/Switch/index.js +2 -0
- package/dist/Switch-U4OWK4CL.css +169 -0
- package/dist/Table/Table.d.ts +51 -0
- package/dist/Table/index.d.ts +3 -0
- package/dist/Table/index.js +3 -0
- package/dist/Table-MDOLVUAW.css +159 -0
- package/dist/Tabs/Tabs.d.ts +97 -0
- package/dist/Tabs/index.d.ts +3 -0
- package/dist/Tabs/index.js +4 -0
- package/dist/Tabs/roving.d.ts +36 -0
- package/dist/Tabs-VLICJFVB.css +275 -0
- package/dist/Tag/Tag.d.ts +107 -0
- package/dist/Tag/index.d.ts +3 -0
- package/dist/Tag/index.js +3 -0
- package/dist/Tag-VNZEYLB6.css +406 -0
- package/dist/TagGroup/TagGroup.d.ts +41 -0
- package/dist/TagGroup/index.d.ts +3 -0
- package/dist/TagGroup/index.js +4 -0
- package/dist/TagGroup-APC2EFH4.css +75 -0
- package/dist/TagsInput/TagsInput.d.ts +112 -0
- package/dist/TagsInput/index.d.ts +3 -0
- package/dist/TagsInput/index.js +10 -0
- package/dist/TagsInput-W4P36PRJ.css +168 -0
- package/dist/Text/Text.d.ts +67 -0
- package/dist/Text/index.d.ts +3 -0
- package/dist/Text/index.js +2 -0
- package/dist/Text-XIPYYZX2.css +154 -0
- package/dist/ThemeSwitcher/ThemeSwitcher.d.ts +47 -0
- package/dist/ThemeSwitcher/index.d.ts +4 -0
- package/dist/ThemeSwitcher/index.js +6 -0
- package/dist/ThemeSwitcher/preferences.d.ts +51 -0
- package/dist/TimeWindowPicker/TimeWindowPicker.d.ts +231 -0
- package/dist/TimeWindowPicker/index.d.ts +3 -0
- package/dist/TimeWindowPicker/index.js +13 -0
- package/dist/TimeWindowPicker/mask.d.ts +82 -0
- package/dist/TimeWindowPicker-7I7KWCMU.css +403 -0
- package/dist/Timeline/Timeline.d.ts +51 -0
- package/dist/Timeline/index.d.ts +3 -0
- package/dist/Timeline/index.js +3 -0
- package/dist/Timeline-27SYKOFX.css +144 -0
- package/dist/Toaster/Toaster.d.ts +108 -0
- package/dist/Toaster/index.d.ts +3 -0
- package/dist/Toaster/index.js +5 -0
- package/dist/Toaster-NVDCEIP5.css +306 -0
- package/dist/Toolbar/Toolbar.d.ts +62 -0
- package/dist/Toolbar/index.d.ts +3 -0
- package/dist/Toolbar/index.js +4 -0
- package/dist/Toolbar-IP6LXN45.css +48 -0
- package/dist/Tooltip/Tooltip.d.ts +51 -0
- package/dist/Tooltip/index.d.ts +3 -0
- package/dist/Tooltip/index.js +4 -0
- package/dist/Tooltip-LKQF7CE4.css +71 -0
- package/dist/Tree/index.d.ts +8 -0
- package/dist/Tree/index.js +1 -0
- package/dist/Tree/layout.d.ts +160 -0
- package/dist/Tree/model.d.ts +110 -0
- package/dist/Tree/useMeasuredSizes.d.ts +61 -0
- package/dist/Tree/useTreeState.d.ts +89 -0
- package/dist/TreeCanvas/TreeCanvas.d.ts +384 -0
- package/dist/TreeCanvas/index.d.ts +3 -0
- package/dist/TreeCanvas/index.js +10 -0
- package/dist/TreeCanvas/motion.d.ts +59 -0
- package/dist/TreeCanvas-WBNQPHC7.css +1098 -0
- package/dist/TreeGrid/TreeGrid.d.ts +142 -0
- package/dist/TreeGrid/index.d.ts +3 -0
- package/dist/TreeGrid/index.js +8 -0
- package/dist/TreeGrid-NSW7VMOX.css +132 -0
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +23 -0
- package/dist/VisuallyHidden/index.d.ts +3 -0
- package/dist/VisuallyHidden/index.js +2 -0
- package/dist/VisuallyHidden-L552H7OA.css +21 -0
- package/dist/chunk-22O7LAW2.js +41 -0
- package/dist/chunk-23DHIMJA.js +38 -0
- package/dist/chunk-2EOKFKHX.js +263 -0
- package/dist/chunk-2PRH365R.js +74 -0
- package/dist/chunk-2ZQMA2WB.js +57 -0
- package/dist/chunk-3CZ7XAVY.js +139 -0
- package/dist/chunk-3EYF6HKB.js +135 -0
- package/dist/chunk-3ZP55QZE.js +40 -0
- package/dist/chunk-53DVJCVW.js +14 -0
- package/dist/chunk-5C5YMZQU.js +51 -0
- package/dist/chunk-5EKIWVOR.js +132 -0
- package/dist/chunk-5IMACPJS.js +495 -0
- package/dist/chunk-5KPQ6D7N.js +54 -0
- package/dist/chunk-5SDBMKUO.js +297 -0
- package/dist/chunk-5WS6L6FA.js +114 -0
- package/dist/chunk-7EM5T4ME.js +39 -0
- package/dist/chunk-7FZ53WDJ.js +163 -0
- package/dist/chunk-7HPRF5XN.js +525 -0
- package/dist/chunk-7RPGY3JE.js +43 -0
- package/dist/chunk-A2UXBCLO.js +48 -0
- package/dist/chunk-ARMRX2YV.js +96 -0
- package/dist/chunk-AV2DXAEL.js +27 -0
- package/dist/chunk-BHHIIK3M.js +17 -0
- package/dist/chunk-BZFWDIV6.js +9 -0
- package/dist/chunk-BZYDZBAN.js +123 -0
- package/dist/chunk-CMEE37QJ.js +628 -0
- package/dist/chunk-D3OADIM6.js +112 -0
- package/dist/chunk-DD5BBGBE.js +162 -0
- package/dist/chunk-EHMQQHYR.js +1652 -0
- package/dist/chunk-EN6K2IFA.js +256 -0
- package/dist/chunk-EPOOQZYA.js +118 -0
- package/dist/chunk-ESCO4XYW.js +144 -0
- package/dist/chunk-EUCC37WY.js +14 -0
- package/dist/chunk-EV6IMYJ6.js +62 -0
- package/dist/chunk-F27EPQ7D.js +68 -0
- package/dist/chunk-F4PJZ4ED.js +245 -0
- package/dist/chunk-F6OE5FH3.js +49 -0
- package/dist/chunk-FBZAKNSX.js +263 -0
- package/dist/chunk-FEFTGVMF.js +46 -0
- package/dist/chunk-G2QFRTJ2.js +823 -0
- package/dist/chunk-GHYY2WPF.js +907 -0
- package/dist/chunk-GTOUGQQK.js +147 -0
- package/dist/chunk-GUIF6Q6N.js +143 -0
- package/dist/chunk-GXQ3B46I.js +216 -0
- package/dist/chunk-H4FBTAYS.js +130 -0
- package/dist/chunk-HOXGBLEY.js +37 -0
- package/dist/chunk-HQNHV7D6.js +54 -0
- package/dist/chunk-HTDFCRJZ.js +92 -0
- package/dist/chunk-HZ5XZNPS.js +98 -0
- package/dist/chunk-IAJLHVUA.js +28 -0
- package/dist/chunk-IJ7QXNIJ.js +1 -0
- package/dist/chunk-ITHXJHBB.js +280 -0
- package/dist/chunk-JCSA3XVH.js +32 -0
- package/dist/chunk-KLJCCMF3.js +97 -0
- package/dist/chunk-LGCPQIOZ.js +49 -0
- package/dist/chunk-LWKJQTOM.js +77 -0
- package/dist/chunk-MNAXYY3R.js +215 -0
- package/dist/chunk-NN62JQLR.js +29 -0
- package/dist/chunk-NPZY6YYL.js +251 -0
- package/dist/chunk-NTRZGNEX.js +529 -0
- package/dist/chunk-O6232G37.js +273 -0
- package/dist/chunk-O67VF5MS.js +58 -0
- package/dist/chunk-ODEQTPFM.js +6 -0
- package/dist/chunk-PNFASD6F.js +98 -0
- package/dist/chunk-PQADV6P6.js +19 -0
- package/dist/chunk-PZSWF74H.js +15 -0
- package/dist/chunk-Q4ZPPART.js +26 -0
- package/dist/chunk-QNCVHRZL.js +17 -0
- package/dist/chunk-QVE4GJAT.js +15 -0
- package/dist/chunk-QYOFACSP.js +36 -0
- package/dist/chunk-RA2ULG6H.js +29 -0
- package/dist/chunk-RDGD7Z7I.js +350 -0
- package/dist/chunk-RK4XPHVG.js +16 -0
- package/dist/chunk-RSAQOKH3.js +38 -0
- package/dist/chunk-S2XHHEW4.js +84 -0
- package/dist/chunk-S4GZWSKR.js +137 -0
- package/dist/chunk-SFZOKW2G.js +52 -0
- package/dist/chunk-T7FKOJKW.js +221 -0
- package/dist/chunk-UG46QBLT.js +325 -0
- package/dist/chunk-UOGSZKLT.js +134 -0
- package/dist/chunk-V2XMNLMS.js +52 -0
- package/dist/chunk-V663QU4R.js +51 -0
- package/dist/chunk-W4ENKCXJ.js +40 -0
- package/dist/chunk-W5J7R5EB.js +107 -0
- package/dist/chunk-WNI2WSJF.js +27 -0
- package/dist/chunk-XDTYBF2F.js +36 -0
- package/dist/chunk-XN4JBAN3.js +32 -0
- package/dist/chunk-XV6WRMBC.js +211 -0
- package/dist/chunk-YLYOWZ4V.js +33 -0
- package/dist/chunk-YMWONFSI.js +170 -0
- package/dist/chunk-ZCR6YGQ4.js +1 -0
- package/dist/generated/index.d.ts +83 -0
- package/dist/generated/index.js +91 -0
- package/dist/index.d.ts +1 -1217
- package/dist/index.js +91 -4518
- package/dist/styles.css +14841 -4274
- package/dist/utils/cx.d.ts +10 -0
- package/dist/utils/headingLevel.d.ts +16 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/tone.d.ts +25 -0
- package/dist/utils/useClipboard.d.ts +30 -0
- package/package.json +18 -10
- package/scripts/bundle-css.mjs +25 -0
- package/scripts/check-css-literals.mjs +166 -0
- package/scripts/check-css-variables.mjs +184 -0
- package/scripts/check-css.mjs +27 -0
- package/scripts/css-source.mjs +67 -0
- package/scripts/write-barrel.mjs +60 -0
- package/dist/Accordion-NIMJQIOI.css +0 -88
- package/dist/AppShell-ZW3NSFBP.css +0 -51
- package/dist/Avatar-V6NG6Q45.css +0 -67
- package/dist/Button-XGCTXXYP.css +0 -174
- package/dist/Callout-LEGDIMAM.css +0 -52
- package/dist/Card-BOZGBML7.css +0 -86
- package/dist/Checkbox-OCUICIIZ.css +0 -58
- package/dist/CodeBlock-IEMBNIQC.css +0 -90
- package/dist/Container-LTKBA2FW.css +0 -21
- package/dist/Copyable-IB57OTHZ.css +0 -123
- package/dist/DataTable-3GALZUW2.css +0 -1593
- package/dist/DateTimePicker-NMSSGVPK.css +0 -312
- package/dist/Eyebrow-AVBORAS2.css +0 -30
- package/dist/IconButton-GB4PJDG2.css +0 -82
- package/dist/ImageUpload-3HQDF2KC.css +0 -158
- package/dist/Input-ZHUTN7CU.css +0 -210
- package/dist/Kbd-Q77CDZY7.css +0 -23
- package/dist/Modal-FJVG66S4.css +0 -138
- package/dist/Popover-FUFULUE2.css +0 -123
- package/dist/PricingCard-NKYV3JHA.css +0 -238
- package/dist/Section-665ZIPG6.css +0 -20
- package/dist/Select-GPRF7PRB.css +0 -294
- package/dist/Skeleton-3WEFLRDN.css +0 -378
- package/dist/StatCard-RTJIVTRB.css +0 -50
- package/dist/Table-AR3TRY2E.css +0 -89
- package/dist/Tabs-XZ4JIH3E.css +0 -153
- package/dist/Tag-R5QDJLYJ.css +0 -163
- package/dist/TimeWindowPicker-L3G5Q7UT.css +0 -629
- package/dist/Toaster-2O65VOR4.css +0 -264
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A link, in the two registers a console needs: a navigation and an identity.
|
|
3
|
+
*
|
|
4
|
+
* The ink is the accent's INK step, not the accent fill. The fill is a mark
|
|
5
|
+
* and clears 3:1; text has to clear 4.5:1, and at caption size it is exactly
|
|
6
|
+
* the place a fill-as-text fails.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.crewlet-link {
|
|
10
|
+
display: inline;
|
|
11
|
+
color: var(--color-brand-accent-ink);
|
|
12
|
+
text-decoration: none;
|
|
13
|
+
border-radius: var(--radius-xs);
|
|
14
|
+
transition: color var(--motion-duration-fast) var(--motion-easing-default);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.crewlet-link:hover {
|
|
18
|
+
text-decoration: underline;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.crewlet-link:focus-visible {
|
|
22
|
+
outline: 2px solid var(--color-focus);
|
|
23
|
+
outline-offset: 2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* An identity, not an instruction: neutral until a reader reaches for it. */
|
|
27
|
+
.crewlet-link--subtle {
|
|
28
|
+
color: var(--color-text-primary);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.crewlet-link--subtle:hover {
|
|
32
|
+
color: var(--color-brand-accent-ink);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.crewlet-link--body {
|
|
36
|
+
font-size: var(--font-size-sm);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* A caption-sized link takes the caption's SIZE and keeps the link's ink. It
|
|
41
|
+
* is medium weight and does not wrap, because the thing it names (an event id,
|
|
42
|
+
* a turn, a model) is one token a reader scans for.
|
|
43
|
+
*/
|
|
44
|
+
.crewlet-link--caption {
|
|
45
|
+
font-size: var(--font-size-xs);
|
|
46
|
+
font-weight: var(--font-weight-medium);
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
* A whole row is the target. No underline, because the row's own hover says
|
|
52
|
+
* it is live, and the ring is drawn INSIDE: a row inside a clipping scroller
|
|
53
|
+
* loses an outset ring to the scroller's edge and to the next row painted
|
|
54
|
+
* over it.
|
|
55
|
+
*/
|
|
56
|
+
.crewlet-link--block {
|
|
57
|
+
display: block;
|
|
58
|
+
width: 100%;
|
|
59
|
+
color: inherit;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.crewlet-link--block:hover {
|
|
63
|
+
text-decoration: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.crewlet-link--block:focus-visible {
|
|
67
|
+
outline-offset: var(--size-focus-ring-inset-offset);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.crewlet-link__external {
|
|
71
|
+
/* Sits on the text baseline beside the last word rather than under it. */
|
|
72
|
+
vertical-align: -0.125em;
|
|
73
|
+
margin-inline-start: var(--spacing-1);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (prefers-reduced-motion: reduce) {
|
|
77
|
+
.crewlet-link {
|
|
78
|
+
transition: none;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type HTMLAttributes, type LiHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
export type ListVariant =
|
|
3
|
+
/**
|
|
4
|
+
* Rows with nothing between them. A set of chips, a stack of links in a
|
|
5
|
+
* footer: a group where a hairline would draw a table nobody asked for.
|
|
6
|
+
*/
|
|
7
|
+
'plain'
|
|
8
|
+
/** A bullet per row: prose, not data. */
|
|
9
|
+
| 'bulleted'
|
|
10
|
+
/** A number per row: an order somebody follows. */
|
|
11
|
+
| 'numbered'
|
|
12
|
+
/**
|
|
13
|
+
* A hairline between rows: a feed, a set of results, a conversation. THE
|
|
14
|
+
* DEFAULT, because it is the list every screen in the product draws: rows a
|
|
15
|
+
* reader scans down want a boundary they can count.
|
|
16
|
+
*/
|
|
17
|
+
| 'divided';
|
|
18
|
+
export interface ListProps extends HTMLAttributes<HTMLElement> {
|
|
19
|
+
variant?: ListVariant | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* A grid template for every row, so a feed's rows scan as COLUMNS rather
|
|
22
|
+
* than as a ragged stack: `'auto 1fr auto'`. It is set on the list rather
|
|
23
|
+
* than on each row for exactly that reason, a column only lines up if every
|
|
24
|
+
* row measures itself against the same track list.
|
|
25
|
+
*/
|
|
26
|
+
template?: string | undefined;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The non-tabular list: an activity feed, a set of search results, a
|
|
30
|
+
* conversation, the goals on a seat.
|
|
31
|
+
*
|
|
32
|
+
* A LIST, NOT A TABLE. A table promises that every row carries the same fields
|
|
33
|
+
* and that a reader may sort and compare them. A feed promises neither, and
|
|
34
|
+
* rendering one as a table makes a screen reader announce a column count that
|
|
35
|
+
* means nothing. What a feed does want is alignment, which `template` gives it
|
|
36
|
+
* without the promise.
|
|
37
|
+
*/
|
|
38
|
+
export declare function List({ variant, template, className, style, children, ...rest }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare namespace List {
|
|
40
|
+
var Item: typeof ListItem;
|
|
41
|
+
}
|
|
42
|
+
export type ListItemTone = 'default' | 'danger';
|
|
43
|
+
export interface ListItemProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'onClick'> {
|
|
44
|
+
/** Makes the whole row a link. */
|
|
45
|
+
href?: string | undefined;
|
|
46
|
+
/** Makes the whole row a button. Ignored when `href` is given. */
|
|
47
|
+
onClick?: (() => void) | undefined;
|
|
48
|
+
/** Drawn before the row's content: a glyph, an avatar, a status mark. */
|
|
49
|
+
leading?: ReactNode;
|
|
50
|
+
/** Drawn after it: a time, a count, a chevron. */
|
|
51
|
+
trailing?: ReactNode;
|
|
52
|
+
tone?: ListItemTone | undefined;
|
|
53
|
+
/** Read in place of the danger rail, so colour is never the only signal. */
|
|
54
|
+
dangerLabel?: string | undefined;
|
|
55
|
+
/** This row is the one the reader is on. */
|
|
56
|
+
selected?: boolean | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Render the single child element as the row's control, for a router's own
|
|
59
|
+
* Link. The row's content then comes from that element's children.
|
|
60
|
+
*/
|
|
61
|
+
asChild?: boolean | undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* One row.
|
|
65
|
+
*
|
|
66
|
+
* A ROW THAT DOES SOMETHING IS A CONTROL, never a `div` with a click handler:
|
|
67
|
+
* `href` draws a real anchor and `onClick` a real button, so both are reached
|
|
68
|
+
* by Tab, activated by Enter, and announced as what they are. The row's own
|
|
69
|
+
* hover and focus ring belong to that control rather than to the `li` around
|
|
70
|
+
* it, which is what stops a keyboard reader seeing a ring around a row they
|
|
71
|
+
* cannot activate.
|
|
72
|
+
*/
|
|
73
|
+
export declare function ListItem({ href, onClick, leading, trailing, tone, dangerLabel, selected, asChild, className, children, ...rest }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The non-tabular list. One row recipe, four framings.
|
|
3
|
+
*
|
|
4
|
+
* The row's height is --size-row-md, so every list in a product lines up with
|
|
5
|
+
* every other and a density setting reaches all of them at once.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.crewlet-list {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
list-style: none;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.crewlet-list__item {
|
|
18
|
+
min-width: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.crewlet-list__row {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--spacing-3);
|
|
25
|
+
width: 100%;
|
|
26
|
+
min-width: 0;
|
|
27
|
+
min-height: var(--size-row-md);
|
|
28
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
29
|
+
border-radius: var(--radius-xs);
|
|
30
|
+
text-align: left;
|
|
31
|
+
font: inherit;
|
|
32
|
+
color: inherit;
|
|
33
|
+
background: none;
|
|
34
|
+
border: none;
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* Columns, on every row at once. A track list set per row lines nothing up,
|
|
40
|
+
* which is the whole reason the template belongs to the list.
|
|
41
|
+
*/
|
|
42
|
+
.crewlet-list--templated .crewlet-list__row--templated {
|
|
43
|
+
display: grid;
|
|
44
|
+
grid-template-columns: var(--crewlet-list-template);
|
|
45
|
+
align-items: center;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.crewlet-list__content {
|
|
49
|
+
min-width: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.crewlet-list__leading,
|
|
53
|
+
.crewlet-list__trailing {
|
|
54
|
+
display: inline-flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
flex: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* The row's own words take the room; a time or a count sits at the end. */
|
|
60
|
+
.crewlet-list__trailing {
|
|
61
|
+
margin-inline-start: auto;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.crewlet-list--templated .crewlet-list__trailing {
|
|
65
|
+
margin-inline-start: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.crewlet-list__row--interactive {
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
transition: background var(--motion-duration-fast) var(--motion-easing-default);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.crewlet-list__row--interactive:hover {
|
|
74
|
+
background: var(--color-surface-hover);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/*
|
|
78
|
+
* The ring is drawn INSIDE the row. A list sits in a clipping scroller more
|
|
79
|
+
* often than not, where an outset ring is cut off on the first and last rows
|
|
80
|
+
* and painted over by the row below.
|
|
81
|
+
*/
|
|
82
|
+
.crewlet-list__row:focus-visible {
|
|
83
|
+
outline: 2px solid var(--color-focus);
|
|
84
|
+
outline-offset: var(--size-focus-ring-inset-offset);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* ---- Framings ---------------------------------------------------------- */
|
|
88
|
+
|
|
89
|
+
.crewlet-list--divided .crewlet-list__item {
|
|
90
|
+
border-bottom: 1px solid var(--color-border-default);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.crewlet-list--divided .crewlet-list__item:last-child {
|
|
94
|
+
border-bottom: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.crewlet-list--divided .crewlet-list__row {
|
|
98
|
+
border-radius: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
* Bullets and numbers are prose furniture, so those two framings drop the row
|
|
103
|
+
* height and the horizontal pad: a paragraph's list should sit against the
|
|
104
|
+
* paragraph's own left edge.
|
|
105
|
+
*/
|
|
106
|
+
.crewlet-list--bulleted,
|
|
107
|
+
.crewlet-list--numbered {
|
|
108
|
+
padding-inline-start: var(--spacing-5);
|
|
109
|
+
list-style: revert;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.crewlet-list--bulleted .crewlet-list__item,
|
|
113
|
+
.crewlet-list--numbered .crewlet-list__item {
|
|
114
|
+
display: list-item;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.crewlet-list--bulleted .crewlet-list__row,
|
|
118
|
+
.crewlet-list--numbered .crewlet-list__row {
|
|
119
|
+
min-height: 0;
|
|
120
|
+
padding-inline: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* ---- States ------------------------------------------------------------ */
|
|
124
|
+
|
|
125
|
+
/*
|
|
126
|
+
* The row the reader is on. The accent is the one colour that means "here",
|
|
127
|
+
* and the rail is what carries it at a glance in a long list.
|
|
128
|
+
*/
|
|
129
|
+
.crewlet-list__item--selected > .crewlet-list__row {
|
|
130
|
+
background: var(--color-brand-accent-soft);
|
|
131
|
+
box-shadow: inset 2px 0 0 var(--color-brand-accent);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/*
|
|
135
|
+
* A selected row does NOT also take the hover overlay. Both are a background
|
|
136
|
+
* on the same element, the selected tint wins, and a composite of the two is a
|
|
137
|
+
* colour nothing has measured.
|
|
138
|
+
*/
|
|
139
|
+
.crewlet-list__item--selected > .crewlet-list__row--interactive:hover {
|
|
140
|
+
background: var(--color-brand-accent-soft);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/*
|
|
144
|
+
* A row that failed. The rail is the scannable half and the glyph beside it is
|
|
145
|
+
* the honest one: a reader who cannot tell the rail's hue from the row above
|
|
146
|
+
* still meets a mark and a word.
|
|
147
|
+
*/
|
|
148
|
+
.crewlet-list__item--danger > .crewlet-list__row {
|
|
149
|
+
box-shadow: inset 2px 0 0 var(--color-feedback-danger);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.crewlet-list__danger-mark {
|
|
153
|
+
flex: none;
|
|
154
|
+
color: var(--color-feedback-danger);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@media (prefers-reduced-motion: reduce) {
|
|
158
|
+
.crewlet-list__row--interactive {
|
|
159
|
+
transition: none;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ListInputProps {
|
|
3
|
+
/** The list's name, such as "Responsibilities". It is the group's legend. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** One item's name in lower case, such as "responsibility". Every control is named with it. */
|
|
6
|
+
itemName: string;
|
|
7
|
+
value: readonly string[];
|
|
8
|
+
onChange: (next: string[]) => void;
|
|
9
|
+
/** Items are paragraphs: Shift+Enter makes a newline. */
|
|
10
|
+
multiline?: boolean | undefined;
|
|
11
|
+
/** Where the values come from, or what shape they take. */
|
|
12
|
+
helper?: ReactNode | undefined;
|
|
13
|
+
/** Why the last value was refused. */
|
|
14
|
+
error?: ReactNode | undefined;
|
|
15
|
+
/** Shown in the new-item box. */
|
|
16
|
+
placeholder?: string | undefined;
|
|
17
|
+
disabled?: boolean | undefined;
|
|
18
|
+
/** Says "(optional)" beside the legend. */
|
|
19
|
+
optional?: boolean | undefined;
|
|
20
|
+
/** Draws the Enter keycap inside the new-item box, which is what adds one. */
|
|
21
|
+
enterHint?: boolean | undefined;
|
|
22
|
+
/** The name of the control beside the legend that appends what the box holds. */
|
|
23
|
+
addLabel?: ((itemName: string) => string) | undefined;
|
|
24
|
+
itemLabel?: ((name: string, position: string) => string) | undefined;
|
|
25
|
+
newItemLabel?: ((itemName: string) => string) | undefined;
|
|
26
|
+
moveUpLabel?: ((itemName: string, position: string) => string) | undefined;
|
|
27
|
+
moveDownLabel?: ((itemName: string, position: string) => string) | undefined;
|
|
28
|
+
removeLabel?: ((itemName: string, position: string) => string) | undefined;
|
|
29
|
+
addedMessage?: ((itemName: string, position: string) => string) | undefined;
|
|
30
|
+
removedMessage?: ((itemName: string, position: string) => string) | undefined;
|
|
31
|
+
movedMessage?: ((itemName: string, position: number, count: number) => string) | undefined;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* An ordered list of strings, edited in place.
|
|
35
|
+
*
|
|
36
|
+
* WHY IT EXISTS. A seat's responsibilities, a unit's goals and a company's
|
|
37
|
+
* policies are ordered lists of sentences, and the order is meaning: the
|
|
38
|
+
* first policy is read first. A comma-separated text box loses the commas
|
|
39
|
+
* inside a sentence, and one row per item with no way to reorder turns "move
|
|
40
|
+
* this up" into deleting and retyping it.
|
|
41
|
+
*
|
|
42
|
+
* THE RULES IT KEEPS.
|
|
43
|
+
*
|
|
44
|
+
* - ENTER ADDS. In the new-item box, Enter appends what was typed (trimmed at
|
|
45
|
+
* the ends) and leaves focus in the box for the next one. In an item, Enter
|
|
46
|
+
* moves on to the next item, or to the new-item box after the last. It is
|
|
47
|
+
* never allowed to submit the form the list sits in: finishing a sentence
|
|
48
|
+
* is not saving the editor.
|
|
49
|
+
* - SHIFT+ENTER IS A NEWLINE in a multiline list, where an item is a paragraph.
|
|
50
|
+
* - A KEY AN INPUT METHOD IS COMPOSING WITH IS ITS OWN: the Enter that accepts
|
|
51
|
+
* a word neither adds the item nor moves on, and Alt+Arrow does not reorder
|
|
52
|
+
* under a half-built word.
|
|
53
|
+
* - EVERY ITEM IS EDITED WHERE IT IS, as its own labelled control ("Goal 2 of
|
|
54
|
+
* 3"), with Move up, Move down and Remove beside it.
|
|
55
|
+
* - ALT+UP AND ALT+DOWN MOVE THE FOCUSED ITEM, and focus moves with it. After
|
|
56
|
+
* a Move button, focus stays on that item's button, or on its other one when
|
|
57
|
+
* the item reached an end, so pressing it again keeps working.
|
|
58
|
+
* - REMOVING an item moves focus to the item that took its place, else the one
|
|
59
|
+
* before, else the new-item box, so focus never falls to the page.
|
|
60
|
+
* - EVERY CHANGE IS ANNOUNCED, because a move or a removal is otherwise silent
|
|
61
|
+
* to anybody not watching the rows.
|
|
62
|
+
* - AN ITEM KEEPS ITS ELEMENT ACROSS A MOVE, so a caret and an input method's
|
|
63
|
+
* composition survive reordering. Two identical sentences are still two
|
|
64
|
+
* items.
|
|
65
|
+
*
|
|
66
|
+
* Ported from the engine dashboard's `ui/ListField.tsx`.
|
|
67
|
+
*/
|
|
68
|
+
export declare function ListInput({ label, itemName, value, onChange, multiline, helper, error, placeholder, disabled, optional, enterHint, addLabel, itemLabel, newItemLabel, moveUpLabel, moveDownLabel, removeLabel, addedMessage, removedMessage, movedMessage, }: ListInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { ListInput } from '../chunk-EN6K2IFA.js';
|
|
2
|
+
import '../chunk-SFZOKW2G.js';
|
|
3
|
+
import '../chunk-O6232G37.js';
|
|
4
|
+
import '../chunk-PQADV6P6.js';
|
|
5
|
+
import '../chunk-7RPGY3JE.js';
|
|
6
|
+
import '../chunk-ITHXJHBB.js';
|
|
7
|
+
import '../chunk-F27EPQ7D.js';
|
|
8
|
+
import '../chunk-RSAQOKH3.js';
|
|
9
|
+
import '../chunk-BZFWDIV6.js';
|
|
10
|
+
import '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ListInput: an ordered list of sentences, written in the box at the top and
|
|
3
|
+
* listed under it.
|
|
4
|
+
*
|
|
5
|
+
* THE LIST IS ONE CARD, and each item one line of it. A stack of separate
|
|
6
|
+
* boxes, each a two-row textarea with three buttons beside it, is a form per
|
|
7
|
+
* item: three of them measured 256px where the console's own list draws 111,
|
|
8
|
+
* and the second row of every textarea was empty. The card, the dividing
|
|
9
|
+
* rules and the drawn position are what make a list of sentences read as a
|
|
10
|
+
* list rather than as a column of fields.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
.crewlet-list-input__add {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.crewlet-list-input__add > * {
|
|
19
|
+
flex: 1;
|
|
20
|
+
min-width: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.crewlet-list-input__items {
|
|
24
|
+
list-style: none;
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: 0;
|
|
27
|
+
/*
|
|
28
|
+
* Split rather than the shorthand, so the width and the style are readable
|
|
29
|
+
* where the colour is not: the suites substitute the length tokens and
|
|
30
|
+
* deliberately leave a colour standing, which drops a whole shorthand
|
|
31
|
+
* holding one.
|
|
32
|
+
*/
|
|
33
|
+
border-width: 1px;
|
|
34
|
+
border-style: solid;
|
|
35
|
+
border-color: var(--color-border-default);
|
|
36
|
+
border-radius: var(--radius-md);
|
|
37
|
+
/*
|
|
38
|
+
* The page's own ground, one step from the sheet's. A card drawn on the
|
|
39
|
+
* ground it sits on is a card nobody can see: the sheet is the subtle step,
|
|
40
|
+
* so the list takes the step beside it in both palettes (#ffffff on
|
|
41
|
+
* #f4f4f5, #15171c on #1c1e24).
|
|
42
|
+
*/
|
|
43
|
+
background: var(--color-surface-background);
|
|
44
|
+
/*
|
|
45
|
+
* The card clips, so the first and last rows take its corners: a square row
|
|
46
|
+
* painted over a rounded edge is the corner disappearing under its own
|
|
47
|
+
* content.
|
|
48
|
+
*/
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* ONE LINE PER ITEM. The inline padding is the card's own; the block padding
|
|
54
|
+
* is what is left over once the row's controls have their height, so a row
|
|
55
|
+
* holding one line of text stands at the height the console draws and a row
|
|
56
|
+
* holding three grows with them.
|
|
57
|
+
*/
|
|
58
|
+
.crewlet-list-input__item {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: var(--spacing-2);
|
|
62
|
+
padding: var(--spacing-1) var(--spacing-3);
|
|
63
|
+
border-block-end-width: 1px;
|
|
64
|
+
border-block-end-style: solid;
|
|
65
|
+
border-block-end-color: var(--color-border-default);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.crewlet-list-input__item:last-child {
|
|
69
|
+
border-block-end-style: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.crewlet-list-input__item > .crewlet-input,
|
|
73
|
+
.crewlet-list-input__item > .crewlet-textarea {
|
|
74
|
+
flex: 1;
|
|
75
|
+
min-width: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/*
|
|
79
|
+
* THE ITEM'S CONTROL READS AS THE TEXT IT HOLDS, until it is reached. A
|
|
80
|
+
* bordered box per row would draw the card's rule twice and turn the list
|
|
81
|
+
* back into a column of fields; the boundary comes back on hover and the
|
|
82
|
+
* focus ring is untouched, so nothing about reaching the control is quieter,
|
|
83
|
+
* only its resting state.
|
|
84
|
+
*/
|
|
85
|
+
.crewlet-list-input__item .crewlet-input,
|
|
86
|
+
.crewlet-list-input__item .crewlet-textarea {
|
|
87
|
+
background: none;
|
|
88
|
+
border-color: transparent;
|
|
89
|
+
/*
|
|
90
|
+
* THE ROW OWNS THE ROW'S HEIGHT. A control standing at its own step inside
|
|
91
|
+
* a row that already insets it is a row an inch taller than the sentence in
|
|
92
|
+
* it: at the control's 44px minimum the list measured 53px a row against
|
|
93
|
+
* the console's 37. The control's block padding stays, because the text
|
|
94
|
+
* still needs to clear the rule above and below it; its inline padding goes,
|
|
95
|
+
* because the position beside it and the row's own gap are that inset
|
|
96
|
+
* already, and paying it twice indents every sentence past its own number.
|
|
97
|
+
*/
|
|
98
|
+
min-height: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.crewlet-list-input__item .crewlet-input__control,
|
|
102
|
+
.crewlet-list-input__item .crewlet-textarea {
|
|
103
|
+
padding-block: var(--spacing-1);
|
|
104
|
+
padding-inline: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.crewlet-list-input__index {
|
|
108
|
+
flex: none;
|
|
109
|
+
min-width: var(--spacing-4);
|
|
110
|
+
text-align: center;
|
|
111
|
+
font-size: var(--font-size-xs);
|
|
112
|
+
font-weight: var(--font-weight-bold);
|
|
113
|
+
/* The accent's own ink step, which is what the position is: a mark on the
|
|
114
|
+
card's ground rather than a word in the sentence beside it. */
|
|
115
|
+
color: var(--color-brand-accent);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.crewlet-list-input__actions {
|
|
119
|
+
display: inline-flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
flex: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/*
|
|
125
|
+
* MOVE UP AND MOVE DOWN ARE THE ROW'S SECOND THOUGHT. Three controls on every
|
|
126
|
+
* row is what made this list a grid of buttons; the console draws one. They
|
|
127
|
+
* are revealed by the pointer and by the focus, never removed: an invisible
|
|
128
|
+
* control that still takes a Tab is the worst of both, so the same state that
|
|
129
|
+
* lets the keyboard reach them is the state that draws them.
|
|
130
|
+
*/
|
|
131
|
+
.crewlet-list-input__move {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
opacity: 0;
|
|
135
|
+
transition: opacity var(--motion-duration-fast) var(--motion-easing-default);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.crewlet-list-input__item:hover .crewlet-list-input__move,
|
|
139
|
+
.crewlet-list-input__item:focus-within .crewlet-list-input__move {
|
|
140
|
+
opacity: 1;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@media (prefers-reduced-motion: reduce) {
|
|
144
|
+
.crewlet-list-input__move {
|
|
145
|
+
transition: none;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './Listbox.css';
|
|
2
|
+
export { useListbox } from './useListbox.js';
|
|
3
|
+
export type { Listbox, ListboxOptions } from './useListbox.js';
|
|
4
|
+
export { TYPE_AHEAD_WINDOW, useOptionKeys } from './useOptionKeys.js';
|
|
5
|
+
export type { OptionKeys, OptionKeysOptions } from './useOptionKeys.js';
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The keyboard half of a listbox that follows a text field.
|
|
3
|
+
*
|
|
4
|
+
* WHY IT EXISTS. A field that offers a list while somebody types (a combobox,
|
|
5
|
+
* a searchable multi-select, a command palette) keeps focus in the text box
|
|
6
|
+
* and points at the highlighted option with `aria-activedescendant`. The keys
|
|
7
|
+
* that move that highlight, take an option and dismiss the list are the same
|
|
8
|
+
* in every one of them, and a second hand-written copy is how one list starts
|
|
9
|
+
* wrapping at the ends while the other stops, or how Escape in one closes the
|
|
10
|
+
* dialog around it.
|
|
11
|
+
*
|
|
12
|
+
* THE RULES IT KEEPS.
|
|
13
|
+
*
|
|
14
|
+
* - THE HIGHLIGHT WRAPS: Down from the last option goes to the first, Up from
|
|
15
|
+
* the first to the last.
|
|
16
|
+
* - IT IS CLAMPED, NOT RESET, when the list shrinks under somebody's typing,
|
|
17
|
+
* so the highlight stays on a row that exists instead of jumping to the top.
|
|
18
|
+
* - ENTER TAKES THE HIGHLIGHTED OPTION and is prevented, because the field is
|
|
19
|
+
* usually inside a form that submits on Enter, and choosing is not saving.
|
|
20
|
+
* Tab takes it too where the list is a completion (`tabCommits`); a
|
|
21
|
+
* multi-select leaves Tab to move focus, as every form control does.
|
|
22
|
+
* - ESCAPE CLOSES THE LIST AND NOTHING ELSE. It stops there, so the dialog or
|
|
23
|
+
* sheet the field sits in stays open; a second Escape reaches it. That holds
|
|
24
|
+
* for a list that is showing with nothing in it too, and for nothing else:
|
|
25
|
+
* `open` means the reader can see a list, so an Escape with none on screen
|
|
26
|
+
* goes straight to the surface around it.
|
|
27
|
+
* - THE LIST IS A POPUP ON THE LAYER STACK, so a press outside it closes the
|
|
28
|
+
* list before anything beneath it: a press on a dialog's veil while the list
|
|
29
|
+
* is open closes the list and leaves the dialog. The component attaches
|
|
30
|
+
* `listRef` to the list it draws and `anchorRef` to the element around the
|
|
31
|
+
* field, whose presses are not outside.
|
|
32
|
+
* - A LIST THAT IS A MODAL'S WHOLE BODY IS NOT A POPUP (`popup: false`). A
|
|
33
|
+
* command palette is a modal whose content is its results: the modal's own
|
|
34
|
+
* Escape and veil already close it. Registered as a popup above that modal,
|
|
35
|
+
* the list would take Escape from the stack and the veil's press on
|
|
36
|
+
* `pointerdown`, closing the palette before the press's click and letting
|
|
37
|
+
* that click land on whatever the veil was covering.
|
|
38
|
+
* - THE HIGHLIGHTED ROW STAYS IN VIEW, by scrolling THE LIST ELEMENT and
|
|
39
|
+
* nothing else. `scrollIntoView` scrolls every scrollable ancestor it finds,
|
|
40
|
+
* and jsdom does not implement it at all, so an unguarded call throws the
|
|
41
|
+
* moment a suite opens a list. Re-run when the options change as well as the
|
|
42
|
+
* cursor: typing over a list scrolled by the wheel leaves the cursor at 0
|
|
43
|
+
* and the row out of view.
|
|
44
|
+
* - NOTHING IS TAKEN MID-COMPOSITION. While an input method is composing a
|
|
45
|
+
* word, the arrows, Enter and Escape are its own, and the handler reports
|
|
46
|
+
* them unhandled so the component around it leaves them alone too.
|
|
47
|
+
* - A PRESS ON AN OPTION IS TAKEN ON `mousedown`, with the default prevented:
|
|
48
|
+
* the field would otherwise blur first, and a list that closes on blur takes
|
|
49
|
+
* the row out from under the click that was choosing it.
|
|
50
|
+
*
|
|
51
|
+
* It owns no markup and no filtering: the component renders the list, decides
|
|
52
|
+
* what is offered and what taking an option means. The classes it is drawn
|
|
53
|
+
* with are in `Listbox.css`.
|
|
54
|
+
*
|
|
55
|
+
* Ported from the engine dashboard's `ui/useListbox.ts`.
|
|
56
|
+
*/
|
|
57
|
+
import { type KeyboardEvent, type MouseEvent } from 'react';
|
|
58
|
+
export interface ListboxOptions {
|
|
59
|
+
/** A stable base for element ids, usually from `useId`. */
|
|
60
|
+
id: string;
|
|
61
|
+
/** Whether a list is on screen, including one that says nothing matches. */
|
|
62
|
+
open: boolean;
|
|
63
|
+
/** How many options are offered right now. */
|
|
64
|
+
count: number;
|
|
65
|
+
/** Taking the option at `index`. */
|
|
66
|
+
onCommit: (index: number) => void;
|
|
67
|
+
/** Escape, or a press outside the list, while the list is a popup. */
|
|
68
|
+
onClose: () => void;
|
|
69
|
+
/**
|
|
70
|
+
* Whether the list is a popup on the layer stack (the default), or the body
|
|
71
|
+
* of a modal that owns Escape and its veil itself.
|
|
72
|
+
*/
|
|
73
|
+
popup?: boolean | undefined;
|
|
74
|
+
/** Whether Tab takes the highlighted option (a completion) or moves focus (a form control). */
|
|
75
|
+
tabCommits?: boolean | undefined;
|
|
76
|
+
}
|
|
77
|
+
export interface Listbox {
|
|
78
|
+
/** The highlighted option's index, clamped to what is offered; -1 when nothing is. */
|
|
79
|
+
active: number;
|
|
80
|
+
setActive: (index: number) => void;
|
|
81
|
+
/** The listbox element's id. */
|
|
82
|
+
listId: string;
|
|
83
|
+
/** The list on screen: what a press outside is measured against, and what scrolls. */
|
|
84
|
+
listRef: (el: HTMLElement | null) => void;
|
|
85
|
+
/** The element around the field: a press on it is not outside the list. */
|
|
86
|
+
anchorRef: (el: HTMLElement | null) => void;
|
|
87
|
+
/** The id of the option element at `index`. */
|
|
88
|
+
optionId: (index: number) => string;
|
|
89
|
+
/** The field's keydown handler. Returns whether it handled the key. */
|
|
90
|
+
onKeyDown: (event: KeyboardEvent<HTMLElement>) => boolean;
|
|
91
|
+
/** Mouse wiring for the option element at `index`. */
|
|
92
|
+
optionHandlers: (index: number) => {
|
|
93
|
+
onMouseDown: (event: MouseEvent<HTMLElement>) => void;
|
|
94
|
+
onMouseEnter: () => void;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export declare function useListbox({ id, open, count, onCommit, onClose, tabCommits, popup, }: ListboxOptions): Listbox;
|