@coze-arch/cli 0.0.5 → 0.0.6-alpha.dd6b66
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/lib/__templates__/nuxt-vue/nuxt.config.ts +13 -0
- package/lib/__templates__/taro/eslint.config.mjs +57 -1
- package/lib/__templates__/taro/package.json +1 -1
- package/lib/__templates__/taro/pnpm-lock.yaml +5 -5
- package/lib/__templates__/taro/src/app.tsx +8 -1
- package/lib/__templates__/taro/src/components/ui/accordion.tsx +1 -1
- package/lib/__templates__/taro/src/components/ui/breadcrumb.tsx +1 -1
- package/lib/__templates__/taro/src/components/ui/calendar.tsx +4 -4
- package/lib/__templates__/taro/src/components/ui/carousel.tsx +6 -6
- package/lib/__templates__/taro/src/components/ui/command.tsx +1 -1
- package/lib/__templates__/taro/src/components/ui/context-menu.tsx +3 -3
- package/lib/__templates__/taro/src/components/ui/dialog.tsx +1 -1
- package/lib/__templates__/taro/src/components/ui/dropdown-menu.tsx +3 -3
- package/lib/__templates__/taro/src/components/ui/input-otp.tsx +1 -1
- package/lib/__templates__/taro/src/components/ui/menubar.tsx +3 -3
- package/lib/__templates__/taro/src/components/ui/navigation-menu.tsx +2 -0
- package/lib/__templates__/taro/src/components/ui/pagination.tsx +3 -3
- package/lib/__templates__/taro/src/components/ui/resizable.tsx +1 -1
- package/lib/__templates__/taro/src/components/ui/select.tsx +4 -4
- package/lib/__templates__/taro/src/components/ui/sheet.tsx +2 -2
- package/lib/__templates__/taro/src/components/ui/toast.tsx +2 -2
- package/lib/__templates__/taro/src/presets/env.ts +1 -0
- package/lib/__templates__/taro/src/presets/h5-container.tsx +2 -1
- package/lib/__templates__/taro/src/presets/h5-error-boundary.tsx +391 -0
- package/lib/__templates__/taro/src/presets/h5-navbar.tsx +4 -3
- package/lib/__templates__/taro/src/presets/h5-styles.ts +3 -1
- package/lib/__templates__/taro/src/presets/index.tsx +15 -2
- package/lib/__templates__/taro/types/lucide.d.ts +6 -0
- package/lib/cli.js +1137 -169
- package/package.json +2 -1
|
@@ -91,6 +91,19 @@ export default defineNuxtConfig({
|
|
|
91
91
|
clientPort: 443,
|
|
92
92
|
timeout: 30000,
|
|
93
93
|
},
|
|
94
|
+
// Fix EMFILE: too many open files error
|
|
95
|
+
// Exclude large directories from file watching to avoid exceeding system limits
|
|
96
|
+
watch: {
|
|
97
|
+
ignored: [
|
|
98
|
+
'**/node_modules/**',
|
|
99
|
+
'**/.nuxt/**',
|
|
100
|
+
'**/.output/**',
|
|
101
|
+
'**/dist/**',
|
|
102
|
+
'**/.git/**',
|
|
103
|
+
'**/coverage/**',
|
|
104
|
+
'**/.cache/**',
|
|
105
|
+
],
|
|
106
|
+
},
|
|
94
107
|
},
|
|
95
108
|
},
|
|
96
109
|
|
|
@@ -92,6 +92,12 @@ export default [
|
|
|
92
92
|
":matches(JSXAttribute[name.name='className'], CallExpression[callee.name=/^(cn|cva)$/]) :matches(Literal[value=/\\[[^\\]]*&[^\\]]*~[^\\]]*\\]/], TemplateElement[value.raw=/\\[[^\\]]*&[^\\]]*~[^\\]]*\\]/])",
|
|
93
93
|
message: '微信小程序兼容性:WXSS 不支持 ~(会导致预览上传失败)。',
|
|
94
94
|
},
|
|
95
|
+
{
|
|
96
|
+
selector:
|
|
97
|
+
"JSXAttribute[name.name='color'][value.type='Literal'][value.value='currentColor'], JSXAttribute[name.name='color'] > JSXExpressionContainer > Literal[value='currentColor']",
|
|
98
|
+
message:
|
|
99
|
+
'lucide-react-taro 规范:禁止使用 color="currentColor",小程序端不会按预期继承颜色。请改为显式颜色值,或通过 LucideTaroProvider 提供默认颜色。',
|
|
100
|
+
},
|
|
95
101
|
],
|
|
96
102
|
'no-restricted-properties': [
|
|
97
103
|
'error',
|
|
@@ -124,7 +130,57 @@ export default [
|
|
|
124
130
|
{
|
|
125
131
|
selector: 'JSXText[value=/应用开发中/]',
|
|
126
132
|
message:
|
|
127
|
-
'工程规范:检测到首页 (src/pages/index/index)
|
|
133
|
+
'工程规范:检测到首页 (src/pages/index/index.tsx) 仍为默认占位页面,这会导致用户无法进入新增页面,请根据用户需求开发实际的首页功能 and 界面。如果已经开发了新的首页,也需要删除旧首页,并更新 src/app.config.ts 文件',
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
files: ['src/pages/**/*.tsx'],
|
|
140
|
+
rules: {
|
|
141
|
+
'no-restricted-syntax': [
|
|
142
|
+
'error',
|
|
143
|
+
{
|
|
144
|
+
selector:
|
|
145
|
+
"ImportDeclaration[source.value='@tarojs/components'] ImportSpecifier[imported.name='Button']",
|
|
146
|
+
message:
|
|
147
|
+
"组件规范:Button 优先使用 '@/components/ui/button',不要在页面中直接使用 '@tarojs/components' 的 Button。",
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
selector:
|
|
151
|
+
"ImportDeclaration[source.value='@tarojs/components'] ImportSpecifier[imported.name='Input']",
|
|
152
|
+
message:
|
|
153
|
+
"组件规范:Input 优先使用 '@/components/ui/input',不要在页面中直接使用 '@tarojs/components' 的 Input。",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
selector:
|
|
157
|
+
"ImportDeclaration[source.value='@tarojs/components'] ImportSpecifier[imported.name='Textarea']",
|
|
158
|
+
message:
|
|
159
|
+
"组件规范:Textarea 优先使用 '@/components/ui/textarea',不要在页面中直接使用 '@tarojs/components' 的 Textarea。",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
selector:
|
|
163
|
+
"ImportDeclaration[source.value='@tarojs/components'] ImportSpecifier[imported.name='Label']",
|
|
164
|
+
message:
|
|
165
|
+
"组件规范:Label 优先使用 '@/components/ui/label',不要在页面中直接使用 '@tarojs/components' 的 Label。",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
selector:
|
|
169
|
+
"ImportDeclaration[source.value='@tarojs/components'] ImportSpecifier[imported.name='Switch']",
|
|
170
|
+
message:
|
|
171
|
+
"组件规范:Switch 优先使用 '@/components/ui/switch',不要在页面中直接使用 '@tarojs/components' 的 Switch。",
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
selector:
|
|
175
|
+
"ImportDeclaration[source.value='@tarojs/components'] ImportSpecifier[imported.name='Slider']",
|
|
176
|
+
message:
|
|
177
|
+
"组件规范:Slider 优先使用 '@/components/ui/slider',不要在页面中直接使用 '@tarojs/components' 的 Slider。",
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
selector:
|
|
181
|
+
"ImportDeclaration[source.value='@tarojs/components'] ImportSpecifier[imported.name='Progress']",
|
|
182
|
+
message:
|
|
183
|
+
"组件规范:Progress 优先使用 '@/components/ui/progress',不要在页面中直接使用 '@tarojs/components' 的 Progress。",
|
|
128
184
|
},
|
|
129
185
|
],
|
|
130
186
|
},
|
|
@@ -56,8 +56,8 @@ importers:
|
|
|
56
56
|
specifier: ^4.1.0
|
|
57
57
|
version: 4.1.0
|
|
58
58
|
lucide-react-taro:
|
|
59
|
-
specifier: ^1.
|
|
60
|
-
version: 1.
|
|
59
|
+
specifier: ^1.4.1
|
|
60
|
+
version: 1.4.1(@tarojs/components@4.1.9(@tarojs/helper@4.1.9)(@types/react@18.3.27)(postcss@8.5.6)(rollup@3.29.5)(webpack@5.97.1(@swc/core@1.3.96)))(react@18.3.1)
|
|
61
61
|
react:
|
|
62
62
|
specifier: ^18.0.0
|
|
63
63
|
version: 18.3.1
|
|
@@ -7966,8 +7966,8 @@ packages:
|
|
|
7966
7966
|
lru-cache@5.1.1:
|
|
7967
7967
|
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
|
|
7968
7968
|
|
|
7969
|
-
lucide-react-taro@1.
|
|
7970
|
-
resolution: {integrity: sha512-
|
|
7969
|
+
lucide-react-taro@1.4.1:
|
|
7970
|
+
resolution: {integrity: sha512-XdY+YJ7T7O0VRixaVswdy5tfu91MjNHlOpaY2TGxOWZOQB5IRYLgmJfpTMui2b6SSockiN7viKBGnf408K2oTA==}
|
|
7971
7971
|
hasBin: true
|
|
7972
7972
|
peerDependencies:
|
|
7973
7973
|
'@tarojs/components': '>=3.0.0'
|
|
@@ -20125,7 +20125,7 @@ snapshots:
|
|
|
20125
20125
|
dependencies:
|
|
20126
20126
|
yallist: 3.1.1
|
|
20127
20127
|
|
|
20128
|
-
lucide-react-taro@1.
|
|
20128
|
+
lucide-react-taro@1.4.1(@tarojs/components@4.1.9(@tarojs/helper@4.1.9)(@types/react@18.3.27)(postcss@8.5.6)(rollup@3.29.5)(webpack@5.97.1(@swc/core@1.3.96)))(react@18.3.1):
|
|
20129
20129
|
dependencies:
|
|
20130
20130
|
'@tarojs/components': 4.1.9(@tarojs/helper@4.1.9)(@types/react@18.3.27)(postcss@8.5.6)(rollup@3.29.5)(webpack@5.97.1(@swc/core@1.3.96))
|
|
20131
20131
|
commander: 14.0.2
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { LucideTaroProvider } from 'lucide-react-taro';
|
|
2
3
|
import '@/app.css';
|
|
4
|
+
import { Toaster } from '@/components/ui/toast';
|
|
3
5
|
import { Preset } from './presets';
|
|
4
6
|
|
|
5
7
|
const App = ({ children }: PropsWithChildren) => {
|
|
6
|
-
return
|
|
8
|
+
return (
|
|
9
|
+
<LucideTaroProvider defaultColor="#000" defaultSize={24}>
|
|
10
|
+
<Preset>{children}</Preset>
|
|
11
|
+
<Toaster />
|
|
12
|
+
</LucideTaroProvider>
|
|
13
|
+
);
|
|
7
14
|
};
|
|
8
15
|
|
|
9
16
|
export default App;
|
|
@@ -118,7 +118,7 @@ const AccordionTriggerInternal = React.forwardRef<
|
|
|
118
118
|
{...props}
|
|
119
119
|
>
|
|
120
120
|
{children}
|
|
121
|
-
<ChevronsUpDown className={cn("shrink-0 transition-transform duration-200", isOpen && "rotate-180")} size={16} />
|
|
121
|
+
<ChevronsUpDown className={cn("shrink-0 transition-transform duration-200", isOpen && "rotate-180")} size={16} color="inherit" />
|
|
122
122
|
</View>
|
|
123
123
|
</View>
|
|
124
124
|
)
|
|
@@ -85,7 +85,7 @@ const BreadcrumbSeparator = ({
|
|
|
85
85
|
className={cn("[&>svg]:w-4 [&>svg]:h-4 flex items-center", className)}
|
|
86
86
|
{...props}
|
|
87
87
|
>
|
|
88
|
-
{children ?? <ChevronRight size={16} />}
|
|
88
|
+
{children ?? <ChevronRight size={16} color="inherit" />}
|
|
89
89
|
</View>
|
|
90
90
|
)
|
|
91
91
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator"
|
|
@@ -216,7 +216,7 @@ function Calendar({
|
|
|
216
216
|
className="h-8 w-8"
|
|
217
217
|
onClick={() => setMonth(subMonths(visibleMonth, 1))}
|
|
218
218
|
>
|
|
219
|
-
<ChevronLeft size={16} />
|
|
219
|
+
<ChevronLeft size={16} color="inherit" />
|
|
220
220
|
</Button>
|
|
221
221
|
) : (
|
|
222
222
|
<View className="h-8 w-8" />
|
|
@@ -234,7 +234,7 @@ function Calendar({
|
|
|
234
234
|
<Text className="text-sm font-medium">
|
|
235
235
|
{visibleMonth.getFullYear()}
|
|
236
236
|
</Text>
|
|
237
|
-
<ChevronDown size={16} className="opacity-50" />
|
|
237
|
+
<ChevronDown size={16} className="opacity-50" color="inherit" />
|
|
238
238
|
</Button>
|
|
239
239
|
</Picker>
|
|
240
240
|
<Picker
|
|
@@ -250,7 +250,7 @@ function Calendar({
|
|
|
250
250
|
{String(visibleMonth.getMonth() + 1).padStart(2, "0")}
|
|
251
251
|
月
|
|
252
252
|
</Text>
|
|
253
|
-
<ChevronDown size={16} className="opacity-50" />
|
|
253
|
+
<ChevronDown size={16} className="opacity-50" color="inherit" />
|
|
254
254
|
</Button>
|
|
255
255
|
</Picker>
|
|
256
256
|
</View>
|
|
@@ -267,7 +267,7 @@ function Calendar({
|
|
|
267
267
|
className="h-8 w-8"
|
|
268
268
|
onClick={() => setMonth(addMonths(visibleMonth, 1))}
|
|
269
269
|
>
|
|
270
|
-
<ChevronRight size={16} />
|
|
270
|
+
<ChevronRight size={16} color="inherit" />
|
|
271
271
|
</Button>
|
|
272
272
|
) : (
|
|
273
273
|
<View className="h-8 w-8" />
|
|
@@ -175,15 +175,15 @@ const CarouselPrevious = React.forwardRef<
|
|
|
175
175
|
className={cn(
|
|
176
176
|
"absolute h-8 w-8 rounded-full z-10 bg-background bg-opacity-80 backdrop-blur-sm",
|
|
177
177
|
orientation === "horizontal"
|
|
178
|
-
? "-left-12 top-
|
|
179
|
-
: "-top-12 left-
|
|
178
|
+
? "-left-12 top-0 bottom-0 my-auto"
|
|
179
|
+
: "-top-12 left-0 right-0 mx-auto rotate-90",
|
|
180
180
|
className
|
|
181
181
|
)}
|
|
182
182
|
disabled={!canScrollPrev}
|
|
183
183
|
onClick={scrollPrev}
|
|
184
184
|
{...props}
|
|
185
185
|
>
|
|
186
|
-
<ArrowLeft size={16} />
|
|
186
|
+
<ArrowLeft size={16} color="inherit" />
|
|
187
187
|
<View className="sr-only">Previous slide</View>
|
|
188
188
|
</Button>
|
|
189
189
|
)
|
|
@@ -204,15 +204,15 @@ const CarouselNext = React.forwardRef<
|
|
|
204
204
|
className={cn(
|
|
205
205
|
"absolute h-8 w-8 rounded-full z-10 bg-background bg-opacity-80 backdrop-blur-sm",
|
|
206
206
|
orientation === "horizontal"
|
|
207
|
-
? "-right-12 top-
|
|
208
|
-
: "-bottom-12 left-
|
|
207
|
+
? "-right-12 top-0 bottom-0 my-auto"
|
|
208
|
+
: "-bottom-12 left-0 right-0 mx-auto rotate-90",
|
|
209
209
|
className
|
|
210
210
|
)}
|
|
211
211
|
disabled={!canScrollNext}
|
|
212
212
|
onClick={scrollNext}
|
|
213
213
|
{...props}
|
|
214
214
|
>
|
|
215
|
-
<ArrowRight size={16} />
|
|
215
|
+
<ArrowRight size={16} color="inherit" />
|
|
216
216
|
<View className="sr-only">Next slide</View>
|
|
217
217
|
</Button>
|
|
218
218
|
)
|
|
@@ -210,7 +210,7 @@ const CommandInput = React.forwardRef<
|
|
|
210
210
|
className="flex h-11 items-center border-b px-3"
|
|
211
211
|
data-slot="command-input-wrapper"
|
|
212
212
|
>
|
|
213
|
-
<Search className="mr-2 shrink-0 opacity-50" size={16} />
|
|
213
|
+
<Search className="mr-2 shrink-0 opacity-50" size={16} color="inherit" />
|
|
214
214
|
<Input
|
|
215
215
|
ref={ref}
|
|
216
216
|
className={cn(
|
|
@@ -307,7 +307,7 @@ const ContextMenuCheckboxItem = React.forwardRef<
|
|
|
307
307
|
{...props}
|
|
308
308
|
>
|
|
309
309
|
<View className="pointer-events-none absolute right-2 flex items-center justify-center">
|
|
310
|
-
{checked && <Check size={16} />}
|
|
310
|
+
{checked && <Check size={16} color="inherit" />}
|
|
311
311
|
</View>
|
|
312
312
|
{children}
|
|
313
313
|
</View>
|
|
@@ -351,7 +351,7 @@ const ContextMenuRadioItem = React.forwardRef<
|
|
|
351
351
|
{...props}
|
|
352
352
|
>
|
|
353
353
|
<View className="pointer-events-none absolute right-2 flex items-center justify-center">
|
|
354
|
-
{checked && <Circle className="fill-current" size={8} />}
|
|
354
|
+
{checked && <Circle className="fill-current" size={8} color="inherit" />}
|
|
355
355
|
</View>
|
|
356
356
|
{children}
|
|
357
357
|
</View>
|
|
@@ -494,7 +494,7 @@ const ContextMenuSubTrigger = React.forwardRef<
|
|
|
494
494
|
}}
|
|
495
495
|
>
|
|
496
496
|
{children}
|
|
497
|
-
<ChevronRight className="ml-auto opacity-50" size={16} />
|
|
497
|
+
<ChevronRight className="ml-auto opacity-50" size={16} color="inherit" />
|
|
498
498
|
</View>
|
|
499
499
|
)
|
|
500
500
|
})
|
|
@@ -324,7 +324,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
|
|
324
324
|
}}
|
|
325
325
|
>
|
|
326
326
|
<View className="pointer-events-none absolute right-2 flex items-center justify-center">
|
|
327
|
-
{checked && <Check size={16} />}
|
|
327
|
+
{checked && <Check size={16} color="inherit" />}
|
|
328
328
|
</View>
|
|
329
329
|
{children}
|
|
330
330
|
</View>
|
|
@@ -366,7 +366,7 @@ const DropdownMenuRadioItem = React.forwardRef<
|
|
|
366
366
|
}}
|
|
367
367
|
>
|
|
368
368
|
<View className="pointer-events-none absolute right-2 flex items-center justify-center">
|
|
369
|
-
{checked && <Check size={16} />}
|
|
369
|
+
{checked && <Check size={16} color="inherit" />}
|
|
370
370
|
</View>
|
|
371
371
|
{children}
|
|
372
372
|
</View>
|
|
@@ -445,7 +445,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
|
|
445
445
|
}}
|
|
446
446
|
>
|
|
447
447
|
{children}
|
|
448
|
-
<ChevronRight className="ml-auto opacity-50" size={16} />
|
|
448
|
+
<ChevronRight className="ml-auto opacity-50" size={16} color="inherit" />
|
|
449
449
|
</View>
|
|
450
450
|
)
|
|
451
451
|
})
|
|
@@ -128,7 +128,7 @@ const InputOTPSeparator = React.forwardRef<
|
|
|
128
128
|
React.ComponentPropsWithoutRef<typeof View>
|
|
129
129
|
>(({ ...props }, ref) => (
|
|
130
130
|
<View ref={ref} {...props}>
|
|
131
|
-
<Dot />
|
|
131
|
+
<Dot size={24} color="inherit" />
|
|
132
132
|
</View>
|
|
133
133
|
))
|
|
134
134
|
InputOTPSeparator.displayName = "InputOTPSeparator"
|
|
@@ -268,7 +268,7 @@ const MenubarCheckboxItem = React.forwardRef<
|
|
|
268
268
|
{...props}
|
|
269
269
|
>
|
|
270
270
|
<View className="pointer-events-none absolute right-2 flex items-center justify-center">
|
|
271
|
-
{checked && <Check size={16} />}
|
|
271
|
+
{checked && <Check size={16} color="inherit" />}
|
|
272
272
|
</View>
|
|
273
273
|
{children}
|
|
274
274
|
</View>
|
|
@@ -344,7 +344,7 @@ const MenubarRadioItem = React.forwardRef<
|
|
|
344
344
|
{...props}
|
|
345
345
|
>
|
|
346
346
|
<View className="pointer-events-none absolute right-2 flex items-center justify-center">
|
|
347
|
-
{checked && <Check size={16} />}
|
|
347
|
+
{checked && <Check size={16} color="inherit" />}
|
|
348
348
|
</View>
|
|
349
349
|
{children}
|
|
350
350
|
</View>
|
|
@@ -474,7 +474,7 @@ const MenubarSubTrigger = React.forwardRef<
|
|
|
474
474
|
}}
|
|
475
475
|
>
|
|
476
476
|
{children}
|
|
477
|
-
<ChevronRight className="ml-auto opacity-50" size={16} />
|
|
477
|
+
<ChevronRight className="ml-auto opacity-50" size={16} color="inherit" />
|
|
478
478
|
</View>
|
|
479
479
|
)
|
|
480
480
|
})
|
|
@@ -70,7 +70,7 @@ const PaginationPrevious = ({
|
|
|
70
70
|
className={cn("gap-1 pl-3", className)}
|
|
71
71
|
{...props}
|
|
72
72
|
>
|
|
73
|
-
<ChevronLeft size={16} />
|
|
73
|
+
<ChevronLeft size={16} color="inherit" />
|
|
74
74
|
<Text>上一页</Text>
|
|
75
75
|
</PaginationLink>
|
|
76
76
|
)
|
|
@@ -87,7 +87,7 @@ const PaginationNext = ({
|
|
|
87
87
|
{...props}
|
|
88
88
|
>
|
|
89
89
|
<Text>下一页</Text>
|
|
90
|
-
<ChevronRight size={16} />
|
|
90
|
+
<ChevronRight size={16} color="inherit" />
|
|
91
91
|
</PaginationLink>
|
|
92
92
|
)
|
|
93
93
|
PaginationNext.displayName = "PaginationNext"
|
|
@@ -101,7 +101,7 @@ const PaginationEllipsis = ({
|
|
|
101
101
|
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
102
102
|
{...props}
|
|
103
103
|
>
|
|
104
|
-
<Ellipsis size={16} />
|
|
104
|
+
<Ellipsis size={16} color="inherit" />
|
|
105
105
|
<View className="sr-only">More pages</View>
|
|
106
106
|
</View>
|
|
107
107
|
)
|
|
@@ -334,7 +334,7 @@ const ResizableHandle = ({
|
|
|
334
334
|
/>
|
|
335
335
|
{withHandle && (
|
|
336
336
|
<View className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
|
|
337
|
-
<GripVertical className="h-3 w-3" />
|
|
337
|
+
<GripVertical className="h-3 w-3" size={12} color="inherit" />
|
|
338
338
|
</View>
|
|
339
339
|
)}
|
|
340
340
|
</View>
|
|
@@ -147,7 +147,7 @@ const SelectTrigger = React.forwardRef<
|
|
|
147
147
|
}}
|
|
148
148
|
>
|
|
149
149
|
{children}
|
|
150
|
-
<ChevronDown className="text-muted-foreground" size={16} />
|
|
150
|
+
<ChevronDown className="text-muted-foreground" size={16} color="inherit" />
|
|
151
151
|
</View>
|
|
152
152
|
)
|
|
153
153
|
})
|
|
@@ -155,14 +155,14 @@ SelectTrigger.displayName = "SelectTrigger"
|
|
|
155
155
|
|
|
156
156
|
const SelectScrollUpButton = ({ className, ...props }: React.ComponentPropsWithoutRef<typeof View>) => (
|
|
157
157
|
<View className={cn("flex cursor-default items-center justify-center py-1", className)} {...props}>
|
|
158
|
-
<ChevronUp size={16} />
|
|
158
|
+
<ChevronUp size={16} color="inherit" />
|
|
159
159
|
</View>
|
|
160
160
|
)
|
|
161
161
|
SelectScrollUpButton.displayName = "SelectScrollUpButton"
|
|
162
162
|
|
|
163
163
|
const SelectScrollDownButton = ({ className, ...props }: React.ComponentPropsWithoutRef<typeof View>) => (
|
|
164
164
|
<View className={cn("flex cursor-default items-center justify-center py-1", className)} {...props}>
|
|
165
|
-
<ChevronDown size={16} />
|
|
165
|
+
<ChevronDown size={16} color="inherit" />
|
|
166
166
|
</View>
|
|
167
167
|
)
|
|
168
168
|
SelectScrollDownButton.displayName = "SelectScrollDownButton"
|
|
@@ -404,7 +404,7 @@ const SelectItem = React.forwardRef<
|
|
|
404
404
|
</View>
|
|
405
405
|
{isSelected ? (
|
|
406
406
|
<View className="pointer-events-none absolute right-2 flex h-4 w-4 items-center justify-center">
|
|
407
|
-
<Check size={16} />
|
|
407
|
+
<Check size={16} color="inherit" />
|
|
408
408
|
</View>
|
|
409
409
|
) : null}
|
|
410
410
|
</View>
|
|
@@ -179,14 +179,14 @@ const SheetContent = React.forwardRef<
|
|
|
179
179
|
>
|
|
180
180
|
{children}
|
|
181
181
|
<View
|
|
182
|
-
className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"
|
|
182
|
+
className="absolute right-4 top-4 flex h-8 w-8 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"
|
|
183
183
|
data-state={state}
|
|
184
184
|
onClick={(e) => {
|
|
185
185
|
e.stopPropagation()
|
|
186
186
|
context?.onOpenChange?.(false)
|
|
187
187
|
}}
|
|
188
188
|
>
|
|
189
|
-
<X size={16} />
|
|
189
|
+
<X size={16} color="inherit" />
|
|
190
190
|
<View className="sr-only">Close</View>
|
|
191
191
|
</View>
|
|
192
192
|
</View>
|
|
@@ -258,7 +258,7 @@ const Toaster = ({
|
|
|
258
258
|
<Portal>
|
|
259
259
|
<View
|
|
260
260
|
className={cn(
|
|
261
|
-
"toaster fixed z-[
|
|
261
|
+
"toaster fixed z-[2147483647] flex w-full pointer-events-none p-4",
|
|
262
262
|
getPositionStyle(position),
|
|
263
263
|
className
|
|
264
264
|
)}
|
|
@@ -392,7 +392,7 @@ const ToastItem = ({
|
|
|
392
392
|
return null
|
|
393
393
|
}, [item.type, richColors])
|
|
394
394
|
|
|
395
|
-
const iconColor = palette?.color
|
|
395
|
+
const iconColor = palette?.color ?? "inherit"
|
|
396
396
|
|
|
397
397
|
const isCollapsedStack = !isExpanded && !isFront
|
|
398
398
|
const lift = isTop ? 1 : -1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const IS_H5_ENV = TARO_ENV === 'h5';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { IS_H5_ENV } from './env';
|
|
2
3
|
import { H5NavBar } from './h5-navbar';
|
|
3
4
|
|
|
4
5
|
export const H5Container = ({ children }: PropsWithChildren) => {
|
|
5
|
-
if (
|
|
6
|
+
if (!IS_H5_ENV) {
|
|
6
7
|
return <>{children}</>;
|
|
7
8
|
}
|
|
8
9
|
|