@blerp/design 1.3.17 → 1.4.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 (128) hide show
  1. package/dist/cjs/Blerp/BlerpImageRow.js +176 -57
  2. package/dist/cjs/Blerp/BlerpSavePopup.js +44 -40
  3. package/dist/cjs/Blerp/BlerpTitleRow.js +36 -19
  4. package/dist/cjs/Blerp/BlerpTopRow.js +110 -44
  5. package/dist/cjs/Blerp.js +9 -16
  6. package/dist/cjs/BlerpAudioContextProvider.js +2 -2
  7. package/dist/cjs/BlerpListView.js +318 -168
  8. package/dist/cjs/BlerpListViewPremium.js +155 -130
  9. package/dist/cjs/BlerpListViewSkeleton.js +60 -13
  10. package/dist/cjs/BlerpSkeleton.js +32 -9
  11. package/dist/cjs/CollectionCard.js +139 -60
  12. package/dist/cjs/CollectionListViewPremium.js +368 -297
  13. package/dist/cjs/CollectionSkeleton.js +74 -13
  14. package/dist/cjs/Dropdown.js +272 -172
  15. package/dist/cjs/EllipsisLoader.js +66 -21
  16. package/dist/cjs/GroupCard.js +64 -57
  17. package/dist/cjs/Icons/Icons.js +288 -426
  18. package/dist/cjs/ImageEditor.js +247 -0
  19. package/dist/cjs/ImageUpload.js +226 -0
  20. package/dist/cjs/NewBlerp.js +354 -160
  21. package/dist/cjs/NewBlerpTest.js +10 -792
  22. package/dist/cjs/NewCollectionModal.js +294 -310
  23. package/dist/cjs/PremiumCollectionCard.js +191 -454
  24. package/dist/cjs/PurchaseModals/CheckoutModal.js +1 -1
  25. package/dist/cjs/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
  26. package/dist/cjs/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
  27. package/dist/cjs/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
  28. package/dist/cjs/ReactionButtons.js +26 -13
  29. package/dist/cjs/SnackbarContextProvider.js +200 -116
  30. package/dist/cjs/Theme.js +217 -90
  31. package/dist/cjs/Toggle.js +86 -32
  32. package/dist/cjs/UserCard.js +13 -32
  33. package/dist/cjs/UserPage/LibraryControls.js +180 -93
  34. package/dist/cjs/UserPage/UserLibraryHeader.js +23 -14
  35. package/dist/cjs/UserPage/UserProfileHeader.js +120 -105
  36. package/dist/cjs/UsernameWithPopout.js +12 -8
  37. package/dist/cjs/colors.js +15 -8
  38. package/dist/cjs/helpers.js +131 -0
  39. package/dist/cjs/index.js +92 -58
  40. package/dist/cjs/neo-components/Autocomplete.js +280 -0
  41. package/dist/cjs/neo-components/BottomNavigation.js +120 -0
  42. package/dist/cjs/neo-components/Box.js +48 -0
  43. package/dist/cjs/neo-components/Button.js +206 -0
  44. package/dist/cjs/neo-components/CircularProgress.js +92 -0
  45. package/dist/cjs/neo-components/Container.js +75 -0
  46. package/dist/cjs/neo-components/Dialog.js +441 -0
  47. package/dist/cjs/neo-components/Fab.js +237 -0
  48. package/dist/cjs/neo-components/FormControls.js +1057 -0
  49. package/dist/cjs/neo-components/Grid.js +256 -0
  50. package/dist/cjs/neo-components/IconButton.js +111 -0
  51. package/dist/cjs/neo-components/Input.js +493 -0
  52. package/dist/cjs/neo-components/Layout.js +1213 -0
  53. package/dist/cjs/neo-components/Misc.js +858 -0
  54. package/dist/cjs/neo-components/Navigation.js +1578 -0
  55. package/dist/cjs/neo-components/Paper.js +256 -0
  56. package/dist/cjs/neo-components/Stack.js +194 -0
  57. package/dist/cjs/neo-components/Stepper.js +291 -0
  58. package/dist/cjs/neo-components/Text.js +290 -0
  59. package/dist/cjs/neo-components/ThemeProvider.js +731 -0
  60. package/dist/cjs/neo-components/ToggleButton.js +223 -0
  61. package/dist/cjs/neo-components/createTheme.js +306 -0
  62. package/dist/cjs/neo-components/withSx.js +164 -0
  63. package/dist/cjs/neo-utils/sxToStyle.js +508 -0
  64. package/dist/esm/Blerp/BlerpImageRow.js +166 -46
  65. package/dist/esm/Blerp/BlerpSavePopup.js +35 -27
  66. package/dist/esm/Blerp/BlerpTitleRow.js +32 -13
  67. package/dist/esm/Blerp/BlerpTopRow.js +85 -16
  68. package/dist/esm/Blerp.js +4 -12
  69. package/dist/esm/BlerpAudioContextProvider.js +1 -2
  70. package/dist/esm/BlerpListView.js +313 -160
  71. package/dist/esm/BlerpListViewPremium.js +135 -109
  72. package/dist/esm/BlerpListViewSkeleton.js +60 -11
  73. package/dist/esm/BlerpSkeleton.js +32 -7
  74. package/dist/esm/CollectionCard.js +118 -38
  75. package/dist/esm/CollectionListViewPremium.js +367 -294
  76. package/dist/esm/CollectionSkeleton.js +73 -11
  77. package/dist/esm/Dropdown.js +260 -161
  78. package/dist/esm/EllipsisLoader.js +63 -18
  79. package/dist/esm/GroupCard.js +54 -46
  80. package/dist/esm/Icons/Icons.js +226 -367
  81. package/dist/esm/ImageEditor.js +240 -0
  82. package/dist/esm/ImageUpload.js +217 -0
  83. package/dist/esm/NewBlerp.js +282 -79
  84. package/dist/esm/NewBlerpTest.js +11 -781
  85. package/dist/esm/NewCollectionModal.js +289 -304
  86. package/dist/esm/PremiumCollectionCard.js +192 -451
  87. package/dist/esm/PurchaseModals/CheckoutModal.js +1 -1
  88. package/dist/esm/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
  89. package/dist/esm/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
  90. package/dist/esm/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
  91. package/dist/esm/ReactionButtons.js +23 -8
  92. package/dist/esm/SnackbarContextProvider.js +196 -110
  93. package/dist/esm/Theme.js +187 -66
  94. package/dist/esm/Toggle.js +84 -29
  95. package/dist/esm/UserCard.js +1 -20
  96. package/dist/esm/UserPage/LibraryControls.js +159 -65
  97. package/dist/esm/UserPage/UserLibraryHeader.js +18 -10
  98. package/dist/esm/UserPage/UserProfileHeader.js +100 -79
  99. package/dist/esm/UsernameWithPopout.js +7 -4
  100. package/dist/esm/colors.js +11 -9
  101. package/dist/esm/helpers.js +122 -0
  102. package/dist/esm/icons.js +1 -1
  103. package/dist/esm/index.js +32 -2
  104. package/dist/esm/neo-components/Autocomplete.js +269 -0
  105. package/dist/esm/neo-components/BottomNavigation.js +109 -0
  106. package/dist/esm/neo-components/Box.js +36 -0
  107. package/dist/esm/neo-components/Button.js +194 -0
  108. package/dist/esm/neo-components/CircularProgress.js +81 -0
  109. package/dist/esm/neo-components/Container.js +63 -0
  110. package/dist/esm/neo-components/Dialog.js +423 -0
  111. package/dist/esm/neo-components/Fab.js +225 -0
  112. package/dist/esm/neo-components/FormControls.js +1041 -0
  113. package/dist/esm/neo-components/Grid.js +244 -0
  114. package/dist/esm/neo-components/IconButton.js +99 -0
  115. package/dist/esm/neo-components/Input.js +478 -0
  116. package/dist/esm/neo-components/Layout.js +1179 -0
  117. package/dist/esm/neo-components/Misc.js +840 -0
  118. package/dist/esm/neo-components/Navigation.js +1556 -0
  119. package/dist/esm/neo-components/Paper.js +243 -0
  120. package/dist/esm/neo-components/Stack.js +182 -0
  121. package/dist/esm/neo-components/Stepper.js +278 -0
  122. package/dist/esm/neo-components/Text.js +277 -0
  123. package/dist/esm/neo-components/ThemeProvider.js +718 -0
  124. package/dist/esm/neo-components/ToggleButton.js +214 -0
  125. package/dist/esm/neo-components/createTheme.js +297 -0
  126. package/dist/esm/neo-components/withSx.js +153 -0
  127. package/dist/esm/neo-utils/sxToStyle.js +502 -0
  128. package/package.json +19 -15
