@okshaun/components 2.0.2 → 4.0.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.
Files changed (78) hide show
  1. package/dist/icon-metadata.json +385 -41
  2. package/dist/index.js +13414 -5259
  3. package/dist/index.js.map +1 -1
  4. package/dist/panda.buildinfo.json +1245 -263
  5. package/dist/{preset-DAmO4B54.js → preset-BOFHjPdQ.js} +2265 -1727
  6. package/dist/preset-BOFHjPdQ.js.map +1 -0
  7. package/dist/preset.js +1 -1
  8. package/dist/specs/conditions.json +75 -51
  9. package/dist/specs/keyframes.json +33 -0
  10. package/dist/specs/recipes.json +359 -103
  11. package/dist/specs/semantic-tokens.json +152 -44
  12. package/dist/specs/tokens.json +21 -36
  13. package/dist/sprite.svg +1 -1
  14. package/dist/sprite.symbol.html +499 -43
  15. package/dist/styles.css +18229 -7568
  16. package/dist/svgs/barcode-off.svg +1 -0
  17. package/dist/svgs/cheese.svg +1 -0
  18. package/dist/svgs/collapse-vertical.svg +1 -0
  19. package/dist/svgs/expand-vertical.svg +1 -0
  20. package/dist/svgs/magnet.svg +1 -0
  21. package/dist/svgs/spinner.svg +1 -0
  22. package/dist/svgs/to-date-backward.svg +1 -0
  23. package/dist/svgs/to-date-forward.svg +1 -0
  24. package/dist/types/index.d.ts +2804 -296
  25. package/package.json +4 -2
  26. package/src/recipes/autocomplete.ts +266 -0
  27. package/src/recipes/avatar.ts +1 -1
  28. package/src/recipes/badge.ts +31 -43
  29. package/src/recipes/breakpointIndicator.ts +11 -0
  30. package/src/recipes/button.ts +172 -223
  31. package/src/recipes/calendar.ts +91 -0
  32. package/src/recipes/card.ts +4 -70
  33. package/src/recipes/chip.ts +213 -142
  34. package/src/recipes/dateMenus.ts +40 -0
  35. package/src/recipes/dateTimeMenus.ts +43 -0
  36. package/src/recipes/icon.ts +25 -6
  37. package/src/recipes/kbd.ts +56 -0
  38. package/src/recipes/list.ts +17 -1
  39. package/src/recipes/listDensity.ts +66 -0
  40. package/src/recipes/listItem.ts +29 -161
  41. package/src/recipes/listItemGroup.ts +17 -39
  42. package/src/recipes/menu.ts +17 -3
  43. package/src/recipes/modal.ts +70 -39
  44. package/src/recipes/radio.ts +6 -6
  45. package/src/recipes/recipes-regular.ts +2 -0
  46. package/src/recipes/recipes-slot.ts +8 -2
  47. package/src/recipes/segmentedFields.ts +192 -0
  48. package/src/recipes/segmentedInputs.ts +109 -0
  49. package/src/recipes/select.ts +8 -1
  50. package/src/recipes/skeleton.ts +72 -0
  51. package/src/recipes/spinner.ts +27 -24
  52. package/src/recipes/tag.ts +218 -210
  53. package/src/recipes/text.ts +37 -19
  54. package/src/recipes/textInput.ts +106 -117
  55. package/src/recipes/themeSwitcher.ts +3 -3
  56. package/src/recipes/timeMenus.ts +110 -0
  57. package/src/recipes/toggle.ts +3 -1
  58. package/src/styles/primitives/animations.ts +3 -0
  59. package/src/styles/primitives/shadows.ts +26 -60
  60. package/src/styles/primitives/zIndex.ts +1 -0
  61. package/src/styles/semantics/colors.ts +43 -0
  62. package/src/styles/semantics/shadows.ts +4 -30
  63. package/src/styles/semantics/zIndex.ts +2 -0
  64. package/src/styles/utilities/conditions.ts +61 -51
  65. package/src/styles/utilities/dropShadows.ts +51 -0
  66. package/src/styles/utilities/filters.ts +22 -7
  67. package/src/styles/utilities/globalStyle.ts +5 -2
  68. package/src/styles/utilities/index.ts +3 -0
  69. package/src/styles/utilities/keyframes.ts +31 -4
  70. package/src/styles/utilities/recipeGlobalStyles.ts +22 -0
  71. package/src/styles/utilities/shadowDefinitions.ts +112 -0
  72. package/src/utils/dsChain.ts +113 -0
  73. package/src/utils/dsComponent.ts +44 -0
  74. package/src/utils/dsPart.ts +41 -0
  75. package/src/utils/mergeAriaDescribedBy.ts +7 -0
  76. package/dist/preset-DAmO4B54.js.map +0 -1
  77. package/src/recipes/datePicker.ts +0 -212
  78. package/src/recipes/timePicker.ts +0 -199
