@konstructio/ui 0.1.2-alpha.7 → 0.1.2-alpha.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdditionalOptions-C2FDVZhu.js +45 -0
- package/dist/CalendarPanel.css +1 -0
- package/dist/{Combination-VYaRRJBZ.js → Combination-BtmnusWq.js} +141 -138
- package/dist/DayPicker-CaeUXRCF.js +2798 -0
- package/dist/Modal-BGcucTHv.js +120 -0
- package/dist/assets/icons/components/Accounts.d.ts +3 -0
- package/dist/assets/icons/components/Accounts.js +37 -0
- package/dist/assets/icons/components/AddChart.d.ts +3 -0
- package/dist/assets/icons/components/AddChart.js +28 -0
- package/dist/assets/icons/components/AlertOutline.d.ts +3 -0
- package/dist/assets/icons/components/AlertOutline.js +28 -0
- package/dist/assets/icons/components/AppRepo.d.ts +3 -0
- package/dist/assets/icons/components/AppRepo.js +28 -0
- package/dist/assets/icons/components/Apps.d.ts +3 -0
- package/dist/assets/icons/components/Apps.js +28 -0
- package/dist/assets/icons/components/Archives.d.ts +3 -0
- package/dist/assets/icons/components/Archives.js +28 -0
- package/dist/assets/icons/components/ArrowDown.d.ts +3 -0
- package/dist/assets/icons/components/ArrowDown.js +28 -0
- package/dist/assets/icons/components/ArrowLeft.d.ts +3 -0
- package/dist/assets/icons/components/ArrowLeft.js +28 -0
- package/dist/assets/icons/components/ArrowRight.d.ts +3 -0
- package/dist/assets/icons/components/ArrowRight.js +28 -0
- package/dist/assets/icons/components/ArrowUp.d.ts +3 -0
- package/dist/assets/icons/components/ArrowUp.js +28 -0
- package/dist/assets/icons/components/BarChart.d.ts +3 -0
- package/dist/assets/icons/components/BarChart.js +38 -0
- package/dist/assets/icons/components/BookOpen.d.ts +3 -0
- package/dist/assets/icons/components/BookOpen.js +32 -0
- package/dist/assets/icons/components/CalendarMonth.d.ts +3 -0
- package/dist/assets/icons/components/CalendarMonth.js +28 -0
- package/dist/assets/icons/components/Check.d.ts +3 -0
- package/dist/assets/icons/components/Check.js +28 -0
- package/dist/assets/icons/components/CheckCircle.d.ts +3 -0
- package/dist/assets/icons/components/CheckCircle.js +28 -0
- package/dist/assets/icons/components/ClockAlert.d.ts +3 -0
- package/dist/assets/icons/components/ClockAlert.js +28 -0
- package/dist/assets/icons/components/ClockOutline.d.ts +3 -0
- package/dist/assets/icons/components/ClockOutline.js +28 -0
- package/dist/assets/icons/components/Close.d.ts +3 -0
- package/dist/assets/icons/components/Close.js +28 -0
- package/dist/assets/icons/components/Cloud.d.ts +3 -0
- package/dist/assets/icons/components/Cloud.js +22 -0
- package/dist/assets/icons/components/CloudLockOutline.d.ts +3 -0
- package/dist/assets/icons/components/CloudLockOutline.js +28 -0
- package/dist/assets/icons/components/Clusters.d.ts +3 -0
- package/dist/assets/icons/components/Clusters.js +44 -0
- package/dist/assets/icons/components/CogOutline.d.ts +3 -0
- package/dist/assets/icons/components/CogOutline.js +28 -0
- package/dist/assets/icons/components/Copy.d.ts +3 -0
- package/dist/assets/icons/components/Copy.js +28 -0
- package/dist/assets/icons/components/Cpu.d.ts +3 -0
- package/dist/assets/icons/components/Cpu.js +41 -0
- package/dist/assets/icons/components/Cube.d.ts +3 -0
- package/dist/assets/icons/components/Cube.js +28 -0
- package/dist/assets/icons/components/Datacenter.d.ts +3 -0
- package/dist/assets/icons/components/Datacenter.js +28 -0
- package/dist/assets/icons/components/Delete.d.ts +3 -0
- package/dist/assets/icons/components/Delete.js +28 -0
- package/dist/assets/icons/components/DollarSign.d.ts +3 -0
- package/dist/assets/icons/components/DollarSign.js +30 -0
- package/dist/assets/icons/components/Download.d.ts +3 -0
- package/dist/assets/icons/components/Download.js +28 -0
- package/dist/assets/icons/components/Edit.d.ts +3 -0
- package/dist/assets/icons/components/Edit.js +28 -0
- package/dist/assets/icons/components/Ellipses.d.ts +3 -0
- package/dist/assets/icons/components/Ellipses.js +28 -0
- package/dist/assets/icons/components/Environments.d.ts +3 -0
- package/dist/assets/icons/components/Environments.js +30 -0
- package/dist/assets/icons/components/Error.d.ts +3 -0
- package/dist/assets/icons/components/Error.js +28 -0
- package/dist/assets/icons/components/ErrorOutline.d.ts +3 -0
- package/dist/assets/icons/components/ErrorOutline.js +28 -0
- package/dist/assets/icons/components/Exclamation.d.ts +3 -0
- package/dist/assets/icons/components/Exclamation.js +28 -0
- package/dist/assets/icons/components/Git.d.ts +3 -0
- package/dist/assets/icons/components/Git.js +28 -0
- package/dist/assets/icons/components/GitOpsCatalog.d.ts +3 -0
- package/dist/assets/icons/components/GitOpsCatalog.js +41 -0
- package/dist/assets/icons/components/GridView.d.ts +3 -0
- package/dist/assets/icons/components/GridView.js +22 -0
- package/dist/assets/icons/components/Help.d.ts +3 -0
- package/dist/assets/icons/components/Help.js +25 -0
- package/dist/assets/icons/components/HideOutline.d.ts +3 -0
- package/dist/assets/icons/components/HideOutline.js +37 -0
- package/dist/assets/icons/components/Home.d.ts +3 -0
- package/dist/assets/icons/components/Home.js +28 -0
- package/dist/assets/icons/components/Id.d.ts +3 -0
- package/dist/assets/icons/components/Id.js +28 -0
- package/dist/assets/icons/components/InformationOutline.d.ts +3 -0
- package/dist/assets/icons/components/InformationOutline.js +28 -0
- package/dist/assets/icons/components/InvoiceList.d.ts +3 -0
- package/dist/assets/icons/components/InvoiceList.js +28 -0
- package/dist/assets/icons/components/Key.d.ts +3 -0
- package/dist/assets/icons/components/Key.js +28 -0
- package/dist/assets/icons/components/LightBulb.d.ts +3 -0
- package/dist/assets/icons/components/LightBulb.js +43 -0
- package/dist/assets/icons/components/Loader.d.ts +3 -0
- package/dist/assets/icons/components/Loader.js +28 -0
- package/dist/assets/icons/components/Network.d.ts +3 -0
- package/dist/assets/icons/components/Network.js +28 -0
- package/dist/assets/icons/components/PagesStack.d.ts +3 -0
- package/dist/assets/icons/components/PagesStack.js +25 -0
- package/dist/assets/icons/components/Pageview.d.ts +3 -0
- package/dist/assets/icons/components/Pageview.js +28 -0
- package/dist/assets/icons/components/People.d.ts +3 -0
- package/dist/assets/icons/components/People.js +28 -0
- package/dist/assets/icons/components/PhotoLibrary.d.ts +3 -0
- package/dist/assets/icons/components/PhotoLibrary.js +28 -0
- package/dist/assets/icons/components/Pipeline.d.ts +3 -0
- package/dist/assets/icons/components/Pipeline.js +30 -0
- package/dist/assets/icons/components/Plus.d.ts +3 -0
- package/dist/assets/icons/components/Plus.js +28 -0
- package/dist/assets/icons/components/PowerSettings.d.ts +3 -0
- package/dist/assets/icons/components/PowerSettings.js +28 -0
- package/dist/assets/icons/components/Preview.d.ts +3 -0
- package/dist/assets/icons/components/Preview.js +28 -0
- package/dist/assets/icons/components/ReceiptLong.d.ts +3 -0
- package/dist/assets/icons/components/ReceiptLong.js +22 -0
- package/dist/assets/icons/components/Refresh.d.ts +3 -0
- package/dist/assets/icons/components/Refresh.js +28 -0
- package/dist/assets/icons/components/ScatterPlot.d.ts +3 -0
- package/dist/assets/icons/components/ScatterPlot.js +22 -0
- package/dist/assets/icons/components/Search.d.ts +3 -0
- package/dist/assets/icons/components/Search.js +29 -23
- package/dist/assets/icons/components/Server.d.ts +3 -0
- package/dist/assets/icons/components/Server.js +28 -0
- package/dist/assets/icons/components/Start.d.ts +3 -0
- package/dist/assets/icons/components/Start.js +28 -0
- package/dist/assets/icons/components/TabNew.d.ts +3 -0
- package/dist/assets/icons/components/TabNew.js +50 -0
- package/dist/assets/icons/components/Teams.d.ts +3 -0
- package/dist/assets/icons/components/Teams.js +28 -0
- package/dist/assets/icons/components/Warning.d.ts +3 -0
- package/dist/assets/icons/components/Warning.js +24 -18
- package/dist/assets/icons/components/X.d.ts +3 -0
- package/dist/assets/icons/components/X.js +28 -0
- package/dist/assets/icons/components/index.d.ts +67 -0
- package/dist/assets/icons/components/index.js +132 -4
- package/dist/assets/icons/components/types.d.ts +5 -0
- package/dist/assets/icons/components/types.js +0 -0
- package/dist/assets/icons/index.d.ts +1 -0
- package/dist/assets/icons/index.js +134 -0
- package/dist/chevron-down-BBFYYzZq.js +5 -0
- package/dist/chevron-left-BHBf-gQY.js +5 -0
- package/dist/chevron-right-DvXGOiS_.js +5 -0
- package/dist/chevron-up-DEfvgPCw.js +54 -0
- package/dist/chevron-up-IlDPxR7j.js +5 -0
- package/dist/components/Alert/Alert.d.ts +32 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/Alert/Alert.types.d.ts +26 -0
- package/dist/components/Alert/Alert.variants.d.ts +7 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +32 -0
- package/dist/components/AlertDialog/AlertDialog.js +100 -53
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +58 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +2 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +3 -2
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +10 -0
- package/dist/components/AlertDialog/components/index.d.ts +1 -0
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
- package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +31 -0
- package/dist/components/Autocomplete/Autocomplete.js +38 -37
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +50 -0
- package/dist/components/Autocomplete/Autocomplete.variants.d.ts +2 -0
- package/dist/components/Autocomplete/Autocomplete.variants.js +1 -6
- package/dist/components/Autocomplete/components/List/List.d.ts +3 -0
- package/dist/components/Autocomplete/components/List/List.types.d.ts +13 -0
- package/dist/components/Autocomplete/components/List/List.variants.d.ts +4 -0
- package/dist/components/Autocomplete/components/index.d.ts +1 -0
- package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
- package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
- package/dist/components/Badge/Badge.d.ts +34 -0
- package/dist/components/Badge/Badge.js +48 -45
- package/dist/components/Badge/Badge.types.d.ts +34 -0
- package/dist/components/Badge/Badge.variants.d.ts +8 -0
- package/dist/components/Badge/Badge.variants.js +52 -13
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +29 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +41 -0
- package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +3 -3
- package/dist/components/Breadcrumb/components/Item/Item.d.ts +3 -0
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.types.d.ts +6 -0
- package/dist/components/Breadcrumb/components/Item/Item.variants.d.ts +6 -0
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +25 -14
- package/dist/components/Breadcrumb/components/index.d.ts +1 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.d.ts +33 -0
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.types.d.ts +24 -0
- package/dist/components/Button/Button.variants.d.ts +8 -0
- package/dist/components/Button/Button.variants.js +115 -99
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +34 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +142 -0
- package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +100 -0
- package/dist/components/ButtonGroup/ButtonGroup.variants.d.ts +14 -0
- package/dist/components/ButtonGroup/ButtonGroup.variants.js +39 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.d.ts +3 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +116 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +23 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +27 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +111 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/index.d.ts +2 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/index.js +4 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.d.ts +3 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +45 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +8 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.d.ts +2 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.js +4 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.d.ts +3 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +37 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +6 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.d.ts +2 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.js +4 -0
- package/dist/components/ButtonGroup/components/index.d.ts +3 -0
- package/dist/components/ButtonGroup/components/index.js +8 -0
- package/dist/components/ButtonGroup/hooks/index.d.ts +2 -0
- package/dist/components/ButtonGroup/hooks/index.js +4 -0
- package/dist/components/ButtonGroup/hooks/useButtonGroup.d.ts +3 -0
- package/dist/components/ButtonGroup/hooks/useButtonGroup.js +67 -0
- package/dist/components/ButtonGroup/hooks/useButtonGroup.types.d.ts +18 -0
- package/dist/components/Card/Card.d.ts +28 -0
- package/dist/components/Card/Card.types.d.ts +24 -0
- package/dist/components/Card/Card.variants.d.ts +8 -0
- package/dist/components/Card/Card.variants.js +7 -12
- package/dist/components/Checkbox/Checkbox.d.ts +26 -0
- package/dist/components/Checkbox/Checkbox.js +189 -178
- package/dist/components/Checkbox/Checkbox.types.d.ts +38 -0
- package/dist/components/Checkbox/Checkbox.variants.d.ts +5 -0
- package/dist/components/Checkbox/Checkbox.variants.js +34 -7
- package/dist/components/Command/Command.d.ts +27 -0
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/Command.types.d.ts +31 -0
- package/dist/components/Command/Command.variants.d.ts +3 -0
- package/dist/components/Command/components/Command.d.ts +18 -0
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.d.ts +8 -0
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.d.ts +12 -0
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.d.ts +9 -0
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.d.ts +14 -0
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.d.ts +10 -0
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.d.ts +8 -0
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/CommandShortcut.d.ts +6 -0
- package/dist/components/Command/components/DialogContent.d.ts +2 -0
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.d.ts +2 -0
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.d.ts +9 -0
- package/dist/components/Command/contexts/Command.context.d.ts +2 -0
- package/dist/components/Command/contexts/Command.provider.d.ts +2 -0
- package/dist/components/Command/contexts/Command.types.d.ts +5 -0
- package/dist/components/Command/contexts/index.d.ts +3 -0
- package/dist/components/Counter/Counter.d.ts +36 -0
- package/dist/components/Counter/Counter.js +211 -0
- package/dist/components/Counter/Counter.types.d.ts +53 -0
- package/dist/components/Counter/Counter.variants.d.ts +7 -0
- package/dist/components/Counter/Counter.variants.js +70 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +31 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +164 -0
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +125 -0
- package/dist/components/DateRangePicker/DateRangePicker.variants.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.variants.js +25 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +120 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.types.d.ts +79 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.d.ts +8 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.js +56 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +22 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.types.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +60 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.types.d.ts +17 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +308 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.types.d.ts +34 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +41 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.types.d.ts +12 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +136 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.types.d.ts +26 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/index.d.ts +5 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/index.js +12 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.d.ts +22 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +5 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.d.ts +8 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +149 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.d.ts +4 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +21 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.d.ts +24 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +142 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.d.ts +22 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +93 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.d.ts +16 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +11 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.d.ts +3 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +107 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.types.d.ts +37 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.d.ts +5 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +30 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.d.ts +3 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +92 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.types.d.ts +23 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.d.ts +3 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +92 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.types.d.ts +23 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/index.d.ts +2 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/index.js +6 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/index.d.ts +1 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/index.js +4 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.d.ts +29 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +186 -0
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.d.ts +3 -0
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +71 -0
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.types.d.ts +31 -0
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.d.ts +2 -0
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +24 -0
- package/dist/components/DateRangePicker/components/index.d.ts +3 -0
- package/dist/components/DateRangePicker/components/index.js +8 -0
- package/dist/components/DateRangePicker/constants/index.d.ts +1 -0
- package/dist/components/DateRangePicker/constants/index.js +4 -0
- package/dist/components/DateRangePicker/constants/presets.d.ts +6 -0
- package/dist/components/DateRangePicker/constants/presets.js +10 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.context.d.ts +81 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.context.js +5 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.hook.d.ts +1 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.hook.js +13 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.provider.d.ts +24 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.provider.js +176 -0
- package/dist/components/DateRangePicker/contexts/index.d.ts +4 -0
- package/dist/components/DateRangePicker/contexts/index.js +8 -0
- package/dist/components/DateRangePicker/utils/disabled-dates.d.ts +26 -0
- package/dist/components/DateRangePicker/utils/disabled-dates.js +47 -0
- package/dist/components/DateRangePicker/utils/index.d.ts +6 -0
- package/dist/components/DateRangePicker/utils/index.js +22 -0
- package/dist/components/DateRangePicker/utils/presets.d.ts +5 -0
- package/dist/components/DateRangePicker/utils/presets.js +36 -0
- package/dist/components/DateRangePicker/utils/validation.d.ts +43 -0
- package/dist/components/DateRangePicker/utils/validation.js +79 -0
- package/dist/components/Datepicker/DatePicker.d.ts +26 -0
- package/dist/components/Datepicker/DatePicker.js +118 -2670
- package/dist/components/Datepicker/DatePicker.types.d.ts +29 -0
- package/dist/components/Datepicker/DatePicker.variants.d.ts +1 -0
- package/dist/components/Divider/Divider.d.ts +17 -0
- package/dist/components/Divider/Divider.variants.d.ts +3 -0
- package/dist/components/Divider/Divider.variants.js +1 -1
- package/dist/components/Drawer/Drawer.d.ts +36 -0
- package/dist/components/Drawer/Drawer.js +134 -0
- package/dist/components/Drawer/Drawer.types.d.ts +65 -0
- package/dist/components/Drawer/Drawer.variants.d.ts +8 -0
- package/dist/components/Drawer/Drawer.variants.js +92 -0
- package/dist/components/Drawer/components/Body/Body.d.ts +3 -0
- package/dist/components/Drawer/components/Body/Body.js +24 -0
- package/dist/components/Drawer/components/Body/Body.types.d.ts +7 -0
- package/dist/components/Drawer/components/Body/index.d.ts +2 -0
- package/dist/components/Drawer/components/Body/index.js +4 -0
- package/dist/components/Drawer/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Drawer/components/Footer/Footer.js +26 -0
- package/dist/components/Drawer/components/Footer/Footer.types.d.ts +7 -0
- package/dist/components/Drawer/components/Footer/index.d.ts +2 -0
- package/dist/components/Drawer/components/Footer/index.js +4 -0
- package/dist/components/Drawer/components/Header/Header.d.ts +3 -0
- package/dist/components/Drawer/components/Header/Header.js +27 -0
- package/dist/components/Drawer/components/Header/Header.types.d.ts +9 -0
- package/dist/components/Drawer/components/Header/index.d.ts +2 -0
- package/dist/components/Drawer/components/Header/index.js +4 -0
- package/dist/components/Drawer/components/index.d.ts +3 -0
- package/dist/components/Drawer/components/index.js +8 -0
- package/dist/components/Drawer/constants/index.d.ts +6 -0
- package/dist/components/Drawer/constants/index.js +9 -0
- package/dist/components/Drawer/contexts/Drawer.context.d.ts +7 -0
- package/dist/components/Drawer/contexts/Drawer.context.js +6 -0
- package/dist/components/Drawer/contexts/index.d.ts +2 -0
- package/dist/components/Drawer/contexts/index.js +5 -0
- package/dist/components/Drawer/hooks/index.d.ts +2 -0
- package/dist/components/Drawer/hooks/index.js +4 -0
- package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
- package/dist/components/Drawer/hooks/useDrawer.js +66 -0
- package/dist/components/Drawer/hooks/useDrawer.types.d.ts +30 -0
- package/dist/components/DropdownButton/DropdownButton.d.ts +20 -0
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/DropdownButton/DropdownButton.types.d.ts +36 -0
- package/dist/components/Filter/Filter.d.ts +26 -0
- package/dist/components/Filter/Filter.js +18 -12
- package/dist/components/Filter/Filter.types.d.ts +54 -0
- package/dist/components/Filter/Filter.variants.d.ts +3 -0
- package/dist/components/Filter/Filter.variants.js +8 -7
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.d.ts +3 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +12 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +72 -45
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.types.d.ts +11 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.d.ts +3 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.d.ts +12 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +32 -30
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +81 -47
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.types.d.ts +7 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.d.ts +3 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.d.ts +13 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +84 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +121 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +25 -0
- package/dist/components/Filter/components/ResetButton/ResetButton.d.ts +3 -0
- package/dist/components/Filter/components/ResetButton/ResetButton.js +15 -12
- package/dist/components/Filter/components/ResetButton/ResetButton.types.d.ts +5 -0
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.d.ts +3 -0
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +122 -0
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.types.d.ts +7 -0
- package/dist/components/Filter/components/index.d.ts +10 -0
- package/dist/components/Filter/components/index.js +6 -2
- package/dist/components/Filter/events/index.d.ts +6 -0
- package/dist/components/Filter/events/index.js +3 -3
- package/dist/components/Filter/utils/index.d.ts +1 -0
- package/dist/components/Filter/utils/index.js +2437 -0
- package/dist/components/ImageUpload/ImageUpload.d.ts +25 -0
- package/dist/components/ImageUpload/ImageUpload.js +223 -0
- package/dist/components/ImageUpload/ImageUpload.types.d.ts +69 -0
- package/dist/components/ImageUpload/ImageUpload.variants.d.ts +13 -0
- package/dist/components/ImageUpload/ImageUpload.variants.js +109 -0
- package/dist/components/Input/Input.d.ts +35 -0
- package/dist/components/Input/Input.js +203 -122
- package/dist/components/Input/Input.types.d.ts +36 -0
- package/dist/components/Input/Input.variants.d.ts +3 -0
- package/dist/components/Input/Input.variants.js +24 -19
- package/dist/components/Loading/Loading.d.ts +24 -0
- package/dist/components/Loading/Loading.js +1 -7
- package/dist/components/Loading/Loading.types.d.ts +17 -0
- package/dist/components/Loading/Loading.variants.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +34 -0
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/Modal.types.d.ts +50 -0
- package/dist/components/Modal/components/Body/Body.d.ts +3 -0
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Body/Body.types.d.ts +5 -0
- package/dist/components/Modal/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Modal/components/Footer/Footer.js +10 -4
- package/dist/components/Modal/components/Footer/Footer.types.d.ts +5 -0
- package/dist/components/Modal/components/Header/Header.d.ts +3 -0
- package/dist/components/Modal/components/Header/Header.js +11 -5
- package/dist/components/Modal/components/Header/Header.types.d.ts +5 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.js +6 -5
- package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +14 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +2 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +15 -12
- package/dist/components/Modal/components/index.d.ts +4 -0
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
- package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
- package/dist/components/Modal/contexts/Modal.types.d.ts +9 -0
- package/dist/components/Modal/contexts/index.d.ts +1 -0
- package/dist/components/Modal/hooks/index.d.ts +1 -0
- package/dist/components/Modal/hooks/useModal.d.ts +9 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +23 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +34 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +76 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +31 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +30 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.types.d.ts +8 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +38 -0
- package/dist/components/MultiSelectDropdown/components/List/List.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/components/List/List.js +30 -0
- package/dist/components/MultiSelectDropdown/components/List/List.types.d.ts +4 -0
- package/dist/components/MultiSelectDropdown/components/List/List.variants.d.ts +1 -0
- package/dist/components/MultiSelectDropdown/components/List/List.variants.js +25 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +126 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +7 -0
- package/dist/components/MultiSelectDropdown/components/index.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/components/index.js +8 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.d.ts +2 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +21 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.d.ts +1 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +13 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +138 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.types.d.ts +31 -0
- package/dist/components/MultiSelectDropdown/contexts/index.d.ts +2 -0
- package/dist/components/MultiSelectDropdown/contexts/index.js +6 -0
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.d.ts +4 -0
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +32 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.d.ts +21 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.types.d.ts +51 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.d.ts +4 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +46 -0
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.d.ts +2 -0
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +36 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.d.ts +3 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +691 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.types.d.ts +5 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.d.ts +3 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +60 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.types.d.ts +8 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.d.ts +3 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.types.d.ts +4 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.d.ts +3 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.js +652 -0
- package/dist/components/PhoneNumberInput/components/index.d.ts +2 -0
- package/dist/components/PhoneNumberInput/components/index.js +6 -0
- package/dist/components/PhoneNumberInput/contexts/index.d.ts +3 -0
- package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.context.d.ts +20 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.d.ts +2 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.d.ts +6 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6066 -0
- package/dist/components/PhoneNumberInput/utils/index.d.ts +2 -0
- package/dist/components/PhoneNumberInput/utils/index.js +11 -0
- package/dist/components/PieChart/PieChart.d.ts +20 -0
- package/dist/components/PieChart/PieChart.js +463 -482
- package/dist/components/PieChart/PieChart.types.d.ts +90 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
- package/dist/components/ProgressBar/ProgressBar.js +38 -59
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +20 -0
- package/dist/components/ProgressBar/ProgressBar.variants.d.ts +4 -0
- package/dist/components/ProgressBar/ProgressBar.variants.js +23 -24
- package/dist/components/Radio/Radio.d.ts +22 -0
- package/dist/components/Radio/Radio.js +47 -44
- package/dist/components/Radio/Radio.types.d.ts +44 -0
- package/dist/components/Radio/Radio.variants.d.ts +8 -0
- package/dist/components/Radio/Radio.variants.js +12 -8
- package/dist/components/RadioCard/RadioCard.d.ts +22 -0
- package/dist/components/RadioCard/RadioCard.types.d.ts +23 -0
- package/dist/components/RadioCard/RadioCard.variants.d.ts +1 -0
- package/dist/components/RadioCard/RadioCard.variants.js +1 -6
- package/dist/components/RadioCardGroup/RadioCardGroup.d.ts +23 -0
- package/dist/components/RadioCardGroup/RadioCardGroup.types.d.ts +30 -0
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.d.ts +3 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +34 -0
- package/dist/components/RadioGroup/RadioGroup.js +34 -33
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +44 -0
- package/dist/components/RadioGroup/RadioGroup.variants.d.ts +3 -0
- package/dist/components/Range/Range.d.ts +21 -0
- package/dist/components/Range/Range.js +26 -24
- package/dist/components/Range/Range.types.d.ts +42 -0
- package/dist/components/Range/Range.variants.d.ts +8 -0
- package/dist/components/Select/Select.d.ts +37 -0
- package/dist/components/Select/Select.js +71 -0
- package/dist/components/Select/Select.types.d.ts +137 -0
- package/dist/components/Select/Select.variants.d.ts +6 -0
- package/dist/components/{Dropdown/Dropdown.variants.js → Select/Select.variants.js} +20 -14
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.d.ts +3 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +11 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +4 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.d.ts +1 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +26 -0
- package/dist/components/Select/components/EmptyList.d.ts +2 -0
- package/dist/components/Select/components/List/List.d.ts +3 -0
- package/dist/components/Select/components/List/List.js +181 -0
- package/dist/components/Select/components/List/List.types.d.ts +15 -0
- package/dist/components/Select/components/List/List.variants.d.ts +2 -0
- package/dist/components/Select/components/List/List.variants.js +46 -0
- package/dist/components/Select/components/ListItem/ListItem.d.ts +3 -0
- package/dist/components/Select/components/ListItem/ListItem.js +117 -0
- package/dist/components/Select/components/ListItem/ListItem.types.d.ts +9 -0
- package/dist/components/Select/components/ListItem/ListItem.variants.d.ts +1 -0
- package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.variants.js +5 -4
- package/dist/components/Select/components/Wrapper.d.ts +5 -0
- package/dist/components/Select/components/Wrapper.js +248 -0
- package/dist/components/Select/components/index.d.ts +4 -0
- package/dist/components/Select/components/index.js +10 -0
- package/dist/components/Select/constants/index.d.ts +1 -0
- package/dist/components/Select/constants/index.js +4 -0
- package/dist/components/Select/constants/pagination.d.ts +1 -0
- package/dist/components/Select/constants/pagination.js +4 -0
- package/dist/components/Select/contexts/index.d.ts +2 -0
- package/dist/components/Select/contexts/index.js +6 -0
- package/dist/components/Select/contexts/select.context.d.ts +21 -0
- package/dist/components/Select/contexts/select.context.js +36 -0
- package/dist/components/Select/contexts/select.hook.d.ts +2 -0
- package/dist/components/Select/contexts/select.hook.js +11 -0
- package/dist/components/Select/contexts/select.provider.d.ts +10 -0
- package/dist/components/Select/contexts/select.provider.js +58 -0
- package/dist/components/Select/hooks/useNavigationList.d.ts +11 -0
- package/dist/components/Select/hooks/useNavigationList.js +50 -0
- package/dist/components/Select/hooks/useSelect.d.ts +15 -0
- package/dist/components/Select/hooks/useSelect.js +103 -0
- package/dist/components/Sidebar/Sidebar.d.ts +28 -0
- package/dist/components/Sidebar/Sidebar.types.d.ts +54 -0
- package/dist/components/Sidebar/Sidebar.variants.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.variants.js +2 -2
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +4 -0
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +4 -0
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +8 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +17 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +8 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +4 -0
- package/dist/components/Sidebar/components/index.d.ts +15 -0
- package/dist/components/Slider/Slider.d.ts +21 -0
- package/dist/components/Slider/Slider.js +30 -20
- package/dist/components/Slider/Slider.types.d.ts +42 -0
- package/dist/components/Slider/Slider.variants.d.ts +7 -0
- package/dist/components/Spinner/Spinner.d.ts +4 -0
- package/dist/components/Spinner/Spinner.js +57 -0
- package/dist/components/Spinner/Spinner.types.d.ts +13 -0
- package/dist/components/Spinner/Spinner.variants.d.ts +6 -0
- package/dist/components/Spinner/Spinner.variants.js +54 -0
- package/dist/components/Stepper/Stepper.d.ts +51 -0
- package/dist/components/Stepper/Stepper.js +75 -0
- package/dist/components/Stepper/Stepper.types.d.ts +73 -0
- package/dist/components/Stepper/Stepper.variants.d.ts +40 -0
- package/dist/components/Stepper/Stepper.variants.js +278 -0
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.d.ts +2 -0
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +200 -0
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.types.d.ts +1 -0
- package/dist/components/Stepper/components/StepConnector/StepConnector.d.ts +2 -0
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +29 -0
- package/dist/components/Stepper/components/StepConnector/StepConnector.types.d.ts +13 -0
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.d.ts +2 -0
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +23 -0
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.types.d.ts +13 -0
- package/dist/components/Stepper/components/StepItem/StepItem.d.ts +2 -0
- package/dist/components/Stepper/components/StepItem/StepItem.js +8 -0
- package/dist/components/Stepper/components/StepItem/StepItem.types.d.ts +32 -0
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.d.ts +2 -0
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +114 -0
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.types.d.ts +1 -0
- package/dist/components/Stepper/constants/index.d.ts +3 -0
- package/dist/components/Stepper/constants/index.js +13 -0
- package/dist/components/Stepper/hooks/index.d.ts +1 -0
- package/dist/components/Stepper/hooks/index.js +4 -0
- package/dist/components/Stepper/hooks/useStepItemLogic.d.ts +2 -0
- package/dist/components/Stepper/hooks/useStepItemLogic.js +27 -0
- package/dist/components/Stepper/hooks/useStepItemLogic.types.d.ts +16 -0
- package/dist/components/Stepper/utils/index.d.ts +3 -0
- package/dist/components/Stepper/utils/index.js +13 -0
- package/dist/components/Switch/Switch.d.ts +29 -0
- package/dist/components/Switch/Switch.js +154 -125
- package/dist/components/Switch/Switch.types.d.ts +43 -0
- package/dist/components/Switch/Switch.variants.d.ts +2 -0
- package/dist/components/Switch/Switch.variants.js +19 -10
- package/dist/components/Table/Table.d.ts +38 -0
- package/dist/components/Table/Table.types.d.ts +57 -0
- package/dist/components/Table/Table.variants.d.ts +6 -0
- package/dist/components/Table/components/Body.d.ts +3 -0
- package/dist/components/Table/components/Filter.d.ts +3 -0
- package/dist/components/Table/components/Head.d.ts +3 -0
- package/dist/components/Table/components/Row.d.ts +3 -0
- package/dist/components/Table/components/index.d.ts +4 -0
- package/dist/components/Tabs/Tabs.d.ts +37 -0
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.types.d.ts +42 -0
- package/dist/components/Tabs/Tabs.variants.d.ts +12 -0
- package/dist/components/Tabs/Tabs.variants.js +4 -3
- package/dist/components/Tabs/components/Content.d.ts +4 -0
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.d.ts +4 -0
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.d.ts +4 -0
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/Tabs/components/index.d.ts +3 -0
- package/dist/components/Tag/Tag.d.ts +16 -0
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.types.d.ts +33 -0
- package/dist/components/Tag/Tag.variants.d.ts +3 -0
- package/dist/components/Tag/Tag.variants.js +1 -0
- package/dist/components/TagSelect/TagSelect.d.ts +23 -0
- package/dist/components/TagSelect/TagSelect.types.d.ts +39 -0
- package/dist/components/TagSelect/TagSelect.variants.d.ts +3 -0
- package/dist/components/TagSelect/TagSelect.variants.js +2 -1
- package/dist/components/TagSelect/components/Item/Item.d.ts +3 -0
- package/dist/components/TagSelect/components/Item/Item.types.d.ts +6 -0
- package/dist/components/TagSelect/components/Item/Item.variants.d.ts +3 -0
- package/dist/components/TagSelect/components/List/List.d.ts +3 -0
- package/dist/components/TagSelect/components/List/List.types.d.ts +4 -0
- package/dist/components/TagSelect/components/List/List.variants.d.ts +1 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +51 -99
- package/dist/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +7 -0
- package/dist/components/TagSelect/components/index.d.ts +3 -0
- package/dist/components/TagSelect/contexts/TagSelect.context.d.ts +2 -0
- package/dist/components/TagSelect/contexts/TagSelect.hook.d.ts +1 -0
- package/dist/components/TagSelect/contexts/TagSelect.provider.d.ts +3 -0
- package/dist/components/TagSelect/contexts/TagSelect.types.d.ts +15 -0
- package/dist/components/TagSelect/contexts/index.d.ts +2 -0
- package/dist/components/TagSelect/hooks/useTagSelect.d.ts +4 -0
- package/dist/components/TextArea/TextArea.d.ts +24 -0
- package/dist/components/TextArea/TextArea.js +27 -26
- package/dist/components/TextArea/TextArea.types.d.ts +28 -0
- package/dist/components/TextArea/TextArea.variants.d.ts +1 -0
- package/dist/components/TimePicker/TimePicker.d.ts +21 -0
- package/dist/components/TimePicker/TimePicker.js +12 -5
- package/dist/components/TimePicker/TimePicker.types.d.ts +53 -0
- package/dist/components/TimePicker/TimePicker.variants.d.ts +4 -0
- package/dist/components/TimePicker/TimePicker.variants.js +32 -22
- package/dist/components/TimePicker/components/HoursList/HoursList.d.ts +4 -0
- package/dist/components/TimePicker/components/HoursList/HoursList.js +104 -67
- package/dist/components/TimePicker/components/HoursList/HoursList.types.d.ts +8 -0
- package/dist/components/TimePicker/components/MeridianList/MeridianList.d.ts +4 -0
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +51 -27
- package/dist/components/TimePicker/components/MeridianList/MeridianList.types.d.ts +7 -0
- package/dist/components/TimePicker/components/MinutesList/MinutesList.d.ts +4 -0
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +82 -39
- package/dist/components/TimePicker/components/MinutesList/MinutesList.types.d.ts +9 -0
- package/dist/components/TimePicker/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +199 -59
- package/dist/components/TimePicker/components/Wrapper/Wrapper.types.d.ts +6 -0
- package/dist/components/TimePicker/components/WrapperList/WrapperList.d.ts +3 -0
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +73 -46
- package/dist/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +9 -0
- package/dist/components/TimePicker/components/index.d.ts +1 -0
- package/dist/components/TimePicker/contexts/index.d.ts +3 -0
- package/dist/components/TimePicker/contexts/time-picker.context.d.ts +15 -0
- package/dist/components/TimePicker/contexts/time-picker.context.js +8 -1
- package/dist/components/TimePicker/contexts/time-picker.hook.d.ts +2 -0
- package/dist/components/TimePicker/contexts/time-picker.provider.d.ts +7 -0
- package/dist/components/TimePicker/contexts/time-picker.provider.js +51 -36
- package/dist/components/TimePicker/utils/index.d.ts +8 -0
- package/dist/components/TimePicker/utils/index.js +29 -4
- package/dist/components/Toast/Toast.d.ts +25 -0
- package/dist/components/Toast/Toast.js +262 -236
- package/dist/components/Toast/Toast.types.d.ts +46 -0
- package/dist/components/Toast/Toast.variants.d.ts +5 -0
- package/dist/components/Toast/Toast.variants.js +37 -24
- package/dist/components/Tooltip/Tooltip.d.ts +27 -0
- package/dist/components/Tooltip/Tooltip.js +15 -14
- package/dist/components/Tooltip/Tooltip.types.d.ts +28 -0
- package/dist/components/Tooltip/Tooltip.variants.d.ts +6 -0
- package/dist/components/Tooltip/Tooltip.variants.js +5 -4
- package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
- package/dist/components/Typography/Typography.d.ts +18 -0
- package/dist/components/Typography/Typography.js +23 -25
- package/dist/components/Typography/Typography.types.d.ts +29 -0
- package/dist/components/Typography/Typography.variants.d.ts +3 -0
- package/dist/components/Typography/Typography.variants.js +60 -52
- package/dist/components/VirtualizedTable/VirtualizedTable.d.ts +16 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.js +137 -73
- package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +198 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.variants.d.ts +1 -0
- package/dist/components/VirtualizedTable/assets/chevron-down.d.ts +6 -0
- package/dist/components/VirtualizedTable/assets/chevron-up.d.ts +6 -0
- package/dist/components/VirtualizedTable/assets/index.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Actions/Actions.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +105 -33
- package/dist/components/VirtualizedTable/components/Actions/Actions.types.d.ts +24 -0
- package/dist/components/VirtualizedTable/components/Body/Body.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Body/Body.js +112 -21
- package/dist/components/VirtualizedTable/components/Body/Body.types.d.ts +5 -0
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.d.ts +1 -0
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +95 -91
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +20 -20
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.types.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +51 -0
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.types.d.ts +10 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +123 -54
- package/dist/components/VirtualizedTable/components/Filter/Filter.types.d.ts +18 -0
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.d.ts +1 -0
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +33 -21
- package/dist/components/VirtualizedTable/components/Header/Header.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Header/Header.js +61 -41
- package/dist/components/VirtualizedTable/components/Header/Header.types.d.ts +5 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +43 -22
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.types.d.ts +9 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.d.ts +2 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +106 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.types.d.ts +5 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +2 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +22 -1859
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +5 -0
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.types.d.ts +6 -0
- package/dist/components/VirtualizedTable/components/index.d.ts +7 -0
- package/dist/components/VirtualizedTable/components/index.js +8 -6
- package/dist/components/VirtualizedTable/constants/index.d.ts +1 -0
- package/dist/components/VirtualizedTable/constants/pagination.d.ts +2 -0
- package/dist/components/VirtualizedTable/contexts/index.d.ts +3 -0
- package/dist/components/VirtualizedTable/contexts/table.context.d.ts +42 -0
- package/dist/components/VirtualizedTable/contexts/table.context.js +7 -0
- package/dist/components/VirtualizedTable/contexts/table.hook.d.ts +3 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.d.ts +3 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +242 -65
- package/dist/components/VirtualizedTable/contexts/table.types.d.ts +29 -0
- package/dist/components/VirtualizedTable/events/index.d.ts +12 -0
- package/dist/components/VirtualizedTable/events/index.js +29 -0
- package/dist/components/index.d.ts +53 -0
- package/dist/components/index.js +132 -94
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts/theme.context.d.ts +6 -0
- package/dist/contexts/theme.hook.d.ts +7 -0
- package/dist/contexts/theme.provider.d.ts +38 -0
- package/dist/contexts/theme.provider.js +0 -1
- package/dist/{createLucideIcon-D2CN7Ma9.js → createLucideIcon-CP-mMPfa.js} +15 -34
- package/dist/debounce-DJveWHr_.js +114 -0
- package/dist/domain/theme.d.ts +1 -0
- package/dist/ellipsis-vertical-Cl3yNtOy.js +9 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useToggle.d.ts +1 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +134 -0
- package/dist/index--l0zux8V.js +200 -0
- package/dist/{index-C1g_chDT.js → index-3fEdeexs.js} +2 -2
- package/dist/index-9a-FL_6D.js +479 -0
- package/dist/{index-bwWKd82e.js → index-BKMaItIC.js} +1 -1
- package/dist/index-BKjcReYh.js +55 -0
- package/dist/{index-N2OStZoU.js → index-BOE_3f_Z.js} +4 -25
- package/dist/{index-BAEWsOG1.js → index-BRXMsxSL.js} +1 -1
- package/dist/index-BmVmDQGH.js +662 -0
- package/dist/index-BvoZGpli.js +60 -0
- package/dist/index-CESXsoMn.js +14 -0
- package/dist/index-CJnS4BVW.js +93 -0
- package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
- package/dist/{index-DQJhMz8c.js → index-Cmf-IG4l.js} +11 -12
- package/dist/index-DLcqcWxM.js +29 -0
- package/dist/index-DPcwqB8q.js +1878 -0
- package/dist/index-Dd_ZmIqU.js +139 -0
- package/dist/{index-0XtjXVpJ.js → index-Dfq4O3b4.js} +4 -4
- package/dist/{index-l3NwplN0.js → index-Jr0cra7i.js} +10 -11
- package/dist/{index-CffpTFMi.js → index-URQGEGX7.js} +5 -6
- package/dist/index.d.ts +4 -940
- package/dist/index.js +146 -106
- package/dist/isObject-9XxUefZH.js +97 -0
- package/dist/libphonenumber-aZ-2KWIf.js +11581 -0
- package/dist/package.json +69 -40
- package/dist/proxy-CngVm5qA.js +4942 -0
- package/dist/{DatePicker.css → style.css} +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.d.ts +0 -0
- package/dist/ui/civo-theme.css +194 -168
- package/dist/ui/theme.css +27 -0
- package/dist/useBreadcrumb-C_Wb2cXs.js +1435 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +709 -517
- package/dist/x-B9bYxG31.js +8 -0
- package/dist/{x-4F_5p77m.js → x-Eoa9FJjA.js} +1 -1
- package/package.json +69 -40
- package/dist/Modal-B8jrP02v.js +0 -98
- package/dist/chevron-down-MZvQoT2F.js +0 -11
- package/dist/chevron-right-VYBOBhRt.js +0 -19
- package/dist/components/Dropdown/Dropdown.js +0 -42
- package/dist/components/Dropdown/components/List/List.js +0 -79
- package/dist/components/Dropdown/components/List/List.variants.js +0 -28
- package/dist/components/Dropdown/components/ListItem/ListItem.js +0 -67
- package/dist/components/Dropdown/components/Wrapper.js +0 -205
- package/dist/components/Dropdown/components/index.js +0 -8
- package/dist/components/Dropdown/contexts/dropdown.context.js +0 -19
- package/dist/components/Dropdown/contexts/dropdown.hook.js +0 -13
- package/dist/components/Dropdown/contexts/dropdown.provider.js +0 -30
- package/dist/components/Dropdown/contexts/index.js +0 -6
- package/dist/components/Dropdown/hooks/useDropdown.js +0 -58
- package/dist/components/Dropdown/hooks/useNavigationList.js +0 -62
- package/dist/components/NumberInput/NumberInput.js +0 -179
- package/dist/components/NumberInput/NumberInput.variants.js +0 -50
- package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +0 -16
- package/dist/debounce-BFejQm9P.js +0 -200
- package/dist/index-BVRIAMfe.js +0 -36
- package/dist/index-BfXxHr_2.js +0 -125
- package/dist/index-Bn4c-gww.js +0 -131
- package/dist/index-Cvx4lqTq.js +0 -47
- package/dist/index-DQH6odE9.js +0 -82
- package/dist/index-DdXGVVBv.js +0 -15
- package/dist/index-amYX3uxF.js +0 -436
- package/dist/index-sp5ZfG6g.js +0 -31
- package/dist/useBreadcrumb-B8DnuqkR.js +0 -1273
- /package/dist/components/{Dropdown → Select}/components/EmptyList.js +0 -0
|
@@ -1,2692 +1,140 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
4
|
-
import { datePickerVariants as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
timeZone: e,
|
|
19
|
-
timeZoneName: "longOffset"
|
|
20
|
-
}).format)(t).split("GMT")[1];
|
|
21
|
-
return r in de ? de[r] : Le(r, r.split(":"));
|
|
22
|
-
} catch {
|
|
23
|
-
if (e in de) return de[e];
|
|
24
|
-
const n = e?.match(yn);
|
|
25
|
-
return n ? Le(e, n.slice(1)) : NaN;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const yn = /([+-]\d\d):?(\d\d)?/;
|
|
29
|
-
function Le(e, t) {
|
|
30
|
-
const n = +(t[0] || 0), r = +(t[1] || 0), o = +(t[2] || 0) / 60;
|
|
31
|
-
return de[e] = n * 60 + r > 0 ? n * 60 + r + o : n * 60 - r - o;
|
|
32
|
-
}
|
|
33
|
-
class X extends Date {
|
|
34
|
-
//#region static
|
|
35
|
-
constructor(...t) {
|
|
36
|
-
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ne(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), st(this), He(this)) : this.setTime(Date.now());
|
|
37
|
-
}
|
|
38
|
-
static tz(t, ...n) {
|
|
39
|
-
return n.length ? new X(...n, t) : new X(Date.now(), t);
|
|
40
|
-
}
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region time zone
|
|
43
|
-
withTimeZone(t) {
|
|
44
|
-
return new X(+this, t);
|
|
45
|
-
}
|
|
46
|
-
getTimezoneOffset() {
|
|
47
|
-
const t = -ne(this.timeZone, this);
|
|
48
|
-
return t > 0 ? Math.floor(t) : Math.ceil(t);
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region time
|
|
52
|
-
setTime(t) {
|
|
53
|
-
return Date.prototype.setTime.apply(this, arguments), He(this), +this;
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region date-fns integration
|
|
57
|
-
[Symbol.for("constructDateFrom")](t) {
|
|
58
|
-
return new X(+new Date(t), this.timeZone);
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
61
|
-
}
|
|
62
|
-
const Qe = /^(get|set)(?!UTC)/;
|
|
63
|
-
Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
|
|
64
|
-
if (!Qe.test(e)) return;
|
|
65
|
-
const t = e.replace(Qe, "$1UTC");
|
|
66
|
-
X.prototype[t] && (e.startsWith("get") ? X.prototype[e] = function() {
|
|
67
|
-
return this.internal[t]();
|
|
68
|
-
} : (X.prototype[e] = function() {
|
|
69
|
-
return Date.prototype[t].apply(this.internal, arguments), gn(this), +this;
|
|
70
|
-
}, X.prototype[t] = function() {
|
|
71
|
-
return Date.prototype[t].apply(this, arguments), He(this), +this;
|
|
72
|
-
}));
|
|
73
|
-
});
|
|
74
|
-
function He(e) {
|
|
75
|
-
e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-ne(e.timeZone, e) * 60));
|
|
76
|
-
}
|
|
77
|
-
function gn(e) {
|
|
78
|
-
Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), st(e);
|
|
79
|
-
}
|
|
80
|
-
function st(e) {
|
|
81
|
-
const t = ne(e.timeZone, e), n = t > 0 ? Math.floor(t) : Math.ceil(t), r = /* @__PURE__ */ new Date(+e);
|
|
82
|
-
r.setUTCHours(r.getUTCHours() - 1);
|
|
83
|
-
const o = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), s = -(/* @__PURE__ */ new Date(+r)).getTimezoneOffset(), i = o - s, a = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
|
|
84
|
-
i && a && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + i);
|
|
85
|
-
const c = o - n;
|
|
86
|
-
c && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + c);
|
|
87
|
-
const f = /* @__PURE__ */ new Date(+e);
|
|
88
|
-
f.setUTCSeconds(0);
|
|
89
|
-
const l = o > 0 ? f.getSeconds() : (f.getSeconds() - 60) % 60, u = Math.round(-(ne(e.timeZone, e) * 60)) % 60;
|
|
90
|
-
(u || l) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + u), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + u + l));
|
|
91
|
-
const h = ne(e.timeZone, e), g = h > 0 ? Math.floor(h) : Math.ceil(h), W = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - g, M = g !== n, O = W - c;
|
|
92
|
-
if (M && O) {
|
|
93
|
-
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + O);
|
|
94
|
-
const C = ne(e.timeZone, e), p = C > 0 ? Math.floor(C) : Math.ceil(C), T = g - p;
|
|
95
|
-
T && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + T), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + T));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
class I extends X {
|
|
99
|
-
//#region static
|
|
100
|
-
static tz(t, ...n) {
|
|
101
|
-
return n.length ? new I(...n, t) : new I(Date.now(), t);
|
|
102
|
-
}
|
|
103
|
-
//#endregion
|
|
104
|
-
//#region representation
|
|
105
|
-
toISOString() {
|
|
106
|
-
const [t, n, r] = this.tzComponents(), o = `${t}${n}:${r}`;
|
|
107
|
-
return this.internal.toISOString().slice(0, -1) + o;
|
|
108
|
-
}
|
|
109
|
-
toString() {
|
|
110
|
-
return `${this.toDateString()} ${this.toTimeString()}`;
|
|
111
|
-
}
|
|
112
|
-
toDateString() {
|
|
113
|
-
const [t, n, r, o] = this.internal.toUTCString().split(" ");
|
|
114
|
-
return `${t?.slice(0, -1)} ${r} ${n} ${o}`;
|
|
115
|
-
}
|
|
116
|
-
toTimeString() {
|
|
117
|
-
const t = this.internal.toUTCString().split(" ")[4], [n, r, o] = this.tzComponents();
|
|
118
|
-
return `${t} GMT${n}${r}${o} (${hn(this.timeZone, this)})`;
|
|
119
|
-
}
|
|
120
|
-
toLocaleString(t, n) {
|
|
121
|
-
return Date.prototype.toLocaleString.call(this, t, {
|
|
122
|
-
...n,
|
|
123
|
-
timeZone: n?.timeZone || this.timeZone
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
toLocaleDateString(t, n) {
|
|
127
|
-
return Date.prototype.toLocaleDateString.call(this, t, {
|
|
128
|
-
...n,
|
|
129
|
-
timeZone: n?.timeZone || this.timeZone
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
toLocaleTimeString(t, n) {
|
|
133
|
-
return Date.prototype.toLocaleTimeString.call(this, t, {
|
|
134
|
-
...n,
|
|
135
|
-
timeZone: n?.timeZone || this.timeZone
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region private
|
|
140
|
-
tzComponents() {
|
|
141
|
-
const t = this.getTimezoneOffset(), n = t > 0 ? "-" : "+", r = String(Math.floor(Math.abs(t) / 60)).padStart(2, "0"), o = String(Math.abs(t) % 60).padStart(2, "0");
|
|
142
|
-
return [n, r, o];
|
|
143
|
-
}
|
|
144
|
-
//#endregion
|
|
145
|
-
withTimeZone(t) {
|
|
146
|
-
return new I(+this, t);
|
|
147
|
-
}
|
|
148
|
-
//#region date-fns integration
|
|
149
|
-
[Symbol.for("constructDateFrom")](t) {
|
|
150
|
-
return new I(+new Date(t), this.timeZone);
|
|
151
|
-
}
|
|
152
|
-
//#endregion
|
|
153
|
-
}
|
|
154
|
-
const at = 6048e5, pn = 864e5, Xe = Symbol.for("constructDateFrom");
|
|
155
|
-
function F(e, t) {
|
|
156
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" && Xe in e ? e[Xe](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
157
|
-
}
|
|
158
|
-
function Y(e, t) {
|
|
159
|
-
return F(t || e, e);
|
|
160
|
-
}
|
|
161
|
-
function it(e, t, n) {
|
|
162
|
-
const r = Y(e, n?.in);
|
|
163
|
-
return isNaN(t) ? F(e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
164
|
-
}
|
|
165
|
-
function ct(e, t, n) {
|
|
166
|
-
const r = Y(e, n?.in);
|
|
167
|
-
if (isNaN(t)) return F(e, NaN);
|
|
168
|
-
if (!t)
|
|
169
|
-
return r;
|
|
170
|
-
const o = r.getDate(), s = F(e, r.getTime());
|
|
171
|
-
s.setMonth(r.getMonth() + t + 1, 0);
|
|
172
|
-
const i = s.getDate();
|
|
173
|
-
return o >= i ? s : (r.setFullYear(
|
|
174
|
-
s.getFullYear(),
|
|
175
|
-
s.getMonth(),
|
|
176
|
-
o
|
|
177
|
-
), r);
|
|
178
|
-
}
|
|
179
|
-
let wn = {};
|
|
180
|
-
function ye() {
|
|
181
|
-
return wn;
|
|
182
|
-
}
|
|
183
|
-
function ie(e, t) {
|
|
184
|
-
const n = ye(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = Y(e, t?.in), s = o.getDay(), i = (s < r ? 7 : 0) + s - r;
|
|
185
|
-
return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
|
|
186
|
-
}
|
|
187
|
-
function he(e, t) {
|
|
188
|
-
return ie(e, { ...t, weekStartsOn: 1 });
|
|
189
|
-
}
|
|
190
|
-
function ut(e, t) {
|
|
191
|
-
const n = Y(e, t?.in), r = n.getFullYear(), o = F(n, 0);
|
|
192
|
-
o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
193
|
-
const s = he(o), i = F(n, 0);
|
|
194
|
-
i.setFullYear(r, 0, 4), i.setHours(0, 0, 0, 0);
|
|
195
|
-
const a = he(i);
|
|
196
|
-
return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= a.getTime() ? r : r - 1;
|
|
197
|
-
}
|
|
198
|
-
function Ue(e) {
|
|
199
|
-
const t = Y(e), n = new Date(
|
|
200
|
-
Date.UTC(
|
|
201
|
-
t.getFullYear(),
|
|
202
|
-
t.getMonth(),
|
|
203
|
-
t.getDate(),
|
|
204
|
-
t.getHours(),
|
|
205
|
-
t.getMinutes(),
|
|
206
|
-
t.getSeconds(),
|
|
207
|
-
t.getMilliseconds()
|
|
208
|
-
)
|
|
209
|
-
);
|
|
210
|
-
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
211
|
-
}
|
|
212
|
-
function ce(e, ...t) {
|
|
213
|
-
const n = F.bind(
|
|
214
|
-
null,
|
|
215
|
-
t.find((r) => typeof r == "object")
|
|
216
|
-
);
|
|
217
|
-
return t.map(n);
|
|
218
|
-
}
|
|
219
|
-
function me(e, t) {
|
|
220
|
-
const n = Y(e, t?.in);
|
|
221
|
-
return n.setHours(0, 0, 0, 0), n;
|
|
222
|
-
}
|
|
223
|
-
function ft(e, t, n) {
|
|
224
|
-
const [r, o] = ce(
|
|
225
|
-
n?.in,
|
|
226
|
-
e,
|
|
227
|
-
t
|
|
228
|
-
), s = me(r), i = me(o), a = +s - Ue(s), c = +i - Ue(i);
|
|
229
|
-
return Math.round((a - c) / pn);
|
|
230
|
-
}
|
|
231
|
-
function bn(e, t) {
|
|
232
|
-
const n = ut(e, t), r = F(e, 0);
|
|
233
|
-
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), he(r);
|
|
234
|
-
}
|
|
235
|
-
function Mn(e, t, n) {
|
|
236
|
-
return it(e, t * 7, n);
|
|
237
|
-
}
|
|
238
|
-
function kn(e, t, n) {
|
|
239
|
-
return ct(e, t * 12, n);
|
|
240
|
-
}
|
|
241
|
-
function Dn(e, t) {
|
|
242
|
-
let n, r = t?.in;
|
|
243
|
-
return e.forEach((o) => {
|
|
244
|
-
!r && typeof o == "object" && (r = F.bind(null, o));
|
|
245
|
-
const s = Y(o, r);
|
|
246
|
-
(!n || n < s || isNaN(+s)) && (n = s);
|
|
247
|
-
}), F(r, n || NaN);
|
|
248
|
-
}
|
|
249
|
-
function vn(e, t) {
|
|
250
|
-
let n, r = t?.in;
|
|
251
|
-
return e.forEach((o) => {
|
|
252
|
-
!r && typeof o == "object" && (r = F.bind(null, o));
|
|
253
|
-
const s = Y(o, r);
|
|
254
|
-
(!n || n > s || isNaN(+s)) && (n = s);
|
|
255
|
-
}), F(r, n || NaN);
|
|
256
|
-
}
|
|
257
|
-
function On(e, t, n) {
|
|
258
|
-
const [r, o] = ce(
|
|
259
|
-
n?.in,
|
|
260
|
-
e,
|
|
261
|
-
t
|
|
262
|
-
);
|
|
263
|
-
return +me(r) == +me(o);
|
|
264
|
-
}
|
|
265
|
-
function lt(e) {
|
|
266
|
-
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
267
|
-
}
|
|
268
|
-
function Wn(e) {
|
|
269
|
-
return !(!lt(e) && typeof e != "number" || isNaN(+Y(e)));
|
|
270
|
-
}
|
|
271
|
-
function Sn(e, t, n) {
|
|
272
|
-
const [r, o] = ce(
|
|
273
|
-
n?.in,
|
|
274
|
-
e,
|
|
275
|
-
t
|
|
276
|
-
), s = r.getFullYear() - o.getFullYear(), i = r.getMonth() - o.getMonth();
|
|
277
|
-
return s * 12 + i;
|
|
278
|
-
}
|
|
279
|
-
function Cn(e, t) {
|
|
280
|
-
const n = Y(e, t?.in), r = n.getMonth();
|
|
281
|
-
return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
|
|
282
|
-
}
|
|
283
|
-
function dt(e, t) {
|
|
284
|
-
const [n, r] = ce(e, t.start, t.end);
|
|
285
|
-
return { start: n, end: r };
|
|
286
|
-
}
|
|
287
|
-
function Nn(e, t) {
|
|
288
|
-
const { start: n, end: r } = dt(t?.in, e);
|
|
289
|
-
let o = +n > +r;
|
|
290
|
-
const s = o ? +n : +r, i = o ? r : n;
|
|
291
|
-
i.setHours(0, 0, 0, 0), i.setDate(1);
|
|
292
|
-
let a = 1;
|
|
293
|
-
const c = [];
|
|
294
|
-
for (; +i <= s; )
|
|
295
|
-
c.push(F(n, i)), i.setMonth(i.getMonth() + a);
|
|
296
|
-
return o ? c.reverse() : c;
|
|
297
|
-
}
|
|
298
|
-
function xn(e, t) {
|
|
299
|
-
const n = Y(e, t?.in);
|
|
300
|
-
return n.setDate(1), n.setHours(0, 0, 0, 0), n;
|
|
301
|
-
}
|
|
302
|
-
function Yn(e, t) {
|
|
303
|
-
const n = Y(e, t?.in), r = n.getFullYear();
|
|
304
|
-
return n.setFullYear(r + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
|
|
305
|
-
}
|
|
306
|
-
function ht(e, t) {
|
|
307
|
-
const n = Y(e, t?.in);
|
|
308
|
-
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
309
|
-
}
|
|
310
|
-
function Tn(e, t) {
|
|
311
|
-
const { start: n, end: r } = dt(t?.in, e);
|
|
312
|
-
let o = +n > +r;
|
|
313
|
-
const s = o ? +n : +r, i = o ? r : n;
|
|
314
|
-
i.setHours(0, 0, 0, 0), i.setMonth(0, 1);
|
|
315
|
-
let a = 1;
|
|
316
|
-
const c = [];
|
|
317
|
-
for (; +i <= s; )
|
|
318
|
-
c.push(F(n, i)), i.setFullYear(i.getFullYear() + a);
|
|
319
|
-
return o ? c.reverse() : c;
|
|
320
|
-
}
|
|
321
|
-
function mt(e, t) {
|
|
322
|
-
const n = ye(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = Y(e, t?.in), s = o.getDay(), i = (s < r ? -7 : 0) + 6 - (s - r);
|
|
323
|
-
return o.setDate(o.getDate() + i), o.setHours(23, 59, 59, 999), o;
|
|
324
|
-
}
|
|
325
|
-
function En(e, t) {
|
|
326
|
-
return mt(e, { ...t, weekStartsOn: 1 });
|
|
327
|
-
}
|
|
328
|
-
const Pn = {
|
|
329
|
-
lessThanXSeconds: {
|
|
330
|
-
one: "less than a second",
|
|
331
|
-
other: "less than {{count}} seconds"
|
|
332
|
-
},
|
|
333
|
-
xSeconds: {
|
|
334
|
-
one: "1 second",
|
|
335
|
-
other: "{{count}} seconds"
|
|
336
|
-
},
|
|
337
|
-
halfAMinute: "half a minute",
|
|
338
|
-
lessThanXMinutes: {
|
|
339
|
-
one: "less than a minute",
|
|
340
|
-
other: "less than {{count}} minutes"
|
|
341
|
-
},
|
|
342
|
-
xMinutes: {
|
|
343
|
-
one: "1 minute",
|
|
344
|
-
other: "{{count}} minutes"
|
|
345
|
-
},
|
|
346
|
-
aboutXHours: {
|
|
347
|
-
one: "about 1 hour",
|
|
348
|
-
other: "about {{count}} hours"
|
|
349
|
-
},
|
|
350
|
-
xHours: {
|
|
351
|
-
one: "1 hour",
|
|
352
|
-
other: "{{count}} hours"
|
|
353
|
-
},
|
|
354
|
-
xDays: {
|
|
355
|
-
one: "1 day",
|
|
356
|
-
other: "{{count}} days"
|
|
357
|
-
},
|
|
358
|
-
aboutXWeeks: {
|
|
359
|
-
one: "about 1 week",
|
|
360
|
-
other: "about {{count}} weeks"
|
|
361
|
-
},
|
|
362
|
-
xWeeks: {
|
|
363
|
-
one: "1 week",
|
|
364
|
-
other: "{{count}} weeks"
|
|
365
|
-
},
|
|
366
|
-
aboutXMonths: {
|
|
367
|
-
one: "about 1 month",
|
|
368
|
-
other: "about {{count}} months"
|
|
369
|
-
},
|
|
370
|
-
xMonths: {
|
|
371
|
-
one: "1 month",
|
|
372
|
-
other: "{{count}} months"
|
|
373
|
-
},
|
|
374
|
-
aboutXYears: {
|
|
375
|
-
one: "about 1 year",
|
|
376
|
-
other: "about {{count}} years"
|
|
377
|
-
},
|
|
378
|
-
xYears: {
|
|
379
|
-
one: "1 year",
|
|
380
|
-
other: "{{count}} years"
|
|
381
|
-
},
|
|
382
|
-
overXYears: {
|
|
383
|
-
one: "over 1 year",
|
|
384
|
-
other: "over {{count}} years"
|
|
385
|
-
},
|
|
386
|
-
almostXYears: {
|
|
387
|
-
one: "almost 1 year",
|
|
388
|
-
other: "almost {{count}} years"
|
|
389
|
-
}
|
|
390
|
-
}, _n = (e, t, n) => {
|
|
391
|
-
let r;
|
|
392
|
-
const o = Pn[e];
|
|
393
|
-
return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
394
|
-
};
|
|
395
|
-
function _e(e) {
|
|
396
|
-
return (t = {}) => {
|
|
397
|
-
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
398
|
-
return e.formats[n] || e.formats[e.defaultWidth];
|
|
399
|
-
};
|
|
400
|
-
}
|
|
401
|
-
const Fn = {
|
|
402
|
-
full: "EEEE, MMMM do, y",
|
|
403
|
-
long: "MMMM do, y",
|
|
404
|
-
medium: "MMM d, y",
|
|
405
|
-
short: "MM/dd/yyyy"
|
|
406
|
-
}, Bn = {
|
|
407
|
-
full: "h:mm:ss a zzzz",
|
|
408
|
-
long: "h:mm:ss a z",
|
|
409
|
-
medium: "h:mm:ss a",
|
|
410
|
-
short: "h:mm a"
|
|
411
|
-
}, In = {
|
|
412
|
-
full: "{{date}} 'at' {{time}}",
|
|
413
|
-
long: "{{date}} 'at' {{time}}",
|
|
414
|
-
medium: "{{date}}, {{time}}",
|
|
415
|
-
short: "{{date}}, {{time}}"
|
|
416
|
-
}, Hn = {
|
|
417
|
-
date: _e({
|
|
418
|
-
formats: Fn,
|
|
419
|
-
defaultWidth: "full"
|
|
420
|
-
}),
|
|
421
|
-
time: _e({
|
|
422
|
-
formats: Bn,
|
|
423
|
-
defaultWidth: "full"
|
|
424
|
-
}),
|
|
425
|
-
dateTime: _e({
|
|
426
|
-
formats: In,
|
|
427
|
-
defaultWidth: "full"
|
|
428
|
-
})
|
|
429
|
-
}, qn = {
|
|
430
|
-
lastWeek: "'last' eeee 'at' p",
|
|
431
|
-
yesterday: "'yesterday at' p",
|
|
432
|
-
today: "'today at' p",
|
|
433
|
-
tomorrow: "'tomorrow at' p",
|
|
434
|
-
nextWeek: "eeee 'at' p",
|
|
435
|
-
other: "P"
|
|
436
|
-
}, An = (e, t, n, r) => qn[e];
|
|
437
|
-
function fe(e) {
|
|
438
|
-
return (t, n) => {
|
|
439
|
-
const r = n?.context ? String(n.context) : "standalone";
|
|
440
|
-
let o;
|
|
441
|
-
if (r === "formatting" && e.formattingValues) {
|
|
442
|
-
const i = e.defaultFormattingWidth || e.defaultWidth, a = n?.width ? String(n.width) : i;
|
|
443
|
-
o = e.formattingValues[a] || e.formattingValues[i];
|
|
444
|
-
} else {
|
|
445
|
-
const i = e.defaultWidth, a = n?.width ? String(n.width) : e.defaultWidth;
|
|
446
|
-
o = e.values[a] || e.values[i];
|
|
447
|
-
}
|
|
448
|
-
const s = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
449
|
-
return o[s];
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
const jn = {
|
|
453
|
-
narrow: ["B", "A"],
|
|
454
|
-
abbreviated: ["BC", "AD"],
|
|
455
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
456
|
-
}, Rn = {
|
|
457
|
-
narrow: ["1", "2", "3", "4"],
|
|
458
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
459
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
460
|
-
}, Zn = {
|
|
461
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
462
|
-
abbreviated: [
|
|
463
|
-
"Jan",
|
|
464
|
-
"Feb",
|
|
465
|
-
"Mar",
|
|
466
|
-
"Apr",
|
|
467
|
-
"May",
|
|
468
|
-
"Jun",
|
|
469
|
-
"Jul",
|
|
470
|
-
"Aug",
|
|
471
|
-
"Sep",
|
|
472
|
-
"Oct",
|
|
473
|
-
"Nov",
|
|
474
|
-
"Dec"
|
|
475
|
-
],
|
|
476
|
-
wide: [
|
|
477
|
-
"January",
|
|
478
|
-
"February",
|
|
479
|
-
"March",
|
|
480
|
-
"April",
|
|
481
|
-
"May",
|
|
482
|
-
"June",
|
|
483
|
-
"July",
|
|
484
|
-
"August",
|
|
485
|
-
"September",
|
|
486
|
-
"October",
|
|
487
|
-
"November",
|
|
488
|
-
"December"
|
|
489
|
-
]
|
|
490
|
-
}, $n = {
|
|
491
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
492
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
493
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
494
|
-
wide: [
|
|
495
|
-
"Sunday",
|
|
496
|
-
"Monday",
|
|
497
|
-
"Tuesday",
|
|
498
|
-
"Wednesday",
|
|
499
|
-
"Thursday",
|
|
500
|
-
"Friday",
|
|
501
|
-
"Saturday"
|
|
502
|
-
]
|
|
503
|
-
}, Gn = {
|
|
504
|
-
narrow: {
|
|
505
|
-
am: "a",
|
|
506
|
-
pm: "p",
|
|
507
|
-
midnight: "mi",
|
|
508
|
-
noon: "n",
|
|
509
|
-
morning: "morning",
|
|
510
|
-
afternoon: "afternoon",
|
|
511
|
-
evening: "evening",
|
|
512
|
-
night: "night"
|
|
513
|
-
},
|
|
514
|
-
abbreviated: {
|
|
515
|
-
am: "AM",
|
|
516
|
-
pm: "PM",
|
|
517
|
-
midnight: "midnight",
|
|
518
|
-
noon: "noon",
|
|
519
|
-
morning: "morning",
|
|
520
|
-
afternoon: "afternoon",
|
|
521
|
-
evening: "evening",
|
|
522
|
-
night: "night"
|
|
523
|
-
},
|
|
524
|
-
wide: {
|
|
525
|
-
am: "a.m.",
|
|
526
|
-
pm: "p.m.",
|
|
527
|
-
midnight: "midnight",
|
|
528
|
-
noon: "noon",
|
|
529
|
-
morning: "morning",
|
|
530
|
-
afternoon: "afternoon",
|
|
531
|
-
evening: "evening",
|
|
532
|
-
night: "night"
|
|
533
|
-
}
|
|
534
|
-
}, zn = {
|
|
535
|
-
narrow: {
|
|
536
|
-
am: "a",
|
|
537
|
-
pm: "p",
|
|
538
|
-
midnight: "mi",
|
|
539
|
-
noon: "n",
|
|
540
|
-
morning: "in the morning",
|
|
541
|
-
afternoon: "in the afternoon",
|
|
542
|
-
evening: "in the evening",
|
|
543
|
-
night: "at night"
|
|
544
|
-
},
|
|
545
|
-
abbreviated: {
|
|
546
|
-
am: "AM",
|
|
547
|
-
pm: "PM",
|
|
548
|
-
midnight: "midnight",
|
|
549
|
-
noon: "noon",
|
|
550
|
-
morning: "in the morning",
|
|
551
|
-
afternoon: "in the afternoon",
|
|
552
|
-
evening: "in the evening",
|
|
553
|
-
night: "at night"
|
|
554
|
-
},
|
|
555
|
-
wide: {
|
|
556
|
-
am: "a.m.",
|
|
557
|
-
pm: "p.m.",
|
|
558
|
-
midnight: "midnight",
|
|
559
|
-
noon: "noon",
|
|
560
|
-
morning: "in the morning",
|
|
561
|
-
afternoon: "in the afternoon",
|
|
562
|
-
evening: "in the evening",
|
|
563
|
-
night: "at night"
|
|
564
|
-
}
|
|
565
|
-
}, Ln = (e, t) => {
|
|
566
|
-
const n = Number(e), r = n % 100;
|
|
567
|
-
if (r > 20 || r < 10)
|
|
568
|
-
switch (r % 10) {
|
|
569
|
-
case 1:
|
|
570
|
-
return n + "st";
|
|
571
|
-
case 2:
|
|
572
|
-
return n + "nd";
|
|
573
|
-
case 3:
|
|
574
|
-
return n + "rd";
|
|
575
|
-
}
|
|
576
|
-
return n + "th";
|
|
577
|
-
}, Qn = {
|
|
578
|
-
ordinalNumber: Ln,
|
|
579
|
-
era: fe({
|
|
580
|
-
values: jn,
|
|
581
|
-
defaultWidth: "wide"
|
|
582
|
-
}),
|
|
583
|
-
quarter: fe({
|
|
584
|
-
values: Rn,
|
|
585
|
-
defaultWidth: "wide",
|
|
586
|
-
argumentCallback: (e) => e - 1
|
|
587
|
-
}),
|
|
588
|
-
month: fe({
|
|
589
|
-
values: Zn,
|
|
590
|
-
defaultWidth: "wide"
|
|
591
|
-
}),
|
|
592
|
-
day: fe({
|
|
593
|
-
values: $n,
|
|
594
|
-
defaultWidth: "wide"
|
|
595
|
-
}),
|
|
596
|
-
dayPeriod: fe({
|
|
597
|
-
values: Gn,
|
|
598
|
-
defaultWidth: "wide",
|
|
599
|
-
formattingValues: zn,
|
|
600
|
-
defaultFormattingWidth: "wide"
|
|
601
|
-
})
|
|
602
|
-
};
|
|
603
|
-
function le(e) {
|
|
604
|
-
return (t, n = {}) => {
|
|
605
|
-
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], s = t.match(o);
|
|
606
|
-
if (!s)
|
|
607
|
-
return null;
|
|
608
|
-
const i = s[0], a = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(a) ? Un(a, (u) => u.test(i)) : (
|
|
609
|
-
// [TODO] -- I challenge you to fix the type
|
|
610
|
-
Xn(a, (u) => u.test(i))
|
|
611
|
-
);
|
|
612
|
-
let f;
|
|
613
|
-
f = e.valueCallback ? e.valueCallback(c) : c, f = n.valueCallback ? (
|
|
614
|
-
// [TODO] -- I challenge you to fix the type
|
|
615
|
-
n.valueCallback(f)
|
|
616
|
-
) : f;
|
|
617
|
-
const l = t.slice(i.length);
|
|
618
|
-
return { value: f, rest: l };
|
|
619
|
-
};
|
|
620
|
-
}
|
|
621
|
-
function Xn(e, t) {
|
|
622
|
-
for (const n in e)
|
|
623
|
-
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
624
|
-
return n;
|
|
625
|
-
}
|
|
626
|
-
function Un(e, t) {
|
|
627
|
-
for (let n = 0; n < e.length; n++)
|
|
628
|
-
if (t(e[n]))
|
|
629
|
-
return n;
|
|
630
|
-
}
|
|
631
|
-
function Vn(e) {
|
|
632
|
-
return (t, n = {}) => {
|
|
633
|
-
const r = t.match(e.matchPattern);
|
|
634
|
-
if (!r) return null;
|
|
635
|
-
const o = r[0], s = t.match(e.parsePattern);
|
|
636
|
-
if (!s) return null;
|
|
637
|
-
let i = e.valueCallback ? e.valueCallback(s[0]) : s[0];
|
|
638
|
-
i = n.valueCallback ? n.valueCallback(i) : i;
|
|
639
|
-
const a = t.slice(o.length);
|
|
640
|
-
return { value: i, rest: a };
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
const Kn = /^(\d+)(th|st|nd|rd)?/i, Jn = /\d+/i, er = {
|
|
644
|
-
narrow: /^(b|a)/i,
|
|
645
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
646
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
647
|
-
}, tr = {
|
|
648
|
-
any: [/^b/i, /^(a|c)/i]
|
|
649
|
-
}, nr = {
|
|
650
|
-
narrow: /^[1234]/i,
|
|
651
|
-
abbreviated: /^q[1234]/i,
|
|
652
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
653
|
-
}, rr = {
|
|
654
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
655
|
-
}, or = {
|
|
656
|
-
narrow: /^[jfmasond]/i,
|
|
657
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
658
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
659
|
-
}, sr = {
|
|
660
|
-
narrow: [
|
|
661
|
-
/^j/i,
|
|
662
|
-
/^f/i,
|
|
663
|
-
/^m/i,
|
|
664
|
-
/^a/i,
|
|
665
|
-
/^m/i,
|
|
666
|
-
/^j/i,
|
|
667
|
-
/^j/i,
|
|
668
|
-
/^a/i,
|
|
669
|
-
/^s/i,
|
|
670
|
-
/^o/i,
|
|
671
|
-
/^n/i,
|
|
672
|
-
/^d/i
|
|
673
|
-
],
|
|
674
|
-
any: [
|
|
675
|
-
/^ja/i,
|
|
676
|
-
/^f/i,
|
|
677
|
-
/^mar/i,
|
|
678
|
-
/^ap/i,
|
|
679
|
-
/^may/i,
|
|
680
|
-
/^jun/i,
|
|
681
|
-
/^jul/i,
|
|
682
|
-
/^au/i,
|
|
683
|
-
/^s/i,
|
|
684
|
-
/^o/i,
|
|
685
|
-
/^n/i,
|
|
686
|
-
/^d/i
|
|
687
|
-
]
|
|
688
|
-
}, ar = {
|
|
689
|
-
narrow: /^[smtwf]/i,
|
|
690
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
691
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
692
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
693
|
-
}, ir = {
|
|
694
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
695
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
696
|
-
}, cr = {
|
|
697
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
698
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
699
|
-
}, ur = {
|
|
700
|
-
any: {
|
|
701
|
-
am: /^a/i,
|
|
702
|
-
pm: /^p/i,
|
|
703
|
-
midnight: /^mi/i,
|
|
704
|
-
noon: /^no/i,
|
|
705
|
-
morning: /morning/i,
|
|
706
|
-
afternoon: /afternoon/i,
|
|
707
|
-
evening: /evening/i,
|
|
708
|
-
night: /night/i
|
|
709
|
-
}
|
|
710
|
-
}, fr = {
|
|
711
|
-
ordinalNumber: Vn({
|
|
712
|
-
matchPattern: Kn,
|
|
713
|
-
parsePattern: Jn,
|
|
714
|
-
valueCallback: (e) => parseInt(e, 10)
|
|
715
|
-
}),
|
|
716
|
-
era: le({
|
|
717
|
-
matchPatterns: er,
|
|
718
|
-
defaultMatchWidth: "wide",
|
|
719
|
-
parsePatterns: tr,
|
|
720
|
-
defaultParseWidth: "any"
|
|
721
|
-
}),
|
|
722
|
-
quarter: le({
|
|
723
|
-
matchPatterns: nr,
|
|
724
|
-
defaultMatchWidth: "wide",
|
|
725
|
-
parsePatterns: rr,
|
|
726
|
-
defaultParseWidth: "any",
|
|
727
|
-
valueCallback: (e) => e + 1
|
|
728
|
-
}),
|
|
729
|
-
month: le({
|
|
730
|
-
matchPatterns: or,
|
|
731
|
-
defaultMatchWidth: "wide",
|
|
732
|
-
parsePatterns: sr,
|
|
733
|
-
defaultParseWidth: "any"
|
|
734
|
-
}),
|
|
735
|
-
day: le({
|
|
736
|
-
matchPatterns: ar,
|
|
737
|
-
defaultMatchWidth: "wide",
|
|
738
|
-
parsePatterns: ir,
|
|
739
|
-
defaultParseWidth: "any"
|
|
740
|
-
}),
|
|
741
|
-
dayPeriod: le({
|
|
742
|
-
matchPatterns: cr,
|
|
743
|
-
defaultMatchWidth: "any",
|
|
744
|
-
parsePatterns: ur,
|
|
745
|
-
defaultParseWidth: "any"
|
|
746
|
-
})
|
|
747
|
-
}, qe = {
|
|
748
|
-
code: "en-US",
|
|
749
|
-
formatDistance: _n,
|
|
750
|
-
formatLong: Hn,
|
|
751
|
-
formatRelative: An,
|
|
752
|
-
localize: Qn,
|
|
753
|
-
match: fr,
|
|
754
|
-
options: {
|
|
755
|
-
weekStartsOn: 0,
|
|
756
|
-
firstWeekContainsDate: 1
|
|
757
|
-
}
|
|
758
|
-
};
|
|
759
|
-
function lr(e, t) {
|
|
760
|
-
const n = Y(e, t?.in);
|
|
761
|
-
return ft(n, ht(n)) + 1;
|
|
762
|
-
}
|
|
763
|
-
function yt(e, t) {
|
|
764
|
-
const n = Y(e, t?.in), r = +he(n) - +bn(n);
|
|
765
|
-
return Math.round(r / at) + 1;
|
|
766
|
-
}
|
|
767
|
-
function gt(e, t) {
|
|
768
|
-
const n = Y(e, t?.in), r = n.getFullYear(), o = ye(), s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, i = F(t?.in || e, 0);
|
|
769
|
-
i.setFullYear(r + 1, 0, s), i.setHours(0, 0, 0, 0);
|
|
770
|
-
const a = ie(i, t), c = F(t?.in || e, 0);
|
|
771
|
-
c.setFullYear(r, 0, s), c.setHours(0, 0, 0, 0);
|
|
772
|
-
const f = ie(c, t);
|
|
773
|
-
return +n >= +a ? r + 1 : +n >= +f ? r : r - 1;
|
|
774
|
-
}
|
|
775
|
-
function dr(e, t) {
|
|
776
|
-
const n = ye(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = gt(e, t), s = F(t?.in || e, 0);
|
|
777
|
-
return s.setFullYear(o, 0, r), s.setHours(0, 0, 0, 0), ie(s, t);
|
|
778
|
-
}
|
|
779
|
-
function pt(e, t) {
|
|
780
|
-
const n = Y(e, t?.in), r = +ie(n, t) - +dr(n, t);
|
|
781
|
-
return Math.round(r / at) + 1;
|
|
782
|
-
}
|
|
783
|
-
function x(e, t) {
|
|
784
|
-
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
785
|
-
return n + r;
|
|
786
|
-
}
|
|
787
|
-
const ee = {
|
|
788
|
-
// Year
|
|
789
|
-
y(e, t) {
|
|
790
|
-
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
791
|
-
return x(t === "yy" ? r % 100 : r, t.length);
|
|
792
|
-
},
|
|
793
|
-
// Month
|
|
794
|
-
M(e, t) {
|
|
795
|
-
const n = e.getMonth();
|
|
796
|
-
return t === "M" ? String(n + 1) : x(n + 1, 2);
|
|
797
|
-
},
|
|
798
|
-
// Day of the month
|
|
799
|
-
d(e, t) {
|
|
800
|
-
return x(e.getDate(), t.length);
|
|
801
|
-
},
|
|
802
|
-
// AM or PM
|
|
803
|
-
a(e, t) {
|
|
804
|
-
const n = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
805
|
-
switch (t) {
|
|
806
|
-
case "a":
|
|
807
|
-
case "aa":
|
|
808
|
-
return n.toUpperCase();
|
|
809
|
-
case "aaa":
|
|
810
|
-
return n;
|
|
811
|
-
case "aaaaa":
|
|
812
|
-
return n[0];
|
|
813
|
-
case "aaaa":
|
|
814
|
-
default:
|
|
815
|
-
return n === "am" ? "a.m." : "p.m.";
|
|
816
|
-
}
|
|
817
|
-
},
|
|
818
|
-
// Hour [1-12]
|
|
819
|
-
h(e, t) {
|
|
820
|
-
return x(e.getHours() % 12 || 12, t.length);
|
|
821
|
-
},
|
|
822
|
-
// Hour [0-23]
|
|
823
|
-
H(e, t) {
|
|
824
|
-
return x(e.getHours(), t.length);
|
|
825
|
-
},
|
|
826
|
-
// Minute
|
|
827
|
-
m(e, t) {
|
|
828
|
-
return x(e.getMinutes(), t.length);
|
|
829
|
-
},
|
|
830
|
-
// Second
|
|
831
|
-
s(e, t) {
|
|
832
|
-
return x(e.getSeconds(), t.length);
|
|
833
|
-
},
|
|
834
|
-
// Fraction of second
|
|
835
|
-
S(e, t) {
|
|
836
|
-
const n = t.length, r = e.getMilliseconds(), o = Math.trunc(
|
|
837
|
-
r * Math.pow(10, n - 3)
|
|
838
|
-
);
|
|
839
|
-
return x(o, t.length);
|
|
840
|
-
}
|
|
841
|
-
}, ae = {
|
|
842
|
-
midnight: "midnight",
|
|
843
|
-
noon: "noon",
|
|
844
|
-
morning: "morning",
|
|
845
|
-
afternoon: "afternoon",
|
|
846
|
-
evening: "evening",
|
|
847
|
-
night: "night"
|
|
848
|
-
}, Ve = {
|
|
849
|
-
// Era
|
|
850
|
-
G: function(e, t, n) {
|
|
851
|
-
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
852
|
-
switch (t) {
|
|
853
|
-
// AD, BC
|
|
854
|
-
case "G":
|
|
855
|
-
case "GG":
|
|
856
|
-
case "GGG":
|
|
857
|
-
return n.era(r, { width: "abbreviated" });
|
|
858
|
-
// A, B
|
|
859
|
-
case "GGGGG":
|
|
860
|
-
return n.era(r, { width: "narrow" });
|
|
861
|
-
// Anno Domini, Before Christ
|
|
862
|
-
case "GGGG":
|
|
863
|
-
default:
|
|
864
|
-
return n.era(r, { width: "wide" });
|
|
865
|
-
}
|
|
866
|
-
},
|
|
867
|
-
// Year
|
|
868
|
-
y: function(e, t, n) {
|
|
869
|
-
if (t === "yo") {
|
|
870
|
-
const r = e.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
871
|
-
return n.ordinalNumber(o, { unit: "year" });
|
|
872
|
-
}
|
|
873
|
-
return ee.y(e, t);
|
|
874
|
-
},
|
|
875
|
-
// Local week-numbering year
|
|
876
|
-
Y: function(e, t, n, r) {
|
|
877
|
-
const o = gt(e, r), s = o > 0 ? o : 1 - o;
|
|
878
|
-
if (t === "YY") {
|
|
879
|
-
const i = s % 100;
|
|
880
|
-
return x(i, 2);
|
|
881
|
-
}
|
|
882
|
-
return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : x(s, t.length);
|
|
883
|
-
},
|
|
884
|
-
// ISO week-numbering year
|
|
885
|
-
R: function(e, t) {
|
|
886
|
-
const n = ut(e);
|
|
887
|
-
return x(n, t.length);
|
|
888
|
-
},
|
|
889
|
-
// Extended year. This is a single number designating the year of this calendar system.
|
|
890
|
-
// The main difference between `y` and `u` localizers are B.C. years:
|
|
891
|
-
// | Year | `y` | `u` |
|
|
892
|
-
// |------|-----|-----|
|
|
893
|
-
// | AC 1 | 1 | 1 |
|
|
894
|
-
// | BC 1 | 1 | 0 |
|
|
895
|
-
// | BC 2 | 2 | -1 |
|
|
896
|
-
// Also `yy` always returns the last two digits of a year,
|
|
897
|
-
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
898
|
-
u: function(e, t) {
|
|
899
|
-
const n = e.getFullYear();
|
|
900
|
-
return x(n, t.length);
|
|
901
|
-
},
|
|
902
|
-
// Quarter
|
|
903
|
-
Q: function(e, t, n) {
|
|
904
|
-
const r = Math.ceil((e.getMonth() + 1) / 3);
|
|
905
|
-
switch (t) {
|
|
906
|
-
// 1, 2, 3, 4
|
|
907
|
-
case "Q":
|
|
908
|
-
return String(r);
|
|
909
|
-
// 01, 02, 03, 04
|
|
910
|
-
case "QQ":
|
|
911
|
-
return x(r, 2);
|
|
912
|
-
// 1st, 2nd, 3rd, 4th
|
|
913
|
-
case "Qo":
|
|
914
|
-
return n.ordinalNumber(r, { unit: "quarter" });
|
|
915
|
-
// Q1, Q2, Q3, Q4
|
|
916
|
-
case "QQQ":
|
|
917
|
-
return n.quarter(r, {
|
|
918
|
-
width: "abbreviated",
|
|
919
|
-
context: "formatting"
|
|
920
|
-
});
|
|
921
|
-
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
922
|
-
case "QQQQQ":
|
|
923
|
-
return n.quarter(r, {
|
|
924
|
-
width: "narrow",
|
|
925
|
-
context: "formatting"
|
|
926
|
-
});
|
|
927
|
-
// 1st quarter, 2nd quarter, ...
|
|
928
|
-
case "QQQQ":
|
|
929
|
-
default:
|
|
930
|
-
return n.quarter(r, {
|
|
931
|
-
width: "wide",
|
|
932
|
-
context: "formatting"
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
},
|
|
936
|
-
// Stand-alone quarter
|
|
937
|
-
q: function(e, t, n) {
|
|
938
|
-
const r = Math.ceil((e.getMonth() + 1) / 3);
|
|
939
|
-
switch (t) {
|
|
940
|
-
// 1, 2, 3, 4
|
|
941
|
-
case "q":
|
|
942
|
-
return String(r);
|
|
943
|
-
// 01, 02, 03, 04
|
|
944
|
-
case "qq":
|
|
945
|
-
return x(r, 2);
|
|
946
|
-
// 1st, 2nd, 3rd, 4th
|
|
947
|
-
case "qo":
|
|
948
|
-
return n.ordinalNumber(r, { unit: "quarter" });
|
|
949
|
-
// Q1, Q2, Q3, Q4
|
|
950
|
-
case "qqq":
|
|
951
|
-
return n.quarter(r, {
|
|
952
|
-
width: "abbreviated",
|
|
953
|
-
context: "standalone"
|
|
954
|
-
});
|
|
955
|
-
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
956
|
-
case "qqqqq":
|
|
957
|
-
return n.quarter(r, {
|
|
958
|
-
width: "narrow",
|
|
959
|
-
context: "standalone"
|
|
960
|
-
});
|
|
961
|
-
// 1st quarter, 2nd quarter, ...
|
|
962
|
-
case "qqqq":
|
|
963
|
-
default:
|
|
964
|
-
return n.quarter(r, {
|
|
965
|
-
width: "wide",
|
|
966
|
-
context: "standalone"
|
|
967
|
-
});
|
|
968
|
-
}
|
|
969
|
-
},
|
|
970
|
-
// Month
|
|
971
|
-
M: function(e, t, n) {
|
|
972
|
-
const r = e.getMonth();
|
|
973
|
-
switch (t) {
|
|
974
|
-
case "M":
|
|
975
|
-
case "MM":
|
|
976
|
-
return ee.M(e, t);
|
|
977
|
-
// 1st, 2nd, ..., 12th
|
|
978
|
-
case "Mo":
|
|
979
|
-
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
980
|
-
// Jan, Feb, ..., Dec
|
|
981
|
-
case "MMM":
|
|
982
|
-
return n.month(r, {
|
|
983
|
-
width: "abbreviated",
|
|
984
|
-
context: "formatting"
|
|
985
|
-
});
|
|
986
|
-
// J, F, ..., D
|
|
987
|
-
case "MMMMM":
|
|
988
|
-
return n.month(r, {
|
|
989
|
-
width: "narrow",
|
|
990
|
-
context: "formatting"
|
|
991
|
-
});
|
|
992
|
-
// January, February, ..., December
|
|
993
|
-
case "MMMM":
|
|
994
|
-
default:
|
|
995
|
-
return n.month(r, { width: "wide", context: "formatting" });
|
|
996
|
-
}
|
|
997
|
-
},
|
|
998
|
-
// Stand-alone month
|
|
999
|
-
L: function(e, t, n) {
|
|
1000
|
-
const r = e.getMonth();
|
|
1001
|
-
switch (t) {
|
|
1002
|
-
// 1, 2, ..., 12
|
|
1003
|
-
case "L":
|
|
1004
|
-
return String(r + 1);
|
|
1005
|
-
// 01, 02, ..., 12
|
|
1006
|
-
case "LL":
|
|
1007
|
-
return x(r + 1, 2);
|
|
1008
|
-
// 1st, 2nd, ..., 12th
|
|
1009
|
-
case "Lo":
|
|
1010
|
-
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
1011
|
-
// Jan, Feb, ..., Dec
|
|
1012
|
-
case "LLL":
|
|
1013
|
-
return n.month(r, {
|
|
1014
|
-
width: "abbreviated",
|
|
1015
|
-
context: "standalone"
|
|
1016
|
-
});
|
|
1017
|
-
// J, F, ..., D
|
|
1018
|
-
case "LLLLL":
|
|
1019
|
-
return n.month(r, {
|
|
1020
|
-
width: "narrow",
|
|
1021
|
-
context: "standalone"
|
|
1022
|
-
});
|
|
1023
|
-
// January, February, ..., December
|
|
1024
|
-
case "LLLL":
|
|
1025
|
-
default:
|
|
1026
|
-
return n.month(r, { width: "wide", context: "standalone" });
|
|
1027
|
-
}
|
|
1028
|
-
},
|
|
1029
|
-
// Local week of year
|
|
1030
|
-
w: function(e, t, n, r) {
|
|
1031
|
-
const o = pt(e, r);
|
|
1032
|
-
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : x(o, t.length);
|
|
1033
|
-
},
|
|
1034
|
-
// ISO week of year
|
|
1035
|
-
I: function(e, t, n) {
|
|
1036
|
-
const r = yt(e);
|
|
1037
|
-
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : x(r, t.length);
|
|
1038
|
-
},
|
|
1039
|
-
// Day of the month
|
|
1040
|
-
d: function(e, t, n) {
|
|
1041
|
-
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : ee.d(e, t);
|
|
1042
|
-
},
|
|
1043
|
-
// Day of year
|
|
1044
|
-
D: function(e, t, n) {
|
|
1045
|
-
const r = lr(e);
|
|
1046
|
-
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : x(r, t.length);
|
|
1047
|
-
},
|
|
1048
|
-
// Day of week
|
|
1049
|
-
E: function(e, t, n) {
|
|
1050
|
-
const r = e.getDay();
|
|
1051
|
-
switch (t) {
|
|
1052
|
-
// Tue
|
|
1053
|
-
case "E":
|
|
1054
|
-
case "EE":
|
|
1055
|
-
case "EEE":
|
|
1056
|
-
return n.day(r, {
|
|
1057
|
-
width: "abbreviated",
|
|
1058
|
-
context: "formatting"
|
|
1059
|
-
});
|
|
1060
|
-
// T
|
|
1061
|
-
case "EEEEE":
|
|
1062
|
-
return n.day(r, {
|
|
1063
|
-
width: "narrow",
|
|
1064
|
-
context: "formatting"
|
|
1065
|
-
});
|
|
1066
|
-
// Tu
|
|
1067
|
-
case "EEEEEE":
|
|
1068
|
-
return n.day(r, {
|
|
1069
|
-
width: "short",
|
|
1070
|
-
context: "formatting"
|
|
1071
|
-
});
|
|
1072
|
-
// Tuesday
|
|
1073
|
-
case "EEEE":
|
|
1074
|
-
default:
|
|
1075
|
-
return n.day(r, {
|
|
1076
|
-
width: "wide",
|
|
1077
|
-
context: "formatting"
|
|
1078
|
-
});
|
|
1079
|
-
}
|
|
1080
|
-
},
|
|
1081
|
-
// Local day of week
|
|
1082
|
-
e: function(e, t, n, r) {
|
|
1083
|
-
const o = e.getDay(), s = (o - r.weekStartsOn + 8) % 7 || 7;
|
|
1084
|
-
switch (t) {
|
|
1085
|
-
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
1086
|
-
case "e":
|
|
1087
|
-
return String(s);
|
|
1088
|
-
// Padded numerical value
|
|
1089
|
-
case "ee":
|
|
1090
|
-
return x(s, 2);
|
|
1091
|
-
// 1st, 2nd, ..., 7th
|
|
1092
|
-
case "eo":
|
|
1093
|
-
return n.ordinalNumber(s, { unit: "day" });
|
|
1094
|
-
case "eee":
|
|
1095
|
-
return n.day(o, {
|
|
1096
|
-
width: "abbreviated",
|
|
1097
|
-
context: "formatting"
|
|
1098
|
-
});
|
|
1099
|
-
// T
|
|
1100
|
-
case "eeeee":
|
|
1101
|
-
return n.day(o, {
|
|
1102
|
-
width: "narrow",
|
|
1103
|
-
context: "formatting"
|
|
1104
|
-
});
|
|
1105
|
-
// Tu
|
|
1106
|
-
case "eeeeee":
|
|
1107
|
-
return n.day(o, {
|
|
1108
|
-
width: "short",
|
|
1109
|
-
context: "formatting"
|
|
1110
|
-
});
|
|
1111
|
-
// Tuesday
|
|
1112
|
-
case "eeee":
|
|
1113
|
-
default:
|
|
1114
|
-
return n.day(o, {
|
|
1115
|
-
width: "wide",
|
|
1116
|
-
context: "formatting"
|
|
1117
|
-
});
|
|
1118
|
-
}
|
|
1119
|
-
},
|
|
1120
|
-
// Stand-alone local day of week
|
|
1121
|
-
c: function(e, t, n, r) {
|
|
1122
|
-
const o = e.getDay(), s = (o - r.weekStartsOn + 8) % 7 || 7;
|
|
1123
|
-
switch (t) {
|
|
1124
|
-
// Numerical value (same as in `e`)
|
|
1125
|
-
case "c":
|
|
1126
|
-
return String(s);
|
|
1127
|
-
// Padded numerical value
|
|
1128
|
-
case "cc":
|
|
1129
|
-
return x(s, t.length);
|
|
1130
|
-
// 1st, 2nd, ..., 7th
|
|
1131
|
-
case "co":
|
|
1132
|
-
return n.ordinalNumber(s, { unit: "day" });
|
|
1133
|
-
case "ccc":
|
|
1134
|
-
return n.day(o, {
|
|
1135
|
-
width: "abbreviated",
|
|
1136
|
-
context: "standalone"
|
|
1137
|
-
});
|
|
1138
|
-
// T
|
|
1139
|
-
case "ccccc":
|
|
1140
|
-
return n.day(o, {
|
|
1141
|
-
width: "narrow",
|
|
1142
|
-
context: "standalone"
|
|
1143
|
-
});
|
|
1144
|
-
// Tu
|
|
1145
|
-
case "cccccc":
|
|
1146
|
-
return n.day(o, {
|
|
1147
|
-
width: "short",
|
|
1148
|
-
context: "standalone"
|
|
1149
|
-
});
|
|
1150
|
-
// Tuesday
|
|
1151
|
-
case "cccc":
|
|
1152
|
-
default:
|
|
1153
|
-
return n.day(o, {
|
|
1154
|
-
width: "wide",
|
|
1155
|
-
context: "standalone"
|
|
1156
|
-
});
|
|
1157
|
-
}
|
|
1158
|
-
},
|
|
1159
|
-
// ISO day of week
|
|
1160
|
-
i: function(e, t, n) {
|
|
1161
|
-
const r = e.getDay(), o = r === 0 ? 7 : r;
|
|
1162
|
-
switch (t) {
|
|
1163
|
-
// 2
|
|
1164
|
-
case "i":
|
|
1165
|
-
return String(o);
|
|
1166
|
-
// 02
|
|
1167
|
-
case "ii":
|
|
1168
|
-
return x(o, t.length);
|
|
1169
|
-
// 2nd
|
|
1170
|
-
case "io":
|
|
1171
|
-
return n.ordinalNumber(o, { unit: "day" });
|
|
1172
|
-
// Tue
|
|
1173
|
-
case "iii":
|
|
1174
|
-
return n.day(r, {
|
|
1175
|
-
width: "abbreviated",
|
|
1176
|
-
context: "formatting"
|
|
1177
|
-
});
|
|
1178
|
-
// T
|
|
1179
|
-
case "iiiii":
|
|
1180
|
-
return n.day(r, {
|
|
1181
|
-
width: "narrow",
|
|
1182
|
-
context: "formatting"
|
|
1183
|
-
});
|
|
1184
|
-
// Tu
|
|
1185
|
-
case "iiiiii":
|
|
1186
|
-
return n.day(r, {
|
|
1187
|
-
width: "short",
|
|
1188
|
-
context: "formatting"
|
|
1189
|
-
});
|
|
1190
|
-
// Tuesday
|
|
1191
|
-
case "iiii":
|
|
1192
|
-
default:
|
|
1193
|
-
return n.day(r, {
|
|
1194
|
-
width: "wide",
|
|
1195
|
-
context: "formatting"
|
|
1196
|
-
});
|
|
1197
|
-
}
|
|
1198
|
-
},
|
|
1199
|
-
// AM or PM
|
|
1200
|
-
a: function(e, t, n) {
|
|
1201
|
-
const o = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1202
|
-
switch (t) {
|
|
1203
|
-
case "a":
|
|
1204
|
-
case "aa":
|
|
1205
|
-
return n.dayPeriod(o, {
|
|
1206
|
-
width: "abbreviated",
|
|
1207
|
-
context: "formatting"
|
|
1208
|
-
});
|
|
1209
|
-
case "aaa":
|
|
1210
|
-
return n.dayPeriod(o, {
|
|
1211
|
-
width: "abbreviated",
|
|
1212
|
-
context: "formatting"
|
|
1213
|
-
}).toLowerCase();
|
|
1214
|
-
case "aaaaa":
|
|
1215
|
-
return n.dayPeriod(o, {
|
|
1216
|
-
width: "narrow",
|
|
1217
|
-
context: "formatting"
|
|
1218
|
-
});
|
|
1219
|
-
case "aaaa":
|
|
1220
|
-
default:
|
|
1221
|
-
return n.dayPeriod(o, {
|
|
1222
|
-
width: "wide",
|
|
1223
|
-
context: "formatting"
|
|
1224
|
-
});
|
|
1225
|
-
}
|
|
1226
|
-
},
|
|
1227
|
-
// AM, PM, midnight, noon
|
|
1228
|
-
b: function(e, t, n) {
|
|
1229
|
-
const r = e.getHours();
|
|
1230
|
-
let o;
|
|
1231
|
-
switch (r === 12 ? o = ae.noon : r === 0 ? o = ae.midnight : o = r / 12 >= 1 ? "pm" : "am", t) {
|
|
1232
|
-
case "b":
|
|
1233
|
-
case "bb":
|
|
1234
|
-
return n.dayPeriod(o, {
|
|
1235
|
-
width: "abbreviated",
|
|
1236
|
-
context: "formatting"
|
|
1237
|
-
});
|
|
1238
|
-
case "bbb":
|
|
1239
|
-
return n.dayPeriod(o, {
|
|
1240
|
-
width: "abbreviated",
|
|
1241
|
-
context: "formatting"
|
|
1242
|
-
}).toLowerCase();
|
|
1243
|
-
case "bbbbb":
|
|
1244
|
-
return n.dayPeriod(o, {
|
|
1245
|
-
width: "narrow",
|
|
1246
|
-
context: "formatting"
|
|
1247
|
-
});
|
|
1248
|
-
case "bbbb":
|
|
1249
|
-
default:
|
|
1250
|
-
return n.dayPeriod(o, {
|
|
1251
|
-
width: "wide",
|
|
1252
|
-
context: "formatting"
|
|
1253
|
-
});
|
|
1254
|
-
}
|
|
1255
|
-
},
|
|
1256
|
-
// in the morning, in the afternoon, in the evening, at night
|
|
1257
|
-
B: function(e, t, n) {
|
|
1258
|
-
const r = e.getHours();
|
|
1259
|
-
let o;
|
|
1260
|
-
switch (r >= 17 ? o = ae.evening : r >= 12 ? o = ae.afternoon : r >= 4 ? o = ae.morning : o = ae.night, t) {
|
|
1261
|
-
case "B":
|
|
1262
|
-
case "BB":
|
|
1263
|
-
case "BBB":
|
|
1264
|
-
return n.dayPeriod(o, {
|
|
1265
|
-
width: "abbreviated",
|
|
1266
|
-
context: "formatting"
|
|
1267
|
-
});
|
|
1268
|
-
case "BBBBB":
|
|
1269
|
-
return n.dayPeriod(o, {
|
|
1270
|
-
width: "narrow",
|
|
1271
|
-
context: "formatting"
|
|
1272
|
-
});
|
|
1273
|
-
case "BBBB":
|
|
1274
|
-
default:
|
|
1275
|
-
return n.dayPeriod(o, {
|
|
1276
|
-
width: "wide",
|
|
1277
|
-
context: "formatting"
|
|
1278
|
-
});
|
|
1279
|
-
}
|
|
1280
|
-
},
|
|
1281
|
-
// Hour [1-12]
|
|
1282
|
-
h: function(e, t, n) {
|
|
1283
|
-
if (t === "ho") {
|
|
1284
|
-
let r = e.getHours() % 12;
|
|
1285
|
-
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
1286
|
-
}
|
|
1287
|
-
return ee.h(e, t);
|
|
1288
|
-
},
|
|
1289
|
-
// Hour [0-23]
|
|
1290
|
-
H: function(e, t, n) {
|
|
1291
|
-
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : ee.H(e, t);
|
|
1292
|
-
},
|
|
1293
|
-
// Hour [0-11]
|
|
1294
|
-
K: function(e, t, n) {
|
|
1295
|
-
const r = e.getHours() % 12;
|
|
1296
|
-
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : x(r, t.length);
|
|
1297
|
-
},
|
|
1298
|
-
// Hour [1-24]
|
|
1299
|
-
k: function(e, t, n) {
|
|
1300
|
-
let r = e.getHours();
|
|
1301
|
-
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : x(r, t.length);
|
|
1302
|
-
},
|
|
1303
|
-
// Minute
|
|
1304
|
-
m: function(e, t, n) {
|
|
1305
|
-
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : ee.m(e, t);
|
|
1306
|
-
},
|
|
1307
|
-
// Second
|
|
1308
|
-
s: function(e, t, n) {
|
|
1309
|
-
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : ee.s(e, t);
|
|
1310
|
-
},
|
|
1311
|
-
// Fraction of second
|
|
1312
|
-
S: function(e, t) {
|
|
1313
|
-
return ee.S(e, t);
|
|
1314
|
-
},
|
|
1315
|
-
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1316
|
-
X: function(e, t, n) {
|
|
1317
|
-
const r = e.getTimezoneOffset();
|
|
1318
|
-
if (r === 0)
|
|
1319
|
-
return "Z";
|
|
1320
|
-
switch (t) {
|
|
1321
|
-
// Hours and optional minutes
|
|
1322
|
-
case "X":
|
|
1323
|
-
return Je(r);
|
|
1324
|
-
// Hours, minutes and optional seconds without `:` delimiter
|
|
1325
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1326
|
-
// so this token always has the same output as `XX`
|
|
1327
|
-
case "XXXX":
|
|
1328
|
-
case "XX":
|
|
1329
|
-
return te(r);
|
|
1330
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
1331
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1332
|
-
// so this token always has the same output as `XXX`
|
|
1333
|
-
case "XXXXX":
|
|
1334
|
-
case "XXX":
|
|
1335
|
-
// Hours and minutes with `:` delimiter
|
|
1336
|
-
default:
|
|
1337
|
-
return te(r, ":");
|
|
1338
|
-
}
|
|
1339
|
-
},
|
|
1340
|
-
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1341
|
-
x: function(e, t, n) {
|
|
1342
|
-
const r = e.getTimezoneOffset();
|
|
1343
|
-
switch (t) {
|
|
1344
|
-
// Hours and optional minutes
|
|
1345
|
-
case "x":
|
|
1346
|
-
return Je(r);
|
|
1347
|
-
// Hours, minutes and optional seconds without `:` delimiter
|
|
1348
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1349
|
-
// so this token always has the same output as `xx`
|
|
1350
|
-
case "xxxx":
|
|
1351
|
-
case "xx":
|
|
1352
|
-
return te(r);
|
|
1353
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
1354
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1355
|
-
// so this token always has the same output as `xxx`
|
|
1356
|
-
case "xxxxx":
|
|
1357
|
-
case "xxx":
|
|
1358
|
-
// Hours and minutes with `:` delimiter
|
|
1359
|
-
default:
|
|
1360
|
-
return te(r, ":");
|
|
1361
|
-
}
|
|
1362
|
-
},
|
|
1363
|
-
// Timezone (GMT)
|
|
1364
|
-
O: function(e, t, n) {
|
|
1365
|
-
const r = e.getTimezoneOffset();
|
|
1366
|
-
switch (t) {
|
|
1367
|
-
// Short
|
|
1368
|
-
case "O":
|
|
1369
|
-
case "OO":
|
|
1370
|
-
case "OOO":
|
|
1371
|
-
return "GMT" + Ke(r, ":");
|
|
1372
|
-
// Long
|
|
1373
|
-
case "OOOO":
|
|
1374
|
-
default:
|
|
1375
|
-
return "GMT" + te(r, ":");
|
|
1376
|
-
}
|
|
1377
|
-
},
|
|
1378
|
-
// Timezone (specific non-location)
|
|
1379
|
-
z: function(e, t, n) {
|
|
1380
|
-
const r = e.getTimezoneOffset();
|
|
1381
|
-
switch (t) {
|
|
1382
|
-
// Short
|
|
1383
|
-
case "z":
|
|
1384
|
-
case "zz":
|
|
1385
|
-
case "zzz":
|
|
1386
|
-
return "GMT" + Ke(r, ":");
|
|
1387
|
-
// Long
|
|
1388
|
-
case "zzzz":
|
|
1389
|
-
default:
|
|
1390
|
-
return "GMT" + te(r, ":");
|
|
1391
|
-
}
|
|
1392
|
-
},
|
|
1393
|
-
// Seconds timestamp
|
|
1394
|
-
t: function(e, t, n) {
|
|
1395
|
-
const r = Math.trunc(+e / 1e3);
|
|
1396
|
-
return x(r, t.length);
|
|
1397
|
-
},
|
|
1398
|
-
// Milliseconds timestamp
|
|
1399
|
-
T: function(e, t, n) {
|
|
1400
|
-
return x(+e, t.length);
|
|
1401
|
-
}
|
|
1402
|
-
};
|
|
1403
|
-
function Ke(e, t = "") {
|
|
1404
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), s = r % 60;
|
|
1405
|
-
return s === 0 ? n + String(o) : n + String(o) + t + x(s, 2);
|
|
1406
|
-
}
|
|
1407
|
-
function Je(e, t) {
|
|
1408
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") + x(Math.abs(e) / 60, 2) : te(e, t);
|
|
1409
|
-
}
|
|
1410
|
-
function te(e, t = "") {
|
|
1411
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = x(Math.trunc(r / 60), 2), s = x(r % 60, 2);
|
|
1412
|
-
return n + o + t + s;
|
|
1413
|
-
}
|
|
1414
|
-
const et = (e, t) => {
|
|
1415
|
-
switch (e) {
|
|
1416
|
-
case "P":
|
|
1417
|
-
return t.date({ width: "short" });
|
|
1418
|
-
case "PP":
|
|
1419
|
-
return t.date({ width: "medium" });
|
|
1420
|
-
case "PPP":
|
|
1421
|
-
return t.date({ width: "long" });
|
|
1422
|
-
case "PPPP":
|
|
1423
|
-
default:
|
|
1424
|
-
return t.date({ width: "full" });
|
|
1425
|
-
}
|
|
1426
|
-
}, wt = (e, t) => {
|
|
1427
|
-
switch (e) {
|
|
1428
|
-
case "p":
|
|
1429
|
-
return t.time({ width: "short" });
|
|
1430
|
-
case "pp":
|
|
1431
|
-
return t.time({ width: "medium" });
|
|
1432
|
-
case "ppp":
|
|
1433
|
-
return t.time({ width: "long" });
|
|
1434
|
-
case "pppp":
|
|
1435
|
-
default:
|
|
1436
|
-
return t.time({ width: "full" });
|
|
1437
|
-
}
|
|
1438
|
-
}, hr = (e, t) => {
|
|
1439
|
-
const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
|
|
1440
|
-
if (!o)
|
|
1441
|
-
return et(e, t);
|
|
1442
|
-
let s;
|
|
1443
|
-
switch (r) {
|
|
1444
|
-
case "P":
|
|
1445
|
-
s = t.dateTime({ width: "short" });
|
|
1446
|
-
break;
|
|
1447
|
-
case "PP":
|
|
1448
|
-
s = t.dateTime({ width: "medium" });
|
|
1449
|
-
break;
|
|
1450
|
-
case "PPP":
|
|
1451
|
-
s = t.dateTime({ width: "long" });
|
|
1452
|
-
break;
|
|
1453
|
-
case "PPPP":
|
|
1454
|
-
default:
|
|
1455
|
-
s = t.dateTime({ width: "full" });
|
|
1456
|
-
break;
|
|
1457
|
-
}
|
|
1458
|
-
return s.replace("{{date}}", et(r, t)).replace("{{time}}", wt(o, t));
|
|
1459
|
-
}, mr = {
|
|
1460
|
-
p: wt,
|
|
1461
|
-
P: hr
|
|
1462
|
-
}, yr = /^D+$/, gr = /^Y+$/, pr = ["D", "DD", "YY", "YYYY"];
|
|
1463
|
-
function wr(e) {
|
|
1464
|
-
return yr.test(e);
|
|
1465
|
-
}
|
|
1466
|
-
function br(e) {
|
|
1467
|
-
return gr.test(e);
|
|
1468
|
-
}
|
|
1469
|
-
function Mr(e, t, n) {
|
|
1470
|
-
const r = kr(e, t, n);
|
|
1471
|
-
if (console.warn(r), pr.includes(e)) throw new RangeError(r);
|
|
1472
|
-
}
|
|
1473
|
-
function kr(e, t, n) {
|
|
1474
|
-
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
1475
|
-
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1476
|
-
}
|
|
1477
|
-
const Dr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, vr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Or = /^'([^]*?)'?$/, Wr = /''/g, Sr = /[a-zA-Z]/;
|
|
1478
|
-
function Cr(e, t, n) {
|
|
1479
|
-
const r = ye(), o = n?.locale ?? r.locale ?? qe, s = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, a = Y(e, n?.in);
|
|
1480
|
-
if (!Wn(a))
|
|
1481
|
-
throw new RangeError("Invalid time value");
|
|
1482
|
-
let c = t.match(vr).map((l) => {
|
|
1483
|
-
const u = l[0];
|
|
1484
|
-
if (u === "p" || u === "P") {
|
|
1485
|
-
const h = mr[u];
|
|
1486
|
-
return h(l, o.formatLong);
|
|
1487
|
-
}
|
|
1488
|
-
return l;
|
|
1489
|
-
}).join("").match(Dr).map((l) => {
|
|
1490
|
-
if (l === "''")
|
|
1491
|
-
return { isToken: !1, value: "'" };
|
|
1492
|
-
const u = l[0];
|
|
1493
|
-
if (u === "'")
|
|
1494
|
-
return { isToken: !1, value: Nr(l) };
|
|
1495
|
-
if (Ve[u])
|
|
1496
|
-
return { isToken: !0, value: l };
|
|
1497
|
-
if (u.match(Sr))
|
|
1498
|
-
throw new RangeError(
|
|
1499
|
-
"Format string contains an unescaped latin alphabet character `" + u + "`"
|
|
1500
|
-
);
|
|
1501
|
-
return { isToken: !1, value: l };
|
|
1502
|
-
});
|
|
1503
|
-
o.localize.preprocessor && (c = o.localize.preprocessor(a, c));
|
|
1504
|
-
const f = {
|
|
1505
|
-
firstWeekContainsDate: s,
|
|
1506
|
-
weekStartsOn: i,
|
|
1507
|
-
locale: o
|
|
1508
|
-
};
|
|
1509
|
-
return c.map((l) => {
|
|
1510
|
-
if (!l.isToken) return l.value;
|
|
1511
|
-
const u = l.value;
|
|
1512
|
-
(!n?.useAdditionalWeekYearTokens && br(u) || !n?.useAdditionalDayOfYearTokens && wr(u)) && Mr(u, t, String(e));
|
|
1513
|
-
const h = Ve[u[0]];
|
|
1514
|
-
return h(a, u, o.localize, f);
|
|
1515
|
-
}).join("");
|
|
1516
|
-
}
|
|
1517
|
-
function Nr(e) {
|
|
1518
|
-
const t = e.match(Or);
|
|
1519
|
-
return t ? t[1].replace(Wr, "'") : e;
|
|
1520
|
-
}
|
|
1521
|
-
function xr(e, t) {
|
|
1522
|
-
const n = Y(e, t?.in), r = n.getFullYear(), o = n.getMonth(), s = F(n, 0);
|
|
1523
|
-
return s.setFullYear(r, o + 1, 0), s.setHours(0, 0, 0, 0), s.getDate();
|
|
1524
|
-
}
|
|
1525
|
-
function Yr(e, t) {
|
|
1526
|
-
return Y(e, t?.in).getMonth();
|
|
1527
|
-
}
|
|
1528
|
-
function Tr(e, t) {
|
|
1529
|
-
return Y(e, t?.in).getFullYear();
|
|
1530
|
-
}
|
|
1531
|
-
function Er(e, t) {
|
|
1532
|
-
return +Y(e) > +Y(t);
|
|
1533
|
-
}
|
|
1534
|
-
function Pr(e, t) {
|
|
1535
|
-
return +Y(e) < +Y(t);
|
|
1536
|
-
}
|
|
1537
|
-
function _r(e, t, n) {
|
|
1538
|
-
const [r, o] = ce(
|
|
1539
|
-
n?.in,
|
|
1540
|
-
e,
|
|
1541
|
-
t
|
|
1542
|
-
);
|
|
1543
|
-
return r.getFullYear() === o.getFullYear() && r.getMonth() === o.getMonth();
|
|
1544
|
-
}
|
|
1545
|
-
function Fr(e, t, n) {
|
|
1546
|
-
const [r, o] = ce(
|
|
1547
|
-
n?.in,
|
|
1548
|
-
e,
|
|
1549
|
-
t
|
|
1550
|
-
);
|
|
1551
|
-
return r.getFullYear() === o.getFullYear();
|
|
1552
|
-
}
|
|
1553
|
-
function Br(e, t, n) {
|
|
1554
|
-
const r = Y(e, n?.in), o = r.getFullYear(), s = r.getDate(), i = F(e, 0);
|
|
1555
|
-
i.setFullYear(o, t, 15), i.setHours(0, 0, 0, 0);
|
|
1556
|
-
const a = xr(i);
|
|
1557
|
-
return r.setMonth(t, Math.min(s, a)), r;
|
|
1558
|
-
}
|
|
1559
|
-
function Ir(e, t, n) {
|
|
1560
|
-
const r = Y(e, n?.in);
|
|
1561
|
-
return isNaN(+r) ? F(e, NaN) : (r.setFullYear(t), r);
|
|
1562
|
-
}
|
|
1563
|
-
const tt = 5, Hr = 4;
|
|
1564
|
-
function qr(e, t) {
|
|
1565
|
-
const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), s = t.addDays(o, tt * 7 - 1);
|
|
1566
|
-
return t.getMonth(e) === t.getMonth(s) ? tt : Hr;
|
|
1567
|
-
}
|
|
1568
|
-
function bt(e, t) {
|
|
1569
|
-
const n = t.startOfMonth(e), r = n.getDay();
|
|
1570
|
-
return r === 1 ? n : r === 0 ? t.addDays(n, -1 * 6) : t.addDays(n, -1 * (r - 1));
|
|
1571
|
-
}
|
|
1572
|
-
function Ar(e, t) {
|
|
1573
|
-
const n = bt(e, t), r = qr(e, t);
|
|
1574
|
-
return t.addDays(n, r * 7 - 1);
|
|
1575
|
-
}
|
|
1576
|
-
class Z {
|
|
1577
|
-
/**
|
|
1578
|
-
* Creates an instance of `DateLib`.
|
|
1579
|
-
*
|
|
1580
|
-
* @param options Configuration options for the date library.
|
|
1581
|
-
* @param overrides Custom overrides for the date library functions.
|
|
1582
|
-
*/
|
|
1583
|
-
constructor(t, n) {
|
|
1584
|
-
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? I.tz(this.options.timeZone) : new this.Date(), this.newDate = (r, o, s) => this.overrides?.newDate ? this.overrides.newDate(r, o, s) : this.options.timeZone ? new I(r, o, s, this.options.timeZone) : new Date(r, o, s), this.addDays = (r, o) => this.overrides?.addDays ? this.overrides.addDays(r, o) : it(r, o), this.addMonths = (r, o) => this.overrides?.addMonths ? this.overrides.addMonths(r, o) : ct(r, o), this.addWeeks = (r, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(r, o) : Mn(r, o), this.addYears = (r, o) => this.overrides?.addYears ? this.overrides.addYears(r, o) : kn(r, o), this.differenceInCalendarDays = (r, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, o) : ft(r, o), this.differenceInCalendarMonths = (r, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, o) : Sn(r, o), this.eachMonthOfInterval = (r) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : Nn(r), this.eachYearOfInterval = (r) => {
|
|
1585
|
-
const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(r) : Tn(r), s = new Set(o.map((a) => this.getYear(a)));
|
|
1586
|
-
if (s.size === o.length)
|
|
1587
|
-
return o;
|
|
1588
|
-
const i = [];
|
|
1589
|
-
return s.forEach((a) => {
|
|
1590
|
-
i.push(new Date(a, 0, 1));
|
|
1591
|
-
}), i;
|
|
1592
|
-
}, this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : Ar(r, this), this.endOfISOWeek = (r) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(r) : En(r), this.endOfMonth = (r) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(r) : Cn(r), this.endOfWeek = (r, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(r, o) : mt(r, this.options), this.endOfYear = (r) => this.overrides?.endOfYear ? this.overrides.endOfYear(r) : Yn(r), this.format = (r, o, s) => {
|
|
1593
|
-
const i = this.overrides?.format ? this.overrides.format(r, o, this.options) : Cr(r, o, this.options);
|
|
1594
|
-
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
|
|
1595
|
-
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : yt(r), this.getMonth = (r, o) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : Yr(r, this.options), this.getYear = (r, o) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : Tr(r, this.options), this.getWeek = (r, o) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : pt(r, this.options), this.isAfter = (r, o) => this.overrides?.isAfter ? this.overrides.isAfter(r, o) : Er(r, o), this.isBefore = (r, o) => this.overrides?.isBefore ? this.overrides.isBefore(r, o) : Pr(r, o), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : lt(r), this.isSameDay = (r, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, o) : On(r, o), this.isSameMonth = (r, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, o) : _r(r, o), this.isSameYear = (r, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, o) : Fr(r, o), this.max = (r) => this.overrides?.max ? this.overrides.max(r) : Dn(r), this.min = (r) => this.overrides?.min ? this.overrides.min(r) : vn(r), this.setMonth = (r, o) => this.overrides?.setMonth ? this.overrides.setMonth(r, o) : Br(r, o), this.setYear = (r, o) => this.overrides?.setYear ? this.overrides.setYear(r, o) : Ir(r, o), this.startOfBroadcastWeek = (r, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : bt(r, this), this.startOfDay = (r) => this.overrides?.startOfDay ? this.overrides.startOfDay(r) : me(r), this.startOfISOWeek = (r) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(r) : he(r), this.startOfMonth = (r) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(r) : xn(r), this.startOfWeek = (r, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(r, this.options) : ie(r, this.options), this.startOfYear = (r) => this.overrides?.startOfYear ? this.overrides.startOfYear(r) : ht(r), this.options = { locale: qe, ...t }, this.overrides = n;
|
|
1596
|
-
}
|
|
1597
|
-
/**
|
|
1598
|
-
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
1599
|
-
* digits.
|
|
1600
|
-
*
|
|
1601
|
-
* @since 9.5.0
|
|
1602
|
-
* @returns A record mapping Arabic digits to the target numerals.
|
|
1603
|
-
*/
|
|
1604
|
-
getDigitMap() {
|
|
1605
|
-
const { numerals: t = "latn" } = this.options, n = new Intl.NumberFormat("en-US", {
|
|
1606
|
-
numberingSystem: t
|
|
1607
|
-
}), r = {};
|
|
1608
|
-
for (let o = 0; o < 10; o++)
|
|
1609
|
-
r[o.toString()] = n.format(o);
|
|
1610
|
-
return r;
|
|
1611
|
-
}
|
|
1612
|
-
/**
|
|
1613
|
-
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
1614
|
-
*
|
|
1615
|
-
* @since 9.5.0
|
|
1616
|
-
* @param input The string containing Arabic digits.
|
|
1617
|
-
* @returns The string with digits replaced.
|
|
1618
|
-
*/
|
|
1619
|
-
replaceDigits(t) {
|
|
1620
|
-
const n = this.getDigitMap();
|
|
1621
|
-
return t.replace(/\d/g, (r) => n[r] || r);
|
|
1622
|
-
}
|
|
1623
|
-
/**
|
|
1624
|
-
* Formats a number using the configured numbering system.
|
|
1625
|
-
*
|
|
1626
|
-
* @since 9.5.0
|
|
1627
|
-
* @param value The number to format.
|
|
1628
|
-
* @returns The formatted number as a string.
|
|
1629
|
-
*/
|
|
1630
|
-
formatNumber(t) {
|
|
1631
|
-
return this.replaceDigits(t.toString());
|
|
1632
|
-
}
|
|
1633
|
-
/**
|
|
1634
|
-
* Returns the preferred ordering for month and year labels for the current
|
|
1635
|
-
* locale.
|
|
1636
|
-
*/
|
|
1637
|
-
getMonthYearOrder() {
|
|
1638
|
-
const t = this.options.locale?.code;
|
|
1639
|
-
return t && Z.yearFirstLocales.has(t) ? "year-first" : "month-first";
|
|
1640
|
-
}
|
|
1641
|
-
/**
|
|
1642
|
-
* Formats the month/year pair respecting locale conventions.
|
|
1643
|
-
*
|
|
1644
|
-
* @since 9.11.0
|
|
1645
|
-
*/
|
|
1646
|
-
formatMonthYear(t) {
|
|
1647
|
-
const { locale: n, timeZone: r, numerals: o } = this.options, s = n?.code;
|
|
1648
|
-
if (s && Z.yearFirstLocales.has(s))
|
|
1649
|
-
try {
|
|
1650
|
-
return new Intl.DateTimeFormat(s, {
|
|
1651
|
-
month: "long",
|
|
1652
|
-
year: "numeric",
|
|
1653
|
-
timeZone: r,
|
|
1654
|
-
numberingSystem: o
|
|
1655
|
-
}).format(t);
|
|
1656
|
-
} catch {
|
|
1657
|
-
}
|
|
1658
|
-
const i = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
1659
|
-
return this.format(t, i);
|
|
1660
|
-
}
|
|
1661
|
-
}
|
|
1662
|
-
Z.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
1663
|
-
"eu",
|
|
1664
|
-
"hu",
|
|
1665
|
-
"ja",
|
|
1666
|
-
"ja-Hira",
|
|
1667
|
-
"ja-JP",
|
|
1668
|
-
"ko",
|
|
1669
|
-
"ko-KR",
|
|
1670
|
-
"lt",
|
|
1671
|
-
"lt-LT",
|
|
1672
|
-
"lv",
|
|
1673
|
-
"lv-LV",
|
|
1674
|
-
"mn",
|
|
1675
|
-
"mn-MN",
|
|
1676
|
-
"zh",
|
|
1677
|
-
"zh-CN",
|
|
1678
|
-
"zh-HK",
|
|
1679
|
-
"zh-TW"
|
|
1680
|
-
]);
|
|
1681
|
-
const U = new Z();
|
|
1682
|
-
class Mt {
|
|
1683
|
-
constructor(t, n, r = U) {
|
|
1684
|
-
this.date = t, this.displayMonth = n, this.outside = !!(n && !r.isSameMonth(t, n)), this.dateLib = r;
|
|
1685
|
-
}
|
|
1686
|
-
/**
|
|
1687
|
-
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
1688
|
-
* date and the displayed month.
|
|
1689
|
-
*
|
|
1690
|
-
* @param day The `CalendarDay` to compare with.
|
|
1691
|
-
* @returns `true` if the days are equal, otherwise `false`.
|
|
1692
|
-
*/
|
|
1693
|
-
isEqualTo(t) {
|
|
1694
|
-
return this.dateLib.isSameDay(t.date, this.date) && this.dateLib.isSameMonth(t.displayMonth, this.displayMonth);
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
class jr {
|
|
1698
|
-
constructor(t, n) {
|
|
1699
|
-
this.date = t, this.weeks = n;
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
class Rr {
|
|
1703
|
-
constructor(t, n) {
|
|
1704
|
-
this.days = n, this.weekNumber = t;
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
function Zr(e) {
|
|
1708
|
-
return d.createElement("button", { ...e });
|
|
1709
|
-
}
|
|
1710
|
-
function $r(e) {
|
|
1711
|
-
return d.createElement("span", { ...e });
|
|
1712
|
-
}
|
|
1713
|
-
function Gr(e) {
|
|
1714
|
-
const { size: t = 24, orientation: n = "left", className: r } = e;
|
|
1715
|
-
return (
|
|
1716
|
-
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
1717
|
-
d.createElement(
|
|
1718
|
-
"svg",
|
|
1719
|
-
{ className: r, width: t, height: t, viewBox: "0 0 24 24" },
|
|
1720
|
-
n === "up" && d.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
1721
|
-
n === "down" && d.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
1722
|
-
n === "left" && d.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
1723
|
-
n === "right" && d.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
1724
|
-
)
|
|
1725
|
-
);
|
|
1726
|
-
}
|
|
1727
|
-
function zr(e) {
|
|
1728
|
-
const { day: t, modifiers: n, ...r } = e;
|
|
1729
|
-
return d.createElement("td", { ...r });
|
|
1730
|
-
}
|
|
1731
|
-
function Lr(e) {
|
|
1732
|
-
const { day: t, modifiers: n, ...r } = e, o = d.useRef(null);
|
|
1733
|
-
return d.useEffect(() => {
|
|
1734
|
-
n.focused && o.current?.focus();
|
|
1735
|
-
}, [n.focused]), d.createElement("button", { ref: o, ...r });
|
|
1736
|
-
}
|
|
1737
|
-
var m;
|
|
1738
|
-
(function(e) {
|
|
1739
|
-
e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown";
|
|
1740
|
-
})(m || (m = {}));
|
|
1741
|
-
var _;
|
|
1742
|
-
(function(e) {
|
|
1743
|
-
e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
|
|
1744
|
-
})(_ || (_ = {}));
|
|
1745
|
-
var L;
|
|
1746
|
-
(function(e) {
|
|
1747
|
-
e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
|
|
1748
|
-
})(L || (L = {}));
|
|
1749
|
-
var R;
|
|
1750
|
-
(function(e) {
|
|
1751
|
-
e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
|
|
1752
|
-
})(R || (R = {}));
|
|
1753
|
-
function Qr(e) {
|
|
1754
|
-
const { options: t, className: n, components: r, classNames: o, ...s } = e, i = [o[m.Dropdown], n].join(" "), a = t?.find(({ value: c }) => c === s.value);
|
|
1755
|
-
return d.createElement(
|
|
1756
|
-
"span",
|
|
1757
|
-
{ "data-disabled": s.disabled, className: o[m.DropdownRoot] },
|
|
1758
|
-
d.createElement(r.Select, { className: i, ...s }, t?.map(({ value: c, label: f, disabled: l }) => d.createElement(r.Option, { key: c, value: c, disabled: l }, f))),
|
|
1759
|
-
d.createElement(
|
|
1760
|
-
"span",
|
|
1761
|
-
{ className: o[m.CaptionLabel], "aria-hidden": !0 },
|
|
1762
|
-
a?.label,
|
|
1763
|
-
d.createElement(r.Chevron, { orientation: "down", size: 18, className: o[m.Chevron] })
|
|
1764
|
-
)
|
|
1765
|
-
);
|
|
1766
|
-
}
|
|
1767
|
-
function Xr(e) {
|
|
1768
|
-
return d.createElement("div", { ...e });
|
|
1769
|
-
}
|
|
1770
|
-
function Ur(e) {
|
|
1771
|
-
return d.createElement("div", { ...e });
|
|
1772
|
-
}
|
|
1773
|
-
function Vr(e) {
|
|
1774
|
-
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
1775
|
-
return d.createElement("div", { ...r }, e.children);
|
|
1776
|
-
}
|
|
1777
|
-
function Kr(e) {
|
|
1778
|
-
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
1779
|
-
return d.createElement("div", { ...r });
|
|
1780
|
-
}
|
|
1781
|
-
function Jr(e) {
|
|
1782
|
-
return d.createElement("table", { ...e });
|
|
1783
|
-
}
|
|
1784
|
-
function eo(e) {
|
|
1785
|
-
return d.createElement("div", { ...e });
|
|
1786
|
-
}
|
|
1787
|
-
const kt = sn(void 0);
|
|
1788
|
-
function ge() {
|
|
1789
|
-
const e = an(kt);
|
|
1790
|
-
if (e === void 0)
|
|
1791
|
-
throw new Error("useDayPicker() must be used within a custom component.");
|
|
1792
|
-
return e;
|
|
1793
|
-
}
|
|
1794
|
-
function to(e) {
|
|
1795
|
-
const { components: t } = ge();
|
|
1796
|
-
return d.createElement(t.Dropdown, { ...e });
|
|
1797
|
-
}
|
|
1798
|
-
function no(e) {
|
|
1799
|
-
const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: o, ...s } = e, { components: i, classNames: a, labels: { labelPrevious: c, labelNext: f } } = ge(), l = j((h) => {
|
|
1800
|
-
o && n?.(h);
|
|
1801
|
-
}, [o, n]), u = j((h) => {
|
|
1802
|
-
r && t?.(h);
|
|
1803
|
-
}, [r, t]);
|
|
1804
|
-
return d.createElement(
|
|
1805
|
-
"nav",
|
|
1806
|
-
{ ...s },
|
|
1807
|
-
d.createElement(
|
|
1808
|
-
i.PreviousMonthButton,
|
|
1809
|
-
{ type: "button", className: a[m.PreviousMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": c(r), onClick: u },
|
|
1810
|
-
d.createElement(i.Chevron, { disabled: r ? void 0 : !0, className: a[m.Chevron], orientation: "left" })
|
|
1811
|
-
),
|
|
1812
|
-
d.createElement(
|
|
1813
|
-
i.NextMonthButton,
|
|
1814
|
-
{ type: "button", className: a[m.NextMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": f(o), onClick: l },
|
|
1815
|
-
d.createElement(i.Chevron, { disabled: o ? void 0 : !0, orientation: "right", className: a[m.Chevron] })
|
|
1816
|
-
)
|
|
1817
|
-
);
|
|
1818
|
-
}
|
|
1819
|
-
function ro(e) {
|
|
1820
|
-
const { components: t } = ge();
|
|
1821
|
-
return d.createElement(t.Button, { ...e });
|
|
1822
|
-
}
|
|
1823
|
-
function oo(e) {
|
|
1824
|
-
return d.createElement("option", { ...e });
|
|
1825
|
-
}
|
|
1826
|
-
function so(e) {
|
|
1827
|
-
const { components: t } = ge();
|
|
1828
|
-
return d.createElement(t.Button, { ...e });
|
|
1829
|
-
}
|
|
1830
|
-
function ao(e) {
|
|
1831
|
-
const { rootRef: t, ...n } = e;
|
|
1832
|
-
return d.createElement("div", { ...n, ref: t });
|
|
1833
|
-
}
|
|
1834
|
-
function io(e) {
|
|
1835
|
-
return d.createElement("select", { ...e });
|
|
1836
|
-
}
|
|
1837
|
-
function co(e) {
|
|
1838
|
-
const { week: t, ...n } = e;
|
|
1839
|
-
return d.createElement("tr", { ...n });
|
|
1840
|
-
}
|
|
1841
|
-
function uo(e) {
|
|
1842
|
-
return d.createElement("th", { ...e });
|
|
1843
|
-
}
|
|
1844
|
-
function fo(e) {
|
|
1845
|
-
return d.createElement(
|
|
1846
|
-
"thead",
|
|
1847
|
-
{ "aria-hidden": !0 },
|
|
1848
|
-
d.createElement("tr", { ...e })
|
|
1849
|
-
);
|
|
1850
|
-
}
|
|
1851
|
-
function lo(e) {
|
|
1852
|
-
const { week: t, ...n } = e;
|
|
1853
|
-
return d.createElement("th", { ...n });
|
|
1854
|
-
}
|
|
1855
|
-
function ho(e) {
|
|
1856
|
-
return d.createElement("th", { ...e });
|
|
1857
|
-
}
|
|
1858
|
-
function mo(e) {
|
|
1859
|
-
return d.createElement("tbody", { ...e });
|
|
1860
|
-
}
|
|
1861
|
-
function yo(e) {
|
|
1862
|
-
const { components: t } = ge();
|
|
1863
|
-
return d.createElement(t.Dropdown, { ...e });
|
|
1864
|
-
}
|
|
1865
|
-
const go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Button: Zr, CaptionLabel: $r, Chevron: Gr, Day: zr, DayButton: Lr, Dropdown: Qr, DropdownNav: Xr, Footer: Ur, Month: Vr, MonthCaption: Kr, MonthGrid: Jr, Months: eo, MonthsDropdown: to, Nav: no, NextMonthButton: ro, Option: oo, PreviousMonthButton: so, Root: ao, Select: io, Week: co, WeekNumber: lo, WeekNumberHeader: ho, Weekday: uo, Weekdays: fo, Weeks: mo, YearsDropdown: yo }, Symbol.toStringTag, { value: "Module" }));
|
|
1866
|
-
function K(e, t, n = !1, r = U) {
|
|
1867
|
-
let { from: o, to: s } = e;
|
|
1868
|
-
const { differenceInCalendarDays: i, isSameDay: a } = r;
|
|
1869
|
-
return o && s ? (i(s, o) < 0 && ([o, s] = [s, o]), i(t, o) >= (n ? 1 : 0) && i(s, t) >= (n ? 1 : 0)) : !n && s ? a(s, t) : !n && o ? a(o, t) : !1;
|
|
1870
|
-
}
|
|
1871
|
-
function Dt(e) {
|
|
1872
|
-
return !!(e && typeof e == "object" && "before" in e && "after" in e);
|
|
1873
|
-
}
|
|
1874
|
-
function Ae(e) {
|
|
1875
|
-
return !!(e && typeof e == "object" && "from" in e);
|
|
1876
|
-
}
|
|
1877
|
-
function vt(e) {
|
|
1878
|
-
return !!(e && typeof e == "object" && "after" in e);
|
|
1879
|
-
}
|
|
1880
|
-
function Ot(e) {
|
|
1881
|
-
return !!(e && typeof e == "object" && "before" in e);
|
|
1882
|
-
}
|
|
1883
|
-
function Wt(e) {
|
|
1884
|
-
return !!(e && typeof e == "object" && "dayOfWeek" in e);
|
|
1885
|
-
}
|
|
1886
|
-
function St(e, t) {
|
|
1887
|
-
return Array.isArray(e) && e.every(t.isDate);
|
|
1888
|
-
}
|
|
1889
|
-
function J(e, t, n = U) {
|
|
1890
|
-
const r = Array.isArray(t) ? t : [t], { isSameDay: o, differenceInCalendarDays: s, isAfter: i } = n;
|
|
1891
|
-
return r.some((a) => {
|
|
1892
|
-
if (typeof a == "boolean")
|
|
1893
|
-
return a;
|
|
1894
|
-
if (n.isDate(a))
|
|
1895
|
-
return o(e, a);
|
|
1896
|
-
if (St(a, n))
|
|
1897
|
-
return a.includes(e);
|
|
1898
|
-
if (Ae(a))
|
|
1899
|
-
return K(a, e, !1, n);
|
|
1900
|
-
if (Wt(a))
|
|
1901
|
-
return Array.isArray(a.dayOfWeek) ? a.dayOfWeek.includes(e.getDay()) : a.dayOfWeek === e.getDay();
|
|
1902
|
-
if (Dt(a)) {
|
|
1903
|
-
const c = s(a.before, e), f = s(a.after, e), l = c > 0, u = f < 0;
|
|
1904
|
-
return i(a.before, a.after) ? u && l : l || u;
|
|
1905
|
-
}
|
|
1906
|
-
return vt(a) ? s(e, a.after) > 0 : Ot(a) ? s(a.before, e) > 0 : typeof a == "function" ? a(e) : !1;
|
|
1907
|
-
});
|
|
1908
|
-
}
|
|
1909
|
-
function po(e, t, n, r, o) {
|
|
1910
|
-
const { disabled: s, hidden: i, modifiers: a, showOutsideDays: c, broadcastCalendar: f, today: l } = t, { isSameDay: u, isSameMonth: h, startOfMonth: g, isBefore: v, endOfMonth: W, isAfter: M } = o, O = n && g(n), C = r && W(r), p = {
|
|
1911
|
-
[_.focused]: [],
|
|
1912
|
-
[_.outside]: [],
|
|
1913
|
-
[_.disabled]: [],
|
|
1914
|
-
[_.hidden]: [],
|
|
1915
|
-
[_.today]: []
|
|
1916
|
-
}, T = {};
|
|
1917
|
-
for (const y of e) {
|
|
1918
|
-
const { date: k, displayMonth: b } = y, N = !!(b && !h(k, b)), B = !!(O && v(k, O)), H = !!(C && M(k, C)), q = !!(s && J(k, s, o)), $ = !!(i && J(k, i, o)) || B || H || // Broadcast calendar will show outside days as default
|
|
1919
|
-
!f && !c && N || f && c === !1 && N, re = u(k, l ?? o.today());
|
|
1920
|
-
N && p.outside.push(y), q && p.disabled.push(y), $ && p.hidden.push(y), re && p.today.push(y), a && Object.keys(a).forEach((oe) => {
|
|
1921
|
-
const se = a?.[oe];
|
|
1922
|
-
se && J(k, se, o) && (T[oe] ? T[oe].push(y) : T[oe] = [y]);
|
|
1923
|
-
});
|
|
1924
|
-
}
|
|
1925
|
-
return (y) => {
|
|
1926
|
-
const k = {
|
|
1927
|
-
[_.focused]: !1,
|
|
1928
|
-
[_.disabled]: !1,
|
|
1929
|
-
[_.hidden]: !1,
|
|
1930
|
-
[_.outside]: !1,
|
|
1931
|
-
[_.today]: !1
|
|
1932
|
-
}, b = {};
|
|
1933
|
-
for (const N in p) {
|
|
1934
|
-
const B = p[N];
|
|
1935
|
-
k[N] = B.some((H) => H === y);
|
|
1936
|
-
}
|
|
1937
|
-
for (const N in T)
|
|
1938
|
-
b[N] = T[N].some((B) => B === y);
|
|
1939
|
-
return {
|
|
1940
|
-
...k,
|
|
1941
|
-
// custom modifiers should override all the previous ones
|
|
1942
|
-
...b
|
|
1943
|
-
};
|
|
1944
|
-
};
|
|
1945
|
-
}
|
|
1946
|
-
function wo(e, t, n = {}) {
|
|
1947
|
-
return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [s]) => (n[s] ? o.push(n[s]) : t[_[s]] ? o.push(t[_[s]]) : t[L[s]] && o.push(t[L[s]]), o), [t[m.Day]]);
|
|
1948
|
-
}
|
|
1949
|
-
function bo(e) {
|
|
1950
|
-
return {
|
|
1951
|
-
...go,
|
|
1952
|
-
...e
|
|
1953
|
-
};
|
|
1954
|
-
}
|
|
1955
|
-
function Mo(e) {
|
|
1956
|
-
const t = {
|
|
1957
|
-
"data-mode": e.mode ?? void 0,
|
|
1958
|
-
"data-required": "required" in e ? e.required : void 0,
|
|
1959
|
-
"data-multiple-months": e.numberOfMonths && e.numberOfMonths > 1 || void 0,
|
|
1960
|
-
"data-week-numbers": e.showWeekNumber || void 0,
|
|
1961
|
-
"data-broadcast-calendar": e.broadcastCalendar || void 0,
|
|
1962
|
-
"data-nav-layout": e.navLayout || void 0
|
|
1963
|
-
};
|
|
1964
|
-
return Object.entries(e).forEach(([n, r]) => {
|
|
1965
|
-
n.startsWith("data-") && (t[n] = r);
|
|
1966
|
-
}), t;
|
|
1967
|
-
}
|
|
1968
|
-
function ko() {
|
|
1969
|
-
const e = {};
|
|
1970
|
-
for (const t in m)
|
|
1971
|
-
e[m[t]] = `rdp-${m[t]}`;
|
|
1972
|
-
for (const t in _)
|
|
1973
|
-
e[_[t]] = `rdp-${_[t]}`;
|
|
1974
|
-
for (const t in L)
|
|
1975
|
-
e[L[t]] = `rdp-${L[t]}`;
|
|
1976
|
-
for (const t in R)
|
|
1977
|
-
e[R[t]] = `rdp-${R[t]}`;
|
|
1978
|
-
return e;
|
|
1979
|
-
}
|
|
1980
|
-
function Ct(e, t, n) {
|
|
1981
|
-
return (n ?? new Z(t)).formatMonthYear(e);
|
|
1982
|
-
}
|
|
1983
|
-
const Do = Ct;
|
|
1984
|
-
function vo(e, t, n) {
|
|
1985
|
-
return (n ?? new Z(t)).format(e, "d");
|
|
1986
|
-
}
|
|
1987
|
-
function Oo(e, t = U) {
|
|
1988
|
-
return t.format(e, "LLLL");
|
|
1989
|
-
}
|
|
1990
|
-
function Wo(e, t, n) {
|
|
1991
|
-
return (n ?? new Z(t)).format(e, "cccccc");
|
|
1992
|
-
}
|
|
1993
|
-
function So(e, t = U) {
|
|
1994
|
-
return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
|
|
1995
|
-
}
|
|
1996
|
-
function Co() {
|
|
1997
|
-
return "";
|
|
1998
|
-
}
|
|
1999
|
-
function Nt(e, t = U) {
|
|
2000
|
-
return t.format(e, "yyyy");
|
|
2001
|
-
}
|
|
2002
|
-
const No = Nt, xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, formatCaption: Ct, formatDay: vo, formatMonthCaption: Do, formatMonthDropdown: Oo, formatWeekNumber: So, formatWeekNumberHeader: Co, formatWeekdayName: Wo, formatYearCaption: No, formatYearDropdown: Nt }, Symbol.toStringTag, { value: "Module" }));
|
|
2003
|
-
function Yo(e) {
|
|
2004
|
-
return e?.formatMonthCaption && !e.formatCaption && (e.formatCaption = e.formatMonthCaption), e?.formatYearCaption && !e.formatYearDropdown && (e.formatYearDropdown = e.formatYearCaption), {
|
|
2005
|
-
...xo,
|
|
2006
|
-
...e
|
|
2007
|
-
};
|
|
2008
|
-
}
|
|
2009
|
-
function To(e, t, n, r, o) {
|
|
2010
|
-
const { startOfMonth: s, startOfYear: i, endOfYear: a, eachMonthOfInterval: c, getMonth: f } = o;
|
|
2011
|
-
return c({
|
|
2012
|
-
start: i(e),
|
|
2013
|
-
end: a(e)
|
|
2014
|
-
}).map((h) => {
|
|
2015
|
-
const g = r.formatMonthDropdown(h, o), v = f(h), W = t && h < s(t) || n && h > s(n) || !1;
|
|
2016
|
-
return { value: v, label: g, disabled: W };
|
|
2017
|
-
});
|
|
2018
|
-
}
|
|
2019
|
-
function Eo(e, t = {}, n = {}) {
|
|
2020
|
-
let r = { ...t?.[m.Day] };
|
|
2021
|
-
return Object.entries(e).filter(([, o]) => o === !0).forEach(([o]) => {
|
|
2022
|
-
r = {
|
|
2023
|
-
...r,
|
|
2024
|
-
...n?.[o]
|
|
2025
|
-
};
|
|
2026
|
-
}), r;
|
|
2027
|
-
}
|
|
2028
|
-
function Po(e, t, n) {
|
|
2029
|
-
const r = e.today(), o = t ? e.startOfISOWeek(r) : e.startOfWeek(r), s = [];
|
|
2030
|
-
for (let i = 0; i < 7; i++) {
|
|
2031
|
-
const a = e.addDays(o, i);
|
|
2032
|
-
s.push(a);
|
|
2033
|
-
}
|
|
2034
|
-
return s;
|
|
2035
|
-
}
|
|
2036
|
-
function _o(e, t, n, r, o = !1) {
|
|
2037
|
-
if (!e || !t)
|
|
2038
|
-
return;
|
|
2039
|
-
const { startOfYear: s, endOfYear: i, eachYearOfInterval: a, getYear: c } = r, f = s(e), l = i(t), u = a({ start: f, end: l });
|
|
2040
|
-
return o && u.reverse(), u.map((h) => {
|
|
2041
|
-
const g = n.formatYearDropdown(h, r);
|
|
2042
|
-
return {
|
|
2043
|
-
value: c(h),
|
|
2044
|
-
label: g,
|
|
2045
|
-
disabled: !1
|
|
2046
|
-
};
|
|
2047
|
-
});
|
|
2048
|
-
}
|
|
2049
|
-
function xt(e, t, n, r) {
|
|
2050
|
-
let o = (r ?? new Z(n)).format(e, "PPPP");
|
|
2051
|
-
return t.today && (o = `Today, ${o}`), t.selected && (o = `${o}, selected`), o;
|
|
2052
|
-
}
|
|
2053
|
-
const Fo = xt;
|
|
2054
|
-
function Yt(e, t, n) {
|
|
2055
|
-
return (n ?? new Z(t)).formatMonthYear(e);
|
|
2056
|
-
}
|
|
2057
|
-
const Bo = Yt;
|
|
2058
|
-
function Io(e, t, n, r) {
|
|
2059
|
-
let o = (r ?? new Z(n)).format(e, "PPPP");
|
|
2060
|
-
return t?.today && (o = `Today, ${o}`), o;
|
|
2061
|
-
}
|
|
2062
|
-
function Ho(e) {
|
|
2063
|
-
return "Choose the Month";
|
|
2064
|
-
}
|
|
2065
|
-
function qo() {
|
|
2066
|
-
return "";
|
|
2067
|
-
}
|
|
2068
|
-
function Ao(e) {
|
|
2069
|
-
return "Go to the Next Month";
|
|
2070
|
-
}
|
|
2071
|
-
function jo(e) {
|
|
2072
|
-
return "Go to the Previous Month";
|
|
2073
|
-
}
|
|
2074
|
-
function Ro(e, t, n) {
|
|
2075
|
-
return (n ?? new Z(t)).format(e, "cccc");
|
|
2076
|
-
}
|
|
2077
|
-
function Zo(e, t) {
|
|
2078
|
-
return `Week ${e}`;
|
|
2079
|
-
}
|
|
2080
|
-
function $o(e) {
|
|
2081
|
-
return "Week Number";
|
|
2082
|
-
}
|
|
2083
|
-
function Go(e) {
|
|
2084
|
-
return "Choose the Year";
|
|
2085
|
-
}
|
|
2086
|
-
const zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, labelCaption: Bo, labelDay: Fo, labelDayButton: xt, labelGrid: Yt, labelGridcell: Io, labelMonthDropdown: Ho, labelNav: qo, labelNext: Ao, labelPrevious: jo, labelWeekNumber: Zo, labelWeekNumberHeader: $o, labelWeekday: Ro, labelYearDropdown: Go }, Symbol.toStringTag, { value: "Module" })), pe = (e) => e instanceof HTMLElement ? e : null, Fe = (e) => [
|
|
2087
|
-
...e.querySelectorAll("[data-animated-month]") ?? []
|
|
2088
|
-
], Lo = (e) => pe(e.querySelector("[data-animated-month]")), Be = (e) => pe(e.querySelector("[data-animated-caption]")), Ie = (e) => pe(e.querySelector("[data-animated-weeks]")), Qo = (e) => pe(e.querySelector("[data-animated-nav]")), Xo = (e) => pe(e.querySelector("[data-animated-weekdays]"));
|
|
2089
|
-
function Uo(e, t, { classNames: n, months: r, focused: o, dateLib: s }) {
|
|
2090
|
-
const i = ke(null), a = ke(r), c = ke(!1);
|
|
2091
|
-
cn(() => {
|
|
2092
|
-
const f = a.current;
|
|
2093
|
-
if (a.current = r, !t || !e.current || // safety check because the ref can be set to anything by consumers
|
|
2094
|
-
!(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
2095
|
-
r.length === 0 || f.length === 0 || r.length !== f.length)
|
|
2096
|
-
return;
|
|
2097
|
-
const l = s.isSameMonth(r[0].date, f[0].date), u = s.isAfter(r[0].date, f[0].date), h = u ? n[R.caption_after_enter] : n[R.caption_before_enter], g = u ? n[R.weeks_after_enter] : n[R.weeks_before_enter], v = i.current, W = e.current.cloneNode(!0);
|
|
2098
|
-
if (W instanceof HTMLElement ? (Fe(W).forEach((p) => {
|
|
2099
|
-
if (!(p instanceof HTMLElement))
|
|
2100
|
-
return;
|
|
2101
|
-
const T = Lo(p);
|
|
2102
|
-
T && p.contains(T) && p.removeChild(T);
|
|
2103
|
-
const y = Be(p);
|
|
2104
|
-
y && y.classList.remove(h);
|
|
2105
|
-
const k = Ie(p);
|
|
2106
|
-
k && k.classList.remove(g);
|
|
2107
|
-
}), i.current = W) : i.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
2108
|
-
o)
|
|
2109
|
-
return;
|
|
2110
|
-
const M = v instanceof HTMLElement ? Fe(v) : [], O = Fe(e.current);
|
|
2111
|
-
if (O?.every((C) => C instanceof HTMLElement) && M && M.every((C) => C instanceof HTMLElement)) {
|
|
2112
|
-
c.current = !0, e.current.style.isolation = "isolate";
|
|
2113
|
-
const C = Qo(e.current);
|
|
2114
|
-
C && (C.style.zIndex = "1"), O.forEach((p, T) => {
|
|
2115
|
-
const y = M[T];
|
|
2116
|
-
if (!y)
|
|
2117
|
-
return;
|
|
2118
|
-
p.style.position = "relative", p.style.overflow = "hidden";
|
|
2119
|
-
const k = Be(p);
|
|
2120
|
-
k && k.classList.add(h);
|
|
2121
|
-
const b = Ie(p);
|
|
2122
|
-
b && b.classList.add(g);
|
|
2123
|
-
const N = () => {
|
|
2124
|
-
c.current = !1, e.current && (e.current.style.isolation = ""), C && (C.style.zIndex = ""), k && k.classList.remove(h), b && b.classList.remove(g), p.style.position = "", p.style.overflow = "", p.contains(y) && p.removeChild(y);
|
|
2125
|
-
};
|
|
2126
|
-
y.style.pointerEvents = "none", y.style.position = "absolute", y.style.overflow = "hidden", y.setAttribute("aria-hidden", "true");
|
|
2127
|
-
const B = Xo(y);
|
|
2128
|
-
B && (B.style.opacity = "0");
|
|
2129
|
-
const H = Be(y);
|
|
2130
|
-
H && (H.classList.add(u ? n[R.caption_before_exit] : n[R.caption_after_exit]), H.addEventListener("animationend", N));
|
|
2131
|
-
const q = Ie(y);
|
|
2132
|
-
q && q.classList.add(u ? n[R.weeks_before_exit] : n[R.weeks_after_exit]), p.insertBefore(y, p.firstChild);
|
|
2133
|
-
});
|
|
2134
|
-
}
|
|
2135
|
-
});
|
|
2136
|
-
}
|
|
2137
|
-
function Vo(e, t, n, r) {
|
|
2138
|
-
const o = e[0], s = e[e.length - 1], { ISOWeek: i, fixedWeeks: a, broadcastCalendar: c } = n ?? {}, { addDays: f, differenceInCalendarDays: l, differenceInCalendarMonths: u, endOfBroadcastWeek: h, endOfISOWeek: g, endOfMonth: v, endOfWeek: W, isAfter: M, startOfBroadcastWeek: O, startOfISOWeek: C, startOfWeek: p } = r, T = c ? O(o, r) : i ? C(o) : p(o), y = c ? h(s) : i ? g(v(s)) : W(v(s)), k = l(y, T), b = u(s, o) + 1, N = [];
|
|
2139
|
-
for (let q = 0; q <= k; q++) {
|
|
2140
|
-
const $ = f(T, q);
|
|
2141
|
-
if (t && M($, t))
|
|
2142
|
-
break;
|
|
2143
|
-
N.push($);
|
|
2144
|
-
}
|
|
2145
|
-
const H = (c ? 35 : 42) * b;
|
|
2146
|
-
if (a && N.length < H) {
|
|
2147
|
-
const q = H - N.length;
|
|
2148
|
-
for (let $ = 0; $ < q; $++) {
|
|
2149
|
-
const re = f(N[N.length - 1], 1);
|
|
2150
|
-
N.push(re);
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
return N;
|
|
2154
|
-
}
|
|
2155
|
-
function Ko(e) {
|
|
2156
|
-
const t = [];
|
|
2157
|
-
return e.reduce((n, r) => {
|
|
2158
|
-
const o = r.weeks.reduce((s, i) => s.concat(i.days.slice()), t.slice());
|
|
2159
|
-
return n.concat(o.slice());
|
|
2160
|
-
}, t.slice());
|
|
2161
|
-
}
|
|
2162
|
-
function Jo(e, t, n, r) {
|
|
2163
|
-
const { numberOfMonths: o = 1 } = n, s = [];
|
|
2164
|
-
for (let i = 0; i < o; i++) {
|
|
2165
|
-
const a = r.addMonths(e, i);
|
|
2166
|
-
if (t && a > t)
|
|
2167
|
-
break;
|
|
2168
|
-
s.push(a);
|
|
2169
|
-
}
|
|
2170
|
-
return s;
|
|
2171
|
-
}
|
|
2172
|
-
function nt(e, t, n, r) {
|
|
2173
|
-
const { month: o, defaultMonth: s, today: i = r.today(), numberOfMonths: a = 1 } = e;
|
|
2174
|
-
let c = o || s || i;
|
|
2175
|
-
const { differenceInCalendarMonths: f, addMonths: l, startOfMonth: u } = r;
|
|
2176
|
-
if (n && f(n, c) < a - 1) {
|
|
2177
|
-
const h = -1 * (a - 1);
|
|
2178
|
-
c = l(n, h);
|
|
2179
|
-
}
|
|
2180
|
-
return t && f(c, t) < 0 && (c = t), u(c);
|
|
2181
|
-
}
|
|
2182
|
-
function es(e, t, n, r) {
|
|
2183
|
-
const { addDays: o, endOfBroadcastWeek: s, endOfISOWeek: i, endOfMonth: a, endOfWeek: c, getISOWeek: f, getWeek: l, startOfBroadcastWeek: u, startOfISOWeek: h, startOfWeek: g } = r, v = e.reduce((W, M) => {
|
|
2184
|
-
const O = n.broadcastCalendar ? u(M, r) : n.ISOWeek ? h(M) : g(M), C = n.broadcastCalendar ? s(M) : n.ISOWeek ? i(a(M)) : c(a(M)), p = t.filter((b) => b >= O && b <= C), T = n.broadcastCalendar ? 35 : 42;
|
|
2185
|
-
if (n.fixedWeeks && p.length < T) {
|
|
2186
|
-
const b = t.filter((N) => {
|
|
2187
|
-
const B = T - p.length;
|
|
2188
|
-
return N > C && N <= o(C, B);
|
|
2189
|
-
});
|
|
2190
|
-
p.push(...b);
|
|
2191
|
-
}
|
|
2192
|
-
const y = p.reduce((b, N) => {
|
|
2193
|
-
const B = n.ISOWeek ? f(N) : l(N), H = b.find(($) => $.weekNumber === B), q = new Mt(N, M, r);
|
|
2194
|
-
return H ? H.days.push(q) : b.push(new Rr(B, [q])), b;
|
|
2195
|
-
}, []), k = new jr(M, y);
|
|
2196
|
-
return W.push(k), W;
|
|
2197
|
-
}, []);
|
|
2198
|
-
return n.reverseMonths ? v.reverse() : v;
|
|
2199
|
-
}
|
|
2200
|
-
function ts(e, t) {
|
|
2201
|
-
let { startMonth: n, endMonth: r } = e;
|
|
2202
|
-
const { startOfYear: o, startOfDay: s, startOfMonth: i, endOfMonth: a, addYears: c, endOfYear: f, newDate: l, today: u } = t, { fromYear: h, toYear: g, fromMonth: v, toMonth: W } = e;
|
|
2203
|
-
!n && v && (n = v), !n && h && (n = t.newDate(h, 0, 1)), !r && W && (r = W), !r && g && (r = l(g, 11, 31));
|
|
2204
|
-
const M = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
2205
|
-
return n ? n = i(n) : h ? n = l(h, 0, 1) : !n && M && (n = o(c(e.today ?? u(), -100))), r ? r = a(r) : g ? r = l(g, 11, 31) : !r && M && (r = f(e.today ?? u())), [
|
|
2206
|
-
n && s(n),
|
|
2207
|
-
r && s(r)
|
|
2208
|
-
];
|
|
2209
|
-
}
|
|
2210
|
-
function ns(e, t, n, r) {
|
|
2211
|
-
if (n.disableNavigation)
|
|
2212
|
-
return;
|
|
2213
|
-
const { pagedNavigation: o, numberOfMonths: s = 1 } = n, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = r, f = o ? s : 1, l = i(e);
|
|
2214
|
-
if (!t)
|
|
2215
|
-
return a(l, f);
|
|
2216
|
-
if (!(c(t, e) < s))
|
|
2217
|
-
return a(l, f);
|
|
2218
|
-
}
|
|
2219
|
-
function rs(e, t, n, r) {
|
|
2220
|
-
if (n.disableNavigation)
|
|
2221
|
-
return;
|
|
2222
|
-
const { pagedNavigation: o, numberOfMonths: s } = n, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = r, f = o ? s ?? 1 : 1, l = i(e);
|
|
2223
|
-
if (!t)
|
|
2224
|
-
return a(l, -f);
|
|
2225
|
-
if (!(c(l, t) <= 0))
|
|
2226
|
-
return a(l, -f);
|
|
2227
|
-
}
|
|
2228
|
-
function os(e) {
|
|
2229
|
-
const t = [];
|
|
2230
|
-
return e.reduce((n, r) => n.concat(r.weeks.slice()), t.slice());
|
|
2231
|
-
}
|
|
2232
|
-
function ve(e, t) {
|
|
2233
|
-
const [n, r] = De(e);
|
|
2234
|
-
return [t === void 0 ? n : t, r];
|
|
2235
|
-
}
|
|
2236
|
-
function ss(e, t) {
|
|
2237
|
-
const [n, r] = ts(e, t), { startOfMonth: o, endOfMonth: s } = t, i = nt(e, n, r, t), [a, c] = ve(
|
|
2238
|
-
i,
|
|
2239
|
-
// initialMonth is always computed from props.month if provided
|
|
2240
|
-
e.month ? i : void 0
|
|
2241
|
-
);
|
|
2242
|
-
un(() => {
|
|
2243
|
-
const k = nt(e, n, r, t);
|
|
2244
|
-
c(k);
|
|
2245
|
-
}, [e.timeZone]);
|
|
2246
|
-
const f = Jo(a, r, e, t), l = Vo(f, e.endMonth ? s(e.endMonth) : void 0, e, t), u = es(f, l, e, t), h = os(u), g = Ko(u), v = rs(a, n, e, t), W = ns(a, r, e, t), { disableNavigation: M, onMonthChange: O } = e, C = (k) => h.some((b) => b.days.some((N) => N.isEqualTo(k))), p = (k) => {
|
|
2247
|
-
if (M)
|
|
2248
|
-
return;
|
|
2249
|
-
let b = o(k);
|
|
2250
|
-
n && b < o(n) && (b = o(n)), r && b > o(r) && (b = o(r)), c(b), O?.(b);
|
|
2251
|
-
};
|
|
2252
|
-
return {
|
|
2253
|
-
months: u,
|
|
2254
|
-
weeks: h,
|
|
2255
|
-
days: g,
|
|
2256
|
-
navStart: n,
|
|
2257
|
-
navEnd: r,
|
|
2258
|
-
previousMonth: v,
|
|
2259
|
-
nextMonth: W,
|
|
2260
|
-
goToMonth: p,
|
|
2261
|
-
goToDay: (k) => {
|
|
2262
|
-
C(k) || p(k.date);
|
|
2263
|
-
}
|
|
2264
|
-
};
|
|
2265
|
-
}
|
|
2266
|
-
var Q;
|
|
2267
|
-
(function(e) {
|
|
2268
|
-
e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
|
|
2269
|
-
})(Q || (Q = {}));
|
|
2270
|
-
function rt(e) {
|
|
2271
|
-
return !e[_.disabled] && !e[_.hidden] && !e[_.outside];
|
|
2272
|
-
}
|
|
2273
|
-
function as(e, t, n, r) {
|
|
2274
|
-
let o, s = -1;
|
|
2275
|
-
for (const i of e) {
|
|
2276
|
-
const a = t(i);
|
|
2277
|
-
rt(a) && (a[_.focused] && s < Q.FocusedModifier ? (o = i, s = Q.FocusedModifier) : r?.isEqualTo(i) && s < Q.LastFocused ? (o = i, s = Q.LastFocused) : n(i.date) && s < Q.Selected ? (o = i, s = Q.Selected) : a[_.today] && s < Q.Today && (o = i, s = Q.Today));
|
|
2278
|
-
}
|
|
2279
|
-
return o || (o = e.find((i) => rt(t(i)))), o;
|
|
2280
|
-
}
|
|
2281
|
-
function is(e, t, n, r, o, s, i) {
|
|
2282
|
-
const { ISOWeek: a, broadcastCalendar: c } = s, { addDays: f, addMonths: l, addWeeks: u, addYears: h, endOfBroadcastWeek: g, endOfISOWeek: v, endOfWeek: W, max: M, min: O, startOfBroadcastWeek: C, startOfISOWeek: p, startOfWeek: T } = i;
|
|
2283
|
-
let k = {
|
|
2284
|
-
day: f,
|
|
2285
|
-
week: u,
|
|
2286
|
-
month: l,
|
|
2287
|
-
year: h,
|
|
2288
|
-
startOfWeek: (b) => c ? C(b, i) : a ? p(b) : T(b),
|
|
2289
|
-
endOfWeek: (b) => c ? g(b) : a ? v(b) : W(b)
|
|
2290
|
-
}[e](n, t === "after" ? 1 : -1);
|
|
2291
|
-
return t === "before" && r ? k = M([r, k]) : t === "after" && o && (k = O([o, k])), k;
|
|
2292
|
-
}
|
|
2293
|
-
function Tt(e, t, n, r, o, s, i, a = 0) {
|
|
2294
|
-
if (a > 365)
|
|
2295
|
-
return;
|
|
2296
|
-
const c = is(e, t, n.date, r, o, s, i), f = !!(s.disabled && J(c, s.disabled, i)), l = !!(s.hidden && J(c, s.hidden, i)), u = c, h = new Mt(c, u, i);
|
|
2297
|
-
return !f && !l ? h : Tt(e, t, h, r, o, s, i, a + 1);
|
|
2298
|
-
}
|
|
2299
|
-
function cs(e, t, n, r, o) {
|
|
2300
|
-
const { autoFocus: s } = e, [i, a] = De(), c = as(t.days, n, r || (() => !1), i), [f, l] = De(s ? c : void 0);
|
|
2301
|
-
return {
|
|
2302
|
-
isFocusTarget: (W) => !!c?.isEqualTo(W),
|
|
2303
|
-
setFocused: l,
|
|
2304
|
-
focused: f,
|
|
2305
|
-
blur: () => {
|
|
2306
|
-
a(f), l(void 0);
|
|
2307
|
-
},
|
|
2308
|
-
moveFocus: (W, M) => {
|
|
2309
|
-
if (!f)
|
|
2310
|
-
return;
|
|
2311
|
-
const O = Tt(W, M, f, t.navStart, t.navEnd, e, o);
|
|
2312
|
-
O && (e.disableNavigation && !t.days.some((p) => p.isEqualTo(O)) || (t.goToDay(O), l(O)));
|
|
2313
|
-
}
|
|
2314
|
-
};
|
|
2315
|
-
}
|
|
2316
|
-
function us(e, t) {
|
|
2317
|
-
const { selected: n, required: r, onSelect: o } = e, [s, i] = ve(n, o ? n : void 0), a = o ? n : s, { isSameDay: c } = t, f = (g) => a?.some((v) => c(v, g)) ?? !1, { min: l, max: u } = e;
|
|
2318
|
-
return {
|
|
2319
|
-
selected: a,
|
|
2320
|
-
select: (g, v, W) => {
|
|
2321
|
-
let M = [...a ?? []];
|
|
2322
|
-
if (f(g)) {
|
|
2323
|
-
if (a?.length === l || r && a?.length === 1)
|
|
2324
|
-
return;
|
|
2325
|
-
M = a?.filter((O) => !c(O, g));
|
|
2326
|
-
} else
|
|
2327
|
-
a?.length === u ? M = [g] : M = [...M, g];
|
|
2328
|
-
return o || i(M), o?.(M, g, v, W), M;
|
|
2329
|
-
},
|
|
2330
|
-
isSelected: f
|
|
2331
|
-
};
|
|
2332
|
-
}
|
|
2333
|
-
function fs(e, t, n = 0, r = 0, o = !1, s = U) {
|
|
2334
|
-
const { from: i, to: a } = t || {}, { isSameDay: c, isAfter: f, isBefore: l } = s;
|
|
2335
|
-
let u;
|
|
2336
|
-
if (!i && !a)
|
|
2337
|
-
u = { from: e, to: n > 0 ? void 0 : e };
|
|
2338
|
-
else if (i && !a)
|
|
2339
|
-
c(i, e) ? n === 0 ? u = { from: i, to: e } : o ? u = { from: i, to: void 0 } : u = void 0 : l(e, i) ? u = { from: e, to: i } : u = { from: i, to: e };
|
|
2340
|
-
else if (i && a)
|
|
2341
|
-
if (c(i, e) && c(a, e))
|
|
2342
|
-
o ? u = { from: i, to: a } : u = void 0;
|
|
2343
|
-
else if (c(i, e))
|
|
2344
|
-
u = { from: i, to: n > 0 ? void 0 : e };
|
|
2345
|
-
else if (c(a, e))
|
|
2346
|
-
u = { from: e, to: n > 0 ? void 0 : e };
|
|
2347
|
-
else if (l(e, i))
|
|
2348
|
-
u = { from: e, to: a };
|
|
2349
|
-
else if (f(e, i))
|
|
2350
|
-
u = { from: i, to: e };
|
|
2351
|
-
else if (f(e, a))
|
|
2352
|
-
u = { from: i, to: e };
|
|
2353
|
-
else
|
|
2354
|
-
throw new Error("Invalid range");
|
|
2355
|
-
if (u?.from && u?.to) {
|
|
2356
|
-
const h = s.differenceInCalendarDays(u.to, u.from);
|
|
2357
|
-
r > 0 && h > r ? u = { from: e, to: void 0 } : n > 1 && h < n && (u = { from: e, to: void 0 });
|
|
2358
|
-
}
|
|
2359
|
-
return u;
|
|
2360
|
-
}
|
|
2361
|
-
function ls(e, t, n = U) {
|
|
2362
|
-
const r = Array.isArray(t) ? t : [t];
|
|
2363
|
-
let o = e.from;
|
|
2364
|
-
const s = n.differenceInCalendarDays(e.to, e.from), i = Math.min(s, 6);
|
|
2365
|
-
for (let a = 0; a <= i; a++) {
|
|
2366
|
-
if (r.includes(o.getDay()))
|
|
2367
|
-
return !0;
|
|
2368
|
-
o = n.addDays(o, 1);
|
|
2369
|
-
}
|
|
2370
|
-
return !1;
|
|
2371
|
-
}
|
|
2372
|
-
function ot(e, t, n = U) {
|
|
2373
|
-
return K(e, t.from, !1, n) || K(e, t.to, !1, n) || K(t, e.from, !1, n) || K(t, e.to, !1, n);
|
|
2374
|
-
}
|
|
2375
|
-
function ds(e, t, n = U) {
|
|
2376
|
-
const r = Array.isArray(t) ? t : [t];
|
|
2377
|
-
if (r.filter((a) => typeof a != "function").some((a) => typeof a == "boolean" ? a : n.isDate(a) ? K(e, a, !1, n) : St(a, n) ? a.some((c) => K(e, c, !1, n)) : Ae(a) ? a.from && a.to ? ot(e, { from: a.from, to: a.to }, n) : !1 : Wt(a) ? ls(e, a.dayOfWeek, n) : Dt(a) ? n.isAfter(a.before, a.after) ? ot(e, {
|
|
2378
|
-
from: n.addDays(a.after, 1),
|
|
2379
|
-
to: n.addDays(a.before, -1)
|
|
2380
|
-
}, n) : J(e.from, a, n) || J(e.to, a, n) : vt(a) || Ot(a) ? J(e.from, a, n) || J(e.to, a, n) : !1))
|
|
2381
|
-
return !0;
|
|
2382
|
-
const i = r.filter((a) => typeof a == "function");
|
|
2383
|
-
if (i.length) {
|
|
2384
|
-
let a = e.from;
|
|
2385
|
-
const c = n.differenceInCalendarDays(e.to, e.from);
|
|
2386
|
-
for (let f = 0; f <= c; f++) {
|
|
2387
|
-
if (i.some((l) => l(a)))
|
|
2388
|
-
return !0;
|
|
2389
|
-
a = n.addDays(a, 1);
|
|
2390
|
-
}
|
|
2391
|
-
}
|
|
2392
|
-
return !1;
|
|
2393
|
-
}
|
|
2394
|
-
function hs(e, t) {
|
|
2395
|
-
const { disabled: n, excludeDisabled: r, selected: o, required: s, onSelect: i } = e, [a, c] = ve(o, i ? o : void 0), f = i ? o : a;
|
|
2396
|
-
return {
|
|
2397
|
-
selected: f,
|
|
2398
|
-
select: (h, g, v) => {
|
|
2399
|
-
const { min: W, max: M } = e, O = h ? fs(h, f, W, M, s, t) : void 0;
|
|
2400
|
-
return r && n && O?.from && O.to && ds({ from: O.from, to: O.to }, n, t) && (O.from = h, O.to = void 0), i || c(O), i?.(O, h, g, v), O;
|
|
2401
|
-
},
|
|
2402
|
-
isSelected: (h) => f && K(f, h, !1, t)
|
|
2403
|
-
};
|
|
2404
|
-
}
|
|
2405
|
-
function ms(e, t) {
|
|
2406
|
-
const { selected: n, required: r, onSelect: o } = e, [s, i] = ve(n, o ? n : void 0), a = o ? n : s, { isSameDay: c } = t;
|
|
2407
|
-
return {
|
|
2408
|
-
selected: a,
|
|
2409
|
-
select: (u, h, g) => {
|
|
2410
|
-
let v = u;
|
|
2411
|
-
return !r && a && a && c(u, a) && (v = void 0), o || i(v), o?.(v, u, h, g), v;
|
|
2412
|
-
},
|
|
2413
|
-
isSelected: (u) => a ? c(a, u) : !1
|
|
2414
|
-
};
|
|
2415
|
-
}
|
|
2416
|
-
function ys(e, t) {
|
|
2417
|
-
const n = ms(e, t), r = us(e, t), o = hs(e, t);
|
|
2418
|
-
switch (e.mode) {
|
|
2419
|
-
case "single":
|
|
2420
|
-
return n;
|
|
2421
|
-
case "multiple":
|
|
2422
|
-
return r;
|
|
2423
|
-
case "range":
|
|
2424
|
-
return o;
|
|
2425
|
-
default:
|
|
2426
|
-
return;
|
|
2427
|
-
}
|
|
2428
|
-
}
|
|
2429
|
-
function gs(e) {
|
|
2430
|
-
let t = e;
|
|
2431
|
-
t.timeZone && (t = {
|
|
2432
|
-
...e
|
|
2433
|
-
}, t.today && (t.today = new I(t.today, t.timeZone)), t.month && (t.month = new I(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new I(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new I(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new I(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new I(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((D) => new I(D, t.timeZone)) : t.mode === "range" && t.selected && (t.selected = {
|
|
2434
|
-
from: t.selected.from ? new I(t.selected.from, t.timeZone) : void 0,
|
|
2435
|
-
to: t.selected.to ? new I(t.selected.to, t.timeZone) : void 0
|
|
2436
|
-
}));
|
|
2437
|
-
const { components: n, formatters: r, labels: o, dateLib: s, locale: i, classNames: a } = Pe(() => {
|
|
2438
|
-
const D = { ...qe, ...t.locale };
|
|
2439
|
-
return {
|
|
2440
|
-
dateLib: new Z({
|
|
2441
|
-
locale: D,
|
|
2442
|
-
weekStartsOn: t.broadcastCalendar ? 1 : t.weekStartsOn,
|
|
2443
|
-
firstWeekContainsDate: t.firstWeekContainsDate,
|
|
2444
|
-
useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
|
|
2445
|
-
useAdditionalDayOfYearTokens: t.useAdditionalDayOfYearTokens,
|
|
2446
|
-
timeZone: t.timeZone,
|
|
2447
|
-
numerals: t.numerals
|
|
2448
|
-
}, t.dateLib),
|
|
2449
|
-
components: bo(t.components),
|
|
2450
|
-
formatters: Yo(t.formatters),
|
|
2451
|
-
labels: { ...zo, ...t.labels },
|
|
2452
|
-
locale: D,
|
|
2453
|
-
classNames: { ...ko(), ...t.classNames }
|
|
2454
|
-
};
|
|
2455
|
-
}, [
|
|
2456
|
-
t.locale,
|
|
2457
|
-
t.broadcastCalendar,
|
|
2458
|
-
t.weekStartsOn,
|
|
2459
|
-
t.firstWeekContainsDate,
|
|
2460
|
-
t.useAdditionalWeekYearTokens,
|
|
2461
|
-
t.useAdditionalDayOfYearTokens,
|
|
2462
|
-
t.timeZone,
|
|
2463
|
-
t.numerals,
|
|
2464
|
-
t.dateLib,
|
|
2465
|
-
t.components,
|
|
2466
|
-
t.formatters,
|
|
2467
|
-
t.labels,
|
|
2468
|
-
t.classNames
|
|
2469
|
-
]), { captionLayout: c, mode: f, navLayout: l, numberOfMonths: u = 1, onDayBlur: h, onDayClick: g, onDayFocus: v, onDayKeyDown: W, onDayMouseEnter: M, onDayMouseLeave: O, onNextClick: C, onPrevClick: p, showWeekNumber: T, styles: y } = t, { formatCaption: k, formatDay: b, formatMonthDropdown: N, formatWeekNumber: B, formatWeekNumberHeader: H, formatWeekdayName: q, formatYearDropdown: $ } = r, re = ss(t, s), { days: oe, months: se, navStart: we, navEnd: Oe, previousMonth: G, nextMonth: z, goToMonth: V } = re, We = po(oe, t, we, Oe, s), { isSelected: Se, select: Ce, selected: be } = ys(t, s) ?? {}, { blur: je, focused: Re, isFocusTarget: Et, moveFocus: Ze, setFocused: Me } = cs(t, re, We, Se ?? (() => !1), s), { labelDayButton: Pt, labelGridcell: _t, labelGrid: Ft, labelMonthDropdown: Bt, labelNav: $e, labelPrevious: It, labelNext: Ht, labelWeekday: qt, labelWeekNumber: At, labelWeekNumberHeader: jt, labelYearDropdown: Rt } = o, Zt = Pe(() => Po(s, t.ISOWeek), [s, t.ISOWeek]), Ge = f !== void 0 || g !== void 0, Ne = j(() => {
|
|
2470
|
-
G && (V(G), p?.(G));
|
|
2471
|
-
}, [G, V, p]), xe = j(() => {
|
|
2472
|
-
z && (V(z), C?.(z));
|
|
2473
|
-
}, [V, z, C]), $t = j((D, P) => (w) => {
|
|
2474
|
-
w.preventDefault(), w.stopPropagation(), Me(D), Ce?.(D.date, P, w), g?.(D.date, P, w);
|
|
2475
|
-
}, [Ce, g, Me]), Gt = j((D, P) => (w) => {
|
|
2476
|
-
Me(D), v?.(D.date, P, w);
|
|
2477
|
-
}, [v, Me]), zt = j((D, P) => (w) => {
|
|
2478
|
-
je(), h?.(D.date, P, w);
|
|
2479
|
-
}, [je, h]), Lt = j((D, P) => (w) => {
|
|
2480
|
-
const E = {
|
|
2481
|
-
ArrowLeft: [
|
|
2482
|
-
w.shiftKey ? "month" : "day",
|
|
2483
|
-
t.dir === "rtl" ? "after" : "before"
|
|
2484
|
-
],
|
|
2485
|
-
ArrowRight: [
|
|
2486
|
-
w.shiftKey ? "month" : "day",
|
|
2487
|
-
t.dir === "rtl" ? "before" : "after"
|
|
2488
|
-
],
|
|
2489
|
-
ArrowDown: [w.shiftKey ? "year" : "week", "after"],
|
|
2490
|
-
ArrowUp: [w.shiftKey ? "year" : "week", "before"],
|
|
2491
|
-
PageUp: [w.shiftKey ? "year" : "month", "before"],
|
|
2492
|
-
PageDown: [w.shiftKey ? "year" : "month", "after"],
|
|
2493
|
-
Home: ["startOfWeek", "before"],
|
|
2494
|
-
End: ["endOfWeek", "after"]
|
|
2495
|
-
};
|
|
2496
|
-
if (E[w.key]) {
|
|
2497
|
-
w.preventDefault(), w.stopPropagation();
|
|
2498
|
-
const [A, S] = E[w.key];
|
|
2499
|
-
Ze(A, S);
|
|
2500
|
-
}
|
|
2501
|
-
W?.(D.date, P, w);
|
|
2502
|
-
}, [Ze, W, t.dir]), Qt = j((D, P) => (w) => {
|
|
2503
|
-
M?.(D.date, P, w);
|
|
2504
|
-
}, [M]), Xt = j((D, P) => (w) => {
|
|
2505
|
-
O?.(D.date, P, w);
|
|
2506
|
-
}, [O]), Ut = j((D) => (P) => {
|
|
2507
|
-
const w = Number(P.target.value), E = s.setMonth(s.startOfMonth(D), w);
|
|
2508
|
-
V(E);
|
|
2509
|
-
}, [s, V]), Vt = j((D) => (P) => {
|
|
2510
|
-
const w = Number(P.target.value), E = s.setYear(s.startOfMonth(D), w);
|
|
2511
|
-
V(E);
|
|
2512
|
-
}, [s, V]), { className: Kt, style: Jt } = Pe(() => ({
|
|
2513
|
-
className: [a[m.Root], t.className].filter(Boolean).join(" "),
|
|
2514
|
-
style: { ...y?.[m.Root], ...t.style }
|
|
2515
|
-
}), [a, t.className, t.style, y]), en = Mo(t), ze = ke(null);
|
|
2516
|
-
Uo(ze, !!t.animate, {
|
|
2517
|
-
classNames: a,
|
|
2518
|
-
months: se,
|
|
2519
|
-
focused: Re,
|
|
2520
|
-
dateLib: s
|
|
2521
|
-
});
|
|
2522
|
-
const tn = {
|
|
2523
|
-
dayPickerProps: t,
|
|
2524
|
-
selected: be,
|
|
2525
|
-
select: Ce,
|
|
2526
|
-
isSelected: Se,
|
|
2527
|
-
months: se,
|
|
2528
|
-
nextMonth: z,
|
|
2529
|
-
previousMonth: G,
|
|
2530
|
-
goToMonth: V,
|
|
2531
|
-
getModifiers: We,
|
|
2532
|
-
components: n,
|
|
2533
|
-
classNames: a,
|
|
2534
|
-
styles: y,
|
|
2535
|
-
labels: o,
|
|
2536
|
-
formatters: r
|
|
2537
|
-
};
|
|
2538
|
-
return d.createElement(
|
|
2539
|
-
kt.Provider,
|
|
2540
|
-
{ value: tn },
|
|
2541
|
-
d.createElement(
|
|
2542
|
-
n.Root,
|
|
2543
|
-
{ rootRef: t.animate ? ze : void 0, className: Kt, style: Jt, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...en },
|
|
2544
|
-
d.createElement(
|
|
2545
|
-
n.Months,
|
|
2546
|
-
{ className: a[m.Months], style: y?.[m.Months] },
|
|
2547
|
-
!t.hideNavigation && !l && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: a[m.Nav], style: y?.[m.Nav], "aria-label": $e(), onPreviousClick: Ne, onNextClick: xe, previousMonth: G, nextMonth: z }),
|
|
2548
|
-
se.map((D, P) => d.createElement(
|
|
2549
|
-
n.Month,
|
|
2550
|
-
{
|
|
2551
|
-
"data-animated-month": t.animate ? "true" : void 0,
|
|
2552
|
-
className: a[m.Month],
|
|
2553
|
-
style: y?.[m.Month],
|
|
2554
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
2555
|
-
key: P,
|
|
2556
|
-
displayIndex: P,
|
|
2557
|
-
calendarMonth: D
|
|
2558
|
-
},
|
|
2559
|
-
l === "around" && !t.hideNavigation && P === 0 && d.createElement(
|
|
2560
|
-
n.PreviousMonthButton,
|
|
2561
|
-
{ type: "button", className: a[m.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": It(G), onClick: Ne, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2562
|
-
d.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: a[m.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
|
|
2563
|
-
),
|
|
2564
|
-
d.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: a[m.MonthCaption], style: y?.[m.MonthCaption], calendarMonth: D, displayIndex: P }, c?.startsWith("dropdown") ? d.createElement(
|
|
2565
|
-
n.DropdownNav,
|
|
2566
|
-
{ className: a[m.Dropdowns], style: y?.[m.Dropdowns] },
|
|
2567
|
-
(() => {
|
|
2568
|
-
const w = c === "dropdown" || c === "dropdown-months" ? d.createElement(n.MonthsDropdown, { key: "month", className: a[m.MonthsDropdown], "aria-label": Bt(), classNames: a, components: n, disabled: !!t.disableNavigation, onChange: Ut(D.date), options: To(D.date, we, Oe, r, s), style: y?.[m.Dropdown], value: s.getMonth(D.date) }) : d.createElement("span", { key: "month" }, N(D.date, s)), E = c === "dropdown" || c === "dropdown-years" ? d.createElement(n.YearsDropdown, { key: "year", className: a[m.YearsDropdown], "aria-label": Rt(s.options), classNames: a, components: n, disabled: !!t.disableNavigation, onChange: Vt(D.date), options: _o(we, Oe, r, s, !!t.reverseYears), style: y?.[m.Dropdown], value: s.getYear(D.date) }) : d.createElement("span", { key: "year" }, $(D.date, s));
|
|
2569
|
-
return s.getMonthYearOrder() === "year-first" ? [E, w] : [w, E];
|
|
2570
|
-
})(),
|
|
2571
|
-
d.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
2572
|
-
border: 0,
|
|
2573
|
-
clip: "rect(0 0 0 0)",
|
|
2574
|
-
height: "1px",
|
|
2575
|
-
margin: "-1px",
|
|
2576
|
-
overflow: "hidden",
|
|
2577
|
-
padding: 0,
|
|
2578
|
-
position: "absolute",
|
|
2579
|
-
width: "1px",
|
|
2580
|
-
whiteSpace: "nowrap",
|
|
2581
|
-
wordWrap: "normal"
|
|
2582
|
-
} }, k(D.date, s.options, s))
|
|
2583
|
-
) : (
|
|
2584
|
-
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
2585
|
-
d.createElement(n.CaptionLabel, { className: a[m.CaptionLabel], role: "status", "aria-live": "polite" }, k(D.date, s.options, s))
|
|
2586
|
-
)),
|
|
2587
|
-
l === "around" && !t.hideNavigation && P === u - 1 && d.createElement(
|
|
2588
|
-
n.NextMonthButton,
|
|
2589
|
-
{ type: "button", className: a[m.NextMonthButton], tabIndex: z ? void 0 : -1, "aria-disabled": z ? void 0 : !0, "aria-label": Ht(z), onClick: xe, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2590
|
-
d.createElement(n.Chevron, { disabled: z ? void 0 : !0, className: a[m.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
|
|
2591
|
-
),
|
|
2592
|
-
P === u - 1 && l === "after" && !t.hideNavigation && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: a[m.Nav], style: y?.[m.Nav], "aria-label": $e(), onPreviousClick: Ne, onNextClick: xe, previousMonth: G, nextMonth: z }),
|
|
2593
|
-
d.createElement(
|
|
2594
|
-
n.MonthGrid,
|
|
2595
|
-
{ role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Ft(D.date, s.options, s) || void 0, className: a[m.MonthGrid], style: y?.[m.MonthGrid] },
|
|
2596
|
-
!t.hideWeekdays && d.createElement(
|
|
2597
|
-
n.Weekdays,
|
|
2598
|
-
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: a[m.Weekdays], style: y?.[m.Weekdays] },
|
|
2599
|
-
T && d.createElement(n.WeekNumberHeader, { "aria-label": jt(s.options), className: a[m.WeekNumberHeader], style: y?.[m.WeekNumberHeader], scope: "col" }, H()),
|
|
2600
|
-
Zt.map((w) => d.createElement(n.Weekday, { "aria-label": qt(w, s.options, s), className: a[m.Weekday], key: String(w), style: y?.[m.Weekday], scope: "col" }, q(w, s.options, s)))
|
|
2601
|
-
),
|
|
2602
|
-
d.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: a[m.Weeks], style: y?.[m.Weeks] }, D.weeks.map((w) => d.createElement(
|
|
2603
|
-
n.Week,
|
|
2604
|
-
{ className: a[m.Week], key: w.weekNumber, style: y?.[m.Week], week: w },
|
|
2605
|
-
T && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
2606
|
-
d.createElement(n.WeekNumber, { week: w, style: y?.[m.WeekNumber], "aria-label": At(w.weekNumber, {
|
|
2607
|
-
locale: i
|
|
2608
|
-
}), className: a[m.WeekNumber], scope: "row", role: "rowheader" }, B(w.weekNumber, s)),
|
|
2609
|
-
w.days.map((E) => {
|
|
2610
|
-
const { date: A } = E, S = We(E);
|
|
2611
|
-
if (S[_.focused] = !S.hidden && !!Re?.isEqualTo(E), S[L.selected] = Se?.(A) || S.selected, Ae(be)) {
|
|
2612
|
-
const { from: Ye, to: Te } = be;
|
|
2613
|
-
S[L.range_start] = !!(Ye && Te && s.isSameDay(A, Ye)), S[L.range_end] = !!(Ye && Te && s.isSameDay(A, Te)), S[L.range_middle] = K(be, A, !0, s);
|
|
2614
|
-
}
|
|
2615
|
-
const nn = Eo(S, y, t.modifiersStyles), rn = wo(S, a, t.modifiersClassNames), on = !Ge && !S.hidden ? _t(A, S, s.options, s) : void 0;
|
|
2616
|
-
return (
|
|
2617
|
-
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
2618
|
-
d.createElement(n.Day, { key: `${s.format(A, "yyyy-MM-dd")}_${s.format(E.displayMonth, "yyyy-MM")}`, day: E, modifiers: S, className: rn.join(" "), style: nn, role: "gridcell", "aria-selected": S.selected || void 0, "aria-label": on, "data-day": s.format(A, "yyyy-MM-dd"), "data-month": E.outside ? s.format(A, "yyyy-MM") : void 0, "data-selected": S.selected || void 0, "data-disabled": S.disabled || void 0, "data-hidden": S.hidden || void 0, "data-outside": E.outside || void 0, "data-focused": S.focused || void 0, "data-today": S.today || void 0 }, !S.hidden && Ge ? d.createElement(n.DayButton, { className: a[m.DayButton], style: y?.[m.DayButton], type: "button", day: E, modifiers: S, disabled: S.disabled || void 0, tabIndex: Et(E) ? 0 : -1, "aria-label": Pt(A, S, s.options, s), onClick: $t(E, S), onBlur: zt(E, S), onFocus: Gt(E, S), onKeyDown: Lt(E, S), onMouseEnter: Qt(E, S), onMouseLeave: Xt(E, S) }, b(A, s.options, s)) : !S.hidden && b(E.date, s.options, s))
|
|
2619
|
-
);
|
|
2620
|
-
})
|
|
2621
|
-
)))
|
|
2622
|
-
)
|
|
2623
|
-
))
|
|
2624
|
-
),
|
|
2625
|
-
t.footer && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
2626
|
-
d.createElement(n.Footer, { className: a[m.Footer], style: y?.[m.Footer], role: "status", "aria-live": "polite" }, t.footer)
|
|
2627
|
-
)
|
|
2628
|
-
);
|
|
2629
|
-
}
|
|
2630
|
-
const ps = ({
|
|
2631
|
-
className: e,
|
|
2632
|
-
showOutsideDays: t = !0,
|
|
2633
|
-
animate: n = !0,
|
|
2634
|
-
arrowClassName: r,
|
|
2635
|
-
monthsClassName: o,
|
|
2636
|
-
defaultSelected: s,
|
|
2637
|
-
onSelect: i,
|
|
2638
|
-
...a
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useCallback as f } from "react";
|
|
3
|
+
import { cn as t } from "../../utils/index.js";
|
|
4
|
+
import { datePickerVariants as p } from "./DatePicker.variants.js";
|
|
5
|
+
import '../../style.css';/* empty css */
|
|
6
|
+
import { D as k } from "../../DayPicker-CaeUXRCF.js";
|
|
7
|
+
import { C as g } from "../../chevron-left-BHBf-gQY.js";
|
|
8
|
+
import { C as w } from "../../chevron-right-DvXGOiS_.js";
|
|
9
|
+
const y = ({
|
|
10
|
+
className: l,
|
|
11
|
+
showOutsideDays: n = !0,
|
|
12
|
+
animate: d = !0,
|
|
13
|
+
arrowClassName: s,
|
|
14
|
+
monthsClassName: i,
|
|
15
|
+
defaultSelected: m,
|
|
16
|
+
onSelect: o,
|
|
17
|
+
...u
|
|
2639
18
|
}) => {
|
|
2640
|
-
const [c,
|
|
2641
|
-
() =>
|
|
2642
|
-
),
|
|
2643
|
-
(
|
|
2644
|
-
|
|
19
|
+
const [c, x] = h(
|
|
20
|
+
() => m
|
|
21
|
+
), b = f(
|
|
22
|
+
(e) => {
|
|
23
|
+
e && (x(e), o?.(e));
|
|
2645
24
|
},
|
|
2646
|
-
[
|
|
25
|
+
[o]
|
|
2647
26
|
);
|
|
2648
|
-
return /* @__PURE__ */
|
|
2649
|
-
|
|
27
|
+
return /* @__PURE__ */ a(
|
|
28
|
+
k,
|
|
2650
29
|
{
|
|
2651
|
-
className:
|
|
2652
|
-
animate:
|
|
30
|
+
className: t(p({ className: l })),
|
|
31
|
+
animate: d,
|
|
2653
32
|
mode: "single",
|
|
2654
33
|
selected: c,
|
|
2655
|
-
onSelect:
|
|
2656
|
-
showOutsideDays:
|
|
34
|
+
onSelect: b,
|
|
35
|
+
showOutsideDays: n,
|
|
2657
36
|
role: "dialog",
|
|
2658
37
|
"aria-label": "Datepicker",
|
|
2659
38
|
classNames: {
|
|
2660
|
-
chevron:
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
"
|
|
2666
|
-
|
|
39
|
+
chevron: t(
|
|
40
|
+
"cursor-pointer",
|
|
41
|
+
"text-slate-500",
|
|
42
|
+
"w-5",
|
|
43
|
+
"h-5",
|
|
44
|
+
"text-slate-500",
|
|
45
|
+
"w-4",
|
|
46
|
+
"h-4",
|
|
47
|
+
"dark:text-metal-200"
|
|
48
|
+
),
|
|
49
|
+
day_button: t(
|
|
50
|
+
"h-[30px]",
|
|
51
|
+
"aria-selected:opacity-100",
|
|
52
|
+
"font-semibold",
|
|
53
|
+
"hover:rounded-full",
|
|
54
|
+
"cursor-pointer",
|
|
55
|
+
"rounded-full",
|
|
56
|
+
"w-[30px]"
|
|
57
|
+
),
|
|
58
|
+
day: "text-center text-sm leading-5",
|
|
59
|
+
month_caption: t(
|
|
60
|
+
"text-slate-700",
|
|
61
|
+
"font-semibold",
|
|
62
|
+
"text-sm",
|
|
63
|
+
"pl-1",
|
|
64
|
+
"h-8",
|
|
65
|
+
"flex",
|
|
66
|
+
"items-center",
|
|
67
|
+
"dark:text-white"
|
|
68
|
+
),
|
|
69
|
+
months: t(
|
|
70
|
+
"flex",
|
|
71
|
+
"flex-col",
|
|
72
|
+
"relative",
|
|
73
|
+
"px-5",
|
|
74
|
+
"py-4",
|
|
75
|
+
"rounded-lg",
|
|
76
|
+
"shadow-md",
|
|
77
|
+
"px-6",
|
|
78
|
+
"py-4",
|
|
79
|
+
"w-[307px]",
|
|
80
|
+
"justify-center",
|
|
81
|
+
"items-center",
|
|
82
|
+
"border",
|
|
83
|
+
"border-transparent",
|
|
84
|
+
"dark:bg-metal-800",
|
|
85
|
+
"dark:border-metal-700",
|
|
86
|
+
i
|
|
2667
87
|
),
|
|
2668
88
|
month: "flex flex-col gap-4",
|
|
2669
|
-
nav:
|
|
2670
|
-
"absolute
|
|
2671
|
-
|
|
89
|
+
nav: t(
|
|
90
|
+
"absolute",
|
|
91
|
+
"right-4",
|
|
92
|
+
"top-3.5",
|
|
93
|
+
"flex",
|
|
94
|
+
"justify-center",
|
|
95
|
+
"items-center",
|
|
96
|
+
"gap-1",
|
|
97
|
+
s
|
|
98
|
+
),
|
|
99
|
+
outside: "text-slate-400 dark:text-metal-500",
|
|
100
|
+
selected: t(
|
|
101
|
+
"[&>button]:bg-blue-600",
|
|
102
|
+
"[&>button]:text-white",
|
|
103
|
+
"[&>button]:hover:bg-blue-700",
|
|
104
|
+
"[&>button]:transition-all",
|
|
105
|
+
"[&>button]:duration-300",
|
|
106
|
+
"[&>button]:rounded-full",
|
|
107
|
+
"dark:[&>button]:bg-aurora-500",
|
|
108
|
+
"dark:[&>button]:hover:bg-aurora-500",
|
|
109
|
+
"dark:[&>button]:text-metal-900"
|
|
2672
110
|
),
|
|
2673
|
-
outside: "text-slate-400",
|
|
2674
|
-
selected: "[&>button]:bg-blue-600 [&>button]:text-white [&>button]:hover:bg-blue-700 [&>button]:transition-all [&>button]:duration-300 [&>button]:rounded-full",
|
|
2675
111
|
table: "w-full",
|
|
2676
|
-
weekdays: "text-slate-500",
|
|
2677
|
-
weeks:
|
|
112
|
+
weekdays: "text-slate-500 dark:text-metal-300",
|
|
113
|
+
weeks: t(
|
|
114
|
+
"text-slate-700",
|
|
115
|
+
"[&>tr>td]:border-transparent",
|
|
116
|
+
"[&>tr>td]:border-r-[8px]",
|
|
117
|
+
"[&>tr>td]:last:border-r-0",
|
|
118
|
+
"dark:text-white"
|
|
119
|
+
),
|
|
2678
120
|
weekday: "font-semibold text-sm uppercase text-sm",
|
|
2679
|
-
today: "text-blue-600 data-[selected=true]:text-white",
|
|
2680
|
-
month_grid:
|
|
121
|
+
today: "text-blue-600 dark:text-aurora-500 data-[selected=true]:text-white",
|
|
122
|
+
month_grid: t(
|
|
123
|
+
"[&>thead]:table-header-group",
|
|
124
|
+
"[&>thead]:relative",
|
|
125
|
+
"[&>thead]:after:block",
|
|
126
|
+
'[&>thead]:after:content-[" "]',
|
|
127
|
+
"[&>thead]:after:h-4"
|
|
128
|
+
)
|
|
2681
129
|
},
|
|
2682
130
|
components: {
|
|
2683
|
-
Chevron: ({ className:
|
|
131
|
+
Chevron: ({ className: e, ...r }) => r.orientation === "left" ? /* @__PURE__ */ a(g, { className: t(e), ...r }) : /* @__PURE__ */ a(w, { className: t(e), ...r })
|
|
2684
132
|
},
|
|
2685
|
-
...
|
|
133
|
+
...u
|
|
2686
134
|
}
|
|
2687
135
|
);
|
|
2688
136
|
};
|
|
2689
|
-
|
|
137
|
+
y.displayName = "KonstructDatePicker";
|
|
2690
138
|
export {
|
|
2691
|
-
|
|
139
|
+
y as DatePicker
|
|
2692
140
|
};
|