@app-studio/web 0.9.69 → 0.9.71

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.
@@ -12,6 +12,19 @@ export interface BackgroundProps extends ViewProps {
12
12
  content?: ViewProps;
13
13
  };
14
14
  themeMode?: 'light' | 'dark';
15
+ shape?: 'square' | 'rounded' | 'pill';
16
+ decorationRotation?: number;
17
+ decorationScale?: number;
18
+ decorationOpacity?: number;
19
+ }
20
+ export interface BackgroundLayoutProps extends BackgroundProps {
21
+ shape?: 'square' | 'rounded' | 'pill';
22
+ views?: {
23
+ container?: ViewProps;
24
+ content?: ViewProps;
25
+ back?: ViewProps;
26
+ front?: ViewProps;
27
+ };
15
28
  }
16
29
  /**
17
30
  * Aurora Background component props
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { BackgroundProps, AuroraBackgroundProps, MeteorsProps, WallProps, ParticlesProps, GridProps, RipplesProps, BackgroundImageProps, BackgroundVideoProps, BackgroundGradientProps, BackgroundOverlayProps } from './Background.props';
2
+ import { BackgroundProps, AuroraBackgroundProps, MeteorsProps, WallProps, ParticlesProps, GridProps, RipplesProps, BackgroundImageProps, BackgroundVideoProps, BackgroundGradientProps, BackgroundOverlayProps, BackgroundLayoutProps } from './Background.props';
3
3
  /**
4
4
  * Main Background View Component with compound pattern
5
5
  */
@@ -14,6 +14,8 @@ interface BackgroundViewComponent extends React.FC<BackgroundProps> {
14
14
  Video: React.FC<BackgroundVideoProps>;
15
15
  Gradient: React.FC<BackgroundGradientProps>;
16
16
  Overlay: React.FC<BackgroundOverlayProps>;
17
+ Layout: React.FC<BackgroundLayoutProps>;
17
18
  }
19
+ export declare const BackgroundLayout: React.ForwardRefExoticComponent<Pick<BackgroundLayoutProps, string | number> & React.RefAttributes<HTMLDivElement>>;
18
20
  export declare const BackgroundView: BackgroundViewComponent;
19
21
  export {};
@@ -9,6 +9,7 @@
9
9
  import React from 'react';
10
10
  import { BackgroundProps } from './Background/Background.props';
