fina-react-ds 0.0.1 → 1.0.1

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 (60) hide show
  1. package/README.md +5 -15
  2. package/dist/components/alert.js +30 -27
  3. package/dist/components/avatar.js +19 -19
  4. package/dist/components/badge.js +19 -19
  5. package/dist/components/button.js +51 -51
  6. package/dist/components/calendar.d.ts +8 -0
  7. package/dist/components/calendar.js +206 -0
  8. package/dist/components/card.js +43 -43
  9. package/dist/components/checkbox.js +17 -17
  10. package/dist/components/date-picker.d.ts +6 -0
  11. package/dist/components/date-picker.js +61 -0
  12. package/dist/components/dialog.js +43 -46
  13. package/dist/components/dropdown-menu.js +29 -29
  14. package/dist/components/input.js +15 -13
  15. package/dist/components/label.js +17 -17
  16. package/dist/components/pagination.js +25 -25
  17. package/dist/components/popover.js +9 -9
  18. package/dist/components/select.js +38 -33
  19. package/dist/components/separator.js +29 -0
  20. package/dist/components/sheet.d.ts +15 -0
  21. package/dist/components/sheet.js +158 -0
  22. package/dist/components/sidebar.d.ts +69 -0
  23. package/dist/components/sidebar.js +620 -0
  24. package/dist/components/simple-tooltip.d.ts +4 -0
  25. package/dist/components/simple-tooltip.js +17 -0
  26. package/dist/components/skeleton.d.ts +2 -0
  27. package/dist/components/skeleton.js +18 -0
  28. package/dist/components/sonner.d.ts +3 -0
  29. package/dist/components/sonner.js +24 -0
  30. package/dist/components/switch.d.ts +4 -0
  31. package/dist/components/switch.js +34 -0
  32. package/dist/components/table.d.ts +10 -0
  33. package/dist/components/table.js +124 -0
  34. package/dist/components/tabs.js +27 -27
  35. package/dist/components/textarea.d.ts +3 -0
  36. package/dist/components/textarea.js +23 -0
  37. package/dist/components/tooltip.d.ts +7 -0
  38. package/dist/components/tooltip.js +61 -0
  39. package/dist/hooks/use-mobile.js +17 -0
  40. package/dist/index.d.ts +14 -2
  41. package/dist/index.js +138 -73
  42. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +12 -0
  43. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +21 -0
  44. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +36 -0
  45. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +18 -0
  46. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +72 -0
  47. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +33 -0
  48. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +13 -0
  49. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +123 -0
  50. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +112 -0
  51. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +21 -0
  52. package/dist/node_modules/@radix-ui/react-separator/dist/index.js +27 -0
  53. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +47 -40
  54. package/dist/node_modules/@radix-ui/react-switch/dist/index.js +136 -0
  55. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +348 -0
  56. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +32 -0
  57. package/dist/themes/base.css +1679 -585
  58. package/package.json +4 -19
  59. package/dist/themes/pro.css +0 -188
  60. package/dist/themes/puulse-colors.css +0 -388
