@rescui/dropdown 0.10.2-RUI-296-Build-docs-md-files-for-each-docs-section-2a311c841.14 → 0.10.2-RUI-296-Build-docs-md-files-for-each-docs-section-b138dd5bf.15
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/lib/dropdown.p.module.css.js +12 -12
- package/lib/index.css +29 -29
- package/llm/components/dropdown.md +72 -0
- package/llm/index.md +2 -0
- package/package.json +6 -5
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"themeLight": "
|
|
3
|
-
"themeDark": "
|
|
4
|
-
"dropdown": "
|
|
5
|
-
"triggerWrapper": "
|
|
6
|
-
"contentWrapper": "
|
|
7
|
-
"fadeInBottomToTop": "
|
|
8
|
-
"fadeInTopToBottom": "
|
|
9
|
-
"fadeInLeftToRight": "
|
|
10
|
-
"fadeInRightToLeft": "
|
|
11
|
-
"wrapperHidden": "
|
|
12
|
-
"modeClassic": "
|
|
13
|
-
"modeRock": "
|
|
2
|
+
"themeLight": "_themeLight_17n35ir_59",
|
|
3
|
+
"themeDark": "_themeDark_17n35ir_62",
|
|
4
|
+
"dropdown": "_dropdown_17n35ir_66",
|
|
5
|
+
"triggerWrapper": "_triggerWrapper_17n35ir_73",
|
|
6
|
+
"contentWrapper": "_contentWrapper_17n35ir_77",
|
|
7
|
+
"fadeInBottomToTop": "_fadeInBottomToTop_17n35ir_1",
|
|
8
|
+
"fadeInTopToBottom": "_fadeInTopToBottom_17n35ir_1",
|
|
9
|
+
"fadeInLeftToRight": "_fadeInLeftToRight_17n35ir_1",
|
|
10
|
+
"fadeInRightToLeft": "_fadeInRightToLeft_17n35ir_1",
|
|
11
|
+
"wrapperHidden": "_wrapperHidden_17n35ir_110",
|
|
12
|
+
"modeClassic": "_modeClassic_17n35ir_130",
|
|
13
|
+
"modeRock": "_modeRock_17n35ir_134"
|
|
14
14
|
};
|
|
15
15
|
export { styles as default };
|
package/lib/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@keyframes
|
|
1
|
+
@keyframes _fadeInTopToBottom_17n35ir_1{
|
|
2
2
|
0%{
|
|
3
3
|
opacity:0;
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
transform:none;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
@keyframes
|
|
13
|
+
@keyframes _fadeInBottomToTop_17n35ir_1{
|
|
14
14
|
0%{
|
|
15
15
|
opacity:0;
|
|
16
16
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
transform:none;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
@keyframes
|
|
25
|
+
@keyframes _fadeInLeftToRight_17n35ir_1{
|
|
26
26
|
0%{
|
|
27
27
|
opacity:0;
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
transform:none;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
@keyframes
|
|
37
|
+
@keyframes _fadeInRightToLeft_17n35ir_1{
|
|
38
38
|
0%{
|
|
39
39
|
opacity:0;
|
|
40
40
|
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
transform:none;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
._themeLight_17n35ir_59{
|
|
50
50
|
--rs-theme-dark:0;
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
._themeDark_17n35ir_62{
|
|
53
53
|
--rs-theme-dark:1;
|
|
54
54
|
}
|
|
55
|
-
.
|
|
55
|
+
._dropdown_17n35ir_66{
|
|
56
56
|
--_rs-theme-dark:var(
|
|
57
57
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
58
58
|
var(--rs-theme-dark, 0)
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
63
63
|
}
|
|
64
64
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
65
|
-
.
|
|
65
|
+
._dropdown_17n35ir_66{
|
|
66
66
|
--_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
67
67
|
--_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
68
68
|
--_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
74
|
-
.
|
|
74
|
+
._dropdown_17n35ir_66{
|
|
75
75
|
--_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
|
|
76
76
|
--_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
|
|
77
77
|
--_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
|
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
--_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
.
|
|
82
|
+
._dropdown_17n35ir_66 {
|
|
83
83
|
display:flex;
|
|
84
84
|
flex-direction:column;
|
|
85
85
|
}
|
|
86
|
-
.
|
|
86
|
+
._triggerWrapper_17n35ir_73{
|
|
87
87
|
display:inline-block;
|
|
88
88
|
}
|
|
89
|
-
.
|
|
89
|
+
._contentWrapper_17n35ir_77{
|
|
90
90
|
position:relative;
|
|
91
91
|
|
|
92
92
|
display:block;
|
|
@@ -100,40 +100,40 @@
|
|
|
100
100
|
|
|
101
101
|
transition:opacity var(--rs-transition-function, linear) 200ms, transform var(--rs-transition-function, linear) 200ms;
|
|
102
102
|
}
|
|
103
|
-
[data-popper-placement^='top'] .
|
|
104
|
-
animation:
|
|
103
|
+
[data-popper-placement^='top'] ._contentWrapper_17n35ir_77{
|
|
104
|
+
animation:_fadeInBottomToTop_17n35ir_1 var(--rs-transition-function, ease) 200ms;
|
|
105
105
|
}
|
|
106
|
-
[data-popper-placement^='bottom'] .
|
|
107
|
-
animation:
|
|
106
|
+
[data-popper-placement^='bottom'] ._contentWrapper_17n35ir_77{
|
|
107
|
+
animation:_fadeInTopToBottom_17n35ir_1 var(--rs-transition-function, ease) 200ms;
|
|
108
108
|
}
|
|
109
|
-
[data-popper-placement^='right'] .
|
|
110
|
-
animation:
|
|
109
|
+
[data-popper-placement^='right'] ._contentWrapper_17n35ir_77{
|
|
110
|
+
animation:_fadeInLeftToRight_17n35ir_1 var(--rs-transition-function, ease) 200ms;
|
|
111
111
|
}
|
|
112
|
-
[data-popper-placement^='left'] .
|
|
113
|
-
animation:
|
|
112
|
+
[data-popper-placement^='left'] ._contentWrapper_17n35ir_77{
|
|
113
|
+
animation:_fadeInRightToLeft_17n35ir_1 var(--rs-transition-function, ease) 200ms;
|
|
114
114
|
}
|
|
115
|
-
.
|
|
115
|
+
._wrapperHidden_17n35ir_110{
|
|
116
116
|
opacity:0;
|
|
117
117
|
}
|
|
118
|
-
[data-popper-placement^='top'] .
|
|
118
|
+
[data-popper-placement^='top'] ._wrapperHidden_17n35ir_110{
|
|
119
119
|
transform:translateY(10px);
|
|
120
120
|
}
|
|
121
|
-
[data-popper-placement^='bottom'] .
|
|
121
|
+
[data-popper-placement^='bottom'] ._wrapperHidden_17n35ir_110{
|
|
122
122
|
transform:translateY(-10px);
|
|
123
123
|
}
|
|
124
|
-
[data-popper-placement^='right'] .
|
|
124
|
+
[data-popper-placement^='right'] ._wrapperHidden_17n35ir_110{
|
|
125
125
|
transform:translateX(-10px);
|
|
126
126
|
}
|
|
127
|
-
[data-popper-placement^='left'] .
|
|
127
|
+
[data-popper-placement^='left'] ._wrapperHidden_17n35ir_110{
|
|
128
128
|
transform:translateX(10px);
|
|
129
129
|
}
|
|
130
|
-
.
|
|
130
|
+
._modeClassic_17n35ir_130 ._contentWrapper_17n35ir_77{
|
|
131
131
|
background-color:rgb(calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*227));
|
|
132
132
|
}
|
|
133
|
-
.
|
|
133
|
+
._modeRock_17n35ir_134 ._contentWrapper_17n35ir_77{
|
|
134
134
|
background-color:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
135
135
|
}
|
|
136
|
-
.
|
|
136
|
+
._modeRock_17n35ir_134{
|
|
137
137
|
--rs-parent-color-primary-light-theme:var(--rs-color-primary-light-theme);
|
|
138
138
|
--rs-parent-color-primary-dim-light-theme:var(
|
|
139
139
|
--rs-color-primary-dim-light-theme
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
--rs-color-primary-t-fog-dark-theme
|
|
163
163
|
);
|
|
164
164
|
}
|
|
165
|
-
.
|
|
165
|
+
._modeRock_17n35ir_134 > *{
|
|
166
166
|
--rs-color-primary-dark-theme:var(--rs-parent-color-primary-light-theme);
|
|
167
167
|
--rs-color-primary-dim-dark-theme:var(
|
|
168
168
|
--rs-parent-color-primary-dim-light-theme
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Dropdown
|
|
2
|
+
|
|
3
|
+
Dropdown components allow you to display content in an overlay beneath a trigger component.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
### Features showcase
|
|
8
|
+
|
|
9
|
+
#### Fixed width example
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { useState } from 'react';
|
|
13
|
+
import { Dropdown } from '@rescui/dropdown';
|
|
14
|
+
import { Button } from '@rescui/button';
|
|
15
|
+
import { Input } from '@rescui/input';
|
|
16
|
+
import { DownOutlineIcon } from '@rescui/icons';
|
|
17
|
+
import { textCn } from '@rescui/typography';
|
|
18
|
+
import { Tab, TabList } from '@rescui/tab-list';
|
|
19
|
+
|
|
20
|
+
const getDefaultInputValue = tab =>
|
|
21
|
+
tab === 'HTTPS'
|
|
22
|
+
? 'https://github.com/JetBrains/webteam-ui.git'
|
|
23
|
+
: 'git@github.com:JetBrains/webteam-ui.git';
|
|
24
|
+
|
|
25
|
+
const Demo = () => {
|
|
26
|
+
const [showDropdown, setShowDropdown] = React.useState(false);
|
|
27
|
+
const [openTab, setOpenTab] = React.useState('HTTPS');
|
|
28
|
+
const [inputValue, setInputValue] = useState(getDefaultInputValue(openTab));
|
|
29
|
+
|
|
30
|
+
const handleTabSwitch = newTab => {
|
|
31
|
+
setOpenTab(newTab);
|
|
32
|
+
setInputValue(getDefaultInputValue(newTab));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const handleCloseDropdown = () => setShowDropdown(false);
|
|
36
|
+
const handleClick = () => setShowDropdown(showDropdown => !showDropdown);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Dropdown
|
|
40
|
+
isOpen={showDropdown}
|
|
41
|
+
minWidth={420}
|
|
42
|
+
onRequestClose={handleCloseDropdown}
|
|
43
|
+
trigger={
|
|
44
|
+
<Button icon={<DownOutlineIcon />} onClick={handleClick} iconPosition="right">
|
|
45
|
+
Get Code
|
|
46
|
+
</Button>
|
|
47
|
+
}
|
|
48
|
+
>
|
|
49
|
+
<div style={{ padding: '16px' }}>
|
|
50
|
+
<h3 className={textCn('rs-h3')}>Clone</h3>
|
|
51
|
+
<TabList
|
|
52
|
+
value={openTab}
|
|
53
|
+
short
|
|
54
|
+
onChange={handleTabSwitch}
|
|
55
|
+
className={'rs-offset-top-24'}
|
|
56
|
+
>
|
|
57
|
+
<Tab value={'HTTPS'}>HTTPS</Tab>
|
|
58
|
+
<Tab value={'SSH'}>SSH</Tab>
|
|
59
|
+
</TabList>
|
|
60
|
+
<Input
|
|
61
|
+
className={'rs-docs-offset-top-12'}
|
|
62
|
+
note={`Clone using ${openTab}`}
|
|
63
|
+
value={inputValue}
|
|
64
|
+
onChange={e => setInputValue(e.target.value)}
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
</Dropdown>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
render(<Demo />);
|
|
72
|
+
```
|
package/llm/index.md
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/dropdown",
|
|
3
|
-
"version": "0.10.2-RUI-296-Build-docs-md-files-for-each-docs-section-
|
|
3
|
+
"version": "0.10.2-RUI-296-Build-docs-md-files-for-each-docs-section-b138dd5bf.15+b138dd5bf",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"src:main": "src/index.ts",
|
|
10
10
|
"files": [
|
|
11
11
|
"lib",
|
|
12
|
+
"llm",
|
|
12
13
|
"LICENSE.txt"
|
|
13
14
|
],
|
|
14
15
|
"publishConfig": {
|
|
@@ -29,15 +30,15 @@
|
|
|
29
30
|
"react-dom": ">=16.8.0 <20"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@rescui/colors": "0.3.1-RUI-296-Build-docs-md-files-for-each-docs-section-
|
|
33
|
-
"@rescui/icons": "1.8.1-RUI-296-Build-docs-md-files-for-each-docs-section-
|
|
33
|
+
"@rescui/colors": "0.3.1-RUI-296-Build-docs-md-files-for-each-docs-section-b138dd5bf.54+b138dd5bf",
|
|
34
|
+
"@rescui/icons": "1.8.1-RUI-296-Build-docs-md-files-for-each-docs-section-b138dd5bf.15+b138dd5bf",
|
|
34
35
|
"@rescui/scripts": "0.5.2",
|
|
35
|
-
"@rescui/typography": "0.27.1-RUI-296-Build-docs-md-files-for-each-docs-section-
|
|
36
|
+
"@rescui/typography": "0.27.1-RUI-296-Build-docs-md-files-for-each-docs-section-b138dd5bf.19+b138dd5bf",
|
|
36
37
|
"@rescui/visual-regression": "0.1.4"
|
|
37
38
|
},
|
|
38
39
|
"scripts": {
|
|
39
40
|
"build": "rescui-scripts build"
|
|
40
41
|
},
|
|
41
42
|
"nx": {},
|
|
42
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "b138dd5bf3dbdca6c21fa339dd567517d5c5d1d9"
|
|
43
44
|
}
|