@viasat/beam-react 2.73.0 → 2.74.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 +10 -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.CKxTOiJx.js +23 -0
- package/chunks/calendar.module.D09fpoRh.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 +22 -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.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 +21 -0
- package/lib/wip/Calendar/Calendar.es.js +63 -0
- package/lib/wip/Calendar/Calendar.types.cjs.js +1 -0
- package/lib/wip/Calendar/Calendar.types.d.ts +53 -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 +74 -0
- package/lib/wip/Calendar/Calendar.utils.es.js +153 -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/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
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { useEffect as
|
|
2
|
-
import { isMinMaxMisconfigured as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { useEffect as s } from "react";
|
|
2
|
+
import { isMinMaxMisconfigured as r, dateKeyOrNull as t } from "./DateField.utils.es.js";
|
|
3
|
+
import { i as o } from "../../chunks/dates.NqdbQ2fR.js";
|
|
4
|
+
const f = (e, a) => {
|
|
5
|
+
s(() => {
|
|
6
|
+
process.env.NODE_ENV !== "production" && r(e, a) && console.warn(
|
|
6
7
|
"DateField: `minDate` is after `maxDate` — no date satisfies both, so the blur clamp is disabled and values are left as typed."
|
|
7
8
|
);
|
|
8
9
|
}, [t(e), t(a)]);
|
|
9
10
|
}, u = (e, a) => {
|
|
10
|
-
const n = e instanceof Date && !
|
|
11
|
-
|
|
11
|
+
const n = e instanceof Date && !o(e), i = a instanceof Date && !o(a);
|
|
12
|
+
s(() => {
|
|
12
13
|
process.env.NODE_ENV !== "production" && (n && console.warn(
|
|
13
14
|
"DateField: `value` is an Invalid Date; rendering with no value."
|
|
14
15
|
), i && console.warn(
|
|
@@ -18,5 +19,5 @@ const c = (e, a) => {
|
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
21
|
u as useDevInvalidValueWarning,
|
|
21
|
-
|
|
22
|
+
f as useDevMinMaxWarning
|
|
22
23
|
};
|
|
@@ -1,239 +1,241 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { s as t, b as
|
|
5
|
-
import { d as
|
|
6
|
-
import { t as
|
|
7
|
-
import { i as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
|
|
1
|
+
import { jsxs as Y, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import He from "clsx";
|
|
3
|
+
import { forwardRef as Ke, useRef as u, useMemo as je, useCallback as n } from "react";
|
|
4
|
+
import { s as t, b as qe, c as i, a as g } from "../../chunks/DateField.Segment.CbBsfqKp.js";
|
|
5
|
+
import { d as We } from "../../chunks/input.Bh4COLFp.js";
|
|
6
|
+
import { t as Ye } from "../../chunks/constants.XFX4nOSf.js";
|
|
7
|
+
import { i as _e } from "../../chunks/helpers.BUsAyYMh.js";
|
|
8
|
+
import { D as _ } from "../../chunks/dates.NqdbQ2fR.js";
|
|
9
|
+
import { H as ke } from "../../chunks/form.context.CW5SOzlz.js";
|
|
10
|
+
import { LabelProvider as ze } from "../Form/contexts/label.context.es.js";
|
|
11
|
+
import { HelperTextProvider as Ue } from "../Form/contexts/helperText.context.es.js";
|
|
12
|
+
import { useIsMounted as Ge } from "../../utils/hooks/useIsMounted.es.js";
|
|
13
|
+
import { mergeRefs as Je } from "../../utils/functions.es.js";
|
|
14
|
+
import { ErrorBoundary as Qe } from "../_ErrorBoundary/ErrorBoundary.es.js";
|
|
15
|
+
import { DateFieldSegments as Xe } from "./DateField.Segments.es.js";
|
|
16
|
+
import { useDevMinMaxWarning as Ze, useDevInvalidValueWarning as er } from "./DateField.devWarnings.es.js";
|
|
17
|
+
import { getDateParts as rr, getSegmentOrder as ar, toISODateString as tr } from "./DateField.utils.es.js";
|
|
18
|
+
import { useDateFieldFocus as sr } from "./useDateFieldFocus.es.js";
|
|
19
|
+
import { useDateFieldForm as or } from "./useDateFieldForm.es.js";
|
|
20
|
+
import { useDateFieldKeyboard as lr } from "./useDateFieldKeyboard.es.js";
|
|
21
|
+
import { useDateFieldSegments as nr } from "./useDateFieldSegments.es.js";
|
|
22
|
+
import { useDateFieldValidity as ir } from "./useDateFieldValidity.es.js";
|
|
23
|
+
import { useDateFieldValue as dr } from "./useDateFieldValue.es.js";
|
|
24
|
+
import { useInvalidState as cr } from "./useInvalidState.es.js";
|
|
25
|
+
const ur = "MM/DD/YYYY", mr = () => {
|
|
25
26
|
process.env.NODE_ENV !== "production" && console.warn("DateField: segments failed to render; showing a static fallback.");
|
|
26
|
-
},
|
|
27
|
+
}, $r = Ke(
|
|
27
28
|
function({
|
|
28
29
|
value: v,
|
|
29
30
|
defaultValue: D,
|
|
30
|
-
onChange:
|
|
31
|
+
onChange: k,
|
|
31
32
|
minDate: F,
|
|
32
33
|
maxDate: h,
|
|
33
|
-
getClampAnnouncement:
|
|
34
|
-
locale:
|
|
34
|
+
getClampAnnouncement: z,
|
|
35
|
+
locale: U,
|
|
35
36
|
label: S = null,
|
|
36
37
|
helperText: x = null,
|
|
37
|
-
error:
|
|
38
|
-
hideRequiredMarker:
|
|
39
|
-
validationRules:
|
|
40
|
-
width:
|
|
41
|
-
theme:
|
|
42
|
-
fluid:
|
|
43
|
-
size:
|
|
44
|
-
disabled:
|
|
45
|
-
readOnly:
|
|
46
|
-
required:
|
|
38
|
+
error: y,
|
|
39
|
+
hideRequiredMarker: G = !1,
|
|
40
|
+
validationRules: J,
|
|
41
|
+
width: Q,
|
|
42
|
+
theme: I,
|
|
43
|
+
fluid: X = !1,
|
|
44
|
+
size: Z = We,
|
|
45
|
+
disabled: ee = !1,
|
|
46
|
+
readOnly: re = !1,
|
|
47
|
+
required: ae = !1,
|
|
47
48
|
name: M,
|
|
48
|
-
id:
|
|
49
|
-
className:
|
|
50
|
-
style:
|
|
51
|
-
"aria-label":
|
|
52
|
-
"aria-describedby":
|
|
53
|
-
"aria-labelledby":
|
|
54
|
-
...
|
|
49
|
+
id: te,
|
|
50
|
+
className: se,
|
|
51
|
+
style: oe,
|
|
52
|
+
"aria-label": le,
|
|
53
|
+
"aria-describedby": ne,
|
|
54
|
+
"aria-labelledby": ie,
|
|
55
|
+
...de
|
|
55
56
|
}, R) {
|
|
56
57
|
const {
|
|
57
58
|
disabled: e,
|
|
58
|
-
readOnly:
|
|
59
|
+
readOnly: o,
|
|
59
60
|
required: E,
|
|
60
|
-
invalid:
|
|
61
|
+
invalid: ce,
|
|
61
62
|
errorMessageProvided: N,
|
|
62
|
-
defaultValue:
|
|
63
|
-
errorId:
|
|
64
|
-
helperTextId:
|
|
65
|
-
validationErrorsId:
|
|
66
|
-
labelId:
|
|
67
|
-
ariaDescribedBy:
|
|
68
|
-
ariaLabelledBy:
|
|
69
|
-
showErrors:
|
|
70
|
-
} =
|
|
63
|
+
defaultValue: ue,
|
|
64
|
+
errorId: L,
|
|
65
|
+
helperTextId: me,
|
|
66
|
+
validationErrorsId: fe,
|
|
67
|
+
labelId: O,
|
|
68
|
+
ariaDescribedBy: pe,
|
|
69
|
+
ariaLabelledBy: be,
|
|
70
|
+
showErrors: ge
|
|
71
|
+
} = or({
|
|
71
72
|
name: M,
|
|
72
|
-
disabled:
|
|
73
|
-
readOnly:
|
|
74
|
-
required:
|
|
73
|
+
disabled: ee,
|
|
74
|
+
readOnly: re,
|
|
75
|
+
required: ae,
|
|
75
76
|
defaultValue: D,
|
|
76
|
-
error:
|
|
77
|
+
error: y,
|
|
77
78
|
hasHelperText: !!x,
|
|
78
79
|
hasLabel: !!S,
|
|
79
|
-
validationRules:
|
|
80
|
-
ariaDescribedBy:
|
|
81
|
-
ariaLabelledBy:
|
|
80
|
+
validationRules: J,
|
|
81
|
+
ariaDescribedBy: ne,
|
|
82
|
+
ariaLabelledBy: ie
|
|
82
83
|
});
|
|
83
|
-
|
|
84
|
-
const l = u(null), { segmentRefs:
|
|
85
|
-
segmentText:
|
|
86
|
-
segmentValues:
|
|
87
|
-
currentValue:
|
|
88
|
-
wasTouched:
|
|
89
|
-
appendDigit:
|
|
90
|
-
adjustSegment:
|
|
91
|
-
clearSegment:
|
|
92
|
-
clearAll:
|
|
84
|
+
Ze(F, h), er(v, D);
|
|
85
|
+
const l = u(null), { segmentRefs: ve, registerSegmentRef: De } = nr(), Fe = U ?? _, w = Ge(), C = w ? Fe : _, m = rr(C), d = je(() => ar(m), [m]), {
|
|
86
|
+
segmentText: he,
|
|
87
|
+
segmentValues: B,
|
|
88
|
+
currentValue: V,
|
|
89
|
+
wasTouched: Se,
|
|
90
|
+
appendDigit: T,
|
|
91
|
+
adjustSegment: xe,
|
|
92
|
+
clearSegment: ye,
|
|
93
|
+
clearAll: A,
|
|
93
94
|
beginSegmentEdit: Ie,
|
|
94
|
-
commitOnBlur:
|
|
95
|
-
clampAnnouncement:
|
|
96
|
-
} =
|
|
95
|
+
commitOnBlur: Me,
|
|
96
|
+
clampAnnouncement: Re
|
|
97
|
+
} = dr({
|
|
97
98
|
value: v,
|
|
98
|
-
defaultValue:
|
|
99
|
-
onChange:
|
|
99
|
+
defaultValue: ue,
|
|
100
|
+
onChange: k,
|
|
100
101
|
minDate: F,
|
|
101
102
|
maxDate: h,
|
|
102
|
-
getClampAnnouncement:
|
|
103
|
+
getClampAnnouncement: z
|
|
103
104
|
}), {
|
|
104
|
-
focusedSegment:
|
|
105
|
-
fieldTabIndex:
|
|
105
|
+
focusedSegment: P,
|
|
106
|
+
fieldTabIndex: Ee,
|
|
106
107
|
handleSegmentFocus: c,
|
|
107
|
-
handleFieldFocus:
|
|
108
|
-
handleFieldBlur:
|
|
108
|
+
handleFieldFocus: Ne,
|
|
109
|
+
handleFieldBlur: Le,
|
|
109
110
|
handleFieldMouseDown: Oe,
|
|
110
111
|
focusNext: f,
|
|
111
112
|
focusPrevious: we
|
|
112
|
-
} =
|
|
113
|
+
} = sr({
|
|
113
114
|
disabled: e,
|
|
114
115
|
fieldRef: l,
|
|
115
|
-
segmentRefs:
|
|
116
|
+
segmentRefs: ve,
|
|
116
117
|
partsOrder: d,
|
|
117
118
|
onSegmentFocusChange: Ie,
|
|
118
|
-
onFieldBlur:
|
|
119
|
-
}), Ce =
|
|
119
|
+
onFieldBlur: Me
|
|
120
|
+
}), Ce = lr({
|
|
120
121
|
disabled: e,
|
|
121
|
-
readOnly:
|
|
122
|
+
readOnly: o,
|
|
122
123
|
fieldRef: l,
|
|
123
124
|
focusNext: f,
|
|
124
125
|
focusPrevious: we,
|
|
125
|
-
adjustSegment:
|
|
126
|
-
clearSegment:
|
|
127
|
-
}), { isInvalid:
|
|
128
|
-
segments:
|
|
129
|
-
currentValue:
|
|
130
|
-
wasTouched:
|
|
131
|
-
isFocused:
|
|
132
|
-
}),
|
|
126
|
+
adjustSegment: xe,
|
|
127
|
+
clearSegment: ye
|
|
128
|
+
}), { isInvalid: Be } = ir({
|
|
129
|
+
segments: B,
|
|
130
|
+
currentValue: V,
|
|
131
|
+
wasTouched: Se,
|
|
132
|
+
isFocused: P !== null
|
|
133
|
+
}), Ve = n(
|
|
133
134
|
(r, a) => {
|
|
134
|
-
const { advanced: b } =
|
|
135
|
+
const { advanced: b } = T(r, a);
|
|
135
136
|
b && f(r);
|
|
136
137
|
},
|
|
137
|
-
[
|
|
138
|
-
), p =
|
|
139
|
-
formInvalid:
|
|
140
|
-
valueInvalid:
|
|
141
|
-
}),
|
|
138
|
+
[T, f]
|
|
139
|
+
), p = cr({
|
|
140
|
+
formInvalid: ce,
|
|
141
|
+
valueInvalid: Be
|
|
142
|
+
}), Te = w && _e() ? "textbox" : "spinbutton", $ = n(
|
|
142
143
|
(r) => {
|
|
143
144
|
e || c(d[0], r);
|
|
144
145
|
},
|
|
145
146
|
[e, c, d]
|
|
146
|
-
),
|
|
147
|
+
), H = n(() => {
|
|
147
148
|
var a;
|
|
148
149
|
if (e) return;
|
|
149
150
|
const r = document.activeElement;
|
|
150
151
|
r instanceof HTMLElement && r !== l.current && ((a = l.current) != null && a.contains(r)) && r.blur();
|
|
151
|
-
}, [e]),
|
|
152
|
-
e ||
|
|
153
|
-
}, [e,
|
|
154
|
-
|
|
155
|
-
const
|
|
152
|
+
}, [e]), K = n(() => {
|
|
153
|
+
e || o || A();
|
|
154
|
+
}, [e, o, A]), j = u($), q = u(H), W = u(K);
|
|
155
|
+
j.current = $, q.current = H, W.current = K;
|
|
156
|
+
const Ae = n(
|
|
156
157
|
(r) => {
|
|
157
158
|
const a = r ? Object.assign(r, {
|
|
158
|
-
focus: (b) =>
|
|
159
|
-
blur: () =>
|
|
160
|
-
clear: () =>
|
|
159
|
+
focus: (b) => j.current(b),
|
|
160
|
+
blur: () => q.current(),
|
|
161
|
+
clear: () => W.current()
|
|
161
162
|
}) : null;
|
|
162
|
-
|
|
163
|
+
Je(
|
|
163
164
|
l,
|
|
164
165
|
R
|
|
165
166
|
)(a);
|
|
166
167
|
},
|
|
167
168
|
[R]
|
|
168
|
-
),
|
|
169
|
+
), Pe = (r) => {
|
|
169
170
|
if (e) return;
|
|
170
171
|
const a = r.target.closest("label");
|
|
171
|
-
!a || a.id !==
|
|
172
|
-
},
|
|
173
|
-
t[
|
|
174
|
-
|
|
175
|
-
t[`${i}${
|
|
176
|
-
|
|
172
|
+
!a || a.id !== O || (r.preventDefault(), c(d[0]));
|
|
173
|
+
}, $e = He(
|
|
174
|
+
t[qe],
|
|
175
|
+
I && Ye(I),
|
|
176
|
+
t[`${i}${Z}`],
|
|
177
|
+
X && t[`${i}fluid`],
|
|
177
178
|
p && t[`${i}error`],
|
|
178
179
|
e && t[`${i}disabled`],
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
o && t[`${i}read-only`],
|
|
181
|
+
se
|
|
181
182
|
);
|
|
182
|
-
return /* @__PURE__ */
|
|
183
|
+
return /* @__PURE__ */ Y(
|
|
183
184
|
"div",
|
|
184
185
|
{
|
|
185
|
-
className:
|
|
186
|
-
style: { ...
|
|
187
|
-
onMouseDownCapture:
|
|
186
|
+
className: $e,
|
|
187
|
+
style: { ...oe, maxWidth: Q },
|
|
188
|
+
onMouseDownCapture: Pe,
|
|
188
189
|
children: [
|
|
189
190
|
/* @__PURE__ */ s(
|
|
190
|
-
|
|
191
|
+
ze,
|
|
191
192
|
{
|
|
192
|
-
ctxId:
|
|
193
|
+
ctxId: O,
|
|
193
194
|
ctxDisabled: e,
|
|
194
|
-
ctxRequired: E && !
|
|
195
|
+
ctxRequired: E && !G,
|
|
195
196
|
children: S
|
|
196
197
|
}
|
|
197
198
|
),
|
|
198
199
|
/* @__PURE__ */ s(
|
|
199
200
|
"div",
|
|
200
201
|
{
|
|
201
|
-
...
|
|
202
|
-
ref:
|
|
203
|
-
id:
|
|
202
|
+
...de,
|
|
203
|
+
ref: Ae,
|
|
204
|
+
id: te,
|
|
204
205
|
role: "group",
|
|
205
|
-
"aria-label":
|
|
206
|
-
"aria-labelledby":
|
|
206
|
+
"aria-label": le,
|
|
207
|
+
"aria-labelledby": be,
|
|
207
208
|
"aria-disabled": e || void 0,
|
|
208
209
|
"aria-invalid": p || void 0,
|
|
209
|
-
"aria-describedby":
|
|
210
|
-
"aria-errormessage": N ?
|
|
211
|
-
tabIndex:
|
|
210
|
+
"aria-describedby": pe,
|
|
211
|
+
"aria-errormessage": N ? L : void 0,
|
|
212
|
+
tabIndex: Ee,
|
|
212
213
|
className: t[g.field],
|
|
213
214
|
onMouseDown: Oe,
|
|
214
|
-
onFocus:
|
|
215
|
+
onFocus: Ne,
|
|
215
216
|
children: /* @__PURE__ */ s(
|
|
216
|
-
|
|
217
|
+
Qe,
|
|
217
218
|
{
|
|
218
|
-
fallback: /* @__PURE__ */ s("span", { className: t[g.segments], children:
|
|
219
|
-
onError:
|
|
219
|
+
fallback: /* @__PURE__ */ s("span", { className: t[g.segments], children: ur }),
|
|
220
|
+
onError: mr,
|
|
220
221
|
children: /* @__PURE__ */ s(
|
|
221
|
-
|
|
222
|
+
Xe,
|
|
222
223
|
{
|
|
223
224
|
parts: m,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
locale: C,
|
|
226
|
+
segmentText: he,
|
|
227
|
+
segmentValues: B,
|
|
228
|
+
focusedSegment: P,
|
|
227
229
|
disabled: e,
|
|
228
|
-
readOnly:
|
|
230
|
+
readOnly: o,
|
|
229
231
|
required: E,
|
|
230
232
|
invalid: p,
|
|
231
|
-
role:
|
|
233
|
+
role: Te,
|
|
232
234
|
onSegmentFocus: c,
|
|
233
|
-
onSegmentBlur:
|
|
234
|
-
onSegmentInput:
|
|
235
|
+
onSegmentBlur: Le,
|
|
236
|
+
onSegmentInput: Ve,
|
|
235
237
|
onSegmentKeyDown: Ce,
|
|
236
|
-
registerSegmentRef:
|
|
238
|
+
registerSegmentRef: De
|
|
237
239
|
}
|
|
238
240
|
)
|
|
239
241
|
}
|
|
@@ -247,7 +249,7 @@ const cr = "MM/DD/YYYY", ur = () => {
|
|
|
247
249
|
"aria-live": "polite",
|
|
248
250
|
"aria-atomic": "true",
|
|
249
251
|
className: t[g.srStatus],
|
|
250
|
-
children:
|
|
252
|
+
children: Re
|
|
251
253
|
}
|
|
252
254
|
),
|
|
253
255
|
/* @__PURE__ */ s(
|
|
@@ -255,20 +257,20 @@ const cr = "MM/DD/YYYY", ur = () => {
|
|
|
255
257
|
{
|
|
256
258
|
type: "hidden",
|
|
257
259
|
name: M,
|
|
258
|
-
value:
|
|
260
|
+
value: tr(V),
|
|
259
261
|
disabled: e
|
|
260
262
|
}
|
|
261
263
|
),
|
|
262
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ Y(Ue, { ctxId: me, ctxDisabled: e, children: [
|
|
263
265
|
x,
|
|
264
|
-
N && /* @__PURE__ */ s(
|
|
266
|
+
N && /* @__PURE__ */ s(ke, { id: L, appearance: "negative", children: y })
|
|
265
267
|
] }),
|
|
266
|
-
|
|
268
|
+
ge(fe)
|
|
267
269
|
]
|
|
268
270
|
}
|
|
269
271
|
);
|
|
270
272
|
}
|
|
271
273
|
);
|
|
272
274
|
export {
|
|
273
|
-
|
|
275
|
+
$r as DateField
|
|
274
276
|
};
|
|
@@ -126,7 +126,8 @@ export interface DateFieldProps extends DateFieldInputAttributes {
|
|
|
126
126
|
getClampAnnouncement?: (clampedDate: Date) => string;
|
|
127
127
|
/**
|
|
128
128
|
* Specify the BCP-47 locale tag driving segment order and separators
|
|
129
|
-
* (e.g. `en-GB` → DD/MM/YYYY, `de-DE` → DD.MM.YYYY)
|
|
129
|
+
* (e.g. `en-GB` → DD/MM/YYYY, `de-DE` → DD.MM.YYYY), and the month name a
|
|
130
|
+
* screen reader announces for the month segment ("März" for `03` in de-DE).
|
|
130
131
|
* @default 'en-US'
|
|
131
132
|
*/
|
|
132
133
|
locale?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../chunks/constants.DLsDVPyH.js");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../chunks/constants.DLsDVPyH.js");const r=require("../../chunks/dates.CVW08OQ2.js"),u=require("./DateField.validation.cjs.js"),y=r.createBoundedMemo(r.canonicalLocaleKey,e=>new Intl.DateTimeFormat(r.resolveLocale(e),{month:"long",calendar:"gregory",timeZone:"UTC"})),p=(e,t=r.DEFAULT_LOCALE)=>y(t).format(Date.UTC(2e3,e-1,1)),c=31,s=12,m=1,D=9999,S=(e,t,n)=>Math.min(n,Math.max(t,e)),T=(e,t)=>((e-1)%t+t)%t+1,L=2024,N=(e,t)=>t==null?31:new Date(e??L,t,0).getDate(),F=()=>{const e=new Date;return{day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()}},V=(e,t,n,a)=>{if(n==="min")return e==="year"?null:1;if(n==="max")return e==="year"?null:e==="day"?a.daysInMonth:s;if(t==null){if(e==="year")return a.today.year;const h=e==="day"?c:s;return n>0?1:h}if(e==="year")return S(t+n,m,D);const o=e==="day"?c:s;return T(t+n,o)},P={day:"",month:"",year:""},M=e=>{const{day:t,month:n,year:a}=e;if(t==null||n==null||a==null)return null;const o=new Date(a,n-1,t);return o.setFullYear(a),Number.isNaN(o.getTime())||o.getFullYear()!==a||o.getMonth()!==n-1||o.getDate()!==t?null:o},w=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.getTime()===t.getTime(),l=r.dateToDayKey,I=e=>r.isValidDate(e)?l(e):null,R=(e,t,n)=>{const a=l(e);return!(r.isValidDate(t)&&a<l(t)||r.isValidDate(n)&&a>l(n))},_=(e,t)=>r.isValidDate(e)&&r.isValidDate(t)&&l(e)>l(t),C=(e,t,n)=>{if(_(t,n))return e;const a=l(e);return r.isValidDate(t)&&a<l(t)?new Date(t.getFullYear(),t.getMonth(),t.getDate()):r.isValidDate(n)&&a>l(n)?new Date(n.getFullYear(),n.getMonth(),n.getDate()):e},O=e=>{if(!r.isValidDate(e))return"";const t=String(e.getFullYear()).padStart(4,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${a}`},E=e=>e.type==="literal",f=e=>e.filter(t=>!E(t)).map(t=>t.type),Y=new Date(2020,0,2),X=new Set([8206,8207,8234,8235,8236,8237,8238,8294,8295,8296,8297]),K=e=>[...e].filter(t=>!X.has(t.codePointAt(0)??-1)).join(""),U=new Set(["day","month","year","literal"]),d=3,g=e=>{try{const t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",calendar:"gregory"}).formatToParts(Y).filter(a=>U.has(a.type)).map(a=>({type:a.type,value:a.type==="literal"?K(a.value):""})),n=f(t);return n.length===d&&new Set(n).size===d?t:null}catch{return null}},A=r.createBoundedMemo(r.canonicalLocaleKey,e=>{const t=r.isLocaleSupported(e);!t&&process.env.NODE_ENV!=="production"&&console.warn(`DateField: locale "${e}" is not supported; falling back to ${r.DEFAULT_LOCALE}.`);const n=(t?g(e):null)??g(r.DEFAULT_LOCALE);if(!n)throw new Error(`DateField: Intl cannot resolve ${r.DEFAULT_LOCALE} date parts`);return n}),b=e=>A(e),G=()=>{A.clear(),y.clear(),r.__clearLocaleKeyCache()},v=e=>r.isValidDate(e)?{day:String(e.getDate()).padStart(2,"0"),month:String(e.getMonth()+1).padStart(2,"0"),year:String(e.getFullYear()).padStart(4,"0")}:P,i=(e,t)=>{if(t===""||e==="year"&&t.length<u.SEGMENT_MAX_LENGTH.year)return null;const n=parseInt(t,10);return Number.isNaN(n)||n===0?null:n},$=e=>M({day:i("day",e.day),month:i("month",e.month),year:i("year",e.year)}),B=(e,t)=>t===""?"":t.padStart(u.SEGMENT_MAX_LENGTH[e],"0"),H=(e,t,n)=>t===""?{displayValue:n,isPlaceholder:!0}:{displayValue:t.padStart(u.SEGMENT_MAX_LENGTH[e],"0"),isPlaceholder:!1},j=e=>{const t=window.getSelection();if(!t)return;const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)},k=e=>{var n;if(!e)return;const t=(n=window.getSelection)==null?void 0:n.call(window);t&&t.rangeCount>0&&e.contains(t.anchorNode)&&t.removeAllRanges()};exports.DEFAULT_LOCALE=r.DEFAULT_LOCALE;exports.isValidDate=r.isValidDate;exports.DAY_SPIN_MAX=c;exports.MONTH_MAX=s;exports.YEAR_MAX=D;exports.YEAR_MIN=m;exports.__clearDatePartsCache=G;exports.adjustSegmentValue=V;exports.clamp=S;exports.clampDateToRange=C;exports.clearSelectionWithin=k;exports.dateKeyOrNull=I;exports.deriveValue=M;exports.deriveValueFromText=$;exports.getDateParts=b;exports.getDaysInMonth=N;exports.getMonthName=p;exports.getSegmentDisplay=H;exports.getSegmentOrder=f;exports.isDateInRange=R;exports.isLiteralPart=E;exports.isMinMaxMisconfigured=_;exports.isSameDateValue=w;exports.normalizeSegmentText=B;exports.segmentNumber=i;exports.segmentTextFromValue=v;exports.selectElementContents=j;exports.toISODateString=O;exports.todayParts=F;exports.wrapInRange=T;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { Nullable } from '@viasat/beam-shared/utils/types';
|
|
2
|
+
import { DEFAULT_LOCALE, isValidDate } from '@viasat/beam-shared/utils';
|
|
2
3
|
import { DateFieldPart, SegmentAdjustment, SegmentText, SegmentType, SegmentValues } from './DateField.types';
|
|
3
|
-
export
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
export { DEFAULT_LOCALE, isValidDate };
|
|
5
|
+
/**
|
|
6
|
+
* The month segment's spoken value — "March" for `03` in en-US, "März" in
|
|
7
|
+
* de-DE — for a 1-based month (1 = January). The month-only form is the
|
|
8
|
+
* stand-alone one where a language distinguishes it (`март`, not `марта`),
|
|
9
|
+
* which is what a value read on its own should be.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getMonthName: (month: number, locale?: string) => string;
|
|
6
12
|
/**
|
|
7
13
|
* Absolute spin ceiling for day — independent of the current month.
|
|
8
14
|
*
|
|
@@ -45,8 +51,6 @@ export declare const todayParts: () => {
|
|
|
45
51
|
month: number;
|
|
46
52
|
year: number;
|
|
47
53
|
};
|
|
48
|
-
/** True for a `Date` instance that isn't `Invalid Date`. */
|
|
49
|
-
export declare const isValidDate: (value: unknown) => value is Date;
|
|
50
54
|
/** Context passed into {@link adjustSegmentValue} — kept pure by the caller. */
|
|
51
55
|
export interface AdjustSegmentContext {
|
|
52
56
|
/** Days in the current month (use {@link getDaysInMonth} to compute). */
|
|
@@ -121,7 +125,10 @@ export declare const getSegmentOrder: (parts: ReadonlyArray<DateFieldPart>) => R
|
|
|
121
125
|
* catchable by an error boundary, instead of crashing the bundle at import.
|
|
122
126
|
*/
|
|
123
127
|
export declare const getDateParts: (locale: string) => ReadonlyArray<DateFieldPart>;
|
|
124
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* @internal — test-only. Clears DateField's per-locale caches — segment parts
|
|
130
|
+
* and month names — plus the shared canonical-key cache, for Intl isolation.
|
|
131
|
+
*/
|
|
125
132
|
export declare const __clearDatePartsCache: () => void;
|
|
126
133
|
/** Per-segment zero-padded strings from a Date. All-empty for null/invalid. */
|
|
127
134
|
export declare const segmentTextFromValue: (value: Nullable<Date>) => SegmentText;
|