@ultraviolet/ui 1.28.0 → 1.29.1
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 +14 -7
- package/dist/index.d.ts +61 -12
- package/dist/react-datepicker/dist/react-datepicker.min.css.js +1 -1
- package/dist/src/components/ActionBar/index.js +22 -37
- package/dist/src/components/Alert/index.js +27 -41
- package/dist/src/components/Avatar/index.js +48 -69
- package/dist/src/components/Badge/index.js +29 -49
- package/dist/src/components/Banner/index.js +42 -62
- package/dist/src/components/BarChart/Tooltip.js +35 -50
- package/dist/src/components/BarChart/index.js +13 -14
- package/dist/src/components/BarStack/index.js +100 -191
- package/dist/src/components/Breadcrumbs/index.js +29 -39
- package/dist/src/components/Bullet/index.js +42 -55
- package/dist/src/components/Button/index.js +73 -99
- package/dist/src/components/Card/index.js +39 -57
- package/dist/src/components/Carousel/index.js +32 -60
- package/dist/src/components/Checkbox/index.js +153 -341
- package/dist/src/components/CheckboxGroup/index.js +25 -27
- package/dist/src/components/CopyButton/index.js +11 -12
- package/dist/src/components/DateInput/index.js +141 -268
- package/dist/src/components/EmptyState/index.js +68 -83
- package/dist/src/components/Expandable/index.js +13 -20
- package/dist/src/components/GlobalAlert/GlobalAlertLink.js +12 -13
- package/dist/src/components/GlobalAlert/index.js +19 -32
- package/dist/src/components/LineChart/CustomLegend.js +80 -89
- package/dist/src/components/LineChart/Tooltip.js +32 -47
- package/dist/src/components/LineChart/helpers.js +15 -50
- package/dist/src/components/LineChart/index.js +23 -33
- package/dist/src/components/Link/index.js +46 -65
- package/dist/src/components/List/Body.js +9 -15
- package/dist/src/components/List/Cell.js +6 -7
- package/dist/src/components/List/HeaderCell.js +28 -56
- package/dist/src/components/List/HeaderRow.js +9 -16
- package/dist/src/components/List/ListContext.js +5 -6
- package/dist/src/components/List/Row.js +44 -90
- package/dist/src/components/List/SelectBar.js +9 -13
- package/dist/src/components/List/SkeletonRows.js +5 -6
- package/dist/src/components/List/index.js +15 -25
- package/dist/src/components/Loader/index.js +18 -25
- package/dist/src/components/Menu/Item.js +39 -49
- package/dist/src/components/Menu/index.js +31 -56
- package/dist/src/components/MenuV2/Item.js +39 -49
- package/dist/src/components/MenuV2/index.js +28 -47
- package/dist/src/components/Meter/index.js +25 -47
- package/dist/src/components/Modal/Dialog.js +33 -58
- package/dist/src/components/Modal/Disclosure.js +8 -9
- package/dist/src/components/Modal/index.js +26 -33
- package/dist/src/components/Notice/index.js +21 -27
- package/dist/src/components/NumberInput/index.js +73 -137
- package/dist/src/components/Pagination/getPageNumbers.js +1 -4
- package/dist/src/components/Pagination/index.js +17 -27
- package/dist/src/components/PasswordCheck/index.js +26 -32
- package/dist/src/components/PasswordStrengthMeter/index.js +25 -44
- package/dist/src/components/PieChart/Legends.js +71 -107
- package/dist/src/components/PieChart/Tooltip.js +33 -36
- package/dist/src/components/PieChart/index.js +13 -17
- package/dist/src/components/Popover/index.js +58 -75
- package/dist/src/components/Popup/helpers.js +13 -15
- package/dist/src/components/Popup/index.js +55 -98
- package/dist/src/components/ProgressBar/index.js +31 -49
- package/dist/src/components/Radio/index.js +58 -113
- package/dist/src/components/RadioGroup/index.js +26 -28
- package/dist/src/components/Row/index.js +25 -31
- package/dist/src/components/SelectInput/index.js +357 -410
- package/dist/src/components/SelectableCard/index.js +60 -111
- package/dist/src/components/Separator/index.js +52 -73
- package/dist/src/components/Skeleton/Block.js +23 -41
- package/dist/src/components/Skeleton/Blocks.js +23 -41
- package/dist/src/components/Skeleton/BoxWithIcon.js +21 -36
- package/dist/src/components/Skeleton/Donut.js +3 -6
- package/dist/src/components/Skeleton/IconSkeleton.js +13 -31
- package/dist/src/components/Skeleton/Line.js +5 -11
- package/dist/src/components/Skeleton/List.js +22 -31
- package/dist/src/components/Skeleton/Slider.js +25 -46
- package/dist/src/components/Skeleton/Square.js +3 -6
- package/dist/src/components/Skeleton/index.js +17 -33
- package/dist/src/components/Snippet/index.js +82 -137
- package/dist/src/components/Stack/index.js +11 -14
- package/dist/src/components/Status/index.js +48 -78
- package/dist/src/components/StepList/index.js +45 -63
- package/dist/src/components/Stepper/index.js +74 -129
- package/dist/src/components/SwitchButton/FocusOverlay.js +13 -23
- package/dist/src/components/SwitchButton/index.js +36 -62
- package/dist/src/components/Table/Body.js +5 -8
- package/dist/src/components/Table/Cell.js +14 -20
- package/dist/src/components/Table/Header.js +8 -14
- package/dist/src/components/Table/HeaderCell.js +40 -56
- package/dist/src/components/Table/HeaderRow.js +4 -5
- package/dist/src/components/Table/Row.js +10 -14
- package/dist/src/components/Table/SelectBar.js +9 -13
- package/dist/src/components/Table/SkeletonRows.js +5 -6
- package/dist/src/components/Table/TableContext.js +6 -7
- package/dist/src/components/Table/index.js +44 -50
- package/dist/src/components/Tabs/Tab.js +57 -118
- package/dist/src/components/Tabs/TabMenu.js +32 -38
- package/dist/src/components/Tabs/TabMenuItem.js +9 -13
- package/dist/src/components/Tabs/index.js +24 -43
- package/dist/src/components/Tag/index.js +57 -74
- package/dist/src/components/TagInput/index.js +63 -94
- package/dist/src/components/TagList/index.js +22 -35
- package/dist/src/components/Text/index.js +29 -31
- package/dist/src/components/TextArea/index.js +240 -0
- package/dist/src/components/TextInput/index.js +166 -260
- package/dist/src/components/TimeInput/index.js +10 -13
- package/dist/src/components/Toaster/index.js +51 -67
- package/dist/src/components/Toggle/index.js +62 -129
- package/dist/src/components/ToggleGroup/index.js +21 -23
- package/dist/src/components/Tooltip/index.js +28 -31
- package/dist/src/components/VerificationCode/index.js +55 -90
- package/dist/src/index.js +1 -0
- package/dist/src/utils/ids.js +1 -6
- package/package.json +6 -6
|
@@ -4,79 +4,61 @@ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
|
4
4
|
|
|
5
5
|
const Steps = /*#__PURE__*/_styled("ul", {
|
|
6
6
|
target: "ewuati22"
|
|
7
|
-
})("list-style:none;padding-left:0;text-align:left;display:flex;flex-direction:column;gap:",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} = _ref;
|
|
11
|
-
return theme.space['3'];
|
|
12
|
-
}, ";font-size:16px;");
|
|
7
|
+
})("list-style:none;padding-left:0;text-align:left;display:flex;flex-direction:column;gap:", ({
|
|
8
|
+
theme
|
|
9
|
+
}) => theme.space['3'], ";font-size:16px;");
|
|
13
10
|
const Step = /*#__PURE__*/_styled('li', {
|
|
14
11
|
shouldForwardProp: prop => !['disabled'].includes(prop),
|
|
15
12
|
target: "ewuati21"
|
|
16
|
-
})("display:flex;align-items:flex-start;gap:1rem;justify-content:center;color:",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref2;
|
|
21
|
-
return disabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.textStrong;
|
|
22
|
-
}, ";");
|
|
13
|
+
})("display:flex;align-items:flex-start;gap:1rem;justify-content:center;color:", ({
|
|
14
|
+
theme,
|
|
15
|
+
disabled
|
|
16
|
+
}) => disabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.textStrong, ";");
|
|
23
17
|
const StyledDiv = /*#__PURE__*/_styled('div', {
|
|
24
18
|
shouldForwardProp: prop => !['size'].includes(prop),
|
|
25
19
|
target: "ewuati20"
|
|
26
|
-
})("flex:1;margin:auto;line-height:",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
text: bulletText,
|
|
56
|
-
size: size,
|
|
57
|
-
sentiment: disabled ? 'disabled' : sentiment
|
|
58
|
-
}) : null, jsx(StyledDiv, {
|
|
59
|
-
size: size,
|
|
60
|
-
children: children
|
|
61
|
-
})]
|
|
62
|
-
});
|
|
63
|
-
};
|
|
20
|
+
})("flex:1;margin:auto;line-height:", ({
|
|
21
|
+
size
|
|
22
|
+
}) => size === 'medium' ? '32px' : '24px', ";font-size:", ({
|
|
23
|
+
size
|
|
24
|
+
}) => size === 'medium' ? '24px' : '16px', ";");
|
|
25
|
+
const Item = ({
|
|
26
|
+
bulletText,
|
|
27
|
+
bulletIcon,
|
|
28
|
+
sentiment,
|
|
29
|
+
children,
|
|
30
|
+
size = 'medium',
|
|
31
|
+
disabled = false,
|
|
32
|
+
className
|
|
33
|
+
}) => jsxs(Step, {
|
|
34
|
+
disabled: disabled,
|
|
35
|
+
className: className,
|
|
36
|
+
children: [bulletIcon ? jsx(Bullet, {
|
|
37
|
+
icon: bulletIcon,
|
|
38
|
+
size: size,
|
|
39
|
+
sentiment: disabled ? 'disabled' : sentiment
|
|
40
|
+
}) : null, bulletText ? jsx(Bullet, {
|
|
41
|
+
text: bulletText,
|
|
42
|
+
size: size,
|
|
43
|
+
sentiment: disabled ? 'disabled' : sentiment
|
|
44
|
+
}) : null, jsx(StyledDiv, {
|
|
45
|
+
size: size,
|
|
46
|
+
children: children
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
64
49
|
/**
|
|
65
50
|
* StepList component is used to display a list of steps.
|
|
66
51
|
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
67
52
|
*/
|
|
68
|
-
const StepList =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
children: children
|
|
78
|
-
});
|
|
79
|
-
};
|
|
53
|
+
const StepList = ({
|
|
54
|
+
children,
|
|
55
|
+
className,
|
|
56
|
+
'data-testid': dataTestId
|
|
57
|
+
}) => jsx(Steps, {
|
|
58
|
+
className: className,
|
|
59
|
+
"data-testid": dataTestId,
|
|
60
|
+
children: children
|
|
61
|
+
});
|
|
80
62
|
StepList.Item = Item;
|
|
81
63
|
|
|
82
64
|
export { StepList };
|
|
@@ -31,145 +31,90 @@ const StyledStepContainer = /*#__PURE__*/_styled("div", {
|
|
|
31
31
|
});
|
|
32
32
|
const StyledText = /*#__PURE__*/_styled(Text, {
|
|
33
33
|
target: "e19ft7rb3"
|
|
34
|
-
})("margin-top:",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} = _ref;
|
|
38
|
-
return theme.space['1'];
|
|
39
|
-
}, ";");
|
|
34
|
+
})("margin-top:", ({
|
|
35
|
+
theme
|
|
36
|
+
}) => theme.space['1'], ";");
|
|
40
37
|
const StyledBullet = /*#__PURE__*/_styled(Bullet, {
|
|
41
38
|
target: "e19ft7rb2"
|
|
42
|
-
})("margin-top:",
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} = _ref2;
|
|
47
|
-
return size === 'small' ? theme.space['0.5'] : 0;
|
|
48
|
-
}, ";");
|
|
39
|
+
})("margin-top:", ({
|
|
40
|
+
theme,
|
|
41
|
+
size
|
|
42
|
+
}) => size === 'small' ? theme.space['0.5'] : 0, ";");
|
|
49
43
|
const loadingStyle = /*#__PURE__*/css("animation:", loadingAnimation, " 1s linear infinite;");
|
|
50
44
|
const StyledLine = /*#__PURE__*/_styled("div", {
|
|
51
45
|
target: "e19ft7rb1"
|
|
52
|
-
})("border-radius:",
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}, ";
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
let {
|
|
69
|
-
theme
|
|
70
|
-
} = _ref6;
|
|
71
|
-
return theme.radii.default;
|
|
72
|
-
}, ";background-color:", _ref7 => {
|
|
73
|
-
let {
|
|
74
|
-
theme
|
|
75
|
-
} = _ref7;
|
|
76
|
-
return theme.colors.primary.backgroundStrong;
|
|
77
|
-
}, ";", _ref8 => {
|
|
78
|
-
let {
|
|
79
|
-
temporal
|
|
80
|
-
} = _ref8;
|
|
81
|
-
return temporal === 'previous' && `width: 100%;`;
|
|
82
|
-
}, " ", _ref9 => {
|
|
83
|
-
let {
|
|
84
|
-
temporal,
|
|
85
|
-
animated
|
|
86
|
-
} = _ref9;
|
|
87
|
-
return temporal === 'current' && animated && loadingStyle;
|
|
88
|
-
}, ";}");
|
|
46
|
+
})("border-radius:", ({
|
|
47
|
+
theme
|
|
48
|
+
}) => theme.radii.default, ";flex-grow:1;border-radius:", ({
|
|
49
|
+
theme
|
|
50
|
+
}) => theme.radii.default, ";background-color:", ({
|
|
51
|
+
theme
|
|
52
|
+
}) => theme.colors.neutral.backgroundStrong, ";position:relative;::after{content:'';position:absolute;left:0;top:0;height:100%;border-radius:", ({
|
|
53
|
+
theme
|
|
54
|
+
}) => theme.radii.default, ";background-color:", ({
|
|
55
|
+
theme
|
|
56
|
+
}) => theme.colors.primary.backgroundStrong, ";", ({
|
|
57
|
+
temporal
|
|
58
|
+
}) => temporal === 'previous' && `width: 100%;`, " ", ({
|
|
59
|
+
temporal,
|
|
60
|
+
animated
|
|
61
|
+
}) => temporal === 'current' && animated && loadingStyle, ";}");
|
|
89
62
|
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
90
63
|
target: "e19ft7rb0"
|
|
91
|
-
})("display:flex;flex-direction:row;justify-content:center;align-items:flex-start;gap:0 ",
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}, ";
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return theme.space['2'];
|
|
134
|
-
}, ";}");
|
|
135
|
-
const StepperNumbers = _ref18 => {
|
|
136
|
-
let {
|
|
137
|
-
temporal,
|
|
138
|
-
children,
|
|
139
|
-
CurrentStep,
|
|
140
|
-
size = 'medium'
|
|
141
|
-
} = _ref18;
|
|
142
|
-
return jsxs(StyledStepContainer, {
|
|
143
|
-
children: [jsx(StyledBullet, {
|
|
144
|
-
sentiment: temporal === 'next' ? 'neutral' : 'primary',
|
|
145
|
-
...(temporal === 'previous' ? {
|
|
146
|
-
icon: 'check'
|
|
147
|
-
} : {
|
|
148
|
-
text: CurrentStep.toString()
|
|
149
|
-
}),
|
|
150
|
-
prominence: temporal !== 'current' ? 'default' : 'strong',
|
|
151
|
-
size: size
|
|
152
|
-
}), jsx(StyledText, {
|
|
153
|
-
as: "span",
|
|
154
|
-
variant: size === 'medium' ? 'body' : 'bodySmall',
|
|
155
|
-
prominence: temporal === 'next' ? 'weak' : 'default',
|
|
156
|
-
children: children
|
|
157
|
-
})]
|
|
158
|
-
});
|
|
159
|
-
};
|
|
64
|
+
})("display:flex;flex-direction:row;justify-content:center;align-items:flex-start;gap:0 ", ({
|
|
65
|
+
theme
|
|
66
|
+
}) => theme.space['1'], ";gap:", ({
|
|
67
|
+
theme,
|
|
68
|
+
labelPosition,
|
|
69
|
+
size
|
|
70
|
+
}) => size === 'medium' && labelPosition === 'bottom' ? theme.space['0'] : theme.space['1'], ";", StyledStepContainer, "{display:flex;flex-direction:", ({
|
|
71
|
+
labelPosition
|
|
72
|
+
}) => labelPosition === 'bottom' ? 'column' : 'row', ";align-items:", ({
|
|
73
|
+
labelPosition
|
|
74
|
+
}) => labelPosition === 'bottom' ? 'center' : 'baseline', ";gap:", ({
|
|
75
|
+
theme,
|
|
76
|
+
labelPosition
|
|
77
|
+
}) => labelPosition === 'bottom' ? theme.space['0.5'] : theme.space['1'], ";white-space:nowrap;}", StyledLine, "{height:", ({
|
|
78
|
+
size
|
|
79
|
+
}) => LINE_HEIGHT_SIZES[size], "px;margin-top:", ({
|
|
80
|
+
theme
|
|
81
|
+
}) => theme.space['2'], ";margin-bottom:", ({
|
|
82
|
+
theme
|
|
83
|
+
}) => theme.space['2'], ";}");
|
|
84
|
+
const StepperNumbers = ({
|
|
85
|
+
temporal,
|
|
86
|
+
children,
|
|
87
|
+
CurrentStep,
|
|
88
|
+
size = 'medium'
|
|
89
|
+
}) => jsxs(StyledStepContainer, {
|
|
90
|
+
children: [jsx(StyledBullet, {
|
|
91
|
+
sentiment: temporal === 'next' ? 'neutral' : 'primary',
|
|
92
|
+
...(temporal === 'previous' ? {
|
|
93
|
+
icon: 'check'
|
|
94
|
+
} : {
|
|
95
|
+
text: CurrentStep.toString()
|
|
96
|
+
}),
|
|
97
|
+
prominence: temporal !== 'current' ? 'default' : 'strong',
|
|
98
|
+
size: size
|
|
99
|
+
}), jsx(StyledText, {
|
|
100
|
+
as: "span",
|
|
101
|
+
variant: size === 'medium' ? 'body' : 'bodySmall',
|
|
102
|
+
prominence: temporal === 'next' ? 'weak' : 'default',
|
|
103
|
+
children: children
|
|
104
|
+
})]
|
|
105
|
+
});
|
|
160
106
|
/**
|
|
161
107
|
* Stepper component to show the progress of a process in a linear way.
|
|
162
108
|
*/
|
|
163
|
-
const Stepper =
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
} = _ref19;
|
|
109
|
+
const Stepper = ({
|
|
110
|
+
children,
|
|
111
|
+
selected = 0,
|
|
112
|
+
animated = false,
|
|
113
|
+
className,
|
|
114
|
+
labelPosition = 'bottom',
|
|
115
|
+
size = 'medium',
|
|
116
|
+
'data-testid': dataTestId
|
|
117
|
+
}) => {
|
|
173
118
|
const lastStep = Children.count(children) - 1;
|
|
174
119
|
return jsx(StyledContainer, {
|
|
175
120
|
className: className,
|
|
@@ -6,29 +6,19 @@ const FOCUS_OVERLAY_SCALE_RATIO = 6;
|
|
|
6
6
|
const FOCUS_OVERLAY_PIXEL_RIGHT_OFFSET = 8;
|
|
7
7
|
const StyledDiv = /*#__PURE__*/_styled("div", {
|
|
8
8
|
target: "etutiin0"
|
|
9
|
-
})("position:absolute;height:calc(100% - ",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref3;
|
|
23
|
-
return theme.colors.primary.backgroundStrong;
|
|
24
|
-
}, ";transform-origin:left center;transition:all 200ms ease-in-out;&[data-focusposition='right']{transform-origin:right center;}");
|
|
25
|
-
const FocusOverlay = _ref4 => {
|
|
26
|
-
let {
|
|
27
|
-
focusPosition,
|
|
28
|
-
rightCardWidth,
|
|
29
|
-
leftCardWidth,
|
|
30
|
-
hasMouseDown
|
|
31
|
-
} = _ref4;
|
|
9
|
+
})("position:absolute;height:calc(100% - ", ({
|
|
10
|
+
theme
|
|
11
|
+
}) => theme.space['1'], ");border-radius:", ({
|
|
12
|
+
theme
|
|
13
|
+
}) => theme.radii.default, ";background:", ({
|
|
14
|
+
theme
|
|
15
|
+
}) => theme.colors.primary.backgroundStrong, ";transform-origin:left center;transition:all 200ms ease-in-out;&[data-focusposition='right']{transform-origin:right center;}");
|
|
16
|
+
const FocusOverlay = ({
|
|
17
|
+
focusPosition,
|
|
18
|
+
rightCardWidth,
|
|
19
|
+
leftCardWidth,
|
|
20
|
+
hasMouseDown
|
|
21
|
+
}) => {
|
|
32
22
|
const translateXValue = useMemo(() => focusPosition === 'left' ? 0 : leftCardWidth + FOCUS_OVERLAY_PIXEL_RIGHT_OFFSET, [focusPosition, leftCardWidth]);
|
|
33
23
|
const getScaleXValue = () => {
|
|
34
24
|
if (!hasMouseDown || !leftCardWidth || !rightCardWidth) return 1;
|
|
@@ -7,71 +7,43 @@ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
|
7
7
|
|
|
8
8
|
const StyledBorderedBox = /*#__PURE__*/_styled("div", {
|
|
9
9
|
target: "e4ryteh1"
|
|
10
|
-
})("border:1px solid ",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return theme.radii.default;
|
|
20
|
-
}, ";padding:", _ref3 => {
|
|
21
|
-
let {
|
|
22
|
-
theme
|
|
23
|
-
} = _ref3;
|
|
24
|
-
return theme.space['0.5'];
|
|
25
|
-
}, ";display:flex;gap:", _ref4 => {
|
|
26
|
-
let {
|
|
27
|
-
theme
|
|
28
|
-
} = _ref4;
|
|
29
|
-
return theme.space['1'];
|
|
30
|
-
}, ";position:relative;");
|
|
10
|
+
})("border:1px solid ", ({
|
|
11
|
+
theme
|
|
12
|
+
}) => theme.colors.neutral.border, ";border-radius:", ({
|
|
13
|
+
theme
|
|
14
|
+
}) => theme.radii.default, ";padding:", ({
|
|
15
|
+
theme
|
|
16
|
+
}) => theme.space['0.5'], ";display:flex;gap:", ({
|
|
17
|
+
theme
|
|
18
|
+
}) => theme.space['1'], ";position:relative;");
|
|
31
19
|
const StyledSelectableCard = /*#__PURE__*/_styled(SelectableCard, {
|
|
32
20
|
target: "e4ryteh0"
|
|
33
|
-
})("border:none;height:40px;padding:",
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, ";
|
|
44
|
-
let {
|
|
45
|
-
theme
|
|
46
|
-
} = _ref7;
|
|
47
|
-
return theme.typography.bodyStrong.weight;
|
|
48
|
-
}, ";justify-content:center;align-items:center;transition:all 200ms ease-in-out;&:hover,&:focus-within,&:active{box-shadow:none;border:none;&:not([data-error='true'][data-disabled='true']){border:none;}}&[data-checked='true']{border:none;}&[data-checked='true'] label{color:", _ref8 => {
|
|
49
|
-
let {
|
|
50
|
-
theme
|
|
51
|
-
} = _ref8;
|
|
52
|
-
return theme.colors.primary.textStrong;
|
|
53
|
-
}, ";}&:not([data-checked='true']) label{&:hover{color:", _ref9 => {
|
|
54
|
-
let {
|
|
55
|
-
theme
|
|
56
|
-
} = _ref9;
|
|
57
|
-
return theme.colors.primary.text;
|
|
58
|
-
}, ";}}");
|
|
21
|
+
})("border:none;height:40px;padding:", ({
|
|
22
|
+
theme
|
|
23
|
+
}) => theme.space['1'], " ", ({
|
|
24
|
+
theme
|
|
25
|
+
}) => theme.space['2'], ";font-weight:", ({
|
|
26
|
+
theme
|
|
27
|
+
}) => theme.typography.bodyStrong.weight, ";justify-content:center;align-items:center;transition:all 200ms ease-in-out;&:hover,&:focus-within,&:active{box-shadow:none;border:none;&:not([data-error='true'][data-disabled='true']){border:none;}}&[data-checked='true']{border:none;}&[data-checked='true'] label{color:", ({
|
|
28
|
+
theme
|
|
29
|
+
}) => theme.colors.primary.textStrong, ";}&:not([data-checked='true']) label{&:hover{color:", ({
|
|
30
|
+
theme
|
|
31
|
+
}) => theme.colors.primary.text, ";}}");
|
|
59
32
|
/**
|
|
60
33
|
* SwitchButton is a component that allows the user to select between two options.
|
|
61
34
|
*/
|
|
62
|
-
const SwitchButton =
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
} = _ref10;
|
|
35
|
+
const SwitchButton = ({
|
|
36
|
+
value,
|
|
37
|
+
onChange,
|
|
38
|
+
onFocus,
|
|
39
|
+
onBlur,
|
|
40
|
+
name,
|
|
41
|
+
leftButton,
|
|
42
|
+
rightButton,
|
|
43
|
+
tooltip,
|
|
44
|
+
className,
|
|
45
|
+
'data-testid': dataTestId
|
|
46
|
+
}) => {
|
|
75
47
|
const leftButtonRef = useRef(null);
|
|
76
48
|
const rightButtonRef = useRef(null);
|
|
77
49
|
const [leftCardWidth, setLeftCardWidth] = useState();
|
|
@@ -114,7 +86,8 @@ const SwitchButton = _ref10 => {
|
|
|
114
86
|
onBlur: onBlur,
|
|
115
87
|
onFocus: onFocus,
|
|
116
88
|
"data-checked": localValue === leftButton.value,
|
|
117
|
-
label: leftButton.label
|
|
89
|
+
label: leftButton.label,
|
|
90
|
+
"data-testid": dataTestId ? `${dataTestId}-left` : undefined
|
|
118
91
|
}), jsx(StyledSelectableCard, {
|
|
119
92
|
ref: rightButtonRef,
|
|
120
93
|
name: name,
|
|
@@ -124,7 +97,8 @@ const SwitchButton = _ref10 => {
|
|
|
124
97
|
onBlur: onBlur,
|
|
125
98
|
onFocus: onFocus,
|
|
126
99
|
"data-checked": localValue === rightButton.value,
|
|
127
|
-
label: rightButton.label
|
|
100
|
+
label: rightButton.label,
|
|
101
|
+
"data-testid": dataTestId ? `${dataTestId}-right` : undefined
|
|
128
102
|
})]
|
|
129
103
|
})
|
|
130
104
|
})
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
const Body =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
children: children
|
|
9
|
-
});
|
|
10
|
-
};
|
|
3
|
+
const Body = ({
|
|
4
|
+
children
|
|
5
|
+
}) => jsx("tbody", {
|
|
6
|
+
children: children
|
|
7
|
+
});
|
|
11
8
|
|
|
12
9
|
export { Body };
|
|
@@ -3,25 +3,19 @@ import { jsx } from '@emotion/react/jsx-runtime';
|
|
|
3
3
|
|
|
4
4
|
const StyledCell = /*#__PURE__*/_styled('td', {
|
|
5
5
|
target: "e78o8ww0"
|
|
6
|
-
})("padding:",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
className: className,
|
|
21
|
-
colSpan: colSpan,
|
|
22
|
-
rowSpan: rowSpan,
|
|
23
|
-
children: children
|
|
24
|
-
});
|
|
25
|
-
};
|
|
6
|
+
})("padding:", ({
|
|
7
|
+
theme
|
|
8
|
+
}) => theme.space['1'], ";font-size:14px;");
|
|
9
|
+
const Cell = ({
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
colSpan,
|
|
13
|
+
rowSpan
|
|
14
|
+
}) => jsx(StyledCell, {
|
|
15
|
+
className: className,
|
|
16
|
+
colSpan: colSpan,
|
|
17
|
+
rowSpan: rowSpan,
|
|
18
|
+
children: children
|
|
19
|
+
});
|
|
26
20
|
|
|
27
21
|
export { Cell };
|
|
@@ -3,19 +3,13 @@ import { jsx } from '@emotion/react/jsx-runtime';
|
|
|
3
3
|
|
|
4
4
|
const StyledHeader = /*#__PURE__*/_styled('thead', {
|
|
5
5
|
target: "ekxedod0"
|
|
6
|
-
})("border-bottom:1px solid ",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
children
|
|
15
|
-
} = _ref2;
|
|
16
|
-
return jsx(StyledHeader, {
|
|
17
|
-
children: children
|
|
18
|
-
});
|
|
19
|
-
};
|
|
6
|
+
})("border-bottom:1px solid ", ({
|
|
7
|
+
theme
|
|
8
|
+
}) => theme.colors.neutral.border, ";");
|
|
9
|
+
const Header = ({
|
|
10
|
+
children
|
|
11
|
+
}) => jsx(StyledHeader, {
|
|
12
|
+
children: children
|
|
13
|
+
});
|
|
20
14
|
|
|
21
15
|
export { Header };
|