@elliemae/ds-system 3.18.0-next.0 → 3.18.0-next.2

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 (192) hide show
  1. package/dist/cjs/globalStyles.js +11 -7
  2. package/dist/cjs/globalStyles.js.map +2 -2
  3. package/dist/cjs/index.js +1 -1
  4. package/dist/cjs/index.js.map +2 -2
  5. package/dist/cjs/{ds-styled/utilities → styled}/checkNamingConvention.js.map +1 -1
  6. package/dist/cjs/styled/coerceWithDefaultTheme.js +46 -0
  7. package/dist/cjs/styled/coerceWithDefaultTheme.js.map +7 -0
  8. package/dist/cjs/styled/expressions/genStyleOverridesExpression.js +44 -0
  9. package/dist/cjs/styled/expressions/genStyleOverridesExpression.js.map +7 -0
  10. package/dist/cjs/{ds-styled/utilities/resolvers.js → styled/expressions/genVariantOverridesExpression.js} +14 -14
  11. package/dist/cjs/styled/expressions/genVariantOverridesExpression.js.map +7 -0
  12. package/dist/cjs/styled/expressions/index.js +38 -0
  13. package/dist/cjs/styled/expressions/index.js.map +7 -0
  14. package/dist/cjs/styled/fixStyleArg.js +48 -0
  15. package/dist/cjs/styled/fixStyleArg.js.map +7 -0
  16. package/dist/cjs/styled/generated-attributes/generateAttributes.js +71 -0
  17. package/dist/cjs/styled/generated-attributes/generateAttributes.js.map +7 -0
  18. package/dist/cjs/styled/generated-attributes/generateAutoCalculated.js +42 -0
  19. package/dist/cjs/styled/generated-attributes/generateAutoCalculated.js.map +7 -0
  20. package/dist/cjs/styled/generated-attributes/generateDisplayName.js +41 -0
  21. package/dist/cjs/styled/generated-attributes/generateDisplayName.js.map +7 -0
  22. package/dist/cjs/styled/generated-attributes/index.js +36 -0
  23. package/dist/cjs/styled/generated-attributes/index.js.map +7 -0
  24. package/dist/cjs/styled/generated-attributes/utils/callbackMerger.js +50 -0
  25. package/dist/cjs/styled/generated-attributes/utils/callbackMerger.js.map +7 -0
  26. package/dist/cjs/styled/generated-attributes/utils/refMerger.js +54 -0
  27. package/dist/cjs/styled/generated-attributes/utils/refMerger.js.map +7 -0
  28. package/dist/cjs/{ds-styled/utilities → styled}/helpers.js +1 -16
  29. package/dist/cjs/styled/helpers.js.map +7 -0
  30. package/dist/cjs/{ds-styled/utilities → styled}/index.js +28 -11
  31. package/dist/cjs/styled/index.js.map +7 -0
  32. package/dist/cjs/styled/styled.js +38 -0
  33. package/dist/cjs/styled/styled.js.map +7 -0
  34. package/dist/cjs/styled/styledFunction.js +78 -0
  35. package/dist/cjs/styled/styledFunction.js.map +7 -0
  36. package/dist/cjs/styled/styledObject.js +42 -0
  37. package/dist/cjs/styled/styledObject.js.map +7 -0
  38. package/dist/cjs/styled/system-types.js +28 -0
  39. package/dist/cjs/styled/system-types.js.map +7 -0
  40. package/dist/cjs/styled/system-utilities/background.js.map +7 -0
  41. package/dist/cjs/styled/system-utilities/border.js.map +7 -0
  42. package/dist/cjs/styled/system-utilities/color.js.map +7 -0
  43. package/dist/cjs/{ds-styled → styled/system-utilities}/index.js +14 -8
  44. package/dist/cjs/styled/system-utilities/index.js.map +7 -0
  45. package/dist/cjs/{ds-styled/utilities → styled/system-utilities}/sizing.js.map +1 -1
  46. package/dist/cjs/{ds-styled/utilities → styled/system-utilities}/space.js.map +2 -2
  47. package/dist/cjs/styled/system.js +40 -0
  48. package/dist/cjs/styled/system.js.map +7 -0
  49. package/dist/cjs/styled/transformers/index.js +36 -0
  50. package/dist/cjs/styled/transformers/index.js.map +7 -0
  51. package/dist/cjs/styled/transformers/magicCssTransform.js.map +7 -0
  52. package/dist/cjs/styled/types.js.map +7 -0
  53. package/dist/cjs/th.js.map +2 -2
  54. package/dist/esm/globalStyles.js +10 -6
  55. package/dist/esm/globalStyles.js.map +2 -2
  56. package/dist/esm/index.js +1 -1
  57. package/dist/esm/index.js.map +1 -1
  58. package/dist/esm/{ds-styled/utilities → styled}/checkNamingConvention.js.map +1 -1
  59. package/dist/esm/styled/coerceWithDefaultTheme.js +16 -0
  60. package/dist/esm/styled/coerceWithDefaultTheme.js.map +7 -0
  61. package/dist/esm/styled/expressions/genStyleOverridesExpression.js +14 -0
  62. package/dist/esm/styled/expressions/genStyleOverridesExpression.js.map +7 -0
  63. package/dist/esm/styled/expressions/genVariantOverridesExpression.js +27 -0
  64. package/dist/esm/styled/expressions/genVariantOverridesExpression.js.map +7 -0
  65. package/dist/esm/styled/expressions/index.js +8 -0
  66. package/dist/esm/styled/expressions/index.js.map +7 -0
  67. package/dist/esm/styled/fixStyleArg.js +18 -0
  68. package/dist/esm/styled/fixStyleArg.js.map +7 -0
  69. package/dist/esm/styled/generated-attributes/generateAttributes.js +41 -0
  70. package/dist/esm/styled/generated-attributes/generateAttributes.js.map +7 -0
  71. package/dist/esm/styled/generated-attributes/generateAutoCalculated.js +12 -0
  72. package/dist/esm/styled/generated-attributes/generateAutoCalculated.js.map +7 -0
  73. package/dist/esm/styled/generated-attributes/generateDisplayName.js +11 -0
  74. package/dist/esm/styled/generated-attributes/generateDisplayName.js.map +7 -0
  75. package/dist/esm/styled/generated-attributes/index.js +6 -0
  76. package/dist/esm/styled/generated-attributes/index.js.map +7 -0
  77. package/dist/esm/styled/generated-attributes/utils/callbackMerger.js +20 -0
  78. package/dist/esm/styled/generated-attributes/utils/callbackMerger.js.map +7 -0
  79. package/dist/esm/styled/generated-attributes/utils/refMerger.js +24 -0
  80. package/dist/esm/styled/generated-attributes/utils/refMerger.js.map +7 -0
  81. package/dist/esm/{ds-styled/utilities → styled}/helpers.js +1 -16
  82. package/dist/esm/styled/helpers.js.map +7 -0
  83. package/dist/esm/styled/index.js +35 -0
  84. package/dist/esm/styled/index.js.map +7 -0
  85. package/dist/esm/styled/styled.js +8 -0
  86. package/dist/esm/styled/styled.js.map +7 -0
  87. package/dist/esm/styled/styledFunction.js +48 -0
  88. package/dist/esm/styled/styledFunction.js.map +7 -0
  89. package/dist/esm/styled/styledObject.js +12 -0
  90. package/dist/esm/styled/styledObject.js.map +7 -0
  91. package/dist/esm/styled/system-types.js +2 -0
  92. package/dist/esm/styled/system-utilities/background.js.map +7 -0
  93. package/dist/esm/styled/system-utilities/border.js.map +7 -0
  94. package/dist/esm/styled/system-utilities/color.js.map +7 -0
  95. package/dist/esm/styled/system-utilities/index.js +20 -0
  96. package/dist/esm/styled/system-utilities/index.js.map +7 -0
  97. package/dist/esm/{ds-styled/utilities → styled/system-utilities}/sizing.js.map +1 -1
  98. package/dist/esm/{ds-styled/utilities → styled/system-utilities}/space.js.map +2 -2
  99. package/dist/esm/styled/system.js +10 -0
  100. package/dist/esm/styled/system.js.map +7 -0
  101. package/dist/esm/styled/transformers/index.js +6 -0
  102. package/dist/esm/styled/transformers/index.js.map +7 -0
  103. package/dist/esm/styled/transformers/magicCssTransform.js.map +7 -0
  104. package/dist/esm/styled/types.js.map +7 -0
  105. package/dist/esm/th.js.map +2 -2
  106. package/dist/types/index.d.ts +1 -1
  107. package/dist/types/styled/coerceWithDefaultTheme.d.ts +2 -0
  108. package/dist/types/styled/expressions/genStyleOverridesExpression.d.ts +3 -0
  109. package/dist/types/styled/expressions/genVariantOverridesExpression.d.ts +3 -0
  110. package/dist/types/styled/expressions/index.d.ts +2 -0
  111. package/dist/types/styled/fixStyleArg.d.ts +2 -0
  112. package/dist/types/styled/generated-attributes/generateAttributes.d.ts +2 -0
  113. package/dist/types/styled/generated-attributes/generateAutoCalculated.d.ts +2 -0
  114. package/dist/types/styled/generated-attributes/generateDisplayName.d.ts +2 -0
  115. package/dist/types/styled/generated-attributes/index.d.ts +1 -0
  116. package/dist/types/styled/generated-attributes/utils/callbackMerger.d.ts +3 -0
  117. package/dist/types/styled/generated-attributes/utils/refMerger.d.ts +7 -0
  118. package/dist/types/styled/helpers.d.ts +5 -0
  119. package/dist/types/styled/index.d.ts +6 -0
  120. package/dist/types/styled/styled.d.ts +7 -0
  121. package/dist/types/styled/styledFunction.d.ts +9 -0
  122. package/dist/types/styled/styledObject.d.ts +6 -0
  123. package/dist/types/styled/system-types.d.ts +74 -0
  124. package/dist/types/styled/system-utilities/background.d.ts +2 -0
  125. package/dist/types/{ds-styled/utilities → styled/system-utilities}/color.d.ts +1 -1
  126. package/dist/types/styled/system-utilities/index.d.ts +6 -0
  127. package/dist/types/{ds-styled/utilities → styled/system-utilities}/space.d.ts +1 -1
  128. package/dist/types/styled/system.d.ts +1 -0
  129. package/dist/types/styled/transformers/index.d.ts +1 -0
  130. package/dist/types/styled/transformers/magicCssTransform.d.ts +4 -0
  131. package/dist/types/styled/types.d.ts +42 -0
  132. package/dist/types/th.d.ts +2 -2
  133. package/dist/types/utils.d.ts +1 -1
  134. package/dist/types/xStyledWrapper.d.ts +2 -2
  135. package/package.json +3 -3
  136. package/dist/cjs/ds-styled/attributes.js +0 -53
  137. package/dist/cjs/ds-styled/attributes.js.map +0 -7
  138. package/dist/cjs/ds-styled/index.js.map +0 -7
  139. package/dist/cjs/ds-styled/styled.js +0 -95
  140. package/dist/cjs/ds-styled/styled.js.map +0 -7
  141. package/dist/cjs/ds-styled/types.js.map +0 -7
  142. package/dist/cjs/ds-styled/utilities/background.js.map +0 -7
  143. package/dist/cjs/ds-styled/utilities/border.js.map +0 -7
  144. package/dist/cjs/ds-styled/utilities/color.js.map +0 -7
  145. package/dist/cjs/ds-styled/utilities/helpers.js.map +0 -7
  146. package/dist/cjs/ds-styled/utilities/index.js.map +0 -7
  147. package/dist/cjs/ds-styled/utilities/magicCssTransform.js.map +0 -7
  148. package/dist/cjs/ds-styled/utilities/resolvers.js.map +0 -7
  149. package/dist/esm/ds-styled/attributes.js +0 -23
  150. package/dist/esm/ds-styled/attributes.js.map +0 -7
  151. package/dist/esm/ds-styled/index.js +0 -13
  152. package/dist/esm/ds-styled/index.js.map +0 -7
  153. package/dist/esm/ds-styled/styled.js +0 -73
  154. package/dist/esm/ds-styled/styled.js.map +0 -7
  155. package/dist/esm/ds-styled/utilities/background.js.map +0 -7
  156. package/dist/esm/ds-styled/utilities/border.js.map +0 -7
  157. package/dist/esm/ds-styled/utilities/color.js.map +0 -7
  158. package/dist/esm/ds-styled/utilities/helpers.js.map +0 -7
  159. package/dist/esm/ds-styled/utilities/index.js +0 -11
  160. package/dist/esm/ds-styled/utilities/index.js.map +0 -7
  161. package/dist/esm/ds-styled/utilities/magicCssTransform.js.map +0 -7
  162. package/dist/esm/ds-styled/utilities/resolvers.js +0 -27
  163. package/dist/esm/ds-styled/utilities/resolvers.js.map +0 -7
  164. package/dist/types/ds-styled/attributes.d.ts +0 -9
  165. package/dist/types/ds-styled/index.d.ts +0 -4
  166. package/dist/types/ds-styled/styled.d.ts +0 -4
  167. package/dist/types/ds-styled/types.d.ts +0 -109
  168. package/dist/types/ds-styled/utilities/background.d.ts +0 -1
  169. package/dist/types/ds-styled/utilities/helpers.d.ts +0 -10
  170. package/dist/types/ds-styled/utilities/index.d.ts +0 -9
  171. package/dist/types/ds-styled/utilities/magicCssTransform.d.ts +0 -6
  172. package/dist/types/ds-styled/utilities/resolvers.d.ts +0 -5
  173. /package/dist/cjs/{ds-styled/utilities → styled}/checkNamingConvention.js +0 -0
  174. /package/dist/cjs/{ds-styled/utilities → styled/system-utilities}/background.js +0 -0
  175. /package/dist/cjs/{ds-styled/utilities → styled/system-utilities}/border.js +0 -0
  176. /package/dist/cjs/{ds-styled/utilities → styled/system-utilities}/color.js +0 -0
  177. /package/dist/cjs/{ds-styled/utilities → styled/system-utilities}/sizing.js +0 -0
  178. /package/dist/cjs/{ds-styled/utilities → styled/system-utilities}/space.js +0 -0
  179. /package/dist/cjs/{ds-styled/utilities → styled/transformers}/magicCssTransform.js +0 -0
  180. /package/dist/cjs/{ds-styled → styled}/types.js +0 -0
  181. /package/dist/esm/{ds-styled/utilities → styled}/checkNamingConvention.js +0 -0
  182. /package/dist/esm/{ds-styled/types.js.map → styled/system-types.js.map} +0 -0
  183. /package/dist/esm/{ds-styled/utilities → styled/system-utilities}/background.js +0 -0
  184. /package/dist/esm/{ds-styled/utilities → styled/system-utilities}/border.js +0 -0
  185. /package/dist/esm/{ds-styled/utilities → styled/system-utilities}/color.js +0 -0
  186. /package/dist/esm/{ds-styled/utilities → styled/system-utilities}/sizing.js +0 -0
  187. /package/dist/esm/{ds-styled/utilities → styled/system-utilities}/space.js +0 -0
  188. /package/dist/esm/{ds-styled/utilities → styled/transformers}/magicCssTransform.js +0 -0
  189. /package/dist/esm/{ds-styled → styled}/types.js +0 -0
  190. /package/dist/types/{ds-styled/utilities → styled}/checkNamingConvention.d.ts +0 -0
  191. /package/dist/types/{ds-styled/utilities → styled/system-utilities}/border.d.ts +0 -0
  192. /package/dist/types/{ds-styled/utilities → styled/system-utilities}/sizing.d.ts +0 -0
