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,161 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import React from 'react';
3
-
4
- import { Checkbox } from '../components/checkbox';
5
-
6
- // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
7
- const meta = {
8
- title: 'Components/表单/Checkbox-复选框',
9
- component: Checkbox,
10
- parameters: {
11
- // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
12
- layout: 'centered',
13
- },
14
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
15
- tags: ['autodocs'],
16
-
17
- // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
18
- args: {
19
- variant: 'checkbox',
20
- caption: '',
21
- label: 'Label',
22
- disabled: false,
23
- },
24
- argTypes: {
25
- // 定义size为select类型的控件
26
- variant: {
27
- control: 'select',
28
- options: ['checkbox', 'radio', 'circle'],
29
- },
30
- label: {
31
- control: 'text',
32
- },
33
- disabled: {
34
- control: 'boolean',
35
- },
36
- checked: {
37
- control: 'boolean',
38
- },
39
- defaultChecked: {
40
- control: 'boolean',
41
- },
42
- },
43
- } satisfies Meta<typeof Checkbox>;
44
-
45
- export default meta;
46
- // export const Default: StoryObj<typeof meta> = {
47
- // // 这里不需要设置 args,因为它会继承 meta 中的 args
48
- // };
49
- type Story = StoryObj<typeof meta>;
50
-
51
- // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
52
- export const Demo: Story = {
53
- args: {
54
- ...meta.args, // 继承默认参数
55
- },
56
- render: (args) => {
57
- return (
58
- <div className="w-[40vw] px-3 flex flex-col items-center rounded-md space-y-2">
59
- <div className="w-full">示例:</div>
60
- <div className="w-full flex flex-col justify-center items-center">
61
- <div className="w-full flex justify-around mb-3">
62
- <div className="font-bold w-10" />
63
- <div className="flex justify-center">Default</div>
64
- <div className="flex justify-center">Checked</div>
65
- </div>
66
- <div className="w-full flex justify-around items-center mb-6">
67
- <div className="font-semibold w-10">Checkbox</div>
68
- <Checkbox
69
- {...args}
70
- variant="checkbox"
71
- onCheckedChange={(e) => {
72
- // setValue(e.target);
73
- console.log('checkbox value change', e);
74
- }}
75
- />
76
- <Checkbox
77
- {...args}
78
- variant="checkbox"
79
- checked={true}
80
- onCheckedChange={(e) => {
81
- // setValue(e.target);
82
- console.log('checkbox value change', e);
83
- }}
84
- />
85
- </div>
86
-
87
- <div className="w-full flex justify-around items-center mb-6">
88
- <div className="font-semibold w-10">Radio</div>
89
- <Checkbox
90
- {...args}
91
- variant="radio"
92
- onCheckedChange={(e) => {
93
- // setValue(e.target);
94
- console.log('checkbox value change', e);
95
- }}
96
- />
97
- <Checkbox
98
- {...args}
99
- variant="radio"
100
- checked={true}
101
- onCheckedChange={(e) => {
102
- // setValue(e.target);
103
- console.log('checkbox value change', e);
104
- }}
105
- />
106
- </div>
107
- <div className="w-full flex justify-around items-center mb-6">
108
- <div className="font-semibold w-10">Check Circle</div>
109
- <Checkbox
110
- {...args}
111
- variant="circle"
112
- onCheckedChange={(e) => {
113
- // setValue(e.target);
114
- console.log('checkbox value change', e);
115
- }}
116
- />
117
- <Checkbox
118
- {...args}
119
- variant="circle"
120
- checked={true}
121
- onCheckedChange={(e) => {
122
- // setValue(e.target);
123
- console.log('checkbox value change', e);
124
- }}
125
- />
126
- </div>
127
- </div>
128
- <div className="w-full flex justify-around items-center mb-6">
129
- <div className="font-semibold w-10">With Caption</div>
130
- <Checkbox
131
- {...args}
132
- variant="checkbox"
133
- caption="Caption"
134
- onCheckedChange={(e) => {
135
- // setValue(e.target);
136
- console.log('checkbox value change', e);
137
- }}
138
- />
139
- <Checkbox
140
- {...args}
141
- variant="circle"
142
- caption="Caption"
143
- onCheckedChange={(e) => {
144
- // setValue(e.target);
145
- console.log('checkbox value change', e);
146
- }}
147
- />
148
- <Checkbox
149
- {...args}
150
- variant="radio"
151
- caption="Caption"
152
- onCheckedChange={(e) => {
153
- // setValue(e.target);
154
- console.log('checkbox value change', e);
155
- }}
156
- />
157
- </div>
158
- </div>
159
- );
160
- },
161
- };
@@ -1,341 +0,0 @@
1
- import { Meta } from "@storybook/blocks";
2
-
3
- export const RightArrow = () => <svg
4
- viewBox="0 0 14 14"
5
- width="8px"
6
- height="14px"
7
- style={{
8
- marginLeft: '4px',
9
- display: 'inline-block',
10
- shapeRendering: 'inherit',
11
- verticalAlign: 'middle',
12
- fill: 'currentColor',
13
- 'path fill': 'currentColor'
14
- }}
15
- >
16
- <path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
17
- </svg>
18
-
19
- <Meta title="Configure your project" />
20
-
21
- <div className="sb-container">
22
- <div className='sb-section-title'>
23
- # Configure your project
24
-
25
- Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.
26
- </div>
27
- <div className="sb-section">
28
- <div className="sb-section-item">
29
-
30
- <h4 className="sb-section-item-heading">Add styling and CSS</h4>
31
- <p className="sb-section-item-paragraph">Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.</p>
32
- <a
33
- href="https://storybook.js.org/docs/configure/styling-and-css"
34
- target="_blank"
35
- >Learn more<RightArrow /></a>
36
- </div>
37
- <div className="sb-section-item">
38
-
39
- <h4 className="sb-section-item-heading">Provide context and mocking</h4>
40
- <p className="sb-section-item-paragraph">Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.</p>
41
- <a
42
- href="https://storybook.js.org/docs/writing-stories/decorators#context-for-mocking"
43
- target="_blank"
44
- >Learn more<RightArrow /></a>
45
- </div>
46
- <div className="sb-section-item">
47
-
48
- <div>
49
- <h4 className="sb-section-item-heading">Load assets and resources</h4>
50
- <p className="sb-section-item-paragraph">To link static files (like fonts) to your projects and stories, use the
51
- `staticDirs` configuration option to specify folders to load when
52
- starting Storybook.</p>
53
- <a
54
- href="https://storybook.js.org/docs/configure/images-and-assets"
55
- target="_blank"
56
- >Learn more<RightArrow /></a>
57
- </div>
58
- </div>
59
- </div>
60
- </div>
61
- <div className="sb-container">
62
- <div className='sb-section-title'>
63
- # Do more with Storybook
64
-
65
- Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.
66
- </div>
67
-
68
- <div className="sb-section">
69
- <div className="sb-features-grid">
70
- <div className="sb-grid-item">
71
-
72
- <h4 className="sb-section-item-heading">Autodocs</h4>
73
- <p className="sb-section-item-paragraph">Auto-generate living,
74
- interactive reference documentation from your components and stories.</p>
75
- <a
76
- href="https://storybook.js.org/docs/writing-docs/autodocs"
77
- target="_blank"
78
- >Learn more<RightArrow /></a>
79
- </div>
80
- <div className="sb-grid-item">
81
-
82
- <h4 className="sb-section-item-heading">Publish to Chromatic</h4>
83
- <p className="sb-section-item-paragraph">Publish your Storybook to review and collaborate with your entire team.</p>
84
- <a
85
- href="https://storybook.js.org/docs/sharing/publish-storybook#publish-storybook-with-chromatic"
86
- target="_blank"
87
- >Learn more<RightArrow /></a>
88
- </div>
89
- <div className="sb-grid-item">
90
-
91
- <h4 className="sb-section-item-heading">Figma Plugin</h4>
92
- <p className="sb-section-item-paragraph">Embed your stories into Figma to cross-reference the design and live
93
- implementation in one place.</p>
94
- <a
95
- href="https://storybook.js.org/docs/sharing/design-integrations#embed-storybook-in-figma-with-the-plugin"
96
- target="_blank"
97
- >Learn more<RightArrow /></a>
98
- </div>
99
- <div className="sb-grid-item">
100
-
101
- <h4 className="sb-section-item-heading">Testing</h4>
102
- <p className="sb-section-item-paragraph">Use stories to test a component in all its variations, no matter how
103
- complex.</p>
104
- <a
105
- href="https://storybook.js.org/docs/writing-tests"
106
- target="_blank"
107
- >Learn more<RightArrow /></a>
108
- </div>
109
- <div className="sb-grid-item">
110
-
111
- <h4 className="sb-section-item-heading">Accessibility</h4>
112
- <p className="sb-section-item-paragraph">Automatically test your components for a11y issues as you develop.</p>
113
- <a
114
- href="https://storybook.js.org/docs/writing-tests/accessibility-testing"
115
- target="_blank"
116
- >Learn more<RightArrow /></a>
117
- </div>
118
- <div className="sb-grid-item">
119
-
120
- <h4 className="sb-section-item-heading">Theming</h4>
121
- <p className="sb-section-item-paragraph">Theme Storybook's UI to personalize it to your project.</p>
122
- <a
123
- href="https://storybook.js.org/docs/configure/theming"
124
- target="_blank"
125
- >Learn more<RightArrow /></a>
126
- </div>
127
- </div>
128
- </div>
129
- </div>
130
- <div className='sb-addon'>
131
- <div className='sb-addon-text'>
132
- <h4>Addons</h4>
133
- <p className="sb-section-item-paragraph">Integrate your tools with Storybook to connect workflows.</p>
134
- <a
135
- href="https://storybook.js.org/integrations/"
136
- target="_blank"
137
- >Discover all addons<RightArrow /></a>
138
- </div>
139
- <div className='sb-addon-img'>
140
- </div>
141
- </div>
142
-
143
- <div className="sb-section sb-socials">
144
- <div className="sb-section-item">
145
-
146
- Join our contributors building the future of UI development.
147
-
148
- <a
149
- href="https://github.com/storybookjs/storybook"
150
- target="_blank"
151
- >Star on GitHub<RightArrow /></a>
152
- </div>
153
- <div className="sb-section-item">
154
- <div>
155
- Get support and chat with frontend developers.
156
-
157
- <a
158
- href="https://discord.gg/storybook"
159
- target="_blank"
160
- >Join Discord server<RightArrow /></a>
161
- </div>
162
- </div>
163
- <div className="sb-section-item">
164
-
165
- <div>
166
- Watch tutorials, feature previews and interviews.
167
-
168
- <a
169
- href="https://www.youtube.com/@chromaticui"
170
- target="_blank"
171
- >Watch on YouTube<RightArrow /></a>
172
- </div>
173
- </div>
174
- <div className="sb-section-item">
175
-
176
- <p>Follow guided walkthroughs on for key workflows.</p>
177
-
178
- <a
179
- href="https://storybook.js.org/tutorials/"
180
- target="_blank"
181
- >Discover tutorials<RightArrow /></a>
182
- </div>
183
- </div>
184
-
185
- <style>
186
- {`
187
- .sb-container {
188
- margin-bottom: 48px;
189
- }
190
-
191
- .sb-section {
192
- width: 100%;
193
- display: flex;
194
- flex-direction: row;
195
- gap: 20px;
196
- }
197
-
198
- img {
199
- object-fit: cover;
200
- }
201
-
202
- .sb-section-title {
203
- margin-bottom: 32px;
204
- }
205
-
206
- .sb-section a:not(h1 a, h2 a, h3 a) {
207
- font-size: 14px;
208
- }
209
-
210
- .sb-section-item, .sb-grid-item {
211
- flex: 1;
212
- display: flex;
213
- flex-direction: column;
214
- }
215
-
216
- .sb-section-item-heading {
217
- padding-top: 20px !important;
218
- padding-bottom: 5px !important;
219
- margin: 0 !important;
220
- }
221
- .sb-section-item-paragraph {
222
- margin: 0;
223
- padding-bottom: 10px;
224
- }
225
-
226
- .sb-chevron {
227
- margin-left: 5px;
228
- }
229
-
230
- .sb-features-grid {
231
- display: grid;
232
- grid-template-columns: repeat(2, 1fr);
233
- grid-gap: 32px 20px;
234
- }
235
-
236
- .sb-socials {
237
- display: grid;
238
- grid-template-columns: repeat(4, 1fr);
239
- }
240
-
241
- .sb-socials p {
242
- margin-bottom: 10px;
243
- }
244
-
245
- .sb-explore-image {
246
- max-height: 32px;
247
- align-self: flex-start;
248
- }
249
-
250
- .sb-addon {
251
- width: 100%;
252
- display: flex;
253
- align-items: center;
254
- position: relative;
255
- background-color: #EEF3F8;
256
- border-radius: 5px;
257
- border: 1px solid rgba(0, 0, 0, 0.05);
258
- background: #EEF3F8;
259
- height: 180px;
260
- margin-bottom: 48px;
261
- overflow: hidden;
262
- }
263
-
264
- .sb-addon-text {
265
- padding-left: 48px;
266
- max-width: 240px;
267
- }
268
-
269
- .sb-addon-text h4 {
270
- padding-top: 0px;
271
- }
272
-
273
- .sb-addon-img {
274
- position: absolute;
275
- left: 345px;
276
- top: 0;
277
- height: 100%;
278
- width: 200%;
279
- overflow: hidden;
280
- }
281
-
282
- .sb-addon-img img {
283
- width: 650px;
284
- transform: rotate(-15deg);
285
- margin-left: 40px;
286
- margin-top: -72px;
287
- box-shadow: 0 0 1px rgba(255, 255, 255, 0);
288
- backface-visibility: hidden;
289
- }
290
-
291
- @media screen and (max-width: 800px) {
292
- .sb-addon-img {
293
- left: 300px;
294
- }
295
- }
296
-
297
- @media screen and (max-width: 600px) {
298
- .sb-section {
299
- flex-direction: column;
300
- }
301
-
302
- .sb-features-grid {
303
- grid-template-columns: repeat(1, 1fr);
304
- }
305
-
306
- .sb-socials {
307
- grid-template-columns: repeat(2, 1fr);
308
- }
309
-
310
- .sb-addon {
311
- height: 280px;
312
- align-items: flex-start;
313
- padding-top: 32px;
314
- overflow: hidden;
315
- }
316
-
317
- .sb-addon-text {
318
- padding-left: 24px;
319
- }
320
-
321
- .sb-addon-img {
322
- right: 0;
323
- left: 0;
324
- top: 130px;
325
- bottom: 0;
326
- overflow: hidden;
327
- height: auto;
328
- width: 124%;
329
- }
330
-
331
- .sb-addon-img img {
332
- width: 1200px;
333
- transform: rotate(-12deg);
334
- margin-left: 0;
335
- margin-top: 48px;
336
- margin-bottom: -40px;
337
- margin-left: -24px;
338
- }
339
- }
340
- `}
341
- </style>
@@ -1,30 +0,0 @@
1
- import { Meta,Story } from "@storybook/blocks";
2
-
3
- export const RightArrow = () => <svg
4
- viewBox="0 0 14 14"
5
- width="8px"
6
- height="14px"
7
- style={{
8
- marginLeft: '4px',
9
- display: 'inline-block',
10
- shapeRendering: 'inherit',
11
- verticalAlign: 'middle',
12
- fill: 'currentColor',
13
- 'path fill': 'currentColor'
14
- }}
15
- >
16
- <path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
17
- </svg>
18
-
19
- <Meta title="CSS原子类" />
20
-
21
- <div className="sb-container">
22
- <div className='sb-section-title'>
23
- # CSS原子类
24
- <a
25
- href="https://www.notion.so/myshellai/c73266bd2c47406da05aa7a4a9481825"
26
- target="_blank"
27
- >迁移工作量大先放notion上<RightArrow /></a>
28
- </div>
29
-
30
- </div>
@@ -1,70 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
-
3
- import { Description } from '@/components/typography';
4
-
5
- // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6
- const meta = {
7
- title: 'Components/文字排版/Description-描述文案',
8
- component: Description,
9
- parameters: {
10
- // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
11
- layout: 'centered',
12
- },
13
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
14
- tags: ['autodocs'],
15
-
16
- // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
17
- args: {},
18
- argTypes: {
19
- // 定义size为select类型的控件
20
- size: {
21
- control: 'select',
22
- options: ['lg', 'sm'],
23
- },
24
- weight: {
25
- control: 'select',
26
- options: ['regular', 'medium'],
27
- },
28
- // 定义color为select类型的控件
29
- color: {
30
- control: 'select',
31
- options: [
32
- 'default',
33
- 'subtle',
34
- 'subtler',
35
- 'subtlest',
36
- 'disabled',
37
- 'static',
38
- 'static-black',
39
- 'brand',
40
- 'critical',
41
- 'critical-bolder',
42
- 'warning',
43
- 'warning-bolder',
44
- 'success',
45
- 'success-bolder',
46
- ],
47
- },
48
-
49
- // 定义lineClamp为select类型的控件
50
- lineClamp: {
51
- control: 'select',
52
- options: [1, 2, 3, 4, 5, 6],
53
- },
54
- },
55
- } satisfies Meta<typeof Description>;
56
-
57
- export default meta;
58
- type Story = StoryObj<typeof meta>;
59
-
60
- // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
61
- export const Demo: Story = {
62
- args: {
63
- size: 'lg',
64
- weight: 'regular',
65
- lineClamp: 1,
66
- color: 'subtler',
67
- children: 'Description/Ig/Regular',
68
- underline: false,
69
- },
70
- };
@@ -1,64 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { fn } from '@storybook/test';
3
-
4
- import { Display } from '@/components/typography';
5
-
6
- // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
7
- const meta = {
8
- title: 'Components/文字排版/Display-大标题',
9
- component: Display,
10
- parameters: {
11
- // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
12
- layout: 'centered',
13
- },
14
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
15
- tags: ['autodocs'],
16
-
17
- // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
18
- args: {},
19
- argTypes: {
20
- // 定义size为select类型的控件
21
- size: {
22
- control: 'select',
23
- options: ['2xl', 'xl', 'lg', 'md', 'sm', 'xs'],
24
- },
25
-
26
- // 定义color为select类型的控件
27
- color: {
28
- control: 'select',
29
- options: [
30
- 'default',
31
- 'subtle',
32
- 'subtler',
33
- 'subtlest',
34
- 'disabled',
35
- 'static',
36
- 'static-black',
37
- 'brand',
38
- 'critical',
39
- 'critical-bolder',
40
- 'warning',
41
- 'warning-bolder',
42
- 'success',
43
- 'success-bolder',
44
- ],
45
- },
46
-
47
- // 定义lineClamp为select类型的控件
48
- lineClamp: {
49
- control: 'select',
50
- options: [1, 2, 3, 4, 5, 6],
51
- },
52
- },
53
- } satisfies Meta<typeof Display>;
54
-
55
- export default meta;
56
- type Story = StoryObj<typeof meta>;
57
-
58
- // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
59
- export const Demo: Story = {
60
- args: {
61
- size: '2xl',
62
- children: 'display/2xl',
63
- },
64
- };