@robert-stackflow/oneui 0.6.7 → 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 (114) hide show
  1. package/CHANGELOG.md +63 -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/Tab.module.css +148 -148
  78. package/components/Table.d.ts +8 -1
  79. package/components/Table.js +34 -17
  80. package/components/Table.module.css +87 -48
  81. package/components/TableMarkup.d.ts +2 -1
  82. package/components/TableMarkup.js +18 -1
  83. package/components/TableOfContents.d.ts +22 -0
  84. package/components/TableOfContents.js +462 -0
  85. package/components/TableOfContents.module.css +252 -0
  86. package/components/TextAreaSettingRow.d.ts +9 -0
  87. package/components/TextAreaSettingRow.js +47 -0
  88. package/components/TextSettingRow.d.ts +9 -0
  89. package/components/TextSettingRow.js +45 -0
  90. package/components/ThemePicker.module.css +178 -178
  91. package/components/ThemeProvider.js +2 -0
  92. package/components/TimeColumns.module.css +47 -47
  93. package/components/Timeline.module.css +202 -202
  94. package/components/Toast.d.ts +8 -1
  95. package/components/Toast.js +49 -17
  96. package/components/Toast.module.css +25 -0
  97. package/components/ToastProvider.d.ts +4 -1
  98. package/components/ToastProvider.js +67 -12
  99. package/components/TreeSelect.js +1 -0
  100. package/components/TreeTable.d.ts +3 -3
  101. package/components/TreeTable.js +12 -2
  102. package/components/TreeTable.module.css +57 -53
  103. package/components/createToaster.d.ts +2 -1
  104. package/components/createToaster.js +28 -14
  105. package/components/index.d.ts +18 -1
  106. package/components/index.js +24 -0
  107. package/components/motion.d.ts +1 -0
  108. package/components/motion.js +18 -6
  109. package/components/settingRowControl.d.ts +7 -0
  110. package/components/settingRowControl.js +15 -0
  111. package/package.json +57 -3
  112. package/styles/base.css +206 -206
  113. package/styles/blue.css +270 -268
  114. package/styles/minimal.css +4 -25
