thread-ui 0.9.0 → 0.12.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.
Files changed (143) hide show
  1. package/README.md +7 -1
  2. package/dist/components/data-display/filter-controls/variants/filter-controls.js +1 -1
  3. package/dist/components/data-display/filter-controls/variants/filter-controls.js.map +1 -1
  4. package/dist/components/data-display/filter-controls/variants/inline-filter-controls.js +1 -1
  5. package/dist/components/data-display/filter-controls/variants/inline-filter-controls.js.map +1 -1
  6. package/dist/components/data-display/sort-controls/sort-controls.js +1 -1
  7. package/dist/components/data-display/sort-controls/sort-controls.js.map +1 -1
  8. package/dist/components/form-elements/form-label/form-label.js +1 -1
  9. package/dist/components/form-elements/form-label/form-label.js.map +1 -1
  10. package/dist/components/media/image-panel/image-panel.js +47 -47
  11. package/dist/components/media/image-panel/image-panel.js.map +1 -1
  12. package/dist/components/media/media-card/media-card.js +22 -5
  13. package/dist/components/media/media-card/media-card.js.map +1 -1
  14. package/dist/components/navigation/nav-menu/components/nav-link/nav-link.js +2 -4
  15. package/dist/components/navigation/nav-menu/components/nav-link/nav-link.js.map +1 -1
  16. package/dist/components/typography/body/body.types.d.ts +31 -0
  17. package/dist/components/typography/body/body.types.js +2 -0
  18. package/dist/components/typography/body/body.types.js.map +1 -0
  19. package/dist/components/typography/body/list.d.ts +15 -0
  20. package/dist/components/typography/body/list.js +47 -0
  21. package/dist/components/typography/body/list.js.map +1 -0
  22. package/dist/components/typography/body/text.d.ts +12 -0
  23. package/dist/components/typography/body/text.js +30 -0
  24. package/dist/components/typography/body/text.js.map +1 -0
  25. package/dist/components/typography/code/code.d.ts +2 -0
  26. package/dist/components/typography/code/code.js +23 -0
  27. package/dist/components/typography/code/code.js.map +1 -0
  28. package/dist/components/typography/code/code.types.d.ts +9 -0
  29. package/dist/components/typography/code/code.types.js +2 -0
  30. package/dist/components/typography/code/code.types.js.map +1 -0
  31. package/dist/components/typography/heading/heading.d.ts +38 -0
  32. package/dist/components/typography/heading/heading.js +53 -0
  33. package/dist/components/typography/heading/heading.js.map +1 -0
  34. package/dist/components/typography/heading/heading.types.d.ts +13 -0
  35. package/dist/components/typography/heading/heading.types.js +2 -0
  36. package/dist/components/typography/heading/heading.types.js.map +1 -0
  37. package/dist/components/typography/heading/render-heading.d.ts +16 -0
  38. package/dist/components/typography/heading/render-heading.js +52 -0
  39. package/dist/components/typography/heading/render-heading.js.map +1 -0
  40. package/dist/components/typography/index.d.ts +8 -2
  41. package/dist/components/typography/index.js +4 -1
  42. package/dist/components/typography/index.js.map +1 -1
  43. package/dist/components/typography/page-header/page-header.js +5 -8
  44. package/dist/components/typography/page-header/page-header.js.map +1 -1
  45. package/dist/components/typography/shared-utils/get-presentation-styles.d.ts +2 -0
  46. package/dist/components/typography/shared-utils/get-presentation-styles.js +31 -0
  47. package/dist/components/typography/shared-utils/get-presentation-styles.js.map +1 -0
  48. package/dist/components/typography/shared-utils/get-typography-styles.d.ts +3 -0
  49. package/dist/components/typography/shared-utils/get-typography-styles.js +56 -0
  50. package/dist/components/typography/shared-utils/get-typography-styles.js.map +1 -0
  51. package/dist/components/typography/typography.d.ts +55 -22
  52. package/dist/components/typography/typography.js +198 -127
  53. package/dist/components/typography/typography.js.map +1 -1
  54. package/dist/components/typography/typography.types.d.ts +23 -0
  55. package/dist/components/typography/typography.types.js +2 -0
  56. package/dist/components/typography/typography.types.js.map +1 -0
  57. package/dist/components/ui/card/card.js +3 -32
  58. package/dist/components/ui/card/card.js.map +1 -1
  59. package/dist/components/ui/divider/divider.d.ts +1 -1
  60. package/dist/components/ui/divider/divider.js +20 -6
  61. package/dist/components/ui/divider/divider.js.map +1 -1
  62. package/dist/components/ui/divider/divider.types.d.ts +3 -0
  63. package/dist/components/ui/index.d.ts +1 -0
  64. package/dist/components/ui/index.js +1 -0
  65. package/dist/components/ui/index.js.map +1 -1
  66. package/dist/components/ui/tab-view/components/tab-item-content.d.ts +5 -0
  67. package/dist/components/ui/tab-view/components/tab-item-content.js +23 -0
  68. package/dist/components/ui/tab-view/components/tab-item-content.js.map +1 -0
  69. package/dist/components/ui/tab-view/components/tab-view-content.d.ts +1 -0
  70. package/dist/components/ui/tab-view/components/tab-view-content.js +8 -0
  71. package/dist/components/ui/tab-view/components/tab-view-content.js.map +1 -0
  72. package/dist/components/ui/tab-view/components/tab-view-controls.d.ts +1 -0
  73. package/dist/components/ui/tab-view/components/tab-view-controls.js +66 -0
  74. package/dist/components/ui/tab-view/components/tab-view-controls.js.map +1 -0
  75. package/dist/components/ui/tab-view/index.d.ts +2 -0
  76. package/dist/components/ui/tab-view/index.js +2 -0
  77. package/dist/components/ui/tab-view/index.js.map +1 -0
  78. package/dist/components/ui/tab-view/tab-view-context.d.ts +34 -0
  79. package/dist/components/ui/tab-view/tab-view-context.js +4 -0
  80. package/dist/components/ui/tab-view/tab-view-context.js.map +1 -0
  81. package/dist/components/ui/tab-view/tab-view.d.ts +18 -0
  82. package/dist/components/ui/tab-view/tab-view.js +42 -0
  83. package/dist/components/ui/tab-view/tab-view.js.map +1 -0
  84. package/dist/components/ui/tab-view/tab-view.types.d.ts +39 -0
  85. package/dist/components/ui/tab-view/tab-view.types.js +2 -0
  86. package/dist/components/ui/tab-view/tab-view.types.js.map +1 -0
  87. package/dist/styled-system/styles.css +1 -1
  88. package/dist/styled-system/tokens/index.js +477 -353
  89. package/dist/styled-system/tokens/tokens.d.ts +19 -19
  90. package/dist/styles/panda.css +1 -1
  91. package/dist/styles/theme.css +37 -0
  92. package/dist/theme/css-name-configurations/theme-css-names.d.ts +54 -0
  93. package/dist/theme/css-name-configurations/theme-css-names.js +52 -0
  94. package/dist/theme/css-name-configurations/theme-css-names.js.map +1 -1
  95. package/dist/theme/default-theme.js +53 -0
  96. package/dist/theme/default-theme.js.map +1 -1
  97. package/dist/theme/index.d.ts +2 -1
  98. package/dist/theme/index.js +2 -1
  99. package/dist/theme/index.js.map +1 -1
  100. package/dist/theme/theme-docs/misc-elements.d.ts +6 -0
  101. package/dist/theme/theme-docs/misc-elements.js +20 -0
  102. package/dist/theme/theme-docs/misc-elements.js.map +1 -0
  103. package/dist/theme/theme-surface-system.d.ts +2 -0
  104. package/dist/theme/theme-surface-system.js +8 -0
  105. package/dist/theme/theme-surface-system.js.map +1 -1
  106. package/dist/theme/theme-typography-system.d.ts +10 -0
  107. package/dist/theme/theme-typography-system.js +51 -0
  108. package/dist/theme/theme-typography-system.js.map +1 -0
  109. package/dist/types/theme/theme.types.d.ts +90 -7
  110. package/dist/utils/context/create-stateful-component-context/create-stateful-component-context.d.ts +11 -0
  111. package/dist/utils/context/create-stateful-component-context/create-stateful-component-context.js +21 -0
  112. package/dist/utils/context/create-stateful-component-context/create-stateful-component-context.js.map +1 -0
  113. package/dist/utils/context/create-stateful-component-context/index.d.ts +1 -0
  114. package/dist/utils/context/create-stateful-component-context/index.js +2 -0
  115. package/dist/utils/context/create-stateful-component-context/index.js.map +1 -0
  116. package/dist/utils/context/index.d.ts +1 -0
  117. package/dist/utils/context/index.js +1 -0
  118. package/dist/utils/context/index.js.map +1 -1
  119. package/dist/utils/theme-utilities/get-resolved-layer-values/get-resolved-layer-values.d.ts +1 -1
  120. package/dist/utils/theme-utilities/get-resolved-layer-values/get-resolved-layer-values.js +8 -1
  121. package/dist/utils/theme-utilities/get-resolved-layer-values/get-resolved-layer-values.js.map +1 -1
  122. package/dist/utils/theme-utilities/get-resolved-typography-values/get-resolved-typography-values.d.ts +12 -0
  123. package/dist/utils/theme-utilities/get-resolved-typography-values/get-resolved-typography-values.js +13 -0
  124. package/dist/utils/theme-utilities/get-resolved-typography-values/get-resolved-typography-values.js.map +1 -0
  125. package/dist/utils/theme-utilities/get-resolved-typography-values/index.d.ts +1 -0
  126. package/dist/utils/theme-utilities/get-resolved-typography-values/index.js +2 -0
  127. package/dist/utils/theme-utilities/get-resolved-typography-values/index.js.map +1 -0
  128. package/dist/utils/theme-utilities/get-surface-styles/get-surface-styles.d.ts +3 -0
  129. package/dist/utils/theme-utilities/get-surface-styles/get-surface-styles.js +38 -0
  130. package/dist/utils/theme-utilities/get-surface-styles/get-surface-styles.js.map +1 -0
  131. package/dist/utils/theme-utilities/get-surface-styles/index.d.ts +1 -0
  132. package/dist/utils/theme-utilities/get-surface-styles/index.js +2 -0
  133. package/dist/utils/theme-utilities/get-surface-styles/index.js.map +1 -0
  134. package/dist/utils/theme-utilities/get-text-color-styles/get-text-color-styles.d.ts +11 -0
  135. package/dist/utils/theme-utilities/get-text-color-styles/get-text-color-styles.js +34 -0
  136. package/dist/utils/theme-utilities/get-text-color-styles/get-text-color-styles.js.map +1 -0
  137. package/dist/utils/theme-utilities/get-text-color-styles/index.d.ts +1 -0
  138. package/dist/utils/theme-utilities/get-text-color-styles/index.js +2 -0
  139. package/dist/utils/theme-utilities/get-text-color-styles/index.js.map +1 -0
  140. package/dist/utils/theme-utilities/index.d.ts +3 -0
  141. package/dist/utils/theme-utilities/index.js +3 -0
  142. package/dist/utils/theme-utilities/index.js.map +1 -1
  143. package/package.json +1 -1
