@stndrds/constants 1.0.0-alpha.263 → 1.0.0-alpha.265
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/dist/index.js +31 -1
- package/dist/index.mjs +31 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -295,8 +295,38 @@ function getDefaultAttributeIcon(type) {
|
|
|
295
295
|
// src/cn.ts
|
|
296
296
|
var import_clsx = require("clsx");
|
|
297
297
|
var import_tailwind_merge = require("tailwind-merge");
|
|
298
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
299
|
+
extend: {
|
|
300
|
+
classGroups: {
|
|
301
|
+
/* Every text rung the design system ships, not a subset. The three
|
|
302
|
+
`control` rungs below were registered when this fix was written; the
|
|
303
|
+
six added since — `2xs` and `xs`, the whole `row` family, `metric` —
|
|
304
|
+
were not, so 199 call sites were still silently losing either their
|
|
305
|
+
size or their colour to the merge.
|
|
306
|
+
It fails the way the comment above describes and no louder: the class
|
|
307
|
+
is dropped, the element inherits the 16px root, and nothing warns.
|
|
308
|
+
Measured live on the records grid, the column header rendered at 16px
|
|
309
|
+
for exactly this reason. Any rung added to `theme.css` has to be added
|
|
310
|
+
here in the same change, or it is not really a rung. */
|
|
311
|
+
"font-size": [
|
|
312
|
+
"text-control-2xs",
|
|
313
|
+
"text-control-xs",
|
|
314
|
+
"text-control-sm",
|
|
315
|
+
"text-control-default",
|
|
316
|
+
"text-control-lg",
|
|
317
|
+
"text-row-sm",
|
|
318
|
+
"text-row-default",
|
|
319
|
+
"text-row-lg",
|
|
320
|
+
"text-metric"
|
|
321
|
+
],
|
|
322
|
+
h: ["h-control-sm", "h-control-default", "h-control-lg"],
|
|
323
|
+
w: ["w-control-sm", "w-control-default", "w-control-lg"],
|
|
324
|
+
size: ["size-control-sm", "size-control-default", "size-control-lg"]
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
});
|
|
298
328
|
function cn(...inputs) {
|
|
299
|
-
return
|
|
329
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
300
330
|
}
|
|
301
331
|
|
|
302
332
|
// src/colors.ts
|
package/dist/index.mjs
CHANGED
|
@@ -185,7 +185,37 @@ function getDefaultAttributeIcon(type) {
|
|
|
185
185
|
|
|
186
186
|
// src/cn.ts
|
|
187
187
|
import { clsx } from "clsx";
|
|
188
|
-
import {
|
|
188
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
189
|
+
var twMerge = extendTailwindMerge({
|
|
190
|
+
extend: {
|
|
191
|
+
classGroups: {
|
|
192
|
+
/* Every text rung the design system ships, not a subset. The three
|
|
193
|
+
`control` rungs below were registered when this fix was written; the
|
|
194
|
+
six added since — `2xs` and `xs`, the whole `row` family, `metric` —
|
|
195
|
+
were not, so 199 call sites were still silently losing either their
|
|
196
|
+
size or their colour to the merge.
|
|
197
|
+
It fails the way the comment above describes and no louder: the class
|
|
198
|
+
is dropped, the element inherits the 16px root, and nothing warns.
|
|
199
|
+
Measured live on the records grid, the column header rendered at 16px
|
|
200
|
+
for exactly this reason. Any rung added to `theme.css` has to be added
|
|
201
|
+
here in the same change, or it is not really a rung. */
|
|
202
|
+
"font-size": [
|
|
203
|
+
"text-control-2xs",
|
|
204
|
+
"text-control-xs",
|
|
205
|
+
"text-control-sm",
|
|
206
|
+
"text-control-default",
|
|
207
|
+
"text-control-lg",
|
|
208
|
+
"text-row-sm",
|
|
209
|
+
"text-row-default",
|
|
210
|
+
"text-row-lg",
|
|
211
|
+
"text-metric"
|
|
212
|
+
],
|
|
213
|
+
h: ["h-control-sm", "h-control-default", "h-control-lg"],
|
|
214
|
+
w: ["w-control-sm", "w-control-default", "w-control-lg"],
|
|
215
|
+
size: ["size-control-sm", "size-control-default", "size-control-lg"]
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
});
|
|
189
219
|
function cn(...inputs) {
|
|
190
220
|
return twMerge(clsx(inputs));
|
|
191
221
|
}
|