@robert-stackflow/oneui 0.6.8 → 0.6.17

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 (113) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +255 -188
  3. package/components/AccountItem.module.css +103 -103
  4. package/components/Alert.d.ts +2 -9
  5. package/components/Alert.js +2 -40
  6. package/components/AppShell.d.ts +7 -7
  7. package/components/AppShell.js +37 -33
  8. package/components/AppShell.module.css +223 -271
  9. package/components/AppearanceSettings.js +25 -32
  10. package/components/Badge.module.css +30 -30
  11. package/components/Banner.d.ts +17 -0
  12. package/components/Banner.js +99 -0
  13. package/components/Banner.module.css +143 -0
  14. package/components/BarChart.module.css +35 -34
  15. package/components/Breadcrumb.module.css +97 -97
  16. package/components/Button.module.css +120 -120
  17. package/components/Cascader.js +1 -0
  18. package/components/CharacterPicker.js +2 -0
  19. package/components/Checkbox.module.css +95 -95
  20. package/components/Combobox.js +1 -0
  21. package/components/Combobox.module.css +6 -1
  22. package/components/CommandPalette.js +2 -2
  23. package/components/ContributionCalendar.module.css +121 -121
  24. package/components/Control.module.css +86 -86
  25. package/components/DataTable.d.ts +3 -2
  26. package/components/DataTable.js +92 -66
  27. package/components/DataTable.module.css +3 -31
  28. package/components/DatePicker.js +1 -0
  29. package/components/DateRangePicker.js +1 -0
  30. package/components/Dialog.d.ts +3 -1
  31. package/components/Dialog.js +11 -4
  32. package/components/Dialog.module.css +139 -97
  33. package/components/DialogVariants.d.ts +2 -1
  34. package/components/DialogVariants.js +35 -7
  35. package/components/HierarchyPicker.module.css +185 -181
  36. package/components/IconPicker.js +2 -0
  37. package/components/Indicator.module.css +83 -83
  38. package/components/Layout.module.css +82 -82
  39. package/components/Markdown.d.ts +13 -0
  40. package/components/Markdown.js +164 -0
  41. package/components/Markdown.module.css +227 -0
  42. package/components/MenuItem.module.css +172 -172
  43. package/components/MultiSelect.js +1 -0
  44. package/components/MultiSelect.module.css +2 -0
  45. package/components/NavBar.d.ts +20 -0
  46. package/components/NavBar.js +197 -0
  47. package/components/NavBar.module.css +130 -0
  48. package/components/NavigationSurface.module.css +27 -0
  49. package/components/Picker.module.css +7 -0
  50. package/components/Popover.d.ts +6 -1
  51. package/components/Popover.js +39 -13
  52. package/components/Popover.module.css +8 -0
  53. package/components/Progress.module.css +33 -33
  54. package/components/RadioGroup.module.css +87 -87
  55. package/components/RangeSlider.module.css +141 -141
  56. package/components/ResizablePanel.module.css +101 -101
  57. package/components/ResourceCard.module.css +98 -98
  58. package/components/SelectSettingRow.d.ts +7 -0
  59. package/components/SelectSettingRow.js +58 -0
  60. package/components/SettingRow.d.ts +9 -3
  61. package/components/SettingRow.js +32 -8
  62. package/components/SettingRow.module.css +17 -0
  63. package/components/SettingsLayout.d.ts +15 -3
  64. package/components/SettingsLayout.js +46 -29
  65. package/components/SideBar.d.ts +9 -0
  66. package/components/SideBar.js +30 -0
  67. package/components/SidebarNavigation.d.ts +24 -3
  68. package/components/SidebarNavigation.js +274 -47
  69. package/components/SidebarNavigation.module.css +266 -42
  70. package/components/Slider.module.css +19 -19
  71. package/components/Steps.module.css +176 -176
  72. package/components/Switch.d.ts +3 -1
  73. package/components/Switch.js +5 -1
  74. package/components/Switch.module.css +59 -59
  75. package/components/SwitchSettingRow.d.ts +7 -0
  76. package/components/SwitchSettingRow.js +45 -0
  77. package/components/Table.d.ts +8 -1
  78. package/components/Table.js +34 -17
  79. package/components/Table.module.css +87 -48
  80. package/components/TableMarkup.d.ts +2 -1
  81. package/components/TableMarkup.js +18 -1
  82. package/components/TableOfContents.d.ts +22 -0
  83. package/components/TableOfContents.js +462 -0
  84. package/components/TableOfContents.module.css +252 -0
  85. package/components/TextAreaSettingRow.d.ts +9 -0
  86. package/components/TextAreaSettingRow.js +47 -0
  87. package/components/TextSettingRow.d.ts +9 -0
  88. package/components/TextSettingRow.js +45 -0
  89. package/components/ThemePicker.module.css +178 -178
  90. package/components/ThemeProvider.js +2 -0
  91. package/components/TimeColumns.module.css +47 -47
  92. package/components/Timeline.module.css +202 -202
  93. package/components/Toast.d.ts +8 -1
  94. package/components/Toast.js +49 -17
  95. package/components/Toast.module.css +25 -0
  96. package/components/ToastProvider.d.ts +4 -1
  97. package/components/ToastProvider.js +67 -12
  98. package/components/TreeSelect.js +1 -0
  99. package/components/TreeTable.d.ts +3 -3
  100. package/components/TreeTable.js +12 -2
  101. package/components/TreeTable.module.css +57 -53
  102. package/components/createToaster.d.ts +2 -1
  103. package/components/createToaster.js +28 -14
  104. package/components/index.d.ts +18 -1
  105. package/components/index.js +24 -0
  106. package/components/motion.d.ts +1 -0
  107. package/components/motion.js +18 -6
  108. package/components/settingRowControl.d.ts +7 -0
  109. package/components/settingRowControl.js +15 -0
  110. package/package.json +57 -3
  111. package/styles/base.css +206 -206
  112. package/styles/blue.css +270 -268
  113. package/styles/minimal.css +1 -0