11
11
  export declare const Background: React.ForwardRefExoticComponent<Pick<BackgroundProps, string | number> & React.RefAttributes<HTMLDivElement>> & {
12
+ Layout: React.FC<import("./Background/Background.props").BackgroundLayoutProps>;
12
13
  Aurora: React.FC<import("./Background/Background.props").AuroraBackgroundProps>;
13
14
  Meteors: React.FC<import("./Background/Background.props").MeteorsProps>;
14
15
  Wall: React.FC<import("./Background/Background.props").WallProps>;
@@ -2,7 +2,7 @@ import { ViewProps } from 'app-studio';
2
2
  /**
3
3
  * Highlight style options for the Title component
4
4
  */
5
- export declare type HighlightStyle = 'underline' | 'background' | 'gradient' | 'outline' | 'glow';
5
+ export declare type HighlightStyle = 'underline' | 'background' | 'gradient' | 'outline' | 'glow' | 'default';
6
6
  /**
7
7
  * Title size options
8
8
  */
@@ -39,7 +39,6 @@ export * from './Table/Table';
39
39
  export * from './Tabs/Tabs';
40
40
  export * from './Title/Title';
41
41
  export * from './Icon/Icon';
42
- export * as Icon from './Icon/Icon';
43
42
  export * from './Toggle/Toggle';
44
43
  export * from './ToggleGroup/ToggleGroup';
45
44
  export * from './DragAndDrop/DragAndDrop';
@@ -527,9 +527,9 @@ var createIcon = function createIcon(name, defaultProps) {
527
527
  if (defaultProps === void 0) {
528
528
  defaultProps = {};
529
529
  }
530
- var IconComponent = props => /*#__PURE__*/React__default.createElement(Icon, Object.assign({
530
+ var IconComponent = props => (/*#__PURE__*/React__default.createElement(Icon, Object.assign({
531
531
  name: name
532
- }, defaultProps, props));
532
+ }, defaultProps, props)));
533
533
  IconComponent.displayName = name + "Icon";
534
534
  return IconComponent;
535
535
  };
@@ -708,9 +708,9 @@ var UploadIcon = /*#__PURE__*/createIcon('upload', {
708
708
  });
709
709
  // Restored icons
710
710
  var CheckIcon = TickIcon;
711
- var BackIcon = props => /*#__PURE__*/React__default.createElement(ChevronIcon, Object.assign({
711
+ var BackIcon = props => (/*#__PURE__*/React__default.createElement(ChevronIcon, Object.assign({
712
712
  orientation: "left"
713
- }, props));
713
+ }, props)));
714
714
  var ZoomOutIcon = /*#__PURE__*/createIcon('zoom-out', {
715
715
  filled: false
716
716
  });
@@ -815,106 +815,6 @@ var DragHandleLinesIcon = /*#__PURE__*/createIcon('grip-horizontal', {
815
815
  filled: false
816
816
  });
817
817
 
818
- var Icon$1 = {
819
- __proto__: null,
820
- Icon: Icon,
821
- UserIcon: UserIcon,
822
- HelpIcon: HelpIcon,
823
- FolderIcon: FolderIcon,
824
- ChevronIcon: ChevronIcon,
825
- DragHandleIcon: DragHandleIcon,
826
- FileIcon: FileIcon,
827
- VideoIcon: VideoIcon,
828
- ImageIcon: ImageIcon,
829
- AudioIcon: AudioIcon,
830
- TwitterIcon: TwitterIcon,
831
- XIcon: XIcon,
832
- TwitchIcon: TwitchIcon,
833
- CloseIcon: CloseIcon,
834
- InstagramIcon: InstagramIcon,
835
- YoutubeIcon: YoutubeIcon,
836
- FacebookIcon: FacebookIcon,
837
- LinkedinIcon: LinkedinIcon,
838
- ThreadsIcon: ThreadsIcon,
839
- MinusIcon: MinusIcon,
840
- InfoIcon: InfoIcon,
841
- PlayIcon: PlayIcon,
842
- PauseIcon: PauseIcon,
843
- HeartIcon: HeartIcon,
844
- StarIcon: StarIcon,
845
- SaveIcon: SaveIcon,
846
- WarningIcon: WarningIcon,
847
- BatteryIcon: BatteryIcon,
848
- BookmarkIcon: BookmarkIcon,
849
- CloudIcon: CloudIcon,
850
- CopyIcon: CopyIcon,
851
- DustBinIcon: DustBinIcon,
852
- DeleteIcon: DeleteIcon,
853
- EditIcon: EditIcon,
854
- MicrophoneIcon: MicrophoneIcon,
855
- StopIcon: StopIcon,
856
- SendIcon: SendIcon,
857
- LoadingSpinnerIcon: LoadingSpinnerIcon,
858
- AttachmentIcon: AttachmentIcon,
859
- SearchIcon: SearchIcon,
860
- HomeIcon: HomeIcon,
861
- SettingsIcon: SettingsIcon,
862
- DownloadIcon: DownloadIcon,
863
- ShareIcon: ShareIcon,
864
- TickIcon: TickIcon,
865
- PlusIcon: PlusIcon,
866
- CloseEyeIcon: CloseEyeIcon,
867
- OpenEyeIcon: OpenEyeIcon,
868
- LockIcon: LockIcon,
869
- ProfileIcon: ProfileIcon,
870
- ExternalLinkIcon: ExternalLinkIcon,
871
- SuccessIcon: SuccessIcon,
872
- ErrorIcon: ErrorIcon,
873
- NotificationIcon: NotificationIcon,
874
- DocumentIcon: DocumentIcon,
875
- ChartIcon: ChartIcon,
876
- MoonIcon: MoonIcon,
877
- PanelIcon: PanelIcon,
878
- UploadIcon: UploadIcon,
879
- CheckIcon: CheckIcon,
880
- BackIcon: BackIcon,
881
- ZoomOutIcon: ZoomOutIcon,
882
- TextIcon: TextIcon,
883
- ShapeIcon: ShapeIcon,
884
- RotateIcon: RotateIcon,
885
- GiftIcon: GiftIcon,
886
- ShieldIcon: ShieldIcon,
887
- LogoutIcon: LogoutIcon,
888
- PowerOffIcon: PowerOffIcon,
889
- LinkIcon: LinkIcon,
890
- LayoutIcon: LayoutIcon,
891
- ZapIcon: ZapIcon,
892
- CreditCardIcon: CreditCardIcon,
893
- MoreIcon: MoreIcon,
894
- TrashIcon: TrashIcon,
895
- FilterIcon: FilterIcon,
896
- CalendarIcon: CalendarIcon,
897
- ClockIcon: ClockIcon,
898
- MapPinIcon: MapPinIcon,
899
- MenuIcon: MenuIcon,
900
- RefreshIcon: RefreshIcon,
901
- PrintIcon: PrintIcon,
902
- MagicWandIcon: MagicWandIcon,
903
- UnLikeIcon: UnLikeIcon,
904
- LikeIcon: LikeIcon,
905
- CameraIcon: CameraIcon,
906
- BluetoothIcon: BluetoothIcon,
907
- UnlockIcon: UnlockIcon,
908
- WifiIcon: WifiIcon,
909
- BoldArrowIcon: BoldArrowIcon,
910
- ArrowIcon: ArrowIcon,
911
- SpinnerIcon: SpinnerIcon,
912
- SliderIcon: SliderIcon,
913
- CropIcon: CropIcon,
914
- ZoomInIcon: ZoomInIcon,
915
- DragHandleLinesIcon: DragHandleLinesIcon
916
- };
917
-
918
818
  /**
919
819
  * Alert Styles
920
820
  *
@@ -17273,7 +17173,8 @@ var HighlightStyles = {
17273
17173
  glow: color => ({
17274
17174
  color: color,
17275
17175
  textShadow: "0 0 10px " + color + "80, 0 0 20px " + color + "40, 0 0 30px " + color + "20"
17276
- })
17176
+ }),
17177
+ default: () => ({})
17277
17178
  };
17278
17179
 
17279
17180
  var _excluded$Z = ["text", "typingSpeed", "pauseTime", "onComplete", "showCursor", "cursorColor", "textStyle", "textComponent", "as"];
@@ -17545,7 +17446,7 @@ var TitleView = _ref => {
17545
17446
  var {
17546
17447
  children,
17547
17448
  highlightText,
17548
- highlightStyle = 'background',
17449
+ highlightStyle = 'default',
17549
17450
  highlightColor = 'theme.primary',
17550
17451
  highlightSecondaryColor,
17551
17452
  size = 'lg',
@@ -17642,9 +17543,9 @@ var TitleView = _ref => {
17642
17543
  // Common container props
17643
17544
  var containerProps = Object.assign({
17644
17545
  ref,
17645
- as: 'h1',
17646
17546
  animate: inView ? controlledAnimate : undefined
17647
17547
  }, !textComponent && {
17548
+ as: 'h1',
17648
17549
  fontSize: useResponsive ? undefined : fontSize,
17649
17550
  fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
17650
17551
  letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
@@ -17700,25 +17601,27 @@ var TitleView = _ref => {
17700
17601
  lastIndex = match.index + match[0].length;
17701
17602
  }
17702
17603
  if (lastIndex < text.length) parts.push(text.substring(lastIndex));
17703
- return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React__default.createElement(TextComponent, Object.assign({
17604
+ return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
17605
+ fontSize: useResponsive ? undefined : fontSize
17606
+ }, containerProps, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React__default.createElement(TextComponent, Object.assign({
17704
17607
  key: "highlight-" + idx,
17705
17608
  as: "span",
17706
17609
  display: "inline",
17707
- animate: inView ? controlledHighlightAnimate : undefined,
17708
- fontSize: useResponsive ? undefined : fontSize
17610
+ animate: inView ? controlledHighlightAnimate : undefined
17709
17611
  }, !highlightSlide ? highlightProps : {}, views == null ? void 0 : views.highlight), renderHighlightedContent(part.text)))));
17710
17612
  }
17711
17613
  // Case 2: Has highlight style but no highlight target - apply style to entire title
17712
17614
  if (highlightStyle && !activeHighlightTarget) {
17713
- return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(TextComponent, Object.assign({
17615
+ return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
17616
+ fontSize: fontSize
17617
+ }, containerProps, props, views == null ? void 0 : views.container), /*#__PURE__*/React__default.createElement(TextComponent, Object.assign({
17714
17618
  as: "span",
17715
- fontSize: fontSize,
17716
17619
  display: "inline",
17717
17620
  animate: inView ? controlledHighlightAnimate : undefined
17718
17621
  }, !highlightSlide ? highlightProps : {}, views == null ? void 0 : views.highlight), renderHighlightedContent(text)));
