@app-studio/web 0.9.69 → 0.9.70
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/components/Background/Background/Background.props.d.ts +13 -0
- package/dist/components/Background/Background/Background.view.d.ts +3 -1
- package/dist/components/Background/Background.d.ts +1 -0
- package/dist/web.cjs.development.js +81 -6
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +81 -6
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +81 -6
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/docs/components/Icon.mdx +139 -304
- package/package.json +1 -1
package/dist/web.esm.js
CHANGED
|
@@ -25778,7 +25778,8 @@ var _excluded$1o = ["children", "showRadialGradient", "views", "themeMode"],
|
|
|
25778
25778
|
_excluded8 = ["children", "src", "autoPlay", "loop", "muted", "playsInline", "overlay", "blendMode", "views", "themeMode"],
|
|
25779
25779
|
_excluded9 = ["children"],
|
|
25780
25780
|
_excluded10 = ["contentPosition"],
|
|
25781
|
-
_excluded11 = ["children", "views"]
|
|
25781
|
+
_excluded11 = ["children", "views"],
|
|
25782
|
+
_excluded12 = ["children", "designProps", "shape", "decorationRotation", "decorationScale", "decorationOpacity", "views"];
|
|
25782
25783
|
// Background Context
|
|
25783
25784
|
var BackgroundContext = /*#__PURE__*/createContext({});
|
|
25784
25785
|
/**
|
|
@@ -26237,15 +26238,15 @@ var BackgroundOverlay = _ref10 => {
|
|
|
26237
26238
|
var getDefaultOverlay = () => {
|
|
26238
26239
|
switch (contentPosition) {
|
|
26239
26240
|
case 'left':
|
|
26240
|
-
return 'radial-gradient(circle at
|
|
26241
|
+
return 'radial-gradient(circle at 80% 50%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 80%, rgba(0,0,0,0.2) 100%)';
|
|
26241
26242
|
case 'right':
|
|
26242
|
-
return 'radial-gradient(circle at
|
|
26243
|
+
return 'radial-gradient(circle at 20% 50%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 80%, rgba(0,0,0,0.2) 100%)';
|
|
26243
26244
|
case 'top':
|
|
26244
|
-
return 'radial-gradient(circle at 50% 80%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6)
|
|
26245
|
+
return 'radial-gradient(circle at 50% 80%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 80%, rgba(0,0,0,0.1) 100%)';
|
|
26245
26246
|
case 'bottom':
|
|
26246
|
-
return 'radial-gradient(circle at 50% 80%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6)
|
|
26247
|
+
return 'radial-gradient(circle at 50% 80%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 80%, rgba(0,0,0,0.1) 100%)';
|
|
26247
26248
|
case 'center':
|
|
26248
|
-
return 'radial-gradient(circle at 50%
|
|
26249
|
+
return 'radial-gradient(circle at 50% 70%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
|
|
26249
26250
|
default:
|
|
26250
26251
|
return 'rgba(0,0,0,0.5)';
|
|
26251
26252
|
}
|
|
@@ -26272,6 +26273,78 @@ var BackgroundViewBase = _ref11 => {
|
|
|
26272
26273
|
value: {}
|
|
26273
26274
|
}, /*#__PURE__*/React.createElement(View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
|
|
26274
26275
|
};
|
|
26276
|
+
var BackgroundLayout = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
|
|
26277
|
+
var _props$backgroundColo, _props$padding;
|
|
26278
|
+
var {
|
|
26279
|
+
children,
|
|
26280
|
+
shape = 'rounded',
|
|
26281
|
+
decorationRotation = 5,
|
|
26282
|
+
decorationScale = 1,
|
|
26283
|
+
decorationOpacity = 0.8,
|
|
26284
|
+
views
|
|
26285
|
+
} = _ref12,
|
|
26286
|
+
props = _objectWithoutPropertiesLoose(_ref12, _excluded12);
|
|
26287
|
+
var getBorderRadius = shape => {
|
|
26288
|
+
switch (shape) {
|
|
26289
|
+
case 'square':
|
|
26290
|
+
return '0px';
|
|
26291
|
+
case 'pill':
|
|
26292
|
+
return '9999px';
|
|
26293
|
+
case 'rounded':
|
|
26294
|
+
default:
|
|
26295
|
+
return '16px';
|
|
26296
|
+
}
|
|
26297
|
+
};
|
|
26298
|
+
var radius = getBorderRadius(shape);
|
|
26299
|
+
// Calculate the extra space needed for the rotated/scaled decoration
|
|
26300
|
+
// When rotated, corners extend beyond the original bounds
|
|
26301
|
+
// Extra space ≈ sin(rotation) × dimension + (scale - 1) × dimension
|
|
26302
|
+
var rotationRad = Math.abs(decorationRotation) * (Math.PI / 180);
|
|
26303
|
+
var rotationOffset = Math.sin(rotationRad) * 100; // percentage-based estimate
|
|
26304
|
+
var scaleOffset = (decorationScale - 1) * 100 / 2;
|
|
26305
|
+
var extraPadding = Math.ceil(rotationOffset + scaleOffset);
|
|
26306
|
+
var backgroundColor = (_props$backgroundColo = props.backgroundColor) != null ? _props$backgroundColo : 'theme.primary';
|
|
26307
|
+
return /*#__PURE__*/React.createElement(View, Object.assign({}, props, {
|
|
26308
|
+
ref: ref,
|
|
26309
|
+
backgroundColor: 'transparent',
|
|
26310
|
+
position: "relative",
|
|
26311
|
+
overflow: "visible"
|
|
26312
|
+
}, views == null ? void 0 : views.container), /*#__PURE__*/React.createElement(View, {
|
|
26313
|
+
padding: (_props$padding = props.padding) != null ? _props$padding : 96 + extraPadding + "px " + extraPadding + "px",
|
|
26314
|
+
position: "relative",
|
|
26315
|
+
overflow: "visible"
|
|
26316
|
+
}, /*#__PURE__*/React.createElement(View, Object.assign({
|
|
26317
|
+
position: "absolute",
|
|
26318
|
+
top: extraPadding,
|
|
26319
|
+
left: extraPadding,
|
|
26320
|
+
right: extraPadding,
|
|
26321
|
+
bottom: extraPadding,
|
|
26322
|
+
backgroundColor: backgroundColor,
|
|
26323
|
+
borderRadius: radius,
|
|
26324
|
+
opacity: decorationOpacity / 1.5,
|
|
26325
|
+
transform: "scale(" + decorationScale + ")",
|
|
26326
|
+
pointerEvents: "none",
|
|
26327
|
+
zIndex: 1
|
|
26328
|
+
}, views == null ? void 0 : views.back)), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
26329
|
+
position: "absolute",
|
|
26330
|
+
top: extraPadding,
|
|
26331
|
+
left: extraPadding,
|
|
26332
|
+
right: extraPadding,
|
|
26333
|
+
bottom: extraPadding,
|
|
26334
|
+
transform: "rotate(" + decorationRotation + "deg) scale(" + decorationScale + ")",
|
|
26335
|
+
opacity: decorationOpacity / 1.2,
|
|
26336
|
+
backgroundColor: backgroundColor,
|
|
26337
|
+
borderRadius: radius,
|
|
26338
|
+
pointerEvents: "none",
|
|
26339
|
+
zIndex: 2
|
|
26340
|
+
}, views == null ? void 0 : views.front)), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
26341
|
+
margin: "0 auto",
|
|
26342
|
+
//width="100%"
|
|
26343
|
+
position: "relative",
|
|
26344
|
+
zIndex: 3
|
|
26345
|
+
}, views == null ? void 0 : views.content), children)));
|
|
26346
|
+
});
|
|
26347
|
+
BackgroundLayout.displayName = 'Background.Layout';
|
|
26275
26348
|
// Create the compound component
|
|
26276
26349
|
var BackgroundView = BackgroundViewBase;
|
|
26277
26350
|
// Attach compound components
|
|
@@ -26285,6 +26358,7 @@ BackgroundView.Image = BackgroundImage;
|
|
|
26285
26358
|
BackgroundView.Video = BackgroundVideo;
|
|
26286
26359
|
BackgroundView.Gradient = BackgroundGradient;
|
|
26287
26360
|
BackgroundView.Overlay = BackgroundOverlay;
|
|
26361
|
+
BackgroundView.Layout = BackgroundLayout;
|
|
26288
26362
|
|
|
26289
26363
|
/**
|
|
26290
26364
|
* Background Component with compound pattern
|
|
@@ -26338,6 +26412,7 @@ var BackgroundComponent = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PUR
|
|
|
26338
26412
|
})));
|
|
26339
26413
|
BackgroundComponent.displayName = 'Background';
|
|
26340
26414
|
var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
|
|
26415
|
+
Layout: BackgroundView.Layout,
|
|
26341
26416
|
Aurora: BackgroundView.Aurora,
|
|
26342
26417
|
Meteors: BackgroundView.Meteors,
|
|
26343
26418
|
Wall: BackgroundView.Wall,
|