@sincpro/web-ui 2.13.0 → 2.14.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 +15 -5
- package/dist/components/gallery/Gallery.d.ts +29 -0
- package/dist/components/gallery/Gallery.js +78 -0
- package/dist/components/gallery/Lightbox.d.ts +28 -0
- package/dist/components/gallery/Lightbox.js +59 -0
- package/dist/components/gallery/index.d.ts +2 -0
- package/dist/components/gallery/index.js +3 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/listing/ColumnsMenu.js +4 -2
- package/dist/components/listing/columns.d.ts +3 -0
- package/dist/components/listing/columns.js +4 -0
- package/dist/components/plans/PlanCard.d.ts +43 -0
- package/dist/components/plans/PlanCard.js +35 -0
- package/dist/components/plans/index.d.ts +1 -0
- package/dist/components/plans/index.js +2 -0
- package/dist/components/search/CriteriaChips.d.ts +14 -1
- package/dist/components/search/CriteriaChips.js +118 -10
- package/dist/components/search/JoinWord.js +8 -14
- package/dist/components/search/SearchBar.d.ts +10 -1
- package/dist/components/search/SearchBar.js +715 -176
- package/dist/components/search/WordChoice.d.ts +19 -0
- package/dist/components/search/WordChoice.js +8 -0
- package/dist/components/search/criteria.d.ts +27 -0
- package/dist/components/search/criteria.js +33 -0
- package/dist/components/search/index.d.ts +2 -2
- package/dist/components/search/index.js +2 -2
- package/dist/components/search/query.d.ts +24 -0
- package/dist/components/search/query.js +29 -0
- package/dist/components/shell/AppFrame.d.ts +4 -0
- package/dist/components/shell/AppFrame.js +4 -1
- package/dist/components/shell/Inbox.d.ts +53 -0
- package/dist/components/shell/Inbox.js +55 -0
- package/dist/components/shell/SearchEntry.js +2 -3
- package/dist/components/shell/TopBar.d.ts +4 -2
- package/dist/components/shell/TopBar.js +3 -3
- package/dist/components/shell/index.d.ts +1 -0
- package/dist/components/shell/index.js +3 -0
- package/dist/foundations/copy.es.js +60 -1
- package/dist/foundations/form.d.ts +7 -0
- package/dist/foundations/form.js +1 -0
- package/dist/foundations/uiCopy.d.ts +85 -2
- package/dist/foundations/uiCopy.js +60 -1
- package/dist/primitives/choice/RadioGroup.d.ts +1 -1
- package/dist/primitives/choice/RadioGroup.js +29 -0
- package/dist/primitives/choice/Rating.d.ts +32 -0
- package/dist/primitives/choice/Rating.js +75 -0
- package/dist/primitives/choice/Slider.d.ts +19 -0
- package/dist/primitives/choice/Slider.js +27 -2
- package/dist/primitives/choice/index.d.ts +2 -1
- package/dist/primitives/choice/index.js +4 -1
- package/dist/primitives/choice/options.d.ts +4 -0
- package/dist/primitives/field/Field.js +1 -0
- package/dist/primitives/hint/Kbd.d.ts +23 -0
- package/dist/primitives/hint/Kbd.js +23 -0
- package/dist/primitives/hint/index.d.ts +1 -0
- package/dist/primitives/hint/index.js +2 -0
- package/dist/primitives/menu/ContextMenu.d.ts +29 -0
- package/dist/primitives/menu/ContextMenu.js +74 -0
- package/dist/primitives/menu/Menu.d.ts +4 -1
- package/dist/primitives/menu/Menu.js +2 -2
- package/dist/primitives/menu/index.d.ts +1 -0
- package/dist/primitives/menu/index.js +2 -0
- package/dist/primitives/notice/Banner.d.ts +27 -0
- package/dist/primitives/notice/Banner.js +21 -0
- package/dist/primitives/notice/Callout.d.ts +4 -4
- package/dist/primitives/notice/Callout.js +8 -19
- package/dist/primitives/notice/Notice.d.ts +38 -10
- package/dist/primitives/notice/Notice.js +48 -9
- package/dist/primitives/notice/index.d.ts +3 -1
- package/dist/primitives/notice/index.js +3 -0
- package/dist/primitives/notice/tones.d.ts +8 -0
- package/dist/primitives/notice/tones.js +22 -0
- package/dist/primitives/value/Price.d.ts +31 -0
- package/dist/primitives/value/Price.js +32 -0
- package/dist/primitives/value/QrCode.d.ts +32 -0
- package/dist/primitives/value/QrCode.js +53 -0
- package/dist/primitives/value/index.d.ts +3 -0
- package/dist/primitives/value/index.js +6 -0
- package/dist/primitives/value/priceFormat.d.ts +12 -0
- package/dist/primitives/value/priceFormat.js +22 -0
- package/dist/tokens.css +39 -0
- package/dist/views/list/ListView.js +22 -3
- package/dist/views/list/types.d.ts +8 -0
- package/package.json +3 -2
package/dist/tokens.css
CHANGED
|
@@ -268,6 +268,11 @@
|
|
|
268
268
|
obvious `bg-ink/30` is a LIGHT veil in the dark theme (ink flips), which
|
|
269
269
|
would lighten what it is meant to dim. */
|
|
270
270
|
--color-scrim: #1a1714; /* 16.96:1 on the ground — a veil, never text */
|
|
271
|
+
/* A QR is black on white in BOTH themes — not ink on paper: a phone's scanner reads dark
|
|
272
|
+
modules on a light ground, and the dark theme's light ink on a dark surface is a QR half
|
|
273
|
+
the scanners refuse. The dark blocks repeat the SAME two values. */
|
|
274
|
+
--color-qr-ink: #000000; /* a QR's modules · white on top 21.00:1 */
|
|
275
|
+
--color-qr-paper: #ffffff; /* a QR's paper and its quiet zone */
|
|
271
276
|
|
|
272
277
|
/* ---------------------------------------------------------------- *
|
|
273
278
|
* THE TWO FAMILIES — and the rule that decides which one goes.
|
|
@@ -502,6 +507,15 @@
|
|
|
502
507
|
`ListingBar`. */
|
|
503
508
|
--container-search: 30rem;
|
|
504
509
|
|
|
510
|
+
/* How wide the bar's suggestions grow: a «campo : comparación valor» row and its hint, at a
|
|
511
|
+
reading width. Hung from the field's start and as wide as the field below this; a field
|
|
512
|
+
as wide as the page no longer stretches two short rows across it. */
|
|
513
|
+
--container-suggestions: 36rem;
|
|
514
|
+
|
|
515
|
+
/* How wide the notifications open from the bar (`Inbox`): a title and two lines of detail
|
|
516
|
+
at a reading width — and never wider than a phone's screen, where it would hang off it. */
|
|
517
|
+
--container-inbox: min(24rem, calc(100vw - 1rem));
|
|
518
|
+
|
|
505
519
|
/* How wide the cuts panel may grow: filters, grouping and favourites side by side — three
|
|
506
520
|
columns of a facet each — and never wider than the screen, so on a phone the columns
|
|
507
521
|
stack and it reads as a popover. It is the SCREEN that decides, not the field: a list's
|
|
@@ -612,6 +626,11 @@
|
|
|
612
626
|
--grid-tiles-sm: repeat(auto-fill, minmax(min(100%, var(--container-tile-sm)), 1fr));
|
|
613
627
|
--grid-tiles-md: repeat(auto-fill, minmax(min(100%, var(--container-tile-md)), 1fr));
|
|
614
628
|
--grid-tiles-lg: repeat(auto-fill, minmax(min(100%, var(--container-tile-lg)), 1fr));
|
|
629
|
+
/* A plan card is read whole — name, price, what it includes — so it never gets narrower than
|
|
630
|
+
a short list's width; the plans FILL the row (auto-fit), three side by side on a desk and
|
|
631
|
+
stacked on a phone. See `Plans`. */
|
|
632
|
+
--container-plan: 16rem;
|
|
633
|
+
--grid-plans: repeat(auto-fit, minmax(min(100%, var(--container-plan)), 1fr));
|
|
615
634
|
/* A kiosk's reduced height: the empty band above the flow, so every target sits below
|
|
616
635
|
~120 cm on a standing kiosk — within a seated person's reach (ADA 308). */
|
|
617
636
|
--size-kiosk-reach: 45dvh;
|
|
@@ -779,6 +798,11 @@
|
|
|
779
798
|
answers in 150ms showed a skeleton for one frame — a flash that says «something broke»
|
|
780
799
|
more than «loading». It waits 200ms invisible, then fades in. */
|
|
781
800
|
--animate-reveal-late: reveal var(--duration-quick) var(--ease-out) 200ms both;
|
|
801
|
+
|
|
802
|
+
/* A chip that lands in the search bar ARRIVES: it grows in from a little smaller while it
|
|
803
|
+
takes its opacity. Something set by Enter — the dropdown closes, the text clears — has to
|
|
804
|
+
be seen landing, or the eye looks for where the question went. Behind `motion-safe:`. */
|
|
805
|
+
--animate-chip-in: chip-in var(--duration-quick) var(--ease-out) both;
|
|
782
806
|
}
|
|
783
807
|
|
|
784
808
|
/* ==================================================================== *
|
|
@@ -891,6 +915,15 @@
|
|
|
891
915
|
--shadow-guide-veil: 0 0 0 100vmax currentColor;
|
|
892
916
|
}
|
|
893
917
|
|
|
918
|
+
/* From a third and not from nothing: the chip is THERE from its first frame — read, found by
|
|
919
|
+
whoever looks for it — and the motion only says it just arrived. */
|
|
920
|
+
@keyframes chip-in {
|
|
921
|
+
from {
|
|
922
|
+
opacity: 0.35;
|
|
923
|
+
scale: 0.92;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
|
|
894
927
|
@keyframes reveal {
|
|
895
928
|
from {
|
|
896
929
|
opacity: 0;
|
|
@@ -1042,6 +1075,8 @@
|
|
|
1042
1075
|
--color-chrome-warn: #e3b341; /* 9.75:1 */
|
|
1043
1076
|
--color-chrome-bad: #ff8a7a; /* 8.28:1 */
|
|
1044
1077
|
--color-scrim: #000000; /* 1.16:1 on the ground — a veil, never text */
|
|
1078
|
+
--color-qr-ink: #000000; /* a QR's modules · white on top 21.00:1 */
|
|
1079
|
+
--color-qr-paper: #ffffff; /* a QR's paper and its quiet zone */
|
|
1045
1080
|
--shadow-raised: 0 1px 2px -1px rgba(0, 0, 0, 0.5);
|
|
1046
1081
|
--shadow-float: 0 8px 24px -12px rgba(0, 0, 0, 0.75);
|
|
1047
1082
|
--shadow-window:
|
|
@@ -1113,6 +1148,8 @@
|
|
|
1113
1148
|
--color-chrome-warn: #e3b341; /* 9.75:1 */
|
|
1114
1149
|
--color-chrome-bad: #ff8a7a; /* 8.28:1 */
|
|
1115
1150
|
--color-scrim: #000000; /* 1.16:1 on the ground — a veil, never text */
|
|
1151
|
+
--color-qr-ink: #000000; /* a QR's modules · white on top 21.00:1 */
|
|
1152
|
+
--color-qr-paper: #ffffff; /* a QR's paper and its quiet zone */
|
|
1116
1153
|
--shadow-raised: 0 1px 2px -1px rgba(0, 0, 0, 0.5);
|
|
1117
1154
|
--shadow-float: 0 8px 24px -12px rgba(0, 0, 0, 0.75);
|
|
1118
1155
|
--shadow-window: 0 2px 6px -2px rgba(0, 0, 0, 0.55), 0 18px 40px -20px rgba(0, 0, 0, 0.85);
|
|
@@ -1180,6 +1217,8 @@
|
|
|
1180
1217
|
--color-chrome-warn: #e3b341; /* 8.80:1 */
|
|
1181
1218
|
--color-chrome-bad: #ff8a7a; /* 7.48:1 */
|
|
1182
1219
|
--color-scrim: #1a1714; /* 16.96:1 on the ground — a veil, never text */
|
|
1220
|
+
--color-qr-ink: #000000; /* a QR's modules · white on top 21.00:1 */
|
|
1221
|
+
--color-qr-paper: #ffffff; /* a QR's paper and its quiet zone */
|
|
1183
1222
|
--shadow-raised: 0 1px 2px -1px rgba(26, 23, 20, 0.1);
|
|
1184
1223
|
--shadow-float: 0 8px 24px -12px rgba(26, 23, 20, 0.35);
|
|
1185
1224
|
--shadow-window:
|
|
@@ -249,7 +249,15 @@ export function ListView({ items, keyOf, identity, crumbs, embedded = false, sur
|
|
|
249
249
|
the counters and the metrics (what the set is made of). */
|
|
250
250
|
const statParts = [filters, counterStats, metrics].filter((part) => part !== undefined && part !== null);
|
|
251
251
|
const stats = statParts.length === 0 ? undefined : statParts.length === 1 ? (statParts[0]) : (_jsx("div", { className: "flex min-w-0 flex-col gap-2", children: statParts.map((part, at) => (_jsx(Fragment, { children: part }, at))) }));
|
|
252
|
-
|
|
252
|
+
/* A trail of ONE crumb that says the title — the module's root list — is the title said twice
|
|
253
|
+
in the traditional bar: «Facturas» small on the search's row and «Facturas» as the heading
|
|
254
|
+
below (UX-AUDIT §1, finding 3). The modern bar keeps it: there the crumb IS the heading. */
|
|
255
|
+
const soleCrumbIsTitle = viewStyle !== "modern" && crumbs?.length === 1 && crumbs[0]?.label === identity?.title;
|
|
256
|
+
const bar = !barHasControls ? undefined : (_jsx(ListingBar, { surface: surface, look: viewStyle, ...(embedded ? { inline: true, count: items.length } : {}), ...(embedded ||
|
|
257
|
+
crumbs === undefined ||
|
|
258
|
+
crumbs.length === 0 ||
|
|
259
|
+
density === "compact" ||
|
|
260
|
+
soleCrumbIsTitle
|
|
253
261
|
? {}
|
|
254
262
|
: {
|
|
255
263
|
crumbs: (_jsx(Breadcrumb, { crumbs: crumbs, size: viewStyle === "modern" ? "lg" : "md", ...(surface === undefined ? {} : { surface }) })),
|
|
@@ -491,9 +499,20 @@ export function ListView({ items, keyOf, identity, crumbs, embedded = false, sur
|
|
|
491
499
|
? {}
|
|
492
500
|
: {
|
|
493
501
|
metrics: _jsx("div", { className: "px-3.5", children: stats }),
|
|
494
|
-
}), children: [loading ? _jsx(Skeleton, { label: copy.failed.loading
|
|
502
|
+
}), children: [loading ? (_jsx(Skeleton, { label: copy.failed.loading, shape: present === "tiles"
|
|
503
|
+
? "tiles"
|
|
504
|
+
: present === "board"
|
|
505
|
+
? "board"
|
|
506
|
+
: present === "table" || present === "sheet"
|
|
507
|
+
? "table"
|
|
508
|
+
: "rows" })) : null, isEmpty ? (filtered ? (_jsx(Empty, { ...empty?.whenFiltered, sentence: empty?.whenFiltered?.sentence ?? copy.list.emptyFiltered })) : (_jsx(Empty, { ...(empty === undefined
|
|
495
509
|
? {}
|
|
496
|
-
: {
|
|
510
|
+
: {
|
|
511
|
+
action: empty.action,
|
|
512
|
+
title: empty.title,
|
|
513
|
+
icon: empty.icon,
|
|
514
|
+
illustration: empty.illustration,
|
|
515
|
+
}), sentence: empty?.sentence ?? copy.list.empty }))) : null, _jsxs("div", { className: "relative min-w-0", children: [refreshing ? (
|
|
497
516
|
/* Over the top edge of the rows, not above them: the rows do not move. */
|
|
498
517
|
_jsx("div", { className: "pointer-events-none absolute inset-x-0 top-0 z-20", children: _jsx(ProgressBar, { label: copy.list.refreshing, width: "w-full" }) })) : null, loading || isEmpty ? null : body] })] }), error === null ? null : (_jsx("div", { className: "px-3 pt-(--spacing-block)", children: _jsx(Failed, { heading: copy.failed.list, sentence: error }) })), floating, children] }));
|
|
499
518
|
}
|
|
@@ -113,12 +113,20 @@ export type ListCrumb = {
|
|
|
113
113
|
export type ListEmpty = {
|
|
114
114
|
sentence: string;
|
|
115
115
|
action?: ReactNode;
|
|
116
|
+
/** The empty that IS the screen — a title, and an icon or the application's illustration
|
|
117
|
+
* (`Empty`'s). Without them it is the quiet sentence. */
|
|
118
|
+
title?: string;
|
|
119
|
+
icon?: LucideIcon;
|
|
120
|
+
illustration?: ReactNode;
|
|
116
121
|
/** Empty because of a filter is ANOTHER situation: content is not missing,
|
|
117
122
|
* there is an extra narrowing. Telling «importá tus facturas» to someone who has 180
|
|
118
123
|
* and mistyped a name is answering a different question. */
|
|
119
124
|
whenFiltered?: {
|
|
120
125
|
sentence: string;
|
|
121
126
|
action?: ReactNode;
|
|
127
|
+
title?: string;
|
|
128
|
+
icon?: LucideIcon;
|
|
129
|
+
illustration?: ReactNode;
|
|
122
130
|
};
|
|
123
131
|
};
|
|
124
132
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sincpro/web-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.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",
|
|
@@ -75,7 +75,8 @@
|
|
|
75
75
|
"streamdown": "^2.7.1",
|
|
76
76
|
"tailwind-variants": "^4.0.0",
|
|
77
77
|
"tailwindcss-react-aria-components": "^2.2.0",
|
|
78
|
-
"temporal-polyfill": "^1.0.6"
|
|
78
|
+
"temporal-polyfill": "^1.0.6",
|
|
79
|
+
"uqr": "^0.1.3"
|
|
79
80
|
},
|
|
80
81
|
"devDependencies": {
|
|
81
82
|
"@eslint/js": "^10.0.1",
|