17719
17622
  }
17720
17623
  // Case 3: Default - no highlighting
17721
- return /*#__PURE__*/React__default.createElement(TextComponent, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), text);
17624
+ return /*#__PURE__*/React__default.createElement(TextComponent, Object.assign({}, containerProps, props, views == null ? void 0 : views.container), text);
17722
17625
  };
17723
17626
 
17724
17627
  /**
@@ -25785,7 +25688,8 @@ var _excluded$1o = ["children", "showRadialGradient", "views", "themeMode"],
25785
25688
  _excluded8 = ["children", "src", "autoPlay", "loop", "muted", "playsInline", "overlay", "blendMode", "views", "themeMode"],
25786
25689
  _excluded9 = ["children"],
25787
25690
  _excluded10 = ["contentPosition"],
25788
- _excluded11 = ["children", "views"];
25691
+ _excluded11 = ["children", "views"],
25692
+ _excluded12 = ["children", "designProps", "shape", "decorationRotation", "decorationScale", "decorationOpacity", "views"];
25789
25693
  // Background Context
25790
25694
  var BackgroundContext = /*#__PURE__*/React.createContext({});
25791
25695
  /**
@@ -26244,15 +26148,15 @@ var BackgroundOverlay = _ref10 => {
26244
26148
  var getDefaultOverlay = () => {
26245
26149
  switch (contentPosition) {
26246
26150
  case 'left':
26247
- return 'radial-gradient(circle at 70% 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) 50%, rgba(0,0,0,0.2) 100%)';
26151
+ 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%)';
26248
26152
  case 'right':
26249
- return 'radial-gradient(circle at 30% 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) 50%, rgba(0,0,0,0.2) 100%)';
26153
+ 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%)';
26250
26154
  case 'top':
26251
- 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) 50%, rgba(0,0,0,0.1) 100%)';
26155
+ 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%)';
26252
26156
  case 'bottom':
26253
- 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) 50%, rgba(0,0,0,0.1) 100%)';
26157
+ 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%)';
26254
26158
  case 'center':
26255
- return 'radial-gradient(circle at 50% 90%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
26159
+ return 'radial-gradient(circle at 50% 70%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
26256
26160
  default:
26257
26161
  return 'rgba(0,0,0,0.5)';
26258
26162
  }
@@ -26279,6 +26183,78 @@ var BackgroundViewBase = _ref11 => {
26279
26183
  value: {}
26280
26184
  }, /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
26281
26185
  };
26186
+ var BackgroundLayout = /*#__PURE__*/React__default.forwardRef((_ref12, ref) => {
26187
+ var _props$backgroundColo, _props$padding;
26188
+ var {
26189
+ children,
26190
+ shape = 'rounded',
26191
+ decorationRotation = 5,
26192
+ decorationScale = 1,
26193
+ decorationOpacity = 0.8,
26194
+ views
26195
+ } = _ref12,
26196
+ props = _objectWithoutPropertiesLoose(_ref12, _excluded12);
26197
+ var getBorderRadius = shape => {
26198
+ switch (shape) {
26199
+ case 'square':
26200
+ return '0px';
26201
+ case 'pill':
26202
+ return '9999px';
26203
+ case 'rounded':
26204
+ default:
26205
+ return '16px';
26206
+ }
26207
+ };
26208
+ var radius = getBorderRadius(shape);
26209
+ // Calculate the extra space needed for the rotated/scaled decoration
26210
+ // When rotated, corners extend beyond the original bounds
26211
+ // Extra space ≈ sin(rotation) × dimension + (scale - 1) × dimension
26212
+ var rotationRad = Math.abs(decorationRotation) * (Math.PI / 180);
26213
+ var rotationOffset = Math.sin(rotationRad) * 100; // percentage-based estimate
26214
+ var scaleOffset = (decorationScale - 1) * 100 / 2;
26215
+ var extraPadding = Math.ceil(rotationOffset + scaleOffset);
26216
+ var backgroundColor = (_props$backgroundColo = props.backgroundColor) != null ? _props$backgroundColo : 'theme.primary';
26217
+ return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, props, {
26218
+ ref: ref,
26219
+ backgroundColor: 'transparent',
26220
+ position: "relative",
26221
+ overflow: "visible"
26222
+ }, views == null ? void 0 : views.container), /*#__PURE__*/React__default.createElement(appStudio.View, {
26223
+ padding: (_props$padding = props.padding) != null ? _props$padding : 96 + extraPadding + "px " + extraPadding + "px",
26224
+ position: "relative",
26225
+ overflow: "visible"
26226
+ }, /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
26227
+ position: "absolute",
26228
+ top: extraPadding,
26229
+ left: extraPadding,
26230
+ right: extraPadding,
26231
+ bottom: extraPadding,
26232
+ backgroundColor: backgroundColor,
26233
+ borderRadius: radius,
26234
+ opacity: decorationOpacity / 1.5,
26235
+ transform: "scale(" + decorationScale + ")",
26236
+ pointerEvents: "none",
26237
+ zIndex: 1
26238
+ }, views == null ? void 0 : views.back)), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
26239
+ position: "absolute",
26240
+ top: extraPadding,
26241
+ left: extraPadding,
26242
+ right: extraPadding,
26243
+ bottom: extraPadding,
26244
+ transform: "rotate(" + decorationRotation + "deg) scale(" + decorationScale + ")",
26245
+ opacity: decorationOpacity / 1.2,
26246
+ backgroundColor: backgroundColor,
26247
+ borderRadius: radius,
26248
+ pointerEvents: "none",
26249
+ zIndex: 2
26250
+ }, views == null ? void 0 : views.front)), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
26251
+ margin: "0 auto",
26252
+ //width="100%"
26253
+ position: "relative",
26254
+ zIndex: 3
26255
+ }, views == null ? void 0 : views.content), children)));
26256
+ });
26257
+ BackgroundLayout.displayName = 'Background.Layout';
26282
26258
  // Create the compound component