@@ -0,0 +1,12 @@
1
+ var r = Object.defineProperty;
2
+ var n = (t, d) => r(t, "name", { value: d, configurable: !0 });
3
+ function u(t) {
4
+ return (d = {}) => {
5
+ const o = d.width ? String(d.width) : t.defaultWidth;
6
+ return t.formats[o] || t.formats[t.defaultWidth];
7
+ };
8
+ }
9
+ n(u, "buildFormatLongFn");
10
+ export {
11
+ u as buildFormatLongFn
12
+ };
@@ -0,0 +1,21 @@
1
+ var n = Object.defineProperty;
2
+ var c = (t, d) => n(t, "name", { value: d, configurable: !0 });
3
+ function m(t) {
4
+ return (d, e) => {
5
+ const f = e != null && e.context ? String(e.context) : "standalone";
6
+ let u;
7
+ if (f === "formatting" && t.formattingValues) {
8
+ const l = t.defaultFormattingWidth || t.defaultWidth, a = e != null && e.width ? String(e.width) : l;
9
+ u = t.formattingValues[a] || t.formattingValues[l];
10
+ } else {
11
+ const l = t.defaultWidth, a = e != null && e.width ? String(e.width) : t.defaultWidth;
12
+ u = t.values[a] || t.values[l];
13
+ }
14
+ const h = t.argumentCallback ? t.argumentCallback(d) : d;
15
+ return u[h];
16
+ };
17
+ }
18
+ c(m, "buildLocalizeFn");
19
+ export {
20
+ m as buildLocalizeFn
21
+ };
@@ -0,0 +1,36 @@
1
+ var o = Object.defineProperty;
2
+ var r = (t, n) => o(t, "name", { value: n, configurable: !0 });
3
+ function m(t) {
4
+ return (n, e = {}) => {
5
+ const l = e.width, f = l && t.matchPatterns[l] || t.matchPatterns[t.defaultMatchWidth], d = n.match(f);
6
+ if (!d)
7
+ return null;
8
+ const c = d[0], u = l && t.parsePatterns[l] || t.parsePatterns[t.defaultParseWidth], h = Array.isArray(u) ? k(u, (i) => i.test(c)) : (
9
+ // [TODO] -- I challenge you to fix the type
10
+ P(u, (i) => i.test(c))
11
+ );
12
+ let a;
13
+ a = t.valueCallback ? t.valueCallback(h) : h, a = e.valueCallback ? (
14
+ // [TODO] -- I challenge you to fix the type
15
+ e.valueCallback(a)
16
+ ) : a;
17
+ const s = n.slice(c.length);
18
+ return { value: a, rest: s };
19
+ };
20
+ }
21
+ r(m, "buildMatchFn");
22
+ function P(t, n) {
23
+ for (const e in t)
24
+ if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
25
+ return e;
26
+ }
27
+ r(P, "findKey");
28
+ function k(t, n) {
29
+ for (let e = 0; e < t.length; e++)
30
+ if (n(t[e]))
31
+ return e;
32
+ }
33
+ r(k, "findIndex");
34
+ export {
35
+ m as buildMatchFn
36
+ };
@@ -0,0 +1,18 @@
1
+ var b = Object.defineProperty;
2
+ var u = (t, l) => b(t, "name", { value: l, configurable: !0 });
3
+ function v(t) {
4
+ return (l, c = {}) => {
5
+ const n = l.match(t.matchPattern);
6
+ if (!n) return null;
7
+ const r = n[0], a = l.match(t.parsePattern);
8
+ if (!a) return null;
9
+ let e = t.valueCallback ? t.valueCallback(a[0]) : a[0];
10
+ e = c.valueCallback ? c.valueCallback(e) : e;
11
+ const h = l.slice(r.length);
12
+ return { value: e, rest: h };
13
+ };
14
+ }
15
+ u(v, "buildMatchPatternFn");
16
+ export {
17
+ v as buildMatchPatternFn
18
+ };
@@ -0,0 +1,72 @@
1
+ var u = Object.defineProperty;
2
+ var t = (r, o) => u(r, "name", { value: o, configurable: !0 });
3
+ const a = {
4
+ lessThanXSeconds: {
5
+ one: "moins d’une seconde",
6
+ other: "moins de {{count}} secondes"
7
+ },
8
+ xSeconds: {
9
+ one: "1 seconde",
10
+ other: "{{count}} secondes"
11
+ },
12
+ halfAMinute: "30 secondes",
13
+ lessThanXMinutes: {
14
+ one: "moins d’une minute",
15
+ other: "moins de {{count}} minutes"
16
+ },
17
+ xMinutes: {
18
+ one: "1 minute",
19
+ other: "{{count}} minutes"
20
+ },
21
+ aboutXHours: {
22
+ one: "environ 1 heure",
23
+ other: "environ {{count}} heures"
24
+ },
25
+ xHours: {
26
+ one: "1 heure",
27
+ other: "{{count}} heures"
28
+ },
29
+ xDays: {
30
+ one: "1 jour",
31
+ other: "{{count}} jours"
32
+ },
33
+ aboutXWeeks: {
34
+ one: "environ 1 semaine",
35
+ other: "environ {{count}} semaines"
36
+ },
37
+ xWeeks: {
38
+ one: "1 semaine",
39
+ other: "{{count}} semaines"
40
+ },
41
+ aboutXMonths: {
42
+ one: "environ 1 mois",
43
+ other: "environ {{count}} mois"
44
+ },
45
+ xMonths: {
46
+ one: "1 mois",
47
+ other: "{{count}} mois"
48
+ },
49
+ aboutXYears: {
50
+ one: "environ 1 an",
51
+ other: "environ {{count}} ans"
52
+ },
53
+ xYears: {
54
+ one: "1 an",
55
+ other: "{{count}} ans"
56
+ },
57
+ overXYears: {
58
+ one: "plus d’un an",
59
+ other: "plus de {{count}} ans"
60
+ },
61
+ almostXYears: {
62
+ one: "presqu’un an",
63
+ other: "presque {{count}} ans"
64
+ }
65
+ }, c = /* @__PURE__ */ t((r, o, n) => {
66
+ let e;
67
+ const s = a[r];
68
+ return typeof s == "string" ? e = s : o === 1 ? e = s.one : e = s.other.replace("{{count}}", String(o)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "dans " + e : "il y a " + e : e;
69
+ }, "formatDistance");
70
+ export {
71
+ c as formatDistance
72
+ };
@@ -0,0 +1,33 @@
1
+ import { buildFormatLongFn as t } from "../../_lib/buildFormatLongFn.js";
2
+ const m = {
3
+ full: "EEEE d MMMM y",
4
+ long: "d MMMM y",
5
+ medium: "d MMM y",
6
+ short: "dd/MM/y"
7
+ }, d = {
8
+ full: "HH:mm:ss zzzz",
9
+ long: "HH:mm:ss z",
10
+ medium: "HH:mm:ss",
11
+ short: "HH:mm"
12
+ }, e = {
13
+ full: "{{date}} 'à' {{time}}",
14
+ long: "{{date}} 'à' {{time}}",
15
+ medium: "{{date}}, {{time}}",
16
+ short: "{{date}}, {{time}}"
17
+ }, a = {
18
+ date: t({
19
+ formats: m,
20
+ defaultWidth: "full"
21
+ }),
22
+ time: t({
23
+ formats: d,
24
+ defaultWidth: "full"
25
+ }),
26
+ dateTime: t({
27
+ formats: e,
28
+ defaultWidth: "full"
29
+ })
30
+ };
31
+ export {
32
+ a as formatLong
33
+ };
@@ -0,0 +1,13 @@
1
+ var a = Object.defineProperty;
2
+ var o = (e, t) => a(e, "name", { value: t, configurable: !0 });
3
+ const r = {
4
+ lastWeek: "eeee 'dernier à' p",
5
+ yesterday: "'hier à' p",
6
+ today: "'aujourd’hui à' p",
7
+ tomorrow: "'demain à' p'",
8
+ nextWeek: "eeee 'prochain à' p",
9
+ other: "P"
10
+ }, d = /* @__PURE__ */ o((e, t, i, p) => r[e], "formatRelative");
11
+ export {
12
+ d as formatRelative
13
+ };
@@ -0,0 +1,123 @@
1
+ var o = Object.defineProperty;
2
+ var t = (n, e) => o(n, "name", { value: e, configurable: !0 });
3
+ import { buildLocalizeFn as r } from "../../_lib/buildLocalizeFn.js";
4
+ const u = {
5
+ narrow: ["av. J.-C", "ap. J.-C"],
6
+ abbreviated: ["av. J.-C", "ap. J.-C"],
7
+ wide: ["avant Jésus-Christ", "après Jésus-Christ"]
8
+ }, s = {
9
+ narrow: ["T1", "T2", "T3", "T4"],
10
+ abbreviated: ["1er trim.", "2ème trim.", "3ème trim.", "4ème trim."],
11
+ wide: ["1er trimestre", "2ème trimestre", "3ème trimestre", "4ème trimestre"]
12
+ }, l = {
13
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
14
+ abbreviated: [
15
+ "janv.",
16
+ "févr.",
17
+ "mars",
18
+ "avr.",
19
+ "mai",
20
+ "juin",
21
+ "juil.",
22
+ "août",
23
+ "sept.",
24
+ "oct.",
25
+ "nov.",
26
+ "déc."
27
+ ],
28
+ wide: [
29
+ "janvier",
30
+ "février",
31
+ "mars",
32
+ "avril",
33
+ "mai",
34
+ "juin",
35
+ "juillet",
36
+ "août",
37
+ "septembre",
38
+ "octobre",
39
+ "novembre",
40
+ "décembre"
41
+ ]
42
+ }, v = {
43
+ narrow: ["D", "L", "M", "M", "J", "V", "S"],
44
+ short: ["di", "lu", "ma", "me", "je", "ve", "sa"],
45
+ abbreviated: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
46
+ wide: [
47
+ "dimanche",
48
+ "lundi",
49
+ "mardi",
50
+ "mercredi",
51
+ "jeudi",
52
+ "vendredi",
53
+ "samedi"
54
+ ]
55
+ }, c = {
56
+ narrow: {
57
+ am: "AM",
58
+ pm: "PM",
59
+ midnight: "minuit",
60
+ noon: "midi",
61
+ morning: "mat.",
62
+ afternoon: "ap.m.",
63
+ evening: "soir",
64
+ night: "mat."
65
+ },
66
+ abbreviated: {
67
+ am: "AM",
68
+ pm: "PM",
69
+ midnight: "minuit",
70
+ noon: "midi",
71
+ morning: "matin",
72
+ afternoon: "après-midi",
73
+ evening: "soir",
74
+ night: "matin"
75
+ },
76
+ wide: {
77
+ am: "AM",
78
+ pm: "PM",
79
+ midnight: "minuit",
80
+ noon: "midi",
81
+ morning: "du matin",
82
+ afternoon: "de l’après-midi",
83
+ evening: "du soir",
84
+ night: "du matin"
85
+ }
86
+ }, h = /* @__PURE__ */ t((n, e) => {
87
+ const a = Number(n), i = e == null ? void 0 : e.unit;
88
+ if (a === 0) return "0";
89
+ const d = ["year", "week", "hour", "minute", "second"];
90
+ let m;
91
+ return a === 1 ? m = i && d.includes(i) ? "ère" : "er" : m = "ème", a + m;
92
+ }, "ordinalNumber"), M = ["MMM", "MMMM"], g = {
93
+ preprocessor: /* @__PURE__ */ t((n, e) => n.getDate() === 1 || !e.some(
94
+ (i) => i.isToken && M.includes(i.value)
95
+ ) ? e : e.map(
96
+ (i) => i.isToken && i.value === "do" ? { isToken: !0, value: "d" } : i
97
+ ), "preprocessor"),
98
+ ordinalNumber: h,
99
+ era: r({
100
+ values: u,
101
+ defaultWidth: "wide"
102
+ }),
103
+ quarter: r({
104
+ values: s,
105
+ defaultWidth: "wide",
106
+ argumentCallback: /* @__PURE__ */ t((n) => n - 1, "argumentCallback")
107
+ }),
108
+ month: r({
109
+ values: l,
110
+ defaultWidth: "wide"
111
+ }),
112
+ day: r({
113
+ values: v,
114
+ defaultWidth: "wide"
115
+ }),
116
+ dayPeriod: r({
117
+ values: c,
118
+ defaultWidth: "wide"
119
+ })
120
+ };
121
+ export {
122
+ g as localize
123
+ };
@@ -0,0 +1,112 @@
1
+ var r = Object.defineProperty;
2
+ var t = (a, e) => r(a, "name", { value: e, configurable: !0 });
3
+ import { buildMatchFn as i } from "../../_lib/buildMatchFn.js";
4
+ import { buildMatchPatternFn as n } from "../../_lib/buildMatchPatternFn.js";
5
+ const s = /^(\d+)(ième|ère|ème|er|e)?/i, d = /\d+/i, m = {
6
+ narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
7
+ abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
8
+ wide: /^(avant Jésus-Christ|après Jésus-Christ)/i
9
+ }, o = {
10
+ any: [/^av/i, /^ap/i]
11
+ }, c = {
12
+ narrow: /^T?[1234]/i,
13
+ abbreviated: /^[1234](er|ème|e)? trim\.?/i,
14
+ wide: /^[1234](er|ème|e)? trimestre/i
15
+ }, u = {
16
+ any: [/1/i, /2/i, /3/i, /4/i]
17
+ }, h = {
18
+ narrow: /^[jfmasond]/i,
19
+ abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
20
+ wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i
21
+ }, l = {
22
+ narrow: [
23
+ /^j/i,
24
+ /^f/i,
25
+ /^m/i,
26
+ /^a/i,
27
+ /^m/i,
28
+ /^j/i,
29
+ /^j/i,
30
+ /^a/i,
31
+ /^s/i,
32
+ /^o/i,
33
+ /^n/i,
34
+ /^d/i
35
+ ],
36
+ any: [
37
+ /^ja/i,
38
+ /^f/i,
39
+ /^mar/i,
40
+ /^av/i,
41
+ /^ma/i,
42
+ /^juin/i,
43
+ /^juil/i,
44
+ /^ao/i,
45
+ /^s/i,
46
+ /^o/i,
47
+ /^n/i,
48
+ /^d/i
49
+ ]
50
+ }, P = {
51
+ narrow: /^[lmjvsd]/i,
52
+ short: /^(di|lu|ma|me|je|ve|sa)/i,
53
+ abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
54
+ wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
55
+ }, p = {
56
+ narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
57
+ any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i]
58
+ }, v = {
59
+ narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
60
+ any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
61
+ }, j = {
62
+ any: {
63
+ am: /^a/i,
64
+ pm: /^p/i,
65
+ midnight: /^min/i,
66
+ noon: /^mid/i,
67
+ morning: /mat/i,
68
+ afternoon: /ap/i,
69
+ evening: /soir/i,
70
+ night: /nuit/i
71
+ }
72
+ }, w = {
73
+ ordinalNumber: n({
74
+ matchPattern: s,
75
+ parsePattern: d,
76
+ valueCallback: /* @__PURE__ */ t((a) => parseInt(a), "valueCallback")
77
+ }),
78
+ era: i({
79
+ matchPatterns: m,
80
+ defaultMatchWidth: "wide",
81
+ parsePatterns: o,
82
+ defaultParseWidth: "any"
83
+ }),
84
+ quarter: i({
85
+ matchPatterns: c,
86
+ defaultMatchWidth: "wide",
87
+ parsePatterns: u,
88
+ defaultParseWidth: "any",
89
+ valueCallback: /* @__PURE__ */ t((a) => a + 1, "valueCallback")
90
+ }),
91
+ month: i({
92
+ matchPatterns: h,
93
+ defaultMatchWidth: "wide",
94
+ parsePatterns: l,
95
+ defaultParseWidth: "any"
96
+ }),
97
+ day: i({
98
+ matchPatterns: P,
99
+ defaultMatchWidth: "wide",
100
+ parsePatterns: p,
101
+ defaultParseWidth: "any"
102
+ }),
103
+ dayPeriod: i({
104
+ matchPatterns: v,
105
+ defaultMatchWidth: "any",
106
+ parsePatterns: j,
107
+ defaultParseWidth: "any"
108
+ })
109
+ };
110
+ export {
111
+ w as match
112
+ };
@@ -0,0 +1,21 @@
1
+ import { formatDistance as o } from "./fr/_lib/formatDistance.js";
2
+ import { formatLong as t } from "./fr/_lib/formatLong.js";
3
+ import { formatRelative as r } from "./fr/_lib/formatRelative.js";
4
+ import { localize as a } from "./fr/_lib/localize.js";
5
+ import { match as m } from "./fr/_lib/match.js";
6
+ const s = {
7
+ code: "fr",
8
+ formatDistance: o,
9
+ formatLong: t,
10
+ formatRelative: r,
11
+ localize: a,
12
+ match: m,
13
+ options: {
14
+ weekStartsOn: 1,
15
+ firstWeekContainsDate: 4
16
+ }
17
+ };
18
+ export {
19
+ s as default,
20
+ s as fr
21
+ };
@@ -0,0 +1,27 @@
1
+ var v = Object.defineProperty;
2
+ var i = (r, o) => v(r, "name", { value: o, configurable: !0 });
3
+ import * as m from "react";
4
+ import { Primitive as d } from "../../react-primitive/dist/index.js";
5
+ import { jsx as l } from "react/jsx-runtime";
6
+ var f = "Separator", n = "horizontal", O = ["horizontal", "vertical"], e = m.forwardRef((r, o) => {
7
+ const { decorative: s, orientation: a = n, ...c } = r, t = N(a) ? a : n, p = s ? { role: "none" } : { "aria-orientation": t === "vertical" ? t : void 0, role: "separator" };
8
+ return /* @__PURE__ */ l(
9
+ d.div,
10
+ {
11
+ "data-orientation": t,
12
+ ...p,
13
+ ...c,
14
+ ref: o
15
+ }
16
+ );
17
+ });
18
+ e.displayName = f;
19
+ function N(r) {
20
+ return O.includes(r);
21
+ }
22
+ i(N, "isValidOrientation");
23
+ var E = e;
24
+ export {
25
+ E as Root,
26
+ e as Separator
27
+ };
@@ -1,60 +1,67 @@
1
- var y = Object.defineProperty;
2
- var a = (e, r) => y(e, "name", { value: r, configurable: !0 });
1
+ var S = Object.defineProperty;
2
+ var a = (e, t) => S(e, "name", { value: t, configurable: !0 });
3
3
  import * as l from "react";