@@ -1,145 +1,193 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { getColoredTextColor } from '../../utils';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { css, cva, cx } from '../../styled-system/css';
3
+ import { getResolvedTypographyValues, getTextColorStyles } from '../../utils';
4
+ /** Typography CVA — map individual token keys to style declarations. */
5
+ const getTypographyStyles = cva({
6
+ variants: {
7
+ fontFamily: {
8
+ body: { fontFamily: 'body' },
9
+ heading: { fontFamily: 'heading' },
10
+ mono: { fontFamily: 'mono' },
11
+ },
12
+ fontSize: {
13
+ 'heading.sm': { fontSize: 'heading.sm' },
14
+ 'heading.md': { fontSize: 'heading.md' },
15
+ 'heading.lg': { fontSize: 'heading.lg' },
16
+ 'heading.xl': { fontSize: 'heading.xl' },
17
+ 'body.xxs': { fontSize: 'body.xxs' },
18
+ 'body.xs': { fontSize: 'body.xs' },
19
+ 'body.sm': { fontSize: 'body.sm' },
20
+ 'body.md': { fontSize: 'body.md' },
21
+ 'body.lg': { fontSize: 'body.lg' },
22
+ 'body.xl': { fontSize: 'body.xl' },
23
+ },
24
+ fontWeight: {
25
+ regular: { fontWeight: 'regular' },
26
+ medium: { fontWeight: 'medium' },
27
+ semibold: { fontWeight: 'semibold' },
28
+ bold: { fontWeight: 'bold' },
29
+ },
30
+ lineHeight: {
31
+ none: { lineHeight: 'none' },
32
+ tighter: { lineHeight: 'tighter' },
33
+ tight: { lineHeight: 'tight' },
34
+ normal: { lineHeight: 'normal' },
35
+ loose: { lineHeight: 'loose' },
36
+ looser: { lineHeight: 'looser' },
37
+ },
38
+ letterSpacing: {
39
+ tight: { letterSpacing: 'tight' },
40
+ normal: { letterSpacing: 'normal' },
41
+ wide: { letterSpacing: 'wide' },
42
+ },
43
+ marginBottom: {
44
+ none: { marginBottom: 'none' },
45
+ xxs: { marginBottom: 'xxs' },
46
+ xs: { marginBottom: 'xs' },
47
+ sm: { marginBottom: 'sm' },
48
+ md: { marginBottom: 'md' },
49
+ lg: { marginBottom: 'lg' },
50
+ xl: { marginBottom: 'xl' },
51
+ xxl: { marginBottom: 'xxl' },
52
+ },
53
+ },
54
+ });
55
+ /** Presentation CVA for align/truncate. Not part of the typography chord. */
56
+ const getPresentationStyles = cva({
57
+ variants: {
58
+ align: {
59
+ left: { textAlign: 'left' },
60
+ center: { textAlign: 'center' },
61
+ },
62
+ truncate: {
63
+ true: {
64
+ overflow: 'hidden',
65
+ whiteSpace: 'nowrap',
66
+ textOverflow: 'ellipsis',
67
+ },
68
+ },
69
+ indent: {
70
+ true: {
71
+ textIndent: '4',
72
+ },
73
+ false: {},
74
+ },
75
+ },
76
+ });
77
+ /** Subtitle role mapping: subtitle under a heading uses one-step-down typography role. */
78
+ const SUBTITLE_ROLE_MAP = {
79
+ title: 'h1',
80
+ h1: 'h2',
81
+ h2: 'h3',
82
+ h3: 'body',
83
+ };
84
+ /**
85
+ * Internal helper rendering a heading with optional subtitle.
86
+ * Wraps in <hgroup> when subtitle is present.
87
+ *
88
+ */
89
+ const renderHeading = (role, HeadingTag, { children, align = 'left', inline = false, color = 'standard', truncate = false, subtitle, }) => {
90
+ // If no subtitle, pass marginBottom through unless inline
91
+ if (!subtitle) {
92
+ const resolved = getResolvedTypographyValues({
93
+ role,
94
+ marginBottom: inline ? 'none' : undefined,
95
+ });
96
+ const headingClass = cx(getTypographyStyles(resolved), getPresentationStyles({ align, truncate: truncate || undefined }), getTextColorStyles(color));
97
+ return _jsx(HeadingTag, { className: headingClass, children: children });
98
+ }
99
+ // Wrap subtitle and heading in hgroup, add margin to wrapper
100
+ const headingResolved = getResolvedTypographyValues({
101
+ role,
102
+ marginBottom: 'none',
103
+ });
104
+ const headingClass = cx(getTypographyStyles(headingResolved), getPresentationStyles({ align, truncate: truncate || undefined }), getTextColorStyles(color));
105
+ const subtitleRole = SUBTITLE_ROLE_MAP[role];
106
+ const subtitleResolved = getResolvedTypographyValues({
107
+ role: subtitleRole,
108
+ fontFamily: 'heading',
109
+ marginBottom: 'none',
110
+ });
111
+ const subtitleClass = cx(getTypographyStyles(subtitleResolved), getPresentationStyles({ align, truncate: truncate || undefined }), getTextColorStyles('text-secondary'));
112
+ // Derive hgroup outer margin from heading
113
+ const wrapperResolved = getResolvedTypographyValues({
114
+ role,
115
+ marginBottom: inline ? 'none' : undefined,
116
+ });
117
+ const wrapperClass = getTypographyStyles({
118
+ fontSize: wrapperResolved.fontSize,
119
+ marginBottom: wrapperResolved.marginBottom,
120
+ });
121
+ return (_jsxs("hgroup", { className: wrapperClass, children: [_jsx(HeadingTag, { className: headingClass, children: children }), _jsx("p", { className: subtitleClass, children: subtitle })] }));
122
+ };
3
123
  /**
4
- * Display-level heading. Renders as `h1` at 3rem/700 weight.
124
+ * Display-level heading. Renders as `h1`
5
125
  *
6
126
  * @example
7
127
  * <Title align="center">Welcome</Title>
128
+ * <Title subtitle="Last updated March 2025">Welcome</Title>
8
129
  */
