@soadtech/cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +272 -0
- package/package.json +24 -0
- package/registry/base/cn.ts +5 -0
- package/registry/base/css-modules.d.ts +4 -0
- package/registry/base/theme/reset.css +43 -0
- package/registry/base/theme/tokens.css +154 -0
- package/registry/components/Accordion/Accordion.module.css +3 -0
- package/registry/components/Accordion/Accordion.tsx +54 -0
- package/registry/components/Accordion/Accordion.types.ts +17 -0
- package/registry/components/Accordion/AccordionContext.ts +18 -0
- package/registry/components/Accordion/AccordionItem.module.css +124 -0
- package/registry/components/Accordion/AccordionItem.tsx +148 -0
- package/registry/components/Accordion/AccordionItem.types.ts +14 -0
- package/registry/components/Accordion/index.ts +8 -0
- package/registry/components/ActionBar/ActionBar.module.css +18 -0
- package/registry/components/ActionBar/ActionBar.tsx +21 -0
- package/registry/components/ActionBar/ActionBar.types.ts +8 -0
- package/registry/components/ActionBar/ActionBarLink.module.css +31 -0
- package/registry/components/ActionBar/ActionBarLink.tsx +55 -0
- package/registry/components/ActionBar/ActionBarLink.types.ts +7 -0
- package/registry/components/ActionBar/index.ts +4 -0
- package/registry/components/Alert/Alert.module.css +172 -0
- package/registry/components/Alert/Alert.tsx +146 -0
- package/registry/components/Alert/Alert.types.ts +25 -0
- package/registry/components/Alert/index.ts +7 -0
- package/registry/components/Avatar/Avatar.module.css +100 -0
- package/registry/components/Avatar/Avatar.tsx +54 -0
- package/registry/components/Avatar/Avatar.types.ts +18 -0
- package/registry/components/Avatar/AvatarGroup.module.css +64 -0
- package/registry/components/Avatar/AvatarGroup.tsx +65 -0
- package/registry/components/Avatar/AvatarGroup.types.ts +13 -0
- package/registry/components/Avatar/index.ts +8 -0
- package/registry/components/Badge/Badge.module.css +92 -0
- package/registry/components/Badge/Badge.tsx +89 -0
- package/registry/components/Badge/Badge.types.ts +20 -0
- package/registry/components/Badge/TrendBadge.module.css +47 -0
- package/registry/components/Badge/TrendBadge.tsx +65 -0
- package/registry/components/Badge/TrendBadge.types.ts +15 -0
- package/registry/components/Badge/index.ts +14 -0
- package/registry/components/Breadcrumbs/BreadcrumbItem.tsx +41 -0
- package/registry/components/Breadcrumbs/Breadcrumbs.module.css +81 -0
- package/registry/components/Breadcrumbs/Breadcrumbs.tsx +71 -0
- package/registry/components/Breadcrumbs/Breadcrumbs.types.ts +22 -0
- package/registry/components/Breadcrumbs/index.ts +7 -0
- package/registry/components/Button/Button.module.css +169 -0
- package/registry/components/Button/Button.tsx +43 -0
- package/registry/components/Button/Button.types.ts +18 -0
- package/registry/components/Button/index.ts +7 -0
- package/registry/components/ButtonLink/ButtonLink.module.css +85 -0
- package/registry/components/ButtonLink/ButtonLink.tsx +42 -0
- package/registry/components/ButtonLink/ButtonLink.types.ts +18 -0
- package/registry/components/ButtonLink/index.ts +6 -0
- package/registry/components/Calendar/Calendar.module.css +213 -0
- package/registry/components/Calendar/Calendar.tsx +370 -0
- package/registry/components/Calendar/Calendar.types.ts +28 -0
- package/registry/components/Calendar/CalendarDialog.module.css +29 -0
- package/registry/components/Calendar/CalendarDialog.tsx +173 -0
- package/registry/components/Calendar/CalendarDialog.types.ts +30 -0
- package/registry/components/Calendar/index.ts +9 -0
- package/registry/components/Card/Card.module.css +35 -0
- package/registry/components/Card/Card.tsx +36 -0
- package/registry/components/Card/Card.types.ts +37 -0
- package/registry/components/Card/CardContent.module.css +3 -0
- package/registry/components/Card/CardContent.tsx +16 -0
- package/registry/components/Card/CardFooter.module.css +31 -0
- package/registry/components/Card/CardFooter.tsx +34 -0
- package/registry/components/Card/CardHeader.module.css +61 -0
- package/registry/components/Card/CardHeader.tsx +46 -0
- package/registry/components/Card/InsightCard.module.css +106 -0
- package/registry/components/Card/InsightCard.tsx +68 -0
- package/registry/components/Card/InsightCard.types.ts +24 -0
- package/registry/components/Card/KPICard.module.css +31 -0
- package/registry/components/Card/KPICard.tsx +29 -0
- package/registry/components/Card/KPICard.types.ts +13 -0
- package/registry/components/Card/ListItemCard.module.css +59 -0
- package/registry/components/Card/ListItemCard.tsx +37 -0
- package/registry/components/Card/ListItemCard.types.ts +18 -0
- package/registry/components/Card/PlanCard.module.css +125 -0
- package/registry/components/Card/PlanCard.tsx +108 -0
- package/registry/components/Card/PlanCard.types.ts +30 -0
- package/registry/components/Card/ProductCard.module.css +118 -0
- package/registry/components/Card/ProductCard.tsx +56 -0
- package/registry/components/Card/ProductCard.types.ts +24 -0
- package/registry/components/Card/StatCard.module.css +20 -0
- package/registry/components/Card/StatCard.tsx +26 -0
- package/registry/components/Card/StatCard.types.ts +12 -0
- package/registry/components/Card/UserGroupCard.module.css +50 -0
- package/registry/components/Card/UserGroupCard.tsx +59 -0
- package/registry/components/Card/UserGroupCard.types.ts +23 -0
- package/registry/components/Card/index.ts +38 -0
- package/registry/components/Chart/BarChart.module.css +54 -0
- package/registry/components/Chart/BarChart.tsx +196 -0
- package/registry/components/Chart/BarChart.types.ts +20 -0
- package/registry/components/Chart/ChartAction.module.css +43 -0
- package/registry/components/Chart/ChartAction.tsx +35 -0
- package/registry/components/Chart/ChartAction.types.ts +17 -0
- package/registry/components/Chart/ChartAxis.module.css +47 -0
- package/registry/components/Chart/ChartAxis.tsx +79 -0
- package/registry/components/Chart/ChartAxis.types.ts +14 -0
- package/registry/components/Chart/ChartLegend.module.css +31 -0
- package/registry/components/Chart/ChartLegend.tsx +49 -0
- package/registry/components/Chart/ChartLegend.types.ts +18 -0
- package/registry/components/Chart/ChartTooltip.module.css +54 -0
- package/registry/components/Chart/ChartTooltip.tsx +44 -0
- package/registry/components/Chart/ChartTooltip.types.ts +19 -0
- package/registry/components/Chart/DonutChart.module.css +32 -0
- package/registry/components/Chart/DonutChart.tsx +107 -0
- package/registry/components/Chart/DonutChart.types.ts +20 -0
- package/registry/components/Chart/GridChart.module.css +26 -0
- package/registry/components/Chart/GridChart.tsx +61 -0
- package/registry/components/Chart/GridChart.types.ts +14 -0
- package/registry/components/Chart/HoverTooltip.module.css +16 -0
- package/registry/components/Chart/HoverTooltip.tsx +22 -0
- package/registry/components/Chart/KPIIndicator.module.css +48 -0
- package/registry/components/Chart/KPIIndicator.tsx +28 -0
- package/registry/components/Chart/KPIIndicator.types.ts +16 -0
- package/registry/components/Chart/LineChart.module.css +54 -0
- package/registry/components/Chart/LineChart.tsx +282 -0
- package/registry/components/Chart/LineChart.types.ts +22 -0
- package/registry/components/Chart/ProgressChart.module.css +54 -0
- package/registry/components/Chart/ProgressChart.tsx +64 -0
- package/registry/components/Chart/ProgressChart.types.ts +18 -0
- package/registry/components/Chart/TrendLineChart.module.css +5 -0
- package/registry/components/Chart/TrendLineChart.tsx +131 -0
- package/registry/components/Chart/TrendLineChart.types.ts +19 -0
- package/registry/components/Chart/chart.utils.ts +131 -0
- package/registry/components/Chart/index.ts +47 -0
- package/registry/components/Chart/useChartHover.ts +24 -0
- package/registry/components/Checkbox/Checkbox.module.css +101 -0
- package/registry/components/Checkbox/Checkbox.tsx +100 -0
- package/registry/components/Checkbox/Checkbox.types.ts +11 -0
- package/registry/components/Checkbox/CheckboxField.module.css +69 -0
- package/registry/components/Checkbox/CheckboxField.tsx +54 -0
- package/registry/components/Checkbox/CheckboxField.types.ts +9 -0
- package/registry/components/Checkbox/CheckboxGroup.module.css +41 -0
- package/registry/components/Checkbox/CheckboxGroup.tsx +60 -0
- package/registry/components/Checkbox/CheckboxGroup.types.ts +11 -0
- package/registry/components/Checkbox/CheckboxGroupContext.ts +13 -0
- package/registry/components/Checkbox/index.ts +11 -0
- package/registry/components/Chip/Chip.module.css +143 -0
- package/registry/components/Chip/Chip.tsx +93 -0
- package/registry/components/Chip/Chip.types.ts +19 -0
- package/registry/components/Chip/ChipGroup.module.css +5 -0
- package/registry/components/Chip/ChipGroup.tsx +16 -0
- package/registry/components/Chip/ChipGroup.types.ts +3 -0
- package/registry/components/Chip/index.ts +9 -0
- package/registry/components/Datepicker/Datepicker.module.css +133 -0
- package/registry/components/Datepicker/Datepicker.tsx +236 -0
- package/registry/components/Datepicker/Datepicker.types.ts +36 -0
- package/registry/components/Datepicker/index.ts +2 -0
- package/registry/components/Dialog/Dialog.module.css +18 -0
- package/registry/components/Dialog/Dialog.tsx +69 -0
- package/registry/components/Dialog/Dialog.types.ts +45 -0
- package/registry/components/Dialog/DialogBody.module.css +3 -0
- package/registry/components/Dialog/DialogBody.tsx +16 -0
- package/registry/components/Dialog/DialogContext.ts +11 -0
- package/registry/components/Dialog/DialogFooter.module.css +38 -0
- package/registry/components/Dialog/DialogFooter.tsx +30 -0
- package/registry/components/Dialog/DialogHeader.module.css +70 -0
- package/registry/components/Dialog/DialogHeader.tsx +72 -0
- package/registry/components/Dialog/DialogIcon.module.css +31 -0
- package/registry/components/Dialog/DialogIcon.tsx +89 -0
- package/registry/components/Dialog/index.ts +14 -0
- package/registry/components/Divider/Divider.module.css +19 -0
- package/registry/components/Divider/Divider.tsx +20 -0
- package/registry/components/Divider/Divider.types.ts +9 -0
- package/registry/components/Divider/index.ts +2 -0
- package/registry/components/DropdownMenu/DropdownMenu.module.css +9 -0
- package/registry/components/DropdownMenu/DropdownMenu.tsx +21 -0
- package/registry/components/DropdownMenu/DropdownMenu.types.ts +22 -0
- package/registry/components/DropdownMenu/DropdownMenuDivider.module.css +5 -0
- package/registry/components/DropdownMenu/DropdownMenuDivider.tsx +20 -0
- package/registry/components/DropdownMenu/DropdownMenuHeader.module.css +7 -0
- package/registry/components/DropdownMenu/DropdownMenuHeader.tsx +17 -0
- package/registry/components/DropdownMenu/DropdownMenuItem.module.css +78 -0
- package/registry/components/DropdownMenu/DropdownMenuItem.tsx +40 -0
- package/registry/components/DropdownMenu/index.ts +10 -0
- package/registry/components/FileUpload/FileUpload.module.css +122 -0
- package/registry/components/FileUpload/FileUpload.tsx +354 -0
- package/registry/components/FileUpload/FileUpload.types.ts +89 -0
- package/registry/components/FileUpload/FileUploadIcon.module.css +61 -0
- package/registry/components/FileUpload/FileUploadIcon.tsx +84 -0
- package/registry/components/FileUpload/FileUploadInput.module.css +140 -0
- package/registry/components/FileUpload/FileUploadInput.tsx +113 -0
- package/registry/components/FileUpload/FileUploadItem.module.css +41 -0
- package/registry/components/FileUpload/FileUploadItem.tsx +39 -0
- package/registry/components/FileUpload/index.ts +12 -0
- package/registry/components/InputCounter/InputCounter.module.css +146 -0
- package/registry/components/InputCounter/InputCounter.tsx +232 -0
- package/registry/components/InputCounter/InputCounter.types.ts +37 -0
- package/registry/components/InputCounter/index.ts +7 -0
- package/registry/components/InputMessage/InputMessage.module.css +148 -0
- package/registry/components/InputMessage/InputMessage.tsx +294 -0
- package/registry/components/InputMessage/InputMessage.types.ts +30 -0
- package/registry/components/InputMessage/index.ts +2 -0
- package/registry/components/InputSearch/InputSearch.module.css +168 -0
- package/registry/components/InputSearch/InputSearch.tsx +251 -0
- package/registry/components/InputSearch/InputSearch.types.ts +35 -0
- package/registry/components/InputSearch/index.ts +6 -0
- package/registry/components/InputText/InputText.module.css +183 -0
- package/registry/components/InputText/InputText.tsx +244 -0
- package/registry/components/InputText/InputText.types.ts +32 -0
- package/registry/components/InputText/index.ts +7 -0
- package/registry/components/InputTextArea/InputTextArea.module.css +141 -0
- package/registry/components/InputTextArea/InputTextArea.tsx +170 -0
- package/registry/components/InputTextArea/InputTextArea.types.ts +18 -0
- package/registry/components/InputTextArea/index.ts +6 -0
- package/registry/components/NavbarUser/NavbarUser.module.css +265 -0
- package/registry/components/NavbarUser/NavbarUser.tsx +202 -0
- package/registry/components/NavbarUser/NavbarUser.types.ts +31 -0
- package/registry/components/NavbarUser/index.ts +2 -0
- package/registry/components/Notification/Notification.types.ts +65 -0
- package/registry/components/Notification/NotificationItem.module.css +143 -0
- package/registry/components/Notification/NotificationItem.tsx +157 -0
- package/registry/components/Notification/NotificationPanel.module.css +75 -0
- package/registry/components/Notification/NotificationPanel.tsx +68 -0
- package/registry/components/Notification/NotificationReply.module.css +56 -0
- package/registry/components/Notification/NotificationReply.tsx +52 -0
- package/registry/components/Notification/index.ts +9 -0
- package/registry/components/Pagination/Pagination.module.css +123 -0
- package/registry/components/Pagination/Pagination.tsx +212 -0
- package/registry/components/Pagination/Pagination.types.ts +24 -0
- package/registry/components/Pagination/PaginationDots.module.css +60 -0
- package/registry/components/Pagination/PaginationDots.tsx +48 -0
- package/registry/components/Pagination/PaginationDots.types.ts +17 -0
- package/registry/components/Pagination/index.ts +12 -0
- package/registry/components/Persona/MessageDropdown.module.css +76 -0
- package/registry/components/Persona/MessageDropdown.tsx +68 -0
- package/registry/components/Persona/Persona.module.css +92 -0
- package/registry/components/Persona/Persona.tsx +90 -0
- package/registry/components/Persona/Persona.types.ts +71 -0
- package/registry/components/Persona/PersonaAction.module.css +80 -0
- package/registry/components/Persona/PersonaAction.tsx +49 -0
- package/registry/components/Persona/PersonaMessage.module.css +156 -0
- package/registry/components/Persona/PersonaMessage.tsx +70 -0
- package/registry/components/Persona/index.ts +11 -0
- package/registry/components/Progress/Progress.module.css +41 -0
- package/registry/components/Progress/Progress.tsx +43 -0
- package/registry/components/Progress/Progress.types.ts +10 -0
- package/registry/components/Progress/index.ts +2 -0
- package/registry/components/RadioButton/RadioButton.module.css +103 -0
- package/registry/components/RadioButton/RadioButton.tsx +59 -0
- package/registry/components/RadioButton/RadioButton.types.ts +19 -0
- package/registry/components/RadioButton/RadioField.module.css +68 -0
- package/registry/components/RadioButton/RadioField.tsx +68 -0
- package/registry/components/RadioButton/RadioGroup.module.css +41 -0
- package/registry/components/RadioButton/RadioGroup.tsx +76 -0
- package/registry/components/RadioButton/RadioGroupContext.ts +16 -0
- package/registry/components/RadioButton/index.ts +12 -0
- package/registry/components/RangeSlider/RangeSlider.module.css +133 -0
- package/registry/components/RangeSlider/RangeSlider.tsx +251 -0
- package/registry/components/RangeSlider/RangeSlider.types.ts +25 -0
- package/registry/components/RangeSlider/index.ts +2 -0
- package/registry/components/Rating/Rating.module.css +56 -0
- package/registry/components/Rating/Rating.tsx +142 -0
- package/registry/components/Rating/Rating.types.ts +14 -0
- package/registry/components/Rating/index.ts +7 -0
- package/registry/components/SegmentedControl/SegmentedControl.module.css +56 -0
- package/registry/components/SegmentedControl/SegmentedControl.tsx +46 -0
- package/registry/components/SegmentedControl/SegmentedControl.types.ts +27 -0
- package/registry/components/SegmentedControl/SegmentedControlContext.ts +20 -0
- package/registry/components/SegmentedControl/SegmentedControlItem.module.css +55 -0
- package/registry/components/SegmentedControl/SegmentedControlItem.tsx +32 -0
- package/registry/components/SegmentedControl/index.ts +8 -0
- package/registry/components/SelectDropdown/SelectDropdown.module.css +214 -0
- package/registry/components/SelectDropdown/SelectDropdown.tsx +375 -0
- package/registry/components/SelectDropdown/SelectDropdown.types.ts +50 -0
- package/registry/components/SelectDropdown/SelectDropdownOption.module.css +101 -0
- package/registry/components/SelectDropdown/SelectDropdownOption.tsx +86 -0
- package/registry/components/SelectDropdown/SelectDropdownOverlay.module.css +74 -0
- package/registry/components/SelectDropdown/SelectDropdownOverlay.tsx +202 -0
- package/registry/components/SelectDropdown/index.ts +11 -0
- package/registry/components/Sidebar/Sidebar.module.css +14 -0
- package/registry/components/Sidebar/Sidebar.tsx +41 -0
- package/registry/components/Sidebar/Sidebar.types.ts +41 -0
- package/registry/components/Sidebar/SidebarContent.module.css +5 -0
- package/registry/components/Sidebar/SidebarContent.tsx +14 -0
- package/registry/components/Sidebar/SidebarContext.ts +15 -0
- package/registry/components/Sidebar/SidebarDivider.module.css +5 -0
- package/registry/components/Sidebar/SidebarDivider.tsx +17 -0
- package/registry/components/Sidebar/SidebarFooter.module.css +5 -0
- package/registry/components/Sidebar/SidebarFooter.tsx +14 -0
- package/registry/components/Sidebar/SidebarGroup.module.css +12 -0
- package/registry/components/Sidebar/SidebarGroup.tsx +22 -0
- package/registry/components/Sidebar/SidebarHeader.module.css +5 -0
- package/registry/components/Sidebar/SidebarHeader.tsx +14 -0
- package/registry/components/Sidebar/SidebarNavItem.module.css +176 -0
- package/registry/components/Sidebar/SidebarNavItem.tsx +96 -0
- package/registry/components/Sidebar/index.ts +16 -0
- package/registry/components/Stepper/Stepper.module.css +11 -0
- package/registry/components/Stepper/Stepper.tsx +47 -0
- package/registry/components/Stepper/Stepper.types.ts +26 -0
- package/registry/components/Stepper/StepperContext.ts +17 -0
- package/registry/components/Stepper/StepperStep.module.css +183 -0
- package/registry/components/Stepper/StepperStep.tsx +204 -0
- package/registry/components/Stepper/index.ts +9 -0
- package/registry/components/Switch/Switch.module.css +145 -0
- package/registry/components/Switch/Switch.tsx +96 -0
- package/registry/components/Switch/Switch.types.ts +19 -0
- package/registry/components/Switch/SwitchField.module.css +69 -0
- package/registry/components/Switch/SwitchField.tsx +49 -0
- package/registry/components/Switch/index.ts +8 -0
- package/registry/components/Tab/Tab.module.css +20 -0
- package/registry/components/Tab/Tab.tsx +35 -0
- package/registry/components/Tab/Tab.types.ts +21 -0
- package/registry/components/Tab/TabAdd.module.css +36 -0
- package/registry/components/Tab/TabAdd.tsx +41 -0
- package/registry/components/Tab/TabContext.ts +19 -0
- package/registry/components/Tab/TabItem.module.css +145 -0
- package/registry/components/Tab/TabItem.tsx +87 -0
- package/registry/components/Tab/index.ts +9 -0
- package/registry/components/Table/Table.module.css +33 -0
- package/registry/components/Table/Table.tsx +74 -0
- package/registry/components/Table/Table.types.ts +64 -0
- package/registry/components/Table/TableBody.tsx +23 -0
- package/registry/components/Table/TableCell.module.css +21 -0
- package/registry/components/Table/TableCell.tsx +20 -0
- package/registry/components/Table/TableContext.ts +22 -0
- package/registry/components/Table/TableFooter.module.css +27 -0
- package/registry/components/Table/TableFooter.tsx +20 -0
- package/registry/components/Table/TableHeader.module.css +3 -0
- package/registry/components/Table/TableHeader.tsx +17 -0
- package/registry/components/Table/TableHeaderCell.module.css +55 -0
- package/registry/components/Table/TableHeaderCell.tsx +98 -0
- package/registry/components/Table/TableRow.module.css +53 -0
- package/registry/components/Table/TableRow.tsx +31 -0
- package/registry/components/Table/TableToolbar.module.css +7 -0
- package/registry/components/Table/TableToolbar.tsx +16 -0
- package/registry/components/Table/index.ts +22 -0
- package/registry/components/Tag/Tag.module.css +46 -0
- package/registry/components/Tag/Tag.tsx +38 -0
- package/registry/components/Tag/Tag.types.ts +37 -0
- package/registry/components/Tag/TagBrand.module.css +42 -0
- package/registry/components/Tag/TagBrand.tsx +38 -0
- package/registry/components/Tag/TagStatus.module.css +43 -0
- package/registry/components/Tag/TagStatus.tsx +119 -0
- package/registry/components/Tag/index.ts +15 -0
- package/registry/components/Tooltip/Tooltip.module.css +208 -0
- package/registry/components/Tooltip/Tooltip.tsx +81 -0
- package/registry/components/Tooltip/Tooltip.types.ts +27 -0
- package/registry/components/Tooltip/index.ts +7 -0
- package/registry/components/TreeviewList/TreeviewItem.module.css +89 -0
- package/registry/components/TreeviewList/TreeviewItem.tsx +142 -0
- package/registry/components/TreeviewList/TreeviewList.module.css +3 -0
- package/registry/components/TreeviewList/TreeviewList.tsx +19 -0
- package/registry/components/TreeviewList/TreeviewList.types.ts +18 -0
- package/registry/components/TreeviewList/TreeviewListContext.ts +13 -0
- package/registry/components/TreeviewList/index.ts +6 -0
- package/registry/components/VerificationCode/VerificationCode.module.css +49 -0
- package/registry/components/VerificationCode/VerificationCode.tsx +147 -0
- package/registry/components/VerificationCode/VerificationCode.types.ts +21 -0
- package/registry/components/VerificationCode/index.ts +2 -0
- package/registry/registry.json +746 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
|
+
import type { SelectOption, SelectOptionGroup } from './SelectDropdown.types';
|
|
3
|
+
import { SelectDropdownOption } from './SelectDropdownOption';
|
|
4
|
+
import styles from './SelectDropdownOverlay.module.css';
|
|
5
|
+
|
|
6
|
+
function SearchIcon() {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width="16"
|
|
10
|
+
height="16"
|
|
11
|
+
viewBox="0 0 16 16"
|
|
12
|
+
fill="none"
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
>
|
|
15
|
+
<path
|
|
16
|
+
fillRule="evenodd"
|
|
17
|
+
clipRule="evenodd"
|
|
18
|
+
d="M0.833313 7.33331C0.833313 3.74346 3.74346 0.833313 7.33331 0.833313C10.9232 0.833313 13.8333 3.74347 13.8333 7.33331C13.8333 8.94827 13.2444 10.4257 12.2695 11.5624L15.0202 14.3131C15.2155 14.5084 15.2155 14.8249 15.0202 15.0202C14.8249 15.2155 14.5084 15.2155 14.3131 15.0202L11.5624 12.2695C10.4257 13.2444 8.94827 13.8333 7.33331 13.8333C3.74347 13.8333 0.833313 10.9232 0.833313 7.33331ZM7.33331 1.83331C4.29575 1.83331 1.83331 4.29575 1.83331 7.33331C1.83331 10.3709 4.29575 12.8333 7.33331 12.8333C10.3709 12.8333 12.8333 10.3709 12.8333 7.33331C12.8333 4.29575 10.3709 1.83331 7.33331 1.83331Z"
|
|
19
|
+
fill="currentColor"
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function isGroup(
|
|
26
|
+
item: SelectOption | SelectOptionGroup,
|
|
27
|
+
): item is SelectOptionGroup {
|
|
28
|
+
return 'options' in item;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface SelectDropdownOverlayProps {
|
|
32
|
+
items: (SelectOption | SelectOptionGroup)[];
|
|
33
|
+
selectedValues: string[];
|
|
34
|
+
multiple: boolean;
|
|
35
|
+
searchable: boolean;
|
|
36
|
+
searchPlaceholder: string;
|
|
37
|
+
noOptionsText: string;
|
|
38
|
+
onSelect: (value: string) => void;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function SelectDropdownOverlay({
|
|
42
|
+
items,
|
|
43
|
+
selectedValues,
|
|
44
|
+
multiple,
|
|
45
|
+
searchable,
|
|
46
|
+
searchPlaceholder,
|
|
47
|
+
noOptionsText,
|
|
48
|
+
onSelect,
|
|
49
|
+
}: SelectDropdownOverlayProps) {
|
|
50
|
+
const [query, setQuery] = useState('');
|
|
51
|
+
const [highlightedIndex, setHighlightedIndex] = useState(-1);
|
|
52
|
+
const searchRef = useRef<HTMLInputElement>(null);
|
|
53
|
+
const listRef = useRef<HTMLDivElement>(null);
|
|
54
|
+
|
|
55
|
+
// Flatten options with group info for filtering and keyboard nav
|
|
56
|
+
const flattenItems = useCallback(
|
|
57
|
+
(q: string) => {
|
|
58
|
+
const result: { option: SelectOption; groupLabel?: string }[] = [];
|
|
59
|
+
const lowerQ = q.toLowerCase();
|
|
60
|
+
|
|
61
|
+
for (const item of items) {
|
|
62
|
+
if (isGroup(item)) {
|
|
63
|
+
const filtered = item.options.filter((o) =>
|
|
64
|
+
o.label.toLowerCase().includes(lowerQ),
|
|
65
|
+
);
|
|
66
|
+
for (const opt of filtered) {
|
|
67
|
+
result.push({ option: opt, groupLabel: item.label });
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
if (item.label.toLowerCase().includes(lowerQ)) {
|
|
71
|
+
result.push({ option: item });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return result;
|
|
77
|
+
},
|
|
78
|
+
[items],
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const filtered = flattenItems(query);
|
|
82
|
+
|
|
83
|
+
// Reset highlight when query changes
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
setHighlightedIndex(-1);
|
|
86
|
+
}, [query]);
|
|
87
|
+
|
|
88
|
+
// Auto-focus search input
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
if (searchable) searchRef.current?.focus();
|
|
91
|
+
}, [searchable]);
|
|
92
|
+
|
|
93
|
+
// Keyboard navigation
|
|
94
|
+
const handleKeyDown = useCallback(
|
|
95
|
+
(e: React.KeyboardEvent) => {
|
|
96
|
+
if (e.key === 'ArrowDown') {
|
|
97
|
+
e.preventDefault();
|
|
98
|
+
setHighlightedIndex((prev) => {
|
|
99
|
+
let next = prev + 1;
|
|
100
|
+
while (next < filtered.length && filtered[next].option.disabled) {
|
|
101
|
+
next++;
|
|
102
|
+
}
|
|
103
|
+
return next < filtered.length ? next : prev;
|
|
104
|
+
});
|
|
105
|
+
} else if (e.key === 'ArrowUp') {
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
setHighlightedIndex((prev) => {
|
|
108
|
+
let next = prev - 1;
|
|
109
|
+
while (next >= 0 && filtered[next].option.disabled) {
|
|
110
|
+
next--;
|
|
111
|
+
}
|
|
112
|
+
return next >= 0 ? next : prev;
|
|
113
|
+
});
|
|
114
|
+
} else if (e.key === 'Enter') {
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
if (
|
|
117
|
+
highlightedIndex >= 0 &&
|
|
118
|
+
highlightedIndex < filtered.length &&
|
|
119
|
+
!filtered[highlightedIndex].option.disabled
|
|
120
|
+
) {
|
|
121
|
+
onSelect(filtered[highlightedIndex].option.value);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
[filtered, highlightedIndex, onSelect],
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
// Scroll highlighted option into view
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
if (highlightedIndex < 0 || !listRef.current) return;
|
|
131
|
+
const el = listRef.current.querySelectorAll('[role="option"]')[
|
|
132
|
+
highlightedIndex
|
|
133
|
+
] as HTMLElement | undefined;
|
|
134
|
+
el?.scrollIntoView({ block: 'nearest' });
|
|
135
|
+
}, [highlightedIndex]);
|
|
136
|
+
|
|
137
|
+
// Render options with group headers and dividers
|
|
138
|
+
const renderOptions = () => {
|
|
139
|
+
if (filtered.length === 0) {
|
|
140
|
+
return <div className={styles.noOptions}>{noOptionsText}</div>;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const elements: React.ReactNode[] = [];
|
|
144
|
+
let lastGroup: string | undefined;
|
|
145
|
+
let flatIndex = 0;
|
|
146
|
+
|
|
147
|
+
for (const entry of filtered) {
|
|
148
|
+
if (entry.groupLabel && entry.groupLabel !== lastGroup) {
|
|
149
|
+
if (lastGroup !== undefined) {
|
|
150
|
+
elements.push(
|
|
151
|
+
<div key={`div-${entry.groupLabel}`} className={styles.divider} />,
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
elements.push(
|
|
155
|
+
<span key={`grp-${entry.groupLabel}`} className={styles.groupLabel}>
|
|
156
|
+
{entry.groupLabel}
|
|
157
|
+
</span>,
|
|
158
|
+
);
|
|
159
|
+
lastGroup = entry.groupLabel;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const idx = flatIndex;
|
|
163
|
+
elements.push(
|
|
164
|
+
<SelectDropdownOption
|
|
165
|
+
key={entry.option.value}
|
|
166
|
+
option={entry.option}
|
|
167
|
+
selected={selectedValues.includes(entry.option.value)}
|
|
168
|
+
highlighted={highlightedIndex === idx}
|
|
169
|
+
multiple={multiple}
|
|
170
|
+
onSelect={onSelect}
|
|
171
|
+
onMouseEnter={() => setHighlightedIndex(idx)}
|
|
172
|
+
/>,
|
|
173
|
+
);
|
|
174
|
+
flatIndex++;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return elements;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
<div className={styles.overlay} onKeyDown={handleKeyDown}>
|
|
182
|
+
{searchable && (
|
|
183
|
+
<div className={styles.searchBox}>
|
|
184
|
+
<span className={styles.searchIcon}>
|
|
185
|
+
<SearchIcon />
|
|
186
|
+
</span>
|
|
187
|
+
<input
|
|
188
|
+
ref={searchRef}
|
|
189
|
+
className={styles.searchInput}
|
|
190
|
+
type="text"
|
|
191
|
+
placeholder={searchPlaceholder}
|
|
192
|
+
value={query}
|
|
193
|
+
onChange={(e) => setQuery(e.target.value)}
|
|
194
|
+
/>
|
|
195
|
+
</div>
|
|
196
|
+
)}
|
|
197
|
+
<div className={styles.optionList} role="listbox" ref={listRef}>
|
|
198
|
+
{renderOptions()}
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { SelectDropdown } from './SelectDropdown';
|
|
2
|
+
export type {
|
|
3
|
+
SelectDropdownProps,
|
|
4
|
+
SelectDropdownSize,
|
|
5
|
+
SelectDropdownFeedback,
|
|
6
|
+
SelectDropdownFeedbackStatus,
|
|
7
|
+
SelectOption,
|
|
8
|
+
SelectOptionGroup,
|
|
9
|
+
SingleSelectProps,
|
|
10
|
+
MultiSelectProps,
|
|
11
|
+
} from './SelectDropdown.types';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.sidebar {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: var(--sb-expanded-width, 240px);
|
|
5
|
+
height: 100%;
|
|
6
|
+
background-color: var(--st-color-surface);
|
|
7
|
+
border-right: 1px solid var(--st-color-border);
|
|
8
|
+
transition: width var(--st-transition-slow);
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.collapsed {
|
|
13
|
+
width: var(--sb-collapsed-width, 64px);
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { forwardRef, useMemo } from 'react';
|
|
2
|
+
import { cn } from '../../utils/cn';
|
|
3
|
+
import { SidebarContext } from './SidebarContext';
|
|
4
|
+
import type { SidebarProps } from './Sidebar.types';
|
|
5
|
+
import styles from './Sidebar.module.css';
|
|
6
|
+
|
|
7
|
+
export const Sidebar = forwardRef<HTMLElement, SidebarProps>(
|
|
8
|
+
(
|
|
9
|
+
{
|
|
10
|
+
collapsed = false,
|
|
11
|
+
expandedWidth = '240px',
|
|
12
|
+
collapsedWidth = '64px',
|
|
13
|
+
className,
|
|
14
|
+
children,
|
|
15
|
+
style,
|
|
16
|
+
...rest
|
|
17
|
+
},
|
|
18
|
+
ref
|
|
19
|
+
) => {
|
|
20
|
+
const ctx = useMemo(() => ({ collapsed }), [collapsed]);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<SidebarContext.Provider value={ctx}>
|
|
24
|
+
<aside
|
|
25
|
+
ref={ref}
|
|
26
|
+
className={cn(styles.sidebar, collapsed && styles.collapsed, className)}
|
|
27
|
+
style={{
|
|
28
|
+
'--sb-expanded-width': expandedWidth,
|
|
29
|
+
'--sb-collapsed-width': collapsedWidth,
|
|
30
|
+
...style,
|
|
31
|
+
} as React.CSSProperties}
|
|
32
|
+
{...rest}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
</aside>
|
|
36
|
+
</SidebarContext.Provider>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
Sidebar.displayName = 'Sidebar';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
/** Icon-only collapsed mode. */
|
|
5
|
+
collapsed?: boolean;
|
|
6
|
+
/** Width when expanded. */
|
|
7
|
+
expandedWidth?: string;
|
|
8
|
+
/** Width when collapsed. */
|
|
9
|
+
collapsedWidth?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface SidebarHeaderProps extends HTMLAttributes<HTMLDivElement> {}
|
|
13
|
+
|
|
14
|
+
export interface SidebarContentProps extends HTMLAttributes<HTMLDivElement> {}
|
|
15
|
+
|
|
16
|
+
export interface SidebarFooterProps extends HTMLAttributes<HTMLDivElement> {}
|
|
17
|
+
|
|
18
|
+
export interface SidebarGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
/** Section label, hidden when collapsed. */
|
|
20
|
+
label?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface SidebarNavItemProps
|
|
24
|
+
extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
25
|
+
/** Icon shown in both expanded and collapsed modes. */
|
|
26
|
+
icon: ReactNode;
|
|
27
|
+
/** Nav item label text. */
|
|
28
|
+
label: string;
|
|
29
|
+
/** Active/selected state. */
|
|
30
|
+
active?: boolean;
|
|
31
|
+
/** Disabled state. */
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
/** Badge content — pill in expanded, dot in collapsed. */
|
|
34
|
+
badge?: ReactNode;
|
|
35
|
+
/** Callback when item is selected. */
|
|
36
|
+
onSelect?: () => void;
|
|
37
|
+
/** Submenu content — shows chevron + animated panel. */
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface SidebarDividerProps extends HTMLAttributes<HTMLDivElement> {}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { cn } from '../../utils/cn';
|
|
3
|
+
import type { SidebarContentProps } from './Sidebar.types';
|
|
4
|
+
import styles from './SidebarContent.module.css';
|
|
5
|
+
|
|
6
|
+
export const SidebarContent = forwardRef<HTMLDivElement, SidebarContentProps>(
|
|
7
|
+
({ className, children, ...rest }, ref) => (
|
|
8
|
+
<div ref={ref} className={cn(styles.content, className)} {...rest}>
|
|
9
|
+
{children}
|
|
10
|
+
</div>
|
|
11
|
+
)
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
SidebarContent.displayName = 'SidebarContent';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SidebarContextValue {
|
|
4
|
+
collapsed: boolean;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const SidebarContext = createContext<SidebarContextValue | null>(null);
|
|
8
|
+
|
|
9
|
+
export function useSidebar(): SidebarContextValue {
|
|
10
|
+
const ctx = useContext(SidebarContext);
|
|
11
|
+
if (!ctx) {
|
|
12
|
+
throw new Error('Sidebar components must be used within a <Sidebar>');
|
|
13
|
+
}
|
|
14
|
+
return ctx;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { cn } from '../../utils/cn';
|
|
3
|
+
import type { SidebarDividerProps } from './Sidebar.types';
|
|
4
|
+
import styles from './SidebarDivider.module.css';
|
|
5
|
+
|
|
6
|
+
export const SidebarDivider = forwardRef<HTMLDivElement, SidebarDividerProps>(
|
|
7
|
+
({ className, ...rest }, ref) => (
|
|
8
|
+
<div
|
|
9
|
+
ref={ref}
|
|
10
|
+
role="separator"
|
|
11
|
+
className={cn(styles.divider, className)}
|
|
12
|
+
{...rest}
|
|
13
|
+
/>
|
|
14
|
+
)
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
SidebarDivider.displayName = 'SidebarDivider';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { cn } from '../../utils/cn';
|
|
3
|
+
import type { SidebarFooterProps } from './Sidebar.types';
|
|
4
|
+
import styles from './SidebarFooter.module.css';
|
|
5
|
+
|
|
6
|
+
export const SidebarFooter = forwardRef<HTMLDivElement, SidebarFooterProps>(
|
|
7
|
+
({ className, children, ...rest }, ref) => (
|
|
8
|
+
<div ref={ref} className={cn(styles.footer, className)} {...rest}>
|
|
9
|
+
{children}
|
|
10
|
+
</div>
|
|
11
|
+
)
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
SidebarFooter.displayName = 'SidebarFooter';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.group {
|
|
2
|
+
padding: var(--st-space-2) 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.label {
|
|
6
|
+
padding: var(--st-space-2) var(--st-space-4);
|
|
7
|
+
font-size: var(--st-font-size-xs);
|
|
8
|
+
font-weight: var(--st-font-weight-semibold);
|
|
9
|
+
color: var(--st-color-muted);
|
|
10
|
+
text-transform: uppercase;
|
|
11
|
+
letter-spacing: 0.05em;
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { cn } from '../../utils/cn';
|
|
3
|
+
import { useSidebar } from './SidebarContext';
|
|
4
|
+
import type { SidebarGroupProps } from './Sidebar.types';
|
|
5
|
+
import styles from './SidebarGroup.module.css';
|
|
6
|
+
|
|
7
|
+
export const SidebarGroup = forwardRef<HTMLDivElement, SidebarGroupProps>(
|
|
8
|
+
({ label, className, children, ...rest }, ref) => {
|
|
9
|
+
const { collapsed } = useSidebar();
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<div ref={ref} className={cn(styles.group, className)} {...rest}>
|
|
13
|
+
{label && !collapsed && (
|
|
14
|
+
<div className={styles.label}>{label}</div>
|
|
15
|
+
)}
|
|
16
|
+
{children}
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
SidebarGroup.displayName = 'SidebarGroup';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { cn } from '../../utils/cn';
|
|
3
|
+
import type { SidebarHeaderProps } from './Sidebar.types';
|
|
4
|
+
import styles from './SidebarHeader.module.css';
|
|
5
|
+
|
|
6
|
+
export const SidebarHeader = forwardRef<HTMLDivElement, SidebarHeaderProps>(
|
|
7
|
+
({ className, children, ...rest }, ref) => (
|
|
8
|
+
<div ref={ref} className={cn(styles.header, className)} {...rest}>
|
|
9
|
+
{children}
|
|
10
|
+
</div>
|
|
11
|
+
)
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
SidebarHeader.displayName = 'SidebarHeader';
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
padding: var(--st-space-1) var(--st-space-3);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/* ─── Expanded trigger (pill) ─── */
|
|
6
|
+
|
|
7
|
+
.trigger {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
width: 100%;
|
|
11
|
+
padding: var(--st-space-2) var(--st-space-3);
|
|
12
|
+
gap: var(--st-space-3);
|
|
13
|
+
background: transparent;
|
|
14
|
+
border: none;
|
|
15
|
+
border-radius: var(--st-radius-full);
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
color: var(--st-color-foreground);
|
|
18
|
+
font-family: var(--st-font-family);
|
|
19
|
+
font-size: var(--st-font-size-sm);
|
|
20
|
+
text-align: left;
|
|
21
|
+
transition: background-color var(--st-transition-fast);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.trigger:hover:not(:disabled) {
|
|
25
|
+
background-color: var(--st-color-neutral-100);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.trigger:focus-visible {
|
|
29
|
+
outline: 2px solid var(--st-color-success);
|
|
30
|
+
outline-offset: -2px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.trigger:disabled {
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
opacity: 0.5;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.trigger.active {
|
|
39
|
+
background-color: var(--st-color-success);
|
|
40
|
+
color: var(--st-color-success-foreground);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.trigger.active:hover:not(:disabled) {
|
|
44
|
+
background-color: var(--st-color-success);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ─── Icon slot ─── */
|
|
48
|
+
|
|
49
|
+
.iconSlot {
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
width: 20px;
|
|
55
|
+
height: 20px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ─── Label ─── */
|
|
59
|
+
|
|
60
|
+
.label {
|
|
61
|
+
flex: 1;
|
|
62
|
+
min-width: 0;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
text-overflow: ellipsis;
|
|
65
|
+
white-space: nowrap;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* ─── Badge (expanded) ─── */
|
|
69
|
+
|
|
70
|
+
.badge {
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
min-width: 20px;
|
|
76
|
+
height: 20px;
|
|
77
|
+
padding: 0 var(--st-space-2);
|
|
78
|
+
border-radius: var(--st-radius-full);
|
|
79
|
+
background-color: var(--st-color-success);
|
|
80
|
+
color: var(--st-color-success-foreground);
|
|
81
|
+
font-size: var(--st-font-size-xs);
|
|
82
|
+
font-weight: var(--st-font-weight-semibold);
|
|
83
|
+
line-height: 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.trigger.active .badge {
|
|
87
|
+
background-color: var(--st-color-success-foreground);
|
|
88
|
+
color: var(--st-color-success);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* ─── Chevron ─── */
|
|
92
|
+
|
|
93
|
+
.chevron {
|
|
94
|
+
flex-shrink: 0;
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
transition: transform var(--st-transition-base);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.chevronOpen {
|
|
102
|
+
transform: rotate(90deg);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* ─── Submenu panel (grid animation) ─── */
|
|
106
|
+
|
|
107
|
+
.panel {
|
|
108
|
+
display: grid;
|
|
109
|
+
grid-template-rows: 0fr;
|
|
110
|
+
transition: grid-template-rows var(--st-transition-slow);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.panelOpen {
|
|
114
|
+
grid-template-rows: 1fr;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.panelContent {
|
|
118
|
+
overflow: hidden;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.panelInner {
|
|
122
|
+
padding-left: var(--st-space-6);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* ─── Collapsed icon button (squircle) ─── */
|
|
126
|
+
|
|
127
|
+
.iconButton {
|
|
128
|
+
position: relative;
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: center;
|
|
132
|
+
width: 40px;
|
|
133
|
+
height: 40px;
|
|
134
|
+
margin: 0 auto;
|
|
135
|
+
background: transparent;
|
|
136
|
+
border: none;
|
|
137
|
+
border-radius: var(--st-radius-lg);
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
color: var(--st-color-foreground);
|
|
140
|
+
transition: background-color var(--st-transition-fast);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.iconButton:hover:not(:disabled) {
|
|
144
|
+
background-color: var(--st-color-neutral-100);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.iconButton:focus-visible {
|
|
148
|
+
outline: 2px solid var(--st-color-success);
|
|
149
|
+
outline-offset: -2px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.iconButton:disabled {
|
|
153
|
+
cursor: not-allowed;
|
|
154
|
+
opacity: 0.5;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.iconButton.active {
|
|
158
|
+
background-color: var(--st-color-success);
|
|
159
|
+
color: var(--st-color-success-foreground);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.iconButton.active:hover:not(:disabled) {
|
|
163
|
+
background-color: var(--st-color-success);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* ─── Badge dot (collapsed) ─── */
|
|
167
|
+
|
|
168
|
+
.badgeDot {
|
|
169
|
+
position: absolute;
|
|
170
|
+
top: 4px;
|
|
171
|
+
right: 4px;
|
|
172
|
+
width: 8px;
|
|
173
|
+
height: 8px;
|
|
174
|
+
border-radius: var(--st-radius-full);
|
|
175
|
+
background-color: var(--st-color-success);
|
|
176
|
+
}
|