@symbo.ls/dropdown 3.1.2 → 3.3.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.
- package/index.js +58 -2
- package/package.json +13 -5
package/index.js
CHANGED
|
@@ -51,8 +51,8 @@ export const DropdownList = {
|
|
|
51
51
|
},
|
|
52
52
|
|
|
53
53
|
':not(:first-child)': {
|
|
54
|
-
'@dark': { border: 'gray4
|
|
55
|
-
'@light': { border: 'gray11
|
|
54
|
+
'@dark': { border: 'solid gray4.65' },
|
|
55
|
+
'@light': { border: 'solid gray11' },
|
|
56
56
|
borderWidth: '1px 0 0'
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -72,3 +72,59 @@ export const DropdownParent = {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
export const DropdownParentFocus = {
|
|
77
|
+
position: 'relative',
|
|
78
|
+
tabindex: '0',
|
|
79
|
+
style: {
|
|
80
|
+
'&:focus-within': {
|
|
81
|
+
zIndex: 1000,
|
|
82
|
+
'& [dropdown]': {
|
|
83
|
+
transform: 'translate3d(0,0,0)',
|
|
84
|
+
opacity: 1,
|
|
85
|
+
visibility: 'visible'
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
Input_trigger: {
|
|
91
|
+
type: 'checkbox',
|
|
92
|
+
opacity: '0',
|
|
93
|
+
visibility: 'hidden',
|
|
94
|
+
position: 'absolute',
|
|
95
|
+
inset: '0',
|
|
96
|
+
onUpdate: (el) => el.node.blur()
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
Dropdown: {
|
|
100
|
+
// onClick: (ev, el) => el.parent.Input_trigger.node.blur()
|
|
101
|
+
onClick: () => {
|
|
102
|
+
document.activeElement?.blur()
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export const DropdownSiblingFocus = {
|
|
107
|
+
props: {
|
|
108
|
+
position: 'relative',
|
|
109
|
+
tabindex: '0',
|
|
110
|
+
style: {
|
|
111
|
+
'&:focus-within': {
|
|
112
|
+
zIndex: 1000,
|
|
113
|
+
'& ~ [dropdown]': {
|
|
114
|
+
transform: 'translate3d(0,0,0)',
|
|
115
|
+
opacity: 1,
|
|
116
|
+
visibility: 'visible'
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
Input_trigger: {
|
|
123
|
+
type: 'checkbox',
|
|
124
|
+
opacity: '0',
|
|
125
|
+
visibility: 'hidden',
|
|
126
|
+
position: 'absolute',
|
|
127
|
+
inset: '0',
|
|
128
|
+
onUpdate: (el) => el.node.blur()
|
|
129
|
+
}
|
|
130
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/dropdown",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@symbo.ls/atoms": "^3.
|
|
9
|
-
"@symbo.ls/button": "^3.
|
|
8
|
+
"@symbo.ls/atoms": "^3.2.3",
|
|
9
|
+
"@symbo.ls/button": "^3.2.3"
|
|
10
10
|
},
|
|
11
|
-
"source": "
|
|
11
|
+
"source": "index.js",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"module": "index.js",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./index.js",
|
|
17
|
+
"default": "./index.js"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
12
20
|
}
|