@okshaun/components 0.5.8 → 1.0.1

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 (129) hide show
  1. package/README.md +22 -26
  2. package/dist/.mcp.json +11 -0
  3. package/dist/index.d.ts +3 -1268
  4. package/dist/index.js +1231 -957
  5. package/dist/index.js.map +1 -1
  6. package/dist/okshaun-logo-white.svg +11 -0
  7. package/dist/okshaun-logo.svg +11 -0
  8. package/dist/preset-BzrKiUEH.js +8452 -0
  9. package/dist/preset-BzrKiUEH.js.map +1 -0
  10. package/dist/preset.js +3 -7234
  11. package/dist/preset.js.map +1 -1
  12. package/dist/specs/animation-styles.json +4 -0
  13. package/dist/specs/color-palette.json +98 -0
  14. package/dist/specs/conditions.json +1901 -0
  15. package/dist/specs/keyframes.json +137 -0
  16. package/dist/specs/layer-styles.json +23 -0
  17. package/dist/specs/patterns.json +475 -0
  18. package/dist/specs/recipes.json +907 -0
  19. package/dist/specs/semantic-tokens.json +2837 -0
  20. package/dist/specs/text-styles.json +149 -0
  21. package/dist/specs/tokens.json +2750 -0
  22. package/dist/sprite.svg +1 -1
  23. package/dist/sprite.symbol.html +14 -14
  24. package/dist/styles/global.css +148 -0
  25. package/dist/styles/recipes/avatar.css +185 -0
  26. package/dist/styles/recipes/badge.css +85 -0
  27. package/dist/styles/recipes/breadcrumbs.css +38 -0
  28. package/dist/styles/recipes/button.css +195 -0
  29. package/dist/styles/recipes/card.css +57 -0
  30. package/dist/styles/recipes/checkbox-input.css +12 -0
  31. package/dist/styles/recipes/checkbox.css +90 -0
  32. package/dist/styles/recipes/chip.css +137 -0
  33. package/dist/styles/recipes/code.css +12 -0
  34. package/dist/styles/recipes/divider.css +43 -0
  35. package/dist/styles/recipes/form-field.css +39 -0
  36. package/dist/styles/recipes/heading.css +40 -0
  37. package/dist/styles/recipes/icon-button.css +181 -0
  38. package/dist/styles/recipes/label.css +14 -0
  39. package/dist/styles/recipes/link.css +49 -0
  40. package/dist/styles/recipes/menu.css +141 -0
  41. package/dist/styles/recipes/modal.css +99 -0
  42. package/dist/styles/recipes/pre.css +16 -0
  43. package/dist/styles/recipes/radio-input.css +7 -0
  44. package/dist/styles/recipes/radio.css +82 -0
  45. package/dist/styles/recipes/select.css +103 -0
  46. package/dist/styles/recipes/spinner.css +36 -0
  47. package/dist/styles/recipes/tag.css +27 -0
  48. package/dist/styles/recipes/text.css +46 -0
  49. package/dist/styles/recipes/textarea.css +91 -0
  50. package/dist/styles/recipes/textinput.css +87 -0
  51. package/dist/styles/recipes/theme-switcher.css +53 -0
  52. package/dist/styles/recipes/toggle-input.css +12 -0
  53. package/dist/styles/recipes/toggle.css +125 -0
  54. package/dist/styles/recipes/tooltip.css +133 -0
  55. package/dist/styles/recipes.css +30 -0
  56. package/dist/styles/reset.css +1 -0
  57. package/dist/styles/tokens.css +1016 -0
  58. package/dist/styles/utilities.css +1694 -0
  59. package/dist/styles.css +7 -0
  60. package/dist/svgs/building.svg +1 -0
  61. package/dist/types/index.d.ts +21626 -0
  62. package/dist/types/preset.d.ts +19 -0
  63. package/package.json +37 -35
  64. package/src/recipes/avatar.ts +205 -0
  65. package/src/recipes/badge.ts +203 -0
  66. package/src/recipes/box.ts +13 -0
  67. package/src/recipes/breadcrumbs.ts +29 -0
  68. package/src/recipes/button.ts +319 -0
  69. package/src/recipes/card.ts +148 -0
  70. package/src/recipes/checkbox.ts +87 -0
  71. package/src/recipes/checkboxinput.ts +15 -0
  72. package/src/recipes/chip.ts +189 -0
  73. package/src/recipes/code.ts +35 -0
  74. package/src/recipes/divider.ts +41 -0
  75. package/src/recipes/formField.ts +60 -0
  76. package/src/recipes/index.ts +28 -0
  77. package/src/recipes/menu.ts +205 -0
  78. package/src/recipes/modal.ts +120 -0
  79. package/src/recipes/radio.ts +71 -0
  80. package/src/recipes/radioinput.ts +12 -0
  81. package/src/recipes/select.ts +142 -0
  82. package/src/recipes/spinner.ts +52 -0
  83. package/src/recipes/tag.ts +262 -0
  84. package/src/recipes/text.ts +193 -0
  85. package/src/recipes/textarea.ts +153 -0
  86. package/src/recipes/textinput.ts +100 -0
  87. package/src/recipes/themeSwitcher.ts +48 -0
  88. package/src/recipes/toggle.ts +116 -0
  89. package/src/recipes/toggleinput.ts +16 -0
  90. package/src/recipes/tooltip.ts +359 -0
  91. package/src/styles/index.css +1 -0
  92. package/src/styles/primitives/animations.ts +16 -0
  93. package/src/styles/primitives/aspectRatios.ts +22 -0
  94. package/src/styles/primitives/blurs.ts +25 -0
  95. package/src/styles/primitives/borderWidths.ts +10 -0
  96. package/src/styles/primitives/borders.ts +36 -0
  97. package/src/styles/primitives/colors.ts +228 -0
  98. package/src/styles/primitives/durations.ts +25 -0
  99. package/src/styles/primitives/easings.ts +19 -0
  100. package/src/styles/primitives/fontSizes.ts +16 -0
  101. package/src/styles/primitives/fontWeights.ts +9 -0
  102. package/src/styles/primitives/fonts.ts +18 -0
  103. package/src/styles/primitives/index.ts +46 -0
  104. package/src/styles/primitives/letterSpacings.ts +22 -0
  105. package/src/styles/primitives/lineHeights.ts +16 -0
  106. package/src/styles/primitives/radii.ts +14 -0
  107. package/src/styles/primitives/shadows.ts +73 -0
  108. package/src/styles/primitives/sizes.ts +86 -0
  109. package/src/styles/primitives/spacings.ts +7 -0
  110. package/src/styles/semantics/colors.ts +774 -0
  111. package/src/styles/semantics/index.ts +2 -0
  112. package/src/styles/semantics/shadows.ts +32 -0
  113. package/src/styles/utilities/breakpoints.ts +8 -0
  114. package/src/styles/utilities/conditions.ts +140 -0
  115. package/src/styles/utilities/containerSizes.ts +17 -0
  116. package/src/styles/utilities/filters.ts +12 -0
  117. package/src/styles/utilities/globalStyle.ts +93 -0
  118. package/src/styles/utilities/index.ts +9 -0
  119. package/src/styles/utilities/keyframes.ts +89 -0
  120. package/src/styles/utilities/layerStyles.ts +18 -0
  121. package/src/styles/utilities/textStyles.ts +135 -0
  122. package/src/styles/utilities/transitions.ts +92 -0
  123. package/src/utils/injectSprite.ts +36 -0
  124. package/src/utils/splitProps.ts +19 -0
  125. package/src/utils/spriteContent.ts +4 -0
  126. package/dist/panda.buildinfo.json +0 -448
  127. package/dist/preset.d.ts +0 -5
  128. package/dist/transitions-DUgH88VW.js +0 -1041
  129. package/dist/transitions-DUgH88VW.js.map +0 -1
