@clickhouse/click-ui 0.0.1 → 0.0.3
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/.eslintrc.cjs +1 -0
- package/.prettierrc +14 -0
- package/.storybook/main.ts +1 -0
- package/.storybook/manager.ts +11 -0
- package/.storybook/preview-head.html +2 -4
- package/.storybook/preview.tsx +13 -4
- package/.storybook/theme.ts +16 -0
- package/build-tokens.js +6 -6
- package/dist/App.d.ts +2 -0
- package/dist/assets/RightArrow/RightArrow.d.ts +1 -0
- package/dist/assets/S3Logo/S3Logo.d.ts +1 -0
- package/dist/components/Accordion/Accordion.d.ts +27 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +21 -0
- package/dist/components/Accordion/Accordion.test.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +16 -0
- package/dist/components/Alert/Alert.stories.d.ts +12 -0
- package/dist/components/Alert/Alert.test.d.ts +1 -0
- package/dist/components/Avatar/Avatar.d.ts +7 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +11 -0
- package/dist/components/Badge/Badge.d.ts +16 -0
- package/dist/components/Badge/Badge.stories.d.ts +34 -0
- package/dist/components/Badge/Badge.test.d.ts +1 -0
- package/dist/components/BigStat/BigStat.d.ts +10 -0
- package/dist/components/BigStat/BigStat.stories.d.ts +20 -0
- package/dist/components/Button/Button.d.ts +23 -0
- package/dist/components/Button/Button.stories.d.ts +28 -0
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +6 -0
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +12 -0
- package/dist/components/Card/Card.d.ts +10 -0
- package/dist/components/Card/Card.stories.d.ts +16 -0
- package/dist/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +29 -0
- package/dist/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +38 -0
- package/dist/components/ContextMenu/ContextMenu.stories.d.ts +30 -0
- package/dist/components/ContextMenu/ContextMenu.test.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +38 -0
- package/dist/components/Dropdown/Dropdown.stories.d.ts +36 -0
- package/dist/components/Dropdown/Dropdown.test.d.ts +1 -0
- package/dist/components/FormField/Label.d.ts +7 -0
- package/dist/components/FormField/Label.stories.d.ts +28 -0
- package/dist/components/FormField/Select.d.ts +43 -0
- package/dist/components/FormField/Select.stories.d.ts +54 -0
- package/dist/components/FormField/Select.test.d.ts +0 -0
- package/dist/components/FormField/SelectContext.d.ts +24 -0
- package/dist/components/FormField/commonElement.d.ts +1100 -0
- package/dist/components/GenericMenu.d.ts +764 -0
- package/dist/components/HoverCard/HoverCard.d.ts +20 -0
- package/dist/components/HoverCard/HoverCard.stories.d.ts +36 -0
- package/dist/components/HoverCard/HoverCard.test.d.ts +0 -0
- package/dist/components/Icon/Icon.d.ts +571 -0
- package/dist/components/Icon/Icon.stories.d.ts +495 -0
- package/dist/components/Icon/types.d.ts +8 -0
- package/dist/components/IconButton/IconButton.d.ts +15 -0
- package/dist/components/IconButton/IconButton.stories.d.ts +30 -0
- package/dist/components/IconButton/IconButton.test.d.ts +1 -0
- package/dist/components/Panel/Panel.d.ts +11 -0
- package/dist/components/Panel/Panel.stories.d.ts +23 -0
- package/dist/components/Popover/Popover.d.ts +23 -0
- package/dist/components/Popover/Popover.stories.d.ts +43 -0
- package/dist/components/Popover/Popover.test.d.ts +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +17 -0
- package/dist/components/RadioGroup/RadioGroup.stories.d.ts +39 -0
- package/dist/components/RadioGroup/RadioGroup.test.d.ts +1 -0
- package/dist/components/Separator/Separator.d.ts +6 -0
- package/dist/components/SidebarNavigationItem/SidebarNavigationItem.d.ts +17 -0
- package/dist/components/SidebarNavigationItem/SidebarNavigationItem.stories.d.ts +20 -0
- package/dist/components/Spacer/Spacer.d.ts +4 -0
- package/dist/components/Spacer/Spacer.stories.d.ts +19 -0
- package/dist/components/Switch/Switch.d.ts +7 -0
- package/dist/components/Switch/Switch.stories.d.ts +13 -0
- package/dist/components/Table/Table.d.ts +568 -0
- package/dist/components/Table/Table.stories.d.ts +575 -0
- package/dist/components/Tabs/Tabs.d.ts +848 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +845 -0
- package/dist/components/Tabs/Tabs.test.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +17 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +45 -0
- package/dist/components/Tooltip/Tooltip.test.d.ts +1 -0
- package/dist/components/Typography/Text/Text.d.ts +12 -0
- package/dist/components/Typography/Text/Text.stories.d.ts +22 -0
- package/dist/components/Typography/Text/Text.test.d.ts +1 -0
- package/dist/components/Typography/Title/Title.d.ts +14 -0
- package/dist/components/Typography/Title/Title.stories.d.ts +35 -0
- package/dist/components/Typography/Title/Title.test.d.ts +1 -0
- package/dist/components/icons/Activity.d.ts +3 -0
- package/dist/components/icons/ArrowDown.d.ts +3 -0
- package/dist/components/icons/ArrowRight.d.ts +3 -0
- package/dist/components/icons/ArrowTriangle.d.ts +3 -0
- package/dist/components/icons/ArrowUp.d.ts +3 -0
- package/dist/components/icons/Backups.d.ts +3 -0
- package/dist/components/icons/Blog.d.ts +3 -0
- package/dist/components/icons/Book.d.ts +3 -0
- package/dist/components/icons/Brackets.d.ts +3 -0
- package/dist/components/icons/Briefcase.d.ts +3 -0
- package/dist/components/icons/Building.d.ts +3 -0
- package/dist/components/icons/BurgerMenu.d.ts +3 -0
- package/dist/components/icons/Cards.d.ts +3 -0
- package/dist/components/icons/CellTower.d.ts +3 -0
- package/dist/components/icons/ChatIcon.d.ts +3 -0
- package/dist/components/icons/CheckIcon.d.ts +3 -0
- package/dist/components/icons/CheckInCircle.d.ts +3 -0
- package/dist/components/icons/ChevronDown.d.ts +2 -0
- package/dist/components/icons/ChevronLeft.d.ts +3 -0
- package/dist/components/icons/ChevronRight.d.ts +2 -0
- package/dist/components/icons/ChevronUp.d.ts +3 -0
- package/dist/components/icons/Clock.d.ts +3 -0
- package/dist/components/icons/Cloud.d.ts +3 -0
- package/dist/components/icons/Code.d.ts +3 -0
- package/dist/components/icons/CodeInSquare.d.ts +3 -0
- package/dist/components/icons/Connect.d.ts +3 -0
- package/dist/components/icons/ConnectAlt.d.ts +3 -0
- package/dist/components/icons/Console.d.ts +3 -0
- package/dist/components/icons/Copy.d.ts +3 -0
- package/dist/components/icons/CrossIcon.d.ts +3 -0
- package/dist/components/icons/Data.d.ts +3 -0
- package/dist/components/icons/DatabaseIcon.d.ts +3 -0
- package/dist/components/icons/Disk.d.ts +3 -0
- package/dist/components/icons/Display.d.ts +3 -0
- package/dist/components/icons/Document.d.ts +3 -0
- package/dist/components/icons/DotsHorizontal.d.ts +3 -0
- package/dist/components/icons/DotsVertical.d.ts +3 -0
- package/dist/components/icons/Email.d.ts +3 -0
- package/dist/components/icons/Empty.d.ts +3 -0
- package/dist/components/icons/FilterIcon.d.ts +3 -0
- package/dist/components/icons/Fire.d.ts +3 -0
- package/dist/components/icons/Flags/EuropeanUnion.d.ts +3 -0
- package/dist/components/icons/Flags/Germany.d.ts +3 -0
- package/dist/components/icons/Flags/India.d.ts +3 -0
- package/dist/components/icons/Flags/Ireland.d.ts +3 -0
- package/dist/components/icons/Flags/Netherlands.d.ts +3 -0
- package/dist/components/icons/Flags/Singapore.d.ts +2 -0
- package/dist/components/icons/Flags/UnitedKingdom.d.ts +3 -0
- package/dist/components/icons/Flags/UnitedStates.d.ts +3 -0
- package/dist/components/icons/Flags/index.d.ts +6 -0
- package/dist/components/icons/Folder.d.ts +3 -0
- package/dist/components/icons/Gift.d.ts +3 -0
- package/dist/components/icons/HistoryIcon.d.ts +3 -0
- package/dist/components/icons/Home.d.ts +3 -0
- package/dist/components/icons/Http.d.ts +3 -0
- package/dist/components/icons/InfoInCircleIcon.d.ts +3 -0
- package/dist/components/icons/InformationIcon.d.ts +3 -0
- package/dist/components/icons/InsertRowIcon.d.ts +3 -0
- package/dist/components/icons/Integrations.d.ts +3 -0
- package/dist/components/icons/LightBulb.d.ts +3 -0
- package/dist/components/icons/Lightening.d.ts +3 -0
- package/dist/components/icons/Loading.d.ts +3 -0
- package/dist/components/icons/Metrics.d.ts +3 -0
- package/dist/components/icons/MetricsAlt.d.ts +3 -0
- package/dist/components/icons/Payment.d.ts +3 -0
- package/dist/components/icons/Payments/Amex.d.ts +3 -0
- package/dist/components/icons/Payments/MasterCard.d.ts +3 -0
- package/dist/components/icons/Payments/Paypal.d.ts +3 -0
- package/dist/components/icons/Payments/Visa.d.ts +3 -0
- package/dist/components/icons/Payments/index.d.ts +6 -0
- package/dist/components/icons/Pencil.d.ts +3 -0
- package/dist/components/icons/PieChart.d.ts +3 -0
- package/dist/components/icons/Play.d.ts +3 -0
- package/dist/components/icons/Plus.d.ts +3 -0
- package/dist/components/icons/Popout.d.ts +3 -0
- package/dist/components/icons/PopoverArrow.d.ts +3 -0
- package/dist/components/icons/Question.d.ts +3 -0
- package/dist/components/icons/Refresh.d.ts +3 -0
- package/dist/components/icons/Search.d.ts +3 -0
- package/dist/components/icons/Secure.d.ts +3 -0
- package/dist/components/icons/Services.d.ts +3 -0
- package/dist/components/icons/Settings.d.ts +3 -0
- package/dist/components/icons/Share.d.ts +3 -0
- package/dist/components/icons/SlideIn.d.ts +3 -0
- package/dist/components/icons/SlideOut.d.ts +3 -0
- package/dist/components/icons/SortAltIcon.d.ts +3 -0
- package/dist/components/icons/SortIcon.d.ts +3 -0
- package/dist/components/icons/Sparkle.d.ts +3 -0
- package/dist/components/icons/Speaker.d.ts +3 -0
- package/dist/components/icons/Speed.d.ts +3 -0
- package/dist/components/icons/Star.d.ts +3 -0
- package/dist/components/icons/Support.d.ts +3 -0
- package/dist/components/icons/Table.d.ts +3 -0
- package/dist/components/icons/Taxi.d.ts +3 -0
- package/dist/components/icons/Trash.d.ts +3 -0
- package/dist/components/icons/Upload.d.ts +3 -0
- package/dist/components/icons/Url.d.ts +3 -0
- package/dist/components/icons/UserIcon.d.ts +2 -0
- package/dist/components/icons/UsersIcon.d.ts +2 -0
- package/dist/components/icons/WarningIcon.d.ts +3 -0
- package/dist/components/index.d.ts +24 -0
- package/dist/components/types.d.ts +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.cjs +442 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16474 -0
- package/dist/logo.svg +17 -0
- package/dist/main.d.ts +0 -0
- package/dist/styles/types.d.ts +2087 -0
- package/dist/styles/variables.classic.json.d.ts +204 -0
- package/dist/styles/variables.dark.json.d.ts +896 -0
- package/dist/styles/variables.json.d.ts +2089 -0
- package/dist/styles/variables.light.json.d.ts +951 -0
- package/dist/theme/index.d.ts +10 -0
- package/dist/theme/theme.d.ts +6 -0
- package/dist/vite.svg +1 -0
- package/package.json +24 -5
- package/public/favicon.ico +0 -0
- package/public/logo.svg +17 -0
- package/src/App.tsx +102 -39
- package/src/components/Accordion/Accordion.stories.tsx +4 -54
- package/src/components/Accordion/Accordion.tsx +1 -0
- package/src/components/Alert/Alert.stories.tsx +14 -0
- package/src/components/Alert/Alert.test.tsx +27 -0
- package/src/components/Alert/Alert.tsx +130 -0
- package/src/components/Avatar/Avatar.stories.tsx +13 -0
- package/src/components/Avatar/Avatar.tsx +64 -0
- package/src/components/Badge/Badge.stories.ts +19 -3
- package/src/components/Badge/Badge.test.tsx +6 -1
- package/src/components/Badge/Badge.tsx +67 -13
- package/src/components/BigStat/BigStat.stories.ts +10 -5
- package/src/components/BigStat/BigStat.tsx +36 -24
- package/src/components/Button/Button.stories.ts +12 -68
- package/src/components/Button/Button.test.tsx +2 -2
- package/src/components/Button/Button.tsx +59 -41
- package/src/components/ButtonGroup/ButtonGroup.stories.ts +3 -3
- package/src/components/Card/Card.stories.ts +3 -3
- package/src/components/Checkbox/Checkbox.stories.tsx +35 -0
- package/src/components/Checkbox/Checkbox.test.tsx +41 -0
- package/src/components/Checkbox/Checkbox.tsx +89 -0
- package/src/components/ContextMenu/ContextMenu.stories.tsx +73 -0
- package/src/components/ContextMenu/ContextMenu.test.tsx +152 -0
- package/src/components/ContextMenu/ContextMenu.tsx +155 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +64 -0
- package/src/components/Dropdown/Dropdown.test.tsx +141 -0
- package/src/components/Dropdown/Dropdown.tsx +149 -0
- package/src/components/FormField/Label.stories.tsx +39 -0
- package/src/components/FormField/Label.tsx +47 -0
- package/src/components/FormField/Select.stories.tsx +48 -0
- package/src/components/FormField/Select.test.tsx +216 -0
- package/src/components/FormField/Select.tsx +574 -0
- package/src/components/FormField/SelectContext.tsx +101 -0
- package/src/components/FormField/commonElement.tsx +42 -0
- package/src/components/GenericMenu.tsx +114 -0
- package/src/components/HoverCard/HoverCard.stories.tsx +64 -0
- package/src/components/HoverCard/HoverCard.test.tsx +85 -0
- package/src/components/HoverCard/HoverCard.tsx +65 -0
- package/src/components/Icon/Icon.stories.ts +4 -35
- package/src/components/Icon/Icon.tsx +166 -18
- package/src/components/Icon/types.ts +78 -1
- package/src/components/IconButton/IconButton.stories.ts +25 -7
- package/src/components/IconButton/IconButton.test.tsx +32 -0
- package/src/components/IconButton/IconButton.tsx +60 -71
- package/src/components/Panel/Panel.stories.tsx +25 -0
- package/src/components/Panel/Panel.tsx +33 -0
- package/src/components/Popover/Popover.stories.tsx +67 -0
- package/src/components/Popover/Popover.test.tsx +46 -0
- package/src/components/Popover/Popover.tsx +115 -0
- package/src/components/RadioGroup/RadioGroup.stories.tsx +43 -0
- package/src/components/RadioGroup/RadioGroup.test.tsx +59 -0
- package/src/components/RadioGroup/RadioGroup.tsx +149 -0
- package/src/components/Separator/Separator.stories.tsx +24 -0
- package/src/components/Separator/Separator.tsx +29 -0
- package/src/components/SidebarNavigationItem/SidebarNavigationItem.stories.tsx +2 -2
- package/src/components/Spacer/Spacer.stories.tsx +20 -0
- package/src/components/Spacer/Spacer.tsx +15 -0
- package/src/components/Switch/Switch.stories.ts +3 -3
- package/src/components/Switch/Switch.tsx +3 -2
- package/src/components/Table/Table.stories.tsx +29 -0
- package/src/components/Table/Table.tsx +109 -0
- package/src/components/Tabs/Tabs.stories.tsx +2 -37
- package/src/components/Tooltip/Tooltip.stories.tsx +68 -0
- package/src/components/Tooltip/Tooltip.test.tsx +44 -0
- package/src/components/Tooltip/Tooltip.tsx +67 -0
- package/src/components/Typography/Text/Text.stories.tsx +22 -0
- package/src/components/Typography/Text/Text.test.tsx +16 -0
- package/src/components/Typography/Text/Text.tsx +30 -0
- package/src/components/Typography/Title/Title.stories.tsx +31 -0
- package/src/components/Typography/Title/Title.test.tsx +16 -0
- package/src/components/Typography/Title/Title.tsx +36 -0
- package/src/components/icons/Activity.tsx +30 -0
- package/src/components/icons/ArrowDown.tsx +22 -0
- package/src/components/icons/ArrowRight.tsx +22 -0
- package/src/components/icons/ArrowTriangle.tsx +36 -0
- package/src/components/icons/ArrowUp.tsx +22 -0
- package/src/components/icons/Backups.tsx +29 -0
- package/src/components/icons/Blog.tsx +38 -0
- package/src/components/icons/Book.tsx +30 -0
- package/src/components/icons/Brackets.tsx +22 -0
- package/src/components/icons/Briefcase.tsx +30 -0
- package/src/components/icons/Building.tsx +30 -0
- package/src/components/icons/BurgerMenu.tsx +22 -0
- package/src/components/icons/Cards.tsx +30 -0
- package/src/components/icons/CellTower.tsx +21 -0
- package/src/components/icons/CheckIcon.tsx +21 -0
- package/src/components/icons/CheckInCircle.tsx +39 -0
- package/src/components/icons/ChevronDown.tsx +19 -5
- package/src/components/icons/ChevronLeft.tsx +22 -0
- package/src/components/icons/ChevronRight.tsx +3 -3
- package/src/components/icons/ChevronUp.tsx +22 -0
- package/src/components/icons/Clock.tsx +37 -0
- package/src/components/icons/Cloud.tsx +23 -0
- package/src/components/icons/Code.tsx +22 -0
- package/src/components/icons/CodeInSquare.tsx +30 -0
- package/src/components/icons/Connect.tsx +22 -0
- package/src/components/icons/ConnectAlt.tsx +30 -0
- package/src/components/icons/Console.tsx +30 -0
- package/src/components/icons/Copy.tsx +33 -0
- package/src/components/icons/CrossIcon.tsx +29 -0
- package/src/components/icons/Data.tsx +36 -0
- package/src/components/icons/DatabaseIcon.tsx +27 -29
- package/src/components/icons/Disk.tsx +30 -0
- package/src/components/icons/Display.tsx +30 -0
- package/src/components/icons/Document.tsx +30 -0
- package/src/components/icons/DotsHorizontal.tsx +36 -0
- package/src/components/icons/DotsVertical.tsx +33 -0
- package/src/components/icons/Email.tsx +33 -0
- package/src/components/icons/Empty.tsx +14 -0
- package/src/components/icons/FilterIcon.tsx +29 -16
- package/src/components/icons/Fire.tsx +23 -0
- package/src/components/icons/Folder.tsx +20 -0
- package/src/components/icons/Gift.tsx +21 -0
- package/src/components/icons/HistoryIcon.tsx +13 -13
- package/src/components/icons/Home.tsx +29 -0
- package/src/components/icons/Http.tsx +22 -0
- package/src/components/icons/Icons.mdx +31 -28
- package/src/components/icons/InfoInCircleIcon.tsx +37 -0
- package/src/components/icons/InformationIcon.tsx +34 -0
- package/src/components/icons/InsertRowIcon.tsx +30 -32
- package/src/components/icons/Integrations.tsx +29 -0
- package/src/components/icons/LightBulb.tsx +40 -0
- package/src/components/icons/Lightening.tsx +30 -0
- package/src/components/icons/Loading.tsx +57 -0
- package/src/components/icons/Metrics.tsx +38 -0
- package/src/components/icons/MetricsAlt.tsx +30 -0
- package/src/components/icons/Payment.tsx +23 -0
- package/src/components/icons/Payments/Amex.tsx +44 -0
- package/src/components/icons/Payments/MasterCard.tsx +48 -0
- package/src/components/icons/Payments/Paypal.tsx +41 -0
- package/src/components/icons/Payments/Visa.tsx +36 -0
- package/src/components/icons/Payments/index.tsx +30 -0
- package/src/components/icons/Pencil.tsx +30 -0
- package/src/components/icons/PieChart.tsx +30 -0
- package/src/components/icons/Play.tsx +30 -0
- package/src/components/icons/Plus.tsx +22 -0
- package/src/components/icons/Popout.tsx +22 -0
- package/src/components/icons/PopoverArrow.tsx +22 -0
- package/src/components/icons/Question.tsx +30 -0
- package/src/components/icons/Refresh.tsx +29 -0
- package/src/components/icons/Search.tsx +22 -0
- package/src/components/icons/Secure.tsx +30 -0
- package/src/components/icons/Services.tsx +23 -0
- package/src/components/icons/Settings.tsx +22 -0
- package/src/components/icons/Share.tsx +29 -0
- package/src/components/icons/SlideIn.tsx +28 -0
- package/src/components/icons/SlideOut.tsx +28 -0
- package/src/components/icons/SortAltIcon.tsx +18 -20
- package/src/components/icons/SortIcon.tsx +24 -0
- package/src/components/icons/Sparkle.tsx +23 -0
- package/src/components/icons/Speaker.tsx +30 -0
- package/src/components/icons/Speed.tsx +29 -0
- package/src/components/icons/Star.tsx +23 -0
- package/src/components/icons/Support.tsx +37 -0
- package/src/components/icons/Table.tsx +30 -0
- package/src/components/icons/Taxi.tsx +120 -0
- package/src/components/icons/Trash.tsx +22 -0
- package/src/components/icons/Upload.tsx +29 -0
- package/src/components/icons/Url.tsx +22 -0
- package/src/components/icons/UsersIcon.tsx +27 -27
- package/src/components/icons/WarningIcon.tsx +30 -0
- package/src/components/index.ts +31 -10
- package/src/index.ts +2 -2
- package/src/styles/types.ts +715 -295
- package/src/styles/variables.classic.json +171 -0
- package/src/styles/variables.dark.json +447 -129
- package/src/styles/variables.json +830 -410
- package/src/styles/variables.light.json +339 -179
- package/tokens/themes/$themes.json +3657 -1
- package/tokens/themes/classic.json +492 -0
- package/tokens/themes/component.json +1126 -441
- package/tokens/themes/dark.json +1871 -758
- package/tokens/themes/light.json +852 -266
- package/tokens/themes/primitives.json +294 -210
- package/vite.config.ts +6 -4
- package/app/.babelrc +0 -27
- package/app/.eslintrc.json +0 -6
- package/app/.storybook/main.ts +0 -17
- package/app/.storybook/preview.tsx +0 -26
- package/app/README.md +0 -38
- package/app/next.config.js +0 -6
- package/app/package-lock.json +0 -28711
- package/app/package.json +0 -44
- package/app/public/favicon.ico +0 -0
- package/app/public/next.svg +0 -1
- package/app/public/vercel.svg +0 -1
- package/app/src/assets/RightArrow/right-arrow.tsx +0 -17
- package/app/src/assets/S3Logo/s3-logo.tsx +0 -31
- package/app/src/assets/amazon_s3.svg +0 -9
- package/app/src/assets/arrow.svg +0 -3
- package/app/src/globals.d.ts +0 -4
- package/app/src/pages/_app.tsx +0 -8
- package/app/src/pages/_document.tsx +0 -17
- package/app/src/pages/api/hello.ts +0 -13
- package/app/src/pages/index.tsx +0 -141
- package/app/src/pages/label.tsx +0 -27
- package/app/src/stories/assets/code-brackets.svg +0 -1
- package/app/src/stories/assets/colors.svg +0 -1
- package/app/src/stories/assets/comments.svg +0 -1
- package/app/src/stories/assets/direction.svg +0 -1
- package/app/src/stories/assets/flow.svg +0 -1
- package/app/src/stories/assets/plugin.svg +0 -1
- package/app/src/stories/assets/repo.svg +0 -1
- package/app/src/stories/assets/stackalt.svg +0 -1
- package/app/src/styles/Home.module.css +0 -235
- package/app/src/styles/globals.css +0 -111
- package/app/src/styles/types.ts +0 -1031
- package/app/src/styles/variables.classic.css +0 -16
- package/app/src/styles/variables.classic.json +0 -31
- package/app/src/styles/variables.css +0 -763
- package/app/src/styles/variables.dark.css +0 -135
- package/app/src/styles/variables.dark.json +0 -339
- package/app/src/styles/variables.json +0 -1029
- package/app/src/styles/variables.light.css +0 -203
- package/app/src/styles/variables.light.json +0 -478
- package/app/tokens/themes/$metadata.json +0 -9
- package/app/tokens/themes/$themes.json +0 -1
- package/app/tokens/themes/classic.json +0 -58
- package/app/tokens/themes/component.json +0 -868
- package/app/tokens/themes/dark.json +0 -937
- package/app/tokens/themes/light.json +0 -1380
- package/app/tokens/themes/primitives.json +0 -859
- package/app/tsconfig.json +0 -23
- package/src/components/FormField/FormField.stories.ts +0 -14
- package/src/components/FormField/FormField.tsx +0 -22
package/.eslintrc.cjs
CHANGED
package/.prettierrc
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"jsxBracketSameLine": false,
|
|
3
|
+
"bracketSameLine": false,
|
|
4
|
+
"jsxSingleQuote": false,
|
|
5
|
+
"parser": "typescript",
|
|
6
|
+
"printWidth": 90,
|
|
7
|
+
"semi": true,
|
|
8
|
+
"singleQuote": false,
|
|
9
|
+
"trailingComma": "es5",
|
|
10
|
+
"bracketSpacing": true,
|
|
11
|
+
"endOfLine": "lf",
|
|
12
|
+
"singleAttributePerLine": true,
|
|
13
|
+
"arrowParens": "avoid"
|
|
14
|
+
}
|
package/.storybook/main.ts
CHANGED
package/.storybook/preview.tsx
CHANGED
|
@@ -4,15 +4,15 @@ import "../src/styles/variables.css";
|
|
|
4
4
|
import { Decorator } from "@storybook/react";
|
|
5
5
|
import { ThemeProvider } from "../src/theme";
|
|
6
6
|
import styled from "styled-components";
|
|
7
|
+
import { themes } from "@storybook/theming";
|
|
7
8
|
|
|
8
9
|
const ThemeBlock = styled.div<{ left?: boolean; bfill?: boolean }>(
|
|
9
10
|
({ left, bfill: fill, theme }) => `
|
|
10
11
|
position: absolute;
|
|
11
|
-
top: 0;
|
|
12
|
+
top: 0.5rem;
|
|
12
13
|
left: ${left || fill ? 0 : "50vw"};
|
|
13
|
-
border-right: ${left ? "1px solid #202020" : "none"};
|
|
14
14
|
right: ${left ? "50vw" : 0};
|
|
15
|
-
width:
|
|
15
|
+
width: 96vw;
|
|
16
16
|
height: 100vh;
|
|
17
17
|
bottom: 0;
|
|
18
18
|
overflow: auto;
|
|
@@ -44,7 +44,7 @@ const withTheme: Decorator = (StoryFn, context) => {
|
|
|
44
44
|
const theme = parameters?.theme || context.globals.theme;
|
|
45
45
|
return (
|
|
46
46
|
<ThemeProvider theme={theme}>
|
|
47
|
-
<ThemeBlock
|
|
47
|
+
<ThemeBlock left>
|
|
48
48
|
<StoryFn />
|
|
49
49
|
</ThemeBlock>
|
|
50
50
|
</ThemeProvider>
|
|
@@ -53,6 +53,12 @@ const withTheme: Decorator = (StoryFn, context) => {
|
|
|
53
53
|
|
|
54
54
|
const preview: Preview = {
|
|
55
55
|
parameters: {
|
|
56
|
+
options: {
|
|
57
|
+
storySort: {
|
|
58
|
+
method: "alphabetical",
|
|
59
|
+
order: [],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
56
62
|
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
57
63
|
controls: {
|
|
58
64
|
matchers: {
|
|
@@ -60,6 +66,9 @@ const preview: Preview = {
|
|
|
60
66
|
date: /Date$/,
|
|
61
67
|
},
|
|
62
68
|
},
|
|
69
|
+
docs: {
|
|
70
|
+
theme: themes.light,
|
|
71
|
+
},
|
|
63
72
|
},
|
|
64
73
|
};
|
|
65
74
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// .storybook/YourTheme.js
|
|
2
|
+
|
|
3
|
+
import { create } from "@storybook/theming/create";
|
|
4
|
+
|
|
5
|
+
export default create({
|
|
6
|
+
base: "light",
|
|
7
|
+
brandTitle: "ClickUI Storybook",
|
|
8
|
+
brandUrl: "/",
|
|
9
|
+
brandImage: "/logo.svg",
|
|
10
|
+
appBg: "white",
|
|
11
|
+
brandTarget: "_self",
|
|
12
|
+
fontBase: `"Inter", "SF Pro Display", -apple-system,
|
|
13
|
+
BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
|
|
14
|
+
"Open Sans", "Helvetica Neue", sans-serif;`,
|
|
15
|
+
fontCode: `"Inconsolata", "SFMono Regular", monospace;`,
|
|
16
|
+
});
|
package/build-tokens.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _ from "lodash";
|
|
2
|
-
import {registerTransforms,transforms} from"@tokens-studio/sd-transforms";
|
|
2
|
+
import { registerTransforms, transforms } from "@tokens-studio/sd-transforms";
|
|
3
3
|
import StyleDictionary from "style-dictionary";
|
|
4
4
|
|
|
5
5
|
registerTransforms(StyleDictionary);
|
|
6
6
|
const themes = ["classic", "dark", "light"];
|
|
7
7
|
|
|
8
|
-
function generateThemeFromDictionary
|
|
8
|
+
function generateThemeFromDictionary(dictionary, valueFunc = (value) => value) {
|
|
9
9
|
const theme = {};
|
|
10
10
|
dictionary.allTokens.forEach((token) => {
|
|
11
11
|
_.setWith(theme, token.name, valueFunc(token.value), Object)
|
|
@@ -27,7 +27,7 @@ StyleDictionary.registerTransform({
|
|
|
27
27
|
|
|
28
28
|
StyleDictionary.registerFormat({
|
|
29
29
|
name: "ThemeFormat",
|
|
30
|
-
formatter: function({ dictionary, platform, options, file }) {
|
|
30
|
+
formatter: function ({ dictionary, platform, options, file }) {
|
|
31
31
|
const theme = generateThemeFromDictionary(dictionary);
|
|
32
32
|
return JSON.stringify(theme, null, 2);
|
|
33
33
|
}
|
|
@@ -35,11 +35,11 @@ StyleDictionary.registerFormat({
|
|
|
35
35
|
|
|
36
36
|
StyleDictionary.registerFormat({
|
|
37
37
|
name: "TypescriptFormat",
|
|
38
|
-
formatter: function({ dictionary, platform, options, file }) {
|
|
38
|
+
formatter: function ({ dictionary, platform, options, file }) {
|
|
39
39
|
const theme = generateThemeFromDictionary(dictionary, (value) => typeof value);
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
return `
|
|
42
|
-
export interface Theme ${JSON.stringify(theme, null, 2).replaceAll("\"string\"", "string")}
|
|
42
|
+
export interface Theme ${JSON.stringify(theme, null, 2).replaceAll("\"string\"", "string").replaceAll("\"number\"", "number")}
|
|
43
43
|
`
|
|
44
44
|
}
|
|
45
45
|
});
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RightArrow: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const S3Logo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconName } from '../../components/Icon/types';
|
|
3
|
+
type Size = "small" | "medium" | "large";
|
|
4
|
+
export interface AccordionProps extends SizeProp {
|
|
5
|
+
title: string;
|
|
6
|
+
icon?: IconName;
|
|
7
|
+
iconSize?: Size;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
interface SizeProp {
|
|
11
|
+
size?: Size;
|
|
12
|
+
}
|
|
13
|
+
declare const SidebarAccordion: import("styled-components").IStyledComponent<"web", {
|
|
14
|
+
title: string;
|
|
15
|
+
icon?: IconName | undefined;
|
|
16
|
+
iconSize?: Size | undefined;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
size?: Size | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
declare const AccordionToExport: import("styled-components").IStyledComponent<"web", {
|
|
21
|
+
title: string;
|
|
22
|
+
icon?: IconName | undefined;
|
|
23
|
+
iconSize?: Size | undefined;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
size?: Size | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export { AccordionToExport as Accordion, SidebarAccordion };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
component: import("styled-components").IStyledComponent<"web", {
|
|
4
|
+
title: string;
|
|
5
|
+
icon?: import("../Icon/types").IconName | undefined;
|
|
6
|
+
iconSize?: ("small" | "medium" | "large") | undefined;
|
|
7
|
+
children: import("react").ReactNode;
|
|
8
|
+
size?: ("small" | "medium" | "large") | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
title: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
export declare const Playground: {
|
|
15
|
+
args: {
|
|
16
|
+
title: string;
|
|
17
|
+
theme: string;
|
|
18
|
+
size: string;
|
|
19
|
+
children: import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type AlertSize = "small" | "medium";
|
|
2
|
+
type AlertState = "neutral" | "success" | "warning" | "danger" | "info";
|
|
3
|
+
export type AlertProps = {
|
|
4
|
+
state?: AlertState;
|
|
5
|
+
title?: string;
|
|
6
|
+
text: string;
|
|
7
|
+
size?: AlertSize;
|
|
8
|
+
showIcon?: boolean;
|
|
9
|
+
dismissible?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const Alert: ({ text, title, size, state, showIcon, dismissible, ...delegated }: AlertProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
declare const DangerAlert: (props: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const InfoAlert: (props: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare const SuccessAlert: (props: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const WarningAlert: (props: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { Alert, DangerAlert, InfoAlert, SuccessAlert, WarningAlert };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: ({ text, title, size, state, showIcon, dismissible, ...delegated }: import('../../components/Alert/Alert').AlertProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
title: string;
|
|
4
|
+
tags: string[];
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Playground: {
|
|
8
|
+
args: {
|
|
9
|
+
state: string;
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: ({ text, textSize, ...delegated }: import("./Avatar").AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
title: string;
|
|
4
|
+
tags: string[];
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Playground: {
|
|
8
|
+
args: {
|
|
9
|
+
text: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type BadgeState = "default" | "success" | "neutral" | "danger" | "disabled" | "warning" | "info";
|
|
2
|
+
export type BadgeSize = "sm" | "md";
|
|
3
|
+
export interface BadgeProps {
|
|
4
|
+
text: string;
|
|
5
|
+
state?: BadgeState;
|
|
6
|
+
size?: BadgeSize;
|
|
7
|
+
}
|
|
8
|
+
export interface DismissibleBadge extends BadgeProps {
|
|
9
|
+
dismissible: true;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface NonDismissibleBadge extends BadgeProps {
|
|
13
|
+
dismissible?: never;
|
|
14
|
+
onClose?: never;
|
|
15
|
+
}
|
|
16
|
+
export declare const Badge: ({ text, state, size, dismissible, onClose, }: NonDismissibleBadge | DismissibleBadge) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: ({ text, state, size, dismissible, onClose, }: import("./Badge").DismissibleBadge | import("./Badge").NonDismissibleBadge) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
title: string;
|
|
4
|
+
tags: string[];
|
|
5
|
+
argTypes: {
|
|
6
|
+
size: {
|
|
7
|
+
options: string[];
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
state: {
|
|
13
|
+
options: string[];
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
dismissible: {
|
|
19
|
+
options: boolean[];
|
|
20
|
+
control: {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default _default;
|
|
27
|
+
export declare const Playground: {
|
|
28
|
+
args: {
|
|
29
|
+
text: string;
|
|
30
|
+
state: string;
|
|
31
|
+
size: string;
|
|
32
|
+
dismissible: boolean;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type bigStatState = "default";
|
|
3
|
+
export type bigStatSize = "sm" | "lg";
|
|
4
|
+
export interface BigStatProps {
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
state?: bigStatState;
|
|
8
|
+
size?: bigStatSize;
|
|
9
|
+
}
|
|
10
|
+
export declare const BigStat: ({ label, title, size, state, }: BigStatProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: ({ label, title, size, state, }: import("./BigStat").BigStatProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
title: string;
|
|
4
|
+
tags: string[];
|
|
5
|
+
size: {
|
|
6
|
+
options: string[];
|
|
7
|
+
control: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
export declare const Playground: {
|
|
14
|
+
args: {
|
|
15
|
+
label: string;
|
|
16
|
+
title: string;
|
|
17
|
+
state: string;
|
|
18
|
+
size: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconName } from '../../components/Icon/types';
|
|
3
|
+
type ButtonType = "primary" | "secondary" | "danger";
|
|
4
|
+
type Alignment = "center" | "left";
|
|
5
|
+
export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
type?: ButtonType;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
iconLeft?: IconName;
|
|
10
|
+
iconRight?: IconName;
|
|
11
|
+
align?: Alignment;
|
|
12
|
+
width?: string;
|
|
13
|
+
height?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface StyledButtonProps {
|
|
16
|
+
styleType: ButtonType;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
align?: Alignment;
|
|
19
|
+
width?: string;
|
|
20
|
+
height?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const Button: ({ type, iconLeft, iconRight, label, align, children, ...delegated }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: ({ type, iconLeft, iconRight, label, align, children, ...delegated }: import("./Button").ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
tags: string[];
|
|
5
|
+
argTypes: {
|
|
6
|
+
type: {
|
|
7
|
+
options: string[];
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
align: {
|
|
13
|
+
options: string[];
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
21
|
+
export declare const Playground: {
|
|
22
|
+
args: {
|
|
23
|
+
type: string;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
label: string;
|
|
26
|
+
align: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: ({ labels, activeIndex, onClick, }: import("./ButtonGroup").ButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
title: string;
|
|
4
|
+
tags: string[];
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Playground: {
|
|
8
|
+
args: {
|
|
9
|
+
labels: string[];
|
|
10
|
+
activeIndex: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type CardState = "active" | "disabled";
|
|
2
|
+
export interface CardProps {
|
|
3
|
+
title: string;
|
|
4
|
+
badgeText: string;
|
|
5
|
+
description: string;
|
|
6
|
+
infoUrl: string;
|
|
7
|
+
infoText: string;
|
|
8
|
+
state?: CardState;
|
|
9
|
+
}
|
|
10
|
+
export declare const Card: ({ title, badgeText, description, infoUrl, infoText, state, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: ({ title, badgeText, description, infoUrl, infoText, state, }: import("./Card").CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
title: string;
|
|
4
|
+
tags: string[];
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Playground: {
|
|
8
|
+
args: {
|
|
9
|
+
title: string;
|
|
10
|
+
badgeText: string;
|
|
11
|
+
description: string;
|
|
12
|
+
infoUrl: string;
|
|
13
|
+
infoText: string;
|
|
14
|
+
state: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as RadixCheckbox from "@radix-ui/react-checkbox";
|
|
2
|
+
export interface CheckboxProps extends RadixCheckbox.CheckboxProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const Checkbox: ({ id, label, ...delegated }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: ({ checked, ...props }: {
|
|
3
|
+
checked: "checked" | "default" | "unchecked";
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
label?: string | undefined;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
title: string;
|
|
8
|
+
tags: string[];
|
|
9
|
+
argTypes: {
|
|
10
|
+
checked: {
|
|
11
|
+
control: string;
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
disabled: {
|
|
15
|
+
control: string;
|
|
16
|
+
};
|
|
17
|
+
label: {
|
|
18
|
+
control: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
export declare const Playground: {
|
|
24
|
+
args: {
|
|
25
|
+
label: string;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
checked: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as RightMenu from "@radix-ui/react-context-menu";
|
|
2
|
+
export declare const ContextMenu: {
|
|
3
|
+
(props: RightMenu.ContextMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Trigger: {
|
|
5
|
+
(props: RightMenu.ContextMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
SubTrigger: {
|
|
9
|
+
({ children, ...props }: RightMenu.ContextMenuSubTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
Content: {
|
|
13
|
+
({ sub, children, showArrow, ...props }: ContextMenuContentProps | ContextMenuSubContentProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
Group: {
|
|
17
|
+
(props: RightMenu.ContextMenuGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
Sub: {
|
|
21
|
+
({ ...props }: RightMenu.ContextMenuGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
Item: {
|
|
25
|
+
({ ...props }: RightMenu.ContextMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type ArrowProps = {
|
|
30
|
+
showArrow?: boolean;
|
|
31
|
+
};
|
|
32
|
+
type ContextMenuContentProps = RightMenu.MenuContentProps & {
|
|
33
|
+
sub?: true;
|
|
34
|
+
} & ArrowProps;
|
|
35
|
+
type ContextMenuSubContentProps = RightMenu.MenuSubContentProps & {
|
|
36
|
+
sub?: never;
|
|
37
|
+
} & ArrowProps;
|
|
38
|
+
export default ContextMenu;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ContextMenuProps } from "@radix-ui/react-context-menu";
|
|
2
|
+
interface Props extends ContextMenuProps {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
showArrow?: boolean;
|
|
5
|
+
side: "top" | "right" | "left" | "bottom";
|
|
6
|
+
}
|
|
7
|
+
declare const _default: {
|
|
8
|
+
component: ({ showArrow, disabled, side, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
title: string;
|
|
10
|
+
tags: string[];
|
|
11
|
+
argTypes: {
|
|
12
|
+
disabled: {
|
|
13
|
+
control: string;
|
|
14
|
+
};
|
|
15
|
+
showArrow: {
|
|
16
|
+
control: string;
|
|
17
|
+
};
|
|
18
|
+
side: {
|
|
19
|
+
control: string;
|
|
20
|
+
options: string[];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
25
|
+
export declare const Playground: {
|
|
26
|
+
args: {
|
|
27
|
+
showArrow: boolean;
|
|
28
|
+
side: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
export declare const Dropdown: {
|
|
3
|
+
(props: DropdownMenu.DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Trigger: {
|
|
5
|
+
({ sub, ...props }: DropdownSubTriggerProps | DropdownTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
Content: {
|
|
9
|
+
({ sub, children, showArrow, ...props }: DropdownContentProps | DropdownSubContentProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
Group: {
|
|
13
|
+
(props: DropdownMenu.DropdownMenuGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
Sub: {
|
|
17
|
+
({ ...props }: DropdownMenu.DropdownMenuGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
Item: {
|
|
21
|
+
({ ...props }: DropdownMenu.DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
interface SubDropdownProps {
|
|
26
|
+
sub?: true;
|
|
27
|
+
}
|
|
28
|
+
interface MainDropdownProps {
|
|
29
|
+
sub?: never;
|
|
30
|
+
}
|
|
31
|
+
type DropdownSubTriggerProps = DropdownMenu.DropdownMenuSubTriggerProps & SubDropdownProps;
|
|
32
|
+
type DropdownTriggerProps = DropdownMenu.DropdownMenuTriggerProps & MainDropdownProps;
|
|
33
|
+
export type ArrowProps = {
|
|
34
|
+
showArrow?: boolean;
|
|
35
|
+
};
|
|
36
|
+
type DropdownContentProps = DropdownMenu.MenuContentProps & SubDropdownProps & ArrowProps;
|
|
37
|
+
type DropdownSubContentProps = DropdownMenu.MenuSubContentProps & MainDropdownProps & ArrowProps;
|
|
38
|
+
export default Dropdown;
|