@derelicious/ds 0.0.0-stage → 0.2.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/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/README.md +147 -2
- package/dist/a2ui/Surface.css +140 -0
- package/dist/a2ui/Surface.css.d.ts +22 -0
- package/dist/a2ui/Surface.css.js +29 -0
- package/dist/a2ui/Surface.d.ts +56 -0
- package/dist/a2ui/Surface.js +1411 -0
- package/dist/a2ui/catalog.d.ts +93 -0
- package/dist/a2ui/catalog.js +1666 -0
- package/dist/a2ui/clientMessages.d.ts +36 -0
- package/dist/a2ui/clientMessages.js +65 -0
- package/dist/a2ui/examples.d.ts +8 -0
- package/dist/a2ui/examples.js +877 -0
- package/dist/a2ui/functions.d.ts +55 -0
- package/dist/a2ui/functions.js +341 -0
- package/dist/a2ui/ids.d.ts +5 -0
- package/dist/a2ui/ids.js +7 -0
- package/dist/a2ui/index.d.ts +16 -0
- package/dist/a2ui/index.js +12 -0
- package/dist/a2ui/jsonl.d.ts +41 -0
- package/dist/a2ui/jsonl.js +127 -0
- package/dist/a2ui/links.d.ts +17 -0
- package/dist/a2ui/links.js +29 -0
- package/dist/a2ui/pointer.d.ts +22 -0
- package/dist/a2ui/pointer.js +85 -0
- package/dist/a2ui/processor.d.ts +126 -0
- package/dist/a2ui/processor.js +497 -0
- package/dist/a2ui/react.d.ts +2 -0
- package/dist/a2ui/react.js +1 -0
- package/dist/a2ui/toTsx.d.ts +9 -0
- package/dist/a2ui/toTsx.js +1389 -0
- package/dist/a2ui/types.d.ts +96 -0
- package/dist/a2ui/validate.d.ts +90 -0
- package/dist/a2ui/validate.js +750 -0
- package/dist/a2ui-catalog.json +4369 -0
- package/dist/a2ui-conformance.json +71 -0
- package/dist/components/Accordion/Accordion.css +58 -0
- package/dist/components/Accordion/Accordion.css.d.ts +5 -0
- package/dist/components/Accordion/Accordion.css.js +10 -0
- package/dist/components/Accordion/Accordion.d.ts +23 -0
- package/dist/components/Accordion/Accordion.docs.d.ts +19 -0
- package/dist/components/Accordion/Accordion.docs.js +43 -0
- package/dist/components/Accordion/Accordion.js +55 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +1 -0
- package/dist/components/AiLabel/AiLabel.css +70 -0
- package/dist/components/AiLabel/AiLabel.css.d.ts +8 -0
- package/dist/components/AiLabel/AiLabel.css.js +11 -0
- package/dist/components/AiLabel/AiLabel.d.ts +29 -0
- package/dist/components/AiLabel/AiLabel.docs.d.ts +19 -0
- package/dist/components/AiLabel/AiLabel.docs.js +51 -0
- package/dist/components/AiLabel/AiLabel.js +41 -0
- package/dist/components/AiLabel/index.d.ts +1 -0
- package/dist/components/AiLabel/index.js +1 -0
- package/dist/components/Alert/Alert.css +76 -0
- package/dist/components/Alert/Alert.css.d.ts +9 -0
- package/dist/components/Alert/Alert.css.js +23 -0
- package/dist/components/Alert/Alert.d.ts +21 -0
- package/dist/components/Alert/Alert.docs.d.ts +19 -0
- package/dist/components/Alert/Alert.docs.js +57 -0
- package/dist/components/Alert/Alert.js +55 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/Alert/index.js +1 -0
- package/dist/components/Avatar/Avatar.css +42 -0
- package/dist/components/Avatar/Avatar.css.d.ts +3 -0
- package/dist/components/Avatar/Avatar.css.js +12 -0
- package/dist/components/Avatar/Avatar.d.ts +13 -0
- package/dist/components/Avatar/Avatar.docs.d.ts +19 -0
- package/dist/components/Avatar/Avatar.docs.js +43 -0
- package/dist/components/Avatar/Avatar.js +31 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.js +1 -0
- package/dist/components/Avatar/initials.d.ts +2 -0
- package/dist/components/Avatar/initials.js +8 -0
- package/dist/components/Badge/Badge.css +63 -0
- package/dist/components/Badge/Badge.css.d.ts +5 -0
- package/dist/components/Badge/Badge.css.js +16 -0
- package/dist/components/Badge/Badge.d.ts +15 -0
- package/dist/components/Badge/Badge.docs.d.ts +19 -0
- package/dist/components/Badge/Badge.docs.js +52 -0
- package/dist/components/Badge/Badge.js +24 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Badge/index.js +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.css +40 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.css.d.ts +5 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.css.js +10 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +17 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.docs.d.ts +19 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.docs.js +38 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +48 -0
- package/dist/components/Breadcrumbs/index.d.ts +1 -0
- package/dist/components/Breadcrumbs/index.js +1 -0
- package/dist/components/Button/Button.css +101 -0
- package/dist/components/Button/Button.css.d.ts +72 -0
- package/dist/components/Button/Button.css.js +35 -0
- package/dist/components/Button/Button.d.ts +53 -0
- package/dist/components/Button/Button.docs.d.ts +19 -0
- package/dist/components/Button/Button.docs.js +71 -0
- package/dist/components/Button/Button.js +68 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +1 -0
- package/dist/components/Card/Card.css +122 -0
- package/dist/components/Card/Card.css.d.ts +12 -0
- package/dist/components/Card/Card.css.js +25 -0
- package/dist/components/Card/Card.d.ts +306 -0
- package/dist/components/Card/Card.docs.d.ts +19 -0
- package/dist/components/Card/Card.docs.js +65 -0
- package/dist/components/Card/Card.js +53 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +1 -0
- package/dist/components/ChatMessage/ChatMessage.css +56 -0
- package/dist/components/ChatMessage/ChatMessage.css.d.ts +7 -0
- package/dist/components/ChatMessage/ChatMessage.css.js +15 -0
- package/dist/components/ChatMessage/ChatMessage.d.ts +35 -0
- package/dist/components/ChatMessage/ChatMessage.docs.d.ts +19 -0
- package/dist/components/ChatMessage/ChatMessage.docs.js +45 -0
- package/dist/components/ChatMessage/ChatMessage.js +49 -0
- package/dist/components/ChatMessage/index.d.ts +1 -0
- package/dist/components/ChatMessage/index.js +1 -0
- package/dist/components/Checkbox/Checkbox.css +70 -0
- package/dist/components/Checkbox/Checkbox.css.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.css.js +6 -0
- package/dist/components/Checkbox/Checkbox.d.ts +28 -0
- package/dist/components/Checkbox/Checkbox.docs.d.ts +19 -0
- package/dist/components/Checkbox/Checkbox.docs.js +53 -0
- package/dist/components/Checkbox/Checkbox.js +63 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.js +1 -0
- package/dist/components/Code/Code.css +12 -0
- package/dist/components/Code/Code.css.d.ts +1 -0
- package/dist/components/Code/Code.css.js +5 -0
- package/dist/components/Code/Code.d.ts +7 -0
- package/dist/components/Code/Code.docs.d.ts +19 -0
- package/dist/components/Code/Code.docs.js +26 -0
- package/dist/components/Code/Code.js +12 -0
- package/dist/components/Code/index.d.ts +1 -0
- package/dist/components/Code/index.js +1 -0
- package/dist/components/CodeBlock/CodeBlock.css +76 -0
- package/dist/components/CodeBlock/CodeBlock.css.d.ts +12 -0
- package/dist/components/CodeBlock/CodeBlock.css.js +21 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +19 -0
- package/dist/components/CodeBlock/CodeBlock.docs.d.ts +19 -0
- package/dist/components/CodeBlock/CodeBlock.docs.js +47 -0
- package/dist/components/CodeBlock/CodeBlock.js +82 -0
- package/dist/components/CodeBlock/highlight.d.ts +28 -0
- package/dist/components/CodeBlock/highlight.js +118 -0
- package/dist/components/CodeBlock/index.d.ts +1 -0
- package/dist/components/CodeBlock/index.js +1 -0
- package/dist/components/Container/Container.css +21 -0
- package/dist/components/Container/Container.css.d.ts +3 -0
- package/dist/components/Container/Container.css.js +12 -0
- package/dist/components/Container/Container.d.ts +295 -0
- package/dist/components/Container/Container.docs.d.ts +19 -0
- package/dist/components/Container/Container.docs.js +31 -0
- package/dist/components/Container/Container.js +12 -0
- package/dist/components/Container/index.d.ts +1 -0
- package/dist/components/Container/index.js +1 -0
- package/dist/components/Dialog/Dialog.css +94 -0
- package/dist/components/Dialog/Dialog.css.d.ts +9 -0
- package/dist/components/Dialog/Dialog.css.js +17 -0
- package/dist/components/Dialog/Dialog.d.ts +29 -0
- package/dist/components/Dialog/Dialog.docs.d.ts +19 -0
- package/dist/components/Dialog/Dialog.docs.js +50 -0
- package/dist/components/Dialog/Dialog.js +90 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Dialog/index.js +1 -0
- package/dist/components/Divider/Divider.css +41 -0
- package/dist/components/Divider/Divider.css.d.ts +6 -0
- package/dist/components/Divider/Divider.css.js +16 -0
- package/dist/components/Divider/Divider.d.ts +11 -0
- package/dist/components/Divider/Divider.docs.d.ts +19 -0
- package/dist/components/Divider/Divider.docs.js +43 -0
- package/dist/components/Divider/Divider.js +30 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Divider/index.js +1 -0
- package/dist/components/Grid/Grid.css +11 -0
- package/dist/components/Grid/Grid.css.d.ts +8 -0
- package/dist/components/Grid/Grid.css.js +8 -0
- package/dist/components/Grid/Grid.d.ts +18 -0
- package/dist/components/Grid/Grid.docs.d.ts +19 -0
- package/dist/components/Grid/Grid.docs.js +41 -0
- package/dist/components/Grid/Grid.js +22 -0
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Grid/index.js +1 -0
- package/dist/components/Heading/Heading.css +44 -0
- package/dist/components/Heading/Heading.css.d.ts +3 -0
- package/dist/components/Heading/Heading.css.js +17 -0
- package/dist/components/Heading/Heading.d.ts +298 -0
- package/dist/components/Heading/Heading.docs.d.ts +19 -0
- package/dist/components/Heading/Heading.docs.js +48 -0
- package/dist/components/Heading/Heading.js +20 -0
- package/dist/components/Heading/index.d.ts +1 -0
- package/dist/components/Heading/index.js +1 -0
- package/dist/components/Icon/Icon.css +25 -0
- package/dist/components/Icon/Icon.css.d.ts +4 -0
- package/dist/components/Icon/Icon.css.js +13 -0
- package/dist/components/Icon/Icon.d.ts +16 -0
- package/dist/components/Icon/Icon.docs.d.ts +19 -0
- package/dist/components/Icon/Icon.docs.js +56 -0
- package/dist/components/Icon/Icon.js +25 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon/index.js +1 -0
- package/dist/components/IconButton/IconButton.css +70 -0
- package/dist/components/IconButton/IconButton.css.d.ts +57 -0
- package/dist/components/IconButton/IconButton.css.js +27 -0
- package/dist/components/IconButton/IconButton.d.ts +46 -0
- package/dist/components/IconButton/IconButton.docs.d.ts +19 -0
- package/dist/components/IconButton/IconButton.docs.js +48 -0
- package/dist/components/IconButton/IconButton.js +44 -0
- package/dist/components/IconButton/index.d.ts +1 -0
- package/dist/components/IconButton/index.js +1 -0
- package/dist/components/Image/Image.css +53 -0
- package/dist/components/Image/Image.css.d.ts +7 -0
- package/dist/components/Image/Image.css.js +18 -0
- package/dist/components/Image/Image.d.ts +23 -0
- package/dist/components/Image/Image.docs.d.ts +19 -0
- package/dist/components/Image/Image.docs.js +48 -0
- package/dist/components/Image/Image.js +75 -0
- package/dist/components/Image/index.d.ts +1 -0
- package/dist/components/Image/index.js +1 -0
- package/dist/components/Inline/Inline.css +38 -0
- package/dist/components/Inline/Inline.css.d.ts +4 -0
- package/dist/components/Inline/Inline.css.js +18 -0
- package/dist/components/Inline/Inline.d.ts +300 -0
- package/dist/components/Inline/Inline.docs.d.ts +19 -0
- package/dist/components/Inline/Inline.docs.js +48 -0
- package/dist/components/Inline/Inline.js +13 -0
- package/dist/components/Inline/index.d.ts +1 -0
- package/dist/components/Inline/index.js +1 -0
- package/dist/components/Link/Link.css +57 -0
- package/dist/components/Link/Link.css.d.ts +5 -0
- package/dist/components/Link/Link.css.js +14 -0
- package/dist/components/Link/Link.d.ts +19 -0
- package/dist/components/Link/Link.docs.d.ts +19 -0
- package/dist/components/Link/Link.docs.js +51 -0
- package/dist/components/Link/Link.js +39 -0
- package/dist/components/Link/index.d.ts +1 -0
- package/dist/components/Link/index.js +1 -0
- package/dist/components/List/List.css +39 -0
- package/dist/components/List/List.css.d.ts +5 -0
- package/dist/components/List/List.css.js +14 -0
- package/dist/components/List/List.d.ts +294 -0
- package/dist/components/List/List.docs.d.ts +19 -0
- package/dist/components/List/List.docs.js +43 -0
- package/dist/components/List/List.js +25 -0
- package/dist/components/List/index.d.ts +1 -0
- package/dist/components/List/index.js +1 -0
- package/dist/components/Menu/Menu.css +65 -0
- package/dist/components/Menu/Menu.css.d.ts +5 -0
- package/dist/components/Menu/Menu.css.js +9 -0
- package/dist/components/Menu/Menu.d.ts +60 -0
- package/dist/components/Menu/Menu.docs.d.ts +19 -0
- package/dist/components/Menu/Menu.docs.js +53 -0
- package/dist/components/Menu/Menu.js +192 -0
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Menu/index.js +1 -0
- package/dist/components/NavBar/NavBar.css +187 -0
- package/dist/components/NavBar/NavBar.css.d.ts +16 -0
- package/dist/components/NavBar/NavBar.css.js +19 -0
- package/dist/components/NavBar/NavBar.d.ts +31 -0
- package/dist/components/NavBar/NavBar.docs.d.ts +19 -0
- package/dist/components/NavBar/NavBar.docs.js +53 -0
- package/dist/components/NavBar/NavBar.js +110 -0
- package/dist/components/NavBar/index.d.ts +1 -0
- package/dist/components/NavBar/index.js +1 -0
- package/dist/components/Popover/Popover.css +28 -0
- package/dist/components/Popover/Popover.css.d.ts +3 -0
- package/dist/components/Popover/Popover.css.js +8 -0
- package/dist/components/Popover/Popover.d.ts +40 -0
- package/dist/components/Popover/Popover.docs.d.ts +19 -0
- package/dist/components/Popover/Popover.docs.js +50 -0
- package/dist/components/Popover/Popover.js +69 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Popover/index.js +1 -0
- package/dist/components/Progress/Progress.css +106 -0
- package/dist/components/Progress/Progress.css.d.ts +10 -0
- package/dist/components/Progress/Progress.css.js +24 -0
- package/dist/components/Progress/Progress.d.ts +23 -0
- package/dist/components/Progress/Progress.docs.d.ts +19 -0
- package/dist/components/Progress/Progress.docs.js +43 -0
- package/dist/components/Progress/Progress.js +54 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/Progress/index.js +1 -0
- package/dist/components/PromptInput/PromptInput.css +25 -0
- package/dist/components/PromptInput/PromptInput.css.d.ts +5 -0
- package/dist/components/PromptInput/PromptInput.css.js +8 -0
- package/dist/components/PromptInput/PromptInput.d.ts +65 -0
- package/dist/components/PromptInput/PromptInput.docs.d.ts +19 -0
- package/dist/components/PromptInput/PromptInput.docs.js +45 -0
- package/dist/components/PromptInput/PromptInput.js +91 -0
- package/dist/components/PromptInput/index.d.ts +1 -0
- package/dist/components/PromptInput/index.js +1 -0
- package/dist/components/Quote/Quote.css +31 -0
- package/dist/components/Quote/Quote.css.d.ts +5 -0
- package/dist/components/Quote/Quote.css.js +9 -0
- package/dist/components/Quote/Quote.d.ts +13 -0
- package/dist/components/Quote/Quote.docs.d.ts +19 -0
- package/dist/components/Quote/Quote.docs.js +30 -0
- package/dist/components/Quote/Quote.js +26 -0
- package/dist/components/Quote/index.d.ts +1 -0
- package/dist/components/Quote/index.js +1 -0
- package/dist/components/RadioGroup/RadioGroup.css +70 -0
- package/dist/components/RadioGroup/RadioGroup.css.d.ts +4 -0
- package/dist/components/RadioGroup/RadioGroup.css.js +12 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +32 -0
- package/dist/components/RadioGroup/RadioGroup.docs.d.ts +19 -0
- package/dist/components/RadioGroup/RadioGroup.docs.js +47 -0
- package/dist/components/RadioGroup/RadioGroup.js +85 -0
- package/dist/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/RadioGroup/index.js +1 -0
- package/dist/components/Select/Select.css +17 -0
- package/dist/components/Select/Select.css.d.ts +3 -0
- package/dist/components/Select/Select.css.js +7 -0
- package/dist/components/Select/Select.d.ts +26 -0
- package/dist/components/Select/Select.docs.d.ts +19 -0
- package/dist/components/Select/Select.docs.js +35 -0
- package/dist/components/Select/Select.js +57 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/index.js +1 -0
- package/dist/components/SideNav/SideNav.css +74 -0
- package/dist/components/SideNav/SideNav.css.d.ts +7 -0
- package/dist/components/SideNav/SideNav.css.js +12 -0
- package/dist/components/SideNav/SideNav.d.ts +23 -0
- package/dist/components/SideNav/SideNav.docs.d.ts +19 -0
- package/dist/components/SideNav/SideNav.docs.js +43 -0
- package/dist/components/SideNav/SideNav.js +55 -0
- package/dist/components/SideNav/index.d.ts +1 -0
- package/dist/components/SideNav/index.js +1 -0
- package/dist/components/Skeleton/Skeleton.css +45 -0
- package/dist/components/Skeleton/Skeleton.css.d.ts +3 -0
- package/dist/components/Skeleton/Skeleton.css.js +11 -0
- package/dist/components/Skeleton/Skeleton.d.ts +25 -0
- package/dist/components/Skeleton/Skeleton.docs.d.ts +19 -0
- package/dist/components/Skeleton/Skeleton.docs.js +43 -0
- package/dist/components/Skeleton/Skeleton.js +27 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Skeleton/index.js +1 -0
- package/dist/components/Spinner/Spinner.css +46 -0
- package/dist/components/Spinner/Spinner.css.d.ts +5 -0
- package/dist/components/Spinner/Spinner.css.js +13 -0
- package/dist/components/Spinner/Spinner.d.ts +24 -0
- package/dist/components/Spinner/Spinner.docs.d.ts +19 -0
- package/dist/components/Spinner/Spinner.docs.js +44 -0
- package/dist/components/Spinner/Spinner.js +46 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Spinner/index.js +1 -0
- package/dist/components/Stack/Stack.css +21 -0
- package/dist/components/Stack/Stack.css.d.ts +2 -0
- package/dist/components/Stack/Stack.css.js +10 -0
- package/dist/components/Stack/Stack.d.ts +296 -0
- package/dist/components/Stack/Stack.docs.d.ts +19 -0
- package/dist/components/Stack/Stack.docs.js +48 -0
- package/dist/components/Stack/Stack.js +13 -0
- package/dist/components/Stack/index.d.ts +1 -0
- package/dist/components/Stack/index.js +1 -0
- package/dist/components/Stat/Stat.css +59 -0
- package/dist/components/Stat/Stat.css.d.ts +13 -0
- package/dist/components/Stat/Stat.css.js +18 -0
- package/dist/components/Stat/Stat.d.ts +20 -0
- package/dist/components/Stat/Stat.docs.d.ts +19 -0
- package/dist/components/Stat/Stat.docs.js +52 -0
- package/dist/components/Stat/Stat.js +49 -0
- package/dist/components/Stat/index.d.ts +1 -0
- package/dist/components/Stat/index.js +1 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.css +46 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.css.d.ts +5 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.css.js +13 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.d.ts +22 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.docs.d.ts +19 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.docs.js +43 -0
- package/dist/components/StreamingIndicator/StreamingIndicator.js +31 -0
- package/dist/components/StreamingIndicator/index.d.ts +1 -0
- package/dist/components/StreamingIndicator/index.js +1 -0
- package/dist/components/Switch/Switch.css +89 -0
- package/dist/components/Switch/Switch.css.d.ts +4 -0
- package/dist/components/Switch/Switch.css.js +9 -0
- package/dist/components/Switch/Switch.d.ts +21 -0
- package/dist/components/Switch/Switch.docs.d.ts +19 -0
- package/dist/components/Switch/Switch.docs.js +36 -0
- package/dist/components/Switch/Switch.js +51 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Switch/index.js +1 -0
- package/dist/components/TabBar/TabBar.css +94 -0
- package/dist/components/TabBar/TabBar.css.d.ts +7 -0
- package/dist/components/TabBar/TabBar.css.js +12 -0
- package/dist/components/TabBar/TabBar.d.ts +23 -0
- package/dist/components/TabBar/TabBar.docs.d.ts +19 -0
- package/dist/components/TabBar/TabBar.docs.js +43 -0
- package/dist/components/TabBar/TabBar.js +50 -0
- package/dist/components/TabBar/index.d.ts +1 -0
- package/dist/components/TabBar/index.js +1 -0
- package/dist/components/Table/Table.css +75 -0
- package/dist/components/Table/Table.css.d.ts +10 -0
- package/dist/components/Table/Table.css.js +22 -0
- package/dist/components/Table/Table.d.ts +32 -0
- package/dist/components/Table/Table.docs.d.ts +19 -0
- package/dist/components/Table/Table.docs.js +49 -0
- package/dist/components/Table/Table.js +69 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +1 -0
- package/dist/components/Tabs/Tabs.css +79 -0
- package/dist/components/Tabs/Tabs.css.d.ts +6 -0
- package/dist/components/Tabs/Tabs.css.js +14 -0
- package/dist/components/Tabs/Tabs.d.ts +33 -0
- package/dist/components/Tabs/Tabs.docs.d.ts +19 -0
- package/dist/components/Tabs/Tabs.docs.js +56 -0
- package/dist/components/Tabs/Tabs.js +90 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +1 -0
- package/dist/components/Tag/Tag.css +63 -0
- package/dist/components/Tag/Tag.css.d.ts +5 -0
- package/dist/components/Tag/Tag.css.js +10 -0
- package/dist/components/Tag/Tag.d.ts +13 -0
- package/dist/components/Tag/Tag.docs.d.ts +19 -0
- package/dist/components/Tag/Tag.docs.js +39 -0
- package/dist/components/Tag/Tag.js +35 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/Tag/index.js +1 -0
- package/dist/components/Text/Text.css +86 -0
- package/dist/components/Text/Text.css.d.ts +6 -0
- package/dist/components/Text/Text.css.js +39 -0
- package/dist/components/Text/Text.d.ts +310 -0
- package/dist/components/Text/Text.docs.d.ts +19 -0
- package/dist/components/Text/Text.docs.js +52 -0
- package/dist/components/Text/Text.js +12 -0
- package/dist/components/Text/index.d.ts +1 -0
- package/dist/components/Text/index.js +1 -0
- package/dist/components/TextArea/TextArea.css +8 -0
- package/dist/components/TextArea/TextArea.css.d.ts +1 -0
- package/dist/components/TextArea/TextArea.css.js +5 -0
- package/dist/components/TextArea/TextArea.d.ts +15 -0
- package/dist/components/TextArea/TextArea.docs.d.ts +19 -0
- package/dist/components/TextArea/TextArea.docs.js +31 -0
- package/dist/components/TextArea/TextArea.js +33 -0
- package/dist/components/TextArea/index.d.ts +1 -0
- package/dist/components/TextArea/index.js +1 -0
- package/dist/components/TextField/TextField.d.ts +14 -0
- package/dist/components/TextField/TextField.docs.d.ts +19 -0
- package/dist/components/TextField/TextField.docs.js +59 -0
- package/dist/components/TextField/TextField.js +32 -0
- package/dist/components/TextField/index.d.ts +1 -0
- package/dist/components/TextField/index.js +1 -0
- package/dist/components/Timeline/Timeline.css +100 -0
- package/dist/components/Timeline/Timeline.css.d.ts +10 -0
- package/dist/components/Timeline/Timeline.css.js +15 -0
- package/dist/components/Timeline/Timeline.d.ts +22 -0
- package/dist/components/Timeline/Timeline.docs.d.ts +19 -0
- package/dist/components/Timeline/Timeline.docs.js +39 -0
- package/dist/components/Timeline/Timeline.js +42 -0
- package/dist/components/Timeline/index.d.ts +1 -0
- package/dist/components/Timeline/index.js +1 -0
- package/dist/components/Toast/Toast.css +106 -0
- package/dist/components/Toast/Toast.css.d.ts +11 -0
- package/dist/components/Toast/Toast.css.js +25 -0
- package/dist/components/Toast/Toast.d.ts +30 -0
- package/dist/components/Toast/Toast.docs.d.ts +19 -0
- package/dist/components/Toast/Toast.docs.js +49 -0
- package/dist/components/Toast/Toast.js +68 -0
- package/dist/components/Toast/ToastProvider.d.ts +12 -0
- package/dist/components/Toast/ToastProvider.js +140 -0
- package/dist/components/Toast/index.d.ts +3 -0
- package/dist/components/Toast/index.js +4 -0
- package/dist/components/Toast/toast-context.d.ts +21 -0
- package/dist/components/Toast/toast-context.js +11 -0
- package/dist/components/Tooltip/Tooltip.css +18 -0
- package/dist/components/Tooltip/Tooltip.css.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.css.js +5 -0
- package/dist/components/Tooltip/Tooltip.d.ts +45 -0
- package/dist/components/Tooltip/Tooltip.docs.d.ts +19 -0
- package/dist/components/Tooltip/Tooltip.docs.js +47 -0
- package/dist/components/Tooltip/Tooltip.js +93 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Tooltip/index.js +1 -0
- package/dist/icons/index.d.ts +293 -0
- package/dist/icons/index.js +395 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +59 -0
- package/dist/internal/Field.d.ts +31 -0
- package/dist/internal/Field.js +54 -0
- package/dist/internal/field-ids.d.ts +7 -0
- package/dist/internal/field-ids.js +18 -0
- package/dist/internal/field.css +131 -0
- package/dist/internal/field.css.d.ts +16 -0
- package/dist/internal/field.css.js +22 -0
- package/dist/internal/floating-geometry.d.ts +42 -0
- package/dist/internal/floating-geometry.js +55 -0
- package/dist/internal/floating.css +36 -0
- package/dist/internal/floating.css.d.ts +8 -0
- package/dist/internal/floating.css.js +6 -0
- package/dist/internal/floating.d.ts +27 -0
- package/dist/internal/floating.js +118 -0
- package/dist/internal/useControllableState.d.ts +16 -0
- package/dist/internal/useControllableState.js +28 -0
- package/dist/internal/useOverflow.d.ts +7 -0
- package/dist/internal/useOverflow.js +24 -0
- package/dist/internal/usePopover.d.ts +28 -0
- package/dist/internal/usePopover.js +91 -0
- package/dist/manifest.json +12308 -0
- package/dist/patterns/dashboard-overview.docs.d.ts +22 -0
- package/dist/patterns/dashboard-overview.docs.js +80 -0
- package/dist/patterns/empty-state.docs.d.ts +22 -0
- package/dist/patterns/empty-state.docs.js +60 -0
- package/dist/patterns/index.d.ts +6 -0
- package/dist/patterns/index.js +14 -0
- package/dist/patterns/profile-card.docs.d.ts +22 -0
- package/dist/patterns/profile-card.docs.js +72 -0
- package/dist/patterns/settings-page.docs.d.ts +22 -0
- package/dist/patterns/settings-page.docs.js +76 -0
- package/dist/patterns/sign-in-form.docs.d.ts +22 -0
- package/dist/patterns/sign-in-form.docs.js +84 -0
- package/dist/primitives/VisuallyHidden.d.ts +13 -0
- package/dist/primitives/VisuallyHidden.js +18 -0
- package/dist/providers/LinkProvider.d.ts +18 -0
- package/dist/providers/LinkProvider.js +23 -0
- package/dist/providers/StringsProvider.d.ts +14 -0
- package/dist/providers/StringsProvider.js +25 -0
- package/dist/providers/link-context.d.ts +12 -0
- package/dist/providers/link-context.js +15 -0
- package/dist/providers/strings.d.ts +64 -0
- package/dist/providers/strings.js +38 -0
- package/dist/registry/gaps.d.ts +30 -0
- package/dist/registry/gaps.js +208 -0
- package/dist/registry/generated.d.ts +5 -0
- package/dist/registry/generated.js +2821 -0
- package/dist/registry/index.d.ts +36 -0
- package/dist/registry/index.js +201 -0
- package/dist/registry/types.d.ts +84 -0
- package/dist/styles/base.css +9 -0
- package/dist/styles/base.css.d.ts +1 -0
- package/dist/styles/base.css.js +1 -0
- package/dist/styles/layout.css +33 -0
- package/dist/styles/layout.css.d.ts +1 -0
- package/dist/styles/layout.css.js +17 -0
- package/dist/styles/shared.css +16 -0
- package/dist/styles/shared.css.d.ts +35 -0
- package/dist/styles/shared.css.js +5 -0
- package/dist/styles.css +3406 -0
- package/dist/themes/blueprint.css +115 -0
- package/dist/themes/contrast.d.ts +26 -0
- package/dist/themes/contrast.js +114 -0
- package/dist/themes/define.d.ts +9 -0
- package/dist/themes/define.js +29 -0
- package/dist/themes/dtcg.d.ts +126 -0
- package/dist/themes/dtcg.js +268 -0
- package/dist/themes/index.d.ts +19 -0
- package/dist/themes/index.js +21 -0
- package/dist/themes/letterpress.css +115 -0
- package/dist/themes/letterpress.d.ts +7 -0
- package/dist/themes/letterpress.js +187 -0
- package/dist/themes/presets/blueprint.d.ts +6 -0
- package/dist/themes/presets/blueprint.js +183 -0
- package/dist/themes/runtime/browser.d.ts +47 -0
- package/dist/themes/runtime/browser.js +164 -0
- package/dist/themes/runtime/cache.d.ts +43 -0
- package/dist/themes/runtime/cache.js +87 -0
- package/dist/themes/runtime/css.d.ts +43 -0
- package/dist/themes/runtime/css.js +89 -0
- package/dist/themes/runtime/diff.d.ts +22 -0
- package/dist/themes/runtime/diff.js +43 -0
- package/dist/themes/types.d.ts +59 -0
- package/dist/themes/values.d.ts +12 -0
- package/dist/themes/values.js +40 -0
- package/dist/tokens/blueprint.dark.tokens.json +1361 -0
- package/dist/tokens/blueprint.light.tokens.json +1361 -0
- package/dist/tokens/contract.d.ts +252 -0
- package/dist/tokens/contract.js +249 -0
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.js +1 -0
- package/dist/tokens/letterpress.dark.tokens.json +1391 -0
- package/dist/tokens/letterpress.light.tokens.json +1391 -0
- package/dist/tokens/tokens.css +117 -0
- package/dist/tokens/tokens.css.d.ts +128 -0
- package/dist/tokens/tokens.css.js +121 -0
- package/dist/utils/cx.d.ts +7 -0
- package/dist/utils/cx.js +14 -0
- package/dist/utils/space.d.ts +5 -0
- package/dist/utils/space.js +7 -0
- package/package.json +104 -3
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The token contract: every token's group, key, CSS variable name, and what
|
|
3
|
+
* it is for. Plain data with no vanilla-extract import, so Node scripts, the
|
|
4
|
+
* manifest, and runtime themes can read it.
|
|
5
|
+
*
|
|
6
|
+
* Names follow `--dw-<group>-<key>` in kebab case: `color.bgElevated` is
|
|
7
|
+
* `--dw-color-bg-elevated` and `fontSize['2xl']` is `--dw-font-size-2xl`.
|
|
8
|
+
* Names are public API. Do not rename one without a migration.
|
|
9
|
+
*/
|
|
10
|
+
export declare const tokenGroups: {
|
|
11
|
+
readonly color: {
|
|
12
|
+
readonly label: "Color";
|
|
13
|
+
readonly description: "Semantic color roles. Light and dark values are paired, so a role means the same thing in both modes.";
|
|
14
|
+
readonly modes: true;
|
|
15
|
+
readonly tokens: {
|
|
16
|
+
readonly bg: "Page background.";
|
|
17
|
+
readonly bgElevated: "Raised surfaces: cards, inputs, menus, dialogs.";
|
|
18
|
+
readonly bgMuted: "Quiet fills: tags, inline code, hover backgrounds.";
|
|
19
|
+
readonly text: "Primary text and icons.";
|
|
20
|
+
readonly textMuted: "Secondary text: hints, captions, metadata. Still meets 4.5:1.";
|
|
21
|
+
readonly border: "Decorative dividers and quiet outlines. Not for controls.";
|
|
22
|
+
readonly borderStrong: "Control and card borders. Meets 3:1 against bg and bgElevated.";
|
|
23
|
+
readonly accent: "Links, primary actions, and the one color that means \"act\".";
|
|
24
|
+
readonly accentHover: "Hover and pressed state for accent.";
|
|
25
|
+
readonly onAccent: "Text and icons on an accent fill.";
|
|
26
|
+
readonly accentSoft: "Tinted background for selected or highlighted items.";
|
|
27
|
+
readonly focus: "Focus ring. Meets 3:1 against every surface.";
|
|
28
|
+
readonly positive: "Success text and icons.";
|
|
29
|
+
readonly positiveSoft: "Success background.";
|
|
30
|
+
readonly warning: "Warning text and icons.";
|
|
31
|
+
readonly warningSoft: "Warning background.";
|
|
32
|
+
readonly danger: "Errors, destructive actions, and invalid fields.";
|
|
33
|
+
readonly dangerSoft: "Error background.";
|
|
34
|
+
readonly onDanger: "Text and icons on a danger fill.";
|
|
35
|
+
readonly info: "Informational text and icons.";
|
|
36
|
+
readonly infoSoft: "Informational background.";
|
|
37
|
+
readonly shadow: "Legacy large shadow. Prefer the elevation scale.";
|
|
38
|
+
readonly bgTexture: "Page texture painted over bg: CSS background layers, or none. Not a color, so contrast checks skip it.";
|
|
39
|
+
readonly scrim: "Translucent wash behind a modal dialog. Any CSS color, so contrast checks skip it.";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
readonly elevation: {
|
|
43
|
+
readonly label: "Elevation";
|
|
44
|
+
readonly description: "Box shadows for layered surfaces. Dark mode uses deeper, darker shadows.";
|
|
45
|
+
readonly modes: true;
|
|
46
|
+
readonly tokens: {
|
|
47
|
+
readonly sm: "Resting cards and small raised controls.";
|
|
48
|
+
readonly md: "Menus, popovers, and hovered cards.";
|
|
49
|
+
readonly lg: "Dialogs and anything that floats over the page.";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
readonly font: {
|
|
53
|
+
readonly label: "Font";
|
|
54
|
+
readonly description: "Semantic font roles. A theme can swap the family behind a role without the name lying.";
|
|
55
|
+
readonly modes: false;
|
|
56
|
+
readonly tokens: {
|
|
57
|
+
readonly display: "Headlines and large numbers.";
|
|
58
|
+
readonly body: "Reading text and controls.";
|
|
59
|
+
readonly mono: "Code, labels, and eyebrows.";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
readonly fontSize: {
|
|
63
|
+
readonly label: "Font size";
|
|
64
|
+
readonly description: "Type scale. The three largest steps are fluid and grow with the viewport.";
|
|
65
|
+
readonly modes: false;
|
|
66
|
+
readonly tokens: {
|
|
67
|
+
readonly xs: "Eyebrows, badges, and fine print.";
|
|
68
|
+
readonly sm: "Secondary text, tags, and compact controls.";
|
|
69
|
+
readonly md: "Body text and default controls.";
|
|
70
|
+
readonly lg: "Ledes and large controls.";
|
|
71
|
+
readonly xl: "Card titles and small headings.";
|
|
72
|
+
readonly '2xl': "Section subheadings.";
|
|
73
|
+
readonly '3xl': "Page and section titles.";
|
|
74
|
+
readonly display: "One hero headline per page.";
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
readonly line: {
|
|
78
|
+
readonly label: "Line height";
|
|
79
|
+
readonly description: "Leading for display, headings, and reading text.";
|
|
80
|
+
readonly modes: false;
|
|
81
|
+
readonly tokens: {
|
|
82
|
+
readonly tight: "Display type only.";
|
|
83
|
+
readonly snug: "Headings, ledes, and controls.";
|
|
84
|
+
readonly body: "Paragraphs and lists.";
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
readonly weight: {
|
|
88
|
+
readonly label: "Font weight";
|
|
89
|
+
readonly description: "Weights the default fonts load.";
|
|
90
|
+
readonly modes: false;
|
|
91
|
+
readonly tokens: {
|
|
92
|
+
readonly regular: "Body text.";
|
|
93
|
+
readonly medium: "Labels and navigation.";
|
|
94
|
+
readonly semibold: "Headings, buttons, and emphasis.";
|
|
95
|
+
readonly bold: "Rare. Numbers that must stand out.";
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly tracking: {
|
|
99
|
+
readonly label: "Letter spacing";
|
|
100
|
+
readonly description: "Tracking for display type and uppercase labels.";
|
|
101
|
+
readonly modes: false;
|
|
102
|
+
readonly tokens: {
|
|
103
|
+
readonly tight: "Large display and page titles.";
|
|
104
|
+
readonly snug: "Headings.";
|
|
105
|
+
readonly wide: "Uppercase mono labels.";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly space: {
|
|
109
|
+
readonly label: "Space";
|
|
110
|
+
readonly description: "Spacing scale on a 0.25rem grid. Use it for gaps, padding, and margins.";
|
|
111
|
+
readonly modes: false;
|
|
112
|
+
readonly tokens: {
|
|
113
|
+
readonly 1: "0.25rem step.";
|
|
114
|
+
readonly 2: "0.5rem step.";
|
|
115
|
+
readonly 3: "0.75rem step.";
|
|
116
|
+
readonly 4: "1rem step. The default gap.";
|
|
117
|
+
readonly 5: "1.25rem step.";
|
|
118
|
+
readonly 6: "1.5rem step. Card padding.";
|
|
119
|
+
readonly 8: "2rem step.";
|
|
120
|
+
readonly 10: "2.5rem step.";
|
|
121
|
+
readonly 12: "3rem step.";
|
|
122
|
+
readonly 16: "4rem step.";
|
|
123
|
+
readonly 20: "5rem step.";
|
|
124
|
+
readonly 24: "6rem step.";
|
|
125
|
+
readonly page: "Fluid page gutter.";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
readonly size: {
|
|
129
|
+
readonly label: "Size";
|
|
130
|
+
readonly description: "Fixed layout measures.";
|
|
131
|
+
readonly modes: false;
|
|
132
|
+
readonly tokens: {
|
|
133
|
+
readonly content: "Maximum content width.";
|
|
134
|
+
readonly prose: "Comfortable reading measure.";
|
|
135
|
+
readonly header: "Height of a sticky site header.";
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
readonly radius: {
|
|
139
|
+
readonly label: "Radius";
|
|
140
|
+
readonly description: "Corner radii, from small controls to pills.";
|
|
141
|
+
readonly modes: false;
|
|
142
|
+
readonly tokens: {
|
|
143
|
+
readonly sm: "Small marks, inline code, nav items.";
|
|
144
|
+
readonly md: "Buttons and inputs.";
|
|
145
|
+
readonly lg: "Cards, alerts, and dialogs.";
|
|
146
|
+
readonly pill: "Tags, badges, and round buttons.";
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
readonly control: {
|
|
150
|
+
readonly label: "Control height";
|
|
151
|
+
readonly description: "Minimum heights for buttons and inputs. md is a 44px touch target.";
|
|
152
|
+
readonly modes: false;
|
|
153
|
+
readonly tokens: {
|
|
154
|
+
readonly sm: "Compact controls in dense UI.";
|
|
155
|
+
readonly md: "Default controls.";
|
|
156
|
+
readonly lg: "Prominent calls to action.";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
readonly border: {
|
|
160
|
+
readonly label: "Border width";
|
|
161
|
+
readonly description: "Stroke widths for outlines, buttons, and focus.";
|
|
162
|
+
readonly modes: false;
|
|
163
|
+
readonly tokens: {
|
|
164
|
+
readonly thin: "Cards, inputs, and dividers.";
|
|
165
|
+
readonly medium: "Buttons.";
|
|
166
|
+
readonly thick: "Focus rings and accent rules.";
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
readonly duration: {
|
|
170
|
+
readonly label: "Duration";
|
|
171
|
+
readonly description: "Motion timing. Components drop motion under prefers-reduced-motion.";
|
|
172
|
+
readonly modes: false;
|
|
173
|
+
readonly tokens: {
|
|
174
|
+
readonly fast: "Color and border changes on hover.";
|
|
175
|
+
readonly base: "Small movements: switches, chevrons.";
|
|
176
|
+
readonly slow: "Entrances: dialogs and panels.";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly easing: {
|
|
180
|
+
readonly label: "Easing";
|
|
181
|
+
readonly description: "Motion curves.";
|
|
182
|
+
readonly modes: false;
|
|
183
|
+
readonly tokens: {
|
|
184
|
+
readonly standard: "Most transitions.";
|
|
185
|
+
readonly emphasized: "Entrances that should settle softly.";
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
readonly layer: {
|
|
189
|
+
readonly label: "Layer";
|
|
190
|
+
readonly description: "Stacking order (z-index) for things that sit above the page. Popovers, menus, and dialogs use the browser top layer and need none.";
|
|
191
|
+
readonly modes: false;
|
|
192
|
+
readonly tokens: {
|
|
193
|
+
readonly raised: "Above siblings in the same surface, like a stretched card link.";
|
|
194
|
+
readonly sticky: "Sticky headers and tab bars.";
|
|
195
|
+
readonly overlay: "Floating panels that cannot use the top layer.";
|
|
196
|
+
readonly toast: "Toasts, above everything else on the page.";
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
readonly opacity: {
|
|
200
|
+
readonly label: "Opacity";
|
|
201
|
+
readonly description: "Fixed opacities for states.";
|
|
202
|
+
readonly modes: false;
|
|
203
|
+
readonly tokens: {
|
|
204
|
+
readonly disabled: "Disabled controls. Pair it with a not-allowed cursor.";
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
export type TokenGroups = typeof tokenGroups;
|
|
209
|
+
export type TokenGroupName = keyof TokenGroups;
|
|
210
|
+
export type TokenKey<G extends TokenGroupName> = keyof TokenGroups[G]['tokens'];
|
|
211
|
+
/** A full set of values for one group, keyed like the contract. */
|
|
212
|
+
export type TokenValues<G extends TokenGroupName> = {
|
|
213
|
+
-readonly [K in TokenKey<G>]: string;
|
|
214
|
+
};
|
|
215
|
+
/** The contract shape: group → key → CSS variable name without `--`. */
|
|
216
|
+
export type ThemeContract = {
|
|
217
|
+
[G in TokenGroupName]: TokenValues<G>;
|
|
218
|
+
};
|
|
219
|
+
/** Groups whose values change between light and dark mode. */
|
|
220
|
+
export declare const modeGroups: ["color", "elevation"];
|
|
221
|
+
export type ModeGroupName = (typeof modeGroups)[number];
|
|
222
|
+
/** Groups with one value for both modes. */
|
|
223
|
+
export declare const staticGroups: ("border" | "font" | "fontSize" | "line" | "weight" | "tracking" | "space" | "size" | "radius" | "control" | "duration" | "easing" | "layer" | "opacity")[];
|
|
224
|
+
export type StaticGroupName = Exclude<TokenGroupName, ModeGroupName>;
|
|
225
|
+
/** `cssVarName('color', 'bgElevated')` → `--dw-color-bg-elevated`. */
|
|
226
|
+
export declare function cssVarName(group: string, key: string | number): string;
|
|
227
|
+
/** `cssVar('space', 4)` → `var(--dw-space-4)`. */
|
|
228
|
+
export declare function cssVar(group: string, key: string | number): string;
|
|
229
|
+
/**
|
|
230
|
+
* Group → key → variable name without the leading `--`, the shape
|
|
231
|
+
* vanilla-extract's `createGlobalThemeContract` expects.
|
|
232
|
+
*/
|
|
233
|
+
export declare const contract: ThemeContract;
|
|
234
|
+
export type TokenEntry = {
|
|
235
|
+
group: TokenGroupName;
|
|
236
|
+
key: string;
|
|
237
|
+
cssVar: string;
|
|
238
|
+
description: string;
|
|
239
|
+
};
|
|
240
|
+
/** Every token as a flat list, in documented order. */
|
|
241
|
+
export declare function listTokens(): TokenEntry[];
|
|
242
|
+
/**
|
|
243
|
+
* Widths where components change layout, for container queries. These are
|
|
244
|
+
* build-time constants, not CSS variables, because `@container` conditions
|
|
245
|
+
* cannot read custom properties. Presets cannot change them.
|
|
246
|
+
*/
|
|
247
|
+
export declare const containerBreakpoints: {
|
|
248
|
+
/** Two-column layouts start, e.g. Timeline puts dates beside entries. */
|
|
249
|
+
readonly sm: "36rem";
|
|
250
|
+
/** Full navigation fits, e.g. NavBar shows its links inline. */
|
|
251
|
+
readonly md: "48rem";
|
|
252
|
+
};
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
// src/tokens/contract.ts
|
|
2
|
+
var tokenGroups = {
|
|
3
|
+
color: {
|
|
4
|
+
label: "Color",
|
|
5
|
+
description: "Semantic color roles. Light and dark values are paired, so a role means the same thing in both modes.",
|
|
6
|
+
modes: true,
|
|
7
|
+
tokens: {
|
|
8
|
+
bg: "Page background.",
|
|
9
|
+
bgElevated: "Raised surfaces: cards, inputs, menus, dialogs.",
|
|
10
|
+
bgMuted: "Quiet fills: tags, inline code, hover backgrounds.",
|
|
11
|
+
text: "Primary text and icons.",
|
|
12
|
+
textMuted: "Secondary text: hints, captions, metadata. Still meets 4.5:1.",
|
|
13
|
+
border: "Decorative dividers and quiet outlines. Not for controls.",
|
|
14
|
+
borderStrong: "Control and card borders. Meets 3:1 against bg and bgElevated.",
|
|
15
|
+
accent: "Links, primary actions, and the one color that means \"act\".",
|
|
16
|
+
accentHover: "Hover and pressed state for accent.",
|
|
17
|
+
onAccent: "Text and icons on an accent fill.",
|
|
18
|
+
accentSoft: "Tinted background for selected or highlighted items.",
|
|
19
|
+
focus: "Focus ring. Meets 3:1 against every surface.",
|
|
20
|
+
positive: "Success text and icons.",
|
|
21
|
+
positiveSoft: "Success background.",
|
|
22
|
+
warning: "Warning text and icons.",
|
|
23
|
+
warningSoft: "Warning background.",
|
|
24
|
+
danger: "Errors, destructive actions, and invalid fields.",
|
|
25
|
+
dangerSoft: "Error background.",
|
|
26
|
+
onDanger: "Text and icons on a danger fill.",
|
|
27
|
+
info: "Informational text and icons.",
|
|
28
|
+
infoSoft: "Informational background.",
|
|
29
|
+
shadow: "Legacy large shadow. Prefer the elevation scale.",
|
|
30
|
+
bgTexture: "Page texture painted over bg: CSS background layers, or none. Not a color, so contrast checks skip it.",
|
|
31
|
+
scrim: "Translucent wash behind a modal dialog. Any CSS color, so contrast checks skip it."
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
elevation: {
|
|
35
|
+
label: "Elevation",
|
|
36
|
+
description: "Box shadows for layered surfaces. Dark mode uses deeper, darker shadows.",
|
|
37
|
+
modes: true,
|
|
38
|
+
tokens: {
|
|
39
|
+
sm: "Resting cards and small raised controls.",
|
|
40
|
+
md: "Menus, popovers, and hovered cards.",
|
|
41
|
+
lg: "Dialogs and anything that floats over the page."
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
font: {
|
|
45
|
+
label: "Font",
|
|
46
|
+
description: "Semantic font roles. A theme can swap the family behind a role without the name lying.",
|
|
47
|
+
modes: false,
|
|
48
|
+
tokens: {
|
|
49
|
+
display: "Headlines and large numbers.",
|
|
50
|
+
body: "Reading text and controls.",
|
|
51
|
+
mono: "Code, labels, and eyebrows."
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
fontSize: {
|
|
55
|
+
label: "Font size",
|
|
56
|
+
description: "Type scale. The three largest steps are fluid and grow with the viewport.",
|
|
57
|
+
modes: false,
|
|
58
|
+
tokens: {
|
|
59
|
+
xs: "Eyebrows, badges, and fine print.",
|
|
60
|
+
sm: "Secondary text, tags, and compact controls.",
|
|
61
|
+
md: "Body text and default controls.",
|
|
62
|
+
lg: "Ledes and large controls.",
|
|
63
|
+
xl: "Card titles and small headings.",
|
|
64
|
+
"2xl": "Section subheadings.",
|
|
65
|
+
"3xl": "Page and section titles.",
|
|
66
|
+
display: "One hero headline per page."
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
line: {
|
|
70
|
+
label: "Line height",
|
|
71
|
+
description: "Leading for display, headings, and reading text.",
|
|
72
|
+
modes: false,
|
|
73
|
+
tokens: {
|
|
74
|
+
tight: "Display type only.",
|
|
75
|
+
snug: "Headings, ledes, and controls.",
|
|
76
|
+
body: "Paragraphs and lists."
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
weight: {
|
|
80
|
+
label: "Font weight",
|
|
81
|
+
description: "Weights the default fonts load.",
|
|
82
|
+
modes: false,
|
|
83
|
+
tokens: {
|
|
84
|
+
regular: "Body text.",
|
|
85
|
+
medium: "Labels and navigation.",
|
|
86
|
+
semibold: "Headings, buttons, and emphasis.",
|
|
87
|
+
bold: "Rare. Numbers that must stand out."
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
tracking: {
|
|
91
|
+
label: "Letter spacing",
|
|
92
|
+
description: "Tracking for display type and uppercase labels.",
|
|
93
|
+
modes: false,
|
|
94
|
+
tokens: {
|
|
95
|
+
tight: "Large display and page titles.",
|
|
96
|
+
snug: "Headings.",
|
|
97
|
+
wide: "Uppercase mono labels."
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
space: {
|
|
101
|
+
label: "Space",
|
|
102
|
+
description: "Spacing scale on a 0.25rem grid. Use it for gaps, padding, and margins.",
|
|
103
|
+
modes: false,
|
|
104
|
+
tokens: {
|
|
105
|
+
1: "0.25rem step.",
|
|
106
|
+
2: "0.5rem step.",
|
|
107
|
+
3: "0.75rem step.",
|
|
108
|
+
4: "1rem step. The default gap.",
|
|
109
|
+
5: "1.25rem step.",
|
|
110
|
+
6: "1.5rem step. Card padding.",
|
|
111
|
+
8: "2rem step.",
|
|
112
|
+
10: "2.5rem step.",
|
|
113
|
+
12: "3rem step.",
|
|
114
|
+
16: "4rem step.",
|
|
115
|
+
20: "5rem step.",
|
|
116
|
+
24: "6rem step.",
|
|
117
|
+
page: "Fluid page gutter."
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
size: {
|
|
121
|
+
label: "Size",
|
|
122
|
+
description: "Fixed layout measures.",
|
|
123
|
+
modes: false,
|
|
124
|
+
tokens: {
|
|
125
|
+
content: "Maximum content width.",
|
|
126
|
+
prose: "Comfortable reading measure.",
|
|
127
|
+
header: "Height of a sticky site header."
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
radius: {
|
|
131
|
+
label: "Radius",
|
|
132
|
+
description: "Corner radii, from small controls to pills.",
|
|
133
|
+
modes: false,
|
|
134
|
+
tokens: {
|
|
135
|
+
sm: "Small marks, inline code, nav items.",
|
|
136
|
+
md: "Buttons and inputs.",
|
|
137
|
+
lg: "Cards, alerts, and dialogs.",
|
|
138
|
+
pill: "Tags, badges, and round buttons."
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
control: {
|
|
142
|
+
label: "Control height",
|
|
143
|
+
description: "Minimum heights for buttons and inputs. md is a 44px touch target.",
|
|
144
|
+
modes: false,
|
|
145
|
+
tokens: {
|
|
146
|
+
sm: "Compact controls in dense UI.",
|
|
147
|
+
md: "Default controls.",
|
|
148
|
+
lg: "Prominent calls to action."
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
border: {
|
|
152
|
+
label: "Border width",
|
|
153
|
+
description: "Stroke widths for outlines, buttons, and focus.",
|
|
154
|
+
modes: false,
|
|
155
|
+
tokens: {
|
|
156
|
+
thin: "Cards, inputs, and dividers.",
|
|
157
|
+
medium: "Buttons.",
|
|
158
|
+
thick: "Focus rings and accent rules."
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
duration: {
|
|
162
|
+
label: "Duration",
|
|
163
|
+
description: "Motion timing. Components drop motion under prefers-reduced-motion.",
|
|
164
|
+
modes: false,
|
|
165
|
+
tokens: {
|
|
166
|
+
fast: "Color and border changes on hover.",
|
|
167
|
+
base: "Small movements: switches, chevrons.",
|
|
168
|
+
slow: "Entrances: dialogs and panels."
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
easing: {
|
|
172
|
+
label: "Easing",
|
|
173
|
+
description: "Motion curves.",
|
|
174
|
+
modes: false,
|
|
175
|
+
tokens: {
|
|
176
|
+
standard: "Most transitions.",
|
|
177
|
+
emphasized: "Entrances that should settle softly."
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
layer: {
|
|
181
|
+
label: "Layer",
|
|
182
|
+
description: "Stacking order (z-index) for things that sit above the page. Popovers, menus, and dialogs use the browser top layer and need none.",
|
|
183
|
+
modes: false,
|
|
184
|
+
tokens: {
|
|
185
|
+
raised: "Above siblings in the same surface, like a stretched card link.",
|
|
186
|
+
sticky: "Sticky headers and tab bars.",
|
|
187
|
+
overlay: "Floating panels that cannot use the top layer.",
|
|
188
|
+
toast: "Toasts, above everything else on the page."
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
opacity: {
|
|
192
|
+
label: "Opacity",
|
|
193
|
+
description: "Fixed opacities for states.",
|
|
194
|
+
modes: false,
|
|
195
|
+
tokens: { disabled: "Disabled controls. Pair it with a not-allowed cursor." }
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
/** Groups whose values change between light and dark mode. */
|
|
199
|
+
var modeGroups = ["color", "elevation"];
|
|
200
|
+
/** Groups with one value for both modes. */
|
|
201
|
+
var staticGroups = Object.keys(tokenGroups).filter((group) => !tokenGroups[group].modes);
|
|
202
|
+
var kebab = (value) => value.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
203
|
+
/** `cssVarName('color', 'bgElevated')` → `--dw-color-bg-elevated`. */
|
|
204
|
+
function cssVarName(group, key) {
|
|
205
|
+
return `--dw-${kebab(group)}-${kebab(String(key))}`;
|
|
206
|
+
}
|
|
207
|
+
/** `cssVar('space', 4)` → `var(--dw-space-4)`. */
|
|
208
|
+
function cssVar(group, key) {
|
|
209
|
+
return `var(${cssVarName(group, key)})`;
|
|
210
|
+
}
|
|
211
|
+
function buildContract() {
|
|
212
|
+
const contract = {};
|
|
213
|
+
for (const [group, spec] of Object.entries(tokenGroups)) {
|
|
214
|
+
contract[group] = {};
|
|
215
|
+
for (const key of Object.keys(spec.tokens)) contract[group][key] = cssVarName(group, key).slice(2);
|
|
216
|
+
}
|
|
217
|
+
return contract;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Group → key → variable name without the leading `--`, the shape
|
|
221
|
+
* vanilla-extract's `createGlobalThemeContract` expects.
|
|
222
|
+
*/
|
|
223
|
+
var contract = buildContract();
|
|
224
|
+
/** Every token as a flat list, in documented order. */
|
|
225
|
+
function listTokens() {
|
|
226
|
+
const entries = [];
|
|
227
|
+
for (const group of Object.keys(tokenGroups)) {
|
|
228
|
+
const tokens = tokenGroups[group].tokens;
|
|
229
|
+
for (const [key, description] of Object.entries(tokens)) entries.push({
|
|
230
|
+
group,
|
|
231
|
+
key,
|
|
232
|
+
cssVar: cssVarName(group, key),
|
|
233
|
+
description
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return entries;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Widths where components change layout, for container queries. These are
|
|
240
|
+
* build-time constants, not CSS variables, because `@container` conditions
|
|
241
|
+
* cannot read custom properties. Presets cannot change them.
|
|
242
|
+
*/
|
|
243
|
+
var containerBreakpoints = {
|
|
244
|
+
/** Two-column layouts start, e.g. Timeline puts dates beside entries. */
|
|
245
|
+
sm: "36rem",
|
|
246
|
+
/** Full navigation fits, e.g. NavBar shows its links inline. */
|
|
247
|
+
md: "48rem"
|
|
248
|
+
};
|
|
249
|
+
export { containerBreakpoints, contract, cssVar, cssVarName, listTokens, modeGroups, staticGroups, tokenGroups };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plain-data token API: names, groups, and descriptions. Safe to import from
|
|
3
|
+
* Node. For styling, import `tokens` from `@derelicious/ds/tokens.css` inside
|
|
4
|
+
* a `.css.ts` file, or from `@derelicious/ds` in components.
|
|
5
|
+
*/
|
|
6
|
+
export { containerBreakpoints, contract, cssVar, cssVarName, listTokens, type ModeGroupName, modeGroups, type StaticGroupName, staticGroups, type ThemeContract, type TokenEntry, type TokenGroupName, type TokenGroups, type TokenKey, type TokenValues, tokenGroups, } from './contract.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { containerBreakpoints, contract, cssVar, cssVarName, listTokens, modeGroups, staticGroups, tokenGroups } from "./contract.js";
|