@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,55 @@
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var styled_exports = {};
31
+ __export(styled_exports, {
32
+ background: () => import_system_utilities.background,
33
+ borders: () => import_system_utilities.borders,
34
+ boxShadows: () => import_system_utilities.boxShadows,
35
+ color: () => import_system_utilities.color,
36
+ createGlobalStyle: () => import_system.createGlobalStyle,
37
+ css: () => import_system.css,
38
+ flexboxes: () => import_system_utilities.flexboxes,
39
+ fontSize: () => import_system_utilities.fontSize,
40
+ grids: () => import_system_utilities.grids,
41
+ layout: () => import_system_utilities.layout,
42
+ sizing: () => import_system_utilities.sizing,
43
+ slotObjectToDataTestIds: () => import_helpers.slotObjectToDataTestIds,
44
+ space: () => import_system_utilities.space,
45
+ styled: () => import_styled.styled
46
+ });
47
+ module.exports = __toCommonJS(styled_exports);
48
+ var React = __toESM(require("react"));
49
+ var import_styled = require("./styled.js");
50
+ var import_system_utilities = require("./system-utilities/index.js");
51
+ var import_helpers = require("./helpers.js");
52
+ __reExport(styled_exports, require("./types.js"), module.exports);
53
+ __reExport(styled_exports, require("./system-types.js"), module.exports);
54
+ var import_system = require("./system.js");
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/styled/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export { styled } from './styled.js';\nexport {\n background,\n borders,\n boxShadows,\n color,\n flexboxes,\n fontSize,\n grids,\n layout,\n sizing,\n space,\n} from './system-utilities/index.js';\nexport { slotObjectToDataTestIds } from './helpers.js';\nexport * from './types.js';\nexport * from './system-types.js';\nexport { css, createGlobalStyle } from './system.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAuB;AACvB,8BAWO;AACP,qBAAwC;AACxC,2BAAc,uBAdd;AAeA,2BAAc,8BAfd;AAgBA,oBAAuC;",
6
+ "names": []
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 styled_exports = {};
30
+ __export(styled_exports, {
31
+ styled: () => styled
32
+ });
33
+ module.exports = __toCommonJS(styled_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_styledFunction = require("./styledFunction.js");
36
+ var import_styledObject = require("./styledObject.js");
37
+ const styled = Object.assign(import_styledFunction.styledFunction, import_styledObject.styledObject);
38
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/styled/styled.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { styledFunction } from './styledFunction.js';\nimport { styledObject } from './styledObject.js';\n\nexport const styled = Object.assign(styledFunction, styledObject);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAA+B;AAC/B,0BAA6B;AAEtB,MAAM,SAAS,OAAO,OAAO,sCAAgB,gCAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,78 @@
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 styledFunction_exports = {};
30
+ __export(styledFunction_exports, {
31
+ styledFunction: () => styledFunction
32
+ });
33
+ module.exports = __toCommonJS(styledFunction_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_checkNamingConvention = require("./checkNamingConvention.js");
36
+ var import_system = require("./system.js");
37
+ var import_transformers = require("./transformers/index.js");
38
+ var import_coerceWithDefaultTheme = require("./coerceWithDefaultTheme.js");
39
+ var import_expressions = require("./expressions/index.js");
40
+ var import_fixStyleArg = require("./fixStyleArg.js");
41
+ var import_generated_attributes = require("./generated-attributes/index.js");
42
+ const defaultOptions = {
43
+ name: null,
44
+ slot: null
45
+ };
46
+ const styledFunction = (tag, options = defaultOptions) => {
47
+ const { name: componentName, slot: componentSlot } = options;
48
+ (0, import_checkNamingConvention.checkNamingConvention)(componentName, componentSlot);
49
+ const baseStyledResolver = (0, import_system.styled)(tag);
50
+ const styledAttributes = {
51
+ attrs: (...args) => baseStyledResolver.attrs(...args),
52
+ withConfig: (...args) => baseStyledResolver.withConfig(...args)
53
+ };
54
+ const dsStyledResolver = (styleArg, ...expressions) => {
55
+ const [styleArgWithMagic, expressionsWithMagic] = (0, import_transformers.magicCssTransform)(styleArg, expressions);
56
+ const expressionsWithThemeCoerced = (0, import_coerceWithDefaultTheme.coerceWithDefaultTheme)(expressionsWithMagic);
57
+ if (componentName && componentSlot) {
58
+ expressionsWithThemeCoerced.push((0, import_expressions.genStyleOverridesExpression)(componentName, componentSlot));
59
+ }
60
+ if (componentName && componentSlot === "root") {
61
+ expressionsWithThemeCoerced.push((0, import_expressions.genVariantOverridesExpression)(componentName));
62
+ }
63
+ const numOfExpressionsAdded = expressionsWithThemeCoerced.length - expressionsWithMagic.length;
64
+ const fixedStyleArg = (0, import_fixStyleArg.fixStyleArg)(styleArgWithMagic, numOfExpressionsAdded);
65
+ const [displayName, attributes] = (0, import_generated_attributes.generateAutoCalculated)(options);
66
+ const baseStyledResolverWithAttributes = attributes.reduce(
67
+ (curStyledResolver, attributeFunc) => curStyledResolver.attrs(attributeFunc),
68
+ baseStyledResolver
69
+ );
70
+ const Component = baseStyledResolverWithAttributes(fixedStyleArg, ...expressionsWithThemeCoerced);
71
+ if (displayName !== null) {
72
+ Component.displayName = displayName;
73
+ }
74
+ return Component;
75
+ };
76
+ return Object.assign(dsStyledResolver, styledAttributes);
77
+ };
78
+ //# sourceMappingURL=styledFunction.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/styled/styledFunction.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';\nimport { checkNamingConvention } from './checkNamingConvention.js';\nimport { styled as baseStyled } from './system.js';\nimport { magicCssTransform } from './transformers/index.js';\nimport type { Options, Theme, ThemedStyledFunctionBase } from './types.js';\nimport { coerceWithDefaultTheme } from './coerceWithDefaultTheme.js';\nimport { genStyleOverridesExpression, genVariantOverridesExpression } from './expressions/index.js';\nimport { fixStyleArg } from './fixStyleArg.js';\nimport { generateAutoCalculated } from './generated-attributes/index.js';\n\nconst defaultOptions: Options = {\n name: null,\n slot: null,\n};\n\nexport const styledFunction = <C extends AnyStyledComponent | keyof JSX.IntrinsicElements | React.ComponentType<any>>(\n tag: C,\n options: Options = defaultOptions,\n) => {\n const { name: componentName, slot: componentSlot } = options;\n\n checkNamingConvention(componentName, componentSlot);\n\n // Here we use the `as` because when C is keyof JSX.IntrinsicElements we get `never` for the attributes generic\n // We want to account for string | number | symbol that's why we transform it to `keyof any`\n const baseStyledResolver = baseStyled(tag) as unknown as ThemedStyledFunction<C, Theme, {}, keyof any>;\n\n // Here we use arrow functions to preserve the `this` context\n const styledAttributes = {\n attrs: ((...args) => baseStyledResolver.attrs(...args)) as (typeof baseStyledResolver)['attrs'],\n withConfig: ((...args) => baseStyledResolver.withConfig(...args)) as (typeof baseStyledResolver)['withConfig'],\n };\n\n // Due to the recursive natura of this function, we can't type it properly\n // Since we can apply .attrs or .withConfig, we are not sure on the type of the returned function\n // @ts-expect-error explained above\n const dsStyledResolver: ThemedStyledFunctionBase<C, Theme> = (styleArg, ...expressions) => {\n /**\n * Here we apply a CSS transformation to support MAGIC styled components\n * This makes it possible to use the following syntax:\n * color: neutral-100;\n * background-color: success-900;\n */\n const [styleArgWithMagic, expressionsWithMagic] = magicCssTransform(styleArg, expressions);\n\n /**\n * We coerce all the already written expressions with the default theme\n * This prevents styled components to break when a theme is not provided\n * either with the HOC or the ThemeProvider\n */\n const expressionsWithThemeCoerced = coerceWithDefaultTheme(expressionsWithMagic);\n\n if (componentName && componentSlot) {\n // Here we add the style overrides expression\n expressionsWithThemeCoerced.push(genStyleOverridesExpression(componentName, componentSlot));\n }\n\n if (componentName && componentSlot === 'root') {\n // Here we add the variant overrides from the user (only for the root slot\n expressionsWithThemeCoerced.push(genVariantOverridesExpression(componentName));\n }\n\n /**\n * Here we will fix the format of the style argument\n * We possible added some new expressions into the mix,\n * so we need to properly adjust the style arg\n */\n const numOfExpressionsAdded = expressionsWithThemeCoerced.length - expressionsWithMagic.length;\n\n const fixedStyleArg = fixStyleArg(styleArgWithMagic, numOfExpressionsAdded);\n\n // We will add autocalculated attributes to the styled component\n const [displayName, attributes] = generateAutoCalculated(options);\n\n // For each attribute function, we will call `attrs` func with it\n // This will add the attributes to the styled component\n const baseStyledResolverWithAttributes = attributes.reduce<typeof baseStyledResolver>(\n (curStyledResolver, attributeFunc) => curStyledResolver.attrs(attributeFunc),\n baseStyledResolver,\n );\n\n const Component = baseStyledResolverWithAttributes(fixedStyleArg, ...expressionsWithThemeCoerced);\n\n if (displayName !== null) {\n Component.displayName = displayName;\n }\n\n return Component;\n };\n\n return Object.assign(dsStyledResolver, styledAttributes);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mCAAsC;AACtC,oBAAqC;AACrC,0BAAkC;AAElC,oCAAuC;AACvC,yBAA2E;AAC3E,yBAA4B;AAC5B,kCAAuC;AAEvC,MAAM,iBAA0B;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM;AACR;AAEO,MAAM,iBAAiB,CAC5B,KACA,UAAmB,mBAChB;AACH,QAAM,EAAE,MAAM,eAAe,MAAM,cAAc,IAAI;AAErD,0DAAsB,eAAe,aAAa;AAIlD,QAAM,yBAAqB,cAAAA,QAAW,GAAG;AAGzC,QAAM,mBAAmB;AAAA,IACvB,OAAQ,IAAI,SAAS,mBAAmB,MAAM,GAAG,IAAI;AAAA,IACrD,YAAa,IAAI,SAAS,mBAAmB,WAAW,GAAG,IAAI;AAAA,EACjE;AAKA,QAAM,mBAAuD,CAAC,aAAa,gBAAgB;AAOzF,UAAM,CAAC,mBAAmB,oBAAoB,QAAI,uCAAkB,UAAU,WAAW;AAOzF,UAAM,kCAA8B,sDAAuB,oBAAoB;AAE/E,QAAI,iBAAiB,eAAe;AAElC,kCAA4B,SAAK,gDAA4B,eAAe,aAAa,CAAC;AAAA,IAC5F;AAEA,QAAI,iBAAiB,kBAAkB,QAAQ;AAE7C,kCAA4B,SAAK,kDAA8B,aAAa,CAAC;AAAA,IAC/E;AAOA,UAAM,wBAAwB,4BAA4B,SAAS,qBAAqB;AAExF,UAAM,oBAAgB,gCAAY,mBAAmB,qBAAqB;AAG1E,UAAM,CAAC,aAAa,UAAU,QAAI,oDAAuB,OAAO;AAIhE,UAAM,mCAAmC,WAAW;AAAA,MAClD,CAAC,mBAAmB,kBAAkB,kBAAkB,MAAM,aAAa;AAAA,MAC3E;AAAA,IACF;AAEA,UAAM,YAAY,iCAAiC,eAAe,GAAG,2BAA2B;AAEhG,QAAI,gBAAgB,MAAM;AACxB,gBAAU,cAAc;AAAA,IAC1B;AAEA,WAAO;AAAA,EACT;AAEA,SAAO,OAAO,OAAO,kBAAkB,gBAAgB;AACzD;",
6
+ "names": ["baseStyled"]
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 styledObject_exports = {};
30
+ __export(styledObject_exports, {
31
+ styledObject: () => styledObject
32
+ });
33
+ module.exports = __toCommonJS(styledObject_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_styledFunction = require("./styledFunction.js");
36
+ var import_system = require("./system.js");
37
+ const keyofJsxIntrinsicElements = Object.keys(import_system.styled);
38
+ const styledObject = keyofJsxIntrinsicElements.reduce((obj, key) => {
39
+ obj[key] = (0, import_styledFunction.styledFunction)(key);
40
+ return obj;
41
+ }, {});
42
+ //# sourceMappingURL=styledObject.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/styled/styledObject.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { styledFunction } from './styledFunction.js';\nimport { styled as baseStyled } from './system.js';\n\ntype PreStyledObject = {\n [TTag in keyof JSX.IntrinsicElements]: unknown;\n};\n\nexport type StyledObject = {\n [TTag in keyof JSX.IntrinsicElements]: ReturnType<typeof styledFunction<TTag>>;\n};\n\nconst keyofJsxIntrinsicElements = Object.keys(baseStyled) as (keyof JSX.IntrinsicElements)[];\n\nexport const styledObject = keyofJsxIntrinsicElements.reduce((obj, key) => {\n obj[key] = styledFunction(key);\n return obj;\n}, {} as PreStyledObject) as StyledObject;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAA+B;AAC/B,oBAAqC;AAUrC,MAAM,4BAA4B,OAAO,KAAK,cAAAA,MAAU;AAEjD,MAAM,eAAe,0BAA0B,OAAO,CAAC,KAAK,QAAQ;AACzE,MAAI,GAAG,QAAI,sCAAe,GAAG;AAC7B,SAAO;AACT,GAAG,CAAC,CAAoB;",
6
+ "names": ["baseStyled"]
7
+ }
@@ -0,0 +1,28 @@
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 __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var system_types_exports = {};
26
+ module.exports = __toCommonJS(system_types_exports);
27
+ var React = __toESM(require("react"));
28
+ //# sourceMappingURL=system-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/styled/system-types.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type {\n SpaceProps as XstyledSpace,\n MarginProps,\n MarginTopProps,\n MarginRightProps,\n MarginBottomProps,\n MarginLeftProps,\n MarginXProps,\n MarginYProps,\n PaddingProps,\n PaddingTopProps,\n PaddingRightProps,\n PaddingBottomProps,\n PaddingLeftProps,\n PaddingXProps,\n PaddingYProps,\n ColorProps as XstyledColor,\n TypographyProps,\n FlexboxesProps,\n} from '@xstyled/system';\nimport type { Theme } from './types.js';\n\nexport type { FlattenSimpleInterpolation, FlattenInterpolation } from 'styled-components';\n\nexport type {\n LayoutProps,\n SizingProps,\n FontSizeProps,\n PositionProps,\n BoxShadowProps,\n LineHeightProps,\n} from '@xstyled/system';\n\ninterface DummyColorTheme {\n 'neutral-100': true;\n 'neutral-200': true;\n 'neutral-300': true;\n 'neutral-400': true;\n 'neutral-500': true;\n 'neutral-600': true;\n 'neutral-700': true;\n 'neutral-800': true;\n 'neutral-000': true;\n 'neutral-050': true;\n 'neutral-080': true;\n 'brand-100': true;\n 'brand-200': true;\n 'brand-300': true;\n 'brand-400': true;\n 'brand-500': true;\n 'brand-600': true;\n 'brand-700': true;\n 'brand-800': true;\n 'success-300': true;\n 'success-900': true;\n 'warning-400': true;\n 'warning-600': true;\n 'warning-900': true;\n 'danger-200': true;\n 'danger-900': true;\n}\n\n// Redeclaring types as interfaces to prevent TS errors\n\ninterface MarginAndPaddings\n extends MarginProps,\n MarginTopProps,\n MarginRightProps,\n MarginBottomProps,\n MarginLeftProps,\n MarginXProps,\n MarginYProps,\n PaddingProps,\n PaddingTopProps,\n PaddingRightProps,\n PaddingBottomProps,\n PaddingLeftProps,\n PaddingXProps,\n PaddingYProps {}\n\ntype SpacePropsT = {\n [key in keyof XstyledSpace]?: XstyledSpace[key];\n} & {\n [key in keyof MarginAndPaddings]?: XstyledSpace[key] | keyof Theme['space'];\n};\n\ntype ColorPropsT = {\n [key in keyof XstyledColor]?: XstyledColor[key] | keyof DummyColorTheme;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SpaceProps extends SpacePropsT {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ColorProps extends ColorPropsT {}\n\nexport interface BorderProps {\n border?: string;\n borderTop?: string;\n borderBottom?: string;\n borderRight?: string;\n borderLeft?: string;\n borderColor?: keyof DummyColorTheme;\n borderTopColor?: keyof DummyColorTheme;\n borderBottomColor?: keyof DummyColorTheme;\n borderRightColor?: keyof DummyColorTheme;\n borderLeftColor?: keyof DummyColorTheme;\n borderStyle?: string;\n borderTopStyle?: string;\n borderBottomStyle?: string;\n borderRightStyle?: string;\n borderLeftStyle?: string;\n borderWidth?: keyof Theme['space'];\n borderTopWidth?: keyof Theme['space'];\n borderBottomWidth?: keyof Theme['space'];\n borderRightWidth?: keyof Theme['space'];\n borderLeftWidth?: keyof Theme['space'];\n borderRadius?: keyof Theme['space'];\n}\n\nexport interface BackgroundProps {\n backgroundColor?: keyof DummyColorTheme;\n bg?: keyof DummyColorTheme;\n}\n\nexport type { TypographyProps, FlexboxesProps };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,45 @@
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 background_exports = {};
30
+ __export(background_exports, {
31
+ background: () => background
32
+ });
33
+ module.exports = __toCommonJS(background_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_system = require("@xstyled/system");
36
+ var import_th = require("../../th.js");
37
+ const bgColorGetter = (value) => (props) => `${import_th.th.color(value, value)(props)}`;
38
+ bgColorGetter.meta = {};
39
+ const bg = (0, import_system.style)({
40
+ prop: ["backgroundColor", "bg"],
41
+ css: "background-color",
42
+ themeGet: bgColorGetter
43
+ });
44
+ const background = (0, import_system.compose)(bg);
45
+ //# sourceMappingURL=background.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/styled/system-utilities/background.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { style, compose, type ThemeGetter } from '@xstyled/system';\nimport { th } from '../../th.js';\nimport type { PropsWithTheme } from '../types.js';\nimport type { BackgroundProps } from '../system-types.js';\n\ninterface DSThemeGetter extends ThemeGetter {\n (value: string): (props: PropsWithTheme) => string;\n meta: Record<string, unknown>;\n}\n\nconst bgColorGetter: DSThemeGetter = (value: string) => (props) => `${th.color(value, value)(props as PropsWithTheme)}`;\n\nbgColorGetter.meta = {};\n\nconst bg = style({\n prop: ['backgroundColor', 'bg'],\n css: 'background-color',\n themeGet: bgColorGetter,\n});\n\nexport const background = compose<BackgroundProps>(bg);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAiD;AACjD,gBAAmB;AASnB,MAAM,gBAA+B,CAAC,UAAkB,CAAC,UAAU,GAAG,aAAG,MAAM,OAAO,KAAK,EAAE,KAAuB;AAEpH,cAAc,OAAO,CAAC;AAEtB,MAAM,SAAK,qBAAM;AAAA,EACf,MAAM,CAAC,mBAAmB,IAAI;AAAA,EAC9B,KAAK;AAAA,EACL,UAAU;AACZ,CAAC;AAEM,MAAM,iBAAa,uBAAyB,EAAE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,188 @@
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 border_exports = {};
30
+ __export(border_exports, {
31
+ borders: () => borders
32
+ });
33
+ module.exports = __toCommonJS(border_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_system = require("@xstyled/system");
36
+ var import_th = require("../../th.js");
37
+ const colorReg = /(?:neutral|brand|success|danger|warning)-[0-9]{3}(?:-a[0-9]{2})?/;
38
+ const borderGetter = (value) => (props) => {
39
+ const color = value?.match?.(colorReg);
40
+ let borderCss = ``;
41
+ if (color) {
42
+ const widthAndStyle = value.replace(color[0], "").trim();
43
+ borderCss = `${import_th.th.color(color[0])(props)} ${widthAndStyle}`;
44
+ } else {
45
+ borderCss = value;
46
+ }
47
+ return borderCss;
48
+ };
49
+ borderGetter.meta = {};
50
+ const borderColorGetter = (value) => (props) => `${import_th.th.color(value, value)(props)}`;
51
+ borderColorGetter.meta = {};
52
+ function borderStyleGetter(value) {
53
+ return () => value;
54
+ }
55
+ borderStyleGetter.meta = {};
56
+ const borderWidthGetter = (value) => (props) => `${import_th.th.space(value, value)(props)}`;
57
+ borderWidthGetter.meta = {};
58
+ const borderRadiusGetter = (value) => (props) => `${import_th.th.space(value, value)(props)}`;
59
+ borderRadiusGetter.meta = {};
60
+ const border = (0, import_system.style)({
61
+ prop: "border",
62
+ css: "border",
63
+ themeGet: borderGetter
64
+ });
65
+ const borderTop = (0, import_system.style)({
66
+ prop: "borderTop",
67
+ css: "border-top",
68
+ themeGet: borderGetter
69
+ });
70
+ const borderBottom = (0, import_system.style)({
71
+ prop: "borderBottom",
72
+ css: "border-bottom",
73
+ themeGet: borderGetter
74
+ });
75
+ const borderRight = (0, import_system.style)({
76
+ prop: "borderRight",
77
+ css: "border-right",
78
+ themeGet: borderGetter
79
+ });
80
+ const borderLeft = (0, import_system.style)({
81
+ prop: "borderLeft",
82
+ css: "border-left",
83
+ themeGet: borderGetter
84
+ });
85
+ const borderColor = (0, import_system.style)({
86
+ prop: "borderColor",
87
+ css: "border-color",
88
+ themeGet: borderColorGetter
89
+ });
90
+ const borderTopColor = (0, import_system.style)({
91
+ prop: "borderTopColor",
92
+ css: "border-top-color",
93
+ themeGet: borderColorGetter
94
+ });
95
+ const borderBottomColor = (0, import_system.style)({
96
+ prop: "borderBottomColor",
97
+ css: "border-bottom-color",
98
+ themeGet: borderColorGetter
99
+ });
100
+ const borderRightColor = (0, import_system.style)({
101
+ prop: "borderRightColor",
102
+ css: "border-right-color",
103
+ themeGet: borderColorGetter
104
+ });
105
+ const borderLeftColor = (0, import_system.style)({
106
+ prop: "borderLeftColor",
107
+ css: "border-left-color",
108
+ themeGet: borderColorGetter
109
+ });
110
+ const borderStyle = (0, import_system.style)({
111
+ prop: "borderStyle",
112
+ css: "border-style",
113
+ themeGet: borderStyleGetter
114
+ });
115
+ const borderTopStyle = (0, import_system.style)({
116
+ prop: "borderTopStyle",
117
+ css: "border-top-style",
118
+ themeGet: borderStyleGetter
119
+ });
120
+ const borderBottomStyle = (0, import_system.style)({
121
+ prop: "borderBottomStyle",
122
+ css: "border-bottom-style",
123
+ themeGet: borderStyleGetter
124
+ });
125
+ const borderRightStyle = (0, import_system.style)({
126
+ prop: "borderRightStyle",
127
+ css: "border-right-style",
128
+ themeGet: borderStyleGetter
129
+ });
130
+ const borderLeftStyle = (0, import_system.style)({
131
+ prop: "borderLeftStyle",
132
+ css: "border-left-style",
133
+ themeGet: borderStyleGetter
134
+ });
135
+ const borderWidth = (0, import_system.style)({
136
+ prop: "borderWidth",
137
+ css: "border-width",
138
+ themeGet: borderWidthGetter
139
+ });
140
+ const borderTopWidth = (0, import_system.style)({
141
+ prop: "borderTopWidth",
142
+ css: "border-top-width",
143
+ themeGet: borderWidthGetter
144
+ });
145
+ const borderBottomWidth = (0, import_system.style)({
146
+ prop: "borderBottomWidth",
147
+ css: "border-bottom-width",
148
+ themeGet: borderWidthGetter
149
+ });
150
+ const borderRightWidth = (0, import_system.style)({
151
+ prop: "borderRightWidth",
152
+ css: "border-right-width",
153
+ themeGet: borderWidthGetter
154
+ });
155
+ const borderLeftWidth = (0, import_system.style)({
156
+ prop: "borderLeftWidth",
157
+ css: "border-left-width",
158
+ themeGet: borderWidthGetter
159
+ });
160
+ const borderRadius = (0, import_system.style)({
161
+ prop: "borderRadius",
162
+ css: "border-radius",
163
+ themeGet: borderRadiusGetter
164
+ });
165
+ const borders = (0, import_system.compose)(
166
+ border,
167
+ borderTop,
168
+ borderBottom,
169
+ borderLeft,
170
+ borderRight,
171
+ borderColor,
172
+ borderTopColor,
173
+ borderBottomColor,
174
+ borderLeftColor,
175
+ borderRightColor,
176
+ borderStyle,
177
+ borderTopStyle,
178
+ borderBottomStyle,
179
+ borderLeftStyle,
180
+ borderRightStyle,
181
+ borderWidth,
182
+ borderTopWidth,
183
+ borderBottomWidth,
184
+ borderLeftWidth,
185
+ borderRightWidth,
186
+ borderRadius
187
+ );
188
+ //# sourceMappingURL=border.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/styled/system-utilities/border.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable prettier/prettier */\n/* eslint-disable max-lines */\nimport { style, compose, type ThemeGetter } from '@xstyled/system';\nimport { th } from '../../th.js';\nimport type { PropsWithTheme } from '../types.js';\ninterface DSThemeGetter extends ThemeGetter {\n (value: string): (props: PropsWithTheme) => string;\n}\nconst colorReg = /(?:neutral|brand|success|danger|warning)-[0-9]{3}(?:-a[0-9]{2})?/;\n\nconst borderGetter: DSThemeGetter =\n (value: string) =>\n (props): string => {\n const color = value?.match?.(colorReg);\n let borderCss = ``;\n\n if (color) {\n const widthAndStyle = value.replace(color[0], '').trim();\n borderCss = `${th.color(color[0])(props as PropsWithTheme)} ${widthAndStyle}`;\n } else {\n borderCss = value;\n }\n\n return borderCss;\n };\n\nborderGetter.meta = {};\n\nconst borderColorGetter: DSThemeGetter =\n (value: string) =>\n (props): string =>\n `${th.color(value, value)(props as PropsWithTheme)}`;\n\nborderColorGetter.meta = {};\n\nfunction borderStyleGetter(value: string) {\n return (): string => value;\n}\n\nborderStyleGetter.meta = {};\n\nconst borderWidthGetter: DSThemeGetter =\n (value: string) =>\n (props): string =>\n `${th.space(value, value)(props as PropsWithTheme)}`;\n\nborderWidthGetter.meta = {};\n\nconst borderRadiusGetter: DSThemeGetter =\n (value: string) =>\n (props): string =>\n `${th.space(value, value)(props as PropsWithTheme)}`;\n\nborderRadiusGetter.meta = {};\n\nconst border = style({\n prop: 'border',\n css: 'border',\n themeGet: borderGetter,\n});\n\nconst borderTop = style({\n prop: 'borderTop',\n css: 'border-top',\n themeGet: borderGetter,\n});\n\nconst borderBottom = style({\n prop: 'borderBottom',\n css: 'border-bottom',\n themeGet: borderGetter,\n});\n\nconst borderRight = style({\n prop: 'borderRight',\n css: 'border-right',\n themeGet: borderGetter,\n});\n\nconst borderLeft = style({\n prop: 'borderLeft',\n css: 'border-left',\n themeGet: borderGetter,\n});\n\nconst borderColor = style({\n prop: 'borderColor',\n css: 'border-color',\n themeGet: borderColorGetter,\n});\n\nconst borderTopColor = style({\n prop: 'borderTopColor',\n css: 'border-top-color',\n themeGet: borderColorGetter,\n});\n\nconst borderBottomColor = style({\n prop: 'borderBottomColor',\n css: 'border-bottom-color',\n themeGet: borderColorGetter,\n});\n\nconst borderRightColor = style({\n prop: 'borderRightColor',\n css: 'border-right-color',\n themeGet: borderColorGetter,\n});\n\nconst borderLeftColor = style({\n prop: 'borderLeftColor',\n css: 'border-left-color',\n themeGet: borderColorGetter,\n});\n\nconst borderStyle = style({\n prop: 'borderStyle',\n css: 'border-style',\n themeGet: borderStyleGetter,\n});\n\nconst borderTopStyle = style({\n prop: 'borderTopStyle',\n css: 'border-top-style',\n themeGet: borderStyleGetter,\n});\n\nconst borderBottomStyle = style({\n prop: 'borderBottomStyle',\n css: 'border-bottom-style',\n themeGet: borderStyleGetter,\n});\n\nconst borderRightStyle = style({\n prop: 'borderRightStyle',\n css: 'border-right-style',\n themeGet: borderStyleGetter,\n});\n\nconst borderLeftStyle = style({\n prop: 'borderLeftStyle',\n css: 'border-left-style',\n themeGet: borderStyleGetter,\n});\n\nconst borderWidth = style({\n prop: 'borderWidth',\n css: 'border-width',\n themeGet: borderWidthGetter,\n});\n\nconst borderTopWidth = style({\n prop: 'borderTopWidth',\n css: 'border-top-width',\n themeGet: borderWidthGetter,\n});\n\nconst borderBottomWidth = style({\n prop: 'borderBottomWidth',\n css: 'border-bottom-width',\n themeGet: borderWidthGetter,\n});\n\nconst borderRightWidth = style({\n prop: 'borderRightWidth',\n css: 'border-right-width',\n themeGet: borderWidthGetter,\n});\n\nconst borderLeftWidth = style({\n prop: 'borderLeftWidth',\n css: 'border-left-width',\n themeGet: borderWidthGetter,\n});\n\nconst borderRadius = style({\n prop: 'borderRadius',\n css: 'border-radius',\n themeGet: borderRadiusGetter,\n});\n\nexport const borders = compose(\n border,\n borderTop,\n borderBottom,\n borderLeft,\n borderRight,\n borderColor,\n borderTopColor,\n borderBottomColor,\n borderLeftColor,\n borderRightColor,\n borderStyle,\n borderTopStyle,\n borderBottomStyle,\n borderLeftStyle,\n borderRightStyle,\n borderWidth,\n borderTopWidth,\n borderBottomWidth,\n borderLeftWidth,\n borderRightWidth,\n borderRadius,\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -0,0 +1,47 @@
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 color_exports = {};
30
+ __export(color_exports, {
31
+ color: () => color
32
+ });
33
+ module.exports = __toCommonJS(color_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_system = require("@xstyled/system");
36
+ var import_th = require("../../th.js");
37
+ function colorGetter(value) {
38
+ return (props) => `${import_th.th.color(value, value)(props)}`;
39
+ }
40
+ colorGetter.meta = {};
41
+ const colorStyled = (0, import_system.style)({
42
+ prop: ["color"],
43
+ css: ["color"],
44
+ themeGet: colorGetter
45
+ });
46
+ const color = (0, import_system.compose)(colorStyled);
47
+ //# sourceMappingURL=color.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/styled/system-utilities/color.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { Theme, Props } from '@xstyled/system';\nimport { style, compose } from '@xstyled/system';\nimport { th } from '../../th.js';\nimport type { PropsWithTheme } from '../types.js';\nimport type { ColorProps } from '../system-types.js';\n\nfunction colorGetter(value: string) {\n return (props: PropsWithTheme | Props<Theme>): string => `${th.color(value, value)(props as PropsWithTheme)}`;\n}\n\ncolorGetter.meta = {};\n\nconst colorStyled = style<ColorProps>({\n prop: ['color'],\n css: ['color'],\n themeGet: colorGetter,\n});\n\nexport const color = compose(colorStyled);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,oBAA+B;AAC/B,gBAAmB;AAInB,SAAS,YAAY,OAAe;AAClC,SAAO,CAAC,UAAiD,GAAG,aAAG,MAAM,OAAO,KAAK,EAAE,KAAuB;AAC5G;AAEA,YAAY,OAAO,CAAC;AAEpB,MAAM,kBAAc,qBAAkB;AAAA,EACpC,MAAM,CAAC,OAAO;AAAA,EACd,KAAK,CAAC,OAAO;AAAA,EACb,UAAU;AACZ,CAAC;AAEM,MAAM,YAAQ,uBAAQ,WAAW;",
6
+ "names": []
7
+ }