@@ -32,18 +32,22 @@ __export(globalStyles_exports, {
32
32
  });
33
33
  module.exports = __toCommonJS(globalStyles_exports);
34
34
  var React = __toESM(require("react"));
35
- var import_ds_styled = require("./ds-styled/index.js");
35
+ var import_styled = require("./styled/index.js");
36
36
  var import_th = require("./th.js");
37
- const GlobalStyles = import_ds_styled.createGlobalStyle`
38
- :root, body {
39
- overscroll-behavior-y: none;
40
-
41
- font-size: ${(props) => props.device === "desktop" ? "13px" : "16px"};
37
+ const GlobalStyles = import_styled.createGlobalStyle`
38
+ // Here we setup the root font-sizes for mobile vs desktop
39
+ :root {
40
+ font-size: ${(props) => props.device === "desktop" ? "81.25%" : "100%"};
42
41
 
43
42
  @media(min-width: ${({ theme }) => theme.breakpoints.small}) {
44
- font-size: ${(props) => props.device === "mobile" ? "16px" : "13px"};
43
+ font-size: ${(props) => props.device === "mobile" ? "100%" : "81.25%"};
45
44
  }
45
+ }
46
+
47
+ body {
48
+ overscroll-behavior-y: none;
46
49
 
50
+ font-size: 1rem; // since we correctly have set up the root font-sizes, we can use 1rem
47
51
  }
