@metamask-previews/design-system-react 0.0.0-preview.04cb60f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/LICENSE +20 -0
  3. package/README.md +15 -0
  4. package/dist/components/button/Button.cjs +10 -0
  5. package/dist/components/button/Button.cjs.map +1 -0
  6. package/dist/components/button/Button.d.cts +7 -0
  7. package/dist/components/button/Button.d.cts.map +1 -0
  8. package/dist/components/button/Button.d.mts +7 -0
  9. package/dist/components/button/Button.d.mts.map +1 -0
  10. package/dist/components/button/Button.mjs +10 -0
  11. package/dist/components/button/Button.mjs.map +1 -0
  12. package/dist/components/button/index.cjs +6 -0
  13. package/dist/components/button/index.cjs.map +1 -0
  14. package/dist/components/button/index.d.cts +3 -0
  15. package/dist/components/button/index.d.cts.map +1 -0
  16. package/dist/components/button/index.d.mts +3 -0
  17. package/dist/components/button/index.d.mts.map +1 -0
  18. package/dist/components/button/index.mjs +2 -0
  19. package/dist/components/button/index.mjs.map +1 -0
  20. package/dist/components/index.cjs +16 -0
  21. package/dist/components/index.cjs.map +1 -0
  22. package/dist/components/index.d.cts +6 -0
  23. package/dist/components/index.d.cts.map +1 -0
  24. package/dist/components/index.d.mts +6 -0
  25. package/dist/components/index.d.mts.map +1 -0
  26. package/dist/components/index.mjs +4 -0
  27. package/dist/components/index.mjs.map +1 -0
  28. package/dist/components/text/Text.cjs +20 -0
  29. package/dist/components/text/Text.cjs.map +1 -0
  30. package/dist/components/text/Text.constants.cjs +27 -0
  31. package/dist/components/text/Text.constants.cjs.map +1 -0
  32. package/dist/components/text/Text.constants.d.cts +5 -0
  33. package/dist/components/text/Text.constants.d.cts.map +1 -0
  34. package/dist/components/text/Text.constants.d.mts +5 -0
  35. package/dist/components/text/Text.constants.d.mts.map +1 -0
  36. package/dist/components/text/Text.constants.mjs +24 -0
  37. package/dist/components/text/Text.constants.mjs.map +1 -0
  38. package/dist/components/text/Text.d.cts +4 -0
  39. package/dist/components/text/Text.d.cts.map +1 -0
  40. package/dist/components/text/Text.d.mts +4 -0
  41. package/dist/components/text/Text.d.mts.map +1 -0
  42. package/dist/components/text/Text.mjs +20 -0
  43. package/dist/components/text/Text.mjs.map +1 -0
  44. package/dist/components/text/Text.types.cjs +96 -0
  45. package/dist/components/text/Text.types.cjs.map +1 -0
  46. package/dist/components/text/Text.types.d.cts +147 -0
  47. package/dist/components/text/Text.types.d.cts.map +1 -0
  48. package/dist/components/text/Text.types.d.mts +147 -0
  49. package/dist/components/text/Text.types.d.mts.map +1 -0
  50. package/dist/components/text/Text.types.mjs +93 -0
  51. package/dist/components/text/Text.types.mjs.map +1 -0
  52. package/dist/components/text/index.cjs +14 -0
  53. package/dist/components/text/index.cjs.map +1 -0
  54. package/dist/components/text/index.d.cts +4 -0
  55. package/dist/components/text/index.d.cts.map +1 -0
  56. package/dist/components/text/index.d.mts +4 -0
  57. package/dist/components/text/index.d.mts.map +1 -0
  58. package/dist/components/text/index.mjs +3 -0
  59. package/dist/components/text/index.mjs.map +1 -0
  60. package/dist/index.cjs +18 -0
  61. package/dist/index.cjs.map +1 -0
  62. package/dist/index.d.cts +2 -0
  63. package/dist/index.d.cts.map +1 -0
  64. package/dist/index.d.mts +2 -0
  65. package/dist/index.d.mts.map +1 -0
  66. package/dist/index.mjs +2 -0
  67. package/dist/index.mjs.map +1 -0
  68. package/dist/utils/tw-merge.cjs +67 -0
  69. package/dist/utils/tw-merge.cjs.map +1 -0
  70. package/dist/utils/tw-merge.d.cts +13 -0
  71. package/dist/utils/tw-merge.d.cts.map +1 -0
  72. package/dist/utils/tw-merge.d.mts +13 -0
  73. package/dist/utils/tw-merge.d.mts.map +1 -0
  74. package/dist/utils/tw-merge.mjs +64 -0
  75. package/dist/utils/tw-merge.mjs.map +1 -0
  76. package/package.json +81 -0
