@okshaun/components 4.2.0 → 5.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.
- package/README.md +1 -1
- package/dist/icon-metadata.json +134 -0
- package/dist/index.js +15087 -9901
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +738 -531
- package/dist/{preset-CsYXL2Bm.js → preset-B6fsdoKY.js} +2141 -214
- package/dist/preset-B6fsdoKY.js.map +1 -0
- package/dist/preset.js +1 -1
- package/dist/specs/keyframes.json +66 -0
- package/dist/specs/recipes.json +383 -26
- package/dist/specs/tokens.json +15 -0
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +248 -2
- package/dist/styles.css +3862 -803
- package/dist/svgs/barcode-reader-off.svg +1 -0
- package/dist/svgs/circle-dashed.svg +1 -0
- package/dist/svgs/drawer-left-hide.svg +1 -0
- package/dist/svgs/drawer-left-show.svg +1 -0
- package/dist/svgs/drawer-right-hide.svg +1 -0
- package/dist/svgs/drawer-right-show.svg +1 -0
- package/dist/svgs/not-equal.svg +1 -0
- package/dist/svgs/square-dashed.svg +1 -0
- package/dist/types/index.d.ts +2725 -117
- package/package.json +9 -12
- package/src/recipes/alert.ts +80 -0
- package/src/recipes/autocomplete.ts +2 -2
- package/src/recipes/avatar.ts +13 -6
- package/src/recipes/button.ts +41 -30
- package/src/recipes/checkbox.ts +3 -0
- package/src/recipes/chip.ts +16 -0
- package/src/recipes/code.ts +40 -23
- package/src/recipes/codeBlock.ts +277 -0
- package/src/recipes/drawer.ts +150 -0
- package/src/recipes/filterField.ts +138 -0
- package/src/recipes/filterMenu.ts +71 -0
- package/src/recipes/filterToken.ts +189 -0
- package/src/recipes/inlineNote.ts +49 -0
- package/src/recipes/keyFact.ts +111 -0
- package/src/recipes/listItem.ts +25 -0
- package/src/recipes/menu.ts +41 -2
- package/src/recipes/pageBanner.ts +110 -0
- package/src/recipes/peekBar.ts +35 -0
- package/src/recipes/popover.ts +206 -0
- package/src/recipes/recipes-regular.ts +1 -1
- package/src/recipes/recipes-slot.ts +13 -0
- package/src/recipes/segmentedFields.ts +11 -5
- package/src/recipes/select.ts +204 -63
- package/src/recipes/spinner.ts +1 -1
- package/src/recipes/tabs.ts +161 -0
- package/src/recipes/tag.ts +13 -2
- package/src/recipes/timeMenus.ts +1 -1
- package/src/recipes/toast.ts +116 -0
- package/src/recipes/toggle.ts +3 -3
- package/src/styles/primitives/fontSizes.ts +1 -0
- package/src/styles/primitives/radii.ts +2 -0
- package/src/styles/utilities/keyframes.ts +38 -0
- package/src/utils/compoundComponent.ts +29 -0
- package/dist/preset-CsYXL2Bm.js.map +0 -1
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
import { globalBaseStyles } from '~/styles/utilities';
|
|
4
|
+
|
|
5
|
+
const popoverBase = {
|
|
6
|
+
content: {
|
|
7
|
+
...globalBaseStyles,
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: 'column',
|
|
10
|
+
bg: 'surface.overlay',
|
|
11
|
+
color: 'text',
|
|
12
|
+
borderRadius: '8',
|
|
13
|
+
border: 'default',
|
|
14
|
+
boxShadow: 'overlay',
|
|
15
|
+
outline: 'none',
|
|
16
|
+
},
|
|
17
|
+
header: {
|
|
18
|
+
display: 'flex',
|
|
19
|
+
alignItems: 'flex-start',
|
|
20
|
+
justifyContent: 'space-between',
|
|
21
|
+
gap: '8',
|
|
22
|
+
px: '12',
|
|
23
|
+
pt: '12',
|
|
24
|
+
pb: '4',
|
|
25
|
+
},
|
|
26
|
+
title: {
|
|
27
|
+
display: 'flex',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
gap: '6',
|
|
30
|
+
fontWeight: 'bold',
|
|
31
|
+
color: 'text',
|
|
32
|
+
lineHeight: 'tight',
|
|
33
|
+
minW: '0',
|
|
34
|
+
flex: '1',
|
|
35
|
+
},
|
|
36
|
+
titleIcon: {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
flex: 'none',
|
|
40
|
+
},
|
|
41
|
+
description: {
|
|
42
|
+
color: 'text.subtle',
|
|
43
|
+
lineHeight: 'default',
|
|
44
|
+
px: '12',
|
|
45
|
+
pb: '4',
|
|
46
|
+
},
|
|
47
|
+
body: {
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexDirection: 'column',
|
|
50
|
+
gap: '8',
|
|
51
|
+
px: '12',
|
|
52
|
+
py: '8',
|
|
53
|
+
color: 'text',
|
|
54
|
+
lineHeight: 'default',
|
|
55
|
+
},
|
|
56
|
+
// Content can't clip overflow without clipping the arrow, so media rounds
|
|
57
|
+
// its own corners when it sits at the top or bottom edge of the panel.
|
|
58
|
+
media: {
|
|
59
|
+
display: 'block',
|
|
60
|
+
width: 'full',
|
|
61
|
+
overflow: 'hidden',
|
|
62
|
+
_first: { borderTopRadius: '8' },
|
|
63
|
+
_last: { borderBottomRadius: '8' },
|
|
64
|
+
'& img': {
|
|
65
|
+
display: 'block',
|
|
66
|
+
width: 'full',
|
|
67
|
+
height: 'auto',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
footer: {
|
|
71
|
+
display: 'flex',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
justifyContent: 'flex-end',
|
|
74
|
+
flexWrap: 'wrap',
|
|
75
|
+
gap: '8',
|
|
76
|
+
px: '12',
|
|
77
|
+
pt: '4',
|
|
78
|
+
pb: '12',
|
|
79
|
+
},
|
|
80
|
+
close: {
|
|
81
|
+
flex: 'none',
|
|
82
|
+
ms: 'auto',
|
|
83
|
+
},
|
|
84
|
+
// Applied only to the fallback element PopoverTrigger renders for plain
|
|
85
|
+
// content, never to a consumer's cloned child. Reads as an inline
|
|
86
|
+
// dashed-underline phrase whether it renders a button or a span.
|
|
87
|
+
trigger: {
|
|
88
|
+
appearance: 'none',
|
|
89
|
+
display: 'inline',
|
|
90
|
+
width: 'fit',
|
|
91
|
+
p: '0',
|
|
92
|
+
m: '0',
|
|
93
|
+
bg: 'transparent',
|
|
94
|
+
borderWidth: '0',
|
|
95
|
+
color: 'inherit',
|
|
96
|
+
font: 'inherit',
|
|
97
|
+
textAlign: 'inherit',
|
|
98
|
+
textDecoration: 'underline',
|
|
99
|
+
textDecorationStyle: 'dashed',
|
|
100
|
+
textDecorationThickness: '[0.0625em]',
|
|
101
|
+
textUnderlineOffset: '[0.15625em]',
|
|
102
|
+
textDecorationSkipInk: 'all',
|
|
103
|
+
cursor: 'pointer',
|
|
104
|
+
_focusVisible: {
|
|
105
|
+
borderRadius: '2',
|
|
106
|
+
outlineWidth: '2',
|
|
107
|
+
outlineStyle: 'solid',
|
|
108
|
+
outlineColor: 'border.focused',
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const popoverVariants = {
|
|
114
|
+
interaction: {
|
|
115
|
+
definition: { trigger: { cursor: 'help' } },
|
|
116
|
+
rich: {},
|
|
117
|
+
},
|
|
118
|
+
/** z-index layer inherited from FloatingLayerContext (raised inside modals). */
|
|
119
|
+
layer: {
|
|
120
|
+
elevated: { content: { zIndex: 'elevated' } },
|
|
121
|
+
modalFloating: { content: { zIndex: 'modalFloating' } },
|
|
122
|
+
},
|
|
123
|
+
size: {
|
|
124
|
+
sm: {
|
|
125
|
+
content: { maxW: '280', fontSize: '12' },
|
|
126
|
+
title: { fontSize: '12' },
|
|
127
|
+
description: { fontSize: '12' },
|
|
128
|
+
body: { fontSize: '12' },
|
|
129
|
+
},
|
|
130
|
+
md: {
|
|
131
|
+
content: { maxW: 'xs', fontSize: '14' },
|
|
132
|
+
title: { fontSize: '14' },
|
|
133
|
+
description: { fontSize: '14' },
|
|
134
|
+
body: { fontSize: '14' },
|
|
135
|
+
},
|
|
136
|
+
lg: {
|
|
137
|
+
content: { maxW: 'sm', fontSize: '14' },
|
|
138
|
+
title: { fontSize: '16' },
|
|
139
|
+
description: { fontSize: '14' },
|
|
140
|
+
body: { fontSize: '14' },
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* Visual tone for handbook-style notes. Quiet chrome only: left accent bar +
|
|
145
|
+
* soft title tint. Surface stays neutral (surface.overlay). Never maps to
|
|
146
|
+
* role="alert".
|
|
147
|
+
*/
|
|
148
|
+
tone: {
|
|
149
|
+
note: {
|
|
150
|
+
content: { borderLeft: 'default', borderLeftWidth: '4' },
|
|
151
|
+
title: { color: 'text.subtle' },
|
|
152
|
+
},
|
|
153
|
+
tip: {
|
|
154
|
+
content: { borderLeft: 'info', borderLeftWidth: '4' },
|
|
155
|
+
title: { color: 'text.subtle' },
|
|
156
|
+
},
|
|
157
|
+
warning: {
|
|
158
|
+
content: { borderLeft: 'warning', borderLeftWidth: '4' },
|
|
159
|
+
title: { color: 'text.warning' },
|
|
160
|
+
},
|
|
161
|
+
important: {
|
|
162
|
+
content: { borderLeft: 'danger', borderLeftWidth: '4' },
|
|
163
|
+
title: { color: 'text.danger' },
|
|
164
|
+
},
|
|
165
|
+
caution: {
|
|
166
|
+
content: { borderLeft: 'warning', borderLeftWidth: '4' },
|
|
167
|
+
title: { color: 'text.warning' },
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export const popoverRecipe = defineSlotRecipe({
|
|
173
|
+
className: 'popover',
|
|
174
|
+
jsx: [
|
|
175
|
+
'Popover',
|
|
176
|
+
'PopoverTrigger',
|
|
177
|
+
'PopoverContent',
|
|
178
|
+
'PopoverHeader',
|
|
179
|
+
'PopoverTitle',
|
|
180
|
+
'PopoverDescription',
|
|
181
|
+
'PopoverBody',
|
|
182
|
+
'PopoverMedia',
|
|
183
|
+
'PopoverFooter',
|
|
184
|
+
'PopoverClose',
|
|
185
|
+
'PopoverArrow',
|
|
186
|
+
],
|
|
187
|
+
slots: [
|
|
188
|
+
'content',
|
|
189
|
+
'header',
|
|
190
|
+
'title',
|
|
191
|
+
'titleIcon',
|
|
192
|
+
'description',
|
|
193
|
+
'body',
|
|
194
|
+
'media',
|
|
195
|
+
'footer',
|
|
196
|
+
'close',
|
|
197
|
+
'trigger',
|
|
198
|
+
],
|
|
199
|
+
base: popoverBase,
|
|
200
|
+
variants: popoverVariants,
|
|
201
|
+
defaultVariants: {
|
|
202
|
+
size: 'md',
|
|
203
|
+
interaction: 'rich',
|
|
204
|
+
layer: 'elevated',
|
|
205
|
+
},
|
|
206
|
+
});
|
|
@@ -2,7 +2,7 @@ export { boxRecipe } from './box';
|
|
|
2
2
|
export { breakpointIndicatorRecipe } from './breakpointIndicator';
|
|
3
3
|
export { cardRecipe } from './card';
|
|
4
4
|
export { checkboxInputRecipe } from './checkboxInput';
|
|
5
|
-
export { codeRecipe
|
|
5
|
+
export { codeRecipe } from './code';
|
|
6
6
|
export { dividerRecipe } from './divider';
|
|
7
7
|
export { highlightTextRecipe } from './highlightText';
|
|
8
8
|
export { iconRecipe } from './icon';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { alertRecipe } from './alert';
|
|
1
2
|
export { autocompleteRecipe } from './autocomplete';
|
|
2
3
|
export { avatarRecipe } from './avatar';
|
|
3
4
|
export { badgeRecipe } from './badge';
|
|
@@ -6,21 +7,33 @@ export { buttonRecipe, iconButtonRecipe } from './button';
|
|
|
6
7
|
export { calendarRecipe } from './calendar';
|
|
7
8
|
export { checkboxRecipe } from './checkbox';
|
|
8
9
|
export { chipRecipe } from './chip';
|
|
10
|
+
export { codeBlockRecipe } from './codeBlock';
|
|
9
11
|
export { dateMenusRecipe } from './dateMenus';
|
|
10
12
|
export { dateTimeMenusRecipe } from './dateTimeMenus';
|
|
13
|
+
export { drawerRecipe } from './drawer';
|
|
14
|
+
export { filterFieldRecipe } from './filterField';
|
|
15
|
+
export { filterMenuRecipe } from './filterMenu';
|
|
16
|
+
export { filterTokenRecipe } from './filterToken';
|
|
11
17
|
export { formFieldRecipe } from './formField';
|
|
18
|
+
export { inlineNoteRecipe } from './inlineNote';
|
|
12
19
|
export { kbdRecipe } from './kbd';
|
|
20
|
+
export { keyFactRecipe } from './keyFact';
|
|
13
21
|
export { listItemRecipe } from './listItem';
|
|
14
22
|
export { listItemGroupRecipe } from './listItemGroup';
|
|
15
23
|
export { menuRecipe } from './menu';
|
|
16
24
|
export { modalRecipe } from './modal';
|
|
25
|
+
export { pageBannerRecipe } from './pageBanner';
|
|
26
|
+
export { peekBarRecipe } from './peekBar';
|
|
27
|
+
export { popoverRecipe } from './popover';
|
|
17
28
|
export { printPreviewRecipe } from './printPreview';
|
|
18
29
|
export { radioRecipe } from './radio';
|
|
19
30
|
export { segmentedFieldsRecipe } from './segmentedFields';
|
|
20
31
|
export { segmentedInputsRecipe } from './segmentedInputs';
|
|
21
32
|
export { selectRecipe } from './select';
|
|
22
33
|
export { spinnerRecipe } from './spinner';
|
|
34
|
+
export { tabsRecipe } from './tabs';
|
|
23
35
|
export { textInputRecipe } from './textInput';
|
|
24
36
|
export { timeMenusRecipe } from './timeMenus';
|
|
37
|
+
export { toastRecipe } from './toast';
|
|
25
38
|
export { toggleRecipe } from './toggle';
|
|
26
39
|
export { tooltipRecipe } from './tooltip';
|
|
@@ -13,8 +13,6 @@ const segmentedFieldsBase = {
|
|
|
13
13
|
display: 'flex',
|
|
14
14
|
alignItems: 'center',
|
|
15
15
|
width: 'full',
|
|
16
|
-
py: 'var(--input-py)',
|
|
17
|
-
px: 'var(--input-px)',
|
|
18
16
|
bg: 'bg.input',
|
|
19
17
|
borderWidth: '1',
|
|
20
18
|
borderStyle: 'solid',
|
|
@@ -58,6 +56,14 @@ const segmentedFieldsBase = {
|
|
|
58
56
|
},
|
|
59
57
|
},
|
|
60
58
|
},
|
|
59
|
+
content: {
|
|
60
|
+
display: 'flex',
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
flex: '1 1 auto',
|
|
63
|
+
minW: '0',
|
|
64
|
+
py: 'var(--input-py)',
|
|
65
|
+
px: 'var(--input-px)',
|
|
66
|
+
},
|
|
61
67
|
slot: {
|
|
62
68
|
display: 'inline-flex',
|
|
63
69
|
alignItems: 'center',
|
|
@@ -146,7 +152,7 @@ const segmentedFieldsVariants = {
|
|
|
146
152
|
},
|
|
147
153
|
before: {
|
|
148
154
|
true: {
|
|
149
|
-
|
|
155
|
+
content: {
|
|
150
156
|
ps: '0',
|
|
151
157
|
},
|
|
152
158
|
buttonSlot: {
|
|
@@ -159,7 +165,7 @@ const segmentedFieldsVariants = {
|
|
|
159
165
|
},
|
|
160
166
|
after: {
|
|
161
167
|
true: {
|
|
162
|
-
|
|
168
|
+
content: {
|
|
163
169
|
pe: '0',
|
|
164
170
|
},
|
|
165
171
|
buttonSlot: {
|
|
@@ -183,7 +189,7 @@ export const segmentedFieldsRecipe = defineSlotRecipe({
|
|
|
183
189
|
'TimeRangeInput',
|
|
184
190
|
'DateTimeInput',
|
|
185
191
|
],
|
|
186
|
-
slots: ['container', 'slot', 'buttonSlot'],
|
|
192
|
+
slots: ['container', 'content', 'slot', 'buttonSlot'],
|
|
187
193
|
base: segmentedFieldsBase,
|
|
188
194
|
variants: segmentedFieldsVariants,
|
|
189
195
|
defaultVariants: {
|
package/src/recipes/select.ts
CHANGED
|
@@ -1,33 +1,53 @@
|
|
|
1
1
|
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
2
|
|
|
3
3
|
const selectBase = {
|
|
4
|
-
|
|
4
|
+
root: {
|
|
5
|
+
'--icon-size': 'token(sizes.24)',
|
|
6
|
+
'--icon-margin': 'token(sizes.3)',
|
|
7
|
+
'--input-icon-padding': 'token(sizes.10)',
|
|
8
|
+
display: 'inline-flex',
|
|
9
|
+
flexDirection: 'column',
|
|
10
|
+
position: 'relative',
|
|
11
|
+
minWidth: '0',
|
|
12
|
+
maxW: 'full',
|
|
13
|
+
width: 'fit',
|
|
14
|
+
},
|
|
5
15
|
trigger: {
|
|
6
|
-
|
|
16
|
+
position: 'relative',
|
|
17
|
+
display: 'inline-flex',
|
|
7
18
|
alignItems: 'center',
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
19
|
+
width: 'fit',
|
|
20
|
+
minWidth: '0',
|
|
21
|
+
maxWidth: 'full',
|
|
22
|
+
pe: 'var(--input-icon-padding)',
|
|
11
23
|
borderWidth: '1',
|
|
12
24
|
borderStyle: 'solid',
|
|
13
25
|
borderColor: 'border.input',
|
|
14
26
|
borderRadius: '4',
|
|
27
|
+
outlineWidth: '2',
|
|
28
|
+
outlineOffset: '-1',
|
|
29
|
+
outlineStyle: 'solid',
|
|
30
|
+
outlineColor: 'transparent',
|
|
15
31
|
bg: 'bg.input',
|
|
16
32
|
color: 'text',
|
|
17
|
-
fontFamily: '
|
|
33
|
+
fontFamily: 'sans',
|
|
34
|
+
lineHeight: 'default',
|
|
18
35
|
cursor: 'pointer',
|
|
19
|
-
|
|
36
|
+
overflow: 'hidden',
|
|
20
37
|
transitionDuration: 'fast',
|
|
21
|
-
transitionProperty: 'background, border-color,
|
|
38
|
+
transitionProperty: 'background, border-color, outline-color',
|
|
22
39
|
transitionTimingFunction: 'default',
|
|
23
40
|
_hover: {
|
|
24
41
|
bg: 'bg.input.hovered',
|
|
25
42
|
},
|
|
26
|
-
|
|
43
|
+
_focusVisible: {
|
|
44
|
+
bg: 'bg.input.pressed',
|
|
45
|
+
borderColor: 'border.focused',
|
|
46
|
+
outlineColor: 'border.focused',
|
|
47
|
+
},
|
|
48
|
+
_open: {
|
|
49
|
+
bg: 'bg.input.pressed',
|
|
27
50
|
borderColor: 'border.focused',
|
|
28
|
-
outlineWidth: '2',
|
|
29
|
-
outlineOffset: '-1',
|
|
30
|
-
outlineStyle: 'solid',
|
|
31
51
|
outlineColor: 'border.focused',
|
|
32
52
|
},
|
|
33
53
|
_disabled: {
|
|
@@ -35,103 +55,215 @@ const selectBase = {
|
|
|
35
55
|
borderColor: 'border.disabled',
|
|
36
56
|
color: 'text.disabled',
|
|
37
57
|
cursor: 'not-allowed',
|
|
38
|
-
|
|
58
|
+
pointerEvents: 'none',
|
|
39
59
|
},
|
|
40
60
|
_error: {
|
|
41
|
-
bg: 'bg.danger',
|
|
42
61
|
borderColor: 'border.danger',
|
|
43
62
|
_hover: {
|
|
44
|
-
|
|
63
|
+
borderColor: 'border.danger',
|
|
45
64
|
},
|
|
46
|
-
|
|
65
|
+
_focusVisible: {
|
|
66
|
+
borderColor: 'border.danger',
|
|
67
|
+
outlineColor: 'border.danger',
|
|
68
|
+
},
|
|
69
|
+
_open: {
|
|
47
70
|
borderColor: 'border.danger',
|
|
48
71
|
outlineColor: 'border.danger',
|
|
49
72
|
},
|
|
50
73
|
},
|
|
51
74
|
},
|
|
52
|
-
|
|
53
|
-
|
|
75
|
+
content: {
|
|
76
|
+
display: 'flex',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
minWidth: '0',
|
|
79
|
+
width: 'full',
|
|
80
|
+
flex: '1',
|
|
81
|
+
ps: 'var(--select-px)',
|
|
82
|
+
},
|
|
83
|
+
before: {
|
|
84
|
+
display: 'inline-flex',
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
flex: '0 0 auto',
|
|
87
|
+
alignSelf: 'center',
|
|
88
|
+
px: 'var(--select-slot-px)',
|
|
89
|
+
fill: 'icon.decorative',
|
|
90
|
+
pointerEvents: 'none',
|
|
91
|
+
},
|
|
54
92
|
value: {
|
|
55
93
|
flex: 1,
|
|
94
|
+
minWidth: '0',
|
|
56
95
|
textAlign: 'left',
|
|
57
96
|
truncate: true,
|
|
58
97
|
color: 'text',
|
|
59
|
-
_placeholder: {
|
|
60
|
-
color: 'text.subtlest',
|
|
61
|
-
},
|
|
62
98
|
},
|
|
63
|
-
|
|
64
|
-
// Placeholder styling (when no value selected)
|
|
65
99
|
placeholder: {
|
|
66
|
-
color: 'text.subtlest',
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
chips: {
|
|
70
100
|
flex: 1,
|
|
71
101
|
minWidth: '0',
|
|
102
|
+
textAlign: 'left',
|
|
103
|
+
truncate: true,
|
|
104
|
+
color: 'text.placeholder',
|
|
105
|
+
},
|
|
106
|
+
chips: {
|
|
107
|
+
display: 'flex',
|
|
72
108
|
alignItems: 'center',
|
|
73
|
-
|
|
109
|
+
gap: '4',
|
|
110
|
+
minWidth: '0',
|
|
111
|
+
width: 'full',
|
|
112
|
+
flex: '1',
|
|
113
|
+
overflowX: 'auto',
|
|
114
|
+
overflowY: 'hidden',
|
|
115
|
+
scrollbarWidth: 'thin',
|
|
74
116
|
},
|
|
75
|
-
|
|
76
|
-
// The chevron/arrow icon
|
|
77
117
|
icon: {
|
|
78
|
-
|
|
118
|
+
position: 'absolute',
|
|
119
|
+
top: '50%',
|
|
120
|
+
right: '1',
|
|
121
|
+
display: 'inline-flex',
|
|
79
122
|
alignItems: 'center',
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
123
|
+
justifyContent: 'center',
|
|
124
|
+
width: 'var(--icon-size)',
|
|
125
|
+
height: 'var(--icon-size)',
|
|
126
|
+
marginInline: 'var(--icon-margin)',
|
|
127
|
+
transform: 'translateY(-50%)',
|
|
128
|
+
bg: 'bg.input',
|
|
129
|
+
fill: 'icon.decorative',
|
|
130
|
+
pointerEvents: 'none',
|
|
131
|
+
transitionDuration: 'fast',
|
|
132
|
+
transitionProperty: 'all',
|
|
84
133
|
transitionTimingFunction: 'default',
|
|
85
|
-
|
|
86
|
-
|
|
134
|
+
_icon: {
|
|
135
|
+
width: 'var(--icon-size)',
|
|
136
|
+
height: 'var(--icon-size)',
|
|
137
|
+
transitionDuration: 'fast',
|
|
138
|
+
transitionProperty: 'all',
|
|
139
|
+
transitionTimingFunction: 'default',
|
|
140
|
+
},
|
|
141
|
+
_peerHover: {
|
|
142
|
+
bg: 'bg.input.hovered',
|
|
143
|
+
},
|
|
144
|
+
_open: {
|
|
145
|
+
'& > svg': {
|
|
146
|
+
transform: 'rotate(-180deg)',
|
|
147
|
+
transformOrigin: 'center',
|
|
148
|
+
},
|
|
87
149
|
},
|
|
88
150
|
},
|
|
89
151
|
};
|
|
90
152
|
|
|
91
153
|
const selectVariants = {
|
|
92
154
|
size: {
|
|
155
|
+
sm: {
|
|
156
|
+
root: {
|
|
157
|
+
'--icon-size': 'token(sizes.22)',
|
|
158
|
+
'--icon-margin': 'token(sizes.2)',
|
|
159
|
+
'--input-icon-padding': '[26px]',
|
|
160
|
+
'--select-px': 'token(sizes.8)',
|
|
161
|
+
'--select-slot-px': 'token(sizes.4)',
|
|
162
|
+
},
|
|
163
|
+
content: {
|
|
164
|
+
py: '0',
|
|
165
|
+
fontSize: '14',
|
|
166
|
+
},
|
|
167
|
+
chips: {
|
|
168
|
+
gap: '3',
|
|
169
|
+
py: '2',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
93
172
|
md: {
|
|
94
|
-
|
|
173
|
+
root: {
|
|
174
|
+
'--icon-size': 'token(sizes.24)',
|
|
175
|
+
'--icon-margin': 'token(sizes.3)',
|
|
176
|
+
'--input-icon-padding': '[31px]',
|
|
177
|
+
'--select-px': 'token(sizes.10)',
|
|
178
|
+
'--select-slot-px': 'token(sizes.6)',
|
|
179
|
+
},
|
|
180
|
+
content: {
|
|
95
181
|
py: '3',
|
|
96
|
-
px: '12',
|
|
97
182
|
fontSize: '16',
|
|
98
183
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
184
|
+
chips: {
|
|
185
|
+
gap: '4',
|
|
186
|
+
py: '5',
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
lg: {
|
|
190
|
+
root: {
|
|
191
|
+
'--icon-size': 'token(sizes.24)',
|
|
192
|
+
'--icon-margin': 'token(sizes.5)',
|
|
193
|
+
'--input-icon-padding': '[34px]',
|
|
194
|
+
'--select-px': 'token(sizes.12)',
|
|
195
|
+
'--select-slot-px': 'token(sizes.8)',
|
|
196
|
+
},
|
|
197
|
+
content: {
|
|
198
|
+
py: '7',
|
|
199
|
+
fontSize: '16',
|
|
200
|
+
},
|
|
201
|
+
chips: {
|
|
202
|
+
gap: '5',
|
|
203
|
+
py: '0',
|
|
102
204
|
},
|
|
103
205
|
},
|
|
104
206
|
xl: {
|
|
105
|
-
|
|
207
|
+
root: {
|
|
208
|
+
'--icon-size': 'token(sizes.28)',
|
|
209
|
+
'--icon-margin': 'token(sizes.7)',
|
|
210
|
+
'--input-icon-padding': '[42px]',
|
|
211
|
+
'--select-px': 'token(sizes.16)',
|
|
212
|
+
'--select-slot-px': 'token(sizes.10)',
|
|
213
|
+
},
|
|
214
|
+
content: {
|
|
106
215
|
py: '9',
|
|
107
|
-
px: '16',
|
|
108
216
|
fontSize: '20',
|
|
109
217
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
218
|
+
chips: {
|
|
219
|
+
gap: '6',
|
|
220
|
+
py: '2',
|
|
113
221
|
},
|
|
114
222
|
},
|
|
115
|
-
|
|
223
|
+
},
|
|
224
|
+
before: {
|
|
225
|
+
true: {
|
|
226
|
+
content: {
|
|
227
|
+
ps: '0',
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
multiple: {
|
|
232
|
+
true: {
|
|
116
233
|
trigger: {
|
|
117
|
-
|
|
118
|
-
px: '14',
|
|
119
|
-
fontSize: '16',
|
|
234
|
+
alignItems: 'flex-start',
|
|
120
235
|
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
h: '24',
|
|
236
|
+
content: {
|
|
237
|
+
alignItems: 'flex-start',
|
|
124
238
|
},
|
|
125
239
|
},
|
|
126
|
-
|
|
240
|
+
},
|
|
241
|
+
autoSize: {
|
|
242
|
+
true: {
|
|
127
243
|
trigger: {
|
|
128
|
-
|
|
129
|
-
px: '8',
|
|
130
|
-
fontSize: '14',
|
|
244
|
+
height: 'auto',
|
|
131
245
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
246
|
+
value: {
|
|
247
|
+
whiteSpace: 'normal',
|
|
248
|
+
textWrap: 'wrap',
|
|
249
|
+
overflow: 'visible',
|
|
250
|
+
textOverflow: 'clip',
|
|
251
|
+
},
|
|
252
|
+
placeholder: {
|
|
253
|
+
whiteSpace: 'normal',
|
|
254
|
+
textWrap: 'wrap',
|
|
255
|
+
overflow: 'visible',
|
|
256
|
+
textOverflow: 'clip',
|
|
257
|
+
},
|
|
258
|
+
chips: {
|
|
259
|
+
flexWrap: 'wrap',
|
|
260
|
+
overflowX: 'visible',
|
|
261
|
+
overflowY: 'visible',
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
false: {
|
|
265
|
+
chips: {
|
|
266
|
+
flexWrap: 'nowrap',
|
|
135
267
|
},
|
|
136
268
|
},
|
|
137
269
|
},
|
|
@@ -139,8 +271,17 @@ const selectVariants = {
|
|
|
139
271
|
|
|
140
272
|
export const selectRecipe = defineSlotRecipe({
|
|
141
273
|
className: 'select',
|
|
142
|
-
jsx: ['Select'
|
|
143
|
-
slots: [
|
|
274
|
+
jsx: ['Select'],
|
|
275
|
+
slots: [
|
|
276
|
+
'root',
|
|
277
|
+
'trigger',
|
|
278
|
+
'content',
|
|
279
|
+
'value',
|
|
280
|
+
'placeholder',
|
|
281
|
+
'chips',
|
|
282
|
+
'before',
|
|
283
|
+
'icon',
|
|
284
|
+
],
|
|
144
285
|
base: selectBase,
|
|
145
286
|
variants: selectVariants,
|
|
146
287
|
defaultVariants: {
|