@blockscout/ui-toolkit 0.0.1-alpha.2 → 0.0.1-alpha.3
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 -4
- package/dist/chakra/select.d.ts +4 -1
- package/dist/components/AdaptiveTabs/index.d.ts +3 -0
- package/dist/components/Hint/Hint.d.ts +11 -0
- package/dist/components/RoutedTabs/index.d.ts +3 -0
- package/dist/components/buttons/BackToButton.d.ts +7 -0
- package/dist/components/buttons/ClearButton.d.ts +6 -0
- package/dist/components/{Filter → filters}/FilterInput.d.ts +2 -3
- package/dist/components/forms/components/FormFieldError.d.ts +7 -0
- package/dist/components/forms/components/index.d.ts +1 -0
- package/dist/components/forms/fields/FormFieldAddress.d.ts +5 -0
- package/dist/components/forms/fields/FormFieldCheckbox.d.ts +9 -0
- package/dist/components/forms/fields/FormFieldColor.d.ts +9 -0
- package/dist/components/forms/fields/FormFieldEmail.d.ts +5 -0
- package/dist/components/forms/fields/FormFieldSelect.d.ts +7 -0
- package/dist/components/forms/fields/FormFieldSelectAsync.d.ts +7 -0
- package/dist/components/forms/fields/FormFieldText.d.ts +8 -0
- package/dist/components/forms/fields/FormFieldUrl.d.ts +4 -0
- package/dist/components/forms/fields/image/FormFieldImagePreview.d.ts +13 -0
- package/dist/components/forms/fields/image/useImageField.d.ts +25 -0
- package/dist/components/forms/fields/index.d.ts +10 -0
- package/dist/components/forms/fields/types.d.ts +19 -0
- package/dist/components/forms/inputs/file/DragAndDropArea.d.ts +11 -0
- package/dist/components/forms/inputs/file/FileInput.d.ts +13 -0
- package/dist/components/forms/inputs/file/FileSnippet.d.ts +11 -0
- package/dist/components/forms/inputs/file/utils.d.ts +2 -0
- package/dist/components/forms/inputs/index.d.ts +3 -0
- package/dist/components/forms/utils/getFormFieldErrorText.d.ts +2 -0
- package/dist/components/forms/utils/index.d.ts +1 -0
- package/dist/components/forms/validators/address.d.ts +3 -0
- package/dist/components/forms/validators/color.d.ts +2 -0
- package/dist/components/forms/validators/email.d.ts +2 -0
- package/dist/components/forms/validators/index.d.ts +7 -0
- package/dist/components/forms/validators/signature.d.ts +1 -0
- package/dist/components/forms/validators/text.d.ts +1 -0
- package/dist/components/forms/validators/transaction.d.ts +2 -0
- package/dist/components/forms/validators/url.d.ts +3 -0
- package/dist/components/truncation/TruncatedTextTooltip.d.ts +8 -0
- package/dist/hooks/useClipboard.d.ts +1 -1
- package/dist/hooks/useFirstMountState.d.ts +1 -0
- package/dist/hooks/useIsSticky.d.ts +2 -0
- package/dist/hooks/useUpdateEffect.d.ts +2 -0
- package/dist/hooks/useViewportSize.d.ts +1 -1
- package/dist/index.js +4288 -3093
- package/dist/package/src/index.d.ts +25 -3
- package/dist/theme/theme.d.ts +1 -0
- package/dist/utils/consts.d.ts +15 -0
- package/dist/utils/guards.d.ts +2 -0
- package/dist/utils/htmlEntities.d.ts +26 -0
- package/dist/utils/isBrowser.d.ts +1 -0
- package/dist/utils/regexp.d.ts +6 -0
- package/dist/utils/url.d.ts +6 -0
- package/package.json +6 -3
- package/dist/components/ButtonBackTo.d.ts +0 -8
- package/dist/components/TruncatedTextTooltip.d.ts +0 -9
- package/dist/components/index.d.ts +0 -1
- package/dist/theme/foundations/animations.ts +0 -12
- package/dist/theme/foundations/borders.ts +0 -13
- package/dist/theme/foundations/breakpoints.ts +0 -10
- package/dist/theme/foundations/colors.ts +0 -162
- package/dist/theme/foundations/durations.ts +0 -15
- package/dist/theme/foundations/semanticTokens.ts +0 -471
- package/dist/theme/foundations/shadows.ts +0 -19
- package/dist/theme/foundations/typography.ts +0 -93
- package/dist/theme/foundations/zIndex.ts +0 -20
- package/dist/theme/globalCss.ts +0 -57
- package/dist/theme/globals/address-entity.ts +0 -33
- package/dist/theme/globals/recaptcha.ts +0 -20
- package/dist/theme/globals/scrollbar.ts +0 -32
- package/dist/theme/recipes/accordion.recipe.ts +0 -145
- package/dist/theme/recipes/alert.recipe.ts +0 -135
- package/dist/theme/recipes/badge.recipe.ts +0 -83
- package/dist/theme/recipes/button.recipe.ts +0 -285
- package/dist/theme/recipes/checkbox.recipe.ts +0 -56
- package/dist/theme/recipes/checkmark.recipe.ts +0 -73
- package/dist/theme/recipes/close-button.recipe.ts +0 -34
- package/dist/theme/recipes/dialog.recipe.ts +0 -213
- package/dist/theme/recipes/drawer.recipe.ts +0 -173
- package/dist/theme/recipes/field.recipe.ts +0 -175
- package/dist/theme/recipes/index.ts +0 -68
- package/dist/theme/recipes/input.recipe.ts +0 -119
- package/dist/theme/recipes/link.recipe.ts +0 -78
- package/dist/theme/recipes/list.recipe.ts +0 -67
- package/dist/theme/recipes/menu.recipe.ts +0 -105
- package/dist/theme/recipes/pin-input.recipe.ts +0 -35
- package/dist/theme/recipes/popover.recipe.ts +0 -71
- package/dist/theme/recipes/progress-circle.recipe.ts +0 -74
- package/dist/theme/recipes/radio-group.recipe.ts +0 -73
- package/dist/theme/recipes/radiomark.recipe.ts +0 -91
- package/dist/theme/recipes/rating-group.recipe.ts +0 -93
- package/dist/theme/recipes/select.recipe.ts +0 -277
- package/dist/theme/recipes/skeleton.recipe.ts +0 -56
- package/dist/theme/recipes/spinner.recipe.ts +0 -31
- package/dist/theme/recipes/stat.recipe.ts +0 -101
- package/dist/theme/recipes/switch.recipe.ts +0 -130
- package/dist/theme/recipes/table.recipe.ts +0 -84
- package/dist/theme/recipes/tabs.recipe.ts +0 -219
- package/dist/theme/recipes/tag.recipe.ts +0 -145
- package/dist/theme/recipes/textarea.recipe.ts +0 -86
- package/dist/theme/recipes/toast.recipe.ts +0 -97
- package/dist/theme/recipes/tooltip.recipe.ts +0 -85
- package/dist/theme/theme.ts +0 -41
- package/dist/theme/utils/entries.ts +0 -12
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { defineSlotRecipe } from '@chakra-ui/react';
|
|
2
|
-
|
|
3
|
-
export const recipe = defineSlotRecipe({
|
|
4
|
-
slots: [ 'content', 'header', 'body', 'footer', 'arrow', 'arrowTip' ],
|
|
5
|
-
base: {
|
|
6
|
-
content: {
|
|
7
|
-
position: 'relative',
|
|
8
|
-
display: 'flex',
|
|
9
|
-
flexDirection: 'column',
|
|
10
|
-
textStyle: 'sm',
|
|
11
|
-
'--popover-bg': 'colors.popover.bg',
|
|
12
|
-
bg: 'var(--popover-bg)',
|
|
13
|
-
boxShadow: 'popover',
|
|
14
|
-
boxShadowColor: 'colors.popover.shadow',
|
|
15
|
-
'--popover-mobile-size': 'calc(100dvw - 1rem)',
|
|
16
|
-
width: 'fit-content',
|
|
17
|
-
maxW: {
|
|
18
|
-
base: 'calc(100vw - 8px)',
|
|
19
|
-
lg: '800px',
|
|
20
|
-
},
|
|
21
|
-
borderWidth: '0',
|
|
22
|
-
borderRadius: 'md',
|
|
23
|
-
'--popover-z-index': 'zIndex.popover',
|
|
24
|
-
zIndex: 'calc(var(--popover-z-index) + var(--layer-index, 0))',
|
|
25
|
-
outline: '0',
|
|
26
|
-
transformOrigin: 'var(--transform-origin)',
|
|
27
|
-
_open: {
|
|
28
|
-
animationStyle: 'scale-fade-in',
|
|
29
|
-
animationDuration: 'fast',
|
|
30
|
-
},
|
|
31
|
-
_closed: {
|
|
32
|
-
animationStyle: 'scale-fade-out',
|
|
33
|
-
animationDuration: 'faster',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
header: {
|
|
37
|
-
paddingInline: 'var(--popover-padding)',
|
|
38
|
-
paddingTop: 'var(--popover-padding)',
|
|
39
|
-
},
|
|
40
|
-
body: {
|
|
41
|
-
padding: 'var(--popover-padding)',
|
|
42
|
-
flex: '1',
|
|
43
|
-
},
|
|
44
|
-
footer: {
|
|
45
|
-
display: 'flex',
|
|
46
|
-
alignItems: 'center',
|
|
47
|
-
paddingInline: 'var(--popover-padding)',
|
|
48
|
-
paddingBottom: 'var(--popover-padding)',
|
|
49
|
-
},
|
|
50
|
-
arrow: {
|
|
51
|
-
'--arrow-size': 'sizes.3',
|
|
52
|
-
'--arrow-background': 'var(--popover-bg)',
|
|
53
|
-
},
|
|
54
|
-
arrowTip: {
|
|
55
|
-
borderTopWidth: '1px',
|
|
56
|
-
borderInlineStartWidth: '1px',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
variants: {
|
|
60
|
-
size: {
|
|
61
|
-
sm: {
|
|
62
|
-
content: {
|
|
63
|
-
'--popover-padding': 'spacing.4',
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
defaultVariants: {
|
|
69
|
-
size: 'sm',
|
|
70
|
-
},
|
|
71
|
-
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { defineSlotRecipe } from '@chakra-ui/react';
|
|
2
|
-
|
|
3
|
-
export const recipe = defineSlotRecipe({
|
|
4
|
-
slots: [ 'root', 'circle', 'circleTrack', 'circleRange', 'label', 'valueText' ],
|
|
5
|
-
base: {
|
|
6
|
-
root: {
|
|
7
|
-
display: 'inline-flex',
|
|
8
|
-
textStyle: 'sm',
|
|
9
|
-
position: 'relative',
|
|
10
|
-
},
|
|
11
|
-
circle: {
|
|
12
|
-
_indeterminate: {
|
|
13
|
-
animation: 'spin 2s linear infinite',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
circleTrack: {
|
|
17
|
-
'--track-color': 'colors.progressCircle.trackColor',
|
|
18
|
-
stroke: 'var(--track-color)',
|
|
19
|
-
},
|
|
20
|
-
circleRange: {
|
|
21
|
-
stroke: 'blue.500',
|
|
22
|
-
transitionProperty: 'stroke-dasharray',
|
|
23
|
-
transitionDuration: '0.6s',
|
|
24
|
-
_indeterminate: {
|
|
25
|
-
animation: 'circular-progress 1.5s linear infinite',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
label: {
|
|
29
|
-
display: 'inline-flex',
|
|
30
|
-
},
|
|
31
|
-
valueText: {
|
|
32
|
-
lineHeight: '1',
|
|
33
|
-
fontWeight: 'medium',
|
|
34
|
-
letterSpacing: 'tight',
|
|
35
|
-
fontVariantNumeric: 'tabular-nums',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
variants: {
|
|
40
|
-
size: {
|
|
41
|
-
sm: {
|
|
42
|
-
circle: {
|
|
43
|
-
'--size': '20px',
|
|
44
|
-
'--thickness': '2px',
|
|
45
|
-
},
|
|
46
|
-
valueText: {
|
|
47
|
-
textStyle: 'xs',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
md: {
|
|
51
|
-
circle: {
|
|
52
|
-
'--size': '32px',
|
|
53
|
-
'--thickness': '3px',
|
|
54
|
-
},
|
|
55
|
-
valueText: {
|
|
56
|
-
textStyle: 'xs',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
lg: {
|
|
60
|
-
circle: {
|
|
61
|
-
'--size': '80px',
|
|
62
|
-
'--thickness': '8px',
|
|
63
|
-
},
|
|
64
|
-
valueText: {
|
|
65
|
-
textStyle: 'sm',
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
defaultVariants: {
|
|
72
|
-
size: 'md',
|
|
73
|
-
},
|
|
74
|
-
});
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { defineSlotRecipe } from '@chakra-ui/react';
|
|
2
|
-
|
|
3
|
-
import { recipe as radiomarkRecipe } from './radiomark.recipe';
|
|
4
|
-
|
|
5
|
-
export const recipe = defineSlotRecipe({
|
|
6
|
-
slots: [ 'item', 'itemControl', 'itemText', 'root' ],
|
|
7
|
-
base: {
|
|
8
|
-
root: {
|
|
9
|
-
display: 'flex',
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
item: {
|
|
13
|
-
display: 'inline-flex',
|
|
14
|
-
alignItems: 'center',
|
|
15
|
-
position: 'relative',
|
|
16
|
-
fontWeight: 'normal',
|
|
17
|
-
cursor: 'pointer',
|
|
18
|
-
_disabled: {
|
|
19
|
-
cursor: 'disabled',
|
|
20
|
-
},
|
|
21
|
-
_readOnly: {
|
|
22
|
-
cursor: 'default',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
itemControl: radiomarkRecipe.base,
|
|
27
|
-
|
|
28
|
-
itemText: {
|
|
29
|
-
userSelect: 'none',
|
|
30
|
-
textStyle: 'md',
|
|
31
|
-
_disabled: {
|
|
32
|
-
opacity: 'control.disabled',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
variants: {
|
|
37
|
-
variant: {
|
|
38
|
-
solid: {
|
|
39
|
-
itemControl: radiomarkRecipe.variants?.variant?.solid,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
size: {
|
|
44
|
-
md: {
|
|
45
|
-
item: { textStyle: 'md', gap: '2' },
|
|
46
|
-
itemControl: radiomarkRecipe.variants?.size?.md,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
orientation: {
|
|
51
|
-
vertical: {
|
|
52
|
-
root: {
|
|
53
|
-
flexDirection: 'column',
|
|
54
|
-
alignItems: 'flex-start',
|
|
55
|
-
rowGap: '12px',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
horizontal: {
|
|
59
|
-
root: {
|
|
60
|
-
flexDirection: 'row',
|
|
61
|
-
alignItems: 'center',
|
|
62
|
-
columnGap: '32px',
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
defaultVariants: {
|
|
69
|
-
size: 'md',
|
|
70
|
-
variant: 'solid',
|
|
71
|
-
orientation: 'vertical',
|
|
72
|
-
},
|
|
73
|
-
});
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { defineRecipe } from '@chakra-ui/react';
|
|
2
|
-
|
|
3
|
-
export const recipe = defineRecipe({
|
|
4
|
-
base: {
|
|
5
|
-
display: 'inline-flex',
|
|
6
|
-
alignItems: 'center',
|
|
7
|
-
justifyContent: 'center',
|
|
8
|
-
flexShrink: 0,
|
|
9
|
-
verticalAlign: 'top',
|
|
10
|
-
color: 'white',
|
|
11
|
-
borderWidth: '2px',
|
|
12
|
-
borderColor: 'transparent',
|
|
13
|
-
borderRadius: 'full',
|
|
14
|
-
_focusVisible: {
|
|
15
|
-
outline: '2px solid',
|
|
16
|
-
outlineColor: 'colorPalette.focusRing',
|
|
17
|
-
outlineOffset: '2px',
|
|
18
|
-
},
|
|
19
|
-
_disabled: {
|
|
20
|
-
cursor: 'disabled',
|
|
21
|
-
opacity: 'control.disabled',
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
'& .dot': {
|
|
25
|
-
height: '100%',
|
|
26
|
-
width: '100%',
|
|
27
|
-
borderRadius: 'full',
|
|
28
|
-
bg: 'currentColor',
|
|
29
|
-
scale: '0.4',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
variants: {
|
|
34
|
-
variant: {
|
|
35
|
-
solid: {
|
|
36
|
-
borderWidth: '2px',
|
|
37
|
-
borderColor: 'radio.control.border',
|
|
38
|
-
_hover: {
|
|
39
|
-
borderColor: 'radio.control.border.hover',
|
|
40
|
-
},
|
|
41
|
-
_checked: {
|
|
42
|
-
bg: 'blue.500',
|
|
43
|
-
color: 'white',
|
|
44
|
-
borderColor: 'blue.500',
|
|
45
|
-
_hover: {
|
|
46
|
-
bg: 'blue.400',
|
|
47
|
-
borderColor: 'blue.400',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
_invalid: {
|
|
51
|
-
bg: 'red.500',
|
|
52
|
-
borderColor: 'red.500',
|
|
53
|
-
},
|
|
54
|
-
_readOnly: {
|
|
55
|
-
borderColor: 'radio.control.border.readOnly',
|
|
56
|
-
_hover: {
|
|
57
|
-
borderColor: 'radio.control.border.readOnly',
|
|
58
|
-
},
|
|
59
|
-
_checked: {
|
|
60
|
-
bg: 'radio.control.border.readOnly',
|
|
61
|
-
_hover: {
|
|
62
|
-
bg: 'radio.control.border.readOnly',
|
|
63
|
-
},
|
|
64
|
-
'& .dot': {
|
|
65
|
-
bg: 'gray.500',
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
size: {
|
|
73
|
-
xs: {
|
|
74
|
-
boxSize: '3',
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
sm: {
|
|
78
|
-
boxSize: '4',
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
md: {
|
|
82
|
-
boxSize: '5',
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
defaultVariants: {
|
|
88
|
-
variant: 'solid',
|
|
89
|
-
size: 'md',
|
|
90
|
-
},
|
|
91
|
-
});
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { defineSlotRecipe } from '@chakra-ui/react';
|
|
2
|
-
|
|
3
|
-
export const recipe = defineSlotRecipe({
|
|
4
|
-
className: 'chakra-rating-group',
|
|
5
|
-
slots: [ 'root', 'control', 'item', 'itemIndicator' ],
|
|
6
|
-
base: {
|
|
7
|
-
root: {
|
|
8
|
-
display: 'inline-flex',
|
|
9
|
-
alignItems: 'center',
|
|
10
|
-
columnGap: 3,
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
control: {
|
|
14
|
-
display: 'inline-flex',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
gap: 1,
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
item: {
|
|
20
|
-
display: 'inline-flex',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
justifyContent: 'center',
|
|
23
|
-
userSelect: 'none',
|
|
24
|
-
cursor: 'pointer',
|
|
25
|
-
|
|
26
|
-
_icon: {
|
|
27
|
-
width: '100%',
|
|
28
|
-
height: '100%',
|
|
29
|
-
display: 'inline-block',
|
|
30
|
-
flexShrink: 0,
|
|
31
|
-
position: 'absolute',
|
|
32
|
-
left: 0,
|
|
33
|
-
top: 0,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
itemIndicator: {
|
|
38
|
-
display: 'inline-flex',
|
|
39
|
-
alignItems: 'center',
|
|
40
|
-
justifyContent: 'center',
|
|
41
|
-
position: 'relative',
|
|
42
|
-
|
|
43
|
-
_icon: {
|
|
44
|
-
stroke: 'none',
|
|
45
|
-
width: '100%',
|
|
46
|
-
height: '100%',
|
|
47
|
-
display: 'inline-block',
|
|
48
|
-
flexShrink: 0,
|
|
49
|
-
position: 'absolute',
|
|
50
|
-
left: 0,
|
|
51
|
-
top: 0,
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
'& [data-bg]': {
|
|
55
|
-
color: 'rating',
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
'& [data-fg]': {
|
|
59
|
-
color: 'transparent',
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
'&[data-highlighted]:not([data-half])': {
|
|
63
|
-
'& [data-fg]': {
|
|
64
|
-
color: 'rating.highlighted',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
'&[data-half]': {
|
|
69
|
-
'& [data-fg]': {
|
|
70
|
-
color: 'rating.highlighted',
|
|
71
|
-
clipPath: 'inset(0 50% 0 0)',
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
variants: {
|
|
78
|
-
size: {
|
|
79
|
-
md: {
|
|
80
|
-
item: {
|
|
81
|
-
boxSize: 5,
|
|
82
|
-
},
|
|
83
|
-
root: {
|
|
84
|
-
textStyle: 'md',
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
defaultVariants: {
|
|
91
|
-
size: 'md',
|
|
92
|
-
},
|
|
93
|
-
});
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
import { defineSlotRecipe } from '@chakra-ui/react';
|
|
2
|
-
|
|
3
|
-
export const recipe = defineSlotRecipe({
|
|
4
|
-
slots: [ 'root', 'trigger', 'indicatorGroup', 'indicator', 'content', 'item', 'control', 'itemText', 'itemGroup', 'itemGroupLabel', 'label', 'valueText' ],
|
|
5
|
-
base: {
|
|
6
|
-
root: {
|
|
7
|
-
display: 'flex',
|
|
8
|
-
flexDirection: 'column',
|
|
9
|
-
gap: '1.5',
|
|
10
|
-
width: '100%',
|
|
11
|
-
},
|
|
12
|
-
trigger: {
|
|
13
|
-
display: 'flex',
|
|
14
|
-
alignItems: 'center',
|
|
15
|
-
justifyContent: 'flex-start',
|
|
16
|
-
width: 'full',
|
|
17
|
-
minH: 'var(--select-trigger-height)',
|
|
18
|
-
pr: 'var(--select-trigger-padding-right)',
|
|
19
|
-
pl: 'var(--select-trigger-padding-left)',
|
|
20
|
-
borderRadius: 'base',
|
|
21
|
-
userSelect: 'none',
|
|
22
|
-
textAlign: 'start',
|
|
23
|
-
fontWeight: 'semibold',
|
|
24
|
-
cursor: 'pointer',
|
|
25
|
-
focusVisibleRing: 'none',
|
|
26
|
-
_disabled: {
|
|
27
|
-
opacity: 'control.disabled',
|
|
28
|
-
},
|
|
29
|
-
_placeholderShown: {
|
|
30
|
-
'& [data-part=value-text]': {
|
|
31
|
-
display: '-webkit-box',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
indicatorGroup: {
|
|
36
|
-
display: 'flex',
|
|
37
|
-
alignItems: 'center',
|
|
38
|
-
gap: '1',
|
|
39
|
-
pos: 'absolute',
|
|
40
|
-
right: '0',
|
|
41
|
-
top: '0',
|
|
42
|
-
bottom: '0',
|
|
43
|
-
px: '0',
|
|
44
|
-
pointerEvents: 'none',
|
|
45
|
-
},
|
|
46
|
-
indicator: {
|
|
47
|
-
display: 'flex',
|
|
48
|
-
alignItems: 'center',
|
|
49
|
-
justifyContent: 'center',
|
|
50
|
-
boxSize: '5',
|
|
51
|
-
color: 'inherit',
|
|
52
|
-
_open: {
|
|
53
|
-
color: 'link.primary.hover',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
content: {
|
|
57
|
-
background: 'popover.bg',
|
|
58
|
-
display: 'flex',
|
|
59
|
-
flexDirection: 'column',
|
|
60
|
-
zIndex: 'popover',
|
|
61
|
-
borderRadius: 'md',
|
|
62
|
-
borderWidth: '0',
|
|
63
|
-
outline: 0,
|
|
64
|
-
boxShadow: 'popover',
|
|
65
|
-
boxShadowColor: 'colors.popover.shadow',
|
|
66
|
-
maxH: '96',
|
|
67
|
-
overflowY: 'auto',
|
|
68
|
-
minWidth: '150px',
|
|
69
|
-
rowGap: '2',
|
|
70
|
-
_open: {
|
|
71
|
-
animationStyle: 'slide-fade-in',
|
|
72
|
-
animationDuration: 'fast',
|
|
73
|
-
},
|
|
74
|
-
_closed: {
|
|
75
|
-
animationStyle: 'slide-fade-out',
|
|
76
|
-
animationDuration: 'fastest',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
item: {
|
|
80
|
-
position: 'relative',
|
|
81
|
-
userSelect: 'none',
|
|
82
|
-
display: 'flex',
|
|
83
|
-
alignItems: 'center',
|
|
84
|
-
gap: '2',
|
|
85
|
-
cursor: 'pointer',
|
|
86
|
-
justifyContent: 'flex-start',
|
|
87
|
-
flex: '1',
|
|
88
|
-
textAlign: 'start',
|
|
89
|
-
borderRadius: 'none',
|
|
90
|
-
_disabled: {
|
|
91
|
-
pointerEvents: 'none',
|
|
92
|
-
opacity: 'control.disabled',
|
|
93
|
-
},
|
|
94
|
-
_highlighted: {
|
|
95
|
-
bg: 'select.item.bg.highlighted',
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
control: {
|
|
99
|
-
pos: 'relative',
|
|
100
|
-
},
|
|
101
|
-
itemText: {
|
|
102
|
-
flex: '1',
|
|
103
|
-
},
|
|
104
|
-
itemGroup: {
|
|
105
|
-
_first: { mt: '0' },
|
|
106
|
-
},
|
|
107
|
-
itemGroupLabel: {
|
|
108
|
-
py: '1',
|
|
109
|
-
fontWeight: 'medium',
|
|
110
|
-
},
|
|
111
|
-
label: {
|
|
112
|
-
fontWeight: 'medium',
|
|
113
|
-
userSelect: 'none',
|
|
114
|
-
textStyle: 'sm',
|
|
115
|
-
_disabled: {
|
|
116
|
-
opacity: 'control.disabled',
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
valueText: {
|
|
120
|
-
display: 'flex',
|
|
121
|
-
flexDirection: 'column',
|
|
122
|
-
lineClamp: '1',
|
|
123
|
-
maxW: '100%',
|
|
124
|
-
wordBreak: 'break-all',
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
variants: {
|
|
129
|
-
variant: {
|
|
130
|
-
outline: {
|
|
131
|
-
trigger: {
|
|
132
|
-
borderWidth: '2px',
|
|
133
|
-
bg: 'input.bg',
|
|
134
|
-
color: 'select.trigger.outline.fg',
|
|
135
|
-
borderColor: 'input.border.filled',
|
|
136
|
-
_expanded: {
|
|
137
|
-
color: 'link.primary.hover',
|
|
138
|
-
borderColor: 'link.primary.hover',
|
|
139
|
-
_hover: {
|
|
140
|
-
color: 'link.primary.hover',
|
|
141
|
-
borderColor: 'link.primary.hover',
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
_hover: {
|
|
145
|
-
color: 'select.trigger.outline.fg',
|
|
146
|
-
borderColor: 'input.border.hover',
|
|
147
|
-
},
|
|
148
|
-
_focusVisible: {
|
|
149
|
-
borderColor: 'input.border.focus',
|
|
150
|
-
},
|
|
151
|
-
_readOnly: {
|
|
152
|
-
userSelect: 'all',
|
|
153
|
-
pointerEvents: 'none',
|
|
154
|
-
cursor: 'default',
|
|
155
|
-
bg: 'input.bg.readOnly',
|
|
156
|
-
borderColor: 'input.border.readOnly',
|
|
157
|
-
_focus: {
|
|
158
|
-
borderColor: 'input.border.readOnly',
|
|
159
|
-
},
|
|
160
|
-
_hover: {
|
|
161
|
-
borderColor: 'input.border.readOnly',
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
_invalid: {
|
|
165
|
-
borderColor: 'input.border.error',
|
|
166
|
-
_hover: {
|
|
167
|
-
borderColor: 'input.border.error',
|
|
168
|
-
},
|
|
169
|
-
_expanded: {
|
|
170
|
-
color: 'link.primary.hover',
|
|
171
|
-
borderColor: 'link.primary.hover',
|
|
172
|
-
_hover: {
|
|
173
|
-
color: 'link.primary.hover',
|
|
174
|
-
borderColor: 'link.primary.hover',
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
_placeholderShown: {
|
|
179
|
-
color: 'select.placeholder.fg',
|
|
180
|
-
borderColor: 'input.border',
|
|
181
|
-
_hover: {
|
|
182
|
-
color: 'select.placeholder.fg',
|
|
183
|
-
},
|
|
184
|
-
_invalid: {
|
|
185
|
-
color: 'select.placeholder.fg.error',
|
|
186
|
-
_hover: {
|
|
187
|
-
color: 'select.placeholder.fg.error',
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
indicatorGroup: {
|
|
193
|
-
color: 'select.indicator.fg',
|
|
194
|
-
_peerDisabled: {
|
|
195
|
-
opacity: 'control.disabled',
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
plain: {
|
|
200
|
-
trigger: {},
|
|
201
|
-
indicatorGroup: {},
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
size: {
|
|
206
|
-
sm: {
|
|
207
|
-
root: {
|
|
208
|
-
'--select-trigger-height': 'sizes.8',
|
|
209
|
-
'--select-trigger-padding-right': 'spacing.8',
|
|
210
|
-
'--select-trigger-padding-left': 'spacing.2',
|
|
211
|
-
},
|
|
212
|
-
content: {
|
|
213
|
-
px: '0',
|
|
214
|
-
py: '4',
|
|
215
|
-
textStyle: 'md',
|
|
216
|
-
},
|
|
217
|
-
trigger: {
|
|
218
|
-
textStyle: 'sm',
|
|
219
|
-
gap: '1',
|
|
220
|
-
},
|
|
221
|
-
indicatorGroup: {
|
|
222
|
-
pr: '2',
|
|
223
|
-
pl: '1',
|
|
224
|
-
},
|
|
225
|
-
item: {
|
|
226
|
-
py: '5px',
|
|
227
|
-
px: '4',
|
|
228
|
-
},
|
|
229
|
-
},
|
|
230
|
-
lg: {
|
|
231
|
-
root: {
|
|
232
|
-
'--select-trigger-height': '60px',
|
|
233
|
-
'--select-trigger-padding-right': '44px',
|
|
234
|
-
'--select-trigger-padding-left': 'spacing.4',
|
|
235
|
-
},
|
|
236
|
-
content: {
|
|
237
|
-
px: '0',
|
|
238
|
-
py: '4',
|
|
239
|
-
textStyle: 'md',
|
|
240
|
-
},
|
|
241
|
-
trigger: {
|
|
242
|
-
py: '2',
|
|
243
|
-
},
|
|
244
|
-
item: {
|
|
245
|
-
py: '5px',
|
|
246
|
-
px: '4',
|
|
247
|
-
},
|
|
248
|
-
indicatorGroup: {
|
|
249
|
-
pr: '4',
|
|
250
|
-
pl: '2',
|
|
251
|
-
},
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
compoundVariants: [
|
|
257
|
-
{
|
|
258
|
-
size: 'sm',
|
|
259
|
-
variant: 'outline',
|
|
260
|
-
css: {
|
|
261
|
-
trigger: {
|
|
262
|
-
_placeholderShown: {
|
|
263
|
-
color: 'select.trigger.outline.fg',
|
|
264
|
-
_hover: {
|
|
265
|
-
color: 'select.trigger.outline.fg',
|
|
266
|
-
},
|
|
267
|
-
},
|
|
268
|
-
},
|
|
269
|
-
},
|
|
270
|
-
},
|
|
271
|
-
],
|
|
272
|
-
|
|
273
|
-
defaultVariants: {
|
|
274
|
-
size: 'sm',
|
|
275
|
-
variant: 'outline',
|
|
276
|
-
},
|
|
277
|
-
});
|