@elliemae/ds-legacy-system 1.0.0-rc.1

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 (199) hide show
  1. package/dist/cjs/arithmetic.js +61 -0
  2. package/dist/cjs/arithmetic.js.map +7 -0
  3. package/dist/cjs/constants.js +48 -0
  4. package/dist/cjs/constants.js.map +7 -0
  5. package/dist/cjs/globalStyles.js +66 -0
  6. package/dist/cjs/globalStyles.js.map +7 -0
  7. package/dist/cjs/index.js +53 -0
  8. package/dist/cjs/index.js.map +7 -0
  9. package/dist/cjs/mobileUtilities.js +71 -0
  10. package/dist/cjs/mobileUtilities.js.map +7 -0
  11. package/dist/cjs/package.json +7 -0
  12. package/dist/cjs/spaceUtilities.js +97 -0
  13. package/dist/cjs/spaceUtilities.js.map +7 -0
  14. package/dist/cjs/styled/checkNamingConvention.js +49 -0
  15. package/dist/cjs/styled/checkNamingConvention.js.map +7 -0
  16. package/dist/cjs/styled/coerceWithDefaultTheme.js +46 -0
  17. package/dist/cjs/styled/coerceWithDefaultTheme.js.map +7 -0
  18. package/dist/cjs/styled/expressions/genStyleOverridesExpression.js +44 -0
  19. package/dist/cjs/styled/expressions/genStyleOverridesExpression.js.map +7 -0
  20. package/dist/cjs/styled/expressions/genVariantOverridesExpression.js +63 -0
  21. package/dist/cjs/styled/expressions/genVariantOverridesExpression.js.map +7 -0
  22. package/dist/cjs/styled/expressions/index.js +38 -0
  23. package/dist/cjs/styled/expressions/index.js.map +7 -0
  24. package/dist/cjs/styled/fixStyleArg.js +48 -0
  25. package/dist/cjs/styled/fixStyleArg.js.map +7 -0
  26. package/dist/cjs/styled/generated-attributes/generateAttributes.js +71 -0
  27. package/dist/cjs/styled/generated-attributes/generateAttributes.js.map +7 -0
  28. package/dist/cjs/styled/generated-attributes/generateAutoCalculated.js +42 -0
  29. package/dist/cjs/styled/generated-attributes/generateAutoCalculated.js.map +7 -0
  30. package/dist/cjs/styled/generated-attributes/generateDisplayName.js +41 -0
  31. package/dist/cjs/styled/generated-attributes/generateDisplayName.js.map +7 -0
  32. package/dist/cjs/styled/generated-attributes/index.js +36 -0
  33. package/dist/cjs/styled/generated-attributes/index.js.map +7 -0
  34. package/dist/cjs/styled/generated-attributes/utils/callbackMerger.js +50 -0
  35. package/dist/cjs/styled/generated-attributes/utils/callbackMerger.js.map +7 -0
  36. package/dist/cjs/styled/generated-attributes/utils/refMerger.js +54 -0
  37. package/dist/cjs/styled/generated-attributes/utils/refMerger.js.map +7 -0
  38. package/dist/cjs/styled/helpers.js +57 -0
  39. package/dist/cjs/styled/helpers.js.map +7 -0
  40. package/dist/cjs/styled/index.js +55 -0
  41. package/dist/cjs/styled/index.js.map +7 -0
  42. package/dist/cjs/styled/styled.js +38 -0
  43. package/dist/cjs/styled/styled.js.map +7 -0
  44. package/dist/cjs/styled/styledFunction.js +78 -0
  45. package/dist/cjs/styled/styledFunction.js.map +7 -0
  46. package/dist/cjs/styled/styledObject.js +42 -0
  47. package/dist/cjs/styled/styledObject.js.map +7 -0
  48. package/dist/cjs/styled/system-types.js +28 -0
  49. package/dist/cjs/styled/system-types.js.map +7 -0
  50. package/dist/cjs/styled/system-utilities/background.js +45 -0
  51. package/dist/cjs/styled/system-utilities/background.js.map +7 -0
  52. package/dist/cjs/styled/system-utilities/border.js +188 -0
  53. package/dist/cjs/styled/system-utilities/border.js.map +7 -0
  54. package/dist/cjs/styled/system-utilities/color.js +47 -0
  55. package/dist/cjs/styled/system-utilities/color.js.map +7 -0
  56. package/dist/cjs/styled/system-utilities/index.js +50 -0
  57. package/dist/cjs/styled/system-utilities/index.js.map +7 -0
  58. package/dist/cjs/styled/system-utilities/sizing.js +67 -0
  59. package/dist/cjs/styled/system-utilities/sizing.js.map +7 -0
  60. package/dist/cjs/styled/system-utilities/space.js +37 -0
  61. package/dist/cjs/styled/system-utilities/space.js.map +7 -0
  62. package/dist/cjs/styled/system.js +40 -0
  63. package/dist/cjs/styled/system.js.map +7 -0
  64. package/dist/cjs/styled/transformers/index.js +36 -0
  65. package/dist/cjs/styled/transformers/index.js.map +7 -0
  66. package/dist/cjs/styled/transformers/magicCssTransform.js +66 -0
  67. package/dist/cjs/styled/transformers/magicCssTransform.js.map +7 -0
  68. package/dist/cjs/styled/types.js +28 -0
  69. package/dist/cjs/styled/types.js.map +7 -0
  70. package/dist/cjs/th.js +86 -0
  71. package/dist/cjs/th.js.map +7 -0
  72. package/dist/cjs/theme.js +37 -0
  73. package/dist/cjs/theme.js.map +7 -0
  74. package/dist/cjs/themeProviderHOC.js +42 -0
  75. package/dist/cjs/themeProviderHOC.js.map +7 -0
  76. package/dist/cjs/utils.js +292 -0
  77. package/dist/cjs/utils.js.map +7 -0
  78. package/dist/cjs/xStyledWrapper.js +62 -0
  79. package/dist/cjs/xStyledWrapper.js.map +7 -0
  80. package/dist/esm/arithmetic.js +31 -0
  81. package/dist/esm/arithmetic.js.map +7 -0
  82. package/dist/esm/constants.js +18 -0
  83. package/dist/esm/constants.js.map +7 -0
  84. package/dist/esm/globalStyles.js +36 -0
  85. package/dist/esm/globalStyles.js.map +7 -0
  86. package/dist/esm/index.js +22 -0
  87. package/dist/esm/index.js.map +7 -0
  88. package/dist/esm/mobileUtilities.js +41 -0
  89. package/dist/esm/mobileUtilities.js.map +7 -0
  90. package/dist/esm/package.json +7 -0
  91. package/dist/esm/spaceUtilities.js +67 -0
  92. package/dist/esm/spaceUtilities.js.map +7 -0
  93. package/dist/esm/styled/checkNamingConvention.js +19 -0
  94. package/dist/esm/styled/checkNamingConvention.js.map +7 -0
  95. package/dist/esm/styled/coerceWithDefaultTheme.js +16 -0
  96. package/dist/esm/styled/coerceWithDefaultTheme.js.map +7 -0
  97. package/dist/esm/styled/expressions/genStyleOverridesExpression.js +14 -0
  98. package/dist/esm/styled/expressions/genStyleOverridesExpression.js.map +7 -0
  99. package/dist/esm/styled/expressions/genVariantOverridesExpression.js +33 -0
  100. package/dist/esm/styled/expressions/genVariantOverridesExpression.js.map +7 -0
  101. package/dist/esm/styled/expressions/index.js +8 -0
  102. package/dist/esm/styled/expressions/index.js.map +7 -0
  103. package/dist/esm/styled/fixStyleArg.js +18 -0
  104. package/dist/esm/styled/fixStyleArg.js.map +7 -0
  105. package/dist/esm/styled/generated-attributes/generateAttributes.js +41 -0
  106. package/dist/esm/styled/generated-attributes/generateAttributes.js.map +7 -0
  107. package/dist/esm/styled/generated-attributes/generateAutoCalculated.js +12 -0
  108. package/dist/esm/styled/generated-attributes/generateAutoCalculated.js.map +7 -0
  109. package/dist/esm/styled/generated-attributes/generateDisplayName.js +11 -0
  110. package/dist/esm/styled/generated-attributes/generateDisplayName.js.map +7 -0
  111. package/dist/esm/styled/generated-attributes/index.js +6 -0
  112. package/dist/esm/styled/generated-attributes/index.js.map +7 -0
  113. package/dist/esm/styled/generated-attributes/utils/callbackMerger.js +20 -0
  114. package/dist/esm/styled/generated-attributes/utils/callbackMerger.js.map +7 -0
  115. package/dist/esm/styled/generated-attributes/utils/refMerger.js +24 -0
  116. package/dist/esm/styled/generated-attributes/utils/refMerger.js.map +7 -0
  117. package/dist/esm/styled/helpers.js +27 -0
  118. package/dist/esm/styled/helpers.js.map +7 -0
  119. package/dist/esm/styled/index.js +35 -0
  120. package/dist/esm/styled/index.js.map +7 -0
  121. package/dist/esm/styled/styled.js +8 -0
  122. package/dist/esm/styled/styled.js.map +7 -0
  123. package/dist/esm/styled/styledFunction.js +48 -0
  124. package/dist/esm/styled/styledFunction.js.map +7 -0
  125. package/dist/esm/styled/styledObject.js +12 -0
  126. package/dist/esm/styled/styledObject.js.map +7 -0
  127. package/dist/esm/styled/system-types.js +2 -0
  128. package/dist/esm/styled/system-types.js.map +7 -0
  129. package/dist/esm/styled/system-utilities/background.js +15 -0
  130. package/dist/esm/styled/system-utilities/background.js.map +7 -0
  131. package/dist/esm/styled/system-utilities/border.js +158 -0
  132. package/dist/esm/styled/system-utilities/border.js.map +7 -0
  133. package/dist/esm/styled/system-utilities/color.js +17 -0
  134. package/dist/esm/styled/system-utilities/color.js.map +7 -0
  135. package/dist/esm/styled/system-utilities/index.js +20 -0
  136. package/dist/esm/styled/system-utilities/index.js.map +7 -0
  137. package/dist/esm/styled/system-utilities/sizing.js +37 -0
  138. package/dist/esm/styled/system-utilities/sizing.js.map +7 -0
  139. package/dist/esm/styled/system-utilities/space.js +7 -0
  140. package/dist/esm/styled/system-utilities/space.js.map +7 -0
  141. package/dist/esm/styled/system.js +10 -0
  142. package/dist/esm/styled/system.js.map +7 -0
  143. package/dist/esm/styled/transformers/index.js +6 -0
  144. package/dist/esm/styled/transformers/index.js.map +7 -0
  145. package/dist/esm/styled/transformers/magicCssTransform.js +36 -0
  146. package/dist/esm/styled/transformers/magicCssTransform.js.map +7 -0
  147. package/dist/esm/styled/types.js +2 -0
  148. package/dist/esm/styled/types.js.map +7 -0
  149. package/dist/esm/th.js +56 -0
  150. package/dist/esm/th.js.map +7 -0
  151. package/dist/esm/theme.js +7 -0
  152. package/dist/esm/theme.js.map +7 -0
  153. package/dist/esm/themeProviderHOC.js +12 -0
  154. package/dist/esm/themeProviderHOC.js.map +7 -0
  155. package/dist/esm/utils.js +262 -0
  156. package/dist/esm/utils.js.map +7 -0
  157. package/dist/esm/xStyledWrapper.js +43 -0
  158. package/dist/esm/xStyledWrapper.js.map +7 -0
  159. package/dist/types/arithmetic.d.ts +5 -0
  160. package/dist/types/constants.d.ts +11 -0
  161. package/dist/types/globalStyles.d.ts +3 -0
  162. package/dist/types/index.d.ts +12 -0
  163. package/dist/types/mobileUtilities.d.ts +4 -0
  164. package/dist/types/spaceUtilities.d.ts +8 -0
  165. package/dist/types/styled/checkNamingConvention.d.ts +1 -0
  166. package/dist/types/styled/coerceWithDefaultTheme.d.ts +2 -0
  167. package/dist/types/styled/expressions/genStyleOverridesExpression.d.ts +3 -0
  168. package/dist/types/styled/expressions/genVariantOverridesExpression.d.ts +3 -0
  169. package/dist/types/styled/expressions/index.d.ts +2 -0
  170. package/dist/types/styled/fixStyleArg.d.ts +2 -0
  171. package/dist/types/styled/generated-attributes/generateAttributes.d.ts +2 -0
  172. package/dist/types/styled/generated-attributes/generateAutoCalculated.d.ts +2 -0
  173. package/dist/types/styled/generated-attributes/generateDisplayName.d.ts +2 -0
  174. package/dist/types/styled/generated-attributes/index.d.ts +1 -0
  175. package/dist/types/styled/generated-attributes/utils/callbackMerger.d.ts +3 -0
  176. package/dist/types/styled/generated-attributes/utils/refMerger.d.ts +7 -0
  177. package/dist/types/styled/helpers.d.ts +5 -0
  178. package/dist/types/styled/index.d.ts +6 -0
  179. package/dist/types/styled/styled.d.ts +7 -0
  180. package/dist/types/styled/styledFunction.d.ts +9 -0
  181. package/dist/types/styled/styledObject.d.ts +6 -0
  182. package/dist/types/styled/system-types.d.ts +74 -0
  183. package/dist/types/styled/system-utilities/background.d.ts +2 -0
  184. package/dist/types/styled/system-utilities/border.d.ts +1 -0
  185. package/dist/types/styled/system-utilities/color.d.ts +2 -0
  186. package/dist/types/styled/system-utilities/index.d.ts +6 -0
  187. package/dist/types/styled/system-utilities/sizing.d.ts +1 -0
  188. package/dist/types/styled/system-utilities/space.d.ts +3 -0
  189. package/dist/types/styled/system.d.ts +1 -0
  190. package/dist/types/styled/transformers/index.d.ts +1 -0
  191. package/dist/types/styled/transformers/magicCssTransform.d.ts +4 -0
  192. package/dist/types/styled/types.d.ts +42 -0
  193. package/dist/types/tests/arithmetic.test.d.ts +1 -0
  194. package/dist/types/th.d.ts +19 -0
  195. package/dist/types/theme.d.ts +2 -0
  196. package/dist/types/themeProviderHOC.d.ts +2 -0
  197. package/dist/types/utils.d.ts +41 -0
  198. package/dist/types/xStyledWrapper.d.ts +3 -0
  199. package/package.json +123 -0
