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
@@ -80,6 +80,16 @@ export const DefaultThreadTheme = {
80
80
  xl: '1280',
81
81
  xxl: '1536',
82
82
  },
83
+ spacing: {
84
+ none: '0px',
85
+ xxs: '4px',
86
+ xs: '8px',
87
+ sm: '12px',
88
+ md: '16px',
89
+ lg: '24px',
90
+ xl: '32px',
91
+ xxl: '40px',
92
+ },
83
93
  zIndex: {
84
94
  base: '0',
85
95
  sticky: '100',
@@ -99,6 +109,49 @@ export const DefaultThreadTheme = {
99
109
  md: '1px',
100
110
  lg: '1.5px',
101
111
  },
112
+ // Typograpghy
113
+ typography: {
114
+ fontFamilies: {
115
+ body: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
116
+ heading: "ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif",
117
+ mono: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
118
+ },
119
+ fontSizes: {
120
+ heading: {
121
+ sm: '1.25rem', // H3
122
+ md: '1.5rem', // H2
123
+ lg: '2rem', // H1
124
+ xl: '3rem', // Title
125
+ },
126
+ body: {
127
+ xxs: '0.625rem',
128
+ xs: '0.75rem',
129
+ sm: '0.875rem',
130
+ md: '1rem', // body default
131
+ lg: '1.125rem',
132
+ xl: '1.25rem', // caps at heading.sm
133
+ },
134
+ },
135
+ fontWeights: {
136
+ regular: '400',
137
+ medium: '500',
138
+ semibold: '600',
139
+ bold: '700',
140
+ },
141
+ lineHeights: {
142
+ none: '1', // exact height of font
143
+ tighter: '1.1', // hero/display - very large text only
144
+ tight: '1.3', // headings (current value)
145
+ normal: '1.5', // body (current value, W3C standard)
146
+ loose: '1.7', // long-form reading
147
+ looser: '2.0', // callouts, marketing copy
148
+ },
149
+ letterSpacings: {
150
+ tight: '-0.02em', // display tightening
151
+ normal: '0', // default
152
+ wide: '0.05em', // labels, all-caps, eyebrows
153
+ },
154
+ },
102
155
  // Dark Mode Colors
103
156
  darkMode: {
104
157
  // Dark Mode Surface Colors
@@ -1 +1 @@
1
- {"version":3,"file":"default-theme.js","sourceRoot":"","sources":["../../src/theme/default-theme.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAoB;IAClD,gBAAgB;IAChB,OAAO,EAAE;QACR,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;KACf;IACD,SAAS,EAAE;QACV,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;KACf;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;KACf;IACD,iBAAiB;IACjB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;KACf;IACD,gBAAgB;IAChB,OAA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E,KAAK;KACb;IAED,KAAK,EAAE,oBAAoB;IAE3B,SAAS;IACT,YAAY,EAAE;QACb,EAAE,EAAE,SAAS,EAAE,MAAM;QACrB,EAAE,EAAE,UAAU,EAAE,MAAM;QACtB,EAAE,EAAE,QAAQ,EAAE,MAAM;KACpB;IACD,UAAU,EAAE;QACX,EAAE,EAAE,OAAO;QACX,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,OAAO;KACX;IACD,mBAAmB;IACnB,QAAQ,EAAE;QACT,2BAA2B;QAC3B,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,SAAS;QAElB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAEhB,6BAA6B;QAC7B,SAAS,EAAE;YACV,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,SAAS;SACjB;QAED,wBAAwB;QACxB,IAAI,EAAE;YACL,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,SAAS;YACnB,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,SAAS;SACnB;KACD;CACD,CAAC"}
1
+ {"version":3,"file":"default-theme.js","sourceRoot":"","sources":["../../src/theme/default-theme.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAoB;IAClD,gBAAgB;IAChB,OAAO,EAAE;QACR,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;KACf;IACD,SAAS,EAAE;QACV,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;KACf;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;KACf;IACD,iBAAiB;IACjB,KAAK,EAAE,SAAS;IAChB,KAAK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KAAK;SACX;QACD,WAAW,EAAE;YACZ,IAAI,EAAE,GAAG,EAAE,uBAAuB;YAClC,OAAO,EAAE,KAAK,EAAE,sCAAsC;YACtD,KAAK,EAAE,KAAK,EAAE,2BAA2B;YACzC,MAAM,EAAE,KAAK,EAAE,qCAAqC;YACpD,KAAK,EAAE,KAAK,EAAE,oBAAoB;YAClC,MAAM,EAAE,KAAK,EAAE,2BAA2B;SAC1C;QACD,cAAc,EAAE;YACf,KAAK,EAAE,SAAS,EAAE,qBAAqB;YACvC,MAAM,EAAE,GAAG,EAAE,UAAU;YACvB,IAAI,EAAE,QAAQ,EAAE,6BAA6B;SAC7C;KACD;IACD,mBAAmB;IACnB,QAAQ,EAAE;QACT,2BAA2B;QAC3B,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,SAAS;QAElB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAEhB,6BAA6B;QAC7B,SAAS,EAAE;YACV,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,SAAS;SACjB;QAED,wBAAwB;QACxB,IAAI,EAAE;YACL,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,SAAS;YACnB,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,SAAS;SACnB;KACD;CACD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { ThreadTheme } from './thread-theme';
2
2
  export { ThreadScript } from './thread-script';
3
3
  export { ThemeProvider, useThemeMode } from './theme-provider';
4
- export { SurfaceLayerMap } from './theme-surface-system';
4
+ export { SurfaceLayerMap, NextSurfaceLayerMap } from './theme-surface-system';
5
+ export { TypographyRoles } from './theme-typography-system';
@@ -1,5 +1,6 @@
1
1
  export { ThreadTheme } from './thread-theme';
2
2
  export { ThreadScript } from './thread-script';
3
3
  export { ThemeProvider, useThemeMode } from './theme-provider';
4
- export { SurfaceLayerMap } from './theme-surface-system';
4
+ export { SurfaceLayerMap, NextSurfaceLayerMap } from './theme-surface-system';
5
+ export { TypographyRoles } from './theme-typography-system';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const Swatch: ({ label, cssVar, border, textDark, }: {
2
+ label: string;
3
+ cssVar: string;
4
+ border?: boolean;
5
+ textDark?: boolean;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ThreadTheme } from '../thread-theme';
3
+ export const Swatch = ({ label, cssVar, border, textDark = true, }) => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '6px' }, children: [_jsx("div", { style: {
4
+ width: '100%',
5
+ height: '64px',
6
+ borderRadius: '6px',
7
+ backgroundColor: `var(${cssVar})`,
8
+ border: border
9
+ ? `1px solid ${ThreadTheme.structure.default}`
10
+ : '1px solid transparent',
11
+ } }), _jsx("span", { style: {
12
+ fontSize: ThreadTheme.typography.fontSizes.body.xxs,
13
+ fontWeight: ThreadTheme.typography.fontWeights.semibold,
14
+ color: ThreadTheme.text.standard,
15
+ }, children: label }), _jsx("span", { style: {
16
+ fontSize: ThreadTheme.typography.fontSizes.body.xxs,
17
+ color: ThreadTheme.text.secondary,
18
+ fontFamily: ThreadTheme.typography.fontFamilies.mono,
19
+ }, children: cssVar })] }));
20
+ //# sourceMappingURL=misc-elements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc-elements.js","sourceRoot":"","sources":["../../../src/theme/theme-docs/misc-elements.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACtB,KAAK,EACL,MAAM,EACN,MAAM,EACN,QAAQ,GAAG,IAAI,GAMf,EAAE,EAAE,CAAC,CACL,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,aACnE,cACC,KAAK,EAAE;gBACN,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,YAAY,EAAE,KAAK;gBACnB,eAAe,EAAE,OAAO,MAAM,GAAG;gBACjC,MAAM,EAAE,MAAM;oBACb,CAAC,CAAC,aAAa,WAAW,CAAC,SAAS,CAAC,OAAO,EAAE;oBAC9C,CAAC,CAAC,uBAAuB;aAC1B,GACA,EACF,eACC,KAAK,EAAE;gBACN,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG;gBACnD,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,QAAQ;gBACvD,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,QAAQ;aAChC,YAEA,KAAK,GACA,EACP,eACC,KAAK,EAAE;gBACN,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG;gBACnD,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,SAAS;gBACjC,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI;aACpD,YAEA,MAAM,GACD,IACF,CACN,CAAC"}
@@ -5,5 +5,7 @@ export type SurfaceConfig = {
5
5
  structure: StructureColorOptions | 'none';
6
6
  zIndex: ZIndexOptions | 'none';
7
7
  };
8
+ /** Surface Layer Order - Returns next highest layer */
9
+ export declare const NextSurfaceLayerMap: Record<SurfaceLayerOptions, SurfaceLayerOptions | null>;
8
10
  /** Surface Layer System — maps each layer to its default bg, shadow, structure, and zIndex */
9
11
  export declare const SurfaceLayerMap: Record<SurfaceLayerOptions, SurfaceConfig>;
@@ -1,3 +1,11 @@
1
+ /** Surface Layer Order - Returns next highest layer */
2
+ export const NextSurfaceLayerMap = {
3
+ inset: 'canvas',
4
+ canvas: 'surface',
5
+ surface: 'elevated',
6
+ elevated: 'overlay',
7
+ overlay: null,
8
+ };
1
9
  /** Surface Layer System — maps each layer to its default bg, shadow, structure, and zIndex */
2
10
  export const SurfaceLayerMap = {
3
11
  canvas: {
@@ -1 +1 @@
1
- {"version":3,"file":"theme-surface-system.js","sourceRoot":"","sources":["../../src/theme/theme-surface-system.ts"],"names":[],"mappings":"AAeA,8FAA8F;AAC9F,MAAM,CAAC,MAAM,eAAe,GAA+C;IAC1E,MAAM,EAAE;QACP,EAAE,EAAE,QAAQ;QACZ,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,MAAM;QACjB,MAAM,EAAE,MAAM;KACd;IACD,KAAK,EAAE;QACN,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,SAAS;QACpB,MAAM,EAAE,MAAM;KACd;IACD,OAAO,EAAE;QACR,EAAE,EAAE,SAAS;QACb,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,MAAM;KACd;IACD,QAAQ,EAAE;QACT,EAAE,EAAE,UAAU;QACd,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,QAAQ;KAChB;IACD,OAAO,EAAE;QACR,EAAE,EAAE,SAAS;QACb,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,MAAM;QACjB,MAAM,EAAE,SAAS;KACjB;CACD,CAAC"}
1
+ {"version":3,"file":"theme-surface-system.js","sourceRoot":"","sources":["../../src/theme/theme-surface-system.ts"],"names":[],"mappings":"AAeA,uDAAuD;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAA4D;IAC3F,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,8FAA8F;AAC9F,MAAM,CAAC,MAAM,eAAe,GAA+C;IAC1E,MAAM,EAAE;QACP,EAAE,EAAE,QAAQ;QACZ,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,MAAM;QACjB,MAAM,EAAE,MAAM;KACd;IACD,KAAK,EAAE;QACN,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,SAAS;QACpB,MAAM,EAAE,MAAM;KACd;IACD,OAAO,EAAE;QACR,EAAE,EAAE,SAAS;QACb,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,MAAM;KACd;IACD,QAAQ,EAAE;QACT,EAAE,EAAE,UAAU;QACd,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,QAAQ;KAChB;IACD,OAAO,EAAE;QACR,EAAE,EAAE,SAAS;QACb,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,MAAM;QACjB,MAAM,EAAE,SAAS;KACjB;CACD,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { CompleteFontSizeOptions, FontFamilyOptions, FontWeightOptions, LetterSpacingOptions, LineHeightOptions, SpacingScaleOptions, TypographyRoleOptions } from '../types';
2
+ export type TypographyRole = {
3
+ fontFamily: FontFamilyOptions;
4
+ fontSize: CompleteFontSizeOptions;
5
+ fontWeight: FontWeightOptions;
6
+ lineHeight: LineHeightOptions;
7
+ letterSpacing: LetterSpacingOptions;
8
+ marginBottom: SpacingScaleOptions;
9
+ };
10
+ export declare const TypographyRoles: Record<TypographyRoleOptions, TypographyRole>;
@@ -0,0 +1,51 @@
1
+ export const TypographyRoles = {
2
+ title: {
3
+ fontFamily: 'heading',
4
+ fontSize: 'heading.xl',
5
+ fontWeight: 'bold',
6
+ lineHeight: 'tight',
7
+ letterSpacing: 'tight',
8
+ marginBottom: 'xxl',
9
+ },
10
+ h1: {
11
+ fontFamily: 'heading',
12
+ fontSize: 'heading.lg',
13
+ fontWeight: 'bold',
14
+ lineHeight: 'tight',
15
+ letterSpacing: 'normal',
16
+ marginBottom: 'xl',
17
+ },
18
+ h2: {
19
+ fontFamily: 'heading',
20
+ fontSize: 'heading.md',
21
+ fontWeight: 'bold',
22
+ lineHeight: 'tight',
23
+ letterSpacing: 'normal',
24
+ marginBottom: 'lg',
25
+ },
26
+ h3: {
27
+ fontFamily: 'heading',
28
+ fontSize: 'heading.sm',
29
+ fontWeight: 'bold',
30
+ lineHeight: 'tight',
31
+ letterSpacing: 'normal',
32
+ marginBottom: 'md',
33
+ },
34
+ body: {
35
+ fontFamily: 'body',
36
+ fontSize: 'body.md',
37
+ fontWeight: 'regular',
38
+ lineHeight: 'normal',
39
+ letterSpacing: 'normal',
40
+ marginBottom: 'sm',
41
+ },
42
+ code: {
43
+ fontFamily: 'mono',
44
+ fontSize: 'body.sm',
45
+ fontWeight: 'regular',
46
+ lineHeight: 'normal',
47
+ letterSpacing: 'normal',
48
+ marginBottom: 'none',
49
+ },
50
+ };
51
+ //# sourceMappingURL=theme-typography-system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-typography-system.js","sourceRoot":"","sources":["../../src/theme/theme-typography-system.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,eAAe,GAAkD;IAC7E,KAAK,EAAE;QACN,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,OAAO;QACnB,aAAa,EAAE,OAAO;QACtB,YAAY,EAAE,KAAK;KACnB;IACD,EAAE,EAAE;QACH,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,OAAO;QACnB,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE,IAAI;KAClB;IACD,EAAE,EAAE;QACH,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,OAAO;QACnB,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE,IAAI;KAClB;IACD,EAAE,EAAE;QACH,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,OAAO;QACnB,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE,IAAI;KAClB;IACD,IAAI,EAAE;QACL,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE,IAAI;KAClB;IACD,IAAI,EAAE;QACL,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE,MAAM;KACpB;CACD,CAAC"}
@@ -24,20 +24,28 @@ export type UtilitySizes = {
24
24
  };
25
25
  /** Key union of the base size scale */
26
26
  export type UtilitySizeOptions = Prettify<keyof UtilitySizes>;
27
- type ExpandedSmallOptions = {
28
- xxs: string;
27
+ type ExtendedSmallSizes = {
29
28
  xs: string;
30
29
  };
31
- type ExpandedLargeOptions = {
30
+ type FullSmallSizes = ExtendedSmallSizes & {
31
+ xxs: string;
32
+ };
33
+ type ExtendedLargeSizes = {
32
34
  xl: string;
35
+ };
36
+ type FullLargeSizes = ExtendedLargeSizes & {
33
37
  xxl: string;
34
38
  };
35
- /** Full size scale including sub-small and extra-large steps */
36
- export type ExpandedUtilitySizes = Prettify<ExpandedSmallOptions & UtilitySizes & ExpandedLargeOptions>;
39
+ /** Extended size scale including extra small and extra large steps */
40
+ export type ExtendedUtilitySizes = Prettify<ExtendedSmallSizes & UtilitySizes & ExtendedLargeSizes>;
41
+ /** Key union of the extended size scale */
42
+ export type ExtendedUtilitySizesOptions = Prettify<keyof ExtendedUtilitySizes>;
43
+ /** Full size scale including extra-extra small and extra-extra large steps */
44
+ export type FullUtilitySizes = Prettify<FullSmallSizes & UtilitySizes & FullLargeSizes>;
37
45
  /** Key union of the full expanded size scale */
38
- export type ExpandedUtilitySizeOptions = Prettify<keyof ExpandedUtilitySizes>;
46
+ export type FullUtilitySizeOptions = Prettify<keyof FullUtilitySizes>;
39
47
  /** Size scale extended with responsive breakpoint steps */
40
- export type BreakpointOptions = Omit<ExpandedUtilitySizes, keyof ExpandedSmallOptions>;
48
+ export type BreakpointOptions = Omit<FullUtilitySizes, keyof FullSmallSizes>;
41
49
  /** Surface Hierarchy and Layer Colors */
42
50
  export type SurfaceColors = {
43
51
  canvas: string;
@@ -110,8 +118,82 @@ export type NeutralPalette = {
110
118
  black: string;
111
119
  gray: ColorShades;
112
120
  };
121
+ /** Font family stacks for heading, body, and monospace text */
122
+ export type FontFamilies = {
123
+ body: string;
124
+ heading: string;
125
+ mono: string;
126
+ };
127
+ /** Font Family Options */
128
+ export type FontFamilyOptions = Prettify<keyof FontFamilies>;
129
+ /** Body text size scale */
130
+ export type BodyFontSizes = Prettify<FullSmallSizes & UtilitySizes & ExtendedLargeSizes>;
131
+ /** Key union of body font size steps */
132
+ export type BodyFontSizeOptions = Prettify<keyof BodyFontSizes>;
133
+ /** Heading size scale (1.25rem → 3rem) */
134
+ export type HeadingFontSizes = Prettify<UtilitySizes & ExtendedLargeSizes>;
135
+ /** Key union of heading font size steps */
136
+ export type HeadingFontSizeOptions = Prettify<keyof HeadingFontSizes>;
137
+ /** Standard Theme Spacing Scale */
138
+ export type SpacingScale = Prettify<{
139
+ none: string;
140
+ } & FullUtilitySizes>;
141
+ /** Em-based margin ratios for typography roles */
142
+ export type SpacingScaleOptions = Prettify<keyof SpacingScale>;
143
+ /** Combined font size scales */
144
+ export type ThemeFontSizes = Prettify<{
145
+ heading: HeadingFontSizes;
146
+ body: BodyFontSizes;
147
+ }>;
148
+ /** Dot-notation keys for all font sizes (e.g. "heading.sm" | "body.xs") */
149
+ export type CompleteFontSizeOptions = {
150
+ [K in keyof ThemeFontSizes]: `${K & string}.${keyof ThemeFontSizes[K] & string}`;
151
+ }[keyof ThemeFontSizes];
152
+ /** Font weight scale */
153
+ export type FontWeights = {
154
+ regular: string;
155
+ medium: string;
156
+ semibold: string;
157
+ bold: string;
158
+ };
159
+ /** Key union of font weight options */
160
+ export type FontWeightOptions = Prettify<keyof FontWeights>;
161
+ /** Line height scale */
162
+ export type LineHeights = {
163
+ none: string;
164
+ tighter: string;
165
+ tight: string;
166
+ normal: string;
167
+ loose: string;
168
+ looser: string;
169
+ };
170
+ /** Key union of line height steps */
171
+ export type LineHeightOptions = Prettify<keyof LineHeights>;
172
+ /** Letter spacing scale */
173
+ export type LetterSpacings = {
174
+ tight: string;
175
+ normal: string;
176
+ wide: string;
177
+ };
178
+ /** Key union of letter spacing steps */
179
+ export type LetterSpacingOptions = Prettify<keyof LetterSpacings>;
180
+ /** Typography Heading Role Options */
181
+ export type HeadingRoleOptions = 'title' | 'h1' | 'h2' | 'h3';
182
+ /** Typography Body Role Options */
183
+ export type BodyRoleOptions = 'body' | 'code';
184
+ /** Typography Roles */
185
+ export type TypographyRoleOptions = Prettify<HeadingRoleOptions | BodyRoleOptions>;
186
+ /** Typography Configurations */
187
+ export type TypographyConfiguration = Prettify<{
188
+ fontFamilies: FontFamilies;
189
+ fontSizes: ThemeFontSizes;
190
+ fontWeights: FontWeights;
191
+ lineHeights: LineHeights;
192
+ letterSpacings: LetterSpacings;
193
+ }>;
113
194
  /** Theme Layout Configuration */
114
195
  export type ThemeLayout = {
196
+ spacing: SpacingScale;
115
197
  breakpoints: BreakpointOptions;
116
198
  };
117
199
  /** Base Border Configuration */
@@ -123,6 +205,7 @@ export type ThemeBorders = {
123
205
  export type Theme = Prettify<ThemePalette & StatusPalette & NeutralPalette & ThemeLayout & ThemeBorders & ScrimColors & ModeColors & {
124
206
  zIndex: ZIndexScale;
125
207
  shadow: ShadowScale;
208
+ typography: TypographyConfiguration;
126
209
  }>;
127
210
  /** Complete theme including dark mode surface and text overrides */
128
211
  export type ThemeConfigFull = Prettify<Theme & {
@@ -0,0 +1,11 @@
1
+ import { type Dispatch, type SetStateAction, type ReactNode } from 'react';
2
+ export declare const createStatefulComponentContext: <T>(displayName: string) => readonly [{
3
+ ({ initialValue, children, }: {
4
+ initialValue: T;
5
+ children: ReactNode;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ }, () => {
9
+ value: T;
10
+ setValue: Dispatch<SetStateAction<T>>;
11
+ }];
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { createContext, useContext, useState, useMemo, } from 'react';
4
+ export const createStatefulComponentContext = (displayName) => {
5
+ const Context = createContext(undefined);
6
+ Context.displayName = displayName;
7
+ function StatefulProvider({ initialValue, children, }) {
8
+ const [value, setValue] = useState(initialValue);
9
+ const ctxValue = useMemo(() => ({ value, setValue }), [value]);
10
+ return _jsx(Context.Provider, { value: ctxValue, children: children });
11
+ }
12
+ StatefulProvider.displayName = `${displayName}Provider`;
13
+ function useStatefulComponentContext() {
14
+ const ctx = useContext(Context);
15
+ if (!ctx)
16
+ throw new Error(`use${displayName} must be used within a ${displayName}Provider`);
17
+ return ctx;
18
+ }
19
+ return [StatefulProvider, useStatefulComponentContext];
20
+ };
21
+ //# sourceMappingURL=create-stateful-component-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-stateful-component-context.js","sourceRoot":"","sources":["../../../../src/utils/context/create-stateful-component-context/create-stateful-component-context.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EACN,aAAa,EACb,UAAU,EACV,QAAQ,EACR,OAAO,GAIP,MAAM,OAAO,CAAC;AAEf,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAK,WAAmB,EAAE,EAAE;IAMzE,MAAM,OAAO,GAAG,aAAa,CAA2B,SAAS,CAAC,CAAC;IACnE,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;IAElC,SAAS,gBAAgB,CAAC,EACzB,YAAY,EACZ,QAAQ,GAIR;QACA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAI,YAAY,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAC/D,OAAO,KAAC,OAAO,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,YAAG,QAAQ,GAAoB,CAAC;IACzE,CAAC;IACD,gBAAgB,CAAC,WAAW,GAAG,GAAG,WAAW,UAAU,CAAC;IAExD,SAAS,2BAA2B;QACnC,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,MAAM,WAAW,0BAA0B,WAAW,UAAU,CAAC,CAAC;QAC5F,OAAO,GAAG,CAAC;IACZ,CAAC;IAED,OAAO,CAAC,gBAAgB,EAAE,2BAA2B,CAAU,CAAC;AACjE,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './create-stateful-component-context';
@@ -0,0 +1,2 @@
1
+ export * from './create-stateful-component-context';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/context/create-stateful-component-context/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
@@ -1 +1,2 @@
1
1
  export * from './create-component-context';
2
+ export * from './create-stateful-component-context';
@@ -1,2 +1,3 @@
1
1
  export * from './create-component-context';
2
+ export * from './create-stateful-component-context';
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { SurfaceConfig } from '../../../theme/theme-surface-system';
2
2
  import { BgColorOptions, ShadowOptions, StructureColorOptions, SurfaceLayerOptions, ZIndexOptions } from '../../../types';
3
3
  type GetResolvedLayerValuesProps = {
4
- layer: SurfaceLayerOptions;
4
+ layer: SurfaceLayerOptions | 'none';
5
5
  bg?: BgColorOptions;
6
6
  shadow?: ShadowOptions;
7
7
  structure?: 'none' | StructureColorOptions;
@@ -1,6 +1,13 @@
1
1
  import { SurfaceLayerMap } from '../../../theme/theme-surface-system';
2
+ // Fallback config when layer is 'none' — everything off, individual props can still override
3
+ const NONE_LAYER_DEFAULTS = {
4
+ bg: 'none',
5
+ shadow: 'none',
6
+ structure: 'none',
7
+ zIndex: 'none',
8
+ };
2
9
  export const getResolvedLayerValues = ({ layer, bg, shadow, structure, zIndex, }) => {
3
- const defaults = SurfaceLayerMap[layer];
10
+ const defaults = layer === 'none' ? NONE_LAYER_DEFAULTS : SurfaceLayerMap[layer];
4
11
  return {
5
12
  bg: bg ?? defaults.bg,
6
13
  shadow: shadow ?? defaults.shadow,
@@ -1 +1 @@
1
- {"version":3,"file":"get-resolved-layer-values.js","sourceRoot":"","sources":["../../../../src/utils/theme-utilities/get-resolved-layer-values/get-resolved-layer-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAiB9E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACtC,KAAK,EACL,EAAE,EACF,MAAM,EACN,SAAS,EACT,MAAM,GACuB,EAAiB,EAAE;IAChD,MAAM,QAAQ,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IACxC,OAAO;QACN,EAAE,EAAE,EAAE,IAAI,QAAQ,CAAC,EAAE;QACrB,MAAM,EAAE,MAAM,IAAI,QAAQ,CAAC,MAAM;QACjC,SAAS,EAAE,SAAS,IAAI,QAAQ,CAAC,SAAS;QAC1C,MAAM,EAAE,MAAM,IAAI,QAAQ,CAAC,MAAM;KACjC,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"get-resolved-layer-values.js","sourceRoot":"","sources":["../../../../src/utils/theme-utilities/get-resolved-layer-values/get-resolved-layer-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAiB9E,6FAA6F;AAC7F,MAAM,mBAAmB,GAAkB;IAC1C,EAAE,EAAE,MAAM;IACV,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,MAAM;IACjB,MAAM,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACtC,KAAK,EACL,EAAE,EACF,MAAM,EACN,SAAS,EACT,MAAM,GACuB,EAAiB,EAAE;IAChD,MAAM,QAAQ,GAAG,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO;QACN,EAAE,EAAE,EAAE,IAAI,QAAQ,CAAC,EAAE;QACrB,MAAM,EAAE,MAAM,IAAI,QAAQ,CAAC,MAAM;QACjC,SAAS,EAAE,SAAS,IAAI,QAAQ,CAAC,SAAS;QAC1C,MAAM,EAAE,MAAM,IAAI,QAAQ,CAAC,MAAM;KACjC,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { TypographyRole } from '../../../theme/theme-typography-system';
2
+ import { CompleteFontSizeOptions, FontFamilyOptions, FontWeightOptions, LetterSpacingOptions, LineHeightOptions, SpacingScaleOptions, TypographyRoleOptions } from '../../../types';
3
+ export type ResolvedTypographyValuesProps = {
4
+ role: TypographyRoleOptions;
5
+ fontFamily?: FontFamilyOptions;
6
+ fontSize?: CompleteFontSizeOptions;
7
+ fontWeight?: FontWeightOptions;
8
+ lineHeight?: LineHeightOptions;
9
+ letterSpacing?: LetterSpacingOptions;
10
+ marginBottom?: SpacingScaleOptions;
11
+ };
12
+ export declare const getResolvedTypographyValues: ({ role, fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, marginBottom, }: ResolvedTypographyValuesProps) => TypographyRole;
@@ -0,0 +1,13 @@
1
+ import { TypographyRoles } from '../../../theme/theme-typography-system';
2
+ export const getResolvedTypographyValues = ({ role, fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, marginBottom, }) => {
3
+ const defaults = TypographyRoles[role];
4
+ return {
5
+ fontFamily: fontFamily ?? defaults.fontFamily,
6
+ fontSize: fontSize ?? defaults.fontSize,
7
+ fontWeight: fontWeight ?? defaults.fontWeight,
8
+ lineHeight: lineHeight ?? defaults.lineHeight,
9
+ letterSpacing: letterSpacing ?? defaults.letterSpacing,
10
+ marginBottom: marginBottom ?? defaults.marginBottom,
11
+ };
12
+ };
13
+ //# sourceMappingURL=get-resolved-typography-values.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-resolved-typography-values.js","sourceRoot":"","sources":["../../../../src/utils/theme-utilities/get-resolved-typography-values/get-resolved-typography-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAqBlF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC3C,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,GACmB,EAAkB,EAAE;IACnD,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAEvC,OAAO;QACN,UAAU,EAAE,UAAU,IAAI,QAAQ,CAAC,UAAU;QAC7C,QAAQ,EAAE,QAAQ,IAAI,QAAQ,CAAC,QAAQ;QACvC,UAAU,EAAE,UAAU,IAAI,QAAQ,CAAC,UAAU;QAC7C,UAAU,EAAE,UAAU,IAAI,QAAQ,CAAC,UAAU;QAC7C,aAAa,EAAE,aAAa,IAAI,QAAQ,CAAC,aAAa;QACtD,YAAY,EAAE,YAAY,IAAI,QAAQ,CAAC,YAAY;KACnD,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './get-resolved-typography-values';
@@ -0,0 +1,2 @@
1
+ export * from './get-resolved-typography-values';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/theme-utilities/get-resolved-typography-values/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { SurfaceConfig } from '../../../theme/theme-surface-system';
2
+ import { DeepPartial } from '../../../types';
3
+ export declare const getSurfaceStyles: (props: DeepPartial<SurfaceConfig>) => string;
@@ -0,0 +1,38 @@
1
+ import { cva } from '../../../styled-system/css';
2
+ /** Surface CVA — map individual token keys to style declarations. */
3
+ const getSurfaceStylesCva = cva({
4
+ variants: {
5
+ bg: {
6
+ none: { bg: 'transparent' },
7
+ canvas: { bg: 'canvas' },
8
+ inset: { bg: 'inset' },
9
+ surface: { bg: 'surface' },
10
+ elevated: { bg: 'elevated' },
11
+ overlay: { bg: 'overlay' },
12
+ },
13
+ shadow: {
14
+ none: { boxShadow: 'none' },
15
+ sm: { boxShadow: 'sm' },
16
+ md: { boxShadow: 'md' },
17
+ lg: { boxShadow: 'lg' },
18
+ },
19
+ structure: {
20
+ none: {},
21
+ default: { borderWidth: 'md', borderStyle: 'solid', borderColor: 'structure.default' },
22
+ subtle: { borderWidth: 'md', borderStyle: 'solid', borderColor: 'structure.subtle' },
23
+ strong: { borderWidth: 'md', borderStyle: 'solid', borderColor: 'structure.strong' },
24
+ },
25
+ zIndex: {
26
+ none: {},
27
+ base: { zIndex: 'base' },
28
+ overlay: { zIndex: 'overlay' },
29
+ sticky: { zIndex: 'sticky' },
30
+ modal: { zIndex: 'modal' },
31
+ system: { zIndex: 'system' },
32
+ },
33
+ },
34
+ });
35
+ export const getSurfaceStyles = (props) => {
36
+ return getSurfaceStylesCva(props);
37
+ };
38
+ //# sourceMappingURL=get-surface-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-surface-styles.js","sourceRoot":"","sources":["../../../../src/utils/theme-utilities/get-surface-styles/get-surface-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAI1C,qEAAqE;AACrE,MAAM,mBAAmB,GAAG,GAAG,CAAC;IAC/B,QAAQ,EAAE;QACT,EAAE,EAAE;YACH,IAAI,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE;YAC3B,MAAM,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE;YACxB,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE;YACtB,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE;YAC1B,QAAQ,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE;YAC5B,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE;SAC1B;QACD,MAAM,EAAE;YACP,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;YAC3B,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;YACvB,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;YACvB,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;SACvB;QACD,SAAS,EAAE;YACV,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE;YACtF,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE;YACpF,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE;SACpF;QACD,MAAM,EAAE;YACP,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;YACxB,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;YAC9B,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;YAC5B,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE;YAC1B,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;SAC5B;KACD;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAiC,EAAE,EAAE;IACrE,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './get-surface-styles';
@@ -0,0 +1,2 @@
1
+ export * from './get-surface-styles';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/theme-utilities/get-surface-styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { ColoredTextOptions } from '../../../types';
2
+ /**
3
+ * Typography color CVA. Maps `ColoredTextOptions` values to Panda semantic text color tokens.
4
+ *
5
+ * Variant keys mirror the semantic text token names plus any color-shade aliases used
6
+ * across the system. Update this when `ColoredTextOptions` changes.
7
+ *
8
+ * @example
9
+ * <p className={getTextColorStyles({ color: 'secondary' })}>...</p>
10
+ */
11
+ export declare const getTextColorStyles: (color: ColoredTextOptions) => string;
@@ -0,0 +1,34 @@
1
+ import { cva } from '../../../styled-system/css';
2
+ const styles = cva({
3
+ variants: {
4
+ color: {
5
+ standard: { color: 'text.standard' },
6
+ 'text-secondary': { color: 'text.secondary' },
7
+ disabled: { color: 'text.disabled' },
8
+ accent: { color: 'text.accent' },
9
+ inverted: { color: 'text.inverted' },
10
+ black: { color: 'black' },
11
+ primary: { color: 'primary.main' },
12
+ secondary: { color: 'secondary.main' },
13
+ tertiary: { color: 'tertiary.main' },
14
+ gray: { color: 'gray.main' },
15
+ success: { color: 'success.main' },
16
+ info: { color: 'info.main' },
17
+ error: { color: 'error.main' },
18
+ warning: { color: 'warning.main' },
19
+ },
20
+ },
21
+ });
22
+ /**
23
+ * Typography color CVA. Maps `ColoredTextOptions` values to Panda semantic text color tokens.
24
+ *
25
+ * Variant keys mirror the semantic text token names plus any color-shade aliases used
26
+ * across the system. Update this when `ColoredTextOptions` changes.
27
+ *
28
+ * @example
29
+ * <p className={getTextColorStyles({ color: 'secondary' })}>...</p>
30
+ */
31
+ export const getTextColorStyles = (color) => {
32
+ return styles({ color });
33
+ };
34
+ //# sourceMappingURL=get-text-color-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-text-color-styles.js","sourceRoot":"","sources":["../../../../src/utils/theme-utilities/get-text-color-styles/get-text-color-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAG1C,MAAM,MAAM,GAAG,GAAG,CAAC;IAClB,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,QAAQ,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE;YACpC,gBAAgB,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE;YAC7C,QAAQ,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE;YACpC,MAAM,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE;YAChC,QAAQ,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE;YACpC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YACzB,OAAO,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;YAClC,SAAS,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE;YACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE;YACpC,IAAI,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE;YAC5B,OAAO,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;YAClC,IAAI,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE;YAC5B,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE;YAC9B,OAAO,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;SAClC;KACD;CACD,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAyB,EAAE,EAAE;IAC/D,OAAO,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC1B,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './get-text-color-styles';
@@ -0,0 +1,2 @@
1
+ export * from './get-text-color-styles';
2
+ //# sourceMappingURL=index.js.map