@uzum-tech/ui 1.4.1 → 1.5.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 (233) hide show
  1. package/dist/index.js +65374 -64281
  2. package/dist/index.prod.js +3 -3
  3. package/es/_internal/icons/SiderUnionBorder.js +1 -1
  4. package/es/_internal/index.d.ts +2 -0
  5. package/es/_internal/index.js +1 -0
  6. package/es/_internal/typography/index.d.ts +2 -0
  7. package/es/_internal/typography/index.js +1 -0
  8. package/es/_internal/typography/src/styles/text.cssr.d.ts +2 -0
  9. package/es/_internal/typography/src/styles/text.cssr.js +78 -0
  10. package/es/_internal/typography/src/text.d.ts +246 -0
  11. package/es/_internal/typography/src/text.js +79 -0
  12. package/es/_internal/typography/src/variants.d.ts +13 -0
  13. package/es/_internal/typography/src/variants.js +132 -0
  14. package/es/_internal/typography/styles/dark.d.ts +3 -0
  15. package/es/_internal/typography/styles/dark.js +8 -0
  16. package/es/_internal/typography/styles/index.d.ts +3 -0
  17. package/es/_internal/typography/styles/index.js +2 -0
  18. package/es/_internal/typography/styles/light.d.ts +24 -0
  19. package/es/_internal/typography/styles/light.js +28 -0
  20. package/es/_styles/common/_common.d.ts +2 -0
  21. package/es/_styles/common/_common.js +3 -1
  22. package/es/_styles/common/light.d.ts +2 -0
  23. package/es/action-card/index.d.ts +4 -0
  24. package/es/action-card/index.js +2 -0
  25. package/es/action-card/src/ActionCard.d.ts +313 -0
  26. package/es/action-card/src/ActionCard.js +101 -0
  27. package/es/action-card/src/styles/index.cssr.d.ts +2 -0
  28. package/es/action-card/src/styles/index.cssr.js +113 -0
  29. package/es/action-card/styles/dark.d.ts +3 -0
  30. package/es/action-card/styles/dark.js +11 -0
  31. package/es/action-card/styles/index.d.ts +3 -0
  32. package/es/action-card/styles/index.js +2 -0
  33. package/es/action-card/styles/light.d.ts +29 -0
  34. package/es/action-card/styles/light.js +33 -0
  35. package/es/avatar/src/Avatar.d.ts +13 -3
  36. package/es/avatar/src/Avatar.js +4 -3
  37. package/es/avatar/src/styles/index.cssr.js +3 -2
  38. package/es/avatar/styles/light.d.ts +1 -0
  39. package/es/avatar/styles/light.js +4 -3
  40. package/es/avatar-group/src/AvatarGroup.d.ts +10 -0
  41. package/es/avatar-group/styles/light.d.ts +1 -0
  42. package/es/badge/src/Badge.d.ts +10 -0
  43. package/es/badge/src/Badge.js +3 -2
  44. package/es/badge/src/styles/index.cssr.js +19 -1
  45. package/es/badge/styles/light.d.ts +1 -0
  46. package/es/badge/styles/light.js +4 -3
  47. package/es/components.d.ts +1 -0
  48. package/es/components.js +1 -0
  49. package/es/config-provider/src/internal-interface.d.ts +2 -0
  50. package/es/data-table/src/DataTable.d.ts +14 -0
  51. package/es/data-table/src/DataTable.js +3 -3
  52. package/es/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
  53. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +2 -0
  54. package/es/data-table/src/TableParts/Body.d.ts +2 -0
  55. package/es/data-table/src/TableParts/Body.js +10 -1
  56. package/es/data-table/src/TableParts/BodySkeleton.d.ts +18 -0
  57. package/es/data-table/src/TableParts/BodySkeleton.js +52 -0
  58. package/es/data-table/src/TableParts/Header.d.ts +2 -0
  59. package/es/data-table/src/interface.d.ts +6 -0
  60. package/es/data-table/src/styles/index.cssr.js +1 -1
  61. package/es/data-table/styles/light.d.ts +2 -0
  62. package/es/data-table/styles/light.js +1 -1
  63. package/es/dialog/src/DialogProvider.d.ts +4 -0
  64. package/es/icon-wrapper/src/IconWrapper.d.ts +40 -9
  65. package/es/icon-wrapper/src/IconWrapper.js +23 -5
  66. package/es/icon-wrapper/src/interface.d.ts +1 -0
  67. package/es/icon-wrapper/src/interface.js +1 -0
  68. package/es/icon-wrapper/src/styles/index.cssr.js +17 -5
  69. package/es/layout/src/styles/layout-sider.cssr.js +1 -1
  70. package/es/modal/src/BodyWrapper.d.ts +1 -0
  71. package/es/modal/src/Modal.d.ts +9 -0
  72. package/es/modal/styles/light.d.ts +2 -0
  73. package/es/modal/styles/light.js +2 -1
  74. package/es/pagination/src/Pagination.d.ts +22 -0
  75. package/es/pagination/src/Pagination.js +4 -2
  76. package/es/pagination/src/styles/index.cssr.js +11 -0
  77. package/es/pagination/styles/light.d.ts +4 -0
  78. package/es/pagination/styles/light.js +7 -5
  79. package/es/spin/styles/light.js +3 -3
  80. package/es/steps/src/Step.d.ts +17 -0
  81. package/es/steps/src/Step.js +81 -25
  82. package/es/steps/src/Steps.d.ts +127 -1
  83. package/es/steps/src/Steps.js +4 -1
  84. package/es/steps/src/interface.d.ts +10 -2
  85. package/es/steps/src/interface.js +10 -1
  86. package/es/steps/src/styles/index.cssr.js +115 -3
  87. package/es/steps/styles/light.d.ts +14 -0
  88. package/es/steps/styles/light.js +16 -2
  89. package/es/theme-editor/src/ThemeEditor.d.ts +2 -0
  90. package/es/themes/dark.js +2 -0
  91. package/es/themes/light.js +2 -0
  92. package/es/toggle-button/src/ToggleButton.d.ts +13 -0
  93. package/es/toggle-button/src/ToggleButton.js +5 -2
  94. package/es/toggle-button/src/styles/toggle-button.cssr.js +3 -0
  95. package/es/typography/src/a.d.ts +27 -0
  96. package/es/typography/src/a.js +4 -1
  97. package/es/typography/src/blockquote.d.ts +27 -0
  98. package/es/typography/src/blockquote.js +4 -1
  99. package/es/typography/src/create-header.d.ts +27 -0
  100. package/es/typography/src/create-header.js +4 -1
  101. package/es/typography/src/headers.d.ts +108 -0
  102. package/es/typography/src/hr.d.ts +18 -0
  103. package/es/typography/src/hr.js +4 -0
  104. package/es/typography/src/li.js +4 -1
  105. package/es/typography/src/ol.d.ts +27 -0
  106. package/es/typography/src/ol.js +4 -1
  107. package/es/typography/src/p.d.ts +27 -0
  108. package/es/typography/src/p.js +4 -1
  109. package/es/typography/src/text.d.ts +128 -524
  110. package/es/typography/src/text.js +68 -69
  111. package/es/typography/src/ul.d.ts +27 -0
  112. package/es/typography/src/ul.js +4 -1
  113. package/es/typography/styles/light.d.ts +3 -0
  114. package/es/typography/styles/light.js +3 -0
  115. package/es/version.d.ts +1 -1
  116. package/es/version.js +1 -1
  117. package/lib/_internal/icons/SiderUnionBorder.js +1 -1
  118. package/lib/_internal/index.d.ts +2 -0
  119. package/lib/_internal/index.js +4 -1
  120. package/lib/_internal/typography/index.d.ts +2 -0
  121. package/lib/_internal/typography/index.js +9 -0
  122. package/lib/_internal/typography/src/styles/text.cssr.d.ts +2 -0
  123. package/lib/_internal/typography/src/styles/text.cssr.js +83 -0
  124. package/lib/_internal/typography/src/text.d.ts +246 -0
  125. package/lib/_internal/typography/src/text.js +85 -0
  126. package/lib/_internal/typography/src/variants.d.ts +13 -0
  127. package/lib/_internal/typography/src/variants.js +137 -0
  128. package/lib/_internal/typography/styles/dark.d.ts +3 -0
  129. package/lib/_internal/typography/styles/dark.js +10 -0
  130. package/lib/_internal/typography/styles/index.d.ts +3 -0
  131. package/lib/_internal/typography/styles/index.js +10 -0
  132. package/lib/_internal/typography/styles/light.d.ts +24 -0
  133. package/lib/_internal/typography/styles/light.js +32 -0
  134. package/lib/_styles/common/_common.d.ts +2 -0
  135. package/lib/_styles/common/_common.js +3 -1
  136. package/lib/_styles/common/light.d.ts +2 -0
  137. package/lib/action-card/index.d.ts +4 -0
  138. package/lib/action-card/index.js +11 -0
  139. package/lib/action-card/src/ActionCard.d.ts +313 -0
  140. package/lib/action-card/src/ActionCard.js +107 -0
  141. package/lib/action-card/src/styles/index.cssr.d.ts +2 -0
  142. package/lib/action-card/src/styles/index.cssr.js +118 -0
  143. package/lib/action-card/styles/dark.d.ts +3 -0
  144. package/lib/action-card/styles/dark.js +13 -0
  145. package/lib/action-card/styles/index.d.ts +3 -0
  146. package/lib/action-card/styles/index.js +10 -0
  147. package/lib/action-card/styles/light.d.ts +29 -0
  148. package/lib/action-card/styles/light.js +37 -0
  149. package/lib/avatar/src/Avatar.d.ts +13 -3
  150. package/lib/avatar/src/Avatar.js +4 -3
  151. package/lib/avatar/src/styles/index.cssr.js +3 -2
  152. package/lib/avatar/styles/light.d.ts +1 -0
  153. package/lib/avatar/styles/light.js +4 -3
  154. package/lib/avatar-group/src/AvatarGroup.d.ts +10 -0
  155. package/lib/avatar-group/styles/light.d.ts +1 -0
  156. package/lib/badge/src/Badge.d.ts +10 -0
  157. package/lib/badge/src/Badge.js +3 -2
  158. package/lib/badge/src/styles/index.cssr.js +19 -1
  159. package/lib/badge/styles/light.d.ts +1 -0
  160. package/lib/badge/styles/light.js +4 -3
  161. package/lib/components.d.ts +1 -0
  162. package/lib/components.js +1 -0
  163. package/lib/config-provider/src/internal-interface.d.ts +2 -0
  164. package/lib/data-table/src/DataTable.d.ts +14 -0
  165. package/lib/data-table/src/DataTable.js +3 -3
  166. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
  167. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +2 -0
  168. package/lib/data-table/src/TableParts/Body.d.ts +2 -0
  169. package/lib/data-table/src/TableParts/Body.js +10 -1
  170. package/lib/data-table/src/TableParts/BodySkeleton.d.ts +18 -0
  171. package/lib/data-table/src/TableParts/BodySkeleton.js +54 -0
  172. package/lib/data-table/src/TableParts/Header.d.ts +2 -0
  173. package/lib/data-table/src/interface.d.ts +6 -0
  174. package/lib/data-table/src/styles/index.cssr.js +1 -1
  175. package/lib/data-table/styles/light.d.ts +2 -0
  176. package/lib/data-table/styles/light.js +1 -1
  177. package/lib/dialog/src/DialogProvider.d.ts +4 -0
  178. package/lib/icon-wrapper/src/IconWrapper.d.ts +40 -9
  179. package/lib/icon-wrapper/src/IconWrapper.js +23 -5
  180. package/lib/icon-wrapper/src/interface.d.ts +1 -0
  181. package/lib/icon-wrapper/src/interface.js +2 -0
  182. package/lib/icon-wrapper/src/styles/index.cssr.js +16 -4
  183. package/lib/layout/src/styles/layout-sider.cssr.js +1 -1
  184. package/lib/modal/src/BodyWrapper.d.ts +1 -0
  185. package/lib/modal/src/Modal.d.ts +9 -0
  186. package/lib/modal/styles/light.d.ts +2 -0
  187. package/lib/modal/styles/light.js +2 -1
  188. package/lib/pagination/src/Pagination.d.ts +22 -0
  189. package/lib/pagination/src/Pagination.js +4 -2
  190. package/lib/pagination/src/styles/index.cssr.js +11 -0
  191. package/lib/pagination/styles/light.d.ts +4 -0
  192. package/lib/pagination/styles/light.js +7 -5
  193. package/lib/spin/styles/light.js +3 -3
  194. package/lib/steps/src/Step.d.ts +17 -0
  195. package/lib/steps/src/Step.js +81 -25
  196. package/lib/steps/src/Steps.d.ts +127 -1
  197. package/lib/steps/src/Steps.js +4 -1
  198. package/lib/steps/src/interface.d.ts +10 -2
  199. package/lib/steps/src/interface.js +11 -0
  200. package/lib/steps/src/styles/index.cssr.js +115 -3
  201. package/lib/steps/styles/light.d.ts +14 -0
  202. package/lib/steps/styles/light.js +16 -2
  203. package/lib/theme-editor/src/ThemeEditor.d.ts +2 -0
  204. package/lib/themes/dark.js +2 -0
  205. package/lib/themes/light.js +2 -0
  206. package/lib/toggle-button/src/ToggleButton.d.ts +13 -0
  207. package/lib/toggle-button/src/ToggleButton.js +5 -2
  208. package/lib/toggle-button/src/styles/toggle-button.cssr.js +3 -0
  209. package/lib/typography/src/a.d.ts +27 -0
  210. package/lib/typography/src/a.js +3 -0
  211. package/lib/typography/src/blockquote.d.ts +27 -0
  212. package/lib/typography/src/blockquote.js +3 -0
  213. package/lib/typography/src/create-header.d.ts +27 -0
  214. package/lib/typography/src/create-header.js +3 -0
  215. package/lib/typography/src/headers.d.ts +108 -0
  216. package/lib/typography/src/hr.d.ts +18 -0
  217. package/lib/typography/src/hr.js +4 -0
  218. package/lib/typography/src/li.js +3 -0
  219. package/lib/typography/src/ol.d.ts +27 -0
  220. package/lib/typography/src/ol.js +3 -0
  221. package/lib/typography/src/p.d.ts +27 -0
  222. package/lib/typography/src/p.js +3 -0
  223. package/lib/typography/src/text.d.ts +128 -524
  224. package/lib/typography/src/text.js +66 -70
  225. package/lib/typography/src/ul.d.ts +27 -0
  226. package/lib/typography/src/ul.js +3 -0
  227. package/lib/typography/styles/light.d.ts +3 -0
  228. package/lib/typography/styles/light.js +3 -0
  229. package/lib/version.d.ts +1 -1
  230. package/lib/version.js +1 -1
  231. package/package.json +1 -1
  232. package/volar.d.ts +1 -0
  233. package/web-types.json +147 -96
