@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.
@@ -1,66 +1,66 @@
1
- import { defineSlotRecipe } from '@pandacss/dev';
1
+ import { defineSlotRecipe } from "@pandacss/dev";
2
2
 
3
3
  export const avatarRecipe = defineSlotRecipe({
4
- className: 'avatar',
5
- jsx: ['Avatar'],
6
- slots: ['root', 'image', 'fallback', 'presence', 'status'],
4
+ className: "avatar",
5
+ jsx: ["Avatar"],
6
+ slots: ["root", "image", "fallback", "presence", "status"],
7
7
  staticCss: [
8
8
  {
9
- size: ['xs', 'sm', 'md', 'lx', 'xl', '2xl'],
10
- shape: ['circle', 'square', 'hexagon'],
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: 'inline-flex',
16
- position: 'relative',
17
- alignItems: 'center',
18
- justifyContent: 'center',
19
- verticalAlign: 'middle',
15
+ display: "inline-flex",
16
+ position: "relative",
17
+ alignItems: "center",
18
+ justifyContent: "center",
19
+ verticalAlign: "middle",
20
20
  flexShrink: 0,
21
- color: 'text',
22
- bg: 'bg.neutral',
23
- userSelect: 'none',
24
- aspectRatio: 'square',
21
+ color: "text",
22
+ bg: "bg.neutral",
23
+ userSelect: "none",
24
+ aspectRatio: "square",
25
25
  },
26
26
  image: {
27
- w: 'full',
28
- h: 'full',
29
- objectFit: 'cover',
30
- overflow: 'hidden',
27
+ w: "full",
28
+ h: "full",
29
+ objectFit: "cover",
30
+ overflow: "hidden",
31
31
  },
32
32
  fallback: {
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',
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: 'absolute',
45
- bottom: '0',
46
- right: '0',
47
- borderRadius: 'full',
48
- borderWidth: '2',
49
- borderStyle: 'solid',
50
- borderColor: 'bg',
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: 'absolute',
55
- top: '0',
56
- right: '0',
57
- display: 'flex',
58
- alignItems: 'center',
59
- justifyContent: 'center',
60
- borderRadius: 'full',
61
- borderWidth: '2',
62
- borderStyle: 'solid',
63
- borderColor: 'bg',
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: '16',
72
- h: '16',
71
+ w: "16",
72
+ h: "16",
73
73
  },
74
74
  fallback: {
75
- fontSize: '8',
75
+ fontSize: "8",
76
76
  },
77
77
  presence: {
78
- w: '6',
79
- h: '6',
78
+ w: "6",
79
+ h: "6",
80
80
  },
81
81
  status: {
82
- w: '8',
83
- h: '8',
82
+ w: "8",
83
+ h: "8",
84
84
  },
85
85
  },
86
86
  sm: {
87
87
  root: {
88
- w: '20',
89
- h: '20',
88
+ w: "20",
89
+ h: "20",
90
90
  },
91
91
  fallback: {
92
- fontSize: '10',
92
+ fontSize: "10",
93
93
  },
94
94
  presence: {
95
- w: '8',
96
- h: '8',
95
+ w: "8",
96
+ h: "8",
97
97
  },
98
98
  status: {
99
- w: '10',
100
- h: '10',
99
+ w: "10",
100
+ h: "10",
101
101
  },
102
102
  },
103
103
  md: {
104
104
  root: {
105
- w: '24',
106
- h: '24',
105
+ w: "24",
106
+ h: "24",
107
107
  },
108
108
  fallback: {
109
- fontSize: '12',
109
+ fontSize: "12",
110
110
  },
111
111
  presence: {
112
- w: '8',
113
- h: '8',
112
+ w: "8",
113
+ h: "8",
114
114
  },
115
115
  status: {
116
- w: '10',
117
- h: '10',
116
+ w: "10",
117
+ h: "10",
118
118
  },
119
119
  },
120
120
  lg: {
121
121
  root: {
122
- w: '32',
123
- h: '32',
122
+ w: "32",
123
+ h: "32",
124
124
  },
125
125
  fallback: {
126
- fontSize: '14',
126
+ fontSize: "14",
127
127
  },
128
128
  presence: {
129
- w: '10',
130
- h: '10',
129
+ w: "10",
130
+ h: "10",
131
131
  },
132
132
  status: {
133
- w: '12',
134
- h: '12',
133
+ w: "12",
134
+ h: "12",
135
135
  },
136
136
  },
137
137
  xl: {
138
138
  root: {
139
- w: '48',
140
- h: '48',
139
+ w: "48",
140
+ h: "48",
141
141
  },
142
142
  fallback: {
143
- fontSize: '20',
143
+ fontSize: "20",
144
144
  },
145
145
  presence: {
146
- w: '12',
147
- h: '12',
146
+ w: "12",
147
+ h: "12",
148
148
  },
149
149
  status: {
150
- w: '16',
151
- h: '16',
150
+ w: "16",
151
+ h: "16",
152
152
  },
153
153
  },
154
- '2xl': {
154
+ "2xl": {
155
155
  root: {
156
- w: '64',
157
- h: '64',
156
+ w: "64",
157
+ h: "64",
158
158
  },
159
159
  fallback: {
160
- fontSize: '24',
160
+ fontSize: "24",
161
161
  },
162
162
  presence: {
163
- w: '14',
164
- h: '14',
163
+ w: "14",
164
+ h: "14",
165
165
  },
166
166
  status: {
167
- w: '20',
168
- h: '20',
167
+ w: "20",
168
+ h: "20",
169
169
  },
170
170
  },
171
171
  },
172
172
  shape: {
173
173
  circle: {
174
174
  root: {
175
- borderRadius: '999',
175
+ borderRadius: "999",
176
176
  },
177
177
  image: {
178
- borderRadius: '999',
178
+ borderRadius: "999",
179
179
  },
180
180
  },
181
181
  square: {
182
182
  root: {
183
- borderRadius: '4',
183
+ borderRadius: "4",
184
184
  },
185
185
  image: {
186
- borderRadius: '4',
186
+ borderRadius: "4",
187
187
  },
188
188
  },
189
189
  hexagon: {
190
190
  root: {
191
191
  clipPath:
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%)',
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
- '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%)',
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: 'md',
203
- shape: 'circle',
202
+ size: "md",
203
+ shape: "circle",
204
204
  },
205
205
  });
@@ -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
  },
