@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
|
@@ -15,6 +15,27 @@ export type CheckboxProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
|
15
15
|
/** Classes applied to the wrapping label element when `label` is provided */
|
|
16
16
|
labelClassName?: string;
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* A single boolean, or tri-state, toggle — a custom button with
|
|
20
|
+
* `role="checkbox"` rather than a native `<input type="checkbox">`, so it
|
|
21
|
+
* can be styled without fighting native checkbox rendering.
|
|
22
|
+
*
|
|
23
|
+
* Controlled or uncontrolled via the `checked`/`defaultChecked`/
|
|
24
|
+
* `onCheckedChange` triad (`useControllableState`). `checked` also accepts
|
|
25
|
+
* `"indeterminate"`, which sets `aria-checked="mixed"` and swaps in a dash
|
|
26
|
+
* icon instead of the check — for a "select all" checkbox whose children are
|
|
27
|
+
* only partially selected. Clicking an indeterminate checkbox always
|
|
28
|
+
* resolves it to `true`, never back to indeterminate.
|
|
29
|
+
*
|
|
30
|
+
* Only participates in native form submission when `name` is set: a hidden
|
|
31
|
+
* native `<input type="checkbox">` is rendered alongside the button and
|
|
32
|
+
* kept in sync, carrying `value` (default `"on"`). Without `name`, state
|
|
33
|
+
* lives only in React and nothing is submitted.
|
|
34
|
+
*
|
|
35
|
+
* Passing `label` wraps the button and a `<Label>` together and wires
|
|
36
|
+
* `htmlFor`/`id` between them; without it, you get just the button and must
|
|
37
|
+
* supply your own accessible name.
|
|
38
|
+
*/
|
|
18
39
|
declare const Checkbox: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "value"> & {
|
|
19
40
|
/** Controlled checked state */
|
|
20
41
|
checked?: boolean | "indeterminate";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;IACtG,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IACpC,kDAAkD;IAClD,cAAc,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IAC3C,wCAAwC;IACxC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAiCF,QAAA,MAAM,QAAQ;
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;IACtG,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IACpC,kDAAkD;IAClD,cAAc,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IAC3C,wCAAwC;IACxC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAiCF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,QAAQ;IApEZ,+BAA+B;cACrB,OAAO,GAAG,eAAe;IACnC,kDAAkD;qBACjC,OAAO,GAAG,eAAe;IAC1C,wCAAwC;sBACtB,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;IAC5C,qCAAqC;WAC9B,MAAM;IACb,mDAAmD;YAC3C,MAAM;IACd,wEAAwE;YAChE,KAAK,CAAC,SAAS;IACvB,6EAA6E;qBAC5D,MAAM;2CA6IxB,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -5,6 +5,27 @@ import { cn } from "@sixthshift/design-system/utils";
|
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
const CheckIcon = () => (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", className: "h-3 w-3", "aria-hidden": "true", children: _jsx("polyline", { points: "20 6 9 17 4 12" }) }));
|
|
7
7
|
const IndeterminateIcon = () => (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", className: "h-3 w-3", "aria-hidden": "true", children: _jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) }));
|
|
8
|
+
/**
|
|
9
|
+
* A single boolean, or tri-state, toggle — a custom button with
|
|
10
|
+
* `role="checkbox"` rather than a native `<input type="checkbox">`, so it
|
|
11
|
+
* can be styled without fighting native checkbox rendering.
|
|
12
|
+
*
|
|
13
|
+
* Controlled or uncontrolled via the `checked`/`defaultChecked`/
|
|
14
|
+
* `onCheckedChange` triad (`useControllableState`). `checked` also accepts
|
|
15
|
+
* `"indeterminate"`, which sets `aria-checked="mixed"` and swaps in a dash
|
|
16
|
+
* icon instead of the check — for a "select all" checkbox whose children are
|
|
17
|
+
* only partially selected. Clicking an indeterminate checkbox always
|
|
18
|
+
* resolves it to `true`, never back to indeterminate.
|
|
19
|
+
*
|
|
20
|
+
* Only participates in native form submission when `name` is set: a hidden
|
|
21
|
+
* native `<input type="checkbox">` is rendered alongside the button and
|
|
22
|
+
* kept in sync, carrying `value` (default `"on"`). Without `name`, state
|
|
23
|
+
* lives only in React and nothing is submitted.
|
|
24
|
+
*
|
|
25
|
+
* Passing `label` wraps the button and a `<Label>` together and wires
|
|
26
|
+
* `htmlFor`/`id` between them; without it, you get just the button and must
|
|
27
|
+
* supply your own accessible name.
|
|
28
|
+
*/
|
|
8
29
|
const Checkbox = React.forwardRef(({ className, checked: controlledChecked, defaultChecked = false, onCheckedChange, disabled, name, value = "on", label, labelClassName, id: idProp, ...props }, ref) => {
|
|
9
30
|
const generatedId = React.useId();
|
|
10
31
|
const id = idProp ?? (label ? generatedId : undefined);
|
|
@@ -15,7 +36,7 @@ const Checkbox = React.forwardRef(({ className, checked: controlledChecked, defa
|
|
|
15
36
|
});
|
|
16
37
|
const isChecked = checked === true;
|
|
17
38
|
const isIndeterminate = checked === "indeterminate";
|
|
18
|
-
const button = (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", role: "checkbox", id: id, "aria-checked": isIndeterminate ? "mixed" : isChecked, "data-state": isIndeterminate ? "indeterminate" : isChecked ? "checked" : "unchecked", disabled: disabled, ref: ref, onClick: () => setChecked(!isChecked), className: cn("peer h-4 w-4 shrink-0 cursor-pointer rounded-xs border
|
|
39
|
+
const button = (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", role: "checkbox", id: id, "aria-checked": isIndeterminate ? "mixed" : isChecked, "data-state": isIndeterminate ? "indeterminate" : isChecked ? "checked" : "unchecked", disabled: disabled, ref: ref, onClick: () => setChecked(!isChecked), className: cn("checkbox peer border-(color:--checkbox-border) focus-visible:ring-(color:--checkbox-ring) h-4 w-4 shrink-0 cursor-pointer rounded-xs border bg-(--checkbox-bg) text-(--checkbox-fg) shadow focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsxs("span", { className: "flex items-center justify-center text-current", children: [isChecked && _jsx(CheckIcon, {}), isIndeterminate && _jsx(IndeterminateIcon, {})] }) }), name && (_jsx("input", { type: "checkbox", "aria-hidden": true, tabIndex: -1, name: name, value: value, checked: isChecked, disabled: disabled, readOnly: true, style: {
|
|
19
40
|
position: "absolute",
|
|
20
41
|
pointerEvents: "none",
|
|
21
42
|
opacity: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CACtB,cACE,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,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,EAAE,CACX,0TAA0T,EAC1T,SAAS,CACV,KACG,KAAK,YAET,gBAAM,SAAS,EAAC,+CAA+C,aAC5D,SAAS,IAAI,KAAC,SAAS,KAAG,EAC1B,eAAe,IAAI,KAAC,iBAAiB,KAAG,IACpC,GACA,EACR,IAAI,IAAI,CACP,gBACE,IAAI,EAAC,UAAU,uBAEf,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,QACR,KAAK,EAAE;oBACL,QAAQ,EAAE,UAAU;oBACpB,aAAa,EAAE,MAAM;oBACrB,OAAO,EAAE,CAAC;oBACV,MAAM,EAAE,CAAC;oBACT,KAAK,EAAE,CAAC;oBACR,MAAM,EAAE,CAAC;iBACV,GACD,CACH,IACA,CACJ,CAAC;IAEF,IAAI,CAAC,KAAK;QAAE,OAAO,MAAM,CAAC;IAE1B,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,cAAc,CAAC,aAC1D,MAAM,EACP,KAAC,KAAK,IAAC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,IAAI,+BAA+B,CAAC,YAC3E,KAAK,GACA,IACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -29,6 +29,28 @@ export type CheckboxGroupProps = Omit<React.HTMLAttributes<HTMLDivElement>, "onC
|
|
|
29
29
|
/** Called when focus leaves the group entirely */
|
|
30
30
|
onBlur?: () => void;
|
|
31
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* A set of related checkboxes sharing one controlled/uncontrolled `string[]`
|
|
34
|
+
* selection, via the `value`/`defaultValue`/`onValueChange` triad
|
|
35
|
+
* (`useControllableState`).
|
|
36
|
+
*
|
|
37
|
+
* `variant="default"` (the default) renders one `Checkbox` per option, each
|
|
38
|
+
* with its own visible label, laid out in a column or row per
|
|
39
|
+
* `orientation`. `variant="button"` is a separate rendering path — not a
|
|
40
|
+
* re-skinned `Checkbox` — a row/column of plain buttons with
|
|
41
|
+
* `role="checkbox"` and no separate label; contiguous buttons touch and
|
|
42
|
+
* share borders (`appearance="segmented"`, the default) or sit apart with
|
|
43
|
+
* their own rounded corners (`appearance="separate"`).
|
|
44
|
+
*
|
|
45
|
+
* Form submission only happens when `name` is set. In the default variant
|
|
46
|
+
* that means each underlying `Checkbox` gets `name`, so one hidden native
|
|
47
|
+
* checkbox input is rendered per option; in the button variant the group
|
|
48
|
+
* itself renders one hidden `<input type="checkbox">` per *currently
|
|
49
|
+
* selected* value.
|
|
50
|
+
*
|
|
51
|
+
* Renders `role="group"`; focus leaving the whole group — not just moving
|
|
52
|
+
* between options — fires `onBlur`.
|
|
53
|
+
*/
|
|
32
54
|
declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "onBlur" | "onChange"> & {
|
|
33
55
|
/** Controlled selected values */
|
|
34
56
|
value?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../src/components/CheckboxGroup/CheckboxGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,mBAAmB,GAAG;IAChC,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC,GAAG;IACnG,iCAAiC;IACjC,KAAK,CAAC,EAAE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IACxC,oCAAoC;IACpC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC1C,yBAAyB;IACzB,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,qBAAqB;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B,6DAA6D;IAC7D,UAAU,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IACtC,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,aAAa;IA5CjB,iCAAiC;YACzB,MAAM,EAAE;IAChB,oDAAoD;mBACrC,MAAM,EAAE;IACvB,wBAAwB;aACf,SAAS,mBAAmB,EAAE;IACvC,oCAAoC;oBACpB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI;IACzC,yBAAyB;kBACX,UAAU,GAAG,YAAY;IACvC,qBAAqB;cACX,SAAS,GAAG,QAAQ;IAC9B,6DAA6D;iBAChD,WAAW,GAAG,UAAU;IACrC,qCAAqC;WAC9B,MAAM;IACb,0BAA0B;eACf,OAAO;IAClB,kDAAkD;aACzC,MAAM,IAAI;wCA4JpB,CAAC;AAGF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -3,6 +3,28 @@ import { Checkbox } from "@sixthshift/design-system/checkbox";
|
|
|
3
3
|
import { useControllableState } from "@sixthshift/design-system/hooks";
|
|
4
4
|
import { cn } from "@sixthshift/design-system/utils";
|
|
5
5
|
import * as React from "react";
|
|
6
|
+
/**
|
|
7
|
+
* A set of related checkboxes sharing one controlled/uncontrolled `string[]`
|
|
8
|
+
* selection, via the `value`/`defaultValue`/`onValueChange` triad
|
|
9
|
+
* (`useControllableState`).
|
|
10
|
+
*
|
|
11
|
+
* `variant="default"` (the default) renders one `Checkbox` per option, each
|
|
12
|
+
* with its own visible label, laid out in a column or row per
|
|
13
|
+
* `orientation`. `variant="button"` is a separate rendering path — not a
|
|
14
|
+
* re-skinned `Checkbox` — a row/column of plain buttons with
|
|
15
|
+
* `role="checkbox"` and no separate label; contiguous buttons touch and
|
|
16
|
+
* share borders (`appearance="segmented"`, the default) or sit apart with
|
|
17
|
+
* their own rounded corners (`appearance="separate"`).
|
|
18
|
+
*
|
|
19
|
+
* Form submission only happens when `name` is set. In the default variant
|
|
20
|
+
* that means each underlying `Checkbox` gets `name`, so one hidden native
|
|
21
|
+
* checkbox input is rendered per option; in the button variant the group
|
|
22
|
+
* itself renders one hidden `<input type="checkbox">` per *currently
|
|
23
|
+
* selected* value.
|
|
24
|
+
*
|
|
25
|
+
* Renders `role="group"`; focus leaving the whole group — not just moving
|
|
26
|
+
* between options — fires `onBlur`.
|
|
27
|
+
*/
|
|
6
28
|
const CheckboxGroup = React.forwardRef(({ value: controlledValue, defaultValue = [], options, onValueChange, orientation = "vertical", variant = "default", appearance = "segmented", name, disabled, onBlur, className, ...props }, ref) => {
|
|
7
29
|
const [value, setValue] = useControllableState({
|
|
8
30
|
value: controlledValue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","sourceRoot":"","sources":["../../../src/components/CheckboxGroup/CheckboxGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmC/B,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CACpC,CACE,EACE,KAAK,EAAE,eAAe,EACtB,YAAY,GAAG,EAAE,EACjB,OAAO,EACP,aAAa,E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C,IAC5E,CACP,CAAC;IACJ,CAAC;IAED,OAAO;IACL,mGAAmG;IACnG,cACE,GAAG,EAAE,SAAS,EACd,IAAI,EAAC,OAAO,EACZ,aAAa,EAAE,cAAc,EAC7B,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAC9F,KAAK,YAER,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACtB,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC/C,MAAM,UAAU,GAAG,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC;YAE/C,OAAO,CACL,KAAC,QAAQ,OAEH,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC1B,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,OAAO,EAAE,SAAS,EAClB,eAAe,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,EAAE,OAAkB,CAAC,EAClF,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,MAAM,CAAC,KAAK,IANd,MAAM,CAAC,KAAK,CAOjB,CACH,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -3,7 +3,7 @@ import MonacoEditor from "@monaco-editor/react";
|
|
|
3
3
|
import { useCallback, useRef } from "react";
|
|
4
4
|
import { useTheme } from "../../../hooks/useTheme.js";
|
|
5
5
|
import { createSemanticTokensProvider, workerExtensionUrl } from "./semanticTokenProvider.js";
|
|
6
|
-
import { defineThemes,
|
|
6
|
+
import { defineThemes, EDITOR_THEME_DARK, EDITOR_THEME_LIGHT } from "./themes.js";
|
|
7
7
|
let semanticTokensRegistered = false;
|
|
8
8
|
function registerSemanticTokenProviders(monaco) {
|
|
9
9
|
if (semanticTokensRegistered)
|
|
@@ -30,7 +30,7 @@ function registerSemanticTokenProviders(monaco) {
|
|
|
30
30
|
*/
|
|
31
31
|
export const Editor = ({ value, onChange, onValidate, readOnly = false, className, typeDefinitions, compilerOptions = {}, ...props }) => {
|
|
32
32
|
const { resolvedTheme } = useTheme();
|
|
33
|
-
const monacoTheme = resolvedTheme === "dark" ?
|
|
33
|
+
const monacoTheme = resolvedTheme === "dark" ? EDITOR_THEME_DARK : EDITOR_THEME_LIGHT;
|
|
34
34
|
const editorRef = useRef(null);
|
|
35
35
|
const handleEditorDidMount = useCallback((editor, monaco) => {
|
|
36
36
|
editorRef.current = editor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../../../src/components/Code/Editor/Editor.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,OAAO,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../../../src/components/Code/Editor/Editor.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,OAAO,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,iBAAiB,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oEAAoE;gBACpE,kEAAkE;gBAClE,0BAA0B;gBAC1B,kBAAkB,EAAE,KAAK;gBACzB,oBAAoB,EAAE,KAAK;gBAC3B,QAAQ,EAAE,IAAI;gBACd,eAAe,EAAE,IAAI;gBACrB,OAAO,EAAE,CAAC;gBACV,aAAa,EAAE,IAAI;gBACnB,YAAY,EAAE,IAAI;gBAClB,gBAAgB,EAAE,IAAI;gBACtB,0BAA0B,EAAE,IAAI;gBAChC,uBAAuB,EAAE,IAAI;gBAC7B,kBAAkB,EAAE,KAAK;gBACzB,8BAA8B,EAAE,IAAI;aACrC,GACD,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const EDITOR_THEME_LIGHT = "ds-light";
|
|
2
|
+
export declare const EDITOR_THEME_DARK = "ds-dark";
|
|
3
3
|
export declare function defineThemes(monaco: typeof import("monaco-editor")): void;
|
|
4
4
|
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../../src/components/Code/Editor/themes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../../src/components/Code/Editor/themes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAC7C,eAAO,MAAM,iBAAiB,YAAY,CAAC;AA2H3C,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,eAAe,CAAC,QAGlE"}
|
|
@@ -1,36 +1,54 @@
|
|
|
1
|
-
export const
|
|
2
|
-
export const
|
|
1
|
+
export const EDITOR_THEME_LIGHT = "ds-light";
|
|
2
|
+
export const EDITOR_THEME_DARK = "ds-dark";
|
|
3
|
+
/**
|
|
4
|
+
* The token palettes are One Light and One Dark, with every colour raised to
|
|
5
|
+
* 4.5:1 against the worst background it can land on — which is the active line's
|
|
6
|
+
* highlight, not the editor background, since that is the darker (light theme)
|
|
7
|
+
* or lighter (dark theme) of the two.
|
|
8
|
+
*
|
|
9
|
+
* Stock One Light fails that on 21 of its 25 token colours: syntax highlighting
|
|
10
|
+
* is text as far as axe is concerned, so it carries the full 4.5:1 obligation
|
|
11
|
+
* rather than the 3:1 that non-text contrast gets. Hue and saturation are kept;
|
|
12
|
+
* only lightness moves, and only as far as it has to. The most visible
|
|
13
|
+
* consequence is that comments recede less than in stock One Light — #a0a1a7
|
|
14
|
+
* managed 2.30.
|
|
15
|
+
*
|
|
16
|
+
* `scripts/check-contrast.ts` covers the design system's own tokens; these are
|
|
17
|
+
* Monaco's, so they are checked by the editor stories' a11y run instead. A story
|
|
18
|
+
* with a play function is what exercises it: without one, axe runs before Monaco
|
|
19
|
+
* has painted and sees nothing to measure.
|
|
20
|
+
*/
|
|
3
21
|
const lightTheme = {
|
|
4
22
|
base: "vs",
|
|
5
23
|
inherit: true,
|
|
6
24
|
rules: [
|
|
7
25
|
// Monarch tokenizer rules
|
|
8
|
-
{ token: "comment", foreground: "
|
|
26
|
+
{ token: "comment", foreground: "6b6c73", fontStyle: "italic" },
|
|
9
27
|
{ token: "keyword", foreground: "a626a4" },
|
|
10
|
-
{ token: "string", foreground: "
|
|
11
|
-
{ token: "number", foreground: "
|
|
28
|
+
{ token: "string", foreground: "3c7a3c" },
|
|
29
|
+
{ token: "number", foreground: "906301" },
|
|
12
30
|
{ token: "delimiter", foreground: "383a42" },
|
|
13
31
|
{ token: "delimiter.bracket", foreground: "383a42" },
|
|
14
|
-
{ token: "tag", foreground: "
|
|
15
|
-
{ token: "attribute.name", foreground: "
|
|
16
|
-
{ token: "attribute.value", foreground: "
|
|
17
|
-
{ token: "operator", foreground: "
|
|
18
|
-
{ token: "identifier", foreground: "
|
|
32
|
+
{ token: "tag", foreground: "cf2d1f" },
|
|
33
|
+
{ token: "attribute.name", foreground: "906301" },
|
|
34
|
+
{ token: "attribute.value", foreground: "3c7a3c" },
|
|
35
|
+
{ token: "operator", foreground: "0174a5" },
|
|
36
|
+
{ token: "identifier", foreground: "cf2d1f" },
|
|
19
37
|
// Semantic token rules (TypeScript language service)
|
|
20
|
-
{ token: "variable", foreground: "
|
|
21
|
-
{ token: "variable.readonly", foreground: "
|
|
38
|
+
{ token: "variable", foreground: "cf2d1f" },
|
|
39
|
+
{ token: "variable.readonly", foreground: "906301" },
|
|
22
40
|
{ token: "parameter", foreground: "383a42" },
|
|
23
|
-
{ token: "property", foreground: "
|
|
24
|
-
{ token: "property.readonly", foreground: "
|
|
25
|
-
{ token: "function", foreground: "
|
|
26
|
-
{ token: "method", foreground: "
|
|
27
|
-
{ token: "type", foreground: "
|
|
28
|
-
{ token: "type.identifier", foreground: "
|
|
29
|
-
{ token: "class", foreground: "
|
|
30
|
-
{ token: "interface", foreground: "
|
|
31
|
-
{ token: "enum", foreground: "
|
|
32
|
-
{ token: "enumMember", foreground: "
|
|
33
|
-
{ token: "namespace", foreground: "
|
|
41
|
+
{ token: "property", foreground: "cf2d1f" },
|
|
42
|
+
{ token: "property.readonly", foreground: "906301" },
|
|
43
|
+
{ token: "function", foreground: "2162f0" },
|
|
44
|
+
{ token: "method", foreground: "2162f0" },
|
|
45
|
+
{ token: "type", foreground: "916301" },
|
|
46
|
+
{ token: "type.identifier", foreground: "916301" },
|
|
47
|
+
{ token: "class", foreground: "916301" },
|
|
48
|
+
{ token: "interface", foreground: "916301" },
|
|
49
|
+
{ token: "enum", foreground: "916301" },
|
|
50
|
+
{ token: "enumMember", foreground: "906301" },
|
|
51
|
+
{ token: "namespace", foreground: "cf2d1f" },
|
|
34
52
|
],
|
|
35
53
|
colors: {
|
|
36
54
|
"editor.background": "#fafafa",
|
|
@@ -55,22 +73,22 @@ const darkTheme = {
|
|
|
55
73
|
inherit: true,
|
|
56
74
|
rules: [
|
|
57
75
|
// Monarch tokenizer rules
|
|
58
|
-
{ token: "comment", foreground: "
|
|
59
|
-
{ token: "keyword", foreground: "
|
|
76
|
+
{ token: "comment", foreground: "939aa6", fontStyle: "italic" },
|
|
77
|
+
{ token: "keyword", foreground: "c97edf" },
|
|
60
78
|
{ token: "string", foreground: "98c379" },
|
|
61
79
|
{ token: "number", foreground: "d19a66" },
|
|
62
80
|
{ token: "delimiter", foreground: "abb2bf" },
|
|
63
81
|
{ token: "delimiter.bracket", foreground: "abb2bf" },
|
|
64
|
-
{ token: "tag", foreground: "
|
|
82
|
+
{ token: "tag", foreground: "e37b83" },
|
|
65
83
|
{ token: "attribute.name", foreground: "d19a66" },
|
|
66
84
|
{ token: "attribute.value", foreground: "98c379" },
|
|
67
85
|
{ token: "operator", foreground: "56b6c2" },
|
|
68
|
-
{ token: "identifier", foreground: "
|
|
86
|
+
{ token: "identifier", foreground: "e37b83" },
|
|
69
87
|
// Semantic token rules (TypeScript language service)
|
|
70
|
-
{ token: "variable", foreground: "
|
|
88
|
+
{ token: "variable", foreground: "e37b83" },
|
|
71
89
|
{ token: "variable.readonly", foreground: "d19a66" },
|
|
72
90
|
{ token: "parameter", foreground: "abb2bf" },
|
|
73
|
-
{ token: "property", foreground: "
|
|
91
|
+
{ token: "property", foreground: "e37b83" },
|
|
74
92
|
{ token: "property.readonly", foreground: "d19a66" },
|
|
75
93
|
{ token: "function", foreground: "61afef" },
|
|
76
94
|
{ token: "method", foreground: "61afef" },
|
|
@@ -80,7 +98,7 @@ const darkTheme = {
|
|
|
80
98
|
{ token: "interface", foreground: "e5c07b" },
|
|
81
99
|
{ token: "enum", foreground: "e5c07b" },
|
|
82
100
|
{ token: "enumMember", foreground: "d19a66" },
|
|
83
|
-
{ token: "namespace", foreground: "
|
|
101
|
+
{ token: "namespace", foreground: "e37b83" },
|
|
84
102
|
],
|
|
85
103
|
colors: {
|
|
86
104
|
"editor.background": "#282c34",
|
|
@@ -100,7 +118,7 @@ const darkTheme = {
|
|
|
100
118
|
},
|
|
101
119
|
};
|
|
102
120
|
export function defineThemes(monaco) {
|
|
103
|
-
monaco.editor.defineTheme(
|
|
104
|
-
monaco.editor.defineTheme(
|
|
121
|
+
monaco.editor.defineTheme(EDITOR_THEME_LIGHT, lightTheme);
|
|
122
|
+
monaco.editor.defineTheme(EDITOR_THEME_DARK, darkTheme);
|
|
105
123
|
}
|
|
106
124
|
//# sourceMappingURL=themes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../../../src/components/Code/Editor/themes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../../../src/components/Code/Editor/themes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAC7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAC;AAE3C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,GAAgC;IAC9C,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;IACb,KAAK,EAAE;QACL,0BAA0B;QAC1B,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE;QAC/D,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QAC1C,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE;QACzC,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE;QACzC,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE;QAC5C,EAAE,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,QAAQ,EAAE;QACpD,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE;QACtC,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE;QACjD,EAAE,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAA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,iBAAiB,EAAE,SAAS,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationStatus.d.ts","sourceRoot":"","sources":["../../../../src/components/Code/ValidationStatus/ValidationStatus.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ValidationStatus.d.ts","sourceRoot":"","sources":["../../../../src/components/Code/ValidationStatus/ValidationStatus.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACnE,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AA0BF,eAAO,MAAM,gBAAgB,6CAAkD,qBAAqB,gCAyCnG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationStatus.js","sourceRoot":"","sources":["../../../../src/components/Code/ValidationStatus/ValidationStatus.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"ValidationStatus.js","sourceRoot":"","sources":["../../../../src/components/Code/ValidationStatus/ValidationStatus.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAA0B,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAqB7E,MAAM,eAAe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I,2BAC3B,QAAQ,aACN,CACX,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,48 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { DatePickerProps } from "./datepicker.types.js";
|
|
3
3
|
export type { DatePickerProps };
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* A typeable date field and a `Calendar` popover, as one control. `mode`
|
|
6
|
+
* (`"single" | "range" | "multiple"`, default `"single"`) decides the shape of
|
|
7
|
+
* `value`/`defaultValue`/`onChange`: an `ISODate` string, an `ISODateRange`
|
|
8
|
+
* (`{ from?, to? }`), or an `ISODate[]`.
|
|
9
|
+
*
|
|
10
|
+
* In `single` mode the field is three `role="spinbutton"` segments rather than a
|
|
11
|
+
* text box. It is built to be typed straight through: `152026` is January the
|
|
12
|
+
* 5th 2026, because a digit that cannot extend the segment being typed rolls
|
|
13
|
+
* into the next one instead of restarting it. Separators (`/`, `-`, `.`) say
|
|
14
|
+
* done-with-this-one, arrows step a segment, `Backspace` takes back one digit
|
|
15
|
+
* (then clears, then steps back), `Alt+ArrowDown` opens the grid and moves focus
|
|
16
|
+
* there, and a paste fills all three. Segments rather than free
|
|
17
|
+
* text because `08/09` cannot be read without knowing the order: `segmentOrder`
|
|
18
|
+
* (default `mdy`) says which, the labels say it to a screen reader, and no
|
|
19
|
+
* parser has to guess. `range` and `multiple` keep the read-only text trigger —
|
|
20
|
+
* a list of dates has no sensible typed form.
|
|
21
|
+
*
|
|
22
|
+
* Typing and picking move one value. The segments show the draft while the
|
|
23
|
+
* popover is open and the committed value while it is closed, so typing a date
|
|
24
|
+
* moves the grid to it and picking a day shows up in the segments. The commit
|
|
25
|
+
* contract stays single: while the popover is open its Apply/Cancel owns the
|
|
26
|
+
* value (`Enter` in a segment is Apply); while it is closed, a date commits as
|
|
27
|
+
* soon as all three segments describe one. A partial date is never reported —
|
|
28
|
+
* clearing a segment reports `undefined`.
|
|
29
|
+
*
|
|
30
|
+
* Supports both controlled (`value`/`onChange`) and uncontrolled
|
|
31
|
+
* (`defaultValue`) use. Opening the popover seeds a draft from the committed
|
|
32
|
+
* value; picking a date only updates the draft; the footer's Apply commits it
|
|
33
|
+
* and closes, Cancel discards it and reverts to the last committed value. The
|
|
34
|
+
* clear button (hidden when `clearable={false}`) bypasses the draft and
|
|
35
|
+
* commits immediately.
|
|
36
|
+
*
|
|
37
|
+
* `minDate`/`maxDate` bound selectable dates inclusively; `disabled` accepts a
|
|
38
|
+
* single date, a list, or a declarative matcher (before/after/range/weekday)
|
|
39
|
+
* or predicate — see `DisabledDates`. `presets` renders a sidebar of quick
|
|
40
|
+
* picks whose values must match `mode`. When `name` is set, the committed
|
|
41
|
+
* value is mirrored into hidden `<input>`s for native form submission
|
|
42
|
+
* (`name.from`/`name.to` in range mode, `name[]` per entry in multiple mode).
|
|
43
|
+
*
|
|
44
|
+
* Keyboard interaction — arrow keys/Home/End/PageUp/PageDown on the day
|
|
45
|
+
* grid — is inherited from `Calendar`.
|
|
46
|
+
*/
|
|
47
|
+
export declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
48
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,oBAAoB,CAAC;AAE1E,YAAY,EAAE,eAAe,EAAE,CAAC;AAYhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,UAAU,wFA8drB,CAAC"}
|