@clickhouse/click-ui 0.0.3 → 0.0.5
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/{index.js → click-ui.es.js} +4553 -5052
- package/dist/click-ui.umd.js +442 -0
- package/package.json +14 -6
- package/.eslintrc.cjs +0 -33
- package/.github/workflows/deployment.yml +0 -34
- package/.prettierrc +0 -14
- package/.storybook/main.ts +0 -19
- package/.storybook/manager.ts +0 -11
- package/.storybook/preview-head.html +0 -2
- package/.storybook/preview.tsx +0 -76
- package/.storybook/theme.ts +0 -16
- package/build-tokens.js +0 -131
- package/dist/App.d.ts +0 -2
- package/dist/assets/RightArrow/RightArrow.d.ts +0 -1
- package/dist/assets/S3Logo/S3Logo.d.ts +0 -1
- package/dist/components/Accordion/Accordion.d.ts +0 -27
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -21
- package/dist/components/Accordion/Accordion.test.d.ts +0 -1
- package/dist/components/Alert/Alert.d.ts +0 -16
- package/dist/components/Alert/Alert.stories.d.ts +0 -12
- package/dist/components/Alert/Alert.test.d.ts +0 -1
- package/dist/components/Avatar/Avatar.d.ts +0 -7
- package/dist/components/Avatar/Avatar.stories.d.ts +0 -11
- package/dist/components/Badge/Badge.d.ts +0 -16
- package/dist/components/Badge/Badge.stories.d.ts +0 -34
- package/dist/components/Badge/Badge.test.d.ts +0 -1
- package/dist/components/BigStat/BigStat.d.ts +0 -10
- package/dist/components/BigStat/BigStat.stories.d.ts +0 -20
- package/dist/components/Button/Button.d.ts +0 -23
- package/dist/components/Button/Button.stories.d.ts +0 -28
- package/dist/components/Button/Button.test.d.ts +0 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +0 -6
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +0 -12
- package/dist/components/Card/Card.d.ts +0 -10
- package/dist/components/Card/Card.stories.d.ts +0 -16
- package/dist/components/Checkbox/Checkbox.d.ts +0 -5
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -29
- package/dist/components/Checkbox/Checkbox.test.d.ts +0 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts +0 -38
- package/dist/components/ContextMenu/ContextMenu.stories.d.ts +0 -30
- package/dist/components/ContextMenu/ContextMenu.test.d.ts +0 -1
- package/dist/components/Dropdown/Dropdown.d.ts +0 -38
- package/dist/components/Dropdown/Dropdown.stories.d.ts +0 -36
- package/dist/components/Dropdown/Dropdown.test.d.ts +0 -1
- package/dist/components/FormField/Label.d.ts +0 -7
- package/dist/components/FormField/Label.stories.d.ts +0 -28
- package/dist/components/FormField/Select.d.ts +0 -43
- package/dist/components/FormField/Select.stories.d.ts +0 -54
- package/dist/components/FormField/Select.test.d.ts +0 -0
- package/dist/components/FormField/SelectContext.d.ts +0 -24
- package/dist/components/FormField/commonElement.d.ts +0 -1100
- package/dist/components/GenericMenu.d.ts +0 -764
- package/dist/components/HoverCard/HoverCard.d.ts +0 -20
- package/dist/components/HoverCard/HoverCard.stories.d.ts +0 -36
- package/dist/components/HoverCard/HoverCard.test.d.ts +0 -0
- package/dist/components/Icon/Icon.d.ts +0 -571
- package/dist/components/Icon/Icon.stories.d.ts +0 -495
- package/dist/components/Icon/types.d.ts +0 -8
- package/dist/components/IconButton/IconButton.d.ts +0 -15
- package/dist/components/IconButton/IconButton.stories.d.ts +0 -30
- package/dist/components/IconButton/IconButton.test.d.ts +0 -1
- package/dist/components/Panel/Panel.d.ts +0 -11
- package/dist/components/Panel/Panel.stories.d.ts +0 -23
- package/dist/components/Popover/Popover.d.ts +0 -23
- package/dist/components/Popover/Popover.stories.d.ts +0 -43
- package/dist/components/Popover/Popover.test.d.ts +0 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +0 -17
- package/dist/components/RadioGroup/RadioGroup.stories.d.ts +0 -39
- package/dist/components/RadioGroup/RadioGroup.test.d.ts +0 -1
- package/dist/components/Separator/Separator.d.ts +0 -6
- package/dist/components/SidebarNavigationItem/SidebarNavigationItem.d.ts +0 -17
- package/dist/components/SidebarNavigationItem/SidebarNavigationItem.stories.d.ts +0 -20
- package/dist/components/Spacer/Spacer.d.ts +0 -4
- package/dist/components/Spacer/Spacer.stories.d.ts +0 -19
- package/dist/components/Switch/Switch.d.ts +0 -7
- package/dist/components/Switch/Switch.stories.d.ts +0 -13
- package/dist/components/Table/Table.d.ts +0 -568
- package/dist/components/Table/Table.stories.d.ts +0 -575
- package/dist/components/Tabs/Tabs.d.ts +0 -848
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -845
- package/dist/components/Tabs/Tabs.test.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -17
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -45
- package/dist/components/Tooltip/Tooltip.test.d.ts +0 -1
- package/dist/components/Typography/Text/Text.d.ts +0 -12
- package/dist/components/Typography/Text/Text.stories.d.ts +0 -22
- package/dist/components/Typography/Text/Text.test.d.ts +0 -1
- package/dist/components/Typography/Title/Title.d.ts +0 -14
- package/dist/components/Typography/Title/Title.stories.d.ts +0 -35
- package/dist/components/Typography/Title/Title.test.d.ts +0 -1
- package/dist/components/icons/Activity.d.ts +0 -3
- package/dist/components/icons/ArrowDown.d.ts +0 -3
- package/dist/components/icons/ArrowRight.d.ts +0 -3
- package/dist/components/icons/ArrowTriangle.d.ts +0 -3
- package/dist/components/icons/ArrowUp.d.ts +0 -3
- package/dist/components/icons/Backups.d.ts +0 -3
- package/dist/components/icons/Blog.d.ts +0 -3
- package/dist/components/icons/Book.d.ts +0 -3
- package/dist/components/icons/Brackets.d.ts +0 -3
- package/dist/components/icons/Briefcase.d.ts +0 -3
- package/dist/components/icons/Building.d.ts +0 -3
- package/dist/components/icons/BurgerMenu.d.ts +0 -3
- package/dist/components/icons/Cards.d.ts +0 -3
- package/dist/components/icons/CellTower.d.ts +0 -3
- package/dist/components/icons/ChatIcon.d.ts +0 -3
- package/dist/components/icons/CheckIcon.d.ts +0 -3
- package/dist/components/icons/CheckInCircle.d.ts +0 -3
- package/dist/components/icons/ChevronDown.d.ts +0 -2
- package/dist/components/icons/ChevronLeft.d.ts +0 -3
- package/dist/components/icons/ChevronRight.d.ts +0 -2
- package/dist/components/icons/ChevronUp.d.ts +0 -3
- package/dist/components/icons/Clock.d.ts +0 -3
- package/dist/components/icons/Cloud.d.ts +0 -3
- package/dist/components/icons/Code.d.ts +0 -3
- package/dist/components/icons/CodeInSquare.d.ts +0 -3
- package/dist/components/icons/Connect.d.ts +0 -3
- package/dist/components/icons/ConnectAlt.d.ts +0 -3
- package/dist/components/icons/Console.d.ts +0 -3
- package/dist/components/icons/Copy.d.ts +0 -3
- package/dist/components/icons/CrossIcon.d.ts +0 -3
- package/dist/components/icons/Data.d.ts +0 -3
- package/dist/components/icons/DatabaseIcon.d.ts +0 -3
- package/dist/components/icons/Disk.d.ts +0 -3
- package/dist/components/icons/Display.d.ts +0 -3
- package/dist/components/icons/Document.d.ts +0 -3
- package/dist/components/icons/DotsHorizontal.d.ts +0 -3
- package/dist/components/icons/DotsVertical.d.ts +0 -3
- package/dist/components/icons/Email.d.ts +0 -3
- package/dist/components/icons/Empty.d.ts +0 -3
- package/dist/components/icons/FilterIcon.d.ts +0 -3
- package/dist/components/icons/Fire.d.ts +0 -3
- package/dist/components/icons/Flags/EuropeanUnion.d.ts +0 -3
- package/dist/components/icons/Flags/Germany.d.ts +0 -3
- package/dist/components/icons/Flags/India.d.ts +0 -3
- package/dist/components/icons/Flags/Ireland.d.ts +0 -3
- package/dist/components/icons/Flags/Netherlands.d.ts +0 -3
- package/dist/components/icons/Flags/Singapore.d.ts +0 -2
- package/dist/components/icons/Flags/UnitedKingdom.d.ts +0 -3
- package/dist/components/icons/Flags/UnitedStates.d.ts +0 -3
- package/dist/components/icons/Flags/index.d.ts +0 -6
- package/dist/components/icons/Folder.d.ts +0 -3
- package/dist/components/icons/Gift.d.ts +0 -3
- package/dist/components/icons/HistoryIcon.d.ts +0 -3
- package/dist/components/icons/Home.d.ts +0 -3
- package/dist/components/icons/Http.d.ts +0 -3
- package/dist/components/icons/InfoInCircleIcon.d.ts +0 -3
- package/dist/components/icons/InformationIcon.d.ts +0 -3
- package/dist/components/icons/InsertRowIcon.d.ts +0 -3
- package/dist/components/icons/Integrations.d.ts +0 -3
- package/dist/components/icons/LightBulb.d.ts +0 -3
- package/dist/components/icons/Lightening.d.ts +0 -3
- package/dist/components/icons/Loading.d.ts +0 -3
- package/dist/components/icons/Metrics.d.ts +0 -3
- package/dist/components/icons/MetricsAlt.d.ts +0 -3
- package/dist/components/icons/Payment.d.ts +0 -3
- package/dist/components/icons/Payments/Amex.d.ts +0 -3
- package/dist/components/icons/Payments/MasterCard.d.ts +0 -3
- package/dist/components/icons/Payments/Paypal.d.ts +0 -3
- package/dist/components/icons/Payments/Visa.d.ts +0 -3
- package/dist/components/icons/Payments/index.d.ts +0 -6
- package/dist/components/icons/Pencil.d.ts +0 -3
- package/dist/components/icons/PieChart.d.ts +0 -3
- package/dist/components/icons/Play.d.ts +0 -3
- package/dist/components/icons/Plus.d.ts +0 -3
- package/dist/components/icons/Popout.d.ts +0 -3
- package/dist/components/icons/PopoverArrow.d.ts +0 -3
- package/dist/components/icons/Question.d.ts +0 -3
- package/dist/components/icons/Refresh.d.ts +0 -3
- package/dist/components/icons/Search.d.ts +0 -3
- package/dist/components/icons/Secure.d.ts +0 -3
- package/dist/components/icons/Services.d.ts +0 -3
- package/dist/components/icons/Settings.d.ts +0 -3
- package/dist/components/icons/Share.d.ts +0 -3
- package/dist/components/icons/SlideIn.d.ts +0 -3
- package/dist/components/icons/SlideOut.d.ts +0 -3
- package/dist/components/icons/SortAltIcon.d.ts +0 -3
- package/dist/components/icons/SortIcon.d.ts +0 -3
- package/dist/components/icons/Sparkle.d.ts +0 -3
- package/dist/components/icons/Speaker.d.ts +0 -3
- package/dist/components/icons/Speed.d.ts +0 -3
- package/dist/components/icons/Star.d.ts +0 -3
- package/dist/components/icons/Support.d.ts +0 -3
- package/dist/components/icons/Table.d.ts +0 -3
- package/dist/components/icons/Taxi.d.ts +0 -3
- package/dist/components/icons/Trash.d.ts +0 -3
- package/dist/components/icons/Upload.d.ts +0 -3
- package/dist/components/icons/Url.d.ts +0 -3
- package/dist/components/icons/UserIcon.d.ts +0 -2
- package/dist/components/icons/UsersIcon.d.ts +0 -2
- package/dist/components/icons/WarningIcon.d.ts +0 -3
- package/dist/components/index.d.ts +0 -24
- package/dist/components/types.d.ts +0 -1
- package/dist/index.cjs +0 -442
- package/dist/index.d.ts +0 -2
- package/dist/main.d.ts +0 -0
- package/dist/styles/types.d.ts +0 -2087
- package/dist/styles/variables.classic.json.d.ts +0 -204
- package/dist/styles/variables.dark.json.d.ts +0 -896
- package/dist/styles/variables.json.d.ts +0 -2089
- package/dist/styles/variables.light.json.d.ts +0 -951
- package/dist/theme/index.d.ts +0 -10
- package/dist/theme/theme.d.ts +0 -6
- package/index.html +0 -17
- package/jest.config.ts +0 -11
- package/public/favicon.ico +0 -0
- package/public/logo.svg +0 -17
- package/public/vite.svg +0 -1
- package/src/App.css +0 -1
- package/src/App.module.css +0 -235
- package/src/App.tsx +0 -217
- package/src/assets/RightArrow/RightArrow.tsx +0 -17
- package/src/assets/S3Logo/S3Logo.tsx +0 -31
- package/src/assets/react.svg +0 -1
- package/src/components/Accordion/Accordion.stories.tsx +0 -28
- package/src/components/Accordion/Accordion.test.tsx +0 -46
- package/src/components/Accordion/Accordion.tsx +0 -119
- package/src/components/Alert/Alert.stories.tsx +0 -14
- package/src/components/Alert/Alert.test.tsx +0 -27
- package/src/components/Alert/Alert.tsx +0 -130
- package/src/components/Avatar/Avatar.stories.tsx +0 -13
- package/src/components/Avatar/Avatar.tsx +0 -64
- package/src/components/Badge/Badge.stories.ts +0 -30
- package/src/components/Badge/Badge.test.tsx +0 -16
- package/src/components/Badge/Badge.tsx +0 -78
- package/src/components/BigStat/BigStat.stories.ts +0 -20
- package/src/components/BigStat/BigStat.tsx +0 -49
- package/src/components/Button/Button.stories.ts +0 -26
- package/src/components/Button/Button.test.tsx +0 -32
- package/src/components/Button/Button.tsx +0 -115
- package/src/components/ButtonGroup/ButtonGroup.stories.ts +0 -14
- package/src/components/ButtonGroup/ButtonGroup.tsx +0 -78
- package/src/components/Card/Card.stories.ts +0 -19
- package/src/components/Card/Card.tsx +0 -107
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -35
- package/src/components/Checkbox/Checkbox.test.tsx +0 -41
- package/src/components/Checkbox/Checkbox.tsx +0 -89
- package/src/components/ContextMenu/ContextMenu.stories.tsx +0 -73
- package/src/components/ContextMenu/ContextMenu.test.tsx +0 -152
- package/src/components/ContextMenu/ContextMenu.tsx +0 -155
- package/src/components/Dropdown/Dropdown.stories.tsx +0 -64
- package/src/components/Dropdown/Dropdown.test.tsx +0 -141
- package/src/components/Dropdown/Dropdown.tsx +0 -149
- package/src/components/FormField/Label.stories.tsx +0 -39
- package/src/components/FormField/Label.tsx +0 -47
- package/src/components/FormField/Select.stories.tsx +0 -48
- package/src/components/FormField/Select.test.tsx +0 -216
- package/src/components/FormField/Select.tsx +0 -574
- package/src/components/FormField/SelectContext.tsx +0 -101
- package/src/components/FormField/commonElement.tsx +0 -42
- package/src/components/GenericMenu.tsx +0 -114
- package/src/components/HoverCard/HoverCard.stories.tsx +0 -64
- package/src/components/HoverCard/HoverCard.test.tsx +0 -85
- package/src/components/HoverCard/HoverCard.tsx +0 -65
- package/src/components/Icon/Icon.stories.ts +0 -15
- package/src/components/Icon/Icon.tsx +0 -238
- package/src/components/Icon/types.ts +0 -95
- package/src/components/IconButton/IconButton.stories.ts +0 -34
- package/src/components/IconButton/IconButton.test.tsx +0 -32
- package/src/components/IconButton/IconButton.tsx +0 -83
- package/src/components/Panel/Panel.stories.tsx +0 -25
- package/src/components/Panel/Panel.tsx +0 -33
- package/src/components/Popover/Popover.stories.tsx +0 -67
- package/src/components/Popover/Popover.test.tsx +0 -46
- package/src/components/Popover/Popover.tsx +0 -115
- package/src/components/RadioGroup/RadioGroup.stories.tsx +0 -43
- package/src/components/RadioGroup/RadioGroup.test.tsx +0 -59
- package/src/components/RadioGroup/RadioGroup.tsx +0 -149
- package/src/components/Separator/Separator.stories.tsx +0 -24
- package/src/components/Separator/Separator.tsx +0 -29
- package/src/components/SidebarNavigationItem/SidebarNavigationItem.stories.tsx +0 -28
- package/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx +0 -112
- package/src/components/Spacer/Spacer.stories.tsx +0 -20
- package/src/components/Spacer/Spacer.tsx +0 -15
- package/src/components/Switch/Switch.stories.ts +0 -14
- package/src/components/Switch/Switch.tsx +0 -107
- package/src/components/Table/Table.stories.tsx +0 -29
- package/src/components/Table/Table.tsx +0 -109
- package/src/components/Tabs/Tabs.stories.tsx +0 -36
- package/src/components/Tabs/Tabs.test.tsx +0 -86
- package/src/components/Tabs/Tabs.tsx +0 -82
- package/src/components/Tooltip/Tooltip.stories.tsx +0 -68
- package/src/components/Tooltip/Tooltip.test.tsx +0 -44
- package/src/components/Tooltip/Tooltip.tsx +0 -67
- package/src/components/Typography/Text/Text.stories.tsx +0 -22
- package/src/components/Typography/Text/Text.test.tsx +0 -16
- package/src/components/Typography/Text/Text.tsx +0 -30
- package/src/components/Typography/Title/Title.stories.tsx +0 -31
- package/src/components/Typography/Title/Title.test.tsx +0 -16
- package/src/components/Typography/Title/Title.tsx +0 -36
- package/src/components/icons/Activity.tsx +0 -30
- package/src/components/icons/ArrowDown.tsx +0 -22
- package/src/components/icons/ArrowRight.tsx +0 -22
- package/src/components/icons/ArrowTriangle.tsx +0 -36
- package/src/components/icons/ArrowUp.tsx +0 -22
- package/src/components/icons/Backups.tsx +0 -29
- package/src/components/icons/Blog.tsx +0 -38
- package/src/components/icons/Book.tsx +0 -30
- package/src/components/icons/Brackets.tsx +0 -22
- package/src/components/icons/Briefcase.tsx +0 -30
- package/src/components/icons/Building.tsx +0 -30
- package/src/components/icons/BurgerMenu.tsx +0 -22
- package/src/components/icons/Cards.tsx +0 -30
- package/src/components/icons/CellTower.tsx +0 -21
- package/src/components/icons/ChatIcon.tsx +0 -22
- package/src/components/icons/CheckIcon.tsx +0 -21
- package/src/components/icons/CheckInCircle.tsx +0 -39
- package/src/components/icons/ChevronDown.tsx +0 -20
- package/src/components/icons/ChevronLeft.tsx +0 -22
- package/src/components/icons/ChevronRight.tsx +0 -20
- package/src/components/icons/ChevronUp.tsx +0 -22
- package/src/components/icons/Clock.tsx +0 -37
- package/src/components/icons/Cloud.tsx +0 -23
- package/src/components/icons/Code.tsx +0 -22
- package/src/components/icons/CodeInSquare.tsx +0 -30
- package/src/components/icons/Connect.tsx +0 -22
- package/src/components/icons/ConnectAlt.tsx +0 -30
- package/src/components/icons/Console.tsx +0 -30
- package/src/components/icons/Copy.tsx +0 -33
- package/src/components/icons/CrossIcon.tsx +0 -29
- package/src/components/icons/Data.tsx +0 -36
- package/src/components/icons/DatabaseIcon.tsx +0 -31
- package/src/components/icons/Disk.tsx +0 -30
- package/src/components/icons/Display.tsx +0 -30
- package/src/components/icons/Document.tsx +0 -30
- package/src/components/icons/DotsHorizontal.tsx +0 -36
- package/src/components/icons/DotsVertical.tsx +0 -33
- package/src/components/icons/Email.tsx +0 -33
- package/src/components/icons/Empty.tsx +0 -14
- package/src/components/icons/FilterIcon.tsx +0 -37
- package/src/components/icons/Fire.tsx +0 -23
- package/src/components/icons/Flags/EuropeanUnion.tsx +0 -174
- package/src/components/icons/Flags/Germany.tsx +0 -25
- package/src/components/icons/Flags/India.tsx +0 -48
- package/src/components/icons/Flags/Ireland.tsx +0 -32
- package/src/components/icons/Flags/Netherlands.tsx +0 -29
- package/src/components/icons/Flags/Singapore.tsx +0 -43
- package/src/components/icons/Flags/UnitedKingdom.tsx +0 -32
- package/src/components/icons/Flags/UnitedStates.tsx +0 -26
- package/src/components/icons/Flags/index.tsx +0 -46
- package/src/components/icons/Folder.tsx +0 -20
- package/src/components/icons/Gift.tsx +0 -21
- package/src/components/icons/HistoryIcon.tsx +0 -28
- package/src/components/icons/Home.tsx +0 -29
- package/src/components/icons/Http.tsx +0 -22
- package/src/components/icons/Icons.mdx +0 -39
- package/src/components/icons/InfoInCircleIcon.tsx +0 -37
- package/src/components/icons/InformationIcon.tsx +0 -34
- package/src/components/icons/InsertRowIcon.tsx +0 -34
- package/src/components/icons/Integrations.tsx +0 -29
- package/src/components/icons/LightBulb.tsx +0 -40
- package/src/components/icons/Lightening.tsx +0 -30
- package/src/components/icons/Loading.tsx +0 -57
- package/src/components/icons/Metrics.tsx +0 -38
- package/src/components/icons/MetricsAlt.tsx +0 -30
- package/src/components/icons/Payment.tsx +0 -23
- package/src/components/icons/Payments/Amex.tsx +0 -44
- package/src/components/icons/Payments/MasterCard.tsx +0 -48
- package/src/components/icons/Payments/Paypal.tsx +0 -41
- package/src/components/icons/Payments/Visa.tsx +0 -36
- package/src/components/icons/Payments/index.tsx +0 -30
- package/src/components/icons/Pencil.tsx +0 -30
- package/src/components/icons/PieChart.tsx +0 -30
- package/src/components/icons/Play.tsx +0 -30
- package/src/components/icons/Plus.tsx +0 -22
- package/src/components/icons/Popout.tsx +0 -22
- package/src/components/icons/PopoverArrow.tsx +0 -22
- package/src/components/icons/Question.tsx +0 -30
- package/src/components/icons/Refresh.tsx +0 -29
- package/src/components/icons/Search.tsx +0 -22
- package/src/components/icons/Secure.tsx +0 -30
- package/src/components/icons/Services.tsx +0 -23
- package/src/components/icons/Settings.tsx +0 -22
- package/src/components/icons/Share.tsx +0 -29
- package/src/components/icons/SlideIn.tsx +0 -28
- package/src/components/icons/SlideOut.tsx +0 -28
- package/src/components/icons/SortAltIcon.tsx +0 -22
- package/src/components/icons/SortIcon.tsx +0 -24
- package/src/components/icons/Sparkle.tsx +0 -23
- package/src/components/icons/Speaker.tsx +0 -30
- package/src/components/icons/Speed.tsx +0 -29
- package/src/components/icons/Star.tsx +0 -23
- package/src/components/icons/Support.tsx +0 -37
- package/src/components/icons/Table.tsx +0 -30
- package/src/components/icons/Taxi.tsx +0 -120
- package/src/components/icons/Trash.tsx +0 -22
- package/src/components/icons/Upload.tsx +0 -29
- package/src/components/icons/Url.tsx +0 -22
- package/src/components/icons/UserIcon.tsx +0 -17
- package/src/components/icons/UsersIcon.tsx +0 -43
- package/src/components/icons/WarningIcon.tsx +0 -30
- package/src/components/index.ts +0 -35
- package/src/components/types.ts +0 -1
- package/src/index.css +0 -9
- package/src/index.ts +0 -2
- package/src/main.tsx +0 -11
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/styles/Home.module.css +0 -235
- package/src/styles/globals.css +0 -111
- package/src/styles/types.ts +0 -2089
- package/src/styles/variables.classic.css +0 -16
- package/src/styles/variables.classic.json +0 -202
- package/src/styles/variables.css +0 -763
- package/src/styles/variables.dark.css +0 -135
- package/src/styles/variables.dark.json +0 -894
- package/src/styles/variables.json +0 -2087
- package/src/styles/variables.light.css +0 -203
- package/src/styles/variables.light.json +0 -949
- package/src/theme/index.ts +0 -22
- package/src/theme/theme.tsx +0 -28
- package/src/vite-env.d.ts +0 -1
- package/tokens/themes/$metadata.json +0 -9
- package/tokens/themes/$themes.json +0 -3657
- package/tokens/themes/classic.json +0 -550
- package/tokens/themes/component.json +0 -2252
- package/tokens/themes/dark.json +0 -2563
- package/tokens/themes/light.json +0 -2645
- package/tokens/themes/primitives.json +0 -947
- package/tsconfig.json +0 -27
- package/tsconfig.node.json +0 -10
- package/vite.config.ts +0 -40
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ThemeProvider } from "styled-components";
|
|
2
|
-
import { Button, ButtonProps } from "./Button";
|
|
3
|
-
import { themes } from "../../theme";
|
|
4
|
-
import { render, fireEvent } from "@testing-library/react";
|
|
5
|
-
|
|
6
|
-
describe("Button", () => {
|
|
7
|
-
const renderButton = (props: ButtonProps) =>
|
|
8
|
-
render(
|
|
9
|
-
<ThemeProvider theme={themes.dark}>
|
|
10
|
-
<Button {...props} />
|
|
11
|
-
</ThemeProvider>
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
it("should render the button", () => {
|
|
15
|
-
const { getByText } = renderButton({ children: "Hello" });
|
|
16
|
-
expect(getByText("Hello").textContent).toBe("Hello");
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it("should execute action on click", () => {
|
|
20
|
-
let counter = 0;
|
|
21
|
-
const handleClick = () => (counter = 1);
|
|
22
|
-
const { getByText } = renderButton({
|
|
23
|
-
onClick: handleClick,
|
|
24
|
-
label: "Button",
|
|
25
|
-
});
|
|
26
|
-
const button = getByText("Button");
|
|
27
|
-
button.focus();
|
|
28
|
-
fireEvent.click(button);
|
|
29
|
-
|
|
30
|
-
expect(counter).toEqual(1);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { Icon } from "@/components";
|
|
2
|
-
import { IconName } from "@/components/Icon/types";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
|
|
5
|
-
type ButtonType = "primary" | "secondary" | "danger";
|
|
6
|
-
type Alignment = "center" | "left";
|
|
7
|
-
|
|
8
|
-
export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
9
|
-
type?: ButtonType;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
label?: string;
|
|
12
|
-
iconLeft?: IconName;
|
|
13
|
-
iconRight?: IconName;
|
|
14
|
-
align?: Alignment;
|
|
15
|
-
width?: string;
|
|
16
|
-
height?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface StyledButtonProps {
|
|
20
|
-
styleType: ButtonType;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
align?: Alignment;
|
|
23
|
-
width?: string;
|
|
24
|
-
height?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const Button = ({
|
|
28
|
-
type = "primary",
|
|
29
|
-
iconLeft,
|
|
30
|
-
iconRight,
|
|
31
|
-
label,
|
|
32
|
-
align = "center",
|
|
33
|
-
children,
|
|
34
|
-
...delegated
|
|
35
|
-
}: ButtonProps) => (
|
|
36
|
-
<StyledButton
|
|
37
|
-
styleType={type}
|
|
38
|
-
align={align}
|
|
39
|
-
{...delegated}
|
|
40
|
-
>
|
|
41
|
-
{iconLeft && (
|
|
42
|
-
<Icon
|
|
43
|
-
name={iconLeft}
|
|
44
|
-
size="small"
|
|
45
|
-
/>
|
|
46
|
-
)}
|
|
47
|
-
{label ? label : children}
|
|
48
|
-
{iconRight && (
|
|
49
|
-
<Icon
|
|
50
|
-
name={iconRight}
|
|
51
|
-
size="small"
|
|
52
|
-
/>
|
|
53
|
-
)}
|
|
54
|
-
</StyledButton>
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
const BaseButton = styled.button`
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-direction: row;
|
|
60
|
-
justify-content: center;
|
|
61
|
-
padding: ${props =>
|
|
62
|
-
`${props.theme.click.button.basic.space.y} ${props.theme.click.button.basic.space.x}`};
|
|
63
|
-
border-radius: ${props => props.theme.click.button.radii.all};
|
|
64
|
-
gap: ${props => props.theme.click.button.basic.space.gap};
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
const StyledButton = styled(BaseButton)<
|
|
69
|
-
Pick<StyledButtonProps, "width" | "height" | "align" | "styleType">
|
|
70
|
-
>`
|
|
71
|
-
width: ${props => props.width};
|
|
72
|
-
height: ${props => props.height};
|
|
73
|
-
font: ${props => props.theme.click.button.basic.typography.label.default};
|
|
74
|
-
color: ${({ styleType = "primary", theme }) =>
|
|
75
|
-
theme.click.button.basic.color[styleType].text.default};
|
|
76
|
-
background-color: ${({ styleType = "primary", theme }) =>
|
|
77
|
-
theme.click.button.basic.color[styleType].background.default};
|
|
78
|
-
border: 1px solid
|
|
79
|
-
${({ styleType = "primary", theme }) =>
|
|
80
|
-
theme.click.button.basic.color[styleType].stroke.default};
|
|
81
|
-
|
|
82
|
-
display: flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
justify-content: ${props => (props.align === "left" ? "flex-start" : "center")};
|
|
85
|
-
|
|
86
|
-
&:hover {
|
|
87
|
-
background-color: ${({ styleType = "primary", theme }) =>
|
|
88
|
-
theme.click.button.basic.color[styleType].background.hover};
|
|
89
|
-
border: 1px solid
|
|
90
|
-
${({ styleType = "primary", theme }) =>
|
|
91
|
-
theme.click.button.basic.color[styleType].stroke.hover};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&:active,
|
|
95
|
-
&:focus {
|
|
96
|
-
background-color: ${({ styleType = "primary", theme }) =>
|
|
97
|
-
theme.click.button.basic.color[styleType].background.active};
|
|
98
|
-
border: 1px solid
|
|
99
|
-
${({ styleType = "primary", theme }) =>
|
|
100
|
-
theme.click.button.basic.color[styleType].stroke.active};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&:disabled,
|
|
104
|
-
&:disabled:hover,
|
|
105
|
-
&:disabled:active {
|
|
106
|
-
background-color: ${({ styleType = "primary", theme }) =>
|
|
107
|
-
theme.click.button.basic.color[styleType].background.disabled};
|
|
108
|
-
color: ${({ styleType = "primary", theme }) =>
|
|
109
|
-
theme.click.button.basic.color[styleType].text.disabled};
|
|
110
|
-
border: 1px solid
|
|
111
|
-
${({ styleType = "primary", theme }) =>
|
|
112
|
-
theme.click.button.basic.color[styleType].stroke.disabled};
|
|
113
|
-
cursor: not-allowed;
|
|
114
|
-
}
|
|
115
|
-
`;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ButtonGroup } from "./ButtonGroup";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
component: ButtonGroup,
|
|
5
|
-
title: "Buttons/ButtonGroup",
|
|
6
|
-
tags: ["button-group", "autodocs"],
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const Playground = {
|
|
10
|
-
args: {
|
|
11
|
-
labels: ["Button 1", "Button 2", "Button 3"],
|
|
12
|
-
activeIndex: 2,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
|
|
3
|
-
export interface ButtonGroupProps {
|
|
4
|
-
labels: string[];
|
|
5
|
-
activeIndex?: number;
|
|
6
|
-
onClick?: (index: number) => void;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const ButtonGroup = ({
|
|
10
|
-
labels,
|
|
11
|
-
activeIndex,
|
|
12
|
-
onClick,
|
|
13
|
-
}: ButtonGroupProps) => {
|
|
14
|
-
const btns = labels.map((label, index) => {
|
|
15
|
-
const position: ButtonPosition =
|
|
16
|
-
index === 0 ? "left" : index === labels.length - 1 ? "right" : "center";
|
|
17
|
-
return (
|
|
18
|
-
<Button
|
|
19
|
-
key={index}
|
|
20
|
-
active={index === activeIndex}
|
|
21
|
-
position={position}
|
|
22
|
-
onClick={() => onClick?.(index)}
|
|
23
|
-
>
|
|
24
|
-
{label}
|
|
25
|
-
</Button>
|
|
26
|
-
);
|
|
27
|
-
});
|
|
28
|
-
return <ButtonGroupWrapper>{btns}</ButtonGroupWrapper>;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
type ButtonPosition = "left" | "center" | "right";
|
|
32
|
-
interface ButtonProps {
|
|
33
|
-
active: boolean;
|
|
34
|
-
position: ButtonPosition;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const ButtonGroupWrapper = styled.div`
|
|
38
|
-
box-sizing: border-box;
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: row;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
align-items: center;
|
|
43
|
-
padding: 0px 1px;
|
|
44
|
-
border: var(--click-button-group-color-stroke-panel);
|
|
45
|
-
background: var(--click-button-group-color-background-panel);
|
|
46
|
-
`;
|
|
47
|
-
|
|
48
|
-
const endRadii = "var(--click-button-button-group-radii-end)";
|
|
49
|
-
const leftBorderRadius = `${endRadii} 0px 0px ${endRadii}`;
|
|
50
|
-
const rightBorderRadius = `0px ${endRadii} ${endRadii} 0px`;
|
|
51
|
-
const centerBorderRadius = "var(--click-button-button-group-radii-center)";
|
|
52
|
-
|
|
53
|
-
const Button = styled.button<ButtonProps>`
|
|
54
|
-
box-sizing: border-box;
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-direction: row;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
align-items: center;
|
|
59
|
-
border: none;
|
|
60
|
-
padding: var(--click-button-basic-space-y) var(--click-button-basic-space-x);
|
|
61
|
-
gap: 10px;
|
|
62
|
-
|
|
63
|
-
background: ${({ active }: ButtonProps) =>
|
|
64
|
-
active
|
|
65
|
-
? "var(--click-button-group-color-background-active)"
|
|
66
|
-
: "var(--click-button-group-color-background-default)"};
|
|
67
|
-
|
|
68
|
-
border-radius: ${({ position }: ButtonProps) =>
|
|
69
|
-
position === "left"
|
|
70
|
-
? leftBorderRadius
|
|
71
|
-
: position === "right"
|
|
72
|
-
? rightBorderRadius
|
|
73
|
-
: centerBorderRadius};
|
|
74
|
-
|
|
75
|
-
&:hover {
|
|
76
|
-
background: var(--click-button-group-color-background-hover);
|
|
77
|
-
}
|
|
78
|
-
`;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Card } from "./Card";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
component: Card,
|
|
5
|
-
title: "Display/Card",
|
|
6
|
-
tags: ["card","autodocs"],
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const Playground = {
|
|
10
|
-
args: {
|
|
11
|
-
title: "Card title",
|
|
12
|
-
badgeText: "experiment",
|
|
13
|
-
description:
|
|
14
|
-
"A description very interesting that presumably relates to the card",
|
|
15
|
-
infoUrl: "#",
|
|
16
|
-
infoText: "Read More",
|
|
17
|
-
state: "active",
|
|
18
|
-
},
|
|
19
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { Badge } from "@/components/Badge/Badge";
|
|
3
|
-
import { S3Logo } from "@/assets/S3Logo/S3Logo";
|
|
4
|
-
import { RightArrow } from "@/assets/RightArrow/RightArrow";
|
|
5
|
-
|
|
6
|
-
export type CardState = "active" | "disabled";
|
|
7
|
-
export interface CardProps {
|
|
8
|
-
title: string;
|
|
9
|
-
badgeText: string;
|
|
10
|
-
description: string;
|
|
11
|
-
infoUrl: string;
|
|
12
|
-
infoText: string;
|
|
13
|
-
state?: CardState;
|
|
14
|
-
}
|
|
15
|
-
export const Card = ({
|
|
16
|
-
title,
|
|
17
|
-
badgeText,
|
|
18
|
-
description,
|
|
19
|
-
infoUrl,
|
|
20
|
-
infoText,
|
|
21
|
-
state = "active",
|
|
22
|
-
}: CardProps) => (
|
|
23
|
-
<Wrapper state={state}>
|
|
24
|
-
<Header>
|
|
25
|
-
<HeaderLeft>
|
|
26
|
-
<S3Logo />
|
|
27
|
-
<Title>{title}</Title>
|
|
28
|
-
</HeaderLeft>
|
|
29
|
-
<Badge
|
|
30
|
-
text={badgeText}
|
|
31
|
-
state={state === "disabled" ? "disabled" : "default"}
|
|
32
|
-
></Badge>
|
|
33
|
-
</Header>
|
|
34
|
-
|
|
35
|
-
<Content>
|
|
36
|
-
<Description>{description}</Description>
|
|
37
|
-
</Content>
|
|
38
|
-
|
|
39
|
-
<InfoLink>
|
|
40
|
-
<LinkButton href={infoUrl}>{infoText}</LinkButton>
|
|
41
|
-
<RightArrow />
|
|
42
|
-
</InfoLink>
|
|
43
|
-
</Wrapper>
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
interface WrapperProps {
|
|
47
|
-
state: CardState;
|
|
48
|
-
}
|
|
49
|
-
const Wrapper = styled.div<WrapperProps>`
|
|
50
|
-
background-color: ${({ state }) =>
|
|
51
|
-
state === "active"
|
|
52
|
-
? "var(--click-card-color-background-active)"
|
|
53
|
-
: "var(--click-card-color-background-disabled)"};
|
|
54
|
-
border-radius: 4px;
|
|
55
|
-
border: 1px solid #e6e7e9;
|
|
56
|
-
max-width: 420px;
|
|
57
|
-
min-width: 300px;
|
|
58
|
-
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
padding: 16px;
|
|
62
|
-
gap: 16px;
|
|
63
|
-
`;
|
|
64
|
-
|
|
65
|
-
const Header = styled.div`
|
|
66
|
-
margin-top: 8px;
|
|
67
|
-
width: 100%;
|
|
68
|
-
|
|
69
|
-
display: flex;
|
|
70
|
-
justify-content: space-between;
|
|
71
|
-
align-items: center;
|
|
72
|
-
`;
|
|
73
|
-
|
|
74
|
-
const HeaderLeft = styled.div`
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
gap: 16px;
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
const Title = styled.h3`
|
|
81
|
-
font-size: 16px;
|
|
82
|
-
line-height: 24px;
|
|
83
|
-
font-weight: 600;
|
|
84
|
-
`;
|
|
85
|
-
|
|
86
|
-
const Content = styled.div`
|
|
87
|
-
/* width: 330px; */
|
|
88
|
-
`;
|
|
89
|
-
|
|
90
|
-
const Description = styled.p`
|
|
91
|
-
font-weight: 400;
|
|
92
|
-
font-size: 14px;
|
|
93
|
-
line-height: 150%;
|
|
94
|
-
color: #696e79;
|
|
95
|
-
`;
|
|
96
|
-
|
|
97
|
-
const InfoLink = styled.div`
|
|
98
|
-
display: flex;
|
|
99
|
-
align-items: center;
|
|
100
|
-
`;
|
|
101
|
-
const LinkButton = styled.a`
|
|
102
|
-
width: max-content;
|
|
103
|
-
text-decoration: none;
|
|
104
|
-
color: #161517;
|
|
105
|
-
font-size: 14px;
|
|
106
|
-
font-weight: 600;
|
|
107
|
-
`;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Checkbox } from "./Checkbox";
|
|
2
|
-
|
|
3
|
-
const CheckboxComponent = ({
|
|
4
|
-
checked,
|
|
5
|
-
...props
|
|
6
|
-
}: {
|
|
7
|
-
checked: "default" | "checked" | "unchecked";
|
|
8
|
-
disabled: boolean;
|
|
9
|
-
label?: string;
|
|
10
|
-
}) => {
|
|
11
|
-
return (
|
|
12
|
-
<Checkbox
|
|
13
|
-
checked={checked === "default" ? undefined : checked === "checked"}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
export default {
|
|
19
|
-
component: CheckboxComponent,
|
|
20
|
-
title: "Forms/Checkbox",
|
|
21
|
-
tags: ["checkbox","autodocs"],
|
|
22
|
-
argTypes: {
|
|
23
|
-
checked: { control: "radio", options: ["default", "checked", "unchecked"] },
|
|
24
|
-
disabled: { control: "boolean" },
|
|
25
|
-
label: { control: "text" },
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const Playground = {
|
|
30
|
-
args: {
|
|
31
|
-
label: "Accept terms and conditions",
|
|
32
|
-
disabled: false,
|
|
33
|
-
checked: "default",
|
|
34
|
-
},
|
|
35
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ThemeProvider } from "styled-components";
|
|
2
|
-
import { themes } from "../../theme";
|
|
3
|
-
import { render, fireEvent } from "@testing-library/react";
|
|
4
|
-
import { Checkbox } from "@/components";
|
|
5
|
-
import { CheckboxProps } from "@/components/Checkbox/Checkbox";
|
|
6
|
-
|
|
7
|
-
describe("Checkbox", () => {
|
|
8
|
-
const renderCheckbox = (props: CheckboxProps) =>
|
|
9
|
-
render(
|
|
10
|
-
<ThemeProvider theme={themes.dark}>
|
|
11
|
-
<Checkbox {...props} />
|
|
12
|
-
</ThemeProvider>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
it("should execute action on click", () => {
|
|
16
|
-
let counter = 0;
|
|
17
|
-
const handleClick = () => counter++;
|
|
18
|
-
const { getByTestId } = renderCheckbox({
|
|
19
|
-
onCheckedChange: handleClick,
|
|
20
|
-
label: "Accept terms and conditions",
|
|
21
|
-
});
|
|
22
|
-
const checkbox = getByTestId("checkbox");
|
|
23
|
-
fireEvent.click(checkbox);
|
|
24
|
-
|
|
25
|
-
expect(counter).toEqual(1);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it("should not execute action on click if the checkbox is disabled", () => {
|
|
29
|
-
let counter = 0;
|
|
30
|
-
const handleClick = () => counter++;
|
|
31
|
-
const { getByTestId } = renderCheckbox({
|
|
32
|
-
onCheckedChange: handleClick,
|
|
33
|
-
label: "Accept terms and conditions",
|
|
34
|
-
disabled: true,
|
|
35
|
-
});
|
|
36
|
-
const checkbox = getByTestId("checkbox");
|
|
37
|
-
fireEvent.click(checkbox);
|
|
38
|
-
|
|
39
|
-
expect(counter).toEqual(0);
|
|
40
|
-
});
|
|
41
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { Icon } from "@/components";
|
|
2
|
-
import * as RadixCheckbox from "@radix-ui/react-checkbox";
|
|
3
|
-
import { useId } from "react";
|
|
4
|
-
import styled from "styled-components";
|
|
5
|
-
|
|
6
|
-
export interface CheckboxProps extends RadixCheckbox.CheckboxProps {
|
|
7
|
-
label?: string;
|
|
8
|
-
}
|
|
9
|
-
export const Checkbox = ({ id, label = "", ...delegated }: CheckboxProps) => {
|
|
10
|
-
const defaultId = useId();
|
|
11
|
-
return (
|
|
12
|
-
<Wrapper>
|
|
13
|
-
<CheckInput
|
|
14
|
-
id={id ?? defaultId}
|
|
15
|
-
data-testid="checkbox"
|
|
16
|
-
{...delegated}
|
|
17
|
-
>
|
|
18
|
-
<CheckIconWrapper>
|
|
19
|
-
<Icon
|
|
20
|
-
name="check"
|
|
21
|
-
size="small"
|
|
22
|
-
/>
|
|
23
|
-
</CheckIconWrapper>
|
|
24
|
-
</CheckInput>
|
|
25
|
-
{label && <label htmlFor={id ?? defaultId}>{label}</label>}
|
|
26
|
-
</Wrapper>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const Wrapper = styled.div`
|
|
31
|
-
padding: ${({ theme }) => theme.click.checkbox.space.all};
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
gap: ${({ theme }) => theme.click.checkbox.space.gap};
|
|
35
|
-
`;
|
|
36
|
-
|
|
37
|
-
const CheckInput = styled(RadixCheckbox.Root)`
|
|
38
|
-
display: flex;
|
|
39
|
-
align-items: center;
|
|
40
|
-
justify-content: center;
|
|
41
|
-
|
|
42
|
-
${({ theme }) => `
|
|
43
|
-
border-radius: ${theme.click.checkbox.radii.all};
|
|
44
|
-
width: ${theme.click.checkbox.size.all};
|
|
45
|
-
height: ${theme.click.checkbox.size.all};
|
|
46
|
-
background: ${theme.click.checkbox.color.background.default};
|
|
47
|
-
border: 1px solid ${theme.click.checkbox.color.stroke.default};
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
|
|
50
|
-
& ~ label {
|
|
51
|
-
color: ${theme.click.checkbox.color.label.default};
|
|
52
|
-
font: ${theme.click.field.typography.fieldText.default}
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
}
|
|
55
|
-
&:hover {
|
|
56
|
-
background: ${theme.click.checkbox.color.background.hover};
|
|
57
|
-
&~ label {
|
|
58
|
-
color: ${theme.click.checkbox.color.label.hover};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
&[data-state="checked"] {
|
|
62
|
-
border-color: ${theme.click.checkbox.color.stroke.active};
|
|
63
|
-
background: ${theme.click.checkbox.color.background.active};
|
|
64
|
-
& ~ label {
|
|
65
|
-
color: ${theme.click.checkbox.color.label.active};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
&[data-disabled] {
|
|
69
|
-
background: ${theme.click.checkbox.color.background.disabled};
|
|
70
|
-
border-color: ${theme.click.checkbox.color.stroke.disabled};
|
|
71
|
-
&[data-state="checked"] {
|
|
72
|
-
background: ${theme.click.checkbox.color.background.disabled};
|
|
73
|
-
border-color: ${theme.click.checkbox.color.stroke.disabled};
|
|
74
|
-
}
|
|
75
|
-
& ~ label {
|
|
76
|
-
color: ${theme.click.checkbox.color.label.disabled};
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
`};
|
|
80
|
-
`;
|
|
81
|
-
|
|
82
|
-
const CheckIconWrapper = styled(RadixCheckbox.Indicator)`
|
|
83
|
-
${({ theme }) => `
|
|
84
|
-
color: ${theme.click.checkbox.color.check.active};
|
|
85
|
-
&[data-disabled] {
|
|
86
|
-
color: ${theme.click.checkbox.color.check.disabled};
|
|
87
|
-
}
|
|
88
|
-
`}
|
|
89
|
-
`;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { ContextMenuProps } from "@radix-ui/react-context-menu";
|
|
2
|
-
import { ContextMenu } from "./ContextMenu";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
|
|
5
|
-
interface Props extends ContextMenuProps {
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
showArrow?: boolean;
|
|
8
|
-
side: "top" | "right" | "left" | "bottom";
|
|
9
|
-
}
|
|
10
|
-
const GridCenter = styled.div`
|
|
11
|
-
display: grid;
|
|
12
|
-
place-items: center;
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 100%;
|
|
15
|
-
`;
|
|
16
|
-
|
|
17
|
-
const Trigger = styled(GridCenter)`
|
|
18
|
-
border: 2px currentColor dashed;
|
|
19
|
-
`;
|
|
20
|
-
const ContextMenuExample = ({ showArrow, disabled, side, ...props }: Props) => {
|
|
21
|
-
return (
|
|
22
|
-
<GridCenter>
|
|
23
|
-
<ContextMenu {...props}>
|
|
24
|
-
<ContextMenu.Trigger disabled={disabled}>
|
|
25
|
-
<Trigger>ContextMenu Trigger</Trigger>
|
|
26
|
-
</ContextMenu.Trigger>
|
|
27
|
-
<ContextMenu.Content
|
|
28
|
-
showArrow={showArrow}
|
|
29
|
-
side={side}
|
|
30
|
-
>
|
|
31
|
-
<ContextMenu.Group>
|
|
32
|
-
<ContextMenu.Item>Content0</ContextMenu.Item>
|
|
33
|
-
</ContextMenu.Group>
|
|
34
|
-
<ContextMenu.Item>Content1 long text content</ContextMenu.Item>
|
|
35
|
-
<ContextMenu.Sub>
|
|
36
|
-
<ContextMenu.SubTrigger>Hover over</ContextMenu.SubTrigger>
|
|
37
|
-
<ContextMenu.Content sub>
|
|
38
|
-
<ContextMenu.Item>SubContent0</ContextMenu.Item>
|
|
39
|
-
<ContextMenu.Item>SubContent1</ContextMenu.Item>
|
|
40
|
-
<ContextMenu.Item>SubContent0</ContextMenu.Item>
|
|
41
|
-
<ContextMenu.Item>SubContent1</ContextMenu.Item>
|
|
42
|
-
<ContextMenu.Item>SubContent0</ContextMenu.Item>
|
|
43
|
-
<ContextMenu.Item>SubContent1</ContextMenu.Item>
|
|
44
|
-
<ContextMenu.Item>SubContent0</ContextMenu.Item>
|
|
45
|
-
<ContextMenu.Item>SubContent1</ContextMenu.Item>
|
|
46
|
-
<ContextMenu.Item>SubContent0</ContextMenu.Item>
|
|
47
|
-
<ContextMenu.Item>SubContent1</ContextMenu.Item>
|
|
48
|
-
</ContextMenu.Content>
|
|
49
|
-
</ContextMenu.Sub>
|
|
50
|
-
<ContextMenu.Item>Content2</ContextMenu.Item>
|
|
51
|
-
<ContextMenu.Item disabled>Content3</ContextMenu.Item>
|
|
52
|
-
</ContextMenu.Content>
|
|
53
|
-
</ContextMenu>
|
|
54
|
-
</GridCenter>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
export default {
|
|
58
|
-
component: ContextMenuExample,
|
|
59
|
-
title: "Display/ContextMenu",
|
|
60
|
-
tags: ["form-field", "dropdown", "autodocs"],
|
|
61
|
-
argTypes: {
|
|
62
|
-
disabled: { control: "boolean" },
|
|
63
|
-
showArrow: { control: "boolean" },
|
|
64
|
-
side: { control: "select", options: ["top", "right", "left", "bottom"] },
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export const Playground = {
|
|
69
|
-
args: {
|
|
70
|
-
showArrow: true,
|
|
71
|
-
side: "left",
|
|
72
|
-
},
|
|
73
|
-
};
|