9
- export const Title = ({ children, align = 'left', inline = false, color = 'standard', truncate = false, }) => {
10
- const styles = {
11
- fontSize: '3rem',
12
- fontWeight: 700,
13
- lineHeight: 1.3,
14
- marginBottom: inline ? 0 : '40px',
15
- textAlign: align,
16
- color: getColoredTextColor(color),
17
- ...(truncate && {
18
- overflow: 'hidden',
19
- whiteSpace: 'nowrap',
20
- textOverflow: 'ellipsis',
21
- }),
22
- };
23
- return _jsx("h1", { style: styles, children: children });
24
- };
130
+ export const Title = (props) => renderHeading('title', 'h1', props);
25
131
  /**
26
- * Primary heading. Renders as `h1` at 2rem/600 weight.
132
+ * Primary heading
27
133
  *
28
134
  * @example
29
135
  * <H1>Page Title</H1>
30
136
  */
31
- export const H1 = ({ children, align = 'left', color = 'standard', inline = false, truncate = false, }) => {
32
- const styles = {
33
- fontSize: '2rem',
34
- fontWeight: 600,
35
- lineHeight: 1.3,
36
- marginBottom: inline ? 0 : '32px',
37
- textAlign: align,
38
- color: getColoredTextColor(color),
39
- ...(truncate && {
40
- overflow: 'hidden',
41
- whiteSpace: 'nowrap',
42
- textOverflow: 'ellipsis',
43
- }),
44
- };
45
- return _jsx("h1", { style: styles, children: children });
46
- };
137
+ export const H1 = (props) => renderHeading('h1', 'h1', props);
47
138
  /**
48
- * Secondary heading. Renders as `h2` at 1.5rem/600 weight.
139
+ * Secondary heading
49
140
  *
50
141
  * @example
51
142
  * <H2>Section Title</H2>
52
143
  */
