prometeo-design-system 7.4.1 → 7.4.3

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 (35) hide show
  1. package/dist/Card.es.js +77 -59
  2. package/dist/Collapsible.css +1 -0
  3. package/dist/Collapsible.d.ts +6 -0
  4. package/dist/Collapsible.es.js +78 -0
  5. package/dist/{DatePicker-Bz5cUK6R.js → DatePicker-BlmJnSpU.js} +331 -324
  6. package/dist/DatePicker.es.js +1 -1
  7. package/dist/DesktopModal.es.js +2 -2
  8. package/dist/DialogModal.es.js +1 -1
  9. package/dist/DrawerMobile-D8KsbqMY.js +552 -0
  10. package/dist/DrawerMobile.es.js +1 -1
  11. package/dist/Menu.es.js +1 -1
  12. package/dist/Modal.es.js +118 -126
  13. package/dist/Popover.es.js +52 -52
  14. package/dist/RecurrentDatePicker.es.js +1 -1
  15. package/dist/RecurrentDatePickerRRule.es.js +1 -1
  16. package/dist/TabSwitch.es.js +1 -1
  17. package/dist/components/Card/Card.types.d.ts +4 -0
  18. package/dist/components/Card/CardContext.d.ts +1 -1
  19. package/dist/components/Collapsible/Collapsible.d.ts +19 -0
  20. package/dist/components/Collapsible/Collapsible.types.d.ts +29 -0
  21. package/dist/components/Collapsible/CollapsibleContext.d.ts +4 -0
  22. package/dist/components/Drawer/DrawerSlotContext.d.ts +0 -2
  23. package/dist/components/Modal/DesktopModal.d.ts +2 -8
  24. package/dist/components/Modal/Modal.d.ts +2 -6
  25. package/dist/exports/Collapsible.d.ts +3 -0
  26. package/dist/index.d.ts +2 -0
  27. package/dist/prometeo-design-system.es.js +9 -7
  28. package/dist/styles.css +1 -1
  29. package/dist/{useModalControl-3Dx1Wop_.js → useModalControl-wMqv8xVn.js} +126 -128
  30. package/package.json +5 -1
  31. package/src/styles/base.css +1 -123
  32. package/src/styles/intellisense.css +5 -3
  33. package/src/styles/utilities/scrollbar.css +100 -0
  34. package/src/styles/utilities.css +36 -50
  35. package/dist/DrawerMobile-BzwNbhK7.js +0 -566
package/dist/Card.es.js CHANGED
@@ -1,112 +1,130 @@
1
- import { j as o } from "./jsx-runtime-GkKLlHH4.js";
2
- import { createContext as N, useContext as j, memo as d, forwardRef as w, useMemo as z } from "react";
3
- import { c as s } from "./cn-B6yFEsav.js";
4
- import { c as i } from "./index-BOQuZ0gG.js";
5
- import F from "./CardBackground.es.js";
6
- const l = N(null);
7
- function C() {
8
- const a = j(l);
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 H = i(
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
- direction: {
19
+ orientation: {
20
20
  vertical: "flex flex-col",
21
21
  horizontal: "flex flex-row"
22
22
  }
23
23
  },
24
24
  defaultVariants: {
25
- direction: "vertical"
25
+ orientation: "vertical"
26
26
  }
27
27
  }
28
- ), V = i("shrink-0 z-10", {
28
+ ), b = d("shrink-0 z-10", {
29
29
  variants: {
30
- direction: {
30
+ orientation: {
31
31
  vertical: "",
32
32
  horizontal: ""
33
33
  }
34
34
  }
35
- }), k = i("shrink-0 z-10", {
35
+ }), y = d("shrink-0 z-10", {
36
36
  variants: {
37
- direction: {
37
+ orientation: {
38
38
  vertical: "",
39
39
  horizontal: ""
40
40
  }
41
41
  }
42
- }), b = i("flex-1 min-h-0 min-w-0 z-10"), y = w(function({
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 = "vertical",
45
- cardBackground: e,
46
- children: n,
47
- className: x,
48
- ...h
49
- }, v) {
50
- const p = z(
51
- () => ({ variant: r, direction: t }),
52
- [r, t]
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__ */ o.jsx(l.Provider, { value: p, children: /* @__PURE__ */ o.jsxs(
55
+ return /* @__PURE__ */ e.jsx(C.Provider, { value: j, children: /* @__PURE__ */ e.jsxs(
55
56
  "div",
56
57
  {
57
- ref: v,
58
- className: s(H({ direction: t }), x),
59
- ...h,
58
+ ref: p,
59
+ className: i(
60
+ k({ orientation: l }),
61
+ v
62
+ ),
63
+ ...N,
60
64
  children: [
61
- /* @__PURE__ */ o.jsx(
62
- F,
65
+ /* @__PURE__ */ e.jsx(
66
+ V,
63
67
  {
64
- ...e,
65
- className: s(
68
+ ...n,
69
+ className: i(
66
70
  "inset-0 absolute z-0",
67
- e?.className
71
+ n?.className
68
72
  )
69
73
  }
70
74
  ),
71
- n
75
+ h
72
76
  ]
73
77
  }
74
78
  ) });
75
- }), m = d(function({
79
+ }), u = s(function({
76
80
  children: r,
77
81
  className: t,
78
- ...e
82
+ ...o
79
83
  }) {
80
- const { direction: n } = C();
81
- return /* @__PURE__ */ o.jsx("div", { className: s(V({ direction: n }), t), ...e, children: r });
82
- }), u = d(function({
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
- ...e
96
+ ...o
86
97
  }) {
87
- return /* @__PURE__ */ o.jsx("div", { className: s(b(), t), ...e, children: r });
88
- }), f = d(function({
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
- ...e
102
+ ...o
92
103
  }) {
93
- const { direction: n } = C();
94
- return /* @__PURE__ */ o.jsx("div", { className: s(k({ direction: n }), t), ...e, children: r });
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 E(a, r) {
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 = d(y, E);
100
- c.Header = m;
101
- c.Content = u;
102
- c.Footer = f;
117
+ const c = s(g, B);
118
+ c.Header = u;
119
+ c.Content = f;
120
+ c.Footer = x;
103
121
  c.displayName = "Card";
104
- m.displayName = "Card.Header";
105
- u.displayName = "Card.Content";
106
- f.displayName = "Card.Footer";
122
+ u.displayName = "Card.Header";
123
+ f.displayName = "Card.Content";
124
+ x.displayName = "Card.Footer";
107
125
  export {
108
126
  c as Card,
109
- u as CardContent,
110
- f as CardFooter,
111
- m as CardHeader
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,6 @@
1
+ export * from './exports/Collapsible'
2
+ export {}
3
+ import PrometeoDesignSystem from './exports/Collapsible'
4
+ export default PrometeoDesignSystem
5
+ export * from './exports/Collapsible'
6
+ export {}
@@ -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
+ };