@dynatrace/strato-components 0.84.42 → 0.84.51

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 (224) hide show
  1. package/content/index.d.ts +7 -0
  2. package/content/index.js +25 -0
  3. package/content/progress/ProgressBar.css +52 -0
  4. package/content/progress/ProgressBar.d.ts +56 -0
  5. package/content/progress/ProgressBar.js +191 -0
  6. package/content/progress/ProgressBar.sty.d.ts +42 -0
  7. package/content/progress/ProgressBar.sty.js +28 -0
  8. package/content/progress/ProgressBarIcon.css +5 -0
  9. package/content/progress/ProgressBarIcon.d.ts +15 -0
  10. package/content/progress/ProgressBarIcon.js +68 -0
  11. package/content/progress/ProgressBarIcon.sty.d.ts +1 -0
  12. package/content/progress/ProgressBarIcon.sty.js +25 -0
  13. package/content/progress/ProgressBarLabel.css +9 -0
  14. package/content/progress/ProgressBarLabel.d.ts +15 -0
  15. package/content/progress/ProgressBarLabel.js +75 -0
  16. package/content/progress/ProgressBarLabel.sty.d.ts +13 -0
  17. package/content/progress/ProgressBarLabel.sty.js +26 -0
  18. package/content/progress/ProgressBarValue.css +28 -0
  19. package/content/progress/ProgressBarValue.d.ts +15 -0
  20. package/content/progress/ProgressBarValue.js +72 -0
  21. package/content/progress/ProgressBarValue.sty.d.ts +34 -0
  22. package/content/progress/ProgressBarValue.sty.js +26 -0
  23. package/content/progress/ProgressCircle.css +52 -0
  24. package/content/progress/ProgressCircle.d.ts +51 -0
  25. package/content/progress/ProgressCircle.js +174 -0
  26. package/content/progress/ProgressCircle.sty.d.ts +41 -0
  27. package/content/progress/ProgressCircle.sty.js +37 -0
  28. package/content/progress/contexts/SharedProgressBarPropsContext.d.ts +9 -0
  29. package/content/progress/contexts/SharedProgressBarPropsContext.js +38 -0
  30. package/content/progress/hooks/useProgressAriaProps.d.ts +38 -0
  31. package/content/progress/hooks/useProgressAriaProps.js +63 -0
  32. package/content/progress/hooks/useProgressBarPropsContext.d.ts +2 -0
  33. package/content/progress/hooks/useProgressBarPropsContext.js +32 -0
  34. package/content/progress/utils.d.ts +2 -0
  35. package/content/progress/utils.js +50 -0
  36. package/core/components/app-root/AppRoot.d.ts +2 -2
  37. package/core/hooks/useAriaLabelingProps.d.ts +6 -0
  38. package/core/hooks/useAriaLabelingProps.js +30 -0
  39. package/core/hooks/useCurrentTheme.d.ts +1 -1
  40. package/core/hooks/useId.d.ts +12 -0
  41. package/core/hooks/useId.js +32 -0
  42. package/core/hooks/useSafeForwardProps.d.ts +10 -0
  43. package/core/hooks/useSafeForwardProps.js +34 -0
  44. package/core/index.d.ts +11 -3
  45. package/core/index.js +12 -0
  46. package/core/types/a11y-props.d.ts +8 -1
  47. package/core/types/data-props.d.ts +1 -1
  48. package/core/types/dom.d.ts +2 -13
  49. package/core/types/masking-props.d.ts +2 -1
  50. package/core/types/polymorph.d.ts +10 -7
  51. package/core/types/role-variant.d.ts +10 -0
  52. package/core/types/{focusable-element.js → role-variant.js} +17 -2
  53. package/core/types/styling-props.d.ts +1 -1
  54. package/core/types/with-children.d.ts +1 -1
  55. package/core/utils/_is-string-children.d.ts +6 -0
  56. package/core/utils/_is-string-children.js +44 -0
  57. package/core/utils/isBrowser.d.ts +1 -1
  58. package/core/utils/merge-props.d.ts +4 -5
  59. package/core/utils/seed-random.d.ts +5 -0
  60. package/core/utils/seed-random.js +34 -0
  61. package/core/utils/uuidv4.d.ts +5 -0
  62. package/core/utils/uuidv4.js +31 -0
  63. package/esm/content/index.js +7 -0
  64. package/esm/content/index.js.map +7 -0
  65. package/esm/content/progress/ProgressBar.css +52 -0
  66. package/esm/content/progress/ProgressBar.js +163 -0
  67. package/esm/content/progress/ProgressBar.js.map +7 -0
  68. package/esm/content/progress/ProgressBar.sty.js +10 -0
  69. package/esm/content/progress/ProgressBar.sty.js.map +7 -0
  70. package/esm/content/progress/ProgressBarIcon.css +5 -0
  71. package/esm/content/progress/ProgressBarIcon.js +40 -0
  72. package/esm/content/progress/ProgressBarIcon.js.map +7 -0
  73. package/esm/content/progress/ProgressBarIcon.sty.js +7 -0
  74. package/esm/content/progress/ProgressBarIcon.sty.js.map +7 -0
  75. package/esm/content/progress/ProgressBarLabel.css +9 -0
  76. package/esm/content/progress/ProgressBarLabel.js +47 -0
  77. package/esm/content/progress/ProgressBarLabel.js.map +7 -0
  78. package/esm/content/progress/ProgressBarLabel.sty.js +8 -0
  79. package/esm/content/progress/ProgressBarLabel.sty.js.map +7 -0
  80. package/esm/content/progress/ProgressBarValue.css +28 -0
  81. package/esm/content/progress/ProgressBarValue.js +44 -0
  82. package/esm/content/progress/ProgressBarValue.js.map +7 -0
  83. package/esm/content/progress/ProgressBarValue.sty.js +8 -0
  84. package/esm/content/progress/ProgressBarValue.sty.js.map +7 -0
  85. package/esm/content/progress/ProgressCircle.css +52 -0
  86. package/esm/content/progress/ProgressCircle.js +153 -0
  87. package/esm/content/progress/ProgressCircle.js.map +7 -0
  88. package/esm/content/progress/ProgressCircle.sty.js +19 -0
  89. package/esm/content/progress/ProgressCircle.sty.js.map +7 -0
  90. package/esm/content/progress/contexts/SharedProgressBarPropsContext.js +10 -0
  91. package/esm/content/progress/contexts/SharedProgressBarPropsContext.js.map +7 -0
  92. package/esm/content/progress/hooks/useProgressAriaProps.js +45 -0
  93. package/esm/content/progress/hooks/useProgressAriaProps.js.map +7 -0
  94. package/esm/content/progress/hooks/useProgressBarPropsContext.js +16 -0
  95. package/esm/content/progress/hooks/useProgressBarPropsContext.js.map +7 -0
  96. package/esm/content/progress/utils.js +22 -0
  97. package/esm/content/progress/utils.js.map +7 -0
  98. package/esm/core/components/app-root/AppRoot.js.map +1 -1
  99. package/esm/core/hooks/useAriaLabelingProps.js +12 -0
  100. package/esm/core/hooks/useAriaLabelingProps.js.map +7 -0
  101. package/esm/core/hooks/useCurrentTheme.js.map +1 -1
  102. package/esm/core/hooks/useId.js +14 -0
  103. package/esm/core/hooks/useId.js.map +7 -0
  104. package/esm/core/hooks/useSafeForwardProps.js +16 -0
  105. package/esm/core/hooks/useSafeForwardProps.js.map +7 -0
  106. package/esm/core/index.js +12 -0
  107. package/esm/core/index.js.map +2 -2
  108. package/esm/core/types/role-variant.js +12 -0
  109. package/esm/core/types/role-variant.js.map +7 -0
  110. package/esm/core/utils/_is-string-children.js +16 -0
  111. package/esm/core/utils/_is-string-children.js.map +7 -0
  112. package/esm/core/utils/isBrowser.js.map +1 -1
  113. package/esm/core/utils/merge-props.js.map +2 -2
  114. package/esm/core/utils/seed-random.js +16 -0
  115. package/esm/core/utils/seed-random.js.map +7 -0
  116. package/esm/core/utils/uuidv4.js +13 -0
  117. package/esm/core/utils/uuidv4.js.map +7 -0
  118. package/esm/index.js +2 -0
  119. package/esm/index.js.map +2 -2
  120. package/esm/layouts/container/Container.css +8 -0
  121. package/esm/layouts/container/Container.js +55 -0
  122. package/esm/layouts/container/Container.js.map +7 -0
  123. package/esm/layouts/container/Container.sty.js +7 -0
  124. package/esm/layouts/container/Container.sty.js.map +7 -0
  125. package/esm/layouts/flex/Flex.js +46 -0
  126. package/esm/layouts/flex/Flex.js.map +7 -0
  127. package/esm/layouts/grid/Grid.js +46 -0
  128. package/esm/layouts/grid/Grid.js.map +7 -0
  129. package/esm/layouts/index.js +7 -1
  130. package/esm/layouts/index.js.map +2 -2
  131. package/esm/styles/colorUtils.css +80 -0
  132. package/esm/styles/colorUtils.sty.js +9 -0
  133. package/esm/styles/colorUtils.sty.js.map +7 -0
  134. package/esm/styles/container.css +64 -0
  135. package/esm/styles/container.sty.js +9 -0
  136. package/esm/styles/container.sty.js.map +7 -0
  137. package/esm/styles/ellipsis.css +5 -0
  138. package/esm/styles/ellipsis.sty.js +6 -0
  139. package/esm/styles/ellipsis.sty.js.map +7 -0
  140. package/esm/styles/extract-util.js +15 -0
  141. package/esm/styles/extract-util.js.map +7 -0
  142. package/esm/styles/getFlexStyles.js +69 -0
  143. package/esm/styles/getFlexStyles.js.map +7 -0
  144. package/esm/styles/getGapSprinkles.js +18 -0
  145. package/esm/styles/getGapSprinkles.js.map +7 -0
  146. package/esm/styles/getGridFlexPositionSprinkles.js +25 -0
  147. package/esm/styles/getGridFlexPositionSprinkles.js.map +7 -0
  148. package/esm/styles/getGridStyles.js +78 -0
  149. package/esm/styles/getGridStyles.js.map +7 -0
  150. package/esm/styles/getLayoutSizeStyles.js +21 -0
  151. package/esm/styles/getLayoutSizeStyles.js.map +7 -0
  152. package/esm/styles/getSpacingSprinkles.js +50 -0
  153. package/esm/styles/getSpacingSprinkles.js.map +7 -0
  154. package/esm/styles/index.js +49 -0
  155. package/esm/styles/index.js.map +7 -0
  156. package/esm/styles/safe-sprinkles.js +17 -0
  157. package/esm/styles/safe-sprinkles.js.map +7 -0
  158. package/esm/styles/sprinkle-properties.js +137 -0
  159. package/esm/styles/sprinkle-properties.js.map +7 -0
  160. package/esm/styles/sprinkles.css +786 -0
  161. package/esm/styles/sprinkles.sty.js +9 -0
  162. package/esm/styles/sprinkles.sty.js.map +7 -0
  163. package/esm/typography/Link/Link.js.map +2 -2
  164. package/esm/typography/List/List.js.map +1 -1
  165. package/esm/typography/Text/Text.js.map +1 -1
  166. package/esm/typography/TextEllipsis/TextEllipsis.js.map +1 -1
  167. package/index.d.ts +2 -0
  168. package/index.js +2 -0
  169. package/lang/en.json +6 -0
  170. package/lang/uncompiled/en.json +4 -0
  171. package/layouts/container/Container.css +8 -0
  172. package/layouts/container/Container.d.ts +34 -0
  173. package/layouts/container/Container.js +80 -0
  174. package/layouts/container/Container.sty.d.ts +1 -0
  175. package/layouts/container/Container.sty.js +25 -0
  176. package/layouts/flex/Flex.d.ts +23 -0
  177. package/layouts/flex/Flex.js +72 -0
  178. package/layouts/grid/Grid.d.ts +23 -0
  179. package/layouts/grid/Grid.js +72 -0
  180. package/layouts/index.d.ts +4 -0
  181. package/layouts/index.js +7 -1
  182. package/package.json +25 -10
  183. package/styles/colorUtils.css +80 -0
  184. package/styles/colorUtils.sty.d.ts +56 -0
  185. package/styles/colorUtils.sty.js +27 -0
  186. package/styles/container.css +64 -0
  187. package/styles/container.sty.d.ts +54 -0
  188. package/styles/container.sty.js +27 -0
  189. package/styles/ellipsis.css +5 -0
  190. package/styles/ellipsis.sty.d.ts +5 -0
  191. package/styles/ellipsis.sty.js +24 -0
  192. package/styles/extract-util.d.ts +9 -0
  193. package/styles/extract-util.js +33 -0
  194. package/styles/getFlexStyles.d.ts +64 -0
  195. package/styles/getFlexStyles.js +95 -0
  196. package/styles/getGapSprinkles.d.ts +19 -0
  197. package/styles/getGapSprinkles.js +36 -0
  198. package/styles/getGridFlexPositionSprinkles.d.ts +35 -0
  199. package/styles/getGridFlexPositionSprinkles.js +43 -0
  200. package/styles/getGridStyles.d.ts +74 -0
  201. package/styles/getGridStyles.js +100 -0
  202. package/styles/getLayoutSizeStyles.d.ts +29 -0
  203. package/styles/getLayoutSizeStyles.js +39 -0
  204. package/styles/getSpacingSprinkles.d.ts +74 -0
  205. package/styles/getSpacingSprinkles.js +68 -0
  206. package/styles/index.d.ts +11 -0
  207. package/styles/index.js +47 -0
  208. package/styles/safe-sprinkles.d.ts +6 -0
  209. package/styles/safe-sprinkles.js +35 -0
  210. package/styles/sprinkle-properties.d.ts +257 -0
  211. package/styles/sprinkle-properties.js +165 -0
  212. package/styles/sprinkles.css +786 -0
  213. package/styles/sprinkles.sty.d.ts +913 -0
  214. package/styles/sprinkles.sty.js +27 -0
  215. package/styles/textStyle.sty.d.ts +1 -0
  216. package/testing/mocks/canvas-mock.js +6 -1
  217. package/typography/Link/Link.d.ts +1 -2
  218. package/typography/List/List.d.ts +4 -4
  219. package/typography/Text/Text.d.ts +3 -3
  220. package/typography/TextEllipsis/TextEllipsis.d.ts +3 -3
  221. package/typography/TextEllipsis/TextEllipsis.js +2 -2
  222. package/core/types/focusable-element.d.ts +0 -5
  223. package/esm/core/types/focusable-element.js +0 -1
  224. package/esm/core/types/focusable-element.js.map +0 -7
