ml-uikit 1.1.0 → 1.1.2
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/ui/alert.d.ts +8 -2
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/icon-button.d.ts +9 -0
- package/dist/components/ui/icon-button.d.ts.map +1 -0
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs10.js +1 -1
- package/dist/index.cjs10.js.map +1 -1
- package/dist/index.cjs11.js +1 -1
- package/dist/index.cjs11.js.map +1 -1
- package/dist/index.cjs12.js +1 -1
- package/dist/index.cjs12.js.map +1 -1
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs13.js.map +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs14.js.map +1 -1
- package/dist/index.cjs15.js +1 -7
- package/dist/index.cjs15.js.map +1 -1
- package/dist/index.cjs16.js +7 -1
- package/dist/index.cjs16.js.map +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs17.js.map +1 -1
- package/dist/index.cjs18.js +1 -1
- package/dist/index.cjs18.js.map +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs19.js.map +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs20.js +1 -1
- package/dist/index.cjs20.js.map +1 -1
- package/dist/index.cjs21.js +1 -1
- package/dist/index.cjs21.js.map +1 -1
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs22.js.map +1 -1
- package/dist/index.cjs23.js +1 -1
- package/dist/index.cjs23.js.map +1 -1
- package/dist/index.cjs24.js +1 -1
- package/dist/index.cjs24.js.map +1 -1
- package/dist/index.cjs25.js +1 -1
- package/dist/index.cjs25.js.map +1 -1
- package/dist/index.cjs26.js +1 -1
- package/dist/index.cjs26.js.map +1 -1
- package/dist/index.cjs27.js +1 -1
- package/dist/index.cjs27.js.map +1 -1
- package/dist/index.cjs28.js +1 -1
- package/dist/index.cjs28.js.map +1 -1
- package/dist/index.cjs29.js +1 -1
- package/dist/index.cjs29.js.map +1 -1
- package/dist/index.cjs3.js +1 -1
- package/dist/index.cjs30.js +1 -1
- package/dist/index.cjs30.js.map +1 -1
- package/dist/index.cjs31.js +1 -1
- package/dist/index.cjs31.js.map +1 -1
- package/dist/index.cjs32.js +1 -1
- package/dist/index.cjs32.js.map +1 -1
- package/dist/index.cjs33.js +1 -1
- package/dist/index.cjs33.js.map +1 -1
- package/dist/index.cjs34.js +1 -1
- package/dist/index.cjs34.js.map +1 -1
- package/dist/index.cjs35.js +1 -1
- package/dist/index.cjs35.js.map +1 -1
- package/dist/index.cjs36.js +1 -1
- package/dist/index.cjs36.js.map +1 -1
- package/dist/index.cjs37.js +1 -1
- package/dist/index.cjs37.js.map +1 -1
- package/dist/index.cjs38.js +1 -1
- package/dist/index.cjs38.js.map +1 -1
- package/dist/index.cjs39.js +1 -1
- package/dist/index.cjs39.js.map +1 -1
- package/dist/index.cjs4.js +1 -1
- package/dist/index.cjs4.js.map +1 -1
- package/dist/index.cjs40.js +1 -1
- package/dist/index.cjs40.js.map +1 -1
- package/dist/index.cjs41.js +1 -1
- package/dist/index.cjs41.js.map +1 -1
- package/dist/index.cjs42.js +1 -1
- package/dist/index.cjs42.js.map +1 -1
- package/dist/index.cjs43.js +1 -1
- package/dist/index.cjs43.js.map +1 -1
- package/dist/index.cjs44.js +1 -1
- package/dist/index.cjs44.js.map +1 -1
- package/dist/index.cjs45.js +1 -1
- package/dist/index.cjs45.js.map +1 -1
- package/dist/index.cjs46.js +1 -1
- package/dist/index.cjs46.js.map +1 -1
- package/dist/index.cjs47.js +1 -1
- package/dist/index.cjs47.js.map +1 -1
- package/dist/index.cjs48.js +1 -1
- package/dist/index.cjs48.js.map +1 -1
- package/dist/index.cjs49.js +1 -1
- package/dist/index.cjs49.js.map +1 -1
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs50.js +1 -1
- package/dist/index.cjs50.js.map +1 -1
- package/dist/index.cjs51.js +1 -1
- package/dist/index.cjs51.js.map +1 -1
- package/dist/index.cjs52.js +1 -1
- package/dist/index.cjs52.js.map +1 -1
- package/dist/index.cjs53.js +1 -1
- package/dist/index.cjs53.js.map +1 -1
- package/dist/index.cjs54.js +1 -1
- package/dist/index.cjs54.js.map +1 -1
- package/dist/index.cjs55.js +1 -1
- package/dist/index.cjs55.js.map +1 -1
- package/dist/index.cjs56.js +1 -1
- package/dist/index.cjs56.js.map +1 -1
- package/dist/index.cjs57.js +1 -1
- package/dist/index.cjs57.js.map +1 -1
- package/dist/index.cjs7.js +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +321 -312
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +27 -27
- package/dist/index.es10.js.map +1 -1
- package/dist/index.es11.js +19 -72
- package/dist/index.es11.js.map +1 -1
- package/dist/index.es12.js +62 -157
- package/dist/index.es12.js.map +1 -1
- package/dist/index.es13.js +169 -58
- package/dist/index.es13.js.map +1 -1
- package/dist/index.es14.js +55 -157
- package/dist/index.es14.js.map +1 -1
- package/dist/index.es15.js +150 -181
- package/dist/index.es15.js.map +1 -1
- package/dist/index.es16.js +188 -21
- package/dist/index.es16.js.map +1 -1
- package/dist/index.es17.js +31 -5
- package/dist/index.es17.js.map +1 -1
- package/dist/index.es18.js +5 -103
- package/dist/index.es18.js.map +1 -1
- package/dist/index.es19.js +70 -103
- package/dist/index.es19.js.map +1 -1
- package/dist/index.es2.js +1 -1
- package/dist/index.es20.js +108 -61
- package/dist/index.es20.js.map +1 -1
- package/dist/index.es21.js +59 -60
- package/dist/index.es21.js.map +1 -1
- package/dist/index.es22.js +69 -114
- package/dist/index.es22.js.map +1 -1
- package/dist/index.es23.js +132 -97
- package/dist/index.es23.js.map +1 -1
- package/dist/index.es24.js +49 -156
- package/dist/index.es24.js.map +1 -1
- package/dist/index.es25.js +194 -76
- package/dist/index.es25.js.map +1 -1
- package/dist/index.es26.js +89 -20
- package/dist/index.es26.js.map +1 -1
- package/dist/index.es27.js +20 -22
- package/dist/index.es27.js.map +1 -1
- package/dist/index.es28.js +17 -144
- package/dist/index.es28.js.map +1 -1
- package/dist/index.es29.js +145 -37
- package/dist/index.es29.js.map +1 -1
- package/dist/index.es3.js +1 -1
- package/dist/index.es30.js +37 -179
- package/dist/index.es30.js.map +1 -1
- package/dist/index.es31.js +174 -18
- package/dist/index.es31.js.map +1 -1
- package/dist/index.es32.js +29 -16
- package/dist/index.es32.js.map +1 -1
- package/dist/index.es33.js +15 -92
- package/dist/index.es33.js.map +1 -1
- package/dist/index.es34.js +91 -189
- package/dist/index.es34.js.map +1 -1
- package/dist/index.es35.js +165 -71
- package/dist/index.es35.js.map +1 -1
- package/dist/index.es36.js +85 -84
- package/dist/index.es36.js.map +1 -1
- package/dist/index.es37.js +92 -17
- package/dist/index.es37.js.map +1 -1
- package/dist/index.es38.js +19 -21
- package/dist/index.es38.js.map +1 -1
- package/dist/index.es39.js +16 -21
- package/dist/index.es39.js.map +1 -1
- package/dist/index.es4.js +65 -26
- package/dist/index.es4.js.map +1 -1
- package/dist/index.es40.js +22 -25
- package/dist/index.es40.js.map +1 -1
- package/dist/index.es41.js +25 -104
- package/dist/index.es41.js.map +1 -1
- package/dist/index.es42.js +117 -20
- package/dist/index.es42.js.map +1 -1
- package/dist/index.es43.js +19 -97
- package/dist/index.es43.js.map +1 -1
- package/dist/index.es44.js +77 -509
- package/dist/index.es44.js.map +1 -1
- package/dist/index.es45.js +552 -11
- package/dist/index.es45.js.map +1 -1
- package/dist/index.es46.js +15 -18
- package/dist/index.es46.js.map +1 -1
- package/dist/index.es47.js +44 -19
- package/dist/index.es47.js.map +1 -1
- package/dist/index.es48.js +19 -12
- package/dist/index.es48.js.map +1 -1
- package/dist/index.es49.js +13 -22
- package/dist/index.es49.js.map +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.es50.js +23 -197
- package/dist/index.es50.js.map +1 -1
- package/dist/index.es51.js +191 -28
- package/dist/index.es51.js.map +1 -1
- package/dist/index.es52.js +45 -14
- package/dist/index.es52.js.map +1 -1
- package/dist/index.es53.js +12 -28
- package/dist/index.es53.js.map +1 -1
- package/dist/index.es54.js +30 -34
- package/dist/index.es54.js.map +1 -1
- package/dist/index.es55.js +37 -19
- package/dist/index.es55.js.map +1 -1
- package/dist/index.es56.js +20 -6
- package/dist/index.es56.js.map +1 -1
- package/dist/index.es57.js +5 -11
- package/dist/index.es57.js.map +1 -1
- package/dist/index.es7.js +1 -1
- package/dist/index.es8.js +1 -1
- package/dist/index.es9.js +1 -1
- package/dist/style.css +436 -172
- package/package.json +1 -1
- package/dist/hooks/use-mobile.d.ts +0 -2
- package/dist/hooks/use-mobile.d.ts.map +0 -1
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.es10.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
import { Slot as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { cn as
|
|
5
|
-
const t = "bg-
|
|
6
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-
|
|
2
|
+
import { Slot as p } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva as c } from "class-variance-authority";
|
|
4
|
+
import { cn as g } from "./index.es57.js";
|
|
5
|
+
const t = "bg-[#26453f] text-white hover:bg-[#1f3631]", d = "bg-[#f1f1f1] text-[#111111] hover:bg-[#e6e6e6]", v = "border border-[#26453f] bg-white text-[#26453f] hover:bg-[#e5f1ee]", i = "border border-[#e6e6e6] bg-white text-[#111111] hover:bg-[#f5f5f5]", u = "bg-transparent text-[#111111] hover:bg-[#f1f1f1]", b = "bg-[#e73f3f] text-white hover:bg-[#cf2f2f]", x = "text-[#26453f] underline-offset-4 hover:underline", h = c(
|
|
6
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[8px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: t,
|
|
11
11
|
primary: t,
|
|
12
|
-
secondary:
|
|
13
|
-
"outline-primary":
|
|
14
|
-
"outline-neutral":
|
|
15
|
-
outline:
|
|
16
|
-
ghost:
|
|
12
|
+
secondary: d,
|
|
13
|
+
"outline-primary": v,
|
|
14
|
+
"outline-neutral": i,
|
|
15
|
+
outline: i,
|
|
16
|
+
ghost: u,
|
|
17
17
|
destructive: b,
|
|
18
|
-
link:
|
|
18
|
+
link: x
|
|
19
19
|
},
|
|
20
20
|
size: {
|
|
21
|
-
default: "h-
|
|
22
|
-
lg: "h-
|
|
23
|
-
sm: "h-8 px-3 text-
|
|
24
|
-
mini: "h-7 px-2 text-[
|
|
25
|
-
icon: "h-
|
|
26
|
-
"icon-lg": "h-
|
|
21
|
+
default: "h-10 px-4 text-[14px] leading-[20px] [&_svg]:size-4",
|
|
22
|
+
lg: "h-11 px-5 text-[14px] leading-[20px] [&_svg]:size-5",
|
|
23
|
+
sm: "h-8 px-3 text-[12px] leading-[16px] [&_svg]:size-3.5",
|
|
24
|
+
mini: "h-7 px-2 text-[12px] leading-[16px] [&_svg]:size-3",
|
|
25
|
+
icon: "h-10 w-10 p-0 [&_svg]:size-4",
|
|
26
|
+
"icon-lg": "h-11 w-11 p-0 [&_svg]:size-5",
|
|
27
27
|
"icon-sm": "h-8 w-8 p-0 [&_svg]:size-3.5",
|
|
28
28
|
"icon-mini": "h-7 w-7 p-0 [&_svg]:size-3"
|
|
29
29
|
}
|
|
@@ -33,22 +33,22 @@ const t = "bg-primary text-primary-foreground hover:bg-primary/90", l = "bg-seco
|
|
|
33
33
|
size: "default"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
),
|
|
37
|
-
({ className:
|
|
38
|
-
const
|
|
36
|
+
), m = e.forwardRef(
|
|
37
|
+
({ className: n, variant: r, size: o, asChild: s = !1, ...a }, f) => {
|
|
38
|
+
const l = s ? p : "button";
|
|
39
39
|
return /* @__PURE__ */ e.createElement(
|
|
40
|
-
|
|
40
|
+
l,
|
|
41
41
|
{
|
|
42
|
-
className:
|
|
43
|
-
ref:
|
|
44
|
-
...
|
|
42
|
+
className: g(h({ variant: r, size: o, className: n })),
|
|
43
|
+
ref: f,
|
|
44
|
+
...a
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
|
-
|
|
49
|
+
m.displayName = "Button";
|
|
50
50
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
m as Button,
|
|
52
|
+
h as buttonVariants
|
|
53
53
|
};
|
|
54
54
|
//# sourceMappingURL=index.es10.js.map
|
package/dist/index.es10.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es10.js","sources":["../src/components/ui/button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst primaryVariant = \"bg-
|
|
1
|
+
{"version":3,"file":"index.es10.js","sources":["../src/components/ui/button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst primaryVariant = \"bg-[#26453f] text-white hover:bg-[#1f3631]\"\nconst secondaryVariant = \"bg-[#f1f1f1] text-[#111111] hover:bg-[#e6e6e6]\"\nconst outlinePrimaryVariant =\n \"border border-[#26453f] bg-white text-[#26453f] hover:bg-[#e5f1ee]\"\nconst outlineNeutralVariant =\n \"border border-[#e6e6e6] bg-white text-[#111111] hover:bg-[#f5f5f5]\"\nconst ghostVariant = \"bg-transparent text-[#111111] hover:bg-[#f1f1f1]\"\nconst destructiveVariant = \"bg-[#e73f3f] text-white hover:bg-[#cf2f2f]\"\nconst linkVariant = \"text-[#26453f] underline-offset-4 hover:underline\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[8px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: primaryVariant,\n primary: primaryVariant,\n secondary: secondaryVariant,\n \"outline-primary\": outlinePrimaryVariant,\n \"outline-neutral\": outlineNeutralVariant,\n outline: outlineNeutralVariant,\n ghost: ghostVariant,\n destructive: destructiveVariant,\n link: linkVariant,\n },\n size: {\n default: \"h-10 px-4 text-[14px] leading-[20px] [&_svg]:size-4\",\n lg: \"h-11 px-5 text-[14px] leading-[20px] [&_svg]:size-5\",\n sm: \"h-8 px-3 text-[12px] leading-[16px] [&_svg]:size-3.5\",\n mini: \"h-7 px-2 text-[12px] leading-[16px] [&_svg]:size-3\",\n icon: \"h-10 w-10 p-0 [&_svg]:size-4\",\n \"icon-lg\": \"h-11 w-11 p-0 [&_svg]:size-5\",\n \"icon-sm\": \"h-8 w-8 p-0 [&_svg]:size-3.5\",\n \"icon-mini\": \"h-7 w-7 p-0 [&_svg]:size-3\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n"],"names":["primaryVariant","secondaryVariant","outlinePrimaryVariant","outlineNeutralVariant","ghostVariant","destructiveVariant","linkVariant","buttonVariants","cva","Button","React","className","variant","size","asChild","props","ref","Comp","Slot","cn"],"mappings":";;;;AAMA,MAAMA,IAAiB,8CACjBC,IAAmB,kDACnBC,IACJ,sEACIC,IACJ,sEACIC,IAAe,oDACfC,IAAqB,8CACrBC,IAAc,qDAEdC,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAASR;AAAA,QACT,SAASA;AAAA,QACT,WAAWC;AAAA,QACX,mBAAmBC;AAAA,QACnB,mBAAmBC;AAAA,QACnB,SAASA;AAAA,QACT,OAAOC;AAAA,QACP,aAAaC;AAAA,QACb,MAAMC;AAAA,MAAA;AAAA,MAER,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,WAAW;AAAA,QACX,WAAW;AAAA,QACX,aAAa;AAAA,MAAA;AAAA,IACf;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAQMG,IAASC,EAAM;AAAA,EACnB,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,SAAAC,IAAU,IAAO,GAAGC,EAAA,GAASC,MAAQ;AAChE,UAAMC,IAAOH,IAAUI,IAAO;AAC9B,WACE,gBAAAR,EAAA;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,WAAWE,EAAGZ,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QAC1D,KAAAK;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AACAN,EAAO,cAAc;"}
|
package/dist/index.es11.js
CHANGED
|
@@ -1,77 +1,24 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
defaultVariants: {
|
|
16
|
-
orientation: "horizontal"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
function p({
|
|
21
|
-
className: e,
|
|
22
|
-
orientation: t,
|
|
23
|
-
...o
|
|
24
|
-
}) {
|
|
25
|
-
return /* @__PURE__ */ r.createElement(
|
|
26
|
-
"div",
|
|
27
|
-
{
|
|
28
|
-
role: "group",
|
|
29
|
-
"data-slot": "button-group",
|
|
30
|
-
"data-orientation": t,
|
|
31
|
-
className: a(d({ orientation: t }), e),
|
|
32
|
-
...o
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
function h({
|
|
37
|
-
className: e,
|
|
38
|
-
asChild: t = !1,
|
|
39
|
-
...o
|
|
40
|
-
}) {
|
|
41
|
-
const n = t ? i : "div";
|
|
42
|
-
return /* @__PURE__ */ r.createElement(
|
|
43
|
-
n,
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { Button as r } from "./index.es10.js";
|
|
3
|
+
import { cn as c } from "./index.es57.js";
|
|
4
|
+
const e = {
|
|
5
|
+
mini: "icon-mini",
|
|
6
|
+
sm: "icon-sm",
|
|
7
|
+
md: "icon",
|
|
8
|
+
lg: "icon-lg"
|
|
9
|
+
}, s = o.forwardRef(
|
|
10
|
+
({ className: n, size: t = "md", ...i }, m) => /* @__PURE__ */ o.createElement(
|
|
11
|
+
r,
|
|
44
12
|
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
...o
|
|
13
|
+
ref: m,
|
|
14
|
+
size: e[t],
|
|
15
|
+
className: c("shrink-0", n),
|
|
16
|
+
...i
|
|
50
17
|
}
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
className: e,
|
|
55
|
-
orientation: t = "vertical",
|
|
56
|
-
...o
|
|
57
|
-
}) {
|
|
58
|
-
return /* @__PURE__ */ r.createElement(
|
|
59
|
-
l,
|
|
60
|
-
{
|
|
61
|
-
"data-slot": "button-group-separator",
|
|
62
|
-
orientation: t,
|
|
63
|
-
className: a(
|
|
64
|
-
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
65
|
-
e
|
|
66
|
-
),
|
|
67
|
-
...o
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
}
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
s.displayName = "IconButton";
|
|
71
21
|
export {
|
|
72
|
-
|
|
73
|
-
g as ButtonGroupSeparator,
|
|
74
|
-
h as ButtonGroupText,
|
|
75
|
-
d as buttonGroupVariants
|
|
22
|
+
s as IconButton
|
|
76
23
|
};
|
|
77
24
|
//# sourceMappingURL=index.es11.js.map
|
package/dist/index.es11.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es11.js","sources":["../src/components/ui/button
|
|
1
|
+
{"version":3,"file":"index.es11.js","sources":["../src/components/ui/icon-button.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\n\ntype IconButtonSize = \"mini\" | \"sm\" | \"md\" | \"lg\"\n\nconst sizeMap: Record<IconButtonSize, React.ComponentProps<typeof Button>[\"size\"]> = {\n mini: \"icon-mini\",\n sm: \"icon-sm\",\n md: \"icon\",\n lg: \"icon-lg\",\n}\n\nexport interface IconButtonProps\n extends Omit<React.ComponentProps<typeof Button>, \"size\"> {\n size?: IconButtonSize\n}\n\nconst IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ className, size = \"md\", ...props }, ref) => {\n return (\n <Button\n ref={ref}\n size={sizeMap[size]}\n className={cn(\"shrink-0\", className)}\n {...props}\n />\n )\n }\n)\nIconButton.displayName = \"IconButton\"\n\nexport { IconButton }\n"],"names":["sizeMap","IconButton","React","className","size","props","ref","Button","cn"],"mappings":";;;AAOA,MAAMA,IAA+E;AAAA,EACnF,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAOMC,IAAaC,EAAM;AAAA,EACvB,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,MAAM,GAAGC,EAAA,GAASC,MAEnC,gBAAAJ,EAAA;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,MAAMN,EAAQI,CAAI;AAAA,MAClB,WAAWI,EAAG,YAAYL,CAAS;AAAA,MAClC,GAAGE;AAAA,IAAA;AAAA,EAAA;AAIZ;AACAJ,EAAW,cAAc;"}
|
package/dist/index.es12.js
CHANGED
|
@@ -1,172 +1,77 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { cn as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { Slot as i } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva as s } from "class-variance-authority";
|
|
4
|
+
import { cn as a } from "./index.es57.js";
|
|
5
|
+
import { Separator as l } from "./index.es43.js";
|
|
6
|
+
const d = s(
|
|
7
|
+
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
12
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
orientation: "horizontal"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
function p({
|
|
21
|
+
className: e,
|
|
22
|
+
orientation: t,
|
|
23
|
+
...o
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ r.createElement(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
role: "group",
|
|
29
|
+
"data-slot": "button-group",
|
|
30
|
+
"data-orientation": t,
|
|
31
|
+
className: a(d({ orientation: t }), e),
|
|
32
|
+
...o
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function h({
|
|
37
|
+
className: e,
|
|
38
|
+
asChild: t = !1,
|
|
39
|
+
...o
|
|
15
40
|
}) {
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
|
|
41
|
+
const n = t ? i : "div";
|
|
42
|
+
return /* @__PURE__ */ r.createElement(
|
|
43
|
+
n,
|
|
19
44
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
24
|
-
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
25
|
-
c
|
|
45
|
+
className: a(
|
|
46
|
+
"bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
47
|
+
e
|
|
26
48
|
),
|
|
27
|
-
|
|
28
|
-
formatters: {
|
|
29
|
-
formatMonthDropdown: (n) => n.toLocaleString("default", { month: "short" }),
|
|
30
|
-
...u
|
|
31
|
-
},
|
|
32
|
-
classNames: {
|
|
33
|
-
root: e("w-fit", t.root),
|
|
34
|
-
months: e(
|
|
35
|
-
"relative flex flex-col gap-4 md:flex-row",
|
|
36
|
-
t.months
|
|
37
|
-
),
|
|
38
|
-
month: e("flex w-full flex-col gap-4", t.month),
|
|
39
|
-
nav: e(
|
|
40
|
-
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
41
|
-
t.nav
|
|
42
|
-
),
|
|
43
|
-
button_previous: e(
|
|
44
|
-
m({ variant: s }),
|
|
45
|
-
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
46
|
-
t.button_previous
|
|
47
|
-
),
|
|
48
|
-
button_next: e(
|
|
49
|
-
m({ variant: s }),
|
|
50
|
-
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
51
|
-
t.button_next
|
|
52
|
-
),
|
|
53
|
-
month_caption: e(
|
|
54
|
-
"flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",
|
|
55
|
-
t.month_caption
|
|
56
|
-
),
|
|
57
|
-
dropdowns: e(
|
|
58
|
-
"flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
59
|
-
t.dropdowns
|
|
60
|
-
),
|
|
61
|
-
dropdown_root: e(
|
|
62
|
-
"has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",
|
|
63
|
-
t.dropdown_root
|
|
64
|
-
),
|
|
65
|
-
dropdown: e(
|
|
66
|
-
"bg-popover absolute inset-0 opacity-0",
|
|
67
|
-
t.dropdown
|
|
68
|
-
),
|
|
69
|
-
caption_label: e(
|
|
70
|
-
"select-none font-medium",
|
|
71
|
-
l === "label" ? "text-sm" : "[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",
|
|
72
|
-
t.caption_label
|
|
73
|
-
),
|
|
74
|
-
table: "w-full border-collapse",
|
|
75
|
-
weekdays: e("flex", t.weekdays),
|
|
76
|
-
weekday: e(
|
|
77
|
-
"text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",
|
|
78
|
-
t.weekday
|
|
79
|
-
),
|
|
80
|
-
week: e("mt-2 flex w-full", t.week),
|
|
81
|
-
week_number_header: e(
|
|
82
|
-
"w-[--cell-size] select-none",
|
|
83
|
-
t.week_number_header
|
|
84
|
-
),
|
|
85
|
-
week_number: e(
|
|
86
|
-
"text-muted-foreground select-none text-[0.8rem]",
|
|
87
|
-
t.week_number
|
|
88
|
-
),
|
|
89
|
-
day: e(
|
|
90
|
-
"group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",
|
|
91
|
-
t.day
|
|
92
|
-
),
|
|
93
|
-
range_start: e(
|
|
94
|
-
"bg-accent rounded-l-md",
|
|
95
|
-
t.range_start
|
|
96
|
-
),
|
|
97
|
-
range_middle: e("rounded-none", t.range_middle),
|
|
98
|
-
range_end: e("bg-accent rounded-r-md", t.range_end),
|
|
99
|
-
today: e(
|
|
100
|
-
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
101
|
-
t.today
|
|
102
|
-
),
|
|
103
|
-
outside: e(
|
|
104
|
-
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
105
|
-
t.outside
|
|
106
|
-
),
|
|
107
|
-
disabled: e(
|
|
108
|
-
"text-muted-foreground opacity-50",
|
|
109
|
-
t.disabled
|
|
110
|
-
),
|
|
111
|
-
hidden: e("invisible", t.hidden),
|
|
112
|
-
...i
|
|
113
|
-
},
|
|
114
|
-
components: {
|
|
115
|
-
Root: ({ className: n, rootRef: d, ...o }) => /* @__PURE__ */ a.createElement(
|
|
116
|
-
"div",
|
|
117
|
-
{
|
|
118
|
-
"data-slot": "calendar",
|
|
119
|
-
ref: d,
|
|
120
|
-
className: e(n),
|
|
121
|
-
...o
|
|
122
|
-
}
|
|
123
|
-
),
|
|
124
|
-
Chevron: ({ className: n, orientation: d, ...o }) => d === "left" ? /* @__PURE__ */ a.createElement(x, { className: e("size-4", n), ...o }) : d === "right" ? /* @__PURE__ */ a.createElement(
|
|
125
|
-
b,
|
|
126
|
-
{
|
|
127
|
-
className: e("size-4", n),
|
|
128
|
-
...o
|
|
129
|
-
}
|
|
130
|
-
) : /* @__PURE__ */ a.createElement(w, { className: e("size-4", n), ...o }),
|
|
131
|
-
DayButton: y,
|
|
132
|
-
WeekNumber: ({ children: n, ...d }) => /* @__PURE__ */ a.createElement("td", { ...d }, /* @__PURE__ */ a.createElement("div", { className: "flex size-[--cell-size] items-center justify-center text-center" }, n)),
|
|
133
|
-
...f
|
|
134
|
-
},
|
|
135
|
-
...p
|
|
49
|
+
...o
|
|
136
50
|
}
|
|
137
51
|
);
|
|
138
52
|
}
|
|
139
|
-
function
|
|
140
|
-
className:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
...l
|
|
53
|
+
function g({
|
|
54
|
+
className: e,
|
|
55
|
+
orientation: t = "vertical",
|
|
56
|
+
...o
|
|
144
57
|
}) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
r.focused && u.current?.focus();
|
|
148
|
-
}, [r.focused]), /* @__PURE__ */ a.createElement(
|
|
149
|
-
_,
|
|
58
|
+
return /* @__PURE__ */ r.createElement(
|
|
59
|
+
l,
|
|
150
60
|
{
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
"data-range-start": r.range_start,
|
|
157
|
-
"data-range-end": r.range_end,
|
|
158
|
-
"data-range-middle": r.range_middle,
|
|
159
|
-
className: e(
|
|
160
|
-
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",
|
|
161
|
-
s.day,
|
|
162
|
-
c
|
|
61
|
+
"data-slot": "button-group-separator",
|
|
62
|
+
orientation: t,
|
|
63
|
+
className: a(
|
|
64
|
+
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
65
|
+
e
|
|
163
66
|
),
|
|
164
|
-
...
|
|
67
|
+
...o
|
|
165
68
|
}
|
|
166
69
|
);
|
|
167
70
|
}
|
|
168
71
|
export {
|
|
169
|
-
|
|
170
|
-
|
|
72
|
+
p as ButtonGroup,
|
|
73
|
+
g as ButtonGroupSeparator,
|
|
74
|
+
h as ButtonGroupText,
|
|
75
|
+
d as buttonGroupVariants
|
|
171
76
|
};
|
|
172
77
|
//# sourceMappingURL=index.es12.js.map
|
package/dist/index.es12.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es12.js","sources":["../src/components/ui/calendar.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from \"lucide-react\"\nimport { DayButton, DayPicker, getDefaultClassNames } from \"react-day-picker\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, buttonVariants } from \"@/components/ui/button\"\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"]\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\n \"relative flex flex-col gap-4 md:flex-row\",\n defaultClassNames.months\n ),\n month: cn(\"flex w-full flex-col gap-4\", defaultClassNames.month),\n nav: cn(\n \"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\",\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50\",\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50\",\n defaultClassNames.button_next\n ),\n month_caption: cn(\n \"flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]\",\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n \"flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium\",\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n \"has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border\",\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n \"bg-popover absolute inset-0 opacity-0\",\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n \"select-none font-medium\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5\",\n defaultClassNames.caption_label\n ),\n table: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal\",\n defaultClassNames.weekday\n ),\n week: cn(\"mt-2 flex w-full\", defaultClassNames.week),\n week_number_header: cn(\n \"w-[--cell-size] select-none\",\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n \"text-muted-foreground select-none text-[0.8rem]\",\n defaultClassNames.week_number\n ),\n day: cn(\n \"group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md\",\n defaultClassNames.day\n ),\n range_start: cn(\n \"bg-accent rounded-l-md\",\n defaultClassNames.range_start\n ),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\"bg-accent rounded-r-md\", defaultClassNames.range_end),\n today: cn(\n \"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none\",\n defaultClassNames.today\n ),\n outside: cn(\n \"text-muted-foreground aria-selected:text-muted-foreground\",\n defaultClassNames.outside\n ),\n disabled: cn(\n \"text-muted-foreground opacity-50\",\n defaultClassNames.disabled\n ),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot=\"calendar\"\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return (\n <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />\n )\n }\n\n if (orientation === \"right\") {\n return (\n <ChevronRightIcon\n className={cn(\"size-4\", className)}\n {...props}\n />\n )\n }\n\n return (\n <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />\n )\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-[--cell-size] items-center justify-center text-center\">\n {children}\n </div>\n </td>\n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n"],"names":["Calendar","className","classNames","showOutsideDays","captionLayout","buttonVariant","formatters","components","props","defaultClassNames","getDefaultClassNames","React","DayPicker","cn","date","buttonVariants","rootRef","orientation","ChevronLeftIcon","ChevronRightIcon","ChevronDownIcon","CalendarDayButton","children","day","modifiers","ref","Button"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.es12.js","sources":["../src/components/ui/button-group.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupText({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n className={cn(\n \"bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n}\n"],"names":["buttonGroupVariants","cva","ButtonGroup","className","orientation","props","React","cn","ButtonGroupText","asChild","Comp","Slot","ButtonGroupSeparator","Separator"],"mappings":";;;;;AAOA,MAAMA,IAAsBC;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA,QACX,YACE;AAAA,QACF,UACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB;AAAA,MACf,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;AAEA,SAASC,EAAY;AAAA,EACnB,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,GAA2E;AACzE,SACE,gBAAAC,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,aAAU;AAAA,MACV,oBAAkBF;AAAA,MAClB,WAAWG,EAAGP,EAAoB,EAAE,aAAAI,EAAA,CAAa,GAAGD,CAAS;AAAA,MAC5D,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASG,EAAgB;AAAA,EACvB,WAAAL;AAAA,EACA,SAAAM,IAAU;AAAA,EACV,GAAGJ;AACL,GAEG;AACD,QAAMK,IAAOD,IAAUE,IAAO;AAE9B,SACE,gBAAAL,EAAA;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,WAAWH;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASO,EAAqB;AAAA,EAC5B,WAAAT;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,GAAGC;AACL,GAA2C;AACzC,SACE,gBAAAC,EAAA;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,aAAAT;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|