@@ -1,94 +1,162 @@
1
- .tree {
1
+ .tree,
2
+ .groupItems {
2
3
  display: flex;
3
4
  flex-direction: column;
4
5
  gap: 4px;
6
+ min-width: 0;
5
7
  }
8
+ .section,
6
9
  .branch {
7
10
  min-width: 0;
8
11
  }
12
+ .section + .section {
13
+ margin-top: var(--nav-group-gap, 16px);
14
+ padding-top: var(--nav-group-inset, 0);
15
+ border-top: var(--nav-group-divider, 0);
16
+ }
17
+ .groupLabel,
18
+ .groupToggle {
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: space-between;
22
+ gap: 8px;
23
+ width: 100%;
24
+ min-height: 32px;
25
+ margin-bottom: 5px;
26
+ padding: 6px 12px;
27
+ border: 0;
28
+ border-radius: var(--nav-radius, 8px);
29
+ color: var(--muted);
30
+ background: transparent;
31
+ font: inherit;
32
+ font-size: 11px;
33
+ text-align: left;
34
+ }
35
+ .groupToggle {
36
+ cursor: pointer;
37
+ }
38
+ .groupToggle:hover {
39
+ color: var(--fg);
40
+ background: var(--hover);
41
+ }
42
+ .groupToggle > span {
43
+ min-width: 0;
44
+ overflow: hidden;
45
+ text-overflow: ellipsis;
46
+ white-space: nowrap;
47
+ }
48
+ .groupToggle > svg {
49
+ width: 14px;
50
+ height: 14px;
51
+ flex-shrink: 0;
52
+ transform: rotate(90deg);
53
+ transition: transform var(--motion-chevron, 180ms) var(--ease);
54
+ }
55
+ .groupToggle[aria-expanded="false"] > svg {
56
+ transform: rotate(0);
57
+ }
58
+ .section[data-active-within][data-collapsed] .groupToggle {
59
+ color: var(--navigation-active-color, var(--fg));
60
+ }
61
+
9
62
  .row {
10
63
  position: relative;
11
64
  display: flex;
12
65
  align-items: center;
13
- gap: 0;
14
66
  min-width: 0;
15
- border-radius: 8px;
16
- transition: background var(--motion-hover);
67
+ border-radius: var(--nav-radius, 8px);
68
+ transition:
69
+ background var(--motion-hover),
70
+ color var(--motion-hover);
17
71
  }
18
- .row:hover {
72
+ .row:not(:has(> .item[aria-current="page"])):has(
73
+ > .item:hover:not(:disabled):not([aria-disabled="true"])
74
+ ) {
19
75
  background: var(--hover);
20
76
  }
21
- .row:has(> a[aria-current="page"]) {
77
+ .tree:not([data-ready]) .row:has(> .item[aria-current="page"]) {
22
78
  background: var(--selected);
23
79
  }
24
- .row:has(> .disclosure) > a {
25
- padding-right: 40px;
26
- }
27
- .row > a,
80
+ .item,
28
81
  .navigationButton {
82
+ position: relative;
29
83
  display: flex;
30
84
  align-items: center;
31
- gap: 11px;
85
+ gap: 10px;
32
86
  flex: 1;
33
87
  min-width: 0;
34
- min-height: 40px;
88
+ min-height: var(--nav-item-height, 40px);
35
89
  padding: 9px 12px;
36
- border-radius: 8px;
90
+ border: 0;
91
+ border-radius: var(--nav-radius, 8px);
37
92
  color: var(--muted);
93
+ background: transparent;
94
+ font: inherit;
38
95
  font-size: 13px;
96
+ line-height: 1.5;
39
97
  text-decoration: none;
40
98
  text-align: left;
99
+ cursor: pointer;
41
100
  }
42
101
  .navigationButton {
43
102
  width: 100%;
44
- border: 0;
45
- background: transparent;
46
- cursor: pointer;
47
- font-family: inherit;
48
103
  }
49
- .row > a > svg {
104
+ .item > svg,
105
+ .navigationButton > svg {
106
+ width: 18px;
107
+ height: 18px;
50
108
  flex-shrink: 0;
51
109
  }
52
- .row > a:hover {
110
+ .item:hover:not(:disabled):not([aria-disabled="true"]),
111
+ .navigationButton:hover:not(:disabled) {
53
112
  color: var(--fg);
54
113
  }
55
- .navigationButton:hover {
56
- color: var(--fg);
114
+ .navigationButton:hover:not(:disabled) {
57
115
  background: var(--hover);
58
116
  }
59
- .row > a[aria-current="page"] {
60
- color: var(--navigation-active-color, var(--accent));
117
+ .item[aria-current="page"],
118
+ .navigationButton[aria-current="page"] {
119
+ color: var(--navigation-active-color, var(--fg));
61
120
  }
62
121
  .navigationButton[aria-current="page"] {
63
- color: var(--navigation-active-color, var(--accent));
64
122
  background: var(--selected);
65
123
  }
124
+
125
+ .item:disabled,
126
+ .item[aria-disabled="true"] {
127
+ opacity: 0.45;
128
+ cursor: not-allowed;
129
+ }
66
130
  .label {
131
+ min-width: 0;
67
132
  overflow: hidden;
68
133
  text-overflow: ellipsis;
69
134
  white-space: nowrap;
70
135
  }
136
+ .row:has(> .disclosure) > .item {
137
+ padding-right: 6px;
138
+ }
71
139
  .disclosure {
72
- position: absolute;
73
- right: 6px;
140
+ flex: 0 0 28px;
141
+ margin-right: 6px;
74
142
  display: grid;
75
143
  place-items: center;
76
- flex: 0 0 28px;
77
144
  width: 28px;
78
145
  height: 28px;
146
+ padding: 0;
79
147
  border: 0;
80
148
  border-radius: 6px;
81
149
  background: transparent;
82
150
  color: var(--muted);
83
151
  cursor: pointer;
84
152
  }
85
- .disclosure:hover {
153
+ .disclosure:hover:not(:disabled) {
86
154
  background: var(--hover);
87
155
  color: var(--fg);
88
156
  }
89
- .disclosure:focus-visible {
90
- outline: 2px solid var(--accent);
91
- outline-offset: 1px;
157
+ .disclosure:disabled {
158
+ opacity: 0.45;
159
+ cursor: not-allowed;
92
160
  }
93
161
  .disclosure svg {
94
162
  transition: transform var(--motion-chevron, 180ms) var(--ease);
@@ -96,35 +164,191 @@
96
164
  .disclosure[aria-expanded="true"] svg {
97
165
  transform: rotate(90deg);
98
166
  }
167
+ .item:focus-visible,
168
+ .navigationButton:focus-visible,
169
+ .groupToggle:focus-visible,
170
+ .disclosure:focus-visible {
171
+ outline: 2px solid var(--accent-ink, var(--accent));
172
+ outline-offset: -2px;
173
+ }
99
174
  .children {
100
- margin: 4px 0 4px 16px;
175
+ margin-left: 20px;
176
+ padding: 4px 0 4px 10px;
177
+ border-left: 1px solid var(--line);
101
178
  }
102
- .children .row > a {
179
+ .children .item {
103
180
  min-height: 36px;
104
181
  padding-block: 7px;
105
- gap: 9px;
106
182
  font-size: 12px;
107
183
  }
108
- .row > a > svg {
109
- width: 18px;
110
- height: 18px;
111
- }
112
- .children .row > a > svg {
184
+ .children .item > svg {
113
185
  width: 16px;
114
186
  height: 16px;
115
187
  }
116
- .children[hidden] {
117
- display: none;
188
+ .branch[data-active-within] > .row > .disclosure {
189
+ color: var(--navigation-active-color, var(--fg));
118
190
  }
191
+
119
192
  .tree[data-compact] .label {
120
193
  display: none;
121
194
  }
122
- .tree[data-compact] .row > a {
195
+ .tree[data-compact] .item {
123
196
  justify-content: center;
124
197
  padding-inline: 0;
125
198
  }
199
+ .tree[data-compact] .section + .section {
200
+ margin-top: 12px;
201
+ padding-top: 12px;
202
+ border-top: 1px solid var(--line);
203
+ }
126
204
  @media (prefers-reduced-motion: reduce) {
205
+ .row,
206
+ .groupToggle > svg,
127
207
  .disclosure svg {
128
208
  transition: none;
129
209
  }
130
210
  }
211
+
212
+ .tree {
213
+ position: relative;
214
+ isolation: isolate;
215
+ /* Keep the moving highlight inside the tree while groups change height. */
216
+ overflow: clip;
217
+ }
218
+ .track {
219
+ position: absolute;
220
+ z-index: -1;
221
+ top: 0;
222
+ left: 0;
223
+ right: 0;
224
+ height: var(--nav-track-height, 0);
225
+ border-radius: var(--nav-radius, 8px);
226
+ background: var(--selected);
227
+ opacity: var(--nav-track-opacity, 0);
228
+ transform: translateY(var(--nav-track-y, 0));
229
+ pointer-events: none;
230
+ }
231
+ .track::before {
232
+ content: "";
233
+ position: absolute;
234
+ left: 4px;
235
+ top: 50%;
236
+ width: 3px;
237
+ height: 16px;
238
+ border-radius: 3px;
239
+ background: var(
240
+ --navigation-indicator-color,
241
+ var(--navigation-active-color, var(--fg))
242
+ );
243
+ opacity: var(--nav-indicator-opacity, 0);
244
+ transform: translateY(-50%);
245
+ }
246
+ .tree[data-ready] > .track {
247
+ transition:
248
+ transform var(--motion-segment, 240ms) var(--ease),
249
+ height var(--motion-segment, 240ms) var(--ease),
250
+ opacity var(--motion-hover, 160ms) var(--ease);
251
+ }
252
+ .collapse {
253
+ display: grid;
254
+ grid-template-rows: 0fr;
255
+ opacity: 0;
256
+ visibility: hidden;
257
+ transition:
258
+ grid-template-rows var(--motion-panel, 240ms) var(--ease),
259
+ opacity var(--motion-panel, 240ms) var(--ease),
260
+ visibility 0s var(--motion-panel, 240ms);
261
+ }
262
+ .collapse[data-open="true"] {
263
+ grid-template-rows: 1fr;
264
+ opacity: 1;
265
+ visibility: visible;
266
+ transition-delay: 0s;
267
+ }
268
+ .clip {
269
+ min-height: 0;
270
+ overflow: hidden;
271
+ }
272
+ .children > .branch > .row::before {
273
+ content: "";
274
+ position: absolute;
275
+ left: -10px;
276
+ top: 50%;
277
+ width: 7px;
278
+ height: 1px;
279
+ background: var(--line);
280
+ }
281
+ .children:has([aria-current="page"]) {
282
+ border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
283
+ }
284
+ @media (prefers-reduced-motion: reduce) {
285
+ .tree[data-ready] > .track,
286
+ .collapse {
287
+ transition: none;
288
+ }
289
+ }
290
+
291
+ .groupHeader {
292
+ display: grid;
293
+ grid-template-columns: minmax(0, 1fr) auto 14px;
294
+ align-items: center;
295
+ gap: 8px;
296
+ padding-inline: 12px;
297
+ margin-bottom: 5px;
298
+ min-height: 32px;
299
+ border-radius: var(--nav-radius, 8px);
300
+ }
301
+ .groupHeader > .groupToggle,
302
+ .groupHeader > .groupLabel {
303
+ display: grid;
304
+ grid-template-columns: subgrid;
305
+ grid-column: 1 / -1;
306
+ grid-row: 1;
307
+ padding: 6px 0;
308
+ margin: 0;
309
+ }
310
+ .groupToggle > span {
311
+ grid-column: 1;
312
+ }
313
+ .groupToggle > svg {
314
+ grid-column: 3;
315
+ }
316
+ .groupHeader:has(.groupToggle:hover) {
317
+ background: var(--hover);
318
+ }
319
+ .groupToggle:hover {
320
+ background: transparent;
321
+ }
322
+ .groupTrailing {
323
+ grid-column: 2;
324
+ grid-row: 1;
325
+ z-index: 1;
326
+ }
327
+ .groupTrailing,
328
+ .trailing {
329
+ display: inline-flex;
330
+ align-items: center;
331
+ justify-content: center;
332
+ gap: 4px;
333
+ flex-shrink: 0;
334
+ }
335
+ .trailing {
336
+ max-width: 40%;
337
+ margin-right: 12px;
338
+ }
339
+ .row:has(> .disclosure) > .trailing {
340
+ margin-right: 4px;
341
+ }
342
+ .trailing > svg {
343
+ width: 16px;
344
+ height: 16px;
345
+ }
346
+
347
+ .groupHeader > :is(.groupToggle, .groupLabel) {
348
+ font-weight: 400;
349
+ }
350
+ .section[data-header-bold="true"]
351
+ > .groupHeader
352
+ > :is(.groupToggle, .groupLabel) {
353
+ font-weight: 600;
354
+ }
@@ -1,19 +1,19 @@
1
- .field {
2
- display: grid;
3
- gap: 12px;
4
- }
5
- .field label {
6
- display: flex;
7
- justify-content: space-between;
8
- font-size: 12px;
9
- }
10
- .field label span {
11
- color: var(--muted);
12
- font-variant-numeric: tabular-nums;
13
- }
14
- .field input {
15
- width: 100%;
16
- margin: 6px 0;
17
- accent-color: var(--accent);
18
- cursor: pointer;
19
- }
1
+ .field {
2
+ display: grid;
3
+ gap: 12px;
4
+ }
5
+ .field label {
6
+ display: flex;
7
+ justify-content: space-between;
8
+ font-size: 12px;
9
+ }
10
+ .field label span {
11
+ color: var(--muted);
12
+ font-variant-numeric: tabular-nums;
13
+ }
14
+ .field input {
15
+ width: 100%;
16
+ margin: 6px 0;
17
+ accent-color: var(--accent-ink, var(--accent));
18
+ cursor: pointer;
19
+ }