@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,145 @@
|
|
|
1
|
+
/* ─── Root ─── */
|
|
2
|
+
.root {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* ─── Sizes ─── */
|
|
10
|
+
.md {
|
|
11
|
+
width: 44px;
|
|
12
|
+
height: 24px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.sm {
|
|
16
|
+
width: 36px;
|
|
17
|
+
height: 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ─── Hidden native input ─── */
|
|
21
|
+
.input {
|
|
22
|
+
position: absolute;
|
|
23
|
+
inset: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
opacity: 0;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
z-index: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* ─── Track ─── */
|
|
34
|
+
.track {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
border-radius: var(--st-radius-full);
|
|
40
|
+
background-color: var(--st-color-neutral-300);
|
|
41
|
+
transition:
|
|
42
|
+
background-color var(--st-transition-fast),
|
|
43
|
+
box-shadow var(--st-transition-fast);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* ─── Thumb ─── */
|
|
47
|
+
.thumb {
|
|
48
|
+
position: relative;
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
border-radius: var(--st-radius-full);
|
|
53
|
+
background-color: var(--st-color-background);
|
|
54
|
+
transition: transform var(--st-transition-fast);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.md .thumb {
|
|
58
|
+
width: 20px;
|
|
59
|
+
height: 20px;
|
|
60
|
+
transform: translateX(2px);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sm .thumb {
|
|
64
|
+
width: 16px;
|
|
65
|
+
height: 16px;
|
|
66
|
+
transform: translateX(2px);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* ─── Icons ─── */
|
|
70
|
+
.iconX,
|
|
71
|
+
.iconCheck {
|
|
72
|
+
position: absolute;
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
transition: opacity var(--st-transition-fast);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.iconX {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
color: var(--st-color-neutral-400);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.iconCheck {
|
|
85
|
+
opacity: 0;
|
|
86
|
+
color: var(--st-color-success);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.md .iconX svg,
|
|
90
|
+
.md .iconCheck svg {
|
|
91
|
+
width: 12px;
|
|
92
|
+
height: 12px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.sm .iconX svg,
|
|
96
|
+
.sm .iconCheck svg {
|
|
97
|
+
width: 10px;
|
|
98
|
+
height: 10px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* ─── Checked state ─── */
|
|
102
|
+
.root:has(.input:checked) .track {
|
|
103
|
+
background-color: var(--st-color-success);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.root.md:has(.input:checked) .thumb {
|
|
107
|
+
transform: translateX(22px);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.root.sm:has(.input:checked) .thumb {
|
|
111
|
+
transform: translateX(18px);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.root:has(.input:checked) .iconX {
|
|
115
|
+
opacity: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.root:has(.input:checked) .iconCheck {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* ─── Hover ─── */
|
|
123
|
+
.root:not(.disabled):not(.readOnly):has(.input:hover) .track {
|
|
124
|
+
background-color: var(--st-color-neutral-400);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.root:not(.disabled):not(.readOnly):has(.input:checked:hover) .track {
|
|
128
|
+
background-color: var(--st-color-success-hover);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ─── Focus ─── */
|
|
132
|
+
.root:has(.input:focus-visible) .track {
|
|
133
|
+
box-shadow: 0 0 0 2px var(--st-color-success);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* ─── Disabled ─── */
|
|
137
|
+
.disabled {
|
|
138
|
+
opacity: 0.5;
|
|
139
|
+
pointer-events: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* ─── Read-only ─── */
|
|
143
|
+
.readOnly .input {
|
|
144
|
+
cursor: default;
|
|
145
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { forwardRef, useRef } from 'react';
|
|
2
|
+
import { cn } from '../../utils/cn';
|
|
3
|
+
import type { SwitchProps } from './Switch.types';
|
|
4
|
+
import styles from './Switch.module.css';
|
|
5
|
+
|
|
6
|
+
function XIcon() {
|
|
7
|
+
return (
|
|
8
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none">
|
|
9
|
+
<path
|
|
10
|
+
d="M3 3L9 9M9 3L3 9"
|
|
11
|
+
stroke="currentColor"
|
|
12
|
+
strokeWidth="2"
|
|
13
|
+
strokeLinecap="round"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function CheckIcon() {
|
|
20
|
+
return (
|
|
21
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none">
|
|
22
|
+
<path
|
|
23
|
+
d="M2.5 6L5 8.5L9.5 3.5"
|
|
24
|
+
stroke="currentColor"
|
|
25
|
+
strokeWidth="2"
|
|
26
|
+
strokeLinecap="round"
|
|
27
|
+
strokeLinejoin="round"
|
|
28
|
+
/>
|
|
29
|
+
</svg>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
|
34
|
+
(
|
|
35
|
+
{
|
|
36
|
+
size = 'md',
|
|
37
|
+
readOnly = false,
|
|
38
|
+
disabled = false,
|
|
39
|
+
checked,
|
|
40
|
+
defaultChecked,
|
|
41
|
+
onCheckedChange,
|
|
42
|
+
onChange,
|
|
43
|
+
className,
|
|
44
|
+
...rest
|
|
45
|
+
},
|
|
46
|
+
ref,
|
|
47
|
+
) => {
|
|
48
|
+
const internalRef = useRef<HTMLInputElement>(null);
|
|
49
|
+
|
|
50
|
+
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
51
|
+
if (readOnly) {
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
onChange?.(e);
|
|
56
|
+
onCheckedChange?.(e.target.checked);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<span
|
|
61
|
+
className={cn(
|
|
62
|
+
styles.root,
|
|
63
|
+
styles[size],
|
|
64
|
+
disabled && styles.disabled,
|
|
65
|
+
readOnly && styles.readOnly,
|
|
66
|
+
className,
|
|
67
|
+
)}
|
|
68
|
+
>
|
|
69
|
+
<input
|
|
70
|
+
ref={ref ?? internalRef}
|
|
71
|
+
type="checkbox"
|
|
72
|
+
role="switch"
|
|
73
|
+
className={styles.input}
|
|
74
|
+
checked={checked}
|
|
75
|
+
defaultChecked={defaultChecked}
|
|
76
|
+
disabled={disabled}
|
|
77
|
+
readOnly={readOnly}
|
|
78
|
+
onChange={handleChange}
|
|
79
|
+
{...rest}
|
|
80
|
+
/>
|
|
81
|
+
<span className={styles.track}>
|
|
82
|
+
<span className={styles.thumb}>
|
|
83
|
+
<span className={styles.iconX}>
|
|
84
|
+
<XIcon />
|
|
85
|
+
</span>
|
|
86
|
+
<span className={styles.iconCheck}>
|
|
87
|
+
<CheckIcon />
|
|
88
|
+
</span>
|
|
89
|
+
</span>
|
|
90
|
+
</span>
|
|
91
|
+
</span>
|
|
92
|
+
);
|
|
93
|
+
},
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
Switch.displayName = 'Switch';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export type SwitchSize = 'md' | 'sm';
|
|
4
|
+
|
|
5
|
+
export interface SwitchProps
|
|
6
|
+
extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
|
|
7
|
+
size?: SwitchSize;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type SwitchFieldVariant = 'default' | 'card';
|
|
13
|
+
|
|
14
|
+
export interface SwitchFieldProps extends Omit<SwitchProps, 'className'> {
|
|
15
|
+
label: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
variant?: SwitchFieldVariant;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* ─── Root ─── */
|
|
2
|
+
.root {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
gap: var(--st-space-2);
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
user-select: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* ─── Content ─── */
|
|
12
|
+
.content {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
flex: 1;
|
|
16
|
+
gap: var(--st-space-0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* ─── Label ─── */
|
|
20
|
+
.label {
|
|
21
|
+
font-family: var(--st-font-family);
|
|
22
|
+
font-size: var(--st-font-size-sm);
|
|
23
|
+
font-weight: var(--st-font-weight-medium);
|
|
24
|
+
line-height: var(--st-line-height-tight);
|
|
25
|
+
color: var(--st-color-foreground);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* ─── Description ─── */
|
|
29
|
+
.description {
|
|
30
|
+
font-family: var(--st-font-family);
|
|
31
|
+
font-size: var(--st-font-size-xs);
|
|
32
|
+
line-height: var(--st-line-height-normal);
|
|
33
|
+
color: var(--st-color-muted);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ─── Card variant ─── */
|
|
37
|
+
.card {
|
|
38
|
+
border: 1px solid var(--st-color-border);
|
|
39
|
+
border-radius: var(--st-radius-xl);
|
|
40
|
+
padding: var(--st-space-3) var(--st-space-4);
|
|
41
|
+
transition:
|
|
42
|
+
border-color var(--st-transition-fast),
|
|
43
|
+
box-shadow var(--st-transition-fast);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.card:hover:not(.disabled):not(.readOnly) {
|
|
47
|
+
border-color: var(--st-color-border-strong);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.card:has(input:checked) {
|
|
51
|
+
border-color: var(--st-color-success);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.card:has(input:focus-visible) {
|
|
55
|
+
border-color: var(--st-color-success);
|
|
56
|
+
box-shadow: 0 0 0 2px var(--st-color-success);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* ─── Disabled ─── */
|
|
60
|
+
.disabled {
|
|
61
|
+
opacity: 0.5;
|
|
62
|
+
cursor: default;
|
|
63
|
+
pointer-events: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* ─── Read-only ─── */
|
|
67
|
+
.readOnly {
|
|
68
|
+
cursor: default;
|
|
69
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { cn } from '../../utils/cn';
|
|
3
|
+
import { Switch } from './Switch';
|
|
4
|
+
import type { SwitchFieldProps } from './Switch.types';
|
|
5
|
+
import styles from './SwitchField.module.css';
|
|
6
|
+
|
|
7
|
+
export const SwitchField = forwardRef<HTMLInputElement, SwitchFieldProps>(
|
|
8
|
+
(
|
|
9
|
+
{
|
|
10
|
+
label,
|
|
11
|
+
description,
|
|
12
|
+
variant = 'default',
|
|
13
|
+
disabled = false,
|
|
14
|
+
readOnly = false,
|
|
15
|
+
size,
|
|
16
|
+
className,
|
|
17
|
+
...rest
|
|
18
|
+
},
|
|
19
|
+
ref,
|
|
20
|
+
) => {
|
|
21
|
+
return (
|
|
22
|
+
<label
|
|
23
|
+
className={cn(
|
|
24
|
+
styles.root,
|
|
25
|
+
styles[variant],
|
|
26
|
+
disabled && styles.disabled,
|
|
27
|
+
readOnly && styles.readOnly,
|
|
28
|
+
className,
|
|
29
|
+
)}
|
|
30
|
+
>
|
|
31
|
+
<span className={styles.content}>
|
|
32
|
+
<span className={styles.label}>{label}</span>
|
|
33
|
+
{description && (
|
|
34
|
+
<span className={styles.description}>{description}</span>
|
|
35
|
+
)}
|
|
36
|
+
</span>
|
|
37
|
+
<Switch
|
|
38
|
+
ref={ref}
|
|
39
|
+
disabled={disabled}
|
|
40
|
+
readOnly={readOnly}
|
|
41
|
+
size={size}
|
|
42
|
+
{...rest}
|
|
43
|
+
/>
|
|
44
|
+
</label>
|
|
45
|
+
);
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
SwitchField.displayName = 'SwitchField';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* ─── Root ─── */
|
|
2
|
+
|
|
3
|
+
.root {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
font-family: var(--st-font-family);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* ─── Basic variant ─── */
|
|
10
|
+
|
|
11
|
+
.basic {
|
|
12
|
+
gap: 0;
|
|
13
|
+
border-bottom: 1px solid var(--st-color-border);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* ─── Dynamic variant ─── */
|
|
17
|
+
|
|
18
|
+
.dynamic {
|
|
19
|
+
gap: var(--st-space-2);
|
|
20
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { cn } from '../../utils/cn';
|
|
3
|
+
import { TabContext } from './TabContext';
|
|
4
|
+
import type { TabProps } from './Tab.types';
|
|
5
|
+
import styles from './Tab.module.css';
|
|
6
|
+
|
|
7
|
+
export const Tab = forwardRef<HTMLDivElement, TabProps>(
|
|
8
|
+
(
|
|
9
|
+
{
|
|
10
|
+
variant = 'basic',
|
|
11
|
+
value,
|
|
12
|
+
onValueChange,
|
|
13
|
+
disabled = false,
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
...rest
|
|
17
|
+
},
|
|
18
|
+
ref
|
|
19
|
+
) => {
|
|
20
|
+
return (
|
|
21
|
+
<TabContext.Provider value={{ value, onValueChange, variant, disabled }}>
|
|
22
|
+
<div
|
|
23
|
+
ref={ref}
|
|
24
|
+
role="tablist"
|
|
25
|
+
className={cn(styles.root, styles[variant], className)}
|
|
26
|
+
{...rest}
|
|
27
|
+
>
|
|
28
|
+
{children}
|
|
29
|
+
</div>
|
|
30
|
+
</TabContext.Provider>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
Tab.displayName = 'Tab';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HTMLAttributes, ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export type TabVariant = 'basic' | 'dynamic';
|
|
4
|
+
|
|
5
|
+
export interface TabProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
6
|
+
variant?: TabVariant;
|
|
7
|
+
value?: string;
|
|
8
|
+
onValueChange?: (value: string) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface TabItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'value'> {
|
|
14
|
+
value: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
badge?: number;
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface TabAddProps extends ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* ─── Add button ─── */
|
|
2
|
+
|
|
3
|
+
.add {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
width: 36px;
|
|
8
|
+
height: 36px;
|
|
9
|
+
border: 1px solid var(--st-color-border);
|
|
10
|
+
border-radius: var(--st-radius-lg);
|
|
11
|
+
background: transparent;
|
|
12
|
+
color: var(--st-color-foreground);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
padding: 0;
|
|
15
|
+
flex-shrink: 0;
|
|
16
|
+
outline: none;
|
|
17
|
+
transition:
|
|
18
|
+
background-color 0.15s ease,
|
|
19
|
+
border-color 0.15s ease,
|
|
20
|
+
box-shadow 0.15s ease;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.add:hover:not(:disabled) {
|
|
24
|
+
background: var(--st-color-neutral-100);
|
|
25
|
+
border-color: var(--st-color-border-strong);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.add:focus-visible {
|
|
29
|
+
box-shadow: 0 0 0 2px var(--st-color-success);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.add:disabled {
|
|
33
|
+
opacity: 0.5;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
cursor: default;
|
|
36
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { cn } from '../../utils/cn';
|
|
3
|
+
import { useTab } from './TabContext';
|
|
4
|
+
import type { TabAddProps } from './Tab.types';
|
|
5
|
+
import styles from './TabAdd.module.css';
|
|
6
|
+
|
|
7
|
+
function PlusIcon() {
|
|
8
|
+
return (
|
|
9
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
10
|
+
<path
|
|
11
|
+
d="M8 3v10M3 8h10"
|
|
12
|
+
stroke="currentColor"
|
|
13
|
+
strokeWidth="1.5"
|
|
14
|
+
strokeLinecap="round"
|
|
15
|
+
strokeLinejoin="round"
|
|
16
|
+
/>
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const TabAdd = forwardRef<HTMLButtonElement, TabAddProps>(
|
|
22
|
+
({ disabled, className, ...rest }, ref) => {
|
|
23
|
+
const ctx = useTab();
|
|
24
|
+
const isDisabled = disabled || ctx.disabled;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<button
|
|
28
|
+
ref={ref}
|
|
29
|
+
type="button"
|
|
30
|
+
disabled={isDisabled}
|
|
31
|
+
className={cn(styles.add, className)}
|
|
32
|
+
aria-label="Add tab"
|
|
33
|
+
{...rest}
|
|
34
|
+
>
|
|
35
|
+
<PlusIcon />
|
|
36
|
+
</button>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
TabAdd.displayName = 'TabAdd';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import type { TabVariant } from './Tab.types';
|
|
3
|
+
|
|
4
|
+
export interface TabContextValue {
|
|
5
|
+
value?: string;
|
|
6
|
+
onValueChange?: (value: string) => void;
|
|
7
|
+
variant: TabVariant;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const TabContext = createContext<TabContextValue | null>(null);
|
|
12
|
+
|
|
13
|
+
export function useTab(): TabContextValue {
|
|
14
|
+
const ctx = useContext(TabContext);
|
|
15
|
+
if (!ctx) {
|
|
16
|
+
throw new Error('TabItem must be used within a Tab');
|
|
17
|
+
}
|
|
18
|
+
return ctx;
|
|
19
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/* ─── Item base ─── */
|
|
2
|
+
|
|
3
|
+
.item {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
user-select: none;
|
|
8
|
+
outline: none;
|
|
9
|
+
font-family: var(--st-font-family);
|
|
10
|
+
font-size: var(--st-font-size-sm);
|
|
11
|
+
line-height: var(--st-line-height-tight);
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
transition:
|
|
14
|
+
background-color 0.15s ease,
|
|
15
|
+
border-color 0.15s ease,
|
|
16
|
+
color 0.15s ease,
|
|
17
|
+
box-shadow 0.15s ease;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ─── Basic variant ─── */
|
|
21
|
+
|
|
22
|
+
.basic {
|
|
23
|
+
height: 40px;
|
|
24
|
+
padding: 0 var(--st-space-4);
|
|
25
|
+
gap: var(--st-space-2);
|
|
26
|
+
background: transparent;
|
|
27
|
+
border: none;
|
|
28
|
+
border-bottom: 2px solid transparent;
|
|
29
|
+
color: var(--st-color-muted);
|
|
30
|
+
font-weight: var(--st-font-weight-medium);
|
|
31
|
+
margin-bottom: -1px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.basic:hover:not(.active):not(.disabled) {
|
|
35
|
+
background: var(--st-color-neutral-100);
|
|
36
|
+
color: var(--st-color-foreground);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.basic.active {
|
|
40
|
+
border-bottom-color: var(--st-color-success);
|
|
41
|
+
color: var(--st-color-foreground);
|
|
42
|
+
font-weight: var(--st-font-weight-semibold);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.basic:focus-visible {
|
|
46
|
+
box-shadow: 0 0 0 2px var(--st-color-success);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ─── Dynamic variant ─── */
|
|
50
|
+
|
|
51
|
+
.dynamic {
|
|
52
|
+
height: 36px;
|
|
53
|
+
padding: 0 var(--st-space-3);
|
|
54
|
+
gap: var(--st-space-2);
|
|
55
|
+
background: var(--st-color-background);
|
|
56
|
+
border: 1px solid var(--st-color-border);
|
|
57
|
+
border-radius: var(--st-radius-lg);
|
|
58
|
+
color: var(--st-color-foreground);
|
|
59
|
+
font-weight: var(--st-font-weight-medium);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.dynamic:hover:not(.active):not(.disabled) {
|
|
63
|
+
background: var(--st-color-neutral-100);
|
|
64
|
+
border-color: var(--st-color-border-strong);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dynamic.active {
|
|
68
|
+
background: var(--st-color-neutral-900);
|
|
69
|
+
border-color: var(--st-color-neutral-900);
|
|
70
|
+
color: #ffffff;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dynamic:focus-visible {
|
|
74
|
+
box-shadow: 0 0 0 2px var(--st-color-success);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* ─── Disabled ─── */
|
|
78
|
+
|
|
79
|
+
.disabled {
|
|
80
|
+
opacity: 0.5;
|
|
81
|
+
pointer-events: none;
|
|
82
|
+
cursor: default;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* ─── Icon ─── */
|
|
86
|
+
|
|
87
|
+
.icon {
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ─── Label ─── */
|
|
94
|
+
|
|
95
|
+
.label {
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* ─── Badge (basic variant) ─── */
|
|
100
|
+
|
|
101
|
+
.badge {
|
|
102
|
+
display: inline-flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
min-width: 20px;
|
|
106
|
+
height: 20px;
|
|
107
|
+
padding: 0 6px;
|
|
108
|
+
border-radius: var(--st-radius-full);
|
|
109
|
+
background: var(--st-color-success);
|
|
110
|
+
color: var(--st-color-success-foreground);
|
|
111
|
+
font-size: var(--st-font-size-xs);
|
|
112
|
+
font-weight: var(--st-font-weight-semibold);
|
|
113
|
+
line-height: 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* ─── Close button (dynamic variant) ─── */
|
|
117
|
+
|
|
118
|
+
.close {
|
|
119
|
+
display: inline-flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
width: 20px;
|
|
123
|
+
height: 20px;
|
|
124
|
+
border: none;
|
|
125
|
+
background: transparent;
|
|
126
|
+
color: currentColor;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
padding: 0;
|
|
129
|
+
border-radius: var(--st-radius-full);
|
|
130
|
+
flex-shrink: 0;
|
|
131
|
+
transition: background-color 0.15s ease;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.close:hover {
|
|
135
|
+
background-color: var(--st-color-neutral-200);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.closeActive:hover {
|
|
139
|
+
background-color: var(--st-color-neutral-700);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.close:focus-visible {
|
|
143
|
+
box-shadow: 0 0 0 2px var(--st-color-success);
|
|
144
|
+
outline: none;
|
|
145
|
+
}
|