@sixthshift/design-system 0.3.0 → 0.4.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/README.md +114 -12
- package/dist/components/Badge/Badge.d.ts +64 -9
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +54 -46
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Badge/index.js.map +1 -1
- package/dist/components/BarChart/BarChart.d.ts +12 -0
- package/dist/components/BarChart/BarChart.d.ts.map +1 -1
- package/dist/components/BarChart/BarChart.js +12 -0
- package/dist/components/BarChart/BarChart.js.map +1 -1
- package/dist/components/Button/Button.d.ts +85 -6
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +97 -106
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Calendar/Calendar.d.ts +18 -4
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +19 -5
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Calendar/CalendarView.d.ts.map +1 -1
- package/dist/components/Calendar/CalendarView.js +10 -2
- package/dist/components/Calendar/CalendarView.js.map +1 -1
- package/dist/components/Calendar/calendar.types.d.ts +9 -0
- package/dist/components/Calendar/calendar.types.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +13 -0
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +15 -2
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +21 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +22 -1
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +22 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +22 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/Code/Editor/Editor.js +2 -2
- package/dist/components/Code/Editor/Editor.js.map +1 -1
- package/dist/components/Code/Editor/themes.d.ts +2 -2
- package/dist/components/Code/Editor/themes.d.ts.map +1 -1
- package/dist/components/Code/Editor/themes.js +50 -32
- package/dist/components/Code/Editor/themes.js.map +1 -1
- package/dist/components/Code/ValidationStatus/ValidationStatus.d.ts.map +1 -1
- package/dist/components/Code/ValidationStatus/ValidationStatus.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +43 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +166 -4
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DatePicker/DateSegments.d.ts +60 -0
- package/dist/components/DatePicker/DateSegments.d.ts.map +1 -0
- package/dist/components/DatePicker/DateSegments.js +80 -0
- package/dist/components/DatePicker/DateSegments.js.map +1 -0
- package/dist/components/DatePicker/datepicker.types.d.ts +19 -1
- package/dist/components/DatePicker/datepicker.types.d.ts.map +1 -1
- package/dist/components/DatePicker/index.d.ts +1 -1
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +20 -2
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +22 -4
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/DateRangePicker/daterangepicker.types.d.ts +6 -1
- package/dist/components/DateRangePicker/daterangepicker.types.d.ts.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +30 -2
- package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.js +105 -32
- package/dist/components/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/DateTimePicker/DateTimeSegments.d.ts +41 -0
- package/dist/components/DateTimePicker/DateTimeSegments.d.ts.map +1 -0
- package/dist/components/DateTimePicker/DateTimeSegments.js +67 -0
- package/dist/components/DateTimePicker/DateTimeSegments.js.map +1 -0
- package/dist/components/DateTimePicker/datetimepicker.types.d.ts +6 -1
- package/dist/components/DateTimePicker/datetimepicker.types.d.ts.map +1 -1
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts +28 -2
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js +136 -58
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
- package/dist/components/DateTimeRangePicker/datetimerangepicker.types.d.ts +6 -1
- package/dist/components/DateTimeRangePicker/datetimerangepicker.types.d.ts.map +1 -1
- package/dist/components/Field/Field.d.ts +15 -17
- package/dist/components/Field/Field.d.ts.map +1 -1
- package/dist/components/Field/Field.js +18 -3
- package/dist/components/Field/Field.js.map +1 -1
- package/dist/components/FormField/FormField.d.ts +15 -0
- package/dist/components/FormField/FormField.d.ts.map +1 -1
- package/dist/components/FormField/FormField.js +15 -0
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/HoverCard/HoverCard.d.ts +6 -0
- package/dist/components/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/components/HoverCard/HoverCard.js +6 -0
- package/dist/components/HoverCard/HoverCard.js.map +1 -1
- package/dist/components/Input/Input.d.ts +15 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.js +18 -3
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/LineChart/LineChart.d.ts +17 -0
- package/dist/components/LineChart/LineChart.d.ts.map +1 -1
- package/dist/components/LineChart/LineChart.js +17 -0
- package/dist/components/LineChart/LineChart.js.map +1 -1
- package/dist/components/Markdown/Markdown.d.ts +17 -0
- package/dist/components/Markdown/Markdown.d.ts.map +1 -1
- package/dist/components/Markdown/Markdown.js +17 -0
- package/dist/components/Markdown/Markdown.js.map +1 -1
- package/dist/components/Message/Message.d.ts +49 -4
- package/dist/components/Message/Message.d.ts.map +1 -1
- package/dist/components/Message/Message.js +53 -17
- package/dist/components/Message/Message.js.map +1 -1
- package/dist/components/Message/index.d.ts +1 -1
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +36 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +37 -1
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/components/ModalHeader.js +1 -1
- package/dist/components/Modal/components/ModalHeader.js.map +1 -1
- package/dist/components/Popover/Popover.d.ts +29 -0
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/Popover.js +29 -0
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +14 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +14 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +26 -0
- package/dist/components/RadioButton/RadioButton.d.ts.map +1 -1
- package/dist/components/RadioButton/RadioButton.js +35 -1
- package/dist/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts +26 -0
- package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts.map +1 -1
- package/dist/components/RadioButtonGroup/RadioButtonGroup.js +33 -0
- package/dist/components/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +10 -0
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.js +12 -1
- package/dist/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/components/Select/Select.d.ts +4 -5
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +4 -5
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectDropdown.d.ts.map +1 -1
- package/dist/components/Select/SelectDropdown.js +4 -3
- package/dist/components/Select/SelectDropdown.js.map +1 -1
- package/dist/components/Select/SelectTrigger.js +2 -2
- package/dist/components/Select/SelectTrigger.js.map +1 -1
- package/dist/components/Separator/Separator.d.ts +10 -0
- package/dist/components/Separator/Separator.d.ts.map +1 -1
- package/dist/components/Separator/Separator.js +10 -0
- package/dist/components/Separator/Separator.js.map +1 -1
- package/dist/components/Sheet/Sheet.d.ts +6 -0
- package/dist/components/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/Sheet/Sheet.js +7 -1
- package/dist/components/Sheet/Sheet.js.map +1 -1
- package/dist/components/Sheet/components/SheetFooter.js +1 -1
- package/dist/components/Sheet/components/SheetFooter.js.map +1 -1
- package/dist/components/Sheet/components/SheetHeader.js +1 -1
- package/dist/components/Sheet/components/SheetHeader.js.map +1 -1
- package/dist/components/Sparkline/Sparkline.d.ts +11 -0
- package/dist/components/Sparkline/Sparkline.d.ts.map +1 -1
- package/dist/components/Sparkline/Sparkline.js +11 -0
- package/dist/components/Sparkline/Sparkline.js.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +27 -2
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.js +28 -3
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +18 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.js +19 -1
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +6 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +6 -0
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/components/TabsTrigger.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabsTrigger.js +22 -6
- package/dist/components/Tabs/components/TabsTrigger.js.map +1 -1
- package/dist/components/TagChip/TagChip.d.ts +14 -12
- package/dist/components/TagChip/TagChip.d.ts.map +1 -1
- package/dist/components/TagChip/TagChip.js +14 -1
- package/dist/components/TagChip/TagChip.js.map +1 -1
- package/dist/components/TagInput/TagInput.d.ts +11 -8
- package/dist/components/TagInput/TagInput.d.ts.map +1 -1
- package/dist/components/TagInput/TagInput.js +11 -0
- package/dist/components/TagInput/TagInput.js.map +1 -1
- package/dist/components/Text/Text.d.ts +9 -0
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +9 -0
- package/dist/components/Text/Text.js.map +1 -1
- package/dist/components/TextInline/TextInline.d.ts +15 -4
- package/dist/components/TextInline/TextInline.d.ts.map +1 -1
- package/dist/components/TextInline/TextInline.js +11 -0
- package/dist/components/TextInline/TextInline.js.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +12 -0
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.js +13 -1
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/TimePicker/TimeColumn.d.ts +10 -1
- package/dist/components/TimePicker/TimeColumn.d.ts.map +1 -1
- package/dist/components/TimePicker/TimeColumn.js +8 -1
- package/dist/components/TimePicker/TimeColumn.js.map +1 -1
- package/dist/components/TimePicker/TimePicker.d.ts +32 -0
- package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.js +93 -6
- package/dist/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/components/TimePicker/TimeSegments.d.ts +50 -0
- package/dist/components/TimePicker/TimeSegments.d.ts.map +1 -0
- package/dist/components/TimePicker/TimeSegments.js +93 -0
- package/dist/components/TimePicker/TimeSegments.js.map +1 -0
- package/dist/components/TimePicker/timepicker.hooks.d.ts +0 -4
- package/dist/components/TimePicker/timepicker.hooks.d.ts.map +1 -1
- package/dist/components/TimePicker/timepicker.hooks.js +1 -23
- package/dist/components/TimePicker/timepicker.hooks.js.map +1 -1
- package/dist/components/TimePicker/timepicker.types.d.ts +0 -2
- package/dist/components/TimePicker/timepicker.types.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts +27 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +28 -1
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toggle/Toggle.d.ts +31 -12
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.js +19 -31
- package/dist/components/Toggle/Toggle.js.map +1 -1
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/components/Toggle/index.d.ts.map +1 -1
- package/dist/components/Toggle/index.js +1 -1
- package/dist/components/Toggle/index.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +17 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +17 -0
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.js +7 -6
- package/dist/components/ToggleGroup/ToggleGroupItem.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupMultiple.d.ts +4 -3
- package/dist/components/ToggleGroup/ToggleGroupMultiple.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupMultiple.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroupMultiple.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupSingle.d.ts +4 -3
- package/dist/components/ToggleGroup/ToggleGroupSingle.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupSingle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroupSingle.js.map +1 -1
- package/dist/components/ToggleGroup/toggleGroup.types.d.ts +12 -3
- package/dist/components/ToggleGroup/toggleGroup.types.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +6 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +6 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/date-time/index.d.ts.map +1 -1
- package/dist/date-time/index.js +0 -1
- package/dist/date-time/index.js.map +1 -1
- package/dist/internal/PickerField.d.ts +45 -0
- package/dist/internal/PickerField.d.ts.map +1 -0
- package/dist/internal/PickerField.js +24 -0
- package/dist/internal/PickerField.js.map +1 -0
- package/dist/internal/SegmentedField.d.ts +98 -0
- package/dist/internal/SegmentedField.d.ts.map +1 -0
- package/dist/internal/SegmentedField.js +315 -0
- package/dist/internal/SegmentedField.js.map +1 -0
- package/dist/internal/index.d.ts +2 -0
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +2 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/schema.d.ts +0 -22
- package/dist/theme/schema.d.ts.map +1 -1
- package/dist/theme/schema.js +0 -9
- package/dist/theme/schema.js.map +1 -1
- package/package.json +3 -45
- package/src/components/Badge/Badge.tsx +85 -48
- package/src/components/Badge/index.ts +10 -1
- package/src/components/BarChart/BarChart.tsx +12 -0
- package/src/components/Button/Button.tsx +129 -106
- package/src/components/Button/index.ts +10 -1
- package/src/components/Calendar/Calendar.tsx +29 -16
- package/src/components/Calendar/CalendarView.tsx +10 -1
- package/src/components/Calendar/calendar.types.ts +10 -0
- package/src/components/Card/Card.tsx +15 -2
- package/src/components/Checkbox/Checkbox.tsx +22 -2
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +22 -0
- package/src/components/Code/Editor/Editor.tsx +2 -2
- package/src/components/Code/Editor/themes.ts +50 -32
- package/src/components/Code/ValidationStatus/ValidationStatus.tsx +6 -3
- package/src/components/DatePicker/DatePicker.tsx +279 -28
- package/src/components/DatePicker/DateSegments.tsx +125 -0
- package/src/components/DatePicker/datepicker.types.ts +21 -1
- package/src/components/DatePicker/index.ts +8 -1
- package/src/components/DateRangePicker/DateRangePicker.tsx +22 -4
- package/src/components/DateRangePicker/daterangepicker.types.ts +7 -1
- package/src/components/DateTimePicker/DateTimePicker.tsx +143 -70
- package/src/components/DateTimePicker/DateTimeSegments.tsx +113 -0
- package/src/components/DateTimePicker/datetimepicker.types.ts +7 -1
- package/src/components/DateTimeRangePicker/DateTimeRangePicker.tsx +195 -104
- package/src/components/DateTimeRangePicker/datetimerangepicker.types.ts +7 -1
- package/src/components/Field/Field.tsx +20 -22
- package/src/components/FormField/FormField.tsx +15 -0
- package/src/components/HoverCard/HoverCard.tsx +6 -0
- package/src/components/Input/Input.tsx +19 -4
- package/src/components/LineChart/LineChart.tsx +17 -0
- package/src/components/Markdown/Markdown.tsx +17 -0
- package/src/components/Message/Message.tsx +73 -23
- package/src/components/Message/index.ts +1 -1
- package/src/components/Modal/Modal.tsx +42 -3
- package/src/components/Modal/components/ModalHeader.tsx +1 -1
- package/src/components/Popover/Popover.tsx +29 -0
- package/src/components/ProgressBar/ProgressBar.tsx +14 -0
- package/src/components/RadioButton/RadioButton.tsx +34 -3
- package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +32 -0
- package/src/components/SearchInput/SearchInput.tsx +13 -2
- package/src/components/Select/Select.tsx +4 -5
- package/src/components/Select/SelectDropdown.tsx +13 -9
- package/src/components/Select/SelectTrigger.tsx +7 -7
- package/src/components/Separator/Separator.tsx +10 -0
- package/src/components/Sheet/Sheet.tsx +8 -2
- package/src/components/Sheet/components/SheetFooter.tsx +1 -1
- package/src/components/Sheet/components/SheetHeader.tsx +2 -2
- package/src/components/Sparkline/Sparkline.tsx +11 -0
- package/src/components/Spinner/Spinner.tsx +28 -3
- package/src/components/Switch/Switch.tsx +27 -4
- package/src/components/Tabs/Tabs.tsx +6 -0
- package/src/components/Tabs/components/TabsTrigger.tsx +22 -5
- package/src/components/TagChip/TagChip.tsx +18 -16
- package/src/components/TagInput/TagInput.tsx +11 -8
- package/src/components/Text/Text.tsx +9 -0
- package/src/components/TextInline/TextInline.tsx +11 -0
- package/src/components/Textarea/Textarea.tsx +13 -1
- package/src/components/TimePicker/TimeColumn.tsx +24 -1
- package/src/components/TimePicker/TimePicker.tsx +127 -39
- package/src/components/TimePicker/TimeSegments.tsx +131 -0
- package/src/components/TimePicker/timepicker.hooks.ts +1 -24
- package/src/components/TimePicker/timepicker.types.ts +0 -3
- package/src/components/Toast/Toast.tsx +28 -1
- package/src/components/Toggle/Toggle.tsx +34 -32
- package/src/components/Toggle/index.ts +1 -1
- package/src/components/ToggleGroup/ToggleGroup.tsx +17 -0
- package/src/components/ToggleGroup/ToggleGroupItem.tsx +13 -8
- package/src/components/ToggleGroup/ToggleGroupMultiple.tsx +3 -1
- package/src/components/ToggleGroup/ToggleGroupSingle.tsx +3 -1
- package/src/components/ToggleGroup/toggleGroup.types.ts +12 -3
- package/src/components/Tooltip/Tooltip.tsx +6 -0
- package/src/date-time/index.ts +0 -1
- package/src/internal/PickerField.tsx +90 -0
- package/src/internal/SegmentedField.tsx +445 -0
- package/src/internal/index.ts +2 -0
- package/src/theme/index.ts +0 -6
- package/src/theme/recipes/badge.css +140 -0
- package/src/theme/recipes/button.css +167 -0
- package/src/theme/recipes/card.css +26 -0
- package/src/theme/recipes/checkbox.css +44 -0
- package/src/theme/recipes/field.css +14 -0
- package/src/theme/recipes/index.css +28 -0
- package/src/theme/recipes/input.css +29 -0
- package/src/theme/recipes/message.css +47 -0
- package/src/theme/recipes/modal.css +31 -0
- package/src/theme/recipes/radio-button.css +42 -0
- package/src/theme/recipes/search-input.css +16 -0
- package/src/theme/recipes/select.css +105 -0
- package/src/theme/recipes/sheet.css +34 -0
- package/src/theme/recipes/spinner.css +17 -0
- package/src/theme/recipes/switch.css +39 -0
- package/src/theme/recipes/tabs.css +41 -0
- package/src/theme/recipes/tag-chip.css +27 -0
- package/src/theme/recipes/textarea.css +20 -0
- package/src/theme/recipes/toggle.css +92 -0
- package/src/theme/schema.ts +0 -27
- package/src/theme/tokens.css +26 -9
- package/dist/components/Avatar/Avatar.d.ts +0 -6
- package/dist/components/Avatar/Avatar.d.ts.map +0 -1
- package/dist/components/Avatar/Avatar.js +0 -11
- package/dist/components/Avatar/Avatar.js.map +0 -1
- package/dist/components/Avatar/index.d.ts +0 -2
- package/dist/components/Avatar/index.d.ts.map +0 -1
- package/dist/components/Avatar/index.js +0 -2
- package/dist/components/Avatar/index.js.map +0 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +0 -12
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +0 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +0 -19
- package/dist/components/Breadcrumb/Breadcrumb.js.map +0 -1
- package/dist/components/Breadcrumb/index.d.ts +0 -2
- package/dist/components/Breadcrumb/index.d.ts.map +0 -1
- package/dist/components/Breadcrumb/index.js +0 -2
- package/dist/components/Breadcrumb/index.js.map +0 -1
- package/dist/components/ColorDot/ColorDot.d.ts +0 -19
- package/dist/components/ColorDot/ColorDot.d.ts.map +0 -1
- package/dist/components/ColorDot/ColorDot.js +0 -36
- package/dist/components/ColorDot/ColorDot.js.map +0 -1
- package/dist/components/ColorDot/index.d.ts +0 -2
- package/dist/components/ColorDot/index.d.ts.map +0 -1
- package/dist/components/ColorDot/index.js +0 -2
- package/dist/components/ColorDot/index.js.map +0 -1
- package/dist/components/EmptyState/EmptyState.d.ts +0 -26
- package/dist/components/EmptyState/EmptyState.d.ts.map +0 -1
- package/dist/components/EmptyState/EmptyState.js +0 -9
- package/dist/components/EmptyState/EmptyState.js.map +0 -1
- package/dist/components/EmptyState/index.d.ts +0 -2
- package/dist/components/EmptyState/index.d.ts.map +0 -1
- package/dist/components/EmptyState/index.js +0 -2
- package/dist/components/EmptyState/index.js.map +0 -1
- package/dist/components/HeatMap/HeatMapCalendar.d.ts +0 -11
- package/dist/components/HeatMap/HeatMapCalendar.d.ts.map +0 -1
- package/dist/components/HeatMap/HeatMapCalendar.js +0 -68
- package/dist/components/HeatMap/HeatMapCalendar.js.map +0 -1
- package/dist/components/HeatMap/HeatMapMatrix.d.ts +0 -12
- package/dist/components/HeatMap/HeatMapMatrix.d.ts.map +0 -1
- package/dist/components/HeatMap/HeatMapMatrix.js +0 -35
- package/dist/components/HeatMap/HeatMapMatrix.js.map +0 -1
- package/dist/components/HeatMap/heat-map.utils.d.ts +0 -10
- package/dist/components/HeatMap/heat-map.utils.d.ts.map +0 -1
- package/dist/components/HeatMap/heat-map.utils.js +0 -10
- package/dist/components/HeatMap/heat-map.utils.js.map +0 -1
- package/dist/components/HeatMap/index.d.ts +0 -4
- package/dist/components/HeatMap/index.d.ts.map +0 -1
- package/dist/components/HeatMap/index.js +0 -3
- package/dist/components/HeatMap/index.js.map +0 -1
- package/dist/components/MetricList/MetricList.d.ts +0 -9
- package/dist/components/MetricList/MetricList.d.ts.map +0 -1
- package/dist/components/MetricList/MetricList.js +0 -8
- package/dist/components/MetricList/MetricList.js.map +0 -1
- package/dist/components/MetricList/MetricRow.d.ts +0 -13
- package/dist/components/MetricList/MetricRow.d.ts.map +0 -1
- package/dist/components/MetricList/MetricRow.js +0 -13
- package/dist/components/MetricList/MetricRow.js.map +0 -1
- package/dist/components/MetricList/index.d.ts +0 -3
- package/dist/components/MetricList/index.d.ts.map +0 -1
- package/dist/components/MetricList/index.js +0 -3
- package/dist/components/MetricList/index.js.map +0 -1
- package/dist/components/NavBottom/NavBottom.d.ts +0 -16
- package/dist/components/NavBottom/NavBottom.d.ts.map +0 -1
- package/dist/components/NavBottom/NavBottom.js +0 -21
- package/dist/components/NavBottom/NavBottom.js.map +0 -1
- package/dist/components/NavBottom/index.d.ts +0 -3
- package/dist/components/NavBottom/index.d.ts.map +0 -1
- package/dist/components/NavBottom/index.js +0 -2
- package/dist/components/NavBottom/index.js.map +0 -1
- package/dist/components/NavSide/NavItem.d.ts +0 -9
- package/dist/components/NavSide/NavItem.d.ts.map +0 -1
- package/dist/components/NavSide/NavItem.js +0 -13
- package/dist/components/NavSide/NavItem.js.map +0 -1
- package/dist/components/NavSide/NavSide.d.ts +0 -16
- package/dist/components/NavSide/NavSide.d.ts.map +0 -1
- package/dist/components/NavSide/NavSide.js +0 -12
- package/dist/components/NavSide/NavSide.js.map +0 -1
- package/dist/components/NavSide/index.d.ts +0 -3
- package/dist/components/NavSide/index.d.ts.map +0 -1
- package/dist/components/NavSide/index.js +0 -2
- package/dist/components/NavSide/index.js.map +0 -1
- package/dist/components/NavSide/types.d.ts +0 -38
- package/dist/components/NavSide/types.d.ts.map +0 -1
- package/dist/components/NavSide/types.js +0 -2
- package/dist/components/NavSide/types.js.map +0 -1
- package/dist/components/Pagination/Pagination.d.ts +0 -35
- package/dist/components/Pagination/Pagination.d.ts.map +0 -1
- package/dist/components/Pagination/Pagination.js +0 -26
- package/dist/components/Pagination/Pagination.js.map +0 -1
- package/dist/components/Pagination/index.d.ts +0 -3
- package/dist/components/Pagination/index.d.ts.map +0 -1
- package/dist/components/Pagination/index.js +0 -2
- package/dist/components/Pagination/index.js.map +0 -1
- package/dist/components/Skeleton/Skeleton.d.ts +0 -4
- package/dist/components/Skeleton/Skeleton.d.ts.map +0 -1
- package/dist/components/Skeleton/Skeleton.js +0 -9
- package/dist/components/Skeleton/Skeleton.js.map +0 -1
- package/dist/components/Skeleton/index.d.ts +0 -2
- package/dist/components/Skeleton/index.d.ts.map +0 -1
- package/dist/components/Skeleton/index.js +0 -2
- package/dist/components/Skeleton/index.js.map +0 -1
- package/dist/components/StatsCard/StatsCard.d.ts +0 -17
- package/dist/components/StatsCard/StatsCard.d.ts.map +0 -1
- package/dist/components/StatsCard/StatsCard.js +0 -15
- package/dist/components/StatsCard/StatsCard.js.map +0 -1
- package/dist/components/StatsCard/index.d.ts +0 -2
- package/dist/components/StatsCard/index.d.ts.map +0 -1
- package/dist/components/StatsCard/index.js +0 -2
- package/dist/components/StatsCard/index.js.map +0 -1
- package/src/components/Avatar/Avatar.tsx +0 -19
- package/src/components/Avatar/index.ts +0 -1
- package/src/components/Breadcrumb/Breadcrumb.tsx +0 -47
- package/src/components/Breadcrumb/index.ts +0 -5
- package/src/components/ColorDot/ColorDot.tsx +0 -52
- package/src/components/ColorDot/index.ts +0 -1
- package/src/components/EmptyState/EmptyState.tsx +0 -30
- package/src/components/EmptyState/index.ts +0 -1
- package/src/components/HeatMap/HeatMapCalendar.tsx +0 -127
- package/src/components/HeatMap/HeatMapMatrix.tsx +0 -75
- package/src/components/HeatMap/heat-map.utils.ts +0 -15
- package/src/components/HeatMap/index.ts +0 -3
- package/src/components/MetricList/MetricList.tsx +0 -18
- package/src/components/MetricList/MetricRow.tsx +0 -30
- package/src/components/MetricList/index.ts +0 -2
- package/src/components/NavBottom/NavBottom.tsx +0 -55
- package/src/components/NavBottom/index.ts +0 -3
- package/src/components/NavSide/NavItem.tsx +0 -39
- package/src/components/NavSide/NavSide.tsx +0 -42
- package/src/components/NavSide/index.ts +0 -2
- package/src/components/NavSide/types.ts +0 -36
- package/src/components/Pagination/Pagination.tsx +0 -86
- package/src/components/Pagination/index.ts +0 -2
- package/src/components/Skeleton/Skeleton.tsx +0 -9
- package/src/components/Skeleton/index.ts +0 -1
- package/src/components/StatsCard/StatsCard.tsx +0 -41
- package/src/components/StatsCard/index.ts +0 -1
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Button recipe — the component-token layer for Button.
|
|
3
|
+
*
|
|
4
|
+
* This is the mapping from `(variant, intent, state)` to a semantic token. It
|
|
5
|
+
* used to live in `compoundVariants` inside Button.tsx, where it was compiled
|
|
6
|
+
* into class-name literals and no consumer could reach it. Here it is data, so
|
|
7
|
+
* a consumer can re-point a cell, scope a change to a subtree, or add a variant
|
|
8
|
+
* or intent the library never shipped.
|
|
9
|
+
*
|
|
10
|
+
* The grammar is `--button-{context}[-{state}]` — the same `context` and
|
|
11
|
+
* `state` words the semantic layer uses (src/theme/schema.ts). Note what is
|
|
12
|
+
* deliberately *absent*: intent and weight never appear in a token name. They
|
|
13
|
+
* select, via the `data-` attributes below. Putting them in the name
|
|
14
|
+
* (`--button-bg-danger`) would restore the combinatorial explosion this layer
|
|
15
|
+
* exists to remove, and would leave a consumer unable to add an intent, because
|
|
16
|
+
* the variable for it would not exist.
|
|
17
|
+
*
|
|
18
|
+
* `@layer components` is load-bearing, not tidiness. The cascade compares
|
|
19
|
+
* layers before specificity, and unlayered author CSS outranks any layered
|
|
20
|
+
* author CSS — so a consumer's `.btn { ... }` (0,1,0) beats the cell rules
|
|
21
|
+
* below (0,3,0) without an `!important`. The corollary is a trap worth knowing:
|
|
22
|
+
* an override written *inside* a layer is compared on specificity again, and
|
|
23
|
+
* silently loses. Consumer overrides go unlayered.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
@layer components {
|
|
27
|
+
/* The floor. Applies when no cell below matches — an intent a consumer has
|
|
28
|
+
added but not yet styled renders as a plain, legible button rather than
|
|
29
|
+
something broken. `transparent` is what Tailwind's preflight already gives
|
|
30
|
+
a <button>, so this is the resting default, not a new opinion. */
|
|
31
|
+
.btn {
|
|
32
|
+
--button-bg: transparent;
|
|
33
|
+
--button-bg-hovered: var(--button-bg); /* no shift on hover */
|
|
34
|
+
--button-bg-pressed: var(--button-bg-hovered);
|
|
35
|
+
--button-fg: var(--fg-normal);
|
|
36
|
+
--button-border: var(--border-normal);
|
|
37
|
+
--button-ring: var(--focus-ring);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* solid — a filled surface, with text read on top of it. The `fg-on-*`
|
|
41
|
+
partner is the pairing check-contrast.ts verifies, so these four cells
|
|
42
|
+
inherit that guarantee rather than restating it. */
|
|
43
|
+
.btn[data-variant="solid"][data-intent="brand"] {
|
|
44
|
+
--button-bg: var(--bg-brand);
|
|
45
|
+
--button-bg-hovered: var(--bg-brand-hovered);
|
|
46
|
+
--button-bg-pressed: var(--bg-brand-pressed);
|
|
47
|
+
--button-fg: var(--fg-on-brand);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* `neutral` means *no colour family* — the grey tiers. It used to resolve to
|
|
51
|
+
the brand fill, which made `intent="neutral"` mean one thing on Button and
|
|
52
|
+
another on Badge and Message, where it was already grey. Button
|
|
53
|
+
was the outlier; this is the cell that ends that. A brand-coloured button
|
|
54
|
+
is now `intent="brand"`, which is also Button's default, so a bare
|
|
55
|
+
`<Button>` is unchanged. */
|
|
56
|
+
.btn[data-variant="solid"][data-intent="neutral"] {
|
|
57
|
+
--button-bg: var(--bg-strong);
|
|
58
|
+
--button-bg-hovered: var(--bg-strong-hovered);
|
|
59
|
+
--button-bg-pressed: var(--bg-strong-pressed);
|
|
60
|
+
--button-fg: var(--fg-on-strong);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.btn[data-variant="solid"][data-intent="danger"] {
|
|
64
|
+
--button-bg: var(--bg-danger);
|
|
65
|
+
--button-bg-hovered: var(--bg-danger-hovered);
|
|
66
|
+
--button-bg-pressed: var(--bg-danger-pressed);
|
|
67
|
+
--button-fg: var(--fg-on-danger);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.btn[data-variant="solid"][data-intent="success"] {
|
|
71
|
+
--button-bg: var(--bg-success);
|
|
72
|
+
--button-bg-hovered: var(--bg-success-hovered);
|
|
73
|
+
--button-bg-pressed: var(--bg-success-pressed);
|
|
74
|
+
--button-fg: var(--fg-on-success);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.btn[data-variant="solid"][data-intent="warning"] {
|
|
78
|
+
--button-bg: var(--bg-warning);
|
|
79
|
+
--button-bg-hovered: var(--bg-warning-hovered);
|
|
80
|
+
--button-bg-pressed: var(--bg-warning-pressed);
|
|
81
|
+
--button-fg: var(--fg-on-warning);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* outline carries a resting surface; ghost does not. Beyond that their
|
|
85
|
+
colour recipes are identical, so the text colour and the hover/pressed wash
|
|
86
|
+
are shared per intent and only the two lines below differ. */
|
|
87
|
+
.btn[data-variant="outline"] {
|
|
88
|
+
--button-bg: var(--bg-normal);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* `neutral` here needed no change: outline and ghost were already grey — it
|
|
92
|
+
was only the solid and link cells that read as brand. */
|
|
93
|
+
.btn[data-variant="outline"][data-intent="neutral"],
|
|
94
|
+
.btn[data-variant="ghost"][data-intent="neutral"] {
|
|
95
|
+
--button-bg-hovered: var(--bg-subtle-hovered);
|
|
96
|
+
--button-bg-pressed: var(--bg-subtle-pressed);
|
|
97
|
+
--button-fg: var(--fg-normal);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.btn[data-variant="outline"][data-intent="brand"],
|
|
101
|
+
.btn[data-variant="ghost"][data-intent="brand"] {
|
|
102
|
+
--button-bg-hovered: var(--bg-brand-subtle-hovered);
|
|
103
|
+
--button-bg-pressed: var(--bg-brand-subtle-pressed);
|
|
104
|
+
--button-fg: var(--fg-brand);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.btn[data-variant="outline"][data-intent="danger"],
|
|
108
|
+
.btn[data-variant="ghost"][data-intent="danger"] {
|
|
109
|
+
--button-bg-hovered: var(--bg-danger-subtle-hovered);
|
|
110
|
+
--button-bg-pressed: var(--bg-danger-subtle-pressed);
|
|
111
|
+
--button-fg: var(--fg-danger);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.btn[data-variant="outline"][data-intent="success"],
|
|
115
|
+
.btn[data-variant="ghost"][data-intent="success"] {
|
|
116
|
+
--button-bg-hovered: var(--bg-success-subtle-hovered);
|
|
117
|
+
--button-bg-pressed: var(--bg-success-subtle-pressed);
|
|
118
|
+
--button-fg: var(--fg-success);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.btn[data-variant="outline"][data-intent="warning"],
|
|
122
|
+
.btn[data-variant="ghost"][data-intent="warning"] {
|
|
123
|
+
--button-bg-hovered: var(--bg-warning-subtle-hovered);
|
|
124
|
+
--button-bg-pressed: var(--bg-warning-subtle-pressed);
|
|
125
|
+
--button-fg: var(--fg-warning);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* The border belongs to outline alone. Ghost has no border width, so folding
|
|
129
|
+
these into the blocks above would be invisible today — and a silent
|
|
130
|
+
semantic change the moment anyone gave ghost a border. A consumer who wants
|
|
131
|
+
that can still say so in one line; it should be their decision, not a
|
|
132
|
+
side-effect of how this file was factored. `neutral` needs no rule: the
|
|
133
|
+
floor's `border-normal` is already right. */
|
|
134
|
+
.btn[data-variant="outline"][data-intent="brand"] {
|
|
135
|
+
--button-border: var(--border-brand);
|
|
136
|
+
}
|
|
137
|
+
.btn[data-variant="outline"][data-intent="danger"] {
|
|
138
|
+
--button-border: var(--border-danger);
|
|
139
|
+
}
|
|
140
|
+
.btn[data-variant="outline"][data-intent="success"] {
|
|
141
|
+
--button-border: var(--border-success);
|
|
142
|
+
}
|
|
143
|
+
.btn[data-variant="outline"][data-intent="warning"] {
|
|
144
|
+
--button-border: var(--border-warning);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* link — no surface in any state; only the text carries colour, so the
|
|
148
|
+
floor's transparent background and its no-shift-on-hover chain both stand.
|
|
149
|
+
A link button reads as brand-coloured by default because `brand` is
|
|
150
|
+
Button's default intent — not because `neutral` was quietly redefined to
|
|
151
|
+
mean brand, which is what this cell used to do. */
|
|
152
|
+
.btn[data-variant="link"][data-intent="brand"] {
|
|
153
|
+
--button-fg: var(--fg-brand);
|
|
154
|
+
}
|
|
155
|
+
.btn[data-variant="link"][data-intent="neutral"] {
|
|
156
|
+
--button-fg: var(--fg-normal);
|
|
157
|
+
}
|
|
158
|
+
.btn[data-variant="link"][data-intent="danger"] {
|
|
159
|
+
--button-fg: var(--fg-danger);
|
|
160
|
+
}
|
|
161
|
+
.btn[data-variant="link"][data-intent="success"] {
|
|
162
|
+
--button-fg: var(--fg-success);
|
|
163
|
+
}
|
|
164
|
+
.btn[data-variant="link"][data-intent="warning"] {
|
|
165
|
+
--button-fg: var(--fg-warning);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Card recipe — the component-token layer for Card.
|
|
3
|
+
*
|
|
4
|
+
* Card has no variant/intent axis — every instance uses the same fixed
|
|
5
|
+
* semantic tokens the old plain class string named directly. This file just
|
|
6
|
+
* gives those tokens a name, so a consumer can re-point a cell or scope a
|
|
7
|
+
* change to a subtree without a release.
|
|
8
|
+
*
|
|
9
|
+
* The grammar is `--card-{context}[-{state}]`, context in {bg, fg, border,
|
|
10
|
+
* ring} — the same words the semantic layer uses. `--card-ring` backs the
|
|
11
|
+
* `outline-*` utilities on the interactive (clickable) variant: it plays the
|
|
12
|
+
* same role `--button-ring` plays for `ring-*`, just via a different Tailwind
|
|
13
|
+
* utility, so it keeps the `ring` context name rather than inventing one.
|
|
14
|
+
*
|
|
15
|
+
* `@layer components` is load-bearing, not tidiness — see button.css.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
@layer components {
|
|
19
|
+
.card {
|
|
20
|
+
--card-bg: var(--bg-normal);
|
|
21
|
+
--card-border: var(--border-normal);
|
|
22
|
+
--card-border-hovered: var(--border-strong);
|
|
23
|
+
--card-fg: var(--fg-normal);
|
|
24
|
+
--card-ring: var(--border-strong);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkbox recipe — the component-token layer for Checkbox.
|
|
3
|
+
*
|
|
4
|
+
* Checkbox has no variant/intent axis for colour, unlike Button — every
|
|
5
|
+
* colour is a fixed semantic token today. The only axis is `data-state`,
|
|
6
|
+
* already rendered by Checkbox.tsx as "unchecked" | "checked" |
|
|
7
|
+
* "indeterminate", so this file maps that state to the four `--checkbox-*`
|
|
8
|
+
* tokens the class string reads via `bg-(--checkbox-bg)`,
|
|
9
|
+
* `border-(color:--checkbox-border)`, `text-(--checkbox-fg)` and
|
|
10
|
+
* `focus-visible:ring-(color:--checkbox-ring)`.
|
|
11
|
+
*
|
|
12
|
+
* disabled is deliberately absent: Checkbox dims via `disabled:opacity-50`
|
|
13
|
+
* rather than swapping a colour, so it needs no state cell here.
|
|
14
|
+
*
|
|
15
|
+
* `@layer components` is load-bearing, not tidiness — see button.css.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
@layer components {
|
|
19
|
+
/* The floor — resting, unchecked. Border and ring are constant across every
|
|
20
|
+
state (the old class applied `border-border-brand` unconditionally), so
|
|
21
|
+
they live here rather than in a cell. `--checkbox-fg` is deliberately
|
|
22
|
+
*not* set here: the old class applied no text-colour utility while
|
|
23
|
+
unchecked, so the box inherited its color from an ancestor (`body`'s
|
|
24
|
+
`text-fg-normal`, in practice). Leaving the token undefined reproduces
|
|
25
|
+
that — an unset custom property in `color: var(--checkbox-fg)` is
|
|
26
|
+
invalid at computed-value time, which for an inherited property like
|
|
27
|
+
`color` resolves to the inherited value, not a fixed one. Setting a
|
|
28
|
+
value here would pin unchecked to `fg-normal` even where an ancestor had
|
|
29
|
+
overridden the inherited color, which is not what the old markup did. */
|
|
30
|
+
.checkbox {
|
|
31
|
+
--checkbox-bg: transparent;
|
|
32
|
+
--checkbox-border: var(--border-brand);
|
|
33
|
+
--checkbox-ring: var(--focus-ring);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* checked and indeterminate both fill the box and read the tick/dash on
|
|
37
|
+
top of it — the same pairing the old class applied via
|
|
38
|
+
`(isChecked || isIndeterminate) && "bg-bg-brand text-fg-on-brand"`. */
|
|
39
|
+
.checkbox[data-state="checked"],
|
|
40
|
+
.checkbox[data-state="indeterminate"] {
|
|
41
|
+
--checkbox-bg: var(--bg-brand);
|
|
42
|
+
--checkbox-fg: var(--fg-on-brand);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field recipe — the component-token layer for Field.
|
|
3
|
+
*
|
|
4
|
+
* Field's label and value both read the same semantic token (`fg-subtle`)
|
|
5
|
+
* today, in every layout and mono/proportional combination, so one token
|
|
6
|
+
* covers the whole component. See button.css's header for why
|
|
7
|
+
* `@layer components` is load-bearing.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@layer components {
|
|
11
|
+
.field {
|
|
12
|
+
--field-fg: var(--fg-subtle);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tier 3 — the component recipes.
|
|
3
|
+
*
|
|
4
|
+
* One file per component, aggregated here so `tokens.css` has a single import
|
|
5
|
+
* and adding a component does not touch a file anyone else is editing. Each
|
|
6
|
+
* recipe maps `(variant, intent, state)` to a semantic token; see button.css
|
|
7
|
+
* for the pattern and the reasoning behind `@layer components`.
|
|
8
|
+
*/
|
|
9
|
+
@import "./button.css";
|
|
10
|
+
@import "./badge.css";
|
|
11
|
+
@import "./message.css";
|
|
12
|
+
@import "./spinner.css";
|
|
13
|
+
@import "./tabs.css";
|
|
14
|
+
@import "./toggle.css";
|
|
15
|
+
|
|
16
|
+
/* Form controls and surfaces — the components consumers most often restyle. */
|
|
17
|
+
@import "./input.css";
|
|
18
|
+
@import "./textarea.css";
|
|
19
|
+
@import "./search-input.css";
|
|
20
|
+
@import "./field.css";
|
|
21
|
+
@import "./checkbox.css";
|
|
22
|
+
@import "./radio-button.css";
|
|
23
|
+
@import "./switch.css";
|
|
24
|
+
@import "./card.css";
|
|
25
|
+
@import "./modal.css";
|
|
26
|
+
@import "./sheet.css";
|
|
27
|
+
@import "./select.css";
|
|
28
|
+
@import "./tag-chip.css";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input recipe — the component-token layer for Input.
|
|
3
|
+
*
|
|
4
|
+
* Input has no variant/intent axis for colour, unlike Button — every colour is
|
|
5
|
+
* a fixed semantic token today. This file exists anyway so a consumer can
|
|
6
|
+
* re-point a cell (or scope an override to a subtree) without a release, the
|
|
7
|
+
* same reason button.css and message.css exist. One floor block, no cells: see
|
|
8
|
+
* button.css's header for what `@layer components` buys and why it is
|
|
9
|
+
* load-bearing, not tidiness.
|
|
10
|
+
*
|
|
11
|
+
* The grammar is `--input-{part}-{context}`, context in {bg, fg, border, ring}.
|
|
12
|
+
* `file` and `icon` are parts (the file-picker button, the icon/adornment
|
|
13
|
+
* slot) that happen to share their resting value with the input's own
|
|
14
|
+
* bg/border today — each still gets its own token, because a consumer wanting
|
|
15
|
+
* a different file-button background or icon colour needs a variable that
|
|
16
|
+
* exists, not a shared one they'd have to fork.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
@layer components {
|
|
20
|
+
.input {
|
|
21
|
+
--input-bg: var(--bg-normal);
|
|
22
|
+
--input-border: var(--border-normal);
|
|
23
|
+
--input-ring: var(--focus-ring);
|
|
24
|
+
--input-placeholder-fg: var(--fg-subtle);
|
|
25
|
+
--input-file-bg: var(--input-bg);
|
|
26
|
+
--input-file-fg: var(--fg-normal);
|
|
27
|
+
--input-icon-fg: var(--fg-subtle);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message recipe — the component-token layer for Message.
|
|
3
|
+
*
|
|
4
|
+
* Message has one colour-bearing variant, `intent`, with four values. Each
|
|
5
|
+
* cell sets border + bg + fg together, exactly as the old `cva` `variants.intent`
|
|
6
|
+
* map did — this file is that map, moved to CSS so a consumer can re-point a
|
|
7
|
+
* cell or add an intent the library never shipped. `size` is pure geometry
|
|
8
|
+
* (padding, gap, font-size) and stays in Message.tsx's `cva` call; nothing
|
|
9
|
+
* here concerns it.
|
|
10
|
+
*
|
|
11
|
+
* The grammar is `--message-{context}`, context in {bg, fg, border}. Intent
|
|
12
|
+
* never appears in a token name — see button.css's header for why: it would
|
|
13
|
+
* restore the combinatorial explosion this layer exists to remove, and would
|
|
14
|
+
* leave a consumer unable to add an intent, because the variable for it would
|
|
15
|
+
* not exist. Intent selects entirely via `data-intent`.
|
|
16
|
+
*
|
|
17
|
+
* `@layer components` is load-bearing, not tidiness — see button.css.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
@layer components {
|
|
21
|
+
/* The floor. Applies when no cell below matches — an intent a consumer has
|
|
22
|
+
added but not yet styled still renders as a plain, legible message rather
|
|
23
|
+
than something broken. */
|
|
24
|
+
.message {
|
|
25
|
+
--message-bg: var(--bg-normal);
|
|
26
|
+
--message-fg: var(--fg-normal);
|
|
27
|
+
--message-border: var(--border-normal);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.message[data-intent="success"] {
|
|
31
|
+
--message-bg: var(--bg-success-subtle);
|
|
32
|
+
--message-fg: var(--fg-on-success-subtle);
|
|
33
|
+
--message-border: var(--border-success);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.message[data-intent="warning"] {
|
|
37
|
+
--message-bg: var(--bg-warning-subtle);
|
|
38
|
+
--message-fg: var(--fg-on-warning-subtle);
|
|
39
|
+
--message-border: var(--border-warning);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.message[data-intent="danger"] {
|
|
43
|
+
--message-bg: var(--bg-danger-subtle);
|
|
44
|
+
--message-fg: var(--fg-on-danger-subtle);
|
|
45
|
+
--message-border: var(--border-danger);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal recipe — the component-token layer for Modal.
|
|
3
|
+
*
|
|
4
|
+
* Modal has no variant/intent axis, but it is multi-part: an overlay
|
|
5
|
+
* (backdrop), a panel, and a close button that lives inside `Modal.Header`.
|
|
6
|
+
* Each part gets its own class hook so the grammar's `part` segment has
|
|
7
|
+
* something to select on: `--modal-{part}-{context}[-{state}]`.
|
|
8
|
+
*
|
|
9
|
+
* `.modal-close` is scoped separately from `.modal-header` (which carries no
|
|
10
|
+
* colour of its own — the old header had no border) because the close button
|
|
11
|
+
* is the only colour-bearing thing inside it.
|
|
12
|
+
*
|
|
13
|
+
* `@layer components` is load-bearing, not tidiness — see button.css.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
@layer components {
|
|
17
|
+
.modal {
|
|
18
|
+
--modal-bg: var(--bg-normal);
|
|
19
|
+
--modal-border: var(--border-normal);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.modal-overlay {
|
|
23
|
+
--modal-overlay-bg: var(--bg-overlay);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.modal-close {
|
|
27
|
+
--modal-close-fg: var(--fg-subtle);
|
|
28
|
+
--modal-close-fg-hovered: var(--fg-normal);
|
|
29
|
+
--modal-close-bg-hovered: var(--bg-subtle);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RadioButton recipe — the component-token layer for RadioButton.
|
|
3
|
+
*
|
|
4
|
+
* RadioButton has no variant/intent axis for colour, unlike Button — every
|
|
5
|
+
* colour is a fixed semantic token today. The only axis is `data-state`,
|
|
6
|
+
* already rendered by RadioButton.tsx as "unchecked" | "checked", so this
|
|
7
|
+
* file maps that state to the four `--radio-button-*` tokens the class
|
|
8
|
+
* string reads via `bg-(--radio-button-bg)`,
|
|
9
|
+
* `border-(color:--radio-button-border)`, `text-(--radio-button-fg)` and
|
|
10
|
+
* `focus-visible:ring-(color:--radio-button-ring)`.
|
|
11
|
+
*
|
|
12
|
+
* disabled is deliberately absent: RadioButton dims via
|
|
13
|
+
* `disabled:opacity-50` rather than swapping a colour, so it needs no state
|
|
14
|
+
* cell here.
|
|
15
|
+
*
|
|
16
|
+
* `@layer components` is load-bearing, not tidiness — see button.css.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
@layer components {
|
|
20
|
+
/* The floor — resting, unchecked. Border and ring are constant across every
|
|
21
|
+
state (the old class applied `border-border-brand` unconditionally), so
|
|
22
|
+
they live here rather than in a cell. `--radio-button-fg` is deliberately
|
|
23
|
+
*not* set here: the old class applied no text-colour utility while
|
|
24
|
+
unchecked, so the circle inherited its color from an ancestor (`body`'s
|
|
25
|
+
`text-fg-normal`, in practice). Leaving the token undefined reproduces
|
|
26
|
+
that — an unset custom property in `color: var(--radio-button-fg)` is
|
|
27
|
+
invalid at computed-value time, which for an inherited property like
|
|
28
|
+
`color` resolves to the inherited value, not a fixed one. */
|
|
29
|
+
.radio-button {
|
|
30
|
+
--radio-button-bg: transparent;
|
|
31
|
+
--radio-button-border: var(--border-brand);
|
|
32
|
+
--radio-button-ring: var(--focus-ring);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* checked fills the circle and reads the dot on top of it — the same
|
|
36
|
+
pairing the old class applied via `checked && "bg-bg-brand
|
|
37
|
+
text-fg-on-brand"`. */
|
|
38
|
+
.radio-button[data-state="checked"] {
|
|
39
|
+
--radio-button-bg: var(--bg-brand);
|
|
40
|
+
--radio-button-fg: var(--fg-on-brand);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SearchInput recipe — the component-token layer for SearchInput.
|
|
3
|
+
*
|
|
4
|
+
* SearchInput renders `Input` for its field, so every input-surface colour
|
|
5
|
+
* (background, border, ring, placeholder, icon) already comes from
|
|
6
|
+
* `.input`'s tokens in input.css — duplicating them here would just be a
|
|
7
|
+
* second name for the same cell. The only colour SearchInput contributes
|
|
8
|
+
* itself is the clear button's hover wash, which is why this file is a single
|
|
9
|
+
* token rather than empty.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
@layer components {
|
|
13
|
+
.search-input {
|
|
14
|
+
--search-input-clear-bg-hovered: var(--bg-subtle);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Select recipe — the component-token layer for Select.
|
|
3
|
+
*
|
|
4
|
+
* Select has no variant/intent axis of its own — every colour was a fixed
|
|
5
|
+
* semantic class before this conversion (`bg-bg-normal`, `border-border-normal`,
|
|
6
|
+
* …), so there is no cell matrix here the way there is in button.css. This file
|
|
7
|
+
* exists so a consumer can re-point one of those fixed colours, or scope a
|
|
8
|
+
* change to a subtree, without a release.
|
|
9
|
+
*
|
|
10
|
+
* Select is multi-part, so the grammar carries a `part` segment:
|
|
11
|
+
* `--select-{part}-{context}[-{state}]`, context in {bg, fg, border, ring}.
|
|
12
|
+
*
|
|
13
|
+
* Two states select via an attribute rather than a name suffix, following
|
|
14
|
+
* tabs.css's `data-selected` precedent:
|
|
15
|
+
*
|
|
16
|
+
* - `aria-selected="true"` on `.select-option` — already rendered by
|
|
17
|
+
* SelectDropdown.tsx for the `role="option"` contract, so this reuses it
|
|
18
|
+
* rather than inventing a second attribute for the same fact.
|
|
19
|
+
* - `data-highlighted="true"` on `.select-option` — nothing in the
|
|
20
|
+
* pre-refactor DOM carried the keyboard/mouse "current" option as an
|
|
21
|
+
* attribute (it was computed straight into a class string from
|
|
22
|
+
* `highlightedIndex` in SelectDropdown.tsx), so SelectDropdown.tsx now
|
|
23
|
+
* renders it. `highlightedIndex` itself is driven by Select.tsx's
|
|
24
|
+
* `onHighlight`/`setHighlightedIndex`, which useSelectKeyboard.ts's
|
|
25
|
+
* ArrowUp/ArrowDown/Home/End/typeahead handling calls into — i.e. the
|
|
26
|
+
* same state that already existed, now surfaced as an attribute instead
|
|
27
|
+
* of being compiled directly into a class name.
|
|
28
|
+
*
|
|
29
|
+
* The multi-select checkbox indicator reads its own `data-selected="true"`
|
|
30
|
+
* (mirroring tabs.css) rather than the ARIA one — it is a decorative `<span>`
|
|
31
|
+
* with no ARIA role, so `aria-selected` on it would be an invalid-attribute
|
|
32
|
+
* a11y violation.
|
|
33
|
+
*
|
|
34
|
+
* `@layer components` is load-bearing, not tidiness — see button.css for the
|
|
35
|
+
* cascade reasoning.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
@layer components {
|
|
39
|
+
/* ---------------------------------------------------------------------
|
|
40
|
+
trigger — shared by both the button trigger (SelectTriggerButton) and
|
|
41
|
+
the searchable input trigger (SelectTriggerSearch): same look, same
|
|
42
|
+
tokens, one class hook on both root elements. */
|
|
43
|
+
.select-trigger {
|
|
44
|
+
--select-trigger-bg: var(--bg-normal);
|
|
45
|
+
--select-trigger-bg-hovered: var(--bg-subtle);
|
|
46
|
+
--select-trigger-fg: var(--fg-normal);
|
|
47
|
+
--select-trigger-border: var(--border-normal);
|
|
48
|
+
--select-trigger-ring: var(--focus-ring);
|
|
49
|
+
/* Chevron in both triggers, and the clear button's resting colour. */
|
|
50
|
+
--select-trigger-icon-fg: var(--fg-subtle);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* clear ("x") button inside the button trigger. */
|
|
54
|
+
.select-trigger-clear {
|
|
55
|
+
--select-trigger-clear-fg: var(--fg-subtle);
|
|
56
|
+
--select-trigger-clear-fg-hovered: var(--fg-normal);
|
|
57
|
+
--select-trigger-clear-bg-hovered: var(--bg-subtle);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* ---------------------------------------------------------------------
|
|
61
|
+
dropdown — the listbox surface. */
|
|
62
|
+
.select-dropdown {
|
|
63
|
+
--select-dropdown-bg: var(--bg-normal);
|
|
64
|
+
--select-dropdown-border: var(--border-normal);
|
|
65
|
+
/* Inherited by the "no options" message, a plain child div. */
|
|
66
|
+
--select-dropdown-empty-fg: var(--fg-subtle);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* ---------------------------------------------------------------------
|
|
70
|
+
option — one row in the dropdown. The floor is the unselected,
|
|
71
|
+
unhighlighted look: no surface, quiet text. */
|
|
72
|
+
.select-option {
|
|
73
|
+
--select-option-bg: transparent;
|
|
74
|
+
--select-option-fg: var(--fg-subtle);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.select-option[aria-selected="true"] {
|
|
78
|
+
--select-option-fg: var(--fg-normal);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.select-option[data-highlighted="true"] {
|
|
82
|
+
--select-option-bg: var(--bg-subtle);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* ---------------------------------------------------------------------
|
|
86
|
+
option indicator — the multi-select checkbox square. Unselected shows
|
|
87
|
+
only a border; selected fills with the brand pairing that
|
|
88
|
+
check-contrast.ts verifies. `--select-option-indicator-fg` is
|
|
89
|
+
deliberately unset at rest (not `transparent`): the pre-refactor markup
|
|
90
|
+
set no text colour class on the unselected indicator at all, so it read
|
|
91
|
+
`.select-option`'s own colour by ordinary inheritance. An unset custom
|
|
92
|
+
property referenced by `color` — an inherited property — falls back to
|
|
93
|
+
that inherited value per spec, reproducing the same result; setting it
|
|
94
|
+
explicitly here would pin a colour the original never had. */
|
|
95
|
+
.select-option-indicator {
|
|
96
|
+
--select-option-indicator-bg: transparent;
|
|
97
|
+
--select-option-indicator-border: var(--border-normal);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.select-option-indicator[data-selected="true"] {
|
|
101
|
+
--select-option-indicator-bg: var(--bg-brand);
|
|
102
|
+
--select-option-indicator-fg: var(--fg-on-brand);
|
|
103
|
+
--select-option-indicator-border: var(--border-brand);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sheet recipe — the component-token layer for Sheet.
|
|
3
|
+
*
|
|
4
|
+
* Sheet has no variant/intent axis, but it is multi-part: a panel, a header
|
|
5
|
+
* with a bottom border and a close button, and a footer with a top border.
|
|
6
|
+
* Each part gets its own class hook so the grammar's `part` segment has
|
|
7
|
+
* something to select on: `--sheet-{part}-{context}[-{state}]`.
|
|
8
|
+
*
|
|
9
|
+
* Unlike Modal, Sheet renders no backdrop — it is a persistent workspace, not
|
|
10
|
+
* a transient overlay — so there is no `.sheet-overlay` cell here.
|
|
11
|
+
*
|
|
12
|
+
* `@layer components` is load-bearing, not tidiness — see button.css.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
@layer components {
|
|
16
|
+
.sheet {
|
|
17
|
+
--sheet-bg: var(--bg-normal);
|
|
18
|
+
--sheet-border: var(--border-normal);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.sheet-header {
|
|
22
|
+
--sheet-header-border: var(--border-normal);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.sheet-footer {
|
|
26
|
+
--sheet-footer-border: var(--border-normal);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.sheet-close {
|
|
30
|
+
--sheet-close-fg: var(--fg-subtle);
|
|
31
|
+
--sheet-close-fg-hovered: var(--fg-normal);
|
|
32
|
+
--sheet-close-bg-hovered: var(--bg-subtle);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spinner recipe — the component-token layer for Spinner.
|
|
3
|
+
*
|
|
4
|
+
* Spinner has exactly one colour, and no intent — nothing here selects on a
|
|
5
|
+
* `data-*` attribute, because there is nothing to select between. The point is
|
|
6
|
+
* narrower than Button or Message's: a consumer previously had no token to
|
|
7
|
+
* hook to recolour a spinner, only `className` fighting the base string's
|
|
8
|
+
* `text-fg-subtle`. `--spinner-fg` gives them a seam.
|
|
9
|
+
*
|
|
10
|
+
* `@layer components` is load-bearing, not tidiness — see button.css.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@layer components {
|
|
14
|
+
.spinner {
|
|
15
|
+
--spinner-fg: var(--fg-subtle);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Switch recipe — the component-token layer for Switch.
|
|
3
|
+
*
|
|
4
|
+
* Switch has no variant/intent axis for colour, unlike Button — every colour
|
|
5
|
+
* is a fixed semantic token today. The only axis is `data-state`, already
|
|
6
|
+
* rendered by Switch.tsx as "unchecked" | "checked", so this file maps that
|
|
7
|
+
* state to the track token (`--switch-bg`, read via `bg-(--switch-bg)`) plus
|
|
8
|
+
* the two tokens for the moving thumb, treated as a `part`
|
|
9
|
+
* (`--switch-thumb-bg`, `--switch-thumb-fg`) since it is a sub-element of
|
|
10
|
+
* the track, not a separate component. The thumb never changes colour
|
|
11
|
+
* between states — only its position does, which stays a plain
|
|
12
|
+
* `translate-x-*` class in Switch.tsx — so it needs no state cell, just a
|
|
13
|
+
* floor. Custom properties inherit from the track button down into the
|
|
14
|
+
* thumb `<span>`, so no separate class is needed to carry the value there;
|
|
15
|
+
* `switch-thumb` exists purely as a stable hook for a consumer who wants to
|
|
16
|
+
* scope an override to the thumb specifically.
|
|
17
|
+
*
|
|
18
|
+
* disabled is deliberately absent: Switch dims via `disabled:opacity-50`
|
|
19
|
+
* rather than swapping a colour, so it needs no state cell here.
|
|
20
|
+
*
|
|
21
|
+
* `@layer components` is load-bearing, not tidiness — see button.css.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
@layer components {
|
|
25
|
+
/* The floor — resting, unchecked. Ring is constant across every state, so
|
|
26
|
+
it lives here rather than in a cell. */
|
|
27
|
+
.switch {
|
|
28
|
+
--switch-bg: var(--bg-subtle);
|
|
29
|
+
--switch-ring: var(--focus-ring);
|
|
30
|
+
--switch-thumb-bg: var(--bg-normal);
|
|
31
|
+
--switch-thumb-fg: var(--fg-subtle);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* checked fills the track — the same swap the old class applied via
|
|
35
|
+
`checked ? "bg-bg-brand" : "bg-bg-subtle"`. */
|
|
36
|
+
.switch[data-state="checked"] {
|
|
37
|
+
--switch-bg: var(--bg-brand);
|
|
38
|
+
}
|
|
39
|
+
}
|