@cube-dev/ui-kit 0.161.0 → 0.163.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +74 -0
- package/dist/_internal/hooks/use-chained-callback.js +1 -1
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -2
- package/dist/components/actions/use-anchored-menu.js.map +1 -1
- package/dist/components/actions/use-context-menu.js +1 -2
- package/dist/components/actions/use-context-menu.js.map +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.d.ts +28 -28
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/Tree/Tree.js +1 -1
- package/dist/components/content/Tree/TreeNode.js +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -2
- package/dist/components/data/ItemTable/ItemTableToolbar.js.map +1 -1
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +2 -2
- package/dist/components/data/TableBase/TableView.js.map +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.d.ts +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +39 -23
- package/dist/components/fields/DatePicker/PeriodPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -2
- package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -2
- package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -4
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js.map +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -3
- package/dist/components/fields/Picker/Picker.js.map +1 -1
- package/dist/components/fields/RadioGroup/Radio.d.ts +31 -9
- package/dist/components/fields/RadioGroup/Radio.js +57 -14
- package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -3
- package/dist/components/fields/Slider/HueSlider.js.map +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TextArea/TextArea.js +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/ColorSwatch.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/validation/ValidationIndicator.js +1 -1
- package/dist/components/form/validation/resolve-validation-props.js +1 -1
- package/dist/components/form/validation/use-validation-props.js +1 -1
- package/dist/components/form/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Board/Board.js +1 -1
- package/dist/components/layout/Board/BoardProvider.js +1 -1
- package/dist/components/layout/Board/BoardResponsive.js +1 -1
- package/dist/components/layout/Board/Widget.js +1 -1
- package/dist/components/layout/Board/WidgetHost.js +1 -1
- package/dist/components/layout/Board/board-context.js +1 -1
- package/dist/components/layout/Board/board-store.js +1 -1
- package/dist/components/layout/Board/grid-core/calculate.js +1 -1
- package/dist/components/layout/Board/grid-core/collision.js +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js +1 -1
- package/dist/components/layout/Board/grid-core/constraints.js +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js +1 -1
- package/dist/components/layout/Board/grid-core/layout.js +1 -1
- package/dist/components/layout/Board/grid-core/sort.js +1 -1
- package/dist/components/layout/Board/index.js +1 -1
- package/dist/components/layout/Board/responsive-utils.js +1 -1
- package/dist/components/layout/Board/use-board-layout.js +1 -1
- package/dist/components/layout/Board/use-board-registry.js +1 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
- package/dist/components/layout/Board/use-board-selection.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -2
- package/dist/components/navigation/Tabs/TabPicker.js.map +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +13 -43
- package/dist/components/other/Calendar/Calendar.js.map +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +10 -30
- package/dist/components/other/Calendar/CalendarCell.js.map +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +9 -5
- package/dist/components/other/Calendar/CalendarGrid.js.map +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +62 -0
- package/dist/components/other/Calendar/CalendarHeader.js.map +1 -0
- package/dist/components/other/Calendar/CalendarPanel.js +196 -0
- package/dist/components/other/Calendar/CalendarPanel.js.map +1 -0
- package/dist/components/other/Calendar/PeriodCalendar.js +160 -196
- package/dist/components/other/Calendar/PeriodCalendar.js.map +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +144 -0
- package/dist/components/other/Calendar/PeriodGrid.js.map +1 -0
- package/dist/components/other/Calendar/RangeCalendar.js +11 -40
- package/dist/components/other/Calendar/RangeCalendar.js.map +1 -1
- package/dist/components/other/Calendar/styled.js +64 -0
- package/dist/components/other/Calendar/styled.js.map +1 -0
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -2
- package/dist/components/overlays/Modal/Overlay.js.map +1 -1
- package/dist/components/overlays/Modal/Popover.js +11 -13
- package/dist/components/overlays/Modal/Popover.js.map +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/Notifications/Notification.js +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +1 -2
- package/dist/components/overlays/Notifications/OverlayContainer.js.map +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
- package/dist/components/overlays/Notifications/index.js +1 -1
- package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
- package/dist/components/overlays/Notifications/use-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
- package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
- package/dist/components/overlays/Toast/ToastItem.js +1 -1
- package/dist/components/overlays/Toast/index.js +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js +1 -1
- package/dist/components/overlays/Toast/useToast.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/portal/PortalProvider.js +1 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/DraggableCollection.js +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +59 -30
- package/dist/data/item-themes.js.map +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +2006 -1970
- package/dist/eslint-plugin/defaults.generated.js.map +1 -1
- package/dist/eslint-plugin/index.d.ts +6 -0
- package/dist/eslint-plugin/index.js +9 -5
- package/dist/eslint-plugin/index.js.map +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.d.ts +17 -0
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +17 -11
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js.map +1 -1
- package/dist/eslint-plugin/types.d.ts +22 -3
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +15 -2
- package/dist/i18n/locales/en-US/uikit.js +15 -2
- package/dist/i18n/locales/en-US/uikit.json.d.ts +14 -1
- package/dist/i18n/locales/es-ES/uikit.js +15 -2
- package/dist/i18n/locales/es-MX/uikit.js +15 -2
- package/dist/i18n/locales/fr-FR/uikit.js +15 -2
- package/dist/i18n/locales/it-IT/uikit.js +15 -2
- package/dist/i18n/locales/ja-JP/uikit.js +15 -2
- package/dist/i18n/locales/nb-NO/uikit.js +15 -2
- package/dist/i18n/locales/pt-BR/uikit.js +15 -2
- package/dist/i18n/locales/pt-PT/uikit.js +15 -2
- package/dist/i18n/locales/sv-SE/uikit.js +15 -2
- package/dist/i18n/locales/vi-VN/uikit.js +15 -2
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.js +1 -1
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/disabledProps.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useBufferedValue.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/docs/components/fields/PeriodPicker.md +44 -4
- package/docs/components/fields/RadioGroup.md +39 -5
- package/docs/components/other/Calendar.md +187 -0
- package/package.json +4 -1
|
@@ -16,6 +16,10 @@ The value is always a single `CalendarDate` (from `@internationalized/date`)
|
|
|
16
16
|
The field renders a compact label for the selected period (`2026-W33`, `2026-08`,
|
|
17
17
|
`2026-Q3`, `2026`). Use `formatValue` to override it.
|
|
18
18
|
|
|
19
|
+
In the month and quarter panels the year in the header is a button that opens a
|
|
20
|
+
year list, so picking a period several years away takes two clicks instead of
|
|
21
|
+
paging through the arrows.
|
|
22
|
+
|
|
19
23
|
## When to Use
|
|
20
24
|
|
|
21
25
|
- Filtering or reporting by week, month, quarter, or fiscal year
|
|
@@ -28,13 +32,14 @@ The field renders a compact label for the selected period (`2026-W33`, `2026-08`
|
|
|
28
32
|
|
|
29
33
|
### Properties
|
|
30
34
|
|
|
35
|
+
- **`picker`** `'week' | 'month' | 'quarter' | 'year'` (default: `month`) — Which period is selected. The four named components set it for you; only the base `PeriodPicker` takes it directly
|
|
31
36
|
- **`value`** `DateValue` — The current value (controlled), snapped to the period start
|
|
32
37
|
- **`defaultValue`** `DateValue` — The default value (uncontrolled)
|
|
33
38
|
- **`minValue`** `DateValue` — The earliest selectable period
|
|
34
39
|
- **`maxValue`** `DateValue` — The latest selectable period
|
|
35
40
|
- **`isDateUnavailable`** `(date: DateValue) => boolean` — Marks a period (by its start date) as unavailable
|
|
36
41
|
- **`placeholder`** `string` — Text shown when no value is selected
|
|
37
|
-
- **`formatValue`** `(date: DateValue, picker: PickerType) => string` — Overrides the displayed label
|
|
42
|
+
- **`formatValue`** `(date: DateValue, picker: PickerType, locale: string) => string` — Overrides the displayed label
|
|
38
43
|
- **`size`** `'small' | 'medium' | 'large' | (string & {})` (default: `medium`) — Field size
|
|
39
44
|
- **`shouldFlip`** `boolean` (default: `true`) — Whether the popover flips to fit the viewport
|
|
40
45
|
- **`isOpen`** `boolean` — Whether the popover is open (controlled)
|
|
@@ -42,9 +47,8 @@ The field renders a compact label for the selected period (`2026-W33`, `2026-08`
|
|
|
42
47
|
- **`onChange`** `(value: DateValue | null) => void` — Fired when the selected period changes
|
|
43
48
|
- **`onOpenChange`** `(isOpen: boolean) => void` — Fired when the popover opens or closes
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
components are thin wrappers that set it for you.
|
|
50
|
+
`WeekPicker`, `MonthPicker`, `QuarterPicker` and `YearPicker` are thin wrappers
|
|
51
|
+
that pin `picker`; everything else is identical.
|
|
48
52
|
|
|
49
53
|
### Base Properties
|
|
50
54
|
|
|
@@ -61,6 +65,17 @@ Supports all [Field properties](../../FieldProperties.md)
|
|
|
61
65
|
- **`inputStyles`** — the value/label area
|
|
62
66
|
- **`triggerStyles`** — the calendar trigger button
|
|
63
67
|
|
|
68
|
+
### Style Properties
|
|
69
|
+
|
|
70
|
+
These properties allow direct style application without using the `styles` prop:
|
|
71
|
+
|
|
72
|
+
- **Base:** `display`, `font`, `preset`, `hide`, `whiteSpace`, `opacity`, `transition`
|
|
73
|
+
- **Position:** `gridArea`, `order`, `gridColumn`, `gridRow`, `placeSelf`, `alignSelf`, `justifySelf`, `zIndex`, `margin`, `inset`, `position`, `scrollMargin`
|
|
74
|
+
- **Dimension:** `width`, `height`, `flexBasis`, `flexGrow`, `flexShrink`, `flex`
|
|
75
|
+
- **Block:** `border`, `radius`, `shadow`, `outline`, `padding`, `paddingInline`, `paddingBlock`, `overflow`, `scrollbar`, `textAlign`
|
|
76
|
+
- **Color:** `color`, `fill`, `fade`, `image`
|
|
77
|
+
- **Flow:** `flow`, `place`, `placeItems`, `placeContent`, `alignItems`, `alignContent`, `justifyItems`, `justifyContent`, `align`, `justify`, `gap`, `columnGap`, `rowGap`, `gridColumns`, `gridRows`, `gridTemplate`, `gridAreas`
|
|
78
|
+
|
|
64
79
|
## Examples
|
|
65
80
|
|
|
66
81
|
### Month
|
|
@@ -73,3 +88,28 @@ Supports all [Field properties](../../FieldProperties.md)
|
|
|
73
88
|
|
|
74
89
|
### Limited range
|
|
75
90
|
|
|
91
|
+
Periods that fall entirely outside `minValue` / `maxValue` are disabled, and the
|
|
92
|
+
navigation arrows stop at the edge of the range.
|
|
93
|
+
|
|
94
|
+
## Accessibility
|
|
95
|
+
|
|
96
|
+
### Keyboard Navigation
|
|
97
|
+
|
|
98
|
+
- `Tab` — Moves focus to the calendar trigger
|
|
99
|
+
- `Enter` / `Space` — Opens the panel; focus lands on the selected period
|
|
100
|
+
- `Arrow keys` — Move between periods, rolling over into the neighbouring year or decade
|
|
101
|
+
- `PageUp` / `PageDown` — Previous / next year (or decade in the year list)
|
|
102
|
+
- `Home` / `End` — First / last selectable period on the page
|
|
103
|
+
- `Escape` — Steps back from the year list to the period list
|
|
104
|
+
|
|
105
|
+
### Screen Reader Support
|
|
106
|
+
|
|
107
|
+
- The panel is a `grid` labelled `Months`, `Quarters` or `Years`
|
|
108
|
+
- The trigger is described by the field's current value, so the selection is
|
|
109
|
+
announced along with the button
|
|
110
|
+
|
|
111
|
+
## Related Components
|
|
112
|
+
|
|
113
|
+
- [DatePicker](./DatePicker.md) — pick an exact day
|
|
114
|
+
- DateRangePicker — pick a start and end date
|
|
115
|
+
- [Calendar](../other/Calendar.md) — the panels these fields render
|
|
@@ -21,12 +21,38 @@ A radio group allows users to select exactly one option from a set of mutually e
|
|
|
21
21
|
- **`defaultValue`** `string` — The default selected value (uncontrolled)
|
|
22
22
|
- **`type`** `'radio' | 'button' | 'tabs'` (default: `radio`) — Visual type for all radios in the group (button/tabs default to horizontal)
|
|
23
23
|
- **`orientation`** `undefined | 'vertical' | 'horizontal'` (default: `undefined`) — Orientation of the radio group. When unset it is derived from `type`: `horizontal` for `button` and `tabs`, `vertical` otherwise
|
|
24
|
-
- **`size`** `'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'` (default: `
|
|
24
|
+
- **`size`** `'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'` (default: `medium`) — Size for all radio buttons in the group
|
|
25
25
|
- **`buttonType`** `'outline' | 'outline-2' | 'clear' | 'primary'` — Button type for button-style radios (ignored in tabs mode). When set to "primary", selected buttons use primary style and non-selected use outline with brand tint. `outline-2` is identical to `outline` but uses `#surface-3` as its base fill, so it stands out when the radio group sits on a `#surface-2` container
|
|
26
26
|
- **`onChange`** `function` — Callback fired when the selected value changes
|
|
27
27
|
- **`onBlur`** `function` — Callback fired when the radio group loses focus
|
|
28
28
|
- **`onFocus`** `function` — Callback fired when the radio group receives focus
|
|
29
29
|
|
|
30
|
+
### Radio Properties
|
|
31
|
+
|
|
32
|
+
Each option is a `Radio` (also exported as `Radio.Button`).
|
|
33
|
+
|
|
34
|
+
- **`value`** `string` — The value this option contributes to the group
|
|
35
|
+
- **`children`** — The option label
|
|
36
|
+
- **`isDisabled`** `boolean` — Whether this option is disabled. Falls back to the group's `isDisabled`
|
|
37
|
+
- **`type`** `'radio' | 'button'` — Overrides the group's visual type for this option
|
|
38
|
+
- **`size`**, **`buttonType`** — Override the group's `size` / `buttonType` for this option
|
|
39
|
+
|
|
40
|
+
A `button`- or `tabs`-type radio renders an [Item](../content/Item.md), so it takes the same content props an [ItemButton](../actions/ItemButton.md) does. These are ignored by a classic radio:
|
|
41
|
+
|
|
42
|
+
- **`icon`**, **`rightIcon`** — Icons before / after the label
|
|
43
|
+
- **`prefix`**, **`suffix`** — Content before / after the label
|
|
44
|
+
- **`description`**, **`descriptionPlacement`**, **`descriptionProps`** — Secondary line, placed `inline` (default) or `block`
|
|
45
|
+
- **`tooltip`** — Tooltip content, or `true` to show one only when the label is truncated
|
|
46
|
+
- **`hotkeys`**, **`keyboardShortcutProps`** — Keyboard shortcut that selects the option, rendered as a hint
|
|
47
|
+
- **`isLoading`**, **`loadingSlot`** — Replaces a slot with a spinner and disables the option
|
|
48
|
+
- **`highlight`**, **`highlightCaseSensitive`**, **`highlightStyles`** — Highlights a substring of the label
|
|
49
|
+
- **`level`** — Heading level for the label when `buttonType` is `card` or `header`
|
|
50
|
+
- **`labelRef`** — Ref to the label element
|
|
51
|
+
|
|
52
|
+
Container [style properties](#style-properties) also apply to button-type radios (they style the `Item`). A classic radio only reads the outer subset — `margin`, `width`, `height`, `flex*`, `grid*`, `place*`, `position`, `inset`, `zIndex`, `border`, `radius`, `shadow`, `outline`.
|
|
53
|
+
|
|
54
|
+
`shape` and `actions` are not forwarded: the corner radius is owned by the group layout, which keeps only the outer-side radius on the first and last option so the group reads as one continuous control, and a button radio renders as a `<label>`, where a click on a nested action button would select the option.
|
|
55
|
+
|
|
30
56
|
### Base Properties
|
|
31
57
|
|
|
32
58
|
Supports [Base properties](../../BaseProperties.md)
|
|
@@ -101,12 +127,10 @@ Controls the size of all radio buttons in the group:
|
|
|
101
127
|
|
|
102
128
|
**Size Mapping in Tabs Mode:**
|
|
103
129
|
When `type="tabs"`, sizes are automatically mapped to maintain visual consistency:
|
|
104
|
-
- `small` and `medium` → `xsmall`
|
|
105
130
|
- `large` → `medium`
|
|
106
|
-
-
|
|
107
|
-
- `xsmall` remains `xsmall`
|
|
131
|
+
- every other size → `xsmall`
|
|
108
132
|
|
|
109
|
-
This ensures tab groups remain compact and cohesive.
|
|
133
|
+
Only `large` is carried through; `xsmall`, `small`, `medium` and `xlarge` all collapse to `xsmall`. This ensures tab groups remain compact and cohesive.
|
|
110
134
|
|
|
111
135
|
### Button Type
|
|
112
136
|
|
|
@@ -160,6 +184,16 @@ When using `type="button"`, you can customize the button appearance:
|
|
|
160
184
|
</Radio.Tabs>
|
|
161
185
|
```
|
|
162
186
|
|
|
187
|
+
### Rich Button Content
|
|
188
|
+
|
|
189
|
+
```jsx
|
|
190
|
+
<Radio.ButtonGroup label="Region" defaultValue="eu">
|
|
191
|
+
<Radio value="eu" icon={<GlobeIcon />} description="Frankfurt">EU</Radio>
|
|
192
|
+
<Radio value="us" icon={<GlobeIcon />} description="Oregon" hotkeys="alt+2">US</Radio>
|
|
193
|
+
<Radio value="ap" icon={<GlobeIcon />} isLoading>AP</Radio>
|
|
194
|
+
</Radio.ButtonGroup>
|
|
195
|
+
```
|
|
196
|
+
|
|
163
197
|
### Custom Button Type
|
|
164
198
|
|
|
165
199
|
```jsx
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Calendar
|
|
2
|
+
|
|
3
|
+
`Calendar` renders a month grid for picking a single date. `RangeCalendar` picks
|
|
4
|
+
a contiguous range, and `PeriodCalendar` picks a whole month, quarter or year.
|
|
5
|
+
All three are the panels behind the date fields — [DatePicker](../fields/DatePicker.md),
|
|
6
|
+
DateRangePicker and the
|
|
7
|
+
[period pickers](../fields/PeriodPicker.md) — and they are built on
|
|
8
|
+
React Aria's `useCalendar` / `useRangeCalendar`.
|
|
9
|
+
|
|
10
|
+
The header title is the navigation: the month and the year are buttons that open
|
|
11
|
+
a month list and a year list, so reaching a date two years out takes two clicks
|
|
12
|
+
instead of twenty-four.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
- Embedding a calendar directly in a page or panel rather than behind a field
|
|
17
|
+
- Building a custom date input that needs the same grid and states
|
|
18
|
+
- Otherwise, prefer the date fields — they add the text input, label, validation
|
|
19
|
+
and popover for you
|
|
20
|
+
|
|
21
|
+
## Component
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
### Properties
|
|
26
|
+
|
|
27
|
+
#### Calendar
|
|
28
|
+
|
|
29
|
+
- **`value`** `DateValue` — The selected date (controlled)
|
|
30
|
+
- **`defaultValue`** `DateValue` — The initially selected date (uncontrolled)
|
|
31
|
+
- **`minValue`** `DateValue` — The earliest selectable date
|
|
32
|
+
- **`maxValue`** `DateValue` — The latest selectable date
|
|
33
|
+
- **`isDateUnavailable`** `(date: DateValue) => boolean` — Marks individual dates as unavailable
|
|
34
|
+
- **`pickerMode`** `'day' | 'week'` (default: `day`) — `week` shows a week-number column and highlights the whole week of the selected day
|
|
35
|
+
- **`hasMonthYearNavigation`** `boolean` (default: `true`) — Whether the header month and year are buttons that open the month and year lists
|
|
36
|
+
- **`selectedRange`** `{ start: DateValue; end: DateValue }` — Highlights a range that lives outside the calendar's own state (used by `DateRangeSeparatedPicker`)
|
|
37
|
+
- **`isDisabled`** `boolean` — Disables the whole calendar
|
|
38
|
+
- **`isReadOnly`** `boolean` — Allows navigation but not selection
|
|
39
|
+
- **`onChange`** `(value: DateValue) => void` — Fired when a date is selected
|
|
40
|
+
|
|
41
|
+
#### RangeCalendar
|
|
42
|
+
|
|
43
|
+
Accepts React Aria's `AriaRangeCalendarProps` (a `{ start, end }` value) plus
|
|
44
|
+
**`hasMonthYearNavigation`**.
|
|
45
|
+
|
|
46
|
+
#### PeriodCalendar
|
|
47
|
+
|
|
48
|
+
- **`picker`** `'month' | 'quarter' | 'year'` — Which period the panel selects
|
|
49
|
+
- **`value`** `DateValue | null` — The selected period, represented by its start date
|
|
50
|
+
- **`minValue`** / **`maxValue`** `DateValue | null` — Range limits; a period is disabled only when *all* of it falls outside
|
|
51
|
+
- **`isDateUnavailable`** `(date: DateValue) => boolean` — Called with the period's start date
|
|
52
|
+
- **`isDisabled`** `boolean`
|
|
53
|
+
- **`autoFocus`** `boolean` — Moves focus into the grid on mount
|
|
54
|
+
- **`onChange`** `(date: CalendarDate) => void` — Fired with the period's start date
|
|
55
|
+
|
|
56
|
+
### Base Properties
|
|
57
|
+
|
|
58
|
+
Supports [Base properties](../../BaseProperties.md)
|
|
59
|
+
|
|
60
|
+
### Modifiers
|
|
61
|
+
|
|
62
|
+
Day cells and period cells share one set of modifiers:
|
|
63
|
+
|
|
64
|
+
| Modifier | Type | Description |
|
|
65
|
+
| ------------- | --------- | ---------------------------------------------------- |
|
|
66
|
+
| `selected` | `boolean` | The cell is part of the current selection |
|
|
67
|
+
| `current` | `boolean` | The cell contains today |
|
|
68
|
+
| `outside` | `boolean` | The cell belongs to an adjacent month or decade |
|
|
69
|
+
| `rangeHover` | `boolean` | The whole row is highlighted (week mode) |
|
|
70
|
+
| `pressed` | `boolean` | The cell is being pressed |
|
|
71
|
+
| `focused` | `boolean` | The cell holds keyboard focus |
|
|
72
|
+
| `disabled` | `boolean` | The cell is outside `minValue` / `maxValue` |
|
|
73
|
+
| `unavailable` | `boolean` | `isDateUnavailable` returned `true` for the cell |
|
|
74
|
+
|
|
75
|
+
## Examples
|
|
76
|
+
|
|
77
|
+
### Basic Usage
|
|
78
|
+
|
|
79
|
+
```jsx
|
|
80
|
+
import { parseDate } from '@internationalized/date';
|
|
81
|
+
|
|
82
|
+
<Calendar
|
|
83
|
+
defaultValue={parseDate('2026-08-12')}
|
|
84
|
+
onChange={(date) => console.log(date.toString())}
|
|
85
|
+
/>;
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Week Selection
|
|
89
|
+
|
|
90
|
+
```jsx
|
|
91
|
+
<Calendar pickerMode="week" defaultValue={parseDate('2026-08-12')} />
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Limited Range
|
|
95
|
+
|
|
96
|
+
Months and years that fall entirely outside `minValue` / `maxValue` are disabled
|
|
97
|
+
in the month and year lists too, and the navigation arrows stop at the edge.
|
|
98
|
+
|
|
99
|
+
```jsx
|
|
100
|
+
<Calendar
|
|
101
|
+
defaultValue={parseDate('2026-08-12')}
|
|
102
|
+
minValue={parseDate('2026-08-05')}
|
|
103
|
+
maxValue={parseDate('2026-09-20')}
|
|
104
|
+
/>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Without Month/Year Navigation
|
|
108
|
+
|
|
109
|
+
```jsx
|
|
110
|
+
<Calendar hasMonthYearNavigation={false} defaultValue={parseDate('2026-08-12')} />
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Range
|
|
114
|
+
|
|
115
|
+
```jsx
|
|
116
|
+
<RangeCalendar
|
|
117
|
+
defaultValue={{
|
|
118
|
+
start: parseDate('2026-08-10'),
|
|
119
|
+
end: parseDate('2026-08-19'),
|
|
120
|
+
}}
|
|
121
|
+
/>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Period Panels
|
|
125
|
+
|
|
126
|
+
```jsx
|
|
127
|
+
<PeriodCalendar
|
|
128
|
+
picker="month"
|
|
129
|
+
value={new CalendarDate(2026, 8, 1)}
|
|
130
|
+
onChange={(date) => console.log(date.toString())}
|
|
131
|
+
/>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Accessibility
|
|
135
|
+
|
|
136
|
+
### Keyboard Navigation
|
|
137
|
+
|
|
138
|
+
Day grid (provided by React Aria):
|
|
139
|
+
|
|
140
|
+
- `Arrow keys` — Move between days
|
|
141
|
+
- `PageUp` / `PageDown` — Previous / next month
|
|
142
|
+
- `Home` / `End` — First / last day of the week
|
|
143
|
+
- `Enter` / `Space` — Select the focused day
|
|
144
|
+
|
|
145
|
+
Month and year lists:
|
|
146
|
+
|
|
147
|
+
- `Arrow keys` — Move between periods, rolling over into the neighbouring year or decade
|
|
148
|
+
- `PageUp` / `PageDown` — Previous / next year (month list) or decade (year list)
|
|
149
|
+
- `Home` / `End` — First / last selectable period on the page
|
|
150
|
+
- `Enter` / `Space` — Choose the period
|
|
151
|
+
- `Escape` — Step back to the previous panel without closing a surrounding popover
|
|
152
|
+
|
|
153
|
+
### Screen Reader Support
|
|
154
|
+
|
|
155
|
+
- Each panel is a `grid`, labelled `Months` / `Quarters` / `Years`
|
|
156
|
+
- The visible month and year are the calendar's `heading`, and their buttons are
|
|
157
|
+
the controls that open the lists
|
|
158
|
+
- Cells expose `aria-selected`; out-of-range periods are `disabled`
|
|
159
|
+
|
|
160
|
+
## Best Practices
|
|
161
|
+
|
|
162
|
+
1. **Do**: bound the calendar when the domain is bounded — the month and year
|
|
163
|
+
lists disable everything out of range, which is far clearer than letting the
|
|
164
|
+
user land somewhere unselectable.
|
|
165
|
+
|
|
166
|
+
```jsx
|
|
167
|
+
<Calendar minValue={today(getLocalTimeZone())} />
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
2. **Don't**: reach for `PeriodCalendar` to pick a day. Its value is always the
|
|
171
|
+
*start* of a period, never an exact date.
|
|
172
|
+
|
|
173
|
+
3. **Accessibility**: always give a standalone calendar an `aria-label` — inside
|
|
174
|
+
a field the label comes from the field.
|
|
175
|
+
|
|
176
|
+
## Suggested Improvements
|
|
177
|
+
|
|
178
|
+
- Range calendars paint every day in the range the same way; distinct start/end
|
|
179
|
+
caps would read better for long ranges.
|
|
180
|
+
- Multi-month (`visibleDuration`) layouts are not implemented; the header falls
|
|
181
|
+
back to a plain title when a range spans more than one month.
|
|
182
|
+
|
|
183
|
+
## Related Components
|
|
184
|
+
|
|
185
|
+
- [DatePicker](../fields/DatePicker.md) — a date field with this calendar in a popover
|
|
186
|
+
- DateRangePicker — a range field built on `RangeCalendar`
|
|
187
|
+
- [PeriodPicker](../fields/PeriodPicker.md) — week / month / quarter / year fields
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cube-dev/ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.163.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "UIKit for Cube Projects",
|
|
6
6
|
"repository": {
|
|
@@ -120,6 +120,7 @@
|
|
|
120
120
|
"dedent": "^0.7.0",
|
|
121
121
|
"eslint": "^10.8.0",
|
|
122
122
|
"husky": "^6.0.0",
|
|
123
|
+
"jiti": "^2.6.1",
|
|
123
124
|
"jsdom": "^29.1.1",
|
|
124
125
|
"lint-staged": "^17.0.8",
|
|
125
126
|
"markdown-table": "^3.0.3",
|
|
@@ -158,6 +159,8 @@
|
|
|
158
159
|
"watch": "tsdown --watch",
|
|
159
160
|
"test": "vitest run",
|
|
160
161
|
"test:browser": "vitest run --config vitest.browser.config.ts",
|
|
162
|
+
"probe": "node scripts/probe.mjs",
|
|
163
|
+
"probe:browser": "PROBE_TIER=browser node scripts/probe.mjs",
|
|
161
164
|
"test-cover": "vitest run --coverage",
|
|
162
165
|
"test-watch": "vitest",
|
|
163
166
|
"prettier": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
|