sdaia-ui 1.0.1
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/README.md +89 -0
- package/dist/PlayVideoIcon-BM-4pwUd.d.cts +7 -0
- package/dist/PlayVideoIcon-BM-4pwUd.d.ts +7 -0
- package/dist/dga-icons.cjs +14 -0
- package/dist/dga-icons.cjs.map +1 -0
- package/dist/dga-icons.d.cts +1 -0
- package/dist/dga-icons.d.ts +1 -0
- package/dist/dga-icons.js +3 -0
- package/dist/dga-icons.js.map +1 -0
- package/dist/icons.cjs +4014 -0
- package/dist/icons.cjs.map +1 -0
- package/dist/icons.d.cts +756 -0
- package/dist/icons.d.ts +756 -0
- package/dist/icons.js +3871 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.cjs +43620 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +9407 -0
- package/dist/index.d.ts +9407 -0
- package/dist/index.js +43411 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +242 -0
- package/package.json +65 -0
- package/src/components/Accordion/Accordion.tsx +207 -0
- package/src/components/Accordion/Accordion.types.ts +36 -0
- package/src/components/Accordion/Accordion.variants.ts +283 -0
- package/src/components/Accordion/index.ts +9 -0
- package/src/components/ActionBar/ActionBar.tsx +192 -0
- package/src/components/ActionBar/ActionBar.types.ts +67 -0
- package/src/components/ActionBar/ActionBar.variants.ts +95 -0
- package/src/components/ActionBar/index.ts +8 -0
- package/src/components/Activity/Activity.tsx +52 -0
- package/src/components/Activity/Activity.types.ts +19 -0
- package/src/components/Activity/Activity.variants.ts +15 -0
- package/src/components/Activity/index.ts +2 -0
- package/src/components/ActivityItem/ActivityItem.tsx +298 -0
- package/src/components/ActivityItem/ActivityItem.types.ts +76 -0
- package/src/components/ActivityItem/ActivityItem.variants.ts +117 -0
- package/src/components/ActivityItem/index.ts +8 -0
- package/src/components/Alert/Alert.tsx +183 -0
- package/src/components/Alert/Alert.types.ts +34 -0
- package/src/components/Alert/Alert.variants.ts +168 -0
- package/src/components/Alert/index.ts +2 -0
- package/src/components/AreaChart/AreaChart.tsx +454 -0
- package/src/components/AreaChart/AreaChart.types.ts +117 -0
- package/src/components/AreaChart/AreaChart.variants.ts +202 -0
- package/src/components/AreaChart/index.ts +2 -0
- package/src/components/AspectRatio/AspectRatio.tsx +36 -0
- package/src/components/AspectRatio/AspectRatio.types.ts +33 -0
- package/src/components/AspectRatio/AspectRatio.variants.ts +42 -0
- package/src/components/AspectRatio/index.ts +2 -0
- package/src/components/AudioPlayer/AudioPlayer.tsx +294 -0
- package/src/components/AudioPlayer/AudioPlayer.types.ts +64 -0
- package/src/components/AudioPlayer/AudioPlayer.variants.ts +225 -0
- package/src/components/AudioPlayer/index.ts +2 -0
- package/src/components/Autocomplete/Autocomplete.tsx +353 -0
- package/src/components/Autocomplete/Autocomplete.types.ts +93 -0
- package/src/components/Autocomplete/Autocomplete.variants.ts +149 -0
- package/src/components/Autocomplete/index.ts +6 -0
- package/src/components/Avatar/Avatar.tsx +168 -0
- package/src/components/Avatar/Avatar.types.ts +36 -0
- package/src/components/Avatar/Avatar.variants.ts +102 -0
- package/src/components/Avatar/index.ts +7 -0
- package/src/components/AvatarGroup/AvatarGroup.tsx +87 -0
- package/src/components/AvatarGroup/AvatarGroup.types.ts +44 -0
- package/src/components/AvatarGroup/AvatarGroup.variants.ts +17 -0
- package/src/components/AvatarGroup/index.ts +6 -0
- package/src/components/Badge/Badge.tsx +74 -0
- package/src/components/Badge/Badge.types.ts +31 -0
- package/src/components/Badge/Badge.variants.ts +83 -0
- package/src/components/Badge/index.ts +2 -0
- package/src/components/Bar/Bar.tsx +57 -0
- package/src/components/Bar/Bar.types.ts +18 -0
- package/src/components/Bar/Bar.variants.ts +20 -0
- package/src/components/Bar/index.ts +2 -0
- package/src/components/BarChart/BarChart.tsx +179 -0
- package/src/components/BarChart/BarChart.types.ts +72 -0
- package/src/components/BarChart/BarChart.variants.ts +134 -0
- package/src/components/BarChart/index.ts +2 -0
- package/src/components/BarGroup/BarGroup.tsx +119 -0
- package/src/components/BarGroup/BarGroup.types.ts +50 -0
- package/src/components/BarGroup/BarGroup.variants.ts +76 -0
- package/src/components/BarGroup/index.ts +2 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +137 -0
- package/src/components/Breadcrumb/Breadcrumb.types.ts +21 -0
- package/src/components/Breadcrumb/BreadcrumbItem.tsx +267 -0
- package/src/components/Breadcrumb/BreadcrumbItem.types.ts +66 -0
- package/src/components/Breadcrumb/BreadcrumbItem.variants.ts +102 -0
- package/src/components/Breadcrumb/index.ts +12 -0
- package/src/components/Button/Button.tsx +100 -0
- package/src/components/Button/Button.types.ts +44 -0
- package/src/components/Button/Button.variants.ts +183 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/ButtonClose/ButtonClose.tsx +57 -0
- package/src/components/ButtonClose/ButtonClose.types.ts +18 -0
- package/src/components/ButtonClose/ButtonClose.variants.ts +72 -0
- package/src/components/ButtonClose/index.ts +2 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +127 -0
- package/src/components/ButtonGroup/ButtonGroup.types.ts +51 -0
- package/src/components/ButtonGroup/ButtonGroup.variants.ts +65 -0
- package/src/components/ButtonGroup/index.ts +2 -0
- package/src/components/ButtonMenu/ButtonMenu.tsx +73 -0
- package/src/components/ButtonMenu/ButtonMenu.types.ts +43 -0
- package/src/components/ButtonMenu/ButtonMenu.variants.ts +18 -0
- package/src/components/ButtonMenu/index.ts +2 -0
- package/src/components/ButtonSplit/ButtonSplit.tsx +344 -0
- package/src/components/ButtonSplit/ButtonSplit.types.ts +95 -0
- package/src/components/ButtonSplit/ButtonSplit.variants.ts +165 -0
- package/src/components/ButtonSplit/index.ts +7 -0
- package/src/components/ButtonsWithSdaiaTouch/ButtonHoverPattern.tsx +69 -0
- package/src/components/ButtonsWithSdaiaTouch/ButtonsWithSdaiaTouch.tsx +130 -0
- package/src/components/ButtonsWithSdaiaTouch/ButtonsWithSdaiaTouch.types.ts +4 -0
- package/src/components/ButtonsWithSdaiaTouch/ButtonsWithSdaiaTouch.variants.ts +19 -0
- package/src/components/ButtonsWithSdaiaTouch/index.ts +6 -0
- package/src/components/CLAUDE.md +212 -0
- package/src/components/CalendarHeader/CalendarHeader.tsx +224 -0
- package/src/components/CalendarHeader/CalendarHeader.types.ts +51 -0
- package/src/components/CalendarHeader/CalendarHeader.variants.ts +65 -0
- package/src/components/CalendarHeader/index.ts +2 -0
- package/src/components/Card/Card.tsx +76 -0
- package/src/components/Card/Card.types.ts +11 -0
- package/src/components/Card/Card.variants.ts +30 -0
- package/src/components/Card/index.ts +2 -0
- package/src/components/CardContent/CardContent.tsx +178 -0
- package/src/components/CardContent/CardContent.types.ts +70 -0
- package/src/components/CardContent/CardContent.variants.ts +90 -0
- package/src/components/CardContent/index.ts +6 -0
- package/src/components/CardFooter/CardFooter.tsx +196 -0
- package/src/components/CardFooter/CardFooter.types.ts +59 -0
- package/src/components/CardFooter/CardFooter.variants.ts +127 -0
- package/src/components/CardFooter/index.ts +8 -0
- package/src/components/CardHeader/CardHeader.tsx +150 -0
- package/src/components/CardHeader/CardHeader.types.ts +42 -0
- package/src/components/CardHeader/CardHeader.variants.ts +72 -0
- package/src/components/CardHeader/index.ts +5 -0
- package/src/components/CardLeadingItem/CardLeadingItem.tsx +166 -0
- package/src/components/CardLeadingItem/CardLeadingItem.types.ts +75 -0
- package/src/components/CardLeadingItem/CardLeadingItem.variants.ts +66 -0
- package/src/components/CardLeadingItem/index.ts +6 -0
- package/src/components/CardMedia/CardMedia.tsx +324 -0
- package/src/components/CardMedia/CardMedia.types.ts +114 -0
- package/src/components/CardMedia/CardMedia.variants.ts +139 -0
- package/src/components/CardMedia/index.ts +2 -0
- package/src/components/Carousel/Carousel.tsx +182 -0
- package/src/components/Carousel/Carousel.types.ts +38 -0
- package/src/components/Carousel/Carousel.variants.ts +17 -0
- package/src/components/Carousel/index.ts +2 -0
- package/src/components/CarouselArrow/CarouselArrow.tsx +66 -0
- package/src/components/CarouselArrow/CarouselArrow.types.ts +26 -0
- package/src/components/CarouselArrow/CarouselArrow.variants.ts +83 -0
- package/src/components/CarouselArrow/index.ts +7 -0
- package/src/components/CarouselControlsGroup/CarouselControlsGroup.tsx +81 -0
- package/src/components/CarouselControlsGroup/CarouselControlsGroup.types.ts +24 -0
- package/src/components/CarouselControlsGroup/CarouselControlsGroup.variants.ts +60 -0
- package/src/components/CarouselControlsGroup/index.ts +6 -0
- package/src/components/CarouselImage/CarouselImage.tsx +253 -0
- package/src/components/CarouselImage/CarouselImage.types.ts +72 -0
- package/src/components/CarouselImage/CarouselImage.variants.ts +43 -0
- package/src/components/CarouselImage/index.ts +6 -0
- package/src/components/Chart/Chart.tsx +3 -0
- package/src/components/Chart/Chart.types.ts +2 -0
- package/src/components/Chart/Chart.variants.ts +2 -0
- package/src/components/Chart/index.ts +2 -0
- package/src/components/ChartBadge/ChartBadge.tsx +62 -0
- package/src/components/ChartBadge/ChartBadge.types.ts +27 -0
- package/src/components/ChartBadge/ChartBadge.variants.ts +62 -0
- package/src/components/ChartBadge/index.ts +2 -0
- package/src/components/Checkbox/Checkbox.tsx +243 -0
- package/src/components/Checkbox/Checkbox.types.ts +20 -0
- package/src/components/Checkbox/index.ts +2 -0
- package/src/components/CheckboxLabel/CheckboxLabel.tsx +148 -0
- package/src/components/CheckboxLabel/CheckboxLabel.types.ts +55 -0
- package/src/components/CheckboxLabel/CheckboxLabel.variants.ts +35 -0
- package/src/components/CheckboxLabel/index.ts +2 -0
- package/src/components/Chip/Chip.tsx +245 -0
- package/src/components/Chip/Chip.types.ts +83 -0
- package/src/components/Chip/Chip.variants.ts +143 -0
- package/src/components/Chip/index.ts +2 -0
- package/src/components/CircularItem/CircularItem.tsx +133 -0
- package/src/components/CircularItem/CircularItem.types.ts +45 -0
- package/src/components/CircularItem/CircularItem.variants.ts +128 -0
- package/src/components/CircularItem/index.ts +7 -0
- package/src/components/CodeSnippet/CodeSnippet.tsx +421 -0
- package/src/components/CodeSnippet/CodeSnippet.types.ts +99 -0
- package/src/components/CodeSnippet/CodeSnippet.variants.ts +76 -0
- package/src/components/CodeSnippet/index.ts +9 -0
- package/src/components/ColumnChart/ColumnChart.tsx +943 -0
- package/src/components/ColumnChart/ColumnChart.types.ts +98 -0
- package/src/components/ColumnChart/ColumnChart.variants.ts +117 -0
- package/src/components/ColumnChart/index.ts +9 -0
- package/src/components/ComplexComposition/ComplexComposition.tsx +82 -0
- package/src/components/ComplexComposition/ComplexComposition.types.ts +3 -0
- package/src/components/ComplexComposition/ComplexComposition.variants.ts +14 -0
- package/src/components/ComplexComposition/index.ts +2 -0
- package/src/components/ContentSwitcher/ContentSwitcher.tsx +104 -0
- package/src/components/ContentSwitcher/ContentSwitcher.types.ts +28 -0
- package/src/components/ContentSwitcher/ContentSwitcher.variants.ts +70 -0
- package/src/components/ContentSwitcher/index.ts +6 -0
- package/src/components/ContentSwitcherItem/ContentSwitcherItem.tsx +56 -0
- package/src/components/ContentSwitcherItem/ContentSwitcherItem.types.ts +14 -0
- package/src/components/ContentSwitcherItem/ContentSwitcherItem.variants.ts +65 -0
- package/src/components/ContentSwitcherItem/index.ts +6 -0
- package/src/components/ContextMenu/ContextMenu.tsx +101 -0
- package/src/components/ContextMenu/ContextMenu.types.ts +64 -0
- package/src/components/ContextMenu/ContextMenu.variants.ts +36 -0
- package/src/components/ContextMenu/index.ts +7 -0
- package/src/components/ContextMenuDropdown/ContextMenuDropdown.tsx +370 -0
- package/src/components/ContextMenuDropdown/ContextMenuDropdown.types.ts +89 -0
- package/src/components/ContextMenuDropdown/ContextMenuDropdown.variants.ts +88 -0
- package/src/components/ContextMenuDropdown/index.ts +5 -0
- package/src/components/DateCell/DateCell.tsx +181 -0
- package/src/components/DateCell/DateCell.types.ts +53 -0
- package/src/components/DateCell/DateCell.variants.ts +217 -0
- package/src/components/DateCell/index.ts +2 -0
- package/src/components/DatePicker/DatePicker.tsx +923 -0
- package/src/components/DatePicker/DatePicker.types.ts +102 -0
- package/src/components/DatePicker/DatePicker.variants.ts +274 -0
- package/src/components/DatePicker/index.ts +9 -0
- package/src/components/DateTab/DateTab.tsx +91 -0
- package/src/components/DateTab/DateTab.types.ts +9 -0
- package/src/components/DateTab/DateTab.variants.ts +98 -0
- package/src/components/DateTab/index.ts +2 -0
- package/src/components/DgaIcon/DgaIcon.tsx +68 -0
- package/src/components/DgaIcon/DgaIcon.types.ts +57 -0
- package/src/components/DgaIcon/DgaIcon.variants.ts +41 -0
- package/src/components/DgaIcon/DgaIconByName.tsx +76 -0
- package/src/components/DgaIcon/generated/icon-names.ts +4388 -0
- package/src/components/DgaIcon/index.ts +12 -0
- package/src/components/DgaIcon/lib/decodeDataUrl.ts +46 -0
- package/src/components/DigitalStamp/DigitalStamp.tsx +236 -0
- package/src/components/DigitalStamp/DigitalStamp.types.ts +38 -0
- package/src/components/DigitalStamp/DigitalStamp.variants.ts +185 -0
- package/src/components/DigitalStamp/index.ts +2 -0
- package/src/components/Divider/Divider.tsx +83 -0
- package/src/components/Divider/Divider.types.ts +49 -0
- package/src/components/Divider/Divider.variants.ts +55 -0
- package/src/components/Divider/index.ts +8 -0
- package/src/components/DonutChart/DonutChart.tsx +251 -0
- package/src/components/DonutChart/DonutChart.types.ts +97 -0
- package/src/components/DonutChart/DonutChart.variants.ts +203 -0
- package/src/components/DonutChart/index.ts +7 -0
- package/src/components/DonutChartPanel/DonutChartPanel.tsx +778 -0
- package/src/components/DonutChartPanel/DonutChartPanel.types.ts +143 -0
- package/src/components/DonutChartPanel/DonutChartPanel.variants.ts +154 -0
- package/src/components/DonutChartPanel/index.ts +9 -0
- package/src/components/DraggableItem/DraggableItem.tsx +228 -0
- package/src/components/DraggableItem/DraggableItem.types.ts +72 -0
- package/src/components/DraggableItem/DraggableItem.variants.ts +149 -0
- package/src/components/DraggableItem/index.ts +3 -0
- package/src/components/DraggableList/DraggableList.tsx +20 -0
- package/src/components/DraggableList/DraggableList.types.ts +16 -0
- package/src/components/DraggableList/DraggableList.variants.ts +13 -0
- package/src/components/DraggableList/index.ts +3 -0
- package/src/components/Dropdown/Dropdown.tsx +331 -0
- package/src/components/Dropdown/Dropdown.types.ts +108 -0
- package/src/components/Dropdown/Dropdown.variants.ts +73 -0
- package/src/components/Dropdown/index.ts +9 -0
- package/src/components/DropdownListHeader/DropdownListHeader.tsx +79 -0
- package/src/components/DropdownListHeader/DropdownListHeader.types.ts +24 -0
- package/src/components/DropdownListHeader/DropdownListHeader.variants.ts +65 -0
- package/src/components/DropdownListHeader/index.ts +2 -0
- package/src/components/EmptyState/EmptyState.tsx +221 -0
- package/src/components/EmptyState/EmptyState.types.ts +48 -0
- package/src/components/EmptyState/EmptyState.variants.ts +122 -0
- package/src/components/EmptyState/index.ts +3 -0
- package/src/components/Extension/Extension.tsx +240 -0
- package/src/components/Extension/Extension.types.ts +40 -0
- package/src/components/Extension/Extension.variants.ts +27 -0
- package/src/components/Extension/index.ts +6 -0
- package/src/components/Feedback/Feedback.tsx +55 -0
- package/src/components/Feedback/Feedback.types.ts +15 -0
- package/src/components/Feedback/Feedback.variants.ts +9 -0
- package/src/components/Feedback/index.ts +2 -0
- package/src/components/FeedbackOverview/FeedbackOverview.tsx +70 -0
- package/src/components/FeedbackOverview/FeedbackOverview.types.ts +11 -0
- package/src/components/FeedbackOverview/FeedbackOverview.variants.ts +17 -0
- package/src/components/FeedbackOverview/index.ts +2 -0
- package/src/components/FeedbackReaction/FeedbackReaction.tsx +81 -0
- package/src/components/FeedbackReaction/FeedbackReaction.types.ts +14 -0
- package/src/components/FeedbackReaction/FeedbackReaction.variants.ts +39 -0
- package/src/components/FeedbackReaction/index.ts +2 -0
- package/src/components/FileUploadBase/FileUploadBase.tsx +104 -0
- package/src/components/FileUploadBase/FileUploadBase.types.ts +48 -0
- package/src/components/FileUploadBase/FileUploadBase.variants.ts +51 -0
- package/src/components/FileUploadBase/index.ts +2 -0
- package/src/components/FileUploadItemBase/FileUploadItemBase.tsx +197 -0
- package/src/components/FileUploadItemBase/FileUploadItemBase.types.ts +58 -0
- package/src/components/FileUploadItemBase/FileUploadItemBase.variants.ts +67 -0
- package/src/components/FileUploadItemBase/index.ts +6 -0
- package/src/components/FileUploader/FileUploader.tsx +164 -0
- package/src/components/FileUploader/FileUploader.types.ts +46 -0
- package/src/components/FileUploader/FileUploader.variants.ts +9 -0
- package/src/components/FileUploader/index.ts +2 -0
- package/src/components/Filtration/Filtration.tsx +260 -0
- package/src/components/Filtration/Filtration.types.ts +95 -0
- package/src/components/Filtration/Filtration.variants.ts +70 -0
- package/src/components/Filtration/index.ts +6 -0
- package/src/components/FiltrationItem/FiltrationItem.tsx +200 -0
- package/src/components/FiltrationItem/FiltrationItem.types.ts +57 -0
- package/src/components/FiltrationItem/FiltrationItem.variants.ts +81 -0
- package/src/components/FiltrationItem/index.ts +2 -0
- package/src/components/FiltrationList/FiltrationList.tsx +611 -0
- package/src/components/FiltrationList/FiltrationList.types.ts +191 -0
- package/src/components/FiltrationList/FiltrationList.variants.ts +283 -0
- package/src/components/FiltrationList/index.ts +16 -0
- package/src/components/FloatingButton/FloatingButton.tsx +89 -0
- package/src/components/FloatingButton/FloatingButton.types.ts +29 -0
- package/src/components/FloatingButton/FloatingButton.variants.ts +79 -0
- package/src/components/FloatingButton/index.ts +6 -0
- package/src/components/Footer/Footer.tsx +353 -0
- package/src/components/Footer/Footer.types.ts +142 -0
- package/src/components/Footer/Footer.variants.ts +137 -0
- package/src/components/Footer/index.ts +11 -0
- package/src/components/FooterItem/FooterItem.tsx +211 -0
- package/src/components/FooterItem/FooterItem.types.ts +45 -0
- package/src/components/FooterItem/FooterItem.variants.ts +139 -0
- package/src/components/FooterItem/index.ts +2 -0
- package/src/components/FooterLinkList/FooterLinkList.tsx +140 -0
- package/src/components/FooterLinkList/FooterLinkList.types.ts +46 -0
- package/src/components/FooterLinkList/FooterLinkList.variants.ts +64 -0
- package/src/components/FooterLinkList/index.ts +2 -0
- package/src/components/GraphBase/GraphBase.tsx +598 -0
- package/src/components/GraphBase/GraphBase.types.ts +101 -0
- package/src/components/GraphBase/GraphBase.variants.ts +126 -0
- package/src/components/GraphBase/index.ts +7 -0
- package/src/components/HeaderItem/HeaderItem.tsx +206 -0
- package/src/components/HeaderItem/HeaderItem.types.ts +73 -0
- package/src/components/HeaderItem/HeaderItem.variants.ts +139 -0
- package/src/components/HeaderItem/index.ts +2 -0
- package/src/components/HelpIcon/HelpIcon.tsx +173 -0
- package/src/components/HelpIcon/HelpIcon.types.ts +54 -0
- package/src/components/HelpIcon/HelpIcon.variants.ts +79 -0
- package/src/components/HelpIcon/index.ts +2 -0
- package/src/components/HorizontalTabs/HorizontalTabs.tsx +87 -0
- package/src/components/HorizontalTabs/HorizontalTabs.types.ts +41 -0
- package/src/components/HorizontalTabs/HorizontalTabs.variants.ts +54 -0
- package/src/components/HorizontalTabs/index.ts +6 -0
- package/src/components/IllustrationInstance/IllustrationInstance.tsx +46 -0
- package/src/components/IllustrationInstance/IllustrationInstance.types.ts +25 -0
- package/src/components/IllustrationInstance/IllustrationInstance.variants.ts +19 -0
- package/src/components/IllustrationInstance/index.ts +3 -0
- package/src/components/ImagePreview/ImagePreview.tsx +170 -0
- package/src/components/ImagePreview/ImagePreview.types.ts +54 -0
- package/src/components/ImagePreview/ImagePreview.variants.ts +39 -0
- package/src/components/ImagePreview/index.ts +2 -0
- package/src/components/Input/Input.tsx +113 -0
- package/src/components/Input/Input.types.ts +22 -0
- package/src/components/Input/index.ts +2 -0
- package/src/components/InputPrefixSuffix/InputPrefixSuffix.tsx +91 -0
- package/src/components/InputPrefixSuffix/InputPrefixSuffix.types.ts +81 -0
- package/src/components/InputPrefixSuffix/InputPrefixSuffix.variants.ts +128 -0
- package/src/components/InputPrefixSuffix/index.ts +8 -0
- package/src/components/InputsActions/InputsActions.tsx +53 -0
- package/src/components/InputsActions/InputsActions.types.ts +13 -0
- package/src/components/InputsActions/InputsActions.variants.ts +18 -0
- package/src/components/InputsActions/index.ts +2 -0
- package/src/components/InstanceColumn/InstanceColumn.tsx +43 -0
- package/src/components/InstanceColumn/InstanceColumn.types.ts +18 -0
- package/src/components/InstanceColumn/InstanceColumn.variants.ts +11 -0
- package/src/components/InstanceColumn/index.ts +2 -0
- package/src/components/InstanceItem/InstanceItem.tsx +33 -0
- package/src/components/InstanceItem/InstanceItem.types.ts +11 -0
- package/src/components/InstanceItem/InstanceItem.variants.ts +31 -0
- package/src/components/InstanceItem/index.ts +2 -0
- package/src/components/InstanceRows/InstanceRows.tsx +41 -0
- package/src/components/InstanceRows/InstanceRows.types.ts +17 -0
- package/src/components/InstanceRows/InstanceRows.variants.ts +10 -0
- package/src/components/InstanceRows/index.ts +2 -0
- package/src/components/InstanceSlot/InstanceSlot.tsx +25 -0
- package/src/components/InstanceSlot/InstanceSlot.types.ts +10 -0
- package/src/components/InstanceSlot/InstanceSlot.variants.ts +2 -0
- package/src/components/InstanceSlot/index.ts +2 -0
- package/src/components/LineChart/LineChart.tsx +592 -0
- package/src/components/LineChart/LineChart.types.ts +78 -0
- package/src/components/LineChart/LineChart.variants.ts +324 -0
- package/src/components/LineChart/index.ts +7 -0
- package/src/components/Link/Link.tsx +81 -0
- package/src/components/Link/Link.types.ts +23 -0
- package/src/components/Link/Link.variants.ts +69 -0
- package/src/components/Link/index.ts +2 -0
- package/src/components/List/List.tsx +260 -0
- package/src/components/List/List.types.ts +70 -0
- package/src/components/List/List.variants.ts +94 -0
- package/src/components/List/index.ts +5 -0
- package/src/components/ListGroup/ListGroup.tsx +37 -0
- package/src/components/ListGroup/ListGroup.types.ts +14 -0
- package/src/components/ListGroup/ListGroup.variants.ts +17 -0
- package/src/components/ListGroup/index.ts +3 -0
- package/src/components/LoadingIndicator/LoadingIndicator.tsx +208 -0
- package/src/components/LoadingIndicator/LoadingIndicator.types.ts +51 -0
- package/src/components/LoadingIndicator/LoadingIndicator.variants.ts +108 -0
- package/src/components/LoadingIndicator/index.ts +7 -0
- package/src/components/MediaGallery/MediaGallery.tsx +600 -0
- package/src/components/MediaGallery/MediaGallery.types.ts +124 -0
- package/src/components/MediaGallery/MediaGallery.variants.ts +116 -0
- package/src/components/MediaGallery/index.ts +2 -0
- package/src/components/MediaGrids/MediaGrids.tsx +48 -0
- package/src/components/MediaGrids/MediaGrids.types.ts +14 -0
- package/src/components/MediaGrids/MediaGrids.variants.ts +16 -0
- package/src/components/MediaGrids/index.ts +2 -0
- package/src/components/MediaViewer/MediaViewer.tsx +345 -0
- package/src/components/MediaViewer/MediaViewer.types.ts +59 -0
- package/src/components/MediaViewer/MediaViewer.variants.ts +168 -0
- package/src/components/MediaViewer/index.ts +2 -0
- package/src/components/Menu/Menu.tsx +109 -0
- package/src/components/Menu/Menu.types.ts +37 -0
- package/src/components/Menu/Menu.variants.ts +29 -0
- package/src/components/Menu/index.ts +2 -0
- package/src/components/MenuButtonItem/MenuButtonItem.tsx +280 -0
- package/src/components/MenuButtonItem/MenuButtonItem.types.ts +91 -0
- package/src/components/MenuButtonItem/MenuButtonItem.variants.ts +223 -0
- package/src/components/MenuButtonItem/index.ts +8 -0
- package/src/components/MenuItem/MenuItem.tsx +211 -0
- package/src/components/MenuItem/MenuItem.types.ts +40 -0
- package/src/components/MenuItem/MenuItem.variants.ts +48 -0
- package/src/components/MenuItem/index.ts +2 -0
- package/src/components/MenuItemGroup/MenuItemGroup.tsx +91 -0
- package/src/components/MenuItemGroup/MenuItemGroup.types.ts +82 -0
- package/src/components/MenuItemGroup/MenuItemGroup.variants.ts +33 -0
- package/src/components/MenuItemGroup/index.ts +2 -0
- package/src/components/MenuList/MenuList.tsx +44 -0
- package/src/components/MenuList/MenuList.types.ts +28 -0
- package/src/components/MenuList/MenuList.variants.ts +2 -0
- package/src/components/MenuList/index.ts +2 -0
- package/src/components/Metric/Metric.tsx +584 -0
- package/src/components/Metric/Metric.types.ts +77 -0
- package/src/components/Metric/Metric.variants.ts +175 -0
- package/src/components/Metric/index.ts +8 -0
- package/src/components/Modal/Modal.tsx +139 -0
- package/src/components/Modal/Modal.types.ts +55 -0
- package/src/components/Modal/index.ts +2 -0
- package/src/components/ModalActions/ModalActions.tsx +176 -0
- package/src/components/ModalActions/ModalActions.types.ts +31 -0
- package/src/components/ModalActions/index.ts +2 -0
- package/src/components/ModalHeader/ModalHeader.tsx +207 -0
- package/src/components/ModalHeader/ModalHeader.types.ts +24 -0
- package/src/components/ModalHeader/index.ts +2 -0
- package/src/components/NavBar/NavBar.tsx +326 -0
- package/src/components/NavBar/NavBar.types.ts +78 -0
- package/src/components/NavBar/NavBar.variants.ts +139 -0
- package/src/components/NavBar/index.ts +2 -0
- package/src/components/NavHeader/NavHeader.tsx +292 -0
- package/src/components/NavHeader/NavHeader.types.ts +145 -0
- package/src/components/NavHeader/NavHeader.variants.ts +178 -0
- package/src/components/NavHeader/index.ts +2 -0
- package/src/components/NavHeaderActions/NavHeaderActions.tsx +161 -0
- package/src/components/NavHeaderActions/NavHeaderActions.types.ts +61 -0
- package/src/components/NavHeaderActions/NavHeaderActions.variants.ts +58 -0
- package/src/components/NavHeaderActions/index.ts +2 -0
- package/src/components/NavHeaderDropdownItem/NavHeaderDropdownItem.tsx +243 -0
- package/src/components/NavHeaderDropdownItem/NavHeaderDropdownItem.types.ts +76 -0
- package/src/components/NavHeaderDropdownItem/NavHeaderDropdownItem.variants.ts +133 -0
- package/src/components/NavHeaderDropdownItem/index.ts +5 -0
- package/src/components/NavHeaderDropdownItemList/NavHeaderDropdownItemList.tsx +64 -0
- package/src/components/NavHeaderDropdownItemList/NavHeaderDropdownItemList.types.ts +55 -0
- package/src/components/NavHeaderDropdownItemList/NavHeaderDropdownItemList.variants.ts +47 -0
- package/src/components/NavHeaderDropdownItemList/index.ts +5 -0
- package/src/components/NavHeaderMenuButton/NavHeaderMenuButton.tsx +52 -0
- package/src/components/NavHeaderMenuButton/NavHeaderMenuButton.types.ts +17 -0
- package/src/components/NavHeaderMenuButton/NavHeaderMenuButton.variants.ts +73 -0
- package/src/components/NavHeaderMenuButton/index.ts +2 -0
- package/src/components/NavHeaderMenuCard/NavHeaderMenuCard.tsx +126 -0
- package/src/components/NavHeaderMenuCard/NavHeaderMenuCard.types.ts +74 -0
- package/src/components/NavHeaderMenuCard/NavHeaderMenuCard.variants.ts +169 -0
- package/src/components/NavHeaderMenuCard/index.ts +6 -0
- package/src/components/NavHeaderMenuItem/NavHeaderMenuItem.tsx +164 -0
- package/src/components/NavHeaderMenuItem/NavHeaderMenuItem.types.ts +64 -0
- package/src/components/NavHeaderMenuItem/NavHeaderMenuItem.variants.ts +175 -0
- package/src/components/NavHeaderMenuItem/index.ts +2 -0
- package/src/components/NavItem/NavItem.tsx +210 -0
- package/src/components/NavItem/NavItem.types.ts +71 -0
- package/src/components/NavItem/NavItem.variants.ts +61 -0
- package/src/components/NavItem/index.ts +2 -0
- package/src/components/NavLabel/NavLabel.tsx +84 -0
- package/src/components/NavLabel/NavLabel.types.ts +55 -0
- package/src/components/NavLabel/NavLabel.variants.ts +68 -0
- package/src/components/NavLabel/index.ts +2 -0
- package/src/components/NavLogoPlaceholder/NavLogoPlaceholder.tsx +101 -0
- package/src/components/NavLogoPlaceholder/NavLogoPlaceholder.types.ts +27 -0
- package/src/components/NavLogoPlaceholder/NavLogoPlaceholder.variants.ts +42 -0
- package/src/components/NavLogoPlaceholder/index.ts +6 -0
- package/src/components/NotificationBanner/NotificationBanner.tsx +256 -0
- package/src/components/NotificationBanner/NotificationBanner.types.ts +77 -0
- package/src/components/NotificationBanner/NotificationBanner.variants.ts +109 -0
- package/src/components/NotificationBanner/index.ts +7 -0
- package/src/components/NotificationPopup/NotificationPopup.tsx +147 -0
- package/src/components/NotificationPopup/NotificationPopup.types.ts +51 -0
- package/src/components/NotificationPopup/NotificationPopup.variants.ts +145 -0
- package/src/components/NotificationPopup/index.ts +5 -0
- package/src/components/Notifications/Notifications.tsx +209 -0
- package/src/components/Notifications/Notifications.types.ts +68 -0
- package/src/components/Notifications/Notifications.variants.ts +89 -0
- package/src/components/Notifications/index.ts +2 -0
- package/src/components/Number/Number.tsx +497 -0
- package/src/components/Number/Number.types.ts +58 -0
- package/src/components/Number/Number.variants.ts +94 -0
- package/src/components/Number/index.ts +2 -0
- package/src/components/NumberInput/NumberInput.tsx +265 -0
- package/src/components/NumberInput/NumberInput.types.ts +110 -0
- package/src/components/NumberInput/NumberInput.variants.ts +205 -0
- package/src/components/NumberInput/index.ts +6 -0
- package/src/components/Pagination/Pagination.tsx +393 -0
- package/src/components/Pagination/Pagination.types.ts +26 -0
- package/src/components/Pagination/Pagination.variants.ts +88 -0
- package/src/components/Pagination/index.ts +3 -0
- package/src/components/PaginationButtonGroup/PaginationButtonGroup.tsx +132 -0
- package/src/components/PaginationButtonGroup/PaginationButtonGroup.types.ts +20 -0
- package/src/components/PaginationButtonGroup/PaginationButtonGroup.variants.ts +45 -0
- package/src/components/PaginationButtonGroup/index.ts +8 -0
- package/src/components/PaginationCells/PaginationCells.tsx +105 -0
- package/src/components/PaginationCells/PaginationCells.types.ts +31 -0
- package/src/components/PaginationCells/PaginationCells.variants.ts +96 -0
- package/src/components/PaginationCells/index.ts +9 -0
- package/src/components/PdfViewer/PdfViewer.tsx +265 -0
- package/src/components/PdfViewer/PdfViewer.types.ts +79 -0
- package/src/components/PdfViewer/PdfViewer.variants.ts +105 -0
- package/src/components/PdfViewer/index.ts +3 -0
- package/src/components/PieChartPanel/PieChartPanel.tsx +889 -0
- package/src/components/PieChartPanel/PieChartPanel.types.ts +130 -0
- package/src/components/PieChartPanel/PieChartPanel.variants.ts +156 -0
- package/src/components/PieChartPanel/index.ts +8 -0
- package/src/components/Popover/Popover.tsx +398 -0
- package/src/components/Popover/Popover.types.ts +155 -0
- package/src/components/Popover/Popover.variants.ts +147 -0
- package/src/components/Popover/index.ts +7 -0
- package/src/components/ProgressBar/ProgressBar.tsx +241 -0
- package/src/components/ProgressBar/ProgressBar.types.ts +22 -0
- package/src/components/ProgressBar/ProgressBar.variants.ts +54 -0
- package/src/components/ProgressBar/index.ts +2 -0
- package/src/components/ProgressCircle/ProgressCircle.tsx +369 -0
- package/src/components/ProgressCircle/ProgressCircle.types.ts +26 -0
- package/src/components/ProgressCircle/ProgressCircle.variants.ts +88 -0
- package/src/components/ProgressCircle/index.ts +7 -0
- package/src/components/Quote/Quote.tsx +210 -0
- package/src/components/Quote/Quote.types.ts +73 -0
- package/src/components/Quote/Quote.variants.ts +106 -0
- package/src/components/Quote/index.ts +2 -0
- package/src/components/RadialStepper/RadialStepper.tsx +166 -0
- package/src/components/RadialStepper/RadialStepper.types.ts +77 -0
- package/src/components/RadialStepper/RadialStepper.variants.ts +122 -0
- package/src/components/RadialStepper/index.ts +7 -0
- package/src/components/RadioButton/RadioButton.tsx +237 -0
- package/src/components/RadioButton/RadioButton.types.ts +18 -0
- package/src/components/RadioButton/index.ts +2 -0
- package/src/components/RadioLabel/RadioLabel.tsx +157 -0
- package/src/components/RadioLabel/RadioLabel.types.ts +53 -0
- package/src/components/RadioLabel/RadioLabel.variants.ts +36 -0
- package/src/components/RadioLabel/index.ts +2 -0
- package/src/components/RangeSlider/RangeSlider.tsx +389 -0
- package/src/components/RangeSlider/RangeSlider.types.ts +38 -0
- package/src/components/RangeSlider/RangeSlider.variants.ts +27 -0
- package/src/components/RangeSlider/index.ts +2 -0
- package/src/components/Rating/Rating.tsx +246 -0
- package/src/components/Rating/Rating.types.ts +37 -0
- package/src/components/Rating/Rating.variants.ts +52 -0
- package/src/components/Rating/index.ts +8 -0
- package/src/components/RatingOverview/RatingOverview.tsx +170 -0
- package/src/components/RatingOverview/RatingOverview.types.ts +37 -0
- package/src/components/RatingOverview/RatingOverview.variants.ts +50 -0
- package/src/components/RatingOverview/index.ts +2 -0
- package/src/components/RatingStar/RatingStar.tsx +76 -0
- package/src/components/RatingStar/RatingStar.types.ts +18 -0
- package/src/components/RatingStar/RatingStar.variants.ts +34 -0
- package/src/components/RatingStar/index.ts +7 -0
- package/src/components/RichTextEditor/RichTextEditor.tsx +1341 -0
- package/src/components/RichTextEditor/RichTextEditor.types.ts +127 -0
- package/src/components/RichTextEditor/RichTextEditor.variants.ts +231 -0
- package/src/components/RichTextEditor/index.ts +6 -0
- package/src/components/ScatterChart/ScatterChart.tsx +164 -0
- package/src/components/ScatterChart/ScatterChart.types.ts +42 -0
- package/src/components/ScatterChart/ScatterChart.variants.ts +162 -0
- package/src/components/ScatterChart/index.ts +2 -0
- package/src/components/SdaiaLogoAnimation/BGSVG.tsx +216 -0
- package/src/components/SdaiaLogoAnimation/SdaiaLogoAnimation.tsx +120 -0
- package/src/components/SdaiaLogoAnimation/SdaiaLogoAnimation.types.ts +13 -0
- package/src/components/SdaiaLogoAnimation/SdaiaLogoAnimation.variants.ts +22 -0
- package/src/components/SdaiaLogoAnimation/index.ts +2 -0
- package/src/components/SdaiaTouch2dAnimation/SdaiaTouch2dAnimation.tsx +55 -0
- package/src/components/SdaiaTouch2dAnimation/SdaiaTouch2dAnimation.types.ts +12 -0
- package/src/components/SdaiaTouch2dAnimation/SdaiaTouch2dAnimation.variants.ts +28 -0
- package/src/components/SdaiaTouch2dAnimation/Star.tsx +82 -0
- package/src/components/SdaiaTouch2dAnimation/StarShape.tsx +78 -0
- package/src/components/SdaiaTouch2dAnimation/index.ts +6 -0
- package/src/components/SecondNavHeader/SecondNavHeader.tsx +80 -0
- package/src/components/SecondNavHeader/SecondNavHeader.types.ts +41 -0
- package/src/components/SecondNavHeader/SecondNavHeader.variants.ts +42 -0
- package/src/components/SecondNavHeader/index.ts +2 -0
- package/src/components/Select/Select.tsx +351 -0
- package/src/components/Select/Select.types.ts +102 -0
- package/src/components/Select/Select.variants.ts +111 -0
- package/src/components/Select/index.ts +2 -0
- package/src/components/SelectMenuItem/SelectMenuItem.tsx +132 -0
- package/src/components/SelectMenuItem/SelectMenuItem.types.ts +47 -0
- package/src/components/SelectMenuItem/SelectMenuItem.variants.ts +56 -0
- package/src/components/SelectMenuItem/index.ts +2 -0
- package/src/components/SeriesLabel/SeriesLabel.tsx +76 -0
- package/src/components/SeriesLabel/SeriesLabel.types.ts +27 -0
- package/src/components/SeriesLabel/SeriesLabel.variants.ts +84 -0
- package/src/components/SeriesLabel/index.ts +2 -0
- package/src/components/Signature/Signature.tsx +905 -0
- package/src/components/Signature/Signature.types.ts +68 -0
- package/src/components/Signature/Signature.variants.ts +115 -0
- package/src/components/Signature/index.ts +2 -0
- package/src/components/Skeleton/Skeleton.tsx +21 -0
- package/src/components/Skeleton/Skeleton.types.ts +15 -0
- package/src/components/Skeleton/Skeleton.variants.ts +14 -0
- package/src/components/Skeleton/index.ts +2 -0
- package/src/components/SkeletonAvatar/SkeletonAvatar.tsx +21 -0
- package/src/components/SkeletonAvatar/SkeletonAvatar.types.ts +15 -0
- package/src/components/SkeletonAvatar/SkeletonAvatar.variants.ts +14 -0
- package/src/components/SkeletonAvatar/index.ts +2 -0
- package/src/components/SlideoutMenu/SlideoutMenu.tsx +225 -0
- package/src/components/SlideoutMenu/SlideoutMenu.types.ts +39 -0
- package/src/components/SlideoutMenu/SlideoutMenuDivider.tsx +10 -0
- package/src/components/SlideoutMenu/SlideoutMenuSection.tsx +39 -0
- package/src/components/SlideoutMenu/index.ts +5 -0
- package/src/components/SlideoutMenuFooter/SlideoutMenuFooter.tsx +96 -0
- package/src/components/SlideoutMenuFooter/SlideoutMenuFooter.types.ts +28 -0
- package/src/components/SlideoutMenuFooter/SlideoutMenuFooter.variants.ts +49 -0
- package/src/components/SlideoutMenuFooter/index.ts +6 -0
- package/src/components/SlideoutMenuHeader/SlideoutMenuHeader.tsx +83 -0
- package/src/components/SlideoutMenuHeader/SlideoutMenuHeader.types.ts +19 -0
- package/src/components/SlideoutMenuHeader/SlideoutMenuHeader.variants.ts +78 -0
- package/src/components/SlideoutMenuHeader/index.ts +2 -0
- package/src/components/Slider/Slider.tsx +259 -0
- package/src/components/Slider/Slider.types.ts +22 -0
- package/src/components/Slider/Slider.variants.ts +23 -0
- package/src/components/Slider/index.ts +2 -0
- package/src/components/Sparkline/Sparkline.tsx +130 -0
- package/src/components/Sparkline/Sparkline.types.ts +36 -0
- package/src/components/Sparkline/Sparkline.variants.ts +118 -0
- package/src/components/Sparkline/index.ts +2 -0
- package/src/components/StatusDot/StatusDot.tsx +82 -0
- package/src/components/StatusDot/StatusDot.types.ts +35 -0
- package/src/components/StatusDot/StatusDot.variants.ts +66 -0
- package/src/components/StatusDot/index.ts +8 -0
- package/src/components/StructuredList/StructuredList.tsx +79 -0
- package/src/components/StructuredList/StructuredList.types.ts +27 -0
- package/src/components/StructuredList/index.ts +2 -0
- package/src/components/StructuredListGroup/StructuredListGroup.tsx +76 -0
- package/src/components/StructuredListGroup/StructuredListGroup.types.ts +27 -0
- package/src/components/StructuredListGroup/StructuredListGroup.variants.ts +14 -0
- package/src/components/StructuredListGroup/index.ts +5 -0
- package/src/components/StructuredListHeader/StructuredListHeader.tsx +98 -0
- package/src/components/StructuredListHeader/StructuredListHeader.types.ts +26 -0
- package/src/components/StructuredListHeader/StructuredListHeader.variants.ts +24 -0
- package/src/components/StructuredListHeader/index.ts +5 -0
- package/src/components/StructuredListRow/StructuredListRow.tsx +144 -0
- package/src/components/StructuredListRow/StructuredListRow.types.ts +37 -0
- package/src/components/StructuredListRow/StructuredListRow.variants.ts +53 -0
- package/src/components/StructuredListRow/index.ts +6 -0
- package/src/components/SubHeaderItem/SubHeaderItem.tsx +37 -0
- package/src/components/SubHeaderItem/SubHeaderItem.types.ts +20 -0
- package/src/components/SubHeaderItem/SubHeaderItem.variants.ts +23 -0
- package/src/components/SubHeaderItem/index.ts +2 -0
- package/src/components/Switch/Switch.tsx +138 -0
- package/src/components/Switch/Switch.types.ts +18 -0
- package/src/components/Switch/Switch.variants.ts +49 -0
- package/src/components/Switch/index.ts +2 -0
- package/src/components/SwitchLabel/SwitchLabel.tsx +114 -0
- package/src/components/SwitchLabel/SwitchLabel.types.ts +27 -0
- package/src/components/SwitchLabel/SwitchLabel.variants.ts +28 -0
- package/src/components/SwitchLabel/index.ts +2 -0
- package/src/components/Tab/Tab.tsx +92 -0
- package/src/components/Tab/Tab.types.ts +34 -0
- package/src/components/Tab/Tab.variants.ts +79 -0
- package/src/components/Tab/index.ts +2 -0
- package/src/components/Table/Table.tsx +353 -0
- package/src/components/Table/Table.types.ts +80 -0
- package/src/components/Table/Table.variants.ts +110 -0
- package/src/components/Table/index.ts +10 -0
- package/src/components/TableOfContent/TableOfContent.tsx +33 -0
- package/src/components/TableOfContent/TableOfContent.types.ts +15 -0
- package/src/components/TableOfContent/TableOfContent.variants.ts +27 -0
- package/src/components/TableOfContent/index.ts +2 -0
- package/src/components/TableOfContentItem/TableOfContentItem.tsx +85 -0
- package/src/components/TableOfContentItem/TableOfContentItem.types.ts +23 -0
- package/src/components/TableOfContentItem/TableOfContentItem.variants.ts +109 -0
- package/src/components/TableOfContentItem/index.ts +2 -0
- package/src/components/TableOfContentList/TableOfContentList.tsx +60 -0
- package/src/components/TableOfContentList/TableOfContentList.types.ts +39 -0
- package/src/components/TableOfContentList/TableOfContentList.variants.ts +6 -0
- package/src/components/TableOfContentList/index.ts +2 -0
- package/src/components/Tabs/Tabs.tsx +80 -0
- package/src/components/Tabs/Tabs.types.ts +36 -0
- package/src/components/Tabs/Tabs.variants.ts +23 -0
- package/src/components/Tabs/index.ts +2 -0
- package/src/components/Tag/Tag.tsx +114 -0
- package/src/components/Tag/Tag.types.ts +32 -0
- package/src/components/Tag/Tag.variants.ts +57 -0
- package/src/components/Tag/index.ts +2 -0
- package/src/components/TagCount/TagCount.tsx +45 -0
- package/src/components/TagCount/TagCount.types.ts +21 -0
- package/src/components/TagCount/TagCount.variants.ts +26 -0
- package/src/components/TagCount/index.ts +7 -0
- package/src/components/TextArea/TextArea.tsx +130 -0
- package/src/components/TextArea/TextArea.types.ts +20 -0
- package/src/components/TextArea/index.ts +2 -0
- package/src/components/TextInput/TextInput.tsx +568 -0
- package/src/components/TextInput/TextInput.types.ts +87 -0
- package/src/components/TextInput/TextInput.variants.ts +89 -0
- package/src/components/TextInput/TextInputTag.tsx +43 -0
- package/src/components/TextInput/TextInputTag.types.ts +14 -0
- package/src/components/TextInput/index.ts +4 -0
- package/src/components/Tooltip/Tooltip.tsx +229 -0
- package/src/components/Tooltip/Tooltip.types.ts +48 -0
- package/src/components/Tooltip/Tooltip.variants.ts +141 -0
- package/src/components/Tooltip/index.ts +10 -0
- package/src/components/TreeView/TreeView.tsx +130 -0
- package/src/components/TreeView/TreeView.types.ts +42 -0
- package/src/components/TreeView/TreeView.variants.ts +6 -0
- package/src/components/TreeView/index.ts +3 -0
- package/src/components/TreeViewItem/TreeViewItem.tsx +108 -0
- package/src/components/TreeViewItem/TreeViewItem.types.ts +34 -0
- package/src/components/TreeViewItem/TreeViewItem.variants.ts +40 -0
- package/src/components/TreeViewItem/index.ts +3 -0
- package/src/components/VerticalTabs/VerticalTabs.tsx +84 -0
- package/src/components/VerticalTabs/VerticalTabs.types.ts +37 -0
- package/src/components/VerticalTabs/VerticalTabs.variants.ts +43 -0
- package/src/components/VerticalTabs/index.ts +6 -0
- package/src/components/VideoPlayer/VideoPlayer.tsx +470 -0
- package/src/components/VideoPlayer/VideoPlayer.types.ts +59 -0
- package/src/components/VideoPlayer/VideoPlayer.variants.ts +134 -0
- package/src/components/VideoPlayer/index.ts +2 -0
- package/src/components/XAxis/XAxis.tsx +67 -0
- package/src/components/XAxis/XAxis.types.ts +30 -0
- package/src/components/XAxis/XAxis.variants.ts +77 -0
- package/src/components/XAxis/index.ts +2 -0
- package/src/components/YAxis/YAxis.tsx +78 -0
- package/src/components/YAxis/YAxis.types.ts +41 -0
- package/src/components/YAxis/YAxis.variants.ts +94 -0
- package/src/components/YAxis/index.ts +2 -0
- package/src/dga-icons.ts +18 -0
- package/src/hooks/usePresence.ts +73 -0
- package/src/icons/AIIcon.tsx +34 -0
- package/src/icons/AaIcon.tsx +34 -0
- package/src/icons/AlertCircle02Icon.tsx +28 -0
- package/src/icons/AlertCircleIcon.tsx +29 -0
- package/src/icons/AlertCircleSVG.tsx +19 -0
- package/src/icons/AlertCircleWarningIcon.tsx +37 -0
- package/src/icons/AlertTriangleIcon.tsx +27 -0
- package/src/icons/AlignCenterIcon.tsx +31 -0
- package/src/icons/AlignLeftIcon.tsx +31 -0
- package/src/icons/AlignRightIcon.tsx +31 -0
- package/src/icons/ArrowDownIcon.tsx +27 -0
- package/src/icons/ArrowDownLeft01Icon.tsx +32 -0
- package/src/icons/ArrowDownSVG.tsx +16 -0
- package/src/icons/ArrowIcon.tsx +38 -0
- package/src/icons/ArrowLeft01Icon.tsx +23 -0
- package/src/icons/ArrowLeft02SVG.tsx +19 -0
- package/src/icons/ArrowLeftIcon.tsx +28 -0
- package/src/icons/ArrowRight01Icon.tsx +23 -0
- package/src/icons/ArrowRight01SVG.tsx +16 -0
- package/src/icons/ArrowRightIcon.tsx +28 -0
- package/src/icons/ArrowUpIcon.tsx +27 -0
- package/src/icons/ArrowUpRight01Icon.tsx +31 -0
- package/src/icons/ArrowUpSVG.tsx +16 -0
- package/src/icons/AtIcon.tsx +33 -0
- package/src/icons/BeakBottom.tsx +13 -0
- package/src/icons/BeakDown.tsx +29 -0
- package/src/icons/BeakLeft.tsx +13 -0
- package/src/icons/BeakRight.tsx +11 -0
- package/src/icons/BeakTop.tsx +13 -0
- package/src/icons/BeakUp.tsx +23 -0
- package/src/icons/BellCircleIcon.tsx +33 -0
- package/src/icons/BellIcon.tsx +27 -0
- package/src/icons/BoldIcon.tsx +33 -0
- package/src/icons/CalendarIcon.tsx +35 -0
- package/src/icons/ChartsIcon.tsx +25 -0
- package/src/icons/CheckCircleIcon.tsx +29 -0
- package/src/icons/ChevronDownIcon.tsx +30 -0
- package/src/icons/ChevronDownSmIcon.tsx +34 -0
- package/src/icons/ChevronLeftIcon.tsx +20 -0
- package/src/icons/ChevronRightIcon.tsx +36 -0
- package/src/icons/ClearIcon.tsx +34 -0
- package/src/icons/ClockIcon.tsx +34 -0
- package/src/icons/CloseIcon.tsx +29 -0
- package/src/icons/CloudUploadIcon.tsx +21 -0
- package/src/icons/CodeSnippetChevronDownIcon.tsx +25 -0
- package/src/icons/CodeSnippetCopyIcon.tsx +24 -0
- package/src/icons/CodeSnippetStarIcon.tsx +25 -0
- package/src/icons/ColorSquareIcon.tsx +42 -0
- package/src/icons/ComponentsIcon.tsx +25 -0
- package/src/icons/DGALogoSVG.tsx +133 -0
- package/src/icons/DeleteIcon.tsx +24 -0
- package/src/icons/DownloadIcon.tsx +29 -0
- package/src/icons/DragHandleVerticalIcon.tsx +23 -0
- package/src/icons/FeedbackEmojiDislikeIcon.tsx +20 -0
- package/src/icons/FeedbackEmojiLikeIcon.tsx +20 -0
- package/src/icons/FeedbackEmojiNeutralIcon.tsx +20 -0
- package/src/icons/FeedbackThumbDislikeFilledIcon.tsx +26 -0
- package/src/icons/FeedbackThumbDislikeIcon.tsx +20 -0
- package/src/icons/FeedbackThumbLikeFilledIcon.tsx +20 -0
- package/src/icons/FeedbackThumbLikeIcon.tsx +20 -0
- package/src/icons/FileUploadItemCloseIcon.tsx +30 -0
- package/src/icons/FileUploadItemEmptyFileIcon.tsx +27 -0
- package/src/icons/FileUploadItemPdfIcon.tsx +52 -0
- package/src/icons/FilterFunnelIcon.tsx +34 -0
- package/src/icons/FilterIcon.tsx +31 -0
- package/src/icons/FitIcon.tsx +22 -0
- package/src/icons/FolderFilledIcon.tsx +25 -0
- package/src/icons/FolderIcon.tsx +28 -0
- package/src/icons/FoundationsIcon.tsx +25 -0
- package/src/icons/FullscreenExitIcon.tsx +71 -0
- package/src/icons/FullscreenIcon.tsx +70 -0
- package/src/icons/GoBackward10Icon.tsx +27 -0
- package/src/icons/GoForward10Icon.tsx +27 -0
- package/src/icons/GridSquaresIcon.tsx +40 -0
- package/src/icons/HamburgerIcon.tsx +28 -0
- package/src/icons/HelpCircleIcon.tsx +28 -0
- package/src/icons/HomeIcon.tsx +22 -0
- package/src/icons/HomeSVG.tsx +32 -0
- package/src/icons/IconFactory.ts +157 -0
- package/src/icons/Image01SVG.tsx +18 -0
- package/src/icons/ImageIcon.tsx +31 -0
- package/src/icons/InfoCircleIcon.tsx +31 -0
- package/src/icons/InfoCircleSVG.tsx +20 -0
- package/src/icons/InfoIcon.tsx +27 -0
- package/src/icons/ItalicIcon.tsx +31 -0
- package/src/icons/LearnMoreArrowIcon.tsx +22 -0
- package/src/icons/LinkCircleSVG.tsx +58 -0
- package/src/icons/LinkIcon.tsx +33 -0
- package/src/icons/ListLinesIcon.tsx +40 -0
- package/src/icons/LockCircleSVG.tsx +60 -0
- package/src/icons/LockIcon.tsx +36 -0
- package/src/icons/Logout02Icon.tsx +19 -0
- package/src/icons/MicrophoneIcon.tsx +20 -0
- package/src/icons/MinusIcon.tsx +40 -0
- package/src/icons/MoreHorizontalIcon.tsx +24 -0
- package/src/icons/MoreVerticalIcon.tsx +40 -0
- package/src/icons/NextIcon.tsx +44 -0
- package/src/icons/PDFSvg.tsx +39 -0
- package/src/icons/PatternsIcon.tsx +21 -0
- package/src/icons/PauseIcon.tsx +30 -0
- package/src/icons/PencilIcon.tsx +36 -0
- package/src/icons/PlayButtonCardIcon.tsx +41 -0
- package/src/icons/PlayCenterIcon.tsx +45 -0
- package/src/icons/PlayIcon.tsx +27 -0
- package/src/icons/PlayIconSolid.tsx +33 -0
- package/src/icons/PlayIconStroke.tsx +22 -0
- package/src/icons/PlayIconTwotone.tsx +36 -0
- package/src/icons/PlayVideoIcon.tsx +31 -0
- package/src/icons/PlusCircleIcon.tsx +41 -0
- package/src/icons/PlusIcon.tsx +43 -0
- package/src/icons/PreviousIcon.tsx +44 -0
- package/src/icons/PrintIcon.tsx +25 -0
- package/src/icons/QuestionMarkGrayBgIcon.tsx +52 -0
- package/src/icons/QuestionMarkIcon.tsx +47 -0
- package/src/icons/RedoIcon.tsx +41 -0
- package/src/icons/SaudiFlagSVG.tsx +31 -0
- package/src/icons/SdaiaNavLogo.tsx +345 -0
- package/src/icons/SearchIcon.tsx +34 -0
- package/src/icons/SettingsIcon.tsx +25 -0
- package/src/icons/ShareIcon.tsx +26 -0
- package/src/icons/SidebarCollapseIcon.tsx +25 -0
- package/src/icons/SmileIcon.tsx +34 -0
- package/src/icons/SortIcon.tsx +20 -0
- package/src/icons/StarIcon.tsx +38 -0
- package/src/icons/StatusBadgeIcon.tsx +19 -0
- package/src/icons/TextTIcon.tsx +33 -0
- package/src/icons/Tick02Icon.tsx +32 -0
- package/src/icons/TickIcon.tsx +33 -0
- package/src/icons/TrashIcon.tsx +44 -0
- package/src/icons/UnderlineIcon.tsx +31 -0
- package/src/icons/UndoIcon.tsx +31 -0
- package/src/icons/UploadArrowIcon.tsx +40 -0
- package/src/icons/UserIcon.tsx +21 -0
- package/src/icons/VolumeHighIcon.tsx +27 -0
- package/src/icons/VolumeMuteIcon.tsx +53 -0
- package/src/icons/XCircleIcon.tsx +32 -0
- package/src/icons/XIcon.tsx +27 -0
- package/src/icons/XIconSVG.tsx +16 -0
- package/src/icons/XSmallIcon.tsx +29 -0
- package/src/icons/XSvg.tsx +18 -0
- package/src/icons/ZoomInIcon.tsx +25 -0
- package/src/icons/index.ts +5 -0
- package/src/index.ts +699 -0
- package/src/lib/cn.ts +42 -0
- package/src/styles/motion.css +120 -0
- package/src/styles.css +242 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useCallback, useRef, useState, type DragEvent } from 'react';
|
|
4
|
+
import { cn } from '../../lib/cn';
|
|
5
|
+
import { FileUploadBase } from '../FileUploadBase';
|
|
6
|
+
import { FileUploadItemBase } from '../FileUploadItemBase';
|
|
7
|
+
import type { FileUploaderProps } from './FileUploader.types';
|
|
8
|
+
import { FILE_LIST, ROOT } from './FileUploader.variants';
|
|
9
|
+
|
|
10
|
+
export const FileUploader = forwardRef<HTMLDivElement, FileUploaderProps>(
|
|
11
|
+
function FileUploader(
|
|
12
|
+
{
|
|
13
|
+
dropZone,
|
|
14
|
+
files,
|
|
15
|
+
listFooter,
|
|
16
|
+
onFilesDropped,
|
|
17
|
+
onRemoveFile,
|
|
18
|
+
onRetryFile,
|
|
19
|
+
retryLabel = 'Try again',
|
|
20
|
+
disabled = false,
|
|
21
|
+
dir: dirProp,
|
|
22
|
+
rtl = false,
|
|
23
|
+
className,
|
|
24
|
+
...rest
|
|
25
|
+
},
|
|
26
|
+
ref,
|
|
27
|
+
) {
|
|
28
|
+
const dragDepth = useRef(0);
|
|
29
|
+
const [dragActive, setDragActive] = useState(false);
|
|
30
|
+
|
|
31
|
+
const dir = dirProp ?? (rtl ? 'rtl' : undefined);
|
|
32
|
+
|
|
33
|
+
const handleDragEnter = useCallback(
|
|
34
|
+
(e: DragEvent<HTMLDivElement>) => {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
e.stopPropagation();
|
|
37
|
+
if (disabled) return;
|
|
38
|
+
dragDepth.current += 1;
|
|
39
|
+
if (e.dataTransfer.types.includes('Files')) setDragActive(true);
|
|
40
|
+
},
|
|
41
|
+
[disabled],
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const handleDragLeave = useCallback((e: DragEvent<HTMLDivElement>) => {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
dragDepth.current -= 1;
|
|
48
|
+
if (dragDepth.current <= 0) {
|
|
49
|
+
dragDepth.current = 0;
|
|
50
|
+
setDragActive(false);
|
|
51
|
+
}
|
|
52
|
+
}, []);
|
|
53
|
+
|
|
54
|
+
const handleDragOver = useCallback((e: DragEvent<HTMLDivElement>) => {
|
|
55
|
+
e.preventDefault();
|
|
56
|
+
e.stopPropagation();
|
|
57
|
+
}, []);
|
|
58
|
+
|
|
59
|
+
const handleDrop = useCallback(
|
|
60
|
+
(e: DragEvent<HTMLDivElement>) => {
|
|
61
|
+
e.preventDefault();
|
|
62
|
+
e.stopPropagation();
|
|
63
|
+
dragDepth.current = 0;
|
|
64
|
+
setDragActive(false);
|
|
65
|
+
if (disabled) return;
|
|
66
|
+
const list = e.dataTransfer.files;
|
|
67
|
+
if (list?.length) onFilesDropped?.(list);
|
|
68
|
+
},
|
|
69
|
+
[disabled, onFilesDropped],
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const {
|
|
73
|
+
onBrowse: dropOnBrowse,
|
|
74
|
+
active: dropActive,
|
|
75
|
+
disabled: dropDisabled,
|
|
76
|
+
className: dropClassName,
|
|
77
|
+
dir: dropDir,
|
|
78
|
+
rtl: dropRtl,
|
|
79
|
+
...dropRest
|
|
80
|
+
} = dropZone ?? {};
|
|
81
|
+
|
|
82
|
+
const mergedDisabled = disabled || Boolean(dropDisabled);
|
|
83
|
+
const mergedActive = Boolean(dropActive) || (dragActive && !mergedDisabled);
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<div
|
|
87
|
+
ref={ref}
|
|
88
|
+
dir={dir}
|
|
89
|
+
data-slot="file-uploader"
|
|
90
|
+
className={cn(ROOT, className)}
|
|
91
|
+
{...rest}
|
|
92
|
+
>
|
|
93
|
+
{/* When there is no file list the drop zone should expand to fill all
|
|
94
|
+
available vertical space (flex-1). When a file list is present it
|
|
95
|
+
stays at content height (shrink-0) so the list is not pushed off. */}
|
|
96
|
+
<div
|
|
97
|
+
className={cn(
|
|
98
|
+
'w-full',
|
|
99
|
+
files?.length || listFooter ? 'shrink-0' : 'flex-1',
|
|
100
|
+
)}
|
|
101
|
+
data-slot="drop-zone-wrap"
|
|
102
|
+
onDragEnter={handleDragEnter}
|
|
103
|
+
onDragLeave={handleDragLeave}
|
|
104
|
+
onDragOver={handleDragOver}
|
|
105
|
+
onDrop={handleDrop}
|
|
106
|
+
>
|
|
107
|
+
<FileUploadBase
|
|
108
|
+
{...dropRest}
|
|
109
|
+
dir={dropDir ?? dir}
|
|
110
|
+
rtl={dropRtl ?? rtl}
|
|
111
|
+
disabled={mergedDisabled}
|
|
112
|
+
active={mergedActive}
|
|
113
|
+
className={cn(
|
|
114
|
+
'w-full',
|
|
115
|
+
/* fill the wrapper's height when it is flex-1 */
|
|
116
|
+
!(files?.length || listFooter) && 'h-full',
|
|
117
|
+
dropClassName,
|
|
118
|
+
)}
|
|
119
|
+
onBrowse={dropOnBrowse}
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
{(files?.length || listFooter) && (
|
|
124
|
+
<div data-slot="file-list" className={FILE_LIST}>
|
|
125
|
+
{files?.map((f) => (
|
|
126
|
+
<FileUploadItemBase
|
|
127
|
+
key={f.id}
|
|
128
|
+
data-slot="file-item"
|
|
129
|
+
dir={dir}
|
|
130
|
+
rtl={rtl}
|
|
131
|
+
label={f.label}
|
|
132
|
+
helperText={f.helperText}
|
|
133
|
+
state={f.state}
|
|
134
|
+
progress={f.progress}
|
|
135
|
+
variant={f.variant}
|
|
136
|
+
uploadingLabel={f.uploadingLabel}
|
|
137
|
+
completeLabel={f.completeLabel}
|
|
138
|
+
failedLabel={f.failedLabel}
|
|
139
|
+
retryLabel={f.retryLabel ?? retryLabel}
|
|
140
|
+
onDismiss={
|
|
141
|
+
onRemoveFile
|
|
142
|
+
? (e) => {
|
|
143
|
+
e.preventDefault();
|
|
144
|
+
onRemoveFile(f.id);
|
|
145
|
+
}
|
|
146
|
+
: undefined
|
|
147
|
+
}
|
|
148
|
+
onRetry={
|
|
149
|
+
f.state === 'error' && onRetryFile
|
|
150
|
+
? (e) => {
|
|
151
|
+
e.preventDefault();
|
|
152
|
+
onRetryFile(f.id);
|
|
153
|
+
}
|
|
154
|
+
: undefined
|
|
155
|
+
}
|
|
156
|
+
/>
|
|
157
|
+
))}
|
|
158
|
+
{listFooter}
|
|
159
|
+
</div>
|
|
160
|
+
)}
|
|
161
|
+
</div>
|
|
162
|
+
);
|
|
163
|
+
},
|
|
164
|
+
);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { FileUploadBaseProps } from '../FileUploadBase';
|
|
3
|
+
import type { FileUploadItemBaseState, FileUploadItemBaseVariant } from '../FileUploadItemBase';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* One row in the file list (maps to `FileUploadItemBase`).
|
|
7
|
+
*/
|
|
8
|
+
export interface FileUploaderFileEntry {
|
|
9
|
+
/** Stable key for list reconciliation and callbacks. */
|
|
10
|
+
id: string;
|
|
11
|
+
label?: ReactNode;
|
|
12
|
+
helperText?: ReactNode;
|
|
13
|
+
state: FileUploadItemBaseState;
|
|
14
|
+
/** 0–100; used when `state` is `in-progress` (defaults to 50 in item). */
|
|
15
|
+
progress?: number;
|
|
16
|
+
variant?: FileUploadItemBaseVariant;
|
|
17
|
+
/** Optional status chip copy overrides (e.g. Arabic). */
|
|
18
|
+
uploadingLabel?: ReactNode;
|
|
19
|
+
completeLabel?: ReactNode;
|
|
20
|
+
failedLabel?: ReactNode;
|
|
21
|
+
/** Error row only; overrides `FileUploader` default if both are set per item. */
|
|
22
|
+
retryLabel?: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface FileUploaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
26
|
+
/**
|
|
27
|
+
* Props merged into the drop zone (`FileUploadBase`). Use `onBrowse` to open your own file UI
|
|
28
|
+
* (e.g. a hidden input in the parent); this component does not render `<input type="file" />`.
|
|
29
|
+
*/
|
|
30
|
+
dropZone?: Partial<FileUploadBaseProps>;
|
|
31
|
+
/** File rows below the drop zone. */
|
|
32
|
+
files?: FileUploaderFileEntry[];
|
|
33
|
+
/** Optional custom list content when you do not use `files`. Rendered after `files` if both are set. */
|
|
34
|
+
listFooter?: ReactNode;
|
|
35
|
+
/** Called after files are dropped on the drop zone. */
|
|
36
|
+
onFilesDropped?: (files: FileList) => void;
|
|
37
|
+
onRemoveFile?: (id: string) => void;
|
|
38
|
+
onRetryFile?: (id: string) => void;
|
|
39
|
+
/** Default “Try again” label for error rows (overridable per `files[].retryLabel`). */
|
|
40
|
+
retryLabel?: ReactNode;
|
|
41
|
+
/** Disables drop zone and browse interaction. */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
dir?: 'ltr' | 'rtl';
|
|
44
|
+
/** @deprecated Use `dir="rtl"`. */
|
|
45
|
+
rtl?: boolean;
|
|
46
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Figma FileUploader root: `gap-spacing-xl` (16) between drop zone and list stack.
|
|
3
|
+
*/
|
|
4
|
+
export const ROOT = 'flex w-full flex-col items-start gap-spacing-xl';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Stack of `FileUploadItemBase` rows: Figma uses 8px (`gap-spacing-md`) between cards.
|
|
8
|
+
*/
|
|
9
|
+
export const FILE_LIST = 'flex w-full flex-col gap-spacing-md';
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useRef, useState, useEffect, useCallback } from 'react';
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
5
|
+
import type { CSSProperties } from 'react';
|
|
6
|
+
import { cn } from '../../lib/cn';
|
|
7
|
+
import { Chip } from '../Chip';
|
|
8
|
+
import { FiltrationList } from '../FiltrationList';
|
|
9
|
+
import type { FiltrationProps } from './Filtration.types';
|
|
10
|
+
import {
|
|
11
|
+
ROOT,
|
|
12
|
+
TRIGGER_ANCHOR,
|
|
13
|
+
TRIGGER_BTN,
|
|
14
|
+
TRIGGER_ICON_BTN,
|
|
15
|
+
FILTER_ICON,
|
|
16
|
+
CHEVRON,
|
|
17
|
+
PANEL_FIXED,
|
|
18
|
+
} from './Filtration.variants';
|
|
19
|
+
import { FilterIcon, ChevronDownIcon, XIcon } from '../../icons/IconFactory';
|
|
20
|
+
|
|
21
|
+
const PANEL_WIDTH = 350;
|
|
22
|
+
const MARGIN = 8;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Filtration — composite filter UI combining:
|
|
26
|
+
* • A trigger (black pill button or bare icon)
|
|
27
|
+
* • An active-filter chip row (dismissible solid Chips)
|
|
28
|
+
* • A collapsible FiltrationList panel
|
|
29
|
+
*
|
|
30
|
+
* ### Panel positioning
|
|
31
|
+
* The panel renders via a React portal into document.body so it is never
|
|
32
|
+
* part of the component's flex flow. Position is pre-computed from the
|
|
33
|
+
* trigger's getBoundingClientRect() before the panel mounts, so there is
|
|
34
|
+
* no layout thrash and no first-paint position error.
|
|
35
|
+
*
|
|
36
|
+
* Figma source: node 5273:84408 (Filtration)
|
|
37
|
+
*/
|
|
38
|
+
export const Filtration = forwardRef<HTMLDivElement, FiltrationProps>(
|
|
39
|
+
function Filtration(
|
|
40
|
+
{
|
|
41
|
+
triggerType = 'button',
|
|
42
|
+
triggerLabel = 'Filter',
|
|
43
|
+
activeFilters = [],
|
|
44
|
+
onRemoveFilter,
|
|
45
|
+
sections = [],
|
|
46
|
+
applyLabel = 'Apply Filters',
|
|
47
|
+
clearLabel = 'Clear',
|
|
48
|
+
activeFilterCount,
|
|
49
|
+
onApply,
|
|
50
|
+
onClear,
|
|
51
|
+
showActions = true,
|
|
52
|
+
open: openProp,
|
|
53
|
+
defaultOpen = false,
|
|
54
|
+
onOpenChange,
|
|
55
|
+
rtl = false,
|
|
56
|
+
className,
|
|
57
|
+
children,
|
|
58
|
+
...rest
|
|
59
|
+
},
|
|
60
|
+
ref,
|
|
61
|
+
) {
|
|
62
|
+
/* ── Open state — controlled vs. uncontrolled ──────────────── */
|
|
63
|
+
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
64
|
+
const isControlled = openProp !== undefined;
|
|
65
|
+
const isOpen = isControlled ? openProp : internalOpen;
|
|
66
|
+
|
|
67
|
+
const handleOpenChange = useCallback(
|
|
68
|
+
(next: boolean) => {
|
|
69
|
+
if (!isControlled) setInternalOpen(next);
|
|
70
|
+
onOpenChange?.(next);
|
|
71
|
+
},
|
|
72
|
+
[isControlled, onOpenChange],
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
/* ── Refs ───────────────────────────────────────────────────── */
|
|
76
|
+
const rootRef = useRef<HTMLDivElement>(null);
|
|
77
|
+
const triggerAnchorRef = useRef<HTMLDivElement>(null);
|
|
78
|
+
const panelRef = useRef<HTMLDivElement>(null);
|
|
79
|
+
|
|
80
|
+
/* ── Portal mount guard (no document during SSR) ────────────── */
|
|
81
|
+
const [mounted, setMounted] = useState(false);
|
|
82
|
+
useEffect(() => { setMounted(true); }, []);
|
|
83
|
+
|
|
84
|
+
/* ── Fixed-position panel style ─────────────────────────────── */
|
|
85
|
+
const [panelStyle, setPanelStyle] = useState<CSSProperties>({});
|
|
86
|
+
|
|
87
|
+
const computePosition = useCallback(() => {
|
|
88
|
+
if (!triggerAnchorRef.current) return;
|
|
89
|
+
const rect = triggerAnchorRef.current.getBoundingClientRect();
|
|
90
|
+
const vw = window.innerWidth;
|
|
91
|
+
const width = Math.min(PANEL_WIDTH, vw - MARGIN * 2);
|
|
92
|
+
|
|
93
|
+
let left = rtl
|
|
94
|
+
? rect.right - width // RTL: right-align to trigger's right edge
|
|
95
|
+
: rect.left; // LTR: left-align to trigger's left edge
|
|
96
|
+
|
|
97
|
+
// Clamp to viewport
|
|
98
|
+
if (left + width > vw - MARGIN) left = vw - MARGIN - width;
|
|
99
|
+
if (left < MARGIN) left = MARGIN;
|
|
100
|
+
|
|
101
|
+
setPanelStyle({
|
|
102
|
+
position: 'fixed',
|
|
103
|
+
top: rect.bottom + 4,
|
|
104
|
+
left,
|
|
105
|
+
width,
|
|
106
|
+
zIndex: 50,
|
|
107
|
+
});
|
|
108
|
+
}, [rtl]);
|
|
109
|
+
|
|
110
|
+
/* ── Toggle: pre-compute position before panel mounts ───────── */
|
|
111
|
+
const toggleOpen = useCallback(() => {
|
|
112
|
+
if (!isOpen) computePosition(); // sets panelStyle before React renders panel
|
|
113
|
+
handleOpenChange(!isOpen);
|
|
114
|
+
}, [isOpen, computePosition, handleOpenChange]);
|
|
115
|
+
|
|
116
|
+
/* ── Update position on scroll / resize while open ──────────── */
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
if (!isOpen) return;
|
|
119
|
+
window.addEventListener('scroll', computePosition, true);
|
|
120
|
+
window.addEventListener('resize', computePosition);
|
|
121
|
+
return () => {
|
|
122
|
+
window.removeEventListener('scroll', computePosition, true);
|
|
123
|
+
window.removeEventListener('resize', computePosition);
|
|
124
|
+
};
|
|
125
|
+
}, [isOpen, computePosition]);
|
|
126
|
+
|
|
127
|
+
/* ── Controlled open: compute position when opened externally ── */
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
if (isOpen && isControlled) computePosition();
|
|
130
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
131
|
+
}, [isOpen]);
|
|
132
|
+
|
|
133
|
+
/* ── Click-outside & Escape to close ───────────────────────── */
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
if (!isOpen) return;
|
|
136
|
+
|
|
137
|
+
const handleKeyDown = (e: KeyboardEvent) => {
|
|
138
|
+
if (e.key === 'Escape') handleOpenChange(false);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const handlePointerDown = (e: PointerEvent) => {
|
|
142
|
+
const target = e.target as Node;
|
|
143
|
+
const inRoot = rootRef.current?.contains(target) ?? false;
|
|
144
|
+
const inPanel = panelRef.current?.contains(target) ?? false;
|
|
145
|
+
if (!inRoot && !inPanel) handleOpenChange(false);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
149
|
+
document.addEventListener('pointerdown', handlePointerDown);
|
|
150
|
+
return () => {
|
|
151
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
152
|
+
document.removeEventListener('pointerdown', handlePointerDown);
|
|
153
|
+
};
|
|
154
|
+
}, [isOpen, handleOpenChange]);
|
|
155
|
+
|
|
156
|
+
/* ── Merge external ref with internal rootRef ──────────────── */
|
|
157
|
+
const setRefs = (el: HTMLDivElement | null) => {
|
|
158
|
+
(rootRef as React.MutableRefObject<HTMLDivElement | null>).current = el;
|
|
159
|
+
if (typeof ref === 'function') ref(el);
|
|
160
|
+
else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = el;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const resolvedCount = activeFilterCount ?? activeFilters.length;
|
|
164
|
+
|
|
165
|
+
/* ── Panel — rendered via portal so it's never in the flow ─── */
|
|
166
|
+
const panel = isOpen && mounted ? createPortal(
|
|
167
|
+
<div
|
|
168
|
+
ref={panelRef}
|
|
169
|
+
data-slot="filtration-panel"
|
|
170
|
+
role="dialog"
|
|
171
|
+
aria-label={triggerLabel}
|
|
172
|
+
style={panelStyle}
|
|
173
|
+
className={PANEL_FIXED}
|
|
174
|
+
>
|
|
175
|
+
<FiltrationList
|
|
176
|
+
sections={sections}
|
|
177
|
+
applyLabel={applyLabel}
|
|
178
|
+
clearLabel={clearLabel}
|
|
179
|
+
activeFilterCount={resolvedCount}
|
|
180
|
+
onApply={() => {
|
|
181
|
+
onApply?.();
|
|
182
|
+
handleOpenChange(false);
|
|
183
|
+
}}
|
|
184
|
+
onClear={onClear}
|
|
185
|
+
showActions={showActions}
|
|
186
|
+
rtl={rtl}
|
|
187
|
+
>
|
|
188
|
+
{children}
|
|
189
|
+
</FiltrationList>
|
|
190
|
+
</div>,
|
|
191
|
+
document.body,
|
|
192
|
+
) : null;
|
|
193
|
+
|
|
194
|
+
return (
|
|
195
|
+
<>
|
|
196
|
+
<div
|
|
197
|
+
ref={setRefs}
|
|
198
|
+
data-slot="filtration"
|
|
199
|
+
data-open={isOpen || undefined}
|
|
200
|
+
dir={rtl ? 'rtl' : undefined}
|
|
201
|
+
className={cn(ROOT, className)}
|
|
202
|
+
{...rest}
|
|
203
|
+
>
|
|
204
|
+
{/* ── Trigger button ────────────────────────────────────── */}
|
|
205
|
+
<div ref={triggerAnchorRef} className={TRIGGER_ANCHOR}>
|
|
206
|
+
{triggerType === 'icon' ? (
|
|
207
|
+
<button
|
|
208
|
+
type="button"
|
|
209
|
+
data-slot="filtration-trigger"
|
|
210
|
+
aria-expanded={isOpen}
|
|
211
|
+
aria-haspopup="dialog"
|
|
212
|
+
onClick={toggleOpen}
|
|
213
|
+
className={TRIGGER_ICON_BTN}
|
|
214
|
+
aria-label={triggerLabel}
|
|
215
|
+
>
|
|
216
|
+
<span className={FILTER_ICON}>
|
|
217
|
+
<FilterIcon />
|
|
218
|
+
</span>
|
|
219
|
+
</button>
|
|
220
|
+
) : (
|
|
221
|
+
<button
|
|
222
|
+
type="button"
|
|
223
|
+
data-slot="filtration-trigger"
|
|
224
|
+
aria-expanded={isOpen}
|
|
225
|
+
aria-haspopup="dialog"
|
|
226
|
+
onClick={toggleOpen}
|
|
227
|
+
className={TRIGGER_BTN}
|
|
228
|
+
>
|
|
229
|
+
<span className={FILTER_ICON}>
|
|
230
|
+
<FilterIcon />
|
|
231
|
+
</span>
|
|
232
|
+
<span>{triggerLabel}</span>
|
|
233
|
+
<span className={CHEVRON(isOpen)}>
|
|
234
|
+
<ChevronDownIcon />
|
|
235
|
+
</span>
|
|
236
|
+
</button>
|
|
237
|
+
)}
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
{/* ── Active filter chips ──────────────────────────────── */}
|
|
241
|
+
{activeFilters.map((filter) => (
|
|
242
|
+
<Chip
|
|
243
|
+
key={filter.id}
|
|
244
|
+
variant="solid"
|
|
245
|
+
size="md"
|
|
246
|
+
rounded={false}
|
|
247
|
+
trailingIcon={<XIcon />}
|
|
248
|
+
trailingIconLabel={`Remove ${filter.label}`}
|
|
249
|
+
onTrailingIconClick={() => onRemoveFilter?.(filter.id)}
|
|
250
|
+
>
|
|
251
|
+
{filter.label}
|
|
252
|
+
</Chip>
|
|
253
|
+
))}
|
|
254
|
+
</div>
|
|
255
|
+
|
|
256
|
+
{panel}
|
|
257
|
+
</>
|
|
258
|
+
);
|
|
259
|
+
},
|
|
260
|
+
);
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FiltrationSectionConfig } from '../FiltrationList';
|
|
3
|
+
|
|
4
|
+
/** Visual style of the trigger button */
|
|
5
|
+
export type FiltrationTriggerType = 'button' | 'icon';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A single active-filter chip shown between the trigger and the panel.
|
|
9
|
+
* Consumers manage this array in state and update it as filters are applied/removed.
|
|
10
|
+
*/
|
|
11
|
+
export interface FiltrationActiveFilter {
|
|
12
|
+
/** Unique identifier — passed back in `onRemoveFilter` */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Human-readable label rendered inside the chip */
|
|
15
|
+
label: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface FiltrationProps {
|
|
19
|
+
// ── Trigger ──────────────────────────────────────────────────────
|
|
20
|
+
/**
|
|
21
|
+
* Controls the shape of the trigger:
|
|
22
|
+
* `'button'` (default) — black pill with filter icon, label, and chevron.
|
|
23
|
+
* `'icon'` — bare 24×24 filter icon with no background.
|
|
24
|
+
*/
|
|
25
|
+
triggerType?: FiltrationTriggerType;
|
|
26
|
+
/** Label shown inside the button trigger. Defaults to "Filter". */
|
|
27
|
+
triggerLabel?: string;
|
|
28
|
+
|
|
29
|
+
// ── Active filter chips ──────────────────────────────────────────
|
|
30
|
+
/**
|
|
31
|
+
* Array of active filters currently applied.
|
|
32
|
+
* When non-empty, a row of dismissible green solid Chips is rendered
|
|
33
|
+
* between the trigger and the panel.
|
|
34
|
+
*/
|
|
35
|
+
activeFilters?: FiltrationActiveFilter[];
|
|
36
|
+
/**
|
|
37
|
+
* Called when the user presses × on an active-filter chip.
|
|
38
|
+
* Receives the `id` of the chip that was dismissed.
|
|
39
|
+
*/
|
|
40
|
+
onRemoveFilter?: (id: string) => void;
|
|
41
|
+
|
|
42
|
+
// ── Panel (FiltrationList) ────────────────────────────────────────
|
|
43
|
+
/**
|
|
44
|
+
* Ordered array of filter sections rendered inside the FiltrationList panel.
|
|
45
|
+
* Supports all nine section types: search, checkbox, select, radio, chip,
|
|
46
|
+
* range, amount, date, custom.
|
|
47
|
+
*/
|
|
48
|
+
sections?: FiltrationSectionConfig[];
|
|
49
|
+
/** Label for the primary "Apply" button. Defaults to "Apply Filters". */
|
|
50
|
+
applyLabel?: string;
|
|
51
|
+
/** Label for the secondary "Clear" button. Defaults to "Clear". */
|
|
52
|
+
clearLabel?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Number shown in parentheses next to the apply label, e.g. "Apply Filters (3)".
|
|
55
|
+
* Falls back to `activeFilters.length` when omitted.
|
|
56
|
+
*/
|
|
57
|
+
activeFilterCount?: number;
|
|
58
|
+
/** Called when the user presses the Apply button inside the panel. */
|
|
59
|
+
onApply?: () => void;
|
|
60
|
+
/** Called when the user presses the Clear button inside the panel. */
|
|
61
|
+
onClear?: () => void;
|
|
62
|
+
/**
|
|
63
|
+
* When `false`, hides the Apply / Clear footer inside the FiltrationList.
|
|
64
|
+
* Defaults to `true`.
|
|
65
|
+
*/
|
|
66
|
+
showActions?: boolean;
|
|
67
|
+
|
|
68
|
+
// ── Open / close state ────────────────────────────────────────────
|
|
69
|
+
/**
|
|
70
|
+
* Controlled open state. When provided, the consumer drives open/close.
|
|
71
|
+
* Combine with `onOpenChange` to handle toggle events.
|
|
72
|
+
*/
|
|
73
|
+
open?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Uncontrolled initial open state. Defaults to `false`.
|
|
76
|
+
* Ignored when `open` is provided.
|
|
77
|
+
*/
|
|
78
|
+
defaultOpen?: boolean;
|
|
79
|
+
/** Called whenever the panel open state changes. */
|
|
80
|
+
onOpenChange?: (open: boolean) => void;
|
|
81
|
+
|
|
82
|
+
// ── RTL ──────────────────────────────────────────────────────────
|
|
83
|
+
/**
|
|
84
|
+
* Enables RTL layout by setting `dir="rtl"` on the root element.
|
|
85
|
+
* Alternatively, an ancestor element can carry `dir="rtl"` — flex
|
|
86
|
+
* layouts mirror automatically without this prop.
|
|
87
|
+
*/
|
|
88
|
+
rtl?: boolean;
|
|
89
|
+
|
|
90
|
+
// ── Misc ─────────────────────────────────────────────────────────
|
|
91
|
+
/** Extra class names forwarded to the root element. */
|
|
92
|
+
className?: string;
|
|
93
|
+
/** Custom content to render inside the panel below the filter sections. */
|
|
94
|
+
children?: ReactNode;
|
|
95
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filtration.variants.ts
|
|
3
|
+
*
|
|
4
|
+
* All class-name constants mapped from Figma node 5273:84408 (Filtration).
|
|
5
|
+
*
|
|
6
|
+
* Color sources (Section 0 mapping):
|
|
7
|
+
* Button/button-background-black-default → bg-[rgba(13,18,28,1)]
|
|
8
|
+
* Button/button-background-black-hover → bg-[rgba(31,42,55,1)]
|
|
9
|
+
* Button/button-background-black-active → bg-[rgba(44,57,79,1)]
|
|
10
|
+
* Text/text-oncolor-primary → text-white
|
|
11
|
+
* Icon/icon-oncolor → text-white
|
|
12
|
+
* Active chip → Chip variant="solid" (internal green #1b8354)
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/* ── Root wrapper (trigger button + chips in one flex row) ───────── */
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Wraps the trigger button (with its own relative panel anchor) and the
|
|
19
|
+
* active-filter chip row in a single wrapping flex line.
|
|
20
|
+
*/
|
|
21
|
+
export const ROOT = 'inline-flex flex-wrap items-center gap-spacing-md';
|
|
22
|
+
|
|
23
|
+
/* ── Trigger anchor — the trigger button lives inside this ────────── */
|
|
24
|
+
|
|
25
|
+
export const TRIGGER_ANCHOR = 'relative shrink-0';
|
|
26
|
+
|
|
27
|
+
/* ── Trigger button (triggerType="button") ────────────────────────── */
|
|
28
|
+
|
|
29
|
+
export const TRIGGER_BTN = [
|
|
30
|
+
'inline-flex items-center gap-spacing-xs',
|
|
31
|
+
'h-[40px] px-spacing-xl py-spacing-md',
|
|
32
|
+
'rounded-[8px] shrink-0',
|
|
33
|
+
'bg-[rgba(13,18,28,1)] dark:bg-[rgba(13,18,28,1)]',
|
|
34
|
+
'text-white cursor-pointer select-none',
|
|
35
|
+
'text-text-md font-[500] whitespace-nowrap',
|
|
36
|
+
'hover:bg-[rgba(31,42,55,1)]',
|
|
37
|
+
'active:bg-[rgba(44,57,79,1)]',
|
|
38
|
+
'motion-feedback',
|
|
39
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2 focus-visible:ring-offset-[rgba(13,18,28,1)]',
|
|
40
|
+
].join(' ');
|
|
41
|
+
|
|
42
|
+
/* ── Trigger icon button (triggerType="icon") ─────────────────────── */
|
|
43
|
+
|
|
44
|
+
export const TRIGGER_ICON_BTN = [
|
|
45
|
+
'inline-flex items-center justify-center',
|
|
46
|
+
'size-[24px] shrink-0 rounded-[4px]',
|
|
47
|
+
'cursor-pointer',
|
|
48
|
+
'text-[rgba(22,22,22,1)] dark:text-[rgba(229,231,235,1)]',
|
|
49
|
+
'hover:bg-[rgba(243,244,246,1)] dark:hover:bg-[rgba(31,42,55,1)]',
|
|
50
|
+
'active:bg-[rgba(229,231,235,1)] dark:active:bg-[rgba(44,57,79,1)]',
|
|
51
|
+
'motion-feedback',
|
|
52
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[rgba(22,22,22,1)] dark:focus-visible:ring-[rgba(210,214,219,1)] focus-visible:ring-offset-1',
|
|
53
|
+
].join(' ');
|
|
54
|
+
|
|
55
|
+
/* ── Filter icon wrapper (24×24) ─────────────────────────────────── */
|
|
56
|
+
export const FILTER_ICON = 'shrink-0 size-icon-md';
|
|
57
|
+
|
|
58
|
+
/* ── Chevron icon wrapper — rotates when panel is open ───────────── */
|
|
59
|
+
export const CHEVRON = (open: boolean) =>
|
|
60
|
+
`shrink-0 size-icon-md transition-transform duration-200${open ? ' rotate-180' : ''}`;
|
|
61
|
+
|
|
62
|
+
/* ── Panel (fixed-position, escapes overflow containers) ─────────── */
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Visual-only classes — position, top, left, width, and z-index are
|
|
66
|
+
* injected via inline `style` computed from the trigger's
|
|
67
|
+
* getBoundingClientRect() so the panel is never clipped by an
|
|
68
|
+
* `overflow: hidden` ancestor (e.g. a demo preview container).
|
|
69
|
+
*/
|
|
70
|
+
export const PANEL_FIXED = 'motion-enter';
|