26283
26259
  var BackgroundView = BackgroundViewBase;
26284
26260
  // Attach compound components
@@ -26292,6 +26268,7 @@ BackgroundView.Image = BackgroundImage;
26292
26268
  BackgroundView.Video = BackgroundVideo;
26293
26269
  BackgroundView.Gradient = BackgroundGradient;
26294
26270
  BackgroundView.Overlay = BackgroundOverlay;
26271
+ BackgroundView.Layout = BackgroundLayout;
26295
26272
 
26296
26273
  /**
26297
26274
  * Background Component with compound pattern
@@ -26345,6 +26322,7 @@ var BackgroundComponent = /*#__PURE__*/React__default.forwardRef((props, ref) =>
26345
26322
  })));
26346
26323
  BackgroundComponent.displayName = 'Background';
26347
26324
  var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
26325
+ Layout: BackgroundView.Layout,
26348
26326
  Aurora: BackgroundView.Aurora,
26349
26327
  Meteors: BackgroundView.Meteors,
26350
26328
  Wall: BackgroundView.Wall,
@@ -26444,7 +26422,7 @@ exports.HeartIcon = HeartIcon;
26444
26422
  exports.HelpIcon = HelpIcon;
26445
26423
  exports.HomeIcon = HomeIcon;
26446
26424
  exports.HoverCard = HoverCard;
26447
- exports.Icon = Icon$1;
26425
+ exports.Icon = Icon;
26448
26426
  exports.ImageIcon = ImageIcon;
26449
26427
  exports.InfoIcon = InfoIcon;
26450
26428
  exports.InstagramIcon = InstagramIcon;