@caseparts-org/caseblocks 0.0.250 → 0.0.252

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.
@@ -1,171 +1,174 @@
1
- import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
- import h, { useState as w, useEffect as N } from "react";
3
- import { c as m } from "../../clsx-OuTLNxxd.js";
4
- import { Icon as _ } from "../../atoms/Icon/Icon.js";
5
- import { Text as q } from "../../atoms/Text/Text.js";
6
- import '../../assets/Error.css';const F = "_error_9tpem_1", U = "_variantError_9tpem_16", Y = "_variantWarning_9tpem_21", G = "_variantDefault_9tpem_26", J = "_errorHeader_9tpem_31", P = "_errorHeaderContent_9tpem_40", Q = "_detailsToggleButton_9tpem_48", X = "_detailsChevron_9tpem_66", Z = "_detailsChevronOpen_9tpem_74", ee = "_errorDetails_9tpem_78", te = "_errorDetailsContent_9tpem_94", re = "_copyButton_9tpem_99", ne = "_copyIcon_9tpem_114", oe = "_checkIcon_9tpem_115", ae = "_hiddenIcon_9tpem_122", t = {
7
- error: F,
8
- variantError: U,
9
- variantWarning: Y,
10
- variantDefault: G,
11
- errorHeader: J,
12
- errorHeaderContent: P,
13
- detailsToggleButton: Q,
14
- detailsChevron: X,
15
- detailsChevronOpen: Z,
16
- errorDetails: ee,
17
- errorDetailsContent: te,
18
- copyButton: re,
19
- copyIcon: ne,
20
- checkIcon: oe,
21
- hiddenIcon: ae
1
+ import { jsx as r, jsxs as _ } from "react/jsx-runtime";
2
+ import g, { useState as N, useEffect as E } from "react";
3
+ import { c as s } from "../../clsx-OuTLNxxd.js";
4
+ import { getHideAtStyles as H } from "../../atoms/HideAt.js";
5
+ import { Icon as y } from "../../atoms/Icon/Icon.js";
6
+ import { Text as Y } from "../../atoms/Text/Text.js";
7
+ import '../../assets/Error.css';const G = "_error_9tpem_1", J = "_variantError_9tpem_16", P = "_variantWarning_9tpem_21", Q = "_variantDefault_9tpem_26", X = "_errorHeader_9tpem_31", Z = "_errorHeaderContent_9tpem_40", ee = "_detailsToggleButton_9tpem_48", te = "_detailsChevron_9tpem_66", re = "_detailsChevronOpen_9tpem_74", ne = "_errorDetails_9tpem_78", oe = "_errorDetailsContent_9tpem_94", ae = "_copyButton_9tpem_99", se = "_copyIcon_9tpem_114", ie = "_checkIcon_9tpem_115", le = "_hiddenIcon_9tpem_122", t = {
8
+ error: G,
9
+ variantError: J,
10
+ variantWarning: P,
11
+ variantDefault: Q,
12
+ errorHeader: X,
13
+ errorHeaderContent: Z,
14
+ detailsToggleButton: ee,
15
+ detailsChevron: te,
16
+ detailsChevronOpen: re,
17
+ errorDetails: ne,
18
+ errorDetailsContent: oe,
19
+ copyButton: ae,
20
+ copyIcon: se,
21
+ checkIcon: ie,
22
+ hiddenIcon: le
22
23
  };
23
- function E({
24
+ function b({
24
25
  as: n,
25
- size: s = "md",
26
- variant: i = "body",
27
- weight: y = "regular",
28
- colorToken: l = "inherit",
29
- hideAt: a,
30
- className: b,
31
- children: o
26
+ size: i = "md",
27
+ variant: l = "body",
28
+ weight: c = "regular",
29
+ colorToken: d = "inherit",
30
+ hideAt: u,
31
+ className: a,
32
+ children: S
32
33
  }) {
33
34
  return /* @__PURE__ */ r(
34
- q,
35
+ Y,
35
36
  {
36
37
  as: n,
37
- size: s,
38
- variant: i,
39
- weight: y,
40
- colorToken: l,
41
- hideAt: a,
42
- className: b,
43
- children: o
38
+ size: i,
39
+ variant: l,
40
+ weight: c,
41
+ colorToken: d,
42
+ hideAt: u,
43
+ className: a,
44
+ children: S
44
45
  }
45
46
  );
46
47
  }
47
- function O({ children: n, hide: s, ...i }) {
48
- return s ? null : /* @__PURE__ */ r("div", { ...i, children: n });
48
+ function z({ children: n, hide: i, hideAt: l, className: c, ...d }) {
49
+ return i ? null : /* @__PURE__ */ r("div", { ...d, className: s(H(l), c), children: n });
49
50
  }
50
- function A(n) {
51
- return h.isValidElement(n) && n.type === E;
51
+ function O(n) {
52
+ return g.isValidElement(n) && n.type === b;
52
53
  }
53
- function B(n) {
54
- return h.isValidElement(n) && n.type === O;
54
+ function M(n) {
55
+ return g.isValidElement(n) && n.type === z;
55
56
  }
56
- function se({
57
+ function ce({
57
58
  isVisible: n = !0,
58
- className: s,
59
- children: i,
60
- hideDetails: y = !1,
61
- detailsMaxHeight: l = 300,
59
+ className: i,
60
+ children: l,
61
+ hideDetails: c = !1,
62
+ hideAt: d,
63
+ detailsMaxHeight: u = 300,
62
64
  variant: a = "error"
63
65
  }) {
64
- const [o, g] = w(!1), [C, v] = w(!1), [c, D] = w(!1), T = h.Children.toArray(i), k = T.find(
65
- (e) => B(e) && !e.props.hide
66
- ), x = T.find(A), H = T.filter(
67
- (e) => !B(e) && !A(e)
68
- ), S = x ? /* @__PURE__ */ r(E, { ...x.props }) : H.length > 0 ? H : null, f = y || !k ? null : k.props, d = f == null ? void 0 : f.children, u = d != null && d !== !1, {
69
- children: ie,
70
- hide: le,
71
- className: M,
72
- style: z,
73
- ...R
74
- } = f ?? {};
75
- if (N(() => {
76
- u || (g(!1), v(!1));
77
- }, [u]), N(() => {
78
- if (o || !C)
66
+ const [o, C] = N(!1), [v, D] = N(!1), [m, T] = N(!1), I = g.Children.toArray(l), k = I.find(
67
+ (e) => M(e) && !e.props.hide
68
+ ), x = I.find(O), A = I.filter(
69
+ (e) => !M(e) && !O(e)
70
+ ), B = x ? /* @__PURE__ */ r(b, { ...x.props }) : A.length > 0 ? A : null, h = c || !k ? null : k.props, p = h == null ? void 0 : h.children, f = p != null && p !== !1, {
71
+ children: de,
72
+ hide: ue,
73
+ hideAt: R,
74
+ className: j,
75
+ style: K,
76
+ ...V
77
+ } = h ?? {};
78
+ if (E(() => {
79
+ f || (C(!1), D(!1));
80
+ }, [f]), E(() => {
81
+ if (o || !v)
79
82
  return;
80
- const e = window.setTimeout(() => v(!1), 280);
83
+ const e = window.setTimeout(() => D(!1), 280);
81
84
  return () => window.clearTimeout(e);
82
- }, [o, C]), N(() => {
83
- if (!c)
85
+ }, [o, v]), E(() => {
86
+ if (!m)
84
87
  return;
85
- const e = window.setTimeout(() => D(!1), 1500);
88
+ const e = window.setTimeout(() => T(!1), 1500);
86
89
  return () => window.clearTimeout(e);
87
- }, [c]), !n || !S)
90
+ }, [m]), !n || !B)
88
91
  return null;
89
- const j = t[`variant${a[0].toUpperCase()}${a.slice(1)}`], K = a === "warning" ? "warning" : a === "default" ? "default" : "error-warning", V = typeof l == "number" ? `${l}px` : l, I = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((L) => I(L)).join("") : h.isValidElement(e) ? I(e.props.children) : "", W = async () => {
90
- if (!u)
92
+ const W = t[`variant${a[0].toUpperCase()}${a.slice(1)}`], $ = a === "warning" ? "warning" : a === "default" ? "default" : "error-warning", L = typeof u == "number" ? `${u}px` : u, w = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((U) => w(U)).join("") : g.isValidElement(e) ? w(e.props.children) : "", q = async () => {
93
+ if (!f)
91
94
  return;
92
- const e = I(d);
95
+ const e = w(p);
93
96
  if (e.trim())
94
97
  try {
95
- await navigator.clipboard.writeText(e), D(!0);
98
+ await navigator.clipboard.writeText(e), T(!0);
96
99
  } catch {
97
- D(!1);
100
+ T(!1);
98
101
  }
99
- }, $ = () => {
102
+ }, F = () => {
100
103
  if (o) {
101
- g(!1);
104
+ C(!1);
102
105
  return;
103
106
  }
104
- v(!0), window.requestAnimationFrame(() => {
105
- g(!0);
107
+ D(!0), window.requestAnimationFrame(() => {
108
+ C(!0);
106
109
  });
107
110
  };
108
- return /* @__PURE__ */ p("div", { className: m(t.error, j, s), children: [
109
- /* @__PURE__ */ p("div", { className: t.errorHeader, children: [
110
- /* @__PURE__ */ p("div", { className: t.errorHeaderContent, children: [
111
+ return /* @__PURE__ */ _("div", { className: s(t.error, W, H(d), i), children: [
112
+ /* @__PURE__ */ _("div", { className: t.errorHeader, children: [
113
+ /* @__PURE__ */ _("div", { className: t.errorHeaderContent, children: [
111
114
  /* @__PURE__ */ r(
112
- _,
115
+ y,
113
116
  {
114
117
  iconKey: "fa-solid fa-triangle-exclamation",
115
118
  size: "md",
116
- colorToken: K
119
+ colorToken: $
117
120
  }
118
121
  ),
119
- S
122
+ B
120
123
  ] }),
121
- u && /* @__PURE__ */ r(
124
+ f && /* @__PURE__ */ r(
122
125
  "button",
123
126
  {
124
127
  type: "button",
125
128
  className: t.detailsToggleButton,
126
129
  "aria-label": o ? "Hide details" : "Show details",
127
130
  title: o ? "Hide details" : "Show details",
128
- onClick: $,
129
- children: /* @__PURE__ */ r("span", { className: m(t.detailsChevron, o && t.detailsChevronOpen), children: /* @__PURE__ */ r(_, { iconKey: "fa-light fa-chevron-down", size: "sm", colorToken: "default" }) })
131
+ onClick: F,
132
+ children: /* @__PURE__ */ r("span", { className: s(t.detailsChevron, o && t.detailsChevronOpen), children: /* @__PURE__ */ r(y, { iconKey: "fa-light fa-chevron-down", size: "sm", colorToken: "default" }) })
130
133
  }
131
134
  )
132
135
  ] }),
133
- u && C && /* @__PURE__ */ p(
136
+ f && v && /* @__PURE__ */ _(
134
137
  "div",
135
138
  {
136
- className: m(t.errorDetails, M),
139
+ className: s(t.errorDetails, H(R), j),
137
140
  style: {
138
- ...z,
139
- maxHeight: o ? V : "0px",
141
+ ...K,
142
+ maxHeight: o ? L : "0px",
140
143
  opacity: o ? 1 : 0,
141
144
  overflowY: o ? "auto" : "hidden"
142
145
  },
143
- ...R,
146
+ ...V,
144
147
  children: [
145
- /* @__PURE__ */ p(
148
+ /* @__PURE__ */ _(
146
149
  "button",
147
150
  {
148
151
  type: "button",
149
152
  className: t.copyButton,
150
153
  "aria-label": "Copy error details",
151
- title: c ? "Copied" : "Copy details",
152
- onClick: W,
154
+ title: m ? "Copied" : "Copy details",
155
+ onClick: q,
153
156
  children: [
154
- /* @__PURE__ */ r("span", { className: m(t.copyIcon, c && t.hiddenIcon), children: /* @__PURE__ */ r(_, { iconKey: "fa-regular fa-copy", size: "sm", colorToken: "default" }) }),
155
- /* @__PURE__ */ r("span", { className: m(t.checkIcon, !c && t.hiddenIcon), children: /* @__PURE__ */ r(_, { iconKey: "fa-regular fa-check", size: "sm", colorToken: "default" }) })
157
+ /* @__PURE__ */ r("span", { className: s(t.copyIcon, m && t.hiddenIcon), children: /* @__PURE__ */ r(y, { iconKey: "fa-regular fa-copy", size: "sm", colorToken: "default" }) }),
158
+ /* @__PURE__ */ r("span", { className: s(t.checkIcon, !m && t.hiddenIcon), children: /* @__PURE__ */ r(y, { iconKey: "fa-regular fa-check", size: "sm", colorToken: "default" }) })
156
159
  ]
157
160
  }
158
161
  ),
159
- /* @__PURE__ */ r("div", { className: t.errorDetailsContent, children: d })
162
+ /* @__PURE__ */ r("div", { className: t.errorDetailsContent, children: p })
160
163
  ]
161
164
  }
162
165
  )
163
166
  ] });
164
167
  }
165
- const fe = Object.assign(se, {
166
- Message: E,
167
- Details: O
168
+ const ge = Object.assign(ce, {
169
+ Message: b,
170
+ Details: z
168
171
  });
169
172
  export {
170
- fe as Error
173
+ ge as Error
171
174
  };
@@ -6,6 +6,7 @@ export interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {
6
6
  isOpen: boolean;
7
7
  onClose: () => void;
8
8
  closeOnOverlayClick?: boolean;
9
+ width?: React.CSSProperties["width"];
9
10
  }
10
11
  type ModalCompound = React.FC<ModalProps> & {
11
12
  Toolbar: React.FC<ModalToolbarProps>;
@@ -1,75 +1,87 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import f from "react";
3
- import { c as s } from "../../clsx-OuTLNxxd.js";
4
- import { Text as h } from "../../atoms/Text/Text.js";
5
- import { Icon as b } from "../../atoms/Icon/Icon.js";
6
- import '../../assets/Modal.css';const p = "_overlay_62mbc_1", g = "_container_62mbc_11", v = "_toolbar_62mbc_30", y = "_toolbarPlain_62mbc_47", T = "_headerGroup_62mbc_52", x = "_headerLeft_62mbc_60", z = "_headerRight_62mbc_64", B = "_closeButton_62mbc_68", M = "_content_62mbc_87", r = {
7
- overlay: p,
8
- container: g,
9
- toolbar: v,
10
- toolbarPlain: y,
11
- headerGroup: T,
12
- headerLeft: x,
13
- headerRight: z,
14
- closeButton: B,
15
- content: M
16
- }, N = {
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import v from "react";
3
+ import { c as n } from "../../clsx-OuTLNxxd.js";
4
+ import { Text as p } from "../../atoms/Text/Text.js";
5
+ import { Icon as g } from "../../atoms/Icon/Icon.js";
6
+ import '../../assets/Modal.css';const b = "_overlay_1imlv_1", y = "_container_1imlv_11", T = "_toolbar_1imlv_30", x = "_toolbarPlain_1imlv_47", z = "_headerGroup_1imlv_52", B = "_headerLeft_1imlv_60", M = "_headerRight_1imlv_64", N = "_closeButton_1imlv_68", R = "_content_1imlv_87", r = {
7
+ overlay: b,
8
+ container: y,
9
+ toolbar: T,
10
+ toolbarPlain: x,
11
+ headerGroup: z,
12
+ headerLeft: B,
13
+ headerRight: M,
14
+ closeButton: N,
15
+ content: R
16
+ }, w = {
17
17
  sm: "sm",
18
18
  md: "md",
19
19
  lg: "lg"
20
- }, R = {
20
+ }, C = {
21
21
  sm: "sm",
22
22
  md: "md",
23
23
  lg: "md"
24
- }, i = ({
24
+ }, d = ({
25
25
  isOpen: t,
26
26
  onClose: o,
27
27
  closeOnOverlayClick: e = !0,
28
- className: c,
29
- children: l,
30
- ...m
28
+ width: l,
29
+ className: s,
30
+ style: m,
31
+ children: u,
32
+ ..._
31
33
  }) => {
32
- const a = f.useRef(!1);
34
+ const c = v.useRef(!1);
33
35
  if (!t) return null;
34
- const u = (d) => {
35
- e && (a.current = d.target === d.currentTarget);
36
- }, _ = (d) => {
36
+ const h = (i) => {
37
+ e && (c.current = i.target === i.currentTarget);
38
+ }, f = (i) => {
37
39
  if (!e) {
38
- a.current = !1;
40
+ c.current = !1;
39
41
  return;
40
42
  }
41
- a.current && d.target === d.currentTarget && o(), a.current = !1;
43
+ c.current && i.target === i.currentTarget && o(), c.current = !1;
42
44
  };
43
- return /* @__PURE__ */ n("div", { className: s(r.overlay), onMouseDown: u, onMouseUp: _, children: /* @__PURE__ */ n("div", { className: s(r.container, c), role: "dialog", "aria-modal": "true", ...m, children: l }) });
44
- }, w = ({ variant: t = "standard", className: o, children: e, ...c }) => /* @__PURE__ */ n(
45
+ return /* @__PURE__ */ a("div", { className: n(r.overlay), onMouseDown: h, onMouseUp: f, children: /* @__PURE__ */ a(
46
+ "div",
47
+ {
48
+ className: n(r.container, s),
49
+ role: "dialog",
50
+ "aria-modal": "true",
51
+ style: { ...m, "--modal-width": l },
52
+ ..._,
53
+ children: u
54
+ }
55
+ ) });
56
+ }, G = ({ variant: t = "standard", className: o, children: e, ...l }) => /* @__PURE__ */ a(
45
57
  "div",
46
58
  {
47
- className: s(r.toolbar, t === "plain" && r.toolbarPlain, o),
48
- ...c,
59
+ className: n(r.toolbar, t === "plain" && r.toolbarPlain, o),
60
+ ...l,
49
61
  children: e
50
62
  }
51
- ), C = ({
63
+ ), L = ({
52
64
  align: t = "left",
53
65
  size: o = "md",
54
66
  variant: e = "display",
55
- className: c,
56
- children: l,
67
+ className: l,
68
+ children: s,
57
69
  ...m
58
70
  }) => {
59
- const a = typeof l == "string";
60
- return /* @__PURE__ */ n(
71
+ const u = typeof s == "string";
72
+ return /* @__PURE__ */ a(
61
73
  "div",
62
74
  {
63
- className: s(r.headerGroup, t === "left" ? r.headerLeft : r.headerRight, c),
75
+ className: n(r.headerGroup, t === "left" ? r.headerLeft : r.headerRight, l),
64
76
  ...m,
65
- children: a ? /* @__PURE__ */ n(h, { as: "div", size: N[o], variant: e, weight: "medium", children: l }) : l
77
+ children: u ? /* @__PURE__ */ a(p, { as: "div", size: w[o], variant: e, weight: "medium", children: s }) : s
66
78
  }
67
79
  );
68
- }, G = ({ size: t = "md", className: o, ...e }) => /* @__PURE__ */ n("button", { type: "button", className: s(r.closeButton, o), "aria-label": "Close", ...e, children: /* @__PURE__ */ n(b, { iconKey: "fa-regular fa-xmark", size: R[t] }) }), L = ({ className: t, children: o, ...e }) => /* @__PURE__ */ n("div", { className: s(r.content, t), ...e, children: o });
69
- i.Toolbar = w;
70
- i.Header = C;
71
- i.CloseButton = G;
72
- i.Content = L;
80
+ }, P = ({ size: t = "md", className: o, ...e }) => /* @__PURE__ */ a("button", { type: "button", className: n(r.closeButton, o), "aria-label": "Close", ...e, children: /* @__PURE__ */ a(g, { iconKey: "fa-regular fa-xmark", size: C[t] }) }), S = ({ className: t, children: o, ...e }) => /* @__PURE__ */ a("div", { className: n(r.content, t), ...e, children: o });
81
+ d.Toolbar = G;
82
+ d.Header = L;
83
+ d.CloseButton = P;
84
+ d.Content = S;
73
85
  export {
74
- i as Modal
86
+ d as Modal
75
87
  };
@@ -3,5 +3,5 @@ import { Modal } from './Modal';
3
3
  declare const meta: Meta<typeof Modal>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Modal>;
6
- export declare const Basic: Story;
6
+ export declare const PlainToolbar: Story;
7
7
  export declare const Sizes: Story;
@@ -1,81 +1,79 @@
1
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { useState as t } from "react";
3
- import { Modal as l } from "./Modal.js";
4
- import { Text as r } from "../../atoms/Text/Text.js";
5
- import { Button as s } from "../../atoms/Button/Button.js";
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import { useState as r } from "react";
3
+ import { Modal as n } from "./Modal.js";
4
+ import { Text as o } from "../../atoms/Text/Text.js";
5
+ import { Button as a } from "../../atoms/Button/Button.js";
6
6
  const v = {
7
7
  title: "Case Parts/Molecules/Modal",
8
- component: l,
8
+ component: n,
9
+ // tags: ["autodocs"],
9
10
  argTypes: {
10
11
  isOpen: { control: { type: "boolean" }, description: "Controls visibility of the modal" },
11
12
  closeOnOverlayClick: { control: { type: "boolean" }, description: "Close when clicking on overlay" }
12
13
  },
13
14
  args: { isOpen: !0, closeOnOverlayClick: !0 }
14
15
  };
15
- function C(i) {
16
- const [a, o] = t(!!i.isOpen);
17
- return /* @__PURE__ */ n("div", { style: { padding: 24 }, children: [
18
- /* @__PURE__ */ e(s, { variant: "primary", size: "md", onClick: () => o(!0), children: "Open Modal" }),
19
- /* @__PURE__ */ n(l, { isOpen: a, onClose: () => o(!1), closeOnOverlayClick: i.closeOnOverlayClick ?? !0, children: [
20
- /* @__PURE__ */ n(l.Toolbar, { children: [
21
- /* @__PURE__ */ e(l.Header, { align: "left", size: "lg", variant: "display", children: "Sample Modal" }),
22
- /* @__PURE__ */ e(l.Header, { align: "right", children: /* @__PURE__ */ e(l.CloseButton, { onClick: () => o(!1) }) })
16
+ function C() {
17
+ const [t, i] = r(!0);
18
+ return /* @__PURE__ */ l("div", { style: { padding: 24 }, children: [
19
+ /* @__PURE__ */ e(a, { variant: "primary", size: "md", onClick: () => i(!0), children: "Open Modal" }),
20
+ /* @__PURE__ */ l(n, { isOpen: t, onClose: () => i(!1), children: [
21
+ /* @__PURE__ */ l(n.Toolbar, { variant: "plain", children: [
22
+ /* @__PURE__ */ e(n.Header, { align: "left", size: "lg", variant: "display", children: "Plain Toolbar" }),
23
+ /* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { onClick: () => i(!1) }) })
23
24
  ] }),
24
- /* @__PURE__ */ n(l.Content, { children: [
25
- /* @__PURE__ */ e(r, { as: "p", size: "md", children: "This is a reusable modal with a non-scrollable toolbar. Click the overlay or the X to close." }),
26
- /* @__PURE__ */ e("div", { style: { height: 600 }, children: /* @__PURE__ */ e(r, { as: "p", size: "sm", children: "Scrollable content spacer..." }) })
27
- ] })
25
+ /* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "md", children: "This modal uses a toolbar without a background or bottom border." }) })
28
26
  ] })
29
27
  ] });
30
28
  }
31
- const k = {
32
- render: (i) => /* @__PURE__ */ e(C, { ...i })
29
+ const O = {
30
+ render: () => /* @__PURE__ */ e(C, {})
33
31
  };
34
- function g() {
35
- const [i, a] = t(!1), [o, d] = t(!1), [m, c] = t(!1), [p, h] = t(!1);
36
- return /* @__PURE__ */ n("div", { style: { width: "200px", display: "grid", gap: 12 }, children: [
37
- /* @__PURE__ */ e(s, { variant: "secondary", size: "sm", onClick: () => a(!0), children: "Small Header" }),
38
- /* @__PURE__ */ n(l, { isOpen: i, onClose: () => a(!1), children: [
39
- /* @__PURE__ */ n(l.Toolbar, { children: [
40
- /* @__PURE__ */ e(l.Header, { align: "left", size: "sm", variant: "display", children: "Small Header" }),
41
- /* @__PURE__ */ e(l.Header, { align: "right", children: /* @__PURE__ */ e(l.CloseButton, { size: "sm", onClick: () => a(!1) }) })
32
+ function u() {
33
+ const [t, i] = r(!1), [h, s] = r(!1), [m, d] = r(!1), [p, c] = r(!1);
34
+ return /* @__PURE__ */ l("div", { style: { width: "200px", display: "grid", gap: 12 }, children: [
35
+ /* @__PURE__ */ e(a, { variant: "secondary", size: "sm", onClick: () => i(!0), children: "Small Header" }),
36
+ /* @__PURE__ */ l(n, { isOpen: t, onClose: () => i(!1), children: [
37
+ /* @__PURE__ */ l(n.Toolbar, { children: [
38
+ /* @__PURE__ */ e(n.Header, { align: "left", size: "sm", variant: "display", children: "Small Header" }),
39
+ /* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { size: "sm", onClick: () => i(!1) }) })
42
40
  ] }),
43
- /* @__PURE__ */ e(l.Content, { children: /* @__PURE__ */ e(r, { as: "p", size: "sm", children: "Small header modal content." }) })
41
+ /* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "sm", children: "Small header modal content." }) })
44
42
  ] }),
45
- /* @__PURE__ */ e(s, { variant: "primary", size: "md", onClick: () => d(!0), children: "Medium Header" }),
46
- /* @__PURE__ */ n(l, { isOpen: o, onClose: () => d(!1), children: [
47
- /* @__PURE__ */ n(l.Toolbar, { children: [
48
- /* @__PURE__ */ e(l.Header, { align: "left", size: "md", variant: "display", children: "Medium Header" }),
49
- /* @__PURE__ */ e(l.Header, { align: "right", children: /* @__PURE__ */ e(l.CloseButton, { size: "md", onClick: () => d(!1) }) })
43
+ /* @__PURE__ */ e(a, { variant: "primary", size: "md", onClick: () => s(!0), children: "Medium Header" }),
44
+ /* @__PURE__ */ l(n, { isOpen: h, onClose: () => s(!1), children: [
45
+ /* @__PURE__ */ l(n.Toolbar, { children: [
46
+ /* @__PURE__ */ e(n.Header, { align: "left", size: "md", variant: "display", children: "Medium Header" }),
47
+ /* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { size: "md", onClick: () => s(!1) }) })
50
48
  ] }),
51
- /* @__PURE__ */ e(l.Content, { children: /* @__PURE__ */ e(r, { as: "p", size: "md", children: "Medium header modal content." }) })
49
+ /* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "md", children: "Medium header modal content." }) })
52
50
  ] }),
53
- /* @__PURE__ */ e(s, { variant: "cta-primary", size: "lg", onClick: () => c(!0), children: "Large Header" }),
54
- /* @__PURE__ */ n(l, { isOpen: m, onClose: () => c(!1), children: [
55
- /* @__PURE__ */ n(l.Toolbar, { children: [
56
- /* @__PURE__ */ e(l.Header, { align: "left", size: "lg", variant: "display", children: "Large Header" }),
57
- /* @__PURE__ */ e(l.Header, { align: "right", children: /* @__PURE__ */ e(l.CloseButton, { size: "md", onClick: () => c(!1) }) })
51
+ /* @__PURE__ */ e(a, { variant: "cta-primary", size: "lg", onClick: () => d(!0), children: "Large Header" }),
52
+ /* @__PURE__ */ l(n, { isOpen: m, onClose: () => d(!1), children: [
53
+ /* @__PURE__ */ l(n.Toolbar, { children: [
54
+ /* @__PURE__ */ e(n.Header, { align: "left", size: "lg", variant: "display", children: "Large Header" }),
55
+ /* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { size: "md", onClick: () => d(!1) }) })
58
56
  ] }),
59
- /* @__PURE__ */ e(l.Content, { children: /* @__PURE__ */ e(r, { as: "p", size: "lg", children: "Large header modal content." }) })
57
+ /* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "lg", children: "Large header modal content." }) })
60
58
  ] }),
61
- /* @__PURE__ */ e(s, { variant: "tertiary", size: "md", onClick: () => h(!0), children: "Custom Toolbar" }),
62
- /* @__PURE__ */ n(l, { isOpen: p, onClose: () => h(!1), children: [
63
- /* @__PURE__ */ n(l.Toolbar, { children: [
64
- /* @__PURE__ */ e(l.Header, { align: "left", size: "md", variant: "display", children: "Custom Toolbar" }),
65
- /* @__PURE__ */ n(l.Header, { align: "right", children: [
59
+ /* @__PURE__ */ e(a, { variant: "tertiary", size: "md", onClick: () => c(!0), children: "Custom Toolbar" }),
60
+ /* @__PURE__ */ l(n, { isOpen: p, onClose: () => c(!1), children: [
61
+ /* @__PURE__ */ l(n.Toolbar, { children: [
62
+ /* @__PURE__ */ e(n.Header, { align: "left", size: "md", variant: "display", children: "Custom Toolbar" }),
63
+ /* @__PURE__ */ l(n.Header, { align: "right", children: [
66
64
  /* @__PURE__ */ e("button", { onClick: () => alert("Sent!"), children: "Send Email" }),
67
- /* @__PURE__ */ e(l.CloseButton, { size: "md", onClick: () => h(!1) })
65
+ /* @__PURE__ */ e(n.CloseButton, { size: "md", onClick: () => c(!1) })
68
66
  ] })
69
67
  ] }),
70
- /* @__PURE__ */ e(l.Content, { children: /* @__PURE__ */ e(r, { as: "p", size: "md", children: "Modal with custom toolbar functions." }) })
68
+ /* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "md", children: "Modal with custom toolbar functions." }) })
71
69
  ] })
72
70
  ] });
73
71
  }
74
- const b = {
75
- render: () => /* @__PURE__ */ e(g, {})
72
+ const H = {
73
+ render: () => /* @__PURE__ */ e(u, {})
76
74
  };
77
75
  export {
78
- k as Basic,
79
- b as Sizes,
76
+ O as PlainToolbar,
77
+ H as Sizes,
80
78
  v as default
81
79
  };
@@ -1,10 +1,13 @@
1
1
  import { default as React } from 'react';
2
+ import { HideAtProps } from '../../atoms/HideAt';
2
3
  export type TableAlign = 'left' | 'center' | 'right';
3
- export interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
4
+ export interface TableProps extends React.HTMLAttributes<HTMLTableElement>, HideAtProps {
4
5
  children?: React.ReactNode;
5
6
  className?: string;
6
7
  /** When true, applies alternating row background styling */
7
8
  alternatingRows?: boolean;
9
+ /** When true, renders a border around the table */
10
+ bordered?: boolean;
8
11
  /** Enables sortable headers with click handlers */
9
12
  isSortable?: boolean;
10
13
  /** Current sort field identifier (consumer-defined) */
@@ -16,10 +19,10 @@ export interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
16
19
  /** Header click handler to trigger consumer-side sorting */
17
20
  onSort?: (_sortField: string, _sortFieldKey?: string | number) => void;
18
21
  }
19
- export interface ColumnsProps {
22
+ export interface ColumnsProps extends React.HTMLAttributes<HTMLTableRowElement> {
20
23
  children: React.ReactNode;
21
24
  }
22
- export interface ColumnProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
25
+ export interface ColumnProps extends React.ThHTMLAttributes<HTMLTableCellElement>, HideAtProps {
23
26
  children: React.ReactNode;
24
27
  align?: TableAlign;
25
28
  colSpan?: number;
@@ -39,7 +42,7 @@ export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
39
42
  /** Marks this row as expanded content (detail row) */
40
43
  isExpandedContent?: boolean;
41
44
  }
42
- export interface CellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
45
+ export interface CellProps extends React.TdHTMLAttributes<HTMLTableCellElement>, HideAtProps {
43
46
  children: React.ReactNode;
44
47
  align?: TableAlign;
45
48
  colSpan?: number;
@@ -1,9 +1,10 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../clsx-OuTLNxxd.js";
4
- import { T as i, T as e } from "../../Table-BX4PtCNE.js";
4
+ import "../../atoms/HideAt.js";
5
+ import { T as e, T } from "../../Table-f_q_CCA-.js";
5
6
  import "../../atoms/Icon/Icon.js";
6
7
  export {
7
- i as Table,
8
- e as default
8
+ e as Table,
9
+ T as default
9
10
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import R, { useState as d, useEffect as P } from "react";
3
- import { T as t, s as x } from "../../Table-BX4PtCNE.js";
3
+ import { T as t, s as x } from "../../Table-f_q_CCA-.js";
4
4
  const v = {
5
5
  title: "Case Parts/Molecules/Table",
6
6
  component: t,