@gtivr4/a1-design-system-react 0.3.0 → 0.4.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.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/src/color-scheme.css +10 -0
  3. package/src/components/choice-group/ChoiceGroup.jsx +2 -0
  4. package/src/components/choice-group/choice-group.css +11 -0
  5. package/src/components/data-table/DataTable.jsx +5 -5
  6. package/src/components/data-table/data-table-filters.css +2 -2
  7. package/src/components/data-table/data-table.css +2 -2
  8. package/src/components/field/SelectField.jsx +1 -1
  9. package/src/components/field/TextField.jsx +1 -1
  10. package/src/components/field/TextareaField.jsx +1 -1
  11. package/src/components/field/field.css +8 -8
  12. package/src/components/field-row/FieldRow.jsx +2 -2
  13. package/src/components/fieldset/Fieldset.jsx +1 -1
  14. package/src/components/grid/Grid.jsx +1 -0
  15. package/src/components/heading/Heading.jsx +1 -1
  16. package/src/components/heading/heading.css +2 -0
  17. package/src/components/notification/Notification.jsx +4 -4
  18. package/src/components/notification/notification.css +1 -1
  19. package/src/components/paragraph/Paragraph.jsx +1 -1
  20. package/src/components/paragraph/paragraph.css +2 -0
  21. package/src/components/section/Section.jsx +9 -9
  22. package/src/components/section/section.css +14 -2
  23. package/src/components/segmented-control/segmented.css +0 -1
  24. package/src/components/status-bar/StatusBar.jsx +92 -0
  25. package/src/components/status-bar/status-bar.css +146 -0
  26. package/src/components/token-select/token-select.css +1 -1
  27. package/src/components/top-header/top-header.css +4 -4
  28. package/src/index.js +1 -0
  29. package/src/themes.css +1 -0
  30. package/src/tokens.css +336 -326
@@ -0,0 +1,146 @@
1
+ /* ─── StatusBar ─────────────────────────────────────────────────────────────── */
2
+
3
+ .a1-status-bar {
4
+ --a1-sb-height: var(--component-status-bar-md-height);
5
+ --a1-sb-track-bg: var(--component-status-bar-track-background);
6
+ --a1-sb-fill-bg: var(--component-status-bar-fill-background);
7
+ --a1-sb-radius: var(--component-status-bar-border-radius);
8
+ --a1-sb-border-width: var(--component-status-bar-border-width);
9
+ --a1-sb-border-color: var(--component-status-bar-border-color);
10
+ --a1-sb-label-gap: var(--component-status-bar-label-gap);
11
+
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: var(--a1-sb-label-gap);
15
+ inline-size: 100%;
16
+ }
17
+
18
+ /* ─── Sizes ─────────────────────────────────────────────────────────────────── */
19
+
20
+ .a1-status-bar--sm { --a1-sb-height: var(--component-status-bar-sm-height); }
21
+ .a1-status-bar--lg { --a1-sb-height: var(--component-status-bar-lg-height); }
22
+
23
+ /* ─── Label positions ───────────────────────────────────────────────────────── */
24
+
25
+ /* below: column layout, DOM order is [bar-row, label] so no CSS change needed */
26
+
27
+ .a1-status-bar--before,
28
+ .a1-status-bar--after {
29
+ flex-direction: row;
30
+ align-items: center;
31
+ }
32
+
33
+ .a1-status-bar--before .a1-status-bar__bar-row,
34
+ .a1-status-bar--after .a1-status-bar__bar-row {
35
+ flex: 1;
36
+ min-inline-size: 0;
37
+ }
38
+
39
+ .a1-status-bar--before .a1-status-bar__label,
40
+ .a1-status-bar--after .a1-status-bar__label {
41
+ flex-shrink: 0;
42
+ }
43
+
44
+ /* ─── Bar row (track + optional pause button) ───────────────────────────────── */
45
+
46
+ .a1-status-bar__bar-row {
47
+ display: flex;
48
+ flex-direction: row;
49
+ align-items: center;
50
+ gap: var(--base-spacing-8);
51
+ }
52
+
53
+ .a1-status-bar__bar-row .a1-status-bar__track {
54
+ flex: 1;
55
+ min-inline-size: 0;
56
+ inline-size: auto;
57
+ }
58
+
59
+ /* ─── Label ─────────────────────────────────────────────────────────────────── */
60
+
61
+ .a1-status-bar__label {
62
+ display: block;
63
+ font-family: var(--component-paragraph-font-family);
64
+ font-size: var(--semantic-font-size-body-sm);
65
+ font-weight: var(--base-font-weight-regular);
66
+ color: var(--semantic-color-text-default);
67
+ line-height: var(--semantic-font-line-height-body);
68
+ }
69
+
70
+ /* ─── Track ─────────────────────────────────────────────────────────────────── */
71
+
72
+ .a1-status-bar__track {
73
+ position: relative;
74
+ display: flex; /* flex direction inherits writing mode — fills from inline-start in RTL */
75
+ block-size: var(--a1-sb-height);
76
+ inline-size: 100%;
77
+ background-color: var(--a1-sb-track-bg);
78
+ border-radius: var(--a1-sb-radius);
79
+ border: var(--a1-sb-border-width) solid var(--a1-sb-border-color);
80
+ overflow: hidden;
81
+ }
82
+
83
+ /* ─── Fill ──────────────────────────────────────────────────────────────────── */
84
+
85
+ /* Flex child — grows from inline-start, which in RTL means it grows from the right */
86
+ .a1-status-bar__fill {
87
+ flex-shrink: 0;
88
+ block-size: 100%;
89
+ inline-size: 0;
90
+ background-color: var(--a1-sb-fill-bg);
91
+ border-radius: inherit;
92
+ transition: inline-size var(--semantic-motion-duration-normal) var(--semantic-motion-easing-standard);
93
+ }
94
+
95
+ /* ─── Indeterminate (loading) ───────────────────────────────────────────────── */
96
+
97
+ /* Absolute positioning takes the fill out of flex flow for the sweep animation */
98
+ .a1-status-bar__fill--indeterminate {
99
+ position: absolute;
100
+ inset-block: 0;
101
+ left: 0;
102
+ inline-size: 35%;
103
+ animation: a1-sb-indeterminate var(--component-status-bar-indeterminate-duration) ease-in-out infinite;
104
+ }
105
+
106
+ /* RTL: anchor to the physical right and reverse the sweep direction */
107
+ [dir="rtl"] .a1-status-bar__fill--indeterminate {
108
+ left: auto;
109
+ right: 0;
110
+ animation-direction: reverse;
111
+ }
112
+
113
+ .a1-status-bar--paused .a1-status-bar__fill--indeterminate {
114
+ animation-play-state: paused;
115
+ }
116
+
117
+ @keyframes a1-sb-indeterminate {
118
+ 0% { transform: translateX(-115%); }
119
+ 100% { transform: translateX(300%); }
120
+ }
121
+
122
+ @media (prefers-reduced-motion: reduce) {
123
+ .a1-status-bar__fill--indeterminate {
124
+ animation: none;
125
+ inline-size: 100%;
126
+ opacity: 0.4;
127
+ }
128
+ }
129
+
130
+ /* ─── Pause / play button ────────────────────────────────────────────────────── */
131
+
132
+ .a1-status-bar__pause {
133
+ flex-shrink: 0;
134
+ animation: a1-sb-pause-appear var(--semantic-motion-duration-normal) var(--semantic-motion-easing-enter);
135
+ }
136
+
137
+ @keyframes a1-sb-pause-appear {
138
+ from { opacity: 0; transform: scale(0.75); }
139
+ to { opacity: 1; transform: scale(1); }
140
+ }
141
+
142
+ @media (prefers-reduced-motion: reduce) {
143
+ .a1-status-bar__pause {
144
+ animation: none;
145
+ }
146
+ }
@@ -105,6 +105,6 @@
105
105
 