4
- import { composeRefs as S } from "../../react-compose-refs/dist/index.js";
5
- import { jsx as d } from "react/jsx-runtime";
4
+ import { composeRefs as g } from "../../react-compose-refs/dist/index.js";
5
+ import { jsx as u, Fragment as E } from "react/jsx-runtime";
6
6
  // @__NO_SIDE_EFFECTS__
7
- function g(e) {
8
- const r = /* @__PURE__ */ E(e), o = l.forwardRef((n, t) => {
9
- const { children: i, ...c } = n, s = l.Children.toArray(i), f = s.find(R);
7
+ function C(e) {
8
+ const t = /* @__PURE__ */ R(e), o = l.forwardRef((n, r) => {
9
+ const { children: i, ...c } = n, s = l.Children.toArray(i), f = s.find(b);
10
10
  if (f) {
11
- const p = f.props.children, m = s.map((u) => u === f ? l.Children.count(p) > 1 ? l.Children.only(null) : l.isValidElement(p) ? p.props.children : null : u);
12
- return /* @__PURE__ */ d(r, { ...c, ref: t, children: l.isValidElement(p) ? l.cloneElement(p, void 0, m) : null });
11
+ const p = f.props.children, y = s.map((d) => d === f ? l.Children.count(p) > 1 ? l.Children.only(null) : l.isValidElement(p) ? p.props.children : null : d);
12
+ return /* @__PURE__ */ u(t, { ...c, ref: r, children: l.isValidElement(p) ? l.cloneElement(p, void 0, y) : null });
13
13
  }
14
- return /* @__PURE__ */ d(r, { ...c, ref: t, children: i });
14
+ return /* @__PURE__ */ u(t, { ...c, ref: r, children: i });
15
15
  });
16
16
  return o.displayName = `${e}.Slot`, o;
17
17
  }
18
- a(g, "createSlot");
19
- var O = /* @__PURE__ */ g("Slot");
18
+ a(C, "createSlot");
19
+ var N = /* @__PURE__ */ C("Slot");
20
20
  // @__NO_SIDE_EFFECTS__
21
- function E(e) {
22
- const r = l.forwardRef((o, n) => {
23
- const { children: t, ...i } = o;
24
- if (l.isValidElement(t)) {
25
- const c = b(t), s = h(i, t.props);
26
- return t.type !== l.Fragment && (s.ref = n ? S(n, c) : c), l.cloneElement(t, s);
21
+ function R(e) {
22
+ const t = l.forwardRef((o, n) => {
23
+ const { children: r, ...i } = o;
24
+ if (l.isValidElement(r)) {
25
+ const c = _(r), s = h(i, r.props);
26
+ return r.type !== l.Fragment && (s.ref = n ? g(n, c) : c), l.cloneElement(r, s);
27
27
  }
28
- return l.Children.count(t) > 1 ? l.Children.only(null) : null;
28
+ return l.Children.count(r) > 1 ? l.Children.only(null) : null;
29
29
  });
30
- return r.displayName = `${e}.SlotClone`, r;
30
+ return t.displayName = `${e}.SlotClone`, t;
31
31
  }
32
- a(E, "createSlotClone");
33
- var C = Symbol("radix.slottable");
34
- function R(e) {
35
- return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === C;
32
+ a(R, "createSlotClone");
33
+ var m = Symbol("radix.slottable");
34
+ // @__NO_SIDE_EFFECTS__
35
+ function O(e) {
36
+ const t = /* @__PURE__ */ a(({ children: o }) => /* @__PURE__ */ u(E, { children: o }), "Slottable2");
37
+ return t.displayName = `${e}.Slottable`, t.__radixId = m, t;
36
38
  }
37
- a(R, "isSlottable");
38
- function h(e, r) {
39
- const o = { ...r };
40
- for (const n in r) {
41
- const t = e[n], i = r[n];
42
- /^on[A-Z]/.test(n) ? t && i ? o[n] = (...s) => {
39
+ a(O, "createSlottable");
40
+ function b(e) {
41
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === m;
42
+ }
43
+ a(b, "isSlottable");
44
+ function h(e, t) {
45
+ const o = { ...t };
46
+ for (const n in t) {
47
+ const r = e[n], i = t[n];
48
+ /^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
43
49
  const f = i(...s);
44
- return t(...s), f;
45
- } : t && (o[n] = t) : n === "style" ? o[n] = { ...t, ...i } : n === "className" && (o[n] = [t, i].filter(Boolean).join(" "));
50
+ return r(...s), f;
51
+ } : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
46
52
  }
47
53
  return { ...e, ...o };
48
54
  }
49
55
  a(h, "mergeProps");
50
- function b(e) {
51
- var n, t;
52
- let r = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = r && "isReactWarning" in r && r.isReactWarning;
53
- return o ? e.ref : (r = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, o = r && "isReactWarning" in r && r.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
56
+ function _(e) {
57
+ var n, r;
58
+ let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
59
+ return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
54
60
  }
55
- a(b, "getElementRef");
61
+ a(_, "getElementRef");
56
62
  export {
57
- O as Root,
58
- O as Slot,
59
- g as createSlot
63
+ N as Root,
64
+ N as Slot,
65
+ C as createSlot,
66
+ O as createSlottable
60
67
  };