53
- export const H2 = ({ children, align = 'left', color = 'standard', inline = false, truncate = false, }) => {
54
- const styles = {
55
- fontSize: '1.5rem',
56
- fontWeight: 600,
57
- lineHeight: 1.3,
58
- marginBottom: inline ? 0 : '24px',
59
- textAlign: align,
60
- color: getColoredTextColor(color),
61
- ...(truncate && {
62
- overflow: 'hidden',
63
- whiteSpace: 'nowrap',
64
- textOverflow: 'ellipsis',
65
- }),
66
- };
67
- return _jsx("h2", { style: styles, children: children });
68
- };
144
+ export const H2 = (props) => renderHeading('h2', 'h2', props);
69
145
  /**
70
- * Tertiary heading. Renders as `h3` at 1.25rem/600 weight.
146
+ * Tertiary heading
71
147
  *
72
148
  * @example
73
149
  * <H3>Subsection Title</H3>
74
150
  */
75
- export const H3 = ({ children, align = 'left', color = 'standard', inline = false, truncate = false, }) => {
76
- const styles = {
77
- fontSize: '1.25rem',
78
- fontWeight: 600,
79
- lineHeight: 1.3,
80
- marginBottom: inline ? 0 : '16px',
81
- textAlign: align,
82
- color: getColoredTextColor(color),
83
- ...(truncate && {
84
- overflow: 'hidden',
85
- whiteSpace: 'nowrap',
86
- textOverflow: 'ellipsis',
87
- }),
88
- };
89
- return _jsx("h3", { style: styles, children: children });
90
- };
91
- const TEXT_SIZES = {
92
- xxs: '0.625rem',
93
- xs: '0.75rem',
94
- sm: '0.875rem',
95
- md: '1rem',
96
- lg: '1.125rem',
97
- xl: '1.25rem',
98
- xxl: '1.375rem',
99
- };
151
+ export const H3 = (props) => renderHeading('h3', 'h3', props);
100
152
  /**
101
153
  * Body text. Renders as `p` by default or `span` when `inline` is true.
102
154
  *
155
+ * Allows for individual attribute overrides for customization
156
+ *
103
157
  * @example
104
- * <Text size="sm" bold>Important note</Text>
158
+ * <Text>Default Text</Text>
159
+ * @example
160
+ * <Text size="sm" weight="semibold">Important note</Text>
105
161
  */
