@rpcbase/ui 0.194.0 → 0.196.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DayPickerField/index.d.ts.map +1 -1
- package/dist/index100.js +6 -5
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +24 -4
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +6 -8
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +4 -5
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +6 -4
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +5 -4
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +4 -6
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +5 -145
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +4 -39
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +8 -4
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +5 -7
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +4 -13
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +4 -13
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +6 -7
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +145 -31
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +39 -10
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +4 -10
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +7 -8
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +13 -13
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +13 -101
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +273 -300
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +8 -20
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +31 -53
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +10 -72
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +10 -9
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +8 -20
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +13 -16
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +101 -23
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +20 -7
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +53 -5
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +72 -23
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +10 -35
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +21 -16
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +16 -6
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +23 -4
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +6 -4
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +5 -4
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +23 -4
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +35 -4
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +16 -7
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +7 -24
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +4 -7
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +4 -6
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +4 -5
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +4 -3
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +1 -1
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +6 -4
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +24 -4
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +7 -4
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +6 -3
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +5 -3
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +3 -3
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +3 -46
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +4 -605
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +3 -46
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +4 -205
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +4 -22
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +3 -24
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +3 -399
- package/dist/index157.js.map +1 -1
- package/dist/index160.js +1 -1
- package/dist/index160.js.map +1 -1
- package/dist/index179.js +24 -58
- package/dist/index179.js.map +1 -1
- package/dist/index180.js +29 -9
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +5 -67
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +66 -18
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +179 -15
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +45 -4
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +57 -4
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +8 -6
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +66 -4
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +19 -7
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +16 -17
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +5 -5
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +5 -5
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +6 -13
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +4 -10
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +7 -14
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +17 -14
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +5 -5
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +5 -6
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +13 -7
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +9 -5
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +14 -9
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +14 -5
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +5 -5
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +6 -9
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +7 -5
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +6 -5
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +9 -4
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +5 -11
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +5 -10
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +9 -10
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +5 -11
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +5 -11
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +4 -10
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +11 -7
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +10 -6
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +10 -5
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +11 -6
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +11 -7
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +10 -6
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +7 -55
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +6 -16
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +5 -7
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +6 -10
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +7 -10
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +6 -21
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +55 -10
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +16 -9
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +7 -9
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +10 -4
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +10 -5
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +21 -16
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +10 -9
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +9 -18
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +9 -15
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +4 -12
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +5 -29
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +15 -11
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +9 -25
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +18 -5
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +13 -65
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +1 -1
- package/dist/index240.js +12 -180
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +28 -45
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +12 -24
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +26 -29
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +6 -5
- package/dist/index244.js.map +1 -1
- package/dist/index248.js +1 -1
- package/dist/index249.js +10 -9
- package/dist/index249.js.map +1 -1
- package/dist/index252.js +2 -2
- package/dist/index255.js +1 -1
- package/dist/index259.js +3 -116
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +9 -17
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +114 -13
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +17 -3
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +12 -33
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +35 -19
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +20 -9
- package/dist/index265.js.map +1 -1
- package/dist/index267.js +2 -2
- package/dist/index27.js +493 -334
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +5 -5
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +3 -19
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +23 -12
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +113 -5
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +16 -3
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +522 -21
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +127 -112
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +133 -15
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +4 -524
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +18 -127
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +12 -133
- package/dist/index280.js.map +1 -1
- package/dist/index282.js +64 -5
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +69 -6
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +9 -4
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +14 -16
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +65 -8
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +5 -5
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +5 -4
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +4 -546
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +16 -47
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +8 -17
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +5 -6
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +4 -8
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +545 -7
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +47 -9
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +17 -12
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +6 -9
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +8 -13
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +7 -64
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +9 -69
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +13 -9
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +10 -14
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +14 -66
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +3 -4
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +23 -56
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +5 -68
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +55 -30
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +68 -9
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +26 -148
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +5 -5
- package/dist/index310.js +9 -108
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +153 -4
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +108 -23
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +12 -15
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +25 -26
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +5 -13
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +22 -6
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +15 -22
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +28 -12
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +12 -27
- package/dist/index319.js.map +1 -1
- package/dist/index32.js +24 -24
- package/dist/index320.js +7 -5
- package/dist/index320.js.map +1 -1
- package/dist/index33.js +3 -3
- package/dist/index41.js +20 -20
- package/dist/index45.js +1 -1
- package/dist/index46.js +1 -1
- package/dist/index49.js +1 -1
- package/dist/index50.js +1 -1
- package/dist/index51.js +4 -205
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +7 -2
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +48 -2
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +25 -5
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +50 -33
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +7 -26
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +14 -7
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +133 -11
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +10 -3
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +214 -45
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +13 -51
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +33 -7
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +45 -13
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +7 -133
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +48 -9
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +3 -216
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +6 -13
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +27 -46
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +50 -50
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +9 -4
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +205 -6
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +2 -28
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +2 -50
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +2 -9
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +2 -2
- package/dist/index76.js +12 -2
- package/dist/index76.js.map +1 -1
- package/dist/index80.js +47 -52
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +205 -4
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +22 -5
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +24 -15
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +399 -5
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +46 -7
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +604 -15
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +52 -5
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +4 -4
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +4 -5
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +15 -5
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +4 -3
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +6 -3
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +15 -5
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +4 -24
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +4 -6
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +5 -4
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +5 -6
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +3 -4
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +4 -4
- package/dist/index99.js.map +1 -1
- package/package.json +6 -6
package/dist/index12.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index12.js","sources":["../src/components/DayPickerField/index.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight, CalendarDays } from \"lucide-react\"\nimport * as React from \"react\"\nimport { DismissableLayerBranch } from \"@radix-ui/react-dismissable-layer\"\nimport { createPortal } from \"react-dom\"\nimport { DayPicker as ReactDayPicker, dateMatchModifiers } from \"react-day-picker\"\nimport { IMaskInput } from \"react-imask\"\nimport IMask, { InputMask } from \"imask\"\n\nimport { useIsTouchDevice } from \"@/helpers/useIsTouchDevice\"\nimport { cn } from \"@/lib/utils\"\n\n\n// WARNING: used to preserve input mask even with tree shaking\n// DO NOT REMOVE THIS CODE OR THIS COMMENT\nconst imaskAny = IMask as any\nif (typeof imaskAny.InputMask !== \"function\") {\n imaskAny.InputMask = InputMask\n}\n\n\nexport type DayPickerProps = React.ComponentProps<typeof ReactDayPicker>\n\nexport function DayPicker({\n className,\n classNames,\n components,\n showOutsideDays = true,\n ...props\n}: DayPickerProps) {\n return (\n <ReactDayPicker\n weekStartsOn={1}\n showOutsideDays={showOutsideDays}\n className={cn(\"p-3\", className)}\n classNames={{\n month: \"space-y-4\",\n months: \"flex flex-col sm:flex-row space-y-4 sm:space-y-0 relative gap-2\",\n month_caption: \"flex justify-center pt-1 relative items-center\",\n month_grid: \"w-full border-collapse space-y-1\",\n caption_label: \"text-sm font-medium\",\n nav: \"flex items-center justify-between absolute inset-x-0 z-10\",\n button_previous:\n \"inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent p-0 opacity-50 shadow-sm transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 z-10\",\n button_next:\n \"inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent p-0 opacity-50 shadow-sm transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 z-10\",\n weeks: \"w-full border-collapse\",\n weekdays: \"flex\",\n weekday: \"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]\",\n week: \"flex w-full mt-2\",\n day: \"h-9 w-9 p-0 font-normal aria-selected:opacity-100 rounded-md first:aria-selected:rounded-l-md last:aria-selected:rounded-r-md\",\n day_button:\n \"inline-flex h-9 w-9 items-center justify-center rounded-md p-0 text-center text-sm font-normal transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n range_start:\n \"day-range-start !bg-accent rounded-l-md [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground\",\n range_end:\n \"day-range-end !bg-accent rounded-r-md [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground\",\n range_middle: \"aria-selected:bg-accent aria-selected:text-accent-foreground !rounded-none\",\n day_selected:\n \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\n day_today: \"bg-accent text-accent-foreground\",\n day_outside: \"day-outside text-muted-foreground aria-selected:text-muted-foreground\",\n day_disabled: \"text-muted-foreground opacity-50\",\n day_hidden: \"invisible\",\n selected:\n \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\n today: \"bg-gray-50 text-accent-foreground !rounded-md\",\n outside:\n \"day-outside text-muted-foreground opacity-50 !aria-selected:bg-accent/50 !aria-selected:text-muted-foreground !aria-selected:opacity-30\",\n disabled: \"text-muted-foreground opacity-50\",\n hidden: \"invisible\",\n ...classNames,\n }}\n components={{\n Chevron: (chevronProps) =>\n chevronProps.orientation === \"left\" ? (\n <ChevronLeft {...chevronProps} className=\"h-4 w-4\" />\n ) : (\n <ChevronRight {...chevronProps} className=\"h-4 w-4\" />\n ),\n ...components,\n }}\n {...props}\n />\n )\n}\n\nDayPicker.displayName = \"DayPicker\"\n\nfunction pad2(value: number) {\n return String(value).padStart(2, \"0\")\n}\n\nfunction startOfDay(date: Date) {\n const next = new Date(date)\n next.setHours(0, 0, 0, 0)\n return next\n}\n\nfunction startOfMonth(date: Date) {\n return startOfDay(new Date(date.getFullYear(), date.getMonth(), 1))\n}\n\nfunction monthIndex(date: Date) {\n return date.getFullYear() * 12 + date.getMonth()\n}\n\nfunction monthFromIndex(index: number) {\n const year = Math.floor(index / 12)\n const month = index - year * 12\n return startOfDay(new Date(year, month, 1))\n}\n\nfunction formatDayInput(date: Date) {\n return `${pad2(date.getDate())}/${pad2(date.getMonth() + 1)}/${date.getFullYear()}`\n}\n\nfunction buildDate({ day, month, year }: { day: number; month: number; year: number }): Date | null {\n if (!Number.isFinite(day) || !Number.isFinite(month) || !Number.isFinite(year)) return null\n\n const date = new Date(year, month - 1, day)\n if (\n date.getFullYear() !== year ||\n date.getMonth() !== month - 1 ||\n date.getDate() !== day\n ) {\n return null\n }\n\n return startOfDay(date)\n}\n\nfunction parseDayInput(value: string, now: Date): Date | null {\n const trimmed = value.trim()\n if (!trimmed) return null\n\n const full = /^(\\d{2})\\/(\\d{2})\\/(\\d{4})$/.exec(trimmed)\n if (full) {\n return buildDate({ day: Number(full[1]), month: Number(full[2]), year: Number(full[3]) })\n }\n\n const shortYear = /^(\\d{2})\\/(\\d{2})\\/(\\d{2})$/.exec(trimmed)\n if (shortYear) {\n const year = Number(shortYear[3])\n if (!Number.isFinite(year)) return null\n return buildDate({ day: Number(shortYear[1]), month: Number(shortYear[2]), year: 2000 + year })\n }\n\n const noYear = /^(\\d{2})\\/(\\d{2})$/.exec(trimmed)\n if (noYear) {\n return buildDate({ day: Number(noYear[1]), month: Number(noYear[2]), year: now.getFullYear() })\n }\n\n return null\n}\n\nexport type DayPickerInputProps = Omit<\n React.ComponentProps<\"input\">,\n \"value\" | \"defaultValue\" | \"onChange\" | \"type\"\n> & {\n value: Date | null\n onChange: (value: Date | null) => void\n onValueUpdate?: (value: Date | null) => void\n inputClassName?: string\n open?: boolean\n onOpenChange?: (open: boolean) => void\n dayPickerComponent?: React.ComponentType<DayPickerProps>\n dayPickerProps?: Omit<DayPickerProps, \"mode\" | \"selected\" | \"onSelect\" | \"month\" | \"onMonthChange\">\n}\n\nexport const DayPickerInput = React.forwardRef<HTMLInputElement, DayPickerInputProps>(\n function DayPickerInput(\n {\n value,\n onChange,\n onValueUpdate,\n className,\n inputClassName,\n placeholder = \"DD/MM/YYYY\",\n disabled,\n readOnly,\n open: openProp,\n onOpenChange,\n dayPickerComponent,\n dayPickerProps,\n onFocus,\n onBlur,\n onKeyDown,\n onPointerDown,\n onMouseDown,\n ...rest\n },\n forwardedRef,\n ) {\n const rootRef = React.useRef<HTMLDivElement | null>(null)\n const popoverRef = React.useRef<HTMLDivElement | null>(null)\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n const isFocusedRef = React.useRef(false)\n const openRef = React.useRef(false)\n const pointerDownOnInputRef = React.useRef(false)\n const inputWasFocusedOnPointerDownRef = React.useRef(false)\n const pointerDownInPopoverRef = React.useRef(false)\n const ignoreNextMaskCompleteValueRef = React.useRef<string | null>(null)\n\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false)\n const open = openProp ?? uncontrolledOpen\n const setOpen = onOpenChange ?? setUncontrolledOpen\n openRef.current = open\n const [draft, setDraft] = React.useState(() => (value ? formatDayInput(value) : \"\"))\n const draftSelection = React.useMemo(() => parseDayInput(draft, new Date()), [draft])\n const [month, setMonth] = React.useState(() => startOfMonth(value ?? new Date()))\n const monthRef = React.useRef(month)\n monthRef.current = month\n const [popoverPosition, setPopoverPosition] = React.useState(() => ({\n left: 0,\n top: 0,\n }))\n const numberOfMonths = Math.max(1, dayPickerProps?.numberOfMonths ?? 1)\n const wasOpenRef = React.useRef(open)\n\n const updateValue = React.useCallback(\n (next: Date | null) => {\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n },\n [onValueUpdate],\n )\n\n const commitValue = React.useCallback(\n (next: Date | null) => {\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n onChange(next)\n },\n [onChange, onValueUpdate],\n )\n\n React.useEffect(() => {\n if (isFocusedRef.current) return\n setDraft(value ? formatDayInput(value) : \"\")\n }, [value])\n\n React.useEffect(() => {\n const wasOpen = wasOpenRef.current\n wasOpenRef.current = open\n\n if (!open) return\n\n const nextSelection = value ?? new Date()\n const nextSelectionMonthIndex = monthIndex(nextSelection)\n\n if (!wasOpen) {\n setMonth(monthFromIndex(nextSelectionMonthIndex))\n return\n }\n\n const visibleStartMonthIndex = monthIndex(monthRef.current)\n const visibleEndMonthIndex = visibleStartMonthIndex + numberOfMonths - 1\n\n if (nextSelectionMonthIndex < visibleStartMonthIndex) {\n setMonth(monthFromIndex(nextSelectionMonthIndex))\n return\n }\n\n if (nextSelectionMonthIndex > visibleEndMonthIndex) {\n setMonth(monthFromIndex(nextSelectionMonthIndex - (numberOfMonths - 1)))\n }\n }, [numberOfMonths, open, value])\n\n React.useEffect(() => {\n if (!open) return\n if (!draftSelection) return\n\n const selectionMonthIndex = monthIndex(draftSelection)\n const visibleStartMonthIndex = monthIndex(monthRef.current)\n const visibleEndMonthIndex = visibleStartMonthIndex + numberOfMonths - 1\n\n if (selectionMonthIndex < visibleStartMonthIndex) {\n setMonth(monthFromIndex(selectionMonthIndex))\n return\n }\n\n if (selectionMonthIndex > visibleEndMonthIndex) {\n setMonth(monthFromIndex(selectionMonthIndex - (numberOfMonths - 1)))\n }\n }, [draftSelection, numberOfMonths, open])\n\n React.useEffect(() => {\n if (!open) return\n\n const ownerDocument = rootRef.current?.ownerDocument ?? document\n const ownerWindow = ownerDocument.defaultView ?? window\n\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target\n if (!(target instanceof Node)) return\n if (rootRef.current?.contains(target)) return\n if (popoverRef.current?.contains(target)) return\n setOpen(false)\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return\n if (!openRef.current) return\n const target = event.target\n if (!(target instanceof Node)) return\n if (!rootRef.current?.contains(target) && !popoverRef.current?.contains(target)) return\n event.preventDefault()\n event.stopPropagation()\n setOpen(false)\n }\n\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown, true)\n ownerWindow.addEventListener(\"keydown\", handleKeyDown, true)\n return () => {\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown, true)\n ownerWindow.removeEventListener(\"keydown\", handleKeyDown, true)\n }\n }, [open])\n\n React.useEffect(() => {\n if (!open) {\n return\n }\n if (typeof window === \"undefined\") {\n return\n }\n if (!(\"IntersectionObserver\" in window)) {\n return\n }\n\n const root = rootRef.current\n if (!root) {\n return\n }\n\n let isActive = true\n const observer = new IntersectionObserver(entries => {\n if (!isActive) {\n return\n }\n const entry = entries[0]\n if (entry && !entry.isIntersecting) {\n setOpen(false)\n }\n })\n observer.observe(root)\n return () => {\n isActive = false\n observer.disconnect()\n }\n }, [open])\n\n const setRefs = React.useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node\n if (typeof forwardedRef === \"function\") {\n forwardedRef(node)\n } else if (forwardedRef) {\n forwardedRef.current = node\n }\n },\n [forwardedRef],\n )\n\n const closePopover = () => setOpen(false)\n\n const DayPickerComponent = dayPickerComponent ?? DayPicker\n\n const updatePopoverPosition = React.useCallback(() => {\n if (typeof window === \"undefined\") return\n const root = rootRef.current\n const popover = popoverRef.current\n if (!root || !popover) return\n\n const rect = root.getBoundingClientRect()\n const popoverWidth = popover.offsetWidth\n const popoverHeight = popover.offsetHeight\n const viewportWidth = window.innerWidth ?? 0\n const viewportHeight = window.innerHeight ?? 0\n const padding = 8\n\n let left = rect.left\n if (left + popoverWidth > viewportWidth - padding) {\n left = Math.max(padding, viewportWidth - popoverWidth - padding)\n }\n if (left < padding) {\n left = padding\n }\n\n let top = rect.bottom + padding\n const overflowBottom = top + popoverHeight > viewportHeight - padding\n const aboveTop = rect.top - popoverHeight - padding\n if (overflowBottom && aboveTop >= padding) {\n top = aboveTop\n }\n\n if (top < padding) {\n top = padding\n }\n if (top + popoverHeight > viewportHeight - padding) {\n top = Math.max(padding, viewportHeight - popoverHeight - padding)\n }\n\n setPopoverPosition({ left, top })\n }, [])\n\n // React Compiler rejects hook aliasing (useIsomorphicLayoutEffect pattern), so we\n // call useLayoutEffect directly and keep the SSR guard inside the effect.\n React.useLayoutEffect(() => {\n if (!open || disabled) return\n if (typeof window === \"undefined\") return\n\n updatePopoverPosition()\n const rafId = window.requestAnimationFrame(updatePopoverPosition)\n\n window.addEventListener(\"scroll\", updatePopoverPosition, true)\n window.addEventListener(\"resize\", updatePopoverPosition)\n return () => {\n window.cancelAnimationFrame(rafId)\n window.removeEventListener(\"scroll\", updatePopoverPosition, true)\n window.removeEventListener(\"resize\", updatePopoverPosition)\n }\n }, [disabled, open, updatePopoverPosition])\n\n return (\n <div ref={rootRef} data-slot=\"day-picker-input\" className={cn(\"relative group\", className)}>\n <IMaskInput\n {...rest}\n data-slot=\"day-picker-input-input\"\n disabled={disabled}\n readOnly={readOnly}\n autoComplete=\"off\"\n inputRef={setRefs}\n mask={[\n { mask: \"00/00\", lazy: true },\n { mask: \"00/00/00\", lazy: true },\n { mask: \"00/00/0000\", lazy: true },\n ]}\n dispatch={(appended, dynamicMasked) => {\n const digits = (dynamicMasked.value + appended).replace(/\\D/g, \"\")\n if (digits.length <= 4) return dynamicMasked.compiledMasks[0]\n if (digits.length <= 6) return dynamicMasked.compiledMasks[1]\n return dynamicMasked.compiledMasks[2]\n }}\n placeholder={placeholder}\n value={draft}\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background py-2 pr-3 pl-[37px] text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"transition-colors group-hover:bg-accent group-hover:text-accent-foreground\",\n inputClassName\n )}\n onAccept={(nextValue) => {\n const next = typeof nextValue === \"string\" ? nextValue : String(nextValue ?? \"\")\n const previousDigitsLength = draft.replace(/\\D/g, \"\").length\n setDraft(next)\n if (next.replace(/\\D/g, \"\").length === 0) {\n if (open) {\n setMonth(startOfMonth(new Date()))\n }\n if (previousDigitsLength !== 0) {\n updateValue(null)\n }\n }\n }}\n onComplete={(completedValue) => {\n const next = typeof completedValue === \"string\"\n ? completedValue\n : String(completedValue ?? \"\")\n if (ignoreNextMaskCompleteValueRef.current === next) {\n ignoreNextMaskCompleteValueRef.current = null\n return\n }\n const parsed = parseDayInput(next, new Date())\n if (!parsed) return\n if (value && parsed.getTime() === startOfDay(value).getTime()) {\n return\n }\n updateValue(parsed)\n }}\n onPointerDown={(event) => {\n pointerDownOnInputRef.current = true\n inputWasFocusedOnPointerDownRef.current =\n typeof document !== \"undefined\" && document.activeElement === event.currentTarget\n onPointerDown?.(event)\n }}\n onMouseDown={(event) => {\n pointerDownOnInputRef.current = true\n inputWasFocusedOnPointerDownRef.current =\n typeof document !== \"undefined\" && document.activeElement === event.currentTarget\n onMouseDown?.(event)\n }}\n onFocus={(event) => {\n const shouldSelectAll =\n !pointerDownOnInputRef.current || !inputWasFocusedOnPointerDownRef.current\n pointerDownOnInputRef.current = false\n inputWasFocusedOnPointerDownRef.current = false\n isFocusedRef.current = true\n onFocus?.(event)\n if (shouldSelectAll) {\n const element = event.currentTarget\n requestAnimationFrame(() => element.select())\n }\n if (!disabled) {\n setOpen(true)\n }\n }}\n onKeyDown={(event) => {\n const wasDefaultPrevented = event.defaultPrevented\n onKeyDown?.(event)\n if (!wasDefaultPrevented && event.defaultPrevented) {\n return\n }\n\n if (event.key === \"Enter\") {\n if (!draftSelection) {\n return\n }\n event.preventDefault()\n if (open) {\n const isoDay = `${draftSelection.getFullYear()}-${pad2(draftSelection.getMonth() + 1)}-${pad2(draftSelection.getDate())}`\n const dayButton = popoverRef.current?.querySelector(\n `[data-day='${isoDay}']:not([data-outside]) button`,\n )\n if (dayButton instanceof HTMLButtonElement) {\n if (dayButton.disabled) {\n return\n }\n dayButton.focus()\n }\n }\n setDraft(formatDayInput(draftSelection))\n commitValue(draftSelection)\n setOpen(false)\n return\n }\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowDown\") {\n const base = draftSelection ?? value\n if (!base) {\n return\n }\n\n const next = startOfDay(new Date(base))\n next.setDate(next.getDate() + (event.key === \"ArrowUp\" ? 1 : -1))\n\n if (dayPickerProps?.disabled && dateMatchModifiers(next, dayPickerProps.disabled)) {\n return\n }\n\n event.preventDefault()\n const formatted = formatDayInput(next)\n ignoreNextMaskCompleteValueRef.current = formatted\n setDraft(formatted)\n updateValue(next)\n }\n\n if (!open) {\n const shouldReopen =\n (event.key.length === 1 ||\n event.key === \"Backspace\" ||\n event.key === \"Delete\" ||\n event.key === \"ArrowUp\" ||\n event.key === \"ArrowDown\") &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n\n if (shouldReopen) {\n setOpen(true)\n }\n }\n\n if (event.key === \"Tab\" && !event.defaultPrevented) {\n setOpen(false)\n }\n }}\n onBlur={(event) => {\n isFocusedRef.current = false\n onBlur?.(event)\n const blurFromPopoverPointerDown = pointerDownInPopoverRef.current\n pointerDownInPopoverRef.current = false\n if (blurFromPopoverPointerDown) {\n return\n }\n\n const relatedTarget = event.relatedTarget\n if (relatedTarget instanceof Node) {\n const root = rootRef.current\n if (!root) {\n return\n }\n\n if (root.contains(relatedTarget) || popoverRef.current?.contains(relatedTarget)) {\n return\n }\n }\n\n if (open && typeof window !== \"undefined\") {\n requestAnimationFrame(() => {\n const root = rootRef.current\n if (!root) {\n return\n }\n const activeElement = document.activeElement\n if (\n activeElement &&\n (root.contains(activeElement) || popoverRef.current?.contains(activeElement))\n ) {\n return\n }\n setOpen(false)\n })\n }\n const trimmed = draft.trim()\n if (trimmed === \"\") {\n if (value) {\n setDraft(\"\")\n commitValue(null)\n }\n return\n }\n const parsed = parseDayInput(trimmed, new Date())\n if (parsed) {\n setDraft(formatDayInput(parsed))\n if (!value || parsed.getTime() !== startOfDay(value).getTime()) {\n commitValue(parsed)\n }\n return\n }\n setDraft(value ? formatDayInput(value) : \"\")\n }}\n />\n\n <button\n type=\"button\"\n tabIndex={-1}\n disabled={disabled}\n aria-label=\"Open calendar\"\n data-slot=\"day-picker-input-trigger\"\n className=\"absolute left-[13px] top-1/2 -translate-y-1/2 text-muted-foreground transition-colors group-hover:text-accent-foreground\"\n onPointerDown={(event) => {\n event.preventDefault()\n if (disabled) {\n return\n }\n inputRef.current?.focus({ preventScroll: true })\n }}\n onMouseDown={(event) => {\n event.preventDefault()\n if (disabled) {\n return\n }\n inputRef.current?.focus({ preventScroll: true })\n }}\n onClick={() => {\n if (disabled) {\n return\n }\n inputRef.current?.focus({ preventScroll: true })\n setOpen(true)\n }}\n >\n <CalendarDays aria-hidden className=\"size-4\" />\n </button>\n\n {open && !disabled && (() => {\n const selectedDay = draft.trim() === \"\"\n ? undefined\n : draftSelection ?? value ?? undefined\n\n const popover = (\n <DismissableLayerBranch>\n <div\n ref={popoverRef}\n data-slot=\"day-picker-input-popover\"\n className=\"pointer-events-auto fixed z-[60] w-max rounded-md border bg-popover text-popover-foreground shadow-md\"\n style={{ left: popoverPosition.left, top: popoverPosition.top }}\n onPointerDownCapture={() => {\n pointerDownInPopoverRef.current = true\n }}\n onMouseDownCapture={() => {\n pointerDownInPopoverRef.current = true\n }}\n >\n <DayPickerComponent\n mode=\"single\"\n month={month}\n onMonthChange={setMonth}\n selected={selectedDay}\n onSelect={(date) => {\n if (!date) {\n if (value) {\n commitValue(null)\n }\n setDraft(\"\")\n closePopover()\n return\n }\n\n const normalized = startOfDay(date)\n if (!value || normalized.getTime() !== startOfDay(value).getTime()) {\n commitValue(normalized)\n }\n setDraft(formatDayInput(normalized))\n closePopover()\n }}\n {...dayPickerProps}\n />\n </div>\n </DismissableLayerBranch>\n )\n\n if (typeof document === \"undefined\") return popover\n return createPortal(popover, document.body)\n })()}\n </div>\n )\n }\n)\n\nDayPickerInput.displayName = \"DayPickerInput\"\n\nexport type DayPickerFieldProps = {\n id?: string\n value: Date | null\n onChange: (value: Date | null) => void\n onValueUpdate?: (value: Date | null) => void\n className?: string\n inputClassName?: string\n placeholder?: string\n disabled?: boolean\n readOnly?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n dayPickerComponent?: React.ComponentType<DayPickerProps>\n dayPickerProps?: Omit<DayPickerProps, \"mode\" | \"selected\" | \"onSelect\" | \"month\" | \"onMonthChange\">\n triggerTestId?: string\n isHydrated?: boolean\n}\n\nfunction DayPickerButtonField({\n id,\n value,\n onChange,\n onValueUpdate,\n className,\n inputClassName,\n placeholder = \"DD/MM/YYYY\",\n disabled,\n open: openProp,\n onOpenChange,\n dayPickerComponent,\n dayPickerProps,\n triggerTestId,\n isHydrated,\n}: DayPickerFieldProps) {\n const rootRef = React.useRef<HTMLDivElement | null>(null)\n const popoverRef = React.useRef<HTMLDivElement | null>(null)\n const openRef = React.useRef(false)\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false)\n const open = openProp ?? uncontrolledOpen\n const setOpen = onOpenChange ?? setUncontrolledOpen\n openRef.current = open\n const [month, setMonth] = React.useState(() => startOfMonth(value ?? new Date()))\n const [popoverPosition, setPopoverPosition] = React.useState(() => ({\n left: 0,\n top: 0,\n }))\n\n React.useEffect(() => {\n if (!open) return\n setMonth(startOfMonth(value ?? new Date()))\n }, [open, value])\n\n React.useEffect(() => {\n if (!open) return\n\n const ownerDocument = rootRef.current?.ownerDocument ?? document\n const ownerWindow = ownerDocument.defaultView ?? window\n\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target\n if (!(target instanceof Node)) return\n if (rootRef.current?.contains(target)) return\n if (popoverRef.current?.contains(target)) return\n setOpen(false)\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return\n if (!openRef.current) return\n const target = event.target\n if (!(target instanceof Node)) return\n if (!rootRef.current?.contains(target) && !popoverRef.current?.contains(target)) return\n event.preventDefault()\n event.stopPropagation()\n setOpen(false)\n }\n\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown, true)\n ownerWindow.addEventListener(\"keydown\", handleKeyDown, true)\n return () => {\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown, true)\n ownerWindow.removeEventListener(\"keydown\", handleKeyDown, true)\n }\n }, [open])\n\n React.useEffect(() => {\n if (!open) {\n return\n }\n if (typeof window === \"undefined\") {\n return\n }\n if (!(\"IntersectionObserver\" in window)) {\n return\n }\n\n const root = rootRef.current\n if (!root) {\n return\n }\n\n let isActive = true\n const observer = new IntersectionObserver(entries => {\n if (!isActive) {\n return\n }\n const entry = entries[0]\n if (entry && !entry.isIntersecting) {\n setOpen(false)\n }\n })\n observer.observe(root)\n return () => {\n isActive = false\n observer.disconnect()\n }\n }, [open])\n\n const DayPickerComponent = dayPickerComponent ?? DayPicker\n\n const updatePopoverPosition = React.useCallback(() => {\n if (typeof window === \"undefined\") return\n const root = rootRef.current\n const popover = popoverRef.current\n if (!root || !popover) return\n\n const rect = root.getBoundingClientRect()\n const popoverWidth = popover.offsetWidth\n const popoverHeight = popover.offsetHeight\n const viewportWidth = window.innerWidth ?? 0\n const viewportHeight = window.innerHeight ?? 0\n const padding = 8\n\n let left = rect.left\n if (left + popoverWidth > viewportWidth - padding) {\n left = Math.max(padding, viewportWidth - popoverWidth - padding)\n }\n if (left < padding) {\n left = padding\n }\n\n let top = rect.bottom + padding\n const overflowBottom = top + popoverHeight > viewportHeight - padding\n const aboveTop = rect.top - popoverHeight - padding\n if (overflowBottom && aboveTop >= padding) {\n top = aboveTop\n }\n\n if (top < padding) {\n top = padding\n }\n if (top + popoverHeight > viewportHeight - padding) {\n top = Math.max(padding, viewportHeight - popoverHeight - padding)\n }\n\n setPopoverPosition({ left, top })\n }, [])\n\n // React Compiler rejects hook aliasing (useIsomorphicLayoutEffect pattern), so we\n // call useLayoutEffect directly and keep the SSR guard inside the effect.\n React.useLayoutEffect(() => {\n if (!open || disabled) return\n if (typeof window === \"undefined\") return\n\n updatePopoverPosition()\n const rafId = window.requestAnimationFrame(updatePopoverPosition)\n\n window.addEventListener(\"scroll\", updatePopoverPosition, true)\n window.addEventListener(\"resize\", updatePopoverPosition)\n return () => {\n window.cancelAnimationFrame(rafId)\n window.removeEventListener(\"scroll\", updatePopoverPosition, true)\n window.removeEventListener(\"resize\", updatePopoverPosition)\n }\n }, [disabled, open, updatePopoverPosition])\n\n const commitValue = React.useCallback(\n (next: Date | null) => {\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n onChange(next)\n },\n [onChange, onValueUpdate],\n )\n\n return (\n <div ref={rootRef} data-slot=\"day-picker-input\" className={cn(\"relative group\", className)}>\n <button\n id={id}\n type=\"button\"\n disabled={disabled}\n data-testid={triggerTestId}\n data-hydrated={isHydrated ? \"true\" : undefined}\n data-slot=\"day-picker-input-input\"\n className={cn(\n \"flex h-10 w-full items-center rounded-md border border-input bg-background px-3 py-2 text-left text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"transition-colors group-hover:bg-accent group-hover:text-accent-foreground\",\n !value && \"text-muted-foreground\",\n open && \"ring-2 ring-primary ring-offset-2\",\n inputClassName,\n )}\n onClick={() => {\n if (disabled) return\n setOpen(!open)\n }}\n >\n <CalendarDays\n aria-hidden\n className=\"mr-2 size-4 text-muted-foreground transition-colors group-hover:text-accent-foreground\"\n />\n {value ? formatDayInput(value) : placeholder}\n </button>\n\n {open && !disabled && (() => {\n const popover = (\n <DismissableLayerBranch>\n <div\n ref={popoverRef}\n data-slot=\"day-picker-input-popover\"\n className=\"pointer-events-auto fixed z-[60] w-max rounded-md border bg-popover text-popover-foreground shadow-md\"\n style={{ left: popoverPosition.left, top: popoverPosition.top }}\n >\n <DayPickerComponent\n mode=\"single\"\n month={month}\n onMonthChange={setMonth}\n selected={value ?? undefined}\n onSelect={(date) => {\n if (!date) {\n commitValue(null)\n setOpen(false)\n return\n }\n\n const normalized = startOfDay(date)\n if (!value || normalized.getTime() !== startOfDay(value).getTime()) {\n commitValue(normalized)\n }\n setOpen(false)\n }}\n {...dayPickerProps}\n />\n </div>\n </DismissableLayerBranch>\n )\n\n if (typeof document === \"undefined\") return popover\n return createPortal(popover, document.body)\n })()}\n </div>\n )\n}\n\nexport function DayPickerField(props: DayPickerFieldProps) {\n const isTouchDevice = useIsTouchDevice()\n\n if (isTouchDevice) {\n return <DayPickerButtonField {...props} />\n }\n\n const {\n id,\n value,\n onChange,\n onValueUpdate,\n className,\n inputClassName,\n placeholder = \"DD/MM/YYYY\",\n disabled,\n readOnly,\n dayPickerComponent,\n dayPickerProps,\n triggerTestId,\n isHydrated,\n open,\n onOpenChange,\n } = props\n\n return (\n <DayPickerInput\n id={id}\n value={value}\n onChange={onChange}\n onValueUpdate={onValueUpdate}\n className={className}\n inputClassName={inputClassName}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n open={open}\n onOpenChange={onOpenChange}\n dayPickerComponent={dayPickerComponent}\n dayPickerProps={dayPickerProps}\n data-testid={triggerTestId}\n data-hydrated={isHydrated ? \"true\" : undefined}\n />\n )\n}\n"],"names":["imaskAny","IMask","InputMask","DayPicker","t0","$","_c","className","classNames","components","props","t1","showOutsideDays","undefined","t2","cn","t3","month","months","month_caption","month_grid","caption_label","nav","button_previous","button_next","weeks","weekdays","weekday","week","day","day_button","range_start","range_end","range_middle","day_selected","day_today","day_outside","day_disabled","day_hidden","selected","today","outside","disabled","hidden","t4","Chevron","_temp","t5","jsx","ReactDayPicker","chevronProps","orientation","ChevronLeft","ChevronRight","displayName","pad2","value","String","padStart","startOfDay","date","next","Date","setHours","startOfMonth","getFullYear","getMonth","monthIndex","monthFromIndex","index","year","Math","floor","formatDayInput","getDate","buildDate","Number","isFinite","parseDayInput","now","trimmed","trim","full","exec","shortYear","noYear","DayPickerInput","React","forwardRef","onChange","onValueUpdate","inputClassName","placeholder","readOnly","open","openProp","onOpenChange","dayPickerComponent","dayPickerProps","onFocus","onBlur","onKeyDown","onPointerDown","onMouseDown","rest","forwardedRef","rootRef","useRef","popoverRef","inputRef","isFocusedRef","openRef","pointerDownOnInputRef","inputWasFocusedOnPointerDownRef","pointerDownInPopoverRef","ignoreNextMaskCompleteValueRef","uncontrolledOpen","setUncontrolledOpen","useState","setOpen","current","draft","setDraft","draftSelection","useMemo","setMonth","monthRef","popoverPosition","setPopoverPosition","left","top","numberOfMonths","max","wasOpenRef","updateValue","useCallback","commitValue","useEffect","wasOpen","nextSelectionMonthIndex","visibleStartMonthIndex","visibleEndMonthIndex","selectionMonthIndex","ownerDocument","document","ownerWindow","defaultView","window","handlePointerDown","event","target","Node","contains","handleKeyDown","key","preventDefault","stopPropagation","addEventListener","removeEventListener","root","isActive","observer","IntersectionObserver","entries","entry","isIntersecting","observe","disconnect","setRefs","node","closePopover","DayPickerComponent","updatePopoverPosition","popover","rect","getBoundingClientRect","popoverWidth","offsetWidth","popoverHeight","offsetHeight","viewportWidth","innerWidth","viewportHeight","innerHeight","padding","bottom","overflowBottom","aboveTop","useLayoutEffect","rafId","requestAnimationFrame","cancelAnimationFrame","jsxs","IMaskInput","mask","lazy","appended","dynamicMasked","digits","replace","length","compiledMasks","nextValue","previousDigitsLength","completedValue","parsed","getTime","activeElement","currentTarget","shouldSelectAll","element","select","wasDefaultPrevented","defaultPrevented","isoDay","dayButton","querySelector","HTMLButtonElement","focus","base","setDate","dateMatchModifiers","formatted","ctrlKey","metaKey","altKey","blurFromPopoverPointerDown","relatedTarget","preventScroll","CalendarDays","selectedDay","DismissableLayerBranch","normalized","createPortal","body","DayPickerButtonField","id","triggerTestId","isHydrated","DayPickerField","useIsTouchDevice"],"mappings":";;;;;;;;;;;;AAcA,MAAMA,KAAWC;AACb,OAAOD,GAASE,aAAc,eAChCF,GAASE,YAAYA;AAMhB,SAAAC,GAAAC,GAAA;AAAA,QAAAC,IAAAC,GAAAA,EAAA,EAAA;AAAA,MAAA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AAA,CAAA,MAAAuO,KAAAvO,EAAA,CAAA,MAAAsF,KAAAtF,EAAA,CAAA,MAAAoF,KAAApF,SAAA2F,KAAA3F,EAAA,EAAA,MAAAqF,KAAArF,EAAA,EAAA,MAAAyF,KAAAzF,EAAA,EAAA,MAAAuF,KAAAvF,EAAA,EAAA,MAAAwF,KAAAxF,EAAA,EAAA,MAAAM,KAAAN,EAAA,EAAA,MAAAwO,KAAAxO,EAAA,EAAA,MAAAmD,KAfhD1C,0BAACwE,IAAA,EACKsJ,IAAAA,GACGpL,OAAAA,GACGiC,UAAAA,GACKC,eAAAA,GACJnF,WAAAA,GACKoF,gBAAAA,GACHC,aAAAA,GACHlD,UAAAA,GACAmD,UAAAA,GACJC,MAAAA,GACQE,cAAAA,GACMC,oBAAAA,GACJC,gBAAAA,GACH2I,eAAAA,GACE,iBAAAlO,GAA+B,GAC9CN,OAAAE,GAAAF,OAAA4F,GAAA5F,OAAA6F,GAAA7F,OAAAqC,GAAArC,OAAAuO,GAAAvO,OAAAsF,GAAAtF,OAAAoF,GAAApF,OAAA2F,GAAA3F,QAAAqF,GAAArF,QAAAyF,GAAAzF,QAAAuF,GAAAvF,QAAAwF,GAAAxF,QAAAM,GAAAN,QAAAwO,GAAAxO,QAAAmD,GAAAnD,QAAAS,KAAAA,IAAAT,EAAA,EAAA,GAhBFS;AAgBE;"}
|
|
1
|
+
{"version":3,"file":"index12.js","sources":["../src/components/DayPickerField/index.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight, CalendarDays } from \"lucide-react\"\nimport * as React from \"react\"\nimport { DismissableLayerBranch } from \"@radix-ui/react-dismissable-layer\"\nimport { createPortal } from \"react-dom\"\nimport { DayPicker as ReactDayPicker, dateMatchModifiers } from \"react-day-picker\"\nimport { IMaskInput } from \"react-imask\"\nimport IMask, { InputMask } from \"imask\"\n\nimport { useIsTouchDevice } from \"@/helpers/useIsTouchDevice\"\nimport { cn } from \"@/lib/utils\"\n\n\n// WARNING: used to preserve input mask even with tree shaking\n// DO NOT REMOVE THIS CODE OR THIS COMMENT\nconst imaskAny = IMask as any\nif (typeof imaskAny.InputMask !== \"function\") {\n imaskAny.InputMask = InputMask\n}\n\n\nexport type DayPickerProps = React.ComponentProps<typeof ReactDayPicker>\n\nexport function DayPicker({\n className,\n classNames,\n components,\n showOutsideDays = true,\n ...props\n}: DayPickerProps) {\n return (\n <ReactDayPicker\n weekStartsOn={1}\n showOutsideDays={showOutsideDays}\n className={cn(\"p-3\", className)}\n classNames={{\n month: \"space-y-4\",\n months: \"flex flex-col sm:flex-row space-y-4 sm:space-y-0 relative gap-2\",\n month_caption: \"flex justify-center pt-1 relative items-center\",\n month_grid: \"w-full border-collapse space-y-1\",\n caption_label: \"text-sm font-medium\",\n nav: \"flex items-center justify-between absolute inset-x-0 z-10\",\n button_previous:\n \"inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent p-0 opacity-50 shadow-sm transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 z-10\",\n button_next:\n \"inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent p-0 opacity-50 shadow-sm transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 z-10\",\n weeks: \"w-full border-collapse\",\n weekdays: \"flex\",\n weekday: \"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]\",\n week: \"flex w-full mt-2\",\n day: \"h-9 w-9 p-0 font-normal aria-selected:opacity-100 rounded-md first:aria-selected:rounded-l-md last:aria-selected:rounded-r-md\",\n day_button:\n \"inline-flex h-9 w-9 items-center justify-center rounded-md p-0 text-center text-sm font-normal transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n range_start:\n \"day-range-start !bg-accent rounded-l-md [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground\",\n range_end:\n \"day-range-end !bg-accent rounded-r-md [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground\",\n range_middle: \"aria-selected:bg-accent aria-selected:text-accent-foreground !rounded-none\",\n day_selected:\n \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\n day_today: \"bg-accent text-accent-foreground\",\n day_outside: \"day-outside text-muted-foreground aria-selected:text-muted-foreground\",\n day_disabled: \"text-muted-foreground opacity-50\",\n day_hidden: \"invisible\",\n selected:\n \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\n today: \"bg-gray-50 text-accent-foreground !rounded-md\",\n outside:\n \"day-outside text-muted-foreground opacity-50 !aria-selected:bg-accent/50 !aria-selected:text-muted-foreground !aria-selected:opacity-30\",\n disabled: \"text-muted-foreground opacity-50\",\n hidden: \"invisible\",\n ...classNames,\n }}\n components={{\n Chevron: (chevronProps) =>\n chevronProps.orientation === \"left\" ? (\n <ChevronLeft {...chevronProps} className=\"h-4 w-4\" />\n ) : (\n <ChevronRight {...chevronProps} className=\"h-4 w-4\" />\n ),\n ...components,\n }}\n {...props}\n />\n )\n}\n\nDayPicker.displayName = \"DayPicker\"\n\nfunction pad2(value: number) {\n return String(value).padStart(2, \"0\")\n}\n\nfunction startOfDay(date: Date) {\n const next = new Date(date)\n next.setHours(0, 0, 0, 0)\n return next\n}\n\nfunction startOfMonth(date: Date) {\n return startOfDay(new Date(date.getFullYear(), date.getMonth(), 1))\n}\n\nfunction formatDayInput(date: Date) {\n return `${pad2(date.getDate())}/${pad2(date.getMonth() + 1)}/${date.getFullYear()}`\n}\n\nfunction buildDate({ day, month, year }: { day: number; month: number; year: number }): Date | null {\n if (!Number.isFinite(day) || !Number.isFinite(month) || !Number.isFinite(year)) return null\n\n const date = new Date(year, month - 1, day)\n if (\n date.getFullYear() !== year ||\n date.getMonth() !== month - 1 ||\n date.getDate() !== day\n ) {\n return null\n }\n\n return startOfDay(date)\n}\n\nfunction parseDayInput(value: string, now: Date): Date | null {\n const trimmed = value.trim()\n if (!trimmed) return null\n\n const full = /^(\\d{2})\\/(\\d{2})\\/(\\d{4})$/.exec(trimmed)\n if (full) {\n return buildDate({ day: Number(full[1]), month: Number(full[2]), year: Number(full[3]) })\n }\n\n const shortYear = /^(\\d{2})\\/(\\d{2})\\/(\\d{2})$/.exec(trimmed)\n if (shortYear) {\n const year = Number(shortYear[3])\n if (!Number.isFinite(year)) return null\n return buildDate({ day: Number(shortYear[1]), month: Number(shortYear[2]), year: 2000 + year })\n }\n\n const noYear = /^(\\d{2})\\/(\\d{2})$/.exec(trimmed)\n if (noYear) {\n return buildDate({ day: Number(noYear[1]), month: Number(noYear[2]), year: now.getFullYear() })\n }\n\n return null\n}\n\nexport type DayPickerInputProps = Omit<\n React.ComponentProps<\"input\">,\n \"value\" | \"defaultValue\" | \"onChange\" | \"type\"\n> & {\n value: Date | null\n onChange: (value: Date | null) => void\n onValueUpdate?: (value: Date | null) => void\n inputClassName?: string\n open?: boolean\n onOpenChange?: (open: boolean) => void\n dayPickerComponent?: React.ComponentType<DayPickerProps>\n dayPickerProps?: Omit<DayPickerProps, \"mode\" | \"selected\" | \"onSelect\" | \"month\" | \"onMonthChange\">\n}\n\nexport const DayPickerInput = React.forwardRef<HTMLInputElement, DayPickerInputProps>(\n function DayPickerInput(\n {\n value,\n onChange,\n onValueUpdate,\n className,\n inputClassName,\n placeholder = \"DD/MM/YYYY\",\n disabled,\n readOnly,\n open: openProp,\n onOpenChange,\n dayPickerComponent,\n dayPickerProps,\n onFocus,\n onBlur,\n onKeyDown,\n onPointerDown,\n onMouseDown,\n ...rest\n },\n forwardedRef,\n ) {\n const rootRef = React.useRef<HTMLDivElement | null>(null)\n const popoverRef = React.useRef<HTMLDivElement | null>(null)\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n const isFocusedRef = React.useRef(false)\n const openRef = React.useRef(false)\n const pointerDownOnInputRef = React.useRef(false)\n const inputWasFocusedOnPointerDownRef = React.useRef(false)\n const pointerDownInPopoverRef = React.useRef(false)\n const ignoreNextMaskCompleteValueRef = React.useRef<string | null>(null)\n\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false)\n const open = openProp ?? uncontrolledOpen\n const setOpen = onOpenChange ?? setUncontrolledOpen\n openRef.current = open\n const [draft, setDraft] = React.useState(() => (value ? formatDayInput(value) : \"\"))\n const draftSelection = React.useMemo(() => parseDayInput(draft, new Date()), [draft])\n const [month, setMonth] = React.useState(() => startOfMonth(value ?? new Date()))\n const [popoverPosition, setPopoverPosition] = React.useState(() => ({\n left: 0,\n top: 0,\n }))\n\n const updateValue = React.useCallback(\n (next: Date | null) => {\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n },\n [onValueUpdate],\n )\n\n const commitValue = React.useCallback(\n (next: Date | null) => {\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n onChange(next)\n },\n [onChange, onValueUpdate],\n )\n\n React.useEffect(() => {\n if (isFocusedRef.current) return\n setDraft(value ? formatDayInput(value) : \"\")\n }, [value])\n\n React.useEffect(() => {\n if (!open) return\n setMonth(startOfMonth(value ?? new Date()))\n }, [open, value])\n\n React.useEffect(() => {\n if (!open) return\n if (!draftSelection) return\n setMonth(startOfMonth(draftSelection))\n }, [draftSelection, open])\n\n React.useEffect(() => {\n if (!open) return\n\n const ownerDocument = rootRef.current?.ownerDocument ?? document\n const ownerWindow = ownerDocument.defaultView ?? window\n\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target\n if (!(target instanceof Node)) return\n if (rootRef.current?.contains(target)) return\n if (popoverRef.current?.contains(target)) return\n setOpen(false)\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return\n if (!openRef.current) return\n const target = event.target\n if (!(target instanceof Node)) return\n if (!rootRef.current?.contains(target) && !popoverRef.current?.contains(target)) return\n event.preventDefault()\n event.stopPropagation()\n setOpen(false)\n }\n\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown, true)\n ownerWindow.addEventListener(\"keydown\", handleKeyDown, true)\n return () => {\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown, true)\n ownerWindow.removeEventListener(\"keydown\", handleKeyDown, true)\n }\n }, [open])\n\n React.useEffect(() => {\n if (!open) {\n return\n }\n if (typeof window === \"undefined\") {\n return\n }\n if (!(\"IntersectionObserver\" in window)) {\n return\n }\n\n const root = rootRef.current\n if (!root) {\n return\n }\n\n let isActive = true\n const observer = new IntersectionObserver(entries => {\n if (!isActive) {\n return\n }\n const entry = entries[0]\n if (entry && !entry.isIntersecting) {\n setOpen(false)\n }\n })\n observer.observe(root)\n return () => {\n isActive = false\n observer.disconnect()\n }\n }, [open])\n\n const setRefs = React.useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node\n if (typeof forwardedRef === \"function\") {\n forwardedRef(node)\n } else if (forwardedRef) {\n forwardedRef.current = node\n }\n },\n [forwardedRef],\n )\n\n const closePopover = () => setOpen(false)\n\n const DayPickerComponent = dayPickerComponent ?? DayPicker\n\n const updatePopoverPosition = React.useCallback(() => {\n if (typeof window === \"undefined\") return\n const root = rootRef.current\n const popover = popoverRef.current\n if (!root || !popover) return\n\n const rect = root.getBoundingClientRect()\n const popoverWidth = popover.offsetWidth\n const popoverHeight = popover.offsetHeight\n const viewportWidth = window.innerWidth ?? 0\n const viewportHeight = window.innerHeight ?? 0\n const padding = 8\n\n let left = rect.left\n if (left + popoverWidth > viewportWidth - padding) {\n left = Math.max(padding, viewportWidth - popoverWidth - padding)\n }\n if (left < padding) {\n left = padding\n }\n\n let top = rect.bottom + padding\n const overflowBottom = top + popoverHeight > viewportHeight - padding\n const aboveTop = rect.top - popoverHeight - padding\n if (overflowBottom && aboveTop >= padding) {\n top = aboveTop\n }\n\n if (top < padding) {\n top = padding\n }\n if (top + popoverHeight > viewportHeight - padding) {\n top = Math.max(padding, viewportHeight - popoverHeight - padding)\n }\n\n setPopoverPosition({ left, top })\n }, [])\n\n // React Compiler rejects hook aliasing (useIsomorphicLayoutEffect pattern), so we\n // call useLayoutEffect directly and keep the SSR guard inside the effect.\n React.useLayoutEffect(() => {\n if (!open || disabled) return\n if (typeof window === \"undefined\") return\n\n updatePopoverPosition()\n const rafId = window.requestAnimationFrame(updatePopoverPosition)\n\n window.addEventListener(\"scroll\", updatePopoverPosition, true)\n window.addEventListener(\"resize\", updatePopoverPosition)\n return () => {\n window.cancelAnimationFrame(rafId)\n window.removeEventListener(\"scroll\", updatePopoverPosition, true)\n window.removeEventListener(\"resize\", updatePopoverPosition)\n }\n }, [disabled, open, updatePopoverPosition])\n\n return (\n <div ref={rootRef} data-slot=\"day-picker-input\" className={cn(\"relative group\", className)}>\n <IMaskInput\n {...rest}\n data-slot=\"day-picker-input-input\"\n disabled={disabled}\n readOnly={readOnly}\n autoComplete=\"off\"\n inputRef={setRefs}\n mask={[\n { mask: \"00/00\", lazy: true },\n { mask: \"00/00/00\", lazy: true },\n { mask: \"00/00/0000\", lazy: true },\n ]}\n dispatch={(appended, dynamicMasked) => {\n const digits = (dynamicMasked.value + appended).replace(/\\D/g, \"\")\n if (digits.length <= 4) return dynamicMasked.compiledMasks[0]\n if (digits.length <= 6) return dynamicMasked.compiledMasks[1]\n return dynamicMasked.compiledMasks[2]\n }}\n placeholder={placeholder}\n value={draft}\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background py-2 pr-3 pl-[37px] text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"transition-colors group-hover:bg-accent group-hover:text-accent-foreground\",\n inputClassName\n )}\n onAccept={(nextValue) => {\n const next = typeof nextValue === \"string\" ? nextValue : String(nextValue ?? \"\")\n const previousDigitsLength = draft.replace(/\\D/g, \"\").length\n setDraft(next)\n if (next.replace(/\\D/g, \"\").length === 0) {\n if (open) {\n setMonth(startOfMonth(new Date()))\n }\n if (previousDigitsLength !== 0) {\n updateValue(null)\n }\n }\n }}\n onComplete={(completedValue) => {\n const next = typeof completedValue === \"string\"\n ? completedValue\n : String(completedValue ?? \"\")\n if (ignoreNextMaskCompleteValueRef.current === next) {\n ignoreNextMaskCompleteValueRef.current = null\n return\n }\n const parsed = parseDayInput(next, new Date())\n if (!parsed) return\n if (value && parsed.getTime() === startOfDay(value).getTime()) {\n return\n }\n updateValue(parsed)\n }}\n onPointerDown={(event) => {\n pointerDownOnInputRef.current = true\n inputWasFocusedOnPointerDownRef.current =\n typeof document !== \"undefined\" && document.activeElement === event.currentTarget\n onPointerDown?.(event)\n }}\n onMouseDown={(event) => {\n pointerDownOnInputRef.current = true\n inputWasFocusedOnPointerDownRef.current =\n typeof document !== \"undefined\" && document.activeElement === event.currentTarget\n onMouseDown?.(event)\n }}\n onFocus={(event) => {\n const shouldSelectAll =\n !pointerDownOnInputRef.current || !inputWasFocusedOnPointerDownRef.current\n pointerDownOnInputRef.current = false\n inputWasFocusedOnPointerDownRef.current = false\n isFocusedRef.current = true\n onFocus?.(event)\n if (shouldSelectAll) {\n const element = event.currentTarget\n requestAnimationFrame(() => element.select())\n }\n if (!disabled) {\n setOpen(true)\n }\n }}\n onKeyDown={(event) => {\n const wasDefaultPrevented = event.defaultPrevented\n onKeyDown?.(event)\n if (!wasDefaultPrevented && event.defaultPrevented) {\n return\n }\n\n if (event.key === \"Enter\") {\n if (!draftSelection) {\n return\n }\n event.preventDefault()\n if (open) {\n const isoDay = `${draftSelection.getFullYear()}-${pad2(draftSelection.getMonth() + 1)}-${pad2(draftSelection.getDate())}`\n const dayButton = popoverRef.current?.querySelector(\n `[data-day='${isoDay}']:not([data-outside]) button`,\n )\n if (dayButton instanceof HTMLButtonElement) {\n if (dayButton.disabled) {\n return\n }\n dayButton.focus()\n }\n }\n setDraft(formatDayInput(draftSelection))\n commitValue(draftSelection)\n setOpen(false)\n return\n }\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowDown\") {\n const base = draftSelection ?? value\n if (!base) {\n return\n }\n\n const next = startOfDay(new Date(base))\n next.setDate(next.getDate() + (event.key === \"ArrowUp\" ? 1 : -1))\n\n if (dayPickerProps?.disabled && dateMatchModifiers(next, dayPickerProps.disabled)) {\n return\n }\n\n event.preventDefault()\n const formatted = formatDayInput(next)\n ignoreNextMaskCompleteValueRef.current = formatted\n setDraft(formatted)\n updateValue(next)\n }\n\n if (!open) {\n const shouldReopen =\n (event.key.length === 1 ||\n event.key === \"Backspace\" ||\n event.key === \"Delete\" ||\n event.key === \"ArrowUp\" ||\n event.key === \"ArrowDown\") &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n\n if (shouldReopen) {\n setOpen(true)\n }\n }\n\n if (event.key === \"Tab\" && !event.defaultPrevented) {\n setOpen(false)\n }\n }}\n onBlur={(event) => {\n isFocusedRef.current = false\n onBlur?.(event)\n const blurFromPopoverPointerDown = pointerDownInPopoverRef.current\n pointerDownInPopoverRef.current = false\n if (blurFromPopoverPointerDown) {\n return\n }\n\n const relatedTarget = event.relatedTarget\n if (relatedTarget instanceof Node) {\n const root = rootRef.current\n if (!root) {\n return\n }\n\n if (root.contains(relatedTarget) || popoverRef.current?.contains(relatedTarget)) {\n return\n }\n }\n\n if (open && typeof window !== \"undefined\") {\n requestAnimationFrame(() => {\n const root = rootRef.current\n if (!root) {\n return\n }\n const activeElement = document.activeElement\n if (\n activeElement &&\n (root.contains(activeElement) || popoverRef.current?.contains(activeElement))\n ) {\n return\n }\n setOpen(false)\n })\n }\n const trimmed = draft.trim()\n if (trimmed === \"\") {\n if (value) {\n setDraft(\"\")\n commitValue(null)\n }\n return\n }\n const parsed = parseDayInput(trimmed, new Date())\n if (parsed) {\n setDraft(formatDayInput(parsed))\n if (!value || parsed.getTime() !== startOfDay(value).getTime()) {\n commitValue(parsed)\n }\n return\n }\n setDraft(value ? formatDayInput(value) : \"\")\n }}\n />\n\n <button\n type=\"button\"\n tabIndex={-1}\n disabled={disabled}\n aria-label=\"Open calendar\"\n data-slot=\"day-picker-input-trigger\"\n className=\"absolute left-[13px] top-1/2 -translate-y-1/2 text-muted-foreground transition-colors group-hover:text-accent-foreground\"\n onPointerDown={(event) => {\n event.preventDefault()\n if (disabled) {\n return\n }\n inputRef.current?.focus({ preventScroll: true })\n }}\n onMouseDown={(event) => {\n event.preventDefault()\n if (disabled) {\n return\n }\n inputRef.current?.focus({ preventScroll: true })\n }}\n onClick={() => {\n if (disabled) {\n return\n }\n inputRef.current?.focus({ preventScroll: true })\n setOpen(true)\n }}\n >\n <CalendarDays aria-hidden className=\"size-4\" />\n </button>\n\n {open && !disabled && (() => {\n const selectedDay = draft.trim() === \"\"\n ? undefined\n : draftSelection ?? value ?? undefined\n\n const popover = (\n <DismissableLayerBranch>\n <div\n ref={popoverRef}\n data-slot=\"day-picker-input-popover\"\n className=\"pointer-events-auto fixed z-[60] w-max rounded-md border bg-popover text-popover-foreground shadow-md\"\n style={{ left: popoverPosition.left, top: popoverPosition.top }}\n onPointerDownCapture={() => {\n pointerDownInPopoverRef.current = true\n }}\n onMouseDownCapture={() => {\n pointerDownInPopoverRef.current = true\n }}\n >\n <DayPickerComponent\n mode=\"single\"\n month={month}\n onMonthChange={setMonth}\n selected={selectedDay}\n onSelect={(date) => {\n if (!date) {\n if (value) {\n commitValue(null)\n }\n setDraft(\"\")\n closePopover()\n return\n }\n\n const normalized = startOfDay(date)\n if (!value || normalized.getTime() !== startOfDay(value).getTime()) {\n commitValue(normalized)\n }\n setDraft(formatDayInput(normalized))\n closePopover()\n }}\n {...dayPickerProps}\n />\n </div>\n </DismissableLayerBranch>\n )\n\n if (typeof document === \"undefined\") return popover\n return createPortal(popover, document.body)\n })()}\n </div>\n )\n }\n)\n\nDayPickerInput.displayName = \"DayPickerInput\"\n\nexport type DayPickerFieldProps = {\n id?: string\n value: Date | null\n onChange: (value: Date | null) => void\n onValueUpdate?: (value: Date | null) => void\n className?: string\n inputClassName?: string\n placeholder?: string\n disabled?: boolean\n readOnly?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n dayPickerComponent?: React.ComponentType<DayPickerProps>\n dayPickerProps?: Omit<DayPickerProps, \"mode\" | \"selected\" | \"onSelect\" | \"month\" | \"onMonthChange\">\n triggerTestId?: string\n isHydrated?: boolean\n}\n\nfunction DayPickerButtonField({\n id,\n value,\n onChange,\n onValueUpdate,\n className,\n inputClassName,\n placeholder = \"DD/MM/YYYY\",\n disabled,\n open: openProp,\n onOpenChange,\n dayPickerComponent,\n dayPickerProps,\n triggerTestId,\n isHydrated,\n}: DayPickerFieldProps) {\n const rootRef = React.useRef<HTMLDivElement | null>(null)\n const popoverRef = React.useRef<HTMLDivElement | null>(null)\n const openRef = React.useRef(false)\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false)\n const open = openProp ?? uncontrolledOpen\n const setOpen = onOpenChange ?? setUncontrolledOpen\n openRef.current = open\n const [month, setMonth] = React.useState(() => startOfMonth(value ?? new Date()))\n const [popoverPosition, setPopoverPosition] = React.useState(() => ({\n left: 0,\n top: 0,\n }))\n\n React.useEffect(() => {\n if (!open) return\n setMonth(startOfMonth(value ?? new Date()))\n }, [open, value])\n\n React.useEffect(() => {\n if (!open) return\n\n const ownerDocument = rootRef.current?.ownerDocument ?? document\n const ownerWindow = ownerDocument.defaultView ?? window\n\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target\n if (!(target instanceof Node)) return\n if (rootRef.current?.contains(target)) return\n if (popoverRef.current?.contains(target)) return\n setOpen(false)\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return\n if (!openRef.current) return\n const target = event.target\n if (!(target instanceof Node)) return\n if (!rootRef.current?.contains(target) && !popoverRef.current?.contains(target)) return\n event.preventDefault()\n event.stopPropagation()\n setOpen(false)\n }\n\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown, true)\n ownerWindow.addEventListener(\"keydown\", handleKeyDown, true)\n return () => {\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown, true)\n ownerWindow.removeEventListener(\"keydown\", handleKeyDown, true)\n }\n }, [open])\n\n React.useEffect(() => {\n if (!open) {\n return\n }\n if (typeof window === \"undefined\") {\n return\n }\n if (!(\"IntersectionObserver\" in window)) {\n return\n }\n\n const root = rootRef.current\n if (!root) {\n return\n }\n\n let isActive = true\n const observer = new IntersectionObserver(entries => {\n if (!isActive) {\n return\n }\n const entry = entries[0]\n if (entry && !entry.isIntersecting) {\n setOpen(false)\n }\n })\n observer.observe(root)\n return () => {\n isActive = false\n observer.disconnect()\n }\n }, [open])\n\n const DayPickerComponent = dayPickerComponent ?? DayPicker\n\n const updatePopoverPosition = React.useCallback(() => {\n if (typeof window === \"undefined\") return\n const root = rootRef.current\n const popover = popoverRef.current\n if (!root || !popover) return\n\n const rect = root.getBoundingClientRect()\n const popoverWidth = popover.offsetWidth\n const popoverHeight = popover.offsetHeight\n const viewportWidth = window.innerWidth ?? 0\n const viewportHeight = window.innerHeight ?? 0\n const padding = 8\n\n let left = rect.left\n if (left + popoverWidth > viewportWidth - padding) {\n left = Math.max(padding, viewportWidth - popoverWidth - padding)\n }\n if (left < padding) {\n left = padding\n }\n\n let top = rect.bottom + padding\n const overflowBottom = top + popoverHeight > viewportHeight - padding\n const aboveTop = rect.top - popoverHeight - padding\n if (overflowBottom && aboveTop >= padding) {\n top = aboveTop\n }\n\n if (top < padding) {\n top = padding\n }\n if (top + popoverHeight > viewportHeight - padding) {\n top = Math.max(padding, viewportHeight - popoverHeight - padding)\n }\n\n setPopoverPosition({ left, top })\n }, [])\n\n // React Compiler rejects hook aliasing (useIsomorphicLayoutEffect pattern), so we\n // call useLayoutEffect directly and keep the SSR guard inside the effect.\n React.useLayoutEffect(() => {\n if (!open || disabled) return\n if (typeof window === \"undefined\") return\n\n updatePopoverPosition()\n const rafId = window.requestAnimationFrame(updatePopoverPosition)\n\n window.addEventListener(\"scroll\", updatePopoverPosition, true)\n window.addEventListener(\"resize\", updatePopoverPosition)\n return () => {\n window.cancelAnimationFrame(rafId)\n window.removeEventListener(\"scroll\", updatePopoverPosition, true)\n window.removeEventListener(\"resize\", updatePopoverPosition)\n }\n }, [disabled, open, updatePopoverPosition])\n\n const commitValue = React.useCallback(\n (next: Date | null) => {\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n onChange(next)\n },\n [onChange, onValueUpdate],\n )\n\n return (\n <div ref={rootRef} data-slot=\"day-picker-input\" className={cn(\"relative group\", className)}>\n <button\n id={id}\n type=\"button\"\n disabled={disabled}\n data-testid={triggerTestId}\n data-hydrated={isHydrated ? \"true\" : undefined}\n data-slot=\"day-picker-input-input\"\n className={cn(\n \"flex h-10 w-full items-center rounded-md border border-input bg-background px-3 py-2 text-left text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"transition-colors group-hover:bg-accent group-hover:text-accent-foreground\",\n !value && \"text-muted-foreground\",\n open && \"ring-2 ring-primary ring-offset-2\",\n inputClassName,\n )}\n onClick={() => {\n if (disabled) return\n setOpen(!open)\n }}\n >\n <CalendarDays\n aria-hidden\n className=\"mr-2 size-4 text-muted-foreground transition-colors group-hover:text-accent-foreground\"\n />\n {value ? formatDayInput(value) : placeholder}\n </button>\n\n {open && !disabled && (() => {\n const popover = (\n <DismissableLayerBranch>\n <div\n ref={popoverRef}\n data-slot=\"day-picker-input-popover\"\n className=\"pointer-events-auto fixed z-[60] w-max rounded-md border bg-popover text-popover-foreground shadow-md\"\n style={{ left: popoverPosition.left, top: popoverPosition.top }}\n >\n <DayPickerComponent\n mode=\"single\"\n month={month}\n onMonthChange={setMonth}\n selected={value ?? undefined}\n onSelect={(date) => {\n if (!date) {\n commitValue(null)\n setOpen(false)\n return\n }\n\n const normalized = startOfDay(date)\n if (!value || normalized.getTime() !== startOfDay(value).getTime()) {\n commitValue(normalized)\n }\n setOpen(false)\n }}\n {...dayPickerProps}\n />\n </div>\n </DismissableLayerBranch>\n )\n\n if (typeof document === \"undefined\") return popover\n return createPortal(popover, document.body)\n })()}\n </div>\n )\n}\n\nexport function DayPickerField(props: DayPickerFieldProps) {\n const isTouchDevice = useIsTouchDevice()\n\n if (isTouchDevice) {\n return <DayPickerButtonField {...props} />\n }\n\n const {\n id,\n value,\n onChange,\n onValueUpdate,\n className,\n inputClassName,\n placeholder = \"DD/MM/YYYY\",\n disabled,\n readOnly,\n dayPickerComponent,\n dayPickerProps,\n triggerTestId,\n isHydrated,\n open,\n onOpenChange,\n } = props\n\n return (\n <DayPickerInput\n id={id}\n value={value}\n onChange={onChange}\n onValueUpdate={onValueUpdate}\n className={className}\n inputClassName={inputClassName}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n open={open}\n onOpenChange={onOpenChange}\n dayPickerComponent={dayPickerComponent}\n dayPickerProps={dayPickerProps}\n data-testid={triggerTestId}\n data-hydrated={isHydrated ? \"true\" : undefined}\n />\n )\n}\n"],"names":["imaskAny","IMask","InputMask","DayPicker","t0","$","_c","className","classNames","components","props","t1","showOutsideDays","undefined","t2","cn","t3","month","months","month_caption","month_grid","caption_label","nav","button_previous","button_next","weeks","weekdays","weekday","week","day","day_button","range_start","range_end","range_middle","day_selected","day_today","day_outside","day_disabled","day_hidden","selected","today","outside","disabled","hidden","t4","Chevron","_temp","t5","jsx","ReactDayPicker","chevronProps","orientation","ChevronLeft","ChevronRight","displayName","pad2","value","String","padStart","startOfDay","date","next","Date","setHours","startOfMonth","getFullYear","getMonth","formatDayInput","getDate","buildDate","year","Number","isFinite","parseDayInput","now","trimmed","trim","full","exec","shortYear","noYear","DayPickerInput","React","forwardRef","onChange","onValueUpdate","inputClassName","placeholder","readOnly","open","openProp","onOpenChange","dayPickerComponent","dayPickerProps","onFocus","onBlur","onKeyDown","onPointerDown","onMouseDown","rest","forwardedRef","rootRef","useRef","popoverRef","inputRef","isFocusedRef","openRef","pointerDownOnInputRef","inputWasFocusedOnPointerDownRef","pointerDownInPopoverRef","ignoreNextMaskCompleteValueRef","uncontrolledOpen","setUncontrolledOpen","useState","setOpen","current","draft","setDraft","draftSelection","useMemo","setMonth","popoverPosition","setPopoverPosition","left","top","updateValue","useCallback","commitValue","useEffect","ownerDocument","document","ownerWindow","defaultView","window","handlePointerDown","event","target","Node","contains","handleKeyDown","key","preventDefault","stopPropagation","addEventListener","removeEventListener","root","isActive","observer","IntersectionObserver","entries","entry","isIntersecting","observe","disconnect","setRefs","node","closePopover","DayPickerComponent","updatePopoverPosition","popover","rect","getBoundingClientRect","popoverWidth","offsetWidth","popoverHeight","offsetHeight","viewportWidth","innerWidth","viewportHeight","innerHeight","padding","Math","max","bottom","overflowBottom","aboveTop","useLayoutEffect","rafId","requestAnimationFrame","cancelAnimationFrame","jsxs","IMaskInput","mask","lazy","appended","dynamicMasked","digits","replace","length","compiledMasks","nextValue","previousDigitsLength","completedValue","parsed","getTime","activeElement","currentTarget","shouldSelectAll","element","select","wasDefaultPrevented","defaultPrevented","isoDay","dayButton","querySelector","HTMLButtonElement","focus","base","setDate","dateMatchModifiers","formatted","ctrlKey","metaKey","altKey","blurFromPopoverPointerDown","relatedTarget","preventScroll","CalendarDays","selectedDay","DismissableLayerBranch","normalized","createPortal","body","DayPickerButtonField","id","triggerTestId","isHydrated","DayPickerField","useIsTouchDevice"],"mappings":";;;;;;;;;;;;AAcA,MAAMA,KAAWC;AACb,OAAOD,GAASE,aAAc,eAChCF,GAASE,YAAYA;AAMhB,SAAAC,GAAAC,GAAA;AAAA,QAAAC,IAAAC,GAAAA,EAAA,EAAA;AAAA,MAAAC,GAAAC,GAAAC,GAAAC,GAAAC;AAAA,EAAAN,SAAAD,KAAmB;AAAA,IAAAG,WAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAG,iBAAAD;AAAAA,IAAA,GAAAD;AAAAA,E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AgF,KAAAhF,EAAA,EAAA,MAAAoF,KAAApF,EAAA,EAAA,MAAAkF,KAAAlF,EAAA,EAAA,MAAAmF,KAAAnF,EAAA,EAAA,MAAAM,KAAAN,EAAA,EAAA,MAAA4N,KAAA5N,EAAA,EAAA,MAAAmD,KAfhD1C,0BAACmE,IAAA,EACK+I,IAAAA,GACGxK,OAAAA,GACG4B,UAAAA,GACKC,eAAAA,GACJ9E,WAAAA,GACK+E,gBAAAA,GACHC,aAAAA,GACH7C,UAAAA,GACA8C,UAAAA,GACJC,MAAAA,GACQE,cAAAA,GACMC,oBAAAA,GACJC,gBAAAA,GACHoI,eAAAA,GACE,iBAAAtN,GAA+B,GAC9CN,OAAAE,GAAAF,OAAAuF,GAAAvF,OAAAwF,GAAAxF,OAAAqC,GAAArC,OAAA2N,GAAA3N,OAAAiF,GAAAjF,OAAA+E,GAAA/E,OAAAsF,GAAAtF,QAAAgF,GAAAhF,QAAAoF,GAAApF,QAAAkF,GAAAlF,QAAAmF,GAAAnF,QAAAM,GAAAN,QAAA4N,GAAA5N,QAAAmD,GAAAnD,QAAAS,KAAAA,IAAAT,EAAA,EAAA,GAhBFS;AAgBE;"}
|
package/dist/index120.js
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
})(t || (t = {}));
|
|
9
|
-
var r;
|
|
10
|
-
(function(e) {
|
|
11
|
-
e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
|
|
12
|
-
})(r || (r = {}));
|
|
13
|
-
var n;
|
|
14
|
-
(function(e) {
|
|
15
|
-
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";
|
|
16
|
-
})(n || (n = {}));
|
|
1
|
+
import * as a from "./index138.js";
|
|
2
|
+
function f(n) {
|
|
3
|
+
return n?.formatMonthCaption && !n.formatCaption && (n.formatCaption = n.formatMonthCaption), n?.formatYearCaption && !n.formatYearDropdown && (n.formatYearDropdown = n.formatYearCaption), {
|
|
4
|
+
...a,
|
|
5
|
+
...n
|
|
6
|
+
};
|
|
7
|
+
}
|
|
17
8
|
export {
|
|
18
|
-
|
|
19
|
-
t as DayFlag,
|
|
20
|
-
r as SelectionState,
|
|
21
|
-
o as UI
|
|
9
|
+
f as getFormatters
|
|
22
10
|
};
|
|
23
11
|
//# sourceMappingURL=index120.js.map
|
package/dist/index120.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index120.js","sources":["../../../node_modules/react-day-picker/dist/esm/
|
|
1
|
+
{"version":3,"file":"index120.js","sources":["../../../node_modules/react-day-picker/dist/esm/helpers/getFormatters.js"],"sourcesContent":["import * as defaultFormatters from \"../formatters/index.js\";\n/**\n * Merges custom formatters from the props with the default formatters.\n *\n * @param customFormatters The custom formatters provided in the DayPicker\n * props.\n * @returns The merged formatters object.\n */\nexport function getFormatters(customFormatters) {\n if (customFormatters?.formatMonthCaption && !customFormatters.formatCaption) {\n customFormatters.formatCaption = customFormatters.formatMonthCaption;\n }\n if (customFormatters?.formatYearCaption &&\n !customFormatters.formatYearDropdown) {\n customFormatters.formatYearDropdown = customFormatters.formatYearCaption;\n }\n return {\n ...defaultFormatters,\n ...customFormatters,\n };\n}\n"],"names":["getFormatters","customFormatters","defaultFormatters"],"mappings":";AAQO,SAASA,EAAcC,GAAkB;AAC5C,SAAIA,GAAkB,sBAAsB,CAACA,EAAiB,kBAC1DA,EAAiB,gBAAgBA,EAAiB,qBAElDA,GAAkB,qBAClB,CAACA,EAAiB,uBAClBA,EAAiB,qBAAqBA,EAAiB,oBAEpD;AAAA,IACH,GAAGC;AAAAA,IACH,GAAGD;AAAA,EACX;AACA;","x_google_ignoreList":[0]}
|
package/dist/index121.js
CHANGED
|
@@ -1,57 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
i && (i.style.zIndex = "1"), x.forEach((t, c) => {
|
|
32
|
-
const n = _[c];
|
|
33
|
-
if (!n)
|
|
34
|
-
return;
|
|
35
|
-
t.style.position = "relative", t.style.overflow = "hidden";
|
|
36
|
-
const r = w(t);
|
|
37
|
-
r && r.classList.add(v);
|
|
38
|
-
const d = h(t);
|
|
39
|
-
d && d.classList.add(m);
|
|
40
|
-
const W = () => {
|
|
41
|
-
p.current = !1, e.current && (e.current.style.isolation = ""), i && (i.style.zIndex = ""), r && r.classList.remove(v), d && d.classList.remove(m), t.style.position = "", t.style.overflow = "", t.contains(n) && t.removeChild(n);
|
|
42
|
-
};
|
|
43
|
-
n.style.pointerEvents = "none", n.style.position = "absolute", n.style.overflow = "hidden", n.setAttribute("aria-hidden", "true");
|
|
44
|
-
const C = P(n);
|
|
45
|
-
C && (C.style.opacity = "0");
|
|
46
|
-
const E = w(n);
|
|
47
|
-
E && (E.classList.add(u ? s[o.caption_before_exit] : s[o.caption_after_exit]), E.addEventListener("animationend", W));
|
|
48
|
-
const T = h(n);
|
|
49
|
-
T && T.classList.add(u ? s[o.weeks_before_exit] : s[o.weeks_after_exit]), t.insertBefore(n, t.firstChild);
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
});
|
|
1
|
+
import * as o from "./index146.js";
|
|
2
|
+
import { labelWeekday as b } from "./index154.js";
|
|
3
|
+
import { labelWeekNumberHeader as i } from "./index156.js";
|
|
4
|
+
import { labelNav as n } from "./index151.js";
|
|
5
|
+
import { labelGridcell as t } from "./index149.js";
|
|
6
|
+
import { labelGrid as d } from "./index148.js";
|
|
7
|
+
import { labelYearDropdown as p } from "./index157.js";
|
|
8
|
+
import { labelWeekNumber as m } from "./index155.js";
|
|
9
|
+
import { labelPrevious as f } from "./index153.js";
|
|
10
|
+
import { labelNext as N } from "./index152.js";
|
|
11
|
+
import { labelMonthDropdown as k } from "./index150.js";
|
|
12
|
+
import { labelDayButton as D } from "./index147.js";
|
|
13
|
+
const r = (l, a, e) => a || (e ? typeof e == "function" ? e : (...W) => e : l);
|
|
14
|
+
function Y(l, a) {
|
|
15
|
+
const e = a.locale?.labels ?? {};
|
|
16
|
+
return {
|
|
17
|
+
...o,
|
|
18
|
+
...l ?? {},
|
|
19
|
+
labelDayButton: r(D, l?.labelDayButton, e.labelDayButton),
|
|
20
|
+
labelMonthDropdown: r(k, l?.labelMonthDropdown, e.labelMonthDropdown),
|
|
21
|
+
labelNext: r(N, l?.labelNext, e.labelNext),
|
|
22
|
+
labelPrevious: r(f, l?.labelPrevious, e.labelPrevious),
|
|
23
|
+
labelWeekNumber: r(m, l?.labelWeekNumber, e.labelWeekNumber),
|
|
24
|
+
labelYearDropdown: r(p, l?.labelYearDropdown, e.labelYearDropdown),
|
|
25
|
+
labelGrid: r(d, l?.labelGrid, e.labelGrid),
|
|
26
|
+
labelGridcell: r(t, l?.labelGridcell, e.labelGridcell),
|
|
27
|
+
labelNav: r(n, l?.labelNav, e.labelNav),
|
|
28
|
+
labelWeekNumberHeader: r(i, l?.labelWeekNumberHeader, e.labelWeekNumberHeader),
|
|
29
|
+
labelWeekday: r(b, l?.labelWeekday, e.labelWeekday)
|
|
30
|
+
};
|
|
53
31
|
}
|
|
54
32
|
export {
|
|
55
|
-
|
|
33
|
+
Y as getLabels
|
|
56
34
|
};
|
|
57
35
|
//# sourceMappingURL=index121.js.map
|
package/dist/index121.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index121.js","sources":["../../../node_modules/react-day-picker/dist/esm/useAnimation.js"],"sourcesContent":["import { useLayoutEffect, useRef } from \"react\";\nimport { Animation } from \"./UI.js\";\nconst asHtmlElement = (element) => {\n if (element instanceof HTMLElement)\n return element;\n return null;\n};\nconst queryMonthEls = (element) => [\n ...(element.querySelectorAll(\"[data-animated-month]\") ?? []),\n];\nconst queryMonthEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-month]\"));\nconst queryCaptionEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-caption]\"));\nconst queryWeeksEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-weeks]\"));\nconst queryNavEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-nav]\"));\nconst queryWeekdaysEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-weekdays]\"));\n/**\n * Handles animations for transitioning between months in the DayPicker\n * component.\n *\n * @private\n * @param rootElRef - A reference to the root element of the DayPicker\n * component.\n * @param enabled - Whether animations are enabled.\n * @param options - Configuration options for the animation, including class\n * names, months, focused day, and the date utility library.\n */\nexport function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib, }) {\n const previousRootElSnapshotRef = useRef(null);\n const previousMonthsRef = useRef(months);\n const animatingRef = useRef(false);\n useLayoutEffect(() => {\n // get previous months before updating the previous months ref\n const previousMonths = previousMonthsRef.current;\n // update previous months ref for next effect trigger\n previousMonthsRef.current = months;\n if (!enabled ||\n !rootElRef.current ||\n // safety check because the ref can be set to anything by consumers\n !(rootElRef.current instanceof HTMLElement) ||\n // validation required for the animation to work as expected\n months.length === 0 ||\n previousMonths.length === 0 ||\n months.length !== previousMonths.length) {\n return;\n }\n const isSameMonth = dateLib.isSameMonth(months[0].date, previousMonths[0].date);\n const isAfterPreviousMonth = dateLib.isAfter(months[0].date, previousMonths[0].date);\n const captionAnimationClass = isAfterPreviousMonth\n ? classNames[Animation.caption_after_enter]\n : classNames[Animation.caption_before_enter];\n const weeksAnimationClass = isAfterPreviousMonth\n ? classNames[Animation.weeks_after_enter]\n : classNames[Animation.weeks_before_enter];\n // get previous root element snapshot before updating the snapshot ref\n const previousRootElSnapshot = previousRootElSnapshotRef.current;\n // update snapshot for next effect trigger\n const rootElSnapshot = rootElRef.current.cloneNode(true);\n if (rootElSnapshot instanceof HTMLElement) {\n // if this effect is triggered while animating, we need to clean up the new root snapshot\n // to put it in the same state as when not animating, to correctly animate the next month change\n const currentMonthElsSnapshot = queryMonthEls(rootElSnapshot);\n currentMonthElsSnapshot.forEach((currentMonthElSnapshot) => {\n if (!(currentMonthElSnapshot instanceof HTMLElement))\n return;\n // remove the old month snapshots from the new root snapshot\n const previousMonthElSnapshot = queryMonthEl(currentMonthElSnapshot);\n if (previousMonthElSnapshot &&\n currentMonthElSnapshot.contains(previousMonthElSnapshot)) {\n currentMonthElSnapshot.removeChild(previousMonthElSnapshot);\n }\n // remove animation classes from the new month snapshots\n const captionEl = queryCaptionEl(currentMonthElSnapshot);\n if (captionEl) {\n captionEl.classList.remove(captionAnimationClass);\n }\n const weeksEl = queryWeeksEl(currentMonthElSnapshot);\n if (weeksEl) {\n weeksEl.classList.remove(weeksAnimationClass);\n }\n });\n previousRootElSnapshotRef.current = rootElSnapshot;\n }\n else {\n previousRootElSnapshotRef.current = null;\n }\n if (animatingRef.current ||\n isSameMonth ||\n // skip animation if a day is focused because it can cause issues to the animation and is better for a11y\n focused) {\n return;\n }\n const previousMonthEls = previousRootElSnapshot instanceof HTMLElement\n ? queryMonthEls(previousRootElSnapshot)\n : [];\n const currentMonthEls = queryMonthEls(rootElRef.current);\n if (currentMonthEls?.every((el) => el instanceof HTMLElement) &&\n previousMonthEls &&\n previousMonthEls.every((el) => el instanceof HTMLElement)) {\n animatingRef.current = true;\n const cleanUpFunctions = [];\n // set isolation to isolate to isolate the stacking context during animation\n rootElRef.current.style.isolation = \"isolate\";\n // set z-index to 1 to ensure the nav is clickable over the other elements being animated\n const navEl = queryNavEl(rootElRef.current);\n if (navEl) {\n navEl.style.zIndex = \"1\";\n }\n currentMonthEls.forEach((currentMonthEl, index) => {\n const previousMonthEl = previousMonthEls[index];\n if (!previousMonthEl) {\n return;\n }\n // animate new displayed month\n currentMonthEl.style.position = \"relative\";\n currentMonthEl.style.overflow = \"hidden\";\n const captionEl = queryCaptionEl(currentMonthEl);\n if (captionEl) {\n captionEl.classList.add(captionAnimationClass);\n }\n const weeksEl = queryWeeksEl(currentMonthEl);\n if (weeksEl) {\n weeksEl.classList.add(weeksAnimationClass);\n }\n // animate new displayed month end\n const cleanUp = () => {\n animatingRef.current = false;\n if (rootElRef.current) {\n rootElRef.current.style.isolation = \"\";\n }\n if (navEl) {\n navEl.style.zIndex = \"\";\n }\n if (captionEl) {\n captionEl.classList.remove(captionAnimationClass);\n }\n if (weeksEl) {\n weeksEl.classList.remove(weeksAnimationClass);\n }\n currentMonthEl.style.position = \"\";\n currentMonthEl.style.overflow = \"\";\n if (currentMonthEl.contains(previousMonthEl)) {\n currentMonthEl.removeChild(previousMonthEl);\n }\n };\n cleanUpFunctions.push(cleanUp);\n // animate old displayed month\n previousMonthEl.style.pointerEvents = \"none\";\n previousMonthEl.style.position = \"absolute\";\n previousMonthEl.style.overflow = \"hidden\";\n previousMonthEl.setAttribute(\"aria-hidden\", \"true\");\n // hide the weekdays container of the old month and only the new one\n const previousWeekdaysEl = queryWeekdaysEl(previousMonthEl);\n if (previousWeekdaysEl) {\n previousWeekdaysEl.style.opacity = \"0\";\n }\n const previousCaptionEl = queryCaptionEl(previousMonthEl);\n if (previousCaptionEl) {\n previousCaptionEl.classList.add(isAfterPreviousMonth\n ? classNames[Animation.caption_before_exit]\n : classNames[Animation.caption_after_exit]);\n previousCaptionEl.addEventListener(\"animationend\", cleanUp);\n }\n const previousWeeksEl = queryWeeksEl(previousMonthEl);\n if (previousWeeksEl) {\n previousWeeksEl.classList.add(isAfterPreviousMonth\n ? classNames[Animation.weeks_before_exit]\n : classNames[Animation.weeks_after_exit]);\n }\n currentMonthEl.insertBefore(previousMonthEl, currentMonthEl.firstChild);\n });\n }\n });\n}\n"],"names":["asHtmlElement","element","queryMonthEls","queryMonthEl","queryCaptionEl","queryWeeksEl","queryNavEl","queryWeekdaysEl","useAnimation","rootElRef","enabled","classNames","months","focused","dateLib","previousRootElSnapshotRef","useRef","previousMonthsRef","animatingRef","useLayoutEffect","previousMonths","isSameMonth","isAfterPreviousMonth","captionAnimationClass","Animation","weeksAnimationClass","previousRootElSnapshot","rootElSnapshot","currentMonthElSnapshot","previousMonthElSnapshot","captionEl","weeksEl","previousMonthEls","currentMonthEls","el","navEl","currentMonthEl","index","previousMonthEl","cleanUp","previousWeekdaysEl","previousCaptionEl","previousWeeksEl"],"mappings":";;AAEA,MAAMA,IAAgB,CAACC,MACfA,aAAmB,cACZA,IACJ,MAELC,IAAgB,CAACD,MAAY;AAAA,EAC/B,GAAIA,EAAQ,iBAAiB,uBAAuB,KAAK,CAAA;AAC7D,GACME,IAAe,CAACF,MAAYD,EAAcC,EAAQ,cAAc,uBAAuB,CAAC,GACxFG,IAAiB,CAACH,MAAYD,EAAcC,EAAQ,cAAc,yBAAyB,CAAC,GAC5FI,IAAe,CAACJ,MAAYD,EAAcC,EAAQ,cAAc,uBAAuB,CAAC,GACxFK,IAAa,CAACL,MAAYD,EAAcC,EAAQ,cAAc,qBAAqB,CAAC,GACpFM,IAAkB,CAACN,MAAYD,EAAcC,EAAQ,cAAc,0BAA0B,CAAC;AAY7F,SAASO,EAAaC,GAAWC,GAAS,EAAE,YAAAC,GAAY,QAAAC,GAAQ,SAAAC,GAAS,SAAAC,KAAY;AACxF,QAAMC,IAA4BC,EAAO,IAAI,GACvCC,IAAoBD,EAAOJ,CAAM,GACjCM,IAAeF,EAAO,EAAK;AACjC,EAAAG,EAAgB,MAAM;AAElB,UAAMC,IAAiBH,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C,EAAaiC,CAAe;AACpD,QAAII,KACAA,EAAgB,UAAU,IAAIpB,IACxBX,EAAWa,EAAU,iBAAiB,IACtCb,EAAWa,EAAU,gBAAgB,CAAC,GAEhDY,EAAe,aAAaE,GAAiBF,EAAe,UAAU;AAAA,MAC1E,CAAC;AAAA,IACL;AAAA,EACJ,CAAC;AACL;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index121.js","sources":["../../../node_modules/react-day-picker/dist/esm/helpers/getLabels.js"],"sourcesContent":["import * as defaultLabels from \"../labels/index.js\";\nconst resolveLabel = (defaultLabel, customLabel, localeLabel) => {\n if (customLabel)\n return customLabel;\n if (localeLabel) {\n return (typeof localeLabel === \"function\"\n ? localeLabel\n : (..._args) => localeLabel);\n }\n return defaultLabel;\n};\n/**\n * Merges custom labels from the props with the default labels.\n *\n * When available, uses the locale-provided translation for `labelNext`.\n *\n * @param customLabels The custom labels provided in the DayPicker props.\n * @param options Options from the date library, used to resolve locale\n * translations.\n * @returns The merged labels object with locale-aware defaults.\n */\nexport function getLabels(customLabels, options) {\n const localeLabels = options.locale?.labels ?? {};\n return {\n ...defaultLabels,\n ...(customLabels ?? {}),\n labelDayButton: resolveLabel(defaultLabels.labelDayButton, customLabels?.labelDayButton, localeLabels.labelDayButton),\n labelMonthDropdown: resolveLabel(defaultLabels.labelMonthDropdown, customLabels?.labelMonthDropdown, localeLabels.labelMonthDropdown),\n labelNext: resolveLabel(defaultLabels.labelNext, customLabels?.labelNext, localeLabels.labelNext),\n labelPrevious: resolveLabel(defaultLabels.labelPrevious, customLabels?.labelPrevious, localeLabels.labelPrevious),\n labelWeekNumber: resolveLabel(defaultLabels.labelWeekNumber, customLabels?.labelWeekNumber, localeLabels.labelWeekNumber),\n labelYearDropdown: resolveLabel(defaultLabels.labelYearDropdown, customLabels?.labelYearDropdown, localeLabels.labelYearDropdown),\n labelGrid: resolveLabel(defaultLabels.labelGrid, customLabels?.labelGrid, localeLabels.labelGrid),\n labelGridcell: resolveLabel(defaultLabels.labelGridcell, customLabels?.labelGridcell, localeLabels.labelGridcell),\n labelNav: resolveLabel(defaultLabels.labelNav, customLabels?.labelNav, localeLabels.labelNav),\n labelWeekNumberHeader: resolveLabel(defaultLabels.labelWeekNumberHeader, customLabels?.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),\n labelWeekday: resolveLabel(defaultLabels.labelWeekday, customLabels?.labelWeekday, localeLabels.labelWeekday),\n };\n}\n"],"names":["resolveLabel","defaultLabel","customLabel","localeLabel","_args","getLabels","customLabels","options","localeLabels","defaultLabels","defaultLabels.labelDayButton","defaultLabels.labelMonthDropdown","defaultLabels.labelNext","defaultLabels.labelPrevious","defaultLabels.labelWeekNumber","defaultLabels.labelYearDropdown","defaultLabels.labelGrid","defaultLabels.labelGridcell","defaultLabels.labelNav","defaultLabels.labelWeekNumberHeader","defaultLabels.labelWeekday"],"mappings":";;;;;;;;;;;;AACA,MAAMA,IAAe,CAACC,GAAcC,GAAaC,MACzCD,MAEAC,IACQ,OAAOA,KAAgB,aACzBA,IACA,IAAIC,MAAUD,IAEjBF;AAYJ,SAASI,EAAUC,GAAcC,GAAS;AAC7C,QAAMC,IAAeD,EAAQ,QAAQ,UAAU,CAAA;AAC/C,SAAO;AAAA,IACH,GAAGE;AAAAA,IACH,GAAIH,KAAgB,CAAA;AAAA,IACpB,gBAAgBN,EAAaU,GAA8BJ,GAAc,gBAAgBE,EAAa,cAAc;AAAA,IACpH,oBAAoBR,EAAaW,GAAkCL,GAAc,oBAAoBE,EAAa,kBAAkB;AAAA,IACpI,WAAWR,EAAaY,GAAyBN,GAAc,WAAWE,EAAa,SAAS;AAAA,IAChG,eAAeR,EAAaa,GAA6BP,GAAc,eAAeE,EAAa,aAAa;AAAA,IAChH,iBAAiBR,EAAac,GAA+BR,GAAc,iBAAiBE,EAAa,eAAe;AAAA,IACxH,mBAAmBR,EAAae,GAAiCT,GAAc,mBAAmBE,EAAa,iBAAiB;AAAA,IAChI,WAAWR,EAAagB,GAAyBV,GAAc,WAAWE,EAAa,SAAS;AAAA,IAChG,eAAeR,EAAaiB,GAA6BX,GAAc,eAAeE,EAAa,aAAa;AAAA,IAChH,UAAUR,EAAakB,GAAwBZ,GAAc,UAAUE,EAAa,QAAQ;AAAA,IAC5F,uBAAuBR,EAAamB,GAAqCb,GAAc,uBAAuBE,EAAa,qBAAqB;AAAA,IAChJ,cAAcR,EAAaoB,GAA4Bd,GAAc,cAAcE,EAAa,YAAY;AAAA,EACpH;AACA;","x_google_ignoreList":[0]}
|
package/dist/index122.js
CHANGED
|
@@ -1,76 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { getWeeks as V } from "./index228.js";
|
|
11
|
-
import { useControlledValue as Z } from "./index229.js";
|
|
12
|
-
function _(e, n) {
|
|
13
|
-
const [s, a] = q(e, n), { startOfMonth: i, endOfMonth: g } = n, h = c(e, s, a, n), [m, f] = Z(
|
|
14
|
-
h,
|
|
15
|
-
// initialMonth is always computed from props.month if provided
|
|
16
|
-
e.month ? h : void 0
|
|
17
|
-
);
|
|
18
|
-
D(() => {
|
|
19
|
-
const t = c(e, s, a, n);
|
|
20
|
-
f(t);
|
|
21
|
-
}, [e.timeZone]);
|
|
22
|
-
const { months: l, weeks: M, days: u, previousMonth: k, nextMonth: v } = S(() => {
|
|
23
|
-
const t = E(m, a, { numberOfMonths: e.numberOfMonths }, n), o = N(t, e.endMonth ? g(e.endMonth) : void 0, {
|
|
24
|
-
ISOWeek: e.ISOWeek,
|
|
25
|
-
fixedWeeks: e.fixedWeeks,
|
|
26
|
-
broadcastCalendar: e.broadcastCalendar
|
|
27
|
-
}, n), r = b(t, o, {
|
|
28
|
-
broadcastCalendar: e.broadcastCalendar,
|
|
29
|
-
fixedWeeks: e.fixedWeeks,
|
|
30
|
-
ISOWeek: e.ISOWeek,
|
|
31
|
-
reverseMonths: e.reverseMonths
|
|
32
|
-
}, n), C = V(r), y = w(r), I = P(m, s, e, n), T = F(m, a, e, n);
|
|
33
|
-
return {
|
|
34
|
-
months: r,
|
|
35
|
-
weeks: C,
|
|
36
|
-
days: y,
|
|
37
|
-
previousMonth: I,
|
|
38
|
-
nextMonth: T
|
|
39
|
-
};
|
|
40
|
-
}, [
|
|
41
|
-
n,
|
|
42
|
-
m.getTime(),
|
|
43
|
-
a?.getTime(),
|
|
44
|
-
s?.getTime(),
|
|
45
|
-
e.disableNavigation,
|
|
46
|
-
e.broadcastCalendar,
|
|
47
|
-
e.endMonth?.getTime(),
|
|
48
|
-
e.fixedWeeks,
|
|
49
|
-
e.ISOWeek,
|
|
50
|
-
e.numberOfMonths,
|
|
51
|
-
e.pagedNavigation,
|
|
52
|
-
e.reverseMonths
|
|
53
|
-
]), { disableNavigation: W, onMonthChange: O } = e, x = (t) => M.some((o) => o.days.some((r) => r.isEqualTo(t))), d = (t) => {
|
|
54
|
-
if (W)
|
|
55
|
-
return;
|
|
56
|
-
let o = i(t);
|
|
57
|
-
s && o < i(s) && (o = i(s)), a && o > i(a) && (o = i(a)), f(o), O?.(o);
|
|
58
|
-
};
|
|
59
|
-
return {
|
|
60
|
-
months: l,
|
|
61
|
-
weeks: M,
|
|
62
|
-
days: u,
|
|
63
|
-
navStart: s,
|
|
64
|
-
navEnd: a,
|
|
65
|
-
previousMonth: k,
|
|
66
|
-
nextMonth: v,
|
|
67
|
-
goToMonth: d,
|
|
68
|
-
goToDay: (t) => {
|
|
69
|
-
x(t) || d(t.date);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
1
|
+
function d(o, n, s, a, e) {
|
|
2
|
+
const { startOfMonth: r, startOfYear: c, endOfYear: f, eachMonthOfInterval: l, getMonth: p } = e;
|
|
3
|
+
return l({
|
|
4
|
+
start: c(o),
|
|
5
|
+
end: f(o)
|
|
6
|
+
}).map((t) => {
|
|
7
|
+
const O = a.formatMonthDropdown(t, e), h = p(t), u = n && t < r(n) || s && t > r(s) || !1;
|
|
8
|
+
return { value: h, label: O, disabled: u };
|
|
9
|
+
});
|
|
72
10
|
}
|
|
73
11
|
export {
|
|
74
|
-
|
|
12
|
+
d as getMonthOptions
|
|
75
13
|
};
|
|
76
14
|
//# sourceMappingURL=index122.js.map
|