@kismet-ux/constellation 1.7.0 → 1.9.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 +36 -0
- package/dist/form/Input/input.css +32 -0
- package/dist/form/Input/input.d.ts +18 -1
- package/dist/form/Input/input.d.ts.map +1 -1
- package/dist/form/Input/input.js +20 -2
- package/dist/form/Input/input.js.map +1 -1
- package/dist/form/Input/input.module.scss.js +1 -1
- package/dist/form/Select/select.css +9 -0
- package/dist/form/Select/select.d.ts +11 -1
- package/dist/form/Select/select.d.ts.map +1 -1
- package/dist/form/Select/select.js +10 -2
- package/dist/form/Select/select.js.map +1 -1
- package/dist/form/Select/select.module.scss.js +1 -1
- package/dist/form.d.ts +2 -2
- package/dist/{index-Bexoc2w4.d.ts → index-CRrCqjAW.d.ts} +13 -3
- package/dist/{index-K2b259WI.d.ts → index-Mihuyg_o.d.ts} +4 -2
- package/dist/{index-IHzHSsCh.d.ts → index-ZgohDspB.d.ts} +14 -14
- package/dist/index.d.ts +13 -55
- package/dist/{input-CWHXOpeH.d.ts → input-Cp5LET5i.d.ts} +17 -0
- package/dist/layout/Container/container.css +1 -1
- package/dist/layout/Container/container.d.ts.map +1 -1
- package/dist/layout/Container/container.js +5 -2
- package/dist/layout/Container/container.js.map +1 -1
- package/dist/layout/Sidebar/sidebar.d.ts.map +1 -1
- package/dist/layout/Sidebar/sidebar.js.map +1 -1
- package/dist/layout.d.ts +3 -3
- package/dist/navigation.d.ts +1 -1
- package/dist/{tooltip-CYRWWtkq.d.ts → tooltip-cjwkBINy.d.ts} +5 -1
- package/dist/types/layout/container.d.ts +2 -0
- package/dist/types/layout/container.d.ts.map +1 -1
- package/dist/ui/Button/button-variants.d.ts +1 -1
- package/dist/ui/Button/button.css +92 -77
- package/dist/ui/Button/button.d.ts +4 -0
- package/dist/ui/Button/button.d.ts.map +1 -1
- package/dist/ui/Button/button.js +8 -2
- package/dist/ui/Button/button.js.map +1 -1
- package/dist/ui/Icon/icon-variants.d.ts +1 -1
- package/dist/ui/Toggle/toggle-variants.d.ts +1 -1
- package/dist/ui.d.ts +2 -2
- package/package.json +1 -1
- package/vite-plugin.mjs +7 -2
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/*
|
|
3
|
+
* A contained button fills with the `-dark` shade, in BOTH modes, and always
|
|
4
|
+
* takes white ink.
|
|
5
|
+
*
|
|
6
|
+
* The vivid `-main` shades are too light to carry text: measured against white
|
|
7
|
+
* they land at 2.8–4.2:1 for four of the seven themes, under the 4.5 a button
|
|
8
|
+
* label needs. Using near-black ink instead does clear it, but then a row of
|
|
9
|
+
* filled buttons reads inverted against everything around it. The deeper shade
|
|
10
|
+
* settles both — 5:1 to 17:1 across every theme, with the ink consistent.
|
|
11
|
+
*
|
|
12
|
+
* `--button-color`, when the caller sets it, stands in for the theme — for an
|
|
13
|
+
* app whose palette encodes meaning (which aisle a thing lands on), that is the
|
|
14
|
+
* difference between using the library and forking it.
|
|
15
|
+
*/
|
|
1
16
|
.button-module_button__ATpxB {
|
|
2
17
|
align-items: center;
|
|
3
18
|
border: none;
|
|
@@ -52,12 +67,12 @@
|
|
|
52
67
|
border-radius: var(--size-5);
|
|
53
68
|
}
|
|
54
69
|
.button-module_button--contained__YQQ33.button-module_button--primary__BO20b {
|
|
55
|
-
--button-ripple-color: var(--primary-light);
|
|
56
|
-
background-color: var(--primary-
|
|
57
|
-
color: var(--
|
|
70
|
+
--button-ripple-color: var(--button-color, var(--primary-light));
|
|
71
|
+
background-color: var(--button-color, var(--primary-dark));
|
|
72
|
+
color: var(--button-on-color, #fff);
|
|
58
73
|
}
|
|
59
74
|
.button-module_button--contained__YQQ33.button-module_button--primary__BO20b:hover:not(:disabled) {
|
|
60
|
-
background-color: var(--primary-dark);
|
|
75
|
+
background-color: color-mix(in srgb, var(--button-color, var(--primary-dark)) 86%, #fff);
|
|
61
76
|
}
|
|
62
77
|
.button-module_button--contained__YQQ33.button-module_button--primary__BO20b:focus-visible {
|
|
63
78
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--primary-focus-visible);
|
|
@@ -66,12 +81,12 @@
|
|
|
66
81
|
background-color: var(--primary-selected);
|
|
67
82
|
}
|
|
68
83
|
.button-module_button--contained__YQQ33.button-module_button--secondary__EgwQf {
|
|
69
|
-
--button-ripple-color: var(--secondary-light);
|
|
70
|
-
background-color: var(--secondary-
|
|
71
|
-
color: var(--
|
|
84
|
+
--button-ripple-color: var(--button-color, var(--secondary-light));
|
|
85
|
+
background-color: var(--button-color, var(--secondary-dark));
|
|
86
|
+
color: var(--button-on-color, #fff);
|
|
72
87
|
}
|
|
73
88
|
.button-module_button--contained__YQQ33.button-module_button--secondary__EgwQf:hover:not(:disabled) {
|
|
74
|
-
background-color: var(--secondary-dark);
|
|
89
|
+
background-color: color-mix(in srgb, var(--button-color, var(--secondary-dark)) 86%, #fff);
|
|
75
90
|
}
|
|
76
91
|
.button-module_button--contained__YQQ33.button-module_button--secondary__EgwQf:focus-visible {
|
|
77
92
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--secondary-focus-visible);
|
|
@@ -80,12 +95,12 @@
|
|
|
80
95
|
background-color: var(--secondary-selected);
|
|
81
96
|
}
|
|
82
97
|
.button-module_button--contained__YQQ33.button-module_button--destructive__PPikG {
|
|
83
|
-
--button-ripple-color: var(--destructive-light);
|
|
84
|
-
background-color: var(--destructive-
|
|
85
|
-
color: var(--
|
|
98
|
+
--button-ripple-color: var(--button-color, var(--destructive-light));
|
|
99
|
+
background-color: var(--button-color, var(--destructive-dark));
|
|
100
|
+
color: var(--button-on-color, #fff);
|
|
86
101
|
}
|
|
87
102
|
.button-module_button--contained__YQQ33.button-module_button--destructive__PPikG:hover:not(:disabled) {
|
|
88
|
-
background-color: var(--destructive-dark);
|
|
103
|
+
background-color: color-mix(in srgb, var(--button-color, var(--destructive-dark)) 86%, #fff);
|
|
89
104
|
}
|
|
90
105
|
.button-module_button--contained__YQQ33.button-module_button--destructive__PPikG:focus-visible {
|
|
91
106
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--destructive-focus-visible);
|
|
@@ -94,12 +109,12 @@
|
|
|
94
109
|
background-color: var(--destructive-selected);
|
|
95
110
|
}
|
|
96
111
|
.button-module_button--contained__YQQ33.button-module_button--warning__8wotP {
|
|
97
|
-
--button-ripple-color: var(--warning-light);
|
|
98
|
-
background-color: var(--warning-
|
|
99
|
-
color: var(--
|
|
112
|
+
--button-ripple-color: var(--button-color, var(--warning-light));
|
|
113
|
+
background-color: var(--button-color, var(--warning-dark));
|
|
114
|
+
color: var(--button-on-color, #fff);
|
|
100
115
|
}
|
|
101
116
|
.button-module_button--contained__YQQ33.button-module_button--warning__8wotP:hover:not(:disabled) {
|
|
102
|
-
background-color: var(--warning-dark);
|
|
117
|
+
background-color: color-mix(in srgb, var(--button-color, var(--warning-dark)) 86%, #fff);
|
|
103
118
|
}
|
|
104
119
|
.button-module_button--contained__YQQ33.button-module_button--warning__8wotP:focus-visible {
|
|
105
120
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--warning-focus-visible);
|
|
@@ -108,12 +123,12 @@
|
|
|
108
123
|
background-color: var(--warning-selected);
|
|
109
124
|
}
|
|
110
125
|
.button-module_button--contained__YQQ33.button-module_button--success__iPEgl {
|
|
111
|
-
--button-ripple-color: var(--success-light);
|
|
112
|
-
background-color: var(--success-
|
|
113
|
-
color: var(--
|
|
126
|
+
--button-ripple-color: var(--button-color, var(--success-light));
|
|
127
|
+
background-color: var(--button-color, var(--success-dark));
|
|
128
|
+
color: var(--button-on-color, #fff);
|
|
114
129
|
}
|
|
115
130
|
.button-module_button--contained__YQQ33.button-module_button--success__iPEgl:hover:not(:disabled) {
|
|
116
|
-
background-color: var(--success-dark);
|
|
131
|
+
background-color: color-mix(in srgb, var(--button-color, var(--success-dark)) 86%, #fff);
|
|
117
132
|
}
|
|
118
133
|
.button-module_button--contained__YQQ33.button-module_button--success__iPEgl:focus-visible {
|
|
119
134
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--success-focus-visible);
|
|
@@ -122,12 +137,12 @@
|
|
|
122
137
|
background-color: var(--success-selected);
|
|
123
138
|
}
|
|
124
139
|
.button-module_button--contained__YQQ33.button-module_button--info__WaPKN {
|
|
125
|
-
--button-ripple-color: var(--info-light);
|
|
126
|
-
background-color: var(--info-
|
|
127
|
-
color: var(--
|
|
140
|
+
--button-ripple-color: var(--button-color, var(--info-light));
|
|
141
|
+
background-color: var(--button-color, var(--info-dark));
|
|
142
|
+
color: var(--button-on-color, #fff);
|
|
128
143
|
}
|
|
129
144
|
.button-module_button--contained__YQQ33.button-module_button--info__WaPKN:hover:not(:disabled) {
|
|
130
|
-
background-color: var(--info-dark);
|
|
145
|
+
background-color: color-mix(in srgb, var(--button-color, var(--info-dark)) 86%, #fff);
|
|
131
146
|
}
|
|
132
147
|
.button-module_button--contained__YQQ33.button-module_button--info__WaPKN:focus-visible {
|
|
133
148
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--info-focus-visible);
|
|
@@ -136,12 +151,12 @@
|
|
|
136
151
|
background-color: var(--info-selected);
|
|
137
152
|
}
|
|
138
153
|
.button-module_button--contained__YQQ33.button-module_button--slate__DRwTq {
|
|
139
|
-
--button-ripple-color: var(--slate-light);
|
|
140
|
-
background-color: var(--slate-
|
|
141
|
-
color: var(--
|
|
154
|
+
--button-ripple-color: var(--button-color, var(--slate-light));
|
|
155
|
+
background-color: var(--button-color, var(--slate-dark));
|
|
156
|
+
color: var(--button-on-color, #fff);
|
|
142
157
|
}
|
|
143
158
|
.button-module_button--contained__YQQ33.button-module_button--slate__DRwTq:hover:not(:disabled) {
|
|
144
|
-
background-color: var(--slate-dark);
|
|
159
|
+
background-color: color-mix(in srgb, var(--button-color, var(--slate-dark)) 86%, #fff);
|
|
145
160
|
}
|
|
146
161
|
.button-module_button--contained__YQQ33.button-module_button--slate__DRwTq:focus-visible {
|
|
147
162
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--slate-focus-visible);
|
|
@@ -161,12 +176,12 @@
|
|
|
161
176
|
border: 1px solid;
|
|
162
177
|
}
|
|
163
178
|
.button-module_button--outlined__AxHna.button-module_button--primary__BO20b {
|
|
164
|
-
--button-ripple-color: var(--primary-main);
|
|
165
|
-
border-color: var(--primary-outlined-border);
|
|
166
|
-
color: var(--primary-outlined-border);
|
|
179
|
+
--button-ripple-color: var(--button-color, var(--primary-main));
|
|
180
|
+
border-color: var(--button-color, var(--primary-outlined-border));
|
|
181
|
+
color: var(--button-color, var(--primary-outlined-border));
|
|
167
182
|
}
|
|
168
183
|
.button-module_button--outlined__AxHna.button-module_button--primary__BO20b:hover:not(:disabled) {
|
|
169
|
-
background-color: var(--primary-hover);
|
|
184
|
+
background-color: color-mix(in srgb, var(--button-color, var(--primary-hover)) 16%, transparent);
|
|
170
185
|
}
|
|
171
186
|
.button-module_button--outlined__AxHna.button-module_button--primary__BO20b:focus-visible {
|
|
172
187
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--primary-focus-visible);
|
|
@@ -175,12 +190,12 @@
|
|
|
175
190
|
background-color: var(--primary-selected);
|
|
176
191
|
}
|
|
177
192
|
.button-module_button--outlined__AxHna.button-module_button--secondary__EgwQf {
|
|
178
|
-
--button-ripple-color: var(--secondary-main);
|
|
179
|
-
border-color: var(--secondary-outlined-border);
|
|
180
|
-
color: var(--secondary-outlined-border);
|
|
193
|
+
--button-ripple-color: var(--button-color, var(--secondary-main));
|
|
194
|
+
border-color: var(--button-color, var(--secondary-outlined-border));
|
|
195
|
+
color: var(--button-color, var(--secondary-outlined-border));
|
|
181
196
|
}
|
|
182
197
|
.button-module_button--outlined__AxHna.button-module_button--secondary__EgwQf:hover:not(:disabled) {
|
|
183
|
-
background-color: var(--secondary-hover);
|
|
198
|
+
background-color: color-mix(in srgb, var(--button-color, var(--secondary-hover)) 16%, transparent);
|
|
184
199
|
}
|
|
185
200
|
.button-module_button--outlined__AxHna.button-module_button--secondary__EgwQf:focus-visible {
|
|
186
201
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--secondary-focus-visible);
|
|
@@ -189,12 +204,12 @@
|
|
|
189
204
|
background-color: var(--secondary-selected);
|
|
190
205
|
}
|
|
191
206
|
.button-module_button--outlined__AxHna.button-module_button--destructive__PPikG {
|
|
192
|
-
--button-ripple-color: var(--destructive-main);
|
|
193
|
-
border-color: var(--destructive-outlined-border);
|
|
194
|
-
color: var(--destructive-outlined-border);
|
|
207
|
+
--button-ripple-color: var(--button-color, var(--destructive-main));
|
|
208
|
+
border-color: var(--button-color, var(--destructive-outlined-border));
|
|
209
|
+
color: var(--button-color, var(--destructive-outlined-border));
|
|
195
210
|
}
|
|
196
211
|
.button-module_button--outlined__AxHna.button-module_button--destructive__PPikG:hover:not(:disabled) {
|
|
197
|
-
background-color: var(--destructive-hover);
|
|
212
|
+
background-color: color-mix(in srgb, var(--button-color, var(--destructive-hover)) 16%, transparent);
|
|
198
213
|
}
|
|
199
214
|
.button-module_button--outlined__AxHna.button-module_button--destructive__PPikG:focus-visible {
|
|
200
215
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--destructive-focus-visible);
|
|
@@ -203,12 +218,12 @@
|
|
|
203
218
|
background-color: var(--destructive-selected);
|
|
204
219
|
}
|
|
205
220
|
.button-module_button--outlined__AxHna.button-module_button--warning__8wotP {
|
|
206
|
-
--button-ripple-color: var(--warning-main);
|
|
207
|
-
border-color: var(--warning-outlined-border);
|
|
208
|
-
color: var(--warning-outlined-border);
|
|
221
|
+
--button-ripple-color: var(--button-color, var(--warning-main));
|
|
222
|
+
border-color: var(--button-color, var(--warning-outlined-border));
|
|
223
|
+
color: var(--button-color, var(--warning-outlined-border));
|
|
209
224
|
}
|
|
210
225
|
.button-module_button--outlined__AxHna.button-module_button--warning__8wotP:hover:not(:disabled) {
|
|
211
|
-
background-color: var(--warning-hover);
|
|
226
|
+
background-color: color-mix(in srgb, var(--button-color, var(--warning-hover)) 16%, transparent);
|
|
212
227
|
}
|
|
213
228
|
.button-module_button--outlined__AxHna.button-module_button--warning__8wotP:focus-visible {
|
|
214
229
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--warning-focus-visible);
|
|
@@ -217,12 +232,12 @@
|
|
|
217
232
|
background-color: var(--warning-selected);
|
|
218
233
|
}
|
|
219
234
|
.button-module_button--outlined__AxHna.button-module_button--success__iPEgl {
|
|
220
|
-
--button-ripple-color: var(--success-main);
|
|
221
|
-
border-color: var(--success-outlined-border);
|
|
222
|
-
color: var(--success-outlined-border);
|
|
235
|
+
--button-ripple-color: var(--button-color, var(--success-main));
|
|
236
|
+
border-color: var(--button-color, var(--success-outlined-border));
|
|
237
|
+
color: var(--button-color, var(--success-outlined-border));
|
|
223
238
|
}
|
|
224
239
|
.button-module_button--outlined__AxHna.button-module_button--success__iPEgl:hover:not(:disabled) {
|
|
225
|
-
background-color: var(--success-hover);
|
|
240
|
+
background-color: color-mix(in srgb, var(--button-color, var(--success-hover)) 16%, transparent);
|
|
226
241
|
}
|
|
227
242
|
.button-module_button--outlined__AxHna.button-module_button--success__iPEgl:focus-visible {
|
|
228
243
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--success-focus-visible);
|
|
@@ -231,12 +246,12 @@
|
|
|
231
246
|
background-color: var(--success-selected);
|
|
232
247
|
}
|
|
233
248
|
.button-module_button--outlined__AxHna.button-module_button--info__WaPKN {
|
|
234
|
-
--button-ripple-color: var(--info-main);
|
|
235
|
-
border-color: var(--info-outlined-border);
|
|
236
|
-
color: var(--info-outlined-border);
|
|
249
|
+
--button-ripple-color: var(--button-color, var(--info-main));
|
|
250
|
+
border-color: var(--button-color, var(--info-outlined-border));
|
|
251
|
+
color: var(--button-color, var(--info-outlined-border));
|
|
237
252
|
}
|
|
238
253
|
.button-module_button--outlined__AxHna.button-module_button--info__WaPKN:hover:not(:disabled) {
|
|
239
|
-
background-color: var(--info-hover);
|
|
254
|
+
background-color: color-mix(in srgb, var(--button-color, var(--info-hover)) 16%, transparent);
|
|
240
255
|
}
|
|
241
256
|
.button-module_button--outlined__AxHna.button-module_button--info__WaPKN:focus-visible {
|
|
242
257
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--info-focus-visible);
|
|
@@ -245,12 +260,12 @@
|
|
|
245
260
|
background-color: var(--info-selected);
|
|
246
261
|
}
|
|
247
262
|
.button-module_button--outlined__AxHna.button-module_button--slate__DRwTq {
|
|
248
|
-
--button-ripple-color: var(--slate-main);
|
|
249
|
-
border-color: var(--slate-outlined-border);
|
|
250
|
-
color: var(--slate-outlined-border);
|
|
263
|
+
--button-ripple-color: var(--button-color, var(--slate-main));
|
|
264
|
+
border-color: var(--button-color, var(--slate-outlined-border));
|
|
265
|
+
color: var(--button-color, var(--slate-outlined-border));
|
|
251
266
|
}
|
|
252
267
|
.button-module_button--outlined__AxHna.button-module_button--slate__DRwTq:hover:not(:disabled) {
|
|
253
|
-
background-color: var(--slate-hover);
|
|
268
|
+
background-color: color-mix(in srgb, var(--button-color, var(--slate-hover)) 16%, transparent);
|
|
254
269
|
}
|
|
255
270
|
.button-module_button--outlined__AxHna.button-module_button--slate__DRwTq:focus-visible {
|
|
256
271
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--slate-focus-visible);
|
|
@@ -273,11 +288,11 @@
|
|
|
273
288
|
background-color: transparent;
|
|
274
289
|
}
|
|
275
290
|
.button-module_button--ghost__m7RzP.button-module_button--primary__BO20b {
|
|
276
|
-
--button-ripple-color: var(--primary-main);
|
|
277
|
-
color: var(--primary-outlined-border);
|
|
291
|
+
--button-ripple-color: var(--button-color, var(--primary-main));
|
|
292
|
+
color: var(--button-color, var(--primary-outlined-border));
|
|
278
293
|
}
|
|
279
294
|
.button-module_button--ghost__m7RzP.button-module_button--primary__BO20b:hover:not(:disabled) {
|
|
280
|
-
background-color: var(--primary-hover);
|
|
295
|
+
background-color: color-mix(in srgb, var(--button-color, var(--primary-hover)) 16%, transparent);
|
|
281
296
|
}
|
|
282
297
|
.button-module_button--ghost__m7RzP.button-module_button--primary__BO20b:focus-visible {
|
|
283
298
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--primary-focus-visible);
|
|
@@ -286,11 +301,11 @@
|
|
|
286
301
|
background-color: var(--primary-selected);
|
|
287
302
|
}
|
|
288
303
|
.button-module_button--ghost__m7RzP.button-module_button--secondary__EgwQf {
|
|
289
|
-
--button-ripple-color: var(--secondary-main);
|
|
290
|
-
color: var(--secondary-outlined-border);
|
|
304
|
+
--button-ripple-color: var(--button-color, var(--secondary-main));
|
|
305
|
+
color: var(--button-color, var(--secondary-outlined-border));
|
|
291
306
|
}
|
|
292
307
|
.button-module_button--ghost__m7RzP.button-module_button--secondary__EgwQf:hover:not(:disabled) {
|
|
293
|
-
background-color: var(--secondary-hover);
|
|
308
|
+
background-color: color-mix(in srgb, var(--button-color, var(--secondary-hover)) 16%, transparent);
|
|
294
309
|
}
|
|
295
310
|
.button-module_button--ghost__m7RzP.button-module_button--secondary__EgwQf:focus-visible {
|
|
296
311
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--secondary-focus-visible);
|
|
@@ -299,11 +314,11 @@
|
|
|
299
314
|
background-color: var(--secondary-selected);
|
|
300
315
|
}
|
|
301
316
|
.button-module_button--ghost__m7RzP.button-module_button--destructive__PPikG {
|
|
302
|
-
--button-ripple-color: var(--destructive-main);
|
|
303
|
-
color: var(--destructive-outlined-border);
|
|
317
|
+
--button-ripple-color: var(--button-color, var(--destructive-main));
|
|
318
|
+
color: var(--button-color, var(--destructive-outlined-border));
|
|
304
319
|
}
|
|
305
320
|
.button-module_button--ghost__m7RzP.button-module_button--destructive__PPikG:hover:not(:disabled) {
|
|
306
|
-
background-color: var(--destructive-hover);
|
|
321
|
+
background-color: color-mix(in srgb, var(--button-color, var(--destructive-hover)) 16%, transparent);
|
|
307
322
|
}
|
|
308
323
|
.button-module_button--ghost__m7RzP.button-module_button--destructive__PPikG:focus-visible {
|
|
309
324
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--destructive-focus-visible);
|
|
@@ -312,11 +327,11 @@
|
|
|
312
327
|
background-color: var(--destructive-selected);
|
|
313
328
|
}
|
|
314
329
|
.button-module_button--ghost__m7RzP.button-module_button--warning__8wotP {
|
|
315
|
-
--button-ripple-color: var(--warning-main);
|
|
316
|
-
color: var(--warning-outlined-border);
|
|
330
|
+
--button-ripple-color: var(--button-color, var(--warning-main));
|
|
331
|
+
color: var(--button-color, var(--warning-outlined-border));
|
|
317
332
|
}
|
|
318
333
|
.button-module_button--ghost__m7RzP.button-module_button--warning__8wotP:hover:not(:disabled) {
|
|
319
|
-
background-color: var(--warning-hover);
|
|
334
|
+
background-color: color-mix(in srgb, var(--button-color, var(--warning-hover)) 16%, transparent);
|
|
320
335
|
}
|
|
321
336
|
.button-module_button--ghost__m7RzP.button-module_button--warning__8wotP:focus-visible {
|
|
322
337
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--warning-focus-visible);
|
|
@@ -325,11 +340,11 @@
|
|
|
325
340
|
background-color: var(--warning-selected);
|
|
326
341
|
}
|
|
327
342
|
.button-module_button--ghost__m7RzP.button-module_button--success__iPEgl {
|
|
328
|
-
--button-ripple-color: var(--success-main);
|
|
329
|
-
color: var(--success-outlined-border);
|
|
343
|
+
--button-ripple-color: var(--button-color, var(--success-main));
|
|
344
|
+
color: var(--button-color, var(--success-outlined-border));
|
|
330
345
|
}
|
|
331
346
|
.button-module_button--ghost__m7RzP.button-module_button--success__iPEgl:hover:not(:disabled) {
|
|
332
|
-
background-color: var(--success-hover);
|
|
347
|
+
background-color: color-mix(in srgb, var(--button-color, var(--success-hover)) 16%, transparent);
|
|
333
348
|
}
|
|
334
349
|
.button-module_button--ghost__m7RzP.button-module_button--success__iPEgl:focus-visible {
|
|
335
350
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--success-focus-visible);
|
|
@@ -338,11 +353,11 @@
|
|
|
338
353
|
background-color: var(--success-selected);
|
|
339
354
|
}
|
|
340
355
|
.button-module_button--ghost__m7RzP.button-module_button--info__WaPKN {
|
|
341
|
-
--button-ripple-color: var(--info-main);
|
|
342
|
-
color: var(--info-outlined-border);
|
|
356
|
+
--button-ripple-color: var(--button-color, var(--info-main));
|
|
357
|
+
color: var(--button-color, var(--info-outlined-border));
|
|
343
358
|
}
|
|
344
359
|
.button-module_button--ghost__m7RzP.button-module_button--info__WaPKN:hover:not(:disabled) {
|
|
345
|
-
background-color: var(--info-hover);
|
|
360
|
+
background-color: color-mix(in srgb, var(--button-color, var(--info-hover)) 16%, transparent);
|
|
346
361
|
}
|
|
347
362
|
.button-module_button--ghost__m7RzP.button-module_button--info__WaPKN:focus-visible {
|
|
348
363
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--info-focus-visible);
|
|
@@ -351,11 +366,11 @@
|
|
|
351
366
|
background-color: var(--info-selected);
|
|
352
367
|
}
|
|
353
368
|
.button-module_button--ghost__m7RzP.button-module_button--slate__DRwTq {
|
|
354
|
-
--button-ripple-color: var(--slate-main);
|
|
355
|
-
color: var(--slate-outlined-border);
|
|
369
|
+
--button-ripple-color: var(--button-color, var(--slate-main));
|
|
370
|
+
color: var(--button-color, var(--slate-outlined-border));
|
|
356
371
|
}
|
|
357
372
|
.button-module_button--ghost__m7RzP.button-module_button--slate__DRwTq:hover:not(:disabled) {
|
|
358
|
-
background-color: var(--slate-hover);
|
|
373
|
+
background-color: color-mix(in srgb, var(--button-color, var(--slate-hover)) 16%, transparent);
|
|
359
374
|
}
|
|
360
375
|
.button-module_button--ghost__m7RzP.button-module_button--slate__DRwTq:focus-visible {
|
|
361
376
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--slate-focus-visible);
|
|
@@ -2,6 +2,10 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { buttonVariants } from './button-variants';
|
|
4
4
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
5
|
+
/** A colour outside the theme scale; overrides the theme's colour roles. */
|
|
6
|
+
color?: string;
|
|
7
|
+
/** Ink for `contained` when `color` is set and the default contrast is wrong. */
|
|
8
|
+
onColor?: string;
|
|
5
9
|
asChild?: boolean;
|
|
6
10
|
}
|
|
7
11
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAmCnD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IAC1F,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAmCnD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IAC1F,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFAwEX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/ui/Button/button.js
CHANGED
|
@@ -34,7 +34,7 @@ const normalizePathname = (href, origin) => {
|
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
const Button = React.forwardRef(({ variant = 'contained', theme = 'primary', size = 'md', rounded = 'extra', iconOnly, className, asChild = false, onClick, ...props }, ref) => {
|
|
37
|
+
const Button = React.forwardRef(({ variant = 'contained', theme = 'primary', size = 'md', rounded = 'extra', iconOnly, className, asChild = false, onClick, color, onColor, style, ...props }, ref) => {
|
|
38
38
|
const Comp = asChild ? Slot : 'button';
|
|
39
39
|
const childHref = asChild ? getChildHref(props.children) : null;
|
|
40
40
|
const isBrowser = typeof window !== 'undefined';
|
|
@@ -57,7 +57,13 @@ const Button = React.forwardRef(({ variant = 'contained', theme = 'primary', siz
|
|
|
57
57
|
// a wrapper element whose own content needs its own a11y decisions.
|
|
58
58
|
const { children: rawChildren, ...restProps } = props;
|
|
59
59
|
const children = asChild ? rawChildren : withAriaHiddenChildren(rawChildren);
|
|
60
|
-
return (jsx(Comp, { "data-slot": 'button', "data-active-link": isActiveLink ? 'true' : undefined, "aria-current": isActiveLink && asChild ? 'page' : undefined, className: cn(buttonVariants({ variant, theme, iconOnly, size, rounded }), className),
|
|
60
|
+
return (jsx(Comp, { "data-slot": 'button', "data-active-link": isActiveLink ? 'true' : undefined, "aria-current": isActiveLink && asChild ? 'page' : undefined, className: cn(buttonVariants({ variant, theme, iconOnly, size, rounded }), className), style: color || onColor
|
|
61
|
+
? {
|
|
62
|
+
...style,
|
|
63
|
+
...(color ? { '--button-color': color } : null),
|
|
64
|
+
...(onColor ? { '--button-on-color': onColor } : null),
|
|
65
|
+
}
|
|
66
|
+
: style, ref: ref, onClick: handleClick, ...restProps, children: children }));
|
|
61
67
|
});
|
|
62
68
|
Button.displayName = 'Button';
|
|
63
69
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../src/ui/Button/button.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { createRipple } from '../../internal/create-ripple';\nimport { Slot } from '../../internal/slot';\nimport { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children';\nimport { buttonVariants } from './button-variants';\nimport s from './button.module.scss';\n\nconst getChildHref = (children: React.ReactNode): string | null => {\n const childArray = React.Children.toArray(children ?? []);\n if (childArray.length !== 1) {\n return null;\n }\n\n const child = childArray[0];\n if (!React.isValidElement<{ href?: string; to?: string }>(child)) {\n return null;\n }\n\n if (typeof child.props?.href === 'string') {\n return child.props.href;\n }\n\n if (typeof child.props?.to === 'string') {\n return child.props.to;\n }\n\n return null;\n};\n\nconst normalizePathname = (href: string, origin: string): string | null => {\n try {\n const url = new URL(href, origin);\n const normalizedPath = url.pathname.replace(/\\/+$/, '');\n return normalizedPath || '/';\n } catch {\n return null;\n }\n};\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant = 'contained',\n theme = 'primary',\n size = 'md',\n rounded = 'extra',\n iconOnly,\n className,\n asChild = false,\n onClick,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : 'button';\n const childHref = asChild ? getChildHref(props.children) : null;\n const isBrowser = typeof window !== 'undefined';\n\n let currentPath: string | null = null;\n let targetPath: string | null = null;\n\n if (isBrowser) {\n const { pathname, origin } = window.location;\n currentPath = normalizePathname(pathname, origin);\n\n if (childHref) {\n targetPath = normalizePathname(childHref, origin);\n }\n }\n\n const isActiveLink = Boolean(\n asChild && currentPath && targetPath && currentPath === targetPath,\n );\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n createRipple(event, s['ripple']);\n onClick?.(event as React.MouseEvent<HTMLButtonElement>);\n };\n\n // Treat element children as decorative by default (icons get\n // aria-hidden automatically). Skip for `asChild` because Slot's child is\n // a wrapper element whose own content needs its own a11y decisions.\n const { children: rawChildren, ...restProps } = props;\n const children = asChild ? rawChildren : withAriaHiddenChildren(rawChildren);\n\n return (\n <Comp\n data-slot={'button'}\n data-active-link={isActiveLink ? 'true' : undefined}\n aria-current={isActiveLink && asChild ? 'page' : undefined}\n className={cn(buttonVariants({ variant, theme, iconOnly, size, rounded }), className)}\n ref={ref}\n onClick={handleClick}\n {...restProps}\n >\n {children}\n </Comp>\n );\n },\n);\nButton.displayName = 'Button';\n\nexport { Button };\n"],"names":["_jsx"],"mappings":";;;;;;;;;AASA,MAAM,YAAY,GAAG,CAAC,QAAyB,KAAmB;AAChE,IAAA,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC;AACzD,IAAA,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;AAC3B,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAiC,KAAK,CAAC,EAAE;AAChE,QAAA,OAAO,IAAI;IACb;IAEA,IAAI,OAAO,KAAK,CAAC,KAAK,EAAE,IAAI,KAAK,QAAQ,EAAE;AACzC,QAAA,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI;IACzB;IAEA,IAAI,OAAO,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,QAAQ,EAAE;AACvC,QAAA,OAAO,KAAK,CAAC,KAAK,CAAC,EAAE;IACvB;AAEA,IAAA,OAAO,IAAI;AACb,CAAC;AAED,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,MAAc,KAAmB;AACxE,IAAA,IAAI;QACF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC;AACjC,QAAA,MAAM,cAAc,GAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;QACvD,OAAO,cAAc,IAAI,GAAG;IAC9B;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,IAAI;IACb;AACF,CAAC;
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../src/ui/Button/button.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { createRipple } from '../../internal/create-ripple';\nimport { Slot } from '../../internal/slot';\nimport { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children';\nimport { buttonVariants } from './button-variants';\nimport s from './button.module.scss';\n\nconst getChildHref = (children: React.ReactNode): string | null => {\n const childArray = React.Children.toArray(children ?? []);\n if (childArray.length !== 1) {\n return null;\n }\n\n const child = childArray[0];\n if (!React.isValidElement<{ href?: string; to?: string }>(child)) {\n return null;\n }\n\n if (typeof child.props?.href === 'string') {\n return child.props.href;\n }\n\n if (typeof child.props?.to === 'string') {\n return child.props.to;\n }\n\n return null;\n};\n\nconst normalizePathname = (href: string, origin: string): string | null => {\n try {\n const url = new URL(href, origin);\n const normalizedPath = url.pathname.replace(/\\/+$/, '');\n return normalizedPath || '/';\n } catch {\n return null;\n }\n};\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n /** A colour outside the theme scale; overrides the theme's colour roles. */\n color?: string;\n /** Ink for `contained` when `color` is set and the default contrast is wrong. */\n onColor?: string;\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant = 'contained',\n theme = 'primary',\n size = 'md',\n rounded = 'extra',\n iconOnly,\n className,\n asChild = false,\n onClick,\n color,\n onColor,\n style,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : 'button';\n const childHref = asChild ? getChildHref(props.children) : null;\n const isBrowser = typeof window !== 'undefined';\n\n let currentPath: string | null = null;\n let targetPath: string | null = null;\n\n if (isBrowser) {\n const { pathname, origin } = window.location;\n currentPath = normalizePathname(pathname, origin);\n\n if (childHref) {\n targetPath = normalizePathname(childHref, origin);\n }\n }\n\n const isActiveLink = Boolean(\n asChild && currentPath && targetPath && currentPath === targetPath,\n );\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n createRipple(event, s['ripple']);\n onClick?.(event as React.MouseEvent<HTMLButtonElement>);\n };\n\n // Treat element children as decorative by default (icons get\n // aria-hidden automatically). Skip for `asChild` because Slot's child is\n // a wrapper element whose own content needs its own a11y decisions.\n const { children: rawChildren, ...restProps } = props;\n const children = asChild ? rawChildren : withAriaHiddenChildren(rawChildren);\n\n return (\n <Comp\n data-slot={'button'}\n data-active-link={isActiveLink ? 'true' : undefined}\n aria-current={isActiveLink && asChild ? 'page' : undefined}\n className={cn(buttonVariants({ variant, theme, iconOnly, size, rounded }), className)}\n style={\n color || onColor\n ? ({\n ...style,\n ...(color ? { '--button-color': color } : null),\n ...(onColor ? { '--button-on-color': onColor } : null),\n } as React.CSSProperties)\n : style\n }\n ref={ref}\n onClick={handleClick}\n {...restProps}\n >\n {children}\n </Comp>\n );\n },\n);\nButton.displayName = 'Button';\n\nexport { Button };\n"],"names":["_jsx"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const iconVariants: (props?: ({
|
|
2
|
-
variant?: "
|
|
2
|
+
variant?: "ghost" | "contained" | "outlined" | "plain" | null | undefined;
|
|
3
3
|
theme?: "inherit" | "primary" | "secondary" | "destructive" | "warning" | "success" | "info" | "slate" | null | undefined;
|
|
4
4
|
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
5
5
|
rounded?: boolean | "extra" | null | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const toggleVariants: (props?: ({
|
|
2
|
-
variant?: "
|
|
2
|
+
variant?: "ghost" | "contained" | "outlined" | null | undefined;
|
|
3
3
|
theme?: "inherit" | "primary" | "secondary" | "destructive" | "warning" | "success" | "info" | "slate" | null | undefined;
|
|
4
4
|
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
5
5
|
iconOnly?: boolean | null | undefined;
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as Alert, b as AlertBanner, c as AlertBannerProps, d as AlertDescription, f as AlertProps, g as AlertProvider, i as AlertTitle, j as Avatar, k as AvatarFallback, l as AvatarFallbackProps, m as AvatarImage, n as AvatarImageProps, o as AvatarProps, C as Chip, p as ChipProps, q as CodeBlock, r as CodeBlockProps, D as DevIndicator, s as DevIndicatorProps, t as Dialog, u as DialogClose, v as DialogCloseProps, w as DialogContent, x as DialogContentProps, y as DialogDescription, z as DialogFooter, B as DialogHeader, E as DialogOverlay, F as DialogPortal, G as DialogProps, H as DialogTitle, I as DialogTrigger, J as DialogTriggerProps, K as EmptyState, L as EmptyStateProps, M as Icon, N as IconProps, O as List, P as ListItem, Q as ListItemProps, R as ListProps, T as Pagination, V as ProgressBar, W as ProgressBarProps, Y as Separator, Z as SeparatorProps, a0 as StatCard, a1 as StatCardDirection, a2 as StatCardProps, a3 as StatCardSize, a4 as StatCardTheme, a5 as StatCardVariant, a6 as StatusDot, a7 as StatusDotProps, a8 as Step, a9 as StepProgress, aa as StepProgressProps, ab as Switch, ac as SwitchProps, ad as Table, ae as TableActionCell, af as TableActionCellProps, ag as TableActionItem, ah as TableBody, ai as TableBodyProps, aj as TableCard, ak as TableCell, al as TableFooter, am as TableHead, an as TableHeader, ao as TableRow, ap as TableSortableHeader, aq as TableSortableHeaderProps, ar as TableToolbar, as as TableToolbarProps, at as Toggle, au as ToggleGroup, av as ToggleGroupProps, aw as ToggleProps, ax as TrendDirection, ay as persistAlert, az as statusDotVariants } from './index-
|
|
2
|
-
export { B as Button, a as ButtonProps, T as Tooltip, b as TooltipContent, c as TooltipContentProps, d as TooltipProps, e as TooltipProvider, f as TooltipTrigger, g as TooltipTriggerProps } from './tooltip-
|
|
1
|
+
export { a as Alert, b as AlertBanner, c as AlertBannerProps, d as AlertDescription, f as AlertProps, g as AlertProvider, i as AlertTitle, j as Avatar, k as AvatarFallback, l as AvatarFallbackProps, m as AvatarImage, n as AvatarImageProps, o as AvatarProps, C as Chip, p as ChipProps, q as CodeBlock, r as CodeBlockProps, D as DevIndicator, s as DevIndicatorProps, t as Dialog, u as DialogClose, v as DialogCloseProps, w as DialogContent, x as DialogContentProps, y as DialogDescription, z as DialogFooter, B as DialogHeader, E as DialogOverlay, F as DialogPortal, G as DialogProps, H as DialogTitle, I as DialogTrigger, J as DialogTriggerProps, K as EmptyState, L as EmptyStateProps, M as Icon, N as IconProps, O as List, P as ListItem, Q as ListItemProps, R as ListProps, T as Pagination, V as ProgressBar, W as ProgressBarProps, Y as Separator, Z as SeparatorProps, a0 as StatCard, a1 as StatCardDirection, a2 as StatCardProps, a3 as StatCardSize, a4 as StatCardTheme, a5 as StatCardVariant, a6 as StatusDot, a7 as StatusDotProps, a8 as Step, a9 as StepProgress, aa as StepProgressProps, ab as Switch, ac as SwitchProps, ad as Table, ae as TableActionCell, af as TableActionCellProps, ag as TableActionItem, ah as TableBody, ai as TableBodyProps, aj as TableCard, ak as TableCell, al as TableFooter, am as TableHead, an as TableHeader, ao as TableRow, ap as TableSortableHeader, aq as TableSortableHeaderProps, ar as TableToolbar, as as TableToolbarProps, at as Toggle, au as ToggleGroup, av as ToggleGroupProps, aw as ToggleProps, ax as TrendDirection, ay as persistAlert, az as statusDotVariants } from './index-ZgohDspB.js';
|
|
2
|
+
export { B as Button, a as ButtonProps, T as Tooltip, b as TooltipContent, c as TooltipContentProps, d as TooltipProps, e as TooltipProvider, f as TooltipTrigger, g as TooltipTriggerProps } from './tooltip-cjwkBINy.js';
|
|
3
3
|
import 'class-variance-authority';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'class-variance-authority/types';
|
package/package.json
CHANGED
package/vite-plugin.mjs
CHANGED
|
@@ -36,8 +36,9 @@ export default function constellationLocal(options = {}) {
|
|
|
36
36
|
if (options.root) {
|
|
37
37
|
constellationRoot = resolve(options.root);
|
|
38
38
|
} else {
|
|
39
|
+
// Directory names, not package names — a sibling checkout.
|
|
39
40
|
const candidates = [
|
|
40
|
-
resolve(process.cwd(), '
|
|
41
|
+
resolve(process.cwd(), '../kismet-constellation'),
|
|
41
42
|
resolve(process.cwd(), '../constellation'),
|
|
42
43
|
resolve(process.cwd(), 'constellation'),
|
|
43
44
|
];
|
|
@@ -86,7 +87,11 @@ export default function constellationLocal(options = {}) {
|
|
|
86
87
|
resolve: { alias: aliases },
|
|
87
88
|
server: {
|
|
88
89
|
fs: {
|
|
89
|
-
allow
|
|
90
|
+
// The consuming project MUST stay listed. Setting `allow` at all
|
|
91
|
+
// replaces Vite's default, so returning only the library root
|
|
92
|
+
// locks the app out of its own source — every module 403s and the
|
|
93
|
+
// page renders blank.
|
|
94
|
+
allow: [process.cwd(), constellationRoot],
|
|
90
95
|
},
|
|
91
96
|
},
|
|
92
97
|
};
|