@tensor_1/tokens 2.30.0 → 2.31.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/build/css/components.css +1 -1
- package/build/css/styles.css +1 -1
- package/package.json +1 -1
- package/styles/components/attachment.css +16 -0
- package/styles/components/file-upload.css +20 -0
- package/styles/components/lightbox.css +39 -0
- package/styles/components/search-suggest.css +18 -0
- package/styles/components/table-toolbar.css +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tensor_1/tokens",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.31.0",
|
|
4
4
|
"description": "UIx v2 design tokens — the --uix-* contract for house products (Tensor, POSx, SHOPx). One DTCG source -> CSS variables, Tailwind theme, and typed TS constants.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -8,3 +8,19 @@
|
|
|
8
8
|
.uix-attachment__size { font-size: var(--uix-text-meta); color: var(--uix-text-muted); }
|
|
9
9
|
.uix-attachment__actions { margin-left: auto; }
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
/* React `Attachment` rows (HAR-985): name link, meta, state slot, remove, statuses */
|
|
13
|
+
@layer uix.components {
|
|
14
|
+
.uix-attachments--list { margin: 0; padding: 0; list-style: none; }
|
|
15
|
+
.uix-attachment__body { flex: 1; display: grid; gap: var(--uix-space-1); min-width: 0; }
|
|
16
|
+
.uix-attachment__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--uix-space-2); min-width: 0; }
|
|
17
|
+
.uix-attachment__line .uix-attachment__name { min-width: 0; overflow-wrap: anywhere; }
|
|
18
|
+
.uix-attachment__state { display: inline-flex; align-items: center; }
|
|
19
|
+
.uix-attachment__meta { display: flex; flex-wrap: wrap; gap: var(--uix-space-2); font-size: var(--uix-text-meta); color: var(--uix-text-muted); }
|
|
20
|
+
.uix-attachment__meta:empty { display: none; }
|
|
21
|
+
.uix-attachment__error { font-size: var(--uix-text-meta); color: var(--uix-danger-text); }
|
|
22
|
+
.uix-attachment__icon img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--uix-radius-sm); }
|
|
23
|
+
.uix-attachment__actions { display: flex; align-items: center; gap: var(--uix-space-1); flex: none; }
|
|
24
|
+
.uix-attachment[data-status="loading"] .uix-attachment__name, .uix-attachment[data-status="forbidden"] .uix-attachment__name { color: var(--uix-text-muted); }
|
|
25
|
+
.uix-attachment[data-status="error"] { border-color: var(--uix-danger-border); }
|
|
26
|
+
}
|
|
@@ -12,3 +12,23 @@
|
|
|
12
12
|
.uix-filelist__item { display: flex; align-items: center; gap: var(--uix-space-3); padding: var(--uix-space-2) var(--uix-space-3); border: 1px solid var(--uix-border); border-radius: var(--uix-radius-md); background: var(--uix-surface); font-size: var(--uix-text-meta); color: var(--uix-text); }
|
|
13
13
|
.uix-filelist__size { margin-left: auto; color: var(--uix-text-muted); }
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
/* React `FileUpload` (HAR-984): validated picking, per-file progress, retry, alt text */
|
|
17
|
+
@layer uix.components {
|
|
18
|
+
/* :not(label) — BrandProfiles has long put this class on its upload label as a hook. */
|
|
19
|
+
.uix-file-upload:not(label) { display: grid; gap: var(--uix-space-3); min-width: 0; }
|
|
20
|
+
.uix-file-upload[data-disabled] .uix-dropzone { opacity: .6; cursor: not-allowed; }
|
|
21
|
+
.uix-file-upload__hint { font-size: var(--uix-text-meta); }
|
|
22
|
+
.uix-file-upload__errors { margin: 0; padding-left: 1.1em; color: var(--uix-danger-text); font-size: var(--uix-text-meta); }
|
|
23
|
+
.uix-file-upload__list { margin: 0; padding: 0; list-style: none; }
|
|
24
|
+
.uix-file-upload__item { align-items: flex-start; }
|
|
25
|
+
.uix-file-upload__item[data-status="error"] { border-color: var(--uix-danger-border); }
|
|
26
|
+
.uix-file-upload__thumb { width: 40px; height: 40px; flex: none; object-fit: cover; border-radius: var(--uix-radius-sm); }
|
|
27
|
+
.uix-file-upload__body { flex: 1; display: grid; gap: var(--uix-space-1); min-width: 0; }
|
|
28
|
+
.uix-file-upload__name { min-width: 0; overflow-wrap: break-word; font-weight: 500; }
|
|
29
|
+
.uix-file-upload__meta { display: flex; flex-wrap: wrap; gap: var(--uix-space-1) var(--uix-space-3); color: var(--uix-text-muted); }
|
|
30
|
+
.uix-file-upload__meta > * { white-space: nowrap; }
|
|
31
|
+
.uix-file-upload__item[data-status="done"] .uix-file-upload__status { color: var(--uix-success); }
|
|
32
|
+
.uix-file-upload__error { color: var(--uix-danger-text); }
|
|
33
|
+
.uix-file-upload__actions { display: flex; align-items: center; gap: var(--uix-space-1); flex: none; }
|
|
34
|
+
}
|
|
@@ -11,3 +11,42 @@
|
|
|
11
11
|
.uix-lightbox img { display: block; width: min(720px, 92vw); height: auto; max-height: 92vh; border-radius: var(--uix-radius-md); }
|
|
12
12
|
.uix-lightbox::backdrop { background: var(--uix-scrim-strong); }
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
/* React `Lightbox` gallery (HAR-1367): full viewport, media fitted, controls on surface chips so they
|
|
16
|
+
read on the scrim in both themes. */
|
|
17
|
+
@layer uix.components {
|
|
18
|
+
.uix-lightbox--gallery { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; padding: var(--uix-space-4); box-shadow: none; overflow: hidden; }
|
|
19
|
+
.uix-lightbox--gallery[open] { display: grid; place-items: center; }
|
|
20
|
+
.uix-lightbox__figure { display: grid; justify-items: center; gap: var(--uix-space-3); max-width: 100%; margin: 0; }
|
|
21
|
+
.uix-lightbox__stage { max-height: calc(100dvh - 8rem); overflow: hidden; border-radius: var(--uix-radius-md); touch-action: pan-y; }
|
|
22
|
+
.uix-lightbox__stage[data-zoomed] { overflow: auto; touch-action: auto; }
|
|
23
|
+
/* A definite width (a shrink-to-fit grid makes max-width:100% cyclic and the image collapses to 0);
|
|
24
|
+
object-fit keeps the aspect ratio inside it. Room is left for the side buttons. */
|
|
25
|
+
.uix-lightbox--gallery .uix-lightbox__media { display: block; width: min(72rem, calc(100vw - 2 * var(--uix-space-4) - 7rem)); height: auto; max-height: calc(100dvh - 8rem); object-fit: contain; border-radius: var(--uix-radius-md); }
|
|
26
|
+
.uix-lightbox--gallery .uix-lightbox__stage[data-zoomed] { max-width: calc(100vw - 2 * var(--uix-space-4)); }
|
|
27
|
+
.uix-lightbox--gallery .uix-lightbox__stage[data-zoomed] .uix-lightbox__media { width: auto; max-width: none; max-height: none; }
|
|
28
|
+
.uix-lightbox__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--uix-space-3); max-width: min(48rem, 100%); padding: var(--uix-space-2) var(--uix-space-4); border-radius: var(--uix-radius-pill); background: var(--uix-surface); color: var(--uix-text); font-size: var(--uix-text-meta); }
|
|
29
|
+
.uix-lightbox__counter { font-variant-numeric: tabular-nums; color: var(--uix-text-muted); }
|
|
30
|
+
.uix-lightbox__caption { min-width: 0; overflow-wrap: anywhere; }
|
|
31
|
+
.uix-lightbox__tool { padding: var(--uix-space-1) var(--uix-space-2); border: 0; border-radius: var(--uix-radius-xs); background: transparent; color: var(--uix-link); font: inherit; font-weight: 600; cursor: pointer; }
|
|
32
|
+
.uix-lightbox__tool:hover { background: var(--uix-bg-hover); }
|
|
33
|
+
.uix-lightbox__nav, .uix-lightbox__close {
|
|
34
|
+
position: absolute; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--uix-border); border-radius: var(--uix-radius-pill);
|
|
35
|
+
background: var(--uix-surface); color: var(--uix-text); box-shadow: var(--uix-shadow-popover); cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
.uix-lightbox__nav svg { width: var(--uix-icon-md); height: var(--uix-icon-md); }
|
|
38
|
+
.uix-lightbox__close svg { width: var(--uix-icon-sm); height: var(--uix-icon-sm); }
|
|
39
|
+
.uix-lightbox__nav { top: 50%; transform: translateY(-50%); }
|
|
40
|
+
.uix-lightbox__nav--prev { left: var(--uix-space-3); }
|
|
41
|
+
.uix-lightbox__nav--next { right: var(--uix-space-3); }
|
|
42
|
+
.uix-lightbox__close { top: var(--uix-space-3); right: var(--uix-space-3); }
|
|
43
|
+
.uix-lightbox__nav:disabled { opacity: .4; cursor: default; }
|
|
44
|
+
.uix-lightbox__nav:not(:disabled):hover, .uix-lightbox__close:hover { background: var(--uix-bg-hover); }
|
|
45
|
+
.uix-lightbox__nav:focus-visible, .uix-lightbox__close:focus-visible, .uix-lightbox__tool:focus-visible { outline: 2px solid var(--uix-ring); outline-offset: 2px; }
|
|
46
|
+
/* phones: the image takes the width; previous/next sit at the bottom corners, clear of it */
|
|
47
|
+
@media (max-width: 40rem) {
|
|
48
|
+
.uix-lightbox--gallery .uix-lightbox__media { width: calc(100vw - 2 * var(--uix-space-4)); max-height: calc(100dvh - 10rem); }
|
|
49
|
+
.uix-lightbox__nav { top: auto; bottom: var(--uix-space-3); transform: none; }
|
|
50
|
+
.uix-lightbox__figure { margin-bottom: 3.5rem; }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -114,3 +114,21 @@
|
|
|
114
114
|
.uix-search-suggest__match { text-decoration: underline; }
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
+
|
|
118
|
+
/* EntityPicker (React, HAR-1366): a form field holding one record found by SearchSuggest */
|
|
119
|
+
@layer uix.components {
|
|
120
|
+
.uix-entity-picker { position: relative; display: flex; align-items: stretch; min-width: 0; }
|
|
121
|
+
.uix-entity-picker--editing > .uix-search-suggest { flex: 1; min-width: 0; }
|
|
122
|
+
.uix-entity-picker__value { flex: 1; display: flex; align-items: center; gap: var(--uix-space-2); min-width: 0; padding-right: var(--uix-space-8); text-align: start; cursor: pointer; }
|
|
123
|
+
.uix-entity-picker__icon { display: inline-flex; flex: none; color: var(--uix-text-muted); }
|
|
124
|
+
.uix-entity-picker__text { display: flex; align-items: baseline; gap: var(--uix-space-2); min-width: 0; overflow: hidden; }
|
|
125
|
+
.uix-entity-picker__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--uix-text); }
|
|
126
|
+
.uix-entity-picker__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--uix-text-meta); color: var(--uix-text-muted); }
|
|
127
|
+
.uix-entity-picker__clear {
|
|
128
|
+
position: absolute; top: 50%; right: var(--uix-space-1); width: 24px; height: 24px; transform: translateY(-50%);
|
|
129
|
+
display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--uix-radius-sm); background: transparent; color: var(--uix-text-muted); cursor: pointer;
|
|
130
|
+
}
|
|
131
|
+
.uix-entity-picker__clear svg { width: var(--uix-icon-sm); height: var(--uix-icon-sm); }
|
|
132
|
+
.uix-entity-picker__clear:hover { background: var(--uix-bg-hover); color: var(--uix-text); }
|
|
133
|
+
.uix-entity-picker__clear:focus-visible { outline: 2px solid var(--uix-ring); outline-offset: 1px; }
|
|
134
|
+
}
|
|
@@ -51,3 +51,19 @@
|
|
|
51
51
|
.uix-chip__remove:focus-visible { outline: 2px solid var(--uix-ring); outline-offset: 1px; }
|
|
52
52
|
.uix-chip-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--uix-space-2); }
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
/* FilterEditor (React, HAR-1365): typed filter content inside .uix-filter-popover */
|
|
56
|
+
@layer uix.components {
|
|
57
|
+
.uix-filter-editor { width: min(22rem, calc(100vw - 4rem)); min-width: 0; gap: var(--uix-space-3); }
|
|
58
|
+
.uix-filter-editor[data-kind="number"] .uix-filter-editor__row > .uix-select { flex-basis: 100%; }
|
|
59
|
+
.uix-filter-editor__label { font-weight: 600; color: var(--uix-text); }
|
|
60
|
+
.uix-filter-editor__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--uix-space-2); }
|
|
61
|
+
.uix-filter-editor__row > .uix-input, .uix-filter-editor__row > .uix-select { flex: 1 1 8rem; min-width: 0; }
|
|
62
|
+
.uix-filter-editor__and, .uix-filter-editor__unit { color: var(--uix-text-muted); font-size: var(--uix-text-meta); }
|
|
63
|
+
.uix-filter-editor__date { display: grid; flex: 1 1 8rem; gap: var(--uix-space-1); min-width: 0; font-size: var(--uix-text-meta); color: var(--uix-text-muted); }
|
|
64
|
+
.uix-filter-editor__bulk { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--uix-space-3); }
|
|
65
|
+
.uix-filter-editor__count { margin-right: auto; font-size: var(--uix-text-meta); color: var(--uix-text-muted); }
|
|
66
|
+
.uix-filter-editor__list { display: grid; gap: var(--uix-space-2); max-height: 16rem; overflow-y: auto; padding: var(--uix-space-1); }
|
|
67
|
+
.uix-filter-editor__note { margin: 0; font-size: var(--uix-text-meta); color: var(--uix-text-muted); }
|
|
68
|
+
.uix-filter-editor__choices { display: grid; gap: var(--uix-space-2); }
|
|
69
|
+
}
|