ivt 0.4.6 → 0.4.8
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/accordion/index.mjs +15 -15
- package/dist/alert/index.mjs +2 -2
- package/dist/alert-dialog/index.mjs +17 -17
- package/dist/aspect-ratio/index.mjs +1 -1
- package/dist/avatar/index.mjs +7 -7
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.d.ts +9 -35
- package/dist/base/index.mjs +64 -65
- package/dist/base/index.mjs.map +1 -1
- package/dist/breadcrumb/index.mjs +5 -5
- package/dist/button/index.mjs +3 -3
- package/dist/calendar/index.mjs +8 -8
- package/dist/card/index.mjs +2 -2
- package/dist/carousel/index.mjs +4 -4
- package/dist/chart/index.mjs +65 -5
- package/dist/chart/index.mjs.map +1 -1
- package/dist/checkbox/index.mjs +13 -13
- package/dist/chunks/{Container-sBmoUJ1A.mjs → Container-Bk3WDmXq.mjs} +2 -2
- package/dist/chunks/{Container-sBmoUJ1A.mjs.map → Container-Bk3WDmXq.mjs.map} +1 -1
- package/dist/chunks/{_commonjsHelpers-DMx7h_rP.mjs → _commonjsHelpers-7oHtoXzW.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-7oHtoXzW.mjs.map +1 -0
- package/dist/chunks/{accordion-BEzCfjyX.mjs → accordion-O8UQxSxk.mjs} +11 -11
- package/dist/chunks/{accordion-BEzCfjyX.mjs.map → accordion-O8UQxSxk.mjs.map} +1 -1
- package/dist/chunks/{badge-poifvE-U.mjs → badge-DK4Kv-Pv.mjs} +2 -2
- package/dist/chunks/{badge-poifvE-U.mjs.map → badge-DK4Kv-Pv.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-8KEENQOJ.mjs → bundle-mjs-DH6vf6gy.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-8KEENQOJ.mjs.map → bundle-mjs-DH6vf6gy.mjs.map} +1 -1
- package/dist/chunks/{button-TULRIYFO.mjs → button-By6p3Bsx.mjs} +2 -2
- package/dist/chunks/{button-TULRIYFO.mjs.map → button-By6p3Bsx.mjs.map} +1 -1
- package/dist/chunks/{calendar-nJ5T1YgK.mjs → calendar-BMDZ5epm.mjs} +205 -40
- package/dist/chunks/calendar-BMDZ5epm.mjs.map +1 -0
- package/dist/chunks/{check-DcPt24aD.mjs → check-I-Hz86Bu.mjs} +2 -2
- package/dist/chunks/{check-DcPt24aD.mjs.map → check-I-Hz86Bu.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-BNw46No-.mjs → chevron-down-BChdO0uD.mjs} +2 -2
- package/dist/chunks/{chevron-down-BNw46No-.mjs.map → chevron-down-BChdO0uD.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-B-ZN622G.mjs → chevron-left-DTNQBpUD.mjs} +2 -2
- package/dist/chunks/{chevron-left-B-ZN622G.mjs.map → chevron-left-DTNQBpUD.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-Ddz8dCda.mjs → chevron-right-Cc8XUA4m.mjs} +2 -2
- package/dist/chunks/{chevron-right-Ddz8dCda.mjs.map → chevron-right-Cc8XUA4m.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-ChXPuZd6.mjs → chevrons-up-down-D7M3-587.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-ChXPuZd6.mjs.map → chevrons-up-down-D7M3-587.mjs.map} +1 -1
- package/dist/chunks/{command-D6QS1LFL.mjs → command-0Ir07spf.mjs} +8 -8
- package/dist/chunks/{command-D6QS1LFL.mjs.map → command-0Ir07spf.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-DOOu6ntc.mjs → createLucideIcon-C_iAsC8V.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-DOOu6ntc.mjs.map → createLucideIcon-C_iAsC8V.mjs.map} +1 -1
- package/dist/chunks/{dialog-BefJPh8X.mjs → dialog-DgjQIzg0.mjs} +4 -4
- package/dist/chunks/{dialog-BefJPh8X.mjs.map → dialog-DgjQIzg0.mjs.map} +1 -1
- package/dist/chunks/{ellipsis-Cwr1X9R2.mjs → ellipsis-DZCE7oYT.mjs} +2 -2
- package/dist/chunks/{ellipsis-Cwr1X9R2.mjs.map → ellipsis-DZCE7oYT.mjs.map} +1 -1
- package/dist/chunks/{hover-card-CcNjcMZa.mjs → hover-card-kziSplk3.mjs} +11 -11
- package/dist/chunks/{hover-card-CcNjcMZa.mjs.map → hover-card-kziSplk3.mjs.map} +1 -1
- package/dist/chunks/{index-e34k5BX3.mjs → index-B9cFm0ac.mjs} +1 -1
- package/dist/chunks/{index-e34k5BX3.mjs.map → index-B9cFm0ac.mjs.map} +1 -1
- package/dist/chunks/{index-DvLErdHO.mjs → index-BF-RSDzg.mjs} +1 -1
- package/dist/chunks/{index-DvLErdHO.mjs.map → index-BF-RSDzg.mjs.map} +1 -1
- package/dist/chunks/{index-EfpXtubk.mjs → index-BQaJNtas.mjs} +5 -5
- package/dist/chunks/{index-EfpXtubk.mjs.map → index-BQaJNtas.mjs.map} +1 -1
- package/dist/chunks/{index-BCsiqIRL.mjs → index-BYwOnxY9.mjs} +1 -1
- package/dist/chunks/{index-BCsiqIRL.mjs.map → index-BYwOnxY9.mjs.map} +1 -1
- package/dist/chunks/{index-DDe3wbsL.mjs → index-B_sik0X8.mjs} +1 -1
- package/dist/chunks/{index-DDe3wbsL.mjs.map → index-B_sik0X8.mjs.map} +1 -1
- package/dist/chunks/{index-Bb31UsVK.mjs → index-Bfm-YFEU.mjs} +1 -1
- package/dist/chunks/{index-Bb31UsVK.mjs.map → index-Bfm-YFEU.mjs.map} +1 -1
- package/dist/chunks/{index-CSiM72Dy.mjs → index-Bhg2_PY7.mjs} +1 -1
- package/dist/chunks/{index-CSiM72Dy.mjs.map → index-Bhg2_PY7.mjs.map} +1 -1
- package/dist/chunks/{index-CQc8iXpK.mjs → index-Bq7RTW2y.mjs} +11 -11
- package/dist/chunks/{index-CQc8iXpK.mjs.map → index-Bq7RTW2y.mjs.map} +1 -1
- package/dist/chunks/{index-CK9CWim6.mjs → index-C8MYZd8G.mjs} +2 -2
- package/dist/chunks/{index-CK9CWim6.mjs.map → index-C8MYZd8G.mjs.map} +1 -1
- package/dist/chunks/{index-CjtaP9C4.mjs → index-CIezYkdT.mjs} +1 -1
- package/dist/chunks/{index-CjtaP9C4.mjs.map → index-CIezYkdT.mjs.map} +1 -1
- package/dist/chunks/{index-BwVg1Kb5.mjs → index-CZ5Lcw2b.mjs} +1 -1
- package/dist/chunks/{index-BwVg1Kb5.mjs.map → index-CZ5Lcw2b.mjs.map} +1 -1
- package/dist/chunks/{index-CWMDV9qs.mjs → index-Ch7F9sXl.mjs} +2 -2
- package/dist/chunks/{index-CWMDV9qs.mjs.map → index-Ch7F9sXl.mjs.map} +1 -1
- package/dist/chunks/{index-BnNdF3Y6.mjs → index-D6oieYoA.mjs} +9 -9
- package/dist/chunks/{index-BnNdF3Y6.mjs.map → index-D6oieYoA.mjs.map} +1 -1
- package/dist/chunks/{index-D1qT_gBX.mjs → index-DmfDMAo5.mjs} +1 -1
- package/dist/chunks/{index-D1qT_gBX.mjs.map → index-DmfDMAo5.mjs.map} +1 -1
- package/dist/chunks/{index-P1gmXtXB.mjs → index-DvGV9EWr.mjs} +3 -3
- package/dist/chunks/{index-P1gmXtXB.mjs.map → index-DvGV9EWr.mjs.map} +1 -1
- package/dist/chunks/{index-DejfSFbY.mjs → index-DwkdRROB.mjs} +7 -7
- package/dist/chunks/{index-DejfSFbY.mjs.map → index-DwkdRROB.mjs.map} +1 -1
- package/dist/chunks/{index-DSL6rasA.mjs → index-Dx_b8MUs.mjs} +9 -9
- package/dist/chunks/{index-DSL6rasA.mjs.map → index-Dx_b8MUs.mjs.map} +1 -1
- package/dist/chunks/{index-D7B2_9g4.mjs → index-QmLTwiGV.mjs} +2 -2
- package/dist/chunks/{index-D7B2_9g4.mjs.map → index-QmLTwiGV.mjs.map} +1 -1
- package/dist/chunks/{index-DoRi3lh9.mjs → index-THb_GTJh.mjs} +2 -2
- package/dist/chunks/{index-DoRi3lh9.mjs.map → index-THb_GTJh.mjs.map} +1 -1
- package/dist/chunks/{index-JyHiZGQv.mjs → index-fWNPF8HK.mjs} +15 -15
- package/dist/chunks/{index-JyHiZGQv.mjs.map → index-fWNPF8HK.mjs.map} +1 -1
- package/dist/chunks/{index-1tph_k2t.mjs → index-kx2sJ01P.mjs} +1 -1
- package/dist/chunks/{index-1tph_k2t.mjs.map → index-kx2sJ01P.mjs.map} +1 -1
- package/dist/chunks/{index-0fdTSdHQ.mjs → index-qjWZItTF.mjs} +5 -5
- package/dist/chunks/{index-0fdTSdHQ.mjs.map → index-qjWZItTF.mjs.map} +1 -1
- package/dist/chunks/{index-Cl4mLFZO.mjs → index-vM3wkbBM.mjs} +3 -3
- package/dist/chunks/{index-Cl4mLFZO.mjs.map → index-vM3wkbBM.mjs.map} +1 -1
- package/dist/chunks/{input-CDsq1Xde.mjs → input-Ck6shWlC.mjs} +2 -2
- package/dist/chunks/{input-CDsq1Xde.mjs.map → input-Ck6shWlC.mjs.map} +1 -1
- package/dist/chunks/{label-BzGy6SRg.mjs → label-VIPrkCET.mjs} +3 -3
- package/dist/chunks/{label-BzGy6SRg.mjs.map → label-VIPrkCET.mjs.map} +1 -1
- package/dist/chunks/{pagination-CfFGN_ib.mjs → pagination-Dm7nWzum.mjs} +6 -6
- package/dist/chunks/{pagination-CfFGN_ib.mjs.map → pagination-Dm7nWzum.mjs.map} +1 -1
- package/dist/chunks/{popover-BlSoIp_B.mjs → popover-C9351eP_.mjs} +13 -13
- package/dist/chunks/{popover-BlSoIp_B.mjs.map → popover-C9351eP_.mjs.map} +1 -1
- package/dist/chunks/{progress-CIapbA26.mjs → progress-mirm5NVY.mjs} +4 -4
- package/dist/chunks/{progress-CIapbA26.mjs.map → progress-mirm5NVY.mjs.map} +1 -1
- package/dist/chunks/pt-BR-BaLtJ-uU.mjs +3275 -0
- package/dist/chunks/pt-BR-BaLtJ-uU.mjs.map +1 -0
- package/dist/chunks/{scroll-area-BE1y6Igy.mjs → scroll-area-NkdCgHkI.mjs} +11 -11
- package/dist/chunks/{scroll-area-BE1y6Igy.mjs.map → scroll-area-NkdCgHkI.mjs.map} +1 -1
- package/dist/chunks/{select-BBb0ke76.mjs → select-CGW1Mv2b.mjs} +5 -5
- package/dist/chunks/{select-BBb0ke76.mjs.map → select-CGW1Mv2b.mjs.map} +1 -1
- package/dist/chunks/{separator-B1yL1lh8.mjs → separator-DOKWXYm4.mjs} +3 -3
- package/dist/chunks/{separator-B1yL1lh8.mjs.map → separator-DOKWXYm4.mjs.map} +1 -1
- package/dist/chunks/{sheet-FhW-R397.mjs → sheet-BeOnCTry.mjs} +4 -4
- package/dist/chunks/{sheet-FhW-R397.mjs.map → sheet-BeOnCTry.mjs.map} +1 -1
- package/dist/chunks/{skeleton-Cy2Kyc1R.mjs → skeleton-A7SmFyPS.mjs} +2 -2
- package/dist/chunks/{skeleton-Cy2Kyc1R.mjs.map → skeleton-A7SmFyPS.mjs.map} +1 -1
- package/dist/chunks/{sortable-qR5yOJD2.mjs → sortable-BZWn10dE.mjs} +3 -3
- package/dist/chunks/{sortable-qR5yOJD2.mjs.map → sortable-BZWn10dE.mjs.map} +1 -1
- package/dist/chunks/{table-QPbxZz58.mjs → table-0T2vOBFN.mjs} +2 -2
- package/dist/chunks/{table-QPbxZz58.mjs.map → table-0T2vOBFN.mjs.map} +1 -1
- package/dist/chunks/{toggle-CoBW3Uqo.mjs → toggle-DXexQScO.mjs} +5 -5
- package/dist/chunks/{toggle-CoBW3Uqo.mjs.map → toggle-DXexQScO.mjs.map} +1 -1
- package/dist/chunks/{tooltip-DNfLTD30.mjs → tooltip-Dj5aSMd4.mjs} +13 -13
- package/dist/chunks/{tooltip-DNfLTD30.mjs.map → tooltip-Dj5aSMd4.mjs.map} +1 -1
- package/dist/chunks/{trash-2-D3X2krCW.mjs → trash-2-DKEuKNiO.mjs} +2 -2
- package/dist/chunks/{trash-2-D3X2krCW.mjs.map → trash-2-DKEuKNiO.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-UJQ1U8uE.mjs → tslib.es6-BAF7iAx8.mjs} +1 -1
- package/dist/chunks/{tslib.es6-UJQ1U8uE.mjs.map → tslib.es6-BAF7iAx8.mjs.map} +1 -1
- package/dist/chunks/{utils-AmLv58nm.mjs → utils-ieFmv4d0.mjs} +2 -2
- package/dist/chunks/{utils-AmLv58nm.mjs.map → utils-ieFmv4d0.mjs.map} +1 -1
- package/dist/chunks/{x-CENvqJg-.mjs → x-UYJwiGZL.mjs} +2 -2
- package/dist/chunks/{x-CENvqJg-.mjs.map → x-UYJwiGZL.mjs.map} +1 -1
- package/dist/collapsible/index.mjs +9 -9
- package/dist/combobox/index.mjs +26 -26
- package/dist/command/index.mjs +20 -20
- package/dist/context-menu/index.mjs +23 -23
- package/dist/data-table/index.mjs +35 -35
- package/dist/date-picker/index.d.ts +7 -20
- package/dist/date-picker/index.mjs +38 -38
- package/dist/date-picker/index.mjs.map +1 -1
- package/dist/dialog/index.mjs +19 -19
- package/dist/drawer/index.mjs +16 -16
- package/dist/dropdown-menu/index.mjs +23 -23
- package/dist/dropzone/index.mjs +18 -18
- package/dist/form/index.mjs +11 -5
- package/dist/form/index.mjs.map +1 -1
- package/dist/hover-card/index.mjs +15 -15
- package/dist/icon/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.mjs +3 -3
- package/dist/input-otp/index.mjs +3 -3
- package/dist/ivt.css +1 -1
- package/dist/label/index.mjs +4 -4
- package/dist/layout/index.mjs +5 -5
- package/dist/menubar/index.mjs +23 -23
- package/dist/multi-select/index.mjs +30 -30
- package/dist/navigation-menu/index.mjs +17 -17
- package/dist/pagination/index.mjs +8 -8
- package/dist/popover/index.mjs +18 -18
- package/dist/progress/index.mjs +5 -5
- package/dist/radio-group/index.mjs +17 -17
- package/dist/resizable/index.mjs +3 -3
- package/dist/scroll-area/index.mjs +12 -12
- package/dist/select/index.mjs +6 -6
- package/dist/separator/index.mjs +4 -4
- package/dist/shared/index.mjs +5 -5
- package/dist/sheet/index.mjs +19 -19
- package/dist/sidebar/index.mjs +27 -27
- package/dist/skeleton/index.mjs +3 -3
- package/dist/skeleton-component/index.mjs +4 -4
- package/dist/slider/index.mjs +12 -12
- package/dist/sortable/index.mjs +4 -4
- package/dist/switch/index.mjs +10 -10
- package/dist/table/index.mjs +3 -3
- package/dist/tabs/index.mjs +13 -13
- package/dist/textarea/index.mjs +2 -2
- package/dist/toast/index.mjs +15 -15
- package/dist/toggle/index.mjs +7 -7
- package/dist/toggle-group/index.mjs +13 -13
- package/dist/tooltip/index.mjs +17 -17
- package/package.json +1 -1
- package/dist/chunks/_commonjsHelpers-DMx7h_rP.mjs.map +0 -1
- package/dist/chunks/calendar-nJ5T1YgK.mjs.map +0 -1
- package/dist/chunks/pt-BR-BCfQl1oP.mjs +0 -608
- package/dist/chunks/pt-BR-BCfQl1oP.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Slot } from '@radix-ui/react-slot';
|
|
2
2
|
import { cva } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { c as cn } from './utils-
|
|
4
|
+
import { c as cn } from './utils-ieFmv4d0.mjs';
|
|
5
5
|
|
|
6
6
|
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 cursor-pointer", {
|
|
7
7
|
variants: {
|
|
@@ -44,4 +44,4 @@ const Button = /*#__PURE__*/ React.forwardRef(({ className, variant, size, asChi
|
|
|
44
44
|
Button.displayName = "Button";
|
|
45
45
|
|
|
46
46
|
export { Button as B, buttonVariants as b };
|
|
47
|
-
//# sourceMappingURL=button-
|
|
47
|
+
//# sourceMappingURL=button-By6p3Bsx.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-
|
|
1
|
+
{"version":3,"file":"button-By6p3Bsx.mjs","sources":["../../src/components/ui/button/button.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst buttonVariants = cva(\n\t\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 cursor-pointer\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n\t\t\t\tdestructive: \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n\t\t\t\tsecondary: \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n\t\t\t\tselection: \"border border-input bg-accent text-accent-foreground hover:bg-accent/80\",\n\t\t\t\tupload: \"bg-accent text-primary hover:bg-accent/80\",\n\t\t\t\tghost: \"hover:bg-body\",\n\t\t\t\tlink: \"text-primary underline-offset-4 hover:underline\",\n\t\t\t\ttable: \"text-inherit\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-9 px-4 py-2\",\n\t\t\t\tsm: \"h-8 rounded-md px-3\",\n\t\t\t\tlg: \"h-10 rounded-md px-8\",\n\t\t\t\ticon: \"h-9 w-9\",\n\t\t\t\tnormal: \"h-fit\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nexport interface ButtonProps\n\textends React.ButtonHTMLAttributes<HTMLButtonElement>,\n\t\tVariantProps<typeof buttonVariants> {\n\tasChild?: boolean;\n\tisAction?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, asChild = false, isAction = false, ...props }, ref) => {\n\t\tconst Comp = asChild ? Slot : \"button\";\n\t\treturn (\n\t\t\t<Comp\n\t\t\t\tclassName={cn(isAction && \"min-w-20\", buttonVariants({ variant, size, className }))}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n"],"names":["buttonVariants","cva","variants","variant","default","destructive","outline","secondary","selection","upload","ghost","link","table","size","sm","lg","icon","normal","defaultVariants","Button","React","forwardRef","className","asChild","isAction","props","ref","Comp","Slot","cn","displayName"],"mappings":";;;;;AAMA,MAAMA,cAAAA,GAAiBC,IACtB,0PAAA,EACA;IACCC,QAAAA,EAAU;QACTC,OAAAA,EAAS;YACRC,OAAAA,EAAS,+DAAA;YACTC,WAAAA,EAAa,8EAAA;YACbC,OAAAA,EACC,0FAAA;YACDC,SAAAA,EAAW,wEAAA;YACXC,SAAAA,EAAW,yEAAA;YACXC,MAAAA,EAAQ,2CAAA;YACRC,KAAAA,EAAO,eAAA;YACPC,IAAAA,EAAM,iDAAA;YACNC,KAAAA,EAAO;AACR,SAAA;QACAC,IAAAA,EAAM;YACLT,OAAAA,EAAS,eAAA;YACTU,EAAAA,EAAI,qBAAA;YACJC,EAAAA,EAAI,sBAAA;YACJC,IAAAA,EAAM,SAAA;YACNC,MAAAA,EAAQ;AACT;AACD,KAAA;IACAC,eAAAA,EAAiB;QAChBf,OAAAA,EAAS,SAAA;QACTU,IAAAA,EAAM;AACP;AACD,CAAA;AAUD,MAAMM,MAAAA,iBAASC,MAAMC,UAAU,CAC9B,CAAC,EAAEC,SAAS,EAAEnB,OAAO,EAAEU,IAAI,EAAEU,OAAAA,GAAU,KAAK,EAAEC,QAAAA,GAAW,KAAK,EAAE,GAAGC,OAAO,EAAEC,GAAAA,GAAAA;IAC3E,MAAMC,IAAAA,GAAOJ,UAAUK,IAAAA,GAAO,QAAA;AAC9B,IAAA,qBACC,KAAA,CAAA,aAAA,CAACD,IAAAA,EAAAA;QACAL,SAAAA,EAAWO,EAAAA,CAAGL,QAAAA,IAAY,UAAA,EAAYxB,cAAAA,CAAe;AAAEG,YAAAA,OAAAA;AAASU,YAAAA,IAAAA;AAAMS,YAAAA;AAAU,SAAA,CAAA,CAAA;QAChFI,GAAAA,EAAKA,GAAAA;AACJ,QAAA,GAAGD;;AAGP,CAAA;AAEDN,MAAAA,CAAOW,WAAW,GAAG,QAAA;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { createContext, useContext, useCallback, useRef, useLayoutEffect, useState, useEffect, useMemo } from 'react';
|
|
3
|
-
import { c as cn } from './utils-
|
|
4
|
-
import { C as ChevronLeft } from './chevron-left-
|
|
5
|
-
import { C as ChevronRight } from './chevron-right-
|
|
6
|
-
import { C as ChevronDown } from './chevron-down-
|
|
7
|
-
import { b as buttonVariants, B as Button$1 } from './button-
|
|
3
|
+
import { c as cn } from './utils-ieFmv4d0.mjs';
|
|
4
|
+
import { C as ChevronLeft } from './chevron-left-DTNQBpUD.mjs';
|
|
5
|
+
import { C as ChevronRight } from './chevron-right-Cc8XUA4m.mjs';
|
|
6
|
+
import { C as ChevronDown } from './chevron-down-BChdO0uD.mjs';
|
|
7
|
+
import { b as buttonVariants, B as Button$1 } from './button-By6p3Bsx.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Time zone name format.
|
|
@@ -356,6 +356,21 @@ class TZDate extends TZDateMini {
|
|
|
356
356
|
* @name millisecondsInDay
|
|
357
357
|
* @summary Milliseconds in 1 day.
|
|
358
358
|
*/ const millisecondsInDay = 86400000;
|
|
359
|
+
/**
|
|
360
|
+
* @constant
|
|
361
|
+
* @name millisecondsInMinute
|
|
362
|
+
* @summary Milliseconds in 1 minute
|
|
363
|
+
*/ const millisecondsInMinute = 60000;
|
|
364
|
+
/**
|
|
365
|
+
* @constant
|
|
366
|
+
* @name millisecondsInHour
|
|
367
|
+
* @summary Milliseconds in 1 hour
|
|
368
|
+
*/ const millisecondsInHour = 3600000;
|
|
369
|
+
/**
|
|
370
|
+
* @constant
|
|
371
|
+
* @name millisecondsInSecond
|
|
372
|
+
* @summary Milliseconds in 1 second
|
|
373
|
+
*/ const millisecondsInSecond = 1000;
|
|
359
374
|
/**
|
|
360
375
|
* @constant
|
|
361
376
|
* @name constructFromSymbol
|
|
@@ -476,7 +491,7 @@ class TZDate extends TZDateMini {
|
|
|
476
491
|
* //=> Thu Sep 11 2014 00:00:00
|
|
477
492
|
*/ function addDays(date, amount, options) {
|
|
478
493
|
const _date = toDate(date, options?.in);
|
|
479
|
-
if (isNaN(amount)) return constructFrom(date, NaN);
|
|
494
|
+
if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
|
|
480
495
|
// If 0 days, no-op to avoid changing times in the hour before end of DST
|
|
481
496
|
if (!amount) return _date;
|
|
482
497
|
_date.setDate(_date.getDate() + amount);
|
|
@@ -1238,6 +1253,57 @@ function normalizeInterval(context, interval) {
|
|
|
1238
1253
|
return date_;
|
|
1239
1254
|
}
|
|
1240
1255
|
|
|
1256
|
+
/**
|
|
1257
|
+
* The {@link eachYearOfInterval} function options.
|
|
1258
|
+
*/ /**
|
|
1259
|
+
* The {@link eachYearOfInterval} function result type. It resolves the proper data type.
|
|
1260
|
+
* It uses the first argument date object type, starting from the date argument,
|
|
1261
|
+
* then the start interval date, and finally the end interval date. If
|
|
1262
|
+
* a context function is passed, it uses the context function return type.
|
|
1263
|
+
*/ /**
|
|
1264
|
+
* @name eachYearOfInterval
|
|
1265
|
+
* @category Interval Helpers
|
|
1266
|
+
* @summary Return the array of yearly timestamps within the specified time interval.
|
|
1267
|
+
*
|
|
1268
|
+
* @description
|
|
1269
|
+
* Return the array of yearly timestamps within the specified time interval.
|
|
1270
|
+
*
|
|
1271
|
+
* @typeParam IntervalType - Interval type.
|
|
1272
|
+
* @typeParam Options - Options type.
|
|
1273
|
+
*
|
|
1274
|
+
* @param interval - The interval.
|
|
1275
|
+
* @param options - An object with options.
|
|
1276
|
+
*
|
|
1277
|
+
* @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end
|
|
1278
|
+
*
|
|
1279
|
+
* @example
|
|
1280
|
+
* // Each year between 6 February 2014 and 10 August 2017:
|
|
1281
|
+
* const result = eachYearOfInterval({
|
|
1282
|
+
* start: new Date(2014, 1, 6),
|
|
1283
|
+
* end: new Date(2017, 7, 10)
|
|
1284
|
+
* })
|
|
1285
|
+
* //=> [
|
|
1286
|
+
* // Wed Jan 01 2014 00:00:00,
|
|
1287
|
+
* // Thu Jan 01 2015 00:00:00,
|
|
1288
|
+
* // Fri Jan 01 2016 00:00:00,
|
|
1289
|
+
* // Sun Jan 01 2017 00:00:00
|
|
1290
|
+
* // ]
|
|
1291
|
+
*/ function eachYearOfInterval(interval, options) {
|
|
1292
|
+
const { start, end } = normalizeInterval(options?.in, interval);
|
|
1293
|
+
let reversed = +start > +end;
|
|
1294
|
+
const endTime = reversed ? +start : +end;
|
|
1295
|
+
const date = reversed ? end : start;
|
|
1296
|
+
date.setHours(0, 0, 0, 0);
|
|
1297
|
+
date.setMonth(0, 1);
|
|
1298
|
+
let step = 1;
|
|
1299
|
+
const dates = [];
|
|
1300
|
+
while(+date <= endTime){
|
|
1301
|
+
dates.push(constructFrom(start, date));
|
|
1302
|
+
date.setFullYear(date.getFullYear() + step);
|
|
1303
|
+
}
|
|
1304
|
+
return reversed ? dates.reverse() : dates;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1241
1307
|
/**
|
|
1242
1308
|
* The {@link endOfWeek} function options.
|
|
1243
1309
|
*/ /**
|
|
@@ -3796,6 +3862,40 @@ const FOUR_WEEKS = 4;
|
|
|
3796
3862
|
*/ formatNumber(value) {
|
|
3797
3863
|
return this.replaceDigits(value.toString());
|
|
3798
3864
|
}
|
|
3865
|
+
/**
|
|
3866
|
+
* Returns the preferred ordering for month and year labels for the current
|
|
3867
|
+
* locale.
|
|
3868
|
+
*/ getMonthYearOrder() {
|
|
3869
|
+
const code = this.options.locale?.code;
|
|
3870
|
+
if (!code) {
|
|
3871
|
+
return "month-first";
|
|
3872
|
+
}
|
|
3873
|
+
return DateLib.yearFirstLocales.has(code) ? "year-first" : "month-first";
|
|
3874
|
+
}
|
|
3875
|
+
/**
|
|
3876
|
+
* Formats the month/year pair respecting locale conventions.
|
|
3877
|
+
*
|
|
3878
|
+
* @since 9.11.0
|
|
3879
|
+
*/ formatMonthYear(date) {
|
|
3880
|
+
const { locale, timeZone, numerals } = this.options;
|
|
3881
|
+
const localeCode = locale?.code;
|
|
3882
|
+
if (localeCode && DateLib.yearFirstLocales.has(localeCode)) {
|
|
3883
|
+
try {
|
|
3884
|
+
const intl = new Intl.DateTimeFormat(localeCode, {
|
|
3885
|
+
month: "long",
|
|
3886
|
+
year: "numeric",
|
|
3887
|
+
timeZone,
|
|
3888
|
+
numberingSystem: numerals
|
|
3889
|
+
});
|
|
3890
|
+
const formatted = intl.format(date);
|
|
3891
|
+
return formatted;
|
|
3892
|
+
} catch {
|
|
3893
|
+
// Fallback to date-fns formatting below.
|
|
3894
|
+
}
|
|
3895
|
+
}
|
|
3896
|
+
const pattern = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
3897
|
+
return this.format(date, pattern);
|
|
3898
|
+
}
|
|
3799
3899
|
/**
|
|
3800
3900
|
* Creates an instance of `DateLib`.
|
|
3801
3901
|
*
|
|
@@ -3899,6 +3999,28 @@ const FOUR_WEEKS = 4;
|
|
|
3899
3999
|
*/ this.eachMonthOfInterval = (interval)=>{
|
|
3900
4000
|
return this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(interval) : eachMonthOfInterval(interval);
|
|
3901
4001
|
};
|
|
4002
|
+
/**
|
|
4003
|
+
* Returns the years between the given dates.
|
|
4004
|
+
*
|
|
4005
|
+
* @since 9.11.1
|
|
4006
|
+
* @param interval The interval to get the years for.
|
|
4007
|
+
* @returns The array of years in the interval.
|
|
4008
|
+
*/ this.eachYearOfInterval = (interval)=>{
|
|
4009
|
+
const years = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(interval) : eachYearOfInterval(interval);
|
|
4010
|
+
// Remove duplicates that may happen across DST transitions (e.g., "America/Sao_Paulo")
|
|
4011
|
+
// See https://github.com/date-fns/tz/issues/72
|
|
4012
|
+
const uniqueYears = new Set(years.map((d)=>this.getYear(d)));
|
|
4013
|
+
if (uniqueYears.size === years.length) {
|
|
4014
|
+
// No duplicates, return as is
|
|
4015
|
+
return years;
|
|
4016
|
+
}
|
|
4017
|
+
// Rebuild the array to ensure one date per year
|
|
4018
|
+
const yearsArray = [];
|
|
4019
|
+
uniqueYears.forEach((y)=>{
|
|
4020
|
+
yearsArray.push(new Date(y, 0, 1));
|
|
4021
|
+
});
|
|
4022
|
+
return yearsArray;
|
|
4023
|
+
};
|
|
3902
4024
|
/**
|
|
3903
4025
|
* Returns the end of the broadcast week for the given date.
|
|
3904
4026
|
*
|
|
@@ -4126,6 +4248,25 @@ const FOUR_WEEKS = 4;
|
|
|
4126
4248
|
this.overrides = overrides;
|
|
4127
4249
|
}
|
|
4128
4250
|
}
|
|
4251
|
+
DateLib.yearFirstLocales = new Set([
|
|
4252
|
+
"eu",
|
|
4253
|
+
"hu",
|
|
4254
|
+
"ja",
|
|
4255
|
+
"ja-Hira",
|
|
4256
|
+
"ja-JP",
|
|
4257
|
+
"ko",
|
|
4258
|
+
"ko-KR",
|
|
4259
|
+
"lt",
|
|
4260
|
+
"lt-LT",
|
|
4261
|
+
"lv",
|
|
4262
|
+
"lv-LV",
|
|
4263
|
+
"mn",
|
|
4264
|
+
"mn-MN",
|
|
4265
|
+
"zh",
|
|
4266
|
+
"zh-CN",
|
|
4267
|
+
"zh-HK",
|
|
4268
|
+
"zh-TW"
|
|
4269
|
+
]);
|
|
4129
4270
|
/**
|
|
4130
4271
|
* The default date library with English locale.
|
|
4131
4272
|
*
|
|
@@ -5013,7 +5154,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
5013
5154
|
/**
|
|
5014
5155
|
* Formats the caption of the month.
|
|
5015
5156
|
*
|
|
5016
|
-
* @defaultValue
|
|
5157
|
+
* @defaultValue Locale-specific month/year order (e.g., "November 2022").
|
|
5017
5158
|
* @param month The date representing the month.
|
|
5018
5159
|
* @param options Configuration options for the date library.
|
|
5019
5160
|
* @param dateLib The date library to use for formatting. If not provided, a new
|
|
@@ -5022,7 +5163,8 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
5022
5163
|
* @group Formatters
|
|
5023
5164
|
* @see https://daypicker.dev/docs/translation#custom-formatters
|
|
5024
5165
|
*/ function formatCaption(month, options, dateLib) {
|
|
5025
|
-
|
|
5166
|
+
const lib = dateLib ?? new DateLib(options);
|
|
5167
|
+
return lib.formatMonthYear(month);
|
|
5026
5168
|
}
|
|
5027
5169
|
/**
|
|
5028
5170
|
* @private
|
|
@@ -5244,15 +5386,13 @@ var defaultFormatters = /*#__PURE__*/Object.freeze({
|
|
|
5244
5386
|
*/ function getYearOptions(navStart, navEnd, formatters, dateLib, reverse = false) {
|
|
5245
5387
|
if (!navStart) return undefined;
|
|
5246
5388
|
if (!navEnd) return undefined;
|
|
5247
|
-
const { startOfYear, endOfYear,
|
|
5389
|
+
const { startOfYear, endOfYear, eachYearOfInterval, getYear } = dateLib;
|
|
5248
5390
|
const firstNavYear = startOfYear(navStart);
|
|
5249
5391
|
const lastNavYear = endOfYear(navEnd);
|
|
5250
|
-
const years =
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
year = addYears(year, 1);
|
|
5255
|
-
}
|
|
5392
|
+
const years = eachYearOfInterval({
|
|
5393
|
+
start: firstNavYear,
|
|
5394
|
+
end: lastNavYear
|
|
5395
|
+
});
|
|
5256
5396
|
if (reverse) years.reverse();
|
|
5257
5397
|
return years.map((year)=>{
|
|
5258
5398
|
const label = formatters.formatYearDropdown(year, dateLib);
|
|
@@ -5293,7 +5433,7 @@ var defaultFormatters = /*#__PURE__*/Object.freeze({
|
|
|
5293
5433
|
* Generates the ARIA label for the month grid, which is announced when entering
|
|
5294
5434
|
* the grid.
|
|
5295
5435
|
*
|
|
5296
|
-
* @defaultValue
|
|
5436
|
+
* @defaultValue Locale-specific month/year order (e.g., "November 2022").
|
|
5297
5437
|
* @param date - The date representing the month.
|
|
5298
5438
|
* @param options - Optional configuration for the date formatting library.
|
|
5299
5439
|
* @param dateLib - An optional instance of the date formatting library.
|
|
@@ -5301,7 +5441,8 @@ var defaultFormatters = /*#__PURE__*/Object.freeze({
|
|
|
5301
5441
|
* @group Labels
|
|
5302
5442
|
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
5303
5443
|
*/ function labelGrid(date, options, dateLib) {
|
|
5304
|
-
|
|
5444
|
+
const lib = dateLib ?? new DateLib(options);
|
|
5445
|
+
return lib.formatMonthYear(date);
|
|
5305
5446
|
}
|
|
5306
5447
|
/**
|
|
5307
5448
|
* @ignore
|
|
@@ -6127,6 +6268,12 @@ var FocusTargetPriority;
|
|
|
6127
6268
|
if (!focusedDay) return;
|
|
6128
6269
|
const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);
|
|
6129
6270
|
if (!nextFocus) return;
|
|
6271
|
+
if (props.disableNavigation) {
|
|
6272
|
+
const isNextInCalendar = calendar.days.some((day)=>day.isEqualTo(nextFocus));
|
|
6273
|
+
if (!isNextInCalendar) {
|
|
6274
|
+
return;
|
|
6275
|
+
}
|
|
6276
|
+
}
|
|
6130
6277
|
calendar.goToDay(nextFocus);
|
|
6131
6278
|
setFocused(nextFocus);
|
|
6132
6279
|
};
|
|
@@ -6791,6 +6938,7 @@ var FocusTargetPriority;
|
|
|
6791
6938
|
title: props.title,
|
|
6792
6939
|
role: props.role,
|
|
6793
6940
|
"aria-label": props["aria-label"],
|
|
6941
|
+
"aria-labelledby": props["aria-labelledby"],
|
|
6794
6942
|
...dataAttributes
|
|
6795
6943
|
}, React__default.createElement(components.Months, {
|
|
6796
6944
|
className: classNames[UI.Months],
|
|
@@ -6834,27 +6982,44 @@ var FocusTargetPriority;
|
|
|
6834
6982
|
}, captionLayout?.startsWith("dropdown") ? React__default.createElement(components.DropdownNav, {
|
|
6835
6983
|
className: classNames[UI.Dropdowns],
|
|
6836
6984
|
style: styles?.[UI.Dropdowns]
|
|
6837
|
-
},
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6985
|
+
}, (()=>{
|
|
6986
|
+
const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React__default.createElement(components.MonthsDropdown, {
|
|
6987
|
+
key: "month",
|
|
6988
|
+
className: classNames[UI.MonthsDropdown],
|
|
6989
|
+
"aria-label": labelMonthDropdown(),
|
|
6990
|
+
classNames: classNames,
|
|
6991
|
+
components: components,
|
|
6992
|
+
disabled: Boolean(props.disableNavigation),
|
|
6993
|
+
onChange: handleMonthChange(calendarMonth.date),
|
|
6994
|
+
options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters, dateLib),
|
|
6995
|
+
style: styles?.[UI.Dropdown],
|
|
6996
|
+
value: dateLib.getMonth(calendarMonth.date)
|
|
6997
|
+
}) : React__default.createElement("span", {
|
|
6998
|
+
key: "month"
|
|
6999
|
+
}, formatMonthDropdown(calendarMonth.date, dateLib));
|
|
7000
|
+
const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React__default.createElement(components.YearsDropdown, {
|
|
7001
|
+
key: "year",
|
|
7002
|
+
className: classNames[UI.YearsDropdown],
|
|
7003
|
+
"aria-label": labelYearDropdown(dateLib.options),
|
|
7004
|
+
classNames: classNames,
|
|
7005
|
+
components: components,
|
|
7006
|
+
disabled: Boolean(props.disableNavigation),
|
|
7007
|
+
onChange: handleYearChange(calendarMonth.date),
|
|
7008
|
+
options: getYearOptions(navStart, navEnd, formatters, dateLib, Boolean(props.reverseYears)),
|
|
7009
|
+
style: styles?.[UI.Dropdown],
|
|
7010
|
+
value: dateLib.getYear(calendarMonth.date)
|
|
7011
|
+
}) : React__default.createElement("span", {
|
|
7012
|
+
key: "year"
|
|
7013
|
+
}, formatYearDropdown(calendarMonth.date, dateLib));
|
|
7014
|
+
const controls = dateLib.getMonthYearOrder() === "year-first" ? [
|
|
7015
|
+
yearControl,
|
|
7016
|
+
monthControl
|
|
7017
|
+
] : [
|
|
7018
|
+
monthControl,
|
|
7019
|
+
yearControl
|
|
7020
|
+
];
|
|
7021
|
+
return controls;
|
|
7022
|
+
})(), React__default.createElement("span", {
|
|
6858
7023
|
role: "status",
|
|
6859
7024
|
"aria-live": "polite",
|
|
6860
7025
|
style: {
|
|
@@ -7102,5 +7267,5 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
|
7102
7267
|
});
|
|
7103
7268
|
}
|
|
7104
7269
|
|
|
7105
|
-
export { Calendar as C, CalendarDayButton as a,
|
|
7106
|
-
//# sourceMappingURL=calendar-
|
|
7270
|
+
export { Calendar as C, CalendarDayButton as a, millisecondsInMinute as b, constructFrom as c, millisecondsInSecond as d, getWeekYear as e, format as f, getDefaultOptions as g, startOfISOWeek as h, getWeek as i, getISOWeek as j, addDays as k, getTimezoneOffsetInMilliseconds as l, millisecondsInHour as m, enUS as n, longFormatters as o, isProtectedWeekYearToken as p, isProtectedDayOfYearToken as q, isValid as r, startOfWeek as s, toDate as t, buildFormatLongFn as u, buildLocalizeFn as v, warnOrThrowProtectedError as w, buildMatchFn as x, buildMatchPatternFn as y };
|
|
7271
|
+
//# sourceMappingURL=calendar-BMDZ5epm.mjs.map
|