@@ -1,14 +1,30 @@
1
1
  import { defineRecipe } from '@pandacss/dev';
2
2
 
3
+ import { globalBaseStyles } from '~/styles/utilities';
4
+
5
+ import { listDensityVars } from './listDensity';
6
+
7
+ // Ported from the Cetec design system. The same density custom properties are
8
+ // published at three levels - list, listItemGroup and listItem - each on its
9
+ // own wrapper, so a group label resolves them whether or not it sits inside a
10
+ // list item. This replaces okshaun's separate listDensity object, whose values
11
+ // were identical.
12
+
3
13
  export const listRecipe = defineRecipe({
4
14
  className: 'list',
5
15
  jsx: ['List'],
6
16
  base: {
17
+ ...globalBaseStyles,
7
18
  display: 'flex',
8
19
  flexDirection: 'column',
9
20
  alignItems: 'start',
10
21
  justifyContent: 'start',
11
22
  gap: '0',
12
23
  },
13
- variants: {},
24
+ variants: {
25
+ density: listDensityVars,
26
+ },
27
+ defaultVariants: {
28
+ density: 'compact',
29
+ },
14
30
  });
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Density is one variant that publishes a full set of custom properties on the
3
+ * list wrapper; every other slot, ListItemGroup and Menu read them. Ported from
4
+ * the Cetec design system, which is where the abstraction comes from: expressing
5
+ * density as compound variants instead makes every variant prop on the recipe
6
+ * non-responsive, because Panda types variant props as plain literals rather
7
+ * than ConditionalValue on any recipe declaring compoundVariants.
8
+ */
9
+ export type ListDensityValue = 'compact' | 'comfortable' | 'spacious';
10
+
11
+ export const listDensityVars = {
12
+ compact: {
13
+ '--list-item-slot-margin': 'token(sizes.5)',
14
+ '--list-item-padding-y': 'token(sizes.3)',
15
+ '--list-item-padding-x': 'token(sizes.10)',
16
+ '--list-item-icon-size': 'token(sizes.24)',
17
+ '--list-item-label-size': 'token(sizes.16)',
18
+ '--list-item-description-size': 'token(sizes.12)',
19
+ '--list-group-label-padding-x': 'token(sizes.10)',
20
+ '--list-group-label-padding-top': 'token(sizes.8)',
21
+ '--list-group-label-padding-bottom': 'token(sizes.2)',
22
+ '--list-group-label-size': 'token(sizes.12)',
23
+ '--list-group-divider-margin-y': 'token(sizes.4)',
24
+ '--list-group-divider-margin-x': 'token(sizes.10)',
25
+ },
26
+ comfortable: {
27
+ '--list-item-slot-margin': 'token(sizes.7)',
28
+ '--list-item-padding-y': 'token(sizes.7)',
29
+ '--list-item-padding-x': 'token(sizes.12)',
30
+ '--list-item-icon-size': 'token(sizes.24)',
31
+ '--list-item-label-size': 'token(sizes.16)',
32
+ '--list-item-description-size': 'token(sizes.12)',
33
+ '--list-group-label-padding-x': 'token(sizes.12)',
34
+ '--list-group-label-padding-top': 'token(sizes.12)',
35
+ '--list-group-label-padding-bottom': 'token(sizes.4)',
36
+ '--list-group-label-size': 'token(sizes.14)',
37
+ '--list-group-divider-margin-y': 'token(sizes.6)',
38
+ '--list-group-divider-margin-x': 'token(sizes.12)',
39
+ },
40
+ spacious: {
41
+ '--list-item-slot-margin': 'token(sizes.9)',
42
+ '--list-item-padding-y': 'token(sizes.9)',
43
+ '--list-item-padding-x': 'token(sizes.16)',
44
+ '--list-item-icon-size': 'token(sizes.28)',
45
+ '--list-item-label-size': 'token(sizes.20)',
46
+ '--list-item-description-size': 'token(sizes.14)',
47
+ '--list-group-label-padding-x': 'token(sizes.16)',
48
+ '--list-group-label-padding-top': 'token(sizes.16)',
49
+ '--list-group-label-padding-bottom': 'token(sizes.6)',
50
+ '--list-group-label-size': 'token(sizes.16)',
51
+ '--list-group-divider-margin-y': 'token(sizes.8)',
52
+ '--list-group-divider-margin-x': 'token(sizes.16)',
53
+ },
54
+ } as const;
55
+
56
+ export const listDensityWrapperVars = {
57
+ compact: {
58
+ wrapper: listDensityVars.compact,
59
+ },
60
+ comfortable: {
61
+ wrapper: listDensityVars.comfortable,
62
+ },
63
+ spacious: {
64
+ wrapper: listDensityVars.spacious,
65
+ },
66
+ } as const;
@@ -1,11 +1,21 @@
1
1
  import { defineSlotRecipe } from '@pandacss/dev';
