lupine.components 1.1.55 → 1.1.56
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/LICENSE +21 -21
- package/package.json +1 -1
- package/src/component-pool/aspect-ratio/aspect-ratio-demo.tsx +103 -103
- package/src/component-pool/avatar/avatar-demo.tsx +127 -127
- package/src/component-pool/badge/badge-demo.tsx +152 -152
- package/src/component-pool/breadcrumbs/breadcrumbs-demo.tsx +105 -105
- package/src/component-pool/card/card-demo.tsx +179 -179
- package/src/component-pool/carousel/carousel-demo.tsx +191 -191
- package/src/component-pool/cascader/cascader-demo.tsx +127 -127
- package/src/component-pool/charts/area-chart-demo.tsx +106 -106
- package/src/component-pool/charts/area-chart.tsx +254 -254
- package/src/component-pool/charts/bar-chart-demo.tsx +107 -107
- package/src/component-pool/charts/bar-chart.tsx +223 -223
- package/src/component-pool/charts/chart-utils.ts +182 -182
- package/src/component-pool/charts/column-chart-demo.tsx +111 -111
- package/src/component-pool/charts/column-chart.tsx +230 -230
- package/src/component-pool/charts/donut-chart-demo.tsx +112 -112
- package/src/component-pool/charts/donut-chart.tsx +6 -6
- package/src/component-pool/charts/gauge-chart-demo.tsx +101 -101
- package/src/component-pool/charts/gauge-chart.tsx +117 -117
- package/src/component-pool/charts/index.ts +19 -19
- package/src/component-pool/charts/line-chart-demo.tsx +109 -109
- package/src/component-pool/charts/line-chart.tsx +233 -233
- package/src/component-pool/charts/pie-chart-demo.tsx +133 -133
- package/src/component-pool/charts/pie-chart.tsx +142 -142
- package/src/component-pool/charts/radar-chart-demo.tsx +88 -88
- package/src/component-pool/charts/radar-chart.tsx +231 -231
- package/src/component-pool/charts/scatter-chart-demo.tsx +88 -88
- package/src/component-pool/charts/scatter-chart.tsx +237 -237
- package/src/component-pool/copy-button/copy-button-demo.tsx +71 -71
- package/src/component-pool/date-picker/date-picker-demo.tsx +84 -84
- package/src/component-pool/date-picker/date-picker.tsx +437 -437
- package/src/component-pool/date-picker/index.ts +2 -2
- package/src/component-pool/floating-icon-menu/floating-icon-menu-demo.tsx +94 -94
- package/src/component-pool/floating-icon-menu/floating-icon-menu.tsx +241 -241
- package/src/component-pool/floating-icon-menu/index.ts +2 -2
- package/src/component-pool/h-editor/h-editor-demo.tsx +112 -112
- package/src/component-pool/h-editor/h-editor.ts +862 -862
- package/src/component-pool/h-editor/index.ts +2 -2
- package/src/component-pool/i-editor/i-editor-demo.tsx +72 -72
- package/src/component-pool/i-editor/i-editor-frames.ts +42 -42
- package/src/component-pool/i-editor/i-editor-styles.ts +22 -22
- package/src/component-pool/i-editor/i-editor.ts +3869 -3869
- package/src/component-pool/i-editor/index.ts +2 -2
- package/src/component-pool/map-wrapper/map-wrapper-demo.tsx +55 -55
- package/src/component-pool/p-editor/index.ts +4 -4
- package/src/component-pool/p-editor/p-editor-demo.tsx +51 -51
- package/src/component-pool/p-editor/p-editor-styles.ts +44 -44
- package/src/component-pool/p-editor/p-editor-types.ts +4 -4
- package/src/component-pool/p-editor/p-editor-utils.ts +38 -38
- package/src/component-pool/p-editor/p-editor.ts +2477 -2477
- package/src/component-pool/pdf-viewer/index.ts +2 -2
- package/src/component-pool/pdf-viewer/pdf-viewer-demo.tsx +116 -116
- package/src/component-pool/pdf-viewer/pdf-viewer.tsx +56 -56
- package/src/component-pool/picker-helper.tsx +222 -222
- package/src/component-pool/pull-to-refresh/pull-to-refresh-demo.tsx +99 -99
- package/src/component-pool/qrcode/index.ts +3 -3
- package/src/component-pool/qrcode/qrcode-demo.tsx +102 -102
- package/src/component-pool/qrcode/qrcode.tsx +169 -169
- package/src/component-pool/radial-progress/index.ts +2 -2
- package/src/component-pool/radial-progress/radial-progress-demo.tsx +84 -84
- package/src/component-pool/radial-progress/radial-progress.tsx +118 -118
- package/src/component-pool/range/gauge-demo.tsx +113 -113
- package/src/component-pool/range/gauge.tsx +392 -392
- package/src/component-pool/range/range-demo.tsx +97 -97
- package/src/component-pool/search-input/index.ts +2 -2
- package/src/component-pool/search-input/search-input-demo.tsx +50 -50
- package/src/component-pool/search-input/search-input.tsx +125 -125
- package/src/component-pool/skeleton/skeleton-card.tsx +114 -114
- package/src/component-pool/skeleton/skeleton-demo.tsx +55 -55
- package/src/component-pool/svg-icons.ts +95 -95
- package/src/component-pool/svg-props.tsx +144 -144
- package/src/component-pool/tag-input/index.ts +2 -2
- package/src/component-pool/tag-input/tag-input-demo.tsx +47 -47
- package/src/component-pool/tag-input/tag-input.tsx +166 -166
- package/src/component-pool/time-picker/index.ts +2 -2
- package/src/component-pool/time-picker/time-picker-demo.tsx +80 -80
- package/src/component-pool/time-picker/time-picker.tsx +311 -311
- package/src/component-pool/timeline/timeline-demo.tsx +75 -75
- package/src/component-pool/tooltip/tooltip-demo.tsx +144 -144
- package/src/component-pool/tour/tour-demo.tsx +92 -92
- package/src/component-pool/youtube-player/index.ts +2 -2
- package/src/component-pool/youtube-player/youtube-player-demo.tsx +57 -57
- package/src/component-pool/youtube-player/youtube-player.tsx +116 -116
- package/src/components/action-sheet-color.tsx +269 -269
- package/src/components/action-sheet-date.tsx +299 -299
- package/src/components/action-sheet-demo.tsx +216 -216
- package/src/components/action-sheet-theme.tsx +150 -150
- package/src/components/action-sheet-time.tsx +157 -157
- package/src/components/input-number.tsx +206 -206
- package/src/components/input-with-title-demo.tsx +42 -42
- package/src/components/loading-spin.tsx +74 -74
- package/src/components/message-box-demo.tsx +107 -107
- package/src/components/mobile-components/mobile-side-menu-demo.tsx +47 -47
- package/src/components/modal-demo.tsx +56 -56
- package/src/components/notice-message-demo.tsx +57 -57
- package/src/components/paging-link-demo.tsx +430 -430
- package/src/components/popup-menu-demo.tsx +172 -172
- package/src/components/progress-demo.tsx +53 -53
- package/src/components/radio-label-demo.tsx +41 -41
- package/src/components/redirect-demo.tsx +36 -36
- package/src/components/resizable-splitter-demo.tsx +104 -104
- package/src/components/select-angle-demo.tsx +32 -32
- package/src/components/select-with-title-demo.tsx +53 -53
- package/src/components/slide-tab-component-demo.tsx +86 -86
- package/src/components/spinner-demo.tsx +52 -52
- package/src/components/stars-component-demo.tsx +36 -36
- package/src/components/switch-option-component.tsx +74 -74
- package/src/components/switch-option-demo.tsx +36 -36
- package/src/components/tabs-demo.tsx +42 -42
- package/src/components/text-glow-demo.tsx +46 -46
- package/src/components/text-scale-demo.tsx +41 -41
- package/src/components/text-wave-demo.tsx +48 -48
- package/src/components/toggle-button-demo.tsx +230 -230
- package/src/demo/demo-page.tsx +271 -271
- package/src/demo/demo-registry.ts +143 -143
- package/src/demo/demo-render-page.tsx +94 -94
- package/src/demo/demo-types.ts +22 -22
- package/src/demo/mock/demo-icons.ts +72 -72
- package/src/demo/mock/responsive-demo-mock-pages.tsx +197 -197
- package/src/demo/mock/side-menu-mock.tsx +113 -113
- package/src/demo/mock/user-settings-mock.tsx +310 -310
- package/src/frames/responsive-frame-demo.tsx +120 -120
- package/src/frames/slider-frame-demo.tsx +111 -111
- package/src/frames/slider-helper.tsx +194 -194
- package/src/lib/button-async-lock.tsx +43 -43
- package/src/lib/canvas/canvas-drawing.ts +503 -503
- package/src/lib/canvas/canvas-geometry.ts +255 -255
- package/src/lib/canvas/canvas-helper.tsx +176 -176
- package/src/lib/canvas/canvas-image.ts +110 -110
- package/src/lib/canvas/canvas-types.ts +93 -93
- package/src/lib/canvas/index.ts +5 -5
- package/src/lib/disable-console.ts +11 -11
- package/src/lib/disable-debug.ts +8 -8
- package/src/lib/support-safe-area.ts +25 -25
- package/tsconfig.json +113 -113
|
@@ -1,191 +1,191 @@
|
|
|
1
|
-
import { Carousel } from './carousel';
|
|
2
|
-
import { Card } from '../card';
|
|
3
|
-
import { Avatar } from '../avatar';
|
|
4
|
-
import { DemoStory } from '../../demo/demo-types';
|
|
5
|
-
|
|
6
|
-
export const carouselDemo: DemoStory<any> = {
|
|
7
|
-
id: 'carouselDemo',
|
|
8
|
-
text: 'Carousel',
|
|
9
|
-
args: {
|
|
10
|
-
showDots: true,
|
|
11
|
-
showArrows: true,
|
|
12
|
-
autoplay: false,
|
|
13
|
-
interval: 4000,
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
showDots: { control: 'boolean' },
|
|
17
|
-
showArrows: { control: 'boolean' },
|
|
18
|
-
autoplay: { control: 'boolean' },
|
|
19
|
-
interval: { control: 'number' },
|
|
20
|
-
},
|
|
21
|
-
render: (args: any) => {
|
|
22
|
-
const css = {
|
|
23
|
-
display: 'flex',
|
|
24
|
-
flexDirection: 'column',
|
|
25
|
-
gap: '48px',
|
|
26
|
-
padding: '24px',
|
|
27
|
-
'.section-title': {
|
|
28
|
-
fontSize: '22px',
|
|
29
|
-
fontWeight: 'bold',
|
|
30
|
-
marginBottom: '20px',
|
|
31
|
-
color: 'var(--primary-color)',
|
|
32
|
-
borderBottom: '2px solid var(--primary-border, #eee)',
|
|
33
|
-
paddingBottom: '10px',
|
|
34
|
-
},
|
|
35
|
-
'.carousel-container': {
|
|
36
|
-
maxWidth: '800px',
|
|
37
|
-
margin: '0 auto',
|
|
38
|
-
// backgroundColor: '#fff',
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const productCards = [
|
|
43
|
-
<Card
|
|
44
|
-
cover={<img src='https://picsum.photos/seed/c1/800/400' style={{ height: '300px', objectFit: 'cover' }} />}
|
|
45
|
-
title='Professional Violin'
|
|
46
|
-
description='Handcrafted in Italy using aged spruce and maple. Exceptional tone quality for soloists.'
|
|
47
|
-
footer={
|
|
48
|
-
<button
|
|
49
|
-
style={{
|
|
50
|
-
width: '100%',
|
|
51
|
-
padding: '12px',
|
|
52
|
-
backgroundColor: 'var(--secondary-bg-color)',
|
|
53
|
-
color: 'var(--secondary-color)',
|
|
54
|
-
border: 'none',
|
|
55
|
-
borderRadius: '6px',
|
|
56
|
-
}}
|
|
57
|
-
>
|
|
58
|
-
View Detail
|
|
59
|
-
</button>
|
|
60
|
-
}
|
|
61
|
-
/>,
|
|
62
|
-
<Card
|
|
63
|
-
cover={<img src='https://picsum.photos/seed/c2/800/400' style={{ height: '300px', objectFit: 'cover' }} />}
|
|
64
|
-
title='Modern Cello'
|
|
65
|
-
description='Deep, resonant sound with excellent projection. Perfect for advanced students and conservatory levels.'
|
|
66
|
-
footer={
|
|
67
|
-
<button
|
|
68
|
-
style={{
|
|
69
|
-
width: '100%',
|
|
70
|
-
padding: '12px',
|
|
71
|
-
backgroundColor: 'var(--secondary-bg-color)',
|
|
72
|
-
color: 'var(--secondary-color)',
|
|
73
|
-
border: 'none',
|
|
74
|
-
borderRadius: '6px',
|
|
75
|
-
}}
|
|
76
|
-
>
|
|
77
|
-
View Detail
|
|
78
|
-
</button>
|
|
79
|
-
}
|
|
80
|
-
/>,
|
|
81
|
-
<Card
|
|
82
|
-
cover={<img src='https://picsum.photos/seed/c3/800/400' style={{ height: '300px', objectFit: 'cover' }} />}
|
|
83
|
-
title='Premium Bow Collection'
|
|
84
|
-
description='Graphite and Pernambuco sticks carefully balanced for professional requirements.'
|
|
85
|
-
footer={
|
|
86
|
-
<button
|
|
87
|
-
style={{
|
|
88
|
-
width: '100%',
|
|
89
|
-
padding: '12px',
|
|
90
|
-
backgroundColor: 'var(--secondary-bg-color)',
|
|
91
|
-
color: 'var(--secondary-color)',
|
|
92
|
-
border: 'none',
|
|
93
|
-
borderRadius: '6px',
|
|
94
|
-
}}
|
|
95
|
-
>
|
|
96
|
-
View Detail
|
|
97
|
-
</button>
|
|
98
|
-
}
|
|
99
|
-
/>,
|
|
100
|
-
];
|
|
101
|
-
|
|
102
|
-
const profileCards = [
|
|
103
|
-
<Card
|
|
104
|
-
horizontal
|
|
105
|
-
avatar={<Avatar src='https://picsum.photos/seed/p1/200' size='xl' online />}
|
|
106
|
-
title='Master Wang'
|
|
107
|
-
description='Famous violinist with 40 years of teaching experience. Specialized in Paganini Caprices.'
|
|
108
|
-
/>,
|
|
109
|
-
<Card
|
|
110
|
-
horizontal
|
|
111
|
-
avatar={<Avatar src='https://picsum.photos/seed/p2/200' size='xl' status='busy' />}
|
|
112
|
-
title='Dr. Emily Chen'
|
|
113
|
-
description='Orchestral director and chamber music expert. PhD from Juilliard School.'
|
|
114
|
-
/>,
|
|
115
|
-
<Card
|
|
116
|
-
horizontal
|
|
117
|
-
avatar={<Avatar src='https://picsum.photos/seed/p3/200' size='xl' online />}
|
|
118
|
-
title='Sarkis Baghdassarian'
|
|
119
|
-
description='Concertmaster of the Lupine Symphony. Renowned for rich vibrato and technical precision.'
|
|
120
|
-
/>,
|
|
121
|
-
];
|
|
122
|
-
|
|
123
|
-
return (
|
|
124
|
-
<div css={css}>
|
|
125
|
-
<section>
|
|
126
|
-
<div class='section-title'>Product Showreel (Arrows + Dots)</div>
|
|
127
|
-
<div class='carousel-container'>
|
|
128
|
-
<Carousel {...args}>{productCards}</Carousel>
|
|
129
|
-
</div>
|
|
130
|
-
</section>
|
|
131
|
-
|
|
132
|
-
<section>
|
|
133
|
-
<div class='section-title'>Instructor Highlights (Dots Only)</div>
|
|
134
|
-
<div class='carousel-container'>
|
|
135
|
-
<Carousel showDots={true} showArrows={false} autoplay={args.autoplay}>
|
|
136
|
-
{profileCards}
|
|
137
|
-
</Carousel>
|
|
138
|
-
</div>
|
|
139
|
-
</section>
|
|
140
|
-
|
|
141
|
-
<section>
|
|
142
|
-
<div class='section-title'>Mixed Content Carousel</div>
|
|
143
|
-
<div class='carousel-container'>
|
|
144
|
-
<Carousel showDots={false} showArrows={true} autoplay={args.autoplay}>
|
|
145
|
-
<div
|
|
146
|
-
style={{
|
|
147
|
-
height: '300px',
|
|
148
|
-
display: 'flex',
|
|
149
|
-
alignItems: 'center',
|
|
150
|
-
justifyContent: 'center',
|
|
151
|
-
backgroundColor: 'var(--secondary-bg-color, #f0f4f8)',
|
|
152
|
-
color: 'var(--primary-color, #2c3e50)',
|
|
153
|
-
fontSize: '24px',
|
|
154
|
-
}}
|
|
155
|
-
>
|
|
156
|
-
Custom HTML Slide 1
|
|
157
|
-
</div>
|
|
158
|
-
<Card
|
|
159
|
-
title='Integrated Card Slide'
|
|
160
|
-
description='This card is directly integrated as a slide in the carousel.'
|
|
161
|
-
cover={
|
|
162
|
-
<img src='https://picsum.photos/seed/m1/800/400' style={{ height: '200px', objectFit: 'cover' }} />
|
|
163
|
-
}
|
|
164
|
-
/>
|
|
165
|
-
<div
|
|
166
|
-
style={{
|
|
167
|
-
height: '300px',
|
|
168
|
-
display: 'flex',
|
|
169
|
-
alignItems: 'center',
|
|
170
|
-
justifyContent: 'center',
|
|
171
|
-
backgroundColor: 'var(--success-bg-color, #e8f5e9)',
|
|
172
|
-
color: 'var(--success-color, #2e7d32)',
|
|
173
|
-
fontSize: '24px',
|
|
174
|
-
}}
|
|
175
|
-
>
|
|
176
|
-
Custom HTML Slide 3
|
|
177
|
-
</div>
|
|
178
|
-
</Carousel>
|
|
179
|
-
</div>
|
|
180
|
-
</section>
|
|
181
|
-
</div>
|
|
182
|
-
);
|
|
183
|
-
},
|
|
184
|
-
code: `import { Carousel } from 'lupine.components/component-pool';
|
|
185
|
-
|
|
186
|
-
<Carousel showDots={true} showArrows={true} autoplay={true} interval={4000}>
|
|
187
|
-
<div class="slide">Slide 1</div>
|
|
188
|
-
<div class="slide">Slide 2</div>
|
|
189
|
-
</Carousel>
|
|
190
|
-
`,
|
|
191
|
-
};
|
|
1
|
+
import { Carousel } from './carousel';
|
|
2
|
+
import { Card } from '../card';
|
|
3
|
+
import { Avatar } from '../avatar';
|
|
4
|
+
import { DemoStory } from '../../demo/demo-types';
|
|
5
|
+
|
|
6
|
+
export const carouselDemo: DemoStory<any> = {
|
|
7
|
+
id: 'carouselDemo',
|
|
8
|
+
text: 'Carousel',
|
|
9
|
+
args: {
|
|
10
|
+
showDots: true,
|
|
11
|
+
showArrows: true,
|
|
12
|
+
autoplay: false,
|
|
13
|
+
interval: 4000,
|
|
14
|
+
},
|
|
15
|
+
argTypes: {
|
|
16
|
+
showDots: { control: 'boolean' },
|
|
17
|
+
showArrows: { control: 'boolean' },
|
|
18
|
+
autoplay: { control: 'boolean' },
|
|
19
|
+
interval: { control: 'number' },
|
|
20
|
+
},
|
|
21
|
+
render: (args: any) => {
|
|
22
|
+
const css = {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
flexDirection: 'column',
|
|
25
|
+
gap: '48px',
|
|
26
|
+
padding: '24px',
|
|
27
|
+
'.section-title': {
|
|
28
|
+
fontSize: '22px',
|
|
29
|
+
fontWeight: 'bold',
|
|
30
|
+
marginBottom: '20px',
|
|
31
|
+
color: 'var(--primary-color)',
|
|
32
|
+
borderBottom: '2px solid var(--primary-border, #eee)',
|
|
33
|
+
paddingBottom: '10px',
|
|
34
|
+
},
|
|
35
|
+
'.carousel-container': {
|
|
36
|
+
maxWidth: '800px',
|
|
37
|
+
margin: '0 auto',
|
|
38
|
+
// backgroundColor: '#fff',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const productCards = [
|
|
43
|
+
<Card
|
|
44
|
+
cover={<img src='https://picsum.photos/seed/c1/800/400' style={{ height: '300px', objectFit: 'cover' }} />}
|
|
45
|
+
title='Professional Violin'
|
|
46
|
+
description='Handcrafted in Italy using aged spruce and maple. Exceptional tone quality for soloists.'
|
|
47
|
+
footer={
|
|
48
|
+
<button
|
|
49
|
+
style={{
|
|
50
|
+
width: '100%',
|
|
51
|
+
padding: '12px',
|
|
52
|
+
backgroundColor: 'var(--secondary-bg-color)',
|
|
53
|
+
color: 'var(--secondary-color)',
|
|
54
|
+
border: 'none',
|
|
55
|
+
borderRadius: '6px',
|
|
56
|
+
}}
|
|
57
|
+
>
|
|
58
|
+
View Detail
|
|
59
|
+
</button>
|
|
60
|
+
}
|
|
61
|
+
/>,
|
|
62
|
+
<Card
|
|
63
|
+
cover={<img src='https://picsum.photos/seed/c2/800/400' style={{ height: '300px', objectFit: 'cover' }} />}
|
|
64
|
+
title='Modern Cello'
|
|
65
|
+
description='Deep, resonant sound with excellent projection. Perfect for advanced students and conservatory levels.'
|
|
66
|
+
footer={
|
|
67
|
+
<button
|
|
68
|
+
style={{
|
|
69
|
+
width: '100%',
|
|
70
|
+
padding: '12px',
|
|
71
|
+
backgroundColor: 'var(--secondary-bg-color)',
|
|
72
|
+
color: 'var(--secondary-color)',
|
|
73
|
+
border: 'none',
|
|
74
|
+
borderRadius: '6px',
|
|
75
|
+
}}
|
|
76
|
+
>
|
|
77
|
+
View Detail
|
|
78
|
+
</button>
|
|
79
|
+
}
|
|
80
|
+
/>,
|
|
81
|
+
<Card
|
|
82
|
+
cover={<img src='https://picsum.photos/seed/c3/800/400' style={{ height: '300px', objectFit: 'cover' }} />}
|
|
83
|
+
title='Premium Bow Collection'
|
|
84
|
+
description='Graphite and Pernambuco sticks carefully balanced for professional requirements.'
|
|
85
|
+
footer={
|
|
86
|
+
<button
|
|
87
|
+
style={{
|
|
88
|
+
width: '100%',
|
|
89
|
+
padding: '12px',
|
|
90
|
+
backgroundColor: 'var(--secondary-bg-color)',
|
|
91
|
+
color: 'var(--secondary-color)',
|
|
92
|
+
border: 'none',
|
|
93
|
+
borderRadius: '6px',
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
View Detail
|
|
97
|
+
</button>
|
|
98
|
+
}
|
|
99
|
+
/>,
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
const profileCards = [
|
|
103
|
+
<Card
|
|
104
|
+
horizontal
|
|
105
|
+
avatar={<Avatar src='https://picsum.photos/seed/p1/200' size='xl' online />}
|
|
106
|
+
title='Master Wang'
|
|
107
|
+
description='Famous violinist with 40 years of teaching experience. Specialized in Paganini Caprices.'
|
|
108
|
+
/>,
|
|
109
|
+
<Card
|
|
110
|
+
horizontal
|
|
111
|
+
avatar={<Avatar src='https://picsum.photos/seed/p2/200' size='xl' status='busy' />}
|
|
112
|
+
title='Dr. Emily Chen'
|
|
113
|
+
description='Orchestral director and chamber music expert. PhD from Juilliard School.'
|
|
114
|
+
/>,
|
|
115
|
+
<Card
|
|
116
|
+
horizontal
|
|
117
|
+
avatar={<Avatar src='https://picsum.photos/seed/p3/200' size='xl' online />}
|
|
118
|
+
title='Sarkis Baghdassarian'
|
|
119
|
+
description='Concertmaster of the Lupine Symphony. Renowned for rich vibrato and technical precision.'
|
|
120
|
+
/>,
|
|
121
|
+
];
|
|
122
|
+
|
|
123
|
+
return (
|
|
124
|
+
<div css={css}>
|
|
125
|
+
<section>
|
|
126
|
+
<div class='section-title'>Product Showreel (Arrows + Dots)</div>
|
|
127
|
+
<div class='carousel-container'>
|
|
128
|
+
<Carousel {...args}>{productCards}</Carousel>
|
|
129
|
+
</div>
|
|
130
|
+
</section>
|
|
131
|
+
|
|
132
|
+
<section>
|
|
133
|
+
<div class='section-title'>Instructor Highlights (Dots Only)</div>
|
|
134
|
+
<div class='carousel-container'>
|
|
135
|
+
<Carousel showDots={true} showArrows={false} autoplay={args.autoplay}>
|
|
136
|
+
{profileCards}
|
|
137
|
+
</Carousel>
|
|
138
|
+
</div>
|
|
139
|
+
</section>
|
|
140
|
+
|
|
141
|
+
<section>
|
|
142
|
+
<div class='section-title'>Mixed Content Carousel</div>
|
|
143
|
+
<div class='carousel-container'>
|
|
144
|
+
<Carousel showDots={false} showArrows={true} autoplay={args.autoplay}>
|
|
145
|
+
<div
|
|
146
|
+
style={{
|
|
147
|
+
height: '300px',
|
|
148
|
+
display: 'flex',
|
|
149
|
+
alignItems: 'center',
|
|
150
|
+
justifyContent: 'center',
|
|
151
|
+
backgroundColor: 'var(--secondary-bg-color, #f0f4f8)',
|
|
152
|
+
color: 'var(--primary-color, #2c3e50)',
|
|
153
|
+
fontSize: '24px',
|
|
154
|
+
}}
|
|
155
|
+
>
|
|
156
|
+
Custom HTML Slide 1
|
|
157
|
+
</div>
|
|
158
|
+
<Card
|
|
159
|
+
title='Integrated Card Slide'
|
|
160
|
+
description='This card is directly integrated as a slide in the carousel.'
|
|
161
|
+
cover={
|
|
162
|
+
<img src='https://picsum.photos/seed/m1/800/400' style={{ height: '200px', objectFit: 'cover' }} />
|
|
163
|
+
}
|
|
164
|
+
/>
|
|
165
|
+
<div
|
|
166
|
+
style={{
|
|
167
|
+
height: '300px',
|
|
168
|
+
display: 'flex',
|
|
169
|
+
alignItems: 'center',
|
|
170
|
+
justifyContent: 'center',
|
|
171
|
+
backgroundColor: 'var(--success-bg-color, #e8f5e9)',
|
|
172
|
+
color: 'var(--success-color, #2e7d32)',
|
|
173
|
+
fontSize: '24px',
|
|
174
|
+
}}
|
|
175
|
+
>
|
|
176
|
+
Custom HTML Slide 3
|
|
177
|
+
</div>
|
|
178
|
+
</Carousel>
|
|
179
|
+
</div>
|
|
180
|
+
</section>
|
|
181
|
+
</div>
|
|
182
|
+
);
|
|
183
|
+
},
|
|
184
|
+
code: `import { Carousel } from 'lupine.components/component-pool';
|
|
185
|
+
|
|
186
|
+
<Carousel showDots={true} showArrows={true} autoplay={true} interval={4000}>
|
|
187
|
+
<div class="slide">Slide 1</div>
|
|
188
|
+
<div class="slide">Slide 2</div>
|
|
189
|
+
</Carousel>
|
|
190
|
+
`,
|
|
191
|
+
};
|
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
import { Cascader } from './cascader';
|
|
2
|
-
import { DemoStory } from '../../demo/demo-types';
|
|
3
|
-
|
|
4
|
-
export const cascaderDemo: DemoStory<any> = {
|
|
5
|
-
id: 'cascaderDemo',
|
|
6
|
-
text: 'Cascader',
|
|
7
|
-
args: {
|
|
8
|
-
type: 'title',
|
|
9
|
-
showCircle: false,
|
|
10
|
-
},
|
|
11
|
-
argTypes: {
|
|
12
|
-
type: {
|
|
13
|
-
control: 'select',
|
|
14
|
-
options: ['title', 'ellipsis'],
|
|
15
|
-
},
|
|
16
|
-
showCircle: {
|
|
17
|
-
control: 'boolean',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
render: (args: any) => {
|
|
21
|
-
const css = {
|
|
22
|
-
display: 'flex',
|
|
23
|
-
flexDirection: 'column',
|
|
24
|
-
gap: '32px',
|
|
25
|
-
padding: '32px',
|
|
26
|
-
maxWidth: '600px',
|
|
27
|
-
margin: '0 auto',
|
|
28
|
-
|
|
29
|
-
'.demo-section': {
|
|
30
|
-
border: '1px solid var(--secondary-border-color)',
|
|
31
|
-
borderRadius: '8px',
|
|
32
|
-
overflow: 'hidden',
|
|
33
|
-
backgroundColor: 'var(--primary-bg-color)',
|
|
34
|
-
},
|
|
35
|
-
'.section-label': {
|
|
36
|
-
padding: '16px',
|
|
37
|
-
backgroundColor: 'var(--secondary-bg-color)',
|
|
38
|
-
borderBottom: '1px solid var(--secondary-border-color)',
|
|
39
|
-
fontSize: '14px',
|
|
40
|
-
fontWeight: 'bold',
|
|
41
|
-
color: 'var(--secondary-color)',
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<div css={css}>
|
|
47
|
-
<section class='demo-section'>
|
|
48
|
-
<div class='section-label'>Interactive Demo</div>
|
|
49
|
-
<div style={{ padding: args.type === 'ellipsis' ? '12px' : '0' }}>
|
|
50
|
-
<Cascader
|
|
51
|
-
type={args.type}
|
|
52
|
-
showCircle={args.showCircle}
|
|
53
|
-
title='Interactive Cascader'
|
|
54
|
-
description='Change the controls on the right to see this component update in real-time.'
|
|
55
|
-
defaultOpen={true}
|
|
56
|
-
key={`${args.type}-${args.showCircle}`}
|
|
57
|
-
>
|
|
58
|
-
<div style={{ padding: '10px', backgroundColor: 'var(--secondary-bg-color)', borderRadius: '4px' }}>
|
|
59
|
-
<p>This section is dynamic!</p>
|
|
60
|
-
<p>
|
|
61
|
-
Current Type: <strong>{args.type}</strong>
|
|
62
|
-
</p>
|
|
63
|
-
<p>
|
|
64
|
-
Show Circle: <strong>{args.showCircle ? 'Yes' : 'No'}</strong>
|
|
65
|
-
</p>
|
|
66
|
-
</div>
|
|
67
|
-
</Cascader>
|
|
68
|
-
</div>
|
|
69
|
-
</section>
|
|
70
|
-
|
|
71
|
-
<section class='demo-section'>
|
|
72
|
-
<div class='section-label'>Accordion Group (Mixed Styles)</div>
|
|
73
|
-
<Cascader
|
|
74
|
-
title='Account Settings'
|
|
75
|
-
description='Manage your profile and security'
|
|
76
|
-
group='settings'
|
|
77
|
-
showCircle={args.showCircle}
|
|
78
|
-
defaultOpen={true}
|
|
79
|
-
key={`s1-${args.showCircle}`}
|
|
80
|
-
>
|
|
81
|
-
<p>Username: Admin</p>
|
|
82
|
-
</Cascader>
|
|
83
|
-
<Cascader
|
|
84
|
-
title='Privacy Policy'
|
|
85
|
-
description='Learn how we handle your data'
|
|
86
|
-
group='settings'
|
|
87
|
-
showCircle={args.showCircle}
|
|
88
|
-
key={`s2-${args.showCircle}`}
|
|
89
|
-
>
|
|
90
|
-
<p>Your privacy is important to us.</p>
|
|
91
|
-
</Cascader>
|
|
92
|
-
</section>
|
|
93
|
-
|
|
94
|
-
<section class='demo-section'>
|
|
95
|
-
<div class='section-label'>Ellipsis Mode (Inline Expand)</div>
|
|
96
|
-
<div style={{ padding: '12px' }}>
|
|
97
|
-
<Cascader
|
|
98
|
-
type='ellipsis'
|
|
99
|
-
showCircle={args.showCircle}
|
|
100
|
-
key={`e1-${args.showCircle}`}
|
|
101
|
-
description='Lupine.js is a lightweight, high-performance web framework designed for modern agent-centric applications. It provides a rich set of UI components and a robust state management system that works seamlessly across different environments. By leveraging reactive principles and a clean component model, Lupine.js allows developers to build complex user interfaces with minimal boilerplate code.'
|
|
102
|
-
>
|
|
103
|
-
<p>Additional details for the ellipsis item.</p>
|
|
104
|
-
</Cascader>
|
|
105
|
-
</div>
|
|
106
|
-
</section>
|
|
107
|
-
</div>
|
|
108
|
-
);
|
|
109
|
-
},
|
|
110
|
-
code: `import { Cascader } from 'lupine.components/component-pool';
|
|
111
|
-
|
|
112
|
-
<Cascader
|
|
113
|
-
title="Account Settings"
|
|
114
|
-
description="Manage your profile"
|
|
115
|
-
group="settings"
|
|
116
|
-
>
|
|
117
|
-
<p>Content goes here...</p>
|
|
118
|
-
</Cascader>
|
|
119
|
-
|
|
120
|
-
<Cascader
|
|
121
|
-
type="ellipsis"
|
|
122
|
-
description="Lupine.js is a lightweight, high-performance web framework..."
|
|
123
|
-
>
|
|
124
|
-
<p>Expanded content</p>
|
|
125
|
-
</Cascader>
|
|
126
|
-
`,
|
|
127
|
-
};
|
|
1
|
+
import { Cascader } from './cascader';
|
|
2
|
+
import { DemoStory } from '../../demo/demo-types';
|
|
3
|
+
|
|
4
|
+
export const cascaderDemo: DemoStory<any> = {
|
|
5
|
+
id: 'cascaderDemo',
|
|
6
|
+
text: 'Cascader',
|
|
7
|
+
args: {
|
|
8
|
+
type: 'title',
|
|
9
|
+
showCircle: false,
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
type: {
|
|
13
|
+
control: 'select',
|
|
14
|
+
options: ['title', 'ellipsis'],
|
|
15
|
+
},
|
|
16
|
+
showCircle: {
|
|
17
|
+
control: 'boolean',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
render: (args: any) => {
|
|
21
|
+
const css = {
|
|
22
|
+
display: 'flex',
|
|
23
|
+
flexDirection: 'column',
|
|
24
|
+
gap: '32px',
|
|
25
|
+
padding: '32px',
|
|
26
|
+
maxWidth: '600px',
|
|
27
|
+
margin: '0 auto',
|
|
28
|
+
|
|
29
|
+
'.demo-section': {
|
|
30
|
+
border: '1px solid var(--secondary-border-color)',
|
|
31
|
+
borderRadius: '8px',
|
|
32
|
+
overflow: 'hidden',
|
|
33
|
+
backgroundColor: 'var(--primary-bg-color)',
|
|
34
|
+
},
|
|
35
|
+
'.section-label': {
|
|
36
|
+
padding: '16px',
|
|
37
|
+
backgroundColor: 'var(--secondary-bg-color)',
|
|
38
|
+
borderBottom: '1px solid var(--secondary-border-color)',
|
|
39
|
+
fontSize: '14px',
|
|
40
|
+
fontWeight: 'bold',
|
|
41
|
+
color: 'var(--secondary-color)',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div css={css}>
|
|
47
|
+
<section class='demo-section'>
|
|
48
|
+
<div class='section-label'>Interactive Demo</div>
|
|
49
|
+
<div style={{ padding: args.type === 'ellipsis' ? '12px' : '0' }}>
|
|
50
|
+
<Cascader
|
|
51
|
+
type={args.type}
|
|
52
|
+
showCircle={args.showCircle}
|
|
53
|
+
title='Interactive Cascader'
|
|
54
|
+
description='Change the controls on the right to see this component update in real-time.'
|
|
55
|
+
defaultOpen={true}
|
|
56
|
+
key={`${args.type}-${args.showCircle}`}
|
|
57
|
+
>
|
|
58
|
+
<div style={{ padding: '10px', backgroundColor: 'var(--secondary-bg-color)', borderRadius: '4px' }}>
|
|
59
|
+
<p>This section is dynamic!</p>
|
|
60
|
+
<p>
|
|
61
|
+
Current Type: <strong>{args.type}</strong>
|
|
62
|
+
</p>
|
|
63
|
+
<p>
|
|
64
|
+
Show Circle: <strong>{args.showCircle ? 'Yes' : 'No'}</strong>
|
|
65
|
+
</p>
|
|
66
|
+
</div>
|
|
67
|
+
</Cascader>
|
|
68
|
+
</div>
|
|
69
|
+
</section>
|
|
70
|
+
|
|
71
|
+
<section class='demo-section'>
|
|
72
|
+
<div class='section-label'>Accordion Group (Mixed Styles)</div>
|
|
73
|
+
<Cascader
|
|
74
|
+
title='Account Settings'
|
|
75
|
+
description='Manage your profile and security'
|
|
76
|
+
group='settings'
|
|
77
|
+
showCircle={args.showCircle}
|
|
78
|
+
defaultOpen={true}
|
|
79
|
+
key={`s1-${args.showCircle}`}
|
|
80
|
+
>
|
|
81
|
+
<p>Username: Admin</p>
|
|
82
|
+
</Cascader>
|
|
83
|
+
<Cascader
|
|
84
|
+
title='Privacy Policy'
|
|
85
|
+
description='Learn how we handle your data'
|
|
86
|
+
group='settings'
|
|
87
|
+
showCircle={args.showCircle}
|
|
88
|
+
key={`s2-${args.showCircle}`}
|
|
89
|
+
>
|
|
90
|
+
<p>Your privacy is important to us.</p>
|
|
91
|
+
</Cascader>
|
|
92
|
+
</section>
|
|
93
|
+
|
|
94
|
+
<section class='demo-section'>
|
|
95
|
+
<div class='section-label'>Ellipsis Mode (Inline Expand)</div>
|
|
96
|
+
<div style={{ padding: '12px' }}>
|
|
97
|
+
<Cascader
|
|
98
|
+
type='ellipsis'
|
|
99
|
+
showCircle={args.showCircle}
|
|
100
|
+
key={`e1-${args.showCircle}`}
|
|
101
|
+
description='Lupine.js is a lightweight, high-performance web framework designed for modern agent-centric applications. It provides a rich set of UI components and a robust state management system that works seamlessly across different environments. By leveraging reactive principles and a clean component model, Lupine.js allows developers to build complex user interfaces with minimal boilerplate code.'
|
|
102
|
+
>
|
|
103
|
+
<p>Additional details for the ellipsis item.</p>
|
|
104
|
+
</Cascader>
|
|
105
|
+
</div>
|
|
106
|
+
</section>
|
|
107
|
+
</div>
|
|
108
|
+
);
|
|
109
|
+
},
|
|
110
|
+
code: `import { Cascader } from 'lupine.components/component-pool';
|
|
111
|
+
|
|
112
|
+
<Cascader
|
|
113
|
+
title="Account Settings"
|
|
114
|
+
description="Manage your profile"
|
|
115
|
+
group="settings"
|
|
116
|
+
>
|
|
117
|
+
<p>Content goes here...</p>
|
|
118
|
+
</Cascader>
|
|
119
|
+
|
|
120
|
+
<Cascader
|
|
121
|
+
type="ellipsis"
|
|
122
|
+
description="Lupine.js is a lightweight, high-performance web framework..."
|
|
123
|
+
>
|
|
124
|
+
<p>Expanded content</p>
|
|
125
|
+
</Cascader>
|
|
126
|
+
`,
|
|
127
|
+
};
|