softable-pixels-web 1.0.8 → 1.1.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/dist/{Button-rI1zyBIr.js → Button-nrM-Dn6T.js} +3 -2
- package/dist/{Button-rI1zyBIr.js.map → Button-nrM-Dn6T.js.map} +1 -1
- package/dist/{CheckItem-OVa0nZlJ.js → CheckItem-Cr8YZFKe.js} +4 -3
- package/dist/{CheckItem-OVa0nZlJ.js.map → CheckItem-Cr8YZFKe.js.map} +1 -1
- package/dist/{Checkbox-DdPF40bm.js → Checkbox-BRAE-Kg-.js} +4 -3
- package/dist/{Checkbox-DdPF40bm.js.map → Checkbox-BRAE-Kg-.js.map} +1 -1
- package/dist/{Icon-T_2VPPNe.js → Icon-7fQw74zg.js} +2 -2
- package/dist/{Icon-T_2VPPNe.js.map → Icon-7fQw74zg.js.map} +1 -1
- package/dist/IconButton-B7-l2DTb.js +81 -0
- package/dist/IconButton-B7-l2DTb.js.map +1 -0
- package/dist/{InfoSummary-D4GgSlQ0.js → InfoSummary-D2ER39sF.js} +3 -2
- package/dist/{InfoSummary-D4GgSlQ0.js.map → InfoSummary-D2ER39sF.js.map} +1 -1
- package/dist/{Input-9E5L4S5O.js → Input-BR3ZaetX.js} +4 -4
- package/dist/{Input-9E5L4S5O.js.map → Input-BR3ZaetX.js.map} +1 -1
- package/dist/{Label-DFcePle9.js → Label-1Gh2DlKl.js} +3 -2
- package/dist/{Label-DFcePle9.js.map → Label-1Gh2DlKl.js.map} +1 -1
- package/dist/{TabSwitch-CHS3g1CP.js → TabSwitch-Ce-uQvRp.js} +3 -2
- package/dist/{TabSwitch-CHS3g1CP.js.map → TabSwitch-Ce-uQvRp.js.map} +1 -1
- package/dist/{TextArea-CrJs9f5t.js → TextArea-BsErpaMx.js} +5 -4
- package/dist/{TextArea-CrJs9f5t.js.map → TextArea-BsErpaMx.js.map} +1 -1
- package/dist/{ThemeContext-CMCP5Hqz.js → ThemeContext-BsU2ZyE5.js} +1 -1
- package/dist/{ThemeContext-CMCP5Hqz.js.map → ThemeContext-BsU2ZyE5.js.map} +1 -1
- package/dist/Typography-CKXLkfw7.js +148 -0
- package/dist/Typography-CKXLkfw7.js.map +1 -0
- package/dist/button.d.ts +2 -2
- package/dist/button.js +3 -2
- package/dist/check-item.d.ts +1 -1
- package/dist/check-item.js +4 -3
- package/dist/checkbox.d.ts +2 -2
- package/dist/checkbox.js +4 -3
- package/dist/icon-button.d.ts +2 -0
- package/dist/icon-button.js +4 -0
- package/dist/index-BYZm15m2.d.ts +26 -0
- package/dist/{index-feodN4N9.d.ts → index-BrVPSHH2.d.ts} +3 -3
- package/dist/{index-CDUVPVvZ.d.ts → index-C181qAfZ.d.ts} +3 -2
- package/dist/{index-B33Qb8xC.d.ts → index-CIxyqe-m.d.ts} +1 -1
- package/dist/{index-DuKjuLFf.d.ts → index-Da42fqu3.d.ts} +2 -2
- package/dist/{index-NpIJSn1Q.d.ts → index-R-Kb8ovB.d.ts} +4 -3
- package/dist/{index-CADs9cEh.d.ts → index-akSk71wZ.d.ts} +1 -1
- package/dist/{index-Dkyy3OOB.d.ts → index-v4w-T_f6.d.ts} +4 -3
- package/dist/index.d.ts +10 -9
- package/dist/index.js +14 -12
- package/dist/info-summary.js +3 -2
- package/dist/input.d.ts +2 -2
- package/dist/input.js +5 -4
- package/dist/styleProps-7WdaXgmQ.d.ts +39 -0
- package/dist/tab-switch.d.ts +1 -1
- package/dist/tab-switch.js +3 -2
- package/dist/text-area.d.ts +2 -2
- package/dist/text-area.js +5 -4
- package/dist/theme-context.d.ts +1 -1
- package/dist/theme-context.js +1 -1
- package/dist/{types-WcPOnA5M.d.ts → types-CdA3IIV2.d.ts} +3 -2
- package/dist/typography.d.ts +1 -1
- package/dist/typography.js +2 -1
- package/dist/{Typography-ZFnL1M33.js → useThemedStyles-68D71Lua.js} +2 -146
- package/dist/useThemedStyles-68D71Lua.js.map +1 -0
- package/dist/{useThemedStyles-CniQ6zDU.d.ts → useThemedStyles-CXoofBTv.d.ts} +2 -39
- package/package.json +8 -1
- package/dist/Typography-ZFnL1M33.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import "./Icon-
|
|
2
|
-
import
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import "./
|
|
10
|
-
import { t as
|
|
11
|
-
import
|
|
1
|
+
import "./Icon-7fQw74zg.js";
|
|
2
|
+
import "./useThemedStyles-68D71Lua.js";
|
|
3
|
+
import { t as Typography } from "./Typography-CKXLkfw7.js";
|
|
4
|
+
import { t as Checkbox } from "./Checkbox-BRAE-Kg-.js";
|
|
5
|
+
import { n as useTheme, t as ThemeProvider } from "./ThemeContext-BsU2ZyE5.js";
|
|
6
|
+
import { t as TabSwitch } from "./TabSwitch-Ce-uQvRp.js";
|
|
7
|
+
import { t as InfoSummary } from "./InfoSummary-D2ER39sF.js";
|
|
8
|
+
import { t as CheckItem } from "./CheckItem-Cr8YZFKe.js";
|
|
9
|
+
import { t as Button } from "./Button-nrM-Dn6T.js";
|
|
10
|
+
import { t as IconButton } from "./IconButton-B7-l2DTb.js";
|
|
11
|
+
import "./Label-1Gh2DlKl.js";
|
|
12
|
+
import { t as Input } from "./Input-BR3ZaetX.js";
|
|
13
|
+
import { t as TextArea } from "./TextArea-BsErpaMx.js";
|
|
12
14
|
|
|
13
|
-
export { Button, CheckItem, Checkbox, InfoSummary, Input, TabSwitch, TextArea, ThemeProvider, Typography, useTheme };
|
|
15
|
+
export { Button, CheckItem, Checkbox, IconButton, InfoSummary, Input, TabSwitch, TextArea, ThemeProvider, Typography, useTheme };
|
package/dist/info-summary.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
1
|
+
import "./useThemedStyles-68D71Lua.js";
|
|
2
|
+
import "./Typography-CKXLkfw7.js";
|
|
3
|
+
import { t as InfoSummary } from "./InfoSummary-D2ER39sF.js";
|
|
3
4
|
|
|
4
5
|
export { InfoSummary };
|
package/dist/input.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./types-
|
|
2
|
-
import { t as Input } from "./index-
|
|
1
|
+
import "./types-CdA3IIV2.js";
|
|
2
|
+
import { t as Input } from "./index-v4w-T_f6.js";
|
|
3
3
|
export { Input };
|
package/dist/input.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "./Icon-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
1
|
+
import "./Icon-7fQw74zg.js";
|
|
2
|
+
import "./useThemedStyles-68D71Lua.js";
|
|
3
|
+
import "./Typography-CKXLkfw7.js";
|
|
4
|
+
import "./Label-1Gh2DlKl.js";
|
|
5
|
+
import { t as Input } from "./Input-BR3ZaetX.js";
|
|
5
6
|
|
|
6
7
|
export { Input };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//#region src/hooks/useThemedStyles/types/styleProps.d.ts
|
|
2
|
+
type Space = number | string;
|
|
3
|
+
type Size = number | string;
|
|
4
|
+
interface MarginProps {
|
|
5
|
+
m?: Space;
|
|
6
|
+
mx?: Space;
|
|
7
|
+
my?: Space;
|
|
8
|
+
mt?: Space;
|
|
9
|
+
mr?: Space;
|
|
10
|
+
mb?: Space;
|
|
11
|
+
ml?: Space;
|
|
12
|
+
}
|
|
13
|
+
interface PaddingProps {
|
|
14
|
+
p?: Space;
|
|
15
|
+
px?: Space;
|
|
16
|
+
py?: Space;
|
|
17
|
+
pt?: Space;
|
|
18
|
+
pr?: Space;
|
|
19
|
+
pb?: Space;
|
|
20
|
+
pl?: Space;
|
|
21
|
+
}
|
|
22
|
+
interface TextProps {
|
|
23
|
+
fontSize?: number | string;
|
|
24
|
+
fontWeight?: React.CSSProperties['fontWeight'];
|
|
25
|
+
lineHeight?: number | string;
|
|
26
|
+
textAlign?: React.CSSProperties['textAlign'];
|
|
27
|
+
}
|
|
28
|
+
interface LayoutProps {
|
|
29
|
+
w?: Size;
|
|
30
|
+
h?: Size;
|
|
31
|
+
minW?: Size;
|
|
32
|
+
maxW?: Size;
|
|
33
|
+
minH?: Size;
|
|
34
|
+
maxH?: Size;
|
|
35
|
+
}
|
|
36
|
+
type CommonStyleProps = MarginProps & PaddingProps & TextProps & LayoutProps;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { TextProps as a, PaddingProps as i, LayoutProps as n, MarginProps as r, CommonStyleProps as t };
|
|
39
|
+
//# sourceMappingURL=styleProps-7WdaXgmQ.d.ts.map
|
package/dist/tab-switch.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-
|
|
1
|
+
import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-C181qAfZ.js";
|
|
2
2
|
export { SwitchOption, TabSwitch, TabSwitchProps };
|
package/dist/tab-switch.js
CHANGED
package/dist/text-area.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./types-
|
|
2
|
-
import { t as TextArea } from "./index-
|
|
1
|
+
import "./types-CdA3IIV2.js";
|
|
2
|
+
import { t as TextArea } from "./index-BrVPSHH2.js";
|
|
3
3
|
export { TextArea };
|
package/dist/text-area.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "./Icon-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
1
|
+
import "./Icon-7fQw74zg.js";
|
|
2
|
+
import "./useThemedStyles-68D71Lua.js";
|
|
3
|
+
import "./Typography-CKXLkfw7.js";
|
|
4
|
+
import "./Label-1Gh2DlKl.js";
|
|
5
|
+
import { t as TextArea } from "./TextArea-BsErpaMx.js";
|
|
5
6
|
|
|
6
7
|
export { TextArea };
|
package/dist/theme-context.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-
|
|
1
|
+
import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-CIxyqe-m.js";
|
|
2
2
|
export { ThemeContextData, ThemeMode, ThemeName, ThemePersistence, ThemeProvider, ThemeProviderProps, ThemeRegistry, ThemeTokens, useTheme };
|
package/dist/theme-context.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as TextProps, r as MarginProps } from "./styleProps-7WdaXgmQ.js";
|
|
2
|
+
import { t as StyleMap } from "./useThemedStyles-CXoofBTv.js";
|
|
2
3
|
import { ElementType, ReactNode } from "react";
|
|
3
4
|
|
|
4
5
|
//#region src/components/toolkit/Typography/style.d.ts
|
|
@@ -21,4 +22,4 @@ type TextAlign = 'left' | 'center' | 'right' | 'justify';
|
|
|
21
22
|
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'b1' | 'b2' | 'b3' | 'caption' | 'legal';
|
|
22
23
|
//#endregion
|
|
23
24
|
export { TypographyVariant as n, TypographyProps as t };
|
|
24
|
-
//# sourceMappingURL=types-
|
|
25
|
+
//# sourceMappingURL=types-CdA3IIV2.d.ts.map
|
package/dist/typography.d.ts
CHANGED
package/dist/typography.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useInsertionEffect, useMemo } from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
|
|
4
3
|
//#region src/hooks/useThemedStyles/utils/hasString.ts
|
|
5
4
|
/**
|
|
@@ -397,148 +396,5 @@ function useThemedStyles(props, factory, options) {
|
|
|
397
396
|
const styled = (styles) => styles;
|
|
398
397
|
|
|
399
398
|
//#endregion
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
const secondaryColor = "var(--px-text-secondary)";
|
|
403
|
-
const typographyVariants = {
|
|
404
|
-
h1: {
|
|
405
|
-
fontSize: "3rem",
|
|
406
|
-
fontWeight: "700",
|
|
407
|
-
lineHeight: "1.25",
|
|
408
|
-
color: primaryColor
|
|
409
|
-
},
|
|
410
|
-
h2: {
|
|
411
|
-
fontSize: "2.25rem",
|
|
412
|
-
fontWeight: "600",
|
|
413
|
-
lineHeight: "1.35",
|
|
414
|
-
color: primaryColor
|
|
415
|
-
},
|
|
416
|
-
h3: {
|
|
417
|
-
fontSize: "1.875rem",
|
|
418
|
-
fontWeight: "600",
|
|
419
|
-
color: primaryColor
|
|
420
|
-
},
|
|
421
|
-
h4: {
|
|
422
|
-
fontSize: "1.5rem",
|
|
423
|
-
fontWeight: "500",
|
|
424
|
-
color: primaryColor
|
|
425
|
-
},
|
|
426
|
-
h5: {
|
|
427
|
-
fontSize: "1.25rem",
|
|
428
|
-
fontWeight: "500",
|
|
429
|
-
color: primaryColor
|
|
430
|
-
},
|
|
431
|
-
b1: {
|
|
432
|
-
fontSize: "1rem",
|
|
433
|
-
fontWeight: "500",
|
|
434
|
-
color: primaryColor
|
|
435
|
-
},
|
|
436
|
-
b2: {
|
|
437
|
-
fontSize: "0.875rem",
|
|
438
|
-
color: secondaryColor
|
|
439
|
-
},
|
|
440
|
-
b3: {
|
|
441
|
-
fontSize: "0.75rem",
|
|
442
|
-
color: secondaryColor
|
|
443
|
-
},
|
|
444
|
-
caption: {
|
|
445
|
-
fontSize: "0.75rem",
|
|
446
|
-
color: secondaryColor
|
|
447
|
-
},
|
|
448
|
-
legal: {
|
|
449
|
-
fontSize: "0.65rem",
|
|
450
|
-
textTransform: "uppercase",
|
|
451
|
-
letterSpacing: "0.025em",
|
|
452
|
-
color: secondaryColor
|
|
453
|
-
}
|
|
454
|
-
};
|
|
455
|
-
const variantToElement = {
|
|
456
|
-
h1: "h1",
|
|
457
|
-
h2: "h2",
|
|
458
|
-
h3: "h3",
|
|
459
|
-
h4: "h4",
|
|
460
|
-
h5: "h5",
|
|
461
|
-
b1: "p",
|
|
462
|
-
b2: "p",
|
|
463
|
-
b3: "p",
|
|
464
|
-
caption: "span",
|
|
465
|
-
legal: "span"
|
|
466
|
-
};
|
|
467
|
-
const alignText = {
|
|
468
|
-
left: { textAlign: "left" },
|
|
469
|
-
center: { textAlign: "center" },
|
|
470
|
-
right: { textAlign: "right" },
|
|
471
|
-
justify: { textAlign: "justify" }
|
|
472
|
-
};
|
|
473
|
-
|
|
474
|
-
//#endregion
|
|
475
|
-
//#region src/components/toolkit/Typography/style.ts
|
|
476
|
-
function createTypographyStyles(props) {
|
|
477
|
-
const { isLoading, variant, align = "left", color } = props;
|
|
478
|
-
return styled({
|
|
479
|
-
base: {
|
|
480
|
-
display: "flex",
|
|
481
|
-
flexDirection: "row",
|
|
482
|
-
alignItems: "center",
|
|
483
|
-
borderBottom: "1px solid var(--pixel-border, #e5e7eb)",
|
|
484
|
-
gap: 0,
|
|
485
|
-
animation: isLoading ? "animate-pulse 1.5s infinite" : void 0
|
|
486
|
-
},
|
|
487
|
-
loading: {
|
|
488
|
-
width: "50%",
|
|
489
|
-
height: "1em",
|
|
490
|
-
display: "inline-block",
|
|
491
|
-
backgroundColor: "var(--pixel-gray-300, #d1d5db)",
|
|
492
|
-
borderRadius: "0.25rem"
|
|
493
|
-
},
|
|
494
|
-
text: {
|
|
495
|
-
...alignText[align],
|
|
496
|
-
...typographyVariants[variant],
|
|
497
|
-
color: color ?? typographyVariants[variant].color
|
|
498
|
-
}
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
//#endregion
|
|
503
|
-
//#region src/components/toolkit/Typography/index.tsx
|
|
504
|
-
function Typography(props) {
|
|
505
|
-
const { id, as, href, variant, children, placeholder, isLoading = false, styles: styleTypography } = props;
|
|
506
|
-
const { styles } = useThemedStyles(props, createTypographyStyles, {
|
|
507
|
-
pick: (p) => [
|
|
508
|
-
p.isLoading,
|
|
509
|
-
p.variant,
|
|
510
|
-
p.align
|
|
511
|
-
],
|
|
512
|
-
commonSlot: "text",
|
|
513
|
-
applyCommonProps: true,
|
|
514
|
-
override: styleTypography
|
|
515
|
-
});
|
|
516
|
-
const Component = as ?? variantToElement[variant];
|
|
517
|
-
if (isLoading) return /* @__PURE__ */ jsx("span", {
|
|
518
|
-
id,
|
|
519
|
-
"aria-hidden": "true",
|
|
520
|
-
role: "presentation",
|
|
521
|
-
style: {
|
|
522
|
-
...styles.text,
|
|
523
|
-
...styles.loading
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
const sharedProps = {
|
|
527
|
-
id,
|
|
528
|
-
style: styles.text,
|
|
529
|
-
"aria-label": placeholder
|
|
530
|
-
};
|
|
531
|
-
if (href) return /* @__PURE__ */ jsx("a", {
|
|
532
|
-
href,
|
|
533
|
-
...sharedProps,
|
|
534
|
-
children
|
|
535
|
-
});
|
|
536
|
-
return /* @__PURE__ */ jsx(Component, {
|
|
537
|
-
...sharedProps,
|
|
538
|
-
children
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
//#endregion
|
|
543
|
-
export { styled as n, useThemedStyles as r, Typography as t };
|
|
544
|
-
//# sourceMappingURL=Typography-ZFnL1M33.js.map
|
|
399
|
+
export { useThemedStyles as n, styled as t };
|
|
400
|
+
//# sourceMappingURL=useThemedStyles-68D71Lua.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useThemedStyles-68D71Lua.js","names":["parts: string[]","COMMON_MAP: Record<\n keyof CommonStyleProps,\n (value: any, out: React.CSSProperties) => void\n>","out: React.CSSProperties","inline: any","rulesBySlot: any","out: any"],"sources":["../src/hooks/useThemedStyles/utils/hasString.ts","../src/hooks/useThemedStyles/utils/stableStringfy.ts","../src/hooks/useThemedStyles/utils/injectSlotsRule.ts","../src/hooks/useThemedStyles/utils/mergeStyleMaps.ts","../src/hooks/useThemedStyles/utils/resolveCommonStyleProps.ts","../src/hooks/useThemedStyles/utils/splitRules.ts","../src/hooks/useThemedStyles/utils/stripCommonProps.ts","../src/hooks/useThemedStyles/index.ts","../src/hooks/useThemedStyles/types/useThemedStyles.ts"],"sourcesContent":["/**\n * Small deterministic hash for strings (djb2 variant).\n * Used to generate stable class ids and cache keys.\n */\nexport function hashStr(str: string) {\n let h = 5381\n for (let i = 0; i < str.length; i++) h = (h * 33) ^ str.charCodeAt(i)\n return (h >>> 0).toString(36)\n}\n","/**\n * Stable stringify (order-independent) for hashing.\n * Sorts object keys to keep output deterministic.\n */\nexport function stableStringify(obj: any): string {\n if (obj == null || typeof obj !== 'object') return String(obj)\n if (Array.isArray(obj)) return `[${obj.map(stableStringify).join(',')}]`\n const keys = Object.keys(obj).sort()\n return `{${keys.map(k => `${k}:${stableStringify(obj[k])}`).join(',')}}`\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// Utils\nimport { hashStr } from './hasString'\nimport { stableStringify } from './stableStringfy'\n\n// Types\nimport type { RuleMap } from '../types'\n\n/**\n * Single <style> tag used for all runtime rules.\n */\nconst STYLE_ID = '__px_runtime_rules__'\n\n/**\n * Prevents injecting identical rules multiple times.\n */\nconst CACHE = new Set<string>()\n\n/**\n * Ensures the runtime <style> element exists and returns it.\n */\nfunction ensureStyleEl(): HTMLStyleElement | null {\n if (typeof document === 'undefined') return null\n let el = document.getElementById(STYLE_ID) as HTMLStyleElement | null\n if (!el) {\n el = document.createElement('style')\n el.id = STYLE_ID\n document.head.appendChild(el)\n }\n return el\n}\n\n/**\n * CSS properties that should NOT automatically receive \"px\" when given a number.\n *\n * Example:\n * - opacity: 0.5 (NOT 0.5px)\n * - zIndex: 10 (NOT 10px)\n * - lineHeight: 1.2 (NOT 1.2px)\n */\nconst UNITLESS = new Set([\n 'opacity',\n 'zIndex',\n 'fontWeight',\n 'flex',\n 'flexGrow',\n 'flexShrink',\n 'order',\n 'lineHeight'\n])\n\n/**\n * Converts camelCase CSS property names to kebab-case.\n * Keeps CSS variables intact (e.g. \"--px-bg\").\n */\nfunction toKebab(prop: string) {\n if (prop.startsWith('--')) return prop\n return prop.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`)\n}\n\n/**\n * Converts a JS value to a CSS value.\n *\n * - `number` => `\"${n}px\"` for most properties\n * - `number` => `\"${n}\"` for unitless properties\n * - `string` => string as-is\n */\nfunction toCssValue(prop: string, value: any) {\n if (value == null) return null\n if (typeof value === 'number' && !UNITLESS.has(prop)) return `${value}px`\n return String(value)\n}\n\n/**\n * Converts a declaration object to CSS string.\n *\n * Example:\n * `{ backgroundColor: \"red\", padding: 8 }`\n * => `\"background-color:red;padding:8px;\"`\n */\nfunction declToCss(decl: Record<string, any>) {\n const parts: string[] = []\n for (const [k, v] of Object.entries(decl)) {\n const cssValue = toCssValue(k, v)\n if (cssValue == null) continue\n parts.push(`${toKebab(k)}:${cssValue};`)\n }\n return parts.join('')\n}\n\n/**\n * Scopes a selector to a generated slot class.\n *\n * Rules:\n * - selectors containing \"&\" are replaced: \"&:hover\" => \".slot:hover\"\n * - selectors starting with \":\" become pseudo: \":hover\" => \".slot:hover\"\n * - otherwise it's treated as descendant: \"p\" => \".slot p\"\n */\nfunction scopeSelector(selector: string, baseClass: string) {\n const base = `.${baseClass}`\n\n if (selector.includes('&')) return selector.replaceAll('&', base)\n if (selector.startsWith(':')) return `${base}${selector}`\n return `${base} ${selector}`\n}\n\n/**\n * Injects CSS rules for one slot class into the runtime <style> tag.\n *\n * The injected CSS is cached using a hash of (slotClass + rules).\n */\nexport function injectSlotRules(slotClass: string, rules?: RuleMap) {\n if (!rules || Object.keys(rules).length === 0) return\n\n if (typeof document === 'undefined') return\n\n const signature = `${slotClass}:${stableStringify(rules)}`\n const key = hashStr(signature)\n if (CACHE.has(key)) return\n\n const css = Object.entries(rules)\n .map(\n ([sel, decl]) => `${scopeSelector(sel, slotClass)}{${declToCss(decl)}}`\n )\n .join('\\n')\n\n const el = ensureStyleEl()\n if (!el) return\n\n el.appendChild(document.createTextNode(`\\n${css}\\n`))\n CACHE.add(key)\n}\n","/**\n * Shallow-merge style maps slot-by-slot.\n * Warns when override contains unknown slots (developer UX).\n */\n\nimport type { SlotStyle, StyleMap } from '../types'\n\nexport function mergeStyleMaps<\n T extends StyleMap,\n X extends Partial<Record<keyof T, SlotStyle>>\n>(base: T, override?: X): T {\n if (!override) return base\n const out = { ...base } as T\n\n for (const key in override) {\n out[key] = { ...(base[key] ?? {}), ...(override[key] ?? {}) } as any\n }\n\n return out\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// Types\nimport type { CommonStyleProps } from '../types'\n\nfunction toCss(v: number | string | undefined) {\n return typeof v === 'number' ? `${v}rem` : v\n}\n\n/**\n * Source of truth: common prop -> how it maps into CSSProperties.\n * Add new common props ONLY here.\n */\nconst COMMON_MAP: Record<\n keyof CommonStyleProps,\n (value: any, out: React.CSSProperties) => void\n> = {\n // margin\n m: (v, o) => {\n o.margin = toCss(v)\n },\n mx: (v, o) => {\n o.marginLeft = toCss(v)\n o.marginRight = toCss(v)\n },\n my: (v, o) => {\n o.marginTop = toCss(v)\n o.marginBottom = toCss(v)\n },\n mt: (v, o) => {\n o.marginTop = toCss(v)\n },\n mr: (v, o) => {\n o.marginRight = toCss(v)\n },\n mb: (v, o) => {\n o.marginBottom = toCss(v)\n },\n ml: (v, o) => {\n o.marginLeft = toCss(v)\n },\n\n // padding\n p: (v, o) => {\n o.padding = toCss(v)\n },\n px: (v, o) => {\n o.paddingLeft = toCss(v)\n o.paddingRight = toCss(v)\n },\n py: (v, o) => {\n o.paddingTop = toCss(v)\n o.paddingBottom = toCss(v)\n },\n pt: (v, o) => {\n o.paddingTop = toCss(v)\n },\n pr: (v, o) => {\n o.paddingRight = toCss(v)\n },\n pb: (v, o) => {\n o.paddingBottom = toCss(v)\n },\n pl: (v, o) => {\n o.paddingLeft = toCss(v)\n },\n\n // text\n fontSize: (v, o) => {\n o.fontSize = toCss(v)\n },\n fontWeight: (v, o) => {\n o.fontWeight = v\n },\n lineHeight: (v, o) => {\n o.lineHeight = toCss(v)\n },\n textAlign: (v, o) => {\n o.textAlign = v\n },\n\n // layout\n w: (v, o) => {\n o.width = toCss(v)\n },\n h: (v, o) => {\n o.height = toCss(v)\n },\n minW: (v, o) => {\n o.minWidth = toCss(v)\n },\n maxW: (v, o) => {\n o.maxWidth = toCss(v)\n },\n minH: (v, o) => {\n o.minHeight = toCss(v)\n },\n maxH: (v, o) => {\n o.maxHeight = toCss(v)\n }\n}\n\nexport const COMMON_KEYS = Object.keys(COMMON_MAP) as Array<\n keyof CommonStyleProps\n>\n\nexport function hasAnyCommonStyleProps(props: Partial<CommonStyleProps>) {\n for (const k of COMMON_KEYS) {\n if (props[k] != null) return true\n }\n return false\n}\n\nexport function resolveCommonStyleProps(\n props: Partial<CommonStyleProps>\n): React.CSSProperties {\n const out: React.CSSProperties = {}\n\n for (const k of COMMON_KEYS) {\n const value = props[k]\n if (value != null) COMMON_MAP[k](value, out)\n }\n\n return out\n}\n\n/**\n * Applies common style props (if present) to a chosen slot.\n * Common props are resolved by `resolveCommonStyleProps`.\n */\nexport function applyCommonsToStyles<TStyles extends Record<string, any>>(\n styles: TStyles,\n props: Partial<CommonStyleProps>,\n slotOverride?: keyof TStyles\n): TStyles {\n if (!hasAnyCommonStyleProps(props)) return styles\n\n const keys = Object.keys(styles)\n if (keys.length === 0) return styles\n\n const slot =\n slotOverride ??\n (('container' in styles ? 'container' : keys[0]) as keyof TStyles)\n\n const common = resolveCommonStyleProps(props)\n\n return {\n ...styles,\n [slot]: { ...(styles[slot] ?? {}), ...common }\n } as TStyles\n}\n","// Types\n/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\nimport type { SplitResult, StyleMap } from '../types'\n\n/**\n * Splits the style map into:\n * - `inline`: slot styles without `__rules`\n * - `rulesBySlot`: extracted `__rules` grouped by slot\n *\n * This lets us:\n * - apply inline styles directly via `style={...}`\n * - inject selectors/pseudos via generated CSS classes\n */\nexport function splitRules<TStyles extends StyleMap>(\n styles: TStyles\n): SplitResult<TStyles> {\n const inline: any = {}\n const rulesBySlot: any = {}\n\n for (const key in styles) {\n const slot = styles[key]\n if (!slot) continue\n\n const { __rules, ...rest } = slot as any\n inline[key] = rest\n\n if (__rules && Object.keys(__rules).length > 0) {\n rulesBySlot[key] = __rules\n }\n }\n\n return { inline, rulesBySlot }\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\nimport type { CommonStyleProps } from '../types'\n\nimport { COMMON_KEYS } from './resolveCommonStyleProps'\n\nconst COMMON_KEY_SET = new Set<string>(COMMON_KEYS as readonly string[])\n\nexport function stripCommonProps<T extends object>(\n props: T\n): Omit<T, keyof CommonStyleProps> {\n const out: Record<string, unknown> = {}\n\n for (const key of Object.keys(props as any)) {\n if (!COMMON_KEY_SET.has(key)) {\n out[key] = (props as any)[key]\n }\n }\n\n return out as Omit<T, keyof CommonStyleProps>\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// External Libraries\nimport { useMemo, useInsertionEffect } from 'react'\n\n// Utils\nimport {\n hashStr,\n splitRules,\n mergeStyleMaps,\n injectSlotRules,\n stableStringify,\n applyCommonsToStyles\n} from './utils'\n\n// Types\nimport type {\n CSSVars,\n RuleMap,\n StyleMap,\n StylesFactory,\n UseThemedStylesOptions\n} from './types'\n\n/**\n * useThemedStyles\n *\n * A React-Native-like style factory hook for React Web that also supports:\n * - CSS variables in inline styles\n * - Pseudo selectors, nested selectors, and vendor selectors via `__rules`\n *\n * It returns two maps:\n * - `styles`: inline styles for each slot\n * - `classes`: generated classes for each slot (needed for `__rules`)\n *\n * Usage:\n * ```tsx\n * const { styles, classes } = useThemedStyles(props, createStyles)\n *\n * return (\n * <button style={styles.item} className={classes.item}>\n * <p style={styles.label} className={classes.label}>Hello</p>\n * </button>\n * )\n * ```\n *\n * Notes:\n * - If a slot has no `__rules`, you can omit `className` for that slot.\n * - If you use `__rules`, you MUST apply the corresponding class for scoping.\n */\nexport function useThemedStyles<TProps, TStyles extends StyleMap>(\n props: TProps,\n factory: StylesFactory<TProps, TStyles>,\n options?: UseThemedStylesOptions<TProps, TStyles>\n): {\n styles: Record<keyof TStyles, React.CSSProperties | CSSVars>\n classes: Record<keyof TStyles, string>\n} {\n /**\n * Memoization priority:\n * 1) deps (manual)\n * 2) pick(props) (recommended)\n * 3) props reference (default behavior)\n */\n const memoKey =\n options?.deps ?? (options?.pick ? options.pick(props) : [props])\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: controlled by deps/pick\n const raw = useMemo(() => factory(props), [factory, ...memoKey])\n\n const { inline, rulesBySlot } = useMemo(() => splitRules(raw), [raw])\n\n /**\n * `override` is often passed inline (`{ container: {...} }`), which changes reference\n * every render and would break memoization.\n *\n * We create a stable signature string from the override and use it as the dependency.\n * This makes the merge re-run only when override *content* changes.\n */\n const overrideSig = useMemo(\n () => stableStringify(options?.override ?? {}),\n // biome-ignore lint/correctness/useExhaustiveDependencies: we intentionally depend on reference here to recompute signature\n [options?.override] as readonly unknown[]\n )\n\n /**\n * Merge inline styles with optional override (shallow merge per slot).\n *\n * Dependency is `overrideSig` (content), not the object reference.\n */\n const merged = useMemo(\n () => {\n return mergeStyleMaps(\n inline as unknown as StyleMap,\n options?.override as any\n ) as any\n },\n // biome-ignore lint/correctness/useExhaustiveDependencies: <Not needed>\n [inline, overrideSig] as readonly unknown[]\n )\n\n /**\n * Optionally apply common style props (spacing/typography/layout) on top of a slot.\n */\n const withCommons = useMemo(() => {\n if (!options?.applyCommonProps) return merged\n return applyCommonsToStyles(merged as any, props as any, options.commonSlot)\n }, [merged, props, options?.applyCommonProps, options?.commonSlot])\n\n /**\n * Base id is derived only from the rules signature.\n * This keeps class names stable whenever rules don't change.\n */\n const baseId = useMemo(() => {\n const sig = stableStringify(rulesBySlot)\n const key = hashStr(sig)\n return options?.debugName ? `pxr-${options.debugName}-${key}` : `pxr-${key}`\n }, [rulesBySlot, options?.debugName])\n\n /**\n * Generated class per slot.\n *\n * Important:\n * - It must be stable unless slots or rule-signature changes.\n * - It should NOT depend on `withCommons` (since commons may change frequently).\n * - Use `inline` keys (slots returned by the factory) as the source of truth.\n *\n * Example: pxr-<hash>__item\n */\n const classes = useMemo(() => {\n const out: any = {}\n for (const slotKey of Object.keys(inline)) {\n out[slotKey] = `${baseId}__${slotKey}`\n }\n return out as Record<keyof TStyles, string>\n }, [baseId, inline])\n\n /**\n * Inject rules into the runtime <style> tag.\n *\n * We use `useInsertionEffect` so styles are inserted before layout/paint\n * when supported (best for CSS-in-JS style injection).\n */\n useInsertionEffect(() => {\n for (const slotKey of Object.keys(rulesBySlot as any)) {\n const rules = (rulesBySlot as any)[slotKey] as RuleMap | undefined\n if (!rules) continue\n injectSlotRules((classes as any)[slotKey], rules)\n }\n }, [rulesBySlot, classes])\n\n return { styles: withCommons as any, classes }\n}\n","/**\n * Allows CSS Variables to be used in inline styles.\n *\n * Example:\n * ```ts\n * const style: CSSVars = { \"--btn-bg\": \"#111\", background: \"var(--btn-bg)\" }\n * ```\n */\nexport type CSSVars = React.CSSProperties &\n Record<`--${string}`, string | number>\n\n/**\n * A rule declaration is like CSSProperties, but also supports CSS variables.\n * Used inside `__rules`.\n */\nexport type RuleDecl = React.CSSProperties &\n Record<`--${string}`, string | number>\n\n/**\n * Map of selectors to declarations.\n *\n * Key examples:\n * - \"&:hover\"\n * - \"& > p\"\n * - \":focus-visible\" (auto-scoped to the slot class)\n * - \"::before\" (auto-scoped)\n * - \"span\" (scoped as descendant)\n * - \"&::-webkit-scrollbar\" (scoped)\n */\nexport type RuleMap = Record<string, RuleDecl>\n\n/**\n * Slot style supports a reserved `__rules` key.\n *\n * - Everything EXCEPT `__rules` is applied as inline style.\n * - `__rules` is converted into runtime CSS and injected into a <style> tag.\n *\n * This enables hover, pseudo-elements, descendant selectors, and vendor selectors.\n */\nexport type SlotStyle = (React.CSSProperties | CSSVars) & {\n __rules?: RuleMap\n}\n\n/**\n * A map of \"slots\" to styles.\n *\n * Example:\n * ```ts\n * {\n * container: {\n * ...,\n *\n * __rules: {\n * '&:hover': { ... },\n * ...\n * }\n * },\n * label: { ... },\n * icon: { ... }\n * }\n * ```\n */\nexport type StyleMap = Record<string, SlotStyle>\n\n/**\n * A style factory receives component props and returns a slot style map.\n */\nexport type StylesFactory<TProps, TStyles extends StyleMap> = (\n props: TProps\n) => TStyles\n\n/**\n * Options for `useThemedStyles`.\n */\nexport type UseThemedStylesOptions<TProps, TStyles extends StyleMap> = {\n /**\n * Optional optimization.\n *\n * When provided, the hook memoizes using the returned values instead of depending\n * on the entire `props` object reference.\n *\n * Recommended: create a `pickXStyleProps` per component.\n *\n * Example:\n * ```ts\n * pick: (p) => [p.variant, p.size, p.disabled, p.color]\n * ```\n */\n pick?: (props: TProps) => readonly unknown[]\n\n /**\n * Optional manual dependencies (highest priority).\n * If provided, `deps` is used instead of `pick` or `props`.\n */\n deps?: readonly unknown[]\n\n /**\n * Optional per-slot override.\n *\n * The override is shallow-merged per slot:\n * mergedSlot = { ...baseSlot, ...overrideSlot }\n *\n * Example:\n * ```ts\n * override: { container: { padding: \"0 24px\" } }\n * ```\n */\n override?: Partial<Record<keyof TStyles, SlotStyle>>\n\n /**\n * When true, reads \"common style props\" from `props`\n * and applies them on top of the chosen slot (default: \"container\").\n */\n applyCommonProps?: boolean\n\n /**\n * Where to apply common style props.\n *\n * Defaults to:\n * - \"container\" if that slot exists\n * - otherwise the first slot key returned by the style factory\n */\n commonSlot?: keyof TStyles\n\n /**\n * Optional debug label to make generated class names more readable.\n * Example: \"Button\" => \"pxr-Button-<hash>__container\"\n */\n debugName?: string\n}\n\nexport type SplitResult<TStyles extends StyleMap> = {\n /**\n * Inline styles only (slot styles with `__rules` removed).\n */\n inline: Record<keyof TStyles, Omit<TStyles[keyof TStyles], '__rules'>>\n\n /**\n * Extracted rule maps by slot.\n */\n rulesBySlot: Partial<Record<keyof TStyles, RuleMap>>\n}\n\n/**\n * Creates a style map from a plain object.\n */\nexport const styled = <T extends Record<string, SlotStyle>>(styles: T) => styles\n\n/**\n * A function that returns a style map.\n */\ntype StylesFactoryAny = (...args: any[]) => StyleMap\n\n/**\n * A map of partial style maps.\n */\nexport type TypeStyles<TFactory extends StylesFactoryAny> = Partial<{\n [K in keyof ReturnType<TFactory>]: SlotStyle\n}>\n"],"mappings":";;;;;;;AAIA,SAAgB,QAAQ,KAAa;CACnC,IAAI,IAAI;AACR,MAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,IAAK,KAAK,IAAI,KAAM,IAAI,WAAW,EAAE;AACrE,SAAQ,MAAM,GAAG,SAAS,GAAG;;;;;;;;;ACH/B,SAAgB,gBAAgB,KAAkB;AAChD,KAAI,OAAO,QAAQ,OAAO,QAAQ,SAAU,QAAO,OAAO,IAAI;AAC9D,KAAI,MAAM,QAAQ,IAAI,CAAE,QAAO,IAAI,IAAI,IAAI,gBAAgB,CAAC,KAAK,IAAI,CAAC;AAEtE,QAAO,IADM,OAAO,KAAK,IAAI,CAAC,MAAM,CACpB,KAAI,MAAK,GAAG,EAAE,GAAG,gBAAgB,IAAI,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC;;;;;;;;;ACIxE,MAAM,WAAW;;;;AAKjB,MAAM,wBAAQ,IAAI,KAAa;;;;AAK/B,SAAS,gBAAyC;AAChD,KAAI,OAAO,aAAa,YAAa,QAAO;CAC5C,IAAI,KAAK,SAAS,eAAe,SAAS;AAC1C,KAAI,CAAC,IAAI;AACP,OAAK,SAAS,cAAc,QAAQ;AACpC,KAAG,KAAK;AACR,WAAS,KAAK,YAAY,GAAG;;AAE/B,QAAO;;;;;;;;;;AAWT,MAAM,WAAW,IAAI,IAAI;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;AAMF,SAAS,QAAQ,MAAc;AAC7B,KAAI,KAAK,WAAW,KAAK,CAAE,QAAO;AAClC,QAAO,KAAK,QAA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K,OAAO,CACvC,KAAI,WAAW,GAAG,OAAO,IAAI;AAE/B,SAAO;IACN,CAAC,QAAQ,OAAO,CAAC;;;;;;;AAQpB,0BAAyB;AACvB,OAAK,MAAM,WAAW,OAAO,KAAK,YAAmB,EAAE;GACrD,MAAM,QAAS,YAAoB;AACnC,OAAI,CAAC,MAAO;AACZ,mBAAiB,QAAgB,UAAU,MAAM;;IAElD,CAAC,aAAa,QAAQ,CAAC;AAE1B,QAAO;EAAE,QAAQ;EAAoB;EAAS;;;;;;;;ACLhD,MAAa,UAA+C,WAAc"}
|
|
@@ -1,40 +1,3 @@
|
|
|
1
|
-
//#region src/hooks/useThemedStyles/types/styleProps.d.ts
|
|
2
|
-
type Space = number | string;
|
|
3
|
-
type Size = number | string;
|
|
4
|
-
interface MarginProps {
|
|
5
|
-
m?: Space;
|
|
6
|
-
mx?: Space;
|
|
7
|
-
my?: Space;
|
|
8
|
-
mt?: Space;
|
|
9
|
-
mr?: Space;
|
|
10
|
-
mb?: Space;
|
|
11
|
-
ml?: Space;
|
|
12
|
-
}
|
|
13
|
-
interface PaddingProps {
|
|
14
|
-
p?: Space;
|
|
15
|
-
px?: Space;
|
|
16
|
-
py?: Space;
|
|
17
|
-
pt?: Space;
|
|
18
|
-
pr?: Space;
|
|
19
|
-
pb?: Space;
|
|
20
|
-
pl?: Space;
|
|
21
|
-
}
|
|
22
|
-
interface TextProps {
|
|
23
|
-
fontSize?: number | string;
|
|
24
|
-
fontWeight?: React.CSSProperties['fontWeight'];
|
|
25
|
-
lineHeight?: number | string;
|
|
26
|
-
textAlign?: React.CSSProperties['textAlign'];
|
|
27
|
-
}
|
|
28
|
-
interface LayoutProps {
|
|
29
|
-
w?: Size;
|
|
30
|
-
h?: Size;
|
|
31
|
-
minW?: Size;
|
|
32
|
-
maxW?: Size;
|
|
33
|
-
minH?: Size;
|
|
34
|
-
maxH?: Size;
|
|
35
|
-
}
|
|
36
|
-
type CommonStyleProps = MarginProps & PaddingProps & TextProps & LayoutProps;
|
|
37
|
-
//#endregion
|
|
38
1
|
//#region src/hooks/useThemedStyles/types/useThemedStyles.d.ts
|
|
39
2
|
/**
|
|
40
3
|
* Allows CSS Variables to be used in inline styles.
|
|
@@ -102,5 +65,5 @@ type StylesFactoryAny = (...args: any[]) => StyleMap;
|
|
|
102
65
|
*/
|
|
103
66
|
type TypeStyles<TFactory extends StylesFactoryAny> = Partial<{ [K in keyof ReturnType<TFactory>]: SlotStyle }>;
|
|
104
67
|
//#endregion
|
|
105
|
-
export {
|
|
106
|
-
//# sourceMappingURL=useThemedStyles-
|
|
68
|
+
export { TypeStyles as n, StyleMap as t };
|
|
69
|
+
//# sourceMappingURL=useThemedStyles-CXoofBTv.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "softable-pixels-web",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "softable",
|
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
"types": "./dist/button.d.ts",
|
|
62
62
|
"import": "./dist/button.js"
|
|
63
63
|
},
|
|
64
|
+
"./icon-button": {
|
|
65
|
+
"types": "./dist/icon-button.d.ts",
|
|
66
|
+
"import": "./dist/icon-button.js"
|
|
67
|
+
},
|
|
64
68
|
"./check-item": {
|
|
65
69
|
"types": "./dist/check-item.d.ts",
|
|
66
70
|
"import": "./dist/check-item.js"
|
|
@@ -111,6 +115,9 @@
|
|
|
111
115
|
],
|
|
112
116
|
"button": [
|
|
113
117
|
"dist/button/index.d.ts"
|
|
118
|
+
],
|
|
119
|
+
"icon-button": [
|
|
120
|
+
"dist/icon-button/index.d.ts"
|
|
114
121
|
]
|
|
115
122
|
}
|
|
116
123
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Typography-ZFnL1M33.js","names":["parts: string[]","COMMON_MAP: Record<\n keyof CommonStyleProps,\n (value: any, out: React.CSSProperties) => void\n>","out: React.CSSProperties","inline: any","rulesBySlot: any","out: any","typographyVariants: Record<TypographyVariant, CSSProperties>","variantToElement: Record<\n TypographyVariant,\n keyof JSX.IntrinsicElements\n>","alignText: Record<TextAlign, CSSProperties>"],"sources":["../src/hooks/useThemedStyles/utils/hasString.ts","../src/hooks/useThemedStyles/utils/stableStringfy.ts","../src/hooks/useThemedStyles/utils/injectSlotsRule.ts","../src/hooks/useThemedStyles/utils/mergeStyleMaps.ts","../src/hooks/useThemedStyles/utils/resolveCommonStyleProps.ts","../src/hooks/useThemedStyles/utils/splitRules.ts","../src/hooks/useThemedStyles/utils/stripCommonProps.ts","../src/hooks/useThemedStyles/index.ts","../src/hooks/useThemedStyles/types/useThemedStyles.ts","../src/components/toolkit/Typography/config.ts","../src/components/toolkit/Typography/style.ts","../src/components/toolkit/Typography/index.tsx"],"sourcesContent":["/**\n * Small deterministic hash for strings (djb2 variant).\n * Used to generate stable class ids and cache keys.\n */\nexport function hashStr(str: string) {\n let h = 5381\n for (let i = 0; i < str.length; i++) h = (h * 33) ^ str.charCodeAt(i)\n return (h >>> 0).toString(36)\n}\n","/**\n * Stable stringify (order-independent) for hashing.\n * Sorts object keys to keep output deterministic.\n */\nexport function stableStringify(obj: any): string {\n if (obj == null || typeof obj !== 'object') return String(obj)\n if (Array.isArray(obj)) return `[${obj.map(stableStringify).join(',')}]`\n const keys = Object.keys(obj).sort()\n return `{${keys.map(k => `${k}:${stableStringify(obj[k])}`).join(',')}}`\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// Utils\nimport { hashStr } from './hasString'\nimport { stableStringify } from './stableStringfy'\n\n// Types\nimport type { RuleMap } from '../types'\n\n/**\n * Single <style> tag used for all runtime rules.\n */\nconst STYLE_ID = '__px_runtime_rules__'\n\n/**\n * Prevents injecting identical rules multiple times.\n */\nconst CACHE = new Set<string>()\n\n/**\n * Ensures the runtime <style> element exists and returns it.\n */\nfunction ensureStyleEl(): HTMLStyleElement | null {\n if (typeof document === 'undefined') return null\n let el = document.getElementById(STYLE_ID) as HTMLStyleElement | null\n if (!el) {\n el = document.createElement('style')\n el.id = STYLE_ID\n document.head.appendChild(el)\n }\n return el\n}\n\n/**\n * CSS properties that should NOT automatically receive \"px\" when given a number.\n *\n * Example:\n * - opacity: 0.5 (NOT 0.5px)\n * - zIndex: 10 (NOT 10px)\n * - lineHeight: 1.2 (NOT 1.2px)\n */\nconst UNITLESS = new Set([\n 'opacity',\n 'zIndex',\n 'fontWeight',\n 'flex',\n 'flexGrow',\n 'flexShrink',\n 'order',\n 'lineHeight'\n])\n\n/**\n * Converts camelCase CSS property names to kebab-case.\n * Keeps CSS variables intact (e.g. \"--px-bg\").\n */\nfunction toKebab(prop: string) {\n if (prop.startsWith('--')) return prop\n return prop.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`)\n}\n\n/**\n * Converts a JS value to a CSS value.\n *\n * - `number` => `\"${n}px\"` for most properties\n * - `number` => `\"${n}\"` for unitless properties\n * - `string` => string as-is\n */\nfunction toCssValue(prop: string, value: any) {\n if (value == null) return null\n if (typeof value === 'number' && !UNITLESS.has(prop)) return `${value}px`\n return String(value)\n}\n\n/**\n * Converts a declaration object to CSS string.\n *\n * Example:\n * `{ backgroundColor: \"red\", padding: 8 }`\n * => `\"background-color:red;padding:8px;\"`\n */\nfunction declToCss(decl: Record<string, any>) {\n const parts: string[] = []\n for (const [k, v] of Object.entries(decl)) {\n const cssValue = toCssValue(k, v)\n if (cssValue == null) continue\n parts.push(`${toKebab(k)}:${cssValue};`)\n }\n return parts.join('')\n}\n\n/**\n * Scopes a selector to a generated slot class.\n *\n * Rules:\n * - selectors containing \"&\" are replaced: \"&:hover\" => \".slot:hover\"\n * - selectors starting with \":\" become pseudo: \":hover\" => \".slot:hover\"\n * - otherwise it's treated as descendant: \"p\" => \".slot p\"\n */\nfunction scopeSelector(selector: string, baseClass: string) {\n const base = `.${baseClass}`\n\n if (selector.includes('&')) return selector.replaceAll('&', base)\n if (selector.startsWith(':')) return `${base}${selector}`\n return `${base} ${selector}`\n}\n\n/**\n * Injects CSS rules for one slot class into the runtime <style> tag.\n *\n * The injected CSS is cached using a hash of (slotClass + rules).\n */\nexport function injectSlotRules(slotClass: string, rules?: RuleMap) {\n if (!rules || Object.keys(rules).length === 0) return\n\n if (typeof document === 'undefined') return\n\n const signature = `${slotClass}:${stableStringify(rules)}`\n const key = hashStr(signature)\n if (CACHE.has(key)) return\n\n const css = Object.entries(rules)\n .map(\n ([sel, decl]) => `${scopeSelector(sel, slotClass)}{${declToCss(decl)}}`\n )\n .join('\\n')\n\n const el = ensureStyleEl()\n if (!el) return\n\n el.appendChild(document.createTextNode(`\\n${css}\\n`))\n CACHE.add(key)\n}\n","/**\n * Shallow-merge style maps slot-by-slot.\n * Warns when override contains unknown slots (developer UX).\n */\n\nimport type { SlotStyle, StyleMap } from '../types'\n\nexport function mergeStyleMaps<\n T extends StyleMap,\n X extends Partial<Record<keyof T, SlotStyle>>\n>(base: T, override?: X): T {\n if (!override) return base\n const out = { ...base } as T\n\n for (const key in override) {\n out[key] = { ...(base[key] ?? {}), ...(override[key] ?? {}) } as any\n }\n\n return out\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// Types\nimport type { CommonStyleProps } from '../types'\n\nfunction toCss(v: number | string | undefined) {\n return typeof v === 'number' ? `${v}rem` : v\n}\n\n/**\n * Source of truth: common prop -> how it maps into CSSProperties.\n * Add new common props ONLY here.\n */\nconst COMMON_MAP: Record<\n keyof CommonStyleProps,\n (value: any, out: React.CSSProperties) => void\n> = {\n // margin\n m: (v, o) => {\n o.margin = toCss(v)\n },\n mx: (v, o) => {\n o.marginLeft = toCss(v)\n o.marginRight = toCss(v)\n },\n my: (v, o) => {\n o.marginTop = toCss(v)\n o.marginBottom = toCss(v)\n },\n mt: (v, o) => {\n o.marginTop = toCss(v)\n },\n mr: (v, o) => {\n o.marginRight = toCss(v)\n },\n mb: (v, o) => {\n o.marginBottom = toCss(v)\n },\n ml: (v, o) => {\n o.marginLeft = toCss(v)\n },\n\n // padding\n p: (v, o) => {\n o.padding = toCss(v)\n },\n px: (v, o) => {\n o.paddingLeft = toCss(v)\n o.paddingRight = toCss(v)\n },\n py: (v, o) => {\n o.paddingTop = toCss(v)\n o.paddingBottom = toCss(v)\n },\n pt: (v, o) => {\n o.paddingTop = toCss(v)\n },\n pr: (v, o) => {\n o.paddingRight = toCss(v)\n },\n pb: (v, o) => {\n o.paddingBottom = toCss(v)\n },\n pl: (v, o) => {\n o.paddingLeft = toCss(v)\n },\n\n // text\n fontSize: (v, o) => {\n o.fontSize = toCss(v)\n },\n fontWeight: (v, o) => {\n o.fontWeight = v\n },\n lineHeight: (v, o) => {\n o.lineHeight = toCss(v)\n },\n textAlign: (v, o) => {\n o.textAlign = v\n },\n\n // layout\n w: (v, o) => {\n o.width = toCss(v)\n },\n h: (v, o) => {\n o.height = toCss(v)\n },\n minW: (v, o) => {\n o.minWidth = toCss(v)\n },\n maxW: (v, o) => {\n o.maxWidth = toCss(v)\n },\n minH: (v, o) => {\n o.minHeight = toCss(v)\n },\n maxH: (v, o) => {\n o.maxHeight = toCss(v)\n }\n}\n\nexport const COMMON_KEYS = Object.keys(COMMON_MAP) as Array<\n keyof CommonStyleProps\n>\n\nexport function hasAnyCommonStyleProps(props: Partial<CommonStyleProps>) {\n for (const k of COMMON_KEYS) {\n if (props[k] != null) return true\n }\n return false\n}\n\nexport function resolveCommonStyleProps(\n props: Partial<CommonStyleProps>\n): React.CSSProperties {\n const out: React.CSSProperties = {}\n\n for (const k of COMMON_KEYS) {\n const value = props[k]\n if (value != null) COMMON_MAP[k](value, out)\n }\n\n return out\n}\n\n/**\n * Applies common style props (if present) to a chosen slot.\n * Common props are resolved by `resolveCommonStyleProps`.\n */\nexport function applyCommonsToStyles<TStyles extends Record<string, any>>(\n styles: TStyles,\n props: Partial<CommonStyleProps>,\n slotOverride?: keyof TStyles\n): TStyles {\n if (!hasAnyCommonStyleProps(props)) return styles\n\n const keys = Object.keys(styles)\n if (keys.length === 0) return styles\n\n const slot =\n slotOverride ??\n (('container' in styles ? 'container' : keys[0]) as keyof TStyles)\n\n const common = resolveCommonStyleProps(props)\n\n return {\n ...styles,\n [slot]: { ...(styles[slot] ?? {}), ...common }\n } as TStyles\n}\n","// Types\n/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\nimport type { SplitResult, StyleMap } from '../types'\n\n/**\n * Splits the style map into:\n * - `inline`: slot styles without `__rules`\n * - `rulesBySlot`: extracted `__rules` grouped by slot\n *\n * This lets us:\n * - apply inline styles directly via `style={...}`\n * - inject selectors/pseudos via generated CSS classes\n */\nexport function splitRules<TStyles extends StyleMap>(\n styles: TStyles\n): SplitResult<TStyles> {\n const inline: any = {}\n const rulesBySlot: any = {}\n\n for (const key in styles) {\n const slot = styles[key]\n if (!slot) continue\n\n const { __rules, ...rest } = slot as any\n inline[key] = rest\n\n if (__rules && Object.keys(__rules).length > 0) {\n rulesBySlot[key] = __rules\n }\n }\n\n return { inline, rulesBySlot }\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\nimport type { CommonStyleProps } from '../types'\n\nimport { COMMON_KEYS } from './resolveCommonStyleProps'\n\nconst COMMON_KEY_SET = new Set<string>(COMMON_KEYS as readonly string[])\n\nexport function stripCommonProps<T extends object>(\n props: T\n): Omit<T, keyof CommonStyleProps> {\n const out: Record<string, unknown> = {}\n\n for (const key of Object.keys(props as any)) {\n if (!COMMON_KEY_SET.has(key)) {\n out[key] = (props as any)[key]\n }\n }\n\n return out as Omit<T, keyof CommonStyleProps>\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// External Libraries\nimport { useMemo, useInsertionEffect } from 'react'\n\n// Utils\nimport {\n hashStr,\n splitRules,\n mergeStyleMaps,\n injectSlotRules,\n stableStringify,\n applyCommonsToStyles\n} from './utils'\n\n// Types\nimport type {\n CSSVars,\n RuleMap,\n StyleMap,\n StylesFactory,\n UseThemedStylesOptions\n} from './types'\n\n/**\n * useThemedStyles\n *\n * A React-Native-like style factory hook for React Web that also supports:\n * - CSS variables in inline styles\n * - Pseudo selectors, nested selectors, and vendor selectors via `__rules`\n *\n * It returns two maps:\n * - `styles`: inline styles for each slot\n * - `classes`: generated classes for each slot (needed for `__rules`)\n *\n * Usage:\n * ```tsx\n * const { styles, classes } = useThemedStyles(props, createStyles)\n *\n * return (\n * <button style={styles.item} className={classes.item}>\n * <p style={styles.label} className={classes.label}>Hello</p>\n * </button>\n * )\n * ```\n *\n * Notes:\n * - If a slot has no `__rules`, you can omit `className` for that slot.\n * - If you use `__rules`, you MUST apply the corresponding class for scoping.\n */\nexport function useThemedStyles<TProps, TStyles extends StyleMap>(\n props: TProps,\n factory: StylesFactory<TProps, TStyles>,\n options?: UseThemedStylesOptions<TProps, TStyles>\n): {\n styles: Record<keyof TStyles, React.CSSProperties | CSSVars>\n classes: Record<keyof TStyles, string>\n} {\n /**\n * Memoization priority:\n * 1) deps (manual)\n * 2) pick(props) (recommended)\n * 3) props reference (default behavior)\n */\n const memoKey =\n options?.deps ?? (options?.pick ? options.pick(props) : [props])\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: controlled by deps/pick\n const raw = useMemo(() => factory(props), [factory, ...memoKey])\n\n const { inline, rulesBySlot } = useMemo(() => splitRules(raw), [raw])\n\n /**\n * `override` is often passed inline (`{ container: {...} }`), which changes reference\n * every render and would break memoization.\n *\n * We create a stable signature string from the override and use it as the dependency.\n * This makes the merge re-run only when override *content* changes.\n */\n const overrideSig = useMemo(\n () => stableStringify(options?.override ?? {}),\n // biome-ignore lint/correctness/useExhaustiveDependencies: we intentionally depend on reference here to recompute signature\n [options?.override] as readonly unknown[]\n )\n\n /**\n * Merge inline styles with optional override (shallow merge per slot).\n *\n * Dependency is `overrideSig` (content), not the object reference.\n */\n const merged = useMemo(\n () => {\n return mergeStyleMaps(\n inline as unknown as StyleMap,\n options?.override as any\n ) as any\n },\n // biome-ignore lint/correctness/useExhaustiveDependencies: <Not needed>\n [inline, overrideSig] as readonly unknown[]\n )\n\n /**\n * Optionally apply common style props (spacing/typography/layout) on top of a slot.\n */\n const withCommons = useMemo(() => {\n if (!options?.applyCommonProps) return merged\n return applyCommonsToStyles(merged as any, props as any, options.commonSlot)\n }, [merged, props, options?.applyCommonProps, options?.commonSlot])\n\n /**\n * Base id is derived only from the rules signature.\n * This keeps class names stable whenever rules don't change.\n */\n const baseId = useMemo(() => {\n const sig = stableStringify(rulesBySlot)\n const key = hashStr(sig)\n return options?.debugName ? `pxr-${options.debugName}-${key}` : `pxr-${key}`\n }, [rulesBySlot, options?.debugName])\n\n /**\n * Generated class per slot.\n *\n * Important:\n * - It must be stable unless slots or rule-signature changes.\n * - It should NOT depend on `withCommons` (since commons may change frequently).\n * - Use `inline` keys (slots returned by the factory) as the source of truth.\n *\n * Example: pxr-<hash>__item\n */\n const classes = useMemo(() => {\n const out: any = {}\n for (const slotKey of Object.keys(inline)) {\n out[slotKey] = `${baseId}__${slotKey}`\n }\n return out as Record<keyof TStyles, string>\n }, [baseId, inline])\n\n /**\n * Inject rules into the runtime <style> tag.\n *\n * We use `useInsertionEffect` so styles are inserted before layout/paint\n * when supported (best for CSS-in-JS style injection).\n */\n useInsertionEffect(() => {\n for (const slotKey of Object.keys(rulesBySlot as any)) {\n const rules = (rulesBySlot as any)[slotKey] as RuleMap | undefined\n if (!rules) continue\n injectSlotRules((classes as any)[slotKey], rules)\n }\n }, [rulesBySlot, classes])\n\n return { styles: withCommons as any, classes }\n}\n","/**\n * Allows CSS Variables to be used in inline styles.\n *\n * Example:\n * ```ts\n * const style: CSSVars = { \"--btn-bg\": \"#111\", background: \"var(--btn-bg)\" }\n * ```\n */\nexport type CSSVars = React.CSSProperties &\n Record<`--${string}`, string | number>\n\n/**\n * A rule declaration is like CSSProperties, but also supports CSS variables.\n * Used inside `__rules`.\n */\nexport type RuleDecl = React.CSSProperties &\n Record<`--${string}`, string | number>\n\n/**\n * Map of selectors to declarations.\n *\n * Key examples:\n * - \"&:hover\"\n * - \"& > p\"\n * - \":focus-visible\" (auto-scoped to the slot class)\n * - \"::before\" (auto-scoped)\n * - \"span\" (scoped as descendant)\n * - \"&::-webkit-scrollbar\" (scoped)\n */\nexport type RuleMap = Record<string, RuleDecl>\n\n/**\n * Slot style supports a reserved `__rules` key.\n *\n * - Everything EXCEPT `__rules` is applied as inline style.\n * - `__rules` is converted into runtime CSS and injected into a <style> tag.\n *\n * This enables hover, pseudo-elements, descendant selectors, and vendor selectors.\n */\nexport type SlotStyle = (React.CSSProperties | CSSVars) & {\n __rules?: RuleMap\n}\n\n/**\n * A map of \"slots\" to styles.\n *\n * Example:\n * ```ts\n * {\n * container: {\n * ...,\n *\n * __rules: {\n * '&:hover': { ... },\n * ...\n * }\n * },\n * label: { ... },\n * icon: { ... }\n * }\n * ```\n */\nexport type StyleMap = Record<string, SlotStyle>\n\n/**\n * A style factory receives component props and returns a slot style map.\n */\nexport type StylesFactory<TProps, TStyles extends StyleMap> = (\n props: TProps\n) => TStyles\n\n/**\n * Options for `useThemedStyles`.\n */\nexport type UseThemedStylesOptions<TProps, TStyles extends StyleMap> = {\n /**\n * Optional optimization.\n *\n * When provided, the hook memoizes using the returned values instead of depending\n * on the entire `props` object reference.\n *\n * Recommended: create a `pickXStyleProps` per component.\n *\n * Example:\n * ```ts\n * pick: (p) => [p.variant, p.size, p.disabled, p.color]\n * ```\n */\n pick?: (props: TProps) => readonly unknown[]\n\n /**\n * Optional manual dependencies (highest priority).\n * If provided, `deps` is used instead of `pick` or `props`.\n */\n deps?: readonly unknown[]\n\n /**\n * Optional per-slot override.\n *\n * The override is shallow-merged per slot:\n * mergedSlot = { ...baseSlot, ...overrideSlot }\n *\n * Example:\n * ```ts\n * override: { container: { padding: \"0 24px\" } }\n * ```\n */\n override?: Partial<Record<keyof TStyles, SlotStyle>>\n\n /**\n * When true, reads \"common style props\" from `props`\n * and applies them on top of the chosen slot (default: \"container\").\n */\n applyCommonProps?: boolean\n\n /**\n * Where to apply common style props.\n *\n * Defaults to:\n * - \"container\" if that slot exists\n * - otherwise the first slot key returned by the style factory\n */\n commonSlot?: keyof TStyles\n\n /**\n * Optional debug label to make generated class names more readable.\n * Example: \"Button\" => \"pxr-Button-<hash>__container\"\n */\n debugName?: string\n}\n\nexport type SplitResult<TStyles extends StyleMap> = {\n /**\n * Inline styles only (slot styles with `__rules` removed).\n */\n inline: Record<keyof TStyles, Omit<TStyles[keyof TStyles], '__rules'>>\n\n /**\n * Extracted rule maps by slot.\n */\n rulesBySlot: Partial<Record<keyof TStyles, RuleMap>>\n}\n\n/**\n * Creates a style map from a plain object.\n */\nexport const styled = <T extends Record<string, SlotStyle>>(styles: T) => styles\n\n/**\n * A function that returns a style map.\n */\ntype StylesFactoryAny = (...args: any[]) => StyleMap\n\n/**\n * A map of partial style maps.\n */\nexport type TypeStyles<TFactory extends StylesFactoryAny> = Partial<{\n [K in keyof ReturnType<TFactory>]: SlotStyle\n}>\n","// External Libraries\nimport type { CSSProperties, JSX } from 'react'\n\n// Types\nimport type { TextAlign, TypographyVariant } from './types'\n\nconst primaryColor = 'var(--px-text-primary)'\nconst secondaryColor = 'var(--px-text-secondary)'\n\nexport const typographyVariants: Record<TypographyVariant, CSSProperties> = {\n h1: {\n fontSize: '3rem',\n fontWeight: '700',\n lineHeight: '1.25',\n color: primaryColor\n },\n h2: {\n fontSize: '2.25rem',\n fontWeight: '600',\n lineHeight: '1.35',\n color: primaryColor\n },\n h3: {\n fontSize: '1.875rem',\n fontWeight: '600',\n color: primaryColor\n },\n h4: {\n fontSize: '1.5rem',\n fontWeight: '500',\n color: primaryColor\n },\n h5: {\n fontSize: '1.25rem',\n fontWeight: '500',\n color: primaryColor\n },\n b1: {\n fontSize: '1rem',\n fontWeight: '500',\n color: primaryColor\n },\n b2: {\n fontSize: '0.875rem',\n color: secondaryColor\n },\n b3: {\n fontSize: '0.75rem',\n color: secondaryColor\n },\n caption: {\n fontSize: '0.75rem',\n color: secondaryColor\n },\n legal: {\n fontSize: '0.65rem',\n textTransform: 'uppercase',\n letterSpacing: '0.025em',\n color: secondaryColor\n }\n}\n\nexport const variantToElement: Record<\n TypographyVariant,\n keyof JSX.IntrinsicElements\n> = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n b1: 'p',\n b2: 'p',\n b3: 'p',\n caption: 'span',\n legal: 'span'\n}\n\nexport const alignText: Record<TextAlign, CSSProperties> = {\n left: { textAlign: 'left' },\n center: { textAlign: 'center' },\n right: { textAlign: 'right' },\n justify: { textAlign: 'justify' }\n}\n","// Utils\nimport { alignText, typographyVariants } from './config'\n\n// Types\nimport type { TypographyProps } from './types'\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createTypographyStyles(props: TypographyProps): StyleMap {\n const { isLoading, variant, align = 'left', color } = props\n\n return styled({\n base: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n borderBottom: '1px solid var(--pixel-border, #e5e7eb)',\n gap: 0,\n animation: isLoading ? 'animate-pulse 1.5s infinite' : undefined\n },\n\n loading: {\n width: '50%',\n height: '1em',\n display: 'inline-block',\n backgroundColor: 'var(--pixel-gray-300, #d1d5db)',\n borderRadius: '0.25rem'\n },\n\n text: {\n ...alignText[align],\n ...typographyVariants[variant],\n color: color ?? typographyVariants[variant].color\n }\n })\n}\n","// Utils\nimport { variantToElement } from './config'\n\n// Types\nimport type { TypographyProps } from './types'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createTypographyStyles } from './style'\n\nexport function Typography(props: TypographyProps) {\n const {\n id,\n as,\n href,\n variant,\n children,\n placeholder,\n isLoading = false,\n styles: styleTypography\n } = props\n\n const { styles } = useThemedStyles(props, createTypographyStyles, {\n pick: p => [p.isLoading, p.variant, p.align],\n commonSlot: 'text',\n applyCommonProps: true,\n override: styleTypography\n })\n\n const Component = as ?? variantToElement[variant]\n\n if (isLoading) {\n return (\n <span\n id={id}\n aria-hidden=\"true\"\n role=\"presentation\"\n style={{ ...styles.text, ...styles.loading }}\n />\n )\n }\n\n const sharedProps = {\n id,\n style: styles.text,\n 'aria-label': placeholder\n }\n\n if (href) {\n return (\n <a href={href} {...sharedProps}>\n {children}\n </a>\n )\n }\n\n return <Component {...sharedProps}>{children}</Component>\n}\n"],"mappings":";;;;;;;;AAIA,SAAgB,QAAQ,KAAa;CACnC,IAAI,IAAI;AACR,MAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,IAAK,KAAK,IAAI,KAAM,IAAI,WAAW,EAAE;AACrE,SAAQ,MAAM,GAAG,SAAS,GAAG;;;;;;;;;ACH/B,SAAgB,gBAAgB,KAAkB;AAChD,KAAI,OAAO,QAAQ,OAAO,QAAQ,SAAU,QAAO,OAAO,IAAI;AAC9D,KAAI,MAAM,QAAQ,IAAI,CAAE,QAAO,IAAI,IAAI,IAAI,gBAAgB,CAAC,KAAK,IAAI,CAAC;AAEtE,QAAO,IADM,OAAO,KAAK,IAAI,CAAC,MAAM,CACpB,KAAI,MAAK,GAAG,EAAE,GAAG,gBAAgB,IAAI,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC;;;;;;;;;ACIxE,MAAM,WAAW;;;;AAKjB,MAAM,wBAAQ,IAAI,KAAa;;;;AAK/B,SAAS,gBAAyC;AAChD,KAAI,OAAO,aAAa,YAAa,QAAO;CAC5C,IAAI,KAAK,SAAS,eAAe,SAAS;AAC1C,KAAI,CAAC,IAAI;AACP,OAAK,SAAS,cAAc,QAAQ;AACpC,KAAG,KAAK;AACR,WAAS,KAAK,YAAY,GAAG;;AAE/B,QAAO;;;;;;;;;;AAWT,MAAM,WAAW,IAAI,IAAI;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;AAMF,SAAS,QAAQ,MAAc;AAC7B,KAAI,KAAK,WAAW,KAAK,CAAE,QAAO;AAClC,QAAO,KAAK,QAAQ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