@mechane-ai/elements 0.11.0 → 0.12.0

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 (61) hide show
  1. package/README.md +8 -4
  2. package/dist/ai.js +4 -5
  3. package/dist/{categorical-values-FYc43JCa.js → categorical-values-CTrHn9jH.js} +2 -2
  4. package/dist/{chart-frame-Bczk5sWj.js → chart-frame-38ES6kwK.js} +4 -4
  5. package/dist/{chart-input-CbzVN76m.js → chart-input-C9fu7f1Q.js} +2 -2
  6. package/dist/charts/cartesian.js +6 -6
  7. package/dist/charts/distribution.js +2 -2
  8. package/dist/charts/graph.js +3 -3
  9. package/dist/charts/hierarchy.js +3 -3
  10. package/dist/charts/matrix.js +2 -2
  11. package/dist/charts/timeline.js +4 -4
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-B7xzM3tD.js → code-block-BjV2EFZS.js} +2 -2
  14. package/dist/collections.js +346 -294
  15. package/dist/content/code.js +1 -1
  16. package/dist/content/diff.js +3 -3
  17. package/dist/content/link.js +1 -1
  18. package/dist/content/markdown.js +2 -2
  19. package/dist/content/tree.js +2 -2
  20. package/dist/{content-link-CatGOrbo.js → content-link-C460m-O7.js} +1 -1
  21. package/dist/content.js +3 -4
  22. package/dist/elements.css +133 -80
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +22 -23
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +223 -237
  28. package/dist/navigation/commands.js +3 -3
  29. package/dist/overlays.js +1 -1
  30. package/dist/packages/collections/src/collection-controls.d.ts +1 -1
  31. package/dist/packages/collections/src/data-table.d.ts +5 -4
  32. package/dist/packages/collections/src/index.d.ts +1 -1
  33. package/dist/packages/core/src/actions.d.ts +5 -8
  34. package/dist/packages/feedback/src/control-placeholders.d.ts +16 -0
  35. package/dist/packages/feedback/src/index.d.ts +2 -0
  36. package/dist/packages/forms/src/field-styles.d.ts +2 -74
  37. package/dist/packages/forms/src/form-actions.d.ts +11 -0
  38. package/dist/packages/forms/src/form-controls.d.ts +1 -1
  39. package/dist/packages/forms/src/forms.d.ts +3 -3
  40. package/dist/packages/forms/src/index.d.ts +2 -0
  41. package/dist/packages/forms/src/select.d.ts +2 -2
  42. package/dist/packages/forms/src/selection-styles.d.ts +0 -13
  43. package/dist/packages/foundations/src/control-styles.d.ts +101 -0
  44. package/dist/packages/foundations/src/style-composition.d.ts +0 -2
  45. package/dist/packages/foundations/src/tokens.stylex.d.ts +8 -2
  46. package/dist/packages/layout/src/frame.stylex.d.ts +0 -1
  47. package/dist/packages/layout/src/index.d.ts +2 -0
  48. package/dist/packages/layout/src/page-content.d.ts +5 -0
  49. package/dist/packages/layout/src/page-toolbar.d.ts +1 -1
  50. package/dist/packages/layout/src/sidebar.d.ts +3 -3
  51. package/dist/{pierre-diff--zsiHCCB.js → pierre-diff-sUAU-xeL.js} +1 -1
  52. package/dist/{pierre-theme-D9hnHv3Z.js → pierre-theme-CBAncKdH.js} +1 -1
  53. package/dist/{pierre-tree-D47uA7lb.js → pierre-tree-DKN2eGlZ.js} +3 -3
  54. package/dist/{src-D05isEh_.js → src-3gzujMhN.js} +124 -66
  55. package/dist/{src-DXsGTJgv.js → src-CI6KtN2w.js} +366 -307
  56. package/dist/{src-Cs0dRc4X.js → src-CVlgjAlw.js} +1 -1
  57. package/dist/src-DOzle5d4.js +1199 -0
  58. package/dist/tokens.js +14 -8
  59. package/package.json +1 -1
  60. package/packages/foundations/src/tokens.stylex.ts +13 -5
  61. package/dist/src-C_heP5kL.js +0 -1264
