@maskingtech/designsystem 0.0.1 → 0.0.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.
package/dist/mtds.js CHANGED
@@ -1,491 +1,316 @@
1
- import ae, { useState as k, useMemo as V, useEffectEvent as se, useEffect as J, forwardRef as w, useRef as oe } from "react";
2
- var y = { exports: {} }, T = {};
3
- var W;
4
- function le() {
5
- if (W) return T;
6
- W = 1;
7
- var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
8
- function n(a, s, c) {
9
- var i = null;
10
- if (c !== void 0 && (i = "" + c), s.key !== void 0 && (i = "" + s.key), "key" in s) {
11
- c = {};
12
- for (var f in s)
13
- f !== "key" && (c[f] = s[f]);
14
- } else c = s;
15
- return s = c.ref, {
16
- $$typeof: t,
17
- type: a,
18
- key: i,
19
- ref: s !== void 0 ? s : null,
20
- props: c
21
- };
22
- }
23
- return T.Fragment = r, T.jsx = n, T.jsxs = n, T;
24
- }
25
- var N = {};
26
- var U;
27
- function ce() {
28
- return U || (U = 1, process.env.NODE_ENV !== "production" && (function() {
29
- function t(e) {
30
- if (e == null) return null;
31
- if (typeof e == "function")
32
- return e.$$typeof === te ? null : e.displayName || e.name || null;
33
- if (typeof e == "string") return e;
34
- switch (e) {
35
- case R:
36
- return "Fragment";
37
- case G:
38
- return "Profiler";
39
- case S:
40
- return "StrictMode";
41
- case Z:
42
- return "Suspense";
43
- case H:
44
- return "SuspenseList";
45
- case ee:
46
- return "Activity";
47
- }
48
- if (typeof e == "object")
49
- switch (typeof e.tag == "number" && console.error(
50
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
51
- ), e.$$typeof) {
52
- case A:
53
- return "Portal";
54
- case X:
55
- return e.displayName || "Context";
56
- case B:
57
- return (e._context.displayName || "Context") + ".Consumer";
58
- case K:
59
- var o = e.render;
60
- return e = e.displayName, e || (e = o.displayName || o.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
61
- case Q:
62
- return o = e.displayName || null, o !== null ? o : t(e.type) || "Memo";
63
- case O:
64
- o = e._payload, e = e._init;
65
- try {
66
- return t(e(o));
67
- } catch {
68
- }
69
- }
70
- return null;
71
- }
72
- function r(e) {
73
- return "" + e;
74
- }
75
- function n(e) {
76
- try {
77
- r(e);
78
- var o = !1;
79
- } catch {
80
- o = !0;
81
- }
82
- if (o) {
83
- o = console;
84
- var u = o.error, d = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
85
- return u.call(
86
- o,
87
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
88
- d
89
- ), r(e);
90
- }
91
- }
92
- function a(e) {
93
- if (e === R) return "<>";
94
- if (typeof e == "object" && e !== null && e.$$typeof === O)
95
- return "<...>";
96
- try {
97
- var o = t(e);
98
- return o ? "<" + o + ">" : "<...>";
99
- } catch {
100
- return "<...>";
101
- }
102
- }
103
- function s() {
104
- var e = P.A;
105
- return e === null ? null : e.getOwner();
106
- }
107
- function c() {
108
- return Error("react-stack-top-frame");
109
- }
110
- function i(e) {
111
- if (I.call(e, "key")) {
112
- var o = Object.getOwnPropertyDescriptor(e, "key").get;
113
- if (o && o.isReactWarning) return !1;
114
- }
115
- return e.key !== void 0;
116
- }
117
- function f(e, o) {
118
- function u() {
119
- z || (z = !0, console.error(
120
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
121
- o
122
- ));
123
- }
124
- u.isReactWarning = !0, Object.defineProperty(e, "key", {
125
- get: u,
126
- configurable: !0
127
- });
128
- }
129
- function x() {
130
- var e = t(this.type);
131
- return L[e] || (L[e] = !0, console.error(
132
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
133
- )), e = this.props.ref, e !== void 0 ? e : null;
134
- }
135
- function v(e, o, u, d, h, C) {
136
- var p = u.ref;
137
- return e = {
138
- $$typeof: j,
139
- type: e,
140
- key: o,
141
- props: u,
142
- _owner: d
143
- }, (p !== void 0 ? p : null) !== null ? Object.defineProperty(e, "ref", {
144
- enumerable: !1,
145
- get: x
146
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
147
- configurable: !1,
148
- enumerable: !1,
149
- writable: !0,
150
- value: 0
151
- }), Object.defineProperty(e, "_debugInfo", {
152
- configurable: !1,
153
- enumerable: !1,
154
- writable: !0,
155
- value: null
156
- }), Object.defineProperty(e, "_debugStack", {
157
- configurable: !1,
158
- enumerable: !1,
159
- writable: !0,
160
- value: h
161
- }), Object.defineProperty(e, "_debugTask", {
162
- configurable: !1,
163
- enumerable: !1,
164
- writable: !0,
165
- value: C
166
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
167
- }
168
- function m(e, o, u, d, h, C) {
169
- var p = o.children;
170
- if (p !== void 0)
171
- if (d)
172
- if (re(p)) {
173
- for (d = 0; d < p.length; d++)
174
- E(p[d]);
175
- Object.freeze && Object.freeze(p);
176
- } else
177
- console.error(
178
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
179
- );
180
- else E(p);
181
- if (I.call(o, "key")) {
182
- p = t(e);
183
- var g = Object.keys(o).filter(function(ne) {
184
- return ne !== "key";
185
- });
186
- d = 0 < g.length ? "{key: someKey, " + g.join(": ..., ") + ": ...}" : "{key: someKey}", M[p + d] || (g = 0 < g.length ? "{" + g.join(": ..., ") + ": ...}" : "{}", console.error(
187
- `A props object containing a "key" prop is being spread into JSX:
188
- let props = %s;
189
- <%s {...props} />
190
- React keys must be passed directly to JSX without using spread:
191
- let props = %s;
192
- <%s key={someKey} {...props} />`,
193
- d,
194
- p,
195
- g,
196
- p
197
- ), M[p + d] = !0);
198
- }
199
- if (p = null, u !== void 0 && (n(u), p = "" + u), i(o) && (n(o.key), p = "" + o.key), "key" in o) {
200
- u = {};
201
- for (var Y in o)
202
- Y !== "key" && (u[Y] = o[Y]);
203
- } else u = o;
204
- return p && f(
205
- u,
206
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
207
- ), v(
208
- e,
209
- p,
210
- u,
211
- s(),
212
- h,
213
- C
214
- );
215
- }
216
- function E(e) {
217
- _(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === O && (e._payload.status === "fulfilled" ? _(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
218
- }
219
- function _(e) {
220
- return typeof e == "object" && e !== null && e.$$typeof === j;
221
- }
222
- var b = ae, j = Symbol.for("react.transitional.element"), A = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), G = Symbol.for("react.profiler"), B = Symbol.for("react.consumer"), X = Symbol.for("react.context"), K = Symbol.for("react.forward_ref"), Z = Symbol.for("react.suspense"), H = Symbol.for("react.suspense_list"), Q = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), ee = Symbol.for("react.activity"), te = Symbol.for("react.client.reference"), P = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, I = Object.prototype.hasOwnProperty, re = Array.isArray, $ = console.createTask ? console.createTask : function() {
223
- return null;
224
- };
225
- b = {
226
- react_stack_bottom_frame: function(e) {
227
- return e();
228
- }
229
- };
230
- var z, L = {}, D = b.react_stack_bottom_frame.bind(
231
- b,
232
- c
233
- )(), F = $(a(c)), M = {};
234
- N.Fragment = R, N.jsx = function(e, o, u) {
235
- var d = 1e4 > P.recentlyCreatedOwnerStacks++;
236
- return m(
237
- e,
238
- o,
239
- u,
240
- !1,
241
- d ? Error("react-stack-top-frame") : D,
242
- d ? $(a(e)) : F
243
- );
244
- }, N.jsxs = function(e, o, u) {
245
- var d = 1e4 > P.recentlyCreatedOwnerStacks++;
246
- return m(
247
- e,
248
- o,
249
- u,
250
- !0,
251
- d ? Error("react-stack-top-frame") : D,
252
- d ? $(a(e)) : F
253
- );
254
- };
255
- })()), N;
256
- }
257
- var q;
258
- function ie() {
259
- return q || (q = 1, process.env.NODE_ENV === "production" ? y.exports = le() : y.exports = ce()), y.exports;
260
- }
261
- var l = ie();
262
- function fe({ options: t, selected: r, onChange: n }) {
263
- const a = r ?? [...t.keys()][0], s = t.get(a) ?? "", [c, i] = k(a), [f, x] = k(s), [v, m] = k(!1), E = () => {
264
- m(!v);
265
- }, _ = (b) => {
266
- const j = b.target, A = c, R = j.getAttribute("data-key") ?? a, S = t.get(R) ?? s;
267
- i(R), x(S), m(!1), n && n(A, R);
268
- };
269
- return /* @__PURE__ */ l.jsxs("div", { className: "selection", children: [
270
- /* @__PURE__ */ l.jsx("div", { className: v ? "text active" : "text", onClick: E, children: f }),
271
- v && /* @__PURE__ */ l.jsx("div", { className: "options", children: Array.from(t).map(([b, j]) => /* @__PURE__ */ l.jsx("div", { className: "option", "data-key": b, onClick: _, children: j }, b)) })
272
- ] });
273
- }
274
- function me({ children: t }) {
275
- return /* @__PURE__ */ l.jsx("div", { className: "ds-tabs-tab", children: t });
276
- }
277
- function de({ separator: t, selectedId: r, children: n, onChange: a }) {
278
- const [s, c] = k(r ?? ""), i = V(() => Array.isArray(n) ? n : [n], [n]), f = V(() => {
279
- const m = {};
280
- return i.forEach((E) => {
281
- const _ = E.props.id;
282
- m[_] = E;
283
- }), m;
284
- }, [i]), x = se((m) => {
285
- const E = i[0]?.props.id;
286
- c(m ?? E);
287
- });
288
- J(() => {
289
- x(r);
290
- }, [r, i]);
291
- const v = (m) => {
292
- a !== void 0 && a(m, s), c(m);
293
- };
294
- return /* @__PURE__ */ l.jsxs("div", { className: "tabs", children: [
295
- /* @__PURE__ */ l.jsx("div", { className: "nav", children: i.map((m) => {
296
- const E = m.props.id, _ = `tab-${E}`, b = E === s ? "active" : "inactive", j = () => v(m.props.id);
297
- return /* @__PURE__ */ l.jsx("div", { className: "item " + b, onClick: j, children: m.props.title }, _);
298
- }) }),
299
- t !== void 0 ? /* @__PURE__ */ l.jsx("div", { className: "separator", children: t }) : null,
300
- /* @__PURE__ */ l.jsx("div", { className: "content", children: f[s] })
301
- ] });
302
- }
303
- function pe({ source: t, title: r, alt: n = "Avatar", width: a, height: s, fit: c = "contain" }) {
304
- const i = "avatar fit-" + c, f = { width: a, height: s };
305
- return /* @__PURE__ */ l.jsx(
1
+ import { jsx as s, jsxs as h, Fragment as k } from "react/jsx-runtime";
2
+ import { forwardRef as g, useRef as z, useEffect as w, useState as b, useMemo as y, useEffectEvent as E } from "react";
3
+ function O({ source: t, title: e, alt: n = "Avatar", width: a, height: c, fit: r = "contain" }) {
4
+ const o = "avatar fit-" + r;
5
+ return /* @__PURE__ */ s(
306
6
  "img",
307
7
  {
308
- className: i,
309
- title: r,
8
+ className: o,
9
+ title: e,
310
10
  alt: n,
311
- style: f,
11
+ style: { width: a, height: c },
312
12
  src: t
313
13
  }
314
14
  );
315
15
  }
316
- function Ee({ type: t = "normal", size: r = "large", padding: n = "large", children: a }) {
317
- const s = "border type-" + t + " size-" + r + " padding-" + n;
318
- return /* @__PURE__ */ l.jsx("div", { className: s, children: a });
16
+ function F({ type: t = "normal", size: e = "large", padding: n = "large", children: a }) {
17
+ const c = "border type-" + t + " size-" + e + " padding-" + n;
18
+ return /* @__PURE__ */ s("div", { className: c, children: a });
319
19
  }
320
- function ve({ type: t = "primary", size: r = "medium", text: n, onClick: a }) {
321
- const s = "button type-" + t + " size-" + r, c = t === "disabled", i = t === "submit" ? "submit" : "button";
322
- return /* @__PURE__ */ l.jsx("input", { type: i, onClick: a, className: s, disabled: c, value: n });
20
+ function j({ type: t = "primary", size: e = "medium", text: n, onClick: a }) {
21
+ const c = "button type-" + t + " size-" + e;
22
+ return /* @__PURE__ */ s("input", { type: t === "submit" ? "submit" : "button", onClick: a, className: c, disabled: t === "disabled", value: n });
323
23
  }
324
- function xe({ sizing: t = "fluid", children: r }) {
24
+ function I({ sizing: t = "fluid", children: e }) {
325
25
  const n = "cell sizing-" + t;
326
- return /* @__PURE__ */ l.jsx("div", { className: n, children: r });
26
+ return /* @__PURE__ */ s("div", { className: n, children: e });
327
27
  }
328
- function be({ padding: t = "none", onClick: r, children: n }) {
28
+ const P = g(function({ name: e, label: n, defaultChecked: a, checked: c, value: r, required: o, onChange: l }, m) {
29
+ return /* @__PURE__ */ h("label", { className: "checkbox", children: [
30
+ /* @__PURE__ */ s(
31
+ "input",
32
+ {
33
+ type: "checkbox",
34
+ defaultChecked: a,
35
+ checked: c,
36
+ value: r,
37
+ name: e,
38
+ ref: m,
39
+ required: o,
40
+ onChange: l
41
+ }
42
+ ),
43
+ n
44
+ ] });
45
+ });
46
+ function G({ padding: t = "none", onClick: e, children: n }) {
329
47
  const a = "clickarea padding-" + t;
330
- return /* @__PURE__ */ l.jsx("div", { className: a, onClick: r, children: n });
48
+ return /* @__PURE__ */ s("div", { className: a, onClick: e, children: n });
331
49
  }
332
- function _e({ alignX: t = "left", alignY: r = "top", gap: n = "medium", wrap: a = "nowrap", children: s }) {
333
- const c = "column align-x-" + t + " align-y-" + r + " gap-" + n + " wrap-" + a;
334
- return /* @__PURE__ */ l.jsx("div", { className: c, children: s });
50
+ function q({ alignX: t = "left", alignY: e = "top", gap: n = "medium", wrap: a = "nowrap", children: c }) {
51
+ const r = "column align-x-" + t + " align-y-" + e + " gap-" + n + " wrap-" + a;
52
+ return /* @__PURE__ */ s("div", { className: r, children: c });
335
53
  }
336
- const je = w(function({ children: r, submitHandler: n }, a) {
337
- const s = (c) => {
338
- c.preventDefault(), n && n(c.target);
339
- };
340
- return /* @__PURE__ */ l.jsx("form", { onSubmit: s, className: "form", ref: a, children: r });
54
+ const H = g(function({ name: e, defaultValue: n, value: a, title: c, type: r = "datetime", size: o = "medium", required: l, onChange: m }, u) {
55
+ const i = "datetime size-" + o;
56
+ return /* @__PURE__ */ s(
57
+ "input",
58
+ {
59
+ className: i,
60
+ type: r,
61
+ name: e,
62
+ defaultValue: n,
63
+ value: a,
64
+ title: c,
65
+ ref: u,
66
+ required: l,
67
+ onChange: m
68
+ }
69
+ );
70
+ }), J = g(function({ children: e, submitHandler: n }, a) {
71
+ return /* @__PURE__ */ s("form", { onSubmit: (r) => {
72
+ r.preventDefault(), n && n(r.target);
73
+ }, className: "form", ref: a, children: e });
341
74
  });
342
- function Re({ layout: t, gap: r = "medium", children: n }) {
343
- const a = "grid layout-" + t + " gap-" + r;
344
- return /* @__PURE__ */ l.jsx("div", { className: a, children: n });
75
+ function Q({ layout: t, gap: e = "medium", children: n }) {
76
+ const a = "grid layout-" + t + " gap-" + e;
77
+ return /* @__PURE__ */ s("div", { className: a, children: n });
345
78
  }
346
- function ge({ type: t }) {
347
- return /* @__PURE__ */ l.jsx("span", { className: "icon " + t });
79
+ function U({ type: t }) {
80
+ return /* @__PURE__ */ s("span", { className: "icon " + t });
348
81
  }
349
- function Te({ source: t, title: r, alt: n, width: a, height: s, fit: c = "contain" }) {
350
- const i = "image fit-" + c, f = { width: a, height: s };
351
- return /* @__PURE__ */ l.jsx(
82
+ function V({ source: t, title: e, alt: n, width: a, height: c, fit: r = "contain" }) {
83
+ const o = "image fit-" + r;
84
+ return /* @__PURE__ */ s(
352
85
  "img",
353
86
  {
354
- className: i,
355
- title: r,
87
+ className: o,
88
+ title: e,
356
89
  alt: n,
357
- style: f,
90
+ style: { width: a, height: c },
358
91
  src: t
359
92
  }
360
93
  );
361
94
  }
362
- function Ne({ label: t, element: r }) {
363
- return /* @__PURE__ */ l.jsxs("div", { className: "input", children: [
95
+ function W({ label: t, element: e }) {
96
+ return /* @__PURE__ */ h("div", { className: "input", children: [
364
97
  t,
365
- r
98
+ e
366
99
  ] });
367
100
  }
368
- function he({ value: t }) {
369
- return /* @__PURE__ */ l.jsx("label", { className: "label", children: t });
101
+ function X({ value: t }) {
102
+ return /* @__PURE__ */ s("label", { className: "label", children: t });
370
103
  }
371
- function ye({ url: t, target: r, children: n }) {
372
- return /* @__PURE__ */ l.jsx("a", { className: "link", href: t, target: r, children: n });
104
+ function Y({ url: t, target: e, children: n }) {
105
+ return /* @__PURE__ */ s("a", { className: "link", href: t, target: e, children: n });
373
106
  }
374
- function ke({ open: t, sizing: r = "content", children: n }) {
375
- const a = oe(null), s = "modal sizing-" + r;
376
- return J(() => {
107
+ function Z({ open: t = !0, sizing: e = "content", children: n }) {
108
+ const a = z(null), c = "modal sizing-" + e;
109
+ return w(() => {
377
110
  t ? a.current?.showModal() : a.current?.close();
378
- }, [t]), /* @__PURE__ */ l.jsx("dialog", { ref: a, className: s, children: /* @__PURE__ */ l.jsx("form", { method: "dialog", children: n }) });
111
+ }, [t]), /* @__PURE__ */ s("dialog", { ref: a, className: c, children: n });
379
112
  }
380
- function we({ type: t = "normal", padding: r = "large", children: n }) {
381
- const a = "panel type-" + t + " padding-" + r;
382
- return /* @__PURE__ */ l.jsx("div", { className: a, children: n });
113
+ function _({ type: t = "normal", padding: e = "large", children: n }) {
114
+ const a = "panel type-" + t + " padding-" + e;
115
+ return /* @__PURE__ */ s("div", { className: a, children: n });
383
116
  }
384
- function Ae({ size: t = "medium", children: r }) {
117
+ function tt({ size: t = "medium", children: e }) {
385
118
  const n = "paragraph size-" + t;
386
- return /* @__PURE__ */ l.jsx("p", { className: n, children: r });
119
+ return /* @__PURE__ */ s("p", { className: n, children: e });
387
120
  }
388
- function Se({ alignX: t = "left", alignY: r = "top", gap: n = "medium", wrap: a = "nowrap", children: s }) {
389
- const c = "row align-x-" + t + " align-y-" + r + " gap-" + n + " wrap-" + a;
390
- return /* @__PURE__ */ l.jsx("div", { className: c, children: s });
121
+ function et({ alignX: t = "left", alignY: e = "top", gap: n = "medium", wrap: a = "nowrap", children: c }) {
122
+ const r = "row align-x-" + t + " align-y-" + e + " gap-" + n + " wrap-" + a;
123
+ return /* @__PURE__ */ s("div", { className: r, children: c });
391
124
  }
392
- function Oe({ direction: t, size: r = "medium" }) {
393
- const n = "ruler direction-" + t + " size-" + r;
394
- return /* @__PURE__ */ l.jsx("div", { className: n });
125
+ function nt({ direction: t, size: e = "medium" }) {
126
+ const n = "ruler direction-" + t + " size-" + e;
127
+ return /* @__PURE__ */ s("div", { className: n });
395
128
  }
396
- const Pe = w(function({ name: r, options: n, value: a, size: s = "medium", onChange: c }, i) {
397
- const f = "select size-" + s;
398
- return /* @__PURE__ */ l.jsx(
129
+ const at = g(function({ name: e, options: n, defaultValue: a, value: c, size: r = "medium", onChange: o }, l) {
130
+ const m = "select size-" + r;
131
+ return /* @__PURE__ */ s(
399
132
  "select",
400
133
  {
401
- className: f,
402
- name: r,
134
+ className: m,
135
+ name: e,
403
136
  defaultValue: a,
404
- onChange: c,
405
- ref: i,
406
- children: Array.from(n).map(([x, v]) => /* @__PURE__ */ l.jsx("option", { value: x, children: v }, x))
137
+ value: c,
138
+ onChange: o,
139
+ ref: l,
140
+ children: Array.from(n).map(([u, i]) => /* @__PURE__ */ s("option", { value: u, children: i }, u))
407
141
  }
408
142
  );
409
143
  });
410
- function $e({ active: t = !0 }) {
411
- const r = "spinner" + (t ? " active" : "");
412
- return /* @__PURE__ */ l.jsx("div", { className: r });
144
+ function st({ active: t = !0 }) {
145
+ const e = "spinner" + (t ? " active" : "");
146
+ return /* @__PURE__ */ s("div", { className: e });
147
+ }
148
+ function A({ children: t }) {
149
+ return /* @__PURE__ */ s("thead", { children: t });
150
+ }
151
+ function C({ border: t = "medium", children: e }) {
152
+ const n = "border-" + t;
153
+ return /* @__PURE__ */ s("tbody", { className: n, children: e });
154
+ }
155
+ function M({ children: t }) {
156
+ return /* @__PURE__ */ s("tfoot", { children: t });
157
+ }
158
+ function L({ children: t }) {
159
+ return /* @__PURE__ */ s("tr", { children: t });
413
160
  }
414
- function Ce({ value: t, type: r = "primary", size: n = "medium", weight: a = "normal", wrap: s = "none" }) {
415
- const c = "text type-" + r + " size-" + n + " weight-" + a + " wrap-" + s;
416
- return /* @__PURE__ */ l.jsx("span", { className: c, children: t });
161
+ function B({ colspan: t, rowspan: e, alignX: n = "left", alignY: a = "center", size: c = "fit", children: r }) {
162
+ const o = "align-x-" + n + " align-y-" + a + " size-" + c;
163
+ return /* @__PURE__ */ s("td", { className: o, colSpan: t, rowSpan: e, children: r });
417
164
  }
418
- const Ye = w(function({ name: r, placeholder: n, value: a, size: s = "medium", rows: c, limit: i, onChange: f }, x) {
419
- const v = "textarea size-" + s;
420
- return /* @__PURE__ */ l.jsx(
165
+ function v({ padding: t = "medium", children: e }) {
166
+ const n = "table padding-" + t;
167
+ return /* @__PURE__ */ s("table", { className: n, children: e });
168
+ }
169
+ v.Header = A;
170
+ v.Body = C;
171
+ v.Footer = M;
172
+ v.Row = L;
173
+ v.Cell = B;
174
+ function ct({ value: t, type: e = "primary", size: n = "medium", weight: a = "normal", wrap: c = "none" }) {
175
+ const r = "text type-" + e + " size-" + n + " weight-" + a + " wrap-" + c;
176
+ return /* @__PURE__ */ s("span", { className: r, children: t });
177
+ }
178
+ const rt = g(function({ name: e, placeholder: n, defaultValue: a, value: c, size: r = "medium", rows: o, limit: l, onChange: m }, u) {
179
+ const i = "textarea size-" + r;
180
+ return /* @__PURE__ */ s(
421
181
  "textarea",
422
182
  {
423
- className: v,
424
- name: r,
183
+ className: i,
184
+ name: e,
425
185
  placeholder: n,
426
186
  defaultValue: a,
427
- rows: c,
428
- ref: x,
429
- maxLength: i,
430
- onChange: f
187
+ value: c,
188
+ rows: o,
189
+ ref: u,
190
+ maxLength: l,
191
+ onChange: m
431
192
  }
432
193
  );
433
- }), Ie = w(function({ name: r, placeholder: n, value: a, limit: s, pattern: c, title: i, size: f = "medium", required: x, onChange: v }, m) {
434
- const E = "textbox size-" + f;
435
- return /* @__PURE__ */ l.jsx(
194
+ }), ot = g(function({ name: e, placeholder: n, defaultValue: a, value: c, limit: r, pattern: o, title: l, type: m = "text", size: u = "medium", required: i, onChange: d }, p) {
195
+ const f = "textbox size-" + u;
196
+ return /* @__PURE__ */ s(
436
197
  "input",
437
198
  {
438
- className: E,
439
- type: "text",
440
- name: r,
199
+ className: f,
200
+ type: m,
201
+ name: e,
441
202
  placeholder: n,
442
203
  defaultValue: a,
443
- maxLength: s,
444
- pattern: c,
445
- title: i,
446
- ref: m,
447
- required: x,
448
- onChange: v
204
+ value: c,
205
+ maxLength: r,
206
+ pattern: o,
207
+ title: l,
208
+ ref: p,
209
+ required: i,
210
+ onChange: d
449
211
  }
450
212
  );
451
213
  });
452
- function ze({ size: t = "large", children: r }) {
214
+ function it({ size: t = "large", children: e }) {
453
215
  const n = "title size-" + t;
454
216
  switch (t) {
455
217
  case "large":
456
- return /* @__PURE__ */ l.jsx("h1", { className: n, children: r });
218
+ return /* @__PURE__ */ s("h1", { className: n, children: e });
457
219
  case "medium":
458
- return /* @__PURE__ */ l.jsx("h2", { className: n, children: r });
220
+ return /* @__PURE__ */ s("h2", { className: n, children: e });
459
221
  case "small":
460
- return /* @__PURE__ */ l.jsx("h3", { className: n, children: r });
222
+ return /* @__PURE__ */ s("h3", { className: n, children: e });
461
223
  }
462
224
  }
225
+ function lt({ options: t, selected: e, onChange: n }) {
226
+ const a = e ?? [...t.keys()][0], c = t.get(a) ?? "", [r, o] = b(a), [l, m] = b(c), [u, i] = b(!1), d = () => {
227
+ i(!u);
228
+ }, p = (f) => {
229
+ const N = f.target, S = r, x = N.getAttribute("data-key") ?? a, T = t.get(x) ?? c;
230
+ o(x), m(T), i(!1), n && n(S, x);
231
+ };
232
+ return /* @__PURE__ */ h("div", { className: "dropdown", children: [
233
+ /* @__PURE__ */ s("div", { className: u ? "text active" : "text", onClick: d, children: l }),
234
+ u && /* @__PURE__ */ s("div", { className: "options", children: Array.from(t).map(([f, N]) => /* @__PURE__ */ s("div", { className: "option", "data-key": f, onClick: p, children: N }, f)) })
235
+ ] });
236
+ }
237
+ function ut({ selectedId: t, children: e }) {
238
+ const [n, a] = b(t ?? ""), c = y(() => Array.isArray(e) ? e : [e], [e]), r = y(() => {
239
+ const l = {};
240
+ return c.forEach((m) => {
241
+ const u = m.props.id;
242
+ l[u] = m;
243
+ }), l;
244
+ }, [c]), o = E((l) => {
245
+ a(l ?? "");
246
+ });
247
+ return w(() => {
248
+ o(t);
249
+ }, [t, c]), r[n] ?? /* @__PURE__ */ s(k, {});
250
+ }
251
+ function K({ children: t }) {
252
+ return /* @__PURE__ */ s("div", { className: "tab", children: t });
253
+ }
254
+ function R({ separator: t, selectedId: e, children: n, onChange: a }) {
255
+ const [c, r] = b(e ?? ""), o = y(() => Array.isArray(n) ? n : [n], [n]), l = y(() => {
256
+ const i = {};
257
+ return o.forEach((d) => {
258
+ const p = d.props.id;
259
+ i[p] = d;
260
+ }), i;
261
+ }, [o]), m = E((i) => {
262
+ const d = o[0]?.props.id;
263
+ r(i ?? d);
264
+ });
265
+ w(() => {
266
+ m(e);
267
+ }, [e, o]);
268
+ const u = (i) => {
269
+ a !== void 0 && a(i, c), r(i);
270
+ };
271
+ return /* @__PURE__ */ h("div", { className: "tabs", children: [
272
+ /* @__PURE__ */ s("div", { className: "nav", children: o.map((i) => {
273
+ const d = i.props.id, p = `tab-${d}`, f = d === c ? "active" : "inactive", N = () => u(i.props.id);
274
+ return /* @__PURE__ */ s("div", { className: "item " + f, onClick: N, children: i.props.title }, p);
275
+ }) }),
276
+ t !== void 0 ? /* @__PURE__ */ s("div", { className: "separator", children: t }) : null,
277
+ /* @__PURE__ */ s("div", { className: "content", children: l[c] })
278
+ ] });
279
+ }
280
+ R.Tab = K;
281
+ function mt({ children: t }) {
282
+ return /* @__PURE__ */ s("div", { className: "mtds", children: t });
283
+ }
463
284
  export {
464
- pe as Avatar,
465
- Ee as Border,
466
- ve as Button,
467
- xe as Cell,
468
- be as ClickArea,
469
- _e as Column,
470
- fe as Dropdown,
471
- je as Form,
472
- Re as Grid,
473
- ge as Icon,
474
- Te as Image,
475
- Ne as Input,
476
- he as Label,
477
- ye as Link,
478
- ke as Modal,
479
- we as Panel,
480
- Ae as Paragraph,
481
- Se as Row,
482
- Oe as Ruler,
483
- Pe as Select,
484
- $e as Spinner,
485
- me as Tab,
486
- de as Tabs,
487
- Ce as Text,
488
- Ye as TextArea,
489
- Ie as TextBox,
490
- ze as Title
285
+ O as Avatar,
286
+ F as Border,
287
+ j as Button,
288
+ I as Cell,
289
+ P as CheckBox,
290
+ G as ClickArea,
291
+ q as Column,
292
+ H as DateTime,
293
+ mt as DesignSystem,
294
+ lt as Dropdown,
295
+ J as Form,
296
+ Q as Grid,
297
+ U as Icon,
298
+ V as Image,
299
+ W as Input,
300
+ X as Label,
301
+ Y as Link,
302
+ Z as Modal,
303
+ ut as ModalManager,
304
+ _ as Panel,
305
+ tt as Paragraph,
306
+ et as Row,
307
+ nt as Ruler,
308
+ at as Select,
309
+ st as Spinner,
310
+ v as Table,
311
+ R as Tabs,
312
+ ct as Text,
313
+ rt as TextArea,
314
+ ot as TextBox,
315
+ it as Title
491
316
  };