@@ -0,0 +1,262 @@
1
+ import * as React from "react";
2
+ import { lighten, rgba } from "polished";
3
+ import { reduce } from "lodash";
4
+ import { css, withTheme, keyframes as kfrm, useTheme } from "@xstyled/styled-components";
5
+ import { theme } from "./theme.js";
6
+ import { toMobile } from "./mobileUtilities.js";
7
+ import { th } from "./th.js";
8
+ function truncate(width) {
9
+ return (props) => css`
10
+ ${!!width || props.width ? `width: ${props.width || width};` : ""}
11
+ white-space: nowrap;
12
+ overflow: hidden;
13
+ text-overflow: ellipsis;
14
+ `;
15
+ }
16
+ function flexCenter() {
17
+ return `
18
+ display: flex;
19
+ justify-content: center;
20
+ align-items: center;
21
+ `;
22
+ }
23
+ function disabled() {
24
+ return `
25
+ cursor: not-allowed;
26
+ pointer-events: none;
27
+ `;
28
+ }
29
+ function keyframes(obj) {
30
+ return kfrm`${reduce(
31
+ obj,
32
+ (result, value, key) => `
33
+ ${result}
34
+ ${key}% {
35
+ ${value}
36
+ }
37
+ `,
38
+ ""
39
+ )}
40
+ `;
41
+ }
42
+ function boxShadow(top, left, blur, color, inset = false) {
43
+ return `box-shadow: ${inset ? "inset" : ""} ${top} ${left} ${blur} ${color};`;
44
+ }
45
+ function border(color = theme.colors.brand[600], size = "1px", type = "solid") {
46
+ return `${size} ${type} ${color}`;
47
+ }
48
+ function animation(animationKeyframes, animationLength, animationTimingFn) {
49
+ return (props) => css`
50
+ animation: ${props.animationKeyframes || animationKeyframes} ${props.animationLength || animationLength}
51
+ ${props.animationTimingFn || animationTimingFn};
52
+ `;
53
+ }
54
+ function focus(color = theme.colors.brand[600]) {
55
+ return () => css`
56
+ outline: none;
57
+ border: 1px solid ${color};
58
+ box-shadow: inset 0 0 0 1px ${lighten(0.3, color)};
59
+ border-radius: 2px;
60
+ `;
61
+ }
62
+ function focusAfter(color) {
63
+ return css`
64
+ outline: none;
65
+ position: relative;
66
+ &:after {
67
+ content: '';
68
+ z-index: 10;
69
+ position: absolute;
70
+ top: 0;
71
+ left: 0;
72
+ width: 100%;
73
+ height: 100%;
74
+ pointer-events: none;
75
+ ${focus(color)}
76
+ }
77
+ `;
78
+ }
79
+ function active() {
80
+ return (props) => css`
81
+ outline: none;
82
+ border: 1px solid ${props.theme.colors.brand[700]};
83
+ border-radius: 2px;
84
+ `;
85
+ }
86
+ function hover() {
87
+ return (props) => css`
88
+ outline: 1px solid ${props.theme.colors.brand[600]};
89
+ outline-offset: -1px;
90
+ `;
91
+ }
92
+ function textStyle(type, weight = "regular") {
93
+ return (props) => {
94
+ let cssVar = `font-weight: ${props.theme.fontWeights[weight]};`;
95
+ switch (type) {
96
+ case "h1":
97
+ cssVar += `
98
+ font-size: ${toMobile("2.7692rem")};
99
+ line-height: normal;
100
+ `;
101
+ break;
102
+ case "h2":
103
+ cssVar += `
104
+ font-size: ${toMobile(props.theme.fontSizes.title[800])};
105
+ line-height: normal;
106
+ `;
107
+ break;
108
+ case "h3":
109
+ cssVar += `
110
+ font-size: ${toMobile(props.theme.fontSizes.title[700])};
111
+ line-height: 1.2;
112
+ `;
113
+ break;
114
+ case "h4":
115
+ cssVar += `
116
+ font-size: ${toMobile(props.theme.fontSizes.title[600])};
117
+ line-height: normal;
118
+ `;
119
+ break;
120
+ case "h5":
121
+ cssVar += `
122
+ font-size: ${toMobile(props.theme.fontSizes.title[500])};
123
+ line-height: normal;
124
+ `;
125
+ break;
126
+ case "section-header":
127
+ cssVar += `
128
+ font-size: ${toMobile(props.theme.fontSizes.title[500])};
129
+ line-height: normal;
130
+ text-transform: uppercase;
131
+ `;
132
+ break;
133
+ case "body":
134
+ cssVar += `
135
+ font-size: ${toMobile(props.theme.fontSizes.value[400])};
136
+ line-height: normal;
137
+ `;
138
+ break;
139
+ case "body-small":
140
+ cssVar += `
141
+ font-size: ${toMobile(props.theme.fontSizes.value[300])};
142
+ line-height: normal;
143
+ `;
144
+ break;
145
+ case "body-micro":
146
+ cssVar += `
147
+ font-size: ${toMobile(props.theme.fontSizes.microText[200])};
148
+ line-height: normal;
149
+ `;
150
+ break;
151
+ case "list":
152
+ cssVar += `
153
+ font-size: ${toMobile(props.theme.fontSizes.value[400])};
154
+ line-height: normal;
155
+ `;
156
+ break;
157
+ case "link":
158
+ cssVar += `
159
+ line-height: ${props.theme.space.xl};
160
+ color: ${props.theme.colors.brand[600]};
161
+ cursor: pointer;
162
+ `;
163
+ break;
164
+ }
165
+ return cssVar;
166
+ };
167
+ }
168
+ function iconColor(variant = "neutral", type = 400) {
169
+ return css`
170
+ fill: ${th.color(`${variant}-${type}`)};
171
+ `;
172
+ }
173
+ function fakeBorder() {
174
+ return css`
175
+ box-shadow: inset 0 0 0 1px ${(props) => props.theme.colors.neutral[200]};
176
+ border-radius: 2px;
177
+ `;
178
+ }
179
+ function fakeActive() {
180
+ return css`
181
+ outline: none;
182
+ box-shadow: inset 0 0 0 1px ${(props) => props.theme.colors.brand[700]};
183
+ border-radius: 2px;
184
+ `;
185
+ }
186
+ function clearFocus() {
187
+ return `
188
+ border: none;
189
+ box-shadow: none;
190
+ `;
191
+ }
192
+ function buttonLink() {
193
+ return `
194
+ background-color: transparent;
195
+ border: 1px solid transparent;
196
+ cursor: pointer;
197
+ `;
198
+ }
199
+ function transition(t = "all 1s ease") {
200
+ return `
201
+ transition: ${t};
202
+ `;
203
+ }
204
+ const onlySafariAndFirefox = (styles) => css`
205
+ @media not all and (min-resolution: 0.001dpcm) {
206
+ ${styles}
207
+ }
208
+ @media screen and (min--moz-device-pixel-ratio: 0) {
209
+ ${styles}
210
+ }
211
+ `;
212
+ const onlySafari = (styles) => `
213
+ @media not all and (min-resolution: 0.001dpcm) {
214
+ ${styles}
215
+ }
216
+ `;
217
+ const onlyFirefox = (styles) => `
218
+ @media screen and (min--moz-device-pixel-ratio: 0) {
219
+ ${styles}
220
+ }
221
+ `;
222
+ const safariAndFirefoxBold = (color) => `
223
+ @media not all and (min-resolution: 0.001dpcm) {
224
+ font-weight: 400;
225
+ -webkit-font-smoothing: subpixel-antialiased;
226
+ -webkit-text-stroke: 0.4px ${color};
227
+ }
228
+ @media screen and (min--moz-device-pixel-ratio: 0) {
229
+ font-weight: 400;
230
+ -webkit-font-smoothing: subpixel-antialiased;
231
+ -webkit-text-stroke: 0.4px ${color};
232
+ }
233
+ `;
234
+ export {
235
+ active,
236
+ animation,
237
+ border,
238
+ boxShadow,
239
+ buttonLink,
240
+ clearFocus,
241
+ disabled,
242
+ fakeActive,
243
+ fakeBorder,
244
+ flexCenter,
245
+ focus,
246
+ focusAfter,
247
+ hover,
248
+ iconColor,
249
+ keyframes,
250
+ kfrm,
251
+ onlyFirefox,
252
+ onlySafari,
253
+ onlySafariAndFirefox,
254
+ rgba,
255
+ safariAndFirefoxBold,
256
+ textStyle,
257
+ transition,
258
+ truncate,
259
+ useTheme,
260
+ withTheme
261
+ };
262
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/utils.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable no-shadow */\n/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-shadow */\n\n// https://github.com/styled-components/babel-plugin-styled-components/issues/216#issuecomment-516941240\n\nimport type { Theme } from '@elliemae/pui-theme';\nimport { lighten, rgba } from 'polished';\nimport { reduce } from 'lodash';\nimport type { Keyframes, FlattenSimpleInterpolation } from 'styled-components';\nimport { css, withTheme, keyframes as kfrm, useTheme } from '@xstyled/styled-components';\nimport { theme } from './theme.js';\nimport { toMobile } from './mobileUtilities.js';\nimport { th } from './th.js';\n\nexport { withTheme, rgba, useTheme, kfrm };\n\ntype PropsWithTheme<T = Record<string, unknown>> = T & { theme: Theme };\n\nexport function truncate(width?: string) {\n return (props: PropsWithTheme<{ width?: string }>) => css`\n ${!!width || props.width ? `width: ${(props.width || width) as string};` : ''}\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n `;\n}\n\nexport function flexCenter(): string {\n return `\n display: flex;\n justify-content: center;\n align-items: center;\n `;\n}\n\nexport function disabled(): string {\n return `\n cursor: not-allowed;\n pointer-events: none;\n `;\n}\n\nexport function keyframes(obj: Record<string, string>): Keyframes {\n return kfrm`${reduce(\n obj,\n (result, value, key) => `\n ${result}\n ${key}% {\n ${value}\n }\n `,\n '',\n )}\n `;\n}\n\n// eslint-disable-next-line max-params\nexport function boxShadow(top: string, left: string, blur: string, color: string, inset = false): string {\n return `box-shadow: ${inset ? 'inset' : ''} ${top} ${left} ${blur} ${color};`;\n}\n\n// export function color(variant = 'neutral', type: string | number = 400) {\n// return css`\n// color: ${th.color(`${variant}-${type}`)};\n// `;\n// }\n\nexport function border(color = theme.colors.brand[600], size = '1px', type = 'solid'): string {\n return `${size} ${type} ${color}`;\n}\n\nexport function animation(animationKeyframes: string, animationLength: string, animationTimingFn: string) {\n return (props: { animationKeyframes?: string; animationLength?: string; animationTimingFn?: string }) => css`\n animation: ${props.animationKeyframes || animationKeyframes} ${props.animationLength || animationLength}\n ${props.animationTimingFn || animationTimingFn};\n `;\n}\n// 0.0769\nexport function focus(color: string = theme.colors.brand[600]) {\n return () => css`\n outline: none;\n border: 1px solid ${color};\n box-shadow: inset 0 0 0 1px ${lighten(0.3, color)};\n border-radius: 2px;\n `;\n}\n\nexport function focusAfter(color: string) {\n return css`\n outline: none;\n position: relative;\n &:after {\n content: '';\n z-index: 10;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n ${focus(color)}\n }\n `;\n}\n\nexport function active() {\n return (props: PropsWithTheme) => css`\n outline: none;\n border: 1px solid ${props.theme.colors.brand[700]};\n border-radius: 2px;\n `;\n}\n\nexport function hover() {\n return (props: PropsWithTheme) => css`\n outline: 1px solid ${props.theme.colors.brand[600]};\n outline-offset: -1px;\n `;\n}\n\nexport function textStyle(type: string, weight: keyof Theme['fontWeights'] = 'regular') {\n // eslint-disable-next-line complexity\n return (props: { theme: Theme }): string => {\n let cssVar = `font-weight: ${props.theme.fontWeights[weight]};`;\n // eslint-disable-next-line default-case\n switch (type) {\n case 'h1':\n cssVar += `\n font-size: ${toMobile('2.7692rem')};\n line-height: normal;\n `;\n break;\n case 'h2':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.title[800])};\n line-height: normal;\n `;\n break;\n case 'h3':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.title[700])};\n line-height: 1.2;\n `;\n break;\n case 'h4':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.title[600])};\n line-height: normal;\n `;\n break;\n case 'h5':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.title[500])};\n line-height: normal;\n `;\n break;\n case 'section-header':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.title[500])};\n line-height: normal;\n text-transform: uppercase;\n `;\n break;\n case 'body':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.value[400])};\n line-height: normal;\n `;\n break;\n case 'body-small':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.value[300])};\n line-height: normal;\n `;\n break;\n case 'body-micro':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.microText[200])};\n line-height: normal;\n `;\n break;\n case 'list':\n cssVar += `\n font-size: ${toMobile(props.theme.fontSizes.value[400])};\n line-height: normal;\n `;\n break;\n case 'link':\n cssVar += `\n line-height: ${props.theme.space.xl};\n color: ${props.theme.colors.brand[600]};\n cursor: pointer;\n `;\n break;\n }\n return cssVar;\n };\n}\n\nexport function iconColor(variant = 'neutral', type = 400) {\n return css`\n fill: ${th.color(`${variant}-${type}`)};\n `;\n}\n\nexport function fakeBorder() {\n return css`\n box-shadow: inset 0 0 0 1px ${(props) => props.theme.colors.neutral[200]};\n border-radius: 2px;\n `;\n}\n\nexport function fakeActive() {\n return css`\n outline: none;\n box-shadow: inset 0 0 0 1px ${(props) => props.theme.colors.brand[700]};\n border-radius: 2px;\n `;\n}\n\nexport function clearFocus(): string {\n return `\n border: none;\n box-shadow: none;\n `;\n}\n\nexport function buttonLink(): string {\n return `\n background-color: transparent;\n border: 1px solid transparent;\n cursor: pointer;\n `;\n}\n\nexport function transition(t = 'all 1s ease'): string {\n return `\n transition: ${t};\n `;\n}\n\nexport const onlySafariAndFirefox = (styles: string): FlattenSimpleInterpolation => css`\n @media not all and (min-resolution: 0.001dpcm) {\n ${styles}\n }\n @media screen and (min--moz-device-pixel-ratio: 0) {\n ${styles}\n }\n`;\n\nexport const onlySafari = (styles: string): string => `\n @media not all and (min-resolution: 0.001dpcm) {\n ${styles}\n }\n `;\n\nexport const onlyFirefox = (styles: string): string => `\n @media screen and (min--moz-device-pixel-ratio: 0) {\n ${styles}\n }\n `;\n\nexport const safariAndFirefoxBold = (color: string): string => `\n @media not all and (min-resolution: 0.001dpcm) {\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-text-stroke: 0.4px ${color};\n }\n @media screen and (min--moz-device-pixel-ratio: 0) {\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-text-stroke: 0.4px ${color};\n }\n`;\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -0,0 +1,43 @@
1
+ import * as React from "react";
2
+ import {
3
+ styled,
4
+ typography,
5
+ background,
6
+ borders,
7
+ sizing,
8
+ space,
9
+ boxShadows,
10
+ flexboxes,
11
+ layout,
12
+ color
13
+ } from "./index.js";
14
+ import { compose } from "@xstyled/system";
15
+ const XStyledWrapper = styled("div")`
16
+ ${typography}
17
+ ${layout}
18
+ ${space}
19
+ ${sizing}
20
+ ${background}
21
+ ${borders}
22
+ ${boxShadows}
23
+ ${flexboxes}
24
+ ${color}
25
+ `;
26
+ const xStyledCommonProps = compose(
27
+ typography,
28
+ background,
29
+ borders,
30
+ sizing,
31
+ space,
32
+ boxShadows,
33
+ flexboxes,
34
+ layout,
35
+ color
36
+ );
37
+ var xStyledWrapper_default = XStyledWrapper;
38
+ export {
39
+ XStyledWrapper,
40
+ xStyledWrapper_default as default,
41
+ xStyledCommonProps
42
+ };
43
+ //# sourceMappingURL=xStyledWrapper.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/xStyledWrapper.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n styled,\n typography,\n background,\n borders,\n sizing,\n space,\n boxShadows,\n flexboxes,\n layout,\n color,\n} from './index.js';\nimport type {} from '@xstyled/util';\nimport type {} from '@xstyled/system';\nimport { compose } from '@xstyled/system';\n\nexport const XStyledWrapper = styled('div')`\n ${typography}\n ${layout}\n ${space}\n ${sizing}\n ${background}\n ${borders}\n ${boxShadows}\n ${flexboxes}\n ${color}\n`;\n\nexport const xStyledCommonProps = compose(\n typography,\n background,\n borders,\n sizing,\n space,\n boxShadows,\n flexboxes,\n layout,\n color,\n);\n\nexport default XStyledWrapper;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,eAAe;AAEjB,MAAM,iBAAiB,OAAO,KAAK;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAO,yBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ export declare function getNumberAndUnit(numberStrWithUnit: string | number): {
2
+ number: string;
3
+ unit: string;
4
+ };
5
+ export declare function op(operator: string, n1: string, n2: string | number): string;
@@ -0,0 +1,11 @@
1
+ export declare const desktopBaseFont = 13;
2
+ export declare const mobileBaseFont = 16;
3
+ export declare const translateUnits: {
4
+ '8px': string;
5
+ '16px': string;
6
+ '32px': string;
7
+ '48px': string;
8
+ '56px': string;
9
+ '64px': string;
10
+ '72px': string;
11
+ };
@@ -0,0 +1,3 @@
1
+ export declare const GlobalStyles: import("styled-components").GlobalStyleComponent<{
2
+ device: 'desktop' | 'mobile';
3
+ }, import("styled-components").DefaultTheme>;
@@ -0,0 +1,12 @@
1
+ export * from './globalStyles.js';
2
+ export * from './spaceUtilities.js';
3
+ export * from './mobileUtilities.js';
4
+ export * from './utils.js';
5
+ export * from './arithmetic.js';
6
+ export * from './th.js';
7
+ export * from './theme.js';
8
+ export * from './styled/index.js';
9
+ export { position, typography } from '@xstyled/system';
10
+ export { themeProviderHOC } from './themeProviderHOC.js';
11
+ export { ThemeContext } from '@xstyled/styled-components';
12
+ export { xStyledCommonProps, XStyledWrapper } from './xStyledWrapper.js';
@@ -0,0 +1,4 @@
1
+ export declare function __UNSAFE_SPACE_TO_DIMSUM(unit: string): string;
2
+ export declare const isMobile: () => boolean;
3
+ export declare function toMobile(unit: string): string;
4
+ export declare const useIsMobile: () => boolean;
@@ -0,0 +1,8 @@
1
+ export declare function mapGap(gutter: number | string): number | string;
2
+ export declare function mapGutter(gutter: string | number | undefined): string;
3
+ export declare function mapSpace(width: string | number): string;
4
+ export declare function fixSpaceGutter(width: string | number | string[] | number[], gutter?: string | number): string | string[];
5
+ export declare function fixSpace(width: string | number | string[] | number[]): string | string[];
6
+ export declare function numbersToFr(grid: number[]): string[];
7
+ export declare function mapGrid(width: string | number): string;
8
+ export declare function mapTemplateGrid(grid: number | string | (number | string)[]): string | string[];
@@ -0,0 +1 @@
1
+ export declare const checkNamingConvention: (componentName: string | null, componentSlot: string | null) => void;
@@ -0,0 +1,2 @@
1
+ import type { Expressions } from './types.js';
2
+ export declare const coerceWithDefaultTheme: (expressions: Expressions) => Expressions;
@@ -0,0 +1,3 @@
1
+ import type { PropsWithTheme } from '../types.js';
2
+ import type { CSSObject } from 'styled-components';
3
+ export declare const genStyleOverridesExpression: (componentName: string, componentSlot: string) => (props: PropsWithTheme) => (string | number | CSSObject | undefined)[] | null;
@@ -0,0 +1,3 @@
1
+ import type { PropsWithTheme } from '../types.js';
2
+ import type { CSSObject } from 'styled-components';
3
+ export declare const genVariantOverridesExpression: (componentName: string) => (props: PropsWithTheme) => (string | number | CSSObject | undefined)[];
@@ -0,0 +1,2 @@
1
+ export { genStyleOverridesExpression } from './genStyleOverridesExpression.js';
2
+ export { genVariantOverridesExpression } from './genVariantOverridesExpression.js';
@@ -0,0 +1,2 @@
1
+ import type { StyleArg } from './types.js';
2
+ export declare const fixStyleArg: (styleArg: StyleArg, numberOfNewExpressions: number) => StyleArg;
@@ -0,0 +1,2 @@
1
+ import type { AttrsFunc, Options } from '../types.js';
2
+ export declare const generateAttributes: (options: Options, displayName: string | null) => AttrsFunc<any>[];
@@ -0,0 +1,2 @@
1
+ import type { Options } from '../types.js';
2
+ export declare const generateAutoCalculated: (options: Options) => readonly [string | null, import("../types.js").AttrsFunc<any>[]];
@@ -0,0 +1,2 @@
1
+ import type { Options } from '../types.js';
2
+ export declare const generateDisplayName: (options: Options) => string | null;
@@ -0,0 +1 @@
1
+ export { generateAutoCalculated } from './generateAutoCalculated.js';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { StyledComponentInnerComponent, StyledComponentPropsWithRef } from 'styled-components';
3
+ export declare const callbackMerger: <T>(props: StyledComponentPropsWithRef<StyledComponentInnerComponent<import("react").ComponentType<T>>>, object: Record<string, unknown>) => Record<string, unknown>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import type { StyledComponentInnerComponent, StyledComponentPropsWithRef } from 'styled-components';
3
+ import type { AnyStyledRef } from '../../types.js';
4
+ export declare const refMerger: <T extends {
5
+ ref?: AnyStyledRef<HTMLElement> | undefined;
6
+ innerRef?: AnyStyledRef<HTMLElement> | undefined;
7
+ }>(props: StyledComponentPropsWithRef<StyledComponentInnerComponent<import("react").ComponentType<T>>>, object: Record<string, unknown>) => Record<string, unknown>;
@@ -0,0 +1,5 @@
1
+ export declare const propsToClassKey: (props: Record<string, {
2
+ toString: () => string;
3
+ }>) => string;
4
+ export declare const displayNameToKebabCase: (displayName: string) => string;
5
+ export declare const slotObjectToDataTestIds: (componentName: string, slotObject: Record<string, string>) => Record<string, string>;
@@ -0,0 +1,6 @@
1
+ export { styled } from './styled.js';
2
+ export { background, borders, boxShadows, color, flexboxes, fontSize, grids, layout, sizing, space, } from './system-utilities/index.js';
3
+ export { slotObjectToDataTestIds } from './helpers.js';
4
+ export * from './types.js';
5
+ export * from './system-types.js';
6
+ export { css, createGlobalStyle } from './system.js';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const styled: (<C extends keyof JSX.IntrinsicElements | import("react").ComponentType<any> | import("styled-components").AnyStyledComponent>(tag: C, options?: import("./types.js").Options) => import("./types.js").ThemedStyledFunctionBase<C, import("./types.js").Theme, {}, never> & {
3
+ attrs: <U, NewA extends Partial<import("styled-components").StyledComponentPropsWithRef<C> & U> & {
4
+ [others: string]: any;
5
+ } = {}>(attrs: NewA | ((props: import("styled-components").ThemedStyledProps<import("styled-components").StyledComponentPropsWithRef<C> & U, import("./types.js").Theme>) => NewA)) => import("styled-components").ThemedStyledFunction<C, import("./types.js").Theme, {} & NewA, string | number | symbol | keyof NewA>;
6
+ withConfig: <Props extends {} = {}>(config: import("styled-components").StyledConfig<import("styled-components").StyledComponentPropsWithRef<C> & Props>) => import("styled-components").ThemedStyledFunction<C, import("./types.js").Theme, Props, string | number | symbol>;
7
+ }) & import("./styledObject.js").StyledObject;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';
3
+ import type { Options, Theme, ThemedStyledFunctionBase } from './types.js';
4
+ export declare const styledFunction: <C extends keyof JSX.IntrinsicElements | import("react").ComponentType<any> | AnyStyledComponent>(tag: C, options?: Options) => ThemedStyledFunctionBase<C, Theme, {}, never> & {
5
+ attrs: <U, NewA extends Partial<import("styled-components").StyledComponentPropsWithRef<C> & U> & {
6
+ [others: string]: any;
7
+ } = {}>(attrs: NewA | ((props: import("styled-components").ThemedStyledProps<import("styled-components").StyledComponentPropsWithRef<C> & U, Theme>) => NewA)) => ThemedStyledFunction<C, Theme, {} & NewA, string | number | symbol | keyof NewA>;
8
+ withConfig: <Props extends {} = {}>(config: import("styled-components").StyledConfig<import("styled-components").StyledComponentPropsWithRef<C> & Props>) => ThemedStyledFunction<C, Theme, Props, string | number | symbol>;
9
+ };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { styledFunction } from './styledFunction.js';
3
+ export type StyledObject = {
4
+ [TTag in keyof JSX.IntrinsicElements]: ReturnType<typeof styledFunction<TTag>>;
5
+ };
6
+ export declare const styledObject: StyledObject;
@@ -0,0 +1,74 @@
1
+ import type { SpaceProps as XstyledSpace, MarginProps, MarginTopProps, MarginRightProps, MarginBottomProps, MarginLeftProps, MarginXProps, MarginYProps, PaddingProps, PaddingTopProps, PaddingRightProps, PaddingBottomProps, PaddingLeftProps, PaddingXProps, PaddingYProps, ColorProps as XstyledColor, TypographyProps, FlexboxesProps } from '@xstyled/system';
2
+ import type { Theme } from './types.js';
3
+ export type { FlattenSimpleInterpolation, FlattenInterpolation } from 'styled-components';
4
+ export type { LayoutProps, SizingProps, FontSizeProps, PositionProps, BoxShadowProps, LineHeightProps, } from '@xstyled/system';
5
+ interface DummyColorTheme {
6
+ 'neutral-100': true;
7
+ 'neutral-200': true;
8
+ 'neutral-300': true;
9
+ 'neutral-400': true;
10
+ 'neutral-500': true;
11
+ 'neutral-600': true;
12
+ 'neutral-700': true;
13
+ 'neutral-800': true;
14
+ 'neutral-000': true;
15
+ 'neutral-050': true;
16
+ 'neutral-080': true;
17
+ 'brand-100': true;
18
+ 'brand-200': true;
19
+ 'brand-300': true;
20
+ 'brand-400': true;
21
+ 'brand-500': true;
22
+ 'brand-600': true;
23
+ 'brand-700': true;
24
+ 'brand-800': true;
25
+ 'success-300': true;
26
+ 'success-900': true;
27
+ 'warning-400': true;
28
+ 'warning-600': true;
29
+ 'warning-900': true;
30
+ 'danger-200': true;
31
+ 'danger-900': true;
32
+ }
33
+ interface MarginAndPaddings extends MarginProps, MarginTopProps, MarginRightProps, MarginBottomProps, MarginLeftProps, MarginXProps, MarginYProps, PaddingProps, PaddingTopProps, PaddingRightProps, PaddingBottomProps, PaddingLeftProps, PaddingXProps, PaddingYProps {
34
+ }
35
+ type SpacePropsT = {
36
+ [key in keyof XstyledSpace]?: XstyledSpace[key];
37
+ } & {
38
+ [key in keyof MarginAndPaddings]?: XstyledSpace[key] | keyof Theme['space'];
39
+ };
40
+ type ColorPropsT = {
41
+ [key in keyof XstyledColor]?: XstyledColor[key] | keyof DummyColorTheme;
42
+ };
43
+ export interface SpaceProps extends SpacePropsT {
44
+ }
45
+ export interface ColorProps extends ColorPropsT {
46
+ }
47
+ export interface BorderProps {
48
+ border?: string;
49
+ borderTop?: string;
50
+ borderBottom?: string;
51
+ borderRight?: string;
52
+ borderLeft?: string;
53
+ borderColor?: keyof DummyColorTheme;
54
+ borderTopColor?: keyof DummyColorTheme;
55
+ borderBottomColor?: keyof DummyColorTheme;
56
+ borderRightColor?: keyof DummyColorTheme;
57
+ borderLeftColor?: keyof DummyColorTheme;
58
+ borderStyle?: string;
59
+ borderTopStyle?: string;
60
+ borderBottomStyle?: string;
61
+ borderRightStyle?: string;
62
+ borderLeftStyle?: string;
63
+ borderWidth?: keyof Theme['space'];
64
+ borderTopWidth?: keyof Theme['space'];
65
+ borderBottomWidth?: keyof Theme['space'];
66
+ borderRightWidth?: keyof Theme['space'];
67
+ borderLeftWidth?: keyof Theme['space'];
68
+ borderRadius?: keyof Theme['space'];
69
+ }
70
+ export interface BackgroundProps {
71
+ backgroundColor?: keyof DummyColorTheme;
72
+ bg?: keyof DummyColorTheme;
73
+ }
74
+ export type { TypographyProps, FlexboxesProps };
@@ -0,0 +1,2 @@
1
+ import type { BackgroundProps } from '../system-types.js';
2
+ export declare const background: import("@xstyled/system").StyleGenerator<BackgroundProps>;
@@ -0,0 +1 @@
1
+ export declare const borders: import("@xstyled/system").StyleGenerator<{}>;
@@ -0,0 +1,2 @@
1
+ import type { ColorProps } from '../system-types.js';
2
+ export declare const color: import("@xstyled/system").StyleGenerator<ColorProps>;
@@ -0,0 +1,6 @@
1
+ export { layout, flexboxes, grids, boxShadow as boxShadows, fontSize } from '@xstyled/system';
2
+ export { background } from './background.js';
3
+ export { borders } from './border.js';
4
+ export { color } from './color.js';
5
+ export { sizing } from './sizing.js';
6
+ export { space } from './space.js';
@@ -0,0 +1 @@
1
+ export declare const sizing: import("@xstyled/system").StyleGenerator<{}>;
@@ -0,0 +1,3 @@
1
+ import { type StyleGenerator } from '@xstyled/system';
2
+ import type { SpaceProps } from '../system-types.js';
3
+ export declare const space: StyleGenerator<SpaceProps>;
@@ -0,0 +1 @@
1
+ export declare const css: import("styled-components").BaseThemedCssFunction<import("@xstyled/system").Theme>, styled: import("@xstyled/styled-components").XStyled<import("@xstyled/system").StyleGenerator<import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>>>, createGlobalStyle: typeof import("styled-components").createGlobalStyle;
@@ -0,0 +1 @@
1
+ export { magicCssTransform } from './magicCssTransform.js';
@@ -0,0 +1,4 @@
1
+ import type { Expressions, StyleArg } from '../types.js';
2
+ type MagicCssTransform = (styleArg: StyleArg, expressions: Expressions) => [StyleArg, Expressions];
3
+ export declare const magicCssTransform: MagicCssTransform;
4
+ export {};