@mechane-ai/elements 0.45.0 → 0.46.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.
- package/README.md +48 -18
- package/bin/mechane-elements-catalog.mjs +42 -4
- package/dist/ai.js +268 -202
- package/dist/catalog.json +91 -31
- package/dist/categorical-values-BXi-rJuv.js +74 -0
- package/dist/chart-cursor-1mFd48Jc.js +23 -0
- package/dist/chart-data-CIJVWCYt.js +21 -0
- package/dist/{chart-frame-Ztktqs1b.js → chart-frame-BaxKn_MB.js} +22 -41
- package/dist/{chart-input-BO3BqlFO.js → chart-input-Bm82_9Rd.js} +2 -2
- package/dist/chart-theme-4zprJ3rW.js +404 -0
- package/dist/charts/cartesian.js +1598 -1432
- package/dist/charts/distribution.js +476 -404
- package/dist/charts/graph.js +363 -349
- package/dist/charts/hierarchy.js +103 -94
- package/dist/charts/matrix.js +340 -333
- package/dist/charts/timeline.js +167 -134
- package/dist/charts.js +3 -3
- package/dist/{code-block-Cpfr7B6a.js → code-block-DioAM2bZ.js} +67 -52
- package/dist/collections.js +1648 -1188
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +67 -66
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-CGeFFb9F.js → content-link-NWuHp5rC.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/csp.js +6 -11
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +274 -214
- package/dist/{forms-DeU0Tiv3.js → forms-CEbwzlRR.js} +50 -41
- package/dist/forms.js +3 -3
- package/dist/index.js +1 -1
- package/dist/layout.js +207 -207
- package/dist/navigation.js +4 -3
- package/dist/packages/ai/src/conversation.d.ts +2 -0
- package/dist/packages/ai/src/prompt-input.d.ts +7 -2
- package/dist/packages/charts/src/cartesian/composition-bars.d.ts +2 -2
- package/dist/packages/charts/src/cartesian/index.d.ts +3 -2
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +8 -2
- package/dist/packages/charts/src/cartesian/time-series.d.ts +11 -1
- package/dist/packages/charts/src/categorical-values.d.ts +14 -9
- package/dist/packages/charts/src/chart-frame.d.ts +7 -9
- package/dist/packages/charts/src/chart-inspection.d.ts +1 -2
- package/dist/packages/charts/src/chart-range.d.ts +33 -0
- package/dist/packages/charts/src/chart-rows.d.ts +20 -0
- package/dist/packages/charts/src/chart-theme.d.ts +17 -0
- package/dist/packages/charts/src/chart.d.ts +81 -0
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +4 -4
- package/dist/packages/charts/src/index.d.ts +1 -0
- package/dist/packages/charts/src/matrix/matrix-strip.d.ts +3 -3
- package/dist/packages/charts/src/plot-width.d.ts +0 -1
- package/dist/packages/charts/src/timeline/index.d.ts +1 -1
- package/dist/packages/charts/src/timeline/waterfall.d.ts +6 -2
- package/dist/packages/collections/src/collection-controls.d.ts +5 -1
- package/dist/packages/collections/src/collection-filters.d.ts +4 -1
- package/dist/packages/collections/src/control-toolbar.d.ts +13 -0
- package/dist/packages/collections/src/data-table-layout.d.ts +78 -0
- package/dist/packages/collections/src/data-table-rows.d.ts +54 -0
- package/dist/packages/collections/src/data-table-styles.d.ts +340 -0
- package/dist/packages/collections/src/data-table-text.d.ts +13 -0
- package/dist/packages/collections/src/data-table-trigger.d.ts +23 -0
- package/dist/packages/collections/src/data-table.d.ts +3 -85
- package/dist/packages/collections/src/index.d.ts +11 -6
- package/dist/packages/collections/src/query-controls.d.ts +6 -2
- package/dist/packages/collections/src/table-results.d.ts +47 -13
- package/dist/packages/collections/src/timeline.d.ts +1 -0
- package/dist/packages/collections/src/use-collection-controls.d.ts +2 -1
- package/dist/packages/collections/src/use-table-window.d.ts +25 -0
- package/dist/packages/content/src/viewer.d.ts +8 -0
- package/dist/packages/core/src/disclosure.d.ts +9 -1
- package/dist/packages/core/src/index.d.ts +1 -0
- package/dist/packages/core/src/route-link.d.ts +11 -0
- package/dist/packages/forms/src/dates/date-inputs.d.ts +3 -1
- package/dist/packages/forms/src/file-picker.d.ts +15 -0
- package/dist/packages/forms/src/form-controls.d.ts +1 -6
- package/dist/packages/forms/src/forms.d.ts +4 -1
- package/dist/packages/forms/src/index.d.ts +4 -2
- package/dist/packages/forms/src/selection.d.ts +14 -0
- package/dist/packages/foundations/src/csp/index.d.ts +1 -1
- package/dist/packages/foundations/src/csp/provider.d.ts +7 -2
- package/dist/packages/navigation/src/index.d.ts +1 -1
- package/dist/{pierre-diff-B3tD3-6z.js → pierre-diff-DlvjyuJn.js} +1 -1
- package/dist/plot-width-v2c_rA20.js +63 -0
- package/dist/{src-gqEebHEa.js → src-1EHkSFS-.js} +395 -274
- package/dist/{src-DBNncL7_.js → src-BPTDJqt0.js} +48 -68
- package/dist/src-CGc_hjxJ.js +409 -0
- package/dist/{src-DcW_gMX8.js → src-CpdJlDhO.js} +480 -362
- package/dist/{src-Dcs3SZ9V.js → src-DVHlknB6.js} +1 -1
- package/dist/styles2.css +136 -114
- package/package.json +1 -4
- package/skills/extend-elements/SKILL.md +74 -0
- package/skills/review-elements/SKILL.md +76 -0
- package/skills/upgrade-elements/SKILL.md +34 -0
- package/skills/upgrade-elements/references/releases.md +58 -0
- package/skills/use-elements/SKILL.md +64 -13
- package/skills/use-elements/references/agent.md +57 -0
- package/skills/use-elements/references/charts.md +63 -0
- package/skills/use-elements/references/collections.md +89 -0
- package/skills/use-elements/references/conversations.md +47 -0
- package/skills/use-elements/references/forms.md +81 -0
- package/skills/use-elements/references/styling.md +70 -0
- package/skills/use-elements/references/workspace.md +3 -3
- package/dist/categorical-values-DZLGQVW1.js +0 -63
- package/dist/chart-navigation-BAbb5PV9.js +0 -154
- package/dist/header-styles-COxCYFZx.js +0 -90
- package/dist/packages/charts/src/chart-navigation.d.ts +0 -39
- package/dist/packages/charts/src/chart-surface.d.ts +0 -27
- package/dist/packages/navigation/src/route-link.d.ts +0 -2
- package/dist/plot-width-CIqBiHcd.js +0 -105
- package/dist/src-Bk7M67zy.js +0 -396
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e, s as t } from "./src-
|
|
1
|
+
import { i as e, s as t } from "./src-CpdJlDhO.js";
|
|
2
2
|
import { a as n, n as r, r as i, t as a } from "./control-styles-D3q_Qyxi.js";
|
|
3
3
|
import { i as o, n as s, r as c } from "./tokens.stylex-dF5CACEJ.js";
|
|
4
4
|
import { t as l } from "./accessibility-P89UG9-r.js";
|
package/dist/styles2.css
CHANGED
|
@@ -312,6 +312,14 @@
|
|
|
312
312
|
border-color: var(--xe11pje);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
+
.xbm8b0d {
|
|
316
|
+
border-color: var(--xzqn2nu);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.x1l0rsgs {
|
|
320
|
+
border-inline-width: 1px;
|
|
321
|
+
}
|
|
322
|
+
|
|
315
323
|
.x2u8bby {
|
|
316
324
|
border-radius: 0;
|
|
317
325
|
}
|
|
@@ -440,6 +448,10 @@
|
|
|
440
448
|
inset-inline: 0;
|
|
441
449
|
}
|
|
442
450
|
|
|
451
|
+
.x7it7wx {
|
|
452
|
+
inset-inline: 5px;
|
|
453
|
+
}
|
|
454
|
+
|
|
443
455
|
.xe8uvvx {
|
|
444
456
|
list-style: none;
|
|
445
457
|
}
|
|
@@ -624,14 +636,18 @@
|
|
|
624
636
|
border-color: var(--x169lqhw);
|
|
625
637
|
}
|
|
626
638
|
|
|
627
|
-
.x76gt29:is([data-invalid], [aria-invalid="true"]), .xs95o9x[data-invalid] {
|
|
639
|
+
.x1ugjnuv[data-drag-reject], .x76gt29:is([data-invalid], [aria-invalid="true"]), .xs95o9x[data-invalid] {
|
|
628
640
|
border-color: var(--x5peq9z);
|
|
629
641
|
}
|
|
630
642
|
|
|
631
|
-
.x1gd1hh4:focus-within {
|
|
643
|
+
.x1gd1hh4:focus-within, .xcx2lv2[data-dragging] {
|
|
632
644
|
border-color: var(--xzqn2nu);
|
|
633
645
|
}
|
|
634
646
|
|
|
647
|
+
.x3d0qbt[data-dragging] {
|
|
648
|
+
border-style: dashed;
|
|
649
|
+
}
|
|
650
|
+
|
|
635
651
|
.xwqq6z6[data-orientation="vertical"] {
|
|
636
652
|
flex: 1;
|
|
637
653
|
}
|
|
@@ -664,6 +680,12 @@
|
|
|
664
680
|
border-color: var(--x169lqhw);
|
|
665
681
|
}
|
|
666
682
|
|
|
683
|
+
@media (forced-colors: active) {
|
|
684
|
+
.x1n2ykn.x1n2ykn {
|
|
685
|
+
border-color: highlight;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
667
689
|
@container (width <= 650px) {
|
|
668
690
|
.x1v577k8.x1v577k8 {
|
|
669
691
|
grid-column: 1 / -1;
|
|
@@ -793,6 +815,10 @@
|
|
|
793
815
|
background-clip: text;
|
|
794
816
|
}
|
|
795
817
|
|
|
818
|
+
.x1qatu44 {
|
|
819
|
+
background-color: color-mix(in srgb,var(--xzqn2nu) 10%,transparent);
|
|
820
|
+
}
|
|
821
|
+
|
|
796
822
|
.xtwfq29 {
|
|
797
823
|
background-color: currentColor;
|
|
798
824
|
}
|
|
@@ -845,6 +871,10 @@
|
|
|
845
871
|
background-color: var(--xpslqxl);
|
|
846
872
|
}
|
|
847
873
|
|
|
874
|
+
.x1o753nm {
|
|
875
|
+
background-color: var(--xzqn2nu);
|
|
876
|
+
}
|
|
877
|
+
|
|
848
878
|
.xslotfi {
|
|
849
879
|
background-image: linear-gradient(100deg,var(--x24btp3) 30%,var(--x169lqhw) 50%,var(--x24btp3) 70%);
|
|
850
880
|
}
|
|
@@ -865,6 +895,10 @@
|
|
|
865
895
|
border-block-style: solid;
|
|
866
896
|
}
|
|
867
897
|
|
|
898
|
+
.x1616tdu {
|
|
899
|
+
border-block-width: 0;
|
|
900
|
+
}
|
|
901
|
+
|
|
868
902
|
.x1kbiq1m {
|
|
869
903
|
border-block-width: 1px;
|
|
870
904
|
}
|
|
@@ -877,6 +911,10 @@
|
|
|
877
911
|
border-collapse: separate;
|
|
878
912
|
}
|
|
879
913
|
|
|
914
|
+
.x1lun4ml {
|
|
915
|
+
border-inline-end-width: 1px;
|
|
916
|
+
}
|
|
917
|
+
|
|
880
918
|
.x97x49r {
|
|
881
919
|
border-inline-start-color: var(--xe11pje);
|
|
882
920
|
}
|
|
@@ -922,6 +960,14 @@
|
|
|
922
960
|
box-sizing: border-box;
|
|
923
961
|
}
|
|
924
962
|
|
|
963
|
+
.x1afcbsf {
|
|
964
|
+
box-sizing: content-box;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
.xbuiw85 {
|
|
968
|
+
caret-color: #0000;
|
|
969
|
+
}
|
|
970
|
+
|
|
925
971
|
.x1n71m9f {
|
|
926
972
|
clip-path: inset(12px 20px 44px 56px);
|
|
927
973
|
}
|
|
@@ -1134,6 +1180,14 @@
|
|
|
1134
1180
|
cursor: default;
|
|
1135
1181
|
}
|
|
1136
1182
|
|
|
1183
|
+
.x7eptgl {
|
|
1184
|
+
cursor: ew-resize;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
.x1jm3nie {
|
|
1188
|
+
cursor: grab;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1137
1191
|
.x1ypdohk {
|
|
1138
1192
|
cursor: pointer;
|
|
1139
1193
|
}
|
|
@@ -1322,6 +1376,10 @@
|
|
|
1322
1376
|
font-style: italic;
|
|
1323
1377
|
}
|
|
1324
1378
|
|
|
1379
|
+
.x1wgrp8u {
|
|
1380
|
+
font-variant-numeric: inherit;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1325
1383
|
.xss6m8b {
|
|
1326
1384
|
font-variant-numeric: tabular-nums;
|
|
1327
1385
|
}
|
|
@@ -1414,10 +1472,18 @@
|
|
|
1414
1472
|
grid-template-rows: auto minmax(0, 1fr);
|
|
1415
1473
|
}
|
|
1416
1474
|
|
|
1475
|
+
.xpa5qit {
|
|
1476
|
+
inset-inline-end: -5px;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1417
1479
|
.x1b86y6l {
|
|
1418
1480
|
inset-inline-end: var(--x1xijsos);
|
|
1419
1481
|
}
|
|
1420
1482
|
|
|
1483
|
+
.x1765b1 {
|
|
1484
|
+
inset-inline-start: -5px;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1421
1487
|
.x1o0tod {
|
|
1422
1488
|
inset-inline-start: 0;
|
|
1423
1489
|
}
|
|
@@ -1458,14 +1524,6 @@
|
|
|
1458
1524
|
line-height: 1;
|
|
1459
1525
|
}
|
|
1460
1526
|
|
|
1461
|
-
.xasj1m4 {
|
|
1462
|
-
line-height: calc(var(--x14tmdi9) - 2px);
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
.x1p8ddxc {
|
|
1466
|
-
line-height: calc(var(--xcmidyz) - 2px);
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
1527
|
.x15bjb6t {
|
|
1470
1528
|
line-height: inherit;
|
|
1471
1529
|
}
|
|
@@ -1538,6 +1596,10 @@
|
|
|
1538
1596
|
opacity: .32;
|
|
1539
1597
|
}
|
|
1540
1598
|
|
|
1599
|
+
.x3onkmb {
|
|
1600
|
+
opacity: .35;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1541
1603
|
.x1hc1fzr {
|
|
1542
1604
|
opacity: 1;
|
|
1543
1605
|
}
|
|
@@ -1718,6 +1780,10 @@
|
|
|
1718
1780
|
scrollbar-gutter: stable;
|
|
1719
1781
|
}
|
|
1720
1782
|
|
|
1783
|
+
.xbluxkr {
|
|
1784
|
+
scrollbar-width: auto !important;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1721
1787
|
.x73je2i {
|
|
1722
1788
|
stroke: currentColor;
|
|
1723
1789
|
}
|
|
@@ -1790,6 +1856,10 @@
|
|
|
1790
1856
|
stroke-opacity: .45;
|
|
1791
1857
|
}
|
|
1792
1858
|
|
|
1859
|
+
.xhsan64 {
|
|
1860
|
+
stroke-width: 0;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1793
1863
|
.x1r6sdyr {
|
|
1794
1864
|
stroke-width: 1.25px;
|
|
1795
1865
|
}
|
|
@@ -1890,6 +1960,10 @@
|
|
|
1890
1960
|
transform: translate(-50%, -50%);
|
|
1891
1961
|
}
|
|
1892
1962
|
|
|
1963
|
+
.x1eza64o {
|
|
1964
|
+
transform: translate(var(--segmented-control-indicator-left, 0),var(--segmented-control-indicator-top, 0));
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1893
1967
|
.x19ey3p3 {
|
|
1894
1968
|
transform: translate(var(--toast-swipe-x, 0px),calc(var(--toast-index) * -8px + var(--toast-swipe-y, 0px))) scale(calc(1 - var(--toast-index) * .05));
|
|
1895
1969
|
}
|
|
@@ -1992,6 +2066,10 @@
|
|
|
1992
2066
|
white-space: pre;
|
|
1993
2067
|
}
|
|
1994
2068
|
|
|
2069
|
+
.x8knxv4 {
|
|
2070
|
+
z-index: -1;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
1995
2073
|
.x11ru5tl, .x1vjfegm {
|
|
1996
2074
|
z-index: 1;
|
|
1997
2075
|
}
|
|
@@ -2020,6 +2098,18 @@
|
|
|
2020
2098
|
z-index: calc(100 - var(--toast-index));
|
|
2021
2099
|
}
|
|
2022
2100
|
|
|
2101
|
+
.x74v5n1.x74v5n1:where(.x-default-marker:focus-visible *) {
|
|
2102
|
+
outline-style: dashed;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
.xyevt74.xyevt74:where(.x-default-marker:focus-visible *) {
|
|
2106
|
+
outline-style: solid;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
.x1wael5q.x1wael5q:where(.x-default-marker:focus-visible *) {
|
|
2110
|
+
stroke-width: var(--xxx3t85);
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2023
2113
|
.xgs60n.xgs60n:where(.x-default-marker:focus-visible *) {
|
|
2024
2114
|
visibility: visible;
|
|
2025
2115
|
}
|
|
@@ -2072,7 +2162,7 @@
|
|
|
2072
2162
|
border-inline-end-width: 1px;
|
|
2073
2163
|
}
|
|
2074
2164
|
|
|
2075
|
-
.x1lf1diw[data-pressed], .xoqm7u7:active:not([data-disabled]), .xqscok7:is([aria-selected="true"], [aria-current="page"]) {
|
|
2165
|
+
.x1lf1diw[data-pressed], .x1xrsc44[data-checked], .xoqm7u7:active:not([data-disabled]), .xqscok7:is([aria-selected="true"], [aria-current="page"]) {
|
|
2076
2166
|
color: var(--x169lqhw);
|
|
2077
2167
|
}
|
|
2078
2168
|
|
|
@@ -2148,7 +2238,7 @@
|
|
|
2148
2238
|
outline-offset: -8px;
|
|
2149
2239
|
}
|
|
2150
2240
|
|
|
2151
|
-
.x13iak60:focus-visible {
|
|
2241
|
+
.x13iak60:focus-visible, .xjy7s37:focus-within {
|
|
2152
2242
|
outline-offset: 1px;
|
|
2153
2243
|
}
|
|
2154
2244
|
|
|
@@ -2212,7 +2302,7 @@
|
|
|
2212
2302
|
transform: translate(var(--toast-swipe-x, 0px),calc(var(--toast-offset) + var(--toast-index) * 8px + var(--toast-swipe-y, 0px)));
|
|
2213
2303
|
}
|
|
2214
2304
|
|
|
2215
|
-
.xm69ghq[data-swiping] {
|
|
2305
|
+
.x17ba671[data-activation-direction="none"], .xm69ghq[data-swiping] {
|
|
2216
2306
|
transition-duration: 0s;
|
|
2217
2307
|
}
|
|
2218
2308
|
|
|
@@ -2284,6 +2374,14 @@
|
|
|
2284
2374
|
opacity: var(--x9ngs59);
|
|
2285
2375
|
}
|
|
2286
2376
|
|
|
2377
|
+
.xzhmotu:focus {
|
|
2378
|
+
background-color: var(--xzqn2nu);
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
.x1u2mymh:focus {
|
|
2382
|
+
color: var(--x13kja51);
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2287
2385
|
.x1gnsi0:focus {
|
|
2288
2386
|
outline-color: var(--xzqn2nu);
|
|
2289
2387
|
}
|
|
@@ -2325,6 +2423,14 @@
|
|
|
2325
2423
|
}
|
|
2326
2424
|
|
|
2327
2425
|
@media (forced-colors: active) {
|
|
2426
|
+
.x1jzqe4.x1jzqe4 {
|
|
2427
|
+
background-color: highlight;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
.x1x84bn5.x1x84bn5 {
|
|
2431
|
+
outline-color: highlight;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2328
2434
|
.xbabvq0.xbabvq0 {
|
|
2329
2435
|
stroke: highlight;
|
|
2330
2436
|
}
|
|
@@ -2574,6 +2680,10 @@
|
|
|
2574
2680
|
height: 47px;
|
|
2575
2681
|
}
|
|
2576
2682
|
|
|
2683
|
+
.xg7szsh {
|
|
2684
|
+
height: var(--segmented-control-indicator-height);
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2577
2687
|
.x1u22o8f {
|
|
2578
2688
|
height: var(--toast-front-height, 0px);
|
|
2579
2689
|
}
|
|
@@ -3030,6 +3140,10 @@
|
|
|
3030
3140
|
width: 100cqi;
|
|
3031
3141
|
}
|
|
3032
3142
|
|
|
3143
|
+
.x1fsd2vl {
|
|
3144
|
+
width: 10px;
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3033
3147
|
.x2pejg6 {
|
|
3034
3148
|
width: 128px;
|
|
3035
3149
|
}
|
|
@@ -3074,6 +3188,10 @@
|
|
|
3074
3188
|
width: 24px;
|
|
3075
3189
|
}
|
|
3076
3190
|
|
|
3191
|
+
.xu85ibj {
|
|
3192
|
+
width: 2ch;
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3077
3195
|
.x1m258z3 {
|
|
3078
3196
|
width: 320px;
|
|
3079
3197
|
}
|
|
@@ -3146,6 +3264,10 @@
|
|
|
3146
3264
|
width: min(440px, 100vw - 32px);
|
|
3147
3265
|
}
|
|
3148
3266
|
|
|
3267
|
+
.x1u1fgkt {
|
|
3268
|
+
width: var(--segmented-control-indicator-width);
|
|
3269
|
+
}
|
|
3270
|
+
|
|
3149
3271
|
.x5lhr3w {
|
|
3150
3272
|
width: var(--x-width);
|
|
3151
3273
|
}
|
|
@@ -3437,10 +3559,6 @@
|
|
|
3437
3559
|
}
|
|
3438
3560
|
|
|
3439
3561
|
@media (pointer: coarse) {
|
|
3440
|
-
.x1fj8ryy.x1fj8ryy {
|
|
3441
|
-
line-height: calc(var(--x6uufy4) - 2px);
|
|
3442
|
-
}
|
|
3443
|
-
|
|
3444
3562
|
.xwpstqy.xwpstqy {
|
|
3445
3563
|
line-height: var(--x6uufy4);
|
|
3446
3564
|
}
|
|
@@ -3475,7 +3593,7 @@
|
|
|
3475
3593
|
background-color: var(--x7wqmh8);
|
|
3476
3594
|
}
|
|
3477
3595
|
|
|
3478
|
-
.x1u1bgvs.x1u1bgvs:hover:not([data-disabled]) {
|
|
3596
|
+
.x1aoer5t.x1aoer5t:hover:not(:disabled), .x1u1bgvs.x1u1bgvs:hover:not([data-disabled]) {
|
|
3479
3597
|
background-color: var(--xe11pje);
|
|
3480
3598
|
}
|
|
3481
3599
|
|
|
@@ -3546,10 +3664,6 @@
|
|
|
3546
3664
|
border-color: var(--xe11pje);
|
|
3547
3665
|
}
|
|
3548
3666
|
|
|
3549
|
-
.x1i3c8xy::file-selector-button {
|
|
3550
|
-
border-color: var(--xe11pje);
|
|
3551
|
-
}
|
|
3552
|
-
|
|
3553
3667
|
@container workbench (width <= 860px) {
|
|
3554
3668
|
.xs311s2.xs311s2 {
|
|
3555
3669
|
border-left-width: 0;
|
|
@@ -3568,10 +3682,6 @@
|
|
|
3568
3682
|
border-radius: var(--x1asdyoo);
|
|
3569
3683
|
}
|
|
3570
3684
|
|
|
3571
|
-
.x1aypxx0::file-selector-button {
|
|
3572
|
-
border-style: solid;
|
|
3573
|
-
}
|
|
3574
|
-
|
|
3575
3685
|
.x1fo1fc9:before, .x86avzo:after {
|
|
3576
3686
|
border-style: solid;
|
|
3577
3687
|
}
|
|
@@ -3580,10 +3690,6 @@
|
|
|
3580
3690
|
border-width: 0;
|
|
3581
3691
|
}
|
|
3582
3692
|
|
|
3583
|
-
.xoo4nqz::file-selector-button {
|
|
3584
|
-
border-width: 0;
|
|
3585
|
-
}
|
|
3586
|
-
|
|
3587
3693
|
.x5hscyn:after, .xz8fyzm:before {
|
|
3588
3694
|
border-width: 1px;
|
|
3589
3695
|
}
|
|
@@ -3632,25 +3738,11 @@
|
|
|
3632
3738
|
}
|
|
3633
3739
|
}
|
|
3634
3740
|
|
|
3635
|
-
.x1svwz4r::file-selector-button {
|
|
3636
|
-
padding-block: 0;
|
|
3637
|
-
}
|
|
3638
|
-
|
|
3639
3741
|
@media (width <= 720px) {
|
|
3640
3742
|
.x14oio8y.x14oio8y {
|
|
3641
3743
|
padding-bottom: var(--xtf6uwx);
|
|
3642
3744
|
}
|
|
3643
|
-
}
|
|
3644
3745
|
|
|
3645
|
-
.xmrrhut::file-selector-button {
|
|
3646
|
-
padding-inline: var(--x1u2pzhu);
|
|
3647
|
-
}
|
|
3648
|
-
|
|
3649
|
-
.xrc8akj::file-selector-button {
|
|
3650
|
-
padding-inline: var(--xrzkwmd);
|
|
3651
|
-
}
|
|
3652
|
-
|
|
3653
|
-
@media (width <= 720px) {
|
|
3654
3746
|
.x1foqgtu.x1foqgtu {
|
|
3655
3747
|
padding-top: var(--xikiree);
|
|
3656
3748
|
}
|
|
@@ -3720,26 +3812,14 @@
|
|
|
3720
3812
|
background-color: var(--x24btp3);
|
|
3721
3813
|
}
|
|
3722
3814
|
|
|
3723
|
-
.x19tzrcj::file-selector-button {
|
|
3724
|
-
background-color: var(--x7wqmh8);
|
|
3725
|
-
}
|
|
3726
|
-
|
|
3727
3815
|
.x1mi36wk:before, .xtccgxd:after {
|
|
3728
3816
|
background-color: var(--xe11pje);
|
|
3729
3817
|
}
|
|
3730
3818
|
|
|
3731
|
-
.xt3cggl::file-selector-button {
|
|
3732
|
-
border-inline-end-width: 1px;
|
|
3733
|
-
}
|
|
3734
|
-
|
|
3735
3819
|
.x1p3pj1f:before {
|
|
3736
3820
|
border-inline-end-width: 2px;
|
|
3737
3821
|
}
|
|
3738
3822
|
|
|
3739
|
-
.x1wc3fni::file-selector-button {
|
|
3740
|
-
color: var(--x169lqhw);
|
|
3741
|
-
}
|
|
3742
|
-
|
|
3743
3823
|
.xz7023x::placeholder {
|
|
3744
3824
|
color: var(--x24btp3);
|
|
3745
3825
|
}
|
|
@@ -3748,26 +3828,10 @@
|
|
|
3748
3828
|
content: "";
|
|
3749
3829
|
}
|
|
3750
3830
|
|
|
3751
|
-
.xjmbuqf::file-selector-button {
|
|
3752
|
-
cursor: pointer;
|
|
3753
|
-
}
|
|
3754
|
-
|
|
3755
3831
|
.x1fgarty:before {
|
|
3756
3832
|
display: block;
|
|
3757
3833
|
}
|
|
3758
3834
|
|
|
3759
|
-
.xtqkasz::file-selector-button {
|
|
3760
|
-
font-family: var(--xax3y77);
|
|
3761
|
-
}
|
|
3762
|
-
|
|
3763
|
-
.xns5ekw::file-selector-button {
|
|
3764
|
-
font-size: var(--x105xqs);
|
|
3765
|
-
}
|
|
3766
|
-
|
|
3767
|
-
.x2hdjra::file-selector-button {
|
|
3768
|
-
font-weight: var(--x15yhtsr);
|
|
3769
|
-
}
|
|
3770
|
-
|
|
3771
3835
|
.x1unh1gc:after {
|
|
3772
3836
|
inset-inline-end: 0;
|
|
3773
3837
|
}
|
|
@@ -3780,10 +3844,6 @@
|
|
|
3780
3844
|
inset-inline-start: 7px;
|
|
3781
3845
|
}
|
|
3782
3846
|
|
|
3783
|
-
.x1k5xxp6::file-selector-button {
|
|
3784
|
-
margin-inline-end: var(--xxhyxt);
|
|
3785
|
-
}
|
|
3786
|
-
|
|
3787
3847
|
.x2q1x1w:after {
|
|
3788
3848
|
pointer-events: none;
|
|
3789
3849
|
}
|
|
@@ -3808,10 +3868,6 @@
|
|
|
3808
3868
|
background-color: var(--x1umbgym);
|
|
3809
3869
|
}
|
|
3810
3870
|
|
|
3811
|
-
.x9qipvy:active:not(:disabled)::file-selector-button {
|
|
3812
|
-
background-color: var(--xe11pje);
|
|
3813
|
-
}
|
|
3814
|
-
|
|
3815
3871
|
.xmwj7kj:active:not([data-disabled], [data-checked], [data-indeterminate]):before {
|
|
3816
3872
|
background-color: var(--xe11pje);
|
|
3817
3873
|
}
|
|
@@ -3851,14 +3907,6 @@
|
|
|
3851
3907
|
.x1wse844:last-child:before {
|
|
3852
3908
|
display: none;
|
|
3853
3909
|
}
|
|
3854
|
-
|
|
3855
|
-
.xysgshy:disabled::file-selector-button {
|
|
3856
|
-
color: var(--x24btp3);
|
|
3857
|
-
}
|
|
3858
|
-
|
|
3859
|
-
.x1hr67oa:disabled::file-selector-button {
|
|
3860
|
-
cursor: not-allowed;
|
|
3861
|
-
}
|
|
3862
3910
|
}
|
|
3863
3911
|
|
|
3864
3912
|
@layer priority10 {
|
|
@@ -3902,14 +3950,6 @@
|
|
|
3902
3950
|
left: 50%;
|
|
3903
3951
|
}
|
|
3904
3952
|
|
|
3905
|
-
.x1rcvzx2::file-selector-button {
|
|
3906
|
-
min-height: calc(var(--x14tmdi9) - 2px);
|
|
3907
|
-
}
|
|
3908
|
-
|
|
3909
|
-
.x11rbrfk::file-selector-button {
|
|
3910
|
-
min-height: calc(var(--xcmidyz) - 2px);
|
|
3911
|
-
}
|
|
3912
|
-
|
|
3913
3953
|
.x1m1drc7:after {
|
|
3914
3954
|
top: 0;
|
|
3915
3955
|
}
|
|
@@ -3968,12 +4008,6 @@
|
|
|
3968
4008
|
}
|
|
3969
4009
|
|
|
3970
4010
|
@layer priority11 {
|
|
3971
|
-
@media (pointer: coarse) {
|
|
3972
|
-
.xnws22w.xnws22w::file-selector-button {
|
|
3973
|
-
font-size: var(--x18ymnwu);
|
|
3974
|
-
}
|
|
3975
|
-
}
|
|
3976
|
-
|
|
3977
4011
|
@media (hover: hover) and (pointer: fine) {
|
|
3978
4012
|
.x1k8dcej.x1k8dcej:hover:not([data-disabled]):before, .xd47u31.xd47u31:hover:is([data-checked], [data-indeterminate]):not([data-disabled]):before {
|
|
3979
4013
|
background-color: var(--x1umbgym);
|
|
@@ -3982,18 +4016,6 @@
|
|
|
3982
4016
|
.xmc1g74.xmc1g74:hover:not(:active, [data-disabled], [data-checked], [data-indeterminate]):before {
|
|
3983
4017
|
background-color: var(--x7wqmh8);
|
|
3984
4018
|
}
|
|
3985
|
-
|
|
3986
|
-
.x1k4m713.x1k4m713:hover:not(:disabled)::file-selector-button {
|
|
3987
|
-
background-color: var(--xe11pje);
|
|
3988
|
-
}
|
|
3989
|
-
}
|
|
3990
|
-
}
|
|
3991
|
-
|
|
3992
|
-
@layer priority12 {
|
|
3993
|
-
@media (pointer: coarse) {
|
|
3994
|
-
.xhjjd6e.xhjjd6e::file-selector-button {
|
|
3995
|
-
min-height: calc(var(--x6uufy4) - 2px);
|
|
3996
|
-
}
|
|
3997
4019
|
}
|
|
3998
4020
|
}
|
|
3999
4021
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mechane-ai/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"description": "Elements by Mechane — React components for applications, AI interfaces, and analytical graphics",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -142,13 +142,10 @@
|
|
|
142
142
|
"./catalog.json": "./dist/catalog.json"
|
|
143
143
|
},
|
|
144
144
|
"dependencies": {
|
|
145
|
-
"@base-ui/react": "1.9.0",
|
|
146
145
|
"@pierre/diffs": "1.6.4",
|
|
147
146
|
"@pierre/highlights": "0.4.0",
|
|
148
|
-
"@shadcn/react": "0.3.1",
|
|
149
147
|
"@stylexjs/stylex": "0.19.1",
|
|
150
148
|
"@tanstack/react-table": "9.3.1",
|
|
151
|
-
"@tanstack/react-virtual": "3.14.26",
|
|
152
149
|
"@ui-sdk/core": "0.1.0-beta.13",
|
|
153
150
|
"@ui-sdk/react": "0.1.0-beta.13",
|
|
154
151
|
"@visx/hierarchy": "4.0.0",
|
|
@@ -16,6 +16,80 @@ is the guide for the pinned SDK. Use an existing UI SDK behavior where one fits.
|
|
|
16
16
|
and agent actions. Use the family's StyleX tokens and density choices and export the supported API from its public
|
|
17
17
|
entry.
|
|
18
18
|
|
|
19
|
+
## A UI SDK component first
|
|
20
|
+
|
|
21
|
+
Wrap the SDK component when one names the interaction, and add only the Elements styling and the supported props.
|
|
22
|
+
|
|
23
|
+
| The interaction | Start from |
|
|
24
|
+
| ----------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
25
|
+
| A row of controls with one Tab stop | `@ui-sdk/react/toolbar`, as `packages/collections/src/control-toolbar.tsx` |
|
|
26
|
+
| One choice from a short row | `@ui-sdk/react/segmented-control`, as `packages/forms/src/selection.tsx` |
|
|
27
|
+
| Choosing, dropping or pasting files | `@ui-sdk/react/file-input`, as `packages/forms/src/file-picker.tsx` |
|
|
28
|
+
| A typed date | `@ui-sdk/react/date-input`, as `packages/forms/src/dates/date-inputs.tsx` |
|
|
29
|
+
| A region that follows new content to its end | `@ui-sdk/react/scroll-area`, as `packages/ai/src/conversation.tsx` |
|
|
30
|
+
| Rows or cells with one Tab stop and a selection | `createGridFocus` and `createSelection`, as `packages/collections/src/table-results.tsx` |
|
|
31
|
+
| A long list that renders only what shows | `createVirtualizer`, as `packages/collections/src/use-table-window.ts` |
|
|
32
|
+
|
|
33
|
+
A control that can sit in a toolbar or outside one reads the toolbar around it, as `useToolbarButton` does. A part of
|
|
34
|
+
the SDK toolbar throws outside its root.
|
|
35
|
+
|
|
36
|
+
## A primitive of your own
|
|
37
|
+
|
|
38
|
+
When no UI SDK component fits, define one primitive beside the component and keep every rule of the interaction in it.
|
|
39
|
+
`packages/charts/src/chart.tsx` and `packages/core/src/route-link.tsx` are the references.
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { createChange, definePrimitive } from '@ui-sdk/core';
|
|
43
|
+
import type { ChangeDetails } from '@ui-sdk/core';
|
|
44
|
+
import { createParts } from '@ui-sdk/react/primitive';
|
|
45
|
+
|
|
46
|
+
type RatingOptions = {
|
|
47
|
+
readonly value?: number | undefined;
|
|
48
|
+
readonly defaultValue?: number | undefined;
|
|
49
|
+
readonly onValueChange?: ((value: number, details: ChangeDetails<'item-press'>) => void) | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const rating = definePrimitive({
|
|
53
|
+
name: 'rating',
|
|
54
|
+
options: { value: 'number', defaultValue: 'number', onValueChange: 'callback' },
|
|
55
|
+
controlled: ['value'],
|
|
56
|
+
state: (options: RatingOptions) => ({ value: options.value ?? options.defaultValue ?? 0 }),
|
|
57
|
+
sync: (options) => (options.value === undefined ? {} : { value: options.value }),
|
|
58
|
+
api: (context) => {
|
|
59
|
+
const change = createChange(context);
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
setValue: (value: number, event?: Event) =>
|
|
63
|
+
change('value', value, event === undefined ? { reason: 'item-press' } : { reason: 'item-press', event }),
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
slots: (slot) => ({
|
|
67
|
+
root: slot({ role: 'group' }),
|
|
68
|
+
star: slot<{ value: string }>({
|
|
69
|
+
props: { value: 'string' },
|
|
70
|
+
attrs: (state, { key }) => ({ 'data-filled': Number(key) <= state.value ? '' : undefined }),
|
|
71
|
+
press: ({ api, key }, event) => api.setValue(Number(key), event),
|
|
72
|
+
}),
|
|
73
|
+
}),
|
|
74
|
+
agent: { actions: ['setValue'] },
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const parts = createParts(rating, { root: 'div', star: 'button' });
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- Name the primitive for what a reader calls it. An agent finds it by that name and by its accessible label.
|
|
81
|
+
- State an application owns goes in `controlled`, and every change to it goes through `createChange` with a reason and
|
|
82
|
+
the event, leaving `event` out when there is none. Use `dispatch` for a request that is not state, such as asking the
|
|
83
|
+
application to select a record.
|
|
84
|
+
- Put the role on the slot with `role`, never in `attrs`. Attribute values are strings. Style states through the data
|
|
85
|
+
attributes the slot writes, such as `':is([data-filled])'` in StyleX.
|
|
86
|
+
- Always write the `agent` key. A component an agent only reads declares `agent: { actions: [] }`. One whose value is
|
|
87
|
+
always one of its items adds `closed: true`, and returns the items as data when they are not rendered.
|
|
88
|
+
- Give a composite one Tab stop and move a cursor inside it. A press on a part leaves focus on the composite.
|
|
89
|
+
- Merge incoming props with `mergeProps` from `@ui-sdk/react/primitive`, with the StyleX output first.
|
|
90
|
+
- Keep the `definePrimitive` result private to its module. Export typed parts or a hook with an explicit return type,
|
|
91
|
+
because the package build cannot name the primitive's inferred type.
|
|
92
|
+
|
|
19
93
|
Give interactive components a meaningful accessible name. Advertise actions only when the visible control can perform
|
|
20
94
|
them. Derive visible items and readings from the authorized data currently on screen. Route actions through the same
|
|
21
95
|
selection, navigation, or submit callback used by a person. The application supplies permissions, pending state,
|