@jirawatpyk/aura-react 4.9.0 → 4.11.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 +17 -2
- package/dist/aura.bundle.js +910 -463
- package/dist/cjs/index.cjs +910 -463
- package/dist/esm/Breadcrumb.js +3 -2
- package/dist/esm/Button.js +26 -7
- package/dist/esm/DataTable.js +176 -94
- package/dist/esm/DatePicker.js +88 -24
- package/dist/esm/Icon.js +12 -1
- package/dist/esm/IconButton.js +2 -2
- package/dist/esm/Pagination.js +3 -2
- package/dist/esm/SideNav.js +116 -10
- package/dist/esm/Stat.js +7 -3
- package/dist/esm/Switch.js +27 -15
- package/dist/esm/colorScheme.js +8 -1
- package/dist/esm/locale.js +109 -2
- package/dist/esm/theme.js +38 -2
- package/dist/index.d.ts +76 -34
- package/dist/styles.css +71 -5
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
.aura-btn:active { transform: scale(0.98); }
|
|
29
29
|
.aura-btn:disabled, a.aura-btn[aria-disabled='true'] { opacity: var(--aura-disabled-opacity); pointer-events: none; }
|
|
30
30
|
a.aura-btn { text-decoration: none; }
|
|
31
|
+
/* fullWidth: fills the row and wraps a long label (Thai and Swedish run ~30% longer) instead of overflowing. */
|
|
32
|
+
.aura-btn--full {
|
|
33
|
+
width: 100%; height: auto; min-height: var(--aura-button-height); white-space: normal; flex-shrink: 1;
|
|
34
|
+
padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere;
|
|
35
|
+
}
|
|
31
36
|
.aura-btn.is-loading { cursor: progress; }
|
|
32
37
|
.aura-btn.is-loading:active { transform: none; }
|
|
33
38
|
|
|
@@ -43,6 +48,11 @@ a.aura-btn { text-decoration: none; }
|
|
|
43
48
|
|
|
44
49
|
.aura-btn--secondary { border: 1px solid var(--aura-button-secondary-border); color: var(--aura-fg-primary); }
|
|
45
50
|
.aura-btn--secondary:hover { background: var(--aura-bg-surface-hover); }
|
|
51
|
+
/* Destructive: filled for the confirm step, outline beside other actions. Loading keeps the colour (busy, not unavailable). */
|
|
52
|
+
.aura-btn--danger { background: var(--aura-button-danger-bg); color: var(--aura-button-danger-fg); }
|
|
53
|
+
.aura-btn--danger:hover { background: var(--aura-button-danger-bg-hover); }
|
|
54
|
+
.aura-btn--danger-secondary { border: 1px solid var(--aura-border-danger); color: var(--aura-fg-danger); background: transparent; }
|
|
55
|
+
.aura-btn--danger-secondary:hover { background: var(--aura-alert-danger-bg); }
|
|
46
56
|
|
|
47
57
|
.aura-btn--creative {
|
|
48
58
|
border: 2px solid var(--aura-button-creative-border);
|
|
@@ -82,6 +92,28 @@ a.aura-btn { text-decoration: none; }
|
|
|
82
92
|
.aura-table__row--skeleton:hover { background: var(--aura-bg-surface); }
|
|
83
93
|
.aura-table__row--skeleton .aura-table__td { display: flex; align-items: center; }
|
|
84
94
|
.aura-table__row.is-selected { background: var(--aura-bg-selected); }
|
|
95
|
+
/* Right-aligned (numeric) columns */
|
|
96
|
+
.aura-table__th.is-end { padding-right: var(--aura-space-4); }
|
|
97
|
+
.aura-table__th.is-end .aura-table__th-inner { justify-content: flex-end; }
|
|
98
|
+
.aura-table__th.is-end .aura-table__sort { flex-direction: row-reverse; }
|
|
99
|
+
.aura-table__td.is-end { text-align: end; font-variant-numeric: tabular-nums; }
|
|
100
|
+
.aura-table__row--skeleton .aura-table__td.is-end { justify-content: flex-end; }
|
|
101
|
+
/* Row links (getRowHref): the first cell's text is the link; the whole row is the click target */
|
|
102
|
+
.aura-table__row-link { color: inherit; text-decoration: none; }
|
|
103
|
+
.aura-table__row-link:hover, .aura-table__row:hover .aura-table__row-link, .aura-table__card:hover .aura-table__row-link { text-decoration: underline; text-underline-offset: 2px; }
|
|
104
|
+
.aura-table__row-link:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: 2px; border-radius: var(--aura-radius-xs); }
|
|
105
|
+
/* Server mode refresh: the previous page stays, inactive, under a progress bar until the next one arrives */
|
|
106
|
+
.aura-table.is-refreshing .aura-table__row, .aura-table.is-refreshing .aura-table__card { opacity: 0.6; pointer-events: none; }
|
|
107
|
+
.aura-table__busy-bar {
|
|
108
|
+
position: absolute; z-index: 6; top: calc(var(--aura-space-12) - 2px); left: 0; right: 0; height: 2px; overflow: hidden;
|
|
109
|
+
border-radius: var(--aura-radius-full); pointer-events: none;
|
|
110
|
+
}
|
|
111
|
+
.aura-table--stacked .aura-table__busy-bar { top: 0; }
|
|
112
|
+
.aura-table__busy-bar::after {
|
|
113
|
+
content: ''; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--aura-fg-accent);
|
|
114
|
+
animation: aura-progress-slide var(--aura-duration-pulse) var(--aura-ease) infinite;
|
|
115
|
+
}
|
|
116
|
+
@media (prefers-reduced-motion: reduce) { .aura-table__busy-bar::after { animation-duration: calc(var(--aura-duration-pulse) * 3); } }
|
|
85
117
|
|
|
86
118
|
/* Cells: text cells stay block so long values end in an ellipsis */
|
|
87
119
|
.aura-table__td {
|
|
@@ -212,11 +244,18 @@ a.aura-btn { text-decoration: none; }
|
|
|
212
244
|
cursor: pointer; transition: background var(--aura-duration-fast) var(--aura-ease);
|
|
213
245
|
}
|
|
214
246
|
.aura-icon-btn:hover { background: var(--aura-bg-surface-hover); }
|
|
247
|
+
.aura-icon-btn--danger { color: var(--aura-fg-danger); }
|
|
248
|
+
.aura-icon-btn--danger:hover { background: var(--aura-alert-danger-bg); }
|
|
215
249
|
.aura-icon-btn:disabled { opacity: var(--aura-disabled-opacity); pointer-events: none; }
|
|
216
250
|
.aura-icon-btn:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: var(--aura-focus-ring-offset); }
|
|
251
|
+
/* Touch: same 32px look, a 44px hit area around it (WCAG 2.5.5). */
|
|
252
|
+
@media (pointer: coarse) {
|
|
253
|
+
.aura-icon-btn { position: relative; }
|
|
254
|
+
.aura-icon-btn::after { content: ''; position: absolute; top: 50%; left: 50%; width: max(100%, var(--aura-touch-target)); height: max(100%, var(--aura-touch-target)); transform: translate(-50%, -50%); }
|
|
255
|
+
}
|
|
217
256
|
|
|
218
257
|
/* Skeleton */
|
|
219
|
-
@keyframes aura-pulse { 50% { opacity: 0.
|
|
258
|
+
@keyframes aura-pulse { 50% { opacity: 0.6; } }
|
|
220
259
|
.aura-skel {
|
|
221
260
|
display: block; height: 10px; width: 60%; border-radius: var(--aura-radius-full);
|
|
222
261
|
background: var(--aura-bg-skeleton); animation: aura-pulse var(--aura-duration-pulse) var(--aura-ease) infinite;
|
|
@@ -275,6 +314,9 @@ a.aura-btn { text-decoration: none; }
|
|
|
275
314
|
|
|
276
315
|
/* Icon — Lucide, 24-grid, stroke in currentColor */
|
|
277
316
|
.aura-icon { flex: none; display: inline-block; vertical-align: middle; }
|
|
317
|
+
/* A consumer's own icon element (e.g. lucide-react) fills the same box, strokes in currentColor at width 2. */
|
|
318
|
+
.aura-icon--custom { display: inline-flex; align-items: center; justify-content: center; color: inherit; line-height: 0; }
|
|
319
|
+
.aura-icon--custom > svg { width: 100%; height: 100%; stroke-width: var(--aura-icon-stroke, 2); }
|
|
278
320
|
|
|
279
321
|
/* Loading spinner */
|
|
280
322
|
@keyframes aura-spin { to { transform: rotate(360deg); } }
|
|
@@ -329,9 +371,11 @@ a.aura-btn { text-decoration: none; }
|
|
|
329
371
|
min-height: var(--aura-input-height);
|
|
330
372
|
background: var(--aura-bg-input); color: var(--aura-fg-primary);
|
|
331
373
|
border: 1px solid var(--aura-border-control); border-radius: var(--aura-radius-md);
|
|
332
|
-
font-family: var(--font-sans); font-size:
|
|
374
|
+
font-family: var(--font-sans); font-size: var(--aura-input-font-size);
|
|
333
375
|
transition: border-color var(--aura-duration-fast) var(--aura-ease);
|
|
334
376
|
}
|
|
377
|
+
/* Phones: iOS Safari zooms into any focused control under 16px and does not zoom back. */
|
|
378
|
+
@media (max-width: 639.98px) { .aura-input { font-size: max(16px, var(--aura-input-font-size)); } }
|
|
335
379
|
.aura-input:hover { border-color: var(--aura-fg-secondary); }
|
|
336
380
|
.aura-input:focus-within { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: 1px; border-color: var(--aura-border-strong); }
|
|
337
381
|
.aura-input__control {
|
|
@@ -543,6 +587,14 @@ a.aura-btn { text-decoration: none; }
|
|
|
543
587
|
.aura-nav__item:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: -2px; }
|
|
544
588
|
.aura-nav__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
545
589
|
.aura-nav__count { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--aura-fg-secondary); }
|
|
590
|
+
.aura-nav__badge { display: inline-flex; align-items: center; flex: none; }
|
|
591
|
+
/* Groups: a disclosure button, its items indented one step per level. */
|
|
592
|
+
.aura-nav__item { padding-left: calc(var(--aura-space-3) + var(--aura-nav-depth, 0) * (var(--aura-icon-sm) + var(--aura-space-3))); }
|
|
593
|
+
.aura-nav__item--group.has-active { color: var(--aura-fg-primary); }
|
|
594
|
+
.aura-nav__chevron { color: var(--aura-fg-secondary); transition: transform var(--aura-duration-fast) var(--aura-ease); }
|
|
595
|
+
.aura-nav__chevron.is-open { transform: rotate(180deg); }
|
|
596
|
+
.aura-nav__sub { margin-top: 2px; }
|
|
597
|
+
.aura-nav__sub[hidden] { display: none; }
|
|
546
598
|
.aura-nav__footer { padding: var(--aura-space-3); border-top: 1px solid var(--aura-border-default); }
|
|
547
599
|
|
|
548
600
|
/* ---------- Breadcrumb ---------- */
|
|
@@ -775,7 +827,8 @@ button.aura-stat { font: inherit; width: 100%; cursor: pointer; }
|
|
|
775
827
|
.aura-stat__head { display: flex; align-items: center; justify-content: space-between; gap: var(--aura-space-2); }
|
|
776
828
|
.aura-stat__label { font-size: 13px; font-weight: 500; color: var(--aura-fg-secondary); }
|
|
777
829
|
.aura-stat__icon { display: inline-flex; color: var(--aura-fg-secondary); }
|
|
778
|
-
.aura-stat__value { display: flex; align-items: baseline; gap: var(--aura-space-1); font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em;
|
|
830
|
+
.aura-stat__value { display: flex; align-items: baseline; gap: var(--aura-space-1); font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; min-height: 34px; }
|
|
831
|
+
.aura-stat__value.is-numeric { font-variant-numeric: tabular-nums; }
|
|
779
832
|
.aura-stat__unit { font-size: 14px; font-weight: 500; color: var(--aura-fg-secondary); letter-spacing: 0; }
|
|
780
833
|
.aura-stat__skel { width: 55%; height: 24px; align-self: center; }
|
|
781
834
|
.aura-stat__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-1) var(--aura-space-2); font-size: 12px; }
|
|
@@ -818,7 +871,7 @@ button.aura-stat { font: inherit; width: 100%; cursor: pointer; }
|
|
|
818
871
|
.aura-upload__name { font-size: 13px; font-weight: 500; color: var(--aura-fg-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
819
872
|
.aura-upload__sub { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--aura-fg-secondary); }
|
|
820
873
|
.aura-upload__item.is-error .aura-upload__sub { color: var(--aura-fg-danger); }
|
|
821
|
-
.aura-upload__bar { display: block; height: 4px; border-radius: var(--aura-radius-full); background: var(--aura-
|
|
874
|
+
.aura-upload__bar { display: block; height: 4px; border-radius: var(--aura-radius-full); background: var(--aura-progress-track); box-shadow: inset 0 0 0 1px var(--aura-progress-track-edge); overflow: hidden; }
|
|
822
875
|
.aura-upload__bar > span { display: block; height: 100%; background: var(--aura-fg-accent); transition: width var(--aura-duration-base) var(--aura-ease); }
|
|
823
876
|
|
|
824
877
|
/* ---------- Checkbox with a visible label ---------- */
|
|
@@ -867,7 +920,7 @@ button.aura-stat { font: inherit; width: 100%; cursor: pointer; }
|
|
|
867
920
|
.aura-progress__head { display: flex; justify-content: space-between; gap: var(--aura-space-2); font-size: 13px; }
|
|
868
921
|
.aura-progress__label { font-weight: 500; color: var(--aura-fg-primary); }
|
|
869
922
|
.aura-progress__value { color: var(--aura-fg-secondary); font-variant-numeric: tabular-nums; }
|
|
870
|
-
.aura-progress__track { position: relative; height: 8px; border-radius: var(--aura-radius-full); background: var(--aura-
|
|
923
|
+
.aura-progress__track { position: relative; height: 8px; border-radius: var(--aura-radius-full); background: var(--aura-progress-track); box-shadow: inset 0 0 0 1px var(--aura-progress-track-edge); overflow: hidden; }
|
|
871
924
|
.aura-progress.is-sm .aura-progress__track { height: 4px; }
|
|
872
925
|
.aura-progress__bar { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--aura-fg-accent); transition: width var(--aura-duration-base) var(--aura-ease); }
|
|
873
926
|
.aura-progress--success .aura-progress__bar { background: var(--aura-fg-positive); }
|
|
@@ -1075,3 +1128,16 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1075
1128
|
.aura-tabs__list { gap: var(--aura-space-4); }
|
|
1076
1129
|
}
|
|
1077
1130
|
@keyframes aura-sheet-in { from { transform: translateY(24px); opacity: 0; } }
|
|
1131
|
+
|
|
1132
|
+
/* Touch (pointer: coarse): Radio, Checkbox and Switch rows are at least 44px tall (WCAG 2.5.5), padded above and
|
|
1133
|
+
* below a one-line 20px label; the whole row is the target (label rows natively, Switch rows by a click handler). */
|
|
1134
|
+
@media (pointer: coarse) {
|
|
1135
|
+
.aura-choice, .aura-check--labelled, .aura-switch-row {
|
|
1136
|
+
box-sizing: border-box; min-height: var(--aura-touch-target);
|
|
1137
|
+
padding-block: calc((var(--aura-touch-target) - 20px) / 2);
|
|
1138
|
+
}
|
|
1139
|
+
.aura-check--labelled .aura-check__input { top: calc((var(--aura-touch-target) - 20px) / 2 + 3px); }
|
|
1140
|
+
.aura-switch-row:not(.is-disabled) { cursor: pointer; }
|
|
1141
|
+
.aura-radio-group__list { gap: 0; }
|
|
1142
|
+
.aura-radio-group__list.is-horizontal { gap: 0 var(--aura-space-6); }
|
|
1143
|
+
}
|
package/package.json
CHANGED