48
52
 
49
53
  /* fix sanitize */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/globalStyles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { createGlobalStyle } from './ds-styled/index.js';\nimport { th } from './th.js';\n\nexport const GlobalStyles = createGlobalStyle<{ device: 'desktop' | 'mobile' }>`\n :root, body {\n overscroll-behavior-y: none;\n\n font-size: ${(props) => (props.device === 'desktop' ? '13px' : '16px')};\n\n @media(min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => (props.device === 'mobile' ? '16px' : '13px')};\n }\n\n }\n\n /* fix sanitize */\n ::placeholder {\n font-weight: ${th.fontWeight('regular')};\n color: ${th.color('neutral-500')};\n }\n ::-webkit-input-placeholder {\n opacity: 1;\n }\n\n :where(svg:not([fill])) {\n fill: unset;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAkC;AAClC,gBAAmB;AAEZ,MAAM,eAAe;AAAA;AAAA;AAAA;AAAA,iBAIX,CAAC,UAAW,MAAM,WAAW,YAAY,SAAS;AAAA;AAAA,wBAE3C,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACtC,CAAC,UAAW,MAAM,WAAW,WAAW,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAOjD,aAAG,WAAW,SAAS;AAAA,aAC7B,aAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import { createGlobalStyle } from './styled/index.js';\nimport { th } from './th.js';\n\nexport const GlobalStyles = createGlobalStyle<{ device: 'desktop' | 'mobile' }>`\n // Here we setup the root font-sizes for mobile vs desktop\n :root {\n font-size: ${(props) => (props.device === 'desktop' ? '81.25%' : '100%')};\n\n @media(min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => (props.device === 'mobile' ? '100%' : '81.25%')};\n }\n }\n\n body {\n overscroll-behavior-y: none;\n\n font-size: 1rem; // since we correctly have set up the root font-sizes, we can use 1rem\n }\n\n /* fix sanitize */\n ::placeholder {\n font-weight: ${th.fontWeight('regular')};\n color: ${th.color('neutral-500')};\n }\n ::-webkit-input-placeholder {\n opacity: 1;\n }\n\n :where(svg:not([fill])) {\n fill: unset;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAkC;AAClC,gBAAmB;AAEZ,MAAM,eAAe;AAAA;AAAA;AAAA,iBAGX,CAAC,UAAW,MAAM,WAAW,YAAY,WAAW;AAAA;AAAA,wBAE7C,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACtC,CAAC,UAAW,MAAM,WAAW,WAAW,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAYjD,aAAG,WAAW,SAAS;AAAA,aAC7B,aAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -45,7 +45,7 @@ __reExport(src_exports, require("./utils.js"), module.exports);
