@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":"AriaTable.cjs","names":[],"sources":["../../../components/AriaTable/AriaTable.tsx"],"sourcesContent":["import { ChevronRightIcon } from '@radix-ui/react-icons';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, {\n Children,\n cloneElement,\n ComponentProps,\n ElementRef,\n forwardRef,\n isValidElement,\n ReactNode,\n useMemo,\n useState,\n} from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { deepMerge } from '../../utils/deepMerge';\nimport { Box } from '../Box';\nimport type { TableVariants } from '../Table';\nimport {\n Caption as TableCaption,\n StyledTr as TableTr,\n Table as TableTable,\n Tbody as TableTbody,\n Td as TableTd,\n Tfoot as TableTfoot,\n Th as TableTh,\n Thead as TableThead,\n} from '../Table';\n\nexport const Caption = styled('div', TableCaption, {\n display: 'table-caption',\n});\n\nconst StyledTbody = styled('div', TableTbody, {\n display: 'table-row-group',\n});\nexport const Tbody = forwardRef<\n ElementRef<typeof StyledTbody>,\n ComponentProps<typeof StyledTbody> & VariantProps<typeof StyledTbody>\n>((props, ref) => <StyledTbody ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTfoot = styled('div', TableTfoot, {\n display: 'table-footer-group',\n});\nexport const Tfoot = forwardRef<\n ElementRef<typeof StyledTfoot>,\n ComponentProps<typeof StyledTfoot> & VariantProps<typeof StyledTfoot>\n>((props, ref) => <StyledTfoot ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTr = styled('div', TableTr, {\n display: 'table-row',\n});\nconst StyledTrSlot = styled(Slot, StyledTr);\n\nconst AnimatedContainer = ({ isOpen, children }: { isOpen: boolean; children: ReactNode }) => {\n const appliedStyle = useMemo(\n () =>\n isOpen\n ? {\n transition: 'all 0.2s ease-out',\n paddingBottom: 0,\n paddingTop: 0,\n border: 'none',\n }\n : {\n transition: 'all 0.2s ease-out',\n padding: '0px 16px',\n pointerEvents: 'none',\n border: 'none',\n },\n [isOpen],\n );\n\n const containerStyle = useMemo(\n () =>\n isOpen\n ? {\n transition: 'all 0.2s ease-out',\n padding: '16px',\n paddingBottom: 0,\n }\n : {\n transition: 'all 0.2s ease-out',\n height: 0,\n overflow: 'hidden',\n padding: '0px 16px',\n },\n [isOpen],\n );\n\n return (\n <StyledTr\n css={isOpen ? { '&:not(:last-child)': { borderBottom: '1px solid $tableRowBorder' } } : {}}\n >\n <Td css={appliedStyle} fullColSpan>\n <Box css={containerStyle}>{children}</Box>\n </Td>\n </StyledTr>\n );\n};\n\nexport type AriaTrProps = ComponentProps<typeof StyledTr> &\n VariantProps<typeof StyledTr> & {\n asChild?: boolean;\n collapsedContent?: React.ReactNode;\n emptyFirstColumn?: boolean;\n tableHead?: boolean;\n children?: React.ReactNode;\n };\n\nexport const Tr = forwardRef<ElementRef<typeof StyledTr>, AriaTrProps>(\n ({ asChild, children, collapsedContent, emptyFirstColumn, tableHead, css, ...props }, ref) => {\n const Component = asChild ? StyledTrSlot : StyledTr;\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n if (!asChild) {\n const arrayChildren = Children.toArray(children);\n const hasColSpanChildren = arrayChildren.some((child) => {\n if (!isValidElement(child)) {\n return false;\n }\n const { fullColSpan } = child.props as TdProps;\n return !!fullColSpan;\n });\n if (hasColSpanChildren && arrayChildren.length > 1) {\n throw new Error('Using fullColSpan is allowed only for a single full width Td.');\n }\n }\n\n const TdEl = useMemo(\n () =>\n emptyFirstColumn ? (\n tableHead ? (\n <Th css={{ width: 24 }} />\n ) : (\n <Td key=\"empty-td\" />\n )\n ) : collapsedContent ? (\n <Td key=\"chevron-td\">\n <Box\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <ChevronRightIcon\n onClick={() => setIsCollapsed(!isCollapsed)}\n style={{\n cursor: 'pointer',\n transition: 'transform 0.2s ease-out',\n transform: isCollapsed ? 'rotate(90deg)' : 'initial',\n }}\n />\n </Box>\n </Td>\n ) : null,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isCollapsed],\n );\n\n const renderedChildren = useMemo(() => {\n if (asChild) {\n return cloneElement(\n children as any,\n {\n // @ts-ignore: Object is possibly 'null'.\n ...children?.props,\n },\n // @ts-ignore: Object is possibly 'null'.\n [TdEl, ...(children?.props?.children || [])],\n );\n }\n\n return (\n <>\n {TdEl}\n {children}\n </>\n );\n }, [asChild, TdEl, children]);\n\n return (\n <>\n <Component\n ref={ref}\n role=\"row\"\n css={\n !!collapsedContent && !isCollapsed\n ? {\n ...css,\n [`&:nth-last-child(2) > span`]: {\n borderBottom: 'none',\n },\n }\n : { ...css }\n }\n {...props}\n >\n {renderedChildren}\n </Component>\n {!!collapsedContent && (\n <AnimatedContainer isOpen={isCollapsed}>{collapsedContent}</AnimatedContainer>\n )}\n </>\n );\n },\n);\n\nconst StyledTh = styled('span', TableTh, {\n display: 'table-cell',\n});\n\nexport interface ThProps extends ComponentProps<typeof StyledTh>, VariantProps<typeof StyledTh> {}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ComponentProps<typeof StyledTh>>(\n (props, ref) => <StyledTh ref={ref} role=\"columnheader\" {...props} />,\n);\n\nconst StyledTd = styled('span', TableTd, {\n display: 'table-cell',\n});\n\nconst FillerTd = styled(StyledTd, {\n visibility: 'hidden',\n});\nexport type TdProps = ComponentProps<typeof StyledTd> &\n VariantProps<typeof StyledTd> &\n VariantProps<typeof TableTd> & {\n fullColSpan?: boolean;\n };\n\nexport const Td = forwardRef<ElementRef<typeof StyledTd>, TdProps>(\n ({ fullColSpan, css, ...props }, ref) => {\n const fullColSpanCss = useMemo(\n () =>\n fullColSpan\n ? {\n position: 'absolute',\n left: 0,\n width: '100%',\n height: '100%',\n }\n : {},\n [fullColSpan],\n );\n if (fullColSpan) {\n return (\n <>\n <FillerTd css={css} {...props} />\n <StyledTd ref={ref} role=\"cell\" css={deepMerge(fullColSpanCss, css)} {...props} />\n </>\n );\n }\n return <StyledTd ref={ref} role=\"cell\" css={css} {...props} />;\n },\n);\n\nconst StyledThead = styled('div', TableThead, {\n display: 'table-header-group',\n});\nexport const Thead = forwardRef<\n ElementRef<typeof StyledThead>,\n ComponentProps<typeof StyledThead> & VariantProps<typeof StyledThead> & NonNullable<unknown>\n>((props, ref) => <StyledThead ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTable = styled('div', TableTable, {\n display: 'table',\n});\nexport const Table = forwardRef<\n ElementRef<typeof StyledTable>,\n ComponentProps<typeof StyledTable> &\n VariantProps<typeof StyledTable> & { hasCollapsibleChildren?: boolean }\n>(({ hasCollapsibleChildren, css, ...props }, ref) => (\n <StyledTable\n ref={ref}\n role=\"table\"\n css={hasCollapsibleChildren ? { borderCollapse: 'collapse', ...css } : css}\n {...props}\n />\n));\n\nexport type AriaTableVariants = VariantProps<typeof Table>;\nexport type AriaTableProps = TableVariants & { children?: React.ReactNode; css?: CSS };\n"],"mappings":";;;;;;;;;;;AA6BA,IAAa,UAAU,wBAAA,OAAO,OAAO,cAAA,SAAc,EACjD,SAAS,gBACX,CAAC;AAED,IAAM,cAAc,wBAAA,OAAO,OAAO,cAAA,OAAY,EAC5C,SAAS,kBACX,CAAC;AACD,IAAa,SAAA,GAAA,MAAA,WAAA,EAGV,OAAO,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD;CAAkB;CAAK,MAAK;CAAW,GAAI;AAAQ,CAAA,CAAC;AAEtE,IAAM,cAAc,wBAAA,OAAO,OAAO,cAAA,OAAY,EAC5C,SAAS,qBACX,CAAC;AACD,IAAa,SAAA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CACF;AAEA,IAAM,cAAc,wBAAA,OAAO,OAAO,cAAA,OAAY,EAC5C,SAAS,qBACX,CAAC;AACD,IAAa,SAAA,GAAA,MAAA,WAAA,EAGV,OAAO,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD;CAAkB;CAAK,MAAK;CAAW,GAAI;AAAQ,CAAA,CAAC;AAEtE,IAAM,cAAc,wBAAA,OAAO,OAAO,cAAA,OAAY,EAC5C,SAAS,QACX,CAAC;AACD,IAAa,SAAA,GAAA,MAAA,WAAA,EAIV,EAAE,wBAAwB,KAAK,GAAG,SAAS,QAC5C,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD;CACO;CACL,MAAK;CACL,KAAK,yBAAyB;EAAE,gBAAgB;EAAY,GAAG;CAAI,IAAI;CACvE,GAAI;AACL,CAAA,CACF"}
|
|
1
|
+
{"version":3,"file":"AriaTable.cjs","names":["styled","TableCaption","TableTbody","forwardRef","TableTfoot","TableTr","Slot","useMemo","Box","useState","Children","isValidElement","ChevronRightIcon","cloneElement","_Fragment","TableTh","TableTd","deepMerge","TableThead","TableTable"],"sources":["../../../components/AriaTable/AriaTable.tsx"],"sourcesContent":["import { ChevronRightIcon } from '@radix-ui/react-icons';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, {\n Children,\n cloneElement,\n ComponentProps,\n ElementRef,\n forwardRef,\n isValidElement,\n ReactNode,\n useMemo,\n useState,\n} from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { deepMerge } from '../../utils/deepMerge';\nimport { Box } from '../Box';\nimport type { TableVariants } from '../Table';\nimport {\n Caption as TableCaption,\n StyledTr as TableTr,\n Table as TableTable,\n Tbody as TableTbody,\n Td as TableTd,\n Tfoot as TableTfoot,\n Th as TableTh,\n Thead as TableThead,\n} from '../Table';\n\nexport const Caption = styled('div', TableCaption, {\n display: 'table-caption',\n});\n\nconst StyledTbody = styled('div', TableTbody, {\n display: 'table-row-group',\n});\nexport const Tbody = forwardRef<\n ElementRef<typeof StyledTbody>,\n ComponentProps<typeof StyledTbody> & VariantProps<typeof StyledTbody>\n>((props, ref) => <StyledTbody ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTfoot = styled('div', TableTfoot, {\n display: 'table-footer-group',\n});\nexport const Tfoot = forwardRef<\n ElementRef<typeof StyledTfoot>,\n ComponentProps<typeof StyledTfoot> & VariantProps<typeof StyledTfoot>\n>((props, ref) => <StyledTfoot ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTr = styled('div', TableTr, {\n display: 'table-row',\n});\nconst StyledTrSlot = styled(Slot, StyledTr);\n\nconst AnimatedContainer = ({ isOpen, children }: { isOpen: boolean; children: ReactNode }) => {\n const appliedStyle = useMemo(\n () =>\n isOpen\n ? {\n transition: 'all 0.2s ease-out',\n paddingBottom: 0,\n paddingTop: 0,\n border: 'none',\n }\n : {\n transition: 'all 0.2s ease-out',\n padding: '0px 16px',\n pointerEvents: 'none',\n border: 'none',\n },\n [isOpen],\n );\n\n const containerStyle = useMemo(\n () =>\n isOpen\n ? {\n transition: 'all 0.2s ease-out',\n padding: '16px',\n paddingBottom: 0,\n }\n : {\n transition: 'all 0.2s ease-out',\n height: 0,\n overflow: 'hidden',\n padding: '0px 16px',\n },\n [isOpen],\n );\n\n return (\n <StyledTr\n css={isOpen ? { '&:not(:last-child)': { borderBottom: '1px solid $tableRowBorder' } } : {}}\n >\n <Td css={appliedStyle} fullColSpan>\n <Box css={containerStyle}>{children}</Box>\n </Td>\n </StyledTr>\n );\n};\n\nexport type AriaTrProps = ComponentProps<typeof StyledTr> &\n VariantProps<typeof StyledTr> & {\n asChild?: boolean;\n collapsedContent?: React.ReactNode;\n emptyFirstColumn?: boolean;\n tableHead?: boolean;\n children?: React.ReactNode;\n };\n\nexport const Tr = forwardRef<ElementRef<typeof StyledTr>, AriaTrProps>(\n ({ asChild, children, collapsedContent, emptyFirstColumn, tableHead, css, ...props }, ref) => {\n const Component = asChild ? StyledTrSlot : StyledTr;\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n if (!asChild) {\n // eslint-disable-next-line @eslint-react/no-children-to-array\n const arrayChildren = Children.toArray(children);\n const hasColSpanChildren = arrayChildren.some((child) => {\n if (!isValidElement(child)) {\n return false;\n }\n const { fullColSpan } = child.props as TdProps;\n return !!fullColSpan;\n });\n if (hasColSpanChildren && arrayChildren.length > 1) {\n throw new Error('Using fullColSpan is allowed only for a single full width Td.');\n }\n }\n\n const TdEl = useMemo(\n () =>\n emptyFirstColumn ? (\n tableHead ? (\n <Th css={{ width: 24 }} />\n ) : (\n <Td key=\"empty-td\" />\n )\n ) : collapsedContent ? (\n <Td key=\"chevron-td\">\n <Box\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <ChevronRightIcon\n onClick={() => setIsCollapsed(!isCollapsed)}\n style={{\n cursor: 'pointer',\n transition: 'transform 0.2s ease-out',\n transform: isCollapsed ? 'rotate(90deg)' : 'initial',\n }}\n />\n </Box>\n </Td>\n ) : null,\n // eslint-disable-next-line @eslint-react/exhaustive-deps\n [isCollapsed],\n );\n\n const renderedChildren = useMemo(() => {\n if (asChild) {\n // eslint-disable-next-line @eslint-react/no-clone-element\n return cloneElement(\n children as any,\n {\n // @ts-ignore: Object is possibly 'null'.\n ...children?.props,\n },\n // @ts-ignore: Object is possibly 'null'.\n [TdEl, ...(children?.props?.children || [])],\n );\n }\n\n return (\n <>\n {TdEl}\n {children}\n </>\n );\n }, [asChild, TdEl, children]);\n\n return (\n <>\n <Component\n ref={ref}\n role=\"row\"\n css={\n !!collapsedContent && !isCollapsed\n ? {\n ...css,\n [`&:nth-last-child(2) > span`]: {\n borderBottom: 'none',\n },\n }\n : { ...css }\n }\n {...props}\n >\n {renderedChildren}\n </Component>\n {!!collapsedContent && (\n <AnimatedContainer isOpen={isCollapsed}>{collapsedContent}</AnimatedContainer>\n )}\n </>\n );\n },\n);\n\nconst StyledTh = styled('span', TableTh, {\n display: 'table-cell',\n});\n\nexport interface ThProps extends ComponentProps<typeof StyledTh>, VariantProps<typeof StyledTh> {}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ComponentProps<typeof StyledTh>>(\n (props, ref) => <StyledTh ref={ref} role=\"columnheader\" {...props} />,\n);\n\nconst StyledTd = styled('span', TableTd, {\n display: 'table-cell',\n});\n\nconst FillerTd = styled(StyledTd, {\n visibility: 'hidden',\n});\nexport type TdProps = ComponentProps<typeof StyledTd> &\n VariantProps<typeof StyledTd> &\n VariantProps<typeof TableTd> & {\n fullColSpan?: boolean;\n };\n\nexport const Td = forwardRef<ElementRef<typeof StyledTd>, TdProps>(\n ({ fullColSpan, css, ...props }, ref) => {\n const fullColSpanCss = useMemo(\n () =>\n fullColSpan\n ? {\n position: 'absolute',\n left: 0,\n width: '100%',\n height: '100%',\n }\n : {},\n [fullColSpan],\n );\n if (fullColSpan) {\n return (\n <>\n <FillerTd css={css} {...props} />\n <StyledTd ref={ref} role=\"cell\" css={deepMerge(fullColSpanCss, css)} {...props} />\n </>\n );\n }\n return <StyledTd ref={ref} role=\"cell\" css={css} {...props} />;\n },\n);\n\nconst StyledThead = styled('div', TableThead, {\n display: 'table-header-group',\n});\nexport const Thead = forwardRef<\n ElementRef<typeof StyledThead>,\n ComponentProps<typeof StyledThead> & VariantProps<typeof StyledThead> & NonNullable<unknown>\n>((props, ref) => <StyledThead ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTable = styled('div', TableTable, {\n display: 'table',\n});\nexport const Table = forwardRef<\n ElementRef<typeof StyledTable>,\n ComponentProps<typeof StyledTable> &\n VariantProps<typeof StyledTable> & { hasCollapsibleChildren?: boolean }\n>(({ hasCollapsibleChildren, css, ...props }, ref) => (\n <StyledTable\n ref={ref}\n role=\"table\"\n css={hasCollapsibleChildren ? { borderCollapse: 'collapse', ...css } : css}\n {...props}\n />\n));\n\nexport type AriaTableVariants = VariantProps<typeof Table>;\nexport type AriaTableProps = TableVariants & { children?: React.ReactNode; css?: CSS };\n"],"mappings":";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BAAA,GAAiBI,MAAAA,QAAAA,OAEnB,cACI;EACE,UAAU;EACV,MAAM;EACN,OAAO;EACP,QAAQ;CACV,IACA,CAAC,GACP,CAAC,WAAW,CACd;CACA,IAAI,aACF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAAO,kBAAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EAAe;EAAK,GAAI;CAAQ,CAAA,GAChC,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EAAe;EAAK,MAAK;EAAO,KAAKG,kBAAAA,UAAU,gBAAgB,GAAG;EAAG,GAAI;CAAQ,CAAA,CACjF,EAAA,CAAA;CAGN,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EAAe;EAAK,MAAK;EAAY;EAAK,GAAI;CAAQ,CAAA;AAC/D,CACF;AAEA,IAAM,cAAcjB,wBAAAA,OAAO,OAAOkB,cAAAA,OAAY,EAC5C,SAAS,qBACX,CAAC;AACD,IAAa,SAAA,GAAQf,MAAAA,WAAAA,EAGlB,OAAO,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD;CAAkB;CAAK,MAAK;CAAW,GAAI;AAAQ,CAAA,CAAC;AAEtE,IAAM,cAAcH,wBAAAA,OAAO,OAAOmB,cAAAA,OAAY,EAC5C,SAAS,QACX,CAAC;AACD,IAAa,SAAA,GAAQhB,MAAAA,WAAAA,EAIlB,EAAE,wBAAwB,KAAK,GAAG,SAAS,QAC5C,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD;CACO;CACL,MAAK;CACL,KAAK,yBAAyB;EAAE,gBAAgB;EAAY,GAAG;CAAI,IAAI;CACvE,GAAI;AACL,CAAA,CACF"}
|
|
@@ -6,7 +6,7 @@ import { ChevronRightIcon } from "@radix-ui/react-icons";
|
|
|
6
6
|
import { Children, cloneElement, forwardRef, isValidElement, useMemo, useState } from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Slot } from "@radix-ui/react-slot";
|
|
9
|
-
|
|
9
|
+
// components/AriaTable/AriaTable.tsx
|
|
10
10
|
var Caption = styled("div", Caption$1, { display: "table-caption" });
|
|
11
11
|
var StyledTbody = styled("div", Tbody$1, { display: "table-row-group" });
|
|
12
12
|
var Tbody = forwardRef((props, ref) => /* @__PURE__ */ jsx(StyledTbody, {
|
|
@@ -150,7 +150,6 @@ var Table = forwardRef(({ hasCollapsibleChildren, css, ...props }, ref) => /* @_
|
|
|
150
150
|
} : css,
|
|
151
151
|
...props
|
|
152
152
|
}));
|
|
153
|
-
//#endregion
|
|
154
153
|
export { Caption, Table, Tbody, Td, Tfoot, Th, Thead, Tr };
|
|
155
154
|
|
|
156
155
|
//# sourceMappingURL=AriaTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AriaTable.js","names":[],"sources":["../../../components/AriaTable/AriaTable.tsx"],"sourcesContent":["import { ChevronRightIcon } from '@radix-ui/react-icons';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, {\n Children,\n cloneElement,\n ComponentProps,\n ElementRef,\n forwardRef,\n isValidElement,\n ReactNode,\n useMemo,\n useState,\n} from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { deepMerge } from '../../utils/deepMerge';\nimport { Box } from '../Box';\nimport type { TableVariants } from '../Table';\nimport {\n Caption as TableCaption,\n StyledTr as TableTr,\n Table as TableTable,\n Tbody as TableTbody,\n Td as TableTd,\n Tfoot as TableTfoot,\n Th as TableTh,\n Thead as TableThead,\n} from '../Table';\n\nexport const Caption = styled('div', TableCaption, {\n display: 'table-caption',\n});\n\nconst StyledTbody = styled('div', TableTbody, {\n display: 'table-row-group',\n});\nexport const Tbody = forwardRef<\n ElementRef<typeof StyledTbody>,\n ComponentProps<typeof StyledTbody> & VariantProps<typeof StyledTbody>\n>((props, ref) => <StyledTbody ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTfoot = styled('div', TableTfoot, {\n display: 'table-footer-group',\n});\nexport const Tfoot = forwardRef<\n ElementRef<typeof StyledTfoot>,\n ComponentProps<typeof StyledTfoot> & VariantProps<typeof StyledTfoot>\n>((props, ref) => <StyledTfoot ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTr = styled('div', TableTr, {\n display: 'table-row',\n});\nconst StyledTrSlot = styled(Slot, StyledTr);\n\nconst AnimatedContainer = ({ isOpen, children }: { isOpen: boolean; children: ReactNode }) => {\n const appliedStyle = useMemo(\n () =>\n isOpen\n ? {\n transition: 'all 0.2s ease-out',\n paddingBottom: 0,\n paddingTop: 0,\n border: 'none',\n }\n : {\n transition: 'all 0.2s ease-out',\n padding: '0px 16px',\n pointerEvents: 'none',\n border: 'none',\n },\n [isOpen],\n );\n\n const containerStyle = useMemo(\n () =>\n isOpen\n ? {\n transition: 'all 0.2s ease-out',\n padding: '16px',\n paddingBottom: 0,\n }\n : {\n transition: 'all 0.2s ease-out',\n height: 0,\n overflow: 'hidden',\n padding: '0px 16px',\n },\n [isOpen],\n );\n\n return (\n <StyledTr\n css={isOpen ? { '&:not(:last-child)': { borderBottom: '1px solid $tableRowBorder' } } : {}}\n >\n <Td css={appliedStyle} fullColSpan>\n <Box css={containerStyle}>{children}</Box>\n </Td>\n </StyledTr>\n );\n};\n\nexport type AriaTrProps = ComponentProps<typeof StyledTr> &\n VariantProps<typeof StyledTr> & {\n asChild?: boolean;\n collapsedContent?: React.ReactNode;\n emptyFirstColumn?: boolean;\n tableHead?: boolean;\n children?: React.ReactNode;\n };\n\nexport const Tr = forwardRef<ElementRef<typeof StyledTr>, AriaTrProps>(\n ({ asChild, children, collapsedContent, emptyFirstColumn, tableHead, css, ...props }, ref) => {\n const Component = asChild ? StyledTrSlot : StyledTr;\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n if (!asChild) {\n const arrayChildren = Children.toArray(children);\n const hasColSpanChildren = arrayChildren.some((child) => {\n if (!isValidElement(child)) {\n return false;\n }\n const { fullColSpan } = child.props as TdProps;\n return !!fullColSpan;\n });\n if (hasColSpanChildren && arrayChildren.length > 1) {\n throw new Error('Using fullColSpan is allowed only for a single full width Td.');\n }\n }\n\n const TdEl = useMemo(\n () =>\n emptyFirstColumn ? (\n tableHead ? (\n <Th css={{ width: 24 }} />\n ) : (\n <Td key=\"empty-td\" />\n )\n ) : collapsedContent ? (\n <Td key=\"chevron-td\">\n <Box\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <ChevronRightIcon\n onClick={() => setIsCollapsed(!isCollapsed)}\n style={{\n cursor: 'pointer',\n transition: 'transform 0.2s ease-out',\n transform: isCollapsed ? 'rotate(90deg)' : 'initial',\n }}\n />\n </Box>\n </Td>\n ) : null,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isCollapsed],\n );\n\n const renderedChildren = useMemo(() => {\n if (asChild) {\n return cloneElement(\n children as any,\n {\n // @ts-ignore: Object is possibly 'null'.\n ...children?.props,\n },\n // @ts-ignore: Object is possibly 'null'.\n [TdEl, ...(children?.props?.children || [])],\n );\n }\n\n return (\n <>\n {TdEl}\n {children}\n </>\n );\n }, [asChild, TdEl, children]);\n\n return (\n <>\n <Component\n ref={ref}\n role=\"row\"\n css={\n !!collapsedContent && !isCollapsed\n ? {\n ...css,\n [`&:nth-last-child(2) > span`]: {\n borderBottom: 'none',\n },\n }\n : { ...css }\n }\n {...props}\n >\n {renderedChildren}\n </Component>\n {!!collapsedContent && (\n <AnimatedContainer isOpen={isCollapsed}>{collapsedContent}</AnimatedContainer>\n )}\n </>\n );\n },\n);\n\nconst StyledTh = styled('span', TableTh, {\n display: 'table-cell',\n});\n\nexport interface ThProps extends ComponentProps<typeof StyledTh>, VariantProps<typeof StyledTh> {}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ComponentProps<typeof StyledTh>>(\n (props, ref) => <StyledTh ref={ref} role=\"columnheader\" {...props} />,\n);\n\nconst StyledTd = styled('span', TableTd, {\n display: 'table-cell',\n});\n\nconst FillerTd = styled(StyledTd, {\n visibility: 'hidden',\n});\nexport type TdProps = ComponentProps<typeof StyledTd> &\n VariantProps<typeof StyledTd> &\n VariantProps<typeof TableTd> & {\n fullColSpan?: boolean;\n };\n\nexport const Td = forwardRef<ElementRef<typeof StyledTd>, TdProps>(\n ({ fullColSpan, css, ...props }, ref) => {\n const fullColSpanCss = useMemo(\n () =>\n fullColSpan\n ? {\n position: 'absolute',\n left: 0,\n width: '100%',\n height: '100%',\n }\n : {},\n [fullColSpan],\n );\n if (fullColSpan) {\n return (\n <>\n <FillerTd css={css} {...props} />\n <StyledTd ref={ref} role=\"cell\" css={deepMerge(fullColSpanCss, css)} {...props} />\n </>\n );\n }\n return <StyledTd ref={ref} role=\"cell\" css={css} {...props} />;\n },\n);\n\nconst StyledThead = styled('div', TableThead, {\n display: 'table-header-group',\n});\nexport const Thead = forwardRef<\n ElementRef<typeof StyledThead>,\n ComponentProps<typeof StyledThead> & VariantProps<typeof StyledThead> & NonNullable<unknown>\n>((props, ref) => <StyledThead ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTable = styled('div', TableTable, {\n display: 'table',\n});\nexport const Table = forwardRef<\n ElementRef<typeof StyledTable>,\n ComponentProps<typeof StyledTable> &\n VariantProps<typeof StyledTable> & { hasCollapsibleChildren?: boolean }\n>(({ hasCollapsibleChildren, css, ...props }, ref) => (\n <StyledTable\n ref={ref}\n role=\"table\"\n css={hasCollapsibleChildren ? { borderCollapse: 'collapse', ...css } : css}\n {...props}\n />\n));\n\nexport type AriaTableVariants = VariantProps<typeof Table>;\nexport type AriaTableProps = TableVariants & { children?: React.ReactNode; css?: CSS };\n"],"mappings":";;;;;;;;;AA6BA,IAAa,UAAU,OAAO,OAAO,WAAc,EACjD,SAAS,gBACX,CAAC;AAED,IAAM,cAAc,OAAO,OAAO,SAAY,EAC5C,SAAS,kBACX,CAAC;AACD,IAAa,QAAQ,YAGlB,OAAO,QAAQ,oBAAC,aAAD;CAAkB;CAAK,M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WAAW,OAAO,QAAQ,MAAS,EACvC,SAAS,aACX,CAAC;AAED,IAAM,WAAW,OAAO,UAAU,EAChC,YAAY,SACd,CAAC;AAOD,IAAa,KAAK,YACf,EAAE,aAAa,KAAK,GAAG,SAAS,QAAQ;CACvC,MAAM,iBAAiB,cAEnB,cACI;EACE,UAAU;EACV,MAAM;EACN,OAAO;EACP,QAAQ;CACV,IACA,CAAC,GACP,CAAC,WAAW,CACd;CACA,IAAI,aACF,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,UAAD;EAAe;EAAK,GAAI;CAAQ,CAAA,GAChC,oBAAC,UAAD;EAAe;EAAK,MAAK;EAAO,KAAK,UAAU,gBAAgB,GAAG;EAAG,GAAI;CAAQ,CAAA,CACjF,EAAA,CAAA;CAGN,OAAO,oBAAC,UAAD;EAAe;EAAK,MAAK;EAAY;EAAK,GAAI;CAAQ,CAAA;AAC/D,CACF;AAEA,IAAM,cAAc,OAAO,OAAO,SAAY,EAC5C,SAAS,qBACX,CAAC;AACD,IAAa,QAAQ,YAGlB,OAAO,QAAQ,oBAAC,aAAD;CAAkB;CAAK,MAAK;CAAW,GAAI;AAAQ,CAAA,CAAC;AAEtE,IAAM,cAAc,OAAO,OAAO,SAAY,EAC5C,SAAS,QACX,CAAC;AACD,IAAa,QAAQ,YAIlB,EAAE,wBAAwB,KAAK,GAAG,SAAS,QAC5C,oBAAC,aAAD;CACO;CACL,MAAK;CACL,KAAK,yBAAyB;EAAE,gBAAgB;EAAY,GAAG;CAAI,IAAI;CACvE,GAAI;AACL,CAAA,CACF"}
|
|
1
|
+
{"version":3,"file":"AriaTable.js","names":["TableCaption","TableTbody","TableTfoot","TableTr","_Fragment","TableTh","TableTd","TableThead","TableTable"],"sources":["../../../components/AriaTable/AriaTable.tsx"],"sourcesContent":["import { ChevronRightIcon } from '@radix-ui/react-icons';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, {\n Children,\n cloneElement,\n ComponentProps,\n ElementRef,\n forwardRef,\n isValidElement,\n ReactNode,\n useMemo,\n useState,\n} from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { deepMerge } from '../../utils/deepMerge';\nimport { Box } from '../Box';\nimport type { TableVariants } from '../Table';\nimport {\n Caption as TableCaption,\n StyledTr as TableTr,\n Table as TableTable,\n Tbody as TableTbody,\n Td as TableTd,\n Tfoot as TableTfoot,\n Th as TableTh,\n Thead as TableThead,\n} from '../Table';\n\nexport const Caption = styled('div', TableCaption, {\n display: 'table-caption',\n});\n\nconst StyledTbody = styled('div', TableTbody, {\n display: 'table-row-group',\n});\nexport const Tbody = forwardRef<\n ElementRef<typeof StyledTbody>,\n ComponentProps<typeof StyledTbody> & VariantProps<typeof StyledTbody>\n>((props, ref) => <StyledTbody ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTfoot = styled('div', TableTfoot, {\n display: 'table-footer-group',\n});\nexport const Tfoot = forwardRef<\n ElementRef<typeof StyledTfoot>,\n ComponentProps<typeof StyledTfoot> & VariantProps<typeof StyledTfoot>\n>((props, ref) => <StyledTfoot ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTr = styled('div', TableTr, {\n display: 'table-row',\n});\nconst StyledTrSlot = styled(Slot, StyledTr);\n\nconst AnimatedContainer = ({ isOpen, children }: { isOpen: boolean; children: ReactNode }) => {\n const appliedStyle = useMemo(\n () =>\n isOpen\n ? {\n transition: 'all 0.2s ease-out',\n paddingBottom: 0,\n paddingTop: 0,\n border: 'none',\n }\n : {\n transition: 'all 0.2s ease-out',\n padding: '0px 16px',\n pointerEvents: 'none',\n border: 'none',\n },\n [isOpen],\n );\n\n const containerStyle = useMemo(\n () =>\n isOpen\n ? {\n transition: 'all 0.2s ease-out',\n padding: '16px',\n paddingBottom: 0,\n }\n : {\n transition: 'all 0.2s ease-out',\n height: 0,\n overflow: 'hidden',\n padding: '0px 16px',\n },\n [isOpen],\n );\n\n return (\n <StyledTr\n css={isOpen ? { '&:not(:last-child)': { borderBottom: '1px solid $tableRowBorder' } } : {}}\n >\n <Td css={appliedStyle} fullColSpan>\n <Box css={containerStyle}>{children}</Box>\n </Td>\n </StyledTr>\n );\n};\n\nexport type AriaTrProps = ComponentProps<typeof StyledTr> &\n VariantProps<typeof StyledTr> & {\n asChild?: boolean;\n collapsedContent?: React.ReactNode;\n emptyFirstColumn?: boolean;\n tableHead?: boolean;\n children?: React.ReactNode;\n };\n\nexport const Tr = forwardRef<ElementRef<typeof StyledTr>, AriaTrProps>(\n ({ asChild, children, collapsedContent, emptyFirstColumn, tableHead, css, ...props }, ref) => {\n const Component = asChild ? StyledTrSlot : StyledTr;\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n if (!asChild) {\n // eslint-disable-next-line @eslint-react/no-children-to-array\n const arrayChildren = Children.toArray(children);\n const hasColSpanChildren = arrayChildren.some((child) => {\n if (!isValidElement(child)) {\n return false;\n }\n const { fullColSpan } = child.props as TdProps;\n return !!fullColSpan;\n });\n if (hasColSpanChildren && arrayChildren.length > 1) {\n throw new Error('Using fullColSpan is allowed only for a single full width Td.');\n }\n }\n\n const TdEl = useMemo(\n () =>\n emptyFirstColumn ? (\n tableHead ? (\n <Th css={{ width: 24 }} />\n ) : (\n <Td key=\"empty-td\" />\n )\n ) : collapsedContent ? (\n <Td key=\"chevron-td\">\n <Box\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <ChevronRightIcon\n onClick={() => setIsCollapsed(!isCollapsed)}\n style={{\n cursor: 'pointer',\n transition: 'transform 0.2s ease-out',\n transform: isCollapsed ? 'rotate(90deg)' : 'initial',\n }}\n />\n </Box>\n </Td>\n ) : null,\n // eslint-disable-next-line @eslint-react/exhaustive-deps\n [isCollapsed],\n );\n\n const renderedChildren = useMemo(() => {\n if (asChild) {\n // eslint-disable-next-line @eslint-react/no-clone-element\n return cloneElement(\n children as any,\n {\n // @ts-ignore: Object is possibly 'null'.\n ...children?.props,\n },\n // @ts-ignore: Object is possibly 'null'.\n [TdEl, ...(children?.props?.children || [])],\n );\n }\n\n return (\n <>\n {TdEl}\n {children}\n </>\n );\n }, [asChild, TdEl, children]);\n\n return (\n <>\n <Component\n ref={ref}\n role=\"row\"\n css={\n !!collapsedContent && !isCollapsed\n ? {\n ...css,\n [`&:nth-last-child(2) > span`]: {\n borderBottom: 'none',\n },\n }\n : { ...css }\n }\n {...props}\n >\n {renderedChildren}\n </Component>\n {!!collapsedContent && (\n <AnimatedContainer isOpen={isCollapsed}>{collapsedContent}</AnimatedContainer>\n )}\n </>\n );\n },\n);\n\nconst StyledTh = styled('span', TableTh, {\n display: 'table-cell',\n});\n\nexport interface ThProps extends ComponentProps<typeof StyledTh>, VariantProps<typeof StyledTh> {}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ComponentProps<typeof StyledTh>>(\n (props, ref) => <StyledTh ref={ref} role=\"columnheader\" {...props} />,\n);\n\nconst StyledTd = styled('span', TableTd, {\n display: 'table-cell',\n});\n\nconst FillerTd = styled(StyledTd, {\n visibility: 'hidden',\n});\nexport type TdProps = ComponentProps<typeof StyledTd> &\n VariantProps<typeof StyledTd> &\n VariantProps<typeof TableTd> & {\n fullColSpan?: boolean;\n };\n\nexport const Td = forwardRef<ElementRef<typeof StyledTd>, TdProps>(\n ({ fullColSpan, css, ...props }, ref) => {\n const fullColSpanCss = useMemo(\n () =>\n fullColSpan\n ? {\n position: 'absolute',\n left: 0,\n width: '100%',\n height: '100%',\n }\n : {},\n [fullColSpan],\n );\n if (fullColSpan) {\n return (\n <>\n <FillerTd css={css} {...props} />\n <StyledTd ref={ref} role=\"cell\" css={deepMerge(fullColSpanCss, css)} {...props} />\n </>\n );\n }\n return <StyledTd ref={ref} role=\"cell\" css={css} {...props} />;\n },\n);\n\nconst StyledThead = styled('div', TableThead, {\n display: 'table-header-group',\n});\nexport const Thead = forwardRef<\n ElementRef<typeof StyledThead>,\n ComponentProps<typeof StyledThead> & VariantProps<typeof StyledThead> & NonNullable<unknown>\n>((props, ref) => <StyledThead ref={ref} role=\"rowgroup\" {...props} />);\n\nconst StyledTable = styled('div', TableTable, {\n display: 'table',\n});\nexport const Table = forwardRef<\n ElementRef<typeof StyledTable>,\n ComponentProps<typeof StyledTable> &\n VariantProps<typeof StyledTable> & { hasCollapsibleChildren?: boolean }\n>(({ hasCollapsibleChildren, css, ...props }, ref) => (\n <StyledTable\n ref={ref}\n role=\"table\"\n css={hasCollapsibleChildren ? { borderCollapse: 'collapse', ...css } : css}\n {...props}\n />\n));\n\nexport type AriaTableVariants = VariantProps<typeof Table>;\nexport type AriaTableProps = TableVariants & { children?: React.ReactNode; css?: CSS };\n"],"mappings":";;;;;;;;;AA6BA,IAAa,UAAU,OAAO,OAAOA,WAAc,EACjD,SAAS,gBACX,CAAC;AAED,IAAM,cAAc,OAAO,OAAOC,SAAY,EAC5C,SAAS,kBACX,CAAC;AACD,IAAa,QAAQ,YAGlB,OAAO,QAAQ,oBAAC,aAAD;CAAkB;CAAK,MAAK;CAAW,GAAI;AAAQ,CAAA,CAAC;AAEtE,IAAM,cAAc,OAAO,OAAOC,SAAY,EAC5C,SAAS,qBACX,CAAC;AACD,IAAa,QAAQ,YAGlB,OAAO,QAAQ,oBAAC,aAAD;CAAkB;CAAK,MAAK;CAAW,GAAI;AAAQ,CAAA,CAAC;AAEtE,IAAM,WAAW,OAAO,OAAOC,YAAS,EACtC,SAAS,YACX,CAAC;AACD,IAAM,eAAe,OAAO,MAAM,QAAQ;AAE1C,IAAM,qBAAqB,EAAE,QAAQ,eAAyD;CAC5F,MAAM,eAAe,cAEjB,SACI;EACE,YAAY;EACZ,eAAe;EACf,YAAY;EACZ,QAAQ;CACV,IACA;EACE,YAAY;EACZ,SAAS;EACT,eAAe;EACf,QAAQ;CACV,GACN,CAAC,MAAM,CACT;CAEA,MAAM,iBAAiB,cAEnB,SACI;EACE,YAAY;EACZ,SAAS;EACT,eAAe;CACjB,IACA;EACE,YAAY;EACZ,QAAQ;EACR,UAAU;EACV,SAAS;CACX,GACN,CAAC,MAAM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EAC5C,SAAS,qBACX,CAAC;AACD,IAAa,QAAQ,YAGlB,OAAO,QAAQ,oBAAC,aAAD;CAAkB;CAAK,MAAK;CAAW,GAAI;AAAQ,CAAA,CAAC;AAEtE,IAAM,cAAc,OAAO,OAAOC,SAAY,EAC5C,SAAS,QACX,CAAC;AACD,IAAa,QAAQ,YAIlB,EAAE,wBAAwB,KAAK,GAAG,SAAS,QAC5C,oBAAC,aAAD;CACO;CACL,MAAK;CACL,KAAK,yBAAyB;EAAE,gBAAgB;EAAY,GAAG;CAAI,IAAI;CACvE,GAAI;AACL,CAAA,CACF"}
|
|
@@ -6,7 +6,7 @@ react = require_runtime.__toESM(react, 1);
|
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let _radix_ui_react_avatar = require("@radix-ui/react-avatar");
|
|
8
8
|
_radix_ui_react_avatar = require_runtime.__toESM(_radix_ui_react_avatar, 1);
|
|
9
|
-
|
|
9
|
+
// components/Avatar/Avatar.tsx
|
|
10
10
|
var StyledAvatar = require_stitches_config.styled(_radix_ui_react_avatar.Root, {
|
|
11
11
|
alignItems: "center",
|
|
12
12
|
justifyContent: "center",
|
|
@@ -130,7 +130,6 @@ var Avatar = react.default.forwardRef(({ alt, src, fallback, size, variant, shap
|
|
|
130
130
|
})
|
|
131
131
|
});
|
|
132
132
|
});
|
|
133
|
-
//#endregion
|
|
134
133
|
exports.Avatar = Avatar;
|
|
135
134
|
|
|
136
135
|
//# sourceMappingURL=Avatar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.cjs","names":[],"sources":["../../../components/Avatar/Avatar.tsx"],"sourcesContent":["import * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport React from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { Box } from '../Box';\n\nconst StyledAvatar = styled(AvatarPrimitive.Root, {\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'middle',\n overflow: 'hidden',\n userSelect: 'none',\n boxSizing: 'border-box',\n display: 'flex',\n flexShrink: 0,\n position: 'relative',\n border: 'none',\n fontFamily: 'inherit',\n lineHeight: '1',\n margin: '0',\n outline: 'none',\n padding: '0',\n fontWeight: '$medium',\n color: '$hiContrast',\n\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n boxShadow: 'inset 0px 0px 1px rgba(0, 0, 0, 0.12)',\n },\n\n variants: {\n size: {\n '1': {\n width: '$3',\n height: '$3',\n },\n '2': {\n width: '$5',\n height: '$5',\n },\n '3': {\n width: '$6',\n height: '$6',\n },\n '4': {\n width: '$7',\n height: '$7',\n },\n '5': {\n width: '$8',\n height: '$8',\n },\n '6': {\n width: '$9',\n height: '$9',\n },\n },\n variant: {\n gray: {\n backgroundColor: '$slate5',\n },\n red: {\n backgroundColor: '$red5',\n },\n purple: {\n backgroundColor: '$purple5',\n },\n blue: {\n backgroundColor: '$blue5',\n },\n green: {\n backgroundColor: '$green5',\n },\n orange: {\n backgroundColor: '$orange5',\n },\n },\n shape: {\n square: {\n borderRadius: '$2',\n },\n circle: {\n borderRadius: '50%',\n },\n },\n },\n defaultVariants: {\n size: '2',\n variant: 'gray',\n shape: 'circle',\n },\n});\n\nconst StyledAvatarImage = styled(AvatarPrimitive.Image, {\n display: 'flex',\n objectFit: 'cover',\n boxSizing: 'border-box',\n height: '100%',\n verticalAlign: 'middle',\n width: '100%',\n});\n\nconst StyledAvatarFallback = styled(AvatarPrimitive.Fallback, {\n textTransform: 'uppercase',\n fontFamily: '$rubik',\n color: '$deepBlue10',\n\n variants: {\n size: {\n '1': {\n fontSize: '10px',\n lineHeight: '15px',\n },\n '2': {\n fontSize: '$3',\n },\n '3': {\n fontSize: '$6',\n },\n '4': {\n fontSize: '$7',\n },\n '5': {\n fontSize: '$8',\n },\n '6': {\n fontSize: '$9',\n },\n },\n },\n defaultVariants: {\n size: '2',\n },\n});\n\ntype AvatarVariants = VariantProps<typeof StyledAvatar>;\ntype AvatarPrimitiveProps = Omit<React.ComponentProps<typeof AvatarPrimitive.Root>, 'as'>;\ntype AvatarOwnProps = AvatarPrimitiveProps &\n AvatarVariants & {\n css?: CSS;\n alt?: string;\n src?: string;\n fallback?: React.ReactNode;\n // status?: StatusColors['variant'];\n };\n\nexport const Avatar = React.forwardRef<React.ElementRef<typeof StyledAvatar>, AvatarOwnProps>(\n ({ alt, src, fallback, size, variant, shape, css, ...props }, forwardedRef) => {\n return (\n <Box\n css={{\n ...css,\n position: 'relative',\n height: 'fit-content',\n width: 'fit-content',\n }}\n >\n <StyledAvatar {...props} ref={forwardedRef} size={size} variant={variant} shape={shape}>\n <StyledAvatarImage alt={alt} src={src} />\n <StyledAvatarFallback size={size}>{fallback}</StyledAvatarFallback>\n </StyledAvatar>\n </Box>\n );\n }\n);\n"],"mappings":";;;;;;;;;AAMA,IAAM,
|
|
1
|
+
{"version":3,"file":"Avatar.cjs","names":["styled","AvatarPrimitive","React","Box"],"sources":["../../../components/Avatar/Avatar.tsx"],"sourcesContent":["import * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport React from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { Box } from '../Box';\n\nconst StyledAvatar = styled(AvatarPrimitive.Root, {\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'middle',\n overflow: 'hidden',\n userSelect: 'none',\n boxSizing: 'border-box',\n display: 'flex',\n flexShrink: 0,\n position: 'relative',\n border: 'none',\n fontFamily: 'inherit',\n lineHeight: '1',\n margin: '0',\n outline: 'none',\n padding: '0',\n fontWeight: '$medium',\n color: '$hiContrast',\n\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n boxShadow: 'inset 0px 0px 1px rgba(0, 0, 0, 0.12)',\n },\n\n variants: {\n size: {\n '1': {\n width: '$3',\n height: '$3',\n },\n '2': {\n width: '$5',\n height: '$5',\n },\n '3': {\n width: '$6',\n height: '$6',\n },\n '4': {\n width: '$7',\n height: '$7',\n },\n '5': {\n width: '$8',\n height: '$8',\n },\n '6': {\n width: '$9',\n height: '$9',\n },\n },\n variant: {\n gray: {\n backgroundColor: '$slate5',\n },\n red: {\n backgroundColor: '$red5',\n },\n purple: {\n backgroundColor: '$purple5',\n },\n blue: {\n backgroundColor: '$blue5',\n },\n green: {\n backgroundColor: '$green5',\n },\n orange: {\n backgroundColor: '$orange5',\n },\n },\n shape: {\n square: {\n borderRadius: '$2',\n },\n circle: {\n borderRadius: '50%',\n },\n },\n },\n defaultVariants: {\n size: '2',\n variant: 'gray',\n shape: 'circle',\n },\n});\n\nconst StyledAvatarImage = styled(AvatarPrimitive.Image, {\n display: 'flex',\n objectFit: 'cover',\n boxSizing: 'border-box',\n height: '100%',\n verticalAlign: 'middle',\n width: '100%',\n});\n\nconst StyledAvatarFallback = styled(AvatarPrimitive.Fallback, {\n textTransform: 'uppercase',\n fontFamily: '$rubik',\n color: '$deepBlue10',\n\n variants: {\n size: {\n '1': {\n fontSize: '10px',\n lineHeight: '15px',\n },\n '2': {\n fontSize: '$3',\n },\n '3': {\n fontSize: '$6',\n },\n '4': {\n fontSize: '$7',\n },\n '5': {\n fontSize: '$8',\n },\n '6': {\n fontSize: '$9',\n },\n },\n },\n defaultVariants: {\n size: '2',\n },\n});\n\ntype AvatarVariants = VariantProps<typeof StyledAvatar>;\ntype AvatarPrimitiveProps = Omit<React.ComponentProps<typeof AvatarPrimitive.Root>, 'as'>;\ntype AvatarOwnProps = AvatarPrimitiveProps &\n AvatarVariants & {\n css?: CSS;\n alt?: string;\n src?: string;\n fallback?: React.ReactNode;\n // status?: StatusColors['variant'];\n };\n\nexport const Avatar = React.forwardRef<React.ElementRef<typeof StyledAvatar>, AvatarOwnProps>(\n ({ alt, src, fallback, size, variant, shape, css, ...props }, forwardedRef) => {\n return (\n <Box\n css={{\n ...css,\n position: 'relative',\n height: 'fit-content',\n width: 'fit-content',\n }}\n >\n <StyledAvatar {...props} ref={forwardedRef} size={size} variant={variant} shape={shape}>\n <StyledAvatarImage alt={alt} src={src} />\n <StyledAvatarFallback size={size}>{fallback}</StyledAvatarFallback>\n </StyledAvatar>\n </Box>\n );\n }\n);\n"],"mappings":";;;;;;;;;AAMA,IAAM,eAAeA,wBAAAA,OAAOC,uBAAgB,MAAM;CAChD,YAAY;CACZ,gBAAgB;CAChB,eAAe;CACf,UAAU;CACV,YAAY;CACZ,WAAW;CACX,SAAS;CACT,YAAY;CACZ,UAAU;CACV,QAAQ;CACR,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,SAAS;CACT,SAAS;CACT,YAAY;CACZ,OAAO;CAEP,aAAa;EACX,SAAS;EACT,UAAU;EACV,KAAK;EACL,OAAO;EACP,QAAQ;EACR,MAAM;EACN,cAAc;EACd,WAAW;CACb;CAEA,UAAU;EACR,MAAM;GACJ,KAAK;IACH,OAAO;IACP,QAAQ;GACV;GACA,KAAK;IACH,OAAO;IACP,QAAQ;GACV;GACA,KAAK;IACH,OAAO;IACP,QAAQ;GACV;GACA,KAAK;IACH,OAAO;IACP,QAAQ;GACV;GACA,KAAK;IACH,OAAO;IACP,QAAQ;GACV;GACA,KAAK;IACH,OAAO;IACP,QAAQ;GACV;EACF;EACA,SAAS;GACP,MAAM,EACJ,iBAAiB,UACnB;GACA,KAAK,EACH,iBAAiB,QACnB;GACA,QAAQ,EACN,iBAAiB,WACnB;GACA,MAAM,EACJ,iBAAiB,SACnB;GACA,OAAO,EACL,iBAAiB,UACnB;GACA,QAAQ,EACN,iBAAiB,WACnB;EACF;EACA,OAAO;GACL,QAAQ,EACN,cAAc,KAChB;GACA,QAAQ,EACN,cAAc,MAChB;EACF;CACF;CACA,iBAAiB;EACf,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC;AAED,IAAM,oBAAoBD,wBAAAA,OAAOC,uBAAgB,OAAO;CACtD,SAAS;CACT,WAAW;CACX,WAAW;CACX,QAAQ;CACR,eAAe;CACf,OAAO;AACT,CAAC;AAED,IAAM,uBAAuBD,wBAAAA,OAAOC,uBAAgB,UAAU;CAC5D,eAAe;CACf,YAAY;CACZ,OAAO;CAEP,UAAU,EACR,MAAM;EACJ,KAAK;GACH,UAAU;GACV,YAAY;EACd;EACA,KAAK,EACH,UAAU,KACZ;EACA,KAAK,EACH,UAAU,KACZ;EACA,KAAK,EACH,UAAU,KACZ;EACA,KAAK,EACH,UAAU,KACZ;EACA,KAAK,EACH,UAAU,KACZ;CACF,EACF;CACA,iBAAiB,EACf,MAAM,IACR;AACF,CAAC;AAaD,IAAa,SAASC,MAAAA,QAAM,YACzB,EAAE,KAAK,KAAK,UAAU,MAAM,SAAS,OAAO,KAAK,GAAG,SAAS,iBAAiB;CAC7E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,KAAK;GACH,GAAG;GACH,UAAU;GACV,QAAQ;GACR,OAAO;EACT;EAEA,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,cAAD;GAAc,GAAI;GAAO,KAAK;GAAoB;GAAe;GAAgB;GAAjF,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAD;IAAwB;IAAU;GAAM,CAAA,GACxC,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAD;IAA4B;IAAO,UAAA;GAA+B,CAAA,CACtD;;CACX,CAAA;AAET,CACF"}
|
|
@@ -3,7 +3,7 @@ import { Box } from "../Box/Box.js";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
6
|
-
|
|
6
|
+
// components/Avatar/Avatar.tsx
|
|
7
7
|
var StyledAvatar = styled(AvatarPrimitive.Root, {
|
|
8
8
|
alignItems: "center",
|
|
9
9
|
justifyContent: "center",
|
|
@@ -127,7 +127,6 @@ var Avatar = React.forwardRef(({ alt, src, fallback, size, variant, shape, css,
|
|
|
127
127
|
})
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
|
-
//#endregion
|
|
131
130
|
export { Avatar };
|
|
132
131
|
|
|
133
132
|
//# sourceMappingURL=Avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","names":[],"sources":["../../../components/Avatar/Avatar.tsx"],"sourcesContent":["import * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport React from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { Box } from '../Box';\n\nconst StyledAvatar = styled(AvatarPrimitive.Root, {\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'middle',\n overflow: 'hidden',\n userSelect: 'none',\n boxSizing: 'border-box',\n display: 'flex',\n flexShrink: 0,\n position: 'relative',\n border: 'none',\n fontFamily: 'inherit',\n lineHeight: '1',\n margin: '0',\n outline: 'none',\n padding: '0',\n fontWeight: '$medium',\n color: '$hiContrast',\n\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n boxShadow: 'inset 0px 0px 1px rgba(0, 0, 0, 0.12)',\n },\n\n variants: {\n size: {\n '1': {\n width: '$3',\n height: '$3',\n },\n '2': {\n width: '$5',\n height: '$5',\n },\n '3': {\n width: '$6',\n height: '$6',\n },\n '4': {\n width: '$7',\n height: '$7',\n },\n '5': {\n width: '$8',\n height: '$8',\n },\n '6': {\n width: '$9',\n height: '$9',\n },\n },\n variant: {\n gray: {\n backgroundColor: '$slate5',\n },\n red: {\n backgroundColor: '$red5',\n },\n purple: {\n backgroundColor: '$purple5',\n },\n blue: {\n backgroundColor: '$blue5',\n },\n green: {\n backgroundColor: '$green5',\n },\n orange: {\n backgroundColor: '$orange5',\n },\n },\n shape: {\n square: {\n borderRadius: '$2',\n },\n circle: {\n borderRadius: '50%',\n },\n },\n },\n defaultVariants: {\n size: '2',\n variant: 'gray',\n shape: 'circle',\n },\n});\n\nconst StyledAvatarImage = styled(AvatarPrimitive.Image, {\n display: 'flex',\n objectFit: 'cover',\n boxSizing: 'border-box',\n height: '100%',\n verticalAlign: 'middle',\n width: '100%',\n});\n\nconst StyledAvatarFallback = styled(AvatarPrimitive.Fallback, {\n textTransform: 'uppercase',\n fontFamily: '$rubik',\n color: '$deepBlue10',\n\n variants: {\n size: {\n '1': {\n fontSize: '10px',\n lineHeight: '15px',\n },\n '2': {\n fontSize: '$3',\n },\n '3': {\n fontSize: '$6',\n },\n '4': {\n fontSize: '$7',\n },\n '5': {\n fontSize: '$8',\n },\n '6': {\n fontSize: '$9',\n },\n },\n },\n defaultVariants: {\n size: '2',\n },\n});\n\ntype AvatarVariants = VariantProps<typeof StyledAvatar>;\ntype AvatarPrimitiveProps = Omit<React.ComponentProps<typeof AvatarPrimitive.Root>, 'as'>;\ntype AvatarOwnProps = AvatarPrimitiveProps &\n AvatarVariants & {\n css?: CSS;\n alt?: string;\n src?: string;\n fallback?: React.ReactNode;\n // status?: StatusColors['variant'];\n };\n\nexport const Avatar = React.forwardRef<React.ElementRef<typeof StyledAvatar>, AvatarOwnProps>(\n ({ alt, src, fallback, size, variant, shape, css, ...props }, forwardedRef) => {\n return (\n <Box\n css={{\n ...css,\n position: 'relative',\n height: 'fit-content',\n width: 'fit-content',\n }}\n >\n <StyledAvatar {...props} ref={forwardedRef} size={size} variant={variant} shape={shape}>\n <StyledAvatarImage alt={alt} src={src} />\n <StyledAvatarFallback size={size}>{fallback}</StyledAvatarFallback>\n </StyledAvatar>\n </Box>\n );\n }\n);\n"],"mappings":";;;;;;AAMA,IAAM,eAAe,OAAO,gBAAgB,MAAM;CAChD,YAAY;CACZ,gBAAgB;CAChB,eAAe;CACf,UAAU;CACV,YAAY;CACZ,WAAW;CACX,SAAS;CACT,YAAY;CACZ,UAAU;CACV,QAAQ;CACR,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,SAAS;CACT,SAAS;CACT,YAAY;CACZ,OAAO;CAEP,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iBAAiB;CAC7E,OACE,oBAAC,KAAD;EACE,KAAK;GACH,GAAG;GACH,UAAU;GACV,QAAQ;GACR,OAAO;EACT;
|
|
1
|
+
{"version":3,"file":"Avatar.js","names":[],"sources":["../../../components/Avatar/Avatar.tsx"],"sourcesContent":["import * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport React from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { Box } from '../Box';\n\nconst StyledAvatar = styled(AvatarPrimitive.Root, {\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'middle',\n overflow: 'hidden',\n userSelect: 'none',\n boxSizing: 'border-box',\n display: 'flex',\n flexShrink: 0,\n position: 'relative',\n border: 'none',\n fontFamily: 'inherit',\n lineHeight: '1',\n margin: '0',\n outline: 'none',\n padding: '0',\n fontWeight: '$medium',\n color: '$hiContrast',\n\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n boxShadow: 'inset 0px 0px 1px rgba(0, 0, 0, 0.12)',\n },\n\n variants: {\n size: {\n '1': {\n width: '$3',\n height: '$3',\n },\n '2': {\n width: '$5',\n height: '$5',\n },\n '3': {\n width: '$6',\n height: '$6',\n },\n '4': {\n width: '$7',\n height: '$7',\n },\n '5': {\n width: '$8',\n height: '$8',\n },\n '6': {\n width: '$9',\n height: '$9',\n },\n },\n variant: {\n gray: {\n backgroundColor: '$slate5',\n },\n red: {\n backgroundColor: '$red5',\n },\n purple: {\n backgroundColor: '$purple5',\n },\n blue: {\n backgroundColor: '$blue5',\n },\n green: {\n backgroundColor: '$green5',\n },\n orange: {\n backgroundColor: '$orange5',\n },\n },\n shape: {\n square: {\n borderRadius: '$2',\n },\n circle: {\n borderRadius: '50%',\n },\n },\n },\n defaultVariants: {\n size: '2',\n variant: 'gray',\n shape: 'circle',\n },\n});\n\nconst StyledAvatarImage = styled(AvatarPrimitive.Image, {\n display: 'flex',\n objectFit: 'cover',\n boxSizing: 'border-box',\n height: '100%',\n verticalAlign: 'middle',\n width: '100%',\n});\n\nconst StyledAvatarFallback = styled(AvatarPrimitive.Fallback, {\n textTransform: 'uppercase',\n fontFamily: '$rubik',\n color: '$deepBlue10',\n\n variants: {\n size: {\n '1': {\n fontSize: '10px',\n lineHeight: '15px',\n },\n '2': {\n fontSize: '$3',\n },\n '3': {\n fontSize: '$6',\n },\n '4': {\n fontSize: '$7',\n },\n '5': {\n fontSize: '$8',\n },\n '6': {\n fontSize: '$9',\n },\n },\n },\n defaultVariants: {\n size: '2',\n },\n});\n\ntype AvatarVariants = VariantProps<typeof StyledAvatar>;\ntype AvatarPrimitiveProps = Omit<React.ComponentProps<typeof AvatarPrimitive.Root>, 'as'>;\ntype AvatarOwnProps = AvatarPrimitiveProps &\n AvatarVariants & {\n css?: CSS;\n alt?: string;\n src?: string;\n fallback?: React.ReactNode;\n // status?: StatusColors['variant'];\n };\n\nexport const Avatar = React.forwardRef<React.ElementRef<typeof StyledAvatar>, AvatarOwnProps>(\n ({ alt, src, fallback, size, variant, shape, css, ...props }, forwardedRef) => {\n return (\n <Box\n css={{\n ...css,\n position: 'relative',\n height: 'fit-content',\n width: 'fit-content',\n }}\n >\n <StyledAvatar {...props} ref={forwardedRef} size={size} variant={variant} shape={shape}>\n <StyledAvatarImage alt={alt} src={src} />\n <StyledAvatarFallback size={size}>{fallback}</StyledAvatarFallback>\n </StyledAvatar>\n </Box>\n );\n }\n);\n"],"mappings":";;;;;;AAMA,IAAM,eAAe,OAAO,gBAAgB,MAAM;CAChD,YAAY;CACZ,gBAAgB;CAChB,eAAe;CACf,UAAU;CACV,YAAY;CACZ,WAAW;CACX,SAAS;CACT,YAAY;CACZ,UAAU;CACV,QAAQ;CACR,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,SAAS;CACT,SAAS;CACT,YAAY;CACZ,OAAO;CAEP,aAAa;EACX,SAAS;EACT,UAAU;EACV,KAAK;EACL,OAAO;EACP,QAAQ;EACR,MA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V,QAAQ;GACR,OAAO;EACT;EAEA,UAAA,qBAAC,cAAD;GAAc,GAAI;GAAO,KAAK;GAAoB;GAAe;GAAgB;GAAjF,UAAA,CACE,oBAAC,mBAAD;IAAwB;IAAU;GAAM,CAAA,GACxC,oBAAC,sBAAD;IAA4B;IAAO,UAAA;GAA+B,CAAA,CACtD;;CACX,CAAA;AAET,CACF"}
|
|
@@ -6,7 +6,7 @@ react = require_runtime.__toESM(react, 1);
|
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let _radix_ui_react_avatar = require("@radix-ui/react-avatar");
|
|
8
8
|
_radix_ui_react_avatar = require_runtime.__toESM(_radix_ui_react_avatar, 1);
|
|
9
|
-
|
|
9
|
+
// components/Avatar/Avatar.vanilla.tsx
|
|
10
10
|
var AvatarVanillaComponent = (0, react.forwardRef)(({ alt, src, fallback, size, variant, shape, css, style, ...props }, ref) => {
|
|
11
11
|
const recipeClass = require_Avatar_vanilla_css.avatarRecipe({
|
|
12
12
|
size,
|
|
@@ -14,13 +14,14 @@ var AvatarVanillaComponent = (0, react.forwardRef)(({ alt, src, fallback, size,
|
|
|
14
14
|
shape
|
|
15
15
|
});
|
|
16
16
|
const fallbackRecipeClass = require_Avatar_vanilla_css.avatarFallbackRecipe({ size });
|
|
17
|
+
const wrapperCss = {
|
|
18
|
+
...css,
|
|
19
|
+
position: "relative",
|
|
20
|
+
height: "fit-content",
|
|
21
|
+
width: "fit-content"
|
|
22
|
+
};
|
|
17
23
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box_vanilla.BoxVanilla, {
|
|
18
|
-
css:
|
|
19
|
-
...css,
|
|
20
|
-
position: "relative",
|
|
21
|
-
height: "fit-content",
|
|
22
|
-
width: "fit-content"
|
|
23
|
-
},
|
|
24
|
+
css: wrapperCss,
|
|
24
25
|
style,
|
|
25
26
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_avatar.Root, {
|
|
26
27
|
ref,
|
|
@@ -39,7 +40,6 @@ var AvatarVanillaComponent = (0, react.forwardRef)(({ alt, src, fallback, size,
|
|
|
39
40
|
});
|
|
40
41
|
AvatarVanillaComponent.displayName = "AvatarVanilla";
|
|
41
42
|
var AvatarVanilla = AvatarVanillaComponent;
|
|
42
|
-
//#endregion
|
|
43
43
|
exports.AvatarVanilla = AvatarVanilla;
|
|
44
44
|
|
|
45
45
|
//# sourceMappingURL=Avatar.vanilla.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.vanilla.cjs","names":[],"sources":["../../../components/Avatar/Avatar.vanilla.tsx"],"sourcesContent":["import * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport React, { forwardRef } from 'react';\n\nimport { CSSProps } from '../../styles/cssProps';\nimport { BoxVanilla } from '../Box/Box.vanilla';\nimport { avatarFallbackRecipe, avatarImage, avatarRecipe } from './Avatar.vanilla.css';\n\ntype AvatarRecipeVariants = NonNullable<RecipeVariants<typeof avatarRecipe>>;\n\ninterface AvatarOwnProps extends AvatarRecipeVariants, CSSProps {\n alt?: string;\n src?: string;\n fallback?: React.ReactNode;\n}\n\nexport type AvatarVanillaProps = Omit<\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,\n keyof AvatarOwnProps\n> &\n AvatarOwnProps;\n\nconst AvatarVanillaComponent = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n AvatarVanillaProps\n>(({ alt, src, fallback, size, variant, shape, css, style, ...props }, ref) => {\n const recipeClass = avatarRecipe({ size, variant, shape });\n const fallbackRecipeClass = avatarFallbackRecipe({ size });\n\n // This CSS will be processed by the Box component\n const wrapperCss = {\n ...css,\n position: 'relative' as const,\n height: 'fit-content' as const,\n width: 'fit-content' as const,\n };\n\n return (\n <BoxVanilla css={wrapperCss} style={style}>\n <AvatarPrimitive.Root ref={ref} className={recipeClass} {...props}>\n <AvatarPrimitive.Image className={avatarImage} alt={alt} src={src} />\n <AvatarPrimitive.Fallback className={fallbackRecipeClass}>\n {fallback}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n </BoxVanilla>\n );\n});\n\nAvatarVanillaComponent.displayName = 'AvatarVanilla';\n\nexport const AvatarVanilla = AvatarVanillaComponent;\n"],"mappings":";;;;;;;;;AAsBA,IAAM,0BAAA,
|
|
1
|
+
{"version":3,"file":"Avatar.vanilla.cjs","names":["forwardRef","avatarRecipe","avatarFallbackRecipe","BoxVanilla","AvatarPrimitive","avatarImage"],"sources":["../../../components/Avatar/Avatar.vanilla.tsx"],"sourcesContent":["import * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport React, { forwardRef } from 'react';\n\nimport { CSSProps } from '../../styles/cssProps';\nimport { BoxVanilla } from '../Box/Box.vanilla';\nimport { avatarFallbackRecipe, avatarImage, avatarRecipe } from './Avatar.vanilla.css';\n\ntype AvatarRecipeVariants = NonNullable<RecipeVariants<typeof avatarRecipe>>;\n\ninterface AvatarOwnProps extends AvatarRecipeVariants, CSSProps {\n alt?: string;\n src?: string;\n fallback?: React.ReactNode;\n}\n\nexport type AvatarVanillaProps = Omit<\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,\n keyof AvatarOwnProps\n> &\n AvatarOwnProps;\n\nconst AvatarVanillaComponent = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n AvatarVanillaProps\n>(({ alt, src, fallback, size, variant, shape, css, style, ...props }, ref) => {\n const recipeClass = avatarRecipe({ size, variant, shape });\n const fallbackRecipeClass = avatarFallbackRecipe({ size });\n\n // This CSS will be processed by the Box component\n const wrapperCss = {\n ...css,\n position: 'relative' as const,\n height: 'fit-content' as const,\n width: 'fit-content' as const,\n };\n\n return (\n <BoxVanilla css={wrapperCss} style={style}>\n <AvatarPrimitive.Root ref={ref} className={recipeClass} {...props}>\n <AvatarPrimitive.Image className={avatarImage} alt={alt} src={src} />\n <AvatarPrimitive.Fallback className={fallbackRecipeClass}>\n {fallback}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n </BoxVanilla>\n );\n});\n\nAvatarVanillaComponent.displayName = 'AvatarVanilla';\n\nexport const AvatarVanilla = AvatarVanillaComponent;\n"],"mappings":";;;;;;;;;AAsBA,IAAM,0BAAA,GAAyBA,MAAAA,WAAAA,EAG5B,EAAE,KAAK,KAAK,UAAU,MAAM,SAAS,OAAO,KAAK,OAAO,GAAG,SAAS,QAAQ;CAC7E,MAAM,cAAcC,2BAAAA,aAAa;EAAE;EAAM;EAAS;CAAM,CAAC;CACzD,MAAM,sBAAsBC,2BAAAA,qBAAqB,EAAE,KAAK,CAAC;CAGzD,MAAM,aAAa;EACjB,GAAG;EACH,UAAU;EACV,QAAQ;EACR,OAAO;CACT;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,YAAD;EAAY,KAAK;EAAmB;EAClC,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAACC,uBAAgB,MAAjB;GAA2B;GAAK,WAAW;GAAa,GAAI;GAA5D,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAgB,OAAjB;IAAuB,WAAWC,2BAAAA;IAAkB;IAAU;GAAM,CAAA,GACpE,iBAAA,GAAA,kBAAA,IAAA,CAACD,uBAAgB,UAAjB;IAA0B,WAAW;IAClC,UAAA;GACuB,CAAA,CACN;;CACZ,CAAA;AAEhB,CAAC;AAED,uBAAuB,cAAc;AAErC,IAAa,gBAAgB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
;/* empty css */
|
|
2
2
|
let _vanilla_extract_recipes_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
3
|
-
|
|
3
|
+
// components/Avatar/Avatar.vanilla.css.ts
|
|
4
4
|
var avatarRecipe = (0, _vanilla_extract_recipes_createRuntimeFn.createRuntimeFn)({
|
|
5
5
|
defaultClassName: "_7on54e1 _7on54e0",
|
|
6
6
|
variantClassNames: {
|
|
@@ -46,7 +46,6 @@ var avatarFallbackRecipe = (0, _vanilla_extract_recipes_createRuntimeFn.createRu
|
|
|
46
46
|
defaultVariants: { size: "2" },
|
|
47
47
|
compoundVariants: []
|
|
48
48
|
});
|
|
49
|
-
//#endregion
|
|
50
49
|
exports.avatarFallbackRecipe = avatarFallbackRecipe;
|
|
51
50
|
exports.avatarImage = avatarImage;
|
|
52
51
|
exports.avatarRecipe = avatarRecipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.vanilla.css.cjs","names":[],"sources":["../../../components/Avatar/Avatar.vanilla.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { tokens } from '../../styles/tokens.css';\n\nconst avatarRoot = style({\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'middle',\n overflow: 'hidden',\n userSelect: 'none',\n boxSizing: 'border-box',\n display: 'flex',\n flexShrink: 0,\n position: 'relative',\n border: 'none',\n fontFamily: 'inherit',\n lineHeight: '1',\n margin: '0',\n outline: 'none',\n padding: '0',\n fontWeight: tokens.fontWeights.medium,\n color: tokens.colors.hiContrast,\n\n selectors: {\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n boxShadow: 'inset 0px 0px 1px rgba(0, 0, 0, 0.12)',\n },\n },\n});\n\nexport const avatarRecipe = recipe({\n base: avatarRoot,\n\n variants: {\n size: {\n '1': {\n width: tokens.sizes['3'],\n height: tokens.sizes['3'],\n },\n '2': {\n width: tokens.sizes['5'],\n height: tokens.sizes['5'],\n },\n '3': {\n width: tokens.sizes['6'],\n height: tokens.sizes['6'],\n },\n '4': {\n width: tokens.sizes['7'],\n height: tokens.sizes['7'],\n },\n '5': {\n width: tokens.sizes['8'],\n height: tokens.sizes['8'],\n },\n '6': {\n width: tokens.sizes['9'],\n height: tokens.sizes['9'],\n },\n },\n variant: {\n gray: {\n backgroundColor: tokens.colors.slate['5'],\n },\n red: {\n backgroundColor: tokens.colors.red['5'],\n },\n purple: {\n backgroundColor: tokens.colors.purple['5'],\n },\n blue: {\n backgroundColor: tokens.colors.blue['5'],\n },\n green: {\n backgroundColor: tokens.colors.green['5'],\n },\n orange: {\n backgroundColor: tokens.colors.orange['5'],\n },\n },\n shape: {\n square: {\n borderRadius: tokens.radii['2'],\n },\n circle: {\n borderRadius: '50%',\n },\n },\n },\n\n defaultVariants: {\n size: '2',\n variant: 'gray',\n shape: 'circle',\n },\n});\n\nexport const avatarImage = style({\n display: 'flex',\n objectFit: 'cover',\n boxSizing: 'border-box',\n height: '100%',\n verticalAlign: 'middle',\n width: '100%',\n});\n\nconst avatarFallbackBase = style({\n textTransform: 'uppercase',\n fontFamily: tokens.fonts.rubik,\n color: tokens.colors.deepBlue['10'],\n});\n\nexport const avatarFallbackRecipe = recipe({\n base: avatarFallbackBase,\n\n variants: {\n size: {\n '1': {\n fontSize: '10px',\n lineHeight: '15px',\n },\n '2': {\n fontSize: tokens.fontSizes['3'],\n },\n '3': {\n fontSize: tokens.fontSizes['6'],\n },\n '4': {\n fontSize: tokens.fontSizes['7'],\n },\n '5': {\n fontSize: tokens.fontSizes['8'],\n },\n '6': {\n fontSize: tokens.fontSizes['9'],\n },\n },\n },\n\n defaultVariants: {\n size: '2',\n },\n});\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Avatar.vanilla.css.cjs","names":["_7a468"],"sources":["../../../components/Avatar/Avatar.vanilla.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { tokens } from '../../styles/tokens.css';\n\nconst avatarRoot = style({\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'middle',\n overflow: 'hidden',\n userSelect: 'none',\n boxSizing: 'border-box',\n display: 'flex',\n flexShrink: 0,\n position: 'relative',\n border: 'none',\n fontFamily: 'inherit',\n lineHeight: '1',\n margin: '0',\n outline: 'none',\n padding: '0',\n fontWeight: tokens.fontWeights.medium,\n color: tokens.colors.hiContrast,\n\n selectors: {\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n boxShadow: 'inset 0px 0px 1px rgba(0, 0, 0, 0.12)',\n },\n },\n});\n\nexport const avatarRecipe = recipe({\n base: avatarRoot,\n\n variants: {\n size: {\n '1': {\n width: tokens.sizes['3'],\n height: tokens.sizes['3'],\n },\n '2': {\n width: tokens.sizes['5'],\n height: tokens.sizes['5'],\n },\n '3': {\n width: tokens.sizes['6'],\n height: tokens.sizes['6'],\n },\n '4': {\n width: tokens.sizes['7'],\n height: tokens.sizes['7'],\n },\n '5': {\n width: tokens.sizes['8'],\n height: tokens.sizes['8'],\n },\n '6': {\n width: tokens.sizes['9'],\n height: tokens.sizes['9'],\n },\n },\n variant: {\n gray: {\n backgroundColor: tokens.colors.slate['5'],\n },\n red: {\n backgroundColor: tokens.colors.red['5'],\n },\n purple: {\n backgroundColor: tokens.colors.purple['5'],\n },\n blue: {\n backgroundColor: tokens.colors.blue['5'],\n },\n green: {\n backgroundColor: tokens.colors.green['5'],\n },\n orange: {\n backgroundColor: tokens.colors.orange['5'],\n },\n },\n shape: {\n square: {\n borderRadius: tokens.radii['2'],\n },\n circle: {\n borderRadius: '50%',\n },\n },\n },\n\n defaultVariants: {\n size: '2',\n variant: 'gray',\n shape: 'circle',\n },\n});\n\nexport const avatarImage = style({\n display: 'flex',\n objectFit: 'cover',\n boxSizing: 'border-box',\n height: '100%',\n verticalAlign: 'middle',\n width: '100%',\n});\n\nconst avatarFallbackBase = style({\n textTransform: 'uppercase',\n fontFamily: tokens.fonts.rubik,\n color: tokens.colors.deepBlue['10'],\n});\n\nexport const avatarFallbackRecipe = recipe({\n base: avatarFallbackBase,\n\n variants: {\n size: {\n '1': {\n fontSize: '10px',\n lineHeight: '15px',\n },\n '2': {\n fontSize: tokens.fontSizes['3'],\n },\n '3': {\n fontSize: tokens.fontSizes['6'],\n },\n '4': {\n fontSize: tokens.fontSizes['7'],\n },\n '5': {\n fontSize: tokens.fontSizes['8'],\n },\n '6': {\n fontSize: tokens.fontSizes['9'],\n },\n },\n },\n\n defaultVariants: {\n size: '2',\n },\n});\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
|
-
|
|
3
|
+
// components/Avatar/Avatar.vanilla.css.ts
|
|
4
4
|
var avatarRecipe = createRuntimeFn({
|
|
5
5
|
defaultClassName: "_7on54e1 _7on54e0",
|
|
6
6
|
variantClassNames: {
|
|
@@ -46,7 +46,6 @@ var avatarFallbackRecipe = createRuntimeFn({
|
|
|
46
46
|
defaultVariants: { size: "2" },
|
|
47
47
|
compoundVariants: []
|
|
48
48
|
});
|
|
49
|
-
//#endregion
|
|
50
49
|
export { avatarFallbackRecipe, avatarImage, avatarRecipe };
|
|
51
50
|
|
|
52
51
|
//# sourceMappingURL=Avatar.vanilla.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.vanilla.css.js","names":[],"sources":["../../../components/Avatar/Avatar.vanilla.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { tokens } from '../../styles/tokens.css';\n\nconst avatarRoot = style({\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'middle',\n overflow: 'hidden',\n userSelect: 'none',\n boxSizing: 'border-box',\n display: 'flex',\n flexShrink: 0,\n position: 'relative',\n border: 'none',\n fontFamily: 'inherit',\n lineHeight: '1',\n margin: '0',\n outline: 'none',\n padding: '0',\n fontWeight: tokens.fontWeights.medium,\n color: tokens.colors.hiContrast,\n\n selectors: {\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n boxShadow: 'inset 0px 0px 1px rgba(0, 0, 0, 0.12)',\n },\n },\n});\n\nexport const avatarRecipe = recipe({\n base: avatarRoot,\n\n variants: {\n size: {\n '1': {\n width: tokens.sizes['3'],\n height: tokens.sizes['3'],\n },\n '2': {\n width: tokens.sizes['5'],\n height: tokens.sizes['5'],\n },\n '3': {\n width: tokens.sizes['6'],\n height: tokens.sizes['6'],\n },\n '4': {\n width: tokens.sizes['7'],\n height: tokens.sizes['7'],\n },\n '5': {\n width: tokens.sizes['8'],\n height: tokens.sizes['8'],\n },\n '6': {\n width: tokens.sizes['9'],\n height: tokens.sizes['9'],\n },\n },\n variant: {\n gray: {\n backgroundColor: tokens.colors.slate['5'],\n },\n red: {\n backgroundColor: tokens.colors.red['5'],\n },\n purple: {\n backgroundColor: tokens.colors.purple['5'],\n },\n blue: {\n backgroundColor: tokens.colors.blue['5'],\n },\n green: {\n backgroundColor: tokens.colors.green['5'],\n },\n orange: {\n backgroundColor: tokens.colors.orange['5'],\n },\n },\n shape: {\n square: {\n borderRadius: tokens.radii['2'],\n },\n circle: {\n borderRadius: '50%',\n },\n },\n },\n\n defaultVariants: {\n size: '2',\n variant: 'gray',\n shape: 'circle',\n },\n});\n\nexport const avatarImage = style({\n display: 'flex',\n objectFit: 'cover',\n boxSizing: 'border-box',\n height: '100%',\n verticalAlign: 'middle',\n width: '100%',\n});\n\nconst avatarFallbackBase = style({\n textTransform: 'uppercase',\n fontFamily: tokens.fonts.rubik,\n color: tokens.colors.deepBlue['10'],\n});\n\nexport const avatarFallbackRecipe = recipe({\n base: avatarFallbackBase,\n\n variants: {\n size: {\n '1': {\n fontSize: '10px',\n lineHeight: '15px',\n },\n '2': {\n fontSize: tokens.fontSizes['3'],\n },\n '3': {\n fontSize: tokens.fontSizes['6'],\n },\n '4': {\n fontSize: tokens.fontSizes['7'],\n },\n '5': {\n fontSize: tokens.fontSizes['8'],\n },\n '6': {\n fontSize: tokens.fontSizes['9'],\n },\n },\n },\n\n defaultVariants: {\n size: '2',\n },\n});\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Avatar.vanilla.css.js","names":["_7a468"],"sources":["../../../components/Avatar/Avatar.vanilla.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { tokens } from '../../styles/tokens.css';\n\nconst avatarRoot = style({\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'middle',\n overflow: 'hidden',\n userSelect: 'none',\n boxSizing: 'border-box',\n display: 'flex',\n flexShrink: 0,\n position: 'relative',\n border: 'none',\n fontFamily: 'inherit',\n lineHeight: '1',\n margin: '0',\n outline: 'none',\n padding: '0',\n fontWeight: tokens.fontWeights.medium,\n color: tokens.colors.hiContrast,\n\n selectors: {\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n boxShadow: 'inset 0px 0px 1px rgba(0, 0, 0, 0.12)',\n },\n },\n});\n\nexport const avatarRecipe = recipe({\n base: avatarRoot,\n\n variants: {\n size: {\n '1': {\n width: tokens.sizes['3'],\n height: tokens.sizes['3'],\n },\n '2': {\n width: tokens.sizes['5'],\n height: tokens.sizes['5'],\n },\n '3': {\n width: tokens.sizes['6'],\n height: tokens.sizes['6'],\n },\n '4': {\n width: tokens.sizes['7'],\n height: tokens.sizes['7'],\n },\n '5': {\n width: tokens.sizes['8'],\n height: tokens.sizes['8'],\n },\n '6': {\n width: tokens.sizes['9'],\n height: tokens.sizes['9'],\n },\n },\n variant: {\n gray: {\n backgroundColor: tokens.colors.slate['5'],\n },\n red: {\n backgroundColor: tokens.colors.red['5'],\n },\n purple: {\n backgroundColor: tokens.colors.purple['5'],\n },\n blue: {\n backgroundColor: tokens.colors.blue['5'],\n },\n green: {\n backgroundColor: tokens.colors.green['5'],\n },\n orange: {\n backgroundColor: tokens.colors.orange['5'],\n },\n },\n shape: {\n square: {\n borderRadius: tokens.radii['2'],\n },\n circle: {\n borderRadius: '50%',\n },\n },\n },\n\n defaultVariants: {\n size: '2',\n variant: 'gray',\n shape: 'circle',\n },\n});\n\nexport const avatarImage = style({\n display: 'flex',\n objectFit: 'cover',\n boxSizing: 'border-box',\n height: '100%',\n verticalAlign: 'middle',\n width: '100%',\n});\n\nconst avatarFallbackBase = style({\n textTransform: 'uppercase',\n fontFamily: tokens.fonts.rubik,\n color: tokens.colors.deepBlue['10'],\n});\n\nexport const avatarFallbackRecipe = recipe({\n base: avatarFallbackBase,\n\n variants: {\n size: {\n '1': {\n fontSize: '10px',\n lineHeight: '15px',\n },\n '2': {\n fontSize: tokens.fontSizes['3'],\n },\n '3': {\n fontSize: tokens.fontSizes['6'],\n },\n '4': {\n fontSize: tokens.fontSizes['7'],\n },\n '5': {\n fontSize: tokens.fontSizes['8'],\n },\n '6': {\n fontSize: tokens.fontSizes['9'],\n },\n },\n },\n\n defaultVariants: {\n size: '2',\n },\n});\n"],"mappings":""}
|
|
@@ -3,7 +3,7 @@ import { avatarFallbackRecipe, avatarImage, avatarRecipe } from "./Avatar.vanill
|
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
6
|
-
|
|
6
|
+
// components/Avatar/Avatar.vanilla.tsx
|
|
7
7
|
var AvatarVanillaComponent = forwardRef(({ alt, src, fallback, size, variant, shape, css, style, ...props }, ref) => {
|
|
8
8
|
const recipeClass = avatarRecipe({
|
|
9
9
|
size,
|
|
@@ -11,13 +11,14 @@ var AvatarVanillaComponent = forwardRef(({ alt, src, fallback, size, variant, sh
|
|
|
11
11
|
shape
|
|
12
12
|
});
|
|
13
13
|
const fallbackRecipeClass = avatarFallbackRecipe({ size });
|
|
14
|
+
const wrapperCss = {
|
|
15
|
+
...css,
|
|
16
|
+
position: "relative",
|
|
17
|
+
height: "fit-content",
|
|
18
|
+
width: "fit-content"
|
|
19
|
+
};
|
|
14
20
|
return /* @__PURE__ */ jsx(BoxVanilla, {
|
|
15
|
-
css:
|
|
16
|
-
...css,
|
|
17
|
-
position: "relative",
|
|
18
|
-
height: "fit-content",
|
|
19
|
-
width: "fit-content"
|
|
20
|
-
},
|
|
21
|
+
css: wrapperCss,
|
|
21
22
|
style,
|
|
22
23
|
children: /* @__PURE__ */ jsxs(AvatarPrimitive.Root, {
|
|
23
24
|
ref,
|
|
@@ -36,7 +37,6 @@ var AvatarVanillaComponent = forwardRef(({ alt, src, fallback, size, variant, sh
|
|
|
36
37
|
});
|
|
37
38
|
AvatarVanillaComponent.displayName = "AvatarVanilla";
|
|
38
39
|
var AvatarVanilla = AvatarVanillaComponent;
|
|
39
|
-
//#endregion
|
|
40
40
|
export { AvatarVanilla };
|
|
41
41
|
|
|
42
42
|
//# sourceMappingURL=Avatar.vanilla.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.vanilla.js","names":[],"sources":["../../../components/Avatar/Avatar.vanilla.tsx"],"sourcesContent":["import * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport React, { forwardRef } from 'react';\n\nimport { CSSProps } from '../../styles/cssProps';\nimport { BoxVanilla } from '../Box/Box.vanilla';\nimport { avatarFallbackRecipe, avatarImage, avatarRecipe } from './Avatar.vanilla.css';\n\ntype AvatarRecipeVariants = NonNullable<RecipeVariants<typeof avatarRecipe>>;\n\ninterface AvatarOwnProps extends AvatarRecipeVariants, CSSProps {\n alt?: string;\n src?: string;\n fallback?: React.ReactNode;\n}\n\nexport type AvatarVanillaProps = Omit<\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,\n keyof AvatarOwnProps\n> &\n AvatarOwnProps;\n\nconst AvatarVanillaComponent = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n AvatarVanillaProps\n>(({ alt, src, fallback, size, variant, shape, css, style, ...props }, ref) => {\n const recipeClass = avatarRecipe({ size, variant, shape });\n const fallbackRecipeClass = avatarFallbackRecipe({ size });\n\n // This CSS will be processed by the Box component\n const wrapperCss = {\n ...css,\n position: 'relative' as const,\n height: 'fit-content' as const,\n width: 'fit-content' as const,\n };\n\n return (\n <BoxVanilla css={wrapperCss} style={style}>\n <AvatarPrimitive.Root ref={ref} className={recipeClass} {...props}>\n <AvatarPrimitive.Image className={avatarImage} alt={alt} src={src} />\n <AvatarPrimitive.Fallback className={fallbackRecipeClass}>\n {fallback}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n </BoxVanilla>\n );\n});\n\nAvatarVanillaComponent.displayName = 'AvatarVanilla';\n\nexport const AvatarVanilla = AvatarVanillaComponent;\n"],"mappings":";;;;;;AAsBA,IAAM,yBAAyB,YAG5B,EAAE,KAAK,KAAK,UAAU,MAAM,SAAS,OAAO,KAAK,OAAO,GAAG,SAAS,QAAQ;CAC7E,MAAM,cAAc,aAAa;EAAE;EAAM;EAAS;CAAM,CAAC;CACzD,MAAM,sBAAsB,qBAAqB,EAAE,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"Avatar.vanilla.js","names":[],"sources":["../../../components/Avatar/Avatar.vanilla.tsx"],"sourcesContent":["import * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport React, { forwardRef } from 'react';\n\nimport { CSSProps } from '../../styles/cssProps';\nimport { BoxVanilla } from '../Box/Box.vanilla';\nimport { avatarFallbackRecipe, avatarImage, avatarRecipe } from './Avatar.vanilla.css';\n\ntype AvatarRecipeVariants = NonNullable<RecipeVariants<typeof avatarRecipe>>;\n\ninterface AvatarOwnProps extends AvatarRecipeVariants, CSSProps {\n alt?: string;\n src?: string;\n fallback?: React.ReactNode;\n}\n\nexport type AvatarVanillaProps = Omit<\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,\n keyof AvatarOwnProps\n> &\n AvatarOwnProps;\n\nconst AvatarVanillaComponent = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n AvatarVanillaProps\n>(({ alt, src, fallback, size, variant, shape, css, style, ...props }, ref) => {\n const recipeClass = avatarRecipe({ size, variant, shape });\n const fallbackRecipeClass = avatarFallbackRecipe({ size });\n\n // This CSS will be processed by the Box component\n const wrapperCss = {\n ...css,\n position: 'relative' as const,\n height: 'fit-content' as const,\n width: 'fit-content' as const,\n };\n\n return (\n <BoxVanilla css={wrapperCss} style={style}>\n <AvatarPrimitive.Root ref={ref} className={recipeClass} {...props}>\n <AvatarPrimitive.Image className={avatarImage} alt={alt} src={src} />\n <AvatarPrimitive.Fallback className={fallbackRecipeClass}>\n {fallback}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n </BoxVanilla>\n );\n});\n\nAvatarVanillaComponent.displayName = 'AvatarVanilla';\n\nexport const AvatarVanilla = AvatarVanillaComponent;\n"],"mappings":";;;;;;AAsBA,IAAM,yBAAyB,YAG5B,EAAE,KAAK,KAAK,UAAU,MAAM,SAAS,OAAO,KAAK,OAAO,GAAG,SAAS,QAAQ;CAC7E,MAAM,cAAc,aAAa;EAAE;EAAM;EAAS;CAAM,CAAC;CACzD,MAAM,sBAAsB,qBAAqB,EAAE,KAAK,CAAC;CAGzD,MAAM,aAAa;EACjB,GAAG;EACH,UAAU;EACV,QAAQ;EACR,OAAO;CACT;CAEA,OACE,oBAAC,YAAD;EAAY,KAAK;EAAmB;EAClC,UAAA,qBAAC,gBAAgB,MAAjB;GAA2B;GAAK,WAAW;GAAa,GAAI;GAA5D,UAAA,CACE,oBAAC,gBAAgB,OAAjB;IAAuB,WAAW;IAAkB;IAAU;GAAM,CAAA,GACpE,oBAAC,gBAAgB,UAAjB;IAA0B,WAAW;IAClC,UAAA;GACuB,CAAA,CACN;;CACZ,CAAA;AAEhB,CAAC;AAED,uBAAuB,cAAc;AAErC,IAAa,gBAAgB"}
|
|
@@ -5,7 +5,7 @@ let react = require("react");
|
|
|
5
5
|
react = require_runtime.__toESM(react, 1);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let _radix_ui_react_slot = require("@radix-ui/react-slot");
|
|
8
|
-
|
|
8
|
+
// components/Badge/Badge.tsx
|
|
9
9
|
var getColorBadgeStyles = (color) => ({
|
|
10
10
|
bc: `$${color}6`,
|
|
11
11
|
color: `$${color}10`,
|
|
@@ -97,15 +97,15 @@ var StyledButtonBadge = require_stitches_config.styled("button", BADGE_BASE_STYL
|
|
|
97
97
|
});
|
|
98
98
|
var StyledButtonBadgeSlot = require_stitches_config.styled(_radix_ui_react_slot.Slot, StyledButtonBadge);
|
|
99
99
|
var Badge = react.default.forwardRef(({ interactive, asChild, ...props }, forwardedRef) => {
|
|
100
|
-
|
|
100
|
+
const Component = (0, react.useMemo)(() => {
|
|
101
101
|
if (interactive) return asChild ? StyledButtonBadgeSlot : StyledButtonBadge;
|
|
102
102
|
return asChild ? StyledSpanBadgeSlot : StyledSpanBadge;
|
|
103
|
-
}, [asChild])
|
|
103
|
+
}, [asChild]);
|
|
104
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
|
|
104
105
|
...props,
|
|
105
106
|
ref: forwardedRef
|
|
106
107
|
});
|
|
107
108
|
});
|
|
108
|
-
//#endregion
|
|
109
109
|
exports.Badge = Badge;
|
|
110
110
|
|
|
111
111
|
//# sourceMappingURL=Badge.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.cjs","names":[],"sources":["../../../components/Badge/Badge.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport React, { ComponentProps, useMemo } from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { COLORS } from './Badge.vanilla';\n\ntype COLOR_VALUES = (typeof COLORS)[number];\n\nconst getColorBadgeStyles = (color: COLOR_VALUES) => ({\n bc: `$${color}6`,\n color: `$${color}10`,\n border: `1px solid $${color}10`,\n});\n\ntype ColorVariants = Record<COLOR_VALUES, { bc: string; color: string }>;\nconst colorVariants: ColorVariants = COLORS.reduce(\n (variants, color) => ({\n ...variants,\n [color]: getColorBadgeStyles(color),\n }),\n {} as ColorVariants,\n);\n\nconst interactiveColorVariants: ColorVariants = COLORS.reduce(\n (variants, color) => ({\n ...variants,\n [color]: {\n ...getColorBadgeStyles(color),\n },\n }),\n {} as ColorVariants,\n);\n\nconst alphaColorCompoundVariants = COLORS.map((color) => ({\n alphaBg: true,\n variant: color,\n css: { bc: `$${color}A6` },\n}));\n\nconst BADGE_BASE_STYLES = {\n // Reset\n alignItems: 'center',\n appearance: 'none',\n border: 'none',\n boxSizing: 'border-box',\n display: 'inline-flex',\n flexShrink: 0,\n fontFamily: '$rubik',\n fontWeight: '$medium',\n justifyContent: 'center',\n lineHeight: '1',\n verticalAlign: 'middle',\n outline: 'none',\n padding: '0',\n textDecoration: 'none',\n userSelect: 'none',\n WebkitTapHighlightColor: 'rgba(0,0,0,0)',\n borderRadius: '$pill',\n whiteSpace: 'nowrap',\n fontVariantNumeric: 'tabular-nums',\n position: 'relative',\n\n '&:disabled': {\n backgroundColor: '$slate3',\n pointerEvents: 'none',\n color: '$slate8',\n },\n variants: {\n size: {\n small: {\n height: '$4',\n px: '$2',\n fontSize: '$2',\n },\n large: {\n height: '$5',\n px: '$3',\n fontSize: '$3',\n },\n },\n variant: colorVariants,\n alphaBg: {\n true: {},\n },\n borderless: {\n true: {\n border: 'none',\n },\n },\n },\n compoundVariants: alphaColorCompoundVariants,\n defaultVariants: {\n size: 'small',\n variant: 'gray',\n borderless: false,\n },\n};\n\nconst StyledSpanBadge = styled('span', BADGE_BASE_STYLES);\nconst StyledSpanBadgeSlot = styled(Slot, StyledSpanBadge);\n\nconst StyledButtonBadge = styled('button', BADGE_BASE_STYLES, {\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n borderRadius: 'inherit',\n },\n '&:focus-visible': {\n outline: '2px solid $primary',\n },\n '&:hover': {\n cursor: 'pointer',\n '&::before': {\n backgroundColor: '$badgeInteractiveBackgroundHover',\n },\n },\n '&:active': {\n '&::before': {\n backgroundColor: '$badgeInteractiveBackgroundActive',\n },\n },\n\n variants: {\n variant: interactiveColorVariants,\n borderless: {\n true: {\n border: 'none',\n },\n },\n },\n});\nconst StyledButtonBadgeSlot = styled(Slot, StyledButtonBadge);\n\ntype BadgeProps = ComponentProps<typeof StyledButtonBadge> &\n VariantProps<typeof StyledButtonBadge> & {\n asChild?: boolean;\n interactive?: boolean;\n };\n\nexport const Badge = React.forwardRef<React.ElementRef<typeof StyledButtonBadge>, BadgeProps>(\n ({ interactive, asChild, ...props }, forwardedRef) => {\n const Component = useMemo(() => {\n if (interactive) {\n return asChild ? StyledButtonBadgeSlot : StyledButtonBadge;\n }\n return asChild ? StyledSpanBadgeSlot : StyledSpanBadge;\n // eslint-disable-next-line react
|
|
1
|
+
{"version":3,"file":"Badge.cjs","names":["COLORS","styled","Slot","React","useMemo"],"sources":["../../../components/Badge/Badge.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport React, { ComponentProps, useMemo } from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { COLORS } from './Badge.vanilla';\n\ntype COLOR_VALUES = (typeof COLORS)[number];\n\nconst getColorBadgeStyles = (color: COLOR_VALUES) => ({\n bc: `$${color}6`,\n color: `$${color}10`,\n border: `1px solid $${color}10`,\n});\n\ntype ColorVariants = Record<COLOR_VALUES, { bc: string; color: string }>;\nconst colorVariants: ColorVariants = COLORS.reduce(\n (variants, color) => ({\n ...variants,\n [color]: getColorBadgeStyles(color),\n }),\n {} as ColorVariants,\n);\n\nconst interactiveColorVariants: ColorVariants = COLORS.reduce(\n (variants, color) => ({\n ...variants,\n [color]: {\n ...getColorBadgeStyles(color),\n },\n }),\n {} as ColorVariants,\n);\n\nconst alphaColorCompoundVariants = COLORS.map((color) => ({\n alphaBg: true,\n variant: color,\n css: { bc: `$${color}A6` },\n}));\n\nconst BADGE_BASE_STYLES = {\n // Reset\n alignItems: 'center',\n appearance: 'none',\n border: 'none',\n boxSizing: 'border-box',\n display: 'inline-flex',\n flexShrink: 0,\n fontFamily: '$rubik',\n fontWeight: '$medium',\n justifyContent: 'center',\n lineHeight: '1',\n verticalAlign: 'middle',\n outline: 'none',\n padding: '0',\n textDecoration: 'none',\n userSelect: 'none',\n WebkitTapHighlightColor: 'rgba(0,0,0,0)',\n borderRadius: '$pill',\n whiteSpace: 'nowrap',\n fontVariantNumeric: 'tabular-nums',\n position: 'relative',\n\n '&:disabled': {\n backgroundColor: '$slate3',\n pointerEvents: 'none',\n color: '$slate8',\n },\n variants: {\n size: {\n small: {\n height: '$4',\n px: '$2',\n fontSize: '$2',\n },\n large: {\n height: '$5',\n px: '$3',\n fontSize: '$3',\n },\n },\n variant: colorVariants,\n alphaBg: {\n true: {},\n },\n borderless: {\n true: {\n border: 'none',\n },\n },\n },\n compoundVariants: alphaColorCompoundVariants,\n defaultVariants: {\n size: 'small',\n variant: 'gray',\n borderless: false,\n },\n};\n\nconst StyledSpanBadge = styled('span', BADGE_BASE_STYLES);\nconst StyledSpanBadgeSlot = styled(Slot, StyledSpanBadge);\n\nconst StyledButtonBadge = styled('button', BADGE_BASE_STYLES, {\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n borderRadius: 'inherit',\n },\n '&:focus-visible': {\n outline: '2px solid $primary',\n },\n '&:hover': {\n cursor: 'pointer',\n '&::before': {\n backgroundColor: '$badgeInteractiveBackgroundHover',\n },\n },\n '&:active': {\n '&::before': {\n backgroundColor: '$badgeInteractiveBackgroundActive',\n },\n },\n\n variants: {\n variant: interactiveColorVariants,\n borderless: {\n true: {\n border: 'none',\n },\n },\n },\n});\nconst StyledButtonBadgeSlot = styled(Slot, StyledButtonBadge);\n\ntype BadgeProps = ComponentProps<typeof StyledButtonBadge> &\n VariantProps<typeof StyledButtonBadge> & {\n asChild?: boolean;\n interactive?: boolean;\n };\n\nexport const Badge = React.forwardRef<React.ElementRef<typeof StyledButtonBadge>, BadgeProps>(\n ({ interactive, asChild, ...props }, forwardedRef) => {\n const Component = useMemo(() => {\n if (interactive) {\n return asChild ? StyledButtonBadgeSlot : StyledButtonBadge;\n }\n return asChild ? StyledSpanBadgeSlot : StyledSpanBadge;\n // eslint-disable-next-line @eslint-react/exhaustive-deps\n }, [asChild]);\n\n return <Component {...props} ref={forwardedRef} />;\n },\n);\n"],"mappings":";;;;;;;;AAQA,IAAM,uBAAuB,WAAyB;CACpD,IAAI,IAAI,MAAM;CACd,OAAO,IAAI,MAAM;CACjB,QAAQ,cAAc,MAAM;AAC9B;AAGA,IAAM,gBAA+BA,sBAAAA,OAAO,QACzC,UAAU,WAAW;CACpB,GAAG;EACF,QAAQ,oBAAoB,KAAK;AACpC,IACA,CAAC,CACH;AAEA,IAAM,2BAA0CA,sBAAAA,OAAO,QACpD,UAAU,WAAW;CACpB,GAAG;EACF,QAAQ,EACP,GAAG,oBAAoB,KAAK,EAC9B;AACF,IACA,CAAC,CACH;AAEA,IAAM,6BAA6BA,sBAAAA,OAAO,KAAK,WAAW;CACxD,SAAS;CACT,SAAS;CACT,KAAK,EAAE,IAAI,IAAI,MAAM,IAAI;AAC3B,EAAE;AAEF,IAAM,oBAAoB;CAExB,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,WAAW;CACX,SAAS;CACT,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,gBAAgB;CAChB,YAAY;CACZ,eAAe;CACf,SAAS;CACT,SAAS;CACT,gBAAgB;CAChB,YAAY;CACZ,yBAAyB;CACzB,cAAc;CACd,YAAY;CACZ,oBAAoB;CACpB,UAAU;CAEV,cAAc;EACZ,iBAAiB;EACjB,eAAe;EACf,OAAO;CACT;CACA,UAAU;EACR,MAAM;GACJ,OAAO;IACL,QAAQ;IACR,IAAI;IACJ,UAAU;GACZ;GACA,OAAO;IACL,QAAQ;IACR,IAAI;IACJ,UAAU;GACZ;EACF;EACA,SAAS;EACT,SAAS,EACP,MAAM,CAAC,EACT;EACA,YAAY,EACV,MAAM,EACJ,QAAQ,OACV,EACF;CACF;CACA,kBAAkB;CAClB,iBAAiB;EACf,MAAM;EACN,SAAS;EACT,YAAY;CACd;AACF;AAEA,IAAM,kBAAkBC,wBAAAA,OAAO,QAAQ,iBAAiB;AACxD,IAAM,sBAAsBA,wBAAAA,OAAOC,qBAAAA,MAAM,eAAe;AAExD,IAAM,oBAAoBD,wBAAAA,OAAO,UAAU,mBAAmB;CAC5D,aAAa;EACX,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACP,cAAc;CAChB;CACA,mBAAmB,EACjB,SAAS,qBACX;CACA,WAAW;EACT,QAAQ;EACR,aAAa,EACX,iBAAiB,mCACnB;CACF;CACA,YAAY,EACV,aAAa,EACX,iBAAiB,oCACnB,EACF;CAEA,UAAU;EACR,SAAS;EACT,YAAY,EACV,MAAM,EACJ,QAAQ,OACV,EACF;CACF;AACF,CAAC;AACD,IAAM,wBAAwBA,wBAAAA,OAAOC,qBAAAA,MAAM,iBAAiB;AAQ5D,IAAa,QAAQC,MAAAA,QAAM,YACxB,EAAE,aAAa,SAAS,GAAG,SAAS,iBAAiB;CACpD,MAAM,aAAA,GAAYC,MAAAA,QAAAA,OAAc;EAC9B,IAAI,aACF,OAAO,UAAU,wBAAwB;EAE3C,OAAO,UAAU,sBAAsB;CAEzC,GAAG,CAAC,OAAO,CAAC;CAEZ,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EAAW,GAAI;EAAO,KAAK;CAAe,CAAA;AACnD,CACF"}
|
|
@@ -3,7 +3,7 @@ import { COLORS } from "./Badge.vanilla.js";
|
|
|
3
3
|
import React, { useMemo } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
-
|
|
6
|
+
// components/Badge/Badge.tsx
|
|
7
7
|
var getColorBadgeStyles = (color) => ({
|
|
8
8
|
bc: `$${color}6`,
|
|
9
9
|
color: `$${color}10`,
|
|
@@ -95,15 +95,15 @@ var StyledButtonBadge = styled("button", BADGE_BASE_STYLES, {
|
|
|
95
95
|
});
|
|
96
96
|
var StyledButtonBadgeSlot = styled(Slot, StyledButtonBadge);
|
|
97
97
|
var Badge = React.forwardRef(({ interactive, asChild, ...props }, forwardedRef) => {
|
|
98
|
-
|
|
98
|
+
const Component = useMemo(() => {
|
|
99
99
|
if (interactive) return asChild ? StyledButtonBadgeSlot : StyledButtonBadge;
|
|
100
100
|
return asChild ? StyledSpanBadgeSlot : StyledSpanBadge;
|
|
101
|
-
}, [asChild])
|
|
101
|
+
}, [asChild]);
|
|
102
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
102
103
|
...props,
|
|
103
104
|
ref: forwardedRef
|
|
104
105
|
});
|
|
105
106
|
});
|
|
106
|
-
//#endregion
|
|
107
107
|
export { Badge };
|
|
108
108
|
|
|
109
109
|
//# sourceMappingURL=Badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","names":[],"sources":["../../../components/Badge/Badge.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport React, { ComponentProps, useMemo } from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { COLORS } from './Badge.vanilla';\n\ntype COLOR_VALUES = (typeof COLORS)[number];\n\nconst getColorBadgeStyles = (color: COLOR_VALUES) => ({\n bc: `$${color}6`,\n color: `$${color}10`,\n border: `1px solid $${color}10`,\n});\n\ntype ColorVariants = Record<COLOR_VALUES, { bc: string; color: string }>;\nconst colorVariants: ColorVariants = COLORS.reduce(\n (variants, color) => ({\n ...variants,\n [color]: getColorBadgeStyles(color),\n }),\n {} as ColorVariants,\n);\n\nconst interactiveColorVariants: ColorVariants = COLORS.reduce(\n (variants, color) => ({\n ...variants,\n [color]: {\n ...getColorBadgeStyles(color),\n },\n }),\n {} as ColorVariants,\n);\n\nconst alphaColorCompoundVariants = COLORS.map((color) => ({\n alphaBg: true,\n variant: color,\n css: { bc: `$${color}A6` },\n}));\n\nconst BADGE_BASE_STYLES = {\n // Reset\n alignItems: 'center',\n appearance: 'none',\n border: 'none',\n boxSizing: 'border-box',\n display: 'inline-flex',\n flexShrink: 0,\n fontFamily: '$rubik',\n fontWeight: '$medium',\n justifyContent: 'center',\n lineHeight: '1',\n verticalAlign: 'middle',\n outline: 'none',\n padding: '0',\n textDecoration: 'none',\n userSelect: 'none',\n WebkitTapHighlightColor: 'rgba(0,0,0,0)',\n borderRadius: '$pill',\n whiteSpace: 'nowrap',\n fontVariantNumeric: 'tabular-nums',\n position: 'relative',\n\n '&:disabled': {\n backgroundColor: '$slate3',\n pointerEvents: 'none',\n color: '$slate8',\n },\n variants: {\n size: {\n small: {\n height: '$4',\n px: '$2',\n fontSize: '$2',\n },\n large: {\n height: '$5',\n px: '$3',\n fontSize: '$3',\n },\n },\n variant: colorVariants,\n alphaBg: {\n true: {},\n },\n borderless: {\n true: {\n border: 'none',\n },\n },\n },\n compoundVariants: alphaColorCompoundVariants,\n defaultVariants: {\n size: 'small',\n variant: 'gray',\n borderless: false,\n },\n};\n\nconst StyledSpanBadge = styled('span', BADGE_BASE_STYLES);\nconst StyledSpanBadgeSlot = styled(Slot, StyledSpanBadge);\n\nconst StyledButtonBadge = styled('button', BADGE_BASE_STYLES, {\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n borderRadius: 'inherit',\n },\n '&:focus-visible': {\n outline: '2px solid $primary',\n },\n '&:hover': {\n cursor: 'pointer',\n '&::before': {\n backgroundColor: '$badgeInteractiveBackgroundHover',\n },\n },\n '&:active': {\n '&::before': {\n backgroundColor: '$badgeInteractiveBackgroundActive',\n },\n },\n\n variants: {\n variant: interactiveColorVariants,\n borderless: {\n true: {\n border: 'none',\n },\n },\n },\n});\nconst StyledButtonBadgeSlot = styled(Slot, StyledButtonBadge);\n\ntype BadgeProps = ComponentProps<typeof StyledButtonBadge> &\n VariantProps<typeof StyledButtonBadge> & {\n asChild?: boolean;\n interactive?: boolean;\n };\n\nexport const Badge = React.forwardRef<React.ElementRef<typeof StyledButtonBadge>, BadgeProps>(\n ({ interactive, asChild, ...props }, forwardedRef) => {\n const Component = useMemo(() => {\n if (interactive) {\n return asChild ? StyledButtonBadgeSlot : StyledButtonBadge;\n }\n return asChild ? StyledSpanBadgeSlot : StyledSpanBadge;\n // eslint-disable-next-line react
|
|
1
|
+
{"version":3,"file":"Badge.js","names":[],"sources":["../../../components/Badge/Badge.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport React, { ComponentProps, useMemo } from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { COLORS } from './Badge.vanilla';\n\ntype COLOR_VALUES = (typeof COLORS)[number];\n\nconst getColorBadgeStyles = (color: COLOR_VALUES) => ({\n bc: `$${color}6`,\n color: `$${color}10`,\n border: `1px solid $${color}10`,\n});\n\ntype ColorVariants = Record<COLOR_VALUES, { bc: string; color: string }>;\nconst colorVariants: ColorVariants = COLORS.reduce(\n (variants, color) => ({\n ...variants,\n [color]: getColorBadgeStyles(color),\n }),\n {} as ColorVariants,\n);\n\nconst interactiveColorVariants: ColorVariants = COLORS.reduce(\n (variants, color) => ({\n ...variants,\n [color]: {\n ...getColorBadgeStyles(color),\n },\n }),\n {} as ColorVariants,\n);\n\nconst alphaColorCompoundVariants = COLORS.map((color) => ({\n alphaBg: true,\n variant: color,\n css: { bc: `$${color}A6` },\n}));\n\nconst BADGE_BASE_STYLES = {\n // Reset\n alignItems: 'center',\n appearance: 'none',\n border: 'none',\n boxSizing: 'border-box',\n display: 'inline-flex',\n flexShrink: 0,\n fontFamily: '$rubik',\n fontWeight: '$medium',\n justifyContent: 'center',\n lineHeight: '1',\n verticalAlign: 'middle',\n outline: 'none',\n padding: '0',\n textDecoration: 'none',\n userSelect: 'none',\n WebkitTapHighlightColor: 'rgba(0,0,0,0)',\n borderRadius: '$pill',\n whiteSpace: 'nowrap',\n fontVariantNumeric: 'tabular-nums',\n position: 'relative',\n\n '&:disabled': {\n backgroundColor: '$slate3',\n pointerEvents: 'none',\n color: '$slate8',\n },\n variants: {\n size: {\n small: {\n height: '$4',\n px: '$2',\n fontSize: '$2',\n },\n large: {\n height: '$5',\n px: '$3',\n fontSize: '$3',\n },\n },\n variant: colorVariants,\n alphaBg: {\n true: {},\n },\n borderless: {\n true: {\n border: 'none',\n },\n },\n },\n compoundVariants: alphaColorCompoundVariants,\n defaultVariants: {\n size: 'small',\n variant: 'gray',\n borderless: false,\n },\n};\n\nconst StyledSpanBadge = styled('span', BADGE_BASE_STYLES);\nconst StyledSpanBadgeSlot = styled(Slot, StyledSpanBadge);\n\nconst StyledButtonBadge = styled('button', BADGE_BASE_STYLES, {\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n borderRadius: 'inherit',\n },\n '&:focus-visible': {\n outline: '2px solid $primary',\n },\n '&:hover': {\n cursor: 'pointer',\n '&::before': {\n backgroundColor: '$badgeInteractiveBackgroundHover',\n },\n },\n '&:active': {\n '&::before': {\n backgroundColor: '$badgeInteractiveBackgroundActive',\n },\n },\n\n variants: {\n variant: interactiveColorVariants,\n borderless: {\n true: {\n border: 'none',\n },\n },\n },\n});\nconst StyledButtonBadgeSlot = styled(Slot, StyledButtonBadge);\n\ntype BadgeProps = ComponentProps<typeof StyledButtonBadge> &\n VariantProps<typeof StyledButtonBadge> & {\n asChild?: boolean;\n interactive?: boolean;\n };\n\nexport const Badge = React.forwardRef<React.ElementRef<typeof StyledButtonBadge>, BadgeProps>(\n ({ interactive, asChild, ...props }, forwardedRef) => {\n const Component = useMemo(() => {\n if (interactive) {\n return asChild ? StyledButtonBadgeSlot : StyledButtonBadge;\n }\n return asChild ? StyledSpanBadgeSlot : StyledSpanBadge;\n // eslint-disable-next-line @eslint-react/exhaustive-deps\n }, [asChild]);\n\n return <Component {...props} ref={forwarded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AAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACP,cAAc;CAChB;CACA,mBAAmB,EACjB,SAAS,qBACX;CACA,WAAW;EACT,QAAQ;EACR,aAAa,EACX,iBAAiB,mCACnB;CACF;CACA,YAAY,EACV,aAAa,EACX,iBAAiB,oCACnB,EACF;CAEA,UAAU;EACR,SAAS;EACT,YAAY,EACV,MAAM,EACJ,QAAQ,OACV,EACF;CACF;AACF,CAAC;AACD,IAAM,wBAAwB,OAAO,MAAM,iBAAiB;AAQ5D,IAAa,QAAQ,MAAM,YACxB,EAAE,aAAa,SAAS,GAAG,SAAS,iBAAiB;CACpD,MAAM,YAAY,cAAc;EAC9B,IAAI,aACF,OAAO,UAAU,wBAAwB;EAE3C,OAAO,UAAU,sBAAsB;CAEzC,GAAG,CAAC,OAAO,CAAC;CAEZ,OAAO,oBAAC,WAAD;EAAW,GAAI;EAAO,KAAK;CAAe,CAAA;AACnD,CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// components/Badge/Badge.theme.ts
|
|
2
2
|
var badgeLightTheme = {
|
|
3
3
|
badgeInteractiveBackgroundHover: "hsla(0, 0%, 0%, 0.05)",
|
|
4
4
|
badgeInteractiveBackgroundActive: "hsla(0, 0%, 0%, 0.1)"
|
|
@@ -7,7 +7,6 @@ var badgeDarkTheme = {
|
|
|
7
7
|
badgeInteractiveBackgroundHover: "hsla(0, 0%, 0%, 0.1)",
|
|
8
8
|
badgeInteractiveBackgroundActive: "hsla(0, 0%, 0%, 0.2)"
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
exports.badgeDarkTheme = badgeDarkTheme;
|
|
12
11
|
exports.badgeLightTheme = badgeLightTheme;
|
|
13
12
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// components/Badge/Badge.theme.ts
|
|
2
2
|
var badgeLightTheme = {
|
|
3
3
|
badgeInteractiveBackgroundHover: "hsla(0, 0%, 0%, 0.05)",
|
|
4
4
|
badgeInteractiveBackgroundActive: "hsla(0, 0%, 0%, 0.1)"
|
|
@@ -7,7 +7,6 @@ var badgeDarkTheme = {
|
|
|
7
7
|
badgeInteractiveBackgroundHover: "hsla(0, 0%, 0%, 0.1)",
|
|
8
8
|
badgeInteractiveBackgroundActive: "hsla(0, 0%, 0%, 0.2)"
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { badgeDarkTheme, badgeLightTheme };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=Badge.theme.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
let tinycolor2 = require("tinycolor2");
|
|
3
3
|
tinycolor2 = require_runtime.__toESM(tinycolor2, 1);
|
|
4
|
-
|
|
4
|
+
// components/Badge/Badge.themes.ts
|
|
5
5
|
var Theme;
|
|
6
6
|
(function(_Theme) {
|
|
7
7
|
_Theme.getLight = () => ({
|
|
@@ -13,7 +13,6 @@ var Theme;
|
|
|
13
13
|
badgeInteractiveBackgroundHover: (0, tinycolor2.default)("black").setAlpha(.1).toHslString()
|
|
14
14
|
});
|
|
15
15
|
})(Theme || (Theme = {}));
|
|
16
|
-
//#endregion
|
|
17
16
|
Object.defineProperty(exports, "Theme", {
|
|
18
17
|
enumerable: true,
|
|
19
18
|
get: function() {
|