package/styles/base.css CHANGED
@@ -1,206 +1,206 @@
1
- /* Runtime-independent essentials used by shared components. */
2
- :root[data-ui-theme] {
3
- --card-radius: var(--radius-lg, calc(var(--radius) + 4px));
4
- --card-space: var(--space, 24px);
5
- }
6
- @keyframes fade-in {
7
- from {
8
- opacity: 0;
9
- }
10
- to {
11
- opacity: 1;
12
- }
13
- }
14
- @keyframes page-enter {
15
- from {
16
- opacity: 0;
17
- translate: 0 5px;
18
- }
19
- to {
20
- opacity: 1;
21
- translate: 0 0;
22
- }
23
- }
24
- @keyframes spin {
25
- to {
26
- transform: rotate(360deg);
27
- }
28
- }
29
- @media (prefers-reduced-motion: reduce) {
30
- :root[data-ui-theme] *,
31
- :root[data-ui-theme] *::before,
32
- :root[data-ui-theme] *::after,
33
- :root[data-ui-theme] *::backdrop {
34
- animation: none !important;
35
- transition: none !important;
36
- scroll-behavior: auto !important;
37
- }
38
- }
39
- :root[data-ui-theme]:is([data-motion="off"], [data-motion="false"]) *,
40
- :root[data-ui-theme]:is([data-motion="off"], [data-motion="false"]) *::before,
41
- :root[data-ui-theme]:is([data-motion="off"], [data-motion="false"]) *::after,
42
- :root[data-ui-theme]:is([data-motion="off"], [data-motion="false"])
43
- *::backdrop {
44
- animation: none !important;
45
- transition: none !important;
46
- scroll-behavior: auto !important;
47
- }
48
-
49
- /* Default glyph size; explicit sizes and component CSS remain authoritative. */
50
- :where(svg.lucide[width="24"][height="24"]) {
51
- width: 17px;
52
- height: 17px;
53
- flex-shrink: 0;
54
- }
55
-
56
- :root[data-ui-theme] {
57
- --ui-font: "Segoe UI", "Microsoft YaHei", sans-serif;
58
- }
59
- :root[data-ui-theme] body {
60
- font: 14px/1.6 var(--ui-font);
61
- color: var(--fg);
62
- background: var(--canvas);
63
- }
64
- :root[data-ui-theme] *,
65
- :root[data-ui-theme] *::before,
66
- :root[data-ui-theme] *::after {
67
- box-sizing: border-box;
68
- }
69
- :root[data-ui-theme] body {
70
- margin: 0;
71
- }
72
- :where(:root[data-ui-theme]) :where(button, input, select, textarea) {
73
- font-family: inherit;
74
- }
75
- :where(:root[data-ui-theme])
76
- :where(
77
- button,
78
- a,
79
- input,
80
- select,
81
- textarea,
82
- summary,
83
- [tabindex]
84
- ):focus-visible {
85
- outline: 2px solid var(--accent);
86
- outline-offset: 3px;
87
- }
88
- :root[data-ui-theme="minimal"] {
89
- --sidebar: var(--navigation);
90
- --input: var(--field);
91
- --elevated: var(--surface);
92
- --radius-lg: calc(var(--radius) + 4px);
93
- --space: 24px;
94
- --border-strong: var(--line);
95
- --success-soft: color-mix(in srgb, var(--success) 10%, var(--surface));
96
- --warning-soft: color-mix(in srgb, var(--warning) 10%, var(--surface));
97
- --accent-hover: var(--accent);
98
- }
99
- :where(:root[data-ui-theme]) :where(h1, h2, h3, p) {
100
- margin: 0;
101
- }
102
- :where(:root[data-ui-theme]) :where(h1) {
103
- font-size: 28px;
104
- font-weight: 650;
105
- letter-spacing: -0.8px;
106
- line-height: 1.3;
107
- }
108
- :where(:root[data-ui-theme]) :where(h2) {
109
- font-size: 15px;
110
- font-weight: 600;
111
- }
112
- :where(:root[data-ui-theme]) :where(h3) {
113
- font-size: 14px;
114
- font-weight: 550;
115
- }
116
- :where(:root[data-ui-theme]) :where(button, input, textarea, select) {
117
- font: inherit;
118
- color: inherit;
119
- }
120
- :where(:root[data-ui-theme]) :where(button:not(:disabled)) {
121
- cursor: pointer;
122
- }
123
- :where(:root[data-ui-theme]) :where(button:disabled) {
124
- cursor: not-allowed;
125
- }
126
- :where(:root[data-ui-theme]) :where(svg) {
127
- flex-shrink: 0;
128
- }
129
- :where(:root[data-ui-theme]) :where(svg.lucide[stroke-width="2"]) {
130
- stroke-width: var(--icon-stroke, 1.75);
131
- }
132
- :where(:root[data-ui-theme]) :where(a) {
133
- color: inherit;
134
- text-decoration: none;
135
- }
136
- :where(:root[data-ui-theme]) :where(p) {
137
- color: var(--muted);
138
- }
139
- :root[data-ui-theme] {
140
- --fast: 160ms var(--ease);
141
- scrollbar-width: thin;
142
- }
143
-
144
- :where(:root[data-ui-theme] *) {
145
- scrollbar-width: thin;
146
- scrollbar-color: var(
147
- --scrollbar-thumb,
148
- color-mix(in srgb, var(--muted) 35%, transparent)
149
- )
150
- transparent;
151
- }
152
-
153
- @supports selector(::-webkit-scrollbar) {
154
- :root[data-ui-theme],
155
- :where(:root[data-ui-theme] *) {
156
- scrollbar-width: auto;
157
- scrollbar-color: auto;
158
- }
159
- :where(:root[data-ui-theme], :root[data-ui-theme] *)::-webkit-scrollbar {
160
- width: 8px;
161
- height: 8px;
162
- }
163
- :where(:root[data-ui-theme], :root[data-ui-theme] *)::-webkit-scrollbar-track,
164
- :where(
165
- :root[data-ui-theme],
166
- :root[data-ui-theme] *
167
- )::-webkit-scrollbar-corner {
168
- background: transparent;
169
- }
170
- :where(
171
- :root[data-ui-theme],
172
- :root[data-ui-theme] *
173
- )::-webkit-scrollbar-thumb {
174
- border: 2px solid transparent;
175
- border-radius: 999px;
176
- background: var(
177
- --scrollbar-thumb,
178
- color-mix(in srgb, var(--muted) 42%, transparent)
179
- );
180
- background-clip: padding-box;
181
- }
182
- :where(
183
- :root[data-ui-theme],
184
- :root[data-ui-theme] *
185
- )::-webkit-scrollbar-thumb:hover {
186
- background-color: var(
187
- --scrollbar-hover,
188
- color-mix(in srgb, var(--muted) 65%, transparent)
189
- );
190
- }
191
- :where(
192
- :root[data-ui-theme],
193
- :root[data-ui-theme] *
194
- )::-webkit-scrollbar-button {
195
- display: none;
196
- width: 0;
197
- height: 0;
198
- }
199
- }
200
-
201
- :root[data-ui-theme] {
202
- --on-danger: #fff;
203
- }
204
- :root[data-ui-theme][data-theme="dark"] {
205
- --on-danger: #141414;
206
- }
1
+ /* Runtime-independent essentials used by shared components. */
2
+ :root[data-ui-theme] {
3
+ --card-radius: var(--radius-lg, calc(var(--radius) + 4px));
4
+ --card-space: var(--space, 24px);
5
+ }
6
+ @keyframes fade-in {
7
+ from {
8
+ opacity: 0;
9
+ }
10
+ to {
11
+ opacity: 1;
12
+ }
13
+ }
14
+ @keyframes page-enter {
15
+ from {
16
+ opacity: 0;
17
+ translate: 0 5px;
18
+ }
19
+ to {
20
+ opacity: 1;
21
+ translate: 0 0;
22
+ }
23
+ }
24
+ @keyframes spin {
25
+ to {
26
+ transform: rotate(360deg);
27
+ }
28
+ }
29
+ @media (prefers-reduced-motion: reduce) {
30
+ :root[data-ui-theme] *,
31
+ :root[data-ui-theme] *::before,
32
+ :root[data-ui-theme] *::after,
33
+ :root[data-ui-theme] *::backdrop {
34
+ animation: none !important;
35
+ transition: none !important;
36
+ scroll-behavior: auto !important;
37
+ }
38
+ }
39
+ :root[data-ui-theme]:is([data-motion="off"], [data-motion="false"]) *,
40
+ :root[data-ui-theme]:is([data-motion="off"], [data-motion="false"]) *::before,
41
+ :root[data-ui-theme]:is([data-motion="off"], [data-motion="false"]) *::after,
42
+ :root[data-ui-theme]:is([data-motion="off"], [data-motion="false"])
43
+ *::backdrop {
44
+ animation: none !important;
45
+ transition: none !important;
46
+ scroll-behavior: auto !important;
47
+ }
48
+
49
+ /* Default glyph size; explicit sizes and component CSS remain authoritative. */
50
+ :where(svg.lucide[width="24"][height="24"]) {
51
+ width: 17px;
52
+ height: 17px;
53
+ flex-shrink: 0;
54
+ }
55
+
56
+ :root[data-ui-theme] {
57
+ --ui-font: "Segoe UI", "Microsoft YaHei", sans-serif;
58
+ }
59
+ :root[data-ui-theme] body {
60
+ font: 14px/1.6 var(--ui-font);
61
+ color: var(--fg);
62
+ background: var(--canvas);
63
+ }
64
+ :root[data-ui-theme] *,
65
+ :root[data-ui-theme] *::before,
66
+ :root[data-ui-theme] *::after {
67
+ box-sizing: border-box;
68
+ }
69
+ :root[data-ui-theme] body {
70
+ margin: 0;
71
+ }
72
+ :where(:root[data-ui-theme]) :where(button, input, select, textarea) {
73
+ font-family: inherit;
74
+ }
75
+ :where(:root[data-ui-theme])
76
+ :where(
77
+ button,
78
+ a,
79
+ input,
80
+ select,
81
+ textarea,
82
+ summary,
83
+ [tabindex]
84
+ ):focus-visible {
85
+ outline: 2px solid var(--accent-ink, var(--accent));
86
+ outline-offset: 3px;
87
+ }
88
+ :root[data-ui-theme="minimal"] {
89
+ --sidebar: var(--navigation);
90
+ --input: var(--field);
91
+ --elevated: var(--surface);
92
+ --radius-lg: calc(var(--radius) + 4px);
93
+ --space: 24px;
94
+ --border-strong: var(--line);
95
+ --success-soft: color-mix(in srgb, var(--success) 10%, var(--surface));
96
+ --warning-soft: color-mix(in srgb, var(--warning) 10%, var(--surface));
97
+ --accent-hover: var(--accent);
98
+ }
99
+ :where(:root[data-ui-theme]) :where(h1, h2, h3, p) {
100
+ margin: 0;
101
+ }
102
+ :where(:root[data-ui-theme]) :where(h1) {
103
+ font-size: 28px;
104
+ font-weight: 650;
105
+ letter-spacing: -0.8px;
106
+ line-height: 1.3;
107
+ }
108
+ :where(:root[data-ui-theme]) :where(h2) {
109
+ font-size: 15px;
110
+ font-weight: 600;
111
+ }
112
+ :where(:root[data-ui-theme]) :where(h3) {
113
+ font-size: 14px;
114
+ font-weight: 550;
115
+ }
116
+ :where(:root[data-ui-theme]) :where(button, input, textarea, select) {
117
+ font: inherit;
118
+ color: inherit;
119
+ }
120
+ :where(:root[data-ui-theme]) :where(button:not(:disabled)) {
121
+ cursor: pointer;
122
+ }
123
+ :where(:root[data-ui-theme]) :where(button:disabled) {
124
+ cursor: not-allowed;
125
+ }
126
+ :where(:root[data-ui-theme]) :where(svg) {
127
+ flex-shrink: 0;
128
+ }
129
+ :where(:root[data-ui-theme]) :where(svg.lucide[stroke-width="2"]) {
130
+ stroke-width: var(--icon-stroke, 1.75);
131
+ }
132
+ :where(:root[data-ui-theme]) :where(a) {
133
+ color: inherit;
134
+ text-decoration: none;
135
+ }
136
+ :where(:root[data-ui-theme]) :where(p) {
137
+ color: var(--muted);
138
+ }
139
+ :root[data-ui-theme] {
140
+ --fast: 160ms var(--ease);
141
+ scrollbar-width: thin;
142
+ }
143
+
144
+ :where(:root[data-ui-theme] *) {
145
+ scrollbar-width: thin;
146
+ scrollbar-color: var(
147
+ --scrollbar-thumb,
148
+ color-mix(in srgb, var(--muted) 35%, transparent)
149
+ )
150
+ transparent;
151
+ }
152
+
153
+ @supports selector(::-webkit-scrollbar) {
154
+ :root[data-ui-theme],
155
+ :where(:root[data-ui-theme] *) {
156
+ scrollbar-width: auto;
157
+ scrollbar-color: auto;
158
+ }
159
+ :where(:root[data-ui-theme], :root[data-ui-theme] *)::-webkit-scrollbar {
160
+ width: 8px;
161
+ height: 8px;
162
+ }
163
+ :where(:root[data-ui-theme], :root[data-ui-theme] *)::-webkit-scrollbar-track,
164
+ :where(
165
+ :root[data-ui-theme],
166
+ :root[data-ui-theme] *
167
+ )::-webkit-scrollbar-corner {
168
+ background: transparent;
169
+ }
170
+ :where(
171
+ :root[data-ui-theme],
172
+ :root[data-ui-theme] *
173
+ )::-webkit-scrollbar-thumb {
174
+ border: 2px solid transparent;
175
+ border-radius: 999px;
176
+ background: var(
177
+ --scrollbar-thumb,
178
+ color-mix(in srgb, var(--muted) 42%, transparent)
179
+ );
180
+ background-clip: padding-box;
181
+ }
182
+ :where(
183
+ :root[data-ui-theme],
184
+ :root[data-ui-theme] *
185
+ )::-webkit-scrollbar-thumb:hover {
186
+ background-color: var(
187
+ --scrollbar-hover,
188
+ color-mix(in srgb, var(--muted) 65%, transparent)
189
+ );
190
+ }
191
+ :where(
192
+ :root[data-ui-theme],
193
+ :root[data-ui-theme] *
194
+ )::-webkit-scrollbar-button {
195
+ display: none;
196
+ width: 0;
197
+ height: 0;
198
+ }
199
+ }
200
+
201
+ :root[data-ui-theme] {
202
+ --on-danger: #fff;
203
+ }
204
+ :root[data-ui-theme][data-theme="dark"] {
205
+ --on-danger: #141414;
206
+ }