45
45
  __reExport(src_exports, require("./arithmetic.js"), module.exports);
46
46
  __reExport(src_exports, require("./th.js"), module.exports);
47
47
  __reExport(src_exports, require("./theme.js"), module.exports);
48
- __reExport(src_exports, require("./ds-styled/index.js"), module.exports);
48
+ __reExport(src_exports, require("./styled/index.js"), module.exports);
49
49
  var import_system = require("@xstyled/system");
50
50
  var import_themeProviderHOC = require("./themeProviderHOC.js");
51
51
  var import_styled_components = require("@xstyled/styled-components");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './globalStyles.js';\nexport * from './spaceUtilities.js';\nexport * from './mobileUtilities.js';\nexport * from './utils.js';\nexport * from './arithmetic.js';\nexport * from './th.js';\nexport * from './theme.js';\nexport * from './ds-styled/index.js';\nexport { position, typography } from '@xstyled/system';\nexport { themeProviderHOC } from './themeProviderHOC.js';\nexport { ThemeContext } from '@xstyled/styled-components';\nexport { xStyledCommonProps, XStyledWrapper } from './xStyledWrapper.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,8BAAd;AACA,wBAAc,gCADd;AAEA,wBAAc,iCAFd;AAGA,wBAAc,uBAHd;AAIA,wBAAc,4BAJd;AAKA,wBAAc,oBALd;AAMA,wBAAc,uBANd;AAOA,wBAAc,iCAPd;AAQA,oBAAqC;AACrC,8BAAiC;AACjC,+BAA6B;AAC7B,4BAAmD;",
