myshell-react-lib 0.1.5 → 0.1.6

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 (145) hide show
  1. package/dist/index.cjs +50 -2
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +6 -1
  4. package/dist/index.js.map +1 -1
  5. package/package.json +1 -2
  6. package/src/common/assets/audio-playing.json +0 -3657
  7. package/src/common/constants/constants.ts +0 -24
  8. package/src/common/constants/types/common.ts +0 -10
  9. package/src/common/hooks/useAudioPlayer.tsx +0 -198
  10. package/src/common/hooks/useDevice.ts +0 -26
  11. package/src/common/hooks/useNativeBridge.ts +0 -42
  12. package/src/common/hooks/useNotification.tsx +0 -179
  13. package/src/common/hooks/useWindowWidth.ts +0 -19
  14. package/src/common/utils/common-helper.ts +0 -81
  15. package/src/components/ItemDemo.tsx +0 -15
  16. package/src/components/accordion.tsx +0 -126
  17. package/src/components/alert-dialog.tsx +0 -148
  18. package/src/components/alert.tsx +0 -65
  19. package/src/components/aspect-ratio.tsx +0 -7
  20. package/src/components/audio-player.tsx +0 -60
  21. package/src/components/audio-playing.tsx +0 -33
  22. package/src/components/avatar.tsx +0 -133
  23. package/src/components/badge.tsx +0 -67
  24. package/src/components/button/button.styles.ts +0 -258
  25. package/src/components/button/button.tsx +0 -215
  26. package/src/components/button/icon-button.styles.ts +0 -103
  27. package/src/components/button/icon-button.tsx +0 -100
  28. package/src/components/button/index.tsx +0 -3
  29. package/src/components/button/link-button.tsx +0 -184
  30. package/src/components/cascader.tsx +0 -175
  31. package/src/components/checkbox.tsx +0 -135
  32. package/src/components/command.tsx +0 -155
  33. package/src/components/context-menu.tsx +0 -198
  34. package/src/components/count-down.tsx +0 -83
  35. package/src/components/custom-notification.tsx +0 -95
  36. package/src/components/dialog.tsx +0 -158
  37. package/src/components/drawer.tsx +0 -116
  38. package/src/components/dropdown-menu.tsx +0 -196
  39. package/src/components/energy-progress.tsx +0 -55
  40. package/src/components/form.tsx +0 -201
  41. package/src/components/group.tsx +0 -9
  42. package/src/components/guide.tsx +0 -243
  43. package/src/components/icon.tsx +0 -96
  44. package/src/components/icons/index.tsx +0 -13
  45. package/src/components/icons/outline/ArrowLeftIcon.tsx +0 -28
  46. package/src/components/icons/outline/ArrowUpTrayIcon.tsx +0 -28
  47. package/src/components/icons/outline/CheckCircleIcon.tsx +0 -27
  48. package/src/components/icons/outline/ConfigIcon.tsx +0 -42
  49. package/src/components/icons/outline/DownIcon.tsx +0 -18
  50. package/src/components/icons/outline/FilterIcon.tsx +0 -20
  51. package/src/components/icons/outline/PencilSquareIcon.tsx +0 -28
  52. package/src/components/icons/outline/WindowIcon.tsx +0 -26
  53. package/src/components/icons/solid/CaretDownIcon.tsx +0 -22
  54. package/src/components/icons/solid/CodeIcon.tsx +0 -25
  55. package/src/components/icons/solid/DragIcon.tsx +0 -24
  56. package/src/components/icons/solid/PhoneIcon.tsx +0 -29
  57. package/src/components/icons/solid/RectangleGroupIcon.tsx +0 -26
  58. package/src/components/image.tsx +0 -152
  59. package/src/components/input.tsx +0 -118
  60. package/src/components/label.tsx +0 -26
  61. package/src/components/link.tsx +0 -123
  62. package/src/components/marquee/index.css +0 -15
  63. package/src/components/marquee/marquee.tsx +0 -220
  64. package/src/components/masonry.tsx +0 -138
  65. package/src/components/menubar.tsx +0 -234
  66. package/src/components/mobile/m-tooltip.tsx +0 -34
  67. package/src/components/modal.tsx +0 -561
  68. package/src/components/navigation-bar.tsx +0 -100
  69. package/src/components/number-input.tsx +0 -143
  70. package/src/components/page-content.tsx +0 -16
  71. package/src/components/popover.tsx +0 -191
  72. package/src/components/progress.tsx +0 -80
  73. package/src/components/radio-group.tsx +0 -44
  74. package/src/components/scroll-area.tsx +0 -49
  75. package/src/components/search-bar.tsx +0 -140
  76. package/src/components/secondary-navigation-bar.tsx +0 -328
  77. package/src/components/select.tsx +0 -273
  78. package/src/components/separator.tsx +0 -31
  79. package/src/components/sheet.tsx +0 -143
  80. package/src/components/skeleton.tsx +0 -20
  81. package/src/components/slider.tsx +0 -160
  82. package/src/components/spinner.tsx +0 -50
  83. package/src/components/swiper/index.module.scss +0 -88
  84. package/src/components/swiper/index.tsx +0 -319
  85. package/src/components/switch.tsx +0 -67
  86. package/src/components/tabs.tsx +0 -325
  87. package/src/components/textarea.tsx +0 -71
  88. package/src/components/toast/toast.tsx +0 -182
  89. package/src/components/toast/toaster.tsx +0 -160
  90. package/src/components/toast/use-toast.tsx +0 -248
  91. package/src/components/toggle-group.tsx +0 -64
  92. package/src/components/toggle.tsx +0 -46
  93. package/src/components/tooltip.tsx +0 -283
  94. package/src/components/typography.tsx +0 -437
  95. package/src/index.ts +0 -70
  96. package/src/lib/utils.ts +0 -62
  97. package/src/stories/Accordion.stories.tsx +0 -64
  98. package/src/stories/AccordionItem.stories.tsx +0 -48
  99. package/src/stories/Avatar.stories.ts +0 -58
  100. package/src/stories/Badge.stories.tsx +0 -40
  101. package/src/stories/BannerSwiper.stories.tsx +0 -102
  102. package/src/stories/Button.stories.tsx +0 -543
  103. package/src/stories/Checkbox.stories.tsx +0 -161
  104. package/src/stories/Configure.mdx +0 -341
  105. package/src/stories/CssProperties.mdx +0 -30
  106. package/src/stories/Description.stories.ts +0 -70
  107. package/src/stories/Display.stories.ts +0 -64
  108. package/src/stories/FeaturedSwiper.stories.tsx +0 -6978
  109. package/src/stories/GridSwiper.stories.tsx +0 -1407
  110. package/src/stories/Guide.stories.tsx +0 -247
  111. package/src/stories/Heading.stories.ts +0 -89
  112. package/src/stories/Icon.stories.ts +0 -77
  113. package/src/stories/IconButton.stories.tsx +0 -301
  114. package/src/stories/IconTextButton.stories.ts +0 -59
  115. package/src/stories/Image.stories.ts +0 -55
  116. package/src/stories/Input.stories.tsx +0 -203
  117. package/src/stories/Modal.stories.tsx +0 -144
  118. package/src/stories/NavigationBar.stories.tsx +0 -81
  119. package/src/stories/Notification.stories.tsx +0 -276
  120. package/src/stories/Popover.stories.tsx +0 -100
  121. package/src/stories/SearchBar.stories.ts +0 -43
  122. package/src/stories/SecondaryNavigationBar.stories.tsx +0 -199
  123. package/src/stories/Select.stories.tsx +0 -107
  124. package/src/stories/Separator.stories.tsx +0 -49
  125. package/src/stories/Spinner.stories.tsx +0 -48
  126. package/src/stories/SubHeading.stories.ts +0 -64
  127. package/src/stories/Swich.stories.tsx +0 -69
  128. package/src/stories/Tabs.stories.tsx +0 -90
  129. package/src/stories/Text.stories.ts +0 -78
  130. package/src/stories/Textarea.stories.tsx +0 -155
  131. package/src/stories/Toast.stories.tsx +0 -424
  132. package/src/stories/Tooltip.stories.tsx +0 -244
  133. package/src/stories/ViewAutoSwiper.stories.tsx +0 -1408
  134. package/src/styles/components-dark.scss +0 -212
  135. package/src/styles/components-light.scss +0 -210
  136. package/src/styles/design-dark.scss +0 -330
  137. package/src/styles/design-light.scss +0 -345
  138. package/src/styles/design2-dark.scss +0 -319
  139. package/src/styles/design2-light.scss +0 -364
  140. package/src/styles/font.css +0 -19
  141. package/src/styles/global.scss +0 -251
  142. package/src/styles/md-viewer.scss +0 -155
  143. package/src/styles/new-tokens.scss +0 -255
  144. package/src/styles/tokens.scss +0 -401
  145. package/src/types/scss.d.ts +0 -24
