@robert-stackflow/oneui 0.6.8 → 0.6.16

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