4
+ "sourcesContent": ["export * from './globalStyles.js';\nexport * from './spaceUtilities.js';\nexport * from './mobileUtilities.js';\nexport * from './utils.js';\nexport * from './arithmetic.js';\nexport * from './th.js';\nexport * from './theme.js';\nexport * from './styled/index.js';\nexport { position, typography } from '@xstyled/system';\nexport { themeProviderHOC } from './themeProviderHOC.js';\nexport { ThemeContext } from '@xstyled/styled-components';\nexport { xStyledCommonProps, XStyledWrapper } from './xStyledWrapper.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,8BAAd;AACA,wBAAc,gCADd;AAEA,wBAAc,iCAFd;AAGA,wBAAc,uBAHd;AAIA,wBAAc,4BAJd;AAKA,wBAAc,oBALd;AAMA,wBAAc,uBANd;AAOA,wBAAc,8BAPd;AAQA,oBAAqC;AACrC,8BAAiC;AACjC,+BAA6B;AAC7B,4BAAmD;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/ds-styled/utilities/checkNamingConvention.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../src/styled/checkNamingConvention.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable no-console */\n\nexport const checkNamingConvention = (componentName: string | null, componentSlot: string | null): void => {\n // We just check that the name is correctly written, should be removed in the future\n if (componentName !== null) {\n const matches = componentName.match(/DS([A-Z]|[a-z]|[0-9])*/);\n if (!matches || matches.length === 0 || matches[0].length !== componentName.length) {\n console.warn(`BAD FORMAT FOR COMPONENT NAME ${componentName}, use DSWhateverComponentTitled`);\n }\n }\n if (componentSlot !== null) {\n const isValid = /([a-z]-)*/.test(componentSlot);\n if (!isValid) {\n console.warn(`BAD FORMAT FOR COMPONENT SLOT ${componentSlot}, use any-component-slot`);\n }\n }\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEhB,MAAM,wBAAwB,CAAC,eAA8B,kBAAuC;AAEzG,MAAI,kBAAkB,MAAM;AAC1B,UAAM,UAAU,cAAc,MAAM,wBAAwB;AAC5D,QAAI,CAAC,WAAW,QAAQ,WAAW,KAAK,QAAQ,CAAC,EAAE,WAAW,cAAc,QAAQ;AAClF,cAAQ,KAAK,iCAAiC,8CAA8C;AAAA,IAC9F;AAAA,EACF;AACA,MAAI,kBAAkB,MAAM;AAC1B,UAAM,UAAU,YAAY,KAAK,aAAa;AAC9C,QAAI,CAAC,SAAS;AACZ,cAAQ,KAAK,iCAAiC,uCAAuC;AAAA,IACvF;AAAA,EACF;AACF;",
6
6
  "names": []
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var coerceWithDefaultTheme_exports = {};
30
+ __export(coerceWithDefaultTheme_exports, {
31
+ coerceWithDefaultTheme: () => coerceWithDefaultTheme
32
+ });
33
+ module.exports = __toCommonJS(coerceWithDefaultTheme_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_theme = require("../theme.js");
36
+ const coerceSingleExpressionWithDefaultTheme = (expression) => {
37
+ if (typeof expression === "function") {
38
+ return (props) => expression({
39
+ ...props,
40
+ theme: props.theme ?? import_theme.theme
41
+ });
42
+ }
43
+ return expression;
44
+ };
45
+ const coerceWithDefaultTheme = (expressions) => expressions ? expressions.map(coerceSingleExpressionWithDefaultTheme) : [];
46
+ //# sourceMappingURL=coerceWithDefaultTheme.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/styled/coerceWithDefaultTheme.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { theme as defaultTheme } from '../theme.js';\nimport type { Expressions, Expression, PropsWithTheme } from './types.js';\n\nconst coerceSingleExpressionWithDefaultTheme = (expression: Expression): Expression => {\n if (typeof expression === 'function') {\n return (props: PropsWithTheme) =>\n expression({\n ...props,\n theme: props.theme ?? defaultTheme,\n });\n }\n return expression;\n};\n\nexport const coerceWithDefaultTheme = (expressions: Expressions): Expressions =>\n expressions ? expressions.map(coerceSingleExpressionWithDefaultTheme) : [];\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAsC;AAGtC,MAAM,yCAAyC,CAAC,eAAuC;AACrF,MAAI,OAAO,eAAe,YAAY;AACpC,WAAO,CAAC,UACN,WAAW;AAAA,MACT,GAAG;AAAA,MACH,OAAO,MAAM,SAAS,aAAAA;AAAA,IACxB,CAAC;AAAA,EACL;AACA,SAAO;AACT;AAEO,MAAM,yBAAyB,CAAC,gBACrC,cAAc,YAAY,IAAI,sCAAsC,IAAI,CAAC;",
6
+ "names": ["defaultTheme"]
7
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var genStyleOverridesExpression_exports = {};
30
+ __export(genStyleOverridesExpression_exports, {
31
+ genStyleOverridesExpression: () => genStyleOverridesExpression
32
+ });
33
+ module.exports = __toCommonJS(genStyleOverridesExpression_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_theme = require("../../theme.js");
36
+ const getStyleOverrides = (name, theme) => theme.components?.[name]?.styleOverrides || null;
37
+ const genStyleOverridesExpression = (componentName, componentSlot) => (props) => {
38
+ const styleOverrides = getStyleOverrides(componentName, props.theme ?? import_theme.theme);
39
+ if (styleOverrides) {
40
+ return [styleOverrides[componentSlot]];
41
+ }
42
+ return null;
43
+ };
44
+ //# sourceMappingURL=genStyleOverridesExpression.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/styled/expressions/genStyleOverridesExpression.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\nimport type { CSSObject } from 'styled-components';\n\nconst getStyleOverrides = (name: string, theme: Theme): CSSObject | null =>\n theme.components?.[name]?.styleOverrides || null;\n\nexport const genStyleOverridesExpression =\n (componentName: string, componentSlot: string) => (props: PropsWithTheme) => {\n const styleOverrides = getStyleOverrides(componentName, props.theme ?? defaultTheme);\n if (styleOverrides) {\n return [styleOverrides[componentSlot]];\n }\n return null;\n };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAsC;AAGtC,MAAM,oBAAoB,CAAC,MAAc,UACvC,MAAM,aAAa,IAAI,GAAG,kBAAkB;AAEvC,MAAM,8BACX,CAAC,eAAuB,kBAA0B,CAAC,UAA0B;AAC3E,QAAM,iBAAiB,kBAAkB,eAAe,MAAM,SAAS,aAAAA,KAAY;AACnF,MAAI,gBAAgB;AAClB,WAAO,CAAC,eAAe,aAAa,CAAC;AAAA,EACvC;AACA,SAAO;AACT;",
6
+ "names": ["defaultTheme"]
7
+ }
@@ -26,16 +26,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var resolvers_exports = {};
30
- __export(resolvers_exports, {
31
- getStyleOverrides: () => getStyleOverrides,
32
- getVariantStyles: () => getVariantStyles,
33
- variantsResolver: () => variantsResolver
29
+ var genVariantOverridesExpression_exports = {};
30
+ __export(genVariantOverridesExpression_exports, {
31
+ genVariantOverridesExpression: () => genVariantOverridesExpression
34
32
  });
35
- module.exports = __toCommonJS(resolvers_exports);
33
+ module.exports = __toCommonJS(genVariantOverridesExpression_exports);
36
34
  var React = __toESM(require("react"));
37
- var import_helpers = require("./helpers.js");
38
- const getStyleOverrides = (name, theme) => theme.components?.[name]?.styleOverrides || null;
35
+ var import_theme = require("../../theme.js");
36
+ var import_helpers = require("../helpers.js");
39
37
  const getVariantStyles = (name, theme) => {
40
38
  const variants = theme.components?.[name]?.variants || [];
41
39
  return variants.reduce((styles, definition) => {
@@ -44,14 +42,16 @@ const getVariantStyles = (name, theme) => {
44
42
  return styles;
45
43
  }, {});
46
44
  };
47
- const variantsResolver = (props, styles, theme, name) => {
48
- const themeVariants = theme?.components?.[name]?.variants || [];
49
- return themeVariants.reduce((variantsStyles, themeVariant) => {
45
+ const genVariantOverridesExpression = (componentName) => (props) => {
46
+ const theme = props.theme ?? import_theme.theme;
47
+ const variantStyles = getVariantStyles(componentName, theme);
48
+ const themeVariants = theme?.components?.[componentName]?.variants || [];
49
+ return themeVariants.reduce((resultingStyles, themeVariant) => {
50
50
  const isMatch = Object.keys(themeVariant.props).every((key) => props[key] === themeVariant.props[key]);
51
51
  if (isMatch) {
52
- variantsStyles.push(styles[(0, import_helpers.propsToClassKey)(themeVariant.props)]);
52
+ resultingStyles.push(variantStyles[(0, import_helpers.propsToClassKey)(themeVariant.props)]);
53
53
  }
54
- return variantsStyles;
54
+ return resultingStyles;
55
55
  }, []);
56
56
  };
57
- //# sourceMappingURL=resolvers.js.map
57
+ //# sourceMappingURL=genVariantOverridesExpression.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/styled/expressions/genVariantOverridesExpression.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\nimport type { CSSObject } from 'styled-components';\nimport { propsToClassKey } from '../helpers.js';\n\nconst getVariantStyles = (name: string, theme: Theme): Record<string, CSSObject> => {\n const variants = theme.components?.[name]?.variants || [];\n\n return variants.reduce((styles, definition) => {\n const key = propsToClassKey(definition.props);\n styles[key] = definition.style;\n return styles;\n }, {} as Record<string, CSSObject>);\n};\n\nexport const genVariantOverridesExpression = (componentName: string) => (props: PropsWithTheme) => {\n const theme = props.theme ?? defaultTheme;\n const variantStyles = getVariantStyles(componentName, theme);\n\n const themeVariants = theme?.components?.[componentName]?.variants || [];\n\n return themeVariants.reduce((resultingStyles, themeVariant) => {\n const isMatch = Object.keys(themeVariant.props).every((key) => props[key] === themeVariant.props[key]);\n if (isMatch) {\n resultingStyles.push(variantStyles[propsToClassKey(themeVariant.props)]);\n }\n return resultingStyles;\n }, [] as CSSObject[keyof CSSObject][]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAsC;AAEtC,qBAAgC;AAEhC,MAAM,mBAAmB,CAAC,MAAc,UAA4C;AAClF,QAAM,WAAW,MAAM,aAAa,IAAI,GAAG,YAAY,CAAC;AAExD,SAAO,SAAS,OAAO,CAAC,QAAQ,eAAe;AAC7C,UAAM,UAAM,gCAAgB,WAAW,KAAK;AAC5C,WAAO,GAAG,IAAI,WAAW;AACzB,WAAO;AAAA,EACT,GAAG,CAAC,CAA8B;AACpC;AAEO,MAAM,gCAAgC,CAAC,kBAA0B,CAAC,UAA0B;AACjG,QAAM,QAAQ,MAAM,SAAS,aAAAA;AAC7B,QAAM,gBAAgB,iBAAiB,eAAe,KAAK;AAE3D,QAAM,gBAAgB,OAAO,aAAa,aAAa,GAAG,YAAY,CAAC;AAEvE,SAAO,cAAc,OAAO,CAAC,iBAAiB,iBAAiB;AAC7D,UAAM,UAAU,OAAO,KAAK,aAAa,KAAK,EAAE,MAAM,CAAC,QAAQ,MAAM,GAAG,MAAM,aAAa,MAAM,GAAG,CAAC;AACrG,QAAI,SAAS;AACX,sBAAgB,KAAK,kBAAc,gCAAgB,aAAa,KAAK,CAAC,CAAC;AAAA,IACzE;AACA,WAAO;AAAA,EACT,GAAG,CAAC,CAAiC;AACvC;",
6
+ "names": ["defaultTheme"]
7
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var expressions_exports = {};
30
+ __export(expressions_exports, {
31
+ genStyleOverridesExpression: () => import_genStyleOverridesExpression.genStyleOverridesExpression,
32
+ genVariantOverridesExpression: () => import_genVariantOverridesExpression.genVariantOverridesExpression
33
+ });
34
+ module.exports = __toCommonJS(expressions_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_genStyleOverridesExpression = require("./genStyleOverridesExpression.js");
37
+ var import_genVariantOverridesExpression = require("./genVariantOverridesExpression.js");
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/styled/expressions/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export { genStyleOverridesExpression } from './genStyleOverridesExpression.js';\nexport { genVariantOverridesExpression } from './genVariantOverridesExpression.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yCAA4C;AAC5C,2CAA8C;",
6
+ "names": []
7
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var fixStyleArg_exports = {};
30
+ __export(fixStyleArg_exports, {
31
+ fixStyleArg: () => fixStyleArg
32
+ });
33
+ module.exports = __toCommonJS(fixStyleArg_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_theme = require("../theme.js");
36
+ const isTemplateStringsArray = (styleArg) => Array.isArray(styleArg);
37
+ const fixStyleArg = (styleArg, numberOfNewExpressions) => {
38
+ if (isTemplateStringsArray(styleArg) && numberOfNewExpressions > 0) {
39
+ const placeholders = new Array(numberOfNewExpressions).fill("");
40
+ return Object.assign([...styleArg, ...placeholders], {
41
+ raw: [...styleArg.raw, ...placeholders]
42
+ });
43
+ } else if (typeof styleArg === "function") {
44
+ return (props) => styleArg({ ...props, theme: props.theme ?? import_theme.theme });
45
+ }
46
+ return styleArg;
47
+ };
48
+ //# sourceMappingURL=fixStyleArg.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/styled/fixStyleArg.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { theme as defaultTheme } from '../theme.js';\nimport type { PropsWithTheme, StyleArg } from './types.js';\n\nconst isTemplateStringsArray = (styleArg: StyleArg): styleArg is TemplateStringsArray => Array.isArray(styleArg);\n\nexport const fixStyleArg = (styleArg: StyleArg, numberOfNewExpressions: number): StyleArg => {\n if (isTemplateStringsArray(styleArg) && numberOfNewExpressions > 0) {\n // Here we are adding placeholders for all the new functions that we are gonna call\n const placeholders = new Array(numberOfNewExpressions).fill('') as string[];\n return Object.assign([...styleArg, ...placeholders], {\n raw: [...styleArg.raw, ...placeholders],\n });\n } else if (typeof styleArg === 'function') {\n // Here we just coerce with the default theme\n return (props: PropsWithTheme) => styleArg({ ...props, theme: props.theme ?? defaultTheme });\n }\n return styleArg;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAsC;AAGtC,MAAM,yBAAyB,CAAC,aAAyD,MAAM,QAAQ,QAAQ;AAExG,MAAM,cAAc,CAAC,UAAoB,2BAA6C;AAC3F,MAAI,uBAAuB,QAAQ,KAAK,yBAAyB,GAAG;AAElE,UAAM,eAAe,IAAI,MAAM,sBAAsB,EAAE,KAAK,EAAE;AAC9D,WAAO,OAAO,OAAO,CAAC,GAAG,UAAU,GAAG,YAAY,GAAG;AAAA,MACnD,KAAK,CAAC,GAAG,SAAS,KAAK,GAAG,YAAY;AAAA,IACxC,CAAC;AAAA,EACH,WAAW,OAAO,aAAa,YAAY;AAEzC,WAAO,CAAC,UAA0B,SAAS,EAAE,GAAG,OAAO,OAAO,MAAM,SAAS,aAAAA,MAAa,CAAC;AAAA,EAC7F;AACA,SAAO;AACT;",
6
+ "names": ["defaultTheme"]
7
+ }
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var generateAttributes_exports = {};
30
+ __export(generateAttributes_exports, {
31
+ generateAttributes: () => generateAttributes
32
+ });
33
+ module.exports = __toCommonJS(generateAttributes_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_helpers = require("../helpers.js");
36
+ var import_callbackMerger = require("./utils/callbackMerger.js");
37
+ var import_refMerger = require("./utils/refMerger.js");
38
+ const generateClassName = (props, meta) => {
39
+ if (meta.displayName === null)
40
+ return {};
41
+ return {
42
+ className: meta.displayName
43
+ };
44
+ };
45
+ const generateDataTestId = (props, meta) => {
46
+ if (meta.displayName === null)
47
+ return {};
48
+ return {
49
+ "data-testid": props["data-testid"] ?? (0, import_helpers.displayNameToKebabCase)(meta.displayName)
50
+ };
51
+ };
52
+ const generateGlobalAttributes = (props) => {
53
+ const { getOwnerProps, getOwnerPropsArguments } = props;
54
+ if (getOwnerProps === void 0)
55
+ return {};
56
+ const ownerPropsValue = getOwnerProps();
57
+ const ownerPropsArgumentsValue = getOwnerPropsArguments?.() ?? {};
58
+ const elementProps = ownerPropsValue[props["data-testid"]];
59
+ if (elementProps === void 0 || elementProps === null)
60
+ return {};
61
+ const resultingObject = typeof elementProps === "function" ? elementProps(ownerPropsArgumentsValue) : elementProps;
62
+ const resultingObjectWithRefMerged = (0, import_refMerger.refMerger)(props, resultingObject);
63
+ const resultingObjectWithCallbackMerged = (0, import_callbackMerger.callbackMerger)(props, resultingObjectWithRefMerged);
64
+ return resultingObjectWithCallbackMerged;
65
+ };
66
+ const wrap = (func, meta) => (props) => func(props, meta);
67
+ const generateAttributes = (options, displayName) => {
68
+ const meta = { options, displayName };
69
+ return [wrap(generateClassName, meta), wrap(generateDataTestId, meta), wrap(generateGlobalAttributes, meta)];
70
+ };
71
+ //# sourceMappingURL=generateAttributes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/styled/generated-attributes/generateAttributes.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { displayNameToKebabCase } from '../helpers.js';\nimport type { AttrsFunc, InternalAttrsFunc, Options, OwnerInterface, PartProps } from '../types.js';\nimport { callbackMerger } from './utils/callbackMerger.js';\nimport { refMerger } from './utils/refMerger.js';\n\nconst generateClassName: InternalAttrsFunc = (props, meta) => {\n if (meta.displayName === null) return {};\n return {\n className: meta.displayName,\n };\n};\n\nconst generateDataTestId: InternalAttrsFunc<{ 'data-testid': string }> = (props, meta) => {\n if (meta.displayName === null) return {};\n return {\n 'data-testid': props['data-testid'] ?? displayNameToKebabCase(meta.displayName),\n };\n};\n\nconst generateGlobalAttributes: InternalAttrsFunc<{ 'data-testid': string } & OwnerInterface> = (props) => {\n const { getOwnerProps, getOwnerPropsArguments } = props;\n\n // If no ownerProps are provided, we won't add global attributes\n if (getOwnerProps === undefined) return {};\n\n const ownerPropsValue = getOwnerProps() as Record<string, PartProps>;\n const ownerPropsArgumentsValue = getOwnerPropsArguments?.() ?? {};\n\n const elementProps = ownerPropsValue[props['data-testid']];\n\n // If no elementProps are present, we won't add global attributes either\n if (elementProps === undefined || elementProps === null) return {};\n\n // If elementProps is a function, we call it with the ownerPropsArguments\n // Otherwise we assign it directly\n const resultingObject = typeof elementProps === 'function' ? elementProps(ownerPropsArgumentsValue) : elementProps;\n\n const resultingObjectWithRefMerged = refMerger(props, resultingObject);\n\n const resultingObjectWithCallbackMerged = callbackMerger(props, resultingObjectWithRefMerged);\n\n return resultingObjectWithCallbackMerged;\n};\n\nconst wrap =\n <T extends object>(\n func: InternalAttrsFunc<T>,\n meta: { options: Options; displayName: string | null },\n ): AttrsFunc<T> =>\n (props) =>\n func(props, meta);\n\nexport const generateAttributes = (options: Options, displayName: string | null): AttrsFunc<any>[] => {\n const meta = { options, displayName };\n\n // Comprehensive list of all the generators above\n // ORDER MATTERS: the attributes returned by previous functions, are received as props by the next ones\n return [wrap(generateClassName, meta), wrap(generateDataTestId, meta), wrap(generateGlobalAttributes, meta)];\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAAuC;AAEvC,4BAA+B;AAC/B,uBAA0B;AAE1B,MAAM,oBAAuC,CAAC,OAAO,SAAS;AAC5D,MAAI,KAAK,gBAAgB;AAAM,WAAO,CAAC;AACvC,SAAO;AAAA,IACL,WAAW,KAAK;AAAA,EAClB;AACF;AAEA,MAAM,qBAAmE,CAAC,OAAO,SAAS;AACxF,MAAI,KAAK,gBAAgB;AAAM,WAAO,CAAC;AACvC,SAAO;AAAA,IACL,eAAe,MAAM,aAAa,SAAK,uCAAuB,KAAK,WAAW;AAAA,EAChF;AACF;AAEA,MAAM,2BAA0F,CAAC,UAAU;AACzG,QAAM,EAAE,eAAe,uBAAuB,IAAI;AAGlD,MAAI,kBAAkB;AAAW,WAAO,CAAC;AAEzC,QAAM,kBAAkB,cAAc;AACtC,QAAM,2BAA2B,yBAAyB,KAAK,CAAC;AAEhE,QAAM,eAAe,gBAAgB,MAAM,aAAa,CAAC;AAGzD,MAAI,iBAAiB,UAAa,iBAAiB;AAAM,WAAO,CAAC;AAIjE,QAAM,kBAAkB,OAAO,iBAAiB,aAAa,aAAa,wBAAwB,IAAI;AAEtG,QAAM,mCAA+B,4BAAU,OAAO,eAAe;AAErE,QAAM,wCAAoC,sCAAe,OAAO,4BAA4B;AAE5F,SAAO;AACT;AAEA,MAAM,OACJ,CACE,MACA,SAEF,CAAC,UACC,KAAK,OAAO,IAAI;AAEb,MAAM,qBAAqB,CAAC,SAAkB,gBAAiD;AACpG,QAAM,OAAO,EAAE,SAAS,YAAY;AAIpC,SAAO,CAAC,KAAK,mBAAmB,IAAI,GAAG,KAAK,oBAAoB,IAAI,GAAG,KAAK,0BAA0B,IAAI,CAAC;AAC7G;",
6
+ "names": []
7
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var generateAutoCalculated_exports = {};
30
+ __export(generateAutoCalculated_exports, {
31
+ generateAutoCalculated: () => generateAutoCalculated
32
+ });
33
+ module.exports = __toCommonJS(generateAutoCalculated_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_generateDisplayName = require("./generateDisplayName.js");
36
+ var import_generateAttributes = require("./generateAttributes.js");
37
+ const generateAutoCalculated = (options) => {
38
+ const displayName = (0, import_generateDisplayName.generateDisplayName)(options);
39
+ const attributes = (0, import_generateAttributes.generateAttributes)(options, displayName);
40
+ return [displayName, attributes];
41
+ };
42
+ //# sourceMappingURL=generateAutoCalculated.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/styled/generated-attributes/generateAutoCalculated.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { Options } from '../types.js';\nimport { generateDisplayName } from './generateDisplayName.js';\nimport { generateAttributes } from './generateAttributes.js';\n\nexport const generateAutoCalculated = (options: Options) => {\n const displayName = generateDisplayName(options);\n\n const attributes = generateAttributes(options, displayName);\n\n return [displayName, attributes] as const;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,iCAAoC;AACpC,gCAAmC;AAE5B,MAAM,yBAAyB,CAAC,YAAqB;AAC1D,QAAM,kBAAc,gDAAoB,OAAO;AAE/C,QAAM,iBAAa,8CAAmB,SAAS,WAAW;AAE1D,SAAO,CAAC,aAAa,UAAU;AACjC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var generateDisplayName_exports = {};
30
+ __export(generateDisplayName_exports, {
31
+ generateDisplayName: () => generateDisplayName
32
+ });
33
+ module.exports = __toCommonJS(generateDisplayName_exports);
34
+ var React = __toESM(require("react"));
35
+ const generateDisplayName = (options) => {
36
+ const { name: componentName, slot: componentSlot } = options;
37
+ if (componentName === null || componentSlot === null)
38
+ return null;
39
+ return `${componentName}-${componentSlot}`;
40
+ };
41
+ //# sourceMappingURL=generateDisplayName.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/styled/generated-attributes/generateDisplayName.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { Options } from '../types.js';\n\nexport const generateDisplayName = (options: Options) => {\n const { name: componentName, slot: componentSlot } = options;\n\n if (componentName === null || componentSlot === null) return null;\n\n return `${componentName}-${componentSlot}`;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEhB,MAAM,sBAAsB,CAAC,YAAqB;AACvD,QAAM,EAAE,MAAM,eAAe,MAAM,cAAc,IAAI;AAErD,MAAI,kBAAkB,QAAQ,kBAAkB;AAAM,WAAO;AAE7D,SAAO,GAAG,iBAAiB;AAC7B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var generated_attributes_exports = {};
30
+ __export(generated_attributes_exports, {
31
+ generateAutoCalculated: () => import_generateAutoCalculated.generateAutoCalculated
32
+ });
33
+ module.exports = __toCommonJS(generated_attributes_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_generateAutoCalculated = require("./generateAutoCalculated.js");
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/styled/generated-attributes/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export { generateAutoCalculated } from './generateAutoCalculated.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oCAAuC;",
6
+ "names": []
7
+ }