dash-core-components 4.0.0-rc1 → 4.0.0-rc2
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/dash_core_components/async-dropdown.js +1 -1
- package/dash_core_components/async-dropdown.js.map +1 -1
- package/dash_core_components/async-slider.js +1 -1
- package/dash_core_components/async-slider.js.map +1 -1
- package/dash_core_components/dash_core_components.js +1 -1
- package/dash_core_components/dash_core_components.js.map +1 -1
- package/dash_core_components/proptypes.js +102 -3
- package/lib/components/Checklist.tsx +67 -0
- package/lib/components/Dropdown.tsx +19 -3
- package/lib/components/Loading.tsx +185 -0
- package/lib/components/RadioItems.tsx +69 -0
- package/lib/components/RangeSlider.tsx +5 -1
- package/lib/components/Slider.tsx +12 -1
- package/lib/components/Tab.react.js.old +79 -0
- package/lib/components/Textarea.tsx +79 -0
- package/lib/components/Tooltip.tsx +66 -0
- package/lib/components/css/checklist.css +4 -0
- package/lib/components/css/dcc.css +2 -0
- package/lib/components/css/dropdown.css +30 -49
- package/lib/components/css/input.css +22 -6
- package/lib/components/css/optionslist.css +34 -0
- package/lib/components/css/radioitems.css +4 -0
- package/lib/components/css/sliders.css +11 -7
- package/lib/components/css/textarea.css +21 -0
- package/lib/components/css/tooltip.css +127 -0
- package/lib/fragments/Dropdown.tsx +205 -269
- package/lib/fragments/Loading/spinners/CircleSpinner.tsx +185 -0
- package/lib/fragments/Loading/spinners/CubeSpinner.tsx +193 -0
- package/lib/fragments/Loading/spinners/DebugTitle.tsx +11 -0
- package/lib/fragments/Loading/spinners/DefaultSpinner.tsx +110 -0
- package/lib/fragments/Loading/spinners/DotSpinner.tsx +96 -0
- package/lib/fragments/Loading/spinners/GraphSpinner.tsx +332 -0
- package/lib/fragments/Loading/types.ts +13 -0
- package/lib/fragments/RangeSlider.tsx +193 -63
- package/lib/index.ts +5 -5
- package/lib/types.ts +455 -116
- package/lib/utils/dropdownSearch.ts +4 -4
- package/lib/utils/optionRendering.tsx +168 -0
- package/lib/utils/optionTypes.ts +5 -5
- package/lib/utils/sliderRendering.tsx +23 -4
- package/package.json +1 -2
- package/lib/components/Checklist.react.js +0 -193
- package/lib/components/Input.react.js.old +0 -507
- package/lib/components/Loading.react.js +0 -254
- package/lib/components/RadioItems.react.js +0 -192
- package/lib/components/Slider.react.js.old +0 -214
- package/lib/components/Textarea.react.js +0 -223
- package/lib/components/Tooltip.react.js +0 -120
- package/lib/components/css/Dropdown.css +0 -8
- package/lib/fragments/Loading/spinners/CircleSpinner.js +0 -68
- package/lib/fragments/Loading/spinners/CubeSpinner.js +0 -57
- package/lib/fragments/Loading/spinners/DebugTitle.js +0 -15
- package/lib/fragments/Loading/spinners/DefaultSpinner.js +0 -54
- package/lib/fragments/Loading/spinners/DotSpinner.js +0 -50
- package/lib/fragments/Loading/spinners/GraphSpinner.js +0 -68
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import {pick} from 'ramda';
|
|
4
|
+
import {PersistedProps, PersistenceTypes, TextAreaProps} from '../types';
|
|
5
|
+
import './css/textarea.css';
|
|
6
|
+
|
|
7
|
+
const textAreaProps = [
|
|
8
|
+
'id',
|
|
9
|
+
'cols',
|
|
10
|
+
'rows',
|
|
11
|
+
'minLength',
|
|
12
|
+
'maxLength',
|
|
13
|
+
'contentEditable',
|
|
14
|
+
'tabIndex',
|
|
15
|
+
'form',
|
|
16
|
+
'name',
|
|
17
|
+
'placeholder',
|
|
18
|
+
'wrap',
|
|
19
|
+
'accessKey',
|
|
20
|
+
'contextMenu',
|
|
21
|
+
'dir',
|
|
22
|
+
'draggable',
|
|
23
|
+
'lang',
|
|
24
|
+
'spellCheck',
|
|
25
|
+
'style',
|
|
26
|
+
'title',
|
|
27
|
+
] as const;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A basic HTML textarea for entering multiline text.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
const Textarea = ({
|
|
34
|
+
setProps,
|
|
35
|
+
n_blur = 0,
|
|
36
|
+
n_blur_timestamp = -1,
|
|
37
|
+
n_clicks = 0,
|
|
38
|
+
n_clicks_timestamp = -1,
|
|
39
|
+
...props
|
|
40
|
+
}: TextAreaProps) => {
|
|
41
|
+
const ctx = window.dash_component_api.useDashContext();
|
|
42
|
+
const isLoading = ctx.useLoading();
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<textarea
|
|
46
|
+
data-dash-is-loading={isLoading || undefined}
|
|
47
|
+
className={'dash-textarea ' + props.className}
|
|
48
|
+
value={props.value}
|
|
49
|
+
disabled={!!props.disabled}
|
|
50
|
+
readOnly={!!props.readOnly}
|
|
51
|
+
required={!!props.required}
|
|
52
|
+
autoFocus={!!props.autoFocus}
|
|
53
|
+
hidden={!!props.hidden}
|
|
54
|
+
onChange={e => {
|
|
55
|
+
setProps({value: e.target.value});
|
|
56
|
+
}}
|
|
57
|
+
onBlur={() => {
|
|
58
|
+
setProps({
|
|
59
|
+
n_blur: n_blur + 1,
|
|
60
|
+
n_blur_timestamp: Date.now(),
|
|
61
|
+
});
|
|
62
|
+
}}
|
|
63
|
+
onClick={() => {
|
|
64
|
+
setProps({
|
|
65
|
+
n_clicks: n_clicks + 1,
|
|
66
|
+
n_clicks_timestamp: Date.now(),
|
|
67
|
+
});
|
|
68
|
+
}}
|
|
69
|
+
{...pick(textAreaProps, props)}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
Textarea.dashPersistence = {
|
|
75
|
+
persisted_props: [PersistedProps.value],
|
|
76
|
+
persistence_type: PersistenceTypes.local,
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export default Textarea;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {TooltipProps} from '../types';
|
|
3
|
+
import './css/tooltip.css';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A tooltip with an absolute position.
|
|
7
|
+
*/
|
|
8
|
+
const Tooltip = ({
|
|
9
|
+
show = true,
|
|
10
|
+
targetable = false,
|
|
11
|
+
direction = 'right',
|
|
12
|
+
border_color = 'var(--Dash-Stroke-Weak)',
|
|
13
|
+
background_color = 'var(--Dash-Fill-Inverse-Strong)',
|
|
14
|
+
className = '',
|
|
15
|
+
zindex = 1,
|
|
16
|
+
loading_text = 'Loading...',
|
|
17
|
+
...props
|
|
18
|
+
}: TooltipProps) => {
|
|
19
|
+
const {bbox, id} = props;
|
|
20
|
+
const show_tooltip = show && bbox;
|
|
21
|
+
|
|
22
|
+
const ctx = window.dash_component_api.useDashContext();
|
|
23
|
+
const is_loading = ctx.useLoading();
|
|
24
|
+
|
|
25
|
+
const position = bbox ?? {x0: 0, x1: 0, y0: 0, y1: 0};
|
|
26
|
+
|
|
27
|
+
const styles = {
|
|
28
|
+
top: `${position?.y0}px`,
|
|
29
|
+
left: `${position?.x0}px`,
|
|
30
|
+
width: `${position?.x1 - position?.x0}px`,
|
|
31
|
+
height: `${position?.y1 - position?.y0}px`,
|
|
32
|
+
display: `${show_tooltip ? 'inline-block' : 'none'}`,
|
|
33
|
+
pointerEvents: `${targetable ? 'auto' : 'none'}`,
|
|
34
|
+
'--Dash-Tooltip-Border-Color': border_color,
|
|
35
|
+
'--Dash-Tooltip-Background-Color': background_color,
|
|
36
|
+
'--Dash-Tooltip-ZIndex': zindex,
|
|
37
|
+
} as const;
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<>
|
|
41
|
+
<div
|
|
42
|
+
className="dcc-tooltip-bounding-box dash-tooltip"
|
|
43
|
+
style={styles}
|
|
44
|
+
>
|
|
45
|
+
<div
|
|
46
|
+
className={`hover hover-${direction}`}
|
|
47
|
+
data-dash-is-loading={is_loading}
|
|
48
|
+
>
|
|
49
|
+
<span
|
|
50
|
+
id={id}
|
|
51
|
+
className={`hover-content ${className}`}
|
|
52
|
+
style={props.style}
|
|
53
|
+
>
|
|
54
|
+
{is_loading ? (
|
|
55
|
+
<span>{loading_text}</span>
|
|
56
|
+
) : (
|
|
57
|
+
props.children
|
|
58
|
+
)}
|
|
59
|
+
</span>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</>
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export default Tooltip;
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
.dash-dropdown {
|
|
2
|
+
display: block;
|
|
3
|
+
flex: 1;
|
|
2
4
|
box-sizing: border-box;
|
|
3
5
|
margin: calc(var(--Dash-Spacing) * 2) 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
background: inherit;
|
|
8
|
+
border: none;
|
|
9
|
+
outline: none;
|
|
10
|
+
width: 100%;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
font-size: inherit;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
accent-color: var(--Dash-Fill-Interactive-Strong);
|
|
15
|
+
outline-color: var(--Dash-Fill-Interactive-Strong);
|
|
4
16
|
}
|
|
5
17
|
|
|
6
18
|
.dash-dropdown-grid-container {
|
|
@@ -19,7 +31,7 @@
|
|
|
19
31
|
grid-template-columns: auto 1fr auto auto;
|
|
20
32
|
}
|
|
21
33
|
|
|
22
|
-
.dash-dropdown
|
|
34
|
+
.dash-dropdown,
|
|
23
35
|
.dash-dropdown-content {
|
|
24
36
|
border-radius: var(--Dash-Spacing);
|
|
25
37
|
border: 1px solid var(--Dash-Stroke-Strong);
|
|
@@ -28,17 +40,16 @@
|
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
.dash-dropdown-trigger {
|
|
31
|
-
|
|
32
|
-
padding: 6px 12px;
|
|
33
|
-
width: 100%;
|
|
43
|
+
padding: 0 12px;
|
|
34
44
|
min-height: 32px;
|
|
35
45
|
height: 100%;
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
font-size: inherit;
|
|
38
|
-
overflow: hidden;
|
|
39
46
|
}
|
|
40
47
|
|
|
41
|
-
.dash-dropdown
|
|
48
|
+
.dash-dropdown:focus {
|
|
49
|
+
outline: 1px solid var(--Dash-Fill-Interactive-Strong);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dash-dropdown:disabled {
|
|
42
53
|
opacity: 0.6;
|
|
43
54
|
cursor: not-allowed;
|
|
44
55
|
}
|
|
@@ -61,12 +72,13 @@
|
|
|
61
72
|
|
|
62
73
|
.dash-dropdown-content {
|
|
63
74
|
background: var(--Dash-Fill-Inverse-Strong);
|
|
64
|
-
|
|
65
|
-
width: var(--radix-popover-trigger-width);
|
|
75
|
+
width: fit-content;
|
|
76
|
+
min-width: var(--radix-popover-trigger-width);
|
|
77
|
+
max-width: 98vw;
|
|
66
78
|
overflow-y: auto;
|
|
67
|
-
z-index:
|
|
68
|
-
box-shadow: 0px 10px 38px -10px
|
|
69
|
-
0px 10px 20px -15px
|
|
79
|
+
z-index: 500;
|
|
80
|
+
box-shadow: 0px 10px 38px -10px var(--Dash-Shading-Strong),
|
|
81
|
+
0px 10px 20px -15px var(--Dash-Shading-Weak);
|
|
70
82
|
}
|
|
71
83
|
|
|
72
84
|
.dash-dropdown-value-count,
|
|
@@ -92,6 +104,8 @@
|
|
|
92
104
|
}
|
|
93
105
|
|
|
94
106
|
.dash-dropdown-search-container {
|
|
107
|
+
position: sticky;
|
|
108
|
+
top: calc(var(--Dash-Spacing) * 2);
|
|
95
109
|
margin: calc(var(--Dash-Spacing) * 2);
|
|
96
110
|
padding: var(--Dash-Spacing);
|
|
97
111
|
border-radius: 4px;
|
|
@@ -175,6 +189,8 @@
|
|
|
175
189
|
text-decoration: none;
|
|
176
190
|
color: var(--Dash-Text-Disabled);
|
|
177
191
|
white-space: nowrap;
|
|
192
|
+
accent-color: var(--Dash-Fill-Interactive-Strong);
|
|
193
|
+
outline-color: var(--Dash-Fill-Interactive-Strong);
|
|
178
194
|
}
|
|
179
195
|
|
|
180
196
|
.dash-dropdown-action-button:hover {
|
|
@@ -190,41 +206,6 @@
|
|
|
190
206
|
}
|
|
191
207
|
|
|
192
208
|
.dash-dropdown-option {
|
|
193
|
-
padding: var(--Dash-Spacing) calc(var(--Dash-Spacing) * 3);
|
|
194
|
-
background: var(--Dash-Fill-Inverse-strong);
|
|
209
|
+
padding: calc(var(--Dash-Spacing) * 2) calc(var(--Dash-Spacing) * 3);
|
|
195
210
|
box-shadow: 0 -1px 0 0 var(--Dash-Fill-Disabled) inset;
|
|
196
|
-
color: var(--Dash-Text-Strong);
|
|
197
|
-
cursor: pointer;
|
|
198
|
-
display: flex;
|
|
199
|
-
align-items: center;
|
|
200
|
-
user-select: none;
|
|
201
|
-
overflow: hidden;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.dash-dropdown-option:not(:has(input[disabled])):hover,
|
|
205
|
-
.dash-dropdown-option:not(:has(input[disabled])):focus-within {
|
|
206
|
-
color: var(--Dash-Fill-Interactive-Strong);
|
|
207
|
-
background: var(--Dash-Fill-Interactive-Weak);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.dash-dropdown-option:has(input[disabled]) {
|
|
211
|
-
color: var(--Dash-Text-Disabled);
|
|
212
|
-
cursor: not-allowed;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.dash-dropdown-option-text {
|
|
216
|
-
white-space: pre;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.dash-dropdown-option-checkbox {
|
|
220
|
-
display: inline-block;
|
|
221
|
-
margin: 0 calc(var(--Dash-Spacing) * 2) 0 0;
|
|
222
|
-
box-sizing: border-box;
|
|
223
|
-
border: 1px solid var(--Dash-Stroke-Strong);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.dash-dropdown-option-checkbox:hover,
|
|
227
|
-
.dash-dropdown-option-checkbox:focus,
|
|
228
|
-
.dash-dropdown-option-checkbox:checked {
|
|
229
|
-
accent-color: var(--Dash-Fill-Interactive-Strong);
|
|
230
211
|
}
|
|
@@ -15,6 +15,19 @@
|
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
.dash-input-container:focus-within {
|
|
19
|
+
outline: 1px solid var(--Dash-Fill-Interactive-Strong);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dash-input-container:has(.dash-input-element:disabled) {
|
|
23
|
+
opacity: 0.6;
|
|
24
|
+
cursor: not-allowed;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dash-input-container input:focus {
|
|
28
|
+
outline: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
18
31
|
.dash-input-container:has(input[type='range']) {
|
|
19
32
|
background: inherit;
|
|
20
33
|
}
|
|
@@ -32,11 +45,17 @@
|
|
|
32
45
|
box-sizing: border-box;
|
|
33
46
|
z-index: 1;
|
|
34
47
|
order: 2;
|
|
48
|
+
accent-color: var(--Dash-Fill-Interactive-Strong);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dash-input-element:disabled {
|
|
52
|
+
cursor: not-allowed;
|
|
35
53
|
}
|
|
36
54
|
|
|
37
55
|
/* Hide native steppers for number inputs */
|
|
38
56
|
.dash-input-element[type='number'] {
|
|
39
57
|
-moz-appearance: textfield;
|
|
58
|
+
border-radius: 0;
|
|
40
59
|
}
|
|
41
60
|
|
|
42
61
|
.dash-input-element[type='number']::-webkit-outer-spin-button,
|
|
@@ -70,10 +89,11 @@
|
|
|
70
89
|
cursor: pointer;
|
|
71
90
|
font-size: 16px;
|
|
72
91
|
font-weight: bold;
|
|
73
|
-
color: var(--Dash-Text-Primary);
|
|
92
|
+
color: var(--Dash -Text-Primary);
|
|
74
93
|
}
|
|
75
94
|
|
|
76
|
-
.dash-input-stepper:hover
|
|
95
|
+
.dash-input-stepper:hover,
|
|
96
|
+
.dash-input-stepper:focus {
|
|
77
97
|
background: var(--Dash-Fill-Primary-Hover);
|
|
78
98
|
}
|
|
79
99
|
|
|
@@ -115,7 +135,3 @@
|
|
|
115
135
|
input.dash-input-element:invalid {
|
|
116
136
|
outline: solid red;
|
|
117
137
|
}
|
|
118
|
-
|
|
119
|
-
input.dash-input-element:valid {
|
|
120
|
-
outline: none black;
|
|
121
|
-
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.dash-options-list-option {
|
|
2
|
+
padding: var(--Dash-Spacing) 0;
|
|
3
|
+
background: var(--Dash-Fill-Inverse-strong);
|
|
4
|
+
color: var(--Dash-Text-Strong);
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
user-select: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dash-options-list-option:not(:has(input[disabled])):hover,
|
|
12
|
+
.dash-options-list-option:not(:has(input[disabled])):focus-within {
|
|
13
|
+
color: var(--Dash-Fill-Interactive-Strong);
|
|
14
|
+
background: var(--Dash-Fill-Interactive-Weak);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dash-options-list-option:has(input[disabled]) {
|
|
18
|
+
color: var(--Dash-Text-Disabled);
|
|
19
|
+
cursor: not-allowed;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dash-options-list-option-text {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dash-options-list-option-checkbox {
|
|
28
|
+
display: inline-block;
|
|
29
|
+
margin: 0 calc(var(--Dash-Spacing) * 2) 0 0;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
border: 1px solid var(--Dash-Stroke-Strong);
|
|
32
|
+
accent-color: var(--Dash-Fill-Interactive-Strong);
|
|
33
|
+
outline-color: var(--Dash-Fill-Interactive-Strong);
|
|
34
|
+
}
|
|
@@ -7,12 +7,16 @@
|
|
|
7
7
|
touch-action: none;
|
|
8
8
|
width: 100%;
|
|
9
9
|
height: 14px;
|
|
10
|
-
padding:
|
|
10
|
+
padding: 18px 0 18px 0;
|
|
11
11
|
box-sizing: border-box;
|
|
12
12
|
/* Override Radix's default margin/padding behavior */
|
|
13
13
|
--radix-slider-thumb-width: 16px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.dash-slider-root.has-marks {
|
|
17
|
+
padding: 8px 0 28px 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
.dash-slider-root[data-orientation='vertical'].has-marks {
|
|
17
21
|
padding-bottom: 0px;
|
|
18
22
|
}
|
|
@@ -58,7 +62,7 @@
|
|
|
58
62
|
background-color: var(--Dash-Fill-Interactive-Strong);
|
|
59
63
|
border: 2px solid var(--Dash-Fill-Inverse-Strong);
|
|
60
64
|
border-radius: 50%;
|
|
61
|
-
box-shadow: 0 1px 3px 0
|
|
65
|
+
box-shadow: 0 1px 3px 0 var(--Dash-Shading-Weak);
|
|
62
66
|
cursor: pointer;
|
|
63
67
|
outline: none;
|
|
64
68
|
transition: all 0.15s ease-in-out;
|
|
@@ -67,7 +71,7 @@
|
|
|
67
71
|
.dash-slider-thumb:focus,
|
|
68
72
|
.dash-slider-thumb:hover {
|
|
69
73
|
transform: scale(1.125); /* Scale to make 16px thumb appear as 18px */
|
|
70
|
-
box-shadow: 0 4px 6px -1px
|
|
74
|
+
box-shadow: 0 4px 6px -1px var(--Dash-Shading-Weak);
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
.dash-slider-thumb:focus .dash-slider-tooltip,
|
|
@@ -125,7 +129,7 @@
|
|
|
125
129
|
padding: calc(var(--Dash-Spacing) * 3);
|
|
126
130
|
font-size: 12px;
|
|
127
131
|
line-height: 1;
|
|
128
|
-
box-shadow: 0 0 8px
|
|
132
|
+
box-shadow: 0 0 8px var(--Dash-Shading-Strong);
|
|
129
133
|
background-color: var(--Dash-Fill-Inverse-Strong);
|
|
130
134
|
user-select: none;
|
|
131
135
|
z-index: 1000;
|
|
@@ -167,7 +171,7 @@
|
|
|
167
171
|
.dash-slider-container {
|
|
168
172
|
display: flex;
|
|
169
173
|
align-items: center;
|
|
170
|
-
gap:
|
|
174
|
+
gap: 16px;
|
|
171
175
|
width: 100%;
|
|
172
176
|
}
|
|
173
177
|
|
|
@@ -184,7 +188,7 @@
|
|
|
184
188
|
}
|
|
185
189
|
|
|
186
190
|
.dash-range-slider-min-input {
|
|
187
|
-
|
|
191
|
+
text-align: center;
|
|
188
192
|
}
|
|
189
193
|
|
|
190
194
|
.dash-range-slider-max-input {
|
|
@@ -193,7 +197,7 @@
|
|
|
193
197
|
|
|
194
198
|
.dash-range-slider-input {
|
|
195
199
|
width: 64px;
|
|
196
|
-
|
|
200
|
+
text-align: center;
|
|
197
201
|
-webkit-appearance: textfield;
|
|
198
202
|
-moz-appearance: textfield;
|
|
199
203
|
appearance: textfield;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* Input container styles */
|
|
2
|
+
.dash-textarea {
|
|
3
|
+
background: var(--Dash-Fill-Inverse-Strong);
|
|
4
|
+
border-radius: var(--Dash-Spacing);
|
|
5
|
+
border: 1px solid var(--Dash-Stroke-Strong);
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
color: inherit;
|
|
8
|
+
padding: var(--Dash-Spacing) calc(2 * var(--Dash-Spacing));
|
|
9
|
+
width: 100%;
|
|
10
|
+
accent-color: var(--Dash-Fill-Interactive-Strong);
|
|
11
|
+
outline-color: var(--Dash-Fill-Interactive-Strong);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.dash-textarea:disabled {
|
|
15
|
+
opacity: 0.6;
|
|
16
|
+
cursor: not-allowed;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.dash-textarea:invalid {
|
|
20
|
+
outline: solid red;
|
|
21
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
.dash-tooltip {
|
|
2
|
+
position: absolute;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.hover {
|
|
6
|
+
position: absolute;
|
|
7
|
+
}
|
|
8
|
+
.hover-right {
|
|
9
|
+
/* Offset so that the triangle caret lands directly on what's hovered */
|
|
10
|
+
transform: translate(5px, 0);
|
|
11
|
+
top: 50%;
|
|
12
|
+
left: 100%;
|
|
13
|
+
}
|
|
14
|
+
.hover-left {
|
|
15
|
+
transform: translate(-5px, 0);
|
|
16
|
+
top: 50%;
|
|
17
|
+
}
|
|
18
|
+
.hover-bottom {
|
|
19
|
+
transform: translate(0, 6px);
|
|
20
|
+
top: 100%;
|
|
21
|
+
left: 50%;
|
|
22
|
+
}
|
|
23
|
+
.hover-top {
|
|
24
|
+
transform: translate(0, -5px);
|
|
25
|
+
left: 50%;
|
|
26
|
+
}
|
|
27
|
+
.hover-content {
|
|
28
|
+
position: absolute;
|
|
29
|
+
border: 1px solid var(--Dash-Tooltip-Border-Color);
|
|
30
|
+
border-radius: 2px;
|
|
31
|
+
padding: 5px 10px;
|
|
32
|
+
background: var(--Dash-Tooltip-Background-Color);
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
z-index: var(--Dash-Tooltip-ZIndex);
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
box-shadow: 0px 10px 38px -10px var(--Dash-Shading-Strong),
|
|
37
|
+
0px 10px 20px -15px var(--Dash-Shading-Weak);
|
|
38
|
+
}
|
|
39
|
+
.hover .hover-content,
|
|
40
|
+
.hover-right .hover-content {
|
|
41
|
+
transform: translate(0, -50%);
|
|
42
|
+
}
|
|
43
|
+
.hover-left .hover-content {
|
|
44
|
+
transform: translate(-100%, -50%);
|
|
45
|
+
}
|
|
46
|
+
.hover-top .hover-content {
|
|
47
|
+
transform: translate(-50%, -100%);
|
|
48
|
+
}
|
|
49
|
+
.hover-bottom .hover-content {
|
|
50
|
+
transform: translate(-50%, 0);
|
|
51
|
+
}
|
|
52
|
+
/* Add a small triangle on the left side of the box */
|
|
53
|
+
.hover:before,
|
|
54
|
+
.hover:after {
|
|
55
|
+
content: '';
|
|
56
|
+
width: 0;
|
|
57
|
+
height: 0;
|
|
58
|
+
position: absolute;
|
|
59
|
+
border-style: solid;
|
|
60
|
+
top: -6px;
|
|
61
|
+
z-index: var(--Dash-Tooltip-ZIndex);
|
|
62
|
+
}
|
|
63
|
+
.hover:before,
|
|
64
|
+
.hover:after,
|
|
65
|
+
.hover-right:before,
|
|
66
|
+
.hover-right:after {
|
|
67
|
+
border-width: 6px 6px 6px 0;
|
|
68
|
+
}
|
|
69
|
+
.hover-top:before,
|
|
70
|
+
.hover-top:after {
|
|
71
|
+
border-width: 6px 6px 0 6px;
|
|
72
|
+
}
|
|
73
|
+
.hover-bottom:before,
|
|
74
|
+
.hover-bottom:after {
|
|
75
|
+
border-width: 0 6px 6px 6px;
|
|
76
|
+
}
|
|
77
|
+
.hover-left:before,
|
|
78
|
+
.hover-left:after {
|
|
79
|
+
border-width: 6px 0 6px 6px;
|
|
80
|
+
}
|
|
81
|
+
.hover:before,
|
|
82
|
+
.hover-right:before {
|
|
83
|
+
border-color: transparent var(--Dash-Tooltip-Border-Color) transparent
|
|
84
|
+
transparent;
|
|
85
|
+
left: -5px;
|
|
86
|
+
}
|
|
87
|
+
.hover:after,
|
|
88
|
+
.hover-right:after {
|
|
89
|
+
border-color: transparent var(--Dash-Tooltip-Background-Color) transparent
|
|
90
|
+
transparent;
|
|
91
|
+
left: -4px;
|
|
92
|
+
}
|
|
93
|
+
.hover-left:before {
|
|
94
|
+
border-color: transparent transparent transparent
|
|
95
|
+
var(--Dash-Tooltip-Border-Color);
|
|
96
|
+
left: -1px;
|
|
97
|
+
}
|
|
98
|
+
.hover-left:after {
|
|
99
|
+
border-color: transparent transparent transparent
|
|
100
|
+
var(--Dash-Tooltip-Background-Color);
|
|
101
|
+
left: -2px;
|
|
102
|
+
}
|
|
103
|
+
.hover-top:before,
|
|
104
|
+
.hover-top:after,
|
|
105
|
+
.hover-bottom:before,
|
|
106
|
+
.hover-bottom:after {
|
|
107
|
+
left: -6px;
|
|
108
|
+
}
|
|
109
|
+
.hover-bottom:before {
|
|
110
|
+
border-color: transparent transparent var(--Dash-Tooltip-Border-Color)
|
|
111
|
+
transparent;
|
|
112
|
+
}
|
|
113
|
+
.hover-bottom:after {
|
|
114
|
+
border-color: transparent transparent var(--Dash-Tooltip-Background-Color)
|
|
115
|
+
transparent;
|
|
116
|
+
top: -5px;
|
|
117
|
+
}
|
|
118
|
+
.hover-top:before {
|
|
119
|
+
border-color: var(--Dash-Tooltip-Border-Color) transparent transparent
|
|
120
|
+
transparent;
|
|
121
|
+
top: -1px;
|
|
122
|
+
}
|
|
123
|
+
.hover-top:after {
|
|
124
|
+
border-color: var(--Dash-Tooltip-Border-Color) transparent transparent
|
|
125
|
+
transparent;
|
|
126
|
+
top: -2px;
|
|
127
|
+
}
|