@@ -0,0 +1,147 @@
1
+ /// <reference types="react" />
2
+ export type TextProps = {
3
+ /**
4
+ * Optional prop for inline styles
5
+ */
6
+ style?: React.CSSProperties;
7
+ /**
8
+ * Optional prop to change the font size of the component. The Text component uses responsive font sizes.
9
+ * Different variants map to specific HTML elements by default.
10
+ * @default TextVariant.BodyMd
11
+ */
12
+ variant?: TextVariant;
13
+ /**
14
+ * The text content or elements to be rendered within the component.
15
+ */
16
+ children: React.ReactNode;
17
+ /**
18
+ * Optional prop for additional CSS classes to be applied to the Text component.
19
+ */
20
+ className?: string;
21
+ /**
22
+ * Optional prop to control the font weight of the text.
23
+ * - Normal: 400
24
+ * - Medium: 500
25
+ * - Bold: 700
26
+ */
27
+ fontWeight?: FontWeight;
28
+ /**
29
+ * Optional prop to control the font style of the text.
30
+ * Options: Normal, Italic
31
+ */
32
+ fontStyle?: FontStyle;
33
+ /**
34
+ * Optional prop to apply text transformation to the content.
35
+ * Options: Uppercase, Lowercase, Capitalize, Normal
36
+ */
37
+ textTransform?: TextTransform;
38
+ /**
39
+ * Optional prop to control the text alignment within its container.
40
+ * Options: Left, Center, Right, Justify
41
+ */
42
+ textAlign?: TextAlign;
43
+ /**
44
+ * Optional prop to determine how text should wrap when it reaches the edge of its container.
45
+ * Options: BreakWord, Anywhere, Normal
46
+ */
47
+ overflowWrap?: OverflowWrap;
48
+ /**
49
+ * Optional prop that when true, adds an ellipsis (...) when text overflows its container.
50
+ * @default false
51
+ */
52
+ ellipsis?: boolean;
53
+ /**
54
+ * Optional boolean that determines if the component should merge its props onto its immediate child
55
+ * instead of rendering a default DOM element.
56
+ * @default false
57
+ */
58
+ asChild?: boolean;
59
+ /**
60
+ * Optional prop that sets the color of the text using predefined theme colors.
61
+ * @default TextColor.TextDefault
62
+ */
63
+ color?: TextColor;
64
+ };
65
+ export declare enum TextVariant {
66
+ DisplayLg = "display-lg",
67
+ DisplayMd = "display-md",
68
+ HeadingLg = "heading-lg",
69
+ HeadingMd = "heading-md",
70
+ HeadingSm = "heading-sm",
71
+ BodyLg = "body-lg",
72
+ BodyMd = "body-md",
73
+ BodySm = "body-sm",
74
+ BodyXs = "body-xs"
75
+ }
76
+ export declare enum TextColor {
77
+ /** For default neutral text. */
78
+ TextDefault = "text-default",
79
+ /** For softer contrast neutral text */
80
+ TextAlternative = "text-alternative",
81
+ /** For the softest contrast neutral text (not accessible) */
82
+ TextMuted = "text-muted",
83
+ /** For elements used on top of overlay/alternative. Used for text, icon or border */
84
+ OverlayInverse = "text-overlay-inverse",
85
+ /** For interactive, active, and selected semantics. Used for text, background, icon or border */
86
+ PrimaryDefault = "text-primary-default",
87
+ /** For elements used on top of primary/default. Used for text, icon or border */
88
+ PrimaryInverse = "text-primary-inverse",
89
+ /** For the critical alert semantic elements. Used for text, background, icon or border */
90
+ ErrorDefault = "text-error-default",
91
+ /** For the stronger contrast error semantic elements. */
92
+ ErrorAlternative = "text-error-alternative",
93
+ /** For elements used on top of error/default. Used for text, icon or border */
94
+ ErrorInverse = "text-error-inverse",
95
+ /** For the positive semantic elements. Used for text, background, icon or border */
96
+ SuccessDefault = "text-success-default",
97
+ /** For elements used on top of success/default. Used for text, icon or border */
98
+ SuccessInverse = "text-success-inverse",
99
+ /** For the caution alert semantic elements. Used for text, background, icon or border */
100
+ WarningDefault = "text-warning-default",
101
+ /** For elements used on top of warning/default. Used for text, icon or border */
102
+ WarningInverse = "text-warning-inverse",
103
+ /** For informational read-only elements. Used for text, background, icon or border */
104
+ InfoDefault = "text-info-default",
105
+ /** For elements used on top of info/default. Used for text, icon or border */
106
+ InfoInverse = "text-info-inverse",
107
+ /** Inherit the color of the parent element */
108
+ Inherit = "text-inherit",
109
+ /** Make the text color transparent */
110
+ Transparent = "text-transparent"
111
+ }
112
+ export declare enum TextAlign {
113
+ Left = "text-left",
114
+ Center = "text-center",
115
+ Right = "text-right",
116
+ Justify = "text-justify"
117
+ }
118
+ export declare enum FontWeight {
119
+ /**
120
+ * Weight - 700
121
+ */
122
+ Bold = "font-bold",
123
+ /**
124
+ * Weight - 500
125
+ */
126
+ Medium = "font-medium",
127
+ /**
128
+ * Weight - 400
129
+ */
130
+ Normal = "font-normal"
131
+ }
132
+ export declare enum OverflowWrap {
133
+ BreakWord = "break-words",
134
+ Anywhere = "break-all",
135
+ Normal = "break-normal"
136
+ }
137
+ export declare enum FontStyle {
138
+ Italic = "italic",
139
+ Normal = "not-italic"
140
+ }
141
+ export declare enum TextTransform {
142
+ Uppercase = "uppercase",
143
+ Lowercase = "lowercase",
144
+ Capitalize = "capitalize",
145
+ Normal = "normal-case"
146
+ }
147
+ //# sourceMappingURL=Text.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.types.d.cts","sourceRoot":"","sources":["../../../src/components/text/Text.types.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,oBAAY,WAAW;IAErB,SAAS,eAAe;IACxB,SAAS,eAAe;IAGxB,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,SAAS,eAAe;IAGxB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;CACnB;AAED,oBAAY,SAAS;IACnB,gCAAgC;IAChC,WAAW,iBAAiB;IAC5B,uCAAuC;IACvC,eAAe,qBAAqB;IACpC,6DAA6D;IAC7D,SAAS,eAAe;IACxB,qFAAqF;IACrF,cAAc,yBAAyB;IACvC,iGAAiG;IACjG,cAAc,yBAAyB;IACvC,iFAAiF;IACjF,cAAc,yBAAyB;IACvC,0FAA0F;IAC1F,YAAY,uBAAuB;IACnC,yDAAyD;IACzD,gBAAgB,2BAA2B;IAC3C,+EAA+E;IAC/E,YAAY,uBAAuB;IACnC,oFAAoF;IACpF,cAAc,yBAAyB;IACvC,iFAAiF;IACjF,cAAc,yBAAyB;IACvC,yFAAyF;IACzF,cAAc,yBAAyB;IACvC,iFAAiF;IACjF,cAAc,yBAAyB;IACvC,sFAAsF;IACtF,WAAW,sBAAsB;IACjC,8EAA8E;IAC9E,WAAW,sBAAsB;IACjC,8CAA8C;IAC9C,OAAO,iBAAiB;IACxB,sCAAsC;IACtC,WAAW,qBAAqB;CACjC;AAED,oBAAY,SAAS;IACnB,IAAI,cAAc;IAClB,MAAM,gBAAgB;IACtB,KAAK,eAAe;IACpB,OAAO,iBAAiB;CACzB;AAED,oBAAY,UAAU;IACpB;;OAEG;IACH,IAAI,cAAc;IAClB;;OAEG;IACH,MAAM,gBAAgB;IACtB;;OAEG;IACH,MAAM,gBAAgB;CACvB;AAED,oBAAY,YAAY;IACtB,SAAS,gBAAgB;IACzB,QAAQ,cAAc;IACtB,MAAM,iBAAiB;CACxB;AAED,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,eAAe;CACtB;AAED,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,MAAM,gBAAgB;CACvB"}
@@ -0,0 +1,147 @@
1
+ /// <reference types="react" />
2
+ export type TextProps = {
3
+ /**
4
+ * Optional prop for inline styles
5
+ */
6
+ style?: React.CSSProperties;
7
+ /**
8
+ * Optional prop to change the font size of the component. The Text component uses responsive font sizes.
9
+ * Different variants map to specific HTML elements by default.
10
+ * @default TextVariant.BodyMd
11
+ */
12
+ variant?: TextVariant;
13
+ /**
14
+ * The text content or elements to be rendered within the component.
15
+ */
16
+ children: React.ReactNode;
17
+ /**
18
+ * Optional prop for additional CSS classes to be applied to the Text component.
19
+ */
20
+ className?: string;
21
+ /**
22
+ * Optional prop to control the font weight of the text.
23
+ * - Normal: 400
24
+ * - Medium: 500
25
+ * - Bold: 700
26
+ */
27
+ fontWeight?: FontWeight;
28
+ /**
29
+ * Optional prop to control the font style of the text.
30
+ * Options: Normal, Italic
31
+ */
32
+ fontStyle?: FontStyle;
33
+ /**
34
+ * Optional prop to apply text transformation to the content.
35
+ * Options: Uppercase, Lowercase, Capitalize, Normal
36
+ */
37
+ textTransform?: TextTransform;
38
+ /**
39
+ * Optional prop to control the text alignment within its container.
40
+ * Options: Left, Center, Right, Justify
41
+ */
42
+ textAlign?: TextAlign;
43
+ /**
44
+ * Optional prop to determine how text should wrap when it reaches the edge of its container.
45
+ * Options: BreakWord, Anywhere, Normal
46
+ */
47
+ overflowWrap?: OverflowWrap;
48
+ /**
49
+ * Optional prop that when true, adds an ellipsis (...) when text overflows its container.
50
+ * @default false
51
+ */
52
+ ellipsis?: boolean;
53
+ /**
54
+ * Optional boolean that determines if the component should merge its props onto its immediate child
55
+ * instead of rendering a default DOM element.
56
+ * @default false
57
+ */
58
+ asChild?: boolean;
59
+ /**
60
+ * Optional prop that sets the color of the text using predefined theme colors.
61
+ * @default TextColor.TextDefault
62
+ */
63
+ color?: TextColor;
64
+ };
65
+ export declare enum TextVariant {
66
+ DisplayLg = "display-lg",
67
+ DisplayMd = "display-md",
68
+ HeadingLg = "heading-lg",
69
+ HeadingMd = "heading-md",
70
+ HeadingSm = "heading-sm",
71
+ BodyLg = "body-lg",
72
+ BodyMd = "body-md",
73
+ BodySm = "body-sm",
74
+ BodyXs = "body-xs"
75
+ }
76
+ export declare enum TextColor {
77
+ /** For default neutral text. */
78
+ TextDefault = "text-default",
79
+ /** For softer contrast neutral text */
80
+ TextAlternative = "text-alternative",
81
+ /** For the softest contrast neutral text (not accessible) */
82
+ TextMuted = "text-muted",
83
+ /** For elements used on top of overlay/alternative. Used for text, icon or border */
84
+ OverlayInverse = "text-overlay-inverse",
85
+ /** For interactive, active, and selected semantics. Used for text, background, icon or border */
86
+ PrimaryDefault = "text-primary-default",
87
+ /** For elements used on top of primary/default. Used for text, icon or border */
88
+ PrimaryInverse = "text-primary-inverse",
89
+ /** For the critical alert semantic elements. Used for text, background, icon or border */
90
+ ErrorDefault = "text-error-default",
91
+ /** For the stronger contrast error semantic elements. */
92
+ ErrorAlternative = "text-error-alternative",
93
+ /** For elements used on top of error/default. Used for text, icon or border */
94
+ ErrorInverse = "text-error-inverse",
95
+ /** For the positive semantic elements. Used for text, background, icon or border */
96
+ SuccessDefault = "text-success-default",
97
+ /** For elements used on top of success/default. Used for text, icon or border */
98
+ SuccessInverse = "text-success-inverse",
99
+ /** For the caution alert semantic elements. Used for text, background, icon or border */
100
+ WarningDefault = "text-warning-default",
101
+ /** For elements used on top of warning/default. Used for text, icon or border */
102
+ WarningInverse = "text-warning-inverse",
103
+ /** For informational read-only elements. Used for text, background, icon or border */
104
+ InfoDefault = "text-info-default",
105
+ /** For elements used on top of info/default. Used for text, icon or border */
106
+ InfoInverse = "text-info-inverse",
107
+ /** Inherit the color of the parent element */
108
+ Inherit = "text-inherit",
109
+ /** Make the text color transparent */
110
+ Transparent = "text-transparent"
111
+ }
112
+ export declare enum TextAlign {
113
+ Left = "text-left",
114
+ Center = "text-center",
115
+ Right = "text-right",
116
+ Justify = "text-justify"
117
+ }
118
+ export declare enum FontWeight {
119
+ /**
120
+ * Weight - 700
121
+ */
122
+ Bold = "font-bold",
123
+ /**
124
+ * Weight - 500
125
+ */
126
+ Medium = "font-medium",
127
+ /**
128
+ * Weight - 400
129
+ */
130
+ Normal = "font-normal"
131
+ }
132
+ export declare enum OverflowWrap {
133
+ BreakWord = "break-words",
134
+ Anywhere = "break-all",
135
+ Normal = "break-normal"
136
+ }
137
+ export declare enum FontStyle {
138
+ Italic = "italic",
139
+ Normal = "not-italic"
140
+ }
141
+ export declare enum TextTransform {
142
+ Uppercase = "uppercase",
143
+ Lowercase = "lowercase",
144
+ Capitalize = "capitalize",
145
+ Normal = "normal-case"
146
+ }
147
+ //# sourceMappingURL=Text.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.types.d.mts","sourceRoot":"","sources":["../../../src/components/text/Text.types.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,oBAAY,WAAW;IAErB,SAAS,eAAe;IACxB,SAAS,eAAe;IAGxB,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,SAAS,eAAe;IAGxB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;CACnB;AAED,oBAAY,SAAS;IACnB,gCAAgC;IAChC,WAAW,iBAAiB;IAC5B,uCAAuC;IACvC,eAAe,qBAAqB;IACpC,6DAA6D;IAC7D,SAAS,eAAe;IACxB,qFAAqF;IACrF,cAAc,yBAAyB;IACvC,iGAAiG;IACjG,cAAc,yBAAyB;IACvC,iFAAiF;IACjF,cAAc,yBAAyB;IACvC,0FAA0F;IAC1F,YAAY,uBAAuB;IACnC,yDAAyD;IACzD,gBAAgB,2BAA2B;IAC3C,+EAA+E;IAC/E,YAAY,uBAAuB;IACnC,oFAAoF;IACpF,cAAc,yBAAyB;IACvC,iFAAiF;IACjF,cAAc,yBAAyB;IACvC,yFAAyF;IACzF,cAAc,yBAAyB;IACvC,iFAAiF;IACjF,cAAc,yBAAyB;IACvC,sFAAsF;IACtF,WAAW,sBAAsB;IACjC,8EAA8E;IAC9E,WAAW,sBAAsB;IACjC,8CAA8C;IAC9C,OAAO,iBAAiB;IACxB,sCAAsC;IACtC,WAAW,qBAAqB;CACjC;AAED,oBAAY,SAAS;IACnB,IAAI,cAAc;IAClB,MAAM,gBAAgB;IACtB,KAAK,eAAe;IACpB,OAAO,iBAAiB;CACzB;AAED,oBAAY,UAAU;IACpB;;OAEG;IACH,IAAI,cAAc;IAClB;;OAEG;IACH,MAAM,gBAAgB;IACtB;;OAEG;IACH,MAAM,gBAAgB;CACvB;AAED,oBAAY,YAAY;IACtB,SAAS,gBAAgB;IACzB,QAAQ,cAAc;IACtB,MAAM,iBAAiB;CACxB;AAED,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,eAAe;CACtB;AAED,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,MAAM,gBAAgB;CACvB"}
@@ -0,0 +1,93 @@
1
+ export var TextVariant;
2
+ (function (TextVariant) {
3
+ // Display Sizes
4
+ TextVariant["DisplayLg"] = "display-lg";
5
+ TextVariant["DisplayMd"] = "display-md";
6
+ // Heading Sizes
7
+ TextVariant["HeadingLg"] = "heading-lg";
8
+ TextVariant["HeadingMd"] = "heading-md";
9
+ TextVariant["HeadingSm"] = "heading-sm";
10
+ // Font Sizes
11
+ TextVariant["BodyLg"] = "body-lg";
12
+ TextVariant["BodyMd"] = "body-md";
13
+ TextVariant["BodySm"] = "body-sm";
14
+ TextVariant["BodyXs"] = "body-xs";
15
+ })(TextVariant || (TextVariant = {}));
16
+ export var TextColor;
17
+ (function (TextColor) {
18
+ /** For default neutral text. */
19
+ TextColor["TextDefault"] = "text-default";
20
+ /** For softer contrast neutral text */
21
+ TextColor["TextAlternative"] = "text-alternative";
22
+ /** For the softest contrast neutral text (not accessible) */
23
+ TextColor["TextMuted"] = "text-muted";
24
+ /** For elements used on top of overlay/alternative. Used for text, icon or border */
25
+ TextColor["OverlayInverse"] = "text-overlay-inverse";
26
+ /** For interactive, active, and selected semantics. Used for text, background, icon or border */
27
+ TextColor["PrimaryDefault"] = "text-primary-default";
28
+ /** For elements used on top of primary/default. Used for text, icon or border */
29
+ TextColor["PrimaryInverse"] = "text-primary-inverse";
30
+ /** For the critical alert semantic elements. Used for text, background, icon or border */
31
+ TextColor["ErrorDefault"] = "text-error-default";
32
+ /** For the stronger contrast error semantic elements. */
33
+ TextColor["ErrorAlternative"] = "text-error-alternative";
34
+ /** For elements used on top of error/default. Used for text, icon or border */
35
+ TextColor["ErrorInverse"] = "text-error-inverse";
36
+ /** For the positive semantic elements. Used for text, background, icon or border */
37
+ TextColor["SuccessDefault"] = "text-success-default";
38
+ /** For elements used on top of success/default. Used for text, icon or border */
39
+ TextColor["SuccessInverse"] = "text-success-inverse";
40
+ /** For the caution alert semantic elements. Used for text, background, icon or border */
41
+ TextColor["WarningDefault"] = "text-warning-default";
42
+ /** For elements used on top of warning/default. Used for text, icon or border */
43
+ TextColor["WarningInverse"] = "text-warning-inverse";
44
+ /** For informational read-only elements. Used for text, background, icon or border */
45
+ TextColor["InfoDefault"] = "text-info-default";
46
+ /** For elements used on top of info/default. Used for text, icon or border */
47
+ TextColor["InfoInverse"] = "text-info-inverse";
48
+ /** Inherit the color of the parent element */
49
+ TextColor["Inherit"] = "text-inherit";
50
+ /** Make the text color transparent */
51
+ TextColor["Transparent"] = "text-transparent";
52
+ })(TextColor || (TextColor = {}));
53
+ export var TextAlign;
54
+ (function (TextAlign) {
55
+ TextAlign["Left"] = "text-left";
56
+ TextAlign["Center"] = "text-center";
57
+ TextAlign["Right"] = "text-right";
58
+ TextAlign["Justify"] = "text-justify";
59
+ })(TextAlign || (TextAlign = {}));
60
+ export var FontWeight;
61
+ (function (FontWeight) {
62
+ /**
63
+ * Weight - 700
64
+ */
65
+ FontWeight["Bold"] = "font-bold";
66
+ /**
67
+ * Weight - 500
68
+ */
69
+ FontWeight["Medium"] = "font-medium";
70
+ /**
71
+ * Weight - 400
72
+ */
73
+ FontWeight["Normal"] = "font-normal";
74
+ })(FontWeight || (FontWeight = {}));
75
+ export var OverflowWrap;
76
+ (function (OverflowWrap) {
77
+ OverflowWrap["BreakWord"] = "break-words";
78
+ OverflowWrap["Anywhere"] = "break-all";
79
+ OverflowWrap["Normal"] = "break-normal";
80
+ })(OverflowWrap || (OverflowWrap = {}));
81
+ export var FontStyle;
82
+ (function (FontStyle) {
83
+ FontStyle["Italic"] = "italic";
84
+ FontStyle["Normal"] = "not-italic";
85
+ })(FontStyle || (FontStyle = {}));
86
+ export var TextTransform;
87
+ (function (TextTransform) {
88
+ TextTransform["Uppercase"] = "uppercase";
89
+ TextTransform["Lowercase"] = "lowercase";
90
+ TextTransform["Capitalize"] = "capitalize";
91
+ TextTransform["Normal"] = "normal-case";
92
+ })(TextTransform || (TextTransform = {}));
93
+ //# sourceMappingURL=Text.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/text/Text.types.ts"],"names":[],"mappings":"AAgEA,MAAM,CAAN,IAAY,WAeX;AAfD,WAAY,WAAW;IACrB,gBAAgB;IAChB,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IAExB,gBAAgB;IAChB,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IAExB,aAAa;IACb,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;AACpB,CAAC,EAfW,WAAW,KAAX,WAAW,QAetB;AAED,MAAM,CAAN,IAAY,SAmCX;AAnCD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAA4B,CAAA;IAC5B,uCAAuC;IACvC,iDAAoC,CAAA;IACpC,6DAA6D;IAC7D,qCAAwB,CAAA;IACxB,qFAAqF;IACrF,oDAAuC,CAAA;IACvC,iGAAiG;IACjG,oDAAuC,CAAA;IACvC,iFAAiF;IACjF,oDAAuC,CAAA;IACvC,0FAA0F;IAC1F,gDAAmC,CAAA;IACnC,yDAAyD;IACzD,wDAA2C,CAAA;IAC3C,+EAA+E;IAC/E,gDAAmC,CAAA;IACnC,oFAAoF;IACpF,oDAAuC,CAAA;IACvC,iFAAiF;IACjF,oDAAuC,CAAA;IACvC,yFAAyF;IACzF,oDAAuC,CAAA;IACvC,iFAAiF;IACjF,oDAAuC,CAAA;IACvC,sFAAsF;IACtF,8CAAiC,CAAA;IACjC,8EAA8E;IAC9E,8CAAiC,CAAA;IACjC,8CAA8C;IAC9C,qCAAwB,CAAA;IACxB,sCAAsC;IACtC,6CAAgC,CAAA;AAClC,CAAC,EAnCW,SAAS,KAAT,SAAS,QAmCpB;AAED,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,+BAAkB,CAAA;IAClB,mCAAsB,CAAA;IACtB,iCAAoB,CAAA;IACpB,qCAAwB,CAAA;AAC1B,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED,MAAM,CAAN,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB;;OAEG;IACH,gCAAkB,CAAA;IAClB;;OAEG;IACH,oCAAsB,CAAA;IACtB;;OAEG;IACH,oCAAsB,CAAA;AACxB,CAAC,EAbW,UAAU,KAAV,UAAU,QAarB;AAED,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,yCAAyB,CAAA;IACzB,sCAAsB,CAAA;IACtB,uCAAuB,CAAA;AACzB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,kCAAqB,CAAA;AACvB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;IACvB,0CAAyB,CAAA;IACzB,uCAAsB,CAAA;AACxB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB","sourcesContent":["export type TextProps = {\n /**\n * Optional prop for inline styles\n */\n style?: React.CSSProperties;\n /**\n * Optional prop to change the font size of the component. The Text component uses responsive font sizes.\n * Different variants map to specific HTML elements by default.\n * @default TextVariant.BodyMd\n */\n variant?: TextVariant;\n /**\n * The text content or elements to be rendered within the component.\n */\n children: React.ReactNode;\n /**\n * Optional prop for additional CSS classes to be applied to the Text component.\n */\n className?: string;\n /**\n * Optional prop to control the font weight of the text.\n * - Normal: 400\n * - Medium: 500\n * - Bold: 700\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to control the font style of the text.\n * Options: Normal, Italic\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to apply text transformation to the content.\n * Options: Uppercase, Lowercase, Capitalize, Normal\n */\n textTransform?: TextTransform;\n /**\n * Optional prop to control the text alignment within its container.\n * Options: Left, Center, Right, Justify\n */\n textAlign?: TextAlign;\n /**\n * Optional prop to determine how text should wrap when it reaches the edge of its container.\n * Options: BreakWord, Anywhere, Normal\n */\n overflowWrap?: OverflowWrap;\n /**\n * Optional prop that when true, adds an ellipsis (...) when text overflows its container.\n * @default false\n */\n ellipsis?: boolean;\n /**\n * Optional boolean that determines if the component should merge its props onto its immediate child\n * instead of rendering a default DOM element.\n * @default false\n */\n asChild?: boolean;\n /**\n * Optional prop that sets the color of the text using predefined theme colors.\n * @default TextColor.TextDefault\n */\n color?: TextColor;\n};\n\nexport enum TextVariant {\n // Display Sizes\n DisplayLg = 'display-lg',\n DisplayMd = 'display-md',\n\n // Heading Sizes\n HeadingLg = 'heading-lg',\n HeadingMd = 'heading-md',\n HeadingSm = 'heading-sm',\n\n // Font Sizes\n BodyLg = 'body-lg',\n BodyMd = 'body-md',\n BodySm = 'body-sm',\n BodyXs = 'body-xs',\n}\n\nexport enum TextColor {\n /** For default neutral text. */\n TextDefault = 'text-default',\n /** For softer contrast neutral text */\n TextAlternative = 'text-alternative',\n /** For the softest contrast neutral text (not accessible) */\n TextMuted = 'text-muted',\n /** For elements used on top of overlay/alternative. Used for text, icon or border */\n OverlayInverse = 'text-overlay-inverse',\n /** For interactive, active, and selected semantics. Used for text, background, icon or border */\n PrimaryDefault = 'text-primary-default',\n /** For elements used on top of primary/default. Used for text, icon or border */\n PrimaryInverse = 'text-primary-inverse',\n /** For the critical alert semantic elements. Used for text, background, icon or border */\n ErrorDefault = 'text-error-default',\n /** For the stronger contrast error semantic elements. */\n ErrorAlternative = 'text-error-alternative',\n /** For elements used on top of error/default. Used for text, icon or border */\n ErrorInverse = 'text-error-inverse',\n /** For the positive semantic elements. Used for text, background, icon or border */\n SuccessDefault = 'text-success-default',\n /** For elements used on top of success/default. Used for text, icon or border */\n SuccessInverse = 'text-success-inverse',\n /** For the caution alert semantic elements. Used for text, background, icon or border */\n WarningDefault = 'text-warning-default',\n /** For elements used on top of warning/default. Used for text, icon or border */\n WarningInverse = 'text-warning-inverse',\n /** For informational read-only elements. Used for text, background, icon or border */\n InfoDefault = 'text-info-default',\n /** For elements used on top of info/default. Used for text, icon or border */\n InfoInverse = 'text-info-inverse',\n /** Inherit the color of the parent element */\n Inherit = 'text-inherit',\n /** Make the text color transparent */\n Transparent = 'text-transparent',\n}\n\nexport enum TextAlign {\n Left = 'text-left',\n Center = 'text-center',\n Right = 'text-right',\n Justify = 'text-justify',\n}\n\nexport enum FontWeight {\n /**\n * Weight - 700\n */\n Bold = 'font-bold',\n /**\n * Weight - 500\n */\n Medium = 'font-medium',\n /**\n * Weight - 400\n */\n Normal = 'font-normal',\n}\n\nexport enum OverflowWrap {\n BreakWord = 'break-words',\n Anywhere = 'break-all',\n Normal = 'break-normal',\n}\n\nexport enum FontStyle {\n Italic = 'italic',\n Normal = 'not-italic',\n}\n\nexport enum TextTransform {\n Uppercase = 'uppercase',\n Lowercase = 'lowercase',\n Capitalize = 'capitalize',\n Normal = 'normal-case',\n}\n"]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OverflowWrap = exports.TextTransform = exports.FontStyle = exports.FontWeight = exports.TextAlign = exports.TextColor = exports.TextVariant = exports.Text = void 0;
4
+ var Text_1 = require("./Text.cjs");
5
+ Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return Text_1.Text; } });
6
+ var Text_types_1 = require("./Text.types.cjs");
7
+ Object.defineProperty(exports, "TextVariant", { enumerable: true, get: function () { return Text_types_1.TextVariant; } });
8
+ Object.defineProperty(exports, "TextColor", { enumerable: true, get: function () { return Text_types_1.TextColor; } });
9
+ Object.defineProperty(exports, "TextAlign", { enumerable: true, get: function () { return Text_types_1.TextAlign; } });
10
+ Object.defineProperty(exports, "FontWeight", { enumerable: true, get: function () { return Text_types_1.FontWeight; } });
11
+ Object.defineProperty(exports, "FontStyle", { enumerable: true, get: function () { return Text_types_1.FontStyle; } });
12
+ Object.defineProperty(exports, "TextTransform", { enumerable: true, get: function () { return Text_types_1.TextTransform; } });
13
+ Object.defineProperty(exports, "OverflowWrap", { enumerable: true, get: function () { return Text_types_1.OverflowWrap; } });
14
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/text/index.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,+CAQsB;AAPpB,yGAAA,WAAW,OAAA;AACX,uGAAA,SAAS,OAAA;AACT,uGAAA,SAAS,OAAA;AACT,wGAAA,UAAU,OAAA;AACV,uGAAA,SAAS,OAAA;AACT,2GAAA,aAAa,OAAA;AACb,0GAAA,YAAY,OAAA","sourcesContent":["export { Text } from './Text';\nexport {\n TextVariant,\n TextColor,\n TextAlign,\n FontWeight,\n FontStyle,\n TextTransform,\n OverflowWrap,\n} from './Text.types';\nexport type { TextProps } from './Text.types';\n"]}
@@ -0,0 +1,4 @@
1
+ export { Text } from "./Text.cjs";
2
+ export { TextVariant, TextColor, TextAlign, FontWeight, FontStyle, TextTransform, OverflowWrap, } from "./Text.types.cjs";
3
+ export type { TextProps } from "./Text.types.cjs";
4
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,OAAO,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,GACb,yBAAqB;AACtB,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
@@ -0,0 +1,4 @@
1
+ export { Text } from "./Text.mjs";
2
+ export { TextVariant, TextColor, TextAlign, FontWeight, FontStyle, TextTransform, OverflowWrap, } from "./Text.types.mjs";
3
+ export type { TextProps } from "./Text.types.mjs";
4
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,OAAO,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,GACb,yBAAqB;AACtB,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
@@ -0,0 +1,3 @@
1
+ export { Text } from "./Text.mjs";
2
+ export { TextVariant, TextColor, TextAlign, FontWeight, FontStyle, TextTransform, OverflowWrap } from "./Text.types.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,OAAO,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACb,yBAAqB","sourcesContent":["export { Text } from './Text';\nexport {\n TextVariant,\n TextColor,\n TextAlign,\n FontWeight,\n FontStyle,\n TextTransform,\n OverflowWrap,\n} from './Text.types';\nexport type { TextProps } from './Text.types';\n"]}
package/dist/index.cjs ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components/index.cjs"), exports);
18
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAA6B","sourcesContent":["export * from './components';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from "./components/index.cjs";
2
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uCAA6B"}
@@ -0,0 +1,2 @@
1
+ export * from "./components/index.mjs";
2
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uCAA6B"}
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./components/index.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uCAA6B","sourcesContent":["export * from './components';\n"]}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.twMerge = void 0;
4
+ const tailwind_merge_1 = require("tailwind-merge");
5
+ const variantClassGroups = [
6
+ 's-display-md',
7
+ 's-heading-lg',
8
+ 's-heading-md',
9
+ 's-heading-sm',
10
+ 's-body-lg',
11
+ 's-body-md',
12
+ 's-body-sm',
13
+ 's-body-xs',
14
+ 'l-display-md',
15
+ 'l-heading-lg',
16
+ 'l-heading-md',
17
+ 'l-heading-sm',
18
+ 'l-body-lg',
19
+ 'l-body-md',
20
+ 'l-body-sm',
21
+ 'l-body-xs',
22
+ ];
23
+ /**
24
+ * Custom Tailwind Merge configuration to handle our design system's typography classes.
25
+ * This extends the default Tailwind Merge behavior to properly handle conflicts between:
26
+ * 1. Custom text color classes (text-default, text-alternative, text-muted)
27
+ * 2. Typography variant classes for font sizes (e.g., s-body-md, l-heading-lg)
28
+ * 3. Standard and custom font weight classes
29
+ *
30
+ * Without this configuration, Tailwind Merge wouldn't know these classes are meant
31
+ * to override each other, potentially leading to multiple conflicting classes
32
+ * being applied simultaneously.
33
+ */
34
+ exports.twMerge = (0, tailwind_merge_1.extendTailwindMerge)({
35
+ extend: {
36
+ classGroups: {
37
+ 'text-color': ['text-default', 'text-alternative', 'text-muted'],
38
+ 'font-size': [
39
+ {
40
+ text: variantClassGroups,
41
+ },
42
+ ],
43
+ 'font-weight': [
44
+ // Standard Tailwind font weights
45
+ 'font-thin',
46
+ 'font-extralight',
47
+ 'font-light',
48
+ 'font-normal',
49
+ 'font-medium',
50
+ 'font-semibold',
51
+ 'font-bold',
52
+ 'font-extrabold',
53
+ 'font-black',
54
+ // Custom typography classes
55
+ {
56
+ font: variantClassGroups,
57
+ },
58
+ ],
59
+ },
60
+ conflictingClassGroups: {
61
+ 'text-color': ['text-color'],
62
+ 'font-size': ['font-size'],
63
+ 'font-weight': ['font-weight'],
64
+ },
65
+ },
66
+ });
67
+ //# sourceMappingURL=tw-merge.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tw-merge.cjs","sourceRoot":"","sources":["../../src/utils/tw-merge.ts"],"names":[],"mappings":";;;AAAA,mDAAqD;AAErD,MAAM,kBAAkB,GAAG;IACzB,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;CACZ,CAAC;AAEF;;;;;;;;;;GAUG;AACU,QAAA,OAAO,GAAG,IAAA,oCAAmB,EAAC;IACzC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,YAAY,EAAE,CAAC,cAAc,EAAE,kBAAkB,EAAE,YAAY,CAAC;YAChE,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE,kBAAkB;iBACzB;aACF;YACD,aAAa,EAAE;gBACb,iCAAiC;gBACjC,WAAW;gBACX,iBAAiB;gBACjB,YAAY;gBACZ,aAAa;gBACb,aAAa;gBACb,eAAe;gBACf,WAAW;gBACX,gBAAgB;gBAChB,YAAY;gBACZ,4BAA4B;gBAC5B;oBACE,IAAI,EAAE,kBAAkB;iBACzB;aACF;SACF;QACD,sBAAsB,EAAE;YACtB,YAAY,EAAE,CAAC,YAAY,CAAC;YAC5B,WAAW,EAAE,CAAC,WAAW,CAAC;YAC1B,aAAa,EAAE,CAAC,aAAa,CAAC;SAC/B;KACF;CACF,CAAC,CAAC","sourcesContent":["import { extendTailwindMerge } from 'tailwind-merge';\n\nconst variantClassGroups = [\n 's-display-md',\n 's-heading-lg',\n 's-heading-md',\n 's-heading-sm',\n 's-body-lg',\n 's-body-md',\n 's-body-sm',\n 's-body-xs',\n 'l-display-md',\n 'l-heading-lg',\n 'l-heading-md',\n 'l-heading-sm',\n 'l-body-lg',\n 'l-body-md',\n 'l-body-sm',\n 'l-body-xs',\n];\n\n/**\n * Custom Tailwind Merge configuration to handle our design system's typography classes.\n * This extends the default Tailwind Merge behavior to properly handle conflicts between:\n * 1. Custom text color classes (text-default, text-alternative, text-muted)\n * 2. Typography variant classes for font sizes (e.g., s-body-md, l-heading-lg)\n * 3. Standard and custom font weight classes\n *\n * Without this configuration, Tailwind Merge wouldn't know these classes are meant\n * to override each other, potentially leading to multiple conflicting classes\n * being applied simultaneously.\n */\nexport const twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n 'text-color': ['text-default', 'text-alternative', 'text-muted'],\n 'font-size': [\n {\n text: variantClassGroups,\n },\n ],\n 'font-weight': [\n // Standard Tailwind font weights\n 'font-thin',\n 'font-extralight',\n 'font-light',\n 'font-normal',\n 'font-medium',\n 'font-semibold',\n 'font-bold',\n 'font-extrabold',\n 'font-black',\n // Custom typography classes\n {\n font: variantClassGroups,\n },\n ],\n },\n conflictingClassGroups: {\n 'text-color': ['text-color'],\n 'font-size': ['font-size'],\n 'font-weight': ['font-weight'],\n },\n },\n});\n"]}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Custom Tailwind Merge configuration to handle our design system's typography classes.
3
+ * This extends the default Tailwind Merge behavior to properly handle conflicts between:
4
+ * 1. Custom text color classes (text-default, text-alternative, text-muted)
5
+ * 2. Typography variant classes for font sizes (e.g., s-body-md, l-heading-lg)
6
+ * 3. Standard and custom font weight classes
7
+ *
8
+ * Without this configuration, Tailwind Merge wouldn't know these classes are meant
9
+ * to override each other, potentially leading to multiple conflicting classes
10
+ * being applied simultaneously.
11
+ */
12
+ export declare const twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
13
+ //# sourceMappingURL=tw-merge.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tw-merge.d.cts","sourceRoot":"","sources":["../../src/utils/tw-merge.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,sEAgClB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Custom Tailwind Merge configuration to handle our design system's typography classes.
3
+ * This extends the default Tailwind Merge behavior to properly handle conflicts between:
4
+ * 1. Custom text color classes (text-default, text-alternative, text-muted)
5
+ * 2. Typography variant classes for font sizes (e.g., s-body-md, l-heading-lg)
6
+ * 3. Standard and custom font weight classes
7
+ *
8
+ * Without this configuration, Tailwind Merge wouldn't know these classes are meant
9
+ * to override each other, potentially leading to multiple conflicting classes
10
+ * being applied simultaneously.
11
+ */
12
+ export declare const twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
13
+ //# sourceMappingURL=tw-merge.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tw-merge.d.mts","sourceRoot":"","sources":["../../src/utils/tw-merge.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,sEAgClB,CAAC"}