@okshaun/components 1.0.0 → 1.0.2
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/dist/index.js +133 -89
- package/dist/index.js.map +1 -1
- package/dist/{preset-KB9Tn8-2.js → preset-DCCViEDs.js} +2879 -2883
- package/dist/preset-DCCViEDs.js.map +1 -0
- package/dist/preset.js +1 -1
- package/dist/specs/conditions.json +1 -1
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +14 -14
- package/dist/styles/global.css +1 -1
- package/dist/styles/recipes/avatar.css +1 -1
- package/dist/styles/recipes/breadcrumbs.css +1 -1
- package/dist/styles/recipes/button.css +1 -1
- package/dist/styles/recipes/checkbox.css +1 -1
- package/dist/styles/recipes/chip.css +1 -1
- package/dist/styles/recipes/divider.css +2 -5
- package/dist/styles/recipes/icon-button.css +1 -1
- package/dist/styles/recipes/menu.css +1 -1
- package/dist/styles/recipes/radio.css +2 -2
- package/dist/styles/recipes/toggle.css +2 -2
- package/dist/styles/utilities.css +9 -9
- package/dist/svgs/building.svg +1 -0
- package/dist/types/index.d.ts +11 -18
- package/package.json +6 -18
- package/src/recipes/avatar.ts +96 -96
- package/src/recipes/badge.ts +0 -9
- package/src/recipes/divider.ts +2 -1
- package/src/recipes/index.ts +1 -1
- package/src/recipes/modal.ts +7 -4
- package/src/recipes/tooltip.ts +3 -3
- package/src/styles/primitives/radii.ts +1 -1
- package/src/styles/utilities/conditions.ts +1 -1
- package/src/styles/utilities/textStyles.ts +1 -1
- package/src/utils/splitProps.ts +1 -1
- package/src/utils/spriteContent.ts +1 -1
- package/dist/preset-KB9Tn8-2.js.map +0 -1
package/src/recipes/avatar.ts
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { defineSlotRecipe } from
|
|
1
|
+
import { defineSlotRecipe } from "@pandacss/dev";
|
|
2
2
|
|
|
3
3
|
export const avatarRecipe = defineSlotRecipe({
|
|
4
|
-
className:
|
|
5
|
-
jsx: [
|
|
6
|
-
slots: [
|
|
4
|
+
className: "avatar",
|
|
5
|
+
jsx: ["Avatar"],
|
|
6
|
+
slots: ["root", "image", "fallback", "presence", "status"],
|
|
7
7
|
staticCss: [
|
|
8
8
|
{
|
|
9
|
-
size: [
|
|
10
|
-
shape: [
|
|
9
|
+
size: ["xs", "sm", "md", "lx", "xl", "2xl"],
|
|
10
|
+
shape: ["circle", "square", "hexagon"],
|
|
11
11
|
},
|
|
12
12
|
],
|
|
13
13
|
base: {
|
|
14
14
|
root: {
|
|
15
|
-
display:
|
|
16
|
-
position:
|
|
17
|
-
alignItems:
|
|
18
|
-
justifyContent:
|
|
19
|
-
verticalAlign:
|
|
15
|
+
display: "inline-flex",
|
|
16
|
+
position: "relative",
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
justifyContent: "center",
|
|
19
|
+
verticalAlign: "middle",
|
|
20
20
|
flexShrink: 0,
|
|
21
|
-
color:
|
|
22
|
-
bg:
|
|
23
|
-
userSelect:
|
|
24
|
-
aspectRatio:
|
|
21
|
+
color: "text",
|
|
22
|
+
bg: "bg.neutral",
|
|
23
|
+
userSelect: "none",
|
|
24
|
+
aspectRatio: "square",
|
|
25
25
|
},
|
|
26
26
|
image: {
|
|
27
|
-
w:
|
|
28
|
-
h:
|
|
29
|
-
objectFit:
|
|
30
|
-
overflow:
|
|
27
|
+
w: "full",
|
|
28
|
+
h: "full",
|
|
29
|
+
objectFit: "cover",
|
|
30
|
+
overflow: "hidden",
|
|
31
31
|
},
|
|
32
32
|
fallback: {
|
|
33
|
-
display:
|
|
34
|
-
alignItems:
|
|
35
|
-
justifyContent:
|
|
36
|
-
w:
|
|
37
|
-
h:
|
|
38
|
-
fontFamily:
|
|
39
|
-
fontWeight:
|
|
40
|
-
textTransform:
|
|
41
|
-
color:
|
|
33
|
+
display: "flex",
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
justifyContent: "center",
|
|
36
|
+
w: "full",
|
|
37
|
+
h: "full",
|
|
38
|
+
fontFamily: "sans",
|
|
39
|
+
fontWeight: "medium",
|
|
40
|
+
textTransform: "uppercase",
|
|
41
|
+
color: "text.subtle",
|
|
42
42
|
},
|
|
43
43
|
presence: {
|
|
44
|
-
position:
|
|
45
|
-
bottom:
|
|
46
|
-
right:
|
|
47
|
-
borderRadius:
|
|
48
|
-
borderWidth:
|
|
49
|
-
borderStyle:
|
|
50
|
-
borderColor:
|
|
44
|
+
position: "absolute",
|
|
45
|
+
bottom: "0",
|
|
46
|
+
right: "0",
|
|
47
|
+
borderRadius: "999",
|
|
48
|
+
borderWidth: "2",
|
|
49
|
+
borderStyle: "solid",
|
|
50
|
+
borderColor: "bg",
|
|
51
51
|
zIndex: 1,
|
|
52
52
|
},
|
|
53
53
|
status: {
|
|
54
|
-
position:
|
|
55
|
-
top:
|
|
56
|
-
right:
|
|
57
|
-
display:
|
|
58
|
-
alignItems:
|
|
59
|
-
justifyContent:
|
|
60
|
-
borderRadius:
|
|
61
|
-
borderWidth:
|
|
62
|
-
borderStyle:
|
|
63
|
-
borderColor:
|
|
54
|
+
position: "absolute",
|
|
55
|
+
top: "0",
|
|
56
|
+
right: "0",
|
|
57
|
+
display: "flex",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
justifyContent: "center",
|
|
60
|
+
borderRadius: "999",
|
|
61
|
+
borderWidth: "2",
|
|
62
|
+
borderStyle: "solid",
|
|
63
|
+
borderColor: "bg",
|
|
64
64
|
zIndex: 1,
|
|
65
65
|
},
|
|
66
66
|
},
|
|
@@ -68,138 +68,138 @@ export const avatarRecipe = defineSlotRecipe({
|
|
|
68
68
|
size: {
|
|
69
69
|
xs: {
|
|
70
70
|
root: {
|
|
71
|
-
w:
|
|
72
|
-
h:
|
|
71
|
+
w: "16",
|
|
72
|
+
h: "16",
|
|
73
73
|
},
|
|
74
74
|
fallback: {
|
|
75
|
-
fontSize:
|
|
75
|
+
fontSize: "8",
|
|
76
76
|
},
|
|
77
77
|
presence: {
|
|
78
|
-
w:
|
|
79
|
-
h:
|
|
78
|
+
w: "6",
|
|
79
|
+
h: "6",
|
|
80
80
|
},
|
|
81
81
|
status: {
|
|
82
|
-
w:
|
|
83
|
-
h:
|
|
82
|
+
w: "8",
|
|
83
|
+
h: "8",
|
|
84
84
|
},
|
|
85
85
|
},
|
|
86
86
|
sm: {
|
|
87
87
|
root: {
|
|
88
|
-
w:
|
|
89
|
-
h:
|
|
88
|
+
w: "20",
|
|
89
|
+
h: "20",
|
|
90
90
|
},
|
|
91
91
|
fallback: {
|
|
92
|
-
fontSize:
|
|
92
|
+
fontSize: "10",
|
|
93
93
|
},
|
|
94
94
|
presence: {
|
|
95
|
-
w:
|
|
96
|
-
h:
|
|
95
|
+
w: "8",
|
|
96
|
+
h: "8",
|
|
97
97
|
},
|
|
98
98
|
status: {
|
|
99
|
-
w:
|
|
100
|
-
h:
|
|
99
|
+
w: "10",
|
|
100
|
+
h: "10",
|
|
101
101
|
},
|
|
102
102
|
},
|
|
103
103
|
md: {
|
|
104
104
|
root: {
|
|
105
|
-
w:
|
|
106
|
-
h:
|
|
105
|
+
w: "24",
|
|
106
|
+
h: "24",
|
|
107
107
|
},
|
|
108
108
|
fallback: {
|
|
109
|
-
fontSize:
|
|
109
|
+
fontSize: "12",
|
|
110
110
|
},
|
|
111
111
|
presence: {
|
|
112
|
-
w:
|
|
113
|
-
h:
|
|
112
|
+
w: "8",
|
|
113
|
+
h: "8",
|
|
114
114
|
},
|
|
115
115
|
status: {
|
|
116
|
-
w:
|
|
117
|
-
h:
|
|
116
|
+
w: "10",
|
|
117
|
+
h: "10",
|
|
118
118
|
},
|
|
119
119
|
},
|
|
120
120
|
lg: {
|
|
121
121
|
root: {
|
|
122
|
-
w:
|
|
123
|
-
h:
|
|
122
|
+
w: "32",
|
|
123
|
+
h: "32",
|
|
124
124
|
},
|
|
125
125
|
fallback: {
|
|
126
|
-
fontSize:
|
|
126
|
+
fontSize: "14",
|
|
127
127
|
},
|
|
128
128
|
presence: {
|
|
129
|
-
w:
|
|
130
|
-
h:
|
|
129
|
+
w: "10",
|
|
130
|
+
h: "10",
|
|
131
131
|
},
|
|
132
132
|
status: {
|
|
133
|
-
w:
|
|
134
|
-
h:
|
|
133
|
+
w: "12",
|
|
134
|
+
h: "12",
|
|
135
135
|
},
|
|
136
136
|
},
|
|
137
137
|
xl: {
|
|
138
138
|
root: {
|
|
139
|
-
w:
|
|
140
|
-
h:
|
|
139
|
+
w: "48",
|
|
140
|
+
h: "48",
|
|
141
141
|
},
|
|
142
142
|
fallback: {
|
|
143
|
-
fontSize:
|
|
143
|
+
fontSize: "20",
|
|
144
144
|
},
|
|
145
145
|
presence: {
|
|
146
|
-
w:
|
|
147
|
-
h:
|
|
146
|
+
w: "12",
|
|
147
|
+
h: "12",
|
|
148
148
|
},
|
|
149
149
|
status: {
|
|
150
|
-
w:
|
|
151
|
-
h:
|
|
150
|
+
w: "16",
|
|
151
|
+
h: "16",
|
|
152
152
|
},
|
|
153
153
|
},
|
|
154
|
-
|
|
154
|
+
"2xl": {
|
|
155
155
|
root: {
|
|
156
|
-
w:
|
|
157
|
-
h:
|
|
156
|
+
w: "64",
|
|
157
|
+
h: "64",
|
|
158
158
|
},
|
|
159
159
|
fallback: {
|
|
160
|
-
fontSize:
|
|
160
|
+
fontSize: "24",
|
|
161
161
|
},
|
|
162
162
|
presence: {
|
|
163
|
-
w:
|
|
164
|
-
h:
|
|
163
|
+
w: "14",
|
|
164
|
+
h: "14",
|
|
165
165
|
},
|
|
166
166
|
status: {
|
|
167
|
-
w:
|
|
168
|
-
h:
|
|
167
|
+
w: "20",
|
|
168
|
+
h: "20",
|
|
169
169
|
},
|
|
170
170
|
},
|
|
171
171
|
},
|
|
172
172
|
shape: {
|
|
173
173
|
circle: {
|
|
174
174
|
root: {
|
|
175
|
-
borderRadius:
|
|
175
|
+
borderRadius: "999",
|
|
176
176
|
},
|
|
177
177
|
image: {
|
|
178
|
-
borderRadius:
|
|
178
|
+
borderRadius: "999",
|
|
179
179
|
},
|
|
180
180
|
},
|
|
181
181
|
square: {
|
|
182
182
|
root: {
|
|
183
|
-
borderRadius:
|
|
183
|
+
borderRadius: "4",
|
|
184
184
|
},
|
|
185
185
|
image: {
|
|
186
|
-
borderRadius:
|
|
186
|
+
borderRadius: "4",
|
|
187
187
|
},
|
|
188
188
|
},
|
|
189
189
|
hexagon: {
|
|
190
190
|
root: {
|
|
191
191
|
clipPath:
|
|
192
|
-
|
|
192
|
+
"polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,89.64102% 21.33975%,91.06889% 22.33956%,92.30146% 23.57212%,93.30127% 25%,94.03794% 26.5798%,94.48909% 28.26352%,94.64102% 30%,94.64102% 70%,94.48909% 71.73648%,94.03794% 73.4202%,93.30127% 75%,92.30146% 76.42788%,91.06889% 77.66044%,89.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,10.35898% 78.66025%,8.93111% 77.66044%,7.69854% 76.42788%,6.69873% 75%,5.96206% 73.4202%,5.51091% 71.73648%,5.35898% 70%,5.35898% 30%,5.51091% 28.26352%,5.96206% 26.5798%,6.69873% 25%,7.69854% 23.57212%,8.93111% 22.33956%,10.35898% 21.33975%)",
|
|
193
193
|
},
|
|
194
194
|
image: {
|
|
195
195
|
clipPath:
|
|
196
|
-
|
|
196
|
+
"polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,89.64102% 21.33975%,91.06889% 22.33956%,92.30146% 23.57212%,93.30127% 25%,94.03794% 26.5798%,94.48909% 28.26352%,94.64102% 30%,94.64102% 70%,94.48909% 71.73648%,94.03794% 73.4202%,93.30127% 75%,92.30146% 76.42788%,91.06889% 77.66044%,89.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,10.35898% 78.66025%,8.93111% 77.66044%,7.69854% 76.42788%,6.69873% 75%,5.96206% 73.4202%,5.51091% 71.73648%,5.35898% 70%,5.35898% 30%,5.51091% 28.26352%,5.96206% 26.5798%,6.69873% 25%,7.69854% 23.57212%,8.93111% 22.33956%,10.35898% 21.33975%)",
|
|
197
197
|
},
|
|
198
198
|
},
|
|
199
199
|
},
|
|
200
200
|
},
|
|
201
201
|
defaultVariants: {
|
|
202
|
-
size:
|
|
203
|
-
shape:
|
|
202
|
+
size: "md",
|
|
203
|
+
shape: "circle",
|
|
204
204
|
},
|
|
205
205
|
});
|
package/src/recipes/badge.ts
CHANGED
|
@@ -146,9 +146,6 @@ export const badgeRecipe = defineSlotRecipe({
|
|
|
146
146
|
indicator: {
|
|
147
147
|
minW: '16',
|
|
148
148
|
h: 'fit',
|
|
149
|
-
// w: '4',
|
|
150
|
-
// h: '4',
|
|
151
|
-
// p: '3',
|
|
152
149
|
},
|
|
153
150
|
},
|
|
154
151
|
},
|
|
@@ -159,9 +156,6 @@ export const badgeRecipe = defineSlotRecipe({
|
|
|
159
156
|
indicator: {
|
|
160
157
|
minW: '20',
|
|
161
158
|
h: 'fit',
|
|
162
|
-
// w: '6',
|
|
163
|
-
// h: '6',
|
|
164
|
-
// p: '4',
|
|
165
159
|
},
|
|
166
160
|
},
|
|
167
161
|
},
|
|
@@ -172,9 +166,6 @@ export const badgeRecipe = defineSlotRecipe({
|
|
|
172
166
|
indicator: {
|
|
173
167
|
minW: '24',
|
|
174
168
|
h: 'fit',
|
|
175
|
-
// w: '8',
|
|
176
|
-
// h: '8',
|
|
177
|
-
// p: '5',
|
|
178
169
|
},
|
|
179
170
|
},
|
|
180
171
|
},
|
package/src/recipes/divider.ts
CHANGED
package/src/recipes/index.ts
CHANGED
|
@@ -24,5 +24,5 @@ export { selectRecipe } from './select';
|
|
|
24
24
|
export { chipRecipe } from './chip';
|
|
25
25
|
export { badgeRecipe } from './badge';
|
|
26
26
|
export { avatarRecipe } from './avatar';
|
|
27
|
-
export { modalRecipe } from './modal';
|
|
27
|
+
export { modalRecipe, MODAL_ANIMATION_DURATION } from './modal';
|
|
28
28
|
export { formFieldRecipe } from './formField';
|
package/src/recipes/modal.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
2
|
|
|
3
|
+
/** Shared animation duration (ms) — used in both CSS animations and JS unmount timeout */
|
|
4
|
+
export const MODAL_ANIMATION_DURATION = 150;
|
|
5
|
+
|
|
3
6
|
const modalBase = {
|
|
4
7
|
overlay: {
|
|
5
8
|
position: 'fixed',
|
|
@@ -9,9 +12,9 @@ const modalBase = {
|
|
|
9
12
|
// Initial state matches animation start
|
|
10
13
|
opacity: '0',
|
|
11
14
|
// Animation handled via data-state
|
|
12
|
-
animation:
|
|
15
|
+
animation: `modalFadeIn ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
|
|
13
16
|
'&[data-state="closing"]': {
|
|
14
|
-
animation:
|
|
17
|
+
animation: `modalFadeOut ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
|
|
15
18
|
},
|
|
16
19
|
},
|
|
17
20
|
container: {
|
|
@@ -30,9 +33,9 @@ const modalBase = {
|
|
|
30
33
|
opacity: '0',
|
|
31
34
|
transform: 'translate(-50%, -50%) scale(0.95) translateY(-10px)',
|
|
32
35
|
// Animation handled via data-state
|
|
33
|
-
animation:
|
|
36
|
+
animation: `modalScaleIn ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
|
|
34
37
|
'&[data-state="closing"]': {
|
|
35
|
-
animation:
|
|
38
|
+
animation: `modalScaleOut ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
|
|
36
39
|
},
|
|
37
40
|
},
|
|
38
41
|
header: {
|
package/src/recipes/tooltip.ts
CHANGED
|
@@ -86,7 +86,7 @@ const tooltipVariants = {
|
|
|
86
86
|
right: {
|
|
87
87
|
tooltipContent: {
|
|
88
88
|
top: '50%',
|
|
89
|
-
left:
|
|
89
|
+
left: 'calc(100% - 0.75rem)',
|
|
90
90
|
transform: 'translate(10%, -50%)',
|
|
91
91
|
_after: {
|
|
92
92
|
top: '50%',
|
|
@@ -137,7 +137,7 @@ const tooltipVariants = {
|
|
|
137
137
|
'right-start': {
|
|
138
138
|
tooltipContent: {
|
|
139
139
|
top: '0',
|
|
140
|
-
left:
|
|
140
|
+
left: 'calc(100% - 0.75rem)',
|
|
141
141
|
transform: 'translate(10%, 0%)',
|
|
142
142
|
_after: {
|
|
143
143
|
top: '8',
|
|
@@ -188,7 +188,7 @@ const tooltipVariants = {
|
|
|
188
188
|
'right-end': {
|
|
189
189
|
tooltipContent: {
|
|
190
190
|
bottom: '0',
|
|
191
|
-
left:
|
|
191
|
+
left: 'calc(100% - 0.75rem)',
|
|
192
192
|
transform: 'translate(10%, -0%)',
|
|
193
193
|
_after: {
|
|
194
194
|
bottom: '8',
|
|
@@ -9,6 +9,6 @@ export const radii = defineTokens.radii({
|
|
|
9
9
|
'4': { value: '{sizes.4}' },
|
|
10
10
|
'8': { value: '{sizes.8}' },
|
|
11
11
|
'16': { value: '{sizes.16}' },
|
|
12
|
-
'100': { value: utilitySizes
|
|
12
|
+
'100': { value: utilitySizes.full.value },
|
|
13
13
|
'999': { value: '999px' },
|
|
14
14
|
});
|
|
@@ -2,7 +2,7 @@ export const conditions = {
|
|
|
2
2
|
hover: '&:is(:hover, [data-hover=true])',
|
|
3
3
|
focus: '&:is(:focus, [data-focus=true])',
|
|
4
4
|
focusWithin: '&:focus-within',
|
|
5
|
-
focusVisible: '&:is(:focus-visible, [data-focus-visible
|
|
5
|
+
focusVisible: '&:is(:focus-visible, [data-focus-visible=true])',
|
|
6
6
|
disabled:
|
|
7
7
|
'&:is(:disabled, [disabled], [data-disabled], [aria-disabled=true])',
|
|
8
8
|
deleted: '&:is(:deleted, [deleted], [data-deleted=true])',
|