ivt 0.4.6 → 0.4.7
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.mjs +38 -38
- 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-Bk36x55h.mjs} +2 -2
- package/dist/chunks/{Container-sBmoUJ1A.mjs.map → Container-Bk36x55h.mjs.map} +1 -1
- package/dist/chunks/{_commonjsHelpers-DMx7h_rP.mjs → _commonjsHelpers-B6NPw-gB.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-B6NPw-gB.mjs.map +1 -0
- package/dist/chunks/{accordion-BEzCfjyX.mjs → accordion-DkQil9br.mjs} +11 -11
- package/dist/chunks/{accordion-BEzCfjyX.mjs.map → accordion-DkQil9br.mjs.map} +1 -1
- package/dist/chunks/{badge-poifvE-U.mjs → badge-DDmxqVIu.mjs} +2 -2
- package/dist/chunks/{badge-poifvE-U.mjs.map → badge-DDmxqVIu.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-8KEENQOJ.mjs → bundle-mjs-Bj6M7Bh5.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-8KEENQOJ.mjs.map → bundle-mjs-Bj6M7Bh5.mjs.map} +1 -1
- package/dist/chunks/{button-TULRIYFO.mjs → button-DUnGULhS.mjs} +2 -2
- package/dist/chunks/{button-TULRIYFO.mjs.map → button-DUnGULhS.mjs.map} +1 -1
- package/dist/chunks/{calendar-nJ5T1YgK.mjs → calendar-Cgi4uVPL.mjs} +188 -38
- package/dist/chunks/calendar-Cgi4uVPL.mjs.map +1 -0
- package/dist/chunks/{check-DcPt24aD.mjs → check-D7XegcNq.mjs} +2 -2
- package/dist/chunks/{check-DcPt24aD.mjs.map → check-D7XegcNq.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-BNw46No-.mjs → chevron-down-B7w8j1qi.mjs} +2 -2
- package/dist/chunks/{chevron-down-BNw46No-.mjs.map → chevron-down-B7w8j1qi.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-B-ZN622G.mjs → chevron-left-P-VgJSoP.mjs} +2 -2
- package/dist/chunks/{chevron-left-B-ZN622G.mjs.map → chevron-left-P-VgJSoP.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-Ddz8dCda.mjs → chevron-right-D8I8B3al.mjs} +2 -2
- package/dist/chunks/{chevron-right-Ddz8dCda.mjs.map → chevron-right-D8I8B3al.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-ChXPuZd6.mjs → chevrons-up-down-BJzgHrFv.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-ChXPuZd6.mjs.map → chevrons-up-down-BJzgHrFv.mjs.map} +1 -1
- package/dist/chunks/{command-D6QS1LFL.mjs → command-B2Q7vPrV.mjs} +8 -8
- package/dist/chunks/{command-D6QS1LFL.mjs.map → command-B2Q7vPrV.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-DOOu6ntc.mjs → createLucideIcon-BnuYhciy.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-DOOu6ntc.mjs.map → createLucideIcon-BnuYhciy.mjs.map} +1 -1
- package/dist/chunks/{dialog-BefJPh8X.mjs → dialog-5R8jYrH2.mjs} +4 -4
- package/dist/chunks/{dialog-BefJPh8X.mjs.map → dialog-5R8jYrH2.mjs.map} +1 -1
- package/dist/chunks/{ellipsis-Cwr1X9R2.mjs → ellipsis-rAfolw0i.mjs} +2 -2
- package/dist/chunks/{ellipsis-Cwr1X9R2.mjs.map → ellipsis-rAfolw0i.mjs.map} +1 -1
- package/dist/chunks/{hover-card-CcNjcMZa.mjs → hover-card-IMC6GmGl.mjs} +11 -11
- package/dist/chunks/{hover-card-CcNjcMZa.mjs.map → hover-card-IMC6GmGl.mjs.map} +1 -1
- package/dist/chunks/{index-BwVg1Kb5.mjs → index-AD2ohxjm.mjs} +1 -1
- package/dist/chunks/{index-BwVg1Kb5.mjs.map → index-AD2ohxjm.mjs.map} +1 -1
- package/dist/chunks/{index-D1qT_gBX.mjs → index-BL6I2O8I.mjs} +1 -1
- package/dist/chunks/{index-D1qT_gBX.mjs.map → index-BL6I2O8I.mjs.map} +1 -1
- package/dist/chunks/{index-DvLErdHO.mjs → index-Bfqp6L57.mjs} +1 -1
- package/dist/chunks/{index-DvLErdHO.mjs.map → index-Bfqp6L57.mjs.map} +1 -1
- package/dist/chunks/{index-CK9CWim6.mjs → index-Bhy5-l7L.mjs} +2 -2
- package/dist/chunks/{index-CK9CWim6.mjs.map → index-Bhy5-l7L.mjs.map} +1 -1
- package/dist/chunks/{index-e34k5BX3.mjs → index-BtzrdXXu.mjs} +1 -1
- package/dist/chunks/{index-e34k5BX3.mjs.map → index-BtzrdXXu.mjs.map} +1 -1
- package/dist/chunks/{index-CQc8iXpK.mjs → index-C-eBEzsd.mjs} +11 -11
- package/dist/chunks/{index-CQc8iXpK.mjs.map → index-C-eBEzsd.mjs.map} +1 -1
- package/dist/chunks/{index-CjtaP9C4.mjs → index-CI7Tnqaf.mjs} +1 -1
- package/dist/chunks/{index-CjtaP9C4.mjs.map → index-CI7Tnqaf.mjs.map} +1 -1
- package/dist/chunks/{index-P1gmXtXB.mjs → index-CIlaxeML.mjs} +3 -3
- package/dist/chunks/{index-P1gmXtXB.mjs.map → index-CIlaxeML.mjs.map} +1 -1
- package/dist/chunks/{index-1tph_k2t.mjs → index-CUUcgAWS.mjs} +1 -1
- package/dist/chunks/{index-1tph_k2t.mjs.map → index-CUUcgAWS.mjs.map} +1 -1
- package/dist/chunks/{index-CWMDV9qs.mjs → index-CiJHmWph.mjs} +2 -2
- package/dist/chunks/{index-CWMDV9qs.mjs.map → index-CiJHmWph.mjs.map} +1 -1
- package/dist/chunks/{index-DSL6rasA.mjs → index-CsVkG_9K.mjs} +9 -9
- package/dist/chunks/{index-DSL6rasA.mjs.map → index-CsVkG_9K.mjs.map} +1 -1
- package/dist/chunks/{index-DDe3wbsL.mjs → index-Cx4XlYKf.mjs} +1 -1
- package/dist/chunks/{index-DDe3wbsL.mjs.map → index-Cx4XlYKf.mjs.map} +1 -1
- package/dist/chunks/{index-DejfSFbY.mjs → index-CxpHOtv2.mjs} +7 -7
- package/dist/chunks/{index-DejfSFbY.mjs.map → index-CxpHOtv2.mjs.map} +1 -1
- package/dist/chunks/{index-BCsiqIRL.mjs → index-D02u4jwi.mjs} +1 -1
- package/dist/chunks/{index-BCsiqIRL.mjs.map → index-D02u4jwi.mjs.map} +1 -1
- package/dist/chunks/{index-0fdTSdHQ.mjs → index-DGB6xduL.mjs} +5 -5
- package/dist/chunks/{index-0fdTSdHQ.mjs.map → index-DGB6xduL.mjs.map} +1 -1
- package/dist/chunks/{index-Bb31UsVK.mjs → index-DKuVLbq1.mjs} +1 -1
- package/dist/chunks/{index-Bb31UsVK.mjs.map → index-DKuVLbq1.mjs.map} +1 -1
- package/dist/chunks/{index-DoRi3lh9.mjs → index-Dj2mKKII.mjs} +2 -2
- package/dist/chunks/{index-DoRi3lh9.mjs.map → index-Dj2mKKII.mjs.map} +1 -1
- package/dist/chunks/{index-D7B2_9g4.mjs → index-KCHKKCqw.mjs} +2 -2
- package/dist/chunks/{index-D7B2_9g4.mjs.map → index-KCHKKCqw.mjs.map} +1 -1
- package/dist/chunks/{index-JyHiZGQv.mjs → index-gB-FKFqi.mjs} +15 -15
- package/dist/chunks/{index-JyHiZGQv.mjs.map → index-gB-FKFqi.mjs.map} +1 -1
- package/dist/chunks/{index-BnNdF3Y6.mjs → index-j8BDMqXg.mjs} +9 -9
- package/dist/chunks/{index-BnNdF3Y6.mjs.map → index-j8BDMqXg.mjs.map} +1 -1
- package/dist/chunks/{index-Cl4mLFZO.mjs → index-plymPSgY.mjs} +3 -3
- package/dist/chunks/{index-Cl4mLFZO.mjs.map → index-plymPSgY.mjs.map} +1 -1
- package/dist/chunks/{index-CSiM72Dy.mjs → index-x0TwBXvJ.mjs} +1 -1
- package/dist/chunks/{index-CSiM72Dy.mjs.map → index-x0TwBXvJ.mjs.map} +1 -1
- package/dist/chunks/{index-EfpXtubk.mjs → index-xgPrRc3G.mjs} +5 -5
- package/dist/chunks/{index-EfpXtubk.mjs.map → index-xgPrRc3G.mjs.map} +1 -1
- package/dist/chunks/{input-CDsq1Xde.mjs → input-TuCGqI_P.mjs} +2 -2
- package/dist/chunks/{input-CDsq1Xde.mjs.map → input-TuCGqI_P.mjs.map} +1 -1
- package/dist/chunks/{label-BzGy6SRg.mjs → label-C3diPSrP.mjs} +3 -3
- package/dist/chunks/{label-BzGy6SRg.mjs.map → label-C3diPSrP.mjs.map} +1 -1
- package/dist/chunks/{pagination-CfFGN_ib.mjs → pagination-CFPUC8_E.mjs} +6 -6
- package/dist/chunks/{pagination-CfFGN_ib.mjs.map → pagination-CFPUC8_E.mjs.map} +1 -1
- package/dist/chunks/{popover-BlSoIp_B.mjs → popover-BLkBJEBi.mjs} +13 -13
- package/dist/chunks/{popover-BlSoIp_B.mjs.map → popover-BLkBJEBi.mjs.map} +1 -1
- package/dist/chunks/{progress-CIapbA26.mjs → progress-BCXpEea-.mjs} +4 -4
- package/dist/chunks/{progress-CIapbA26.mjs.map → progress-BCXpEea-.mjs.map} +1 -1
- package/dist/chunks/{pt-BR-BCfQl1oP.mjs → pt-BR-dv9Ki026.mjs} +3 -3
- package/dist/chunks/{pt-BR-BCfQl1oP.mjs.map → pt-BR-dv9Ki026.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-BE1y6Igy.mjs → scroll-area-DfDHXrMl.mjs} +11 -11
- package/dist/chunks/{scroll-area-BE1y6Igy.mjs.map → scroll-area-DfDHXrMl.mjs.map} +1 -1
- package/dist/chunks/{select-BBb0ke76.mjs → select-Dm61g3Di.mjs} +5 -5
- package/dist/chunks/{select-BBb0ke76.mjs.map → select-Dm61g3Di.mjs.map} +1 -1
- package/dist/chunks/{separator-B1yL1lh8.mjs → separator-D9zU7ztA.mjs} +3 -3
- package/dist/chunks/{separator-B1yL1lh8.mjs.map → separator-D9zU7ztA.mjs.map} +1 -1
- package/dist/chunks/{sheet-FhW-R397.mjs → sheet-CG9T6jEm.mjs} +4 -4
- package/dist/chunks/{sheet-FhW-R397.mjs.map → sheet-CG9T6jEm.mjs.map} +1 -1
- package/dist/chunks/{skeleton-Cy2Kyc1R.mjs → skeleton-BBrPlJZ6.mjs} +2 -2
- package/dist/chunks/{skeleton-Cy2Kyc1R.mjs.map → skeleton-BBrPlJZ6.mjs.map} +1 -1
- package/dist/chunks/{sortable-qR5yOJD2.mjs → sortable-C5sg2z09.mjs} +3 -3
- package/dist/chunks/{sortable-qR5yOJD2.mjs.map → sortable-C5sg2z09.mjs.map} +1 -1
- package/dist/chunks/{table-QPbxZz58.mjs → table-D8dawH6l.mjs} +2 -2
- package/dist/chunks/{table-QPbxZz58.mjs.map → table-D8dawH6l.mjs.map} +1 -1
- package/dist/chunks/{toggle-CoBW3Uqo.mjs → toggle-BNDwy3fI.mjs} +5 -5
- package/dist/chunks/{toggle-CoBW3Uqo.mjs.map → toggle-BNDwy3fI.mjs.map} +1 -1
- package/dist/chunks/{tooltip-DNfLTD30.mjs → tooltip-SoLw7T22.mjs} +13 -13
- package/dist/chunks/{tooltip-DNfLTD30.mjs.map → tooltip-SoLw7T22.mjs.map} +1 -1
- package/dist/chunks/{trash-2-D3X2krCW.mjs → trash-2-C_bzpesE.mjs} +2 -2
- package/dist/chunks/{trash-2-D3X2krCW.mjs.map → trash-2-C_bzpesE.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-UJQ1U8uE.mjs → tslib.es6-dgoTq-4a.mjs} +1 -1
- package/dist/chunks/{tslib.es6-UJQ1U8uE.mjs.map → tslib.es6-dgoTq-4a.mjs.map} +1 -1
- package/dist/chunks/{utils-AmLv58nm.mjs → utils-DiIQyE9g.mjs} +2 -2
- package/dist/chunks/{utils-AmLv58nm.mjs.map → utils-DiIQyE9g.mjs.map} +1 -1
- package/dist/chunks/{x-CENvqJg-.mjs → x-BCPCYl4o.mjs} +2 -2
- package/dist/chunks/{x-CENvqJg-.mjs.map → x-BCPCYl4o.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.mjs +25 -25
- 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 +2 -1
- package/dist/chunks/_commonjsHelpers-DMx7h_rP.mjs.map +0 -1
- package/dist/chunks/calendar-nJ5T1YgK.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-DiIQyE9g.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-DUnGULhS.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-
|
|
1
|
+
{"version":3,"file":"button-DUnGULhS.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-DiIQyE9g.mjs';
|
|
4
|
+
import { C as ChevronLeft } from './chevron-left-P-VgJSoP.mjs';
|
|
5
|
+
import { C as ChevronRight } from './chevron-right-D8I8B3al.mjs';
|
|
6
|
+
import { C as ChevronDown } from './chevron-down-B7w8j1qi.mjs';
|
|
7
|
+
import { b as buttonVariants, B as Button$1 } from './button-DUnGULhS.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Time zone name format.
|
|
@@ -1238,6 +1238,57 @@ function normalizeInterval(context, interval) {
|
|
|
1238
1238
|
return date_;
|
|
1239
1239
|
}
|
|
1240
1240
|
|
|
1241
|
+
/**
|
|
1242
|
+
* The {@link eachYearOfInterval} function options.
|
|
1243
|
+
*/ /**
|
|
1244
|
+
* The {@link eachYearOfInterval} function result type. It resolves the proper data type.
|
|
1245
|
+
* It uses the first argument date object type, starting from the date argument,
|
|
1246
|
+
* then the start interval date, and finally the end interval date. If
|
|
1247
|
+
* a context function is passed, it uses the context function return type.
|
|
1248
|
+
*/ /**
|
|
1249
|
+
* @name eachYearOfInterval
|
|
1250
|
+
* @category Interval Helpers
|
|
1251
|
+
* @summary Return the array of yearly timestamps within the specified time interval.
|
|
1252
|
+
*
|
|
1253
|
+
* @description
|
|
1254
|
+
* Return the array of yearly timestamps within the specified time interval.
|
|
1255
|
+
*
|
|
1256
|
+
* @typeParam IntervalType - Interval type.
|
|
1257
|
+
* @typeParam Options - Options type.
|
|
1258
|
+
*
|
|
1259
|
+
* @param interval - The interval.
|
|
1260
|
+
* @param options - An object with options.
|
|
1261
|
+
*
|
|
1262
|
+
* @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end
|
|
1263
|
+
*
|
|
1264
|
+
* @example
|
|
1265
|
+
* // Each year between 6 February 2014 and 10 August 2017:
|
|
1266
|
+
* const result = eachYearOfInterval({
|
|
1267
|
+
* start: new Date(2014, 1, 6),
|
|
1268
|
+
* end: new Date(2017, 7, 10)
|
|
1269
|
+
* })
|
|
1270
|
+
* //=> [
|
|
1271
|
+
* // Wed Jan 01 2014 00:00:00,
|
|
1272
|
+
* // Thu Jan 01 2015 00:00:00,
|
|
1273
|
+
* // Fri Jan 01 2016 00:00:00,
|
|
1274
|
+
* // Sun Jan 01 2017 00:00:00
|
|
1275
|
+
* // ]
|
|
1276
|
+
*/ function eachYearOfInterval(interval, options) {
|
|
1277
|
+
const { start, end } = normalizeInterval(options?.in, interval);
|
|
1278
|
+
let reversed = +start > +end;
|
|
1279
|
+
const endTime = reversed ? +start : +end;
|
|
1280
|
+
const date = reversed ? end : start;
|
|
1281
|
+
date.setHours(0, 0, 0, 0);
|
|
1282
|
+
date.setMonth(0, 1);
|
|
1283
|
+
let step = 1;
|
|
1284
|
+
const dates = [];
|
|
1285
|
+
while(+date <= endTime){
|
|
1286
|
+
dates.push(constructFrom(start, date));
|
|
1287
|
+
date.setFullYear(date.getFullYear() + step);
|
|
1288
|
+
}
|
|
1289
|
+
return reversed ? dates.reverse() : dates;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1241
1292
|
/**
|
|
1242
1293
|
* The {@link endOfWeek} function options.
|
|
1243
1294
|
*/ /**
|
|
@@ -3796,6 +3847,40 @@ const FOUR_WEEKS = 4;
|
|
|
3796
3847
|
*/ formatNumber(value) {
|
|
3797
3848
|
return this.replaceDigits(value.toString());
|
|
3798
3849
|
}
|
|
3850
|
+
/**
|
|
3851
|
+
* Returns the preferred ordering for month and year labels for the current
|
|
3852
|
+
* locale.
|
|
3853
|
+
*/ getMonthYearOrder() {
|
|
3854
|
+
const code = this.options.locale?.code;
|
|
3855
|
+
if (!code) {
|
|
3856
|
+
return "month-first";
|
|
3857
|
+
}
|
|
3858
|
+
return DateLib.yearFirstLocales.has(code) ? "year-first" : "month-first";
|
|
3859
|
+
}
|
|
3860
|
+
/**
|
|
3861
|
+
* Formats the month/year pair respecting locale conventions.
|
|
3862
|
+
*
|
|
3863
|
+
* @since 9.11.0
|
|
3864
|
+
*/ formatMonthYear(date) {
|
|
3865
|
+
const { locale, timeZone, numerals } = this.options;
|
|
3866
|
+
const localeCode = locale?.code;
|
|
3867
|
+
if (localeCode && DateLib.yearFirstLocales.has(localeCode)) {
|
|
3868
|
+
try {
|
|
3869
|
+
const intl = new Intl.DateTimeFormat(localeCode, {
|
|
3870
|
+
month: "long",
|
|
3871
|
+
year: "numeric",
|
|
3872
|
+
timeZone,
|
|
3873
|
+
numberingSystem: numerals
|
|
3874
|
+
});
|
|
3875
|
+
const formatted = intl.format(date);
|
|
3876
|
+
return formatted;
|
|
3877
|
+
} catch {
|
|
3878
|
+
// Fallback to date-fns formatting below.
|
|
3879
|
+
}
|
|
3880
|
+
}
|
|
3881
|
+
const pattern = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
3882
|
+
return this.format(date, pattern);
|
|
3883
|
+
}
|
|
3799
3884
|
/**
|
|
3800
3885
|
* Creates an instance of `DateLib`.
|
|
3801
3886
|
*
|
|
@@ -3899,6 +3984,28 @@ const FOUR_WEEKS = 4;
|
|
|
3899
3984
|
*/ this.eachMonthOfInterval = (interval)=>{
|
|
3900
3985
|
return this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(interval) : eachMonthOfInterval(interval);
|
|
3901
3986
|
};
|
|
3987
|
+
/**
|
|
3988
|
+
* Returns the years between the given dates.
|
|
3989
|
+
*
|
|
3990
|
+
* @since 9.11.1
|
|
3991
|
+
* @param interval The interval to get the years for.
|
|
3992
|
+
* @returns The array of years in the interval.
|
|
3993
|
+
*/ this.eachYearOfInterval = (interval)=>{
|
|
3994
|
+
const years = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(interval) : eachYearOfInterval(interval);
|
|
3995
|
+
// Remove duplicates that may happen across DST transitions (e.g., "America/Sao_Paulo")
|
|
3996
|
+
// See https://github.com/date-fns/tz/issues/72
|
|
3997
|
+
const uniqueYears = new Set(years.map((d)=>this.getYear(d)));
|
|
3998
|
+
if (uniqueYears.size === years.length) {
|
|
3999
|
+
// No duplicates, return as is
|
|
4000
|
+
return years;
|
|
4001
|
+
}
|
|
4002
|
+
// Rebuild the array to ensure one date per year
|
|
4003
|
+
const yearsArray = [];
|
|
4004
|
+
uniqueYears.forEach((y)=>{
|
|
4005
|
+
yearsArray.push(new Date(y, 0, 1));
|
|
4006
|
+
});
|
|
4007
|
+
return yearsArray;
|
|
4008
|
+
};
|
|
3902
4009
|
/**
|
|
3903
4010
|
* Returns the end of the broadcast week for the given date.
|
|
3904
4011
|
*
|
|
@@ -4126,6 +4233,25 @@ const FOUR_WEEKS = 4;
|
|
|
4126
4233
|
this.overrides = overrides;
|
|
4127
4234
|
}
|
|
4128
4235
|
}
|
|
4236
|
+
DateLib.yearFirstLocales = new Set([
|
|
4237
|
+
"eu",
|
|
4238
|
+
"hu",
|
|
4239
|
+
"ja",
|
|
4240
|
+
"ja-Hira",
|
|
4241
|
+
"ja-JP",
|
|
4242
|
+
"ko",
|
|
4243
|
+
"ko-KR",
|
|
4244
|
+
"lt",
|
|
4245
|
+
"lt-LT",
|
|
4246
|
+
"lv",
|
|
4247
|
+
"lv-LV",
|
|
4248
|
+
"mn",
|
|
4249
|
+
"mn-MN",
|
|
4250
|
+
"zh",
|
|
4251
|
+
"zh-CN",
|
|
4252
|
+
"zh-HK",
|
|
4253
|
+
"zh-TW"
|
|
4254
|
+
]);
|
|
4129
4255
|
/**
|
|
4130
4256
|
* The default date library with English locale.
|
|
4131
4257
|
*
|
|
@@ -5013,7 +5139,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
5013
5139
|
/**
|
|
5014
5140
|
* Formats the caption of the month.
|
|
5015
5141
|
*
|
|
5016
|
-
* @defaultValue
|
|
5142
|
+
* @defaultValue Locale-specific month/year order (e.g., "November 2022").
|
|
5017
5143
|
* @param month The date representing the month.
|
|
5018
5144
|
* @param options Configuration options for the date library.
|
|
5019
5145
|
* @param dateLib The date library to use for formatting. If not provided, a new
|
|
@@ -5022,7 +5148,8 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
5022
5148
|
* @group Formatters
|
|
5023
5149
|
* @see https://daypicker.dev/docs/translation#custom-formatters
|
|
5024
5150
|
*/ function formatCaption(month, options, dateLib) {
|
|
5025
|
-
|
|
5151
|
+
const lib = dateLib ?? new DateLib(options);
|
|
5152
|
+
return lib.formatMonthYear(month);
|
|
5026
5153
|
}
|
|
5027
5154
|
/**
|
|
5028
5155
|
* @private
|
|
@@ -5244,15 +5371,13 @@ var defaultFormatters = /*#__PURE__*/Object.freeze({
|
|
|
5244
5371
|
*/ function getYearOptions(navStart, navEnd, formatters, dateLib, reverse = false) {
|
|
5245
5372
|
if (!navStart) return undefined;
|
|
5246
5373
|
if (!navEnd) return undefined;
|
|
5247
|
-
const { startOfYear, endOfYear,
|
|
5374
|
+
const { startOfYear, endOfYear, eachYearOfInterval, getYear } = dateLib;
|
|
5248
5375
|
const firstNavYear = startOfYear(navStart);
|
|
5249
5376
|
const lastNavYear = endOfYear(navEnd);
|
|
5250
|
-
const years =
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
year = addYears(year, 1);
|
|
5255
|
-
}
|
|
5377
|
+
const years = eachYearOfInterval({
|
|
5378
|
+
start: firstNavYear,
|
|
5379
|
+
end: lastNavYear
|
|
5380
|
+
});
|
|
5256
5381
|
if (reverse) years.reverse();
|
|
5257
5382
|
return years.map((year)=>{
|
|
5258
5383
|
const label = formatters.formatYearDropdown(year, dateLib);
|
|
@@ -5293,7 +5418,7 @@ var defaultFormatters = /*#__PURE__*/Object.freeze({
|
|
|
5293
5418
|
* Generates the ARIA label for the month grid, which is announced when entering
|
|
5294
5419
|
* the grid.
|
|
5295
5420
|
*
|
|
5296
|
-
* @defaultValue
|
|
5421
|
+
* @defaultValue Locale-specific month/year order (e.g., "November 2022").
|
|
5297
5422
|
* @param date - The date representing the month.
|
|
5298
5423
|
* @param options - Optional configuration for the date formatting library.
|
|
5299
5424
|
* @param dateLib - An optional instance of the date formatting library.
|
|
@@ -5301,7 +5426,8 @@ var defaultFormatters = /*#__PURE__*/Object.freeze({
|
|
|
5301
5426
|
* @group Labels
|
|
5302
5427
|
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
5303
5428
|
*/ function labelGrid(date, options, dateLib) {
|
|
5304
|
-
|
|
5429
|
+
const lib = dateLib ?? new DateLib(options);
|
|
5430
|
+
return lib.formatMonthYear(date);
|
|
5305
5431
|
}
|
|
5306
5432
|
/**
|
|
5307
5433
|
* @ignore
|
|
@@ -6127,6 +6253,12 @@ var FocusTargetPriority;
|
|
|
6127
6253
|
if (!focusedDay) return;
|
|
6128
6254
|
const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);
|
|
6129
6255
|
if (!nextFocus) return;
|
|
6256
|
+
if (props.disableNavigation) {
|
|
6257
|
+
const isNextInCalendar = calendar.days.some((day)=>day.isEqualTo(nextFocus));
|
|
6258
|
+
if (!isNextInCalendar) {
|
|
6259
|
+
return;
|
|
6260
|
+
}
|
|
6261
|
+
}
|
|
6130
6262
|
calendar.goToDay(nextFocus);
|
|
6131
6263
|
setFocused(nextFocus);
|
|
6132
6264
|
};
|
|
@@ -6791,6 +6923,7 @@ var FocusTargetPriority;
|
|
|
6791
6923
|
title: props.title,
|
|
6792
6924
|
role: props.role,
|
|
6793
6925
|
"aria-label": props["aria-label"],
|
|
6926
|
+
"aria-labelledby": props["aria-labelledby"],
|
|
6794
6927
|
...dataAttributes
|
|
6795
6928
|
}, React__default.createElement(components.Months, {
|
|
6796
6929
|
className: classNames[UI.Months],
|
|
@@ -6834,27 +6967,44 @@ var FocusTargetPriority;
|
|
|
6834
6967
|
}, captionLayout?.startsWith("dropdown") ? React__default.createElement(components.DropdownNav, {
|
|
6835
6968
|
className: classNames[UI.Dropdowns],
|
|
6836
6969
|
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
|
-
|
|
6970
|
+
}, (()=>{
|
|
6971
|
+
const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React__default.createElement(components.MonthsDropdown, {
|
|
6972
|
+
key: "month",
|
|
6973
|
+
className: classNames[UI.MonthsDropdown],
|
|
6974
|
+
"aria-label": labelMonthDropdown(),
|
|
6975
|
+
classNames: classNames,
|
|
6976
|
+
components: components,
|
|
6977
|
+
disabled: Boolean(props.disableNavigation),
|
|
6978
|
+
onChange: handleMonthChange(calendarMonth.date),
|
|
6979
|
+
options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters, dateLib),
|
|
6980
|
+
style: styles?.[UI.Dropdown],
|
|
6981
|
+
value: dateLib.getMonth(calendarMonth.date)
|
|
6982
|
+
}) : React__default.createElement("span", {
|
|
6983
|
+
key: "month"
|
|
6984
|
+
}, formatMonthDropdown(calendarMonth.date, dateLib));
|
|
6985
|
+
const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React__default.createElement(components.YearsDropdown, {
|
|
6986
|
+
key: "year",
|
|
6987
|
+
className: classNames[UI.YearsDropdown],
|
|
6988
|
+
"aria-label": labelYearDropdown(dateLib.options),
|
|
6989
|
+
classNames: classNames,
|
|
6990
|
+
components: components,
|
|
6991
|
+
disabled: Boolean(props.disableNavigation),
|
|
6992
|
+
onChange: handleYearChange(calendarMonth.date),
|
|
6993
|
+
options: getYearOptions(navStart, navEnd, formatters, dateLib, Boolean(props.reverseYears)),
|
|
6994
|
+
style: styles?.[UI.Dropdown],
|
|
6995
|
+
value: dateLib.getYear(calendarMonth.date)
|
|
6996
|
+
}) : React__default.createElement("span", {
|
|
6997
|
+
key: "year"
|
|
6998
|
+
}, formatYearDropdown(calendarMonth.date, dateLib));
|
|
6999
|
+
const controls = dateLib.getMonthYearOrder() === "year-first" ? [
|
|
7000
|
+
yearControl,
|
|
7001
|
+
monthControl
|
|
7002
|
+
] : [
|
|
7003
|
+
monthControl,
|
|
7004
|
+
yearControl
|
|
7005
|
+
];
|
|
7006
|
+
return controls;
|
|
7007
|
+
})(), React__default.createElement("span", {
|
|
6858
7008
|
role: "status",
|
|
6859
7009
|
"aria-live": "polite",
|
|
6860
7010
|
style: {
|
|
@@ -7103,4 +7253,4 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
|
7103
7253
|
}
|
|
7104
7254
|
|
|
7105
7255
|
export { Calendar as C, CalendarDayButton as a, buildFormatLongFn as b, buildLocalizeFn as c, buildMatchFn as d, buildMatchPatternFn as e, format as f, toDate as t };
|
|
7106
|
-
//# sourceMappingURL=calendar-
|
|
7256
|
+
//# sourceMappingURL=calendar-Cgi4uVPL.mjs.map
|