@@ -1,143 +0,0 @@
1
- 'use client';
2
-
3
- import * as SheetPrimitive from '@radix-ui/react-dialog';
4
- import { cva, type VariantProps } from 'class-variance-authority';
5
- import { X } from 'lucide-react';
6
- import * as React from 'react';
7
-
8
- import { cn } from '@/lib/utils';
9
-
10
- const Sheet = SheetPrimitive.Root;
11
-
12
- const SheetTrigger = SheetPrimitive.Trigger;
13
-
14
- const SheetClose = SheetPrimitive.Close;
15
-
16
- const SheetPortal = SheetPrimitive.Portal;
17
-
18
- const SheetOverlay = React.forwardRef<
19
- React.ElementRef<typeof SheetPrimitive.Overlay>,
20
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
21
- >(({ className, ...props }, ref) => (
22
- <SheetPrimitive.Overlay
23
- className={cn(
24
- 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
25
- className
26
- )}
27
- {...props}
28
- ref={ref}
29
- />
30
- ));
31
- SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
32
-
33
- const sheetVariants = cva(
34
- 'fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-slate-950',
35
- {
36
- variants: {
37
- side: {
38
- top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
39
- bottom:
40
- 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
41
- left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',
42
- right:
43
- 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',
44
- },
45
- },
46
- defaultVariants: {
47
- side: 'right',
48
- },
49
- }
50
- );
51
-
52
- interface SheetContentProps
53
- extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
54
- VariantProps<typeof sheetVariants> {}
55
-
56
- const SheetContent = React.forwardRef<
57
- React.ElementRef<typeof SheetPrimitive.Content>,
58
- SheetContentProps
59
- >(({ side = 'right', className, children, ...props }, ref) => (
60
- <SheetPortal>
61
- <SheetOverlay />
62
- <SheetPrimitive.Content
63
- ref={ref}
64
- className={cn(sheetVariants({ side }), className)}
65
- {...props}
66
- >
67
- {children}
68
- <SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-slate-100 dark:ring-offset-slate-950 dark:focus:ring-slate-300 dark:data-[state=open]:bg-slate-800">
69
- <X className="h-4 w-4" />
70
- <span className="sr-only">Close</span>
71
- </SheetPrimitive.Close>
72
- </SheetPrimitive.Content>
73
- </SheetPortal>
74
- ));
75
- SheetContent.displayName = SheetPrimitive.Content.displayName;
76
-
77
- const SheetHeader = ({
78
- className,
79
- ...props
80
- }: React.HTMLAttributes<HTMLDivElement>) => (
81
- <div
82
- className={cn(
83
- 'flex flex-col space-y-2 text-center sm:text-left',
84
- className
85
- )}
86
- {...props}
87
- />
88
- );
89
- SheetHeader.displayName = 'SheetHeader';
90
-
91
- const SheetFooter = ({
92
- className,
93
- ...props
94
- }: React.HTMLAttributes<HTMLDivElement>) => (
95
- <div
96
- className={cn(
97
- 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
98
- className
99
- )}
100
- {...props}
101
- />
102
- );
103
- SheetFooter.displayName = 'SheetFooter';
104
-
105
- const SheetTitle = React.forwardRef<
106
- React.ElementRef<typeof SheetPrimitive.Title>,
107
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
108
- >(({ className, ...props }, ref) => (
109
- <SheetPrimitive.Title
110
- ref={ref}
111
- className={cn(
112
- 'text-lg font-semibold text-slate-950 dark:text-slate-50',
113
- className
114
- )}
115
- {...props}
116
- />
117
- ));
118
- SheetTitle.displayName = SheetPrimitive.Title.displayName;
119
-
120
- const SheetDescription = React.forwardRef<
121
- React.ElementRef<typeof SheetPrimitive.Description>,
122
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
123
- >(({ className, ...props }, ref) => (
124
- <SheetPrimitive.Description
125
- ref={ref}
126
- className={cn('text-sm text-slate-500 dark:text-slate-400', className)}
127
- {...props}
128
- />
129
- ));
130
- SheetDescription.displayName = SheetPrimitive.Description.displayName;
131
-
132
- export {
133
- Sheet,
134
- SheetPortal,
135
- SheetOverlay,
136
- SheetTrigger,
137
- SheetClose,
138
- SheetContent,
139
- SheetHeader,
140
- SheetFooter,
141
- SheetTitle,
142
- SheetDescription,
143
- };
@@ -1,20 +0,0 @@
1
- import { cn } from '@/lib/utils';
2
-
3
- function Skeleton({
4
- className,
5
- animate = true,
6
- ...props
7
- }: React.HTMLAttributes<HTMLDivElement> & { animate?: boolean }) {
8
- return (
9
- <div
10
- className={cn(
11
- 'rounded-md bg-Colors-Background-Normal-Secondary-Default',
12
- className,
13
- animate && 'animate-pulse'
14
- )}
15
- {...props}
16
- />
17
- );
18
- }
19
-
20
- export { Skeleton };
@@ -1,160 +0,0 @@
1
- 'use client';
2
-
3
- import * as SliderPrimitive from '@radix-ui/react-slider';
4
- import * as React from 'react';
5
- import { ClassNameValue } from 'tailwind-merge';
6
-
7
- import { cn } from '@/lib/utils';
8
-
9
- import { NumberInput } from './number-input';
10
-
11
- type Size = 'sm' | 'lg';
12
- const Slider = React.forwardRef<
13
- React.ElementRef<typeof SliderPrimitive.Root>,
14
- React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> & {
15
- size?: Size;
16
- }
17
- >(({ className, size = 'lg', ...props }, ref) => (
18
- <div className="w-full p-3 flex justify-center items-center h-10 rounded-lg border border-Colors-Border-Default bg-Colors-Background-Normal-Primary-Active shadow-background-default text-sm text-Colors-Text-Default ring-offset-cc-Focus-Rings-Brand-default hover:border-hovered hover:bg-surface-subtle aria-[invalid=true]:border-critical aria-[invalid=true]:hover:border-Colors-Border-Critical aria-[invalid=true]:hover:bg-surface-accent-red-subtlest aria-[invalid=true]:focus-visible:ring-error file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-Colors-Text-Subtler focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cc-Focus-Rings-Brand-default focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-30">
19
- <SliderPrimitive.Root
20
- ref={ref}
21
- className={cn(
22
- 'relative flex w-full touch-none select-none items-center',
23
- className
24
- )}
25
- {...props}
26
- >
27
- <SliderPrimitive.Track
28
- className={cn(
29
- 'relative w-full grow overflow-hidden rounded-full bg-Colors-Background-Neutral-Primary-Hover data-[disabled]:opacity-30',
30
- size === 'sm' ? 'h-0.5' : 'h-1.5'
31
- )}
32
- >
33
- <SliderPrimitive.Range className="absolute h-full bg-Colors-Background-Brand-Default data-[disabled]:opacity-30" />
34
- </SliderPrimitive.Track>
35
- <SliderPrimitive.Thumb
36
- className={cn(
37
- 'block rounded-full border-Colors-Utility-Lake-Blue-40 bg-Colors-Background-Normal-Primary-Default ring-offset-cc-Focus-Rings-Brand-default transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cc-Focus-Rings-Brand-default focus-visible:ring-offset-1 data-[disabled]:pointer-events-none data-[disabled]:opacity-30',
38
- size === 'sm' ? 'w-2 h-2 border-[1.5px]' : 'w-5 h-5 border-[3px]'
39
- )}
40
- />
41
- </SliderPrimitive.Root>
42
- </div>
43
- ));
44
- Slider.displayName = SliderPrimitive.Root.displayName;
45
-
46
- interface ISliderBaseProps
47
- extends React.RefAttributes<HTMLSpanElement>,
48
- Omit<
49
- SliderPrimitive.SliderProps,
50
- 'value' | 'defaultValue' | 'onValueChange' | 'onValueCommit'
51
- > {}
52
-
53
- interface ISliderSingleProps extends ISliderBaseProps {
54
- size?: Size;
55
- value?: number;
56
- defaultValue?: number;
57
- onValueChange?: (value: number) => void;
58
- onValueCommit?: (value: number) => void;
59
- // 是否展示输入框设置器
60
- settable?: boolean;
61
- // 容器样式
62
- containerClassName?: ClassNameValue;
63
- // 轨道样式
64
- trackClassName?: ClassNameValue;
65
- // 已选范围样式
66
- rangeClassName?: ClassNameValue;
67
- // 滑块样式
68
- thumbClassName?: ClassNameValue;
69
- }
70
-
71
- const SliderSingle = React.forwardRef<
72
- React.ElementRef<React.ForwardRefExoticComponent<ISliderSingleProps>>,
73
- React.ComponentPropsWithoutRef<
74
- React.ForwardRefExoticComponent<ISliderSingleProps>
75
- >
76
- >(
77
- (
78
- {
79
- className,
80
- containerClassName,
81
- trackClassName,
82
- rangeClassName,
83
- thumbClassName,
84
- size = 'lg',
85
- value,
86
- defaultValue,
87
- onValueChange,
88
- onValueCommit,
89
- settable = true,
90
- ...props
91
- },
92
- ref
93
- ) => (
94
- <div className="flex w-full items-center space-x-1.5">
95
- <div
96
- className={cn(
97
- 'w-full p-3 flex justify-center items-center h-10 rounded-lg border border-Colors-Border-Default bg-Colors-Background-Normal-Primary-Active shadow-background-default text-sm text-Colors-Text-Default ring-offset-cc-Focus-Rings-Brand-default hover:border-hovered hover:bg-surface-subtle aria-[invalid=true]:border-critical aria-[invalid=true]:hover:border-Colors-Border-Critical aria-[invalid=true]:hover:bg-surface-accent-red-subtlest aria-[invalid=true]:focus-visible:ring-error file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-Colors-Text-Subtler focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cc-Focus-Rings-Brand-default focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-30',
98
- containerClassName
99
- )}
100
- >
101
- <SliderPrimitive.Root
102
- ref={ref}
103
- className={cn(
104
- 'relative flex w-full touch-none select-none items-center',
105
- className
106
- )}
107
- value={typeof value === 'number' ? [value] : value}
108
- defaultValue={
109
- typeof defaultValue === 'number' ? [defaultValue] : defaultValue
110
- }
111
- onValueChange={(rootValue: number[]) =>
112
- onValueChange?.(rootValue?.[0])
113
- }
114
- onValueCommit={(rootValue: number[]) =>
115
- onValueCommit?.(rootValue?.[0])
116
- }
117
- {...props}
118
- >
119
- <SliderPrimitive.Track
120
- className={cn(
121
- 'relative w-full grow overflow-hidden rounded-full bg-Colors-Background-Neutral-Primary-Hover data-[disabled]:opacity-30',
122
- size === 'sm' ? 'h-0.5' : 'h-1.5',
123
- trackClassName
124
- )}
125
- >
126
- <SliderPrimitive.Range
127
- className={cn(
128
- 'absolute h-full bg-Colors-Background-Brand-Default data-[disabled]:opacity-30',
129
- rangeClassName
130
- )}
131
- />
132
- </SliderPrimitive.Track>
133
- <SliderPrimitive.Thumb
134
- className={cn(
135
- 'cursor-pointer block rounded-full border-Colors-Utility-Lake-Blue-40 bg-Colors-Background-Normal-Primary-Default ring-offset-cc-Focus-Rings-Brand-default transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cc-Focus-Rings-Brand-default focus-visible:ring-offset-1 data-[disabled]:pointer-events-none data-[disabled]:opacity-30',
136
- size === 'sm' ? 'w-2 h-2 border-[1.5px]' : 'w-5 h-5 border-[3px]',
137
- thumbClassName
138
- )}
139
- />
140
- </SliderPrimitive.Root>
141
- </div>
142
- {settable && (
143
- <div className="flex-shrink-0 w-14 h-9 flex justify-center items-center rounded-lg">
144
- <NumberInput
145
- value={value}
146
- min={props?.min}
147
- max={props?.max}
148
- step={props?.step}
149
- controls={false}
150
- defaultValue={defaultValue}
151
- onChange={(e) => onValueChange?.(Number(e.target.value))}
152
- />
153
- </div>
154
- )}
155
- </div>
156
- )
157
- );
158
- SliderSingle.displayName = 'SliderSingle';
159
-
160
- export { Slider, SliderSingle };
@@ -1,50 +0,0 @@
1
- import { VariantProps, cva } from 'class-variance-authority';
2
- import { Loader2 } from 'lucide-react';
3
- import { ClassNameValue } from 'tailwind-merge';
4
-
5
- import { cn } from '@/lib/utils';
6
-
7
- const spinnerVariants = cva('animate-spin', {
8
- variants: {
9
- size: {
10
- '2xs': 'h-3.5 w-3.5',
11
- xs: 'h-4 w-4',
12
- sm: 'h-5 w-5',
13
- md: 'h-6 w-6',
14
- xl: 'h-7 w-7',
15
- lg: 'h-9 w-9',
16
- },
17
- speed: {
18
- slow: 'duration-2000',
19
- default: 'duration-600',
20
- fast: 'duration-500',
21
- },
22
- color: {
23
- default: 'text-Colors-Text-Default',
24
- brand: 'text-Colors-Text-Brand-Default',
25
- static: 'text-Colors-Text-Static-White',
26
- warning: 'text-Colors-Text-Warning-Default',
27
- success: 'text-Colors-Text-Success-Default',
28
- },
29
- },
30
- defaultVariants: {
31
- size: 'md',
32
- speed: 'default',
33
- color: 'default',
34
- },
35
- });
36
- interface SpinnerProps extends VariantProps<typeof spinnerVariants> {
37
- className?: ClassNameValue;
38
- }
39
-
40
- function Spinner(props: SpinnerProps) {
41
- const { size, speed, color, className } = props;
42
-
43
- return (
44
- <Loader2
45
- className={cn(spinnerVariants({ size, speed, color }), className)}
46
- />
47
- );
48
- }
49
-
50
- export { Spinner };
@@ -1,88 +0,0 @@
1
- .swiperBox{
2
- @apply w-full h-fit;
3
-
4
- :global(.swiper) {
5
- :global(.swiper-button-prev){
6
- @apply bg-contain bg-no-repeat;
7
- background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0iIzQxNDM0NSIgY2xhc3M9InNpemUtNSI+CiAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTEuNzggNS4yMmEuNzUuNzUgMCAwIDEgMCAxLjA2TDguMDYgMTBsMy43MiAzLjcyYS43NS43NSAwIDEgMS0xLjA2IDEuMDZsLTQuMjUtNC4yNWEuNzUuNzUgMCAwIDEgMC0xLjA2bDQuMjUtNC4yNWEuNzUuNzUgMCAwIDEgMS4wNiAwWiIgY2xpcC1ydWxlPSJldmVub2RkIiAvPgo8L3N2Zz4K');
8
- }
9
- :global(.swiper-button-next){
10
- @apply bg-contain bg-no-repeat;
11
- background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0iIzQxNDM0NSIgY2xhc3M9InNpemUtNSI+CiAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC4yMiA1LjIyYS43NS43NSAwIDAgMSAxLjA2IDBsNC4yNSA0LjI1YS43NS43NSAwIDAgMSAwIDEuMDZsLTQuMjUgNC4yNWEuNzUuNzUgMCAwIDEtMS4wNi0xLjA2TDExLjk0IDEwIDguMjIgNi4yOGEuNzUuNzUgMCAwIDEgMC0xLjA2WiIgY2xpcC1ydWxlPSJldmVub2RkIiAvPgo8L3N2Zz4KCg==');
12
- }
13
- :global(.swiper-button-prev::after){
14
- @apply text-icon content-none;
15
- }
16
- :global(.swiper-button-next::after){
17
- @apply text-icon content-none;
18
- }
19
- }
20
- :global(.swiper.banner-swiper) {
21
- :global(.banner-swiper-slide.swiper-slide-prev) {
22
- // transform: scale(0.8);
23
- @apply origin-right;
24
- }
25
- :global(.banner-swiper-slide.swiper-slide-next) {
26
- // transform: scale(0.8);
27
- @apply origin-left;
28
- }
29
- :global(.swiper-slide-active) {
30
- @apply opacity-100;
31
- // transform: scale(1) translateX(0);
32
- }
33
- :global(.swiper-button-next){
34
- @apply -right-4 md:right-0 3xl:right-[calc((100%-1200px)/2-16px)];
35
- }
36
- :global(.swiper-button-prev){
37
- @apply -left-4 md:left-0 3xl:left-[calc((100%-1200px)/2-16px)];
38
- }
39
- }
40
- :global(.swiper.feature-swiper) {
41
- :global(.swiper-button-next){
42
- @apply right-0;
43
- }
44
- :global(.swiper-button-prev){
45
- @apply left-0;
46
- }
47
- :global(.swiper-button-disabled) {
48
- @apply hidden;
49
- }
50
- }
51
- :global(.swiper.patron-badge-swiper) {
52
- :global(.swiper-button-next){
53
- @apply right-0;
54
- }
55
- :global(.swiper-button-prev){
56
- @apply left-0;
57
- }
58
- :global(.swiper-button-disabled) {
59
- @apply hidden;
60
- }
61
- }
62
- :global(.swiper.grid-swiper) {
63
- :global(.swiper-wrapper) {
64
- @apply w-[100vw] md:w-full flex-wrap flex-col m-0;
65
- }
66
- }
67
- :global(.swiper) {
68
-
69
- :global(.swiper-button-next){
70
- @apply hidden md:flex justify-center items-center absolute top-[50%] w-8 h-8 font-semibold text-icon border border-Colors-Border-Default bg-Colors-Background-Normal-Primary-Default rounded-full cursor-pointer hover:bg-surface-hovered active:bg-Colors-Background-Normal-Primary-Active;
71
- &::after {
72
- @apply text-icon text-xs font-bold;
73
- }
74
- }
75
- :global(.swiper-button-prev){
76
- @apply hidden md:flex justify-center items-center absolute top-[50%] w-8 h-8 font-semibold text-icon border border-Colors-Border-Default bg-Colors-Background-Normal-Primary-Default rounded-full cursor-pointer hover:bg-surface-hovered active:bg-Colors-Background-Normal-Primary-Active;
77
- &::after {
78
- @apply text-icon text-xs font-bold;
79
- }
80
- }
81
- }
82
- }
83
-
84
- .animate {
85
- :global(.swiper-slide) {
86
- transition: transform 500ms linear;
87
- }
88
- }