@teamix-evo/ui 0.5.2 → 0.6.0
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/package.json +19 -19
- package/src/components/alert/index.tsx +1 -1
- package/src/components/alert-dialog/index.tsx +17 -24
- package/src/components/alert-dialog/meta.md +102 -8
- package/src/components/alert-dialog/stories.tsx +117 -7
- package/src/components/avatar/index.tsx +1 -1
- package/src/components/badge/index.tsx +1 -1
- package/src/components/button/index.tsx +1 -29
- package/src/components/button/meta.md +24 -13
- package/src/components/button/stories.tsx +21 -12
- package/src/components/button-group/meta.md +6 -9
- package/src/components/button-group/stories.tsx +2 -6
- package/src/components/calendar/index.tsx +12 -7
- package/src/components/cascader-select/index.tsx +1 -1
- package/src/components/checkbox/index.tsx +1 -1
- package/src/components/combobox/index.tsx +54 -10
- package/src/components/combobox/meta.md +3 -5
- package/src/components/combobox/stories.tsx +104 -25
- package/src/components/data-table/stories.tsx +4 -1
- package/src/components/date-picker/index.tsx +25 -2
- package/src/components/field/index.tsx +1 -1
- package/src/components/filter-bar/index.tsx +1 -1
- package/src/components/float-button/meta.md +3 -15
- package/src/components/icon/index.tsx +3 -4
- package/src/components/icon/meta.md +1 -2
- package/src/components/input/index.tsx +10 -2
- package/src/components/input-group/index.tsx +3 -3
- package/src/components/input-group/meta.md +15 -0
- package/src/components/input-group/stories.tsx +14 -0
- package/src/components/input-ip/index.tsx +1 -1
- package/src/components/input-number/index.tsx +5 -5
- package/src/components/item/meta.md +11 -11
- package/src/components/radio-group/index.tsx +1 -1
- package/src/components/rate/index.tsx +3 -3
- package/src/components/select/index.tsx +2 -2
- package/src/components/skeleton/index.tsx +1 -1
- package/src/components/skeleton/meta.md +6 -6
- package/src/components/skeleton/stories.tsx +8 -8
- package/src/components/slider/index.tsx +27 -1
- package/src/components/sonner/index.tsx +43 -40
- package/src/components/sonner/meta.md +84 -68
- package/src/components/sonner/stories.tsx +122 -83
- package/src/components/spinner/index.tsx +170 -0
- package/src/components/spinner/meta.md +27 -1
- package/src/components/spinner/stories.tsx +23 -0
- package/src/components/steps/index.tsx +5 -1
- package/src/components/switch/index.tsx +1 -1
- package/src/components/tag/index.tsx +14 -0
- package/src/components/tag/meta.md +1 -0
- package/src/components/tag/stories.tsx +13 -0
- package/src/components/textarea/index.tsx +1 -1
- package/src/components/textarea/stories.tsx +1 -1
- package/src/components/time-picker/index.tsx +3 -1
- package/src/components/toggle/index.tsx +1 -1
- package/src/components/tooltip/index.tsx +5 -1
- package/src/components/tooltip/meta.md +13 -28
- package/src/components/tooltip/stories.tsx +11 -28
- package/src/components/tree-select/index.tsx +1 -1
- package/LICENSE +0 -21
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import {
|
|
3
3
|
Tooltip,
|
|
4
|
-
TooltipArrow,
|
|
5
4
|
TooltipContent,
|
|
6
5
|
TooltipProvider,
|
|
7
6
|
TooltipTrigger,
|
|
@@ -115,27 +114,23 @@ export const AllPositions: Story = {
|
|
|
115
114
|
},
|
|
116
115
|
};
|
|
117
116
|
|
|
118
|
-
/**
|
|
119
|
-
export const
|
|
117
|
+
/** 隐藏箭头:showArrow={false}。 */
|
|
118
|
+
export const WithoutArrow: Story = {
|
|
120
119
|
render: () => (
|
|
121
120
|
<TooltipProvider>
|
|
122
121
|
<div className="flex items-center gap-4">
|
|
123
122
|
<Tooltip>
|
|
124
123
|
<TooltipTrigger asChild>
|
|
125
|
-
<Button
|
|
124
|
+
<Button>无箭头</Button>
|
|
126
125
|
</TooltipTrigger>
|
|
127
|
-
<TooltipContent>
|
|
128
|
-
提示内容
|
|
129
|
-
<TooltipArrow />
|
|
130
|
-
</TooltipContent>
|
|
126
|
+
<TooltipContent showArrow={false}>提示内容</TooltipContent>
|
|
131
127
|
</Tooltip>
|
|
132
128
|
<Tooltip>
|
|
133
129
|
<TooltipTrigger asChild>
|
|
134
|
-
<Button
|
|
130
|
+
<Button>反色无箭头</Button>
|
|
135
131
|
</TooltipTrigger>
|
|
136
|
-
<TooltipContent variant="inverse">
|
|
132
|
+
<TooltipContent variant="inverse" showArrow={false}>
|
|
137
133
|
深色提示
|
|
138
|
-
<TooltipArrow />
|
|
139
134
|
</TooltipContent>
|
|
140
135
|
</Tooltip>
|
|
141
136
|
</div>
|
|
@@ -143,7 +138,7 @@ export const WithArrow: Story = {
|
|
|
143
138
|
),
|
|
144
139
|
};
|
|
145
140
|
|
|
146
|
-
/** 四个方向的箭头 — 箭头随 side 自动朝向 trigger
|
|
141
|
+
/** 四个方向的箭头 — 箭头随 side 自动朝向 trigger(默认即带箭头)。 */
|
|
147
142
|
export const ArrowSides: Story = {
|
|
148
143
|
render: () => (
|
|
149
144
|
<TooltipProvider delayDuration={0}>
|
|
@@ -152,37 +147,25 @@ export const ArrowSides: Story = {
|
|
|
152
147
|
<TooltipTrigger asChild>
|
|
153
148
|
<Button>side=top</Button>
|
|
154
149
|
</TooltipTrigger>
|
|
155
|
-
<TooltipContent side="top">
|
|
156
|
-
top
|
|
157
|
-
<TooltipArrow />
|
|
158
|
-
</TooltipContent>
|
|
150
|
+
<TooltipContent side="top">top</TooltipContent>
|
|
159
151
|
</Tooltip>
|
|
160
152
|
<Tooltip open>
|
|
161
153
|
<TooltipTrigger asChild>
|
|
162
154
|
<Button>side=bottom</Button>
|
|
163
155
|
</TooltipTrigger>
|
|
164
|
-
<TooltipContent side="bottom">
|
|
165
|
-
bottom
|
|
166
|
-
<TooltipArrow />
|
|
167
|
-
</TooltipContent>
|
|
156
|
+
<TooltipContent side="bottom">bottom</TooltipContent>
|
|
168
157
|
</Tooltip>
|
|
169
158
|
<Tooltip open>
|
|
170
159
|
<TooltipTrigger asChild>
|
|
171
160
|
<Button>side=left</Button>
|
|
172
161
|
</TooltipTrigger>
|
|
173
|
-
<TooltipContent side="left">
|
|
174
|
-
left
|
|
175
|
-
<TooltipArrow />
|
|
176
|
-
</TooltipContent>
|
|
162
|
+
<TooltipContent side="left">left</TooltipContent>
|
|
177
163
|
</Tooltip>
|
|
178
164
|
<Tooltip open>
|
|
179
165
|
<TooltipTrigger asChild>
|
|
180
166
|
<Button>side=right</Button>
|
|
181
167
|
</TooltipTrigger>
|
|
182
|
-
<TooltipContent side="right">
|
|
183
|
-
right
|
|
184
|
-
<TooltipArrow />
|
|
185
|
-
</TooltipContent>
|
|
168
|
+
<TooltipContent side="right">right</TooltipContent>
|
|
186
169
|
</Tooltip>
|
|
187
170
|
</div>
|
|
188
171
|
</TooltipProvider>
|
|
@@ -26,7 +26,7 @@ import { findNode } from '@/components/tree/utils';
|
|
|
26
26
|
// ─── Variants ────────────────────────────────────────────────────────────────
|
|
27
27
|
|
|
28
28
|
const treeSelectTriggerVariants = cva(
|
|
29
|
-
'flex w-fit min-w-36 cursor-pointer items-center justify-between gap-1.5 rounded-md border border-input bg-transparent px-2.5 text-xs whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-
|
|
29
|
+
'flex w-fit min-w-36 cursor-pointer items-center justify-between gap-1.5 rounded-md border border-input bg-transparent px-2.5 text-xs whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20',
|
|
30
30
|
{
|
|
31
31
|
variants: {
|
|
32
32
|
size: {
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Teamix Evo Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|