2
2
 
3
+ import { globalBaseStyles } from '~/styles/utilities';
4
+
5
+ import { listDensityWrapperVars } from './listDensity';
6
+
7
+ // Ported from the Cetec design system: structure, slot order, density
8
+ // abstraction and interaction behaviour. okshaun's own semantic tokens carry
9
+ // the styling, and they share these names.
10
+
3
11
  export const listItemRecipe = defineSlotRecipe({
4
12
  className: 'listItem',
5
13
  jsx: ['ListItem'],
6
14
  slots: [
7
15
  'wrapper',
8
16
  'icon',
17
+ 'beforeSlot',
18
+ 'afterSlot',
9
19
  'itemMain',
10
20
  'itemLabel',
11
21
  'itemDescription',
@@ -13,11 +23,14 @@ export const listItemRecipe = defineSlotRecipe({
13
23
  ],
14
24
  base: {
15
25
  wrapper: {
26
+ ...globalBaseStyles,
16
27
  display: 'flex',
17
28
  alignItems: 'start',
18
29
  justifyContent: 'start',
19
30
  gap: '4',
20
31
  width: 'full',
32
+ py: 'var(--list-item-padding-y)',
33
+ px: 'var(--list-item-padding-x)',
21
34
  textAlign: 'left',
22
35
  borderWidth: '1',
23
36
  borderStyle: 'solid',
@@ -40,24 +53,20 @@ export const listItemRecipe = defineSlotRecipe({
40
53
  _focus: {
41
54
  bg: 'bg.neutral.hovered',
42
55
  },
43
- '&[data-active="true"]': {
44
- bg: 'bg.neutral.hovered',
45
- },
46
56
  _disabled: {
47
57
  opacity: '0.4',
48
58
  cursor: 'not-allowed',
49
59
  pointerEvents: 'none',
50
60
  },
51
61
  },
52
- divider: {
53
- width: 'full',
54
- },
55
62
  icon: {
56
63
  aspectRatio: 'square',
57
64
  transitionDuration: 'fast',
58
65
  transitionProperty: 'fill',
59
66
  transitionTimingFunction: 'default',
60
67
  flexShrink: '0',
68
+ w: 'var(--list-item-icon-size)',
69
+ h: 'var(--list-item-icon-size)',
61
70
  },
62
71
  itemMain: {
63
72
  display: 'flex',
@@ -67,11 +76,24 @@ export const listItemRecipe = defineSlotRecipe({
67
76
  },
68
77
  itemLabel: {
69
78
  color: 'text',
79
+ fontSize: 'var(--list-item-label-size)',
70
80
  },
71
81
  itemDescription: {
72
82
  color: 'text.subtlest',
83
+ fontSize: 'var(--list-item-description-size)',
73
84
  lineHeight: 'tight',
74
85
  },
86
+ beforeSlot: {
87
+ ms: 'calc(var(--list-item-slot-margin) * -1)',
88
+ },
89
+ afterSlot: {
90
+ me: 'calc(var(--list-item-slot-margin) * -1)',
91
+ },
92
+ divider: {
93
+ width: 'full',
94
+ py: 'var(--list-item-padding-y)',
95
+ px: 'var(--list-item-padding-x)',
96
+ },
75
97
  },
76
98
  variants: {
77
99
  variant: {
@@ -122,81 +144,11 @@ export const listItemRecipe = defineSlotRecipe({
122
144
  },
123
145
  divider: {},
124
146
  },
125
- density: {
126
- compact: {
127
- wrapper: {
128
- py: '3',
129
- px: '10',
130
- },
131
- itemLabel: {
132
- textStyle: 'sans.md',
133
- color: 'text',
134
- },
135
- itemDescription: {
136
- textStyle: 'sans.xs',
137
- lineHeight: 'tight',
138
- },
139
- icon: {
140
- w: '24',
141
- h: '24',
142
- },
143
- divider: {
144
- py: '3',
145
- px: '10',
146
- },
147
- },
148
- comfortable: {
149
- wrapper: {
150
- py: '7',
151
- px: '12',
152
- },
153
- itemLabel: {
154
- textStyle: 'sans.md',
155
- color: 'text',
156
- },
157
- itemDescription: {
158
- textStyle: 'sans.xs',
159
- lineHeight: 'tight',
160
- },
161
- icon: {
162
- w: '24',
163
- h: '24',
164
- },
165
- divider: {
166
- py: '7',
167
- px: '12',
168
- },
169
- },
170
- spacious: {
171
- wrapper: {
172
- py: '9',
173
- px: '16',
174
- },
175
- itemLabel: {
176
- textStyle: 'sans.lg',
177
- color: 'text',
178
- },
179
- itemDescription: {
180
- textStyle: 'sans.sm',
181
- lineHeight: 'tight',
182
- },
183
- icon: {
184
- w: '28',
185
- h: '28',
186
- },
187
- divider: {
188
- py: '9',
189
- px: '16',
190
- },
191
- },
192
- },
147
+ density: listDensityWrapperVars,
193
148
  selected: {
194
149
  true: {
195
150
  wrapper: {
196
151
  bg: 'surface.selected',
197
- '&[data-active="true"]': {
198
- bg: 'surface.selected.hovered',
199
- },
200
152
  _hover: {
201
153
  bg: 'surface.selected.hovered',
202
154
  },
@@ -219,92 +171,8 @@ export const listItemRecipe = defineSlotRecipe({
219
171
  false: {},
220
172
  },
221
173
  },
222
- compoundVariants: [
223
- {
224
- density: 'compact',
225
- iconBefore: true,
226
- css: {
227
- wrapper: {
228
- ps: '5',
229
- },
230
- },
231
- },
232
- {
233
- density: 'compact',
234
- iconAfter: true,
235
- css: {
236
- wrapper: {
237
- pe: '5',
238
- },
239
- },
240
- },
241
- {
242
- density: 'compact',
243
- variant: 'checkbox',
244
- css: {
245
- wrapper: {
246
- ps: '5',
247
- },
248
- },
249
- },
250
- {
251
- density: 'comfortable',
252
- iconBefore: true,
253
- css: {
254
- wrapper: {
255
- ps: '7',
256
- },
257
- },
258
- },
259
- {
260
- density: 'comfortable',
261
- iconAfter: true,
262
- css: {
263
- wrapper: {
264
- pe: '7',
265
- },
266
- },
267
- },
268
- {
269
- density: 'comfortable',
270
- variant: 'checkbox',
271
- css: {
272
- wrapper: {
273
- ps: '7',
274
- },
275
- },
276
- },
277
- {
278
- density: 'spacious',
279
- iconBefore: true,
280
- css: {
281
- wrapper: {
282
- ps: '9',
283
- },
284
- },
285
- },
286
- {
287
- density: 'spacious',
288
- iconAfter: true,
289
- css: {
290
- wrapper: {
291
- pe: '9',
292
- },
293
- },
294
- },
295
- {
296
- density: 'spacious',
297
- variant: 'checkbox',
298
- css: {
299
- wrapper: {
300
- ps: '9',
301
- },
302
- },
303
- },
304
- ],
305
174
  defaultVariants: {
306
175
  variant: 'default',
307
176
  density: 'compact',
308
- selected: false,
309
177
  },
310
178
  });
@@ -1,5 +1,12 @@
1
1
  import { defineSlotRecipe } from '@pandacss/dev';
2
2
 
3
+ import { globalBaseStyles } from '~/styles/utilities';
4
+
5
+ import { listDensityWrapperVars } from './listDensity';
6
+
7
+ // Ported from the Cetec design system: reads the shared density custom
8
+ // properties rather than spreading a per-density style object.
9
+
3
10
  export const listItemGroupRecipe = defineSlotRecipe({
4
11
  className: 'listItemGroup',
5
12
  jsx: ['ListItemGroup'],
@@ -9,52 +16,23 @@ export const listItemGroupRecipe = defineSlotRecipe({
9
16
  width: 'full',
10
17
  },
11
18
  groupLabel: {
19
+ ...globalBaseStyles,
12
20
  color: 'text.subtlest',
21
+ px: 'var(--list-group-label-padding-x)',
22
+ pt: 'var(--list-group-label-padding-top)',
23
+ pb: 'var(--list-group-label-padding-bottom)',
24
+ fontSize: 'var(--list-group-label-size)',
13
25
  borderStyle: 'solid',
14
26
  borderWidth: '1',
15
27
  borderColor: 'transparent',
16
28
  },
17
- divider: {},
29
+ divider: {
30
+ my: 'var(--list-group-divider-margin-y)',
31
+ mx: 'var(--list-group-divider-margin-x)',
32
+ },
18
33
  },
19
34
  variants: {
20
- density: {
21
- compact: {
22
- groupLabel: {
23
- px: '10',
24
- pt: '8',
25
- pb: '2',
26
- fontSize: '12',
27
- },
28
- divider: {
29
- my: '4',
30
- mx: '10',
31
- },
32
- },
33
- comfortable: {
34
- groupLabel: {
35
- px: '12',
36
- pt: '12',
37
- pb: '4',
38
- fontSize: '14',
39
- },
40
- divider: {
41
- my: '6',
42
- mx: '12',
43
- },
44
- },
45
- spacious: {
46
- groupLabel: {
47
- px: '16',
48
- pt: '16',
49
- pb: '6',
50
- fontSize: '16',
51
- },
52
- divider: {
53
- my: '8',
54
- mx: '16',
55
- },
56
- },
57
- },
35
+ density: listDensityWrapperVars,
58
36
  },
59
37
  defaultVariants: {
60
38
  density: 'compact',
@@ -7,7 +7,6 @@ const menuBase = {
7
7
  borderRadius: '4',
8
8
  boxShadow: 'overlay',
9
9
  overflow: 'hidden',
10
- zIndex: '100',
11
10
  transitionProperty: 'width, height',
12
11
  transitionDuration: 'normal',
13
12
  transitionTimingFunction: 'default',
@@ -22,13 +21,13 @@ const menuBase = {
22
21
  borderWidth: '0',
23
22
  borderBlockWidth: '3',
24
23
  borderColor: 'transparent',
25
- bg: { base: 'tan.5', _dark: 'tan.60' },
24
+ bg: { base: 'tan.10', _dark: 'tan.60' },
26
25
  width: 'full',
27
26
  textAlign: 'left',
28
27
  cursor: 'pointer',
29
28
  color: 'text',
30
29
  _hover: {
31
- bg: { base: 'tan.10', _dark: 'tan.50' },
30
+ bg: { base: 'tan.20', _dark: 'tan.50' },
32
31
  },
33
32
  _active: {
34
33
  bg: { base: 'tan.20', _dark: 'tan.70' },
@@ -69,6 +68,20 @@ const menuBase = {
69
68
  };
70
69
 
71
70
  const menuVariants = {
71
+ // Floating content inherits its layer from FloatingLayerContext, so a menu
72
+ // opened inside a modal stacks above the dialog instead of behind it.
73
+ layer: {
74
+ elevated: {
75
+ wrapper: {
76
+ zIndex: 'elevated',
77
+ },
78
+ },
79
+ modalFloating: {
80
+ wrapper: {
81
+ zIndex: 'modalFloating',
82
+ },
83
+ },
84
+ },
72
85
  density: {
73
86
  compact: {
74
87
  backHeader: {
@@ -128,5 +141,6 @@ export const menuRecipe = defineSlotRecipe({
128
141
  variants: menuVariants,
129
142
  defaultVariants: {
130
143
  density: 'compact',
144
+ layer: 'elevated',
131
145
  },
132
146
  });
@@ -1,11 +1,28 @@
1
1
  import { defineSlotRecipe } from '@pandacss/dev';
2
2
 
3
+ import { globalBaseStyles } from '~/styles/utilities';
4
+
3
5
  const modalBase = {
6
+ positionWrapper: {
7
+ '--wrapper-p': {
8
+ base: 'token(sizes.0)',
9
+ xs: 'token(sizes.12)',
10
+ sm: 'token(sizes.32)',
11
+ md: 'token(sizes.56)',
12
+ },
13
+ position: 'fixed',
14
+ inset: '0',
15
+ display: 'grid',
16
+ p: 'var(--wrapper-p)',
17
+ w: '100vw',
18
+ h: '100vh',
19
+ zIndex: 1100,
20
+ },
4
21
  overlay: {
5
22
  position: 'fixed',
6
23
  inset: '0',
7
24
  bg: 'blanket',
8
- zIndex: '1100',
25
+ zIndex: 1100,
9
26
  // Initial state matches animation start
10
27
  opacity: '0',
11
28
  // Animation handled via data-state
@@ -15,26 +32,16 @@ const modalBase = {
15
32
  },
16
33
  },
17
34
  container: {
18
- position: 'fixed',
19
- top: '50%',
20
- left: '50%',
35
+ ...globalBaseStyles,
21
36
  display: 'flex',
22
37
  flexDirection: 'column',
23
- width: 'full',
24
- maxHeight: '[95vh]',
38
+ maxW: 'calc(100vw - (2 * var(--wrapper-p)))',
39
+ maxH: 'calc(100vh - (2 * var(--wrapper-p)))',
25
40
  bg: 'surface.overlay',
26
41
  borderRadius: '12',
27
42
  boxShadow: 'overlay',
28
43
  outline: 'none',
29
- zIndex: '1101',
30
- // Initial state matches animation start
31
- opacity: '0',
32
- transform: '[translate(-50%, -50%) scale(0.95) translateY(-10px)]',
33
- // Animation handled via data-state
34
- animation: 'modalScaleIn 150ms ease-out forwards',
35
- '&[data-state="closing"]': {
36
- animation: 'modalScaleOut 150ms ease-out forwards',
37
- },
44
+ zIndex: 1101,
38
45
  },
39
46
  header: {
40
47
  display: 'flex',
@@ -73,60 +80,83 @@ const modalBase = {
73
80
  },
74
81
  };
75
82
 
83
+ const mobile = {
84
+ xsDown: {
85
+ width: '100vw',
86
+ height: '100vh',
87
+ maxWidth: '100vw',
88
+ maxHeight: '100vh',
89
+ borderRadius: '0',
90
+ },
91
+ };
92
+
76
93
  const modalVariants = {
77
94
  size: {
78
95
  sm: {
79
96
  container: {
80
- maxWidth: 'md',
97
+ w: 'md',
98
+ ...mobile,
81
99
  },
82
100
  },
83
101
  md: {
84
102
  container: {
85
- maxWidth: 'xl',
103
+ w: 'xl',
104
+ ...mobile,
86
105
  },
87
106
  },
88
107
  lg: {
89
108
  container: {
90
- maxWidth: '3xl',
109
+ w: '3xl',
110
+ ...mobile,
91
111
  },
92
112
  },
93
113
  xl: {
94
114
  container: {
95
- maxWidth: '5xl',
115
+ w: '5xl',
116
+ ...mobile,
96
117
  },
97
118
  },
98
119
  full: {
99
120
  container: {
100
- maxWidth: '[95vw]',
121
+ w: '95vw',
122
+ ...mobile,
101
123
  },
102
124
  },
103
- mobile: {
125
+ fullPage: {
126
+ positionWrapper: {
127
+ '--wrapper-p': 'token(sizes.0)',
128
+ },
104
129
  container: {
105
- width: 'full',
106
- height: 'full',
107
- maxWidth: '[100vw]',
108
- maxHeight: '[100vh]',
130
+ w: '100vw',
131
+ h: '100vh',
132
+ maxW: '100vw',
133
+ maxH: '100vh',
109
134
  borderRadius: '0',
135
+ ...mobile,
110
136
  },
111
137
  },
112
138
  },
113
- variant: {
114
- default: {
139
+ position: {
140
+ centered: {
141
+ positionWrapper: {
142
+ placeContent: 'center',
143
+ },
115
144
  container: {
116
- xsDown: {
117
- width: 'full',
118
- height: 'full',
119
- maxWidth: '[100vw]',
120
- maxHeight: '[100vh]',
121
- borderRadius: '0',
145
+ animation: 'modalScaleIn 150ms ease-out forwards',
146
+ '&[data-state="closing"]': {
147
+ animation: 'modalScaleOut 150ms ease-out forwards',
122
148
  },
123
149
  },
124
150
  },
125
- confirmation: {
151
+ top: {
152
+ positionWrapper: {
153
+ placeContent: 'start center',
154
+ },
126
155
  container: {
127
- height: 'fit',
128
- width: 'md',
129
- maxWidth: '[90vw]',
156
+ animation: 'modalScaleInTop 150ms ease-out forwards',
157
+ '&[data-state="closing"]': {
158
+ animation: 'modalScaleOutTop 150ms ease-out forwards',
159
+ },
130
160
  },
131
161
  },
132
162
  },
@@ -134,8 +164,9 @@ const modalVariants = {
134
164
 
135
165
  export const modalRecipe = defineSlotRecipe({
136
166
  className: 'modal',
137
- jsx: ['Modal', 'ModalHeader', 'ModalBody', 'ModalFooter'],
167
+ jsx: ['ModalWrapper', 'ModalHeader', 'ModalBody', 'ModalFooter', 'Modal'],
138
168
  slots: [
169
+ 'positionWrapper',
139
170
  'overlay',
140
171
  'container',
141
172
  'header',
@@ -147,7 +178,7 @@ export const modalRecipe = defineSlotRecipe({
147
178
  base: modalBase,
148
179
  variants: modalVariants,
149
180
  defaultVariants: {
150
- variant: 'default',
151
181
  size: 'md',
182
+ position: 'centered',
152
183
  },
153
184
  });