fina-react-ds 1.0.39 → 1.0.42

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.
Files changed (67) hide show
  1. package/dist/components/alert-dialog.js +1 -166
  2. package/dist/components/alert.js +1 -73
  3. package/dist/components/avatar.js +1 -58
  4. package/dist/components/badge.js +1 -44
  5. package/dist/components/button.js +1 -153
  6. package/dist/components/calendar.js +1 -205
  7. package/dist/components/card.js +1 -99
  8. package/dist/components/checkbox.js +1 -34
  9. package/dist/components/data-loader.js +1 -24
  10. package/dist/components/date-picker.js +1 -64
  11. package/dist/components/dialog.js +1 -145
  12. package/dist/components/dropdown-menu.js +1 -248
  13. package/dist/components/file-uploader.js +1 -108
  14. package/dist/components/form-color-picker.js +1 -29
  15. package/dist/components/form-date.js +1 -30
  16. package/dist/components/form-file-uploader.js +1 -32
  17. package/dist/components/form-image-uploader.js +1 -40
  18. package/dist/components/form-input.js +1 -35
  19. package/dist/components/form-select.js +1 -51
  20. package/dist/components/form-switch.js +1 -35
  21. package/dist/components/form-textarea.js +1 -35
  22. package/dist/components/form.js +1 -110
  23. package/dist/components/hover-card.js +1 -43
  24. package/dist/components/image-uploader.js +1 -130
  25. package/dist/components/index.js +1 -200
  26. package/dist/components/input.js +1 -26
  27. package/dist/components/label.js +1 -32
  28. package/dist/components/mode-toggle.js +1 -26
  29. package/dist/components/pagination.js +1 -128
  30. package/dist/components/password-rules-checker.js +1 -44
  31. package/dist/components/popover.js +1 -50
  32. package/dist/components/select.js +1 -53
  33. package/dist/components/separator.js +1 -29
  34. package/dist/components/sheet.js +1 -160
  35. package/dist/components/sidebar.js +1 -624
  36. package/dist/components/simple-pagination.js +1 -34
  37. package/dist/components/simple-tooltip.js +1 -17
  38. package/dist/components/skeleton.js +1 -18
  39. package/dist/components/sonner.js +1 -24
  40. package/dist/components/switch.js +1 -34
  41. package/dist/components/table.js +1 -124
  42. package/dist/components/tabs.js +1 -73
  43. package/dist/components/textarea.js +1 -23
  44. package/dist/components/tooltip.js +1 -61
  45. package/dist/hooks/index.js +1 -4
  46. package/dist/hooks/use-mobile.js +1 -17
  47. package/dist/index.js +1 -225
  48. package/dist/lib/arrays.js +1 -7
  49. package/dist/lib/dates.js +1 -21
  50. package/dist/lib/http.js +1 -56
  51. package/dist/lib/index.js +1 -27
  52. package/dist/lib/strings.js +1 -6
  53. package/dist/lib/utils.js +2 -31
  54. package/dist/lib/yup.js +1 -88
  55. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +1 -0
  56. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +1 -0
  57. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +1 -0
  58. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +1 -0
  59. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +1 -0
  60. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +1 -0
  61. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +1 -0
  62. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +1 -0
  63. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +1 -0
  64. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +1 -0
  65. package/dist/providers/loader-provider.js +1 -34
  66. package/dist/providers/theme-provider.js +1 -45
  67. package/package.json +2 -10
