laif-ds 0.2.20 → 0.2.22
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/_virtual/index.js +5 -3
- package/dist/_virtual/index3.js +2 -5
- package/dist/_virtual/index4.js +3 -5
- package/dist/_virtual/index6.js +5 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/ui/app-select.js +92 -109
- package/dist/components/ui/app-stepper.js +212 -0
- package/dist/components/ui/gantt/constants/DimensionsSettings.js +6 -6
- package/dist/components/ui/gantt/constants/DragStepOptions.js +9 -9
- package/dist/components/ui/message-input.js +23 -23
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/stepper.js +387 -0
- package/dist/index.d.ts +55 -6
- package/dist/index.js +30 -28
- package/dist/lib/audio-utils.js +2 -2
- package/dist/node_modules/@date-fns/tz/date/index.js +2 -7
- package/dist/node_modules/@date-fns/tz/date/mini.js +32 -27
- package/dist/node_modules/@date-fns/tz/tzName/index.js +12 -0
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +11 -12
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +137 -139
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +238 -235
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +70 -69
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +88 -83
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +70 -69
- package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +13 -13
- package/dist/node_modules/@lexical/code/LexicalCode.prod.js +3 -3
- package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +2 -2
- package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +9 -9
- package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +6 -6
- package/dist/node_modules/@lexical/list/LexicalList.prod.js +48 -48
- package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +29 -29
- package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +1 -1
- package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +2 -2
- package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +10 -10
- package/dist/node_modules/@lexical/react/LexicalComposerContext.prod.js +2 -2
- package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +17 -17
- package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +4 -4
- package/dist/node_modules/@lexical/react/LexicalHistoryPlugin.prod.js +4 -4
- package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +5 -5
- package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +4 -4
- package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +20 -20
- package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +7 -7
- package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +43 -43
- package/dist/node_modules/@lexical/table/LexicalTable.prod.js +16 -16
- package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +3 -3
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +24 -25
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +22 -23
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +28 -29
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +1 -2
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +49 -50
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +22 -23
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +6 -7
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +31 -32
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +6 -7
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +43 -42
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js +20 -21
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +19 -20
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js +39 -40
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +13 -14
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +20 -21
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +8 -9
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
- package/dist/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.js +183 -175
- package/dist/node_modules/@shikijs/core/dist/index.js +195 -175
- package/dist/node_modules/@shikijs/langs/dist/asciidoc.js +2 -2
- package/dist/node_modules/@shikijs/langs/dist/cobol.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/erlang.js +5 -3
- package/dist/node_modules/@shikijs/langs/dist/fsharp.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/gdscript.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/go.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/haxe.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/julia.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/latex.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/lean.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/markdown.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/marko.js +5 -5
- package/dist/node_modules/@shikijs/langs/dist/mermaid.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/nextflow.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/purescript.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/r.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/sql.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/swift.js +2 -2
- package/dist/node_modules/@shikijs/langs/dist/templ.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/tex.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/vue-vine.js +21 -0
- package/dist/node_modules/@shikijs/langs/dist/vue.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/zig.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/andromeeda.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-latte.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +1 -1
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +1 -1
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +215 -208
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
- package/dist/node_modules/classnames/index.js +2 -2
- package/dist/node_modules/cmdk/dist/index.js +2 -2
- package/dist/node_modules/d3-interpolate/src/rgb.js +2 -2
- package/dist/node_modules/dayjs/dayjs.min.js +14 -14
- package/dist/node_modules/dayjs/locale/it.js +4 -4
- package/dist/node_modules/dayjs/plugin/isoWeek.js +4 -4
- package/dist/node_modules/dayjs/plugin/localizedFormat.js +10 -10
- package/dist/node_modules/decimal.js-light/decimal.js +2 -2
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js +2 -2
- package/dist/node_modules/es-toolkit/dist/array/flatten.js +2 -2
- package/dist/node_modules/es-toolkit/dist/array/uniqBy.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/_internal/compareValues.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isIterateeCall.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/array/orderBy.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/array/uniqBy.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js +14 -15
- package/dist/node_modules/es-toolkit/dist/compat/math/range.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +11 -11
- package/dist/node_modules/es-toolkit/dist/compat/object/get.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/object/has.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/object/property.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/util/eq.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js +2 -2
- package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js +2 -2
- package/dist/node_modules/es-toolkit/dist/function/debounce.js +15 -15
- package/dist/node_modules/es-toolkit/dist/function/identity.js +2 -2
- package/dist/node_modules/es-toolkit/dist/function/noop.js +2 -10
- package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js +2 -2
- package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js +3 -3
- package/dist/node_modules/es-toolkit/dist/predicate/isLength.js +2 -2
- package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js +2 -2
- package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js +2 -2
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.js +3 -3
- package/dist/node_modules/immer/dist/immer.js +213 -216
- package/dist/node_modules/lexical/Lexical.prod.js +212 -212
- package/dist/node_modules/lodash/_baseCreate.js +2 -2
- package/dist/node_modules/lodash/_cloneBuffer.js +2 -2
- package/dist/node_modules/lodash/_defineProperty.js +2 -2
- package/dist/node_modules/lodash/_isMasked.js +2 -2
- package/dist/node_modules/lodash/_nodeUtil.js +4 -4
- package/dist/node_modules/lodash/isArguments.js +2 -2
- package/dist/node_modules/lodash/isBuffer.js +2 -2
- package/dist/node_modules/lodash/lodash.js +16 -16
- package/dist/node_modules/prismjs/components/prism-cpp.js +2 -2
- package/dist/node_modules/prismjs/components/prism-java.js +2 -2
- package/dist/node_modules/prismjs/components/prism-rust.js +2 -2
- package/dist/node_modules/prismjs/components/prism-typescript.js +2 -2
- package/dist/node_modules/prismjs/prism.js +8 -8
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +183 -164
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +14 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +10 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +6 -6
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +30 -30
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +5 -5
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +9 -9
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +11 -11
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +12 -12
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +19 -19
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +9 -9
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +10 -10
- package/dist/node_modules/react-hook-form/dist/index.esm.js +150 -117
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +48 -48
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +9 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +43 -39
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js +95 -94
- package/dist/node_modules/react-window/dist/index.esm.js +2 -2
- package/dist/node_modules/recharts/es6/animation/AnimationManager.js +14 -14
- package/dist/node_modules/recharts/es6/animation/JavascriptAnimate.js +49 -0
- package/dist/node_modules/recharts/es6/animation/createDefaultAnimationManager.js +9 -0
- package/dist/node_modules/recharts/es6/animation/useAnimationManager.js +12 -0
- package/dist/node_modules/recharts/es6/component/Cursor.js +5 -5
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +55 -58
- package/dist/node_modules/recharts/es6/component/Legend.js +32 -27
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +44 -40
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +15 -23
- package/dist/node_modules/recharts/es6/context/useTooltipAxis.js +8 -7
- package/dist/node_modules/recharts/es6/shape/Curve.js +10 -10
- package/dist/node_modules/recharts/es6/shape/Rectangle.js +136 -99
- package/dist/node_modules/recharts/es6/shape/Symbols.js +55 -53
- package/dist/node_modules/recharts/es6/state/legendSlice.js +5 -4
- package/dist/node_modules/recharts/es6/state/selectors/axisSelectors.js +352 -307
- package/dist/node_modules/recharts/es6/state/selectors/brushSelectors.js +9 -9
- package/dist/node_modules/recharts/es6/state/selectors/combiners/combineDisplayedStackedData.js +26 -0
- package/dist/node_modules/recharts/es6/state/selectors/combiners/combineTooltipPayload.js +117 -0
- package/dist/node_modules/recharts/es6/state/selectors/dataSelectors.js +4 -4
- package/dist/node_modules/recharts/es6/state/selectors/legendSelectors.js +10 -4
- package/dist/node_modules/recharts/es6/state/selectors/polarAxisSelectors.js +33 -32
- package/dist/node_modules/recharts/es6/state/selectors/selectChartOffsetInternal.js +108 -0
- package/dist/node_modules/recharts/es6/state/selectors/selectTooltipAxis.js +13 -0
- package/dist/node_modules/recharts/es6/state/selectors/selectTooltipAxisId.js +5 -0
- package/dist/node_modules/recharts/es6/state/selectors/selectTooltipAxisType.js +9 -0
- package/dist/node_modules/recharts/es6/state/selectors/selectors.js +40 -143
- package/dist/node_modules/recharts/es6/state/selectors/tooltipSelectors.js +68 -63
- package/dist/node_modules/recharts/es6/state/types/StackedGraphicalItem.js +7 -0
- package/dist/node_modules/recharts/es6/util/ChartUtils.js +58 -57
- package/dist/node_modules/recharts/es6/util/DataUtils.js +34 -26
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +20 -15
- package/dist/node_modules/recharts/es6/util/excludeEventProps.js +11 -0
- package/dist/node_modules/recharts/es6/util/getSliced.js +7 -0
- package/dist/node_modules/recharts/es6/util/scale/getNiceTickValues.js +44 -44
- package/dist/node_modules/recharts/es6/util/stacks/getStackSeriesIdentifier.js +7 -0
- package/dist/node_modules/recharts/es6/util/svgPropertiesNoEvents.js +328 -0
- package/dist/node_modules/recharts/es6/util/types.js +22 -332
- package/dist/node_modules/recharts/es6/util/useAnimationId.js +10 -0
- package/dist/node_modules/recharts/es6/util/useElementOffset.js +20 -16
- package/dist/node_modules/remeda/dist/hasAtLeast-F1Oj_xBB.js +9 -0
- package/dist/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js +8 -0
- package/dist/node_modules/remeda/dist/omit-HZOiLuMO.js +19 -0
- package/dist/node_modules/remeda/dist/purry-DH9cw9sy.js +11 -0
- package/dist/node_modules/shiki/dist/langs.js +225 -220
- package/dist/node_modules/shiki/dist/themes.js +60 -60
- package/dist/node_modules/sonner/dist/index.js +309 -305
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +169 -168
- package/dist/node_modules/unified/lib/callable-instance.js +2 -2
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/unist-util-is/lib/index.js +2 -2
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +2 -2
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +2 -2
- package/dist/node_modules/vaul/dist/index.js +1 -1
- package/dist/node_modules/vfile-message/lib/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +3 -2
- package/dist/_virtual/isEqual.js +0 -8
- package/dist/_virtual/isEqual2.js +0 -5
- package/dist/_virtual/isEqualWith.js +0 -5
- package/dist/_virtual/isPlainObject.js +0 -5
- package/dist/_virtual/noop.js +0 -5
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dialog/dist/index.js +0 -255
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -137
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.js +0 -50
- package/dist/node_modules/es-toolkit/compat/isEqual.js +0 -9
- package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js +0 -18
- package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js +0 -139
- package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js +0 -18
- package/dist/node_modules/recharts/es6/animation/Animate.js +0 -270
- package/dist/node_modules/recharts/es6/state/selectors/selectChartOffset.js +0 -98
- package/dist/node_modules/remeda/dist/chunk-AIG3BDKO.js +0 -9
- package/dist/node_modules/remeda/dist/chunk-D6FCK2GA.js +0 -8
- package/dist/node_modules/remeda/dist/chunk-KI5X74E2.js +0 -19
- package/dist/node_modules/remeda/dist/chunk-WIMGWYZL.js +0 -11
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-dialog/dist/index.js +0 -258
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -137
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-slot/dist/index.js +0 -50
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import { TZDate as k } from "../../../@date-fns/tz/date/index.js";
|
|
2
|
+
import { TZDate as b } from "../../../@date-fns/tz/date/index.js";
|
|
4
3
|
import "../../../@date-fns/tz/date/mini.js";
|
|
5
|
-
import {
|
|
6
|
-
import { DateLib as
|
|
7
|
-
import { createGetModifiers as
|
|
8
|
-
import { getClassNamesForModifiers as
|
|
9
|
-
import { getComponents as
|
|
10
|
-
import { getDataAttributes as
|
|
11
|
-
import { getDefaultClassNames as
|
|
12
|
-
import { getFormatters as
|
|
13
|
-
import { getMonthOptions as
|
|
14
|
-
import { getStyleForModifiers as
|
|
15
|
-
import { getWeekdays as
|
|
16
|
-
import { getYearOptions as
|
|
17
|
-
import * as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
|
|
4
|
+
import i, { useMemo as Z, useCallback as y, useRef as Ae } from "react";
|
|
5
|
+
import { DateLib as Te } from "./classes/DateLib.js";
|
|
6
|
+
import { createGetModifiers as Ke } from "./helpers/createGetModifiers.js";
|
|
7
|
+
import { getClassNamesForModifiers as Re } from "./helpers/getClassNamesForModifiers.js";
|
|
8
|
+
import { getComponents as Ge } from "./helpers/getComponents.js";
|
|
9
|
+
import { getDataAttributes as He } from "./helpers/getDataAttributes.js";
|
|
10
|
+
import { getDefaultClassNames as _e } from "./helpers/getDefaultClassNames.js";
|
|
11
|
+
import { getFormatters as Ie } from "./helpers/getFormatters.js";
|
|
12
|
+
import { getMonthOptions as Ue } from "./helpers/getMonthOptions.js";
|
|
13
|
+
import { getStyleForModifiers as je } from "./helpers/getStyleForModifiers.js";
|
|
14
|
+
import { getWeekdays as Ve } from "./helpers/getWeekdays.js";
|
|
15
|
+
import { getYearOptions as $e } from "./helpers/getYearOptions.js";
|
|
16
|
+
import * as qe from "./labels/index.js";
|
|
17
|
+
import { UI as a, DayFlag as ze, SelectionState as w } from "./UI.js";
|
|
18
|
+
import { useAnimation as Je } from "./useAnimation.js";
|
|
19
|
+
import { useCalendar as Qe } from "./useCalendar.js";
|
|
20
|
+
import { dayPickerContext as Xe } from "./useDayPicker.js";
|
|
21
|
+
import { useFocus as et } from "./useFocus.js";
|
|
22
|
+
import { useSelection as tt } from "./useSelection.js";
|
|
23
|
+
import { rangeIncludesDate as at } from "./utils/rangeIncludesDate.js";
|
|
24
|
+
import { isDateRange as ot } from "./utils/typeguards.js";
|
|
25
|
+
import { enUS as nt } from "../../../date-fns/locale/en-US.js";
|
|
26
|
+
function Bt(A) {
|
|
27
|
+
let e = A;
|
|
28
28
|
e.timeZone && (e = {
|
|
29
|
-
...
|
|
30
|
-
}, e.today && (e.today = new
|
|
31
|
-
from: e.selected.from ? new
|
|
32
|
-
to: e.selected.to ? new
|
|
29
|
+
...A
|
|
30
|
+
}, e.today && (e.today = new b(e.today, e.timeZone)), e.month && (e.month = new b(e.month, e.timeZone)), e.defaultMonth && (e.defaultMonth = new b(e.defaultMonth, e.timeZone)), e.startMonth && (e.startMonth = new b(e.startMonth, e.timeZone)), e.endMonth && (e.endMonth = new b(e.endMonth, e.timeZone)), e.mode === "single" && e.selected ? e.selected = new b(e.selected, e.timeZone) : e.mode === "multiple" && e.selected ? e.selected = e.selected?.map((n) => new b(n, e.timeZone)) : e.mode === "range" && e.selected && (e.selected = {
|
|
31
|
+
from: e.selected.from ? new b(e.selected.from, e.timeZone) : void 0,
|
|
32
|
+
to: e.selected.to ? new b(e.selected.to, e.timeZone) : void 0
|
|
33
33
|
}));
|
|
34
|
-
const { components:
|
|
35
|
-
const
|
|
34
|
+
const { components: l, formatters: k, labels: T, dateLib: t, locale: oe, classNames: r } = Z(() => {
|
|
35
|
+
const n = { ...nt, ...e.locale };
|
|
36
36
|
return {
|
|
37
|
-
dateLib: new
|
|
38
|
-
locale:
|
|
37
|
+
dateLib: new Te({
|
|
38
|
+
locale: n,
|
|
39
39
|
weekStartsOn: e.broadcastCalendar ? 1 : e.weekStartsOn,
|
|
40
40
|
firstWeekContainsDate: e.firstWeekContainsDate,
|
|
41
41
|
useAdditionalWeekYearTokens: e.useAdditionalWeekYearTokens,
|
|
@@ -43,11 +43,11 @@ function Yt(T) {
|
|
|
43
43
|
timeZone: e.timeZone,
|
|
44
44
|
numerals: e.numerals
|
|
45
45
|
}, e.dateLib),
|
|
46
|
-
components:
|
|
47
|
-
formatters:
|
|
48
|
-
labels: { ...
|
|
49
|
-
locale:
|
|
50
|
-
classNames: { ...
|
|
46
|
+
components: Ge(e.components),
|
|
47
|
+
formatters: Ie(e.formatters),
|
|
48
|
+
labels: { ...qe, ...e.labels },
|
|
49
|
+
locale: n,
|
|
50
|
+
classNames: { ..._e(), ...e.classNames }
|
|
51
51
|
};
|
|
52
52
|
}, [
|
|
53
53
|
e.locale,
|
|
@@ -63,146 +63,165 @@ function Yt(T) {
|
|
|
63
63
|
e.formatters,
|
|
64
64
|
e.labels,
|
|
65
65
|
e.classNames
|
|
66
|
-
]), { captionLayout:
|
|
67
|
-
u && (h(u), V?.(u));
|
|
68
|
-
}, [u, h, V]), P = b(() => {
|
|
66
|
+
]), { captionLayout: N, mode: g, navLayout: D, numberOfMonths: K = 1, onDayBlur: R, onDayClick: C, onDayFocus: G, onDayKeyDown: H, onDayMouseEnter: _, onDayMouseLeave: I, onNextClick: U, onPrevClick: j, showWeekNumber: V, styles: c } = e, { formatCaption: $, formatDay: q, formatMonthDropdown: ne, formatWeekNumber: se, formatWeekNumberHeader: re, formatWeekdayName: ie, formatYearDropdown: le } = k, z = Qe(e, t), { days: de, months: W, navStart: E, navEnd: B, previousMonth: f, nextMonth: p, goToMonth: h } = z, x = Ke(de, e, E, B, t), { isSelected: S, select: Y, selected: M } = tt(e, t) ?? {}, { blur: J, focused: Q, isFocusTarget: me, moveFocus: X, setFocused: v } = et(e, z, x, S ?? (() => !1), t), { labelDayButton: ce, labelGridcell: ue, labelGrid: fe, labelMonthDropdown: pe, labelNav: ee, labelPrevious: ye, labelNext: he, labelWeekday: be, labelWeekNumber: Ne, labelWeekNumberHeader: ke, labelYearDropdown: De } = T, Me = Z(() => Ve(t, e.ISOWeek), [t, e.ISOWeek]), te = g !== void 0 || C !== void 0, L = y(() => {
|
|
69
67
|
f && (h(f), j?.(f));
|
|
70
|
-
}, [
|
|
71
|
-
|
|
72
|
-
}, [
|
|
73
|
-
|
|
74
|
-
}, [
|
|
75
|
-
|
|
76
|
-
}, [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
}, [f, h, j]), O = y(() => {
|
|
69
|
+
p && (h(p), U?.(p));
|
|
70
|
+
}, [h, p, U]), ve = y((n, d) => (o) => {
|
|
71
|
+
o.preventDefault(), o.stopPropagation(), v(n), Y?.(n.date, d, o), C?.(n.date, d, o);
|
|
72
|
+
}, [Y, C, v]), we = y((n, d) => (o) => {
|
|
73
|
+
v(n), G?.(n.date, d, o);
|
|
74
|
+
}, [G, v]), ge = y((n, d) => (o) => {
|
|
75
|
+
J(), R?.(n.date, d, o);
|
|
76
|
+
}, [J, R]), Ce = y((n, d) => (o) => {
|
|
77
|
+
const m = {
|
|
78
|
+
ArrowLeft: [
|
|
79
|
+
o.shiftKey ? "month" : "day",
|
|
80
|
+
e.dir === "rtl" ? "after" : "before"
|
|
81
|
+
],
|
|
82
|
+
ArrowRight: [
|
|
83
|
+
o.shiftKey ? "month" : "day",
|
|
84
|
+
e.dir === "rtl" ? "before" : "after"
|
|
85
|
+
],
|
|
86
|
+
ArrowDown: [o.shiftKey ? "year" : "week", "after"],
|
|
87
|
+
ArrowUp: [o.shiftKey ? "year" : "week", "before"],
|
|
88
|
+
PageUp: [o.shiftKey ? "year" : "month", "before"],
|
|
89
|
+
PageDown: [o.shiftKey ? "year" : "month", "after"],
|
|
84
90
|
Home: ["startOfWeek", "before"],
|
|
85
91
|
End: ["endOfWeek", "after"]
|
|
86
92
|
};
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
const [
|
|
90
|
-
|
|
93
|
+
if (m[o.key]) {
|
|
94
|
+
o.preventDefault(), o.stopPropagation();
|
|
95
|
+
const [u, s] = m[o.key];
|
|
96
|
+
X(u, s);
|
|
91
97
|
}
|
|
92
|
-
|
|
93
|
-
}, [
|
|
94
|
-
|
|
95
|
-
}, [
|
|
96
|
-
|
|
97
|
-
}, [
|
|
98
|
-
const
|
|
99
|
-
h(
|
|
100
|
-
}, [t, h]),
|
|
101
|
-
const
|
|
102
|
-
h(
|
|
103
|
-
}, [t, h]), { className:
|
|
104
|
-
className: [
|
|
105
|
-
style: { ...
|
|
106
|
-
}), [
|
|
107
|
-
|
|
108
|
-
classNames:
|
|
109
|
-
months:
|
|
110
|
-
focused:
|
|
98
|
+
H?.(n.date, d, o);
|
|
99
|
+
}, [X, H, e.dir]), We = y((n, d) => (o) => {
|
|
100
|
+
_?.(n.date, d, o);
|
|
101
|
+
}, [_]), Ee = y((n, d) => (o) => {
|
|
102
|
+
I?.(n.date, d, o);
|
|
103
|
+
}, [I]), Be = y((n) => (d) => {
|
|
104
|
+
const o = Number(d.target.value), m = t.setMonth(t.startOfMonth(n), o);
|
|
105
|
+
h(m);
|
|
106
|
+
}, [t, h]), xe = y((n) => (d) => {
|
|
107
|
+
const o = Number(d.target.value), m = t.setYear(t.startOfMonth(n), o);
|
|
108
|
+
h(m);
|
|
109
|
+
}, [t, h]), { className: Se, style: Ye } = Z(() => ({
|
|
110
|
+
className: [r[a.Root], e.className].filter(Boolean).join(" "),
|
|
111
|
+
style: { ...c?.[a.Root], ...e.style }
|
|
112
|
+
}), [r, e.className, e.style, c]), Le = He(e), ae = Ae(null);
|
|
113
|
+
Je(ae, !!e.animate, {
|
|
114
|
+
classNames: r,
|
|
115
|
+
months: W,
|
|
116
|
+
focused: Q,
|
|
111
117
|
dateLib: t
|
|
112
118
|
});
|
|
113
|
-
const
|
|
119
|
+
const Oe = {
|
|
114
120
|
dayPickerProps: e,
|
|
115
|
-
selected:
|
|
116
|
-
select:
|
|
117
|
-
isSelected:
|
|
118
|
-
months:
|
|
119
|
-
nextMonth:
|
|
120
|
-
previousMonth:
|
|
121
|
+
selected: M,
|
|
122
|
+
select: Y,
|
|
123
|
+
isSelected: S,
|
|
124
|
+
months: W,
|
|
125
|
+
nextMonth: p,
|
|
126
|
+
previousMonth: f,
|
|
121
127
|
goToMonth: h,
|
|
122
|
-
getModifiers:
|
|
123
|
-
components:
|
|
124
|
-
classNames:
|
|
125
|
-
styles:
|
|
126
|
-
labels:
|
|
127
|
-
formatters:
|
|
128
|
+
getModifiers: x,
|
|
129
|
+
components: l,
|
|
130
|
+
classNames: r,
|
|
131
|
+
styles: c,
|
|
132
|
+
labels: T,
|
|
133
|
+
formatters: k
|
|
128
134
|
};
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
{ value:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
{ rootRef: e.animate ?
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
{ className:
|
|
138
|
-
!e.hideNavigation && !D &&
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
135
|
+
return i.createElement(
|
|
136
|
+
Xe.Provider,
|
|
137
|
+
{ value: Oe },
|
|
138
|
+
i.createElement(
|
|
139
|
+
l.Root,
|
|
140
|
+
{ rootRef: e.animate ? ae : void 0, className: Se, style: Ye, dir: e.dir, id: e.id, lang: e.lang, nonce: e.nonce, title: e.title, role: e.role, "aria-label": e["aria-label"], ...Le },
|
|
141
|
+
i.createElement(
|
|
142
|
+
l.Months,
|
|
143
|
+
{ className: r[a.Months], style: c?.[a.Months] },
|
|
144
|
+
!e.hideNavigation && !D && i.createElement(l.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: r[a.Nav], style: c?.[a.Nav], "aria-label": ee(), onPreviousClick: L, onNextClick: O, previousMonth: f, nextMonth: p }),
|
|
145
|
+
W.map((n, d) => i.createElement(
|
|
146
|
+
l.Month,
|
|
147
|
+
{
|
|
148
|
+
"data-animated-month": e.animate ? "true" : void 0,
|
|
149
|
+
className: r[a.Month],
|
|
150
|
+
style: c?.[a.Month],
|
|
151
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
152
|
+
key: d,
|
|
153
|
+
displayIndex: d,
|
|
154
|
+
calendarMonth: n
|
|
155
|
+
},
|
|
156
|
+
D === "around" && !e.hideNavigation && d === 0 && i.createElement(
|
|
157
|
+
l.PreviousMonthButton,
|
|
158
|
+
{ type: "button", className: r[a.PreviousMonthButton], tabIndex: f ? void 0 : -1, "aria-disabled": f ? void 0 : !0, "aria-label": ye(f), onClick: L, "data-animated-button": e.animate ? "true" : void 0 },
|
|
159
|
+
i.createElement(l.Chevron, { disabled: f ? void 0 : !0, className: r[a.Chevron], orientation: e.dir === "rtl" ? "right" : "left" })
|
|
160
|
+
),
|
|
161
|
+
i.createElement(l.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: r[a.MonthCaption], style: c?.[a.MonthCaption], calendarMonth: n, displayIndex: d }, N?.startsWith("dropdown") ? i.createElement(
|
|
162
|
+
l.DropdownNav,
|
|
163
|
+
{ className: r[a.Dropdowns], style: c?.[a.Dropdowns] },
|
|
164
|
+
N === "dropdown" || N === "dropdown-months" ? i.createElement(l.MonthsDropdown, { className: r[a.MonthsDropdown], "aria-label": pe(), classNames: r, components: l, disabled: !!e.disableNavigation, onChange: Be(n.date), options: Ue(n.date, E, B, k, t), style: c?.[a.Dropdown], value: t.getMonth(n.date) }) : i.createElement("span", null, ne(n.date, t)),
|
|
165
|
+
N === "dropdown" || N === "dropdown-years" ? i.createElement(l.YearsDropdown, { className: r[a.YearsDropdown], "aria-label": De(t.options), classNames: r, components: l, disabled: !!e.disableNavigation, onChange: xe(n.date), options: $e(E, B, k, t, !!e.reverseYears), style: c?.[a.Dropdown], value: t.getYear(n.date) }) : i.createElement("span", null, le(n.date, t)),
|
|
166
|
+
i.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
167
|
+
border: 0,
|
|
168
|
+
clip: "rect(0 0 0 0)",
|
|
169
|
+
height: "1px",
|
|
170
|
+
margin: "-1px",
|
|
171
|
+
overflow: "hidden",
|
|
172
|
+
padding: 0,
|
|
173
|
+
position: "absolute",
|
|
174
|
+
width: "1px",
|
|
175
|
+
whiteSpace: "nowrap",
|
|
176
|
+
wordWrap: "normal"
|
|
177
|
+
} }, $(n.date, t.options, t))
|
|
178
|
+
) : (
|
|
179
|
+
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
180
|
+
i.createElement(l.CaptionLabel, { className: r[a.CaptionLabel], role: "status", "aria-live": "polite" }, $(n.date, t.options, t))
|
|
181
|
+
)),
|
|
182
|
+
D === "around" && !e.hideNavigation && d === K - 1 && i.createElement(
|
|
183
|
+
l.NextMonthButton,
|
|
184
|
+
{ type: "button", className: r[a.NextMonthButton], tabIndex: p ? void 0 : -1, "aria-disabled": p ? void 0 : !0, "aria-label": he(p), onClick: O, "data-animated-button": e.animate ? "true" : void 0 },
|
|
185
|
+
i.createElement(l.Chevron, { disabled: p ? void 0 : !0, className: r[a.Chevron], orientation: e.dir === "rtl" ? "left" : "right" })
|
|
186
|
+
),
|
|
187
|
+
d === K - 1 && D === "after" && !e.hideNavigation && i.createElement(l.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: r[a.Nav], style: c?.[a.Nav], "aria-label": ee(), onPreviousClick: L, onNextClick: O, previousMonth: f, nextMonth: p }),
|
|
188
|
+
i.createElement(
|
|
189
|
+
l.MonthGrid,
|
|
190
|
+
{ role: "grid", "aria-multiselectable": g === "multiple" || g === "range", "aria-label": fe(n.date, t.options, t) || void 0, className: r[a.MonthGrid], style: c?.[a.MonthGrid] },
|
|
191
|
+
!e.hideWeekdays && i.createElement(
|
|
192
|
+
l.Weekdays,
|
|
193
|
+
{ "data-animated-weekdays": e.animate ? "true" : void 0, className: r[a.Weekdays], style: c?.[a.Weekdays] },
|
|
194
|
+
V && i.createElement(l.WeekNumberHeader, { "aria-label": ke(t.options), className: r[a.WeekNumberHeader], style: c?.[a.WeekNumberHeader], scope: "col" }, re()),
|
|
195
|
+
Me.map((o) => i.createElement(l.Weekday, { "aria-label": be(o, t.options, t), className: r[a.Weekday], key: String(o), style: c?.[a.Weekday], scope: "col" }, ie(o, t.options, t)))
|
|
148
196
|
),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
{ className:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
),
|
|
172
|
-
d === G - 1 && D === "after" && !e.hideNavigation && r.createElement(i.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: n[a.Nav], style: m?.[a.Nav], "aria-label": oe(), onPreviousClick: O, onNextClick: P, previousMonth: u, nextMonth: f }),
|
|
173
|
-
r.createElement(
|
|
174
|
-
i.MonthGrid,
|
|
175
|
-
{ role: "grid", "aria-multiselectable": E === "multiple" || E === "range", "aria-label": be(o.date, t.options, t) || void 0, className: n[a.MonthGrid], style: m?.[a.MonthGrid] },
|
|
176
|
-
!e.hideWeekdays && r.createElement(
|
|
177
|
-
i.Weekdays,
|
|
178
|
-
{ "data-animated-weekdays": e.animate ? "true" : void 0, className: n[a.Weekdays], style: m?.[a.Weekdays] },
|
|
179
|
-
$ && r.createElement(i.WeekNumberHeader, { "aria-label": De(t.options), className: n[a.WeekNumberHeader], style: m?.[a.WeekNumberHeader], scope: "col" }, de()),
|
|
180
|
-
ge.map((p, C) => r.createElement(i.Weekday, { "aria-label": we(p, t.options, t), className: n[a.Weekday], key: C, style: m?.[a.Weekday], scope: "col" }, me(p, t.options, t)))
|
|
181
|
-
),
|
|
182
|
-
r.createElement(i.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: n[a.Weeks], style: m?.[a.Weeks] }, o.weeks.map((p, C) => r.createElement(
|
|
183
|
-
i.Week,
|
|
184
|
-
{ className: n[a.Week], key: p.weekNumber, style: m?.[a.Week], week: p },
|
|
185
|
-
$ && r.createElement(i.WeekNumber, { week: p, style: m?.[a.WeekNumber], "aria-label": Me(p.weekNumber, {
|
|
186
|
-
locale: re
|
|
187
|
-
}), className: n[a.WeekNumber], scope: "row", role: "rowheader" }, le(p.weekNumber, t)),
|
|
188
|
-
p.days.map((c) => {
|
|
189
|
-
const { date: y } = c, s = S(c);
|
|
190
|
-
if (s[He.focused] = !s.hidden && !!te?.isEqualTo(c), s[W.selected] = Y?.(y) || s.selected, rt(v)) {
|
|
191
|
-
const { from: F, to: Z } = v;
|
|
192
|
-
s[W.range_start] = !!(F && Z && t.isSameDay(y, F)), s[W.range_end] = !!(F && Z && t.isSameDay(y, Z)), s[W.range_middle] = st(v, y, !0, t);
|
|
193
|
-
}
|
|
194
|
-
const Ae = ze(s, m, e.modifiersStyles), Te = Ke(s, n, e.modifiersClassNames), Re = !ne && !s.hidden ? ye(y, s, t.options, t) : void 0;
|
|
195
|
-
return r.createElement(i.Day, { key: `${t.format(y, "yyyy-MM-dd")}_${t.format(c.displayMonth, "yyyy-MM")}`, day: c, modifiers: s, className: Te.join(" "), style: Ae, role: "gridcell", "aria-selected": s.selected || void 0, "aria-label": Re, "data-day": t.format(y, "yyyy-MM-dd"), "data-month": c.outside ? t.format(y, "yyyy-MM") : void 0, "data-selected": s.selected || void 0, "data-disabled": s.disabled || void 0, "data-hidden": s.hidden || void 0, "data-outside": c.outside || void 0, "data-focused": s.focused || void 0, "data-today": s.today || void 0 }, !s.hidden && ne ? r.createElement(i.DayButton, { className: n[a.DayButton], style: m?.[a.DayButton], type: "button", day: c, modifiers: s, disabled: s.disabled || void 0, tabIndex: fe(c) ? 0 : -1, "aria-label": pe(y, s, t.options, t), onClick: Ce(c, s), onBlur: Ee(c, s), onFocus: We(c, s), onKeyDown: Be(c, s), onMouseEnter: xe(c, s), onMouseLeave: Se(c, s) }, z(y, t.options, t)) : !s.hidden && z(c.date, t.options, t));
|
|
196
|
-
})
|
|
197
|
-
)))
|
|
198
|
-
)
|
|
199
|
-
);
|
|
200
|
-
})
|
|
197
|
+
i.createElement(l.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: r[a.Weeks], style: c?.[a.Weeks] }, n.weeks.map((o) => i.createElement(
|
|
198
|
+
l.Week,
|
|
199
|
+
{ className: r[a.Week], key: o.weekNumber, style: c?.[a.Week], week: o },
|
|
200
|
+
V && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
201
|
+
i.createElement(l.WeekNumber, { week: o, style: c?.[a.WeekNumber], "aria-label": Ne(o.weekNumber, {
|
|
202
|
+
locale: oe
|
|
203
|
+
}), className: r[a.WeekNumber], scope: "row", role: "rowheader" }, se(o.weekNumber, t)),
|
|
204
|
+
o.days.map((m) => {
|
|
205
|
+
const { date: u } = m, s = x(m);
|
|
206
|
+
if (s[ze.focused] = !s.hidden && !!Q?.isEqualTo(m), s[w.selected] = S?.(u) || s.selected, ot(M)) {
|
|
207
|
+
const { from: P, to: F } = M;
|
|
208
|
+
s[w.range_start] = !!(P && F && t.isSameDay(u, P)), s[w.range_end] = !!(P && F && t.isSameDay(u, F)), s[w.range_middle] = at(M, u, !0, t);
|
|
209
|
+
}
|
|
210
|
+
const Pe = je(s, c, e.modifiersStyles), Fe = Re(s, r, e.modifiersClassNames), Ze = !te && !s.hidden ? ue(u, s, t.options, t) : void 0;
|
|
211
|
+
return (
|
|
212
|
+
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
213
|
+
i.createElement(l.Day, { key: `${t.format(u, "yyyy-MM-dd")}_${t.format(m.displayMonth, "yyyy-MM")}`, day: m, modifiers: s, className: Fe.join(" "), style: Pe, role: "gridcell", "aria-selected": s.selected || void 0, "aria-label": Ze, "data-day": t.format(u, "yyyy-MM-dd"), "data-month": m.outside ? t.format(u, "yyyy-MM") : void 0, "data-selected": s.selected || void 0, "data-disabled": s.disabled || void 0, "data-hidden": s.hidden || void 0, "data-outside": m.outside || void 0, "data-focused": s.focused || void 0, "data-today": s.today || void 0 }, !s.hidden && te ? i.createElement(l.DayButton, { className: r[a.DayButton], style: c?.[a.DayButton], type: "button", day: m, modifiers: s, disabled: s.disabled || void 0, tabIndex: me(m) ? 0 : -1, "aria-label": ce(u, s, t.options, t), onClick: ve(m, s), onBlur: ge(m, s), onFocus: we(m, s), onKeyDown: Ce(m, s), onMouseEnter: We(m, s), onMouseLeave: Ee(m, s) }, q(u, t.options, t)) : !s.hidden && q(m.date, t.options, t))
|
|
214
|
+
);
|
|
215
|
+
})
|
|
216
|
+
)))
|
|
217
|
+
)
|
|
218
|
+
))
|
|
201
219
|
),
|
|
202
|
-
e.footer &&
|
|
220
|
+
e.footer && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
221
|
+
i.createElement(l.Footer, { className: r[a.Footer], style: c?.[a.Footer], role: "status", "aria-live": "polite" }, e.footer)
|
|
203
222
|
)
|
|
204
223
|
);
|
|
205
224
|
}
|
|
206
225
|
export {
|
|
207
|
-
|
|
226
|
+
Bt as DayPicker
|
|
208
227
|
};
|
|
@@ -25,17 +25,17 @@ import { isBefore as B } from "../../../../date-fns/isBefore.js";
|
|
|
25
25
|
import { isDate as w } from "../../../../date-fns/isDate.js";
|
|
26
26
|
import { isSameDay as b } from "../../../../date-fns/isSameDay.js";
|
|
27
27
|
import { isSameMonth as C } from "../../../../date-fns/isSameMonth.js";
|
|
28
|
-
import { isSameYear as
|
|
29
|
-
import { max as
|
|
30
|
-
import { min as
|
|
31
|
-
import { setMonth as
|
|
32
|
-
import { setYear as
|
|
33
|
-
import { startOfDay as
|
|
34
|
-
import { startOfISOWeek as
|
|
35
|
-
import { startOfMonth as
|
|
36
|
-
import { startOfWeek as
|
|
37
|
-
import { startOfYear as
|
|
38
|
-
class
|
|
28
|
+
import { isSameYear as _ } from "../../../../date-fns/isSameYear.js";
|
|
29
|
+
import { max as Z } from "../../../../date-fns/max.js";
|
|
30
|
+
import { min as A } from "../../../../date-fns/min.js";
|
|
31
|
+
import { setMonth as x } from "../../../../date-fns/setMonth.js";
|
|
32
|
+
import { setYear as N } from "../../../../date-fns/setYear.js";
|
|
33
|
+
import { startOfDay as U } from "../../../../date-fns/startOfDay.js";
|
|
34
|
+
import { startOfISOWeek as z } from "../../../../date-fns/startOfISOWeek.js";
|
|
35
|
+
import { startOfMonth as F } from "../../../../date-fns/startOfMonth.js";
|
|
36
|
+
import { startOfWeek as j } from "../../../../date-fns/startOfWeek.js";
|
|
37
|
+
import { startOfYear as q } from "../../../../date-fns/startOfYear.js";
|
|
38
|
+
class E {
|
|
39
39
|
/**
|
|
40
40
|
* Creates an instance of `DateLib`.
|
|
41
41
|
*
|
|
@@ -46,7 +46,7 @@ class G {
|
|
|
46
46
|
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? n.tz(this.options.timeZone) : new this.Date(), this.newDate = (r, e, i) => this.overrides?.newDate ? this.overrides.newDate(r, e, i) : this.options.timeZone ? new n(r, e, i, this.options.timeZone) : new Date(r, e, i), this.addDays = (r, e) => this.overrides?.addDays ? this.overrides.addDays(r, e) : d(r, e), this.addMonths = (r, e) => this.overrides?.addMonths ? this.overrides.addMonths(r, e) : m(r, e), this.addWeeks = (r, e) => this.overrides?.addWeeks ? this.overrides.addWeeks(r, e) : v(r, e), this.addYears = (r, e) => this.overrides?.addYears ? this.overrides.addYears(r, e) : p(r, e), this.differenceInCalendarDays = (r, e) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, e) : O(r, e), this.differenceInCalendarMonths = (r, e) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, e) : u(r, e), this.eachMonthOfInterval = (r) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : c(r), this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : a(r, this), this.endOfISOWeek = (r) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(r) : k(r), this.endOfMonth = (r) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(r) : D(r), this.endOfWeek = (r, e) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(r, e) : M(r, this.options), this.endOfYear = (r) => this.overrides?.endOfYear ? this.overrides.endOfYear(r) : W(r), this.format = (r, e, i) => {
|
|
47
47
|
const o = this.overrides?.format ? this.overrides.format(r, e, this.options) : l(r, e, this.options);
|
|
48
48
|
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(o) : o;
|
|
49
|
-
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : S(r), this.getMonth = (r, e) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : Y(r, this.options), this.getYear = (r, e) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : g(r, this.options), this.getWeek = (r, e) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : I(r, this.options), this.isAfter = (r, e) => this.overrides?.isAfter ? this.overrides.isAfter(r, e) : y(r, e), this.isBefore = (r, e) => this.overrides?.isBefore ? this.overrides.isBefore(r, e) : B(r, e), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : w(r), this.isSameDay = (r, e) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, e) : b(r, e), this.isSameMonth = (r, e) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, e) : C(r, e), this.isSameYear = (r, e) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, e) :
|
|
49
|
+
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : S(r), this.getMonth = (r, e) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : Y(r, this.options), this.getYear = (r, e) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : g(r, this.options), this.getWeek = (r, e) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : I(r, this.options), this.isAfter = (r, e) => this.overrides?.isAfter ? this.overrides.isAfter(r, e) : y(r, e), this.isBefore = (r, e) => this.overrides?.isBefore ? this.overrides.isBefore(r, e) : B(r, e), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : w(r), this.isSameDay = (r, e) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, e) : b(r, e), this.isSameMonth = (r, e) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, e) : C(r, e), this.isSameYear = (r, e) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, e) : _(r, e), this.max = (r) => this.overrides?.max ? this.overrides.max(r) : Z(r), this.min = (r) => this.overrides?.min ? this.overrides.min(r) : A(r), this.setMonth = (r, e) => this.overrides?.setMonth ? this.overrides.setMonth(r, e) : x(r, e), this.setYear = (r, e) => this.overrides?.setYear ? this.overrides.setYear(r, e) : N(r, e), this.startOfBroadcastWeek = (r, e) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : f(r, this), this.startOfDay = (r) => this.overrides?.startOfDay ? this.overrides.startOfDay(r) : U(r), this.startOfISOWeek = (r) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(r) : z(r), this.startOfMonth = (r) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(r) : F(r), this.startOfWeek = (r, e) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(r, this.options) : j(r, this.options), this.startOfYear = (r) => this.overrides?.startOfYear ? this.overrides.startOfYear(r) : q(r), this.options = { locale: h, ...t }, this.overrides = s;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
@@ -85,9 +85,9 @@ class G {
|
|
|
85
85
|
return this.replaceDigits(t.toString());
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
const Ir = new
|
|
88
|
+
const Ir = new E();
|
|
89
89
|
export {
|
|
90
|
-
|
|
90
|
+
E as DateLib,
|
|
91
91
|
Ir as defaultDateLib,
|
|
92
92
|
h as defaultLocale
|
|
93
93
|
};
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
import e from "react";
|
|
3
3
|
function r(o) {
|
|
4
4
|
const { size: n = 24, orientation: t = "left", className: l } = o;
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
return (
|
|
6
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
7
|
+
e.createElement(
|
|
8
|
+
"svg",
|
|
9
|
+
{ className: l, width: n, height: n, viewBox: "0 0 24 24" },
|
|
10
|
+
t === "up" && e.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
11
|
+
t === "down" && e.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
12
|
+
t === "left" && e.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
13
|
+
t === "right" && e.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
14
|
+
)
|
|
12
15
|
);
|
|
13
16
|
}
|
|
14
17
|
export {
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import { formatCaption as e, formatMonthCaption as t } from "./formatCaption.js";
|
|
3
3
|
import { formatDay as a } from "./formatDay.js";
|
|
4
4
|
import { formatMonthDropdown as p } from "./formatMonthDropdown.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { formatWeekdayName as x } from "./formatWeekdayName.js";
|
|
6
|
+
import { formatWeekNumber as i } from "./formatWeekNumber.js";
|
|
7
|
+
import { formatWeekNumberHeader as u } from "./formatWeekNumberHeader.js";
|
|
8
8
|
import { formatYearCaption as D, formatYearDropdown as N } from "./formatYearDropdown.js";
|
|
9
9
|
export {
|
|
10
10
|
e as formatCaption,
|
|
11
11
|
a as formatDay,
|
|
12
12
|
t as formatMonthCaption,
|
|
13
13
|
p as formatMonthDropdown,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
i as formatWeekNumber,
|
|
15
|
+
u as formatWeekNumberHeader,
|
|
16
|
+
x as formatWeekdayName,
|
|
17
17
|
D as formatYearCaption,
|
|
18
18
|
N as formatYearDropdown
|
|
19
19
|
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { DayFlag as
|
|
3
|
-
import { dateMatchModifiers as
|
|
4
|
-
function V(
|
|
5
|
-
const { disabled:
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
2
|
+
import { DayFlag as e } from "../UI.js";
|
|
3
|
+
import { dateMatchModifiers as u } from "../utils/dateMatchModifiers.js";
|
|
4
|
+
function V(b, S, h, M, a) {
|
|
5
|
+
const { disabled: m, hidden: p, modifiers: r, showOutsideDays: y, broadcastCalendar: B, today: g } = S, { isSameDay: v, isSameMonth: A, startOfMonth: E, isBefore: F, endOfMonth: j, isAfter: k } = a, O = h && E(h), D = M && j(M), i = {
|
|
6
|
+
[e.focused]: [],
|
|
7
|
+
[e.outside]: [],
|
|
8
|
+
[e.disabled]: [],
|
|
9
|
+
[e.hidden]: [],
|
|
10
|
+
[e.today]: []
|
|
11
11
|
}, d = {};
|
|
12
|
-
for (const
|
|
13
|
-
const { date:
|
|
14
|
-
!B && !
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
12
|
+
for (const s of b) {
|
|
13
|
+
const { date: o, displayMonth: n } = s, t = !!(n && !A(o, n)), f = !!(O && F(o, O)), l = !!(D && k(o, D)), w = !!(m && u(o, m, a)), x = !!(p && u(o, p, a)) || f || l || // Broadcast calendar will show outside days as default
|
|
14
|
+
!B && !y && t || B && y === !1 && t, C = v(o, g ?? a.today());
|
|
15
|
+
t && i.outside.push(s), w && i.disabled.push(s), x && i.hidden.push(s), C && i.today.push(s), r && Object.keys(r).forEach((c) => {
|
|
16
|
+
const N = r?.[c];
|
|
17
|
+
N && u(o, N, a) && (d[c] ? d[c].push(s) : d[c] = [s]);
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
return (
|
|
21
|
-
const
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
},
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
|
|
20
|
+
return (s) => {
|
|
21
|
+
const o = {
|
|
22
|
+
[e.focused]: !1,
|
|
23
|
+
[e.disabled]: !1,
|
|
24
|
+
[e.hidden]: !1,
|
|
25
|
+
[e.outside]: !1,
|
|
26
|
+
[e.today]: !1
|
|
27
|
+
}, n = {};
|
|
28
|
+
for (const t in i) {
|
|
29
|
+
const f = i[t];
|
|
30
|
+
o[t] = f.some((l) => l === s);
|
|
31
31
|
}
|
|
32
|
-
for (const
|
|
33
|
-
|
|
32
|
+
for (const t in d)
|
|
33
|
+
n[t] = d[t].some((f) => f === s);
|
|
34
34
|
return {
|
|
35
|
-
...
|
|
35
|
+
...o,
|
|
36
36
|
// custom modifiers should override all the previous ones
|
|
37
|
-
...
|
|
37
|
+
...n
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
function c(s, t) {
|
|
3
|
-
const e = t.startOfMonth(s), n = e.getDay() > 0 ? e.getDay() : 7, a = t.addDays(s, -n + 1), o = t.addDays(a,
|
|
3
|
+
const e = t.startOfMonth(s), n = e.getDay() > 0 ? e.getDay() : 7, a = t.addDays(s, -n + 1), o = t.addDays(a, 34);
|
|
4
4
|
return t.getMonth(s) === t.getMonth(o) ? 5 : 4;
|
|
5
5
|
}
|
|
6
6
|
export {
|