@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.
- package/dist/cjs/Blerp/BlerpImageRow.js +176 -57
- package/dist/cjs/Blerp/BlerpSavePopup.js +44 -40
- package/dist/cjs/Blerp/BlerpTitleRow.js +36 -19
- package/dist/cjs/Blerp/BlerpTopRow.js +110 -44
- package/dist/cjs/Blerp.js +9 -16
- package/dist/cjs/BlerpAudioContextProvider.js +2 -2
- package/dist/cjs/BlerpListView.js +318 -168
- package/dist/cjs/BlerpListViewPremium.js +155 -130
- package/dist/cjs/BlerpListViewSkeleton.js +60 -13
- package/dist/cjs/BlerpSkeleton.js +32 -9
- package/dist/cjs/CollectionCard.js +139 -60
- package/dist/cjs/CollectionListViewPremium.js +368 -297
- package/dist/cjs/CollectionSkeleton.js +74 -13
- package/dist/cjs/Dropdown.js +272 -172
- package/dist/cjs/EllipsisLoader.js +66 -21
- package/dist/cjs/GroupCard.js +64 -57
- package/dist/cjs/Icons/Icons.js +288 -426
- package/dist/cjs/ImageEditor.js +247 -0
- package/dist/cjs/ImageUpload.js +226 -0
- package/dist/cjs/NewBlerp.js +354 -160
- package/dist/cjs/NewBlerpTest.js +10 -792
- package/dist/cjs/NewCollectionModal.js +294 -310
- package/dist/cjs/PremiumCollectionCard.js +191 -454
- package/dist/cjs/PurchaseModals/CheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
- package/dist/cjs/ReactionButtons.js +26 -13
- package/dist/cjs/SnackbarContextProvider.js +200 -116
- package/dist/cjs/Theme.js +217 -90
- package/dist/cjs/Toggle.js +86 -32
- package/dist/cjs/UserCard.js +13 -32
- package/dist/cjs/UserPage/LibraryControls.js +180 -93
- package/dist/cjs/UserPage/UserLibraryHeader.js +23 -14
- package/dist/cjs/UserPage/UserProfileHeader.js +120 -105
- package/dist/cjs/UsernameWithPopout.js +12 -8
- package/dist/cjs/colors.js +15 -8
- package/dist/cjs/helpers.js +131 -0
- package/dist/cjs/index.js +92 -58
- package/dist/cjs/neo-components/Autocomplete.js +280 -0
- package/dist/cjs/neo-components/BottomNavigation.js +120 -0
- package/dist/cjs/neo-components/Box.js +48 -0
- package/dist/cjs/neo-components/Button.js +206 -0
- package/dist/cjs/neo-components/CircularProgress.js +92 -0
- package/dist/cjs/neo-components/Container.js +75 -0
- package/dist/cjs/neo-components/Dialog.js +441 -0
- package/dist/cjs/neo-components/Fab.js +237 -0
- package/dist/cjs/neo-components/FormControls.js +1057 -0
- package/dist/cjs/neo-components/Grid.js +256 -0
- package/dist/cjs/neo-components/IconButton.js +111 -0
- package/dist/cjs/neo-components/Input.js +493 -0
- package/dist/cjs/neo-components/Layout.js +1213 -0
- package/dist/cjs/neo-components/Misc.js +858 -0
- package/dist/cjs/neo-components/Navigation.js +1578 -0
- package/dist/cjs/neo-components/Paper.js +256 -0
- package/dist/cjs/neo-components/Stack.js +194 -0
- package/dist/cjs/neo-components/Stepper.js +291 -0
- package/dist/cjs/neo-components/Text.js +290 -0
- package/dist/cjs/neo-components/ThemeProvider.js +731 -0
- package/dist/cjs/neo-components/ToggleButton.js +223 -0
- package/dist/cjs/neo-components/createTheme.js +306 -0
- package/dist/cjs/neo-components/withSx.js +164 -0
- package/dist/cjs/neo-utils/sxToStyle.js +508 -0
- package/dist/esm/Blerp/BlerpImageRow.js +166 -46
- package/dist/esm/Blerp/BlerpSavePopup.js +35 -27
- package/dist/esm/Blerp/BlerpTitleRow.js +32 -13
- package/dist/esm/Blerp/BlerpTopRow.js +85 -16
- package/dist/esm/Blerp.js +4 -12
- package/dist/esm/BlerpAudioContextProvider.js +1 -2
- package/dist/esm/BlerpListView.js +313 -160
- package/dist/esm/BlerpListViewPremium.js +135 -109
- package/dist/esm/BlerpListViewSkeleton.js +60 -11
- package/dist/esm/BlerpSkeleton.js +32 -7
- package/dist/esm/CollectionCard.js +118 -38
- package/dist/esm/CollectionListViewPremium.js +367 -294
- package/dist/esm/CollectionSkeleton.js +73 -11
- package/dist/esm/Dropdown.js +260 -161
- package/dist/esm/EllipsisLoader.js +63 -18
- package/dist/esm/GroupCard.js +54 -46
- package/dist/esm/Icons/Icons.js +226 -367
- package/dist/esm/ImageEditor.js +240 -0
- package/dist/esm/ImageUpload.js +217 -0
- package/dist/esm/NewBlerp.js +282 -79
- package/dist/esm/NewBlerpTest.js +11 -781
- package/dist/esm/NewCollectionModal.js +289 -304
- package/dist/esm/PremiumCollectionCard.js +192 -451
- package/dist/esm/PurchaseModals/CheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
- package/dist/esm/ReactionButtons.js +23 -8
- package/dist/esm/SnackbarContextProvider.js +196 -110
- package/dist/esm/Theme.js +187 -66
- package/dist/esm/Toggle.js +84 -29
- package/dist/esm/UserCard.js +1 -20
- package/dist/esm/UserPage/LibraryControls.js +159 -65
- package/dist/esm/UserPage/UserLibraryHeader.js +18 -10
- package/dist/esm/UserPage/UserProfileHeader.js +100 -79
- package/dist/esm/UsernameWithPopout.js +7 -4
- package/dist/esm/colors.js +11 -9
- package/dist/esm/helpers.js +122 -0
- package/dist/esm/icons.js +1 -1
- package/dist/esm/index.js +32 -2
- package/dist/esm/neo-components/Autocomplete.js +269 -0
- package/dist/esm/neo-components/BottomNavigation.js +109 -0
- package/dist/esm/neo-components/Box.js +36 -0
- package/dist/esm/neo-components/Button.js +194 -0
- package/dist/esm/neo-components/CircularProgress.js +81 -0
- package/dist/esm/neo-components/Container.js +63 -0
- package/dist/esm/neo-components/Dialog.js +423 -0
- package/dist/esm/neo-components/Fab.js +225 -0
- package/dist/esm/neo-components/FormControls.js +1041 -0
- package/dist/esm/neo-components/Grid.js +244 -0
- package/dist/esm/neo-components/IconButton.js +99 -0
- package/dist/esm/neo-components/Input.js +478 -0
- package/dist/esm/neo-components/Layout.js +1179 -0
- package/dist/esm/neo-components/Misc.js +840 -0
- package/dist/esm/neo-components/Navigation.js +1556 -0
- package/dist/esm/neo-components/Paper.js +243 -0
- package/dist/esm/neo-components/Stack.js +182 -0
- package/dist/esm/neo-components/Stepper.js +278 -0
- package/dist/esm/neo-components/Text.js +277 -0
- package/dist/esm/neo-components/ThemeProvider.js +718 -0
- package/dist/esm/neo-components/ToggleButton.js +214 -0
- package/dist/esm/neo-components/createTheme.js +297 -0
- package/dist/esm/neo-components/withSx.js +153 -0
- package/dist/esm/neo-utils/sxToStyle.js +502 -0
- package/package.json +19 -15
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var withSx = require('./withSx.js');
|
|
10
|
+
var ThemeProvider = require('./ThemeProvider.js');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
15
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
16
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
17
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
|
+
|
|
19
|
+
const _excluded = ["variant", "color", "size", "disabled", "fullWidth", "startIcon", "endIcon", "href", "component", "children", "style", "onClick", "type", "disableElevation", "disableRipple", "className"];
|
|
20
|
+
|
|
21
|
+
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; }
|
|
22
|
+
|
|
23
|
+
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__default["default"](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; }
|
|
24
|
+
/**
|
|
25
|
+
* Button component (replaces MUI Button)
|
|
26
|
+
* Supports variant, color, size, and other MUI Button props
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
const BaseButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
30
|
+
let {
|
|
31
|
+
variant = "text",
|
|
32
|
+
color = "primary",
|
|
33
|
+
size = "medium",
|
|
34
|
+
disabled = false,
|
|
35
|
+
fullWidth = false,
|
|
36
|
+
startIcon,
|
|
37
|
+
endIcon,
|
|
38
|
+
href,
|
|
39
|
+
component,
|
|
40
|
+
children,
|
|
41
|
+
style,
|
|
42
|
+
onClick,
|
|
43
|
+
type = "button",
|
|
44
|
+
disableElevation = false,
|
|
45
|
+
disableRipple = false,
|
|
46
|
+
className = ""
|
|
47
|
+
} = _ref,
|
|
48
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
49
|
+
|
|
50
|
+
const {
|
|
51
|
+
colors
|
|
52
|
+
} = ThemeProvider.useTheme(); // Resolve color from theme palette
|
|
53
|
+
|
|
54
|
+
const colorPalette = React.useMemo(() => {
|
|
55
|
+
if (typeof color === "string") {
|
|
56
|
+
if (color === "grey7" || color === "notBlack") {
|
|
57
|
+
return {
|
|
58
|
+
main: "#FFFFFF",
|
|
59
|
+
contrastText: "#21000C",
|
|
60
|
+
dark: "#F5F5F5",
|
|
61
|
+
light: "#FFFFFF"
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const paletteColor = colors[color];
|
|
66
|
+
|
|
67
|
+
if (paletteColor && typeof paletteColor === "object") {
|
|
68
|
+
return paletteColor;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
main: "#FFFFFF",
|
|
73
|
+
contrastText: "#21000C",
|
|
74
|
+
dark: "#E0E0E0",
|
|
75
|
+
light: "#FFFFFF"
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
main: "#FFFFFF",
|
|
81
|
+
contrastText: "#21000C",
|
|
82
|
+
dark: "#E0E0E0",
|
|
83
|
+
light: "#FFFFFF"
|
|
84
|
+
};
|
|
85
|
+
}, [color, colors]); // Size configurations
|
|
86
|
+
|
|
87
|
+
const sizeConfig = React.useMemo(() => {
|
|
88
|
+
switch (size) {
|
|
89
|
+
case "small":
|
|
90
|
+
return {
|
|
91
|
+
padding: "4px 10px",
|
|
92
|
+
fontSize: "0.8125rem",
|
|
93
|
+
iconSize: "18px"
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
case "large":
|
|
97
|
+
return {
|
|
98
|
+
padding: "8px 22px",
|
|
99
|
+
fontSize: "0.9375rem",
|
|
100
|
+
iconSize: "24px"
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
case "medium":
|
|
104
|
+
default:
|
|
105
|
+
return {
|
|
106
|
+
padding: "6px 16px",
|
|
107
|
+
fontSize: "0.875rem",
|
|
108
|
+
iconSize: "20px"
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}, [size]);
|
|
112
|
+
const main = colorPalette.main || "#FFFFFF";
|
|
113
|
+
const contrastText = colorPalette.contrastText || "#21000C";
|
|
114
|
+
const dark = colorPalette.dark || main; // Generate unique class name for this button instance
|
|
115
|
+
|
|
116
|
+
const buttonId = React.useMemo(() => "neo-btn-".concat(Math.random().toString(36).slice(2, 9)), []); // Build CSS for hover/active states
|
|
117
|
+
|
|
118
|
+
const dynamicStyles = React.useMemo(() => {
|
|
119
|
+
let baseStyles = "";
|
|
120
|
+
let hoverStyles = "";
|
|
121
|
+
let activeStyles = "";
|
|
122
|
+
const shadow = disableElevation ? "none" : "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)";
|
|
123
|
+
const hoverShadow = disableElevation ? "none" : "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)";
|
|
124
|
+
const activeShadow = disableElevation ? "none" : "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)";
|
|
125
|
+
|
|
126
|
+
switch (variant) {
|
|
127
|
+
case "contained":
|
|
128
|
+
baseStyles = "background-color: ".concat(main, "; color: ").concat(contrastText, "; border: none; box-shadow: ").concat(shadow, ";");
|
|
129
|
+
hoverStyles = "background-color: ".concat(dark, "; box-shadow: ").concat(hoverShadow, ";");
|
|
130
|
+
activeStyles = "background-color: ".concat(dark, "; box-shadow: ").concat(activeShadow, ";");
|
|
131
|
+
break;
|
|
132
|
+
|
|
133
|
+
case "outlined":
|
|
134
|
+
baseStyles = "background-color: transparent; color: ".concat(main, "; border: 2px solid ").concat(main, "; box-shadow: none;");
|
|
135
|
+
hoverStyles = "background-color: ".concat(main, "14;");
|
|
136
|
+
activeStyles = "background-color: ".concat(main, "24;");
|
|
137
|
+
break;
|
|
138
|
+
|
|
139
|
+
case "text":
|
|
140
|
+
default:
|
|
141
|
+
baseStyles = "background-color: transparent; color: ".concat(main, "; border: none; box-shadow: none;");
|
|
142
|
+
hoverStyles = "background-color: ".concat(main, "14;");
|
|
143
|
+
activeStyles = "background-color: ".concat(main, "24;");
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return "\n .".concat(buttonId, " { ").concat(baseStyles, " }\n .").concat(buttonId, ":hover:not(:disabled) { ").concat(hoverStyles, " }\n .").concat(buttonId, ":active:not(:disabled) { ").concat(activeStyles, " }\n ");
|
|
148
|
+
}, [buttonId, variant, main, contrastText, dark, disableElevation]); // Base button styles (static)
|
|
149
|
+
|
|
150
|
+
const buttonStyle = _objectSpread({
|
|
151
|
+
display: "inline-flex",
|
|
152
|
+
alignItems: "center",
|
|
153
|
+
justifyContent: "center",
|
|
154
|
+
gap: "8px",
|
|
155
|
+
position: "relative",
|
|
156
|
+
boxSizing: "border-box",
|
|
157
|
+
outline: 0,
|
|
158
|
+
margin: 0,
|
|
159
|
+
cursor: disabled ? "default" : "pointer",
|
|
160
|
+
userSelect: "none",
|
|
161
|
+
verticalAlign: "middle",
|
|
162
|
+
textDecoration: "none",
|
|
163
|
+
fontFamily: "Open Sans, Inter, Odudo, Arial, sans-serif",
|
|
164
|
+
fontWeight: 600,
|
|
165
|
+
letterSpacing: "0.05rem",
|
|
166
|
+
textTransform: "capitalize",
|
|
167
|
+
minWidth: "64px",
|
|
168
|
+
borderRadius: "6px",
|
|
169
|
+
transition: "background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1), color 250ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
170
|
+
padding: sizeConfig.padding,
|
|
171
|
+
fontSize: sizeConfig.fontSize,
|
|
172
|
+
width: fullWidth ? "100%" : undefined,
|
|
173
|
+
opacity: disabled ? 0.5 : 1,
|
|
174
|
+
pointerEvents: disabled ? "none" : undefined
|
|
175
|
+
}, style);
|
|
176
|
+
|
|
177
|
+
const iconStyle = {
|
|
178
|
+
display: "inline-flex",
|
|
179
|
+
alignItems: "center",
|
|
180
|
+
justifyContent: "center",
|
|
181
|
+
flexShrink: 0,
|
|
182
|
+
width: sizeConfig.iconSize,
|
|
183
|
+
height: sizeConfig.iconSize,
|
|
184
|
+
lineHeight: 0
|
|
185
|
+
}; // Determine component type
|
|
186
|
+
|
|
187
|
+
const Component = component || (href ? "a" : "button");
|
|
188
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("style", null, dynamicStyles), /*#__PURE__*/React__default["default"].createElement(Component, _extends__default["default"]({
|
|
189
|
+
ref: ref,
|
|
190
|
+
type: Component === "button" ? type : undefined,
|
|
191
|
+
href: href,
|
|
192
|
+
disabled: disabled,
|
|
193
|
+
style: buttonStyle,
|
|
194
|
+
className: "".concat(buttonId, " ").concat(className).trim(),
|
|
195
|
+
onClick: onClick
|
|
196
|
+
}, props), startIcon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
197
|
+
style: iconStyle
|
|
198
|
+
}, startIcon), children, endIcon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
199
|
+
style: iconStyle
|
|
200
|
+
}, endIcon)));
|
|
201
|
+
});
|
|
202
|
+
BaseButton.displayName = "BaseButton";
|
|
203
|
+
const Button = withSx.withSx(BaseButton);
|
|
204
|
+
|
|
205
|
+
exports.Button = Button;
|
|
206
|
+
exports["default"] = Button;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
13
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
14
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
|
|
17
|
+
const _excluded = ["size", "thickness", "color", "variant", "value", "style", "className"];
|
|
18
|
+
|
|
19
|
+
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; }
|
|
20
|
+
|
|
21
|
+
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__default["default"](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; }
|
|
22
|
+
const CircularProgress = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
size = 40,
|
|
25
|
+
thickness = 3.6,
|
|
26
|
+
color = 'primary',
|
|
27
|
+
variant = 'indeterminate',
|
|
28
|
+
value = 0,
|
|
29
|
+
style,
|
|
30
|
+
className
|
|
31
|
+
} = _ref,
|
|
32
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
33
|
+
|
|
34
|
+
const colorMap = {
|
|
35
|
+
primary: '#FE295C',
|
|
36
|
+
// your pandaPink
|
|
37
|
+
secondary: '#49bea0',
|
|
38
|
+
// pandaNewTeal
|
|
39
|
+
inherit: 'currentColor'
|
|
40
|
+
};
|
|
41
|
+
const strokeColor = colorMap[color] || color;
|
|
42
|
+
const circumference = 2 * Math.PI * 20; // radius of 20
|
|
43
|
+
|
|
44
|
+
if (variant === 'determinate') {
|
|
45
|
+
const offset = circumference - value / 100 * circumference;
|
|
46
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", _extends__default["default"]({
|
|
47
|
+
width: size,
|
|
48
|
+
height: size,
|
|
49
|
+
viewBox: "0 0 44 44",
|
|
50
|
+
className: className,
|
|
51
|
+
style: style
|
|
52
|
+
}, props), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
53
|
+
cx: "22",
|
|
54
|
+
cy: "22",
|
|
55
|
+
r: "20",
|
|
56
|
+
fill: "none",
|
|
57
|
+
stroke: strokeColor,
|
|
58
|
+
strokeWidth: thickness,
|
|
59
|
+
strokeDasharray: circumference,
|
|
60
|
+
strokeDashoffset: offset,
|
|
61
|
+
strokeLinecap: "round",
|
|
62
|
+
style: {
|
|
63
|
+
transform: 'rotate(-90deg)',
|
|
64
|
+
transformOrigin: 'center',
|
|
65
|
+
transition: 'stroke-dashoffset 0.3s ease'
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", _extends__default["default"]({
|
|
71
|
+
width: size,
|
|
72
|
+
height: size,
|
|
73
|
+
viewBox: "0 0 44 44",
|
|
74
|
+
className: className,
|
|
75
|
+
style: _objectSpread({
|
|
76
|
+
animation: 'neo-circular-rotate 1.4s linear infinite'
|
|
77
|
+
}, style)
|
|
78
|
+
}, props), /*#__PURE__*/React__default["default"].createElement("style", null, "\n @keyframes neo-circular-rotate {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n @keyframes neo-circular-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 100, 200;\n stroke-dashoffset: -15;\n }\n 100% {\n stroke-dasharray: 100, 200;\n stroke-dashoffset: -125;\n }\n }\n "), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
79
|
+
cx: "22",
|
|
80
|
+
cy: "22",
|
|
81
|
+
r: "20",
|
|
82
|
+
fill: "none",
|
|
83
|
+
stroke: strokeColor,
|
|
84
|
+
strokeWidth: thickness,
|
|
85
|
+
strokeLinecap: "round",
|
|
86
|
+
style: {
|
|
87
|
+
animation: 'neo-circular-dash 1.4s ease-in-out infinite'
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
exports.CircularProgress = CircularProgress;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var withSx = require('./withSx.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
+
|
|
13
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
14
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
15
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
16
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
+
|
|
18
|
+
const _excluded = ["maxWidth", "fixed", "disableGutters", "children", "component", "style"];
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
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__default["default"](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; }
|
|
23
|
+
/**
|
|
24
|
+
* Container - Centered content container (replaces MUI Container)
|
|
25
|
+
* Centers content horizontally with max-width constraints
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
const BaseContainer = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
29
|
+
let {
|
|
30
|
+
maxWidth = 'lg',
|
|
31
|
+
fixed = false,
|
|
32
|
+
disableGutters = false,
|
|
33
|
+
children,
|
|
34
|
+
component: Component = 'div',
|
|
35
|
+
style
|
|
36
|
+
} = _ref,
|
|
37
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
38
|
+
|
|
39
|
+
// Max-width breakpoints (matching MUI defaults)
|
|
40
|
+
const maxWidthValues = {
|
|
41
|
+
xs: '444px',
|
|
42
|
+
sm: '600px',
|
|
43
|
+
md: '900px',
|
|
44
|
+
lg: '1200px',
|
|
45
|
+
xl: '1536px',
|
|
46
|
+
false: 'none'
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const containerStyle = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
50
|
+
width: '100%',
|
|
51
|
+
marginLeft: 'auto',
|
|
52
|
+
marginRight: 'auto',
|
|
53
|
+
boxSizing: 'border-box',
|
|
54
|
+
display: 'block'
|
|
55
|
+
}, !disableGutters && {
|
|
56
|
+
paddingLeft: '16px',
|
|
57
|
+
paddingRight: '16px'
|
|
58
|
+
}), maxWidth && {
|
|
59
|
+
maxWidth: maxWidthValues[maxWidth] || maxWidth
|
|
60
|
+
}), fixed && {
|
|
61
|
+
// Fixed uses exact breakpoint widths instead of max
|
|
62
|
+
width: maxWidthValues[maxWidth] || maxWidth,
|
|
63
|
+
maxWidth: 'none'
|
|
64
|
+
}), style);
|
|
65
|
+
|
|
66
|
+
return /*#__PURE__*/React__default["default"].createElement(Component, _extends__default["default"]({
|
|
67
|
+
ref: ref,
|
|
68
|
+
style: containerStyle
|
|
69
|
+
}, props), children);
|
|
70
|
+
});
|
|
71
|
+
BaseContainer.displayName = 'BaseContainer';
|
|
72
|
+
const Container = withSx.withSx(BaseContainer);
|
|
73
|
+
|
|
74
|
+
exports.Container = Container;
|
|
75
|
+
exports["default"] = Container;
|