@@ -1,128 +1 @@
1
- var c = Object.defineProperty;
2
- var i = (a, n) => c(a, "name", { value: n, configurable: !0 });
3
- import { jsx as t, jsxs as o } from "react/jsx-runtime";
4
- import { ChevronLeftIcon as p, ChevronRightIcon as m, MoreHorizontalIcon as u } from "lucide-react";
5
- import { cn as e } from "../lib/utils.js";
6
- import { buttonVariants as d } from "./button.js";
7
- function P({ className: a, ...n }) {
8
- return /* @__PURE__ */ t(
9
- "nav",
10
- {
11
- role: "navigation",
12
- "aria-label": "pagination",
13
- "data-slot": "pagination",
14
- className: e("mx-auto flex w-full justify-center", a),
15
- ...n
16
- }
17
- );
18
- }
19
- i(P, "Pagination");
20
- function v({
21
- className: a,
22
- ...n
23
- }) {
24
- return /* @__PURE__ */ t(
25
- "ul",
26
- {
27
- "data-slot": "pagination-content",
28
- className: e("flex flex-row items-center gap-1", a),
29
- ...n
30
- }
31
- );
32
- }
33
- i(v, "PaginationContent");
34
- function b({ ...a }) {
35
- return /* @__PURE__ */ t("li", { "data-slot": "pagination-item", ...a });
36
- }
37
- i(b, "PaginationItem");
38
- function r({
39
- className: a,
40
- isActive: n,
41
- size: s = "icon",
42
- ...l
43
- }) {
44
- return /* @__PURE__ */ t(
45
- "a",
46
- {
47
- "aria-current": n ? "page" : void 0,
48
- "data-slot": "pagination-link",
49
- "data-active": n,
50
- className: e(
51
- d({
52
- variant: n ? "contained" : "ghost",
53
- color: "dark",
54
- size: s
55
- }),
56
- a
57
- ),
58
- ...l
59
- }
60
- );
61
- }
62
- i(r, "PaginationLink");
63
- function k({
64
- className: a,
65
- ...n
66
- }) {
67
- return /* @__PURE__ */ o(
68
- r,
69
- {
70
- "aria-label": "Go to previous page",
71
- size: "default",
72
- className: e("gap-1 px-2.5 sm:pl-2.5", a),
73
- ...n,
74
- children: [
75
- /* @__PURE__ */ t(p, {}),
76
- /* @__PURE__ */ t("span", { className: "hidden sm:block", children: "Précédent" })
77
- ]
78
- }
79
- );
80
- }
81
- i(k, "PaginationPrevious");
82
- function z({
83
- className: a,
84
- ...n
85
- }) {
86
- return /* @__PURE__ */ o(
87
- r,
88
- {
89
- "aria-label": "Go to next page",
90
- size: "default",
91
- className: e("gap-1 px-2.5 sm:pr-2.5", a),
92
- ...n,
93
- children: [
94
- /* @__PURE__ */ t("span", { className: "hidden sm:block", children: "Suivant" }),
95
- /* @__PURE__ */ t(m, {})
96
- ]
97
- }
98
- );
99
- }
100
- i(z, "PaginationNext");
101
- function j({
102
- className: a,
103
- ...n
104
- }) {
105
- return /* @__PURE__ */ o(
106
- "span",
107
- {
108
- "aria-hidden": !0,
109
- "data-slot": "pagination-ellipsis",
110
- className: e("flex size-9 items-center justify-center", a),
111
- ...n,
112
- children: [
113
- /* @__PURE__ */ t(u, { className: "size-4" }),
114
- /* @__PURE__ */ t("span", { className: "sr-only", children: "More pages" })
115
- ]
116
- }
117
- );
118
- }
119
- i(j, "PaginationEllipsis");
120
- export {
121
- P as Pagination,
122
- v as PaginationContent,
123
- j as PaginationEllipsis,
124
- b as PaginationItem,
125
- r as PaginationLink,
126
- z as PaginationNext,
127
- k as PaginationPrevious
128
- };
1
+ var c=Object.defineProperty;var i=(a,n)=>c(a,"name",{value:n,configurable:!0});import{jsx as t,jsxs as o}from"react/jsx-runtime";import{ChevronLeftIcon as p,ChevronRightIcon as m,MoreHorizontalIcon as u}from"lucide-react";import{cn as e}from"../lib/utils.js";import{buttonVariants as d}from"./button.js";function P({className:a,...n}){return t("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:e("mx-auto flex w-full justify-center",a),...n})}i(P,"Pagination");function v({className:a,...n}){return t("ul",{"data-slot":"pagination-content",className:e("flex flex-row items-center gap-1",a),...n})}i(v,"PaginationContent");function b({...a}){return t("li",{"data-slot":"pagination-item",...a})}i(b,"PaginationItem");function r({className:a,isActive:n,size:s="icon",...l}){return t("a",{"aria-current":n?"page":void 0,"data-slot":"pagination-link","data-active":n,className:e(d({variant:n?"contained":"ghost",color:"dark",size:s}),a),...l})}i(r,"PaginationLink");function k({className:a,...n}){return o(r,{"aria-label":"Go to previous page",size:"default",className:e("gap-1 px-2.5 sm:pl-2.5",a),...n,children:[t(p,{}),t("span",{className:"hidden sm:block",children:"Précédent"})]})}i(k,"PaginationPrevious");function z({className:a,...n}){return o(r,{"aria-label":"Go to next page",size:"default",className:e("gap-1 px-2.5 sm:pr-2.5",a),...n,children:[t("span",{className:"hidden sm:block",children:"Suivant"}),t(m,{})]})}i(z,"PaginationNext");function j({className:a,...n}){return o("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:e("flex size-9 items-center justify-center",a),...n,children:[t(u,{className:"size-4"}),t("span",{className:"sr-only",children:"More pages"})]})}i(j,"PaginationEllipsis");export{P as Pagination,v as PaginationContent,j as PaginationEllipsis,b as PaginationItem,r as PaginationLink,z as PaginationNext,k as PaginationPrevious};
@@ -1,44 +1 @@
1
- var m = Object.defineProperty;
2
- var t = (c, i) => m(c, "name", { value: i, configurable: !0 });
3
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
4
- import { CheckIcon as h, XIcon as a } from "lucide-react";
5
- const l = /* @__PURE__ */ t(({
6
- password: c,
7
- children: i,
8
- test: n
9
- }) => {
10
- const r = c && n && n(c);
11
- return /* @__PURE__ */ s(
12
- "div",
13
- {
14
- className: `flex flex-row items-center gap-x-2 gap-4 ${r ? "text-success" : ""}`,
15
- children: [
16
- /* @__PURE__ */ e("div", { className: "flex-none text-lg", children: r ? /* @__PURE__ */ e(h, { className: "size-4" }) : /* @__PURE__ */ e(a, { className: "size-4" }) }),
17
- /* @__PURE__ */ e("div", { children: i })
18
- ]
19
- }
20
- );
21
- }, "RuleItem");
22
- function x({ password: c }) {
23
- return /* @__PURE__ */ s("div", { className: "text-sm", children: [
24
- /* @__PURE__ */ e("p", { className: "mb-2", children: "Votre mot de passe doit contenir :" }),
25
- /* @__PURE__ */ s("ul", { children: [
26
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(l, { password: c, test: /* @__PURE__ */ t((i) => i.length >= 8, "test"), children: "Au moins 8 caractères" }) }),
27
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(l, { password: c, test: /* @__PURE__ */ t((i) => /[a-z]+/.test(i), "test"), children: "Au moins 1 minuscule" }) }),
28
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(l, { password: c, test: /* @__PURE__ */ t((i) => /[A-Z]+/.test(i), "test"), children: "Au moins 1 majuscule" }) }),
29
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(l, { password: c, test: /* @__PURE__ */ t((i) => /[0-9]+/.test(i), "test"), children: "Au moins 1 chiffre" }) }),
30
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
31
- l,
32
- {
33
- password: c,
34
- test: /* @__PURE__ */ t((i) => /[@_=\-$£*?./!:>%&#]+/.test(i), "test"),
35
- children: "Au moins un caractère spécial : @ _ = - $ £ * ? . / ! : > % & #"
36
- }
37
- ) })
38
- ] })
39
- ] });
40
- }
41
- t(x, "PasswordRulesChecker");
42
- export {
43
- x as PasswordRulesChecker
44
- };
1
+ var m=Object.defineProperty;var t=(c,i)=>m(c,"name",{value:i,configurable:!0});import{jsxs as s,jsx as e}from"react/jsx-runtime";import{CheckIcon as h,XIcon as a}from"lucide-react";const l=t(({password:c,children:i,test:n})=>{const r=c&&n&&n(c);return s("div",{className:`flex flex-row items-center gap-x-2 gap-4 ${r?"text-success":""}`,children:[e("div",{className:"flex-none text-lg",children:r?e(h,{className:"size-4"}):e(a,{className:"size-4"})}),e("div",{children:i})]})},"RuleItem");function x({password:c}){return s("div",{className:"text-sm",children:[e("p",{className:"mb-2",children:"Votre mot de passe doit contenir :"}),s("ul",{children:[e("li",{children:e(l,{password:c,test:t(i=>i.length>=8,"test"),children:"Au moins 8 caractères"})}),e("li",{children:e(l,{password:c,test:t(i=>/[a-z]+/.test(i),"test"),children:"Au moins 1 minuscule"})}),e("li",{children:e(l,{password:c,test:t(i=>/[A-Z]+/.test(i),"test"),children:"Au moins 1 majuscule"})}),e("li",{children:e(l,{password:c,test:t(i=>/[0-9]+/.test(i),"test"),children:"Au moins 1 chiffre"})}),e("li",{children:e(l,{password:c,test:t(i=>/[@_=\-$£*?./!:>%&#]+/.test(i),"test"),children:"Au moins un caractère spécial : @ _ = - $ £ * ? . / ! : > % & #"})})]})]})}t(x,"PasswordRulesChecker");export{x as PasswordRulesChecker};
@@ -1,50 +1 @@
1
- var i = Object.defineProperty;
2
- var t = (o, a) => i(o, "name", { value: a, configurable: !0 });
3
- import { jsx as e } from "react/jsx-runtime";
4
- import { Popover as r } from "radix-ui";
5
- import { cn as p } from "../lib/utils.js";
6
- function c({
7
- ...o
8
- }) {
9
- return /* @__PURE__ */ e(r.Root, { "data-slot": "popover", ...o });
10
- }
11
- t(c, "Popover");
12
- function u({
13
- ...o
14
- }) {
15
- return /* @__PURE__ */ e(r.Trigger, { "data-slot": "popover-trigger", ...o });
16
- }
17
- t(u, "PopoverTrigger");
18
- function v({
19
- className: o,
20
- align: a = "center",
21
- sideOffset: n = 4,
22
- ...d
23
- }) {
24
- return /* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */ e(
25
- r.Content,
26
- {
27
- "data-slot": "popover-content",
28
- align: a,
29
- sideOffset: n,
30
- className: p(
31
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
32
- o
33
- ),
34
- ...d
35
- }
36
- ) });
37
- }
38
- t(v, "PopoverContent");
39
- function g({
40
- ...o
41
- }) {
42
- return /* @__PURE__ */ e(r.Anchor, { "data-slot": "popover-anchor", ...o });
43
- }
44
- t(g, "PopoverAnchor");
45
- export {
46
- c as Popover,
47
- g as PopoverAnchor,
48
- v as PopoverContent,
49
- u as PopoverTrigger
50
- };
1
+ var i=Object.defineProperty;var t=(o,a)=>i(o,"name",{value:a,configurable:!0});import{jsx as e}from"react/jsx-runtime";import{Popover as r}from"radix-ui";import{cn as p}from"../lib/utils.js";function c({...o}){return e(r.Root,{"data-slot":"popover",...o})}t(c,"Popover");function u({...o}){return e(r.Trigger,{"data-slot":"popover-trigger",...o})}t(u,"PopoverTrigger");function v({className:o,align:a="center",sideOffset:n=4,...d}){return e(r.Portal,{children:e(r.Content,{"data-slot":"popover-content",align:a,sideOffset:n,className:p("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",o),...d})})}t(v,"PopoverContent");function g({...o}){return e(r.Anchor,{"data-slot":"popover-anchor",...o})}t(g,"PopoverAnchor");export{c as Popover,g as PopoverAnchor,v as PopoverContent,u as PopoverTrigger};
@@ -1,53 +1 @@
1
- var c = Object.defineProperty;
2
- var e = (n, o) => c(n, "name", { value: o, configurable: !0 });
3
- import { jsx as p } from "react/jsx-runtime";
4
- import m from "clsx";
5
- import g from "react-select";
6
- function h({
7
- options: n,
8
- placeholder: o = "Sélectionner",
9
- onChange: i,
10
- value: a,
11
- ...d
12
- }) {
13
- const l = /* @__PURE__ */ e((r) => {
14
- Array.isArray(r) ? i?.(
15
- r.map((t) => t.value)
16
- ) : i?.(r === null ? null : r.value);
17
- }, "handleChange"), u = /* @__PURE__ */ e(() => d.isMulti ? Array.isArray(a) ? n?.filter((r) => a.includes(r.value)) ?? [] : [] : n.find((r) => r.value === a) ?? null, "getSelectedOptions"), s = /* @__PURE__ */ e((r) => {
18
- const t = r.relatedTarget;
19
- t && (t.tagName === "A" || t.tagName === "BUTTON" || t.tagName === "TEXTAREA" || t.tagName === "INPUT") && t.focus();
20
- }, "onBlurWorkaround");
21
- return /* @__PURE__ */ p(
22
- g,
23
- {
24
- ...d,
25
- options: n,
26
- onChange: l,
27
- value: u(),
28
- classNames: {
29
- control: /* @__PURE__ */ e(() => "px-3 py-1 border bg-input rounded-md text-base md:text-sm min-h-9! shadow-none border-input-border has-[:focus]:border-ring has-[:focus]:ring-[3px] ring-ring/50 has-aria-invalid:border-destructive! has-aria-invalid:ring-destructive/20! has-aria-invalid:dark:ring-destructive/40!", "control"),
30
- menu: /* @__PURE__ */ e(() => "bg-popover border rounded-md py-0 overflow-hidden shadow-md mt-2", "menu"),
31
- menuList: /* @__PURE__ */ e(() => "py-0 bg-popover", "menuList"),
32
- option: /* @__PURE__ */ e((r) => m(
33
- "py-1 px-2 text-popover-foreground text-base md:text-sm!",
34
- r.isSelected && "bg-input-accent!",
35
- r.isFocused && "bg-input-accent/50"
36
- ), "option"),
37
- placeholder: /* @__PURE__ */ e(() => "text-placeholder", "placeholder"),
38
- multiValue: /* @__PURE__ */ e(() => "bg-input-accent text-input-accent-foreground mr-1 px-1 py-0.5 rounded-md flex items-center", "multiValue"),
39
- multiValueRemove: /* @__PURE__ */ e(() => "cursor-pointer", "multiValueRemove"),
40
- dropdownIndicator: /* @__PURE__ */ e(() => "text-placeholder cursor-pointer", "dropdownIndicator"),
41
- clearIndicator: /* @__PURE__ */ e(() => "text-placeholder cursor-pointer", "clearIndicator"),
42
- noOptionsMessage: /* @__PURE__ */ e(() => "py-2", "noOptionsMessage")
43
- },
44
- onBlur: s,
45
- placeholder: o,
46
- unstyled: !0
47
- }
48
- );
49
- }
50
- e(h, "Select");
51
- export {
52
- h as Select
53
- };
1
+ var c=Object.defineProperty;var e=(n,o)=>c(n,"name",{value:o,configurable:!0});import{jsx as p}from"react/jsx-runtime";import m from"clsx";import g from"react-select";function h({options:n,placeholder:o="Sélectionner",onChange:i,value:a,...d}){const l=e(r=>{Array.isArray(r)?i?.(r.map(t=>t.value)):i?.(r===null?null:r.value)},"handleChange"),u=e(()=>d.isMulti?Array.isArray(a)?n?.filter(r=>a.includes(r.value))??[]:[]:n.find(r=>r.value===a)??null,"getSelectedOptions"),s=e(r=>{const t=r.relatedTarget;t&&(t.tagName==="A"||t.tagName==="BUTTON"||t.tagName==="TEXTAREA"||t.tagName==="INPUT")&&t.focus()},"onBlurWorkaround");return p(g,{...d,options:n,onChange:l,value:u(),classNames:{control:e(()=>"px-3 py-1 border bg-input rounded-md text-base md:text-sm min-h-9! shadow-none border-input-border has-[:focus]:border-ring has-[:focus]:ring-[3px] ring-ring/50 has-aria-invalid:border-destructive! has-aria-invalid:ring-destructive/20! has-aria-invalid:dark:ring-destructive/40!","control"),menu:e(()=>"bg-popover border rounded-md py-0 overflow-hidden shadow-md mt-2","menu"),menuList:e(()=>"py-0 bg-popover","menuList"),option:e(r=>m("py-1 px-2 text-popover-foreground text-base md:text-sm!",r.isSelected&&"bg-input-accent!",r.isFocused&&"bg-input-accent/50"),"option"),placeholder:e(()=>"text-placeholder","placeholder"),multiValue:e(()=>"bg-input-accent text-input-accent-foreground mr-1 px-1 py-0.5 rounded-md flex items-center","multiValue"),multiValueRemove:e(()=>"cursor-pointer","multiValueRemove"),dropdownIndicator:e(()=>"text-placeholder cursor-pointer","dropdownIndicator"),clearIndicator:e(()=>"text-placeholder cursor-pointer","clearIndicator"),noOptionsMessage:e(()=>"py-2","noOptionsMessage")},onBlur:s,placeholder:o,unstyled:!0})}e(h,"Select");export{h as Select};
@@ -1,29 +1 @@
1
- var n = Object.defineProperty;
2
- var o = (t, a) => n(t, "name", { value: a, configurable: !0 });
3
- import { jsx as e } from "react/jsx-runtime";
4
- import { Separator as l } from "radix-ui";
5
- import { cn as p } from "../lib/utils.js";
6
- function h({
7
- className: t,
8
- orientation: a = "horizontal",
9
- decorative: r = !0,
10
- ...i
11
- }) {
12
- return /* @__PURE__ */ e(
13
- l.Root,
14
- {
15
- "data-slot": "separator",
16
- decorative: r,
17
- orientation: a,
18
- className: p(
19
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
20
- t
21
- ),
22
- ...i
23
- }
24
- );
25
- }
26
- o(h, "Separator");
27
- export {
28
- h as Separator
29
- };
1
+ var n=Object.defineProperty;var o=(t,a)=>n(t,"name",{value:a,configurable:!0});import{jsx as e}from"react/jsx-runtime";import{Separator as l}from"radix-ui";import{cn as p}from"../lib/utils.js";function h({className:t,orientation:a="horizontal",decorative:r=!0,...i}){return e(l.Root,{"data-slot":"separator",decorative:r,orientation:a,className:p("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...i})}o(h,"Separator");export{h as Separator};
@@ -1,160 +1 @@
1
- var c = Object.defineProperty;
2
- var o = (t, e) => c(t, "name", { value: e, configurable: !0 });
3
- import { jsx as a, jsxs as i } from "react/jsx-runtime";
4
- import { Dialog as s } from "radix-ui";
5
- import { XIcon as f } from "lucide-react";
6
- import { cn as n } from "../lib/utils.js";
7
- import { Button as u } from "./button.js";
8
- function v({ ...t }) {
9
- return /* @__PURE__ */ a(s.Root, { "data-slot": "sheet", ...t });
10
- }
11
- o(v, "Sheet");
12
- function N({
13
- ...t
14
- }) {
15
- return /* @__PURE__ */ a(s.Trigger, { "data-slot": "sheet-trigger", ...t });
16
- }
17
- o(N, "SheetTrigger");
18
- function w({
19
- ...t
20
- }) {
21
- return /* @__PURE__ */ a(s.Close, { "data-slot": "sheet-close", ...t });
22
- }
23
- o(w, "SheetClose");
24
- function h({
25
- ...t
26
- }) {
27
- return /* @__PURE__ */ a(s.Portal, { "data-slot": "sheet-portal", ...t });
28
- }
29
- o(h, "SheetPortal");
30
- function m({
31
- className: t,
32
- ...e
33
- }) {
34
- return /* @__PURE__ */ a(
35
- s.Overlay,
36
- {
37
- "data-slot": "sheet-overlay",
38
- className: n(
39
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
40
- t
41
- ),
42
- ...e
43
- }
44
- );
45
- }
46
- o(m, "SheetOverlay");
47
- function C({
48
- className: t,
49
- children: e,
50
- side: l = "right",
51
- size: r = "s",
52
- ...d
53
- }) {
54
- return /* @__PURE__ */ i(h, { children: [
55
- /* @__PURE__ */ a(m, {}),
56
- /* @__PURE__ */ i(
57
- s.Content,
58
- {
59
- "data-slot": "sheet-content",
60
- className: n(
61
- "bg-card data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
62
- l === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full border-l w-[90%]",
63
- l === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full border-r w-[90%]",
64
- r === "s" && "md:max-w-1/3",
65
- r === "m" && "md:max-w-1/2",
66
- r === "l" && "md:max-w-2/3",
67
- t
68
- ),
69
- ...d,
70
- children: [
71
- e,
72
- /* @__PURE__ */ a(
73
- s.Close,
74
- {
75
- className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
76
- asChild: !0,
77
- children: /* @__PURE__ */ i(u, { variant: "ghost", color: "dark", size: "icon", children: [
78
- /* @__PURE__ */ a(f, { className: "size-4" }),
79
- /* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
80
- ] })
81
- }
82
- )
83
- ]
84
- }
85
- )
86
- ] });
87
- }
88
- o(C, "SheetContent");
89
- function T({ className: t, ...e }) {
90
- return /* @__PURE__ */ a(
91
- "div",
92
- {
93
- "data-slot": "sheet-header",
94
- className: n("flex flex-col gap-1.5 px-4 pt-4 ", t),
95
- ...e
96
- }
97
- );
98
- }
99
- o(T, "SheetHeader");
100
- function k({ className: t, ...e }) {
101
- return /* @__PURE__ */ a(
102
- "div",
103
- {
104
- "data-slot": "sheet-footer",
105
- className: n("mt-auto flex flex-col gap-2 px-4 pb-4", t),
106
- ...e
107
- }
108
- );
109
- }
110
- o(k, "SheetFooter");
111
- function D({ className: t, ...e }) {
112
- return /* @__PURE__ */ a(
113
- "div",
114
- {
115
- "data-slot": "sheet-body",
116
- className: n("p-4 flex-1 overflow-y-auto", t),
117
- ...e
118
- }
119
- );
120
- }
121
- o(D, "SheetBody");
122
- function j({
123
- className: t,
124
- ...e
125
- }) {
126
- return /* @__PURE__ */ a(
127
- s.Title,
128
- {
129
- "data-slot": "sheet-title",
130
- className: n("text-foreground font-semibold", t),
131
- ...e
132
- }
133
- );
134
- }
135
- o(j, "SheetTitle");
136
- function z({
137
- className: t,
138
- ...e
139
- }) {
140
- return /* @__PURE__ */ a(
141
- s.Description,
142
- {
143
- "data-slot": "sheet-description",
144
- className: n("text-muted text-sm", t),
145
- ...e
146
- }
147
- );
148
- }
149
- o(z, "SheetDescription");
150
- export {
151
- v as Sheet,
152
- D as SheetBody,
153
- w as SheetClose,
154
- C as SheetContent,
155
- z as SheetDescription,
156
- k as SheetFooter,
157
- T as SheetHeader,
158
- j as SheetTitle,
159
- N as SheetTrigger
160
- };
1
+ var c=Object.defineProperty;var o=(t,e)=>c(t,"name",{value:e,configurable:!0});import{jsx as a,jsxs as i}from"react/jsx-runtime";import{Dialog as s}from"radix-ui";import{XIcon as f}from"lucide-react";import{cn as n}from"../lib/utils.js";import{Button as u}from"./button.js";function v({...t}){return a(s.Root,{"data-slot":"sheet",...t})}o(v,"Sheet");function N({...t}){return a(s.Trigger,{"data-slot":"sheet-trigger",...t})}o(N,"SheetTrigger");function w({...t}){return a(s.Close,{"data-slot":"sheet-close",...t})}o(w,"SheetClose");function h({...t}){return a(s.Portal,{"data-slot":"sheet-portal",...t})}o(h,"SheetPortal");function m({className:t,...e}){return a(s.Overlay,{"data-slot":"sheet-overlay",className:n("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}o(m,"SheetOverlay");function C({className:t,children:e,side:l="right",size:r="s",...d}){return i(h,{children:[a(m,{}),i(s.Content,{"data-slot":"sheet-content",className:n("bg-card data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",l==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full border-l w-[90%]",l==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full border-r w-[90%]",r==="s"&&"md:max-w-1/3",r==="m"&&"md:max-w-1/2",r==="l"&&"md:max-w-2/3",t),...d,children:[e,a(s.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",asChild:!0,children:i(u,{variant:"ghost",color:"dark",size:"icon",children:[a(f,{className:"size-4"}),a("span",{className:"sr-only",children:"Close"})]})})]})]})}o(C,"SheetContent");function T({className:t,...e}){return a("div",{"data-slot":"sheet-header",className:n("flex flex-col gap-1.5 px-4 pt-4 ",t),...e})}o(T,"SheetHeader");function k({className:t,...e}){return a("div",{"data-slot":"sheet-footer",className:n("mt-auto flex flex-col gap-2 px-4 pb-4",t),...e})}o(k,"SheetFooter");function D({className:t,...e}){return a("div",{"data-slot":"sheet-body",className:n("p-4 flex-1 overflow-y-auto",t),...e})}o(D,"SheetBody");function j({className:t,...e}){return a(s.Title,{"data-slot":"sheet-title",className:n("text-foreground font-semibold",t),...e})}o(j,"SheetTitle");function z({className:t,...e}){return a(s.Description,{"data-slot":"sheet-description",className:n("text-muted text-sm",t),...e})}o(z,"SheetDescription");export{v as Sheet,D as SheetBody,w as SheetClose,C as SheetContent,z as SheetDescription,k as SheetFooter,T as SheetHeader,j as SheetTitle,N as SheetTrigger};