106
- export const Text = ({ children, align = 'left', inline = false, color = 'standard', bold = false, size = 'md', truncate = false, }) => {
162
+ export const Text = ({ children, align = 'left', inline = false, color = 'standard', size = 'md', weight, lineHeight, letterSpacing, marginBottom, truncate = false, indent, }) => {
107
163
  const Component = inline ? 'span' : 'p';
108
- const styles = {
109
- fontSize: TEXT_SIZES[size],
110
- fontWeight: bold ? 600 : 400,
111
- lineHeight: 1.5,
112
- marginBottom: inline ? 0 : '0.25em',
113
- textAlign: align,
114
- color: getColoredTextColor(color),
115
- ...(truncate && {
116
- overflow: 'hidden',
117
- whiteSpace: 'nowrap',
118
- textOverflow: 'ellipsis',
119
- }),
120
- };
121
- return _jsx(Component, { style: styles, children: children });
164
+ const resolved = getResolvedTypographyValues({
165
+ role: 'body',
166
+ fontSize: `body.${size}`,
167
+ fontWeight: weight,
168
+ lineHeight,
169
+ letterSpacing,
170
+ marginBottom: inline ? 'none' : marginBottom,
171
+ });
172
+ const className = cx(getTypographyStyles(resolved), getPresentationStyles({ indent, align, truncate: truncate || undefined }), getTextColorStyles(color));
173
+ return _jsx(Component, { className: className, children: children });
122
174
  };
123
175
  /**
124
- * Secondary text rendered as an inline `span`. Fluid font size between 0.875rem and 1.5rem.
176
+ * Standalone secondary text rendered as an inline `span`.
177
+ * For subtitles attached to headings, use the `subtitle` prop on Title/H1/H2/H3 instead.
125
178
  *
126
179
  * @example
127
180
  * <Subtitle>Last updated March 2025</Subtitle>
128
181
  */
129
- export const Subtitle = ({ children, align = 'left', color = 'text-secondary', truncate = false, }) => {
130
- const styles = {
131
- display: 'block',
132
- fontSize: '0.875rem',
133
- marginTop: '0.2em',
134
- textAlign: align,
135
- color: getColoredTextColor(color),
136
- ...(truncate && {
137
- overflow: 'hidden',
138
- whiteSpace: 'nowrap',
139
- textOverflow: 'ellipsis',
140
- }),
141
- };
142
- return _jsx("span", { style: styles, children: children });
182
+ export const Subtitle = ({ children, align = 'left', color = 'secondary', truncate = false, fontFamily, indent, }) => {
183
+ const resolved = getResolvedTypographyValues({
184
+ role: 'body',
185
+ fontSize: 'body.sm',
186
+ marginBottom: 'none',
187
+ fontFamily,
188
+ });
189
+ const className = cx(getTypographyStyles(resolved), getPresentationStyles({ indent, align, truncate: truncate || undefined }), getTextColorStyles(color));
190
+ return (_jsx("span", { className: className, style: { display: 'block', marginTop: '0.2em' }, children: children }));
143
191
  };
144
192
  /**
145
193
  * Unordered list with configurable marker style, size, and color.
@@ -147,16 +195,22 @@ export const Subtitle = ({ children, align = 'left', color = 'text-secondary', t
147
195
  * @example
148
196
  * <List items={['Apples', 'Oranges', 'Bananas']} decoration="circle" />
149
197
  */
150
- export const List = ({ align = 'left', color = 'standard', size = 'md', items, decoration = 'disc', }) => {
151
- const styles = {
152
- fontSize: TEXT_SIZES[size],
153
- lineHeight: 1.5,
154
- textAlign: align,
155
- color: getColoredTextColor(color),
198
+ export const List = ({ align = 'left', color = 'standard', size = 'md', weight, lineHeight, letterSpacing, items, decoration = 'disc', }) => {
199
+ const resolved = getResolvedTypographyValues({
200
+ role: 'body',
201
+ fontSize: `body.${size}`,
202
+ fontWeight: weight,
203
+ lineHeight,
204
+ letterSpacing,
205
+ marginBottom: 'none',
206
+ });
207
+ const itemClass = cx(getTypographyStyles(resolved), getPresentationStyles({ align }), getTextColorStyles(color));
208
+ const listStyles = {
209
+ padding: 0,
156
210
  listStyleType: decoration === 'blank' ? 'none' : decoration,
157
211
  marginLeft: decoration !== 'none' ? '1em' : undefined,
158
212
  };
159
- return (_jsx("ul", { style: { padding: 0 }, children: items.map((item, index) => (_jsx("li", { style: styles, children: item }, index))) }));
213
+ return (_jsx("ul", { style: listStyles, children: items.map((item, index) => (_jsx("li", { className: itemClass, children: item }, index))) }));
160
214
  };
161
215
  /**
162
216
  * Ordered list with decimal numbering.
@@ -164,15 +218,32 @@ export const List = ({ align = 'left', color = 'standard', size = 'md', items, d
164
218
  * @example
165
219
  * <OrderedList items={['First', 'Second', 'Third']} />
166
220
  */
167
- export const OrderedList = ({ align = 'left', color = 'standard', size = 'md', items, }) => {
168
- const styles = {
169
- fontSize: TEXT_SIZES[size],
170
- lineHeight: 1.5,
171
- textAlign: align,
172
- color: getColoredTextColor(color),
173
- listStyleType: 'decimal',
174
- marginLeft: '1em',
175
- };
176
- return (_jsx("ol", { style: { padding: 0 }, children: items.map((item, index) => (_jsx("li", { style: styles, children: item }, index))) }));
221
+ export const OrderedList = ({ align = 'left', color = 'standard', size = 'md', weight, lineHeight, letterSpacing, items, }) => {
222
+ const resolved = getResolvedTypographyValues({
223
+ role: 'body',
224
+ fontSize: `body.${size}`,
225
+ fontWeight: weight,
226
+ lineHeight,
227
+ letterSpacing,
228
+ marginBottom: 'none',
229
+ });
230
+ const itemClass = cx(getTypographyStyles(resolved), getPresentationStyles({ align }), getTextColorStyles(color));
231
+ return (_jsx("ol", { style: { padding: 0, listStyleType: 'decimal', marginLeft: '1em' }, children: items.map((item, index) => (_jsx("li", { className: itemClass, children: item }, index))) }));
232
+ };
233
+ export const Code = ({ children, align = 'left', color = 'standard', size = 'sm', truncate = false, }) => {
234
+ const resolved = getResolvedTypographyValues({
235
+ role: 'code',
236
+ fontSize: `body.${size}`,
237
+ });
238
+ const className = cx(css({
239
+ paddingY: '2px',
240
+ paddingX: '3px',
241
+ backgroundColor: 'structure.subtle',
242
+ borderRadius: 'xs',
243
+ borderWidth: 'sm',
244
+ borderColor: 'structure.default',
245
+ letterSpacing: 'wide',
246
+ }), getTypographyStyles(resolved), getPresentationStyles({ align, truncate: truncate || undefined }), getTextColorStyles(color));
247
+ return _jsx("code", { className: className, children: children });
177
248
  };
178
249
  //# sourceMappingURL=typography.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typography.js","sourceRoot":"","sources":["../../../src/components/typography/typography.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAe9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EACrB,QAAQ,EACR,KAAK,GAAG,MAAM,EACd,MAAM,GAAG,KAAK,EACd,KAAK,GAAG,UAAU,EAClB,QAAQ,GAAG,KAAK,GACC,EAAE,EAAE;IACrB,MAAM,MAAM,GAAkB;QAC7B,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,GAAG;QACf,UAAU,EAAE,GAAG;QACf,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM;QACjC,SAAS,EAAE,KAAK;QAChB,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC;QACjC,GAAG,CAAC,QAAQ,IAAI;YACf,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,QAAQ;YACpB,YAAY,EAAE,UAAU;SACxB,CAAC;KACF,CAAC;IACF,OAAO,aAAI,KAAK,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AE;IACf,MAAM,QAAQ,GAAG,2BAA2B,CAAC;QAC5C,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,QAAQ,IAAI,EAAW;KACjC,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,EAAE,CACnB,GAAG,CAAC;QACH,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,eAAe,EAAE,kBAAkB;QACnC,YAAY,EAAE,IAAI;QAClB,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,mBAAmB;QAChC,aAAa,EAAE,MAAM;KACrB,CAAC,EACF,mBAAmB,CAAC,QAAQ,CAAC,EAC7B,qBAAqB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAI,SAAS,EAAE,CAAC,EACjE,kBAAkB,CAAC,KAAK,CAAC,CACzB,CAAC;IAEF,OAAO,eAAM,SAAS,EAAE,SAAS,YAAG,QAAQ,GAAQ,CAAC;AACtD,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { ColoredTextOptions, Prettify } from '../../types';
2
+ import { ReactNode } from 'react';
3
+ export type BaseTypographyPresentationProps = {
4
+ /** Text alignment @default `'left'` */
5
+ align?: 'left' | 'center';
6
+ /** Removes bottom margin when true @default `false` */
7
+ inline?: boolean;
8
+ /** Truncates text to a single line with ellipsis @default `false` */
9
+ truncate?: boolean;
10
+ };
11
+ export type ExpandedTypographyPresentationProps = Prettify<BaseTypographyPresentationProps & {
12
+ /** Optionally indent text */
13
+ indent?: boolean;
14
+ /** Optionally underline text */
15
+ underline?: boolean;
16
+ }>;
17
+ /** Shared Typography Props */
18
+ export type TypographyProps = Prettify<BaseTypographyPresentationProps & {
19
+ /** Content */
20
+ children: ReactNode;
21
+ /** Text color variant @default `'standard'` */
22
+ color?: ColoredTextOptions;
23
+ }>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=typography.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.types.js","sourceRoot":"","sources":["../../../src/components/typography/typography.types.ts"],"names":[],"mappings":""}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cva } from '../../../styled-system/css';
2
+ import { cva, cx } from '../../../styled-system/css';
3
3
  import { H3 } from '../../../components/typography';
4
4
  import { Divider } from '../divider';
5
- import { getResolvedLayerValues } from '../../../utils';
5
+ import { getResolvedLayerValues, getSurfaceStyles } from '../../../utils';
6
6
  const styles = {
7
7
  cardContainer: cva({
8
8
  base: {
@@ -39,26 +39,6 @@ const styles = {
39
39
  },
40
40
  },
41
41
  },
42
- bg: {
43
- none: {},
44
- canvas: { backgroundColor: 'canvas' },
45
- inset: { backgroundColor: 'inset' },
46
- surface: { backgroundColor: 'surface' },
47
- elevated: { backgroundColor: 'elevated' },
48
- overlay: { backgroundColor: 'overlay' },
49
- },
50
- shadow: {
51
- none: { boxShadow: 'none' },
52
- sm: { boxShadow: 'sm' },
53
- md: { boxShadow: 'md' },
54
- lg: { boxShadow: 'lg' },
55
- },
56
- structure: {
57
- none: { borderWidth: '0' },
58
- subtle: { borderWidth: 'md', borderColor: 'structure.subtle' },
59
- default: { borderWidth: 'md', borderColor: 'structure.default' },
60
- strong: { borderWidth: 'md', borderColor: 'structure.strong' },
61
- },
62
42
  },
63
43
  compoundVariants: [
64
44
  {
@@ -72,9 +52,6 @@ const styles = {
72
52
  defaultVariants: {
73
53
  size: 'md',
74
54
  fullWidth: false,
75
- bg: 'surface',
76
- shadow: 'none',
77
- structure: 'subtle',
78
55
  },
79
56
  }),
80
57
  title: cva({
@@ -113,12 +90,6 @@ const styles = {
113
90
  export const Card = ({ layer = 'surface', bg, shadow, structure, children, size = 'md', fullWidth = false, title, }) => {
114
91
  // Resolve from level, allow individual overrides
115
92
  const layerValues = getResolvedLayerValues({ layer, bg, shadow, structure });
116
- return (_jsxs("div", { className: styles.cardContainer({
117
- size,
118
- fullWidth,
119
- bg: layerValues.bg,
120
- shadow: layerValues.shadow,
121
- structure: layerValues.structure,
122
- }), children: [title && (_jsxs("div", { className: styles.title({ size }), children: [_jsx(H3, { align: title.align, inline: true, children: title.text }), title?.divider && _jsx(Divider, {})] })), _jsx("div", { children: children })] }));
93
+ return (_jsxs("div", { className: cx(styles.cardContainer({ size, fullWidth }), getSurfaceStyles(layerValues)), children: [title && (_jsxs("div", { className: styles.title({ size }), children: [_jsx(H3, { align: title.align, inline: true, children: title.text }), title?.divider && _jsx(Divider, {})] })), _jsx("div", { children: children })] }));
123
94
  };
124
95
  //# sourceMappingURL=card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sourceRoot":"","sources":["../../../../src/components/ui/card/card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAE1C,OAAO,EAAE,EAAE,EAAE,MAAM,yBAAyB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,MAAM,GAAG;IACd,aAAa,EAAE,GAAG,CAAC;QAClB,IAAI,EAAE;YACL,WAAW,EAAE,OAAO;YACpB,OAAO,EAAE;gBACR,IAAI,EAAE,GAAG;aACT;YACD,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,oDAAoD;SAChE;QACD,QAAQ,EAAE;YACT,IAAI,EAAE;gBACL,EAAE,EAAE;oBACH,YAAY,EAAE,IAAI;oBAClB,QAAQ,EAAE,KAAK;iBACf;gBACD,EAAE,EAAE;oBACH,YAAY,EAAE,IAAI;iBAClB;gBACD,EAAE,EAAE;oBACH,YAAY,EAAE,IAAI;iBAClB;aACD;YACD,SAAS,EAAE;gBACV,IAAI,EAAE;oBACL,KAAK,EAAE,MAAM;oBACb,QAAQ,EAAE,MAAM;iBAChB;gBACD,KAAK,EAAE;oBACN,QAAQ,EAAE,KAAK;oBACf,KAAK,EAAE;wBACN,IAAI,EAAE,MAAM;wBACZ,E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AY,EAAE,GAAG;iBACjB;gBACD,EAAE,EAAE;oBACH,YAAY,EAAE,GAAG;iBACjB;gBACD,EAAE,EAAE;oBACH,YAAY,EAAE,GAAG;iBACjB;aACD;SACD;QACD,eAAe,EAAE;YAChB,IAAI,EAAE,IAAI;SACV;KACD,CAAC;CACF,CAAC;AACF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EACpB,KAAK,GAAG,SAAS,EACjB,EAAE,EACF,MAAM,EACN,SAAS,EACT,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,SAAS,GAAG,KAAK,EACjB,KAAK,GACM,EAAE,EAAE;IACf,iDAAiD;IACjD,MAAM,WAAW,GAAG,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7E,OAAO,CACN,eACC,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC;YAC/B,IAAI;YACJ,SAAS;YACT,EAAE,EAAE,WAAW,CAAC,EAAE;YAClB,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,SAAS,EAAE,WAAW,CAAC,SAAS;SAChC,CAAC,aAED,KAAK,IAAI,CACT,eAAK,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,aACrC,KAAC,EAAE,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,kBAC5B,KAAK,CAAC,IAAI,GACP,EACJ,KAAK,EAAE,OAAO,IAAI,KAAC,OAAO,KAAG,IACzB,CACN,EACD,wBAAM,QAAQ,GAAO,IAChB,CACN,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"card.js","sourceRoot":"","sources":["../../../../src/components/ui/card/card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,EAAE,EAAE,MAAM,yBAAyB,CAAC;AAC7C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C;CACF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EACpB,KAAK,GAAG,SAAS,EACjB,EAAE,EACF,MAAM,EACN,SAAS,EACT,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,SAAS,GAAG,KAAK,EACjB,KAAK,GACM,EAAE,EAAE;IACf,iDAAiD;IACjD,MAAM,WAAW,GAAG,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAE7E,OAAO,CACN,eACC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC,aAEtF,KAAK,IAAI,CACT,eAAK,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,aACrC,KAAC,EAAE,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,kBAC5B,KAAK,CAAC,IAAI,GACP,EACJ,KAAK,EAAE,OAAO,IAAI,KAAC,OAAO,KAAG,IACzB,CACN,EACD,wBAAM,QAAQ,GAAO,IAChB,CACN,CAAC;AACH,CAAC,CAAC"}
@@ -5,4 +5,4 @@ import { DividerProps } from './divider.types';
5
5
  * @example
6
6
  * <Divider width="50%" marginY="12px" weight="light" />
7
7
  */
8
- export declare const Divider: ({ width, marginY, weight }: DividerProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Divider: ({ width, marginY, weight, color }: DividerProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,10 +2,24 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { css, cva, cx } from '../../../styled-system/css';
3
3
  const styles = {
4
4
  core: {
5
- base: css({
6
- marginX: 'auto',
7
- backgroundColor: 'structure.default',
8
- borderRadius: '9999px',
5
+ base: cva({
6
+ base: {
7
+ marginX: 'auto',
8
+ borderRadius: '9999px',
9
+ },
10
+ variants: {
11
+ color: {
12
+ subtle: {
13
+ backgroundColor: 'structure.subtle',
14
+ },
15
+ default: {
16
+ backgroundColor: 'structure.default',
17
+ },
18
+ strong: {
19
+ backgroundColor: 'structure.strong',
20
+ },
21
+ },
22
+ },
9
23
  }),
10
24
  marginY: css({
11
25
  marginY: '4',
@@ -33,12 +47,12 @@ const styles = {
33
47
  * @example
34
48
  * <Divider width="50%" marginY="12px" weight="light" />
35
49
  */
36
- export const Divider = ({ width, marginY, weight }) => {
50
+ export const Divider = ({ width, marginY, weight, color = 'default' }) => {
37
51
  const staticStyles = {
38
52
  ...(width && { width }),
39
53
  ...(marginY && { marginTop: marginY, marginBottom: marginY }),
40
54
  };
41
- const className = cx(styles.core.base, styles.dividerWeight({ weight }), !marginY && styles.core.marginY, !width && styles.core.width);
55
+ const className = cx(styles.core.base({ color }), styles.dividerWeight({ weight }), !marginY && styles.core.marginY, !width && styles.core.width);
42
56
  return _jsx("div", { style: staticStyles, className: className });
43
57
  };
44
58
  //# sourceMappingURL=divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../../src/components/ui/divider/divider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAGnD,MAAM,MAAM,GAAG;IACd,IAAI,EAAE;QACL,IAAI,EAAE,GAAG,CAAC;YACT,OAAO,EAAE,MAAM;YACf,eAAe,EAAE,mBAAmB;YACpC,YAAY,EAAE,QAAQ;SACtB,CAAC;QACF,OAAO,EAAE,GAAG,CAAC;YACZ,OAAO,EAAE,GAAG;SACZ,CAAC;QACF,KAAK,EAAE,GAAG,CAAC;YACV,KAAK,EAAE,KAAK;SACZ,CAAC;KACF;IACD,aAAa,EAAE,GAAG,CAAC;QAClB,QAAQ,EAAE;YACT,MAAM,EAAE;gBACP,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE;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{ StructureColorOptions } from '../../../types';
1
2
  export type DividerProps = {
2
3
  /** Width override. Defaults to `75%` */
3
4
  width?: string;
@@ -5,4 +6,6 @@ export type DividerProps = {
5
6
  marginY?: string;
6
7
  /** Line thickness @default `'standard'` */
7
8
  weight?: 'light' | 'standard' | 'heavy';
9
+ /** Structure Color @default `'default'` */
10
+ color?: StructureColorOptions;
8
11
  };
@@ -6,3 +6,4 @@ export * from './loaders';
6
6
  export * from './modal';
7
7
  export * from './toggle';
8
8
  export * from './card';
9
+ export * from './tab-view';
@@ -6,4 +6,5 @@ export * from './loaders';
6
6
  export * from './modal';
7
7
  export * from './toggle';
8
8
  export * from './card';
9
+ export * from './tab-view';
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ type TabItemContentProps = {
2
+ itemId: string;
3
+ };
4
+ export declare const TabItemContent: ({ itemId }: TabItemContentProps) => import("react/jsx-runtime").JSX.Element | null;
5
+ export {};