@@ -2,7 +2,8 @@ import { defineRecipe } from '@pandacss/dev';
2
2
 
3
3
  const dividerBase = {
4
4
  '--divider-weight': 'sizes.1',
5
- color: { base: 'gray.20', _dark: 'gray.80' },
5
+ borderStyle: 'solid',
6
+ color: 'border.default',
6
7
  borderColor: 'current',
7
8
  minWidth: '1',
8
9
  minHeight: '1',
@@ -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';
@@ -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: 'modalFadeIn 150ms ease-out forwards',
15
+ animation: `modalFadeIn ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
13
16
  '&[data-state="closing"]': {
14
- animation: 'modalFadeOut 150ms ease-out forwards',
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: 'modalScaleIn 150ms ease-out forwards',
36
+ animation: `modalScaleIn ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
34
37
  '&[data-state="closing"]': {
35
- animation: 'modalScaleOut 150ms ease-out forwards',
38
+ animation: `modalScaleOut ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
36
39
  },
37
40
  },
38
41
  header: {
@@ -86,7 +86,7 @@ const tooltipVariants = {
86
86
  right: {
87
87
  tooltipContent: {
88
88
  top: '50%',
89
- left: `calc(100% - 0.75rem)`,
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: `calc(100% - 0.75rem)`,
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: `calc(100% - 0.75rem)`,
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['full'].value },
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]=true)',
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])',
@@ -1,4 +1,4 @@
1
- import { defineTextStyles, defineStyles } from '@pandacss/dev';
1
+ import { defineStyles, defineTextStyles } from '@pandacss/dev';
2
2
 
3
3
  const baseHeadingStyles = defineStyles({
4
4
  value: {
@@ -1,5 +1,5 @@
1
- import { splitCssProps } from '@styled-system/jsx';
2
1
  import { css, cx } from '@styled-system/css';
2
+ import { splitCssProps } from '@styled-system/jsx';
3
3
 
4
4
  export const splitProps = (
5
5
  props: Record<string, unknown>,