@@ -0,0 +1,95 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var getFlexStyles_exports = {};
29
+ __export(getFlexStyles_exports, {
30
+ getFlexStyles: () => getFlexStyles
31
+ });
32
+ module.exports = __toCommonJS(getFlexStyles_exports);
33
+ var import_clsx = __toESM(require("clsx"));
34
+ var import_extract_util = require("./extract-util.js");
35
+ var import_getGapSprinkles = require("./getGapSprinkles.js");
36
+ var import_getGridFlexPositionSprinkles = require("./getGridFlexPositionSprinkles.js");
37
+ var import_getLayoutSizeStyles = require("./getLayoutSizeStyles.js");
38
+ var import_getSpacingSprinkles = require("./getSpacingSprinkles.js");
39
+ var import_safe_sprinkles = require("./safe-sprinkles.js");
40
+ const flexItemPropKeys = ["flexItem"];
41
+ const flexStylePropKeys = [
42
+ /* Flex item props */
43
+ "order",
44
+ "flexGrow",
45
+ "flexShrink",
46
+ "flexBasis",
47
+ "flex",
48
+ /* Grid container props */
49
+ "flexDirection",
50
+ "flexWrap",
51
+ "flexFlow",
52
+ /* Grid item props */
53
+ "gridColumnStart",
54
+ "gridColumnEnd",
55
+ "gridRowStart",
56
+ "gridRowEnd",
57
+ "gridColumn",
58
+ "gridRow",
59
+ "gridArea"
60
+ ];
61
+ function extractFlexItem(props) {
62
+ const { extracted, rest } = (0, import_extract_util.extract)(props, flexItemPropKeys);
63
+ return { extracted, rest };
64
+ }
65
+ function getFlexStyles(props, defaults = {}) {
66
+ const { extracted: additionalFlexStyles, rest } = (0, import_extract_util.extract)(
67
+ props,
68
+ flexStylePropKeys
69
+ );
70
+ const [sizeStyles, afterSizeExtraction] = (0, import_getLayoutSizeStyles.getLayoutSizeStyles)(rest, defaults);
71
+ const [gridFlexClassNames, gridFlexRemainingProps] = (0, import_getGridFlexPositionSprinkles.getGridFlexPositionSprinkles)(afterSizeExtraction, defaults);
72
+ const [spacingClassNames, spacingRemainingProps] = (0, import_getSpacingSprinkles.getSpacingSprinkles)(
73
+ gridFlexRemainingProps,
74
+ defaults
75
+ );
76
+ const [gapClassNames, gapRemainingProps] = (0, import_getGapSprinkles.getGapSprinkles)(
77
+ spacingRemainingProps,
78
+ defaults
79
+ );
80
+ const { extracted: flexItemProps, rest: remainingProps } = extractFlexItem(gapRemainingProps);
81
+ const flexItemClassName = flexItemProps.flexItem ? void 0 : (0, import_safe_sprinkles.globalSprinkles)({ display: "flex" });
82
+ return [
83
+ (0, import_clsx.default)(
84
+ gridFlexClassNames,
85
+ spacingClassNames,
86
+ gapClassNames,
87
+ flexItemClassName
88
+ ),
89
+ {
90
+ ...sizeStyles,
91
+ ...additionalFlexStyles
92
+ },
93
+ remainingProps
94
+ ];
95
+ }
@@ -0,0 +1,19 @@
1
+ import { type SpacingProperties } from './sprinkle-properties.js';
2
+ /**
3
+ * Defines the box gap props.
4
+ * @public
5
+ */
6
+ export interface GapProps {
7
+ /** Defines gap */
8
+ gap?: SpacingProperties;
9
+ /** Defines row gap */
10
+ rowGap?: SpacingProperties;
11
+ /** Defines column gap */
12
+ columnGap?: SpacingProperties;
13
+ }
14
+ /**
15
+ * Given a set of props will return the relevant class names for the gap sprinkles
16
+ * and the remaining props.
17
+ * @internal
18
+ */
19
+ export declare function getGapSprinkles<T extends GapProps>(props: T, defaults?: Partial<GapProps>): [className: string, remainingProps: Omit<T, keyof GapProps>];
@@ -0,0 +1,36 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var getGapSprinkles_exports = {};
19
+ __export(getGapSprinkles_exports, {
20
+ getGapSprinkles: () => getGapSprinkles
21
+ });
22
+ module.exports = __toCommonJS(getGapSprinkles_exports);
23
+ var import_extract_util = require("./extract-util.js");
24
+ var import_safe_sprinkles = require("./safe-sprinkles.js");
25
+ const gapPropKeys = ["gap", "rowGap", "columnGap"];
26
+ function getGapSprinkles(props, defaults = {}) {
27
+ const { extracted, rest } = (0, import_extract_util.extract)(props, gapPropKeys);
28
+ const { extracted: extractedDefaults } = (0, import_extract_util.extract)(defaults, gapPropKeys);
29
+ return [
30
+ (0, import_safe_sprinkles.globalSprinkles)({
31
+ ...extractedDefaults,
32
+ ...extracted
33
+ }),
34
+ rest
35
+ ];
36
+ }
@@ -0,0 +1,35 @@
1
+ import { AlignContentPositionProps, AlignItemsPositionProps, AlignSelfPositionProps, JustifyContentPositionProps, JustifyItemsPositionProps, JustifySelfPositionProps, PlaceContentPositionProps, PlaceItemsPositionProps, PlaceSelfPositionProps } from './sprinkle-properties.js';
2
+ /**
3
+ * Defines the grid flex positions props.
4
+ * @public
5
+ */
6
+ export interface GridFlexPositionProps {
7
+ /** justify self positions */
8
+ justifySelf?: JustifySelfPositionProps;
9
+ /** align self positions */
10
+ alignSelf?: AlignSelfPositionProps;
11
+ /** place self positions */
12
+ placeSelf?: PlaceSelfPositionProps;
13
+ /** justify items positions */
14
+ justifyItems?: JustifyItemsPositionProps;
15
+ /** align items positions */
16
+ alignItems?: AlignItemsPositionProps;
17
+ /** place items positions */
18
+ placeItems?: PlaceItemsPositionProps;
19
+ /** justify content positions */
20
+ justifyContent?: JustifyContentPositionProps;
21
+ /** align content positions */
22
+ alignContent?: AlignContentPositionProps;
23
+ /** place content positions */
24
+ placeContent?: PlaceContentPositionProps;
25
+ }
26
+ /**
27
+ * Given a set of props, this function will extract the sprinkles props for
28
+ * Grid/Flex Position spinkles and return the appropriate
29
+ * classnames as well as the remaining props.
30
+ * @internal
31
+ * */
32
+ export declare function getGridFlexPositionSprinkles<T extends GridFlexPositionProps>(props: T, defaults?: Partial<GridFlexPositionProps>): [
33
+ sprinklesClassNames: string,
34
+ remainingProps: Omit<T, keyof GridFlexPositionProps>
35
+ ];
@@ -0,0 +1,43 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var getGridFlexPositionSprinkles_exports = {};
19
+ __export(getGridFlexPositionSprinkles_exports, {
20
+ getGridFlexPositionSprinkles: () => getGridFlexPositionSprinkles
21
+ });
22
+ module.exports = __toCommonJS(getGridFlexPositionSprinkles_exports);
23
+ var import_extract_util = require("./extract-util.js");
24
+ var import_safe_sprinkles = require("./safe-sprinkles.js");
25
+ const gridFlexPositionPropKeys = [
26
+ "justifySelf",
27
+ "alignSelf",
28
+ "placeSelf",
29
+ "justifyItems",
30
+ "alignItems",
31
+ "placeItems",
32
+ "justifyContent",
33
+ "alignContent",
34
+ "placeContent"
35
+ ];
36
+ function getGridFlexPositionSprinkles(props, defaults = {}) {
37
+ const { extracted, rest } = (0, import_extract_util.extract)(props, gridFlexPositionPropKeys);
38
+ const { extracted: extractedDefaults } = (0, import_extract_util.extract)(
39
+ defaults,
40
+ gridFlexPositionPropKeys
41
+ );
42
+ return [(0, import_safe_sprinkles.globalSprinkles)({ ...extractedDefaults, ...extracted }), rest];
43
+ }
@@ -0,0 +1,74 @@
1
+ import React from 'react';
2
+ import { type GapProps } from './getGapSprinkles.js';
3
+ import { type GridFlexPositionProps } from './getGridFlexPositionSprinkles.js';
4
+ import { type LayoutSizeProps } from './getLayoutSizeStyles.js';
5
+ import { type SpacingProps } from './getSpacingSprinkles.js';
6
+ /**
7
+ * Defines the grid item props.
8
+ * @public
9
+ */
10
+ export interface GridItemStyleProps {
11
+ /**
12
+ * Determines whether this is a grid item.
13
+ * If true, display: 'grid' style will not be added.
14
+ */
15
+ gridItem?: boolean;
16
+ }
17
+ /**
18
+ * Defines the grid style props.
19
+ * @public
20
+ */
21
+ export interface GridStyleProps extends GridFlexPositionProps, GapProps, LayoutSizeProps, SpacingProps, GridItemStyleProps {
22
+ /** Defines order */
23
+ order?: React.CSSProperties['order'];
24
+ /** Defines flex grow */
25
+ flexGrow?: React.CSSProperties['flexGrow'];
26
+ /** Defines flex shrink */
27
+ flexShrink?: React.CSSProperties['flexShrink'];
28
+ /** Defines flex basis */
29
+ flexBasis?: React.CSSProperties['flexBasis'];
30
+ /** Defines flex */
31
+ flex?: React.CSSProperties['flex'];
32
+ /** Defines grid template columns */
33
+ gridTemplateColumns?: React.CSSProperties['gridTemplateColumns'];
34
+ /** Defines grid template rows */
35
+ gridTemplateRows?: React.CSSProperties['gridTemplateRows'];
36
+ /** Defines grid template areas */
37
+ gridTemplateAreas?: React.CSSProperties['gridTemplateAreas'];
38
+ /** Defines grid template */
39
+ gridTemplate?: React.CSSProperties['gridTemplate'];
40
+ /** Defines grid auto columns */
41
+ gridAutoColumns?: React.CSSProperties['gridAutoColumns'];
42
+ /** Defines grid auto rows */
43
+ gridAutoRows?: React.CSSProperties['gridAutoRows'];
44
+ /** Defines grid auto flow */
45
+ gridAutoFlow?: React.CSSProperties['gridAutoFlow'];
46
+ /** Defines grid */
47
+ grid?: React.CSSProperties['grid'];
48
+ /** Defines grid column start */
49
+ gridColumnStart?: React.CSSProperties['gridColumnStart'];
50
+ /** Defines grid column end */
51
+ gridColumnEnd?: React.CSSProperties['gridColumnEnd'];
52
+ /** Defines grid row start */
53
+ gridRowStart?: React.CSSProperties['gridRowStart'];
54
+ /** Defines grid row end */
55
+ gridRowEnd?: React.CSSProperties['gridRowEnd'];
56
+ /** Defines grid column */
57
+ gridColumn?: React.CSSProperties['gridColumn'];
58
+ /** Defines grid row */
59
+ gridRow?: React.CSSProperties['gridRow'];
60
+ /** Defines grid area */
61
+ gridArea?: React.CSSProperties['gridArea'];
62
+ }
63
+ /**
64
+ * Helper function that will extract all styling relevant props for the Grid styling
65
+ * and will return them as classnames and style attributes.
66
+ * The remaining props returned are the ones that no longer contain any Grid styling
67
+ * related entries.
68
+ * @internal
69
+ */
70
+ export declare function getGridStyles<T extends GridStyleProps>(props: T, defaults?: Partial<GridStyleProps>): [
71
+ className: string,
72
+ style: React.CSSProperties,
73
+ remainingProps: Omit<T, keyof GridStyleProps>
74
+ ];
@@ -0,0 +1,100 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var getGridStyles_exports = {};
29
+ __export(getGridStyles_exports, {
30
+ getGridStyles: () => getGridStyles
31
+ });
32
+ module.exports = __toCommonJS(getGridStyles_exports);
33
+ var import_clsx = __toESM(require("clsx"));
34
+ var import_extract_util = require("./extract-util.js");
35
+ var import_getGapSprinkles = require("./getGapSprinkles.js");
36
+ var import_getGridFlexPositionSprinkles = require("./getGridFlexPositionSprinkles.js");
37
+ var import_getLayoutSizeStyles = require("./getLayoutSizeStyles.js");
38
+ var import_getSpacingSprinkles = require("./getSpacingSprinkles.js");
39
+ var import_safe_sprinkles = require("./safe-sprinkles.js");
40
+ const gridItemPropKeys = ["gridItem"];
41
+ const gridStylePropKeys = [
42
+ /* Flex item props */
43
+ "order",
44
+ "flexGrow",
45
+ "flexShrink",
46
+ "flexBasis",
47
+ "flex",
48
+ /* Grid container props */
49
+ "gridTemplateColumns",
50
+ "gridTemplateRows",
51
+ "gridTemplateAreas",
52
+ "gridTemplate",
53
+ "gridAutoColumns",
54
+ "gridAutoRows",
55
+ "gridAutoFlow",
56
+ "grid",
57
+ /* Grid item props */
58
+ "gridColumnStart",
59
+ "gridColumnEnd",
60
+ "gridRowStart",
61
+ "gridRowEnd",
62
+ "gridColumn",
63
+ "gridRow",
64
+ "gridArea"
65
+ ];
66
+ function extractGridItem(props) {
67
+ const { extracted, rest } = (0, import_extract_util.extract)(props, gridItemPropKeys);
68
+ return { extracted, rest };
69
+ }
70
+ function getGridStyles(props, defaults = {}) {
71
+ const { extracted: additionalGridStyles, rest } = (0, import_extract_util.extract)(
72
+ props,
73
+ gridStylePropKeys
74
+ );
75
+ const [sizeStyles, afterSizeExtraction] = (0, import_getLayoutSizeStyles.getLayoutSizeStyles)(rest, defaults);
76
+ const [gridFlexClassNames, gridFlexRemainingProps] = (0, import_getGridFlexPositionSprinkles.getGridFlexPositionSprinkles)(afterSizeExtraction, defaults);
77
+ const [spacingClassNames, spacingRemainingProps] = (0, import_getSpacingSprinkles.getSpacingSprinkles)(
78
+ gridFlexRemainingProps,
79
+ defaults
80
+ );
81
+ const [gapClassNames, gapRemainingProps] = (0, import_getGapSprinkles.getGapSprinkles)(
82
+ spacingRemainingProps,
83
+ defaults
84
+ );
85
+ const { extracted: gridItemProps, rest: remainingProps } = extractGridItem(gapRemainingProps);
86
+ const gridItemClassName = gridItemProps.gridItem ? void 0 : (0, import_safe_sprinkles.globalSprinkles)({ display: "grid" });
87
+ return [
88
+ (0, import_clsx.default)(
89
+ gridFlexClassNames,
90
+ spacingClassNames,
91
+ gapClassNames,
92
+ gridItemClassName
93
+ ),
94
+ {
95
+ ...sizeStyles,
96
+ ...additionalGridStyles
97
+ },
98
+ remainingProps
99
+ ];
100
+ }
@@ -0,0 +1,29 @@
1
+ import type { CSSProperties } from 'react';
2
+ /**
3
+ * Defines the layout size props.
4
+ * @public
5
+ */
6
+ export interface LayoutSizeProps {
7
+ /** CSS width property */
8
+ width?: CSSProperties['width'];
9
+ /** CSS min width property */
10
+ minWidth?: CSSProperties['minWidth'];
11
+ /** CSS max width property */
12
+ maxWidth?: CSSProperties['maxWidth'];
13
+ /** CSS height property */
14
+ height?: CSSProperties['height'];
15
+ /** CSS min height property */
16
+ minHeight?: CSSProperties['minHeight'];
17
+ /** CSS max height property */
18
+ maxHeight?: CSSProperties['maxHeight'];
19
+ }
20
+ /**
21
+ * Will extract layout sizing relevant styles from the passed props and
22
+ * will return a defaulted styles object as well as the remaining props excluding
23
+ * the sizing relevant props.
24
+ * @internal
25
+ */
26
+ export declare function getLayoutSizeStyles<T extends LayoutSizeProps>(props: T, defaults?: Partial<LayoutSizeProps>): [
27
+ sizeStyles: Partial<LayoutSizeProps>,
28
+ remainingProps: Omit<T, keyof LayoutSizeProps>
29
+ ];
@@ -0,0 +1,39 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var getLayoutSizeStyles_exports = {};
19
+ __export(getLayoutSizeStyles_exports, {
20
+ getLayoutSizeStyles: () => getLayoutSizeStyles
21
+ });
22
+ module.exports = __toCommonJS(getLayoutSizeStyles_exports);
23
+ var import_extract_util = require("./extract-util.js");
24
+ const layoutSizePropKeys = [
25
+ "width",
26
+ "minWidth",
27
+ "maxWidth",
28
+ "height",
29
+ "minHeight",
30
+ "maxHeight"
31
+ ];
32
+ function getLayoutSizeStyles(props, defaults = {}) {
33
+ const { extracted, rest } = (0, import_extract_util.extract)(props, layoutSizePropKeys);
34
+ const { extracted: extractedDefaults } = (0, import_extract_util.extract)(
35
+ defaults,
36
+ layoutSizePropKeys
37
+ );
38
+ return [{ ...extractedDefaults, ...extracted }, rest];
39
+ }
@@ -0,0 +1,74 @@
1
+ import type { MarginProperties, SpacingProperties } from './sprinkle-properties.js';
2
+ /**
3
+ * Defines the box spacing props.
4
+ * @public
5
+ */
6
+ export interface SpacingProps {
7
+ /** Defines CSS padding property */
8
+ padding?: SpacingProperties;
9
+ /** Defines CSS padding property */
10
+ p?: SpacingProperties;
11
+ /** Defines CSS x padding property */
12
+ paddingX?: SpacingProperties;
13
+ /** Defines CSS x padding property */
14
+ px?: SpacingProperties;
15
+ /** Defines CSS y padding property */
16
+ paddingY?: SpacingProperties;
17
+ /** Defines CSS y padding property */
18
+ py?: SpacingProperties;
19
+ /** Defines CSS top padding property */
20
+ paddingTop?: SpacingProperties;
21
+ /** Defines CSS top padding property */
22
+ pt?: SpacingProperties;
23
+ /** Defines CSS right padding property */
24
+ paddingRight?: SpacingProperties;
25
+ /** Defines CSS right padding property */
26
+ pr?: SpacingProperties;
27
+ /** Defines CSS bottom padding property */
28
+ paddingBottom?: SpacingProperties;
29
+ /** Defines CSS bottom padding property */
30
+ pb?: SpacingProperties;
31
+ /** Defines CSS left padding property */
32
+ paddingLeft?: SpacingProperties;
33
+ /** Defines CSS left padding property */
34
+ pl?: SpacingProperties;
35
+ /** Defines CSS margin property */
36
+ margin?: MarginProperties;
37
+ /** Defines CSS margin property */
38
+ m?: MarginProperties;
39
+ /** Defines CSS x margin property */
40
+ marginX?: MarginProperties;
41
+ /** Defines CSS x margin property */
42
+ mx?: MarginProperties;
43
+ /** Defines CSS y margin property */
44
+ marginY?: MarginProperties;
45
+ /** Definesy CSS margin property */
46
+ my?: MarginProperties;
47
+ /** Defines CSS top margin property */
48
+ marginTop?: MarginProperties;
49
+ /** Defines CSS top margin property */
50
+ mt?: MarginProperties;
51
+ /** Defines CSS right margin property */
52
+ marginRight?: MarginProperties;
53
+ /** Defines CSS right margin property */
54
+ mr?: MarginProperties;
55
+ /** Defines CSS bottom margin property */
56
+ marginBottom?: MarginProperties;
57
+ /** Defines bottom margin property */
58
+ mb?: MarginProperties;
59
+ /** Defines CSS left margin property */
60
+ marginLeft?: MarginProperties;
61
+ /** Defines CSS left margin property */
62
+ ml?: MarginProperties;
63
+ }
64
+ /**
65
+ * Defines the defaults for spacings
66
+ * @internal
67
+ */
68
+ export type DefaultSpacingProps = Pick<SpacingProps, 'padding' | 'paddingX' | 'paddingY' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'margin' | 'marginX' | 'marginY' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft'>;
69
+ /**
70
+ * Given a set of props will return the relevant class names for the spacing sprinkles
71
+ * and the remaining props.
72
+ * @internal
73
+ */
74
+ export declare function getSpacingSprinkles<T extends SpacingProps>(props: T, defaults?: DefaultSpacingProps): [sprinklesClassNames: string, remainingProps: Omit<T, keyof SpacingProps>];
@@ -0,0 +1,68 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var getSpacingSprinkles_exports = {};
19
+ __export(getSpacingSprinkles_exports, {
20
+ getSpacingSprinkles: () => getSpacingSprinkles
21
+ });
22
+ module.exports = __toCommonJS(getSpacingSprinkles_exports);
23
+ var import_extract_util = require("./extract-util.js");
24
+ var import_safe_sprinkles = require("./safe-sprinkles.js");
25
+ const spacingPropKeys = [
26
+ "padding",
27
+ "p",
28
+ "paddingX",
29
+ "px",
30
+ "paddingY",
31
+ "py",
32
+ "paddingTop",
33
+ "pt",
34
+ "paddingRight",
35
+ "pr",
36
+ "paddingBottom",
37
+ "pb",
38
+ "paddingLeft",
39
+ "pl",
40
+ "margin",
41
+ "m",
42
+ "marginX",
43
+ "mx",
44
+ "marginY",
45
+ "my",
46
+ "marginTop",
47
+ "mt",
48
+ "marginRight",
49
+ "mr",
50
+ "marginBottom",
51
+ "mb",
52
+ "marginLeft",
53
+ "ml"
54
+ ];
55
+ function getSpacingSprinkles(props, defaults = {}) {
56
+ const { extracted, rest } = (0, import_extract_util.extract)(props, spacingPropKeys);
57
+ const spacingSprinkleConfig = {
58
+ paddingTop: extracted.pt ?? extracted.paddingTop ?? defaults.paddingTop ?? extracted.py ?? extracted.paddingY ?? defaults.paddingY ?? extracted.p ?? extracted.padding ?? defaults.padding,
59
+ paddingRight: extracted.pr ?? extracted.paddingRight ?? defaults.paddingRight ?? extracted.px ?? extracted.paddingX ?? defaults.paddingX ?? extracted.p ?? extracted.padding ?? defaults.padding,
60
+ paddingBottom: extracted.pb ?? extracted.paddingBottom ?? defaults.paddingBottom ?? extracted.py ?? extracted.paddingY ?? defaults.paddingY ?? extracted.p ?? extracted.padding ?? defaults.padding,
61
+ paddingLeft: extracted.pl ?? extracted.paddingLeft ?? defaults.paddingLeft ?? extracted.px ?? extracted.paddingX ?? defaults.paddingX ?? extracted.p ?? extracted.padding ?? defaults.padding,
62
+ marginTop: extracted.mt ?? extracted.marginTop ?? defaults.marginTop ?? extracted.my ?? extracted.marginY ?? defaults.marginY ?? extracted.m ?? extracted.margin ?? defaults.margin,
63
+ marginRight: extracted.mr ?? extracted.marginRight ?? defaults.marginRight ?? extracted.mx ?? extracted.marginX ?? defaults.marginX ?? extracted.m ?? extracted.margin ?? defaults.margin,
64
+ marginBottom: extracted.mb ?? extracted.marginBottom ?? defaults.marginBottom ?? extracted.my ?? extracted.marginY ?? defaults.marginY ?? extracted.m ?? extracted.margin ?? defaults.margin,
65
+ marginLeft: extracted.ml ?? extracted.marginLeft ?? defaults.marginLeft ?? extracted.mx ?? extracted.marginX ?? defaults.marginX ?? extracted.m ?? extracted.margin ?? defaults.margin
66
+ };
67
+ return [(0, import_safe_sprinkles.globalSprinkles)(spacingSprinkleConfig), rest];
68
+ }
@@ -0,0 +1,11 @@
1
+ export type { FlexItemStyleProps, FlexStyleProps } from './getFlexStyles.js';
2
+ export type { GridItemStyleProps, GridStyleProps } from './getGridStyles.js';
3
+ export { type GridFlexPositionProps, getGridFlexPositionSprinkles as _getGridFlexPositionSprinkles, } from './getGridFlexPositionSprinkles.js';
4
+ export { type GapProps, getGapSprinkles as _getGapSprinkles, } from './getGapSprinkles.js';
5
+ export { type SpacingProps, type DefaultSpacingProps as _DefaultSpacingProps, getSpacingSprinkles as _getSpacingSprinkles, } from './getSpacingSprinkles.js';
6
+ export { type LayoutSizeProps, getLayoutSizeStyles as _getLayoutSizeStyles, } from './getLayoutSizeStyles.js';
7
+ export { alignContentPositionProps, alignItemsPositionProps, alignSelfPositionProps, justifyContentPositionProps, justifyItemsPositionProps, justifySelfPositionProps, marginProperties, placeContentPositionProps, placeItemsPositionProps, placeSelfPositionProps, spacingProperties, } from './sprinkle-properties.js';
8
+ export type { AlignContentPositionProps, AlignItemsPositionProps, AlignSelfPositionProps, JustifyContentPositionProps, JustifyItemsPositionProps, JustifySelfPositionProps, MarginProperties, PlaceContentPositionProps, PlaceItemsPositionProps, PlaceSelfPositionProps, SpacingProperties, } from './sprinkle-properties.js';
9
+ export { extract as _extract } from './extract-util.js';
10
+ export { globalSprinkles as _globalSprinkles } from './safe-sprinkles.js';
11
+ export { textStyleCSS as _textStyleCSS } from './textStyle.css.js';