@@ -3,6 +3,6 @@ export default defineComponent({
3
3
  name: 'SiderUnionBorder',
4
4
  render() {
5
5
  return (h("svg", { viewBox: "0 0 35 82", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
6
- h("path", { d: "M15 0L0 0V82H15V72.0682C15 67.6499 18.7463 64.209 22.7412 62.3215C29.9427 58.9189 35 50.9123 35 41.5775C35 32.2426 29.9427 24.236 22.7412 20.8334C18.7463 18.946 15 15.505 15 11.0867V0Z", fill: "currentColor" })));
6
+ h("path", { d: "M15 0L0 0V82H15V72.0682C15 67.6499 18.7463 64.209 22.7412 62.3215C29.9427 58.9189 35 50.9123 35 41.5775C35 32.2426 29.9427 24.236 22.7412 20.8334C18.7463 18.946 15 15.505 15 11.0867V0Z", fill: "#fff" })));
7
7
  }
8
8
  });
@@ -23,3 +23,5 @@ export type { CheckboxBaseProps, UseCheckbox, OnUpdateChecked, OnUpdateCheckedIm
23
23
  export { radioBaseProps, radioGroupInjectionKey, useRadio } from './radio';
24
24
  export type { OnUpdateValue, OnUpdateValueImpl, RadioGroupInjection, UseRadio, RadioBaseProps } from './radio';
25
25
  export { default as UBaseAccountOption } from './account-option';
26
+ export { default as InternalUText, internalTextProps } from './typography/src/text';
27
+ export type { InternalTextProps } from './typography/src/text';
@@ -16,3 +16,4 @@ export { UScrollbar, UxScrollbar } from './scrollbar';
16
16
  export { checkboxGroupInjectionKey, checkboxBaseProps, useCheckbox } from './checkbox';
17
17
  export { radioBaseProps, radioGroupInjectionKey, useRadio } from './radio';
18
18
  export { default as UBaseAccountOption } from './account-option';
19
+ export { default as InternalUText, internalTextProps } from './typography/src/text';
@@ -0,0 +1,2 @@
1
+ export { default as InternalUText, internalTextProps } from './src/text';
2
+ export type { InternalTextProps } from './src/text';
@@ -0,0 +1 @@
1
+ export { default as InternalUText, internalTextProps } from './src/text';
@@ -0,0 +1,2 @@
1
+ declare const _default: import("css-render").CNode;
2
+ export default _default;
@@ -0,0 +1,78 @@
1
+ import { cB, cM, c } from '../../../../_utils/cssr';
2
+ // vars:
3
+ // --u-text-color
4
+ // --u-font-weight-strong
5
+ // --u-font-famliy-mono
6
+ // --u-code-border-radius
7
+ // --u-code-text-color
8
+ // --u-code-color
9
+ // --u-code-border
10
+ export default cB('text', `
11
+ transition: color .3s var(--u-bezier);
12
+ color: var(--u-text-color);
13
+ margin: 0;
14
+ padding: 0;
15
+ `, [cM('strong', `
16
+ font-weight: var(--u-font-weight-strong);
17
+ `), cM('italic', {
18
+ fontStyle: 'italic'
19
+ }), cM('underline', {
20
+ textDecoration: 'underline'
21
+ }), cM('strikethrough', {
22
+ textDecoration: 'line-through'
23
+ }), cM('variant', `
24
+ font-family: var(--u-variant-font-family);
25
+ font-size: var(--u-variant-font-size);
26
+ font-weight: var(--u-variant-font-weight);
27
+ line-height: var(--u-variant-line-height);
28
+ letter-spacing: var(--u-variant-letter-spacing);
29
+ font-style: var(--u-variant-font-style);
30
+ `), c('code&', `
31
+ line-height: 1.4;
32
+ display: inline-block;
33
+ font-family: var(--u-font-famliy-mono);
34
+ transition:
35
+ color .3s var(--u-bezier),
36
+ border-color .3s var(--u-bezier),
37
+ background-color .3s var(--u-bezier);
38
+ box-sizing: border-box;
39
+ padding: .05em .35em 0 .35em;
40
+ border-radius: var(--u-code-border-radius);
41
+ font-size: .9em;
42
+ color: var(--u-code-text-color);
43
+ background-color: var(--u-code-color);
44
+ border: var(--u-code-border);
45
+ `), c('blockquote&', `
46
+ font-size: var(--u-font-size);
47
+ line-height: var(--u-line-height);
48
+ margin: 0;
49
+ margin-top: 12px;
50
+ margin-bottom: 12px;
51
+ box-sizing: border-box;
52
+ padding-left: 12px;
53
+ border-left: 4px solid var(--u-prefix-color);
54
+ color: var(--u-text-color);
55
+ transition:
56
+ color .3s var(--u-bezier),
57
+ border-color .3s var(--u-bezier);
58
+ `, [c('&:first-child', {
59
+ marginTop: 0
60
+ }), c('&:last-child', {
61
+ marginBottom: 0
62
+ }), cM('align-text', {
63
+ marginLeft: '-16px'
64
+ })]), c('a&', `
65
+ cursor: pointer;
66
+ transition:
67
+ color .3s var(--u-bezier),
68
+ text-decoration-color .3s var(--u-bezier);
69
+ text-decoration-color: var(--u-text-color);
70
+ color: var(--u-a-text-color);
71
+ `), c('p&', `
72
+ box-sizing: border-box;
73
+ transition: color .3s var(--u-bezier);
74
+ margin: var(--u-margin);
75
+ font-size: var(--u-font-size);
76
+ line-height: var(--u-line-height);
77
+ color: var(--u-text-color);
78
+ `, [c('&:first-child', 'margin-top: 0;'), c('&:last-child', 'margin-bottom: 0;')])]);
@@ -0,0 +1,246 @@
1
+ import { type PropType, ExtractPublicPropTypes } from 'vue';
2
+ import { TypographyVariant } from './variants';
3
+ export declare const internalTextProps: {
4
+ readonly variant: {
5
+ readonly type: PropType<TypographyVariant>;
6
+ readonly default: undefined;
7
+ };
8
+ readonly tag: {
9
+ readonly type: PropType<keyof HTMLElementTagNameMap>;
10
+ readonly default: undefined;
11
+ };
12
+ readonly text: {
13
+ readonly type: StringConstructor;
14
+ readonly default: undefined;
15
+ };
16
+ readonly type: {
17
+ readonly type: PropType<"default" | "success" | "info" | "warning" | "error">;
18
+ readonly default: "default";
19
+ };
20
+ readonly strong: BooleanConstructor;
21
+ readonly italic: BooleanConstructor;
22
+ readonly underline: BooleanConstructor;
23
+ readonly strikethrough: BooleanConstructor;
24
+ readonly theme: PropType<import("../../../_mixins").Theme<"Typography", {
25
+ margin: string;
26
+ aTextColor: string;
27
+ blockquoteTextColor: string;
28
+ blockquotePrefixColor: string;
29
+ codeBorderRadius: string;
30
+ fontSize: string;
31
+ lineHeight: string;
32
+ textColor: string;
33
+ textColorPrimary: string;
34
+ textColorInfo: string;
35
+ textColorSuccess: string;
36
+ textColorWarning: string;
37
+ textColorError: string;
38
+ codeTextColor: string;
39
+ codeColor: string;
40
+ codeBorder: string;
41
+ }, any>>;
42
+ readonly themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Typography", {
43
+ margin: string;
44
+ aTextColor: string;
45
+ blockquoteTextColor: string;
46
+ blockquotePrefixColor: string;
47
+ codeBorderRadius: string;
48
+ fontSize: string;
49
+ lineHeight: string;
50
+ textColor: string;
51
+ textColorPrimary: string;
52
+ textColorInfo: string;
53
+ textColorSuccess: string;
54
+ textColorWarning: string;
55
+ textColorError: string;
56
+ codeTextColor: string;
57
+ codeColor: string;
58
+ codeBorder: string;
59
+ }, any>>>;
60
+ readonly builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Typography", {
61
+ margin: string;
62
+ aTextColor: string;
63
+ blockquoteTextColor: string;
64
+ blockquotePrefixColor: string;
65
+ codeBorderRadius: string;
66
+ fontSize: string;
67
+ lineHeight: string;
68
+ textColor: string;
69
+ textColorPrimary: string;
70
+ textColorInfo: string;
71
+ textColorSuccess: string;
72
+ textColorWarning: string;
73
+ textColorError: string;
74
+ codeTextColor: string;
75
+ codeColor: string;
76
+ codeBorder: string;
77
+ }, any>>>;
78
+ };
79
+ export type InternalTextProps = ExtractPublicPropTypes<typeof internalTextProps>;
80
+ declare const _default: import("vue").DefineComponent<{
81
+ readonly variant: {
82
+ readonly type: PropType<TypographyVariant>;
83
+ readonly default: undefined;
84
+ };
85
+ readonly tag: {
86
+ readonly type: PropType<keyof HTMLElementTagNameMap>;
87
+ readonly default: undefined;
88
+ };
89
+ readonly text: {
90
+ readonly type: StringConstructor;
91
+ readonly default: undefined;
92
+ };
93
+ readonly type: {
94
+ readonly type: PropType<"default" | "success" | "info" | "warning" | "error">;
95
+ readonly default: "default";
96
+ };
97
+ readonly strong: BooleanConstructor;
98
+ readonly italic: BooleanConstructor;
99
+ readonly underline: BooleanConstructor;
100
+ readonly strikethrough: BooleanConstructor;
101
+ readonly theme: PropType<import("../../../_mixins").Theme<"Typography", {
102
+ margin: string;
103
+ aTextColor: string;
104
+ blockquoteTextColor: string;
105
+ blockquotePrefixColor: string;
106
+ codeBorderRadius: string;
107
+ fontSize: string;
108
+ lineHeight: string;
109
+ textColor: string;
110
+ textColorPrimary: string;
111
+ textColorInfo: string;
112
+ textColorSuccess: string;
113
+ textColorWarning: string;
114
+ textColorError: string;
115
+ codeTextColor: string;
116
+ codeColor: string;
117
+ codeBorder: string;
118
+ }, any>>;
119
+ readonly themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Typography", {
120
+ margin: string;
121
+ aTextColor: string;
122
+ blockquoteTextColor: string;
123
+ blockquotePrefixColor: string;
124
+ codeBorderRadius: string;
125
+ fontSize: string;
126
+ lineHeight: string;
127
+ textColor: string;
128
+ textColorPrimary: string;
129
+ textColorInfo: string;
130
+ textColorSuccess: string;
131
+ textColorWarning: string;
132
+ textColorError: string;
133
+ codeTextColor: string;
134
+ codeColor: string;
135
+ codeBorder: string;
136
+ }, any>>>;
137
+ readonly builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Typography", {
138
+ margin: string;
139
+ aTextColor: string;
140
+ blockquoteTextColor: string;
141
+ blockquotePrefixColor: string;
142
+ codeBorderRadius: string;
143
+ fontSize: string;
144
+ lineHeight: string;
145
+ textColor: string;
146
+ textColorPrimary: string;
147
+ textColorInfo: string;
148
+ textColorSuccess: string;
149
+ textColorWarning: string;
150
+ textColorError: string;
151
+ codeTextColor: string;
152
+ codeColor: string;
153
+ codeBorder: string;
154
+ }, any>>>;
155
+ }, {
156
+ mergedClsPrefix: import("vue").Ref<string>;
157
+ tagToRender: keyof HTMLElementTagNameMap;
158
+ cssVars: import("vue").ComputedRef<Record<string, string>> | undefined;
159
+ themeClass: import("vue").Ref<string> | undefined;
160
+ onRender: (() => void) | undefined;
161
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
162
+ readonly variant: {
163
+ readonly type: PropType<TypographyVariant>;
164
+ readonly default: undefined;
165
+ };
166
+ readonly tag: {
167
+ readonly type: PropType<keyof HTMLElementTagNameMap>;
168
+ readonly default: undefined;
169
+ };
170
+ readonly text: {
171
+ readonly type: StringConstructor;
172
+ readonly default: undefined;
173
+ };
174
+ readonly type: {
175
+ readonly type: PropType<"default" | "success" | "info" | "warning" | "error">;
176
+ readonly default: "default";
177
+ };
178
+ readonly strong: BooleanConstructor;
179
+ readonly italic: BooleanConstructor;
180
+ readonly underline: BooleanConstructor;
181
+ readonly strikethrough: BooleanConstructor;
182
+ readonly theme: PropType<import("../../../_mixins").Theme<"Typography", {
183
+ margin: string;
184
+ aTextColor: string;
185
+ blockquoteTextColor: string;
186
+ blockquotePrefixColor: string;
187
+ codeBorderRadius: string;
188
+ fontSize: string;
189
+ lineHeight: string;
190
+ textColor: string;
191
+ textColorPrimary: string;
192
+ textColorInfo: string;
193
+ textColorSuccess: string;
194
+ textColorWarning: string;
195
+ textColorError: string;
196
+ codeTextColor: string;
197
+ codeColor: string;
198
+ codeBorder: string;
199
+ }, any>>;
200
+ readonly themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Typography", {
201
+ margin: string;
202
+ aTextColor: string;
203
+ blockquoteTextColor: string;
204
+ blockquotePrefixColor: string;
205
+ codeBorderRadius: string;
206
+ fontSize: string;
207
+ lineHeight: string;
208
+ textColor: string;
209
+ textColorPrimary: string;
210
+ textColorInfo: string;
211
+ textColorSuccess: string;
212
+ textColorWarning: string;
213
+ textColorError: string;
214
+ codeTextColor: string;
215
+ codeColor: string;
216
+ codeBorder: string;
217
+ }, any>>>;
218
+ readonly builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Typography", {
219
+ margin: string;
220
+ aTextColor: string;
221
+ blockquoteTextColor: string;
222
+ blockquotePrefixColor: string;
223
+ codeBorderRadius: string;
224
+ fontSize: string;
225
+ lineHeight: string;
226
+ textColor: string;
227
+ textColorPrimary: string;
228
+ textColorInfo: string;
229
+ textColorSuccess: string;
230
+ textColorWarning: string;
231
+ textColorError: string;
232
+ codeTextColor: string;
233
+ codeColor: string;
234
+ codeBorder: string;
235
+ }, any>>>;
236
+ }>>, {
237
+ readonly type: "default" | "info" | "success" | "warning" | "error";
238
+ readonly tag: keyof HTMLElementTagNameMap;
239
+ readonly strong: boolean;
240
+ readonly text: string;
241
+ readonly italic: boolean;
242
+ readonly underline: boolean;
243
+ readonly strikethrough: boolean;
244
+ readonly variant: TypographyVariant;
245
+ }, {}>;
246
+ export default _default;
@@ -0,0 +1,79 @@
1
+ import { h, defineComponent, computed } from 'vue';
2
+ import { typographyLight } from '../styles';
3
+ import style from './styles/text.cssr';
4
+ import { getVariantCssVars, getVariantTag } from './variants';
5
+ import { useTheme, useConfig, useThemeClass } from '../../../_mixins';
6
+ import { createKey } from '../../../_utils/cssr';
7
+ export const internalTextProps = Object.assign(Object.assign({}, useTheme.props), { variant: {
8
+ type: String,
9
+ default: undefined
10
+ }, tag: {
11
+ type: String,
12
+ default: undefined
13
+ }, text: {
14
+ type: String,
15
+ default: undefined
16
+ }, type: {
17
+ type: String,
18
+ default: 'default'
19
+ }, strong: Boolean, italic: Boolean, underline: Boolean, strikethrough: Boolean });
20
+ export default defineComponent({
21
+ name: 'InternalUText',
22
+ props: internalTextProps,
23
+ setup(props) {
24
+ const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
25
+ const themeRef = useTheme('Typography', '-text', style, typographyLight, props, mergedClsPrefixRef);
26
+ const cssVarsRef = computed(() => {
27
+ const { variant } = props;
28
+ const textColorKey = props.type === 'default'
29
+ ? 'textColor'
30
+ : createKey('textColor', props.type);
31
+ const { common: { fontWeightStrong, fontFamilyMono, cubicBezierEaseInOut, fontFamilyWixMadeforDisplay }, self: { aTextColor, codeTextColor, codeBorderRadius, codeColor, codeBorder, [textColorKey]: textColor, fontSize, lineHeight, margin, blockquotePrefixColor } } = themeRef.value;
32
+ const baseVars = {
33
+ '--u-bezier': cubicBezierEaseInOut,
34
+ '--u-a-text-color': aTextColor,
35
+ '--u-text-color': textColor,
36
+ '--u-font-weight-strong': fontWeightStrong,
37
+ '--u-font-famliy-mono': fontFamilyMono,
38
+ '--u-code-border-radius': codeBorderRadius,
39
+ '--u-code-text-color': codeTextColor,
40
+ '--u-code-color': codeColor,
41
+ '--u-code-border': codeBorder,
42
+ '--u-font-size': fontSize,
43
+ '--u-line-height': lineHeight,
44
+ '--u-margin': margin,
45
+ '--u-prefix-color': blockquotePrefixColor
46
+ };
47
+ return getVariantCssVars(variant, baseVars, fontFamilyWixMadeforDisplay);
48
+ });
49
+ const themeClassHandle = inlineThemeDisabled
50
+ ? useThemeClass('text', computed(() => `${(props === null || props === void 0 ? void 0 : props.variant) || ''}${(props === null || props === void 0 ? void 0 : props.tag) || ''}`), cssVarsRef, props)
51
+ : undefined;
52
+ const tagToRender = props.tag || (props.variant && getVariantTag(props.variant)) || 'span';
53
+ return {
54
+ mergedClsPrefix: mergedClsPrefixRef,
55
+ tagToRender,
56
+ cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
57
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
58
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
59
+ };
60
+ },
61
+ render() {
62
+ var _a, _b, _c;
63
+ const { mergedClsPrefix } = this;
64
+ (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
65
+ const textClass = [
66
+ `${mergedClsPrefix}-text`,
67
+ this.themeClass,
68
+ {
69
+ [`${mergedClsPrefix}-text--variant`]: this.variant,
70
+ [`${mergedClsPrefix}-text--strong`]: this.strong,
71
+ [`${mergedClsPrefix}-text--italic`]: this.italic,
72
+ [`${mergedClsPrefix}-text--underline`]: this.underline,
73
+ [`${mergedClsPrefix}-text--strikethrough`]: this.strikethrough
74
+ }
75
+ ];
76
+ const children = this.text || ((_c = (_b = this.$slots).default) === null || _c === void 0 ? void 0 : _c.call(_b));
77
+ return h(this.tagToRender, { class: textClass, style: this.cssVars }, children);
78
+ }
79
+ });
@@ -0,0 +1,13 @@
1
+ export type TypographyVariant = 'display-l' | 'display-s' | 'heading-l-semi-bold' | 'heading-l-bold' | 'heading-m-semi-bold' | 'heading-m-bold' | 'heading-s-semi-bold' | 'heading-s-bold' | 'title-l-medium' | 'title-l-semi-bold' | 'title-l-bold' | 'title-m-medium' | 'title-m-semi-bold' | 'title-m-bold' | 'title-s-medium' | 'title-s-semi-bold' | 'title-s-bold' | 'body-l-medium' | 'body-l-semi-bold' | 'body-l-bold' | 'body-m-medium' | 'body-m-semi-bold' | 'body-m-bold' | 'body-s-medium' | 'body-s-semi-bold' | 'body-s-bold';
2
+ export interface TypographyVariantConfig {
3
+ fontFamily: string;
4
+ fontSize: string;
5
+ fontWeight: string;
6
+ fontStyle: string;
7
+ lineHeight: string;
8
+ letterSpacing: string;
9
+ tag: keyof HTMLElementTagNameMap;
10
+ }
11
+ export declare function getVariantCssVars(variant: TypographyVariant | undefined, baseVars: Record<string, string>, fontFamilyVariant: string): Record<string, string>;
12
+ export declare function getVariantTag(variant: TypographyVariant): keyof HTMLElementTagNameMap;
13
+ export declare const variantToCssVars: Record<TypographyVariant, TypographyVariantConfig>;
@@ -0,0 +1,132 @@
1
+ const fontFamily = 'var(--u-font-famliy-variant)';
2
+ const baseStyles = {
3
+ display: {
4
+ l: {
5
+ fontSize: '42px',
6
+ lineHeight: '48px',
7
+ letterSpacing: '-0.014em',
8
+ tag: 'h1'
9
+ },
10
+ s: {
11
+ fontSize: '36px',
12
+ lineHeight: '44px',
13
+ letterSpacing: '-0.013em',
14
+ tag: 'h1'
15
+ }
16
+ },
17
+ heading: {
18
+ l: {
19
+ fontSize: '32px',
20
+ lineHeight: '40px',
21
+ letterSpacing: '-0.01em',
22
+ tag: 'h2'
23
+ },
24
+ m: {
25
+ fontSize: '28px',
26
+ lineHeight: '36px',
27
+ letterSpacing: '-0.009em',
28
+ tag: 'h2'
29
+ },
30
+ s: {
31
+ fontSize: '24px',
32
+ lineHeight: '30px',
33
+ letterSpacing: '-0.01em',
34
+ tag: 'h2'
35
+ }
36
+ },
37
+ title: {
38
+ l: {
39
+ fontSize: '22px',
40
+ lineHeight: '32px',
41
+ letterSpacing: '-0.01em',
42
+ tag: 'h3'
43
+ },
44
+ m: {
45
+ fontSize: '20px',
46
+ lineHeight: '30px',
47
+ letterSpacing: '-0.009em',
48
+ tag: 'h3'
49
+ },
50
+ s: { fontSize: '18px', lineHeight: '28px', letterSpacing: '0', tag: 'h3' }
51
+ },
52
+ body: {
53
+ l: {
54
+ fontSize: '16px',
55
+ lineHeight: '24px',
56
+ letterSpacing: '0.004em',
57
+ tag: 'p'
58
+ },
59
+ m: {
60
+ fontSize: '14px',
61
+ lineHeight: '21px',
62
+ letterSpacing: '0.006em',
63
+ tag: 'p'
64
+ },
65
+ s: {
66
+ fontSize: '12px',
67
+ lineHeight: '16px',
68
+ letterSpacing: '0.008em',
69
+ tag: 'p'
70
+ }
71
+ }
72
+ };
73
+ const fontWeights = {
74
+ medium: { weight: '500', style: 'medium' },
75
+ 'semi-bold': { weight: '600', style: 'semibold' },
76
+ bold: { weight: '700', style: 'bold' }
77
+ };
78
+ function createVariant(category, size, weight) {
79
+ const base = baseStyles[category][size];
80
+ const { weight: fontWeight, style: fontStyle } = fontWeights[weight];
81
+ return {
82
+ fontFamily,
83
+ fontSize: base.fontSize,
84
+ fontWeight,
85
+ fontStyle,
86
+ lineHeight: base.lineHeight,
87
+ letterSpacing: base.letterSpacing,
88
+ tag: base.tag
89
+ };
90
+ }
91
+ export function getVariantCssVars(variant, baseVars, fontFamilyVariant) {
92
+ if (!variant || !variantToCssVars[variant]) {
93
+ return baseVars;
94
+ }
95
+ const variantStyles = variantToCssVars[variant];
96
+ return Object.assign(Object.assign({}, baseVars), { '--u-font-famliy-variant': fontFamilyVariant, '--u-variant-font-size': variantStyles.fontSize, '--u-variant-font-weight': variantStyles.fontWeight, '--u-variant-line-height': variantStyles.lineHeight, '--u-variant-font-family': variantStyles.fontFamily, '--u-variant-font-style': variantStyles.fontStyle, '--u-variant-letter-spacing': variantStyles.letterSpacing });
97
+ }
98
+ export function getVariantTag(variant) {
99
+ return variantToCssVars[variant].tag;
100
+ }
101
+ export const variantToCssVars = {
102
+ // Display variants
103
+ 'display-l': createVariant('display', 'l', 'bold'),
104
+ 'display-s': createVariant('display', 's', 'bold'),
105
+ // Heading variants
106
+ 'heading-l-semi-bold': createVariant('heading', 'l', 'semi-bold'),
107
+ 'heading-l-bold': createVariant('heading', 'l', 'bold'),
108
+ 'heading-m-semi-bold': createVariant('heading', 'm', 'semi-bold'),
109
+ 'heading-m-bold': createVariant('heading', 'm', 'bold'),
110
+ 'heading-s-semi-bold': createVariant('heading', 's', 'semi-bold'),
111
+ 'heading-s-bold': createVariant('heading', 's', 'bold'),
112
+ // Title variants
113
+ 'title-l-medium': createVariant('title', 'l', 'medium'),
114
+ 'title-l-semi-bold': createVariant('title', 'l', 'semi-bold'),
115
+ 'title-l-bold': createVariant('title', 'l', 'bold'),
116
+ 'title-m-medium': createVariant('title', 'm', 'medium'),
117
+ 'title-m-semi-bold': createVariant('title', 'm', 'semi-bold'),
118
+ 'title-m-bold': createVariant('title', 'm', 'bold'),
119
+ 'title-s-medium': createVariant('title', 's', 'medium'),
120
+ 'title-s-semi-bold': createVariant('title', 's', 'semi-bold'),
121
+ 'title-s-bold': createVariant('title', 's', 'bold'),
122
+ // Body variants
123
+ 'body-l-medium': createVariant('body', 'l', 'medium'),
124
+ 'body-l-semi-bold': createVariant('body', 'l', 'semi-bold'),
125
+ 'body-l-bold': createVariant('body', 'l', 'bold'),
126
+ 'body-m-medium': createVariant('body', 'm', 'medium'),
127
+ 'body-m-semi-bold': createVariant('body', 'm', 'semi-bold'),
128
+ 'body-m-bold': createVariant('body', 'm', 'bold'),
129
+ 'body-s-medium': createVariant('body', 's', 'medium'),
130
+ 'body-s-semi-bold': createVariant('body', 's', 'semi-bold'),
131
+ 'body-s-bold': createVariant('body', 's', 'bold')
132
+ };
@@ -0,0 +1,3 @@
1
+ import type { TypographyTheme } from './light';
2
+ declare const typographyDark: TypographyTheme;
3
+ export default typographyDark;
@@ -0,0 +1,8 @@
1
+ import { commonDark } from '../../../styles';
2
+ import { self } from './light';
3
+ const typographyDark = {
4
+ name: 'Typography',
5
+ common: commonDark,
6
+ self
7
+ };
8
+ export default typographyDark;
@@ -0,0 +1,3 @@
1
+ export { default as typographyDark } from './dark';
2
+ export { default as typographyLight } from './light';
3
+ export type { TypographyThemeVars, TypographyTheme } from './light';
@@ -0,0 +1,2 @@
1
+ export { default as typographyDark } from './dark';
2
+ export { default as typographyLight } from './light';
@@ -0,0 +1,24 @@
1
+ import { Theme } from '../../../_mixins';
2
+ import { ThemeCommonVars } from '../../../config-provider';
3
+ export declare const self: (vars: ThemeCommonVars) => {
4
+ margin: string;
5
+ aTextColor: string;
6
+ blockquoteTextColor: string;
7
+ blockquotePrefixColor: string;
8
+ codeBorderRadius: string;
9
+ fontSize: string;
10
+ lineHeight: string;
11
+ textColor: string;
12
+ textColorPrimary: string;
13
+ textColorInfo: string;
14
+ textColorSuccess: string;
15
+ textColorWarning: string;
16
+ textColorError: string;
17
+ codeTextColor: string;
18
+ codeColor: string;
19
+ codeBorder: string;
20
+ };
21
+ export type TypographyThemeVars = ReturnType<typeof self>;
22
+ declare const typographyLight: Theme<'Typography', TypographyThemeVars>;
23
+ export default typographyLight;
24
+ export type TypographyTheme = typeof typographyLight;
@@ -0,0 +1,28 @@
1
+ import { commonLight } from '../../../styles';
2
+ export const self = (vars) => {
3
+ const { borderRadiusSmall, brandPrimary500, elementsQuaternary, textPrimary, brandQuaternary500, staticRed, staticOrange, staticGreen, elementsTertiary, fontBodyMedium, lineHeightBodyMedium, codeBorder } = vars;
4
+ return {
5
+ margin: '16px 0 16px 0',
6
+ aTextColor: brandPrimary500,
7
+ blockquoteTextColor: textPrimary,
8
+ blockquotePrefixColor: elementsQuaternary,
9
+ codeBorderRadius: borderRadiusSmall,
10
+ fontSize: fontBodyMedium,
11
+ lineHeight: lineHeightBodyMedium,
12
+ textColor: textPrimary,
13
+ textColorPrimary: brandPrimary500,
14
+ textColorInfo: brandQuaternary500,
15
+ textColorSuccess: staticGreen,
16
+ textColorWarning: staticOrange,
17
+ textColorError: staticRed,
18
+ codeTextColor: textPrimary,
19
+ codeColor: elementsTertiary,
20
+ codeBorder
21
+ };
22
+ };
23
+ const typographyLight = {
24
+ name: 'Typography',
25
+ common: commonLight,
26
+ self
27
+ };
28
+ export default typographyLight;