dash-core-components 4.0.0-rc1 → 4.0.0-rc3
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-datepicker.js +1 -1
- package/dash_core_components/async-datepicker.js.map +1 -1
- package/dash_core_components/async-dropdown.js +1 -2
- package/dash_core_components/async-dropdown.js.map +1 -1
- package/dash_core_components/async-graph.js +1 -1
- package/dash_core_components/async-graph.js.map +1 -1
- package/dash_core_components/async-highlight.js +1 -1
- package/dash_core_components/async-highlight.js.map +1 -1
- package/dash_core_components/async-markdown.js +1 -1
- package/dash_core_components/async-markdown.js.map +1 -1
- package/dash_core_components/async-mathjax.js +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/async-upload.js +1 -1
- package/dash_core_components/async-upload.js.map +1 -1
- package/dash_core_components/dash_core_components-shared.js +1 -1
- package/dash_core_components/dash_core_components-shared.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 +209 -6
- package/lib/components/Checklist.tsx +67 -0
- package/lib/components/Clipboard.react.js +1 -1
- package/lib/components/DatePickerRange.tsx +70 -0
- package/lib/components/DatePickerSingle.tsx +72 -0
- package/lib/components/Dropdown.tsx +19 -3
- package/lib/components/Input.tsx +1 -1
- 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.tsx +19 -0
- package/lib/components/Tabs.tsx +311 -0
- package/lib/components/Textarea.tsx +79 -0
- package/lib/components/Tooltip.tsx +66 -0
- package/lib/components/css/calendar.css +66 -0
- package/lib/components/css/checklist.css +4 -0
- package/lib/components/css/datepickers.css +233 -0
- package/lib/components/css/dcc.css +3 -0
- package/lib/components/css/dropdown.css +34 -50
- package/lib/components/css/input.css +29 -7
- package/lib/components/css/optionslist.css +34 -0
- package/lib/components/css/radioitems.css +4 -0
- package/lib/components/css/sliders.css +33 -7
- package/lib/components/css/tabs.css +113 -0
- package/lib/components/css/textarea.css +21 -0
- package/lib/components/css/tooltip.css +127 -0
- package/lib/fragments/DatePickerRange.tsx +444 -0
- package/lib/fragments/DatePickerSingle.tsx +249 -0
- package/lib/fragments/Dropdown.tsx +212 -272
- package/lib/fragments/Graph.react.js +18 -45
- 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 +195 -63
- package/lib/index.ts +9 -11
- package/lib/types.ts +797 -132
- package/lib/utils/DatePickerPersistence.ts +14 -0
- package/lib/utils/LazyLoader/datePickerRange.ts +4 -0
- package/lib/utils/LazyLoader/datePickerSingle.ts +4 -0
- package/lib/utils/calendar/Calendar.tsx +382 -0
- package/lib/utils/calendar/CalendarDay.tsx +75 -0
- package/lib/utils/calendar/CalendarDayPadding.tsx +15 -0
- package/lib/utils/calendar/CalendarMonth.tsx +247 -0
- package/lib/utils/calendar/CalendarMonthHeader.tsx +23 -0
- package/lib/utils/calendar/createMonthGrid.ts +28 -0
- package/lib/utils/calendar/helpers.ts +272 -0
- package/lib/utils/computeSliderMarkers.ts +71 -116
- package/lib/utils/dropdownSearch.ts +4 -4
- package/lib/utils/optionRendering.tsx +175 -0
- package/lib/utils/optionTypes.ts +5 -5
- package/lib/utils/sliderRendering.tsx +63 -6
- package/package.json +16 -14
- package/lib/components/Checklist.react.js +0 -193
- package/lib/components/DatePickerRange.react.js +0 -244
- package/lib/components/DatePickerSingle.react.js +0 -209
- package/lib/components/Dropdown.react.js.old +0 -228
- 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/Tab.react.js +0 -80
- package/lib/components/Tabs.react.js +0 -295
- package/lib/components/Textarea.react.js +0 -223
- package/lib/components/Textarea.react.js.old +0 -287
- package/lib/components/Tooltip.react.js +0 -120
- package/lib/components/css/Dropdown.css +0 -8
- package/lib/fragments/DatePickerRange.react.js +0 -188
- package/lib/fragments/DatePickerSingle.react.js +0 -132
- 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
- package/lib/utils/DatePickerPersistence.js +0 -18
- package/lib/utils/LazyLoader/datePickerRange.js +0 -8
- package/lib/utils/LazyLoader/datePickerSingle.js +0 -8
- package/lib/utils/convertToMoment.js +0 -30
- package/lib/utils/optionTypes.js +0 -39
|
@@ -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;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
.dash-datepicker-calendar {
|
|
2
|
+
padding: 0;
|
|
3
|
+
border-collapse: collapse;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.dash-datepicker-calendar th > *,
|
|
7
|
+
.dash-datepicker-calendar td > * {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dash-datepicker-calendar th,
|
|
14
|
+
.dash-datepicker-calendar td {
|
|
15
|
+
padding: 0;
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
color: var(--Dash-Text-Weak);
|
|
18
|
+
text-align: center;
|
|
19
|
+
border-radius: 4px;
|
|
20
|
+
cursor: default;
|
|
21
|
+
user-select: none;
|
|
22
|
+
-webkit-user-select: none;
|
|
23
|
+
-moz-user-select: none;
|
|
24
|
+
width: var(--day-size, 36px);
|
|
25
|
+
height: var(--day-size, 36px);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.dash-datepicker-calendar td.dash-datepicker-calendar-date-inside {
|
|
29
|
+
color: var(--Dash-Text-Strong);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dash-datepicker-calendar td:hover {
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
background-color: var(--Dash-Fill-Weak);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dash-datepicker-calendar td:focus {
|
|
38
|
+
outline: 2px solid var(--Dash-Fill-Interactive-Strong);
|
|
39
|
+
outline-offset: -2px;
|
|
40
|
+
z-index: 1;
|
|
41
|
+
position: relative;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dash-datepicker-calendar td.dash-datepicker-calendar-date-highlighted {
|
|
45
|
+
background-color: color-mix(
|
|
46
|
+
in srgb,
|
|
47
|
+
var(--Dash-Fill-Interactive-Strong) 5%,
|
|
48
|
+
transparent 95%
|
|
49
|
+
);
|
|
50
|
+
color: var(--Dash-Fill-Interactive-Strong);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dash-datepicker-calendar td.dash-datepicker-calendar-date-selected {
|
|
54
|
+
background-color: var(--Dash-Fill-Interactive-Strong);
|
|
55
|
+
color: var(--Dash-Fill-Inverse-Strong);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.dash-datepicker-calendar td.dash-datepicker-calendar-date-disabled {
|
|
59
|
+
opacity: 0.6;
|
|
60
|
+
cursor: not-allowed;
|
|
61
|
+
pointer-events: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.dash-datepicker-calendar td input {
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
.dash-datepicker {
|
|
2
|
+
display: block;
|
|
3
|
+
flex: 1;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
background: var(--Dash-Fill-Inverse-Strong);
|
|
6
|
+
padding: 0;
|
|
7
|
+
border: none;
|
|
8
|
+
outline: none;
|
|
9
|
+
width: 100%;
|
|
10
|
+
font-size: inherit;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
accent-color: var(--Dash-Fill-Interactive-Strong);
|
|
13
|
+
outline-color: var(--Dash-Fill-Interactive-Strong);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dash-datepicker-input-wrapper {
|
|
17
|
+
display: grid;
|
|
18
|
+
grid-template-columns: auto 1fr;
|
|
19
|
+
justify-items: start;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: calc(var(--Dash-Spacing) * 2);
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
padding: 0 calc(var(--Dash-Spacing) * 2);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dash-datepicker-input-wrapper:has(:nth-child(3)) {
|
|
27
|
+
grid-template-columns: auto 1fr auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.dash-datepicker-input-wrapper:has(:nth-child(4)) {
|
|
31
|
+
grid-template-columns: auto 1fr auto auto;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.dash-datepicker-input-wrapper:has(:nth-child(5)) {
|
|
35
|
+
grid-template-columns: auto auto auto 1fr auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dash-datepicker-input-wrapper:has(:nth-child(6)) {
|
|
39
|
+
grid-template-columns: auto auto auto 1fr auto auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.dash-datepicker-input-wrapper,
|
|
43
|
+
.dash-datepicker-content {
|
|
44
|
+
border-radius: var(--Dash-Spacing);
|
|
45
|
+
border: 1px solid var(--Dash-Stroke-Strong);
|
|
46
|
+
color: inherit;
|
|
47
|
+
text-align: left;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.dash-datepicker-input {
|
|
51
|
+
height: 32px;
|
|
52
|
+
width: fit-content;
|
|
53
|
+
border: none;
|
|
54
|
+
outline: none;
|
|
55
|
+
border-radius: 4px;
|
|
56
|
+
padding: 0;
|
|
57
|
+
background-color: inherit;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.dash-datepicker-input::selection,
|
|
61
|
+
.dash-datepicker-input::-webkit-selection {
|
|
62
|
+
color: var(--Dash-Fill-Inverse-Strong);
|
|
63
|
+
background: var(--Dash-Fill-Interactive-Strong);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.dash-datepicker-input-wrapper:focus-within {
|
|
67
|
+
border: 1px solid var(--Dash-Fill-Interactive-Strong);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.dash-datepicker-input-wrapper-disabled {
|
|
71
|
+
opacity: 0.6;
|
|
72
|
+
cursor: not-allowed;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dash-datepicker-input-wrapper-disabled .dash-datepicker-input {
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.dash-datepicker-input:focus {
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dash-datepicker-input::placeholder {
|
|
84
|
+
color: var(--Dash-Text-Disabled);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.dash-datepicker-trigger-button {
|
|
88
|
+
padding: var(--Dash-Spacing);
|
|
89
|
+
background: transparent;
|
|
90
|
+
border: none;
|
|
91
|
+
border-radius: 4px;
|
|
92
|
+
color: var(--Dash-Text-Strong);
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.dash-datepicker-trigger-button:hover {
|
|
97
|
+
background: var(--Dash-Fill-Weak);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.dash-datepicker-trigger-button:focus-visible {
|
|
101
|
+
outline: 2px solid var(--Dash-Fill-Interactive-Strong);
|
|
102
|
+
outline-offset: 2px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.dash-datepicker-trigger-button[aria-expanded='true'] {
|
|
106
|
+
background: var(--Dash-Fill-Weak);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.dash-datepicker-trigger-icon {
|
|
110
|
+
width: 16px;
|
|
111
|
+
height: 16px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.dash-datepicker-caret-icon {
|
|
115
|
+
color: var(--Dash-Text-Strong);
|
|
116
|
+
fill: var(--Dash-Text-Strong);
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
justify-self: end;
|
|
119
|
+
transition: transform 0.15s;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.dash-datepicker-input-wrapper[aria-expanded='true']
|
|
123
|
+
.dash-datepicker-caret-icon {
|
|
124
|
+
transform: rotate(180deg);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dash-datepicker-clear {
|
|
128
|
+
background: none;
|
|
129
|
+
border: none;
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
padding: 0;
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
justify-self: end;
|
|
136
|
+
color: var(--Dash-Text-Strong);
|
|
137
|
+
width: calc(var(--Dash-Spacing) * 3);
|
|
138
|
+
height: calc(var(--Dash-Spacing) * 3);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.dash-datepicker-clear:hover {
|
|
142
|
+
color: var(--Dash-Fill-Interactive-Strong);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.dash-datepicker-clear:focus {
|
|
146
|
+
outline: 2px solid var(--Dash-Fill-Interactive-Strong);
|
|
147
|
+
outline-offset: 1px;
|
|
148
|
+
border-radius: 2px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.dash-datepicker-content {
|
|
152
|
+
padding: 8px;
|
|
153
|
+
background: var(--Dash-Fill-Inverse-Strong);
|
|
154
|
+
width: fit-content;
|
|
155
|
+
max-width: 98vw;
|
|
156
|
+
overflow-y: auto;
|
|
157
|
+
z-index: 500;
|
|
158
|
+
box-shadow: 0px 10px 38px -10px var(--Dash-Shading-Strong),
|
|
159
|
+
0px 10px 20px -15px var(--Dash-Shading-Weak);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.dash-datepicker-calendar-wrapper {
|
|
163
|
+
display: flex;
|
|
164
|
+
flex-direction: column;
|
|
165
|
+
align-items: center;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.dash-datepicker-calendar-container {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: flex-start;
|
|
171
|
+
gap: calc(var(--Dash-Spacing) * 4);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.dash-datepicker-controls {
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
gap: var(--Dash-Spacing);
|
|
179
|
+
margin-bottom: calc(var(--Dash-Spacing) * 2);
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.dash-datepicker-controls .dash-dropdown {
|
|
184
|
+
flex: 0 0 auto;
|
|
185
|
+
min-width: 122px;
|
|
186
|
+
width: auto;
|
|
187
|
+
margin: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.dash-datepicker-controls .dash-input {
|
|
191
|
+
flex-shrink: 0;
|
|
192
|
+
flex-grow: 0;
|
|
193
|
+
width: 102px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.dash-datepicker-controls .dash-input-stepper {
|
|
197
|
+
width: 20px;
|
|
198
|
+
height: 100%;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.dash-datepicker-month-nav {
|
|
202
|
+
display: flex;
|
|
203
|
+
align-items: center;
|
|
204
|
+
justify-content: center;
|
|
205
|
+
width: 20px;
|
|
206
|
+
height: 32px;
|
|
207
|
+
padding: 0;
|
|
208
|
+
background: transparent;
|
|
209
|
+
border: none;
|
|
210
|
+
border-radius: 4px;
|
|
211
|
+
color: var(--Dash-Fill-Interactive-Strong);
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
flex-shrink: 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.dash-datepicker-month-nav:hover:not(:disabled) {
|
|
217
|
+
background: var(--Dash-Fill-Weak);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.dash-datepicker-month-nav:focus-visible {
|
|
221
|
+
outline: 2px solid var(--Dash-Fill-Interactive-Strong);
|
|
222
|
+
outline-offset: 2px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.dash-datepicker-month-nav:disabled {
|
|
226
|
+
color: var(--Dash-Text-Disabled);
|
|
227
|
+
cursor: not-allowed;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.dash-datepicker-month-nav svg {
|
|
231
|
+
width: 20px;
|
|
232
|
+
height: 20px;
|
|
233
|
+
}
|
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
--Dash-Fill-Inverse-Strong: #fff;
|
|
8
8
|
--Dash-Text-Primary: rgba(0, 18, 77, 0.87);
|
|
9
9
|
--Dash-Text-Strong: rgba(0, 9, 38, 0.9);
|
|
10
|
+
--Dash-Text-Weak: rgba(0, 12, 51, 0.65);
|
|
10
11
|
--Dash-Text-Disabled: rgba(0, 21, 89, 0.3);
|
|
11
12
|
--Dash-Fill-Primary-Hover: rgba(0, 18, 77, 0.04);
|
|
12
13
|
--Dash-Fill-Primary-Active: rgba(0, 18, 77, 0.08);
|
|
13
14
|
--Dash-Fill-Disabled: rgba(0, 24, 102, 0.1);
|
|
15
|
+
--Dash-Shading-Strong: rgba(22, 23, 24, 0.35);
|
|
16
|
+
--Dash-Shading-Weak: rgba(22, 23, 24, 0.2);
|
|
14
17
|
}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
.dash-dropdown {
|
|
2
|
+
display: block;
|
|
3
|
+
flex: 1;
|
|
2
4
|
box-sizing: border-box;
|
|
3
|
-
|
|
5
|
+
padding: 0;
|
|
6
|
+
background: var(--Dash-Fill-Inverse-Strong);
|
|
7
|
+
border: none;
|
|
8
|
+
outline: none;
|
|
9
|
+
width: 100%;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
font-size: inherit;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
accent-color: var(--Dash-Fill-Interactive-Strong);
|
|
14
|
+
outline-color: var(--Dash-Fill-Interactive-Strong);
|
|
4
15
|
}
|
|
5
16
|
|
|
6
17
|
.dash-dropdown-grid-container {
|
|
@@ -19,7 +30,7 @@
|
|
|
19
30
|
grid-template-columns: auto 1fr auto auto;
|
|
20
31
|
}
|
|
21
32
|
|
|
22
|
-
.dash-dropdown
|
|
33
|
+
.dash-dropdown,
|
|
23
34
|
.dash-dropdown-content {
|
|
24
35
|
border-radius: var(--Dash-Spacing);
|
|
25
36
|
border: 1px solid var(--Dash-Stroke-Strong);
|
|
@@ -28,17 +39,16 @@
|
|
|
28
39
|
}
|
|
29
40
|
|
|
30
41
|
.dash-dropdown-trigger {
|
|
31
|
-
|
|
32
|
-
padding: 6px 12px;
|
|
33
|
-
width: 100%;
|
|
42
|
+
padding: 0 12px;
|
|
34
43
|
min-height: 32px;
|
|
35
44
|
height: 100%;
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
font-size: inherit;
|
|
38
|
-
overflow: hidden;
|
|
39
45
|
}
|
|
40
46
|
|
|
41
|
-
.dash-dropdown
|
|
47
|
+
.dash-dropdown:focus {
|
|
48
|
+
border: 1px solid var(--Dash-Fill-Interactive-Strong);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dash-dropdown:disabled {
|
|
42
52
|
opacity: 0.6;
|
|
43
53
|
cursor: not-allowed;
|
|
44
54
|
}
|
|
@@ -59,14 +69,19 @@
|
|
|
59
69
|
display: inline;
|
|
60
70
|
}
|
|
61
71
|
|
|
72
|
+
.dash-dropdown-value-item:not(:first-child)::before {
|
|
73
|
+
content: ', ';
|
|
74
|
+
}
|
|
75
|
+
|
|
62
76
|
.dash-dropdown-content {
|
|
63
77
|
background: var(--Dash-Fill-Inverse-Strong);
|
|
64
|
-
|
|
65
|
-
width: var(--radix-popover-trigger-width);
|
|
78
|
+
width: fit-content;
|
|
79
|
+
min-width: var(--radix-popover-trigger-width);
|
|
80
|
+
max-width: 98vw;
|
|
66
81
|
overflow-y: auto;
|
|
67
|
-
z-index:
|
|
68
|
-
box-shadow: 0px 10px 38px -10px
|
|
69
|
-
0px 10px 20px -15px
|
|
82
|
+
z-index: 500;
|
|
83
|
+
box-shadow: 0px 10px 38px -10px var(--Dash-Shading-Strong),
|
|
84
|
+
0px 10px 20px -15px var(--Dash-Shading-Weak);
|
|
70
85
|
}
|
|
71
86
|
|
|
72
87
|
.dash-dropdown-value-count,
|
|
@@ -92,6 +107,8 @@
|
|
|
92
107
|
}
|
|
93
108
|
|
|
94
109
|
.dash-dropdown-search-container {
|
|
110
|
+
position: sticky;
|
|
111
|
+
top: calc(var(--Dash-Spacing) * 2);
|
|
95
112
|
margin: calc(var(--Dash-Spacing) * 2);
|
|
96
113
|
padding: var(--Dash-Spacing);
|
|
97
114
|
border-radius: 4px;
|
|
@@ -175,6 +192,8 @@
|
|
|
175
192
|
text-decoration: none;
|
|
176
193
|
color: var(--Dash-Text-Disabled);
|
|
177
194
|
white-space: nowrap;
|
|
195
|
+
accent-color: var(--Dash-Fill-Interactive-Strong);
|
|
196
|
+
outline-color: var(--Dash-Fill-Interactive-Strong);
|
|
178
197
|
}
|
|
179
198
|
|
|
180
199
|
.dash-dropdown-action-button:hover {
|
|
@@ -190,41 +209,6 @@
|
|
|
190
209
|
}
|
|
191
210
|
|
|
192
211
|
.dash-dropdown-option {
|
|
193
|
-
padding: var(--Dash-Spacing) calc(var(--Dash-Spacing) * 3);
|
|
194
|
-
background: var(--Dash-Fill-Inverse-strong);
|
|
212
|
+
padding: calc(var(--Dash-Spacing) * 2) calc(var(--Dash-Spacing) * 3);
|
|
195
213
|
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
214
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
display: inline-flex;
|
|
5
5
|
align-items: center;
|
|
6
6
|
width: 170px; /* default input width */
|
|
7
|
-
height:
|
|
7
|
+
height: 34px;
|
|
8
8
|
background: var(--Dash-Fill-Inverse-Strong);
|
|
9
9
|
border-radius: var(--Dash-Spacing);
|
|
10
10
|
border: 1px solid var(--Dash-Stroke-Strong);
|
|
@@ -15,6 +15,19 @@
|
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
.dash-input-container:focus-within {
|
|
19
|
+
border: 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,23 @@
|
|
|
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::selection,
|
|
52
|
+
.dash-input-element::-webkit-selection {
|
|
53
|
+
color: var(--Dash-Fill-Inverse-Strong);
|
|
54
|
+
background: var(--Dash-Fill-Interactive-Strong);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dash-input-element:disabled {
|
|
58
|
+
cursor: not-allowed;
|
|
35
59
|
}
|
|
36
60
|
|
|
37
61
|
/* Hide native steppers for number inputs */
|
|
38
62
|
.dash-input-element[type='number'] {
|
|
39
63
|
-moz-appearance: textfield;
|
|
64
|
+
border-radius: 0;
|
|
40
65
|
}
|
|
41
66
|
|
|
42
67
|
.dash-input-element[type='number']::-webkit-outer-spin-button,
|
|
@@ -70,10 +95,11 @@
|
|
|
70
95
|
cursor: pointer;
|
|
71
96
|
font-size: 16px;
|
|
72
97
|
font-weight: bold;
|
|
73
|
-
color: var(--Dash-Text-Primary);
|
|
98
|
+
color: var(--Dash -Text-Primary);
|
|
74
99
|
}
|
|
75
100
|
|
|
76
|
-
.dash-input-stepper:hover
|
|
101
|
+
.dash-input-stepper:hover,
|
|
102
|
+
.dash-input-stepper:focus {
|
|
77
103
|
background: var(--Dash-Fill-Primary-Hover);
|
|
78
104
|
}
|
|
79
105
|
|
|
@@ -115,7 +141,3 @@
|
|
|
115
141
|
input.dash-input-element:invalid {
|
|
116
142
|
outline: solid red;
|
|
117
143
|
}
|
|
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
|
+
}
|