@@ -0,0 +1,243 @@
1
+ import _extends from '@babel/runtime/helpers/extends';
2
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
+ import React from 'react';
5
+ import { withSx } from './withSx.js';
6
+
7
+ const _excluded = ["elevation", "variant", "square", "children", "component", "style"],
8
+ _excluded2 = ["raised", "children", "style"],
9
+ _excluded3 = ["children", "component", "style"],
10
+ _excluded4 = ["disableSpacing", "children", "component", "style"],
11
+ _excluded5 = ["title", "subheader", "avatar", "action", "component", "style"],
12
+ _excluded6 = ["image", "src", "component", "alt", "height", "style", "children"];
13
+
14
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
+
16
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
17
+ /**
18
+ * Paper - Surface component with elevation (replaces MUI Paper)
19
+ */
20
+
21
+ const BasePaper = /*#__PURE__*/React.forwardRef((_ref, ref) => {
22
+ let {
23
+ elevation = 1,
24
+ variant = 'elevation',
25
+ square = false,
26
+ children,
27
+ component: Component = 'div',
28
+ style
29
+ } = _ref,
30
+ props = _objectWithoutProperties(_ref, _excluded);
31
+
32
+ // Box shadow values for different elevations
33
+ const elevationShadows = {
34
+ 0: 'none',
35
+ 1: '0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12)',
36
+ 2: '0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12)',
37
+ 3: '0px 3px 3px -2px rgba(0,0,0,0.2), 0px 3px 4px 0px rgba(0,0,0,0.14), 0px 1px 8px 0px rgba(0,0,0,0.12)',
38
+ 4: '0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12)',
39
+ 6: '0px 3px 5px -1px rgba(0,0,0,0.2), 0px 6px 10px 0px rgba(0,0,0,0.14), 0px 1px 18px 0px rgba(0,0,0,0.12)',
40
+ 8: '0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12)',
41
+ 12: '0px 7px 8px -4px rgba(0,0,0,0.2), 0px 12px 17px 2px rgba(0,0,0,0.14), 0px 5px 22px 4px rgba(0,0,0,0.12)',
42
+ 16: '0px 8px 10px -5px rgba(0,0,0,0.2), 0px 16px 24px 2px rgba(0,0,0,0.14), 0px 6px 30px 5px rgba(0,0,0,0.12)',
43
+ 24: '0px 11px 15px -7px rgba(0,0,0,0.2), 0px 24px 38px 3px rgba(0,0,0,0.14), 0px 9px 46px 8px rgba(0,0,0,0.12)'
44
+ };
45
+
46
+ const paperStyle = _objectSpread(_objectSpread(_objectSpread({
47
+ backgroundColor: 'var(--flyout-background, #fff)',
48
+ color: 'var(--body-text, #000)',
49
+ transition: 'box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms'
50
+ }, !square && {
51
+ borderRadius: '4px'
52
+ }), variant === 'outlined' ? {
53
+ border: '1px solid var(--border-color, rgba(0, 0, 0, 0.12))'
54
+ } : {
55
+ boxShadow: elevationShadows[elevation] || elevationShadows[1]
56
+ }), style);
57
+
58
+ return /*#__PURE__*/React.createElement(Component, _extends({
59
+ ref: ref,
60
+ style: paperStyle
61
+ }, props), children);
62
+ });
63
+ BasePaper.displayName = 'BasePaper';
64
+ const Paper = withSx(BasePaper);
65
+ /**
66
+ * Card - Card component built on Paper (replaces MUI Card)
67
+ */
68
+
69
+ const BaseCard = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
70
+ let {
71
+ raised = false,
72
+ children,
73
+ style
74
+ } = _ref2,
75
+ props = _objectWithoutProperties(_ref2, _excluded2);
76
+
77
+ const cardStyle = _objectSpread({
78
+ overflow: 'hidden'
79
+ }, style);
80
+
81
+ return /*#__PURE__*/React.createElement(BasePaper, _extends({
82
+ ref: ref,
83
+ elevation: raised ? 8 : 1,
84
+ style: cardStyle
85
+ }, props), children);
86
+ });
87
+ BaseCard.displayName = 'BaseCard';
88
+ const Card = withSx(BaseCard);
89
+ /**
90
+ * CardContent - Content area for cards
91
+ */
92
+
93
+ const BaseCardContent = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
94
+ let {
95
+ children,
96
+ component: Component = 'div',
97
+ style
98
+ } = _ref3,
99
+ props = _objectWithoutProperties(_ref3, _excluded3);
100
+
101
+ const contentStyle = _objectSpread({
102
+ padding: '16px',
103
+ '&:last-child': {
104
+ paddingBottom: '24px'
105
+ }
106
+ }, style);
107
+
108
+ return /*#__PURE__*/React.createElement(Component, _extends({
109
+ ref: ref,
110
+ style: contentStyle
111
+ }, props), children);
112
+ });
113
+ BaseCardContent.displayName = 'BaseCardContent';
114
+ withSx(BaseCardContent);
115
+ /**
116
+ * CardActions - Action area for cards
117
+ */
118
+
119
+ const BaseCardActions = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
120
+ let {
121
+ disableSpacing = false,
122
+ children,
123
+ component: Component = 'div',
124
+ style
125
+ } = _ref4,
126
+ props = _objectWithoutProperties(_ref4, _excluded4);
127
+
128
+ const actionsStyle = _objectSpread(_objectSpread({
129
+ display: 'flex',
130
+ alignItems: 'center',
131
+ padding: '8px'
132
+ }, !disableSpacing && {
133
+ gap: '8px'
134
+ }), style);
135
+
136
+ return /*#__PURE__*/React.createElement(Component, _extends({
137
+ ref: ref,
138
+ style: actionsStyle
139
+ }, props), children);
140
+ });
141
+ BaseCardActions.displayName = 'BaseCardActions';
142
+ withSx(BaseCardActions);
143
+ /**
144
+ * CardHeader - Header area for cards
145
+ */
146
+
147
+ const BaseCardHeader = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
148
+ let {
149
+ title,
150
+ subheader,
151
+ avatar,
152
+ action,
153
+ component: Component = 'div',
154
+ style
155
+ } = _ref5,
156
+ props = _objectWithoutProperties(_ref5, _excluded5);
157
+
158
+ const headerStyle = _objectSpread({
159
+ display: 'flex',
160
+ alignItems: 'center',
161
+ padding: '16px'
162
+ }, style);
163
+
164
+ return /*#__PURE__*/React.createElement(Component, _extends({
165
+ ref: ref,
166
+ style: headerStyle
167
+ }, props), avatar && /*#__PURE__*/React.createElement("div", {
168
+ style: {
169
+ marginRight: '16px'
170
+ }
171
+ }, avatar), /*#__PURE__*/React.createElement("div", {
172
+ style: {
173
+ flex: 1
174
+ }
175
+ }, title && /*#__PURE__*/React.createElement("div", {
176
+ style: {
177
+ fontWeight: 500,
178
+ fontSize: '1rem'
179
+ }
180
+ }, title), subheader && /*#__PURE__*/React.createElement("div", {
181
+ style: {
182
+ color: 'var(--secondary-text)',
183
+ fontSize: '0.875rem'
184
+ }
185
+ }, subheader)), action && /*#__PURE__*/React.createElement("div", null, action));
186
+ });
187
+ BaseCardHeader.displayName = 'BaseCardHeader';
188
+ withSx(BaseCardHeader);
189
+ /**
190
+ * CardMedia - Media area for cards (images, videos, etc.)
191
+ */
192
+
193
+ const BaseCardMedia = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
194
+ let {
195
+ image,
196
+ src,
197
+ component = 'div',
198
+ alt = '',
199
+ height,
200
+ style,
201
+ children
202
+ } = _ref6,
203
+ props = _objectWithoutProperties(_ref6, _excluded6);
204
+
205
+ const imageSrc = image || src; // If component is img, render as img
206
+
207
+ if (component === 'img') {
208
+ return /*#__PURE__*/React.createElement("img", _extends({
209
+ ref: ref,
210
+ src: imageSrc,
211
+ alt: alt,
212
+ style: _objectSpread({
213
+ display: 'block',
214
+ width: '100%',
215
+ height,
216
+ objectFit: 'cover'
217
+ }, style)
218
+ }, props));
219
+ } // Otherwise render as div with background image
220
+
221
+
222
+ const Component = component;
223
+
224
+ const mediaStyle = _objectSpread(_objectSpread(_objectSpread({
225
+ display: 'block',
226
+ backgroundSize: 'cover',
227
+ backgroundRepeat: 'no-repeat',
228
+ backgroundPosition: 'center'
229
+ }, imageSrc && {
230
+ backgroundImage: "url(\"".concat(imageSrc, "\")")
231
+ }), height && {
232
+ height
233
+ }), style);
234
+
235
+ return /*#__PURE__*/React.createElement(Component, _extends({
236
+ ref: ref,
237
+ style: mediaStyle
238
+ }, props), children);
239
+ });
240
+ BaseCardMedia.displayName = 'BaseCardMedia';
241
+ withSx(BaseCardMedia);
242
+
243
+ export { Card, Paper, Paper as default };
@@ -0,0 +1,182 @@
1
+ import _extends from '@babel/runtime/helpers/extends';
2
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
+ import React, { useMemo } from 'react';
5
+ import { withSx } from './withSx.js';
6
+
7
+ const _excluded = ["direction", "spacing", "alignItems", "justifyContent", "flexWrap", "divider", "useFlexGap", "children", "component", "style"];
8
+
9
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
10
+
11
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
12
+ /**
13
+ * Props that MUI Stack accepts directly and converts to styles
14
+ * These get extracted from props and merged into the style object
15
+ */
16
+
17
+ const STYLE_PROPS = [// Sizing
18
+ 'width', 'height', 'minWidth', 'maxWidth', 'minHeight', 'maxHeight', // Margin (MUI shorthand)
19
+ 'm', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', // Padding (MUI shorthand)
20
+ 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', // Positioning
21
+ 'position', 'top', 'right', 'bottom', 'left', 'zIndex', // Display/Visibility
22
+ 'display', 'overflow', 'overflowX', 'overflowY', 'visibility', // Flex item props
23
+ 'flex', 'flexGrow', 'flexShrink', 'flexBasis', 'alignSelf', 'order', // Background
24
+ 'bgcolor', 'backgroundColor', 'background', // Border
25
+ 'border', 'borderTop', 'borderRight', 'borderBottom', 'borderLeft', 'borderColor', 'borderRadius', // Other common ones
26
+ 'boxShadow', 'opacity', 'cursor', 'gap']; // MUI spacing shorthand mapping
27
+
28
+ const SPACING_MAP = {
29
+ m: 'margin',
30
+ mt: 'marginTop',
31
+ mr: 'marginRight',
32
+ mb: 'marginBottom',
33
+ ml: 'marginLeft',
34
+ p: 'padding',
35
+ pt: 'paddingTop',
36
+ pr: 'paddingRight',
37
+ pb: 'paddingBottom',
38
+ pl: 'paddingLeft',
39
+ bgcolor: 'backgroundColor'
40
+ }; // Props that need mx/my expansion
41
+
42
+ const AXIS_PROPS = {
43
+ mx: ['marginLeft', 'marginRight'],
44
+ my: ['marginTop', 'marginBottom'],
45
+ px: ['paddingLeft', 'paddingRight'],
46
+ py: ['paddingTop', 'paddingBottom']
47
+ };
48
+ const SPACING_UNIT = 8;
49
+ /**
50
+ * Convert a spacing value - numbers get multiplied by 8px
51
+ */
52
+
53
+ function parseSpacingValue(value) {
54
+ if (typeof value === 'number') {
55
+ return "".concat(value * SPACING_UNIT, "px");
56
+ }
57
+
58
+ return value;
59
+ }
60
+ /**
61
+ * Extract style props from props object
62
+ * Returns { styleProps, otherProps }
63
+ */
64
+
65
+
66
+ function extractStyleProps(props) {
67
+ const styleProps = {};
68
+ const otherProps = {};
69
+
70
+ for (const [key, value] of Object.entries(props)) {
71
+ if (value === undefined || value === null) {
72
+ continue;
73
+ }
74
+
75
+ if (STYLE_PROPS.includes(key)) {
76
+ // Map shorthand to full property name
77
+ const cssKey = SPACING_MAP[key] || key; // Handle spacing values (numbers become px)
78
+
79
+ const isSpacingProp = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'gap'].includes(key);
80
+ const processedValue = isSpacingProp ? parseSpacingValue(value) : value;
81
+ styleProps[cssKey] = processedValue;
82
+ } else if (AXIS_PROPS[key]) {
83
+ // Handle mx, my, px, py - expand to both axes
84
+ const [prop1, prop2] = AXIS_PROPS[key];
85
+ const processedValue = parseSpacingValue(value);
86
+ styleProps[prop1] = processedValue;
87
+ styleProps[prop2] = processedValue;
88
+ } else {
89
+ otherProps[key] = value;
90
+ }
91
+ }
92
+
93
+ return {
94
+ styleProps,
95
+ otherProps
96
+ };
97
+ }
98
+ /**
99
+ * Stack - Flexbox layout component (replaces MUI Stack)
100
+ * Arranges children in a row or column with consistent spacing
101
+ *
102
+ * @param {string} direction - 'row' | 'column' | 'row-reverse' | 'column-reverse'
103
+ * @param {number|string} spacing - Gap between children (number = multiplied by 8px)
104
+ * @param {string} alignItems - CSS align-items value
105
+ * @param {string} justifyContent - CSS justify-content value
106
+ * @param {string} flexWrap - CSS flex-wrap value
107
+ * @param {ReactNode} divider - Element to render between children
108
+ * @param {boolean} useFlexGap - Whether to use CSS gap (default: true)
109
+ * @param {string|Component} component - The root element type (default: 'div')
110
+ *
111
+ * Also accepts direct style props like MUI:
112
+ * - Sizing: width, height, minWidth, maxWidth, minHeight, maxHeight
113
+ * - Spacing: m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py (numbers = 8px units)
114
+ * - Position: position, top, right, bottom, left, zIndex
115
+ * - And more: bgcolor, border, borderRadius, boxShadow, opacity, etc.
116
+ */
117
+
118
+
119
+ const BaseStack = /*#__PURE__*/React.forwardRef((_ref, ref) => {
120
+ let {
121
+ direction = 'column',
122
+ spacing = 0,
123
+ alignItems,
124
+ justifyContent,
125
+ flexWrap,
126
+ divider,
127
+ useFlexGap = true,
128
+ children,
129
+ component: Component = 'div',
130
+ style
131
+ } = _ref,
132
+ props = _objectWithoutProperties(_ref, _excluded);
133
+
134
+ // Extract style props from remaining props
135
+ const {
136
+ styleProps,
137
+ otherProps
138
+ } = useMemo(() => extractStyleProps(props), [props]); // Convert spacing to pixels (MUI uses 8px unit)
139
+
140
+ const gap = typeof spacing === 'number' ? "".concat(spacing * SPACING_UNIT, "px") : spacing;
141
+ const stackStyle = useMemo(() => _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
142
+ display: 'flex',
143
+ flexDirection: direction
144
+ }, useFlexGap && spacing ? {
145
+ gap
146
+ } : {}), alignItems && {
147
+ alignItems
148
+ }), justifyContent && {
149
+ justifyContent
150
+ }), flexWrap && {
151
+ flexWrap
152
+ }), styleProps), style), [direction, gap, alignItems, justifyContent, flexWrap, styleProps, style, useFlexGap, spacing]); // Handle divider prop - insert divider between each child
153
+
154
+ if (divider && React.Children.count(children) > 1) {
155
+ const childArray = React.Children.toArray(children).filter(Boolean);
156
+ const childrenWithDividers = [];
157
+ childArray.forEach((child, index) => {
158
+ childrenWithDividers.push(child);
159
+
160
+ if (index < childArray.length - 1) {
161
+ childrenWithDividers.push( /*#__PURE__*/React.cloneElement(divider, {
162
+ key: "divider-".concat(index),
163
+ 'aria-hidden': true
164
+ }));
165
+ }
166
+ });
167
+ return /*#__PURE__*/React.createElement(Component, _extends({
168
+ ref: ref,
169
+ style: stackStyle
170
+ }, otherProps), childrenWithDividers);
171
+ }
172
+
173
+ return /*#__PURE__*/React.createElement(Component, _extends({
174
+ ref: ref,
175
+ style: stackStyle
176
+ }, otherProps), children);
177
+ });
178
+ BaseStack.displayName = 'BaseStack'; // Export with sx prop support
179
+
180
+ const Stack = withSx(BaseStack);
181
+
182
+ export { Stack, Stack as default };
@@ -0,0 +1,278 @@
1
+ import _extends from '@babel/runtime/helpers/extends';
2
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
+ import React from 'react';
5
+ import { withSx } from './withSx.js';
6
+
7
+ const _excluded = ["activeStep", "alternativeLabel", "children", "connector", "nonLinear", "orientation", "className", "style"],
8
+ _excluded2 = ["active", "completed", "disabled", "index", "alternativeLabel", "orientation", "children", "className", "style"],
9
+ _excluded3 = ["active", "completed", "disabled", "index", "icon", "optional", "StepIconComponent", "StepIconProps", "children", "className", "style"],
10
+ _excluded4 = ["active", "children", "TransitionComponent", "transitionDuration", "className", "style"],
11
+ _excluded5 = ["active", "completed", "disabled", "index", "icon", "optional", "children", "onClick", "className", "style"],
12
+ _excluded6 = ["orientation", "className", "style"];
13
+
14
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
+
16
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
17
+ /**
18
+ * Stepper - displays progress through a sequence of steps
19
+ */
20
+
21
+ const StepperBase = /*#__PURE__*/React.forwardRef((_ref, ref) => {
22
+ let {
23
+ activeStep = 0,
24
+ alternativeLabel = false,
25
+ children,
26
+ connector,
27
+ nonLinear = false,
28
+ orientation = "horizontal",
29
+ className,
30
+ style
31
+ } = _ref,
32
+ props = _objectWithoutProperties(_ref, _excluded);
33
+
34
+ const baseStyle = _objectSpread({
35
+ display: "flex",
36
+ flexDirection: orientation === "vertical" ? "column" : "row",
37
+ alignItems: alternativeLabel ? "flex-start" : "center"
38
+ }, style);
39
+
40
+ const steps = React.Children.toArray(children);
41
+ return /*#__PURE__*/React.createElement("div", _extends({
42
+ ref: ref,
43
+ className: className,
44
+ style: baseStyle
45
+ }, props), steps.map((step, index) => /*#__PURE__*/React.createElement(React.Fragment, {
46
+ key: index
47
+ }, /*#__PURE__*/React.cloneElement(step, {
48
+ index,
49
+ active: activeStep === index,
50
+ completed: activeStep > index,
51
+ disabled: !nonLinear && activeStep < index,
52
+ alternativeLabel,
53
+ orientation
54
+ }), index < steps.length - 1 && (connector || /*#__PURE__*/React.createElement(StepConnector, {
55
+ orientation: orientation
56
+ })))));
57
+ });
58
+ StepperBase.displayName = "Stepper";
59
+ const Stepper = withSx(StepperBase);
60
+ /**
61
+ * Step - individual step in a Stepper
62
+ */
63
+
64
+ const StepBase = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
65
+ let {
66
+ active = false,
67
+ completed = false,
68
+ disabled = false,
69
+ index,
70
+ alternativeLabel,
71
+ orientation,
72
+ children,
73
+ className,
74
+ style
75
+ } = _ref2,
76
+ props = _objectWithoutProperties(_ref2, _excluded2);
77
+
78
+ const baseStyle = _objectSpread({
79
+ display: "flex",
80
+ flexDirection: alternativeLabel ? "column" : "row",
81
+ alignItems: "center",
82
+ flex: orientation === "horizontal" ? 1 : undefined,
83
+ opacity: disabled ? 0.5 : 1
84
+ }, style);
85
+
86
+ return /*#__PURE__*/React.createElement("div", _extends({
87
+ ref: ref,
88
+ className: className,
89
+ style: baseStyle
90
+ }, props), React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) ? /*#__PURE__*/React.cloneElement(child, {
91
+ active,
92
+ completed,
93
+ disabled,
94
+ index
95
+ }) : child));
96
+ });
97
+ StepBase.displayName = "Step";
98
+ withSx(StepBase);
99
+ /**
100
+ * StepLabel - label for a Step
101
+ */
102
+
103
+ const StepLabelBase = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
104
+ let {
105
+ active,
106
+ completed,
107
+ disabled,
108
+ index,
109
+ icon,
110
+ optional,
111
+ StepIconComponent,
112
+ StepIconProps,
113
+ children,
114
+ className,
115
+ style
116
+ } = _ref3,
117
+ props = _objectWithoutProperties(_ref3, _excluded3);
118
+
119
+ const baseStyle = _objectSpread({
120
+ display: "flex",
121
+ alignItems: "center",
122
+ gap: 8
123
+ }, style);
124
+
125
+ const iconStyle = {
126
+ width: 24,
127
+ height: 24,
128
+ borderRadius: "50%",
129
+ display: "flex",
130
+ alignItems: "center",
131
+ justifyContent: "center",
132
+ fontSize: 12,
133
+ fontWeight: 600,
134
+ backgroundColor: completed ? "#7C4DFF" : active ? "#7C4DFF" : "#BDBDBD",
135
+ color: "#FFFFFF"
136
+ };
137
+ const labelStyle = {
138
+ color: disabled ? "#BDBDBD" : active ? "#000000" : "#757575",
139
+ fontWeight: active ? 600 : 400
140
+ };
141
+ const IconComponent = StepIconComponent;
142
+ return /*#__PURE__*/React.createElement("div", _extends({
143
+ ref: ref,
144
+ className: className,
145
+ style: baseStyle
146
+ }, props), IconComponent ? /*#__PURE__*/React.createElement(IconComponent, _extends({
147
+ active: active,
148
+ completed: completed,
149
+ icon: index + 1
150
+ }, StepIconProps)) : icon ? icon : /*#__PURE__*/React.createElement("span", {
151
+ style: iconStyle
152
+ }, completed ? "✓" : index + 1), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
153
+ style: labelStyle
154
+ }, children), optional && /*#__PURE__*/React.createElement("div", {
155
+ style: {
156
+ fontSize: 12,
157
+ color: "#757575"
158
+ }
159
+ }, optional)));
160
+ });
161
+ StepLabelBase.displayName = "StepLabel";
162
+ const StepLabel = withSx(StepLabelBase);
163
+ /**
164
+ * StepContent - content for vertical steppers
165
+ */
166
+
167
+ const StepContentBase = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
168
+ let {
169
+ active,
170
+ children,
171
+ TransitionComponent,
172
+ transitionDuration,
173
+ className,
174
+ style
175
+ } = _ref4,
176
+ props = _objectWithoutProperties(_ref4, _excluded4);
177
+
178
+ const baseStyle = _objectSpread({
179
+ marginLeft: 12,
180
+ paddingLeft: 20,
181
+ borderLeft: "1px solid #BDBDBD",
182
+ display: active ? "block" : "none"
183
+ }, style);
184
+
185
+ return /*#__PURE__*/React.createElement("div", _extends({
186
+ ref: ref,
187
+ className: className,
188
+ style: baseStyle
189
+ }, props), children);
190
+ });
191
+ StepContentBase.displayName = "StepContent";
192
+ withSx(StepContentBase);
193
+ /**
194
+ * StepButton - clickable step for non-linear steppers
195
+ */
196
+
197
+ const StepButtonBase = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
198
+ let {
199
+ active,
200
+ completed,
201
+ disabled,
202
+ index,
203
+ icon,
204
+ optional,
205
+ children,
206
+ onClick,
207
+ className,
208
+ style
209
+ } = _ref5,
210
+ props = _objectWithoutProperties(_ref5, _excluded5);
211
+
212
+ const baseStyle = _objectSpread({
213
+ display: "flex",
214
+ alignItems: "center",
215
+ gap: 8,
216
+ background: "none",
217
+ border: "none",
218
+ cursor: disabled ? "not-allowed" : "pointer",
219
+ padding: 8,
220
+ borderRadius: 4,
221
+ transition: "background-color 0.2s"
222
+ }, style);
223
+
224
+ return /*#__PURE__*/React.createElement("button", _extends({
225
+ ref: ref,
226
+ className: className,
227
+ style: baseStyle,
228
+ onClick: onClick,
229
+ disabled: disabled
230
+ }, props), /*#__PURE__*/React.createElement(StepLabel, {
231
+ active: active,
232
+ completed: completed,
233
+ disabled: disabled,
234
+ index: index,
235
+ icon: icon,
236
+ optional: optional
237
+ }, children));
238
+ });
239
+ StepButtonBase.displayName = "StepButton";
240
+ withSx(StepButtonBase);
241
+ /**
242
+ * StepConnector - line between steps
243
+ */
244
+
245
+ const StepConnectorBase = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
246
+ let {
247
+ orientation = "horizontal",
248
+ className,
249
+ style
250
+ } = _ref6,
251
+ props = _objectWithoutProperties(_ref6, _excluded6);
252
+
253
+ const baseStyle = _objectSpread({
254
+ flex: orientation === "horizontal" ? 1 : undefined,
255
+ height: orientation === "vertical" ? 24 : undefined,
256
+ display: "flex",
257
+ alignItems: "center",
258
+ justifyContent: "center"
259
+ }, style);
260
+
261
+ const lineStyle = {
262
+ width: orientation === "horizontal" ? "100%" : 1,
263
+ height: orientation === "horizontal" ? 1 : "100%",
264
+ backgroundColor: "#BDBDBD",
265
+ margin: orientation === "horizontal" ? "0 8px" : "8px 0"
266
+ };
267
+ return /*#__PURE__*/React.createElement("div", _extends({
268
+ ref: ref,
269
+ className: className,
270
+ style: baseStyle
271
+ }, props), /*#__PURE__*/React.createElement("span", {
272
+ style: lineStyle
273
+ }));
274
+ });
275
+ StepConnectorBase.displayName = "StepConnector";
276
+ const StepConnector = withSx(StepConnectorBase);
277
+
278
+ export { StepConnector, StepLabel, Stepper };