@sixthshift/design-system 0.2.1 → 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 +242 -33
- package/dist/components/Badge/Badge.d.ts +65 -7
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +56 -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 +20 -2
- package/dist/components/BarChart/BarChart.d.ts.map +1 -1
- package/dist/components/BarChart/BarChart.js +17 -3
- 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 +31 -1
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +94 -225
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Calendar/CalendarView.d.ts +15 -0
- package/dist/components/Calendar/CalendarView.d.ts.map +1 -0
- package/dist/components/Calendar/CalendarView.js +263 -0
- package/dist/components/Calendar/CalendarView.js.map +1 -0
- package/dist/components/Calendar/calendar.types.d.ts +87 -27
- package/dist/components/Calendar/calendar.types.d.ts.map +1 -1
- package/dist/components/Calendar/calendar.types.js +10 -3
- package/dist/components/Calendar/calendar.types.js.map +1 -1
- package/dist/components/Calendar/index.d.ts +16 -2
- package/dist/components/Calendar/index.d.ts.map +1 -1
- package/dist/components/Calendar/index.js +15 -1
- package/dist/components/Calendar/index.js.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 +45 -2
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +228 -11
- 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 +53 -37
- package/dist/components/DatePicker/datepicker.types.d.ts.map +1 -1
- package/dist/components/DatePicker/datepicker.types.js +5 -3
- package/dist/components/DatePicker/datepicker.types.js.map +1 -1
- package/dist/components/DatePicker/index.d.ts +10 -1
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +8 -0
- package/dist/components/DatePicker/index.js.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +22 -3
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +38 -24
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/DateRangePicker/daterangepicker.types.d.ts +26 -21
- package/dist/components/DateRangePicker/daterangepicker.types.d.ts.map +1 -1
- package/dist/components/DateRangePicker/daterangepicker.types.js +6 -0
- package/dist/components/DateRangePicker/daterangepicker.types.js.map +1 -1
- package/dist/components/DateRangePicker/index.d.ts +8 -1
- package/dist/components/DateRangePicker/index.d.ts.map +1 -1
- package/dist/components/DateRangePicker/index.js +6 -0
- package/dist/components/DateRangePicker/index.js.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +32 -4
- package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.js +133 -42
- 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 +26 -18
- package/dist/components/DateTimePicker/datetimepicker.types.d.ts.map +1 -1
- package/dist/components/DateTimePicker/datetimepicker.types.js +10 -0
- package/dist/components/DateTimePicker/datetimepicker.types.js.map +1 -1
- package/dist/components/DateTimePicker/index.d.ts +8 -1
- package/dist/components/DateTimePicker/index.d.ts.map +1 -1
- package/dist/components/DateTimePicker/index.js +6 -0
- package/dist/components/DateTimePicker/index.js.map +1 -1
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts +30 -4
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js +171 -72
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
- package/dist/components/DateTimeRangePicker/datetimerangepicker.types.d.ts +28 -19
- package/dist/components/DateTimeRangePicker/datetimerangepicker.types.d.ts.map +1 -1
- package/dist/components/DateTimeRangePicker/datetimerangepicker.types.js +8 -0
- package/dist/components/DateTimeRangePicker/datetimerangepicker.types.js.map +1 -1
- package/dist/components/DateTimeRangePicker/index.d.ts +8 -0
- package/dist/components/DateTimeRangePicker/index.d.ts.map +1 -1
- package/dist/components/DateTimeRangePicker/index.js +7 -0
- package/dist/components/DateTimeRangePicker/index.js.map +1 -1
- package/dist/components/Field/Field.d.ts +18 -20
- package/dist/components/Field/Field.d.ts.map +1 -1
- package/dist/components/Field/Field.js +22 -5
- 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 +35 -2
- package/dist/components/LineChart/LineChart.d.ts.map +1 -1
- package/dist/components/LineChart/LineChart.js +22 -3
- package/dist/components/LineChart/LineChart.js.map +1 -1
- package/dist/components/Markdown/Markdown.d.ts +19 -4
- package/dist/components/Markdown/Markdown.d.ts.map +1 -1
- package/dist/components/Markdown/Markdown.js +20 -2
- 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 +62 -11
- 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 +60 -5
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +52 -6
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/components/ModalContext.d.ts +14 -0
- package/dist/components/Modal/components/ModalContext.d.ts.map +1 -1
- package/dist/components/Modal/components/ModalContext.js.map +1 -1
- package/dist/components/Modal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/Modal/components/ModalHeader.js +13 -2
- 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 +36 -0
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover/components/PopoverBody.d.ts.map +1 -1
- package/dist/components/Popover/components/PopoverBody.js +5 -2
- package/dist/components/Popover/components/PopoverBody.js.map +1 -1
- package/dist/components/Popover/components/PopoverContext.d.ts +1 -0
- package/dist/components/Popover/components/PopoverContext.d.ts.map +1 -1
- package/dist/components/Popover/components/PopoverContext.js.map +1 -1
- package/dist/components/Popover/components/PopoverTrigger.d.ts.map +1 -1
- package/dist/components/Popover/components/PopoverTrigger.js +2 -2
- package/dist/components/Popover/components/PopoverTrigger.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +16 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +19 -3
- 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 +10 -2
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +63 -18
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectDropdown.d.ts +14 -2
- package/dist/components/Select/SelectDropdown.d.ts.map +1 -1
- package/dist/components/Select/SelectDropdown.js +20 -4
- package/dist/components/Select/SelectDropdown.js.map +1 -1
- package/dist/components/Select/SelectTrigger.d.ts +10 -3
- package/dist/components/Select/SelectTrigger.d.ts.map +1 -1
- package/dist/components/Select/SelectTrigger.js +12 -3
- package/dist/components/Select/SelectTrigger.js.map +1 -1
- package/dist/components/Select/useSelectKeyboard.d.ts +15 -1
- package/dist/components/Select/useSelectKeyboard.d.ts.map +1 -1
- package/dist/components/Select/useSelectKeyboard.js +73 -65
- package/dist/components/Select/useSelectKeyboard.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 +25 -5
- package/dist/components/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/Sheet/Sheet.js +24 -6
- package/dist/components/Sheet/Sheet.js.map +1 -1
- package/dist/components/Sheet/components/SheetContext.d.ts +10 -0
- package/dist/components/Sheet/components/SheetContext.d.ts.map +1 -1
- package/dist/components/Sheet/components/SheetContext.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.d.ts.map +1 -1
- package/dist/components/Sheet/components/SheetHeader.js +11 -2
- package/dist/components/Sheet/components/SheetHeader.js.map +1 -1
- package/dist/components/Sparkline/Sparkline.d.ts +21 -2
- package/dist/components/Sparkline/Sparkline.d.ts.map +1 -1
- package/dist/components/Sparkline/Sparkline.js +16 -3
- 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 +8 -2
- 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/TabsList.d.ts +1 -1
- package/dist/components/Tabs/components/TabsList.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabsList.js +5 -4
- package/dist/components/Tabs/components/TabsList.js.map +1 -1
- package/dist/components/Tabs/components/TabsPanels.d.ts +1 -1
- package/dist/components/Tabs/components/TabsPanels.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabsPanels.js +5 -3
- package/dist/components/Tabs/components/TabsPanels.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 +16 -13
- package/dist/components/TagChip/TagChip.d.ts.map +1 -1
- package/dist/components/TagChip/TagChip.js +18 -3
- package/dist/components/TagChip/TagChip.js.map +1 -1
- package/dist/components/TagInput/TagInput.d.ts +12 -9
- package/dist/components/TagInput/TagInput.d.ts.map +1 -1
- package/dist/components/TagInput/TagInput.js +16 -4
- 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 +34 -2
- package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.js +118 -15
- 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 +14 -15
- package/dist/components/TimePicker/timepicker.types.d.ts.map +1 -1
- package/dist/components/TimePicker/timepicker.types.js +4 -3
- package/dist/components/TimePicker/timepicker.types.js.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 +2 -0
- package/dist/date-time/index.d.ts.map +1 -1
- package/dist/date-time/index.js +9 -1
- package/dist/date-time/index.js.map +1 -1
- package/dist/date-time/iso.d.ts +261 -0
- package/dist/date-time/iso.d.ts.map +1 -0
- package/dist/date-time/iso.js +358 -0
- package/dist/date-time/iso.js.map +1 -0
- package/dist/date-time/now.d.ts +7 -6
- package/dist/date-time/now.d.ts.map +1 -1
- package/dist/date-time/now.js +3 -3
- package/dist/date-time/now.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 +4 -3
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +3 -2
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/schema.d.ts +49 -33
- package/dist/theme/schema.d.ts.map +1 -1
- package/dist/theme/schema.js +30 -21
- package/dist/theme/schema.js.map +1 -1
- package/package.json +11 -59
- package/src/components/Badge/Badge.tsx +87 -49
- package/src/components/Badge/index.ts +10 -1
- package/src/components/BarChart/BarChart.tsx +37 -30
- package/src/components/Button/Button.tsx +129 -106
- package/src/components/Button/index.ts +10 -1
- package/src/components/Calendar/Calendar.tsx +104 -401
- package/src/components/Calendar/CalendarView.tsx +454 -0
- package/src/components/Calendar/calendar.types.ts +104 -29
- package/src/components/Calendar/index.ts +16 -17
- 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 +369 -42
- package/src/components/DatePicker/DateSegments.tsx +125 -0
- package/src/components/DatePicker/datepicker.types.ts +58 -39
- package/src/components/DatePicker/index.ts +11 -3
- package/src/components/DateRangePicker/DateRangePicker.tsx +38 -24
- package/src/components/DateRangePicker/daterangepicker.types.ts +29 -23
- package/src/components/DateRangePicker/index.ts +9 -1
- package/src/components/DateTimePicker/DateTimePicker.tsx +189 -88
- package/src/components/DateTimePicker/DateTimeSegments.tsx +113 -0
- package/src/components/DateTimePicker/datetimepicker.types.ts +29 -19
- package/src/components/DateTimePicker/index.ts +9 -1
- package/src/components/DateTimeRangePicker/DateTimeRangePicker.tsx +251 -126
- package/src/components/DateTimeRangePicker/datetimerangepicker.types.ts +31 -20
- package/src/components/DateTimeRangePicker/index.ts +9 -0
- package/src/components/Field/Field.tsx +25 -26
- 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 +164 -141
- package/src/components/Markdown/Markdown.tsx +21 -3
- package/src/components/Message/Message.tsx +83 -17
- package/src/components/Message/index.ts +1 -1
- package/src/components/Modal/Modal.tsx +157 -86
- package/src/components/Modal/components/ModalContext.tsx +14 -0
- package/src/components/Modal/components/ModalHeader.tsx +15 -3
- package/src/components/Popover/Popover.tsx +36 -0
- package/src/components/Popover/components/PopoverBody.tsx +6 -1
- package/src/components/Popover/components/PopoverContext.tsx +1 -0
- package/src/components/Popover/components/PopoverTrigger.tsx +2 -1
- package/src/components/ProgressBar/ProgressBar.tsx +46 -28
- 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 +75 -19
- package/src/components/Select/SelectDropdown.tsx +45 -12
- package/src/components/Select/SelectTrigger.tsx +31 -8
- package/src/components/Select/useSelectKeyboard.ts +20 -10
- package/src/components/Separator/Separator.tsx +10 -0
- package/src/components/Sheet/Sheet.tsx +114 -83
- package/src/components/Sheet/components/SheetContext.tsx +10 -0
- package/src/components/Sheet/components/SheetFooter.tsx +1 -1
- package/src/components/Sheet/components/SheetHeader.tsx +18 -3
- package/src/components/Sparkline/Sparkline.tsx +40 -36
- 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/TabsList.tsx +5 -3
- package/src/components/Tabs/components/TabsPanels.tsx +5 -3
- package/src/components/Tabs/components/TabsTrigger.tsx +22 -5
- package/src/components/TagChip/TagChip.tsx +27 -18
- package/src/components/TagInput/TagInput.tsx +16 -11
- 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 +157 -51
- package/src/components/TimePicker/TimeSegments.tsx +131 -0
- package/src/components/TimePicker/timepicker.hooks.ts +1 -24
- package/src/components/TimePicker/timepicker.types.ts +14 -16
- 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 +61 -1
- package/src/date-time/iso.ts +511 -0
- package/src/date-time/now.ts +10 -9
- 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 +11 -9
- 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 +59 -58
- package/src/theme/tokens.css +824 -0
- 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 -13
- package/dist/components/ColorDot/ColorDot.d.ts.map +0 -1
- package/dist/components/ColorDot/ColorDot.js +0 -34
- 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 -15
- package/dist/components/EmptyState/EmptyState.d.ts.map +0 -1
- package/dist/components/EmptyState/EmptyState.js +0 -7
- 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 -6
- 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 -15
- package/dist/components/NavBottom/NavBottom.d.ts.map +0 -1
- package/dist/components/NavBottom/NavBottom.js +0 -19
- 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 -15
- package/dist/components/NavSide/NavSide.d.ts.map +0 -1
- package/dist/components/NavSide/NavSide.js +0 -10
- 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 -3
- package/dist/components/Skeleton/Skeleton.d.ts.map +0 -1
- package/dist/components/Skeleton/Skeleton.js +0 -7
- 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 -13
- 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/dist/styles.css +0 -2
- package/dist/theme.generated.css +0 -438
- 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 -50
- package/src/components/ColorDot/index.ts +0 -1
- package/src/components/EmptyState/EmptyState.tsx +0 -29
- 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 -13
- package/src/components/MetricList/MetricRow.tsx +0 -30
- package/src/components/MetricList/index.ts +0 -2
- package/src/components/NavBottom/NavBottom.tsx +0 -53
- package/src/components/NavBottom/index.ts +0 -3
- package/src/components/NavSide/NavItem.tsx +0 -39
- package/src/components/NavSide/NavSide.tsx +0 -40
- 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 -7
- package/src/components/Skeleton/index.ts +0 -1
- package/src/components/StatsCard/StatsCard.tsx +0 -40
- package/src/components/StatsCard/index.ts +0 -1
- package/src/styles/base.css +0 -41
- package/src/theme/palette.json +0 -100
- package/src/theme/palette.schema.json +0 -40
- package/src/theme/theme.json +0 -349
- package/src/theme/theme.schema.json +0 -876
- package/src/theme/typography.json +0 -7
- package/src/theme/typography.schema.json +0 -36
- package/tailwind.config.ts +0 -261
|
@@ -1,21 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type TagChipProps = {
|
|
3
|
+
tag: string;
|
|
4
|
+
/** When set, renders an × affordance. Omit for read-only / navigable chips. */
|
|
5
|
+
onRemove?: () => void;
|
|
6
|
+
/** `sm` (default) for rows; `md` for detail pages. */
|
|
7
|
+
size?: "sm" | "md";
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
1
10
|
/**
|
|
2
11
|
* One tag, rendered prettily. A `namespace:value` tag (`project:website`)
|
|
3
12
|
* shows the namespace muted; a plain tag (`urgent`) renders as-is.
|
|
4
13
|
*
|
|
5
14
|
* Pure presentation. Entity-reference tags (`person:per_…`) are NOT rendered
|
|
6
|
-
* here — the
|
|
7
|
-
*
|
|
15
|
+
* here — the consuming app is expected to intercept those and resolve them to
|
|
16
|
+
* a name chip; TagChip never shows a raw id.
|
|
8
17
|
*
|
|
9
|
-
* Two disjoint modes
|
|
10
|
-
*
|
|
18
|
+
* Two disjoint modes, chosen by whether `onRemove` is passed: navigable (no
|
|
19
|
+
* `onRemove`; the caller wraps it in a link) or removable (`onRemove` renders
|
|
20
|
+
* an × — used by `TagInput` and edit surfaces). Built on `Badge`
|
|
21
|
+
* (`variant="outline" intent="muted"`).
|
|
11
22
|
*/
|
|
12
|
-
export
|
|
13
|
-
tag: string;
|
|
14
|
-
/** When set, renders an × affordance. Omit for read-only / navigable chips. */
|
|
15
|
-
onRemove?: () => void;
|
|
16
|
-
/** `sm` (default) for rows; `default` for detail pages. */
|
|
17
|
-
size?: "sm" | "default";
|
|
18
|
-
className?: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const TagChip: ({ tag, onRemove, size, className }: TagChipProps) => import("react").JSX.Element;
|
|
23
|
+
export declare const TagChip: React.ForwardRefExoticComponent<TagChipProps & React.RefAttributes<HTMLSpanElement>>;
|
|
21
24
|
//# sourceMappingURL=TagChip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagChip.d.ts","sourceRoot":"","sources":["../../../src/components/TagChip/TagChip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagChip.d.ts","sourceRoot":"","sources":["../../../src/components/TagChip/TagChip.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,sDAAsD;IACtD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,sFA0BlB,CAAC"}
|
|
@@ -2,10 +2,25 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Badge } from "@sixthshift/design-system/badge";
|
|
3
3
|
import { cn } from "@sixthshift/design-system/utils";
|
|
4
4
|
import { X } from "lucide-react";
|
|
5
|
-
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
/**
|
|
7
|
+
* One tag, rendered prettily. A `namespace:value` tag (`project:website`)
|
|
8
|
+
* shows the namespace muted; a plain tag (`urgent`) renders as-is.
|
|
9
|
+
*
|
|
10
|
+
* Pure presentation. Entity-reference tags (`person:per_…`) are NOT rendered
|
|
11
|
+
* here — the consuming app is expected to intercept those and resolve them to
|
|
12
|
+
* a name chip; TagChip never shows a raw id.
|
|
13
|
+
*
|
|
14
|
+
* Two disjoint modes, chosen by whether `onRemove` is passed: navigable (no
|
|
15
|
+
* `onRemove`; the caller wraps it in a link) or removable (`onRemove` renders
|
|
16
|
+
* an × — used by `TagInput` and edit surfaces). Built on `Badge`
|
|
17
|
+
* (`variant="outline" intent="muted"`).
|
|
18
|
+
*/
|
|
19
|
+
export const TagChip = React.forwardRef(({ tag, onRemove, size = "sm", className }, ref) => {
|
|
6
20
|
const sep = tag.indexOf(":");
|
|
7
21
|
const namespace = sep > 0 ? tag.slice(0, sep) : null;
|
|
8
22
|
const value = sep > 0 ? tag.slice(sep + 1) : tag;
|
|
9
|
-
return (_jsxs(Badge, { variant: "outline", intent: "muted", className: cn("gap-1 font-normal", size === "sm" ? "px-1.5 py-0 text-[10px]" : "px-2 py-0.5 text-xs", className), children: [namespace && _jsxs("span", { className: "text-fg
|
|
10
|
-
};
|
|
23
|
+
return (_jsxs(Badge, { ref: ref, variant: "outline", intent: "muted", className: cn("tag-chip gap-1 font-normal", size === "sm" ? "px-1.5 py-0 text-[10px]" : "px-2 py-0.5 text-xs", className), children: [namespace && _jsxs("span", { className: "text-(--tag-chip-namespace-fg)", children: [namespace, ":"] }), _jsx("span", { children: value }), onRemove && (_jsx("button", { type: "button", onClick: onRemove, "aria-label": `Remove ${tag}`, className: "focus-visible:ring-(color:--tag-chip-remove-ring) -mr-0.5 ml-0.5 rounded-sm text-(--tag-chip-remove-fg) hover:text-(--tag-chip-remove-fg-hovered) focus-visible:outline-none focus-visible:ring-2", children: _jsx(X, { className: "h-3 w-3" }) }))] }));
|
|
24
|
+
});
|
|
25
|
+
TagChip.displayName = "TagChip";
|
|
11
26
|
//# sourceMappingURL=TagChip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagChip.js","sourceRoot":"","sources":["../../../src/components/TagChip/TagChip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TagChip.js","sourceRoot":"","sources":["../../../src/components/TagChip/TagChip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAgC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE;IACxH,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAEjD,OAAO,CACL,MAAC,KAAK,IACJ,GAAG,EAAE,GAAG,EACR,OAAO,EAAC,SAAS,EACjB,MAAM,EAAC,OAAO,EACd,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,qBAAqB,EAAE,SAAS,CAAC,aAExH,SAAS,IAAI,gBAAM,SAAS,EAAC,gCAAgC,aAAE,SAAS,SAAS,EAClF,yBAAO,KAAK,GAAQ,EACnB,QAAQ,IAAI,CACX,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,QAAQ,gBACL,UAAU,GAAG,EAAE,EAC3B,SAAS,EAAC,mMAAmM,YAE7M,KAAC,CAAC,IAAC,SAAS,EAAC,SAAS,GAAG,GAClB,CACV,IACK,CACT,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Token input for tags: existing tags render as removable chips, typing plus
|
|
3
|
-
* Enter or comma commits a new one, Backspace on an empty field removes the
|
|
4
|
-
* last. Duplicates are ignored. Controlled — the parent owns `value`.
|
|
5
|
-
*
|
|
6
|
-
* The chrome matches `Input` (same border/focus tokens) so it sits naturally
|
|
7
|
-
* among other form fields.
|
|
8
|
-
*/
|
|
9
1
|
export type TagInputProps = {
|
|
10
2
|
value: string[];
|
|
11
3
|
onChange: (tags: string[]) => void;
|
|
@@ -13,5 +5,16 @@ export type TagInputProps = {
|
|
|
13
5
|
id?: string;
|
|
14
6
|
className?: string;
|
|
15
7
|
};
|
|
16
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Token input for tags: existing tags render as removable `TagChip`s, typing
|
|
10
|
+
* plus Enter or comma commits a new one, Backspace on an empty field removes
|
|
11
|
+
* the last. Duplicates are ignored. Controlled only — there is no
|
|
12
|
+
* `defaultValue`, the parent always owns `value`.
|
|
13
|
+
*
|
|
14
|
+
* The chrome matches `Input` (same border/focus tokens) so it sits naturally
|
|
15
|
+
* among other form fields; the field has no visible label of its own, so
|
|
16
|
+
* give it an accessible name via a `<label htmlFor={id}>` (pass `id`) or
|
|
17
|
+
* `aria-label`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const TagInput: import("react").ForwardRefExoticComponent<TagInputProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
20
|
//# sourceMappingURL=TagInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagInput.d.ts","sourceRoot":"","sources":["../../../src/components/TagInput/TagInput.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"TagInput.d.ts","sourceRoot":"","sources":["../../../src/components/TagInput/TagInput.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,0GAwCnB,CAAC"}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { TagChip } from "@sixthshift/design-system/tag-chip";
|
|
3
3
|
import { cn } from "@sixthshift/design-system/utils";
|
|
4
|
-
import { useState } from "react";
|
|
5
|
-
|
|
4
|
+
import { forwardRef, useState } from "react";
|
|
5
|
+
/**
|
|
6
|
+
* Token input for tags: existing tags render as removable `TagChip`s, typing
|
|
7
|
+
* plus Enter or comma commits a new one, Backspace on an empty field removes
|
|
8
|
+
* the last. Duplicates are ignored. Controlled only — there is no
|
|
9
|
+
* `defaultValue`, the parent always owns `value`.
|
|
10
|
+
*
|
|
11
|
+
* The chrome matches `Input` (same border/focus tokens) so it sits naturally
|
|
12
|
+
* among other form fields; the field has no visible label of its own, so
|
|
13
|
+
* give it an accessible name via a `<label htmlFor={id}>` (pass `id`) or
|
|
14
|
+
* `aria-label`.
|
|
15
|
+
*/
|
|
16
|
+
export const TagInput = forwardRef(({ value, onChange, placeholder = "Add a tag…", id, className }, ref) => {
|
|
6
17
|
const [draft, setDraft] = useState("");
|
|
7
18
|
const commit = () => {
|
|
8
19
|
const tag = draft.trim();
|
|
@@ -19,6 +30,7 @@ export const TagInput = ({ value, onChange, placeholder = "Add a tag…", id, cl
|
|
|
19
30
|
onChange(value.slice(0, -1));
|
|
20
31
|
}
|
|
21
32
|
};
|
|
22
|
-
return (_jsxs("div", { className: cn("flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-border-normal bg-bg-normal px-2 py-1.5 text-sm shadow-xs transition-colors focus-within:ring-2 focus-within:ring-focus-ring", className), children: [value.map((tag) => (_jsx(TagChip, { tag: tag, onRemove: () => onChange(value.filter((t) => t !== tag)) }, tag))), _jsx("input", { id: id, value: draft, onChange: (e) => setDraft(e.target.value), onKeyDown: handleKeyDown, onBlur: commit, placeholder: value.length > 0 ? "" : placeholder, className: "min-w-[8ch] flex-1 bg-transparent outline-none placeholder:text-fg-subtle" })] }));
|
|
23
|
-
};
|
|
33
|
+
return (_jsxs("div", { ref: ref, className: cn("flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-border-normal bg-bg-normal px-2 py-1.5 text-sm shadow-xs transition-colors focus-within:ring-2 focus-within:ring-focus-ring", className), children: [value.map((tag) => (_jsx(TagChip, { tag: tag, onRemove: () => onChange(value.filter((t) => t !== tag)) }, tag))), _jsx("input", { id: id, value: draft, onChange: (e) => setDraft(e.target.value), onKeyDown: handleKeyDown, onBlur: commit, placeholder: value.length > 0 ? "" : placeholder, className: "min-w-[8ch] flex-1 bg-transparent outline-none placeholder:text-fg-subtle" })] }));
|
|
34
|
+
});
|
|
35
|
+
TagInput.displayName = "TagInput";
|
|
24
36
|
//# sourceMappingURL=TagInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagInput.js","sourceRoot":"","sources":["../../../src/components/TagInput/TagInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAsB,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TagInput.js","sourceRoot":"","sources":["../../../src/components/TagInput/TagInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,UAAU,EAAsB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUjE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAgC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,YAAY,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE;IACxI,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEvC,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QACzB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,QAAQ,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;QAC3D,QAAQ,CAAC,EAAE,CAAC,CAAC;IACf,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,CAAC,CAAkC,EAAE,EAAE;QAC3D,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;YACvC,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,MAAM,EAAE,CAAC;QACX,CAAC;aAAM,IAAI,CAAC,CAAC,GAAG,KAAK,WAAW,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,eACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,kMAAkM,EAClM,SAAS,CACV,aAEA,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAClB,KAAC,OAAO,IAAW,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,IAAvE,GAAG,CAAwE,CAC1F,CAAC,EACF,gBACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAChD,SAAS,EAAC,2EAA2E,GACrF,IACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -3,6 +3,15 @@ export type TextElement = "span" | "p" | "div" | "label" | "code" | "h1" | "h2"
|
|
|
3
3
|
export type TextProps = React.HTMLAttributes<HTMLElement> & {
|
|
4
4
|
as?: TextElement;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* The polymorphic base every typography preset (`Heading`, `Body`,
|
|
8
|
+
* `Emphasis`, ...) is built on: renders as `as` (default `span`) and applies
|
|
9
|
+
* no styling of its own beyond `className`.
|
|
10
|
+
*
|
|
11
|
+
* Reach for a preset first — the typographic ramp (docs/visual-hierarchy.md)
|
|
12
|
+
* is what keeps text sizing and color consistent across the app. Use `Text`
|
|
13
|
+
* directly only for one-off text that doesn't fit an existing preset.
|
|
14
|
+
*/
|
|
6
15
|
declare const Text: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
7
16
|
as?: TextElement;
|
|
8
17
|
} & React.RefAttributes<HTMLElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,GAAG,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5G,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IAC1D,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB,CAAC;AAEF,QAAA,MAAM,IAAI;
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,GAAG,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5G,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IAC1D,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB,CAAC;AAEF;;;;;;;;GAQG;AACH,QAAA,MAAM,IAAI;SAZH,WAAW;qCAmBhB,CAAC;AAGH,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@sixthshift/design-system/utils";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
/**
|
|
5
|
+
* The polymorphic base every typography preset (`Heading`, `Body`,
|
|
6
|
+
* `Emphasis`, ...) is built on: renders as `as` (default `span`) and applies
|
|
7
|
+
* no styling of its own beyond `className`.
|
|
8
|
+
*
|
|
9
|
+
* Reach for a preset first — the typographic ramp (docs/visual-hierarchy.md)
|
|
10
|
+
* is what keeps text sizing and color consistent across the app. Use `Text`
|
|
11
|
+
* directly only for one-off text that doesn't fit an existing preset.
|
|
12
|
+
*/
|
|
4
13
|
const Text = React.forwardRef(({ as: Comp = "span", className, ...props }, ref) => (_jsx(Comp
|
|
5
14
|
// biome-ignore lint/suspicious/noExplicitAny: polymorphic ref requires any
|
|
6
15
|
, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuB/B,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAyB,CAAC,EAAE,EAAE,EAAE,IAAI,GAAG,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACzG,KAAC,IAAI;AACH,2EAA2E;;IAA3E,2EAA2E;IAC3E,GAAG,EAAE,GAAU,EACf,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KACpB,KAAK,GACT,CACH,CAAC,CAAC;AACH,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuB/B;;;;;;;;GAQG;AACH,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAyB,CAAC,EAAE,EAAE,EAAE,IAAI,GAAG,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACzG,KAAC,IAAI;AACH,2EAA2E;;IAA3E,2EAA2E;IAC3E,GAAG,EAAE,GAAU,EACf,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KACpB,KAAK,GACT,CACH,CAAC,CAAC;AACH,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const textInlineVariants: (props?: ({
|
|
4
|
-
gap?: "none" | "xs" | "sm" | "
|
|
5
|
-
align?: "center" | "
|
|
4
|
+
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
5
|
+
align?: "center" | "start" | "end" | "baseline" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export type TextInlineProps = React.HTMLAttributes<HTMLSpanElement> & VariantProps<typeof textInlineVariants>;
|
|
8
|
+
/**
|
|
9
|
+
* Lays out several inline fragments — typically `Text` nodes, but any inline
|
|
10
|
+
* content works — in a single flex row with a consistent gap and cross-axis
|
|
11
|
+
* alignment, so a label/value pair or a value/badge pair doesn't need one-off
|
|
12
|
+
* spacing classes at every call site.
|
|
13
|
+
*
|
|
14
|
+
* Renders a single `<span>`. `gap` (default `sm`) and `align` (default
|
|
15
|
+
* `baseline`) are the only two axes; there's no `as` polymorphism, and this
|
|
16
|
+
* is not a variant of `Text` — `TextInline` is about spacing *between*
|
|
17
|
+
* inline children, not about styling the text itself.
|
|
18
|
+
*/
|
|
8
19
|
declare const TextInline: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
9
|
-
gap?: "none" | "xs" | "sm" | "
|
|
10
|
-
align?: "center" | "
|
|
20
|
+
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
21
|
+
align?: "center" | "start" | "end" | "baseline" | null | undefined;
|
|
11
22
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
23
|
export { TextInline, textInlineVariants };
|
|
13
24
|
//# sourceMappingURL=TextInline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInline.d.ts","sourceRoot":"","sources":["../../../src/components/TextInline/TextInline.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAA,MAAM,kBAAkB;;;8EAqBtB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9G,QAAA,MAAM,UAAU;;;uHAEd,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"TextInline.d.ts","sourceRoot":"","sources":["../../../src/components/TextInline/TextInline.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAA,MAAM,kBAAkB;;;8EAqBtB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9G;;;;;;;;;;GAUG;AACH,QAAA,MAAM,UAAU;;;uHAEd,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -24,6 +24,17 @@ const textInlineVariants = cva("inline-flex items-center", {
|
|
|
24
24
|
align: "baseline",
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
|
+
/**
|
|
28
|
+
* Lays out several inline fragments — typically `Text` nodes, but any inline
|
|
29
|
+
* content works — in a single flex row with a consistent gap and cross-axis
|
|
30
|
+
* alignment, so a label/value pair or a value/badge pair doesn't need one-off
|
|
31
|
+
* spacing classes at every call site.
|
|
32
|
+
*
|
|
33
|
+
* Renders a single `<span>`. `gap` (default `sm`) and `align` (default
|
|
34
|
+
* `baseline`) are the only two axes; there's no `as` polymorphism, and this
|
|
35
|
+
* is not a variant of `Text` — `TextInline` is about spacing *between*
|
|
36
|
+
* inline children, not about styling the text itself.
|
|
37
|
+
*/
|
|
27
38
|
const TextInline = React.forwardRef(({ className, gap, align, ...props }, ref) => (_jsx("span", { ref: ref, className: cn(textInlineVariants({ gap, align }), className), ...props })));
|
|
28
39
|
TextInline.displayName = "TextInline";
|
|
29
40
|
export { TextInline, textInlineVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInline.js","sourceRoot":"","sources":["../../../src/components/TextInline/TextInline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,kBAAkB,GAAG,GAAG,CAAC,0BAA0B,EAAE;IACzD,QAAQ,EAAE;QACR,GAAG,EAAE;YACH,IAAI,EAAE,OAAO;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,OAAO;YACX,EAAE,EAAE,OAAO;YACX,EAAE,EAAE,OAAO;YACX,EAAE,EAAE,OAAO;SACZ;QACD,KAAK,EAAE;YACL,KAAK,EAAE,aAAa;YACpB,MAAM,EAAE,cAAc;YACtB,GAAG,EAAE,WAAW;YAChB,QAAQ,EAAE,gBAAgB;SAC3B;KACF;IACD,eAAe,EAAE;QACf,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,UAAU;KAClB;CACF,CAAC,CAAC;AAIH,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAmC,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClH,eAAM,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAC5F,CAAC,CAAC;AACH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"TextInline.js","sourceRoot":"","sources":["../../../src/components/TextInline/TextInline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,kBAAkB,GAAG,GAAG,CAAC,0BAA0B,EAAE;IACzD,QAAQ,EAAE;QACR,GAAG,EAAE;YACH,IAAI,EAAE,OAAO;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,OAAO;YACX,EAAE,EAAE,OAAO;YACX,EAAE,EAAE,OAAO;YACX,EAAE,EAAE,OAAO;SACZ;QACD,KAAK,EAAE;YACL,KAAK,EAAE,aAAa;YACpB,MAAM,EAAE,cAAc;YACtB,GAAG,EAAE,WAAW;YAChB,QAAQ,EAAE,gBAAgB;SAC3B;KACF;IACD,eAAe,EAAE;QACf,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,UAAU;KAClB;CACF,CAAC,CAAC;AAIH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAmC,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClH,eAAM,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAC5F,CAAC,CAAC;AACH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
3
|
+
/**
|
|
4
|
+
* Multi-line text input for longer free-form text.
|
|
5
|
+
*
|
|
6
|
+
* A thin styled wrapper around `<textarea>` — no custom props beyond
|
|
7
|
+
* `React.TextareaHTMLAttributes`, no auto-resize, and no maximum-length UI of
|
|
8
|
+
* its own. Height comes from a `min-h-[60px]` default plus whatever `rows`
|
|
9
|
+
* or `className` the caller passes; growing with content is the caller's
|
|
10
|
+
* responsibility. Controlled or uncontrolled exactly like a native textarea.
|
|
11
|
+
*
|
|
12
|
+
* Meant to be wrapped by `FormField` for label, description and validation
|
|
13
|
+
* wiring.
|
|
14
|
+
*/
|
|
3
15
|
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
4
16
|
export { Textarea };
|
|
5
17
|
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;AAE9E,QAAA,MAAM,QAAQ,2FAWZ,CAAC;AAGH,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,QAAQ,2FAWZ,CAAC;AAGH,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@sixthshift/design-system/utils";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
/**
|
|
5
|
+
* Multi-line text input for longer free-form text.
|
|
6
|
+
*
|
|
7
|
+
* A thin styled wrapper around `<textarea>` — no custom props beyond
|
|
8
|
+
* `React.TextareaHTMLAttributes`, no auto-resize, and no maximum-length UI of
|
|
9
|
+
* its own. Height comes from a `min-h-[60px]` default plus whatever `rows`
|
|
10
|
+
* or `className` the caller passes; growing with content is the caller's
|
|
11
|
+
* responsibility. Controlled or uncontrolled exactly like a native textarea.
|
|
12
|
+
*
|
|
13
|
+
* Meant to be wrapped by `FormField` for label, description and validation
|
|
14
|
+
* wiring.
|
|
15
|
+
*/
|
|
4
16
|
const Textarea = React.forwardRef(({ className, ...props }, ref) => {
|
|
5
|
-
return (_jsx("textarea", { className: cn("flex min-h-[60px] w-full rounded-md border
|
|
17
|
+
return (_jsx("textarea", { className: cn("textarea border-(color:--textarea-border) focus-visible:ring-(color:--textarea-ring) flex min-h-[60px] w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs placeholder:text-(--textarea-placeholder-fg) focus-visible:outline-hidden focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50", className), ref: ref, ...props }));
|
|
6
18
|
});
|
|
7
19
|
Textarea.displayName = "Textarea";
|
|
8
20
|
export { Textarea };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAqC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrG,OAAO,CACL,mBACE,SAAS,EAAE,EAAE,CACX,
|
|
1
|
+
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;GAWG;AACH,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAqC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrG,OAAO,CACL,mBACE,SAAS,EAAE,EAAE,CACX,2TAA2T,EAC3T,SAAS,CACV,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -4,6 +4,15 @@ export type TimeColumnProps = {
|
|
|
4
4
|
onSelect: (value: number) => void;
|
|
5
5
|
formatValue?: (value: number) => string;
|
|
6
6
|
disabled?: (value: number) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Move DOM focus to the selected option on mount.
|
|
9
|
+
*
|
|
10
|
+
* Off by default: a column that grabs focus when it appears is wrong for a
|
|
11
|
+
* pointer user who clicked a trigger. `TimePicker` turns it on only when the
|
|
12
|
+
* popover was opened from the keyboard (`Alt+ArrowDown`), where the whole
|
|
13
|
+
* point of opening it was to pick an hour.
|
|
14
|
+
*/
|
|
15
|
+
autoFocusSelected?: boolean;
|
|
7
16
|
};
|
|
8
|
-
export declare const TimeColumn: ({ values, selected, onSelect, formatValue, disabled }: TimeColumnProps) => import("react").JSX.Element;
|
|
17
|
+
export declare const TimeColumn: ({ values, selected, onSelect, formatValue, disabled, autoFocusSelected, }: TimeColumnProps) => import("react").JSX.Element;
|
|
9
18
|
//# sourceMappingURL=TimeColumn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeColumn.d.ts","sourceRoot":"","sources":["../../../src/components/TimePicker/TimeColumn.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TimeColumn.d.ts","sourceRoot":"","sources":["../../../src/components/TimePicker/TimeColumn.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACtC;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,UAAU,8EAOpB,eAAe,gCAyDjB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@sixthshift/design-system/utils";
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
|
-
export const TimeColumn = ({ values, selected, onSelect, formatValue = (v) => String(v).padStart(2, "0"), disabled }) => {
|
|
4
|
+
export const TimeColumn = ({ values, selected, onSelect, formatValue = (v) => String(v).padStart(2, "0"), disabled, autoFocusSelected = false, }) => {
|
|
5
5
|
const containerRef = useRef(null);
|
|
6
6
|
const selectedRef = useRef(null);
|
|
7
7
|
// Scroll selected item into view on mount and when selection changes
|
|
@@ -15,6 +15,13 @@ export const TimeColumn = ({ values, selected, onSelect, formatValue = (v) => St
|
|
|
15
15
|
container.scrollTo({ top: scrollTop, behavior: "smooth" });
|
|
16
16
|
}
|
|
17
17
|
}, []);
|
|
18
|
+
// Seed focus once, when the caller asked for it. Keyed on the flag alone:
|
|
19
|
+
// `selected` changes as the user picks, and re-running then would drag focus
|
|
20
|
+
// back to the option they started from.
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (autoFocusSelected)
|
|
23
|
+
selectedRef.current?.focus();
|
|
24
|
+
}, [autoFocusSelected]);
|
|
18
25
|
return (_jsxs("div", { ref: containerRef, role: "listbox", className: "h-48 w-14 overflow-y-auto overscroll-contain rounded-lg border border-border-subtle bg-bg-subtle/50", children: [_jsx("div", { className: "h-19", "aria-hidden": "true" }), _jsx("div", { className: "flex flex-col gap-0.5", children: values.map((value) => {
|
|
19
26
|
const isSelected = value === selected;
|
|
20
27
|
const isDisabled = disabled?.(value) ?? false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeColumn.js","sourceRoot":"","sources":["../../../src/components/TimePicker/TimeColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TimeColumn.js","sourceRoot":"","sources":["../../../src/components/TimePicker/TimeColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAmB1C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,WAAW,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAC/C,QAAQ,EACR,iBAAiB,GAAG,KAAK,GACT,EAAE,EAAE;IACpB,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,WAAW,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAEpD,qEAAqE;IACrE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAW,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YAChD,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC;YACvC,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC;YACjC,MAAM,aAAa,GAAG,SAAS,CAAC,qBAAqB,EAAE,CAAC;YACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC9C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,GAAG,aAAa,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;YACxG,SAAS,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,0EAA0E;IAC1E,6EAA6E;IAC7E,wCAAwC;IACxC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,iBAAiB;YAAE,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;IACtD,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAExB,OAAO,CACL,eAAK,GAAG,EAAE,YAAY,EAAE,IAAI,EAAC,SAAS,EAAC,SAAS,EAAC,qGAAqG,aAEpJ,cAAK,SAAS,EAAC,MAAM,iBAAa,MAAM,GAAG,EAC3C,cAAK,SAAS,EAAC,uBAAuB,YACnC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;oBACpB,MAAM,UAAU,GAAG,KAAK,KAAK,QAAQ,CAAC;oBACtC,MAAM,UAAU,GAAG,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;oBAE9C,OAAO,CACL,iBAEE,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EACzC,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,mBACE,UAAU,EACzB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,IAAI,QAAQ,CAAC,KAAK,CAAC,EAC7C,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,0GAA0G,EAC1G,gGAAgG,EAChG,UAAU,IAAI,uDAAuD,EACrE,UAAU,IAAI,+BAA+B,CAC9C,YAEA,WAAW,CAAC,KAAK,CAAC,IAdd,KAAK,CAeH,CACV,CAAC;gBACJ,CAAC,CAAC,GACE,EAEN,cAAK,SAAS,EAAC,MAAM,iBAAa,MAAM,GAAG,IACvC,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { TimePickerProps } from "./timepicker.types.js";
|
|
3
3
|
export type { TimePickerProps };
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* A typeable time field and a popover of scrollable hour/minute(/second)
|
|
6
|
+
* columns, as one control. The value is an `ISOTime` string — `"09:30"` and
|
|
7
|
+
* `"09:30:00"` are both accepted as input, and `onChange` always emits the
|
|
8
|
+
* canonical `HH:MM:SS` form regardless of `format`. There is no timezone
|
|
9
|
+
* conversion: the value is a plain time, not an instant.
|
|
10
|
+
*
|
|
11
|
+
* The field is spinbutton segments rather than a text box, and is built to be
|
|
12
|
+
* typed straight through: `0230p` is half past two in the afternoon, `345` in a
|
|
13
|
+
* 24-hour field is 03:45 (there is no 30th hour, so the digit rolls into the
|
|
14
|
+
* minute). `a`/`p` set the meridiem, arrows step any segment, `Alt+ArrowDown`
|
|
15
|
+
* opens the columns and moves focus to the hour, and `Enter` is Apply. See
|
|
16
|
+
* `SegmentedField` for the full keyboard model. `minuteStep` sets the column's
|
|
17
|
+
* increment and deliberately does not constrain typing.
|
|
18
|
+
*
|
|
19
|
+
* Typing and picking move one value: the segments show the draft while the
|
|
20
|
+
* popover is open and the committed value while it is closed. A partial time is
|
|
21
|
+
* never reported — clearing a segment reports `undefined`.
|
|
22
|
+
*
|
|
23
|
+
* Supports both controlled (`value`/`onChange`) and uncontrolled
|
|
24
|
+
* (`defaultValue`) use. Opening the popover seeds the draft columns from the
|
|
25
|
+
* committed value (or the current time, if none); scrolling the columns only
|
|
26
|
+
* updates the draft, and the footer's Apply commits it and closes, Cancel
|
|
27
|
+
* discards it. A "Now" button resets the draft to the current time without
|
|
28
|
+
* closing the popover.
|
|
29
|
+
*
|
|
30
|
+
* `format` (`"HH:mm" | "HH:mm:ss"`) shows or hides the seconds column;
|
|
31
|
+
* `clockFormat` (`"12h" | "24h"`) shows or hides the AM/PM selector.
|
|
32
|
+
* `minTime`/`maxTime` bound the selectable time inclusively — Apply is a
|
|
33
|
+
* no-op while the draft falls outside them. `minuteStep` controls the minute
|
|
34
|
+
* column's increment. `presets` renders a sidebar of quick picks.
|
|
35
|
+
*/
|
|
36
|
+
export declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
37
|
//# sourceMappingURL=TimePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/TimePicker/TimePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/TimePicker/TimePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqB/B,OAAO,KAAK,EAA0B,eAAe,EAAoB,MAAM,oBAAoB,CAAC;AAEpG,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,UAAU,wFA8WrB,CAAC"}
|