@@ -0,0 +1,189 @@
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
+
3
+ const chipBase = {
4
+ container: {
5
+ position: 'relative',
6
+ display: 'inline-flex',
7
+ alignItems: 'center',
8
+ appearance: 'none',
9
+ width: 'fit',
10
+ borderRadius: '999',
11
+ fontFamily: 'sans',
12
+ lineHeight: 'default',
13
+ fontWeight: 'medium',
14
+ whiteSpace: 'nowrap',
15
+ verticalAlign: 'middle',
16
+ cursor: 'pointer',
17
+ transitionDuration: 'fast',
18
+ transitionProperty: 'background, color',
19
+ transitionTimingFunction: 'default',
20
+ userSelect: 'none',
21
+ border: 'none',
22
+ outlineWidth: 2,
23
+ outlineStyle: 'solid',
24
+ outlineColor: 'transparent',
25
+ bg: 'bg.neutral',
26
+ color: 'text',
27
+ icon: {
28
+ fill: 'icon.decorative',
29
+ transitionDuration: 'fast',
30
+ transitionProperty: 'fill',
31
+ transitionTimingFunction: 'default',
32
+ },
33
+ _hover: {
34
+ bg: 'bg.neutral.hovered',
35
+ icon: { fill: 'icon.decorative.hovered' },
36
+ },
37
+ _active: {
38
+ bg: 'bg.neutral.pressed',
39
+ icon: { fill: 'icon.decorative.hovered' },
40
+ },
41
+ _focusVisible: {
42
+ outlineColor: 'border.focused',
43
+ },
44
+ _loading: {
45
+ cursor: 'wait',
46
+ animation: 'pulse',
47
+ },
48
+ _deleted: {
49
+ textDecoration: 'line-through',
50
+ cursor: 'not-allowed',
51
+ opacity: 0.6,
52
+ },
53
+ _disabled: {
54
+ cursor: 'not-allowed',
55
+ bg: 'bg.disabled',
56
+ color: 'text.disabled',
57
+ borderColor: 'border.disabled',
58
+ icon: { fill: 'icon.disabled' },
59
+ _hover: {
60
+ bg: 'bg.disabled',
61
+ color: 'text.disabled',
62
+ borderColor: 'border.disabled',
63
+ icon: { fill: 'icon.disabled' },
64
+ },
65
+ },
66
+ _selected: {
67
+ bg: 'bg.brand.boldest',
68
+ color: 'text.inverse',
69
+ icon: { fill: 'icon.decorative.inverse' },
70
+ _hover: {
71
+ bg: 'bg.brand.boldest.hovered',
72
+ icon: { fill: 'icon.inverse' },
73
+ },
74
+ _active: {
75
+ bg: 'bg.brand.boldest.pressed',
76
+ icon: { fill: 'icon.inverse' },
77
+ },
78
+ },
79
+ },
80
+ icon: {
81
+ aspectRatio: 'square',
82
+ transitionDuration: 'fast',
83
+ transitionProperty: 'fill',
84
+ transitionTimingFunction: 'default',
85
+ },
86
+ };
87
+
88
+ export const chipRecipe = defineSlotRecipe({
89
+ className: 'chip',
90
+ jsx: ['Chip'],
91
+ slots: ['container', 'icon'],
92
+ base: chipBase,
93
+ variants: {
94
+ size: {
95
+ md: {
96
+ container: {
97
+ gap: '4',
98
+ h: '24',
99
+ px: '8',
100
+ py: '1',
101
+ fontSize: '14',
102
+ },
103
+ icon: {
104
+ w: '20',
105
+ h: '20',
106
+ },
107
+ },
108
+ sm: {
109
+ container: {
110
+ gap: '2',
111
+ h: '20',
112
+ px: '6',
113
+ py: '0',
114
+ fontSize: '14',
115
+ },
116
+ icon: {
117
+ w: '20',
118
+ h: '20',
119
+ },
120
+ },
121
+ lg: {
122
+ container: {
123
+ gap: '4',
124
+ h: '32',
125
+ px: '10',
126
+ py: '4',
127
+ fontSize: '16',
128
+ },
129
+ icon: {
130
+ w: '24',
131
+ h: '24',
132
+ },
133
+ },
134
+ },
135
+ before: {
136
+ true: { container: {} },
137
+ },
138
+ after: {
139
+ true: { container: {} },
140
+ },
141
+ },
142
+ compoundVariants: [
143
+ {
144
+ size: 'md',
145
+ before: true,
146
+ css: {
147
+ container: { ps: '2' },
148
+ },
149
+ },
150
+ {
151
+ size: 'md',
152
+ after: true,
153
+ css: {
154
+ container: { pe: '2' },
155
+ },
156
+ },
157
+ {
158
+ size: 'sm',
159
+ before: true,
160
+ css: {
161
+ container: { ps: '2' },
162
+ },
163
+ },
164
+ {
165
+ size: 'sm',
166
+ after: true,
167
+ css: {
168
+ container: { pe: '2' },
169
+ },
170
+ },
171
+ {
172
+ size: 'lg',
173
+ before: true,
174
+ css: {
175
+ container: { ps: '4' },
176
+ },
177
+ },
178
+ {
179
+ size: 'lg',
180
+ after: true,
181
+ css: {
182
+ container: { pe: '4' },
183
+ },
184
+ },
185
+ ],
186
+ defaultVariants: {
187
+ size: 'md',
188
+ },
189
+ });
@@ -0,0 +1,35 @@
1
+ import { defineRecipe } from '@pandacss/dev';
2
+
3
+ const codeBase = {
4
+ bg: 'gray.80',
5
+ position: 'relative',
6
+ overflow: 'auto',
7
+ p: '4',
8
+ whiteSpace: 'pre',
9
+ fontSize: '14',
10
+ };
11
+
12
+ const preBase = {
13
+ borderRadius: '8',
14
+ overflow: 'hidden',
15
+ borderWidth: '0',
16
+ borderColor: 'gray.60',
17
+ bg: 'gray.80',
18
+ color: 'gray.10',
19
+ px: '16',
20
+ py: '8',
21
+ my: '8',
22
+ whiteSpace: 'pre',
23
+ };
24
+
25
+ export const codeRecipe = defineRecipe({
26
+ className: 'code',
27
+ jsx: ['Code'],
28
+ base: codeBase,
29
+ });
30
+
31
+ export const preRecipe = defineRecipe({
32
+ className: 'pre',
33
+ jsx: ['Pre'],
34
+ base: preBase,
35
+ });
@@ -0,0 +1,41 @@
1
+ import { defineRecipe } from '@pandacss/dev';
2
+
3
+ const dividerBase = {
4
+ '--divider-weight': 'sizes.1',
5
+ color: { base: 'gray.20', _dark: 'gray.80' },
6
+ borderColor: 'current',
7
+ minWidth: '1',
8
+ minHeight: '1',
9
+ };
10
+
11
+ const dividerVariants = {
12
+ direction: {
13
+ horizontal: {
14
+ width: 'stretch',
15
+ borderTopStyle: 'solid',
16
+ borderTopWidth: 'var(--divider-weight)',
17
+ },
18
+ vertical: {
19
+ height: 'stretch',
20
+ borderLeftStyle: 'solid',
21
+ borderLeftWidth: 'var(--divider-weight)',
22
+ },
23
+ },
24
+ weight: {
25
+ thin: { '--divider-weight': 'sizes.1' },
26
+ medium: { '--divider-weight': 'sizes.2' },
27
+ thick: { '--divider-weight': 'sizes.4' },
28
+ thicker: { '--divider-weight': 'sizes.6' },
29
+ },
30
+ };
31
+
32
+ export const dividerRecipe = defineRecipe({
33
+ className: 'divider',
34
+ jsx: ['Divider'],
35
+ base: dividerBase,
36
+ variants: dividerVariants,
37
+ defaultVariants: {
38
+ direction: 'horizontal',
39
+ weight: 'thin',
40
+ },
41
+ });
@@ -0,0 +1,60 @@
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
+
3
+ const formFieldBase = {
4
+ formFieldContainer: {
5
+ _disabled: {
6
+ // opacity: '0.4',
7
+ pointerEvents: 'none',
8
+ labelWrapper: {
9
+ '& p': {
10
+ color: 'text.disabled',
11
+ },
12
+ },
13
+ },
14
+ },
15
+ contentWrapper: {
16
+ display: 'flex',
17
+ flexDirection: 'column',
18
+ gap: '6',
19
+ },
20
+ labelWrapper: {
21
+ '& p': {
22
+ color: 'text',
23
+ },
24
+ },
25
+ headLabel: {
26
+ display: 'flex',
27
+ gap: '4',
28
+ },
29
+ };
30
+
31
+ const formFieldVariants = {
32
+ layout: {
33
+ default: {
34
+ formFieldContainer: {
35
+ display: 'flex',
36
+ flexDirection: 'column',
37
+ gap: '6',
38
+ },
39
+ },
40
+ inline: {
41
+ formFieldContainer: {
42
+ display: 'grid',
43
+ gap: '12',
44
+ gridTemplateColumns: 'auto 1fr',
45
+ alignItems: 'start',
46
+ },
47
+ },
48
+ },
49
+ };
50
+
51
+ export const formFieldRecipe = defineSlotRecipe({
52
+ className: 'formfield',
53
+ jsx: ['Formfield'],
54
+ slots: ['formFieldContainer', 'contentWrapper', 'labelWrapper', 'headLabel'],
55
+ base: formFieldBase,
56
+ variants: formFieldVariants,
57
+ defaultVariants: {
58
+ layout: 'default',
59
+ },
60
+ });
@@ -0,0 +1,28 @@
1
+ export { textareaRecipe } from './textarea';
2
+ export { textRecipe, headingRecipe, linkRecipe, labelRecipe } from './text';
3
+ export { checkboxInputRecipe } from './checkboxinput';
4
+ export { radioInputRecipe } from './radioinput';
5
+ export { toggleRecipe } from './toggle';
6
+ export { toggleInputRecipe } from './toggleinput';
7
+ export { spinnerRecipe } from './spinner';
8
+ export { dividerRecipe } from './divider';
9
+ export { preRecipe, codeRecipe } from './code';
10
+ export { boxRecipe } from './box';
11
+ export { textinputRecipe } from './textinput';
12
+ export { cardRecipe } from './card';
13
+ export { breadcrumbsRecipe } from './breadcrumbs';
14
+ export { tagRecipe } from './tag';
15
+ export { themeSwitcherRecipe } from './themeSwitcher';
16
+
17
+ // Slot Recipes
18
+ export { buttonRecipe, iconButtonRecipe } from './button';
19
+ export { checkboxRecipe } from './checkbox';
20
+ export { radioRecipe } from './radio';
21
+ export { tooltipRecipe } from './tooltip';
22
+ export { menuRecipe } from './menu';
23
+ export { selectRecipe } from './select';
24
+ export { chipRecipe } from './chip';
25
+ export { badgeRecipe } from './badge';
26
+ export { avatarRecipe } from './avatar';
27
+ export { modalRecipe } from './modal';
28
+ export { formFieldRecipe } from './formField';
@@ -0,0 +1,205 @@
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
+
3
+ const menuBase = {
4
+ // Floating container
5
+ menu: {
6
+ display: 'flex',
7
+ flexDirection: 'column',
8
+ minWidth: '200',
9
+ maxWidth: '320',
10
+ maxHeight: '400',
11
+ overflowY: 'auto',
12
+ bg: 'surface.overlay',
13
+ borderRadius: '8',
14
+ boxShadow: 'medium',
15
+ outline: 'none',
16
+ zIndex: 1000,
17
+ },
18
+
19
+ // Individual menu item row
20
+ menuItem: {
21
+ display: 'flex',
22
+ alignItems: 'flex-start',
23
+ gap: '8',
24
+ px: '12',
25
+ py: '8',
26
+ cursor: 'pointer',
27
+ outline: 'none',
28
+ transitionProperty: 'background-color, color',
29
+ transitionDuration: 'fast',
30
+ bg: 'surface.overlay',
31
+
32
+ _hover: {
33
+ bg: 'surface.overlay.hovered',
34
+ },
35
+ _focusVisible: {
36
+ bg: 'surface.overlay.hovered',
37
+ },
38
+ _active: {
39
+ bg: 'surface.overlay.hovered',
40
+ },
41
+ _disabled: {
42
+ opacity: 0.5,
43
+ cursor: 'not-allowed',
44
+ pointerEvents: 'none',
45
+ },
46
+ _selected: {
47
+ bg: 'bg.selected',
48
+ },
49
+ },
50
+
51
+ // Selection indicator area (checkmark or checkbox)
52
+ menuItemIndicator: {
53
+ display: 'flex',
54
+ alignItems: 'center',
55
+ justifyContent: 'center',
56
+ flexShrink: 0,
57
+ w: '24',
58
+ h: '24',
59
+ color: 'icon.selected',
60
+ },
61
+
62
+ // Left icon area
63
+ menuItemIconLeft: {
64
+ display: 'flex',
65
+ alignItems: 'center',
66
+ justifyContent: 'center',
67
+ flexShrink: 0,
68
+ w: '24',
69
+ h: '24',
70
+ color: 'icon.decorative',
71
+ },
72
+
73
+ // Right icon area
74
+ menuItemIconRight: {
75
+ display: 'flex',
76
+ alignItems: 'center',
77
+ justifyContent: 'center',
78
+ flexShrink: 0,
79
+ w: '24',
80
+ h: '24',
81
+ ml: 'auto',
82
+ color: 'icon.decorative',
83
+ },
84
+
85
+ // Content wrapper (label + description)
86
+ menuItemContent: {
87
+ display: 'flex',
88
+ flexDirection: 'column',
89
+ flex: 1,
90
+ minWidth: 0, // Enable text truncation
91
+ },
92
+
93
+ // Primary label
94
+ menuItemLabel: {
95
+ fontSize: '16',
96
+ color: 'text',
97
+ fontFamily: 'sans',
98
+ fontWeight: 'normal',
99
+
100
+ // Highlight match styling for autocomplete
101
+ '& mark': {
102
+ bg: 'bg.warning.hovered',
103
+ color: 'text.bold',
104
+ borderRadius: '2',
105
+ // px: '2',
106
+ },
107
+ },
108
+
109
+ // Secondary description
110
+ menuItemDescription: {
111
+ fontSize: '12',
112
+ fontFamily: 'sans',
113
+ color: 'text.subtlest',
114
+ },
115
+
116
+ // Divider between items/groups
117
+ menuDivider: {
118
+ h: '1',
119
+ mx: '12',
120
+ my: '4',
121
+ bg: 'border',
122
+ },
123
+
124
+ // Group container
125
+ menuGroup: {
126
+ display: 'flex',
127
+ flexDirection: 'column',
128
+ },
129
+
130
+ // Group label
131
+ menuGroupLabel: {
132
+ fontSize: '12',
133
+ color: 'text.subtlest',
134
+ fontFamily: 'sans',
135
+ // fontWeight: 'medium',
136
+ // textTransform: 'uppercase',
137
+ // letterSpacing: 'wide',
138
+ px: '12',
139
+ pt: '16',
140
+ pb: '4',
141
+ },
142
+ };
143
+
144
+ const menuVariants = {
145
+ // Size variants
146
+ packing: {
147
+ default: {
148
+ menu: { minWidth: '200' },
149
+ menuItem: { py: '8' },
150
+ },
151
+ compact: {
152
+ menu: { minWidth: '160' },
153
+ menuItem: { py: '4', px: '8' },
154
+ menuItemIconLeft: { w: '20', h: '20' },
155
+ menuItemIconRight: { w: '20', h: '20' },
156
+ menuItemIndicator: { w: '20', h: '20' },
157
+ },
158
+ comfortable: {
159
+ menu: { minWidth: '240' },
160
+ menuItem: { py: '12', px: '16' },
161
+ },
162
+ },
163
+
164
+ // Selection indicator position
165
+ indicatorPosition: {
166
+ left: {
167
+ menuItem: {
168
+ flexDirection: 'row',
169
+ },
170
+ },
171
+ right: {
172
+ menuItem: {
173
+ flexDirection: 'row',
174
+ },
175
+ menuItemIndicator: {
176
+ order: 999, // Move to end
177
+ ml: 'auto',
178
+ },
179
+ },
180
+ },
181
+ };
182
+
183
+ export const menuRecipe = defineSlotRecipe({
184
+ className: 'menu',
185
+ jsx: ['Menu', 'MenuItem', 'MenuTrigger', 'MenuDivider', 'MenuGroup'],
186
+ slots: [
187
+ 'menu',
188
+ 'menuItem',
189
+ 'menuItemIndicator',
190
+ 'menuItemIconLeft',
191
+ 'menuItemIconRight',
192
+ 'menuItemContent',
193
+ 'menuItemLabel',
194
+ 'menuItemDescription',
195
+ 'menuDivider',
196
+ 'menuGroup',
197
+ 'menuGroupLabel',
198
+ ],
199
+ base: menuBase,
200
+ variants: menuVariants,
201
+ defaultVariants: {
202
+ packing: 'default',
203
+ indicatorPosition: 'left',
204
+ },
205
+ });
@@ -0,0 +1,120 @@
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
+
3
+ const modalBase = {
4
+ overlay: {
5
+ position: 'fixed',
6
+ inset: '0',
7
+ bg: 'blanket',
8
+ zIndex: 1100,
9
+ // Initial state matches animation start
10
+ opacity: '0',
11
+ // Animation handled via data-state
12
+ animation: 'modalFadeIn 150ms ease-out forwards',
13
+ '&[data-state="closing"]': {
14
+ animation: 'modalFadeOut 150ms ease-out forwards',
15
+ },
16
+ },
17
+ container: {
18
+ position: 'fixed',
19
+ top: '50%',
20
+ left: '50%',
21
+ display: 'flex',
22
+ flexDirection: 'column',
23
+ maxHeight: '90vh',
24
+ bg: 'surface.overlay',
25
+ borderRadius: '12',
26
+ boxShadow: 'overlay',
27
+ outline: 'none',
28
+ zIndex: 1101,
29
+ // Initial state matches animation start
30
+ opacity: '0',
31
+ transform: 'translate(-50%, -50%) scale(0.95) translateY(-10px)',
32
+ // Animation handled via data-state
33
+ animation: 'modalScaleIn 150ms ease-out forwards',
34
+ '&[data-state="closing"]': {
35
+ animation: 'modalScaleOut 150ms ease-out forwards',
36
+ },
37
+ },
38
+ header: {
39
+ display: 'flex',
40
+ alignItems: 'center',
41
+ justifyContent: 'space-between',
42
+ gap: '12',
43
+ px: '20',
44
+ py: '12',
45
+ borderBottom: 'default',
46
+ },
47
+ title: {
48
+ w: 'full',
49
+ truncate: true,
50
+ },
51
+ closeButton: {
52
+ // IconButton styles will be applied via IconButton component
53
+ // This slot is for any additional wrapper styling if needed
54
+ },
55
+ body: {
56
+ flex: 1,
57
+ overflowY: 'auto',
58
+ gap: '16',
59
+ px: '20',
60
+ py: '16',
61
+ color: 'text',
62
+ },
63
+ footer: {
64
+ display: 'flex',
65
+ alignItems: 'center',
66
+ justifyContent: 'flex-end',
67
+ gap: '8',
68
+ px: '20',
69
+ py: '12',
70
+ borderTop: 'default',
71
+ },
72
+ };
73
+
74
+ const modalVariants = {
75
+ size: {
76
+ sm: {
77
+ container: {
78
+ maxWidth: '400',
79
+ },
80
+ title: {
81
+ fontSize: 'md',
82
+ },
83
+ },
84
+ md: {
85
+ container: {
86
+ maxWidth: '560',
87
+ },
88
+ title: {
89
+ fontSize: 'lg',
90
+ },
91
+ },
92
+ lg: {
93
+ container: {
94
+ maxWidth: '720',
95
+ },
96
+ title: {
97
+ fontSize: 'xl',
98
+ },
99
+ },
100
+ },
101
+ };
102
+
103
+ export const modalRecipe = defineSlotRecipe({
104
+ className: 'modal',
105
+ jsx: ['Modal', 'ModalHeader', 'ModalBody', 'ModalFooter'],
106
+ slots: [
107
+ 'overlay',
108
+ 'container',
109
+ 'header',
110
+ 'title',
111
+ 'closeButton',
112
+ 'body',
113
+ 'footer',
114
+ ],
115
+ base: modalBase,
116
+ variants: modalVariants,
117
+ defaultVariants: {
118
+ size: 'md',
119
+ },
120
+ });