106
106
  .a1-token-item__check {
107
107
  flex-shrink: 0;
108
- font-size: 16px;
108
+ font-size: var(--semantic-font-size-body-md);
109
109
  color: var(--semantic-color-text-accent);
110
110
  }
@@ -33,7 +33,7 @@
33
33
  border-radius: var(--base-radius-md);
34
34
  color: var(--semantic-color-text-default);
35
35
  cursor: pointer;
36
- font-size: 24px;
36
+ font-size: var(--component-button-medium-icon-size);
37
37
  flex-shrink: 0;
38
38
  transition: background var(--semantic-motion-duration-fast) var(--semantic-motion-easing-standard);
39
39
  }
@@ -157,12 +157,12 @@
157
157
  }
158
158
 
159
159
  .a1-top-header__nav-link-icon {
160
- font-size: 20px;
160
+ font-size: var(--component-side-nav-item-icon-size);
161
161
  flex-shrink: 0;
162
162
  }
163
163
 
164
164
  .a1-top-header__nav-chevron {
165
- font-size: 18px;
165
+ font-size: var(--component-menu-item-icon-size);
166
166
  flex-shrink: 0;
167
167
  margin-inline-start: calc(var(--base-spacing-4) * -1);
168
168
  transition: transform var(--semantic-motion-duration-fast) var(--semantic-motion-easing-standard);
@@ -279,7 +279,7 @@
279
279
  color: var(--semantic-color-status-error-foreground);
280
280
  border-radius: 8px;
281
281
  font-family: var(--component-paragraph-font-family);
282
- font-size: 10px;
282
+ font-size: var(--component-tab-count-font-size);
283
283
  font-weight: 700;
284
284
  line-height: 16px;
285
285
  text-align: center;
package/src/index.js CHANGED
@@ -5,6 +5,7 @@ export { Blockquote } from "./components/blockquote/Blockquote.jsx";
5
5
  export { Breadcrumb } from "./components/breadcrumb/Breadcrumb.jsx";
6
6
  export { Notification } from "./components/notification/Notification.jsx";
7
7
  export { Snackbar } from "./components/snackbar/Snackbar.jsx";
8
+ export { StatusBar } from "./components/status-bar/StatusBar.jsx";
8
9
  export { Bleed } from "./components/bleed/Bleed.jsx";
9
10
  export { IconButton } from "./components/icon-button/IconButton.jsx";
10
11
  export { Button } from "./components/button/Button.jsx";export { ButtonContainer } from "./components/button-container/ButtonContainer.jsx";
package/src/themes.css CHANGED
@@ -52,6 +52,7 @@ html.a1-theme-accessible {
52
52
  --component-side-nav-border-width: 2px;
53
53
  --component-tab-border-width: 2px;
54
54
  --component-top-header-border-width: 2px;
55
+ --component-status-bar-border-width: 2px;
55
56
  --component-button-font-family: var(--theme-a1-accessible-font-family-body);
56
57
  --component-paragraph-font-family: var(--theme-a1-accessible-font-family-body);
57
58
  --component-heading-font-family-heading: var(--theme-a1-accessible-font-family-heading);