prometeo-design-system 7.4.1 → 7.4.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/Card.es.js +77 -59
- package/dist/Collapsible.css +1 -0
- package/dist/Collapsible.d.ts +6 -0
- package/dist/Collapsible.es.js +78 -0
- package/dist/{DatePicker-Bz5cUK6R.js → DatePicker-BlmJnSpU.js} +331 -324
- package/dist/DatePicker.es.js +1 -1
- package/dist/Popover.es.js +52 -52
- package/dist/RecurrentDatePicker.es.js +1 -1
- package/dist/RecurrentDatePickerRRule.es.js +1 -1
- package/dist/components/Card/Card.types.d.ts +4 -0
- package/dist/components/Card/CardContext.d.ts +1 -1
- package/dist/components/Collapsible/Collapsible.d.ts +19 -0
- package/dist/components/Collapsible/Collapsible.types.d.ts +29 -0
- package/dist/components/Collapsible/CollapsibleContext.d.ts +4 -0
- package/dist/exports/Collapsible.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/prometeo-design-system.es.js +7 -5
- package/package.json +5 -1
package/dist/Card.es.js
CHANGED
|
@@ -1,112 +1,130 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { c as
|
|
4
|
-
import { c as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
const a =
|
|
1
|
+
import { j as e } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { createContext as z, useContext as w, memo as s, forwardRef as F, useMemo as H } from "react";
|
|
3
|
+
import { c as i } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { c as d } from "./index-BOQuZ0gG.js";
|
|
5
|
+
import V from "./CardBackground.es.js";
|
|
6
|
+
const C = z(null);
|
|
7
|
+
function m() {
|
|
8
|
+
const a = w(C);
|
|
9
9
|
if (!a)
|
|
10
10
|
throw new Error(
|
|
11
11
|
"Card compound components (Card.Header, Card.Content, Card.Footer) must be used inside <Card>"
|
|
12
12
|
);
|
|
13
13
|
return a;
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
"relative overflow-hidden dropshadow-100 radius-medium border border-neutral-default-default p-3 shrink-0",
|
|
15
|
+
const k = d(
|
|
16
|
+
"relative overflow-hidden dropshadow-100 radius-medium border border-neutral-default-default p-3 shrink-0 *:z-10",
|
|
17
17
|
{
|
|
18
18
|
variants: {
|
|
19
|
-
|
|
19
|
+
orientation: {
|
|
20
20
|
vertical: "flex flex-col",
|
|
21
21
|
horizontal: "flex flex-row"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
defaultVariants: {
|
|
25
|
-
|
|
25
|
+
orientation: "vertical"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
),
|
|
28
|
+
), b = d("shrink-0 z-10", {
|
|
29
29
|
variants: {
|
|
30
|
-
|
|
30
|
+
orientation: {
|
|
31
31
|
vertical: "",
|
|
32
32
|
horizontal: ""
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), y = d("shrink-0 z-10", {
|
|
36
36
|
variants: {
|
|
37
|
-
|
|
37
|
+
orientation: {
|
|
38
38
|
vertical: "",
|
|
39
39
|
horizontal: ""
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
42
|
+
}), E = d("flex-1 min-h-0 min-w-0 z-10"), g = F(function({
|
|
43
43
|
variant: r = "1-slot",
|
|
44
|
-
direction: t
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
direction: t,
|
|
45
|
+
orientation: o,
|
|
46
|
+
cardBackground: n,
|
|
47
|
+
children: h,
|
|
48
|
+
className: v,
|
|
49
|
+
...N
|
|
50
|
+
}, p) {
|
|
51
|
+
const l = o ?? t ?? "vertical", j = H(
|
|
52
|
+
() => ({ orientation: l, variant: r }),
|
|
53
|
+
[l, r]
|
|
53
54
|
);
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ e.jsx(C.Provider, { value: j, children: /* @__PURE__ */ e.jsxs(
|
|
55
56
|
"div",
|
|
56
57
|
{
|
|
57
|
-
ref:
|
|
58
|
-
className:
|
|
59
|
-
|
|
58
|
+
ref: p,
|
|
59
|
+
className: i(
|
|
60
|
+
k({ orientation: l }),
|
|
61
|
+
v
|
|
62
|
+
),
|
|
63
|
+
...N,
|
|
60
64
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
65
|
+
/* @__PURE__ */ e.jsx(
|
|
66
|
+
V,
|
|
63
67
|
{
|
|
64
|
-
...
|
|
65
|
-
className:
|
|
68
|
+
...n,
|
|
69
|
+
className: i(
|
|
66
70
|
"inset-0 absolute z-0",
|
|
67
|
-
|
|
71
|
+
n?.className
|
|
68
72
|
)
|
|
69
73
|
}
|
|
70
74
|
),
|
|
71
|
-
|
|
75
|
+
h
|
|
72
76
|
]
|
|
73
77
|
}
|
|
74
78
|
) });
|
|
75
|
-
}),
|
|
79
|
+
}), u = s(function({
|
|
76
80
|
children: r,
|
|
77
81
|
className: t,
|
|
78
|
-
...
|
|
82
|
+
...o
|
|
79
83
|
}) {
|
|
80
|
-
const {
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
|
|
84
|
+
const { orientation: n } = m();
|
|
85
|
+
return /* @__PURE__ */ e.jsx(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
className: i(b({ orientation: n }), t),
|
|
89
|
+
...o,
|
|
90
|
+
children: r
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}), f = s(function({
|
|
83
94
|
children: r,
|
|
84
95
|
className: t,
|
|
85
|
-
...
|
|
96
|
+
...o
|
|
86
97
|
}) {
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
-
}),
|
|
98
|
+
return /* @__PURE__ */ e.jsx("div", { className: i(E(), t), ...o, children: r });
|
|
99
|
+
}), x = s(function({
|
|
89
100
|
children: r,
|
|
90
101
|
className: t,
|
|
91
|
-
...
|
|
102
|
+
...o
|
|
92
103
|
}) {
|
|
93
|
-
const {
|
|
94
|
-
return /* @__PURE__ */
|
|
104
|
+
const { orientation: n } = m();
|
|
105
|
+
return /* @__PURE__ */ e.jsx(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
className: i(y({ orientation: n }), t),
|
|
109
|
+
...o,
|
|
110
|
+
children: r
|
|
111
|
+
}
|
|
112
|
+
);
|
|
95
113
|
});
|
|
96
|
-
function
|
|
97
|
-
return a.variant === r.variant && a.direction === r.direction && a.className === r.className && a.children === r.children && a.cardBackground === r.cardBackground;
|
|
114
|
+
function B(a, r) {
|
|
115
|
+
return a.variant === r.variant && a.direction === r.direction && a.orientation === r.orientation && a.className === r.className && a.children === r.children && a.cardBackground === r.cardBackground;
|
|
98
116
|
}
|
|
99
|
-
const c =
|
|
100
|
-
c.Header =
|
|
101
|
-
c.Content =
|
|
102
|
-
c.Footer =
|
|
117
|
+
const c = s(g, B);
|
|
118
|
+
c.Header = u;
|
|
119
|
+
c.Content = f;
|
|
120
|
+
c.Footer = x;
|
|
103
121
|
c.displayName = "Card";
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
122
|
+
u.displayName = "Card.Header";
|
|
123
|
+
f.displayName = "Card.Content";
|
|
124
|
+
x.displayName = "Card.Footer";
|
|
107
125
|
export {
|
|
108
126
|
c as Card,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
127
|
+
f as CardContent,
|
|
128
|
+
x as CardFooter,
|
|
129
|
+
u as CardHeader
|
|
112
130
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pyrion-collapsible-content[data-orientation=vertical]{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease-out,opacity .1s ease-in;opacity:0}.pyrion-collapsible-content[data-orientation=vertical][data-expanded=true]{grid-template-rows:1fr;opacity:1;transition:grid-template-rows .25s ease-out,opacity .15s ease-out 50ms}.pyrion-collapsible-content[data-orientation=horizontal]{display:grid;grid-template-columns:0fr;transition:grid-template-columns .25s ease-out,opacity .1s ease-in;opacity:0}.pyrion-collapsible-content[data-orientation=horizontal][data-expanded=true]{grid-template-columns:1fr;opacity:1;transition:grid-template-columns .25s ease-out,opacity .15s ease-out 50ms}.pyrion-collapsible-inner{overflow:hidden}.pyrion-collapsible-content[data-orientation=vertical] .pyrion-collapsible-inner{min-height:0}.pyrion-collapsible-content[data-orientation=horizontal] .pyrion-collapsible-inner{min-width:0}.pyrion-collapsible-trigger{display:flex;align-items:center;cursor:pointer;background:none;border:none;padding:0;width:100%;text-align:left;color:inherit;font:inherit}.pyrion-collapsible-trigger:disabled{cursor:not-allowed;opacity:.4}.pyrion-collapsible-trigger svg{transition:transform .25s ease;flex-shrink:0}.pyrion-collapsible-trigger[data-expanded=true] svg{transform:rotate(180deg)}.pyrion-collapsible-trigger[data-orientation=horizontal][data-expanded=true] svg{transform:rotate(90deg)}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { j as i } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { createContext as g, useContext as j, memo as v, useState as y, useCallback as O } from "react";
|
|
3
|
+
const u = g(null);
|
|
4
|
+
function d() {
|
|
5
|
+
const e = j(u);
|
|
6
|
+
if (!e)
|
|
7
|
+
throw new Error(
|
|
8
|
+
"Collapsible sub-components must be used inside <Collapsible>"
|
|
9
|
+
);
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
function N({
|
|
13
|
+
orientation: e = "vertical",
|
|
14
|
+
defaultOpen: t = !1,
|
|
15
|
+
open: n,
|
|
16
|
+
onOpenChange: o,
|
|
17
|
+
disabled: l = !1,
|
|
18
|
+
children: s,
|
|
19
|
+
className: a
|
|
20
|
+
}) {
|
|
21
|
+
const r = n !== void 0, [x, m] = y(t), p = r ? n : x, f = O(() => {
|
|
22
|
+
if (l) return;
|
|
23
|
+
const c = !p;
|
|
24
|
+
r || m(c), o?.(c);
|
|
25
|
+
}, [l, r, p, o]);
|
|
26
|
+
return /* @__PURE__ */ i.jsx(
|
|
27
|
+
u.Provider,
|
|
28
|
+
{
|
|
29
|
+
value: { isOpen: p, toggle: f, orientation: e, disabled: l },
|
|
30
|
+
children: /* @__PURE__ */ i.jsx("div", { className: a, children: s })
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function C({
|
|
35
|
+
children: e,
|
|
36
|
+
className: t,
|
|
37
|
+
...n
|
|
38
|
+
}) {
|
|
39
|
+
const { isOpen: o, toggle: l, orientation: s, disabled: a } = d();
|
|
40
|
+
return /* @__PURE__ */ i.jsx(
|
|
41
|
+
"button",
|
|
42
|
+
{
|
|
43
|
+
type: "button",
|
|
44
|
+
className: `pyrion-collapsible-trigger${t ? ` ${t}` : ""}`,
|
|
45
|
+
onClick: l,
|
|
46
|
+
disabled: a,
|
|
47
|
+
"aria-expanded": o,
|
|
48
|
+
"data-expanded": o,
|
|
49
|
+
"data-orientation": s,
|
|
50
|
+
...n,
|
|
51
|
+
children: e
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
function b({ children: e, className: t }) {
|
|
56
|
+
const { isOpen: n, orientation: o } = d();
|
|
57
|
+
return /* @__PURE__ */ i.jsx(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: `pyrion-collapsible-content${t ? ` ${t}` : ""}`,
|
|
61
|
+
"data-expanded": n,
|
|
62
|
+
"data-orientation": o,
|
|
63
|
+
...n ? {} : { inert: !0 },
|
|
64
|
+
children: /* @__PURE__ */ i.jsx("div", { className: "pyrion-collapsible-inner", children: e })
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
const $ = Object.assign(v(N), {
|
|
69
|
+
Trigger: C,
|
|
70
|
+
Content: b
|
|
71
|
+
});
|
|
72
|
+
$.displayName = "Collapsible";
|
|
73
|
+
C.displayName = "Collapsible.Trigger";
|
|
74
|
+
b.displayName = "Collapsible.Content";
|
|
75
|
+
export {
|
|
76
|
+
$ as Collapsible,
|
|
77
|
+
$ as default
|
|
78
|
+
};
|