@traefik-labs/faency 12.3.8 → 13.0.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/dist/_virtual/_rolldown/runtime.cjs +2 -3
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/colors/deepBlue.cjs +1 -2
- package/dist/colors/deepBlue.js +1 -2
- package/dist/colors/elevation.cjs +1 -2
- package/dist/colors/elevation.js +1 -2
- package/dist/colors/grayBlue.cjs +1 -2
- package/dist/colors/grayBlue.js +1 -2
- package/dist/colors/index.cjs +1 -2
- package/dist/colors/index.cjs.map +1 -1
- package/dist/colors/index.js +1 -2
- package/dist/colors/index.js.map +1 -1
- package/dist/colors/neon.cjs +1 -2
- package/dist/colors/neon.js +1 -2
- package/dist/colors/orange.cjs +1 -2
- package/dist/colors/orange.js +1 -2
- package/dist/colors/red.cjs +1 -2
- package/dist/colors/red.js +1 -2
- package/dist/components/AccessibleIcon/AccessibleIcon.cjs +1 -2
- package/dist/components/AccessibleIcon/AccessibleIcon.cjs.map +1 -1
- package/dist/components/AccessibleIcon/AccessibleIcon.js +1 -2
- package/dist/components/AccessibleIcon/AccessibleIcon.vanilla.cjs +1 -2
- package/dist/components/AccessibleIcon/AccessibleIcon.vanilla.cjs.map +1 -1
- package/dist/components/AccessibleIcon/AccessibleIcon.vanilla.js +1 -2
- package/dist/components/Accordion/Accordion.cjs +1 -2
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.js +1 -2
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.themes.cjs +1 -2
- package/dist/components/Accordion/Accordion.themes.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.themes.js +1 -2
- package/dist/components/Accordion/Accordion.themes.js.map +1 -1
- package/dist/components/Alert/Alert.cjs +1 -2
- package/dist/components/Alert/Alert.cjs.map +1 -1
- package/dist/components/Alert/Alert.js +1 -2
- package/dist/components/AriaTable/AriaTable.cjs +1 -2
- package/dist/components/AriaTable/AriaTable.cjs.map +1 -1
- package/dist/components/AriaTable/AriaTable.js +1 -2
- package/dist/components/AriaTable/AriaTable.js.map +1 -1
- package/dist/components/Avatar/Avatar.cjs +1 -2
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.js +1 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/Avatar.vanilla.cjs +8 -8
- package/dist/components/Avatar/Avatar.vanilla.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.vanilla.css.cjs +1 -2
- package/dist/components/Avatar/Avatar.vanilla.css.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.vanilla.css.js +1 -2
- package/dist/components/Avatar/Avatar.vanilla.css.js.map +1 -1
- package/dist/components/Avatar/Avatar.vanilla.js +8 -8
- package/dist/components/Avatar/Avatar.vanilla.js.map +1 -1
- package/dist/components/Badge/Badge.cjs +4 -4
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.js +4 -4
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/Badge.theme.cjs +1 -2
- package/dist/components/Badge/Badge.theme.js +1 -2
- package/dist/components/Badge/Badge.themes.cjs +1 -2
- package/dist/components/Badge/Badge.themes.cjs.map +1 -1
- package/dist/components/Badge/Badge.themes.js +1 -2
- package/dist/components/Badge/Badge.themes.js.map +1 -1
- package/dist/components/Badge/Badge.vanilla.cjs +8 -8
- package/dist/components/Badge/Badge.vanilla.cjs.map +1 -1
- package/dist/components/Badge/Badge.vanilla.css.cjs +1 -2
- package/dist/components/Badge/Badge.vanilla.css.cjs.map +1 -1
- package/dist/components/Badge/Badge.vanilla.css.js +1 -2
- package/dist/components/Badge/Badge.vanilla.css.js.map +1 -1
- package/dist/components/Badge/Badge.vanilla.js +8 -8
- package/dist/components/Badge/Badge.vanilla.js.map +1 -1
- package/dist/components/Blockquote/Blockquote.cjs +1 -2
- package/dist/components/Blockquote/Blockquote.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.js +1 -2
- package/dist/components/Blockquote/Blockquote.vanilla.cjs +10 -10
- package/dist/components/Blockquote/Blockquote.vanilla.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.vanilla.css.cjs +1 -2
- package/dist/components/Blockquote/Blockquote.vanilla.css.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.vanilla.css.js +1 -2
- package/dist/components/Blockquote/Blockquote.vanilla.css.js.map +1 -1
- package/dist/components/Blockquote/Blockquote.vanilla.js +10 -10
- package/dist/components/Blockquote/Blockquote.vanilla.js.map +1 -1
- package/dist/components/Box/Box.cjs +1 -2
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.js +1 -2
- package/dist/components/Box/Box.vanilla.cjs +1 -2
- package/dist/components/Box/Box.vanilla.cjs.map +1 -1
- package/dist/components/Box/Box.vanilla.css.cjs +1 -2
- package/dist/components/Box/Box.vanilla.css.js +1 -2
- package/dist/components/Box/Box.vanilla.js +1 -2
- package/dist/components/Bubble/Bubble.cjs +1 -2
- package/dist/components/Bubble/Bubble.cjs.map +1 -1
- package/dist/components/Bubble/Bubble.js +18 -17
- package/dist/components/Bubble/Bubble.js.map +1 -1
- package/dist/components/Bubble/Bubble.vanilla.cjs +7 -7
- package/dist/components/Bubble/Bubble.vanilla.cjs.map +1 -1
- package/dist/components/Bubble/Bubble.vanilla.css.cjs +1 -2
- package/dist/components/Bubble/Bubble.vanilla.css.cjs.map +1 -1
- package/dist/components/Bubble/Bubble.vanilla.css.js +1 -2
- package/dist/components/Bubble/Bubble.vanilla.css.js.map +1 -1
- package/dist/components/Bubble/Bubble.vanilla.js +7 -7
- package/dist/components/Bubble/Bubble.vanilla.js.map +1 -1
- package/dist/components/Button/Button.cjs +3 -3
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.themes.cjs +1 -2
- package/dist/components/Button/Button.themes.cjs.map +1 -1
- package/dist/components/Button/Button.themes.js +1 -2
- package/dist/components/Button/Button.themes.js.map +1 -1
- package/dist/components/Button/Button.vanilla.cjs +9 -9
- package/dist/components/Button/Button.vanilla.cjs.map +1 -1
- package/dist/components/Button/Button.vanilla.css.cjs +1 -2
- package/dist/components/Button/Button.vanilla.css.cjs.map +1 -1
- package/dist/components/Button/Button.vanilla.css.js +1 -2
- package/dist/components/Button/Button.vanilla.css.js.map +1 -1
- package/dist/components/Button/Button.vanilla.js +9 -9
- package/dist/components/Button/Button.vanilla.js.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.cjs +1 -2
- package/dist/components/ButtonSwitch/ButtonSwitch.cjs.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.js +1 -2
- package/dist/components/ButtonSwitch/ButtonSwitch.themes.cjs +1 -2
- package/dist/components/ButtonSwitch/ButtonSwitch.themes.cjs.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.themes.js +1 -2
- package/dist/components/ButtonSwitch/ButtonSwitch.themes.js.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.cjs +1 -2
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.cjs.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.css.cjs +1 -2
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.css.js +1 -2
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.js +1 -2
- package/dist/components/Card/Card.cjs +1 -2
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.js +1 -2
- package/dist/components/Card/Card.theme.cjs +1 -2
- package/dist/components/Card/Card.theme.js +1 -2
- package/dist/components/Card/Card.themes.cjs +1 -2
- package/dist/components/Card/Card.themes.cjs.map +1 -1
- package/dist/components/Card/Card.themes.js +1 -2
- package/dist/components/Card/Card.themes.js.map +1 -1
- package/dist/components/Card/Card.vanilla.cjs +1 -2
- package/dist/components/Card/Card.vanilla.cjs.map +1 -1
- package/dist/components/Card/Card.vanilla.css.cjs +1 -2
- package/dist/components/Card/Card.vanilla.css.cjs.map +1 -1
- package/dist/components/Card/Card.vanilla.css.js +1 -2
- package/dist/components/Card/Card.vanilla.css.js.map +1 -1
- package/dist/components/Card/Card.vanilla.js +1 -2
- package/dist/components/Checkbox/Checkbox.cjs +1 -2
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -2
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.themes.cjs +1 -2
- package/dist/components/Checkbox/Checkbox.themes.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.themes.js +1 -2
- package/dist/components/Checkbox/Checkbox.themes.js.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.cjs +1 -2
- package/dist/components/CodeBlock/CodeBlock.cjs.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.js +1 -2
- package/dist/components/CodeBlock/CodeBlock.js.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.themes.cjs +1 -2
- package/dist/components/CodeBlock/CodeBlock.themes.cjs.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.themes.js +1 -2
- package/dist/components/CodeBlock/CodeBlock.themes.js.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.vanilla.cjs +1 -2
- package/dist/components/CodeBlock/CodeBlock.vanilla.cjs.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.vanilla.css.cjs +1 -2
- package/dist/components/CodeBlock/CodeBlock.vanilla.css.js +1 -2
- package/dist/components/CodeBlock/CodeBlock.vanilla.js +1 -2
- package/dist/components/CodeBlock/CodeBlock.vanilla.js.map +1 -1
- package/dist/components/CodeBlock/prism-extend.cjs +7 -3
- package/dist/components/CodeBlock/prism-extend.cjs.map +1 -1
- package/dist/components/CodeBlock/prism-extend.js +1 -2
- package/dist/components/Container/Container.cjs +1 -2
- package/dist/components/Container/Container.cjs.map +1 -1
- package/dist/components/Container/Container.js +1 -2
- package/dist/components/Container/Container.vanilla.cjs +6 -6
- package/dist/components/Container/Container.vanilla.cjs.map +1 -1
- package/dist/components/Container/Container.vanilla.css.cjs +1 -2
- package/dist/components/Container/Container.vanilla.css.cjs.map +1 -1
- package/dist/components/Container/Container.vanilla.css.js +1 -2
- package/dist/components/Container/Container.vanilla.css.js.map +1 -1
- package/dist/components/Container/Container.vanilla.js +6 -6
- package/dist/components/Container/Container.vanilla.js.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.cjs +1 -2
- package/dist/components/DateTimePicker/DateTimePicker.cjs.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.js +1 -2
- package/dist/components/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/DateTimePickerInput/DateTimePickerInput.cjs +17 -14
- package/dist/components/DateTimePickerInput/DateTimePickerInput.cjs.map +1 -1
- package/dist/components/DateTimePickerInput/DateTimePickerInput.js +17 -14
- package/dist/components/DateTimePickerInput/DateTimePickerInput.js.map +1 -1
- package/dist/components/Dialog/Dialog.cjs +1 -2
- package/dist/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.js +1 -2
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/Dialog.themes.cjs +1 -2
- package/dist/components/Dialog/Dialog.themes.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.themes.js +1 -2
- package/dist/components/Dialog/Dialog.themes.js.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.cjs +1 -2
- package/dist/components/DropdownMenu/DropdownMenu.cjs.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +1 -2
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/components/DropdownMenu/styles.cjs +1 -2
- package/dist/components/DropdownMenu/styles.cjs.map +1 -1
- package/dist/components/DropdownMenu/styles.js +1 -2
- package/dist/components/Elevation/Elevation.cjs +1 -2
- package/dist/components/Elevation/Elevation.cjs.map +1 -1
- package/dist/components/Elevation/Elevation.js +1 -2
- package/dist/components/Elevation/Elevation.vanilla.cjs +3 -3
- package/dist/components/Elevation/Elevation.vanilla.cjs.map +1 -1
- package/dist/components/Elevation/Elevation.vanilla.css.cjs +1 -2
- package/dist/components/Elevation/Elevation.vanilla.css.cjs.map +1 -1
- package/dist/components/Elevation/Elevation.vanilla.css.js +1 -2
- package/dist/components/Elevation/Elevation.vanilla.css.js.map +1 -1
- package/dist/components/Elevation/Elevation.vanilla.js +3 -3
- package/dist/components/Elevation/Elevation.vanilla.js.map +1 -1
- package/dist/components/FaencyProvider.cjs +1 -2
- package/dist/components/FaencyProvider.cjs.map +1 -1
- package/dist/components/FaencyProvider.js +1 -2
- package/dist/components/FaencyProvider.js.map +1 -1
- package/dist/components/Flex/Flex.cjs +1 -2
- package/dist/components/Flex/Flex.cjs.map +1 -1
- package/dist/components/Flex/Flex.js +1 -2
- package/dist/components/Flex/Flex.vanilla.cjs +9 -9
- package/dist/components/Flex/Flex.vanilla.cjs.map +1 -1
- package/dist/components/Flex/Flex.vanilla.css.cjs +1 -2
- package/dist/components/Flex/Flex.vanilla.css.cjs.map +1 -1
- package/dist/components/Flex/Flex.vanilla.css.js +1 -2
- package/dist/components/Flex/Flex.vanilla.css.js.map +1 -1
- package/dist/components/Flex/Flex.vanilla.js +9 -9
- package/dist/components/Flex/Flex.vanilla.js.map +1 -1
- package/dist/components/Grid/Grid.cjs +1 -2
- package/dist/components/Grid/Grid.cjs.map +1 -1
- package/dist/components/Grid/Grid.js +1 -2
- package/dist/components/Grid/Grid.vanilla.cjs +10 -10
- package/dist/components/Grid/Grid.vanilla.cjs.map +1 -1
- package/dist/components/Grid/Grid.vanilla.css.cjs +1 -2
- package/dist/components/Grid/Grid.vanilla.css.cjs.map +1 -1
- package/dist/components/Grid/Grid.vanilla.css.js +1 -2
- package/dist/components/Grid/Grid.vanilla.css.js.map +1 -1
- package/dist/components/Grid/Grid.vanilla.js +10 -10
- package/dist/components/Grid/Grid.vanilla.js.map +1 -1
- package/dist/components/Heading/Heading.cjs +1 -2
- package/dist/components/Heading/Heading.cjs.map +1 -1
- package/dist/components/Heading/Heading.js +1 -2
- package/dist/components/Heading/Heading.themes.cjs +1 -2
- package/dist/components/Heading/Heading.themes.cjs.map +1 -1
- package/dist/components/Heading/Heading.themes.js +1 -2
- package/dist/components/Heading/Heading.themes.js.map +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -2
- package/dist/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.js +1 -2
- package/dist/components/IconButton/IconButton.themes.cjs +1 -2
- package/dist/components/IconButton/IconButton.themes.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.themes.js +1 -2
- package/dist/components/IconButton/IconButton.themes.js.map +1 -1
- package/dist/components/IconButton/IconButton.vanilla.cjs +6 -6
- package/dist/components/IconButton/IconButton.vanilla.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.vanilla.css.cjs +1 -2
- package/dist/components/IconButton/IconButton.vanilla.css.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.vanilla.css.js +1 -2
- package/dist/components/IconButton/IconButton.vanilla.css.js.map +1 -1
- package/dist/components/IconButton/IconButton.vanilla.js +6 -6
- package/dist/components/IconButton/IconButton.vanilla.js.map +1 -1
- package/dist/components/Image/Image.cjs +1 -2
- package/dist/components/Image/Image.cjs.map +1 -1
- package/dist/components/Image/Image.js +1 -2
- package/dist/components/Image/Image.vanilla.cjs +1 -2
- package/dist/components/Image/Image.vanilla.cjs.map +1 -1
- package/dist/components/Image/Image.vanilla.css.cjs +1 -2
- package/dist/components/Image/Image.vanilla.css.js +1 -2
- package/dist/components/Image/Image.vanilla.js +1 -2
- package/dist/components/Input/Input.cjs +1 -2
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.js +1 -2
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/Input.theme.cjs +1 -2
- package/dist/components/Input/Input.theme.cjs.map +1 -1
- package/dist/components/Input/Input.theme.js +1 -2
- package/dist/components/Input/Input.themes.cjs +1 -2
- package/dist/components/Input/Input.themes.cjs.map +1 -1
- package/dist/components/Input/Input.themes.js +1 -2
- package/dist/components/Input/Input.themes.js.map +1 -1
- package/dist/components/Input/Input.vanilla.cjs +1 -2
- package/dist/components/Input/Input.vanilla.cjs.map +1 -1
- package/dist/components/Input/Input.vanilla.css.cjs +1 -2
- package/dist/components/Input/Input.vanilla.css.cjs.map +1 -1
- package/dist/components/Input/Input.vanilla.css.js +1 -2
- package/dist/components/Input/Input.vanilla.css.js.map +1 -1
- package/dist/components/Input/Input.vanilla.js +1 -2
- package/dist/components/Input/Input.vanilla.js.map +1 -1
- package/dist/components/Label/Label.cjs +1 -2
- package/dist/components/Label/Label.cjs.map +1 -1
- package/dist/components/Label/Label.js +1 -2
- package/dist/components/Label/Label.vanilla.cjs +10 -10
- package/dist/components/Label/Label.vanilla.cjs.map +1 -1
- package/dist/components/Label/Label.vanilla.css.cjs +1 -2
- package/dist/components/Label/Label.vanilla.css.cjs.map +1 -1
- package/dist/components/Label/Label.vanilla.css.js +1 -2
- package/dist/components/Label/Label.vanilla.css.js.map +1 -1
- package/dist/components/Label/Label.vanilla.js +10 -10
- package/dist/components/Label/Label.vanilla.js.map +1 -1
- package/dist/components/Link/Link.cjs +0 -1
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.js +0 -1
- package/dist/components/Link/Link.themes.cjs +1 -2
- package/dist/components/Link/Link.themes.cjs.map +1 -1
- package/dist/components/Link/Link.themes.js +1 -2
- package/dist/components/Link/Link.themes.js.map +1 -1
- package/dist/components/List/List.cjs +1 -2
- package/dist/components/List/List.cjs.map +1 -1
- package/dist/components/List/List.js +1 -2
- package/dist/components/List/List.js.map +1 -1
- package/dist/components/List/List.themes.cjs +1 -2
- package/dist/components/List/List.themes.cjs.map +1 -1
- package/dist/components/List/List.themes.js +1 -2
- package/dist/components/List/List.themes.js.map +1 -1
- package/dist/components/Navigation/Navigation.cjs +1 -2
- package/dist/components/Navigation/Navigation.cjs.map +1 -1
- package/dist/components/Navigation/Navigation.js +1 -2
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/Navigation/Navigation.themes.cjs +1 -2
- package/dist/components/Navigation/Navigation.themes.cjs.map +1 -1
- package/dist/components/Navigation/Navigation.themes.js +1 -2
- package/dist/components/Navigation/Navigation.themes.js.map +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.cjs +1 -2
- package/dist/components/NavigationMenu/NavigationMenu.cjs.map +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.js +1 -2
- package/dist/components/NavigationTree/NavigationTreeContainer.cjs +17 -12
- package/dist/components/NavigationTree/NavigationTreeContainer.cjs.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeContainer.js +18 -13
- package/dist/components/NavigationTree/NavigationTreeContainer.js.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeContext.cjs +16 -0
- package/dist/components/NavigationTree/NavigationTreeContext.cjs.map +1 -0
- package/dist/components/NavigationTree/NavigationTreeContext.js +13 -0
- package/dist/components/NavigationTree/NavigationTreeContext.js.map +1 -0
- package/dist/components/NavigationTree/NavigationTreeDrawer.cjs +14 -9
- package/dist/components/NavigationTree/NavigationTreeDrawer.cjs.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeDrawer.js +15 -10
- package/dist/components/NavigationTree/NavigationTreeDrawer.js.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeItem.cjs +17 -12
- package/dist/components/NavigationTree/NavigationTreeItem.cjs.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeItem.js +17 -12
- package/dist/components/NavigationTree/NavigationTreeItem.js.map +1 -1
- package/dist/components/Overlay.cjs +1 -2
- package/dist/components/Overlay.cjs.map +1 -1
- package/dist/components/Overlay.js +1 -2
- package/dist/components/Panel/Panel.cjs +1 -2
- package/dist/components/Panel/Panel.cjs.map +1 -1
- package/dist/components/Panel/Panel.js +1 -2
- package/dist/components/Panel/Panel.theme.cjs +1 -2
- package/dist/components/Panel/Panel.theme.js +1 -2
- package/dist/components/Panel/Panel.vanilla.cjs +1 -2
- package/dist/components/Panel/Panel.vanilla.cjs.map +1 -1
- package/dist/components/Panel/Panel.vanilla.css.cjs +1 -2
- package/dist/components/Panel/Panel.vanilla.css.js +1 -2
- package/dist/components/Panel/Panel.vanilla.js +1 -2
- package/dist/components/Paragraph/Paragraph.cjs +1 -2
- package/dist/components/Paragraph/Paragraph.cjs.map +1 -1
- package/dist/components/Paragraph/Paragraph.js +1 -2
- package/dist/components/Paragraph/Paragraph.vanilla.cjs +3 -3
- package/dist/components/Paragraph/Paragraph.vanilla.cjs.map +1 -1
- package/dist/components/Paragraph/Paragraph.vanilla.css.cjs +1 -2
- package/dist/components/Paragraph/Paragraph.vanilla.css.cjs.map +1 -1
- package/dist/components/Paragraph/Paragraph.vanilla.css.js +1 -2
- package/dist/components/Paragraph/Paragraph.vanilla.css.js.map +1 -1
- package/dist/components/Paragraph/Paragraph.vanilla.js +3 -3
- package/dist/components/Paragraph/Paragraph.vanilla.js.map +1 -1
- package/dist/components/Popover/Popover.cjs +1 -2
- package/dist/components/Popover/Popover.cjs.map +1 -1
- package/dist/components/Popover/Popover.js +1 -2
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Radio/Radio.cjs +1 -2
- package/dist/components/Radio/Radio.cjs.map +1 -1
- package/dist/components/Radio/Radio.js +1 -2
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/Radio/Radio.themes.cjs +1 -2
- package/dist/components/Radio/Radio.themes.cjs.map +1 -1
- package/dist/components/Radio/Radio.themes.js +1 -2
- package/dist/components/Radio/Radio.themes.js.map +1 -1
- package/dist/components/RadioAccordion/RadioAccordion.cjs +1 -2
- package/dist/components/RadioAccordion/RadioAccordion.cjs.map +1 -1
- package/dist/components/RadioAccordion/RadioAccordion.js +1 -2
- package/dist/components/RadioAccordion/RadioAccordion.js.map +1 -1
- package/dist/components/Select/Select.cjs +1 -2
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.js +1 -2
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/Select.themes.cjs +1 -2
- package/dist/components/Select/Select.themes.cjs.map +1 -1
- package/dist/components/Select/Select.themes.js +1 -2
- package/dist/components/Select/Select.themes.js.map +1 -1
- package/dist/components/SidePanel/SidePanel.cjs +1 -2
- package/dist/components/SidePanel/SidePanel.cjs.map +1 -1
- package/dist/components/SidePanel/SidePanel.js +1 -2
- package/dist/components/SidePanel/SidePanel.js.map +1 -1
- package/dist/components/SidePanel/SidePanel.themes.cjs +1 -2
- package/dist/components/SidePanel/SidePanel.themes.cjs.map +1 -1
- package/dist/components/SidePanel/SidePanel.themes.js +1 -2
- package/dist/components/SidePanel/SidePanel.themes.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.cjs +1 -2
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +6 -5
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.themes.cjs +1 -2
- package/dist/components/Skeleton/Skeleton.themes.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.themes.js +1 -2
- package/dist/components/Skeleton/Skeleton.themes.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.vanilla.cjs +3 -3
- package/dist/components/Skeleton/Skeleton.vanilla.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.vanilla.css.cjs +1 -2
- package/dist/components/Skeleton/Skeleton.vanilla.css.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.vanilla.css.js +1 -2
- package/dist/components/Skeleton/Skeleton.vanilla.css.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.vanilla.js +3 -3
- package/dist/components/Skeleton/Skeleton.vanilla.js.map +1 -1
- package/dist/components/Switch/Switch.cjs +3 -4
- package/dist/components/Switch/Switch.cjs.map +1 -1
- package/dist/components/Switch/Switch.js +3 -4
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Switch/Switch.themes.cjs +1 -2
- package/dist/components/Switch/Switch.themes.cjs.map +1 -1
- package/dist/components/Switch/Switch.themes.js +1 -2
- package/dist/components/Switch/Switch.themes.js.map +1 -1
- package/dist/components/Table/Table.cjs +1 -2
- package/dist/components/Table/Table.cjs.map +1 -1
- package/dist/components/Table/Table.js +15 -14
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/Table.themes.cjs +1 -2
- package/dist/components/Table/Table.themes.cjs.map +1 -1
- package/dist/components/Table/Table.themes.js +1 -2
- package/dist/components/Table/Table.themes.js.map +1 -1
- package/dist/components/Tabs/Tabs.cjs +1 -2
- package/dist/components/Tabs/Tabs.cjs.map +1 -1
- package/dist/components/Tabs/Tabs.js +1 -2
- package/dist/components/Text/Text.cjs +1 -2
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/Text/Text.js +1 -2
- package/dist/components/Text/Text.themes.cjs +1 -2
- package/dist/components/Text/Text.themes.cjs.map +1 -1
- package/dist/components/Text/Text.themes.js +1 -2
- package/dist/components/Text/Text.themes.js.map +1 -1
- package/dist/components/TextField/TextField.cjs +1 -2
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.js +1 -2
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.vanilla.cjs +1 -2
- package/dist/components/TextField/TextField.vanilla.cjs.map +1 -1
- package/dist/components/TextField/TextField.vanilla.js +1 -2
- package/dist/components/TextField/TextField.vanilla.js.map +1 -1
- package/dist/components/Textarea/Textarea.cjs +1 -2
- package/dist/components/Textarea/Textarea.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.js +1 -2
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/Textarea.theme.cjs +1 -2
- package/dist/components/Textarea/Textarea.theme.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.theme.js +1 -2
- package/dist/components/Textarea/Textarea.themes.cjs +1 -2
- package/dist/components/Textarea/Textarea.themes.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.themes.js +1 -2
- package/dist/components/Textarea/Textarea.themes.js.map +1 -1
- package/dist/components/Textarea/Textarea.vanilla.cjs +1 -2
- package/dist/components/Textarea/Textarea.vanilla.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.vanilla.css.cjs +1 -2
- package/dist/components/Textarea/Textarea.vanilla.css.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.vanilla.css.js +1 -2
- package/dist/components/Textarea/Textarea.vanilla.css.js.map +1 -1
- package/dist/components/Textarea/Textarea.vanilla.js +1 -2
- package/dist/components/Textarea/Textarea.vanilla.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +1 -2
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.themes.cjs +1 -2
- package/dist/components/Tooltip/Tooltip.themes.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.themes.js +1 -2
- package/dist/components/Tooltip/Tooltip.themes.js.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.cjs +1 -2
- package/dist/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.js +1 -2
- package/dist/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/components/colorSchemeContext.cjs +1 -2
- package/dist/components/colorSchemeContext.cjs.map +1 -1
- package/dist/components/colorSchemeContext.js +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/stitches.config.cjs +1 -2
- package/dist/stitches.config.cjs.map +1 -1
- package/dist/stitches.config.js +1 -2
- package/dist/stitches.config.js.map +1 -1
- package/dist/styles/cssProps.cjs +24 -27
- package/dist/styles/cssProps.cjs.map +1 -1
- package/dist/styles/cssProps.js +24 -27
- package/dist/styles/cssProps.js.map +1 -1
- package/dist/styles/themeContext.cjs +1 -2
- package/dist/styles/themeContext.cjs.map +1 -1
- package/dist/styles/themeContext.js +1 -2
- package/dist/styles/themes.css.cjs +1 -2
- package/dist/styles/themes.css.js +1 -2
- package/dist/utils/deepMerge.cjs +1 -2
- package/dist/utils/deepMerge.js +1 -2
- package/dist/utils/getPrimaryColorInfo.cjs +1 -2
- package/dist/utils/getPrimaryColorInfo.js +1 -2
- package/package.json +65 -63
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cssProps.cjs","names":[],"sources":["../../styles/cssProps.ts"],"sourcesContent":["import { FlexAlign, FlexJustify, SizeToken, SpacingToken } from './types';\n\nexport interface CSSProps {\n css?: {\n p?: SpacingToken;\n pt?: SpacingToken;\n pr?: SpacingToken;\n pb?: SpacingToken;\n pl?: SpacingToken;\n px?: SpacingToken;\n py?: SpacingToken;\n\n m?: SpacingToken;\n mt?: SpacingToken;\n mr?: SpacingToken;\n mb?: SpacingToken;\n ml?: SpacingToken;\n mx?: SpacingToken;\n my?: SpacingToken;\n\n ta?: 'left' | 'center' | 'right' | 'justify';\n fd?: 'row' | 'column' | 'row-reverse' | 'column-reverse';\n fw?: 'wrap' | 'nowrap' | 'wrap-reverse';\n ai?: FlexAlign;\n ac?: FlexAlign | 'space-between' | 'space-around' | 'space-evenly';\n jc?: FlexJustify;\n as?: 'auto' | FlexAlign;\n fg?: 0 | 1;\n fs?: 0 | 1;\n fb?: SizeToken;\n\n bc?: string;\n br?: string;\n btrr?: string;\n bbrr?: string;\n bblr?: string;\n btlr?: string;\n bs?: string;\n c?: string;\n\n width?: SizeToken;\n height?: SizeToken;\n size?: SizeToken;\n\n ox?: 'visible' | 'hidden' | 'scroll' | 'auto';\n oy?: 'visible' | 'hidden' | 'scroll' | 'auto';\n\n pe?: 'auto' | 'none' | 'all';\n us?: 'none' | 'auto' | 'text' | 'contain' | 'all';\n\n fontSize?: string;\n fontWeight?: string;\n lh?: string | number;\n\n [key: string]: any;\n };\n}\n\n// HELPERS\nfunction processToken(value: string): string {\n return value.startsWith('$') ? value.slice(1) : value;\n}\n\nfunction getSpaceValue(key: string): string {\n const spaceMap: Record<string, string> = {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '48px',\n '8': '64px',\n '9': '80px',\n };\n return spaceMap[key] || '0px';\n}\n\nfunction getSizeValue(key: string): string {\n const sizeMap: Record<string, string> = {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '40px',\n '8': '48px',\n '9': '64px',\n '10': '80px',\n };\n return sizeMap[key] || key;\n}\n\nfunction getRadiiValue(key: string): string {\n const radiiMap: Record<string, string> = {\n '1': '4px',\n '2': '6px',\n '3': '8px',\n '4': '12px',\n round: '50%',\n pill: '9999px',\n button: '8px',\n };\n return radiiMap[key] || '0px';\n}\n\nfunction getFontSizeValue(key: string): string {\n const fontSizeMap: Record<string, string> = {\n '0': '11px',\n '1': '12px',\n '2': '13px',\n '3': '14px',\n '4': '16px',\n '5': '18px',\n '6': '20px',\n '7': '22px',\n '8': '24px',\n '9': '26px',\n '10': '28px',\n '11': '32px',\n '12': '38px',\n };\n return fontSizeMap[key] || '16px';\n}\n\nfunction getFontWeightValue(key: string): string {\n const fontWeightMap: Record<string, string> = {\n light: '300',\n regular: '400',\n medium: '500',\n semiBold: '600',\n bold: '700',\n };\n return fontWeightMap[key] || '400';\n}\n\nfunction applySpacing(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const spaceValue = getSpaceValue(tokenValue);\n if (spaceValue !== '0px') {\n (style as any)[property] = spaceValue;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applyRadii(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const radiiValue = getRadiiValue(tokenValue);\n if (radiiValue !== '0px') {\n (style as any)[property] = radiiValue;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applyColor(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n colors?: Record<string, any>,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const colorToken = value.slice(1);\n if (colors && colorToken in colors) {\n (style as any)[property] = colors[colorToken];\n } else {\n (style as any)[property] = value;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applySize(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const sizeValue = getSizeValue(tokenValue);\n (style as any)[property] = sizeValue;\n } else {\n (style as any)[property] = value;\n }\n}\n\n// CSS PROCESSOR\nexport function processCSSProp(\n css: CSSProps['css'] = {},\n colors?: Record<string, any>,\n): {\n style: React.CSSProperties;\n vars: Record<string, string>;\n} {\n const style: React.CSSProperties = {};\n const vars: Record<string, string> = {};\n\n Object.entries(css).forEach(([key, value]) => {\n switch (key) {\n case 'p':\n case 'padding':\n applySpacing(style, 'padding', value);\n break;\n case 'pt':\n case 'paddingTop':\n applySpacing(style, 'paddingTop', value);\n break;\n case 'pr':\n case 'paddingRight':\n applySpacing(style, 'paddingRight', value);\n break;\n case 'pb':\n case 'paddingBottom':\n applySpacing(style, 'paddingBottom', value);\n break;\n case 'pl':\n case 'paddingLeft':\n applySpacing(style, 'paddingLeft', value);\n break;\n case 'px':\n applySpacing(style, 'paddingLeft', value);\n applySpacing(style, 'paddingRight', value);\n break;\n case 'py':\n applySpacing(style, 'paddingTop', value);\n applySpacing(style, 'paddingBottom', value);\n break;\n\n case 'm':\n case 'margin':\n applySpacing(style, 'margin', value);\n break;\n case 'mt':\n case 'marginTop':\n applySpacing(style, 'marginTop', value);\n break;\n case 'mr':\n case 'marginRight':\n applySpacing(style, 'marginRight', value);\n break;\n case 'mb':\n case 'marginBottom':\n applySpacing(style, 'marginBottom', value);\n break;\n case 'ml':\n case 'marginLeft':\n applySpacing(style, 'marginLeft', value);\n break;\n case 'mx':\n applySpacing(style, 'marginLeft', value);\n applySpacing(style, 'marginRight', value);\n break;\n case 'my':\n applySpacing(style, 'marginTop', value);\n applySpacing(style, 'marginBottom', value);\n break;\n\n case 'ta':\n style.textAlign = value as React.CSSProperties['textAlign'];\n break;\n case 'fd':\n style.flexDirection = value as React.CSSProperties['flexDirection'];\n break;\n case 'fw':\n style.flexWrap = value as React.CSSProperties['flexWrap'];\n break;\n case 'ai':\n style.alignItems = value as React.CSSProperties['alignItems'];\n break;\n case 'ac':\n style.alignContent = value as React.CSSProperties['alignContent'];\n break;\n case 'jc':\n style.justifyContent = value as React.CSSProperties['justifyContent'];\n break;\n case 'as':\n style.alignSelf = value as React.CSSProperties['alignSelf'];\n break;\n case 'fg':\n style.flexGrow = value;\n break;\n case 'fs':\n style.flexShrink = value;\n break;\n case 'fb':\n applySize(style, 'flexBasis', value);\n break;\n\n case 'bc':\n case 'backgroundColor':\n applyColor(style, 'backgroundColor', value, colors);\n break;\n case 'br':\n case 'borderRadius':\n applyRadii(style, 'borderRadius', value);\n break;\n case 'btrr':\n case 'borderTopRightRadius':\n applyRadii(style, 'borderTopRightRadius', value);\n break;\n case 'bbrr':\n case 'borderBottomRightRadius':\n applyRadii(style, 'borderBottomRightRadius', value);\n break;\n case 'bblr':\n case 'borderBottomLeftRadius':\n applyRadii(style, 'borderBottomLeftRadius', value);\n break;\n case 'btlr':\n case 'borderTopLeftRadius':\n applyRadii(style, 'borderTopLeftRadius', value);\n break;\n case 'bs':\n case 'boxShadow':\n style.boxShadow = value;\n break;\n case 'c':\n case 'color':\n applyColor(style, 'color', value, colors);\n break;\n\n case 'fontSize':\n if (typeof value === 'string') {\n const fontSizeValue = getFontSizeValue(value);\n if (fontSizeValue !== '16px') {\n style.fontSize = fontSizeValue;\n }\n }\n break;\n case 'fontWeight':\n if (typeof value === 'string') {\n const fontWeightValue = getFontWeightValue(value);\n if (fontWeightValue !== '400') {\n style.fontWeight = fontWeightValue;\n }\n }\n break;\n case 'lh':\n style.lineHeight = value;\n break;\n\n case 'width':\n case 'w':\n applySize(style, 'width', value);\n break;\n case 'height':\n case 'h':\n applySize(style, 'height', value);\n break;\n\n case 'size':\n applySize(style, 'width', value);\n applySize(style, 'height', value);\n break;\n\n case 'ox':\n style.overflowX = value as React.CSSProperties['overflowX'];\n break;\n case 'oy':\n style.overflowY = value as React.CSSProperties['overflowY'];\n break;\n\n case 'pe':\n style.pointerEvents = value as React.CSSProperties['pointerEvents'];\n break;\n case 'us':\n style.userSelect = value as React.CSSProperties['userSelect'];\n break;\n\n default:\n // Handle token syntax for any property that falls through to default\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n\n // Try spacing tokens first (most common for gap, etc)\n const spaceValue = getSpaceValue(tokenValue);\n if (spaceValue !== '0px') {\n (style as any)[key] = spaceValue;\n break;\n }\n\n // Try size tokens\n const sizeValue = getSizeValue(tokenValue);\n if (sizeValue !== tokenValue) {\n (style as any)[key] = sizeValue;\n break;\n }\n\n // Try radii tokens\n const radiiValue = getRadiiValue(tokenValue);\n if (radiiValue !== '0px') {\n (style as any)[key] = radiiValue;\n break;\n }\n\n // Try color tokens\n if (colors && tokenValue in colors) {\n (style as any)[key] = colors[tokenValue];\n break;\n }\n\n // If no token matches, pass through as-is\n (style as any)[key] = value;\n } else {\n (style as any)[key] = value;\n }\n break;\n }\n });\n\n return { style, vars };\n}\n"],"mappings":";AA2DA,SAAS,aAAa,OAAuB;CAC3C,OAAO,MAAM,WAAW,GAAG,IAAI,MAAM,MAAM,CAAC,IAAI;AAClD;AAEA,SAAS,cAAc,KAAqB;CAY1C,OAAO;EAVL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;CAEA,EAAS,QAAQ;A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C;GAEF,KAAK;IACH,UAAU,OAAO,SAAS,KAAK;IAC/B,UAAU,OAAO,UAAU,KAAK;IAChC;GAEF,KAAK;IACH,MAAM,YAAY;IAClB;GACF,KAAK;IACH,MAAM,YAAY;IAClB;GAEF,KAAK;IACH,MAAM,gBAAgB;IACtB;GACF,KAAK;IACH,MAAM,aAAa;IACnB;GAEF;IAEE,IAAI,OAAO,UAAU,YAAY,MAAM,WAAW,GAAG,GAAG;KACtD,MAAM,aAAa,aAAa,KAAK;KAGrC,MAAM,aAAa,cAAc,UAAU;KAC3C,IAAI,eAAe,OAAO;MACxB,MAAe,OAAO;MACtB;KACF;KAGA,MAAM,YAAY,aAAa,UAAU;KACzC,IAAI,cAAc,YAAY;MAC5B,MAAe,OAAO;MACtB;KACF;KAGA,MAAM,aAAa,cAAc,UAAU;KAC3C,IAAI,eAAe,OAAO;MACxB,MAAe,OAAO;MACtB;KACF;KAGA,IAAI,UAAU,cAAc,QAAQ;MAClC,MAAe,OAAO,OAAO;MAC7B;KACF;KAGA,MAAe,OAAO;IACxB,OACE,MAAe,OAAO;IAExB;EACJ;CACF,CAAC;CAED,OAAO;EAAE;EAAO;CAAK;AACvB"}
|
|
1
|
+
{"version":3,"file":"cssProps.cjs","names":[],"sources":["../../styles/cssProps.ts"],"sourcesContent":["import { FlexAlign, FlexJustify, SizeToken, SpacingToken } from './types';\n\nexport interface CSSProps {\n css?: {\n p?: SpacingToken;\n pt?: SpacingToken;\n pr?: SpacingToken;\n pb?: SpacingToken;\n pl?: SpacingToken;\n px?: SpacingToken;\n py?: SpacingToken;\n\n m?: SpacingToken;\n mt?: SpacingToken;\n mr?: SpacingToken;\n mb?: SpacingToken;\n ml?: SpacingToken;\n mx?: SpacingToken;\n my?: SpacingToken;\n\n ta?: 'left' | 'center' | 'right' | 'justify';\n fd?: 'row' | 'column' | 'row-reverse' | 'column-reverse';\n fw?: 'wrap' | 'nowrap' | 'wrap-reverse';\n ai?: FlexAlign;\n ac?: FlexAlign | 'space-between' | 'space-around' | 'space-evenly';\n jc?: FlexJustify;\n as?: 'auto' | FlexAlign;\n fg?: 0 | 1;\n fs?: 0 | 1;\n fb?: SizeToken;\n\n bc?: string;\n br?: string;\n btrr?: string;\n bbrr?: string;\n bblr?: string;\n btlr?: string;\n bs?: string;\n c?: string;\n\n width?: SizeToken;\n height?: SizeToken;\n size?: SizeToken;\n\n ox?: 'visible' | 'hidden' | 'scroll' | 'auto';\n oy?: 'visible' | 'hidden' | 'scroll' | 'auto';\n\n pe?: 'auto' | 'none' | 'all';\n us?: 'none' | 'auto' | 'text' | 'contain' | 'all';\n\n fontSize?: string;\n fontWeight?: string;\n lh?: string | number;\n\n [key: string]: any;\n };\n}\n\n// HELPERS\nfunction processToken(value: string): string {\n return value.startsWith('$') ? value.slice(1) : value;\n}\n\nfunction getSpaceValue(key: string): string {\n const spaceMap: Record<string, string> = {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '48px',\n '8': '64px',\n '9': '80px',\n };\n return spaceMap[key] || '0px';\n}\n\nfunction getSizeValue(key: string): string {\n const sizeMap: Record<string, string> = {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '40px',\n '8': '48px',\n '9': '64px',\n '10': '80px',\n };\n return sizeMap[key] || key;\n}\n\nfunction getRadiiValue(key: string): string {\n const radiiMap: Record<string, string> = {\n '1': '4px',\n '2': '6px',\n '3': '8px',\n '4': '12px',\n round: '50%',\n pill: '9999px',\n button: '8px',\n };\n return radiiMap[key] || '0px';\n}\n\nfunction getFontSizeValue(key: string): string {\n const fontSizeMap: Record<string, string> = {\n '0': '11px',\n '1': '12px',\n '2': '13px',\n '3': '14px',\n '4': '16px',\n '5': '18px',\n '6': '20px',\n '7': '22px',\n '8': '24px',\n '9': '26px',\n '10': '28px',\n '11': '32px',\n '12': '38px',\n };\n return fontSizeMap[key] || '16px';\n}\n\nfunction getFontWeightValue(key: string): string {\n const fontWeightMap: Record<string, string> = {\n light: '300',\n regular: '400',\n medium: '500',\n semiBold: '600',\n bold: '700',\n };\n return fontWeightMap[key] || '400';\n}\n\nfunction applySpacing(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const spaceValue = getSpaceValue(tokenValue);\n if (spaceValue !== '0px') {\n (style as any)[property] = spaceValue;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applyRadii(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const radiiValue = getRadiiValue(tokenValue);\n if (radiiValue !== '0px') {\n (style as any)[property] = radiiValue;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applyColor(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n colors?: Record<string, any>,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const colorToken = value.slice(1);\n if (colors && colorToken in colors) {\n (style as any)[property] = colors[colorToken];\n } else {\n (style as any)[property] = value;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applySize(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const sizeValue = getSizeValue(tokenValue);\n (style as any)[property] = sizeValue;\n } else {\n (style as any)[property] = value;\n }\n}\n\n// CSS PROCESSOR\nexport function processCSSProp(\n css: CSSProps['css'] = {},\n colors?: Record<string, any>,\n): {\n style: React.CSSProperties;\n vars: Record<string, string>;\n} {\n const style: React.CSSProperties = {};\n const vars: Record<string, string> = {};\n\n Object.entries(css).forEach(([key, value]) => {\n switch (key) {\n case 'p':\n case 'padding':\n applySpacing(style, 'padding', value);\n break;\n case 'pt':\n case 'paddingTop':\n applySpacing(style, 'paddingTop', value);\n break;\n case 'pr':\n case 'paddingRight':\n applySpacing(style, 'paddingRight', value);\n break;\n case 'pb':\n case 'paddingBottom':\n applySpacing(style, 'paddingBottom', value);\n break;\n case 'pl':\n case 'paddingLeft':\n applySpacing(style, 'paddingLeft', value);\n break;\n case 'px':\n applySpacing(style, 'paddingLeft', value);\n applySpacing(style, 'paddingRight', value);\n break;\n case 'py':\n applySpacing(style, 'paddingTop', value);\n applySpacing(style, 'paddingBottom', value);\n break;\n\n case 'm':\n case 'margin':\n applySpacing(style, 'margin', value);\n break;\n case 'mt':\n case 'marginTop':\n applySpacing(style, 'marginTop', value);\n break;\n case 'mr':\n case 'marginRight':\n applySpacing(style, 'marginRight', value);\n break;\n case 'mb':\n case 'marginBottom':\n applySpacing(style, 'marginBottom', value);\n break;\n case 'ml':\n case 'marginLeft':\n applySpacing(style, 'marginLeft', value);\n break;\n case 'mx':\n applySpacing(style, 'marginLeft', value);\n applySpacing(style, 'marginRight', value);\n break;\n case 'my':\n applySpacing(style, 'marginTop', value);\n applySpacing(style, 'marginBottom', value);\n break;\n\n case 'ta':\n style.textAlign = value as React.CSSProperties['textAlign'];\n break;\n case 'fd':\n style.flexDirection = value as React.CSSProperties['flexDirection'];\n break;\n case 'fw':\n style.flexWrap = value as React.CSSProperties['flexWrap'];\n break;\n case 'ai':\n style.alignItems = value as React.CSSProperties['alignItems'];\n break;\n case 'ac':\n style.alignContent = value as React.CSSProperties['alignContent'];\n break;\n case 'jc':\n style.justifyContent = value as React.CSSProperties['justifyContent'];\n break;\n case 'as':\n style.alignSelf = value as React.CSSProperties['alignSelf'];\n break;\n case 'fg':\n style.flexGrow = value;\n break;\n case 'fs':\n style.flexShrink = value;\n break;\n case 'fb':\n applySize(style, 'flexBasis', value);\n break;\n\n case 'bc':\n case 'backgroundColor':\n applyColor(style, 'backgroundColor', value, colors);\n break;\n case 'br':\n case 'borderRadius':\n applyRadii(style, 'borderRadius', value);\n break;\n case 'btrr':\n case 'borderTopRightRadius':\n applyRadii(style, 'borderTopRightRadius', value);\n break;\n case 'bbrr':\n case 'borderBottomRightRadius':\n applyRadii(style, 'borderBottomRightRadius', value);\n break;\n case 'bblr':\n case 'borderBottomLeftRadius':\n applyRadii(style, 'borderBottomLeftRadius', value);\n break;\n case 'btlr':\n case 'borderTopLeftRadius':\n applyRadii(style, 'borderTopLeftRadius', value);\n break;\n case 'bs':\n case 'boxShadow':\n style.boxShadow = value;\n break;\n case 'c':\n case 'color':\n applyColor(style, 'color', value, colors);\n break;\n\n case 'fontSize':\n if (typeof value === 'string') {\n const fontSizeValue = getFontSizeValue(value);\n if (fontSizeValue !== '16px') {\n style.fontSize = fontSizeValue;\n }\n }\n break;\n case 'fontWeight':\n if (typeof value === 'string') {\n const fontWeightValue = getFontWeightValue(value);\n if (fontWeightValue !== '400') {\n style.fontWeight = fontWeightValue;\n }\n }\n break;\n case 'lh':\n style.lineHeight = value;\n break;\n\n case 'width':\n case 'w':\n applySize(style, 'width', value);\n break;\n case 'height':\n case 'h':\n applySize(style, 'height', value);\n break;\n\n case 'size':\n applySize(style, 'width', value);\n applySize(style, 'height', value);\n break;\n\n case 'ox':\n style.overflowX = value as React.CSSProperties['overflowX'];\n break;\n case 'oy':\n style.overflowY = value as React.CSSProperties['overflowY'];\n break;\n\n case 'pe':\n style.pointerEvents = value as React.CSSProperties['pointerEvents'];\n break;\n case 'us':\n style.userSelect = value as React.CSSProperties['userSelect'];\n break;\n\n default:\n // Handle token syntax for any property that falls through to default\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n\n // Try spacing tokens first (most common for gap, etc)\n const spaceValue = getSpaceValue(tokenValue);\n if (spaceValue !== '0px') {\n (style as any)[key] = spaceValue;\n break;\n }\n\n // Try size tokens\n const sizeValue = getSizeValue(tokenValue);\n if (sizeValue !== tokenValue) {\n (style as any)[key] = sizeValue;\n break;\n }\n\n // Try radii tokens\n const radiiValue = getRadiiValue(tokenValue);\n if (radiiValue !== '0px') {\n (style as any)[key] = radiiValue;\n break;\n }\n\n // Try color tokens\n if (colors && tokenValue in colors) {\n (style as any)[key] = colors[tokenValue];\n break;\n }\n\n // If no token matches, pass through as-is\n (style as any)[key] = value;\n } else {\n (style as any)[key] = value;\n }\n break;\n }\n });\n\n return { style, vars };\n}\n"],"mappings":";AA2DA,SAAS,aAAa,OAAuB;CAC3C,OAAO,MAAM,WAAW,GAAG,IAAI,MAAM,MAAM,CAAC,IAAI;AAClD;AAEA,SAAS,cAAc,KAAqB;CAY1C,OAAO;EAVL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;CAEA,EAAS,QAAQ;AAC1B;AAEA,SAAS,aAAa,KAAqB;CAazC,OAAO;EAXL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,MAAM;CAED,EAAQ,QAAQ;AACzB;AAEA,SAAS,cAAc,KAAqB;CAU1C,OAAO;EARL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,OAAO;EACP,MAAM;EACN,QAAQ;CAEH,EAAS,QAAQ;AAC1B;AAEA,SAAS,iBAAiB,KAAqB;CAgB7C,OAAO;EAdL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,MAAM;EACN,MAAM;EACN,MAAM;CAED,EAAY,QAAQ;AAC7B;AAEA,SAAS,mBAAmB,KAAqB;CAQ/C,OAAO;EANL,OAAO;EACP,SAAS;EACT,QAAQ;EACR,UAAU;EACV,MAAM;CAED,EAAc,QAAQ;AAC/B;AAEA,SAAS,aACP,OACA,UACA,OACM;CACN,IAAI,OAAO,UAAU,YAAY,MAAM,WAAW,GAAG,GAAG;EAEtD,MAAM,aAAa,cADA,aAAa,KACC,CAAU;EAC3C,IAAI,eAAe,OACjB,MAAe,YAAY;C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ts
|
|
2
2
|
function processToken(value) {
|
|
3
3
|
return value.startsWith("$") ? value.slice(1) : value;
|
|
4
4
|
}
|
|
@@ -251,31 +251,29 @@ function processCSSProp(css = {}, colors) {
|
|
|
251
251
|
case "us":
|
|
252
252
|
style.userSelect = value;
|
|
253
253
|
break;
|
|
254
|
-
default:
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
} else style[key] = value;
|
|
278
|
-
break;
|
|
254
|
+
default: if (typeof value === "string" && value.startsWith("$")) {
|
|
255
|
+
const tokenValue = processToken(value);
|
|
256
|
+
const spaceValue = getSpaceValue(tokenValue);
|
|
257
|
+
if (spaceValue !== "0px") {
|
|
258
|
+
style[key] = spaceValue;
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
const sizeValue = getSizeValue(tokenValue);
|
|
262
|
+
if (sizeValue !== tokenValue) {
|
|
263
|
+
style[key] = sizeValue;
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
const radiiValue = getRadiiValue(tokenValue);
|
|
267
|
+
if (radiiValue !== "0px") {
|
|
268
|
+
style[key] = radiiValue;
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
if (colors && tokenValue in colors) {
|
|
272
|
+
style[key] = colors[tokenValue];
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
style[key] = value;
|
|
276
|
+
} else style[key] = value;
|
|
279
277
|
}
|
|
280
278
|
});
|
|
281
279
|
return {
|
|
@@ -283,7 +281,6 @@ function processCSSProp(css = {}, colors) {
|
|
|
283
281
|
vars
|
|
284
282
|
};
|
|
285
283
|
}
|
|
286
|
-
//#endregion
|
|
287
284
|
export { processCSSProp };
|
|
288
285
|
|
|
289
286
|
//# sourceMappingURL=cssProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cssProps.js","names":[],"sources":["../../styles/cssProps.ts"],"sourcesContent":["import { FlexAlign, FlexJustify, SizeToken, SpacingToken } from './types';\n\nexport interface CSSProps {\n css?: {\n p?: SpacingToken;\n pt?: SpacingToken;\n pr?: SpacingToken;\n pb?: SpacingToken;\n pl?: SpacingToken;\n px?: SpacingToken;\n py?: SpacingToken;\n\n m?: SpacingToken;\n mt?: SpacingToken;\n mr?: SpacingToken;\n mb?: SpacingToken;\n ml?: SpacingToken;\n mx?: SpacingToken;\n my?: SpacingToken;\n\n ta?: 'left' | 'center' | 'right' | 'justify';\n fd?: 'row' | 'column' | 'row-reverse' | 'column-reverse';\n fw?: 'wrap' | 'nowrap' | 'wrap-reverse';\n ai?: FlexAlign;\n ac?: FlexAlign | 'space-between' | 'space-around' | 'space-evenly';\n jc?: FlexJustify;\n as?: 'auto' | FlexAlign;\n fg?: 0 | 1;\n fs?: 0 | 1;\n fb?: SizeToken;\n\n bc?: string;\n br?: string;\n btrr?: string;\n bbrr?: string;\n bblr?: string;\n btlr?: string;\n bs?: string;\n c?: string;\n\n width?: SizeToken;\n height?: SizeToken;\n size?: SizeToken;\n\n ox?: 'visible' | 'hidden' | 'scroll' | 'auto';\n oy?: 'visible' | 'hidden' | 'scroll' | 'auto';\n\n pe?: 'auto' | 'none' | 'all';\n us?: 'none' | 'auto' | 'text' | 'contain' | 'all';\n\n fontSize?: string;\n fontWeight?: string;\n lh?: string | number;\n\n [key: string]: any;\n };\n}\n\n// HELPERS\nfunction processToken(value: string): string {\n return value.startsWith('$') ? value.slice(1) : value;\n}\n\nfunction getSpaceValue(key: string): string {\n const spaceMap: Record<string, string> = {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '48px',\n '8': '64px',\n '9': '80px',\n };\n return spaceMap[key] || '0px';\n}\n\nfunction getSizeValue(key: string): string {\n const sizeMap: Record<string, string> = {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '40px',\n '8': '48px',\n '9': '64px',\n '10': '80px',\n };\n return sizeMap[key] || key;\n}\n\nfunction getRadiiValue(key: string): string {\n const radiiMap: Record<string, string> = {\n '1': '4px',\n '2': '6px',\n '3': '8px',\n '4': '12px',\n round: '50%',\n pill: '9999px',\n button: '8px',\n };\n return radiiMap[key] || '0px';\n}\n\nfunction getFontSizeValue(key: string): string {\n const fontSizeMap: Record<string, string> = {\n '0': '11px',\n '1': '12px',\n '2': '13px',\n '3': '14px',\n '4': '16px',\n '5': '18px',\n '6': '20px',\n '7': '22px',\n '8': '24px',\n '9': '26px',\n '10': '28px',\n '11': '32px',\n '12': '38px',\n };\n return fontSizeMap[key] || '16px';\n}\n\nfunction getFontWeightValue(key: string): string {\n const fontWeightMap: Record<string, string> = {\n light: '300',\n regular: '400',\n medium: '500',\n semiBold: '600',\n bold: '700',\n };\n return fontWeightMap[key] || '400';\n}\n\nfunction applySpacing(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const spaceValue = getSpaceValue(tokenValue);\n if (spaceValue !== '0px') {\n (style as any)[property] = spaceValue;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applyRadii(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const radiiValue = getRadiiValue(tokenValue);\n if (radiiValue !== '0px') {\n (style as any)[property] = radiiValue;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applyColor(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n colors?: Record<string, any>,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const colorToken = value.slice(1);\n if (colors && colorToken in colors) {\n (style as any)[property] = colors[colorToken];\n } else {\n (style as any)[property] = value;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applySize(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const sizeValue = getSizeValue(tokenValue);\n (style as any)[property] = sizeValue;\n } else {\n (style as any)[property] = value;\n }\n}\n\n// CSS PROCESSOR\nexport function processCSSProp(\n css: CSSProps['css'] = {},\n colors?: Record<string, any>,\n): {\n style: React.CSSProperties;\n vars: Record<string, string>;\n} {\n const style: React.CSSProperties = {};\n const vars: Record<string, string> = {};\n\n Object.entries(css).forEach(([key, value]) => {\n switch (key) {\n case 'p':\n case 'padding':\n applySpacing(style, 'padding', value);\n break;\n case 'pt':\n case 'paddingTop':\n applySpacing(style, 'paddingTop', value);\n break;\n case 'pr':\n case 'paddingRight':\n applySpacing(style, 'paddingRight', value);\n break;\n case 'pb':\n case 'paddingBottom':\n applySpacing(style, 'paddingBottom', value);\n break;\n case 'pl':\n case 'paddingLeft':\n applySpacing(style, 'paddingLeft', value);\n break;\n case 'px':\n applySpacing(style, 'paddingLeft', value);\n applySpacing(style, 'paddingRight', value);\n break;\n case 'py':\n applySpacing(style, 'paddingTop', value);\n applySpacing(style, 'paddingBottom', value);\n break;\n\n case 'm':\n case 'margin':\n applySpacing(style, 'margin', value);\n break;\n case 'mt':\n case 'marginTop':\n applySpacing(style, 'marginTop', value);\n break;\n case 'mr':\n case 'marginRight':\n applySpacing(style, 'marginRight', value);\n break;\n case 'mb':\n case 'marginBottom':\n applySpacing(style, 'marginBottom', value);\n break;\n case 'ml':\n case 'marginLeft':\n applySpacing(style, 'marginLeft', value);\n break;\n case 'mx':\n applySpacing(style, 'marginLeft', value);\n applySpacing(style, 'marginRight', value);\n break;\n case 'my':\n applySpacing(style, 'marginTop', value);\n applySpacing(style, 'marginBottom', value);\n break;\n\n case 'ta':\n style.textAlign = value as React.CSSProperties['textAlign'];\n break;\n case 'fd':\n style.flexDirection = value as React.CSSProperties['flexDirection'];\n break;\n case 'fw':\n style.flexWrap = value as React.CSSProperties['flexWrap'];\n break;\n case 'ai':\n style.alignItems = value as React.CSSProperties['alignItems'];\n break;\n case 'ac':\n style.alignContent = value as React.CSSProperties['alignContent'];\n break;\n case 'jc':\n style.justifyContent = value as React.CSSProperties['justifyContent'];\n break;\n case 'as':\n style.alignSelf = value as React.CSSProperties['alignSelf'];\n break;\n case 'fg':\n style.flexGrow = value;\n break;\n case 'fs':\n style.flexShrink = value;\n break;\n case 'fb':\n applySize(style, 'flexBasis', value);\n break;\n\n case 'bc':\n case 'backgroundColor':\n applyColor(style, 'backgroundColor', value, colors);\n break;\n case 'br':\n case 'borderRadius':\n applyRadii(style, 'borderRadius', value);\n break;\n case 'btrr':\n case 'borderTopRightRadius':\n applyRadii(style, 'borderTopRightRadius', value);\n break;\n case 'bbrr':\n case 'borderBottomRightRadius':\n applyRadii(style, 'borderBottomRightRadius', value);\n break;\n case 'bblr':\n case 'borderBottomLeftRadius':\n applyRadii(style, 'borderBottomLeftRadius', value);\n break;\n case 'btlr':\n case 'borderTopLeftRadius':\n applyRadii(style, 'borderTopLeftRadius', value);\n break;\n case 'bs':\n case 'boxShadow':\n style.boxShadow = value;\n break;\n case 'c':\n case 'color':\n applyColor(style, 'color', value, colors);\n break;\n\n case 'fontSize':\n if (typeof value === 'string') {\n const fontSizeValue = getFontSizeValue(value);\n if (fontSizeValue !== '16px') {\n style.fontSize = fontSizeValue;\n }\n }\n break;\n case 'fontWeight':\n if (typeof value === 'string') {\n const fontWeightValue = getFontWeightValue(value);\n if (fontWeightValue !== '400') {\n style.fontWeight = fontWeightValue;\n }\n }\n break;\n case 'lh':\n style.lineHeight = value;\n break;\n\n case 'width':\n case 'w':\n applySize(style, 'width', value);\n break;\n case 'height':\n case 'h':\n applySize(style, 'height', value);\n break;\n\n case 'size':\n applySize(style, 'width', value);\n applySize(style, 'height', value);\n break;\n\n case 'ox':\n style.overflowX = value as React.CSSProperties['overflowX'];\n break;\n case 'oy':\n style.overflowY = value as React.CSSProperties['overflowY'];\n break;\n\n case 'pe':\n style.pointerEvents = value as React.CSSProperties['pointerEvents'];\n break;\n case 'us':\n style.userSelect = value as React.CSSProperties['userSelect'];\n break;\n\n default:\n // Handle token syntax for any property that falls through to default\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n\n // Try spacing tokens first (most common for gap, etc)\n const spaceValue = getSpaceValue(tokenValue);\n if (spaceValue !== '0px') {\n (style as any)[key] = spaceValue;\n break;\n }\n\n // Try size tokens\n const sizeValue = getSizeValue(tokenValue);\n if (sizeValue !== tokenValue) {\n (style as any)[key] = sizeValue;\n break;\n }\n\n // Try radii tokens\n const radiiValue = getRadiiValue(tokenValue);\n if (radiiValue !== '0px') {\n (style as any)[key] = radiiValue;\n break;\n }\n\n // Try color tokens\n if (colors && tokenValue in colors) {\n (style as any)[key] = colors[tokenValue];\n break;\n }\n\n // If no token matches, pass through as-is\n (style as any)[key] = value;\n } else {\n (style as any)[key] = value;\n }\n break;\n }\n });\n\n return { style, vars };\n}\n"],"mappings":";AA2DA,SAAS,aAAa,OAAuB;CAC3C,OAAO,MAAM,WAAW,GAAG,IAAI,MAAM,MAAM,CAAC,IAAI;AAClD;AAEA,SAAS,cAAc,KAAqB;CAY1C,OAAO;EAVL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;CAEA,EAAS,QAAQ;AAC1B;AAEA,SAAS,aAAa,KAAqB;CAazC,OAAO;EAXL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,MAAM;CAED,EAAQ,QAAQ;AACzB;AAEA,SAAS,cAAc,KAAqB;CAU1C,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Aa;IACnB;GAEF;IAEE,IAAI,OAAO,UAAU,YAAY,MAAM,WAAW,GAAG,GAAG;KACtD,MAAM,aAAa,aAAa,KAAK;KAGrC,MAAM,aAAa,cAAc,UAAU;KAC3C,IAAI,eAAe,OAAO;MACxB,MAAe,OAAO;MACtB;KACF;KAGA,MAAM,YAAY,aAAa,UAAU;KACzC,IAAI,cAAc,YAAY;MAC5B,MAAe,OAAO;MACtB;KACF;KAGA,MAAM,aAAa,cAAc,UAAU;KAC3C,IAAI,eAAe,OAAO;MACxB,MAAe,OAAO;MACtB;KACF;KAGA,IAAI,UAAU,cAAc,QAAQ;MAClC,MAAe,OAAO,OAAO;MAC7B;KACF;KAGA,MAAe,OAAO;IACxB,OACE,MAAe,OAAO;IAExB;EACJ;CACF,CAAC;CAED,OAAO;EAAE;EAAO;CAAK;AACvB"}
|
|
1
|
+
{"version":3,"file":"cssProps.js","names":[],"sources":["../../styles/cssProps.ts"],"sourcesContent":["import { FlexAlign, FlexJustify, SizeToken, SpacingToken } from './types';\n\nexport interface CSSProps {\n css?: {\n p?: SpacingToken;\n pt?: SpacingToken;\n pr?: SpacingToken;\n pb?: SpacingToken;\n pl?: SpacingToken;\n px?: SpacingToken;\n py?: SpacingToken;\n\n m?: SpacingToken;\n mt?: SpacingToken;\n mr?: SpacingToken;\n mb?: SpacingToken;\n ml?: SpacingToken;\n mx?: SpacingToken;\n my?: SpacingToken;\n\n ta?: 'left' | 'center' | 'right' | 'justify';\n fd?: 'row' | 'column' | 'row-reverse' | 'column-reverse';\n fw?: 'wrap' | 'nowrap' | 'wrap-reverse';\n ai?: FlexAlign;\n ac?: FlexAlign | 'space-between' | 'space-around' | 'space-evenly';\n jc?: FlexJustify;\n as?: 'auto' | FlexAlign;\n fg?: 0 | 1;\n fs?: 0 | 1;\n fb?: SizeToken;\n\n bc?: string;\n br?: string;\n btrr?: string;\n bbrr?: string;\n bblr?: string;\n btlr?: string;\n bs?: string;\n c?: string;\n\n width?: SizeToken;\n height?: SizeToken;\n size?: SizeToken;\n\n ox?: 'visible' | 'hidden' | 'scroll' | 'auto';\n oy?: 'visible' | 'hidden' | 'scroll' | 'auto';\n\n pe?: 'auto' | 'none' | 'all';\n us?: 'none' | 'auto' | 'text' | 'contain' | 'all';\n\n fontSize?: string;\n fontWeight?: string;\n lh?: string | number;\n\n [key: string]: any;\n };\n}\n\n// HELPERS\nfunction processToken(value: string): string {\n return value.startsWith('$') ? value.slice(1) : value;\n}\n\nfunction getSpaceValue(key: string): string {\n const spaceMap: Record<string, string> = {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '48px',\n '8': '64px',\n '9': '80px',\n };\n return spaceMap[key] || '0px';\n}\n\nfunction getSizeValue(key: string): string {\n const sizeMap: Record<string, string> = {\n '1': '4px',\n '2': '8px',\n '3': '16px',\n '4': '20px',\n '5': '24px',\n '6': '32px',\n '7': '40px',\n '8': '48px',\n '9': '64px',\n '10': '80px',\n };\n return sizeMap[key] || key;\n}\n\nfunction getRadiiValue(key: string): string {\n const radiiMap: Record<string, string> = {\n '1': '4px',\n '2': '6px',\n '3': '8px',\n '4': '12px',\n round: '50%',\n pill: '9999px',\n button: '8px',\n };\n return radiiMap[key] || '0px';\n}\n\nfunction getFontSizeValue(key: string): string {\n const fontSizeMap: Record<string, string> = {\n '0': '11px',\n '1': '12px',\n '2': '13px',\n '3': '14px',\n '4': '16px',\n '5': '18px',\n '6': '20px',\n '7': '22px',\n '8': '24px',\n '9': '26px',\n '10': '28px',\n '11': '32px',\n '12': '38px',\n };\n return fontSizeMap[key] || '16px';\n}\n\nfunction getFontWeightValue(key: string): string {\n const fontWeightMap: Record<string, string> = {\n light: '300',\n regular: '400',\n medium: '500',\n semiBold: '600',\n bold: '700',\n };\n return fontWeightMap[key] || '400';\n}\n\nfunction applySpacing(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const spaceValue = getSpaceValue(tokenValue);\n if (spaceValue !== '0px') {\n (style as any)[property] = spaceValue;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applyRadii(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const radiiValue = getRadiiValue(tokenValue);\n if (radiiValue !== '0px') {\n (style as any)[property] = radiiValue;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applyColor(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n colors?: Record<string, any>,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const colorToken = value.slice(1);\n if (colors && colorToken in colors) {\n (style as any)[property] = colors[colorToken];\n } else {\n (style as any)[property] = value;\n }\n } else {\n (style as any)[property] = value;\n }\n}\n\nfunction applySize(\n style: React.CSSProperties,\n property: keyof React.CSSProperties,\n value: string,\n): void {\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n const sizeValue = getSizeValue(tokenValue);\n (style as any)[property] = sizeValue;\n } else {\n (style as any)[property] = value;\n }\n}\n\n// CSS PROCESSOR\nexport function processCSSProp(\n css: CSSProps['css'] = {},\n colors?: Record<string, any>,\n): {\n style: React.CSSProperties;\n vars: Record<string, string>;\n} {\n const style: React.CSSProperties = {};\n const vars: Record<string, string> = {};\n\n Object.entries(css).forEach(([key, value]) => {\n switch (key) {\n case 'p':\n case 'padding':\n applySpacing(style, 'padding', value);\n break;\n case 'pt':\n case 'paddingTop':\n applySpacing(style, 'paddingTop', value);\n break;\n case 'pr':\n case 'paddingRight':\n applySpacing(style, 'paddingRight', value);\n break;\n case 'pb':\n case 'paddingBottom':\n applySpacing(style, 'paddingBottom', value);\n break;\n case 'pl':\n case 'paddingLeft':\n applySpacing(style, 'paddingLeft', value);\n break;\n case 'px':\n applySpacing(style, 'paddingLeft', value);\n applySpacing(style, 'paddingRight', value);\n break;\n case 'py':\n applySpacing(style, 'paddingTop', value);\n applySpacing(style, 'paddingBottom', value);\n break;\n\n case 'm':\n case 'margin':\n applySpacing(style, 'margin', value);\n break;\n case 'mt':\n case 'marginTop':\n applySpacing(style, 'marginTop', value);\n break;\n case 'mr':\n case 'marginRight':\n applySpacing(style, 'marginRight', value);\n break;\n case 'mb':\n case 'marginBottom':\n applySpacing(style, 'marginBottom', value);\n break;\n case 'ml':\n case 'marginLeft':\n applySpacing(style, 'marginLeft', value);\n break;\n case 'mx':\n applySpacing(style, 'marginLeft', value);\n applySpacing(style, 'marginRight', value);\n break;\n case 'my':\n applySpacing(style, 'marginTop', value);\n applySpacing(style, 'marginBottom', value);\n break;\n\n case 'ta':\n style.textAlign = value as React.CSSProperties['textAlign'];\n break;\n case 'fd':\n style.flexDirection = value as React.CSSProperties['flexDirection'];\n break;\n case 'fw':\n style.flexWrap = value as React.CSSProperties['flexWrap'];\n break;\n case 'ai':\n style.alignItems = value as React.CSSProperties['alignItems'];\n break;\n case 'ac':\n style.alignContent = value as React.CSSProperties['alignContent'];\n break;\n case 'jc':\n style.justifyContent = value as React.CSSProperties['justifyContent'];\n break;\n case 'as':\n style.alignSelf = value as React.CSSProperties['alignSelf'];\n break;\n case 'fg':\n style.flexGrow = value;\n break;\n case 'fs':\n style.flexShrink = value;\n break;\n case 'fb':\n applySize(style, 'flexBasis', value);\n break;\n\n case 'bc':\n case 'backgroundColor':\n applyColor(style, 'backgroundColor', value, colors);\n break;\n case 'br':\n case 'borderRadius':\n applyRadii(style, 'borderRadius', value);\n break;\n case 'btrr':\n case 'borderTopRightRadius':\n applyRadii(style, 'borderTopRightRadius', value);\n break;\n case 'bbrr':\n case 'borderBottomRightRadius':\n applyRadii(style, 'borderBottomRightRadius', value);\n break;\n case 'bblr':\n case 'borderBottomLeftRadius':\n applyRadii(style, 'borderBottomLeftRadius', value);\n break;\n case 'btlr':\n case 'borderTopLeftRadius':\n applyRadii(style, 'borderTopLeftRadius', value);\n break;\n case 'bs':\n case 'boxShadow':\n style.boxShadow = value;\n break;\n case 'c':\n case 'color':\n applyColor(style, 'color', value, colors);\n break;\n\n case 'fontSize':\n if (typeof value === 'string') {\n const fontSizeValue = getFontSizeValue(value);\n if (fontSizeValue !== '16px') {\n style.fontSize = fontSizeValue;\n }\n }\n break;\n case 'fontWeight':\n if (typeof value === 'string') {\n const fontWeightValue = getFontWeightValue(value);\n if (fontWeightValue !== '400') {\n style.fontWeight = fontWeightValue;\n }\n }\n break;\n case 'lh':\n style.lineHeight = value;\n break;\n\n case 'width':\n case 'w':\n applySize(style, 'width', value);\n break;\n case 'height':\n case 'h':\n applySize(style, 'height', value);\n break;\n\n case 'size':\n applySize(style, 'width', value);\n applySize(style, 'height', value);\n break;\n\n case 'ox':\n style.overflowX = value as React.CSSProperties['overflowX'];\n break;\n case 'oy':\n style.overflowY = value as React.CSSProperties['overflowY'];\n break;\n\n case 'pe':\n style.pointerEvents = value as React.CSSProperties['pointerEvents'];\n break;\n case 'us':\n style.userSelect = value as React.CSSProperties['userSelect'];\n break;\n\n default:\n // Handle token syntax for any property that falls through to default\n if (typeof value === 'string' && value.startsWith('$')) {\n const tokenValue = processToken(value);\n\n // Try spacing tokens first (most common for gap, etc)\n const spaceValue = getSpaceValue(tokenValue);\n if (spaceValue !== '0px') {\n (style as any)[key] = spaceValue;\n break;\n }\n\n // Try size tokens\n const sizeValue = getSizeValue(tokenValue);\n if (sizeValue !== tokenValue) {\n (style as any)[key] = sizeValue;\n break;\n }\n\n // Try radii tokens\n const radiiValue = getRadiiValue(tokenValue);\n if (radiiValue !== '0px') {\n (style as any)[key] = radiiValue;\n break;\n }\n\n // Try color tokens\n if (colors && tokenValue in colors) {\n (style as any)[key] = colors[tokenValue];\n break;\n }\n\n // If no token matches, pass through as-is\n (style as any)[key] = value;\n } else {\n (style as any)[key] = value;\n }\n break;\n }\n });\n\n return { style, vars };\n}\n"],"mappings":";AA2DA,SAAS,aAAa,OAAuB;CAC3C,OAAO,MAAM,WA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KAAK;KAChD,IAAI,oBAAoB,OACtB,MAAM,aAAa;IAEvB;IACA;GACF,KAAK;IACH,MAAM,aAAa;IACnB;GAEF,KAAK;GACL,KAAK;IACH,UAAU,OAAO,SAAS,KAAK;IAC/B;GACF,KAAK;GACL,KAAK;IACH,UAAU,OAAO,UAAU,KAAK;IAChC;GAEF,KAAK;IACH,UAAU,OAAO,SAAS,KAAK;IAC/B,UAAU,OAAO,UAAU,KAAK;IAChC;GAEF,KAAK;IACH,MAAM,YAAY;IAClB;GACF,KAAK;IACH,MAAM,YAAY;IAClB;GAEF,KAAK;IACH,MAAM,gBAAgB;IACtB;GACF,KAAK;IACH,MAAM,aAAa;IACnB;GAEF,SAEE,IAAI,OAAO,UAAU,YAAY,MAAM,WAAW,GAAG,GAAG;IACtD,MAAM,aAAa,aAAa,KAAK;IAGrC,MAAM,aAAa,cAAc,UAAU;IAC3C,IAAI,eAAe,OAAO;KACxB,MAAe,OAAO;KACtB;IACF;IAGA,MAAM,YAAY,aAAa,UAAU;IACzC,IAAI,cAAc,YAAY;KAC5B,MAAe,OAAO;KACtB;IACF;IAGA,MAAM,aAAa,cAAc,UAAU;IAC3C,IAAI,eAAe,OAAO;KACxB,MAAe,OAAO;KACtB;IACF;IAGA,IAAI,UAAU,cAAc,QAAQ;KAClC,MAAe,OAAO,OAAO;KAC7B;IACF;IAGA,MAAe,OAAO;GACxB,OACE,MAAe,OAAO;EAG5B;CACF,CAAC;CAED,OAAO;EAAE;EAAO;CAAK;AACvB"}
|
|
@@ -4,7 +4,7 @@ const require_themes_css = require("./themes.css.cjs");
|
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_runtime.__toESM(react, 1);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
|
|
7
|
+
// styles/themeContext.tsx
|
|
8
8
|
var ThemeContext = (0, react.createContext)(void 0);
|
|
9
9
|
function VanillaExtractThemeProvider({ children, defaultTheme = "system", primaryColor = "blue", forcedTheme }) {
|
|
10
10
|
const [mode, setMode] = (0, react.useState)(defaultTheme);
|
|
@@ -108,7 +108,6 @@ function useVanillaExtractTheme() {
|
|
|
108
108
|
if (context === void 0) throw new Error("useVanillaExtractTheme must be used within a VanillaExtractThemeProvider");
|
|
109
109
|
return context;
|
|
110
110
|
}
|
|
111
|
-
//#endregion
|
|
112
111
|
exports.VanillaExtractThemeProvider = VanillaExtractThemeProvider;
|
|
113
112
|
exports.useVanillaExtractTheme = useVanillaExtractTheme;
|
|
114
113
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeContext.cjs","names":[],"sources":["../../styles/themeContext.tsx"],"sourcesContent":["import React, { createContext, useContext, useEffect, useLayoutEffect, useState } from 'react';\n\nimport { darkColors, lightColors } from '../colors';\nimport { PrimaryColor, themes } from './themes.css';\n\nexport type ThemeMode = 'light' | 'dark' | 'system';\nexport type { PrimaryColor };\n\ninterface ThemeContextValue {\n mode: ThemeMode;\n resolvedTheme: 'light' | 'dark';\n primaryColor: PrimaryColor;\n colors: typeof lightColors | typeof darkColors;\n setMode: (mode: ThemeMode) => void;\n setPrimaryColor: (color: PrimaryColor) => void;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | undefined>(undefined);\n\ninterface VanillaExtractThemeProviderProps {\n children: React.ReactNode;\n defaultTheme?: ThemeMode;\n primaryColor?: PrimaryColor;\n forcedTheme?: 'light' | 'dark';\n}\n\nexport function VanillaExtractThemeProvider({\n children,\n defaultTheme = 'system',\n primaryColor = 'blue',\n forcedTheme,\n}: VanillaExtractThemeProviderProps) {\n const [mode, setMode] = useState<ThemeMode>(defaultTheme);\n const [appliedPrimaryColor, setPrimaryColor] = useState<PrimaryColor>(primaryColor);\n const [systemTheme, setSystemTheme] = useState<'light' | 'dark'>(() => {\n if (forcedTheme) {\n return forcedTheme;\n }\n if (typeof window !== 'undefined') {\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n return 'light';\n });\n\n useEffect(() => {\n setPrimaryColor(primaryColor);\n }, [primaryColor]);\n\n useEffect(() => {\n if (forcedTheme) {\n setSystemTheme(forcedTheme);\n return;\n }\n\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n setSystemTheme(mediaQuery.matches ? 'dark' : 'light');\n\n const handler = (e: MediaQueryListEvent) => {\n setSystemTheme(e.matches ? 'dark' : 'light');\n };\n\n mediaQuery.addEventListener('change', handler);\n return () => mediaQuery.removeEventListener('change', handler);\n }, [forcedTheme]);\n\n const resolvedTheme: 'light' | 'dark' = forcedTheme || (mode === 'system' ? systemTheme : mode);\n\n const baseColors = resolvedTheme === 'dark' ? darkColors : lightColors;\n\n const semanticColors =\n resolvedTheme === 'dark'\n ? {\n primary: darkColors[`${appliedPrimaryColor}9`],\n contentBg: darkColors['00dp'],\n hiContrast: 'white',\n loContrast: darkColors.deepBlue2,\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(209, 29%, 19%)',\n background: '#0a0a0a',\n foreground: '#ffffff',\n muted: '#1a1a1a',\n mutedForeground: '#b4b4b4',\n card: '#1a1a1a',\n cardForeground: '#ffffff',\n popover: '#1a1a1a',\n popoverForeground: '#ffffff',\n border: '#3a3a3a',\n input: '#3a3a3a',\n accent: '#3b82f6',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#60a5fa',\n }\n : {\n primary: lightColors[`${appliedPrimaryColor}9`],\n contentBg: lightColors['00dp'],\n hiContrast: lightColors.deepBlue11,\n loContrast: 'white',\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(207, 10%, 82%)',\n background: '#fcfcfc',\n foreground: '#1a1a1a',\n muted: '#f4f4f4',\n mutedForeground: '#646464',\n card: '#ffffff',\n cardForeground: '#1a1a1a',\n popover: '#ffffff',\n popoverForeground: '#1a1a1a',\n border: '#e3e3e3',\n input: '#e3e3e3',\n accent: '#60a5fa',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#3b82f6',\n };\n\n const colors = {\n ...baseColors,\n ...semanticColors,\n };\n\n // Use useLayoutEffect to apply theme class synchronously before paint\n useLayoutEffect(() => {\n const themeClass = themes[resolvedTheme][appliedPrimaryColor];\n\n Object.values(themes.light).forEach((cls) => document.body.classList.remove(cls));\n Object.values(themes.dark).forEach((cls) => document.body.classList.remove(cls));\n\n document.body.classList.add(themeClass);\n\n return () => {\n document.body.classList.remove(themeClass);\n };\n }, [resolvedTheme, appliedPrimaryColor]);\n\n const contextValue: ThemeContextValue = {\n mode,\n resolvedTheme,\n primaryColor: appliedPrimaryColor,\n colors,\n setMode,\n setPrimaryColor,\n };\n\n return <ThemeContext.Provider value={contextValue}>{children}</ThemeContext.Provider>;\n}\n\nexport function useVanillaExtractTheme() {\n const context = useContext(ThemeContext);\n if (context === undefined) {\n throw new Error('useVanillaExtractTheme must be used within a VanillaExtractThemeProvider');\n }\n return context;\n}\n"],"mappings":";;;;;;;AAiBA,IAAM,gBAAA,
|
|
1
|
+
{"version":3,"file":"themeContext.cjs","names":["createContext","useState","darkColors","lightColors","themes","useContext"],"sources":["../../styles/themeContext.tsx"],"sourcesContent":["import React, { createContext, useContext, useEffect, useLayoutEffect, useState } from 'react';\n\nimport { darkColors, lightColors } from '../colors';\nimport { PrimaryColor, themes } from './themes.css';\n\nexport type ThemeMode = 'light' | 'dark' | 'system';\nexport type { PrimaryColor };\n\ninterface ThemeContextValue {\n mode: ThemeMode;\n resolvedTheme: 'light' | 'dark';\n primaryColor: PrimaryColor;\n colors: typeof lightColors | typeof darkColors;\n setMode: (mode: ThemeMode) => void;\n setPrimaryColor: (color: PrimaryColor) => void;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | undefined>(undefined);\n\ninterface VanillaExtractThemeProviderProps {\n children: React.ReactNode;\n defaultTheme?: ThemeMode;\n primaryColor?: PrimaryColor;\n forcedTheme?: 'light' | 'dark';\n}\n\nexport function VanillaExtractThemeProvider({\n children,\n defaultTheme = 'system',\n primaryColor = 'blue',\n forcedTheme,\n}: VanillaExtractThemeProviderProps) {\n const [mode, setMode] = useState<ThemeMode>(defaultTheme);\n const [appliedPrimaryColor, setPrimaryColor] = useState<PrimaryColor>(primaryColor);\n const [systemTheme, setSystemTheme] = useState<'light' | 'dark'>(() => {\n if (forcedTheme) {\n return forcedTheme;\n }\n if (typeof window !== 'undefined') {\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n return 'light';\n });\n\n useEffect(() => {\n setPrimaryColor(primaryColor);\n }, [primaryColor]);\n\n useEffect(() => {\n if (forcedTheme) {\n setSystemTheme(forcedTheme);\n return;\n }\n\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n setSystemTheme(mediaQuery.matches ? 'dark' : 'light');\n\n const handler = (e: MediaQueryListEvent) => {\n setSystemTheme(e.matches ? 'dark' : 'light');\n };\n\n mediaQuery.addEventListener('change', handler);\n return () => mediaQuery.removeEventListener('change', handler);\n }, [forcedTheme]);\n\n const resolvedTheme: 'light' | 'dark' = forcedTheme || (mode === 'system' ? systemTheme : mode);\n\n const baseColors = resolvedTheme === 'dark' ? darkColors : lightColors;\n\n const semanticColors =\n resolvedTheme === 'dark'\n ? {\n primary: darkColors[`${appliedPrimaryColor}9`],\n contentBg: darkColors['00dp'],\n hiContrast: 'white',\n loContrast: darkColors.deepBlue2,\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(209, 29%, 19%)',\n background: '#0a0a0a',\n foreground: '#ffffff',\n muted: '#1a1a1a',\n mutedForeground: '#b4b4b4',\n card: '#1a1a1a',\n cardForeground: '#ffffff',\n popover: '#1a1a1a',\n popoverForeground: '#ffffff',\n border: '#3a3a3a',\n input: '#3a3a3a',\n accent: '#3b82f6',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#60a5fa',\n }\n : {\n primary: lightColors[`${appliedPrimaryColor}9`],\n contentBg: lightColors['00dp'],\n hiContrast: lightColors.deepBlue11,\n loContrast: 'white',\n focusOutline: 'hsl(216, 100%, 64%)',\n divider: 'hsl(207, 10%, 82%)',\n background: '#fcfcfc',\n foreground: '#1a1a1a',\n muted: '#f4f4f4',\n mutedForeground: '#646464',\n card: '#ffffff',\n cardForeground: '#1a1a1a',\n popover: '#ffffff',\n popoverForeground: '#1a1a1a',\n border: '#e3e3e3',\n input: '#e3e3e3',\n accent: '#60a5fa',\n accentForeground: '#ffffff',\n destructive: '#dc2626',\n destructiveForeground: '#ffffff',\n ring: '#3b82f6',\n };\n\n const colors = {\n ...baseColors,\n ...semanticColors,\n };\n\n // Use useLayoutEffect to apply theme class synchronously before paint\n useLayoutEffect(() => {\n const themeClass = themes[resolvedTheme][appliedPrimaryColor];\n\n Object.values(themes.light).forEach((cls) => document.body.classList.remove(cls));\n Object.values(themes.dark).forEach((cls) => document.body.classList.remove(cls));\n\n document.body.classList.add(themeClass);\n\n return () => {\n document.body.classList.remove(themeClass);\n };\n }, [resolvedTheme, appliedPrimaryColor]);\n\n const contextValue: ThemeContextValue = {\n mode,\n resolvedTheme,\n primaryColor: appliedPrimaryColor,\n colors,\n setMode,\n setPrimaryColor,\n };\n\n return <ThemeContext.Provider value={contextValue}>{children}</ThemeContext.Provider>;\n}\n\nexport function useVanillaExtractTheme() {\n const context = useContext(ThemeContext);\n if (context === undefined) {\n throw new Error('useVanillaExtractTheme must be used within a VanillaExtractThemeProvider');\n }\n return context;\n}\n"],"mappings":";;;;;;;AAiBA,IAAM,gBAAA,GAAeA,MAAAA,cAAAA,CAA6C,KAAA,CAAS;AAS3E,SAAgB,4BAA4B,EAC1C,UACA,eAAe,UACf,eAAe,QACf,eACmC;CACnC,MAAM,CAAC,MAAM,YAAA,GAAWC,MAAAA,SAAAA,CAAoB,YAAY;CACxD,MAAM,CAAC,qBAAqB,oBAAA,GAAmBA,MAAAA,SAAAA,CAAuB,YAAY;CAClF,MAAM,CAAC,aAAa,mBAAA,GAAkBA,MAAAA,SAAAA,OAAiC;EACr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B,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,kBAAkB;EAClB,aAAa;EACb,uBAAuB;EACvB,MAAM;CACR;CAEN,MAAM,SAAS;EACb,GAAG;EACH,GAAG;CACL;CAGA,CAAA,GAAA,MAAA,gBAAA,OAAsB;EACpB,MAAM,aAAaC,mBAAAA,OAAO,cAAc,CAAC;EAEzC,OAAO,OAAOA,mBAAAA,OAAO,KAAK,CAAC,CAAC,SAAS,QAAQ,SAAS,KAAK,UAAU,OAAO,GAAG,CAAC;EAChF,OAAO,OAAOA,mBAAAA,OAAO,IAAI,CAAC,CAAC,SAAS,QAAQ,SAAS,KAAK,UAAU,OAAO,GAAG,CAAC;EAE/E,SAAS,KAAK,UAAU,IAAI,UAAU;EAEtC,aAAa;GACX,SAAS,KAAK,UAAU,OAAO,UAAU;EAC3C;CACF,GAAG,CAAC,eAAe,mBAAmB,CAAC;CAEvC,MAAM,eAAkC;EACtC;EACA;EACA,cAAc;EACd;EACA;EACA;CACF;CAEA,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAa,UAAd;EAAuB,OAAO;EAAe;CAAgC,CAAA;AACtF;AAEA,SAAgB,yBAAyB;CACvC,MAAM,WAAA,GAAUC,MAAAA,WAAAA,CAAW,YAAY;CACvC,IAAI,YAAY,KAAA,GACd,MAAM,IAAI,MAAM,0EAA0E;CAE5F,OAAO;AACT"}
|
|
@@ -2,7 +2,7 @@ import { darkColors, lightColors } from "../colors/index.js";
|
|
|
2
2
|
import { themes } from "./themes.css.js";
|
|
3
3
|
import { createContext, useContext, useEffect, useLayoutEffect, useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// styles/themeContext.tsx
|
|
6
6
|
var ThemeContext = createContext(void 0);
|
|
7
7
|
function VanillaExtractThemeProvider({ children, defaultTheme = "system", primaryColor = "blue", forcedTheme }) {
|
|
8
8
|
const [mode, setMode] = useState(defaultTheme);
|
|
@@ -106,7 +106,6 @@ function useVanillaExtractTheme() {
|
|
|
106
106
|
if (context === void 0) throw new Error("useVanillaExtractTheme must be used within a VanillaExtractThemeProvider");
|
|
107
107
|
return context;
|
|
108
108
|
}
|
|
109
|
-
//#endregion
|
|
110
109
|
export { VanillaExtractThemeProvider, useVanillaExtractTheme };
|
|
111
110
|
|
|
112
111
|
//# sourceMappingURL=themeContext.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
;/* empty css */
|
|
2
|
-
|
|
2
|
+
// styles/themes.css.ts
|
|
3
3
|
var themes = {
|
|
4
4
|
light: {
|
|
5
5
|
neon: "_6oteex1",
|
|
@@ -22,7 +22,6 @@ var themes = {
|
|
|
22
22
|
};
|
|
23
23
|
var lightTheme = "_6oteex0";
|
|
24
24
|
var darkTheme = "_6oteex7";
|
|
25
|
-
//#endregion
|
|
26
25
|
exports.darkTheme = darkTheme;
|
|
27
26
|
exports.lightTheme = lightTheme;
|
|
28
27
|
exports.themes = themes;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
|
|
2
|
+
// styles/themes.css.ts
|
|
3
3
|
var themes = {
|
|
4
4
|
light: {
|
|
5
5
|
neon: "_6oteex1",
|
|
@@ -22,7 +22,6 @@ var themes = {
|
|
|
22
22
|
};
|
|
23
23
|
var lightTheme = "_6oteex0";
|
|
24
24
|
var darkTheme = "_6oteex7";
|
|
25
|
-
//#endregion
|
|
26
25
|
export { darkTheme, lightTheme, themes };
|
|
27
26
|
|
|
28
27
|
//# sourceMappingURL=themes.css.js.map
|
package/dist/utils/deepMerge.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// utils/deepMerge.ts
|
|
2
2
|
function isPlainObject(value) {
|
|
3
3
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
4
4
|
}
|
|
@@ -19,7 +19,6 @@ function deepMerge(target, source) {
|
|
|
19
19
|
}
|
|
20
20
|
return result;
|
|
21
21
|
}
|
|
22
|
-
//#endregion
|
|
23
22
|
exports.deepMerge = deepMerge;
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=deepMerge.cjs.map
|
package/dist/utils/deepMerge.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// utils/deepMerge.ts
|
|
2
2
|
function isPlainObject(value) {
|
|
3
3
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
4
4
|
}
|
|
@@ -19,7 +19,6 @@ function deepMerge(target, source) {
|
|
|
19
19
|
}
|
|
20
20
|
return result;
|
|
21
21
|
}
|
|
22
|
-
//#endregion
|
|
23
22
|
export { deepMerge };
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=deepMerge.js.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
// utils/getPrimaryColorInfo.ts
|
|
2
2
|
var getPrimaryColorInfo = (primaryColor, colors) => ({
|
|
3
3
|
name: primaryColor,
|
|
4
4
|
value: colors[`${primaryColor}9`],
|
|
5
5
|
token: `$${primaryColor}9`,
|
|
6
6
|
helpers: { pickScale: (scale, options = { alpha: false }) => `$${primaryColor}${options.alpha ? "A" : ""}${scale}` }
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
exports.default = getPrimaryColorInfo;
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=getPrimaryColorInfo.cjs.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
// utils/getPrimaryColorInfo.ts
|
|
2
2
|
var getPrimaryColorInfo = (primaryColor, colors) => ({
|
|
3
3
|
name: primaryColor,
|
|
4
4
|
value: colors[`${primaryColor}9`],
|
|
5
5
|
token: `$${primaryColor}9`,
|
|
6
6
|
helpers: { pickScale: (scale, options = { alpha: false }) => `$${primaryColor}${options.alpha ? "A" : ""}${scale}` }
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { getPrimaryColorInfo as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=getPrimaryColorInfo.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@traefik-labs/faency",
|
|
3
3
|
"description": "Traefik Labs design system",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "13.0.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"traefiklabs",
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"build": "vite build",
|
|
39
39
|
"lint": "eslint \"./components/**/*.{ts,tsx}\"",
|
|
40
40
|
"lint:fix": "eslint --fix \"./components/**/*.{ts,tsx}\"",
|
|
41
|
-
"release": "yarn build && np",
|
|
42
41
|
"storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider storybook dev -p 6006 -h localhost",
|
|
43
42
|
"storybook-docs": "storybook dev --docs",
|
|
44
43
|
"build-storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider storybook build",
|
|
@@ -52,38 +51,38 @@
|
|
|
52
51
|
"react-dom": ">=18"
|
|
53
52
|
},
|
|
54
53
|
"dependencies": {
|
|
55
|
-
"@floating-ui/react": "0.27.
|
|
54
|
+
"@floating-ui/react": "0.27.20",
|
|
56
55
|
"@radix-ui/colors": "2.1.0",
|
|
57
|
-
"@radix-ui/react-accessible-icon": "1.
|
|
58
|
-
"@radix-ui/react-accordion": "1.
|
|
59
|
-
"@radix-ui/react-alert-dialog": "1.1
|
|
60
|
-
"@radix-ui/react-aspect-ratio": "1.
|
|
61
|
-
"@radix-ui/react-avatar": "1.
|
|
62
|
-
"@radix-ui/react-checkbox": "1.
|
|
63
|
-
"@radix-ui/react-context-menu": "2.
|
|
64
|
-
"@radix-ui/react-dialog": "1.1
|
|
65
|
-
"@radix-ui/react-dropdown-menu": "2.1
|
|
56
|
+
"@radix-ui/react-accessible-icon": "1.2.0",
|
|
57
|
+
"@radix-ui/react-accordion": "1.3.1",
|
|
58
|
+
"@radix-ui/react-alert-dialog": "1.2.1",
|
|
59
|
+
"@radix-ui/react-aspect-ratio": "1.2.0",
|
|
60
|
+
"@radix-ui/react-avatar": "1.3.1",
|
|
61
|
+
"@radix-ui/react-checkbox": "1.4.1",
|
|
62
|
+
"@radix-ui/react-context-menu": "2.4.1",
|
|
63
|
+
"@radix-ui/react-dialog": "1.3.1",
|
|
64
|
+
"@radix-ui/react-dropdown-menu": "2.2.1",
|
|
66
65
|
"@radix-ui/react-icons": "1.3.2",
|
|
67
|
-
"@radix-ui/react-id": "1.1.
|
|
68
|
-
"@radix-ui/react-label": "2.1.
|
|
69
|
-
"@radix-ui/react-navigation-menu": "1.
|
|
70
|
-
"@radix-ui/react-popover": "1.1
|
|
71
|
-
"@radix-ui/react-portal": "1.
|
|
72
|
-
"@radix-ui/react-progress": "1.1
|
|
73
|
-
"@radix-ui/react-radio-group": "1.
|
|
74
|
-
"@radix-ui/react-separator": "1.
|
|
75
|
-
"@radix-ui/react-slider": "1.
|
|
76
|
-
"@radix-ui/react-slot": "1.
|
|
77
|
-
"@radix-ui/react-switch": "1.
|
|
78
|
-
"@radix-ui/react-tabs": "1.1
|
|
79
|
-
"@radix-ui/react-toggle": "1.1
|
|
80
|
-
"@radix-ui/react-toggle-group": "1.1
|
|
81
|
-
"@radix-ui/react-tooltip": "1.
|
|
82
|
-
"@radix-ui/react-use-layout-effect": "1.1.
|
|
83
|
-
"@radix-ui/react-visually-hidden": "1.2.
|
|
66
|
+
"@radix-ui/react-id": "1.1.4",
|
|
67
|
+
"@radix-ui/react-label": "2.1.17",
|
|
68
|
+
"@radix-ui/react-navigation-menu": "1.4.1",
|
|
69
|
+
"@radix-ui/react-popover": "1.3.1",
|
|
70
|
+
"@radix-ui/react-portal": "1.2.0",
|
|
71
|
+
"@radix-ui/react-progress": "1.2.1",
|
|
72
|
+
"@radix-ui/react-radio-group": "1.5.1",
|
|
73
|
+
"@radix-ui/react-separator": "1.2.0",
|
|
74
|
+
"@radix-ui/react-slider": "1.6.1",
|
|
75
|
+
"@radix-ui/react-slot": "1.5.0",
|
|
76
|
+
"@radix-ui/react-switch": "1.4.1",
|
|
77
|
+
"@radix-ui/react-tabs": "1.2.1",
|
|
78
|
+
"@radix-ui/react-toggle": "1.2.1",
|
|
79
|
+
"@radix-ui/react-toggle-group": "1.2.1",
|
|
80
|
+
"@radix-ui/react-tooltip": "1.4.1",
|
|
81
|
+
"@radix-ui/react-use-layout-effect": "1.1.4",
|
|
82
|
+
"@radix-ui/react-visually-hidden": "1.2.13",
|
|
84
83
|
"@rehookify/datepicker": "6.6.8",
|
|
85
84
|
"@stitches/react": "1.2.8",
|
|
86
|
-
"@vanilla-extract/css": "1.21.
|
|
85
|
+
"@vanilla-extract/css": "1.21.3",
|
|
87
86
|
"@vanilla-extract/dynamic": "2.1.5",
|
|
88
87
|
"@vanilla-extract/recipes": "0.5.7",
|
|
89
88
|
"date-fns": "4.4.0",
|
|
@@ -96,59 +95,62 @@
|
|
|
96
95
|
"@babel/preset-env": "7.29.7",
|
|
97
96
|
"@babel/preset-react": "7.29.7",
|
|
98
97
|
"@babel/preset-typescript": "7.29.7",
|
|
99
|
-
"@eslint/
|
|
98
|
+
"@eslint-react/eslint-plugin": "4.2.3",
|
|
99
|
+
"@eslint/js": "10.0.1",
|
|
100
100
|
"@semantic-release/commit-analyzer": "13.0.1",
|
|
101
|
-
"@semantic-release/github": "12.0.
|
|
102
|
-
"@semantic-release/npm": "13.
|
|
101
|
+
"@semantic-release/github": "12.0.10",
|
|
102
|
+
"@semantic-release/npm": "13.2.0",
|
|
103
103
|
"@semantic-release/release-notes-generator": "14.1.1",
|
|
104
|
-
"@storybook/addon-docs": "10.
|
|
105
|
-
"@storybook/addon-links": "10.
|
|
106
|
-
"@storybook/builder-vite": "10.
|
|
107
|
-
"@storybook/react-vite": "10.
|
|
108
|
-
"@testing-library/dom": "10.4.
|
|
109
|
-
"@testing-library/jest-dom": "
|
|
110
|
-
"@testing-library/react": "16.3.
|
|
104
|
+
"@storybook/addon-docs": "10.6.3",
|
|
105
|
+
"@storybook/addon-links": "10.6.3",
|
|
106
|
+
"@storybook/builder-vite": "10.6.3",
|
|
107
|
+
"@storybook/react-vite": "10.6.3",
|
|
108
|
+
"@testing-library/dom": "10.4.2",
|
|
109
|
+
"@testing-library/jest-dom": "7.0.1",
|
|
110
|
+
"@testing-library/react": "16.3.3",
|
|
111
|
+
"@testing-library/user-event": "14.6.8",
|
|
111
112
|
"@types/jest": "30.0.0",
|
|
112
113
|
"@types/jest-axe": "3.5.9",
|
|
113
|
-
"@types/node": "24.
|
|
114
|
+
"@types/node": "24.19.2",
|
|
114
115
|
"@types/prismjs": "1.26.6",
|
|
115
116
|
"@types/react": "18.2.0",
|
|
116
117
|
"@types/react-dom": "18.2.0",
|
|
117
118
|
"@types/tinycolor2": "1.4.6",
|
|
118
|
-
"@vanilla-extract/vite-plugin": "5.2.
|
|
119
|
-
"@vitejs/plugin-react": "6.
|
|
119
|
+
"@vanilla-extract/vite-plugin": "5.2.6",
|
|
120
|
+
"@vitejs/plugin-react": "6.1.2",
|
|
120
121
|
"@vueless/storybook-dark-mode": "10.0.8",
|
|
121
|
-
"babel-jest": "30.
|
|
122
|
+
"babel-jest": "30.5.2",
|
|
122
123
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
123
124
|
"cross-env": "10.1.0",
|
|
124
|
-
"eslint": "
|
|
125
|
+
"eslint": "10.13.0",
|
|
125
126
|
"eslint-config-prettier": "10.1.8",
|
|
126
127
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
127
|
-
"eslint-plugin-prettier": "5.5.
|
|
128
|
-
"eslint-plugin-
|
|
129
|
-
"eslint-plugin-
|
|
130
|
-
"
|
|
131
|
-
"eslint-plugin-storybook": "10.5.0",
|
|
132
|
-
"globals": "17.7.0",
|
|
128
|
+
"eslint-plugin-prettier": "5.5.7",
|
|
129
|
+
"eslint-plugin-simple-import-sort": "14.0.0",
|
|
130
|
+
"eslint-plugin-storybook": "10.6.3",
|
|
131
|
+
"globals": "17.13.0",
|
|
133
132
|
"husky": "9.1.7",
|
|
134
|
-
"jest": "30.
|
|
135
|
-
"jest-axe": "
|
|
136
|
-
"jest-environment-jsdom": "30.
|
|
137
|
-
"lint-staged": "17.0
|
|
138
|
-
"np": "11.2.2",
|
|
133
|
+
"jest": "30.5.2",
|
|
134
|
+
"jest-axe": "11.0.0",
|
|
135
|
+
"jest-environment-jsdom": "30.5.2",
|
|
136
|
+
"lint-staged": "17.6.0",
|
|
139
137
|
"patch-package": "8.0.1",
|
|
140
|
-
"prettier": "3.9.
|
|
138
|
+
"prettier": "3.9.10",
|
|
141
139
|
"react": "18.3.1",
|
|
142
140
|
"react-dom": "18.3.1",
|
|
143
|
-
"semantic-release": "25.0.
|
|
144
|
-
"storybook": "10.
|
|
141
|
+
"semantic-release": "25.0.9",
|
|
142
|
+
"storybook": "10.6.3",
|
|
145
143
|
"typescript": "5.8.3",
|
|
146
|
-
"typescript-eslint": "8.
|
|
147
|
-
"vite": "8.
|
|
144
|
+
"typescript-eslint": "8.72.0",
|
|
145
|
+
"vite": "8.3.5",
|
|
148
146
|
"vite-plugin-dts": "4.5.4"
|
|
149
147
|
},
|
|
150
148
|
"resolutions": {
|
|
151
|
-
"
|
|
149
|
+
"@typescript-eslint/tsconfig-utils": "8.72.0",
|
|
150
|
+
"@typescript-eslint/types": "8.72.0",
|
|
151
|
+
"bundle-name": "4.1.1",
|
|
152
|
+
"magic-string@^1.1.0": "1.4.4",
|
|
153
|
+
"postcss": "8.5.31"
|
|
152
154
|
},
|
|
153
155
|
"publishConfig": {
|
|
154
156
|
"access": "public",
|
|
@@ -187,5 +189,5 @@
|
|
|
187
189
|
"engines": {
|
|
188
190
|
"node": ">=24.14.1"
|
|
189
191
|
},
|
|
190
|
-
"packageManager": "yarn@4.
|
|
192
|
+
"packageManager": "yarn@4.18.1+sha512.b2e1e7524f654f2749d32b4ebcb4622473cb5bcbc485df2007e12a154e50162a4d795526768bc5f5b8f81717bfd79deb2472813d86fb5ae2eb551fa9c872b08f"
|
|
191
193
|
}
|