@@ -10,30 +10,109 @@ import { Avatar as p } from "@base-ui/react/avatar";
10
10
  import { Check as m, ChevronDown as h, Circle as g, CircleCheck as _, CircleX as v, Clock as y, Copy as b } from "lucide-react";
11
11
  import { Accordion as x } from "@base-ui/react/accordion";
12
12
  import { Collapsible as S } from "@base-ui/react/collapsible";
13
- // packages/core/src/actions.tsx
13
+ // packages/foundations/src/control-styles.ts
14
14
  var C = {
15
- button: {
16
- k1xSpc: "x3nfvp2",
15
+ base: {
17
16
  kB7OPa: "x9f619",
18
- kGNEyG: "x6s0dn4",
19
- kjj79g: "xl56j7k",
20
- kOIVth: "xbgj81g",
21
- k8WAf4: "x1hmw7ec",
17
+ kAzted: "x17tes2r xwu7q15",
18
+ k8WAf4: "x1ixblau",
22
19
  kg3NbH: "x1atzlso",
23
- kaIpWk: "x1ok0vyi",
24
20
  kMzoRj: "xmkeg23",
25
21
  ksu8eU: "x1y0btm7",
22
+ kVAM5u: "x1ey3b81",
23
+ kaIpWk: "x1ok0vyi",
26
24
  kMv6JI: "x1hz01jw",
27
25
  khiITx: "xvmahel",
28
- k63SB2: "xk4h15q",
26
+ k63SB2: "xj57cvi",
29
27
  kGuDYH: "xtqrqnz",
30
28
  kLWn49: "x1778rvt",
31
- kMnn75: "xkrqix3",
32
- kkrTdU: "x1ypdohk",
29
+ $$css: !0
30
+ },
31
+ button: {
32
+ k1xSpc: "x3nfvp2",
33
+ kGNEyG: "x6s0dn4",
34
+ kjj79g: "xl56j7k",
35
+ kOIVth: "xbgj81g",
33
36
  k7Eaqz: "xeuugli",
34
37
  ks0D6T: "x193iq5w",
35
38
  kHjlTd: "xj0a0fe",
36
39
  k9WMMc: "x2b8uid",
40
+ $$css: !0
41
+ },
42
+ field: {
43
+ k1xSpc: "x1lliihq",
44
+ kzqmXN: "xh8yej3",
45
+ k7Eaqz: "xeuugli",
46
+ kWkggS: "xpvm0e4",
47
+ kMwMTN: "xbixft",
48
+ kGuDYH: "xtqrqnz x1ue2g44",
49
+ $$css: !0
50
+ },
51
+ fieldRoot: {
52
+ k1xSpc: "x78zum5",
53
+ kXwgrk: "xdt5ytf",
54
+ kOIVth: "x1hnptsi",
55
+ k7Eaqz: "xeuugli",
56
+ kMv6JI: "x1hz01jw",
57
+ k63SB2: "xj57cvi",
58
+ khiITx: "xvmahel",
59
+ $$css: !0
60
+ },
61
+ label: {
62
+ kMwMTN: "xbixft",
63
+ kMv6JI: "x1hz01jw",
64
+ kGuDYH: "xtqrqnz",
65
+ k63SB2: "xk4h15q",
66
+ kLWn49: "x1778rvt",
67
+ kHjlTd: "xj0a0fe",
68
+ $$css: !0
69
+ },
70
+ description: {
71
+ kogj98: "x1ghz6dp",
72
+ kMwMTN: "x153jb6y",
73
+ kGuDYH: "xy8obcc",
74
+ kLWn49: "xas2l8k",
75
+ kHjlTd: "xj0a0fe",
76
+ $$css: !0
77
+ },
78
+ textarea: {
79
+ kAzted: "x13j50qi",
80
+ kHenm0: "x288g5",
81
+ kLWn49: "x1gj8gu9",
82
+ $$css: !0
83
+ },
84
+ group: {
85
+ kVAEAm: "x1n2onr6",
86
+ k1xSpc: "x78zum5",
87
+ kGNEyG: "x1qjc9v5",
88
+ k7Eaqz: "xeuugli",
89
+ kaIpWk: "x1ok0vyi",
90
+ kWkggS: "xpvm0e4",
91
+ k5JduY: "x1s928wv",
92
+ kwXMNM: "x1j6awrg",
93
+ kv0HGH: "xarstr8",
94
+ kloYau: "x2q1x1w",
95
+ kPGmMm: "x5hscyn",
96
+ kbwMcY: "x86avzo",
97
+ kXtpa: "x10z0kkz",
98
+ kUfP38: "xt0q9np",
99
+ krLA0g: "xzggfk3",
100
+ $$css: !0
101
+ },
102
+ embedded: {
103
+ kUk6DE: "x98rzlu",
104
+ k7Eaqz: "xeuugli",
105
+ kzqmXN: "xnalus7",
106
+ kVAM5u: "x9r1u3d",
107
+ kWkggS: "xjbqb8w",
108
+ kr7hW5: "x1m9vbm4",
109
+ kiEn40: "x8fq8g9",
110
+ $$css: !0
111
+ }
112
+ }, w = {
113
+ button: {
114
+ kMnn75: "xkrqix3",
115
+ kkrTdU: "x1ypdohk",
37
116
  kUfY9r: "xdibjt2",
38
117
  kxHhyo: "xwpgcpl",
39
118
  kL1HnH: "xknznnm",
@@ -43,14 +122,6 @@ var C = {
43
122
  kiEn40: "x7s97pk",
44
123
  $$css: !0
45
124
  },
46
- sm: {
47
- kAzted: "xaeotn9 xwu7q15",
48
- $$css: !0
49
- },
50
- md: {
51
- kAzted: "x1uey4wk xwu7q15",
52
- $$css: !0
53
- },
54
125
  solidNeutral: {
55
126
  kWkggS: "x1pt885t",
56
127
  kVAM5u: "x159tnba",
@@ -70,9 +141,7 @@ var C = {
70
141
  ghostNeutral: {
71
142
  kWkggS: "xjbqb8w",
72
143
  kVAM5u: "x9r1u3d",
73
- kMzoRj: "xc342km",
74
144
  kMwMTN: "xbixft",
75
- k63SB2: "xj57cvi",
76
145
  kvyT6O: "x19fjeqo",
77
146
  k2wZ5d: "x1480za7",
78
147
  $$css: !0
@@ -96,20 +165,13 @@ var C = {
96
165
  ghostDanger: {
97
166
  kWkggS: "xjbqb8w",
98
167
  kVAM5u: "x9r1u3d",
99
- kMzoRj: "xc342km",
100
168
  kMwMTN: "xr5kp14",
101
- k63SB2: "xj57cvi",
102
169
  kGGynd: "xvxq6zk",
103
170
  k2wZ5d: "x14u6bge",
104
171
  $$css: !0
105
172
  },
106
- iconSm: {
107
- k7Eaqz: "x1udcv4t xidce53",
108
- kg3NbH: "xnjsko4",
109
- $$css: !0
110
- },
111
- iconMd: {
112
- k7Eaqz: "xelkyza xidce53",
173
+ iconButton: {
174
+ k7Eaqz: "x16opp91 xidce53",
113
175
  kg3NbH: "xnjsko4",
114
176
  $$css: !0
115
177
  },
@@ -168,28 +230,22 @@ var C = {
168
230
  kiEn40: "x7s97pk",
169
231
  $$css: !0
170
232
  }
171
- }, w = {
233
+ }, T = {
172
234
  neutral: {
173
- solid: C.solidNeutral,
174
- outline: C.outlineNeutral,
175
- ghost: C.ghostNeutral
235
+ solid: w.solidNeutral,
236
+ outline: w.outlineNeutral,
237
+ ghost: w.ghostNeutral
176
238
  },
177
239
  danger: {
178
- solid: C.solidDanger,
179
- outline: C.outlineDanger,
180
- ghost: C.ghostDanger
240
+ solid: w.solidDanger,
241
+ outline: w.outlineDanger,
242
+ ghost: w.ghostDanger
181
243
  }
182
- }, T = {
183
- sm: C.sm,
184
- md: C.md
185
244
  }, E = {
186
- sm: C.iconSm,
187
- md: C.iconMd
188
- }, D = {
189
- neutral: C.neutralText,
190
- danger: C.dangerText
245
+ neutral: w.neutralText,
246
+ danger: w.dangerText
191
247
  };
192
- function O({ id: e, children: t, pending: n = !1, pendingLabel: r }) {
248
+ function D({ id: e, children: t, pending: n = !1, pendingLabel: r }) {
193
249
  return r === void 0 ? t : /* @__PURE__ */ f("span", {
194
250
  id: e,
195
251
  className: "xwz0xwf xeuugli x193iq5w",
@@ -210,8 +266,8 @@ function O({ id: e, children: t, pending: n = !1, pendingLabel: r }) {
210
266
  })]
211
267
  });
212
268
  }
213
- function k({ variant: t = "outline", tone: r = "neutral", size: i = "sm", pending: o = !1, pendingLabel: c, children: l, className: u, style: f, xstyle: p, disabled: m = !1, ...h }) {
214
- let g = s(), _ = a.props(C.button, T[i], w[r][t], p);
269
+ function O({ variant: t = "outline", tone: r = "neutral", isIconOnly: i = !1, pending: o = !1, pendingLabel: c, children: l, className: u, style: f, xstyle: p, disabled: m = !1, ...h }) {
270
+ let g = s(), _ = a.props(C.base, C.button, w.button, T[r][t], i && w.iconButton, p);
215
271
  return /* @__PURE__ */ d(n, {
216
272
  ...h,
217
273
  ...e({
@@ -223,7 +279,7 @@ function k({ variant: t = "outline", tone: r = "neutral", size: i = "sm", pendin
223
279
  focusableWhenDisabled: o || h.focusableWhenDisabled,
224
280
  "aria-labelledby": h["aria-labelledby"] ?? (h["aria-label"] === void 0 && c !== void 0 ? g : void 0),
225
281
  "aria-busy": o || h["aria-busy"],
226
- children: /* @__PURE__ */ d(O, {
282
+ children: /* @__PURE__ */ d(D, {
227
283
  id: g,
228
284
  pending: o,
229
285
  pendingLabel: c,
@@ -231,20 +287,22 @@ function k({ variant: t = "outline", tone: r = "neutral", size: i = "sm", pendin
231
287
  })
232
288
  });
233
289
  }
234
- function ee({ size: e = "sm", children: t, xstyle: n, ...r }) {
235
- return /* @__PURE__ */ d(k, {
236
- ...r,
237
- size: e,
238
- xstyle: [E[e], n],
290
+ function k(e) {
291
+ return /* @__PURE__ */ d(O, { ...e });
292
+ }
293
+ function ee({ children: e, ...t }) {
294
+ return /* @__PURE__ */ d(O, {
295
+ ...t,
296
+ isIconOnly: !0,
239
297
  children: /* @__PURE__ */ d("span", {
240
298
  "aria-hidden": !0,
241
299
  className: "xtwnzbg x18utl2x x2lah0s x3nfvp2",
242
- children: t
300
+ children: e
243
301
  })
244
302
  });
245
303
  }
246
304
  function A({ tone: t = "neutral", pending: r = !1, pendingLabel: i, children: o, className: c, style: l, xstyle: u, disabled: f = !1, ...p }) {
247
- let m = s(), h = a.props(C.text, D[t], u);
305
+ let m = s(), h = a.props(w.text, E[t], u);
248
306
  return /* @__PURE__ */ d(n, {
249
307
  ...p,
250
308
  ...e({
@@ -256,7 +314,7 @@ function A({ tone: t = "neutral", pending: r = !1, pendingLabel: i, children: o,
256
314
  focusableWhenDisabled: r || p.focusableWhenDisabled,
257
315
  "aria-labelledby": p["aria-labelledby"] ?? (p["aria-label"] === void 0 && i !== void 0 ? m : void 0),
258
316
  "aria-busy": r || p["aria-busy"],
259
- children: /* @__PURE__ */ d(O, {
317
+ children: /* @__PURE__ */ d(D, {
260
318
  id: m,
261
319
  pending: r,
262
320
  pendingLabel: i,
@@ -265,16 +323,16 @@ function A({ tone: t = "neutral", pending: r = !1, pendingLabel: i, children: o,
265
323
  });
266
324
  }
267
325
  function j({ xstyle: e, ...t }) {
268
- return /* @__PURE__ */ d("a", { ...r(a.props(C.link, e), t) });
326
+ return /* @__PURE__ */ d("a", { ...r(a.props(w.link, e), t) });
269
327
  }
270
- function M({ size: e = "sm", children: t, xstyle: n, render: o, ref: s, ...c }) {
328
+ function M({ children: e, xstyle: t, render: n, ref: o, ...s }) {
271
329
  return i({
272
330
  defaultTagName: "a",
273
- render: o,
274
- ref: s,
275
- props: r(a.props(C.button, T[e], C.ghostNeutral, E[e], n), c, { children: /* @__PURE__ */ d("span", {
331
+ render: n,
332
+ ref: o,
333
+ props: r(a.props(C.base, C.button, w.button, w.ghostNeutral, w.iconButton, t), s, { children: /* @__PURE__ */ d("span", {
276
334
  className: "xtwnzbg x18utl2x x2lah0s x3nfvp2",
277
- children: t
335
+ children: e
278
336
  }) })
279
337
  });
280
338
  }
@@ -1363,7 +1421,7 @@ function ae({ className: t, style: n, children: r, ...i }) {
1363
1421
  ...e({
1364
1422
  className: t,
1365
1423
  style: n,
1366
- styles: { className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xh8yej3 x1uey4wk xwu7q15 xnjsko4 xn9t2bk xc342km xjbqb8w xvwfb5p xyg3wme xjb2p0i x1qlqyl8 x15bjb6t xk4h15q x1heor9g x1yc453h xj0a0fe x1ypdohk xwj21n9 x1m8qfh3 x13qnu6 x9v5kkp x19rmrnh x7s97pk x-default-marker" }
1424
+ styles: { className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xh8yej3 x17tes2r xwu7q15 xnjsko4 xn9t2bk xc342km xjbqb8w xvwfb5p xyg3wme xjb2p0i x1qlqyl8 x15bjb6t xk4h15q x1heor9g x1yc453h xj0a0fe x1ypdohk xwj21n9 x1m8qfh3 x13qnu6 x9v5kkp x19rmrnh x7s97pk x-default-marker" }
1367
1425
  }),
1368
1426
  children: [r, /* @__PURE__ */ d(h, {
1369
1427
  "aria-hidden": !0,
@@ -1397,7 +1455,7 @@ function ce({ className: t, style: n, children: r, ...i }) {
1397
1455
  ...e({
1398
1456
  className: t,
1399
1457
  style: n,
1400
- styles: { className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xh8yej3 x1uey4wk xwu7q15 xnjsko4 xn9t2bk xc342km xjbqb8w xvwfb5p xyg3wme xjb2p0i x1qlqyl8 x15bjb6t xk4h15q x1heor9g x1yc453h xj0a0fe x1ypdohk xwj21n9 x1m8qfh3 x13qnu6 x9v5kkp x19rmrnh x7s97pk x-default-marker" }
1458
+ styles: { className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xh8yej3 x17tes2r xwu7q15 xnjsko4 xn9t2bk xc342km xjbqb8w xvwfb5p xyg3wme xjb2p0i x1qlqyl8 x15bjb6t xk4h15q x1heor9g x1yc453h xj0a0fe x1ypdohk xwj21n9 x1m8qfh3 x13qnu6 x9v5kkp x19rmrnh x7s97pk x-default-marker" }
1401
1459
  }),
1402
1460
  children: [r, /* @__PURE__ */ d(h, {
1403
1461
  "aria-hidden": !0,
@@ -1649,4 +1707,4 @@ function Ae({ children: e, tone: t = "neutral", ...n }) {
1649
1707
  })]
1650
1708
  });
1651
1709
  }
1652
- export { k as C, j as D, A as E, te as S, M as T, X as _, Oe as a, z as b, Ce as c, pe as d, he as f, de as g, ue as h, Ee as i, _e as l, me as m, we as n, Ae as o, ge as p, De as r, Te as s, ke as t, ve as u, W as v, ee as w, ne as x, U as y };
1710
+ export { k as C, j as D, A as E, C as O, te as S, M as T, X as _, Oe as a, z as b, Ce as c, pe as d, he as f, de as g, ue as h, Ee as i, _e as l, me as m, we as n, Ae as o, ge as p, De as r, Te as s, ke as t, ve as u, W as v, ee as w, ne as x, U as y };