@sincpro/web-ui 2.3.0 → 2.5.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 +71 -6
- package/dist/components/activity/Activity.d.ts +20 -1
- package/dist/components/activity/Activity.js +44 -7
- package/dist/components/activity/index.d.ts +1 -1
- package/dist/components/board/Board.d.ts +74 -2
- package/dist/components/board/Board.js +65 -2
- package/dist/components/board/index.d.ts +1 -1
- package/dist/components/board/index.js +1 -1
- package/dist/components/canvas/canvas.css +6 -1
- package/dist/components/form/Form.js +11 -0
- package/dist/components/form/FormIndex.d.ts +11 -0
- package/dist/components/form/FormIndex.js +96 -0
- package/dist/components/form/Sheet.js +5 -0
- package/dist/components/guide/Guide.d.ts +33 -0
- package/dist/components/guide/Guide.js +288 -0
- package/dist/components/guide/GuideSpot.d.ts +14 -0
- package/dist/components/guide/GuideSpot.js +13 -0
- package/dist/components/guide/index.d.ts +4 -0
- package/dist/components/guide/index.js +6 -0
- package/dist/components/guide/place.d.ts +44 -0
- package/dist/components/guide/place.js +69 -0
- package/dist/components/guide/target.d.ts +41 -0
- package/dist/components/guide/target.js +55 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/listing/ChartExplorer.js +10 -5
- package/dist/components/listing/Listing.js +7 -5
- package/dist/components/listing/Row.js +8 -7
- package/dist/components/navigation/NavigationTree.js +1 -1
- package/dist/components/record/DirtyActions.d.ts +19 -8
- package/dist/components/record/DirtyActions.js +89 -13
- package/dist/components/record/RecordHeader.js +17 -11
- package/dist/components/record/ThumbBar.js +2 -1
- package/dist/components/shell/SearchEntry.d.ts +29 -0
- package/dist/components/shell/SearchEntry.js +34 -0
- package/dist/components/shell/Sidebar.d.ts +5 -1
- package/dist/components/shell/Sidebar.js +4 -3
- package/dist/components/shell/TopBar.d.ts +5 -1
- package/dist/components/shell/TopBar.js +3 -2
- package/dist/components/shell/index.d.ts +1 -0
- package/dist/components/shell/index.js +3 -0
- package/dist/foundations/calendar.d.ts +12 -0
- package/dist/foundations/calendar.js +50 -0
- package/dist/foundations/chart.d.ts +10 -1
- package/dist/foundations/chart.js +17 -1
- package/dist/foundations/copy.d.ts +39 -2
- package/dist/foundations/copy.es.js +19 -0
- package/dist/foundations/copy.js +19 -0
- package/dist/foundations/form.d.ts +6 -0
- package/dist/foundations/form.js +7 -0
- package/dist/foundations/index.d.ts +3 -2
- package/dist/foundations/index.js +4 -2
- package/dist/foundations/pivot.d.ts +6 -0
- package/dist/foundations/pivot.js +1 -0
- package/dist/foundations/shortcut.d.ts +18 -0
- package/dist/foundations/shortcut.js +20 -0
- package/dist/primitives/chart/BarList.d.ts +30 -0
- package/dist/primitives/chart/BarList.js +27 -0
- package/dist/primitives/chart/Chart.d.ts +13 -0
- package/dist/primitives/chart/Chart.js +71 -19
- package/dist/primitives/chart/Sparkline.d.ts +30 -0
- package/dist/primitives/chart/Sparkline.js +53 -0
- package/dist/primitives/chart/index.d.ts +2 -0
- package/dist/primitives/chart/index.js +2 -0
- package/dist/primitives/field/Field.d.ts +6 -2
- package/dist/primitives/field/Field.js +35 -6
- package/dist/primitives/value/Metric.d.ts +12 -1
- package/dist/primitives/value/Metric.js +9 -4
- package/dist/tokens.css +92 -22
- package/package.json +1 -1
package/dist/tokens.css
CHANGED
|
@@ -342,6 +342,20 @@
|
|
|
342
342
|
--text-display: 1.75rem;
|
|
343
343
|
--text-display--line-height: 1.2;
|
|
344
344
|
|
|
345
|
+
/* Two steps for FIGURES, not for text. A number a board leads with is read before anything
|
|
346
|
+
else on the page, and at 19 px (`title`) it read as one more label — the board's headline
|
|
347
|
+
figures sat in chips the size of a tag. They are not titles either: a title is read, a
|
|
348
|
+
figure is compared, so they get their own steps, set tighter (a figure at display size
|
|
349
|
+
with text tracking looks loose: its digits drift apart).
|
|
350
|
+
figure — the value of a board's stat tile
|
|
351
|
+
hero — the ONE figure a board leads with (≥ 48 px), at most one per view */
|
|
352
|
+
--text-figure: 1.875rem;
|
|
353
|
+
--text-figure--line-height: 1.1;
|
|
354
|
+
--text-figure--letter-spacing: -0.02em;
|
|
355
|
+
--text-hero: 3rem;
|
|
356
|
+
--text-hero--line-height: 1;
|
|
357
|
+
--text-hero--letter-spacing: -0.03em;
|
|
358
|
+
|
|
345
359
|
/* ---------------------------------------------------------------- *
|
|
346
360
|
* THE RADIUS SCALE — «it is very square», and that was true.
|
|
347
361
|
*
|
|
@@ -533,6 +547,10 @@
|
|
|
533
547
|
to «Referencia del cli…», and a truncated label is a question. */
|
|
534
548
|
--container-label: 10rem;
|
|
535
549
|
|
|
550
|
+
/* The index of a «settings» form's sections (`FormIndex`), at the sheet's left: wide enough
|
|
551
|
+
for «Contacto y guía pública», narrow enough that the cards keep the page. */
|
|
552
|
+
--container-form-index: 12rem;
|
|
553
|
+
|
|
536
554
|
/* The tag column of a list row. It is what the column ASKS FOR, and it
|
|
537
555
|
belongs to the system: with a width of its own every tag starts where its
|
|
538
556
|
own ends and twelve rows give twelve indents. Asking for the same 8 rem,
|
|
@@ -541,30 +559,33 @@
|
|
|
541
559
|
It is asked for and not imposed —a base and not a fixed width— because a
|
|
542
560
|
row also lands in a 480 px drawer, and there a quarter of the box reserved
|
|
543
561
|
for the word «vencida» is a quarter taken away from the name. When there
|
|
544
|
-
is not enough for
|
|
545
|
-
|
|
546
|
-
tag, not the
|
|
562
|
+
is not enough for both, the column takes a line of its own under the
|
|
563
|
+
name and its meta (`--container-row-split`); it never shrinks below the
|
|
564
|
+
width of its own tags: from there down what shrinks is a tag, not the
|
|
565
|
+
column. */
|
|
547
566
|
--container-tags: 8rem;
|
|
548
567
|
|
|
549
|
-
/* What a name ASKS FOR in a list row before the
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
fit, the metadata drops to the line below and the name keeps the first one
|
|
557
|
-
whole — it is what identifies the record, and cut down to «ve…» it
|
|
558
|
-
identifies nothing.
|
|
559
|
-
|
|
560
|
-
That it is an ask and not a minimum is what makes the row work in a box
|
|
561
|
-
narrower than this: with the metadata already below, the name uses whatever
|
|
562
|
-
there is instead of overflowing. And it is what makes a checkbox, an icon
|
|
563
|
-
or a row of actions shift the moment it wraps without anyone declaring it
|
|
564
|
-
— they take their width from the same line, and the ask stops being met
|
|
565
|
-
earlier. */
|
|
568
|
+
/* What a name ASKS FOR in a list row before the tags give up its line.
|
|
569
|
+
|
|
570
|
+
It is an ask and not a minimum: in a box narrower than this the name uses
|
|
571
|
+
whatever there is instead of overflowing — it is what identifies the record,
|
|
572
|
+
and cut down to «ve…» it identifies nothing. With the tags' ask it makes
|
|
573
|
+
`--container-row-split`, the width under which the tags take a line of
|
|
574
|
+
their own. */
|
|
566
575
|
--container-name: 12rem;
|
|
567
576
|
|
|
577
|
+
/* The widest the TEXT of a list row gets — its name and the meta under it. On a 2000 px
|
|
578
|
+
workspace a row that stretched its text to the edge put the tags 1300 px away from the
|
|
579
|
+
name they describe; capped, the tags sit right after it, at the same place in every
|
|
580
|
+
row, and what is left of the line is empty, not a gap to jump across. */
|
|
581
|
+
--container-row-text: 40rem;
|
|
582
|
+
|
|
583
|
+
/* Under this width a list row's tags leave the name's line for one of their own: it is
|
|
584
|
+
the name's ask (`--container-name`), the tags' (`--container-tags`) and the gap
|
|
585
|
+
between, rounded up. Written as a figure because a container query cannot read a
|
|
586
|
+
variable. It is a query on the ROW'S box, so every row of a list decides the same. */
|
|
587
|
+
--container-row-split: 21rem;
|
|
588
|
+
|
|
568
589
|
/* The widest a chip of the search bar gets before it truncates. A filter written by hand
|
|
569
590
|
(«cliente contiene Importadora y Exportadora…») would otherwise take a whole line of the
|
|
570
591
|
bar and push the rest down; the full text stays in the chip's title. */
|
|
@@ -593,6 +614,11 @@
|
|
|
593
614
|
its figure and label, so the tiles below do not move down when the numbers arrive. */
|
|
594
615
|
--size-metric: 3.75rem;
|
|
595
616
|
|
|
617
|
+
/* A stat tile's sparkline: the shape of the last periods under the figure, not a chart —
|
|
618
|
+
no axis, no grid. Tall enough to see a turn, short enough that the figure stays the
|
|
619
|
+
subject. */
|
|
620
|
+
--size-sparkline: 2.5rem;
|
|
621
|
+
|
|
596
622
|
/* The width of the peek drawer. It is a system decision and not a component
|
|
597
623
|
one: 30rem is what fits of a record without leaving the list behind it
|
|
598
624
|
—which has to stay clickable— reduced to a useless strip. */
|
|
@@ -651,6 +677,10 @@
|
|
|
651
677
|
which is where a thumb taps to close it. */
|
|
652
678
|
--container-drawer: min(20rem, calc(100vw - 3rem));
|
|
653
679
|
|
|
680
|
+
/* A tour's card: a title and two or three lines read without moving the eye far, and on a
|
|
681
|
+
phone the screen minus a margin each side, so it never touches an edge. */
|
|
682
|
+
--container-guide: min(21rem, calc(100vw - 2rem));
|
|
683
|
+
|
|
654
684
|
/* The record sheet. The rail above it spans the whole window; the sheet does not: a form
|
|
655
685
|
stretched to 1,400 px puts the label and its value half a screen apart and turns every
|
|
656
686
|
input into a bar nobody fills. 72rem holds two columns of fields at a readable width —
|
|
@@ -776,11 +806,18 @@
|
|
|
776
806
|
--radius-ui-dialog: var(--ui-dialog-radius, var(--radius-panel));
|
|
777
807
|
--color-ui-dialog: var(--ui-dialog-bg, var(--color-surface));
|
|
778
808
|
|
|
779
|
-
/* A box of content: a block, a card of a list, a
|
|
809
|
+
/* A box of content: a block, a card of a list, a metric. */
|
|
780
810
|
--radius-ui-card: var(--ui-card-radius, var(--radius-box));
|
|
781
811
|
--color-ui-card: var(--ui-card-bg, var(--color-surface));
|
|
782
812
|
--color-ui-card-border: var(--ui-card-border, var(--color-line));
|
|
783
813
|
|
|
814
|
+
/* A board's tile and stat tile: a PANEL of a page, not a box inside one — the panel's
|
|
815
|
+
radius, like a window. Its colours fall back to the card's, so an application that
|
|
816
|
+
re-skinned its cards re-skins its boards too, and can still tell them apart. */
|
|
817
|
+
--radius-ui-tile: var(--ui-tile-radius, var(--radius-panel));
|
|
818
|
+
--color-ui-tile: var(--ui-tile-bg, var(--ui-card-bg, var(--color-surface)));
|
|
819
|
+
--color-ui-tile-border: var(--ui-tile-border, var(--ui-card-border, var(--color-line)));
|
|
820
|
+
|
|
784
821
|
/* A capsule: a tag, a chip of the search bar. */
|
|
785
822
|
--radius-ui-tag: var(--ui-tag-radius, var(--radius-pill));
|
|
786
823
|
|
|
@@ -800,6 +837,18 @@
|
|
|
800
837
|
|
|
801
838
|
/* A table's header band. */
|
|
802
839
|
--color-ui-table-head: var(--ui-table-head-bg, var(--color-ground));
|
|
840
|
+
|
|
841
|
+
/* A guided tour: its card, and the veil around what a step points at. */
|
|
842
|
+
--radius-ui-guide: var(--ui-guide-radius, var(--radius-panel));
|
|
843
|
+
--color-ui-guide: var(--ui-guide-bg, var(--color-surface));
|
|
844
|
+
--color-ui-guide-scrim: var(
|
|
845
|
+
--ui-guide-scrim,
|
|
846
|
+
color-mix(in srgb, var(--color-scrim) 55%, transparent)
|
|
847
|
+
);
|
|
848
|
+
/* The veil itself: the cut-out around the target throws a spread as wide as the window, in
|
|
849
|
+
its own colour (`text-ui-guide-scrim`) — the hole is exact and rounded, and it glides. The
|
|
850
|
+
same in both themes: the colour is the scrim's, which already is per theme. */
|
|
851
|
+
--shadow-guide-veil: 0 0 0 100vmax currentColor;
|
|
803
852
|
}
|
|
804
853
|
|
|
805
854
|
@keyframes reveal {
|
|
@@ -1118,7 +1167,9 @@
|
|
|
1118
1167
|
--sc-accent: var(--color-primary);
|
|
1119
1168
|
--sc-danger: var(--color-danger);
|
|
1120
1169
|
--sc-on-danger: var(--color-surface);
|
|
1121
|
-
|
|
1170
|
+
/* `--color-scrim` is opaque — a veil is a share of it. Unmixed, ⌘K's palette (`.sc-scrim`)
|
|
1171
|
+
opened over a solid page (#43); both veils dim the page the way `Dialog` does. */
|
|
1172
|
+
--sc-scrim: color-mix(in srgb, var(--color-scrim) 40%, transparent);
|
|
1122
1173
|
--sc-modal-scrim: color-mix(in srgb, var(--color-scrim) 40%, transparent);
|
|
1123
1174
|
--sc-shadow: var(--shadow-window);
|
|
1124
1175
|
--sc-radius: var(--radius-panel);
|
|
@@ -1519,6 +1570,25 @@
|
|
|
1519
1570
|
}
|
|
1520
1571
|
}
|
|
1521
1572
|
|
|
1573
|
+
/* A field of the «settings» form style (`FormStyleProvider`): what it asks — the label and its
|
|
1574
|
+
help written out — on the left, two parts in five; the control on the right, three. The
|
|
1575
|
+
label column grows with the row because it holds a sentence, not one word. Below
|
|
1576
|
+
`--container-handheld` of the section it sits in, the row is one column: the help over a
|
|
1577
|
+
control squeezed beside it was two half-read things. */
|
|
1578
|
+
@utility grid-setting {
|
|
1579
|
+
grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
|
|
1580
|
+
& > [data-under-control] {
|
|
1581
|
+
grid-column-start: 2;
|
|
1582
|
+
}
|
|
1583
|
+
/* 40rem IS `--container-handheld`: a container query cannot read a custom property. */
|
|
1584
|
+
@container (width < 40rem) {
|
|
1585
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1586
|
+
& > [data-under-control] {
|
|
1587
|
+
grid-column-start: auto;
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1522
1592
|
/* ==================================================================== *
|
|
1523
1593
|
* TOUCH — the same controls, sized for a finger.
|
|
1524
1594
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sincpro/web-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "An enterprise web design system for business software — ERPs, back offices, management tools — in React and Tailwind: tokens, primitives, components and the two views every management screen is made of.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|