@viasat/beam-react 2.73.0 → 2.75.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/CHANGELOG.md +20 -0
- package/assets/calendar.css +1 -0
- package/chunks/{ActionList.Group.D0MSmqq0.js → ActionList.Group.D37JNSWi.js} +1 -1
- package/chunks/{ActionList.Group.CA-8_zU-.js → ActionList.Group.Dl36hQN9.js} +2 -2
- package/chunks/{ActionList.Item.B-dMxb-4.js → ActionList.Item.BS_rGXCZ.js} +1 -1
- package/chunks/{ActionList.Item.Sz5laTOG.js → ActionList.Item.BvTyJCdF.js} +2 -2
- package/chunks/{Avatar.BP34c6vv.js → Avatar.DFVs4x7C.js} +1 -1
- package/chunks/{Avatar.B8uE9nm6.js → Avatar.JUkpZkUb.js} +1 -1
- package/chunks/{BreadcrumbsItem.Lfi8BNU0.js → BreadcrumbsItem.CD0iKhXI.js} +1 -1
- package/chunks/{BreadcrumbsItem.Dt3qy9Qk.js → BreadcrumbsItem.Du61ZLG8.js} +1 -1
- package/chunks/{DateField.Segment.BIX1PPHS.js → DateField.Segment.CM_C5M-a.js} +1 -1
- package/chunks/{DateField.Segment.CcTNVHpE.js → DateField.Segment.CbBsfqKp.js} +1 -1
- package/chunks/{FloatingUI.arrow.CwdN0s4u.js → FloatingUI.arrow.Ck2qlI0p.js} +1 -1
- package/chunks/{FloatingUI.arrow.ggrpXRvv.js → FloatingUI.arrow.Dbr9nQGp.js} +1 -1
- package/chunks/{Search.Results.CiIvUkvw.js → Search.Results.CYxeJOvm.js} +1 -1
- package/chunks/{Search.Results.4PnEkDwT.js → Search.Results.ekH7zcfE.js} +1 -1
- package/chunks/{SpinnerWrap.D8G39RbY.js → SpinnerWrap.BdmqBWk2.js} +1 -1
- package/chunks/{SpinnerWrap.DKrZFNDB.js → SpinnerWrap.DmSwpTbV.js} +1 -1
- package/chunks/calendar.module.CXGuMNJB.js +31 -0
- package/chunks/calendar.module.D0wrnDz0.js +1 -0
- package/chunks/{classNames.W_JcbBab.js → classNames.CEoAKlth.js} +1 -1
- package/chunks/{classNames.CECTlnmT.js → classNames.koX0H7D0.js} +1 -1
- package/chunks/{dataTable.BRFJoM34.js → dataTable.B6rVRfre.js} +1 -1
- package/chunks/{dataTable.BZYgKeZp.js → dataTable.Dttffzch.js} +1 -1
- package/chunks/dates.CVW08OQ2.js +1 -0
- package/chunks/dates.NqdbQ2fR.js +38 -0
- package/chunks/{form.context.DZSt9YJH.js → form.context.CW5SOzlz.js} +1 -1
- package/chunks/{form.context.D3cMAhns.js → form.context.DySHLxlJ.js} +1 -1
- package/chunks/{helpers.DWdxSU31.js → helpers.BUsAyYMh.js} +23 -25
- package/chunks/{helpers.CugcWtbW.js → helpers.DHCqqM5J.js} +1 -1
- package/chunks/{useFormValidator.hook.C2-tO58p.js → useFormValidator.hook.DHuxr0nO.js} +1 -1
- package/chunks/useFormValidator.hook.PxGCY15D.js +1 -0
- package/index.cjs.js +1 -1
- package/index.es.js +3 -3
- package/lib/Accordion/Accordion.cjs.js +1 -1
- package/lib/Accordion/Accordion.es.js +1 -1
- package/lib/Accordion/AccordionGroup.cjs.js +1 -1
- package/lib/Accordion/AccordionGroup.es.js +1 -1
- package/lib/ActionList/ActionList.Group.cjs.js +1 -1
- package/lib/ActionList/ActionList.Group.es.js +3 -3
- package/lib/ActionList/ActionList.IconButton.cjs.js +1 -1
- package/lib/ActionList/ActionList.IconButton.es.js +2 -2
- package/lib/ActionList/ActionList.Item.cjs.js +1 -1
- package/lib/ActionList/ActionList.Item.es.js +3 -3
- package/lib/ActionList/ActionList.cjs.js +1 -1
- package/lib/ActionList/ActionList.es.js +4 -4
- package/lib/ActionList/useActionListChildren.cjs.js +1 -1
- package/lib/ActionList/useActionListChildren.es.js +2 -2
- package/lib/Alert/Alert.cjs.js +1 -1
- package/lib/Alert/Alert.es.js +2 -2
- package/lib/Autocomplete/Autocomplete.cjs.js +1 -1
- package/lib/Autocomplete/Autocomplete.es.js +2 -2
- package/lib/Autocomplete/AutocompleteDropdown.cjs.js +1 -1
- package/lib/Autocomplete/AutocompleteDropdown.es.js +3 -3
- package/lib/Autocomplete/AutocompleteField.cjs.js +1 -1
- package/lib/Autocomplete/AutocompleteField.es.js +1 -1
- package/lib/Autocomplete/useAutocompleteA11y.cjs.js +1 -1
- package/lib/Autocomplete/useAutocompleteA11y.es.js +15 -16
- package/lib/Avatar/Avatar.cjs.js +1 -1
- package/lib/Avatar/Avatar.es.js +1 -1
- package/lib/Avatar/AvatarGroup.cjs.js +1 -1
- package/lib/Avatar/AvatarGroup.es.js +1 -1
- package/lib/Avatar/index.cjs.js +1 -1
- package/lib/Avatar/index.es.js +1 -1
- package/lib/Badge/Badge.cjs.js +1 -1
- package/lib/Badge/Badge.es.js +1 -1
- package/lib/BadgeDot/BadgeDot.cjs.js +1 -1
- package/lib/BadgeDot/BadgeDot.es.js +1 -1
- package/lib/Box/Box.cjs.js +1 -1
- package/lib/Box/Box.es.js +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.cjs.js +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.es.js +2 -2
- package/lib/Breadcrumbs/BreadcrumbsItem.cjs.js +1 -1
- package/lib/Breadcrumbs/BreadcrumbsItem.es.js +2 -2
- package/lib/Breadcrumbs/index.cjs.js +1 -1
- package/lib/Breadcrumbs/index.es.js +1 -1
- package/lib/Button/Button.cjs.js +1 -1
- package/lib/Button/Button.es.js +2 -2
- package/lib/Card/AspectRatio.cjs.js +1 -1
- package/lib/Card/AspectRatio.es.js +1 -1
- package/lib/Card/Card.Body.cjs.js +1 -1
- package/lib/Card/Card.Body.es.js +1 -1
- package/lib/Card/Card.Content.cjs.js +1 -1
- package/lib/Card/Card.Content.es.js +1 -1
- package/lib/Card/Card.Footer.cjs.js +1 -1
- package/lib/Card/Card.Footer.es.js +1 -1
- package/lib/Card/Card.Header.cjs.js +1 -1
- package/lib/Card/Card.Header.es.js +1 -1
- package/lib/Card/Card.Media.cjs.js +1 -1
- package/lib/Card/Card.Media.es.js +1 -1
- package/lib/Card/Card.cjs.js +1 -1
- package/lib/Card/Card.es.js +2 -2
- package/lib/Card/CardGroup.cjs.js +1 -1
- package/lib/Card/CardGroup.es.js +2 -2
- package/lib/Checkbox/Checkbox.cjs.js +1 -1
- package/lib/Checkbox/Checkbox.es.js +2 -2
- package/lib/Chips/Chip.cjs.js +1 -1
- package/lib/Chips/Chip.es.js +1 -1
- package/lib/Chips/ChipGroup.cjs.js +1 -1
- package/lib/Chips/ChipGroup.es.js +1 -1
- package/lib/CloseButton/CloseButton.cjs.js +1 -1
- package/lib/CloseButton/CloseButton.es.js +1 -1
- package/lib/DateField/DateField.Segment.cjs.js +1 -1
- package/lib/DateField/DateField.Segment.es.js +1 -1
- package/lib/DateField/DateField.Segments.cjs.js +1 -1
- package/lib/DateField/DateField.Segments.d.ts +6 -1
- package/lib/DateField/DateField.Segments.es.js +44 -43
- package/lib/DateField/DateField.cjs.js +1 -1
- package/lib/DateField/DateField.devWarnings.cjs.js +1 -1
- package/lib/DateField/DateField.devWarnings.es.js +9 -8
- package/lib/DateField/DateField.es.js +157 -155
- package/lib/DateField/DateField.types.d.ts +2 -1
- package/lib/DateField/DateField.utils.cjs.js +1 -1
- package/lib/DateField/DateField.utils.d.ts +13 -6
- package/lib/DateField/DateField.utils.es.js +107 -109
- package/lib/DateField/useDateFieldForm.cjs.js +1 -1
- package/lib/DateField/useDateFieldForm.es.js +3 -4
- package/lib/Dialog/Dialog.Body.cjs.js +1 -1
- package/lib/Dialog/Dialog.Body.es.js +1 -1
- package/lib/Dialog/Dialog.Content.cjs.js +1 -1
- package/lib/Dialog/Dialog.Content.es.js +1 -1
- package/lib/Dialog/Dialog.Footer.cjs.js +1 -1
- package/lib/Dialog/Dialog.Footer.es.js +1 -1
- package/lib/Dialog/Dialog.Header.cjs.js +1 -1
- package/lib/Dialog/Dialog.Header.es.js +1 -1
- package/lib/Divider/Divider.cjs.js +1 -1
- package/lib/Divider/Divider.es.js +1 -1
- package/lib/EmptyState/EmptyState.cjs.js +1 -1
- package/lib/EmptyState/EmptyState.es.js +2 -2
- package/lib/FileUpload/FileUpload.Button.cjs.js +1 -1
- package/lib/FileUpload/FileUpload.Button.es.js +1 -1
- package/lib/FileUpload/FileUpload.Dropzone.cjs.js +1 -1
- package/lib/FileUpload/FileUpload.Dropzone.es.js +1 -1
- package/lib/FileUpload/FileUpload.List.Item.cjs.js +1 -1
- package/lib/FileUpload/FileUpload.List.Item.es.js +2 -2
- package/lib/FileUpload/FileUpload.List.cjs.js +1 -1
- package/lib/FileUpload/FileUpload.List.es.js +1 -1
- package/lib/FileUpload/FileUpload.cjs.js +1 -1
- package/lib/FileUpload/FileUpload.es.js +2 -2
- package/lib/Flag/Flag.cjs.js +1 -1
- package/lib/Flag/Flag.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.arrow.cjs.js +1 -1
- package/lib/FloatingUI/FloatingUI.arrow.es.js +2 -2
- package/lib/FloatingUI/FloatingUI.content.cjs.js +1 -1
- package/lib/FloatingUI/FloatingUI.content.es.js +2 -2
- package/lib/Form/Form.cjs.js +1 -1
- package/lib/Form/Form.es.js +3 -3
- package/lib/Form/contexts/form.context.cjs.js +1 -1
- package/lib/Form/contexts/form.context.es.js +1 -1
- package/lib/Form/contexts/index.cjs.js +1 -1
- package/lib/Form/contexts/index.es.js +1 -1
- package/lib/Form/hooks/index.cjs.js +1 -1
- package/lib/Form/hooks/index.es.js +2 -2
- package/lib/Form/hooks/useFieldValidator.hook.cjs.js +1 -1
- package/lib/Form/hooks/useFieldValidator.hook.es.js +1 -1
- package/lib/Form/hooks/useFormValidator.hook.cjs.js +1 -1
- package/lib/Form/hooks/useFormValidator.hook.es.js +1 -1
- package/lib/Form/index.cjs.js +1 -1
- package/lib/Form/index.es.js +1 -1
- package/lib/Header/Header.cjs.js +1 -1
- package/lib/Header/Header.es.js +1 -1
- package/lib/Header/HeaderActionGroup.cjs.js +1 -1
- package/lib/Header/HeaderActionGroup.es.js +1 -1
- package/lib/Header/HeaderMasthead.cjs.js +1 -1
- package/lib/Header/HeaderMasthead.es.js +1 -1
- package/lib/Header/HeaderSideNavTrigger.cjs.js +1 -1
- package/lib/Header/HeaderSideNavTrigger.es.js +1 -1
- package/lib/HelperText/HelperText.cjs.js +1 -1
- package/lib/HelperText/HelperText.es.js +2 -2
- package/lib/HelperText/index.cjs.js +1 -1
- package/lib/HelperText/index.es.js +1 -1
- package/lib/Icon/Icon.cjs.js +1 -1
- package/lib/Icon/Icon.es.js +1 -1
- package/lib/InputChoiceGroup/InputChoiceGroup.cjs.js +1 -1
- package/lib/InputChoiceGroup/InputChoiceGroup.es.js +10 -10
- package/lib/Label/Label.cjs.js +1 -1
- package/lib/Label/Label.es.js +2 -2
- package/lib/Link/Link.cjs.js +1 -1
- package/lib/Link/Link.es.js +1 -1
- package/lib/List/List.Item.cjs.js +1 -1
- package/lib/List/List.Item.es.js +1 -1
- package/lib/List/List.cjs.js +1 -1
- package/lib/List/List.es.js +1 -1
- package/lib/Logo/Logo.cjs.js +1 -1
- package/lib/Logo/Logo.es.js +1 -1
- package/lib/Menu/Menu.PopoverContent.cjs.js +1 -1
- package/lib/Menu/Menu.PopoverContent.es.js +1 -1
- package/lib/NativeSelect/NativeSelect.cjs.js +1 -1
- package/lib/NativeSelect/NativeSelect.es.js +18 -18
- package/lib/PageHeader/PageHeader.cjs.js +1 -1
- package/lib/PageHeader/PageHeader.es.js +1 -1
- package/lib/PageLayout/PageLayout.cjs.js +1 -1
- package/lib/PageLayout/PageLayout.es.js +1 -1
- package/lib/PageLayout/PageLayoutAside.cjs.js +1 -1
- package/lib/PageLayout/PageLayoutAside.es.js +1 -1
- package/lib/PageLayout/PageLayoutHeader.cjs.js +1 -1
- package/lib/PageLayout/PageLayoutHeader.es.js +1 -1
- package/lib/PageLayout/PageLayoutMain.cjs.js +1 -1
- package/lib/PageLayout/PageLayoutMain.es.js +1 -1
- package/lib/Pagination/PageButton.cjs.js +1 -1
- package/lib/Pagination/PageButton.es.js +1 -1
- package/lib/Pagination/Pagination.cjs.js +1 -1
- package/lib/Pagination/Pagination.es.js +1 -1
- package/lib/Pagination/PaginationControls.cjs.js +1 -1
- package/lib/Pagination/PaginationControls.es.js +1 -1
- package/lib/Pagination/Truncation.cjs.js +1 -1
- package/lib/Pagination/Truncation.es.js +1 -1
- package/lib/Panel/Footer/Panel.Footer.Actions.cjs.js +1 -1
- package/lib/Panel/Footer/Panel.Footer.Actions.es.js +1 -1
- package/lib/Panel/Footer/Panel.Footer.cjs.js +1 -1
- package/lib/Panel/Footer/Panel.Footer.es.js +1 -1
- package/lib/Panel/Header/Panel.Header.ContentAfter.cjs.js +1 -1
- package/lib/Panel/Header/Panel.Header.ContentAfter.es.js +1 -1
- package/lib/Panel/Header/Panel.Header.ContentBefore.cjs.js +1 -1
- package/lib/Panel/Header/Panel.Header.ContentBefore.es.js +1 -1
- package/lib/Panel/Header/Panel.Header.Description.cjs.js +1 -1
- package/lib/Panel/Header/Panel.Header.Description.es.js +1 -1
- package/lib/Panel/Header/Panel.Header.Heading.cjs.js +1 -1
- package/lib/Panel/Header/Panel.Header.Heading.es.js +1 -1
- package/lib/Panel/Header/Panel.Header.Row.cjs.js +1 -1
- package/lib/Panel/Header/Panel.Header.Row.es.js +1 -1
- package/lib/Panel/Header/Panel.Header.Subheader.cjs.js +1 -1
- package/lib/Panel/Header/Panel.Header.Subheader.es.js +1 -1
- package/lib/Panel/Header/Panel.Header.cjs.js +1 -1
- package/lib/Panel/Header/Panel.Header.es.js +1 -1
- package/lib/Panel/Panel.Body.cjs.js +1 -1
- package/lib/Panel/Panel.Body.es.js +1 -1
- package/lib/Panel/Panel.Inline.cjs.js +1 -1
- package/lib/Panel/Panel.Inline.es.js +1 -1
- package/lib/Panel/Panel.Overlay.cjs.js +1 -1
- package/lib/Panel/Panel.Overlay.es.js +1 -1
- package/lib/Panel/Panel.ResizeHandle.cjs.js +1 -1
- package/lib/Panel/Panel.ResizeHandle.es.js +1 -1
- package/lib/Panel/Panel.cjs.js +1 -1
- package/lib/Panel/Panel.es.js +1 -1
- package/lib/Popover/Popover.cjs.js +1 -1
- package/lib/Popover/Popover.content.cjs.js +1 -1
- package/lib/Popover/Popover.content.es.js +1 -1
- package/lib/Popover/Popover.es.js +1 -1
- package/lib/ProgressBar/ProgressBar.cjs.js +1 -1
- package/lib/ProgressBar/ProgressBar.es.js +2 -2
- package/lib/RadioButton/RadioButton.cjs.js +1 -1
- package/lib/RadioButton/RadioButton.es.js +2 -2
- package/lib/Search/Search.Results.ViewAll.cjs.js +1 -1
- package/lib/Search/Search.Results.ViewAll.es.js +2 -2
- package/lib/Search/Search.Results.cjs.js +1 -1
- package/lib/Search/Search.Results.es.js +2 -2
- package/lib/Search/Search.cjs.js +1 -1
- package/lib/Search/Search.es.js +3 -3
- package/lib/Search/SearchDropdown.cjs.js +1 -1
- package/lib/Search/SearchDropdown.es.js +3 -3
- package/lib/SegmentedControl/SegmentedControl.Item.cjs.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.Item.es.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.List.cjs.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.List.es.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.Panel.cjs.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.Panel.es.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.cjs.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.es.js +1 -1
- package/lib/Select/Select.cjs.js +1 -1
- package/lib/Select/Select.es.js +2 -2
- package/lib/Select/SelectDropdown.cjs.js +1 -1
- package/lib/Select/SelectDropdown.es.js +3 -3
- package/lib/Select/SelectField.cjs.js +1 -1
- package/lib/Select/SelectField.es.js +1 -1
- package/lib/Select/useSelectA11y.cjs.js +1 -1
- package/lib/Select/useSelectA11y.es.js +12 -13
- package/lib/SideNav/SideNav.cjs.js +1 -1
- package/lib/SideNav/SideNav.es.js +1 -1
- package/lib/SideNav/SideNavActionListGroup.cjs.js +1 -1
- package/lib/SideNav/SideNavActionListGroup.es.js +2 -2
- package/lib/SideNav/SideNavActionListGroupHeading.cjs.js +1 -1
- package/lib/SideNav/SideNavActionListGroupHeading.es.js +1 -1
- package/lib/SideNav/SideNavActionListItem.cjs.js +1 -1
- package/lib/SideNav/SideNavActionListItem.es.js +2 -2
- package/lib/SideNav/SideNavActionListItemExpandable.cjs.js +1 -1
- package/lib/SideNav/SideNavActionListItemExpandable.es.js +2 -2
- package/lib/SideNav/SideNavActionListItemFlyout.cjs.js +1 -1
- package/lib/SideNav/SideNavActionListItemFlyout.es.js +1 -1
- package/lib/SideNav/SideNavBody.cjs.js +1 -1
- package/lib/SideNav/SideNavBody.es.js +2 -2
- package/lib/SideNav/SideNavContext.cjs.js +1 -1
- package/lib/SideNav/SideNavContext.es.js +1 -1
- package/lib/SideNav/SideNavFooter.cjs.js +1 -1
- package/lib/SideNav/SideNavFooter.es.js +1 -1
- package/lib/SideNav/SideNavHeader.cjs.js +1 -1
- package/lib/SideNav/SideNavHeader.es.js +1 -1
- package/lib/Slider/DualSlider.cjs.js +1 -1
- package/lib/Slider/DualSlider.es.js +1 -1
- package/lib/Slider/SingleSlider.cjs.js +1 -1
- package/lib/Slider/SingleSlider.es.js +1 -1
- package/lib/Slider/Slider.Error.cjs.js +1 -1
- package/lib/Slider/Slider.Error.es.js +2 -2
- package/lib/Slider/Slider.TextField.cjs.js +1 -1
- package/lib/Slider/Slider.TextField.es.js +1 -1
- package/lib/Slider/Slider.Thumb.cjs.js +1 -1
- package/lib/Slider/Slider.Thumb.es.js +2 -2
- package/lib/Slider/Slider.TickMarks.cjs.js +1 -1
- package/lib/Slider/Slider.TickMarks.es.js +1 -1
- package/lib/Slider/Slider.ValueAxisLabels.cjs.js +1 -1
- package/lib/Slider/Slider.ValueAxisLabels.es.js +1 -1
- package/lib/Slider/hooks/useSliderBase.cjs.js +1 -1
- package/lib/Slider/hooks/useSliderBase.es.js +4 -5
- package/lib/Spinner/Spinner.cjs.js +1 -1
- package/lib/Spinner/Spinner.es.js +1 -1
- package/lib/Spinner/SpinnerWrap.cjs.js +1 -1
- package/lib/Spinner/SpinnerWrap.es.js +1 -1
- package/lib/StateLayer/StateLayer.cjs.js +1 -1
- package/lib/StateLayer/StateLayer.es.js +1 -1
- package/lib/Stepper/Stepper.Body.cjs.js +1 -1
- package/lib/Stepper/Stepper.Body.es.js +1 -1
- package/lib/Stepper/Stepper.Heading.cjs.js +1 -1
- package/lib/Stepper/Stepper.Heading.es.js +1 -1
- package/lib/Stepper/Stepper.Marker.cjs.js +1 -1
- package/lib/Stepper/Stepper.Marker.es.js +1 -1
- package/lib/Stepper/Stepper.Step.cjs.js +1 -1
- package/lib/Stepper/Stepper.Step.es.js +1 -1
- package/lib/Stepper/Stepper.cjs.js +1 -1
- package/lib/Stepper/Stepper.es.js +1 -1
- package/lib/Switch/Switch.cjs.js +1 -1
- package/lib/Switch/Switch.es.js +2 -2
- package/lib/Tabs/Tabs.Group.cjs.js +1 -1
- package/lib/Tabs/Tabs.Group.es.js +2 -2
- package/lib/Tabs/Tabs.Item.cjs.js +1 -1
- package/lib/Tabs/Tabs.Item.es.js +1 -1
- package/lib/Tabs/Tabs.Panel.cjs.js +1 -1
- package/lib/Tabs/Tabs.Panel.es.js +1 -1
- package/lib/Tabs/Tabs.cjs.js +1 -1
- package/lib/Tabs/Tabs.es.js +1 -1
- package/lib/Text/Text.cjs.js +1 -1
- package/lib/Text/Text.es.js +1 -1
- package/lib/TextArea/TextArea.cjs.js +1 -1
- package/lib/TextArea/TextArea.es.js +2 -2
- package/lib/TextField/TextField.cjs.js +1 -1
- package/lib/TextField/TextField.es.js +2 -2
- package/lib/Toasts/Toast.cjs.js +1 -1
- package/lib/Toasts/Toast.es.js +2 -2
- package/lib/Toasts/ToastContainer.cjs.js +1 -1
- package/lib/Toasts/ToastContainer.es.js +2 -2
- package/lib/Tooltip/Tooltip.cjs.js +1 -1
- package/lib/Tooltip/Tooltip.es.js +1 -1
- package/lib/_Navigation/classes.cjs.js +1 -1
- package/lib/_Navigation/classes.es.js +1 -1
- package/lib/_Options/OptionChips.cjs.js +1 -1
- package/lib/_Options/OptionChips.es.js +1 -1
- package/lib/_Options/useSelectValue.cjs.js +1 -1
- package/lib/_Options/useSelectValue.es.js +1 -1
- package/lib/index.cjs.js +1 -1
- package/lib/index.es.js +3 -3
- package/lib/wip/BadgeIndicator/BadgeIndicator.cjs.js +1 -1
- package/lib/wip/BadgeIndicator/BadgeIndicator.es.js +1 -1
- package/lib/wip/Calendar/Calendar.Date.cjs.js +1 -0
- package/lib/wip/Calendar/Calendar.Date.d.ts +11 -0
- package/lib/wip/Calendar/Calendar.Date.es.js +29 -0
- package/lib/wip/Calendar/Calendar.Dates.cjs.js +1 -0
- package/lib/wip/Calendar/Calendar.Dates.d.ts +12 -0
- package/lib/wip/Calendar/Calendar.Dates.es.js +44 -0
- package/lib/wip/Calendar/Calendar.Days.cjs.js +1 -0
- package/lib/wip/Calendar/Calendar.Days.d.ts +5 -0
- package/lib/wip/Calendar/Calendar.Days.es.js +30 -0
- package/lib/wip/Calendar/Calendar.Header.cjs.js +1 -0
- package/lib/wip/Calendar/Calendar.Header.d.ts +15 -0
- package/lib/wip/Calendar/Calendar.Header.es.js +65 -0
- package/lib/wip/Calendar/Calendar.cjs.js +1 -0
- package/lib/wip/Calendar/Calendar.context.cjs.js +1 -0
- package/lib/wip/Calendar/Calendar.context.d.ts +8 -0
- package/lib/wip/Calendar/Calendar.context.es.js +11 -0
- package/lib/wip/Calendar/Calendar.d.ts +24 -0
- package/lib/wip/Calendar/Calendar.es.js +94 -0
- package/lib/wip/Calendar/Calendar.types.cjs.js +1 -0
- package/lib/wip/Calendar/Calendar.types.d.ts +75 -0
- package/lib/wip/Calendar/Calendar.types.es.js +1 -0
- package/lib/wip/Calendar/Calendar.utils.cjs.js +1 -0
- package/lib/wip/Calendar/Calendar.utils.d.ts +102 -0
- package/lib/wip/Calendar/Calendar.utils.es.js +162 -0
- package/lib/wip/Calendar/index.cjs.js +1 -0
- package/lib/wip/Calendar/index.d.ts +2 -0
- package/lib/wip/Calendar/index.es.js +4 -0
- package/lib/wip/Calendar/useCalendarGrid.cjs.js +1 -0
- package/lib/wip/Calendar/useCalendarGrid.d.ts +18 -0
- package/lib/wip/Calendar/useCalendarGrid.es.js +15 -0
- package/lib/wip/Calendar/useCalendarMonth.cjs.js +1 -0
- package/lib/wip/Calendar/useCalendarMonth.d.ts +24 -0
- package/lib/wip/Calendar/useCalendarMonth.es.js +30 -0
- package/lib/wip/DataTable/DataTable.Body.cjs.js +1 -1
- package/lib/wip/DataTable/DataTable.Body.es.js +1 -1
- package/lib/wip/DataTable/DataTable.Cell.cjs.js +1 -1
- package/lib/wip/DataTable/DataTable.Cell.es.js +1 -1
- package/lib/wip/DataTable/DataTable.ColumnHeader.cjs.js +1 -1
- package/lib/wip/DataTable/DataTable.ColumnHeader.es.js +1 -1
- package/lib/wip/DataTable/DataTable.Footer.cjs.js +1 -1
- package/lib/wip/DataTable/DataTable.Footer.es.js +1 -1
- package/lib/wip/DataTable/DataTable.Head.cjs.js +1 -1
- package/lib/wip/DataTable/DataTable.Head.es.js +1 -1
- package/lib/wip/DataTable/DataTable.Header.cjs.js +1 -1
- package/lib/wip/DataTable/DataTable.Header.es.js +1 -1
- package/lib/wip/DataTable/DataTable.Row.cjs.js +1 -1
- package/lib/wip/DataTable/DataTable.Row.es.js +1 -1
- package/lib/wip/DataTable/DataTable.Toolbar.cjs.js +1 -1
- package/lib/wip/DataTable/DataTable.Toolbar.es.js +1 -1
- package/lib/wip/DataTable/DataTable.cjs.js +1 -1
- package/lib/wip/DataTable/DataTable.es.js +1 -1
- package/lib/wip/index.cjs.js +1 -1
- package/lib/wip/index.d.ts +1 -0
- package/lib/wip/index.es.js +27 -25
- package/package.json +7 -7
- package/utils/hooks/index.cjs.js +1 -1
- package/utils/hooks/index.es.js +1 -1
- package/utils/hooks/useLocalStorage.cjs.js +1 -1
- package/utils/hooks/useLocalStorage.es.js +1 -1
- package/utils/spacing.cjs.js +1 -1
- package/utils/spacing.es.js +1 -1
- package/chunks/useFormValidator.hook.BGM2gifb.js +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CalendarDatesProps } from './Calendar.types';
|
|
2
|
+
/**
|
|
3
|
+
* The date grid — owns the whole `<table>`, weekday header included.
|
|
4
|
+
*
|
|
5
|
+
* `Calendar.Days` renders `<thead>` and the rows render `<tbody>`, so neither
|
|
6
|
+
* is valid as a standalone sibling; keeping both under one owner means the
|
|
7
|
+
* markup is well-formed however the calendar is composed. They stay exported
|
|
8
|
+
* for Storybook `subcomponents` autodocs and the future `renderDay` hook, not
|
|
9
|
+
* as composition points — see the ADR's note that `Calendar.Date` is "exported
|
|
10
|
+
* but typically rendered by `Calendar.Dates`".
|
|
11
|
+
*/
|
|
12
|
+
export declare const Dates: import('react').ForwardRefExoticComponent<CalendarDatesProps & import('react').RefAttributes<HTMLTableElement>>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as f, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import y from "clsx";
|
|
3
|
+
import { forwardRef as D } from "react";
|
|
4
|
+
import { s as r, a as e } from "../../../chunks/calendar.module.CXGuMNJB.js";
|
|
5
|
+
import "../../../chunks/constants.XFX4nOSf.js";
|
|
6
|
+
import { d as s } from "../../../chunks/dates.NqdbQ2fR.js";
|
|
7
|
+
import { CalendarDate as b } from "./Calendar.Date.es.js";
|
|
8
|
+
import { Days as h } from "./Calendar.Days.es.js";
|
|
9
|
+
import { useCalendar as N } from "./Calendar.context.es.js";
|
|
10
|
+
const v = D(
|
|
11
|
+
function({ className: m, ...i }, l) {
|
|
12
|
+
const { weeks: d, visibleMonth: n, navDirection: c, monthLabelId: p } = N();
|
|
13
|
+
return (
|
|
14
|
+
// The grid takes its name from the header's month label, so it announces
|
|
15
|
+
// as "July 2025 table" rather than an unnamed one. Placed before the
|
|
16
|
+
// spread so a consumer can still name it themselves.
|
|
17
|
+
/* @__PURE__ */ f(
|
|
18
|
+
"table",
|
|
19
|
+
{
|
|
20
|
+
"aria-labelledby": p,
|
|
21
|
+
...i,
|
|
22
|
+
ref: l,
|
|
23
|
+
className: y(r[e.grid], m),
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ a(h, {}),
|
|
26
|
+
/* @__PURE__ */ a(
|
|
27
|
+
"tbody",
|
|
28
|
+
{
|
|
29
|
+
"data-nav-direction": c ?? void 0,
|
|
30
|
+
className: r[e.dates],
|
|
31
|
+
children: d.map((t) => /* @__PURE__ */ a("tr", { className: r[e.week], children: t.map((o) => /* @__PURE__ */ a(b, { date: o }, s(o))) }, s(t[0])))
|
|
32
|
+
},
|
|
33
|
+
s(n)
|
|
34
|
+
)
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
v.displayName = "Dates";
|
|
42
|
+
export {
|
|
43
|
+
v as Dates
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),a=require("../../../chunks/calendar.module.D0wrnDz0.js"),p=require("./Calendar.context.cjs.js"),r=require("./Calendar.utils.cjs.js"),t=m.forwardRef(function({className:n,...c},d){const{weekdayLabels:i,weekStart:s,locale:o}=p.useCalendar(),u=r.getWeekdayFullLabels(o,s);return e.jsx("thead",{...c,ref:d,className:n,children:e.jsx("tr",{children:i.map((y,l)=>e.jsxs("th",{scope:"col",className:a.styles[a.staticCalendarClassNames.day],children:[e.jsx("span",{"aria-hidden":"true",children:y}),e.jsx("span",{className:a.styles[a.staticCalendarClassNames.visuallyHidden],children:u[l]})]},r.wrapWeekday(s+l)))})})});t.displayName="Days";exports.Days=t;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The weekday header row. Native `<th scope="col">` is the C-1 baseline;
|
|
3
|
+
* explicit `role="columnheader"` arrives with the rest of the grid ARIA in C-11.
|
|
4
|
+
*/
|
|
5
|
+
export declare const Days: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & import('react').RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as a, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f } from "react";
|
|
3
|
+
import { s as r, a as l } from "../../../chunks/calendar.module.CXGuMNJB.js";
|
|
4
|
+
import { useCalendar as y } from "./Calendar.context.es.js";
|
|
5
|
+
import { getWeekdayFullLabels as h, wrapWeekday as u } from "./Calendar.utils.es.js";
|
|
6
|
+
const k = f(
|
|
7
|
+
function({ className: t, ...o }, d) {
|
|
8
|
+
const { weekdayLabels: i, weekStart: e, locale: n } = y(), c = h(n, e);
|
|
9
|
+
return /* @__PURE__ */ a("thead", { ...o, ref: d, className: t, children: /* @__PURE__ */ a("tr", { children: i.map((m, s) => (
|
|
10
|
+
// Keyed by weekday number rather than the label: `short` names are
|
|
11
|
+
// not guaranteed unique across every locale.
|
|
12
|
+
/* @__PURE__ */ p(
|
|
13
|
+
"th",
|
|
14
|
+
{
|
|
15
|
+
scope: "col",
|
|
16
|
+
className: r[l.day],
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", children: m }),
|
|
19
|
+
/* @__PURE__ */ a("span", { className: r[l.visuallyHidden], children: c[s] })
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
u(e + s)
|
|
23
|
+
)
|
|
24
|
+
)) }) });
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
k.displayName = "Days";
|
|
28
|
+
export {
|
|
29
|
+
k as Days
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("clsx"),C=require("react"),v=require("../../../chunks/ChevronLeftCurved.JKg9pOxN.js"),m=require("../../../chunks/ChevronRightCurved.CoT-Bqyo.js"),r=require("../../../chunks/calendar.module.D0wrnDz0.js"),b=require("../../Button/Button.cjs.js"),x=require("../../Icon/Icon.cjs.js"),g=require("./Calendar.context.cjs.js"),a=({icon:o,label:t,onClick:n})=>e.jsx(b.Button,{type:"button",appearance:"neutral",kind:"ghost",size:"md",iconOnly:!0,iconBefore:e.jsx(x.Icon,{icon:o}),"aria-label":t,onClick:n}),s=C.forwardRef(function({className:t,...n},i){const{monthLabel:l,monthLabelId:c,goToPreviousMonth:u,goToNextMonth:d}=g.useCalendar();return e.jsxs("div",{...n,ref:i,className:h(r.styles[r.staticCalendarClassNames.header],t),children:[e.jsx(a,{icon:v.SvgChevronLeftCurved,label:"Previous month",onClick:u}),e.jsx("span",{id:c,"aria-live":"polite",className:r.styles[r.staticCalendarClassNames.headerLabel],children:l}),e.jsx(a,{icon:m.SvgChevronRightCurved,label:"Next month",onClick:d})]})});s.displayName="Header";exports.Header=s;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CalendarHeaderProps } from './Calendar.types';
|
|
2
|
+
/**
|
|
3
|
+
* Month label with previous / next arrows.
|
|
4
|
+
*
|
|
5
|
+
* The arrows are Beam `<Button>`s rather than hand-rolled, which supplies the
|
|
6
|
+
* Figma `neutral/ghost` treatment, the 40×40 `md` sizing, and the `StateLayer`.
|
|
7
|
+
* Labels are hardcoded English until `ariaLabels` arrives with I-7.
|
|
8
|
+
*
|
|
9
|
+
* The label is a live region as well as the grid's accessible name. Paging the
|
|
10
|
+
* month replaces the grid's contents without moving focus — the arrow keeps it
|
|
11
|
+
* — so nothing else would tell a screen-reader user the month changed. It
|
|
12
|
+
* announces on update only: the text is already in the region at mount, which
|
|
13
|
+
* is when assistive tech registers it, so the first paint is silent.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Header: import('react').ForwardRefExoticComponent<CalendarHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import f from "clsx";
|
|
3
|
+
import { forwardRef as h } from "react";
|
|
4
|
+
import { S as u } from "../../../chunks/ChevronLeftCurved.CX7aH27X.js";
|
|
5
|
+
import { S as v } from "../../../chunks/ChevronRightCurved.9hi9Zc8J.js";
|
|
6
|
+
import { s as t, a as n } from "../../../chunks/calendar.module.CXGuMNJB.js";
|
|
7
|
+
import { Button as C } from "../../Button/Button.es.js";
|
|
8
|
+
import { Icon as b } from "../../Icon/Icon.es.js";
|
|
9
|
+
import { useCalendar as N } from "./Calendar.context.es.js";
|
|
10
|
+
const i = ({ icon: a, label: e, onClick: r }) => /* @__PURE__ */ o(
|
|
11
|
+
C,
|
|
12
|
+
{
|
|
13
|
+
type: "button",
|
|
14
|
+
appearance: "neutral",
|
|
15
|
+
kind: "ghost",
|
|
16
|
+
size: "md",
|
|
17
|
+
iconOnly: !0,
|
|
18
|
+
iconBefore: /* @__PURE__ */ o(b, { icon: a }),
|
|
19
|
+
"aria-label": e,
|
|
20
|
+
onClick: r
|
|
21
|
+
}
|
|
22
|
+
), g = h(
|
|
23
|
+
function({ className: e, ...r }, s) {
|
|
24
|
+
const { monthLabel: m, monthLabelId: l, goToPreviousMonth: c, goToNextMonth: d } = N();
|
|
25
|
+
return /* @__PURE__ */ p(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
...r,
|
|
29
|
+
ref: s,
|
|
30
|
+
className: f(t[n.header], e),
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ o(
|
|
33
|
+
i,
|
|
34
|
+
{
|
|
35
|
+
icon: u,
|
|
36
|
+
label: "Previous month",
|
|
37
|
+
onClick: c
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ o(
|
|
41
|
+
"span",
|
|
42
|
+
{
|
|
43
|
+
id: l,
|
|
44
|
+
"aria-live": "polite",
|
|
45
|
+
className: t[n.headerLabel],
|
|
46
|
+
children: m
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ o(
|
|
50
|
+
i,
|
|
51
|
+
{
|
|
52
|
+
icon: v,
|
|
53
|
+
label: "Next month",
|
|
54
|
+
onClick: d
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
g.displayName = "Header";
|
|
63
|
+
export {
|
|
64
|
+
g as Header
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),j=require("clsx"),_=require("react"),p=require("../../../chunks/calendar.module.D0wrnDz0.js"),H=require("../../../chunks/classNames.CEoAKlth.js");require("../../../chunks/constants.DLsDVPyH.js");const L=require("../../../chunks/dates.CVW08OQ2.js"),S=require("../../../utils/hooks/useId.cjs.js"),k=require("../../../utils/spacing.cjs.js"),T=require("./Calendar.context.cjs.js"),I=require("./Calendar.Date.cjs.js"),D=require("./Calendar.Dates.cjs.js"),R=require("./Calendar.Days.cjs.js"),q=require("./Calendar.Header.cjs.js");require("./Calendar.utils.cjs.js");const A=require("./useCalendarGrid.cjs.js"),E=require("./useCalendarMonth.cjs.js"),e=_.forwardRef(function({today:y,onVisibleMonthChange:b,locale:m,role:w="group","aria-label":x="Calendar",className:g,...h},N){const[v,M]=k.partitionSpacingProps(h),r=m??L.DEFAULT_LOCALE,{today:n,visibleMonth:s,navDirection:t,goToPreviousMonth:l,goToNextMonth:i}=E.useCalendarMonth({today:y,onVisibleMonthChange:b}),{weekStart:o,weekdayLabels:d,weeks:c,monthLabel:u}=A.useCalendarGrid(s,r),C=S.useId(),P=_.useMemo(()=>({locale:r,today:n,visibleMonth:s,weekStart:o,weeks:c,weekdayLabels:d,monthLabel:u,monthLabelId:C,goToPreviousMonth:l,goToNextMonth:i,navDirection:t}),[r,n,s,o,c,d,u,C,l,i,t]),f=j(p.styles[p.baseClassNamePrefix],...H.generateSpacingClasses(v),g);return a.jsx(T.CalendarContext.Provider,{value:P,children:a.jsxs("div",{...M,ref:N,role:w,"aria-label":x,className:f,children:[a.jsx(q.Header,{}),a.jsx(D.Dates,{})]})})});e.displayName="Calendar";e.Header=q.Header;e.Days=R.Days;e.Dates=D.Dates;e.Date=I.CalendarDate;e.Header.displayName="Calendar.Header";e.Days.displayName="Calendar.Days";e.Dates.displayName="Calendar.Dates";e.Date.displayName="Calendar.Date";exports.Calendar=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),n=t.createContext(null),r=()=>{const e=t.useContext(n);if(!e)throw new Error("Calendar sub-components must be used within a Calendar");return e};exports.CalendarContext=n;exports.useCalendar=r;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CalendarContextValue } from './Calendar.types';
|
|
2
|
+
export declare const CalendarContext: import('react').Context<CalendarContextValue | null>;
|
|
3
|
+
/**
|
|
4
|
+
* Reads the grid state published by the `Calendar` root. Throws outside a
|
|
5
|
+
* `Calendar`, matching the throwing contract Accordion and Tabs use — the
|
|
6
|
+
* sub-components are meaningless without a root to derive the month.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useCalendar: () => CalendarContextValue;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createContext as e, useContext as n } from "react";
|
|
2
|
+
const o = e(null), a = () => {
|
|
3
|
+
const t = n(o);
|
|
4
|
+
if (!t)
|
|
5
|
+
throw new Error("Calendar sub-components must be used within a Calendar");
|
|
6
|
+
return t;
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
o as CalendarContext,
|
|
10
|
+
a as useCalendar
|
|
11
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
import { CalendarDate } from './Calendar.Date';
|
|
3
|
+
import { Dates } from './Calendar.Dates';
|
|
4
|
+
import { Days } from './Calendar.Days';
|
|
5
|
+
import { Header } from './Calendar.Header';
|
|
6
|
+
import { CalendarProps } from './Calendar.types';
|
|
7
|
+
interface CalendarComponent extends ForwardRefExoticComponent<CalendarProps & RefAttributes<HTMLDivElement>> {
|
|
8
|
+
Header: typeof Header;
|
|
9
|
+
Days: typeof Days;
|
|
10
|
+
Dates: typeof Dates;
|
|
11
|
+
Date: typeof CalendarDate;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A month grid with a header for moving between months.
|
|
15
|
+
*
|
|
16
|
+
* The root owns the layout rather than exposing the parts as composable
|
|
17
|
+
* children: the weekday row and the date rows can't be reordered or used apart,
|
|
18
|
+
* Figma has no variant that hides the header, and modelling it as children
|
|
19
|
+
* would leave `<Calendar />` with no way to change months. Figma treats the
|
|
20
|
+
* genuinely optional parts — footer and presets — as variants, so those become
|
|
21
|
+
* props when they land.
|
|
22
|
+
*/
|
|
23
|
+
export declare const Calendar: CalendarComponent;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as r, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import H from "clsx";
|
|
3
|
+
import { forwardRef as k, useMemo as S } from "react";
|
|
4
|
+
import { s as T, b as j } from "../../../chunks/calendar.module.CXGuMNJB.js";
|
|
5
|
+
import { a as A } from "../../../chunks/classNames.koX0H7D0.js";
|
|
6
|
+
import "../../../chunks/constants.XFX4nOSf.js";
|
|
7
|
+
import { D as E } from "../../../chunks/dates.NqdbQ2fR.js";
|
|
8
|
+
import { useId as I } from "../../../utils/hooks/useId.es.js";
|
|
9
|
+
import { partitionSpacingProps as F } from "../../../utils/spacing.es.js";
|
|
10
|
+
import { CalendarContext as G } from "./Calendar.context.es.js";
|
|
11
|
+
import { CalendarDate as O } from "./Calendar.Date.es.js";
|
|
12
|
+
import { Dates as f } from "./Calendar.Dates.es.js";
|
|
13
|
+
import { Days as R } from "./Calendar.Days.es.js";
|
|
14
|
+
import { Header as C } from "./Calendar.Header.es.js";
|
|
15
|
+
import "./Calendar.utils.es.js";
|
|
16
|
+
import { useCalendarGrid as U } from "./useCalendarGrid.es.js";
|
|
17
|
+
import { useCalendarMonth as V } from "./useCalendarMonth.es.js";
|
|
18
|
+
const a = k(
|
|
19
|
+
function({
|
|
20
|
+
today: D,
|
|
21
|
+
onVisibleMonthChange: y,
|
|
22
|
+
locale: u,
|
|
23
|
+
// Destructured with defaults rather than written after the prop spread:
|
|
24
|
+
// spreading first would silently drop a caller's own `role` or
|
|
25
|
+
// `aria-label`, and spreading last would let an unrelated pass-through
|
|
26
|
+
// erase the group semantics. This way the caller wins explicitly.
|
|
27
|
+
role: N = "group",
|
|
28
|
+
"aria-label": b = "Calendar",
|
|
29
|
+
className: h,
|
|
30
|
+
...x
|
|
31
|
+
}, g) {
|
|
32
|
+
const [v, L] = F(x), e = u ?? E, { today: t, visibleMonth: o, navDirection: s, goToPreviousMonth: m, goToNextMonth: n } = V({ today: D, onVisibleMonthChange: y }), { weekStart: i, weekdayLabels: l, weeks: d, monthLabel: p } = U(
|
|
33
|
+
o,
|
|
34
|
+
e
|
|
35
|
+
), c = I(), P = S(
|
|
36
|
+
() => ({
|
|
37
|
+
locale: e,
|
|
38
|
+
today: t,
|
|
39
|
+
visibleMonth: o,
|
|
40
|
+
weekStart: i,
|
|
41
|
+
weeks: d,
|
|
42
|
+
weekdayLabels: l,
|
|
43
|
+
monthLabel: p,
|
|
44
|
+
monthLabelId: c,
|
|
45
|
+
goToPreviousMonth: m,
|
|
46
|
+
goToNextMonth: n,
|
|
47
|
+
navDirection: s
|
|
48
|
+
}),
|
|
49
|
+
[
|
|
50
|
+
e,
|
|
51
|
+
t,
|
|
52
|
+
o,
|
|
53
|
+
i,
|
|
54
|
+
d,
|
|
55
|
+
l,
|
|
56
|
+
p,
|
|
57
|
+
c,
|
|
58
|
+
m,
|
|
59
|
+
n,
|
|
60
|
+
s
|
|
61
|
+
]
|
|
62
|
+
), M = H(
|
|
63
|
+
T[j],
|
|
64
|
+
...A(v),
|
|
65
|
+
h
|
|
66
|
+
);
|
|
67
|
+
return /* @__PURE__ */ r(G.Provider, { value: P, children: /* @__PURE__ */ w(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
...L,
|
|
71
|
+
ref: g,
|
|
72
|
+
role: N,
|
|
73
|
+
"aria-label": b,
|
|
74
|
+
className: M,
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ r(C, {}),
|
|
77
|
+
/* @__PURE__ */ r(f, {})
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
) });
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
a.displayName = "Calendar";
|
|
84
|
+
a.Header = C;
|
|
85
|
+
a.Days = R;
|
|
86
|
+
a.Dates = f;
|
|
87
|
+
a.Date = O;
|
|
88
|
+
a.Header.displayName = "Calendar.Header";
|
|
89
|
+
a.Days.displayName = "Calendar.Days";
|
|
90
|
+
a.Dates.displayName = "Calendar.Dates";
|
|
91
|
+
a.Date.displayName = "Calendar.Date";
|
|
92
|
+
export {
|
|
93
|
+
a as Calendar
|
|
94
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { MarginSpacingProps, PaddingSpacingProps } from '../../../utils/spacing';
|
|
3
|
+
export interface CalendarProps extends MarginSpacingProps, PaddingSpacingProps, Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
4
|
+
/**
|
|
5
|
+
* Override the current date. Seeds the visible month, and keeps tests and
|
|
6
|
+
* server-rendered output deterministic — the Calendar otherwise reads the
|
|
7
|
+
* system clock, which can differ between server and browser across a
|
|
8
|
+
* timezone or midnight boundary. Pass a timezone-stable value.
|
|
9
|
+
*
|
|
10
|
+
* Ignored when it isn't a valid `Date`.
|
|
11
|
+
*
|
|
12
|
+
* @default new Date()
|
|
13
|
+
*/
|
|
14
|
+
today?: Date;
|
|
15
|
+
/**
|
|
16
|
+
* Fires whenever the visible month changes, with the first day of the new
|
|
17
|
+
* month at local midnight.
|
|
18
|
+
*/
|
|
19
|
+
onVisibleMonthChange?: (date: Date) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Specify the BCP-47 locale tag driving weekday and month names, the spoken
|
|
22
|
+
* date labels, and which day the week starts on (e.g. `de-DE` → Montag first,
|
|
23
|
+
* `en-US` → Sunday first). An unsupported tag falls back to the default.
|
|
24
|
+
*
|
|
25
|
+
* @default 'en-US'
|
|
26
|
+
*/
|
|
27
|
+
locale?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Accessible name for the calendar group.
|
|
30
|
+
*
|
|
31
|
+
* @default 'Calendar'
|
|
32
|
+
*/
|
|
33
|
+
'aria-label'?: string;
|
|
34
|
+
}
|
|
35
|
+
/** Which way the visible month last moved, for the enter animation. */
|
|
36
|
+
export type CalendarNavDirection = 'previous' | 'next';
|
|
37
|
+
/**
|
|
38
|
+
* Everything the sub-components need, derived once by the `Calendar` root.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export interface CalendarContextValue {
|
|
42
|
+
/** BCP-47 tag driving weekday names, week start, and day numerals. */
|
|
43
|
+
locale: string;
|
|
44
|
+
/** The current date, at local midnight. */
|
|
45
|
+
today: Date;
|
|
46
|
+
/** First day of the rendered month, at local midnight. */
|
|
47
|
+
visibleMonth: Date;
|
|
48
|
+
/** First day of the week, in `Date.getDay()` numbering (0 = Sunday). */
|
|
49
|
+
weekStart: number;
|
|
50
|
+
/** Whole weeks covering `visibleMonth`, padded with adjacent-month days. */
|
|
51
|
+
weeks: Date[][];
|
|
52
|
+
/** Abbreviated weekday names, ordered from `weekStart`. */
|
|
53
|
+
weekdayLabels: ReadonlyArray<string>;
|
|
54
|
+
/** Localized "Month Year" label for `visibleMonth`. */
|
|
55
|
+
monthLabel: string;
|
|
56
|
+
/**
|
|
57
|
+
* `id` of the element rendering `monthLabel`, so the grid can be named by it.
|
|
58
|
+
* `undefined` only on a React < 18 server render, where `useId` has no id to
|
|
59
|
+
* give yet and both the `id` and the `aria-labelledby` are simply omitted.
|
|
60
|
+
*/
|
|
61
|
+
monthLabelId: string | undefined;
|
|
62
|
+
/** Moves the visible month back one and fires `onVisibleMonthChange`. */
|
|
63
|
+
goToPreviousMonth: () => void;
|
|
64
|
+
/** Moves the visible month forward one and fires `onVisibleMonthChange`. */
|
|
65
|
+
goToNextMonth: () => void;
|
|
66
|
+
/** Direction of the last navigation; `null` until the user navigates. */
|
|
67
|
+
navDirection: CalendarNavDirection | null;
|
|
68
|
+
}
|
|
69
|
+
export type CalendarHeaderProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
70
|
+
export type CalendarDaysProps = ComponentPropsWithoutRef<'thead'>;
|
|
71
|
+
export type CalendarDatesProps = Omit<ComponentPropsWithoutRef<'table'>, 'children'>;
|
|
72
|
+
export interface CalendarDateProps extends Omit<ComponentPropsWithoutRef<'td'>, 'children'> {
|
|
73
|
+
/** The day this cell renders. Outside-month styling is derived from it. */
|
|
74
|
+
date: Date;
|
|
75
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../chunks/constants.DLsDVPyH.js");const o=require("../../../chunks/dates.CVW08OQ2.js"),r=7,y=0,i=1,E=6,g=e=>(e%r+r)%r,s=(e,t,n)=>{const a=new Date;return a.setFullYear(e,t,n),a.setHours(0,0,0,0),a},_=e=>s(e.getFullYear(),e.getMonth(),e.getDate()),h=e=>s(e.getFullYear(),e.getMonth(),1),d=e=>s(e.getFullYear(),e.getMonth()+1,0),m=e=>d(e).getDate(),D=(e,t)=>s(e.getFullYear(),e.getMonth(),e.getDate()+t),I=(e,t)=>{const n=s(e.getFullYear(),e.getMonth()+t,1),a=Math.min(e.getDate(),m(n));return s(n.getFullYear(),n.getMonth(),a)},T=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),k=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth(),L=[],l=(e,t)=>{const n=o.createBoundedMemo(e,t);return L.push(n),n},C=e=>{var t,n;try{const a=new Intl.Locale(e),c=((t=a.getWeekInfo)==null?void 0:t.call(a).firstDay)??((n=a.weekInfo)==null?void 0:n.firstDay);return typeof c=="number"?g(c):null}catch{return null}},N=new Set(["BD","BR","CA","CO","ET","HK","ID","IL","IN","JP","KE","KR","MO","MX","NP","PE","PH","PK","PT","SA","SG","TH","TW","US","VE","YE","ZA"]),O=new Set(["AF","BH","DZ","EG","IQ","IR","JO","KW","LY","OM","QA","SD","SY"]),W=e=>{try{const t=new Intl.Locale(e).maximize().region;return t?N.has(t)?y:O.has(t)?E:null:null}catch{return null}},w=l(o.canonicalLocaleKey,e=>{const t=o.resolveLocale(e);return C(t)??W(t)??i}),b=864e5,M=e=>{const t=new Date(0);return t.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},U=Date.UTC(2024,8,1),S=(e,t,n)=>{const a=new Intl.DateTimeFormat(o.resolveLocale(e),{weekday:n,timeZone:"UTC"});return Array.from({length:r},(c,u)=>a.format(U+g(t+u)*b))},A=(e,t)=>`${o.canonicalLocaleKey(e)}|${t}`,R=l(A,(e,t)=>S(e,t,"short")),K=l(A,(e,t)=>S(e,t,"long")),v=(e,t)=>R(e,t),P=(e,t)=>{const n=h(e),a=g(n.getDay()-t),c=D(n,-a),u=Math.ceil((a+m(e))/r);return Array.from({length:u},(Q,F)=>Array.from({length:r},($,Y)=>D(c,F*r+Y)))},p=(e,t)=>K(e,t),G=new Set(["gregory","buddhist","japanese","roc"]),f=e=>{const{calendar:t}=new Intl.DateTimeFormat(e).resolvedOptions();return G.has(t)?{}:{calendar:"gregory"}},H=l(o.canonicalLocaleKey,e=>{const t=o.resolveLocale(e);return new Intl.DateTimeFormat(t,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC",...f(t)})}),Z=(e,t)=>H(t).format(M(e)),B=l(o.canonicalLocaleKey,e=>{const t=o.resolveLocale(e);return new Intl.DateTimeFormat(t,{month:"long",year:"numeric",timeZone:"UTC",...f(t)})}),V=(e,t)=>B(t).format(M(e)),j=l(o.canonicalLocaleKey,e=>new Intl.NumberFormat(o.resolveLocale(e))),q=(e,t)=>j(t).format(e.getDate()),J=()=>{o.__clearLocaleKeyCache(),L.forEach(e=>e.clear())};exports.DEFAULT_LOCALE=o.DEFAULT_LOCALE;exports.isValidDate=o.isValidDate;exports.DAYS_IN_WEEK=r;exports.MONDAY=i;exports.SUNDAY=y;exports.__clearCalendarCaches=J;exports.addDays=D;exports.addMonths=I;exports.endOfMonth=d;exports.formatDayNumber=q;exports.getCalendarWeeks=P;exports.getDateLabel=Z;exports.getDaysInMonth=m;exports.getMonthLabel=V;exports.getWeekStart=w;exports.getWeekdayFullLabels=p;exports.getWeekdayLabels=v;exports.isSameDay=T;exports.isSameMonth=k;exports.startOfDay=_;exports.startOfMonth=h;exports.wrapWeekday=g;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { DEFAULT_LOCALE, isValidDate, BoundedMemo } from '@viasat/beam-shared/utils';
|
|
2
|
+
export { DEFAULT_LOCALE, isValidDate };
|
|
3
|
+
export declare const DAYS_IN_WEEK = 7;
|
|
4
|
+
/** Sunday, in `Date.getDay()` numbering. */
|
|
5
|
+
export declare const SUNDAY = 0;
|
|
6
|
+
/** Monday, in `Date.getDay()` numbering. */
|
|
7
|
+
export declare const MONDAY = 1;
|
|
8
|
+
/**
|
|
9
|
+
* Normalizes any day number — including a negative one — into `Date.getDay()`
|
|
10
|
+
* range. Plain `%` keeps the sign in JavaScript, so `-1 % 7` is `-1`, not `6`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const wrapWeekday: (day: number) => number;
|
|
13
|
+
/** Strips time-of-day, returning local midnight on the same calendar day. */
|
|
14
|
+
export declare const startOfDay: (date: Date) => Date;
|
|
15
|
+
/** Local midnight on the first day of `date`'s month. */
|
|
16
|
+
export declare const startOfMonth: (date: Date) => Date;
|
|
17
|
+
/** Local midnight on the last day of `date`'s month. */
|
|
18
|
+
export declare const endOfMonth: (date: Date) => Date;
|
|
19
|
+
export declare const getDaysInMonth: (date: Date) => number;
|
|
20
|
+
/** Shifts by whole calendar days. Negative amounts move backwards. */
|
|
21
|
+
export declare const addDays: (date: Date, amount: number) => Date;
|
|
22
|
+
/**
|
|
23
|
+
* Shifts by whole calendar months, clamping the day to the target month's
|
|
24
|
+
* length so Jan 31 lands on Feb 28 rather than overflowing into March. The
|
|
25
|
+
* clamp is invisible to month navigation, which always operates on the first
|
|
26
|
+
* of the month, but C-8's `PageUp`/`PageDown` moves arbitrary days and needs it.
|
|
27
|
+
*/
|
|
28
|
+
export declare const addMonths: (date: Date, amount: number) => Date;
|
|
29
|
+
export declare const isSameDay: (a: Date, b: Date) => boolean;
|
|
30
|
+
export declare const isSameMonth: (a: Date, b: Date) => boolean;
|
|
31
|
+
/**
|
|
32
|
+
* First day of the week for a locale, as `Date.getDay()` numbering (0 =
|
|
33
|
+
* Sunday). This is the ADR's `weekStart: 'auto'` default — the locale decides,
|
|
34
|
+
* not the design system. Falls back to the region table, then to Monday (ISO
|
|
35
|
+
* 8601, and the ADR's stated final fallback).
|
|
36
|
+
*
|
|
37
|
+
* Resolves the tag through {@link resolveLocale} first, the same as every other
|
|
38
|
+
* helper here. Without that an unsupported tag would take its week start from
|
|
39
|
+
* itself while its labels fell back to English — a grid starting on the wrong
|
|
40
|
+
* day with English headers. The fallback is silent for now; the dev-only
|
|
41
|
+
* warning for an unsupported locale belongs to C-15.
|
|
42
|
+
*/
|
|
43
|
+
export declare const getWeekStart: BoundedMemo<[locale: string], number>;
|
|
44
|
+
/**
|
|
45
|
+
* Abbreviated weekday names for the column headers. Figma's `weekStart=sunday`
|
|
46
|
+
* variant is drawn with inconsistent abbreviations ("Tues", "Thurs"); `Intl`
|
|
47
|
+
* yields the consistent set that the `weekStart=monday` variant uses.
|
|
48
|
+
*/
|
|
49
|
+
export declare const getWeekdayLabels: (locale: string, weekStart: number) => ReadonlyArray<string>;
|
|
50
|
+
/**
|
|
51
|
+
* The rendered grid: whole weeks covering `visibleMonth`, padded at both ends
|
|
52
|
+
* with the adjacent months' days so every row holds {@link DAYS_IN_WEEK} dates.
|
|
53
|
+
*
|
|
54
|
+
* Returns 4, 5, or 6 rows depending on how the month falls — never a fixed 6.
|
|
55
|
+
* (A 28-day February starting on `weekStart` needs exactly 4; a 29-day one
|
|
56
|
+
* needs 5. Forcing
|
|
57
|
+
* a constant 6 is C-6's `consistentWeeks`.)
|
|
58
|
+
*/
|
|
59
|
+
export declare const getCalendarWeeks: (visibleMonth: Date, weekStart: number) => Date[][];
|
|
60
|
+
/**
|
|
61
|
+
* Full weekday names for the column headers' spoken text. The visible label is
|
|
62
|
+
* an abbreviation, and screen readers read those inconsistently — "Mon" as a
|
|
63
|
+
* word or spelled out, and worse where the abbreviation is clipped ("Mi.",
|
|
64
|
+
* "mer."). The header shows the short form and announces this one.
|
|
65
|
+
*/
|
|
66
|
+
export declare const getWeekdayFullLabels: (locale: string, weekStart: number) => ReadonlyArray<string>;
|
|
67
|
+
/**
|
|
68
|
+
* A cell's spoken name — "Wednesday, July 15, 2025".
|
|
69
|
+
*
|
|
70
|
+
* The visible text is only the day number, which leaves a screen reader unable
|
|
71
|
+
* to separate the padding days from the month's own: July 2025 opens on
|
|
72
|
+
* "29, 30, 1", so it sounds like July starts on the 29th. The dimmed colour is
|
|
73
|
+
* the only thing saying otherwise, and colour isn't available to a screen
|
|
74
|
+
* reader.
|
|
75
|
+
*
|
|
76
|
+
* Built by `Intl` rather than assembled from parts, so word order and
|
|
77
|
+
* punctuation follow the locale instead of an English template. C-13 extends
|
|
78
|
+
* this with state suffixes (today, selected, disabled); I-8 adds the per-cell
|
|
79
|
+
* override.
|
|
80
|
+
*/
|
|
81
|
+
export declare const getDateLabel: (date: Date, locale: string) => string;
|
|
82
|
+
/**
|
|
83
|
+
* The header's "Month Year" label. Ordering is the locale's, not a template —
|
|
84
|
+
* en-US gives "July 2025", ja-JP gives "2025年7月", th-TH keeps its Buddhist
|
|
85
|
+
* year. Pinned the same way as {@link getDateLabel}, and for the same reasons,
|
|
86
|
+
* so the header can't name a different month from the cells below it.
|
|
87
|
+
*/
|
|
88
|
+
export declare const getMonthLabel: (date: Date, locale: string) => string;
|
|
89
|
+
/**
|
|
90
|
+
* The day-of-month number as displayed. Routed through `Intl.NumberFormat` so
|
|
91
|
+
* locales with non-Latin default digits render correctly, and so the
|
|
92
|
+
* `numerals` prop (I-9) has a single place to override the numbering system.
|
|
93
|
+
*
|
|
94
|
+
* No timezone to pin — it's handed a number, not a date.
|
|
95
|
+
*/
|
|
96
|
+
export declare const formatDayNumber: (date: Date, locale: string) => string;
|
|
97
|
+
/**
|
|
98
|
+
* @internal — test-only. Clears Calendar's per-locale caches plus the shared
|
|
99
|
+
* canonical-key cache they all index by, so one suite can't leak a resolved
|
|
100
|
+
* locale into the next.
|
|
101
|
+
*/
|
|
102
|
+
export declare const __clearCalendarCaches: () => void;
|