@codecademy/gamut 68.1.4 → 68.1.5-alpha.16dd5a.0
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/dist/BarChart/BarChartProvider.d.ts +19 -0
- package/dist/BarChart/BarChartProvider.js +27 -0
- package/dist/BarChart/BarRow/ValueLabelsContent.d.ts +7 -0
- package/dist/BarChart/BarRow/ValueLabelsContent.js +34 -0
- package/dist/BarChart/BarRow/elements.d.ts +959 -0
- package/dist/BarChart/BarRow/elements.js +110 -0
- package/dist/BarChart/BarRow/index.d.ts +6 -0
- package/dist/BarChart/BarRow/index.js +231 -0
- package/dist/BarChart/GENERIC_EXAMPLE.d.ts +14 -0
- package/dist/BarChart/GENERIC_EXAMPLE.js +327 -0
- package/dist/BarChart/SortSelect/index.d.ts +15 -0
- package/dist/BarChart/SortSelect/index.js +18 -0
- package/dist/BarChart/index.d.ts +4 -0
- package/dist/BarChart/index.js +136 -0
- package/dist/BarChart/layout/GridLines.d.ts +3 -0
- package/dist/BarChart/layout/GridLines.js +69 -0
- package/dist/BarChart/layout/LabelSpacer.d.ts +6 -0
- package/dist/BarChart/layout/LabelSpacer.js +56 -0
- package/dist/BarChart/layout/ScaleChartHeader.d.ts +3 -0
- package/dist/BarChart/layout/ScaleChartHeader.js +87 -0
- package/dist/BarChart/shared/elements.d.ts +7 -0
- package/dist/BarChart/shared/elements.js +12 -0
- package/dist/BarChart/shared/styles.d.ts +4 -0
- package/dist/BarChart/shared/styles.js +4 -0
- package/dist/BarChart/shared/translations.d.ts +69 -0
- package/dist/BarChart/shared/translations.js +57 -0
- package/dist/BarChart/shared/types.d.ts +100 -0
- package/dist/BarChart/shared/types.js +1 -0
- package/dist/BarChart/utils/hooks.d.ts +89 -0
- package/dist/BarChart/utils/hooks.js +281 -0
- package/dist/BarChart/utils/index.d.ts +56 -0
- package/dist/BarChart/utils/index.js +122 -0
- package/dist/ConnectedForm/utils.d.ts +1 -1
- package/dist/Form/SelectDropdown/styles.d.ts +1 -1
- package/dist/Form/elements/Form.d.ts +1 -1
- package/dist/Form/elements/FormGroupLabel.js +2 -2
- package/dist/Form/inputs/Select.js +6 -5
- package/dist/List/elements.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { isColorAlias, useColorModes } from '@codecademy/gamut-styles';
|
|
2
|
+
import { getContrast } from 'polished';
|
|
3
|
+
import { useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { BarChartContext, defaultStyleConfig } from '../BarChartProvider';
|
|
5
|
+
import { calculatePositionPercent, getLabel, sortBars } from './index';
|
|
6
|
+
/**
|
|
7
|
+
* Hook that calculates label positions for a given maxScaleValue and tickCount (scale min is always 0).
|
|
8
|
+
* Returns an array of { value, positionPercent } objects.
|
|
9
|
+
*/
|
|
10
|
+
export const useLabelPositions = ({
|
|
11
|
+
maxScaleValue,
|
|
12
|
+
tickCount
|
|
13
|
+
}) => {
|
|
14
|
+
return useMemo(() => Array.from({
|
|
15
|
+
length: tickCount
|
|
16
|
+
}, (_, i) => {
|
|
17
|
+
const value = getLabel({
|
|
18
|
+
labelIndex: i,
|
|
19
|
+
maxScaleValue,
|
|
20
|
+
tickCount
|
|
21
|
+
});
|
|
22
|
+
const positionPercent = calculatePositionPercent({
|
|
23
|
+
value,
|
|
24
|
+
maxScaleValue
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
value,
|
|
28
|
+
positionPercent
|
|
29
|
+
};
|
|
30
|
+
}), [maxScaleValue, tickCount]);
|
|
31
|
+
};
|
|
32
|
+
export const useBarChartContext = () => {
|
|
33
|
+
return useContext(BarChartContext);
|
|
34
|
+
};
|
|
35
|
+
export const useBarChart = ({
|
|
36
|
+
maxScaleValue,
|
|
37
|
+
scaleInterval,
|
|
38
|
+
unit = '',
|
|
39
|
+
styleConfig,
|
|
40
|
+
animate = false,
|
|
41
|
+
barCount = 0,
|
|
42
|
+
translations
|
|
43
|
+
}) => {
|
|
44
|
+
const [widestCategoryLabelWidth, setWidestCategoryLabelWidthState] = useState(null);
|
|
45
|
+
const [widestTotalValueLabelWidth, setWidestTotalValueLabelWidthState] = useState(null);
|
|
46
|
+
const [isMeasuring, setIsMeasuring] = useState(true);
|
|
47
|
+
const measuredCountRef = useRef(0);
|
|
48
|
+
const maxCategoryLabelWidthRef = useRef(0);
|
|
49
|
+
const maxTotalValueLabelWidthRef = useRef(0);
|
|
50
|
+
const setWidestCategoryLabelWidth = useCallback(width => {
|
|
51
|
+
if (width > maxCategoryLabelWidthRef.current) {
|
|
52
|
+
maxCategoryLabelWidthRef.current = width;
|
|
53
|
+
setWidestCategoryLabelWidthState(width);
|
|
54
|
+
}
|
|
55
|
+
measuredCountRef.current += 1;
|
|
56
|
+
// Only stop measuring when we've received measurements from all bars
|
|
57
|
+
if (measuredCountRef.current >= barCount * 2 && barCount > 0) {
|
|
58
|
+
setIsMeasuring(false);
|
|
59
|
+
}
|
|
60
|
+
}, [barCount]);
|
|
61
|
+
const setWidestTotalValueLabelWidth = useCallback(width => {
|
|
62
|
+
if (width > maxTotalValueLabelWidthRef.current) {
|
|
63
|
+
maxTotalValueLabelWidthRef.current = width;
|
|
64
|
+
setWidestTotalValueLabelWidthState(width);
|
|
65
|
+
}
|
|
66
|
+
measuredCountRef.current += 1;
|
|
67
|
+
// Only stop measuring when we've received measurements from all bars (category + total value)
|
|
68
|
+
if (measuredCountRef.current >= barCount * 2 && barCount > 0) {
|
|
69
|
+
setIsMeasuring(false);
|
|
70
|
+
}
|
|
71
|
+
}, [barCount]);
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
if (barCount > 0) {
|
|
74
|
+
measuredCountRef.current = 0;
|
|
75
|
+
maxCategoryLabelWidthRef.current = 0;
|
|
76
|
+
maxTotalValueLabelWidthRef.current = 0;
|
|
77
|
+
setIsMeasuring(true);
|
|
78
|
+
}
|
|
79
|
+
}, [barCount]);
|
|
80
|
+
return useMemo(() => ({
|
|
81
|
+
maxScaleValue,
|
|
82
|
+
scaleInterval: scaleInterval ?? Math.ceil(maxScaleValue / 5),
|
|
83
|
+
unit,
|
|
84
|
+
styleConfig: {
|
|
85
|
+
...defaultStyleConfig,
|
|
86
|
+
...styleConfig
|
|
87
|
+
},
|
|
88
|
+
animate,
|
|
89
|
+
widestCategoryLabelWidth,
|
|
90
|
+
setWidestCategoryLabelWidth,
|
|
91
|
+
widestTotalValueLabelWidth,
|
|
92
|
+
setWidestTotalValueLabelWidth,
|
|
93
|
+
isMeasuring,
|
|
94
|
+
translations
|
|
95
|
+
}), [maxScaleValue, scaleInterval, unit, styleConfig, animate, widestCategoryLabelWidth, setWidestCategoryLabelWidth, widestTotalValueLabelWidth, setWidestTotalValueLabelWidth, isMeasuring, translations]);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Hook that returns a function to get the highest contrast border color
|
|
100
|
+
* (white or navy-900) for a given background color.
|
|
101
|
+
*
|
|
102
|
+
* Similar to the Background component, this resolves color aliases and
|
|
103
|
+
* compares contrast ratios to determine the best border color.
|
|
104
|
+
*
|
|
105
|
+
* @returns A function that takes a background color and returns either 'white' or 'navy-900'
|
|
106
|
+
*/
|
|
107
|
+
export const useBarBorderColor = () => {
|
|
108
|
+
const [, activeColors,, getColorValue] = useColorModes();
|
|
109
|
+
const getBorderColor = useCallback(bg => {
|
|
110
|
+
/** If a color alias was used then look up the true color key from the active mode */
|
|
111
|
+
const trueColor = isColorAlias(activeColors, bg) ? activeColors[bg] : bg;
|
|
112
|
+
const backgroundColor = getColorValue(trueColor);
|
|
113
|
+
const whiteContrast = getContrast(getColorValue('white'), backgroundColor);
|
|
114
|
+
const navyContrast = getContrast(getColorValue('navy-900'), backgroundColor);
|
|
115
|
+
return whiteContrast > navyContrast ? 'white' : 'navy-900';
|
|
116
|
+
}, [activeColors, getColorValue]);
|
|
117
|
+
return getBorderColor;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Generic hook for measuring element width and reporting to a callback.
|
|
122
|
+
* Used internally by useMeasureCategoryLabelWidth and useMeasureTotalValueLabelWidth.
|
|
123
|
+
*/
|
|
124
|
+
const useMeasureWidth = ({
|
|
125
|
+
ref,
|
|
126
|
+
onMeasure,
|
|
127
|
+
isMeasuring
|
|
128
|
+
}) => {
|
|
129
|
+
const hasMeasuredRef = useRef(false);
|
|
130
|
+
|
|
131
|
+
// Reset measurement flag when a new measurement cycle starts
|
|
132
|
+
const prevIsMeasuringRef = useRef(isMeasuring);
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
if (isMeasuring && !prevIsMeasuringRef.current) {
|
|
135
|
+
// New measurement cycle started
|
|
136
|
+
hasMeasuredRef.current = false;
|
|
137
|
+
}
|
|
138
|
+
prevIsMeasuringRef.current = isMeasuring;
|
|
139
|
+
}, [isMeasuring]);
|
|
140
|
+
useLayoutEffect(() => {
|
|
141
|
+
if (!ref.current || hasMeasuredRef.current || !isMeasuring) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const element = ref.current;
|
|
145
|
+
const width = element?.getBoundingClientRect()?.width;
|
|
146
|
+
if (width > 0) {
|
|
147
|
+
onMeasure(width);
|
|
148
|
+
hasMeasuredRef.current = true;
|
|
149
|
+
}
|
|
150
|
+
}, [ref, onMeasure, isMeasuring]);
|
|
151
|
+
};
|
|
152
|
+
export const useMeasureCategoryLabelWidth = ({
|
|
153
|
+
ref
|
|
154
|
+
}) => {
|
|
155
|
+
const {
|
|
156
|
+
setWidestCategoryLabelWidth,
|
|
157
|
+
isMeasuring
|
|
158
|
+
} = useBarChartContext();
|
|
159
|
+
useMeasureWidth({
|
|
160
|
+
ref,
|
|
161
|
+
onMeasure: setWidestCategoryLabelWidth,
|
|
162
|
+
isMeasuring
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
export const useMeasureTotalValueLabelWidth = ({
|
|
166
|
+
ref
|
|
167
|
+
}) => {
|
|
168
|
+
const {
|
|
169
|
+
setWidestTotalValueLabelWidth,
|
|
170
|
+
isMeasuring
|
|
171
|
+
} = useBarChartContext();
|
|
172
|
+
useMeasureWidth({
|
|
173
|
+
ref,
|
|
174
|
+
onMeasure: setWidestTotalValueLabelWidth,
|
|
175
|
+
isMeasuring
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Hook that manages bar sorting state and provides memoized sorted bars.
|
|
180
|
+
* Supports predefined sort options (via string literals) and custom sort functions.
|
|
181
|
+
* Only returns selectProps if sortFns is provided.
|
|
182
|
+
*/
|
|
183
|
+
export const useBarChartSort = ({
|
|
184
|
+
bars,
|
|
185
|
+
sortFns,
|
|
186
|
+
translations
|
|
187
|
+
}) => {
|
|
188
|
+
// Build options map and custom sort map from sortFns array
|
|
189
|
+
const {
|
|
190
|
+
allSortOptions,
|
|
191
|
+
customSortMap,
|
|
192
|
+
defaultSortValue
|
|
193
|
+
} = useMemo(() => {
|
|
194
|
+
if (!sortFns || sortFns.length === 0) {
|
|
195
|
+
return {
|
|
196
|
+
allSortOptions: null,
|
|
197
|
+
customSortMap: new Map(),
|
|
198
|
+
defaultSortValue: 'none'
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
const options = {};
|
|
202
|
+
const customMap = new Map();
|
|
203
|
+
const availableValues = [];
|
|
204
|
+
sortFns.forEach(item => {
|
|
205
|
+
if (typeof item === 'string') {
|
|
206
|
+
if (item === 'alphabetically') {
|
|
207
|
+
options['label-asc'] = translations.sortOptions.labelAsc;
|
|
208
|
+
options['label-desc'] = translations.sortOptions.labelDesc;
|
|
209
|
+
availableValues.push('label-asc', 'label-desc');
|
|
210
|
+
} else if (item === 'numerically') {
|
|
211
|
+
options['value-asc'] = translations.sortOptions.valueAsc;
|
|
212
|
+
options['value-desc'] = translations.sortOptions.valueDesc;
|
|
213
|
+
availableValues.push('value-asc', 'value-desc');
|
|
214
|
+
} else if (item === 'none') {
|
|
215
|
+
options.none = translations.sortOptions.none;
|
|
216
|
+
availableValues.push('none');
|
|
217
|
+
}
|
|
218
|
+
} else {
|
|
219
|
+
// CustomSortOption
|
|
220
|
+
options[item.value] = item.label;
|
|
221
|
+
customMap.set(item.value, item.sortFn);
|
|
222
|
+
availableValues.push(item.value);
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
// Default to "none" if available, otherwise first option
|
|
227
|
+
const defaultVal = availableValues.includes('none') ? 'none' : availableValues[0] || 'none';
|
|
228
|
+
return {
|
|
229
|
+
allSortOptions: options,
|
|
230
|
+
customSortMap: customMap,
|
|
231
|
+
defaultSortValue: defaultVal
|
|
232
|
+
};
|
|
233
|
+
}, [sortFns, translations]);
|
|
234
|
+
const [sortValue, setSortValue] = useState(defaultSortValue);
|
|
235
|
+
|
|
236
|
+
// Update sortValue when defaultSortValue changes (e.g., when sortFns changes)
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
setSortValue(defaultSortValue);
|
|
239
|
+
}, [defaultSortValue]);
|
|
240
|
+
const sortedBars = useMemo(() => {
|
|
241
|
+
// Check if current selection is a custom sort function
|
|
242
|
+
const customSortFn = customSortMap.get(sortValue);
|
|
243
|
+
if (customSortFn) {
|
|
244
|
+
return customSortFn([...bars]);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Otherwise use predefined sort options
|
|
248
|
+
if (sortValue === 'none') {
|
|
249
|
+
return bars;
|
|
250
|
+
}
|
|
251
|
+
const [sortBy, order] = sortValue.split('-');
|
|
252
|
+
const sortByValue = sortBy;
|
|
253
|
+
const orderValue = order === 'desc' ? 'descending' : 'ascending';
|
|
254
|
+
return sortBars({
|
|
255
|
+
bars: bars,
|
|
256
|
+
sortBy: sortByValue,
|
|
257
|
+
order: orderValue
|
|
258
|
+
});
|
|
259
|
+
}, [bars, sortValue, customSortMap]);
|
|
260
|
+
const onSortChange = useCallback(value => {
|
|
261
|
+
setSortValue(value);
|
|
262
|
+
}, []);
|
|
263
|
+
const selectProps = useMemo(() => {
|
|
264
|
+
if (!allSortOptions) {
|
|
265
|
+
return null;
|
|
266
|
+
}
|
|
267
|
+
return {
|
|
268
|
+
options: allSortOptions,
|
|
269
|
+
value: sortValue,
|
|
270
|
+
onChange: e => {
|
|
271
|
+
onSortChange(e.target.value);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
}, [sortValue, onSortChange, allSortOptions]);
|
|
275
|
+
return {
|
|
276
|
+
sortedBars,
|
|
277
|
+
sortValue,
|
|
278
|
+
onSortChange,
|
|
279
|
+
selectProps
|
|
280
|
+
};
|
|
281
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BarChartTranslations } from '../shared/translations';
|
|
2
|
+
import { BarChartUnit, BarProps, MaxScaleValue, ScaleTickCount } from '../shared/types';
|
|
3
|
+
export declare const calculatePercent: ({ value, total, }: {
|
|
4
|
+
value: number;
|
|
5
|
+
total: number;
|
|
6
|
+
}) => number;
|
|
7
|
+
export declare const calculateBarWidth: ({ value, maxScaleValue, }: {
|
|
8
|
+
value: number;
|
|
9
|
+
maxScaleValue: MaxScaleValue;
|
|
10
|
+
}) => number;
|
|
11
|
+
/**
|
|
12
|
+
* Formats a numeric value with optional unit for bar chart labels.
|
|
13
|
+
*/
|
|
14
|
+
export declare const formatValueWithUnit: ({ value, unit, locale, }: {
|
|
15
|
+
value: number;
|
|
16
|
+
unit: string;
|
|
17
|
+
locale?: string | undefined;
|
|
18
|
+
}) => string;
|
|
19
|
+
export declare const formatNumberUnitCompact: ({ num, locale, }: {
|
|
20
|
+
num: number;
|
|
21
|
+
locale?: string | undefined;
|
|
22
|
+
}) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Sort bars based on sortBy and order configuration
|
|
25
|
+
*/
|
|
26
|
+
export declare const sortBars: <T extends BarProps>({ bars, sortBy, order, }: {
|
|
27
|
+
bars: T[];
|
|
28
|
+
sortBy: 'label' | 'value' | 'none';
|
|
29
|
+
order: 'ascending' | 'descending';
|
|
30
|
+
}) => T[];
|
|
31
|
+
/**
|
|
32
|
+
* Returns the accessibility summary for a bar row. The summary is used as aria-label on the row's link/button when interactive, or as screenreader-only text when not. Summaries come from stackedBarSummary (stacked rows) or singleValueBarSummary (single-value rows), with default implementations when not overridden.
|
|
33
|
+
*/
|
|
34
|
+
export declare const getValuesSummary: ({ seriesOneValue, seriesTwoValue, unit, categoryLabel, translations, }: Pick<BarProps, "categoryLabel" | "seriesOneValue" | "seriesTwoValue"> & Required<Pick<BarChartUnit, "unit">> & {
|
|
35
|
+
translations: BarChartTranslations;
|
|
36
|
+
}) => string;
|
|
37
|
+
/**
|
|
38
|
+
* Calculates the value for a given label position (scale min is always 0).
|
|
39
|
+
*/
|
|
40
|
+
export declare const getLabel: ({ tickCount, labelIndex, maxScaleValue, }: {
|
|
41
|
+
tickCount: ScaleTickCount;
|
|
42
|
+
labelIndex: number;
|
|
43
|
+
maxScaleValue: MaxScaleValue;
|
|
44
|
+
}) => number;
|
|
45
|
+
/**
|
|
46
|
+
* Calculates the percentage position for a given value within 0–maxScaleValue range.
|
|
47
|
+
* Returns a value between 0 and 100 representing the position percentage.
|
|
48
|
+
*/
|
|
49
|
+
export declare const calculatePositionPercent: ({ value, maxScaleValue, }: {
|
|
50
|
+
value: number;
|
|
51
|
+
maxScaleValue: MaxScaleValue;
|
|
52
|
+
}) => number;
|
|
53
|
+
/**
|
|
54
|
+
* Generates a stable key for a bar row (for React list keys).
|
|
55
|
+
*/
|
|
56
|
+
export declare const getBarRowKey: (bar: Pick<BarProps, 'categoryLabel' | 'seriesOneValue' | 'seriesTwoValue'>, index: number) => string;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { getDefaultSingleValueBarSummary, getDefaultStackedBarSummary } from '../shared/translations';
|
|
2
|
+
export const calculatePercent = ({
|
|
3
|
+
value,
|
|
4
|
+
total
|
|
5
|
+
}) => {
|
|
6
|
+
return value / total * 100;
|
|
7
|
+
};
|
|
8
|
+
export const calculateBarWidth = ({
|
|
9
|
+
value,
|
|
10
|
+
maxScaleValue
|
|
11
|
+
}) => {
|
|
12
|
+
const adjustedValue = Math.max(0, Math.min(maxScaleValue, value));
|
|
13
|
+
return Math.floor(calculatePercent({
|
|
14
|
+
value: adjustedValue,
|
|
15
|
+
total: maxScaleValue
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Formats a numeric value with optional unit for bar chart labels.
|
|
21
|
+
*/
|
|
22
|
+
export const formatValueWithUnit = ({
|
|
23
|
+
value,
|
|
24
|
+
unit,
|
|
25
|
+
locale = 'en'
|
|
26
|
+
}) => {
|
|
27
|
+
const formatted = Intl.NumberFormat(locale).format(value);
|
|
28
|
+
return unit ? `${formatted} ${unit}` : formatted;
|
|
29
|
+
};
|
|
30
|
+
export const formatNumberUnitCompact = ({
|
|
31
|
+
num,
|
|
32
|
+
locale = 'en'
|
|
33
|
+
}) => Intl.NumberFormat(locale, {
|
|
34
|
+
notation: 'compact',
|
|
35
|
+
compactDisplay: 'short'
|
|
36
|
+
}).format(num);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Sort bars based on sortBy and order configuration
|
|
40
|
+
*/
|
|
41
|
+
export const sortBars = ({
|
|
42
|
+
bars,
|
|
43
|
+
sortBy,
|
|
44
|
+
order
|
|
45
|
+
}) => {
|
|
46
|
+
if (sortBy === 'none' || !sortBy) {
|
|
47
|
+
return bars;
|
|
48
|
+
}
|
|
49
|
+
const sorted = [...bars].sort((a, b) => {
|
|
50
|
+
if (sortBy === 'label') {
|
|
51
|
+
return a.categoryLabel.localeCompare(b.categoryLabel);
|
|
52
|
+
}
|
|
53
|
+
const aValue = a.seriesTwoValue ?? a.seriesOneValue;
|
|
54
|
+
const bValue = b.seriesTwoValue ?? b.seriesOneValue;
|
|
55
|
+
return aValue - bValue;
|
|
56
|
+
});
|
|
57
|
+
return order === 'descending' ? sorted.reverse() : sorted;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Returns the accessibility summary for a bar row. The summary is used as aria-label on the row's link/button when interactive, or as screenreader-only text when not. Summaries come from stackedBarSummary (stacked rows) or singleValueBarSummary (single-value rows), with default implementations when not overridden.
|
|
62
|
+
*/
|
|
63
|
+
export const getValuesSummary = ({
|
|
64
|
+
seriesOneValue,
|
|
65
|
+
seriesTwoValue,
|
|
66
|
+
unit,
|
|
67
|
+
categoryLabel,
|
|
68
|
+
translations
|
|
69
|
+
}) => {
|
|
70
|
+
const {
|
|
71
|
+
locale
|
|
72
|
+
} = translations;
|
|
73
|
+
const singleValueCtx = {
|
|
74
|
+
value: seriesOneValue,
|
|
75
|
+
unit,
|
|
76
|
+
locale,
|
|
77
|
+
categoryLabel
|
|
78
|
+
};
|
|
79
|
+
if (seriesTwoValue !== undefined) {
|
|
80
|
+
const gained = seriesTwoValue - seriesOneValue;
|
|
81
|
+
const stackedCtx = {
|
|
82
|
+
categoryLabel,
|
|
83
|
+
seriesOneValue,
|
|
84
|
+
seriesTwoValue,
|
|
85
|
+
unit,
|
|
86
|
+
locale,
|
|
87
|
+
gained
|
|
88
|
+
};
|
|
89
|
+
return (translations.accessibility.stackedBarSummary ?? getDefaultStackedBarSummary)(stackedCtx);
|
|
90
|
+
}
|
|
91
|
+
return (translations.accessibility.singleValueBarSummary ?? getDefaultSingleValueBarSummary)(singleValueCtx);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Calculates the value for a given label position (scale min is always 0).
|
|
96
|
+
*/
|
|
97
|
+
export const getLabel = ({
|
|
98
|
+
tickCount,
|
|
99
|
+
labelIndex,
|
|
100
|
+
maxScaleValue
|
|
101
|
+
}) => {
|
|
102
|
+
if (tickCount <= 1) return maxScaleValue;
|
|
103
|
+
const incrementalDecimal = labelIndex / (tickCount - 1);
|
|
104
|
+
return Math.floor(incrementalDecimal * maxScaleValue);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Calculates the percentage position for a given value within 0–maxScaleValue range.
|
|
109
|
+
* Returns a value between 0 and 100 representing the position percentage.
|
|
110
|
+
*/
|
|
111
|
+
export const calculatePositionPercent = ({
|
|
112
|
+
value,
|
|
113
|
+
maxScaleValue
|
|
114
|
+
}) => {
|
|
115
|
+
if (maxScaleValue === 0) return 0;
|
|
116
|
+
return value / maxScaleValue * 100;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Generates a stable key for a bar row (for React list keys).
|
|
121
|
+
*/
|
|
122
|
+
export const getBarRowKey = (bar, index) => bar.categoryLabel && bar.seriesOneValue ? `${bar.categoryLabel}-${bar.seriesOneValue}-${bar.seriesTwoValue ?? ''}-${index}` : String(index);
|
|
@@ -122,9 +122,9 @@ export declare function useDebouncedField<T extends InputTypes>({ name, watchUpd
|
|
|
122
122
|
value: T extends "checkbox" ? boolean : string;
|
|
123
123
|
error: string | FieldError | Merge<FieldError, FieldErrorsImpl<any>> | undefined;
|
|
124
124
|
ref: import("react-hook-form").UseFormRegisterReturn<string>;
|
|
125
|
-
control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any, import("react-hook-form").FieldValues>;
|
|
126
125
|
isDisabled: boolean;
|
|
127
126
|
isLoading: boolean | undefined;
|
|
127
|
+
control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any, import("react-hook-form").FieldValues>;
|
|
128
128
|
isSoloField: boolean | undefined;
|
|
129
129
|
validation: RegisterOptions | undefined;
|
|
130
130
|
getValues: import("react-hook-form").UseFormGetValues<import("react-hook-form").FieldValues>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { theme as GamutTheme } from '@codecademy/gamut-styles';
|
|
2
2
|
import { StylesConfig } from 'react-select';
|
|
3
|
-
export declare const conditionalBorderStates: (props: Partial<Record<"error" | "
|
|
3
|
+
export declare const conditionalBorderStates: (props: Partial<Record<"error" | "activated" | "isDisabled" | "isFocused", boolean>> & {
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
}) => import("@codecademy/variance").CSSObject;
|
|
6
6
|
export declare const getMemoizedStyles: (theme: typeof GamutTheme, zIndex?: number) => StylesConfig<any, false>;
|
|
@@ -526,7 +526,7 @@ declare const StyledForm: import("@emotion/styled").StyledComponent<{
|
|
|
526
526
|
}>;
|
|
527
527
|
} & {
|
|
528
528
|
theme?: import("@emotion/react").Theme | undefined;
|
|
529
|
-
}, Pick<React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "name" | "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "method" | "target" | "
|
|
529
|
+
}, Pick<React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "name" | "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "method" | "target" | "autoComplete" | "acceptCharset" | "action" | "encType" | "noValidate" | keyof React.ClassAttributes<HTMLFormElement>>, {}>;
|
|
530
530
|
export type FormProps = ComponentProps<typeof StyledForm>;
|
|
531
531
|
export declare const Form: React.FC<FormProps>;
|
|
532
532
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
2
|
import { states, variant } from '@codecademy/gamut-styles';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { FlexBox } from '
|
|
4
|
+
import { FlexBox } from '../../Box';
|
|
5
5
|
import { InfoTip } from '../../Tip/InfoTip';
|
|
6
6
|
import { useInfotipProps } from '../../Tip/InfoTip/type-utils';
|
|
7
7
|
import { Text } from '../../Typography/Text';
|
|
@@ -31,7 +31,7 @@ const labelStates = states({
|
|
|
31
31
|
const Label = /*#__PURE__*/_styled("label", {
|
|
32
32
|
target: "e1t0n89n0",
|
|
33
33
|
label: "Label"
|
|
34
|
-
})(labelSizeVariants, labelStates, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
34
|
+
})(labelSizeVariants, labelStates, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Gb3JtL2VsZW1lbnRzL0Zvcm1Hcm91cExhYmVsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1RGMiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL0Zvcm0vZWxlbWVudHMvRm9ybUdyb3VwTGFiZWwudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc3RhdGVz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lxuICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgIHshaXNTb2xvRmllbGQgJiZcbiAgICAgICAgICAocmVxdWlyZWQgPyAoXG4gICAgICAgICAgICA8VGV4dCBhcmlhLWhpZGRlbiBhcz1cInNwYW5cIj5cbiAgICAgICAgICAgICAgKlxuICAgICAgICAgICAgPC9UZXh0PlxuICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAnXFx1MDBBMChvcHRpb25hbCknXG4gICAgICAgICAgKSl9XG4gICAgICA8L0xhYmVsPlxuICAgICAge2luZm90aXBQcm9wcyAmJiA8SW5mb1RpcCB7Li4uaW5mb3RpcFByb3BzfSAvPn1cbiAgICA8L0ZsZXhCb3g+XG4gICk7XG59O1xuIl19 */");
|
|
35
35
|
export const FormGroupLabel = ({
|
|
36
36
|
children,
|
|
37
37
|
className,
|
|
@@ -14,7 +14,8 @@ const selectSizeVariants = variant({
|
|
|
14
14
|
variants: {
|
|
15
15
|
small: {
|
|
16
16
|
height: '2rem',
|
|
17
|
-
|
|
17
|
+
pl: 8,
|
|
18
|
+
pr: 16,
|
|
18
19
|
py: 0
|
|
19
20
|
},
|
|
20
21
|
base: {
|
|
@@ -26,19 +27,19 @@ const selectSizeVariants = variant({
|
|
|
26
27
|
const SelectBase = /*#__PURE__*/_styled("select", {
|
|
27
28
|
target: "e1y2qbta1",
|
|
28
29
|
label: "SelectBase"
|
|
29
|
-
})(formFieldStyles, " ", conditionalStyles, " ", selectSizeVariants, " cursor:pointer;-moz-appearance:none;-webkit-appearance:none;appearance:none;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
30
|
+
})(formFieldStyles, " ", conditionalStyles, " ", selectSizeVariants, " cursor:pointer;-moz-appearance:none;-webkit-appearance:none;appearance:none;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4u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VNlbGVjdE9wdGlvbnMoeyBvcHRpb25zLCBpZCB9KTtcbiAgICB9LCBbb3B0aW9ucywgaWRdKTtcblxuICAgIHJldHVybiAoXG4gICAgICA8Qm94XG4gICAgICAgIGNsYXNzTmFtZT17Y2xhc3NOYW1lfVxuICAgICAgICBtaW5XaWR0aD1cIjdyZW1cIlxuICAgICAgICBwb3NpdGlvbj1cInJlbGF0aXZlXCJcbiAgICAgICAgd2lkdGg9XCIxMDAlXCJcbiAgICAgID5cbiAgICAgICAgPFN0eWxlZEZsZXhib3hcbiAgICAgICAgICBhbGlnbkl0ZW1zPVwiY2VudGVyXCJcbiAgICAgICAgICBhcmlhLWhpZGRlblxuICAgICAgICAgIGJvdHRvbT1cIjBcIlxuICAgICAgICAgIGNvbG9yPXtlcnJvciA/ICdmZWVkYmFjay1lcnJvcicgOiBkaXNhYmxlZCA/ICd0ZXh0LWRpc2FibGVkJyA6ICd0ZXh0J31cbiAgICAgICAgICBwb3NpdGlvbj1cImFic29sdXRlXCJcbiAgICAgICAgICBwcj17MTJ9XG4gICAgICAgICAgcmlnaHQ9e3NpemVWYXJpYW50ID09PSAnc21hbGwnID8gNCA6IDB9XG4gICAgICAgICAgdG9wPVwiMFwiXG4gICAgICAgID5cbiAgICAgICAgICB7c2l6ZVZhcmlhbnQgPT09ICdzbWFsbCcgPyAoXG4gICAgICAgICAgICA8TWluaUNoZXZyb25Eb3duSWNvbiBzaXplPXsxMn0gLz5cbiAgICAgICAgICApIDogKFxuICAgICAgICAgICAgPEFycm93Q2hldnJvbkRvd25JY29uIHNpemU9ezE2fSAvPlxuICAgICAgICAgICl9XG4gICAgICAgIDwvU3R5bGVkRmxleGJveD5cbiAgICAgICAgPFNlbGVjdEJhc2VcbiAgICAgICAgICB7Li4ucmVzdH1cbiAgICAgICAgICBkZWZhdWx0VmFsdWU9e2RlZmF1bHRWYWx1ZSB8fCAnJ31cbiAgICAgICAgICBkaXNhYmxlZD17ZGlzYWJsZWR9XG4gICAgICAgICAgZXJyb3I9e2Vycm9yfVxuICAgICAgICAgIGlkPXtpZCB8fCByZXN0Lmh0bWxGb3J9XG4gICAgICAgICAgcmVmPXtyZWZ9XG4gICAgICAgICAgc2l6ZVZhcmlhbnQ9e3NpemVWYXJpYW50fVxuICAgICAgICAgIHZhcmlhbnQ9e2NvbmRpdGlvbmFsU3R5bGVTdGF0ZShCb29sZWFuKGVycm9yKSwgYWN0aXZhdGVkU3R5bGUpfVxuICAgICAgICAgIG9uQ2hhbmdlPXsoZXZlbnQpID0+IGNoYW5nZUhhbmRsZXIoZXZlbnQpfVxuICAgICAgICA+XG4gICAgICAgICAge3NlbGVjdE9wdGlvbnN9XG4gICAgICAgIDwvU2VsZWN0QmFzZT5cbiAgICAgIDwvQm94PlxuICAgICk7XG4gIH1cbik7XG4iXX0= */"));
|
|
30
31
|
const allowClickStyle = process.env.NODE_ENV === "production" ? {
|
|
31
32
|
name: "ryl2s-allowClickStyle",
|
|
32
33
|
styles: "pointer-events:none;label:allowClickStyle;"
|
|
33
34
|
} : {
|
|
34
35
|
name: "ryl2s-allowClickStyle",
|
|
35
|
-
styles: "pointer-events:none;label:allowClickStyle;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
36
|
+
styles: "pointer-events:none;label:allowClickStyle;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Gb3JtL2lucHV0cy9TZWxlY3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVFMkIiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL0Zvcm0vaW5wdXRzL1NlbGVjdC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBBcnJvd0NoZXZyb25Eb3duSWNvbixcbiAgTWluaUNoZXZyb25Eb3duSWNvbixcbn0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtaWNvbnMnO1xuaW1wb3J0IHsgdmF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pfVxuICAgICAgICA+XG4gICAgICAgICAge3NlbGVjdE9wdGlvbnN9XG4gICAgICAgIDwvU2VsZWN0QmFzZT5cbiAgICAgIDwvQm94PlxuICAgICk7XG4gIH1cbik7XG4iXX0= */",
|
|
36
37
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
37
38
|
};
|
|
38
39
|
const StyledFlexbox = /*#__PURE__*/_styled(FlexBox, {
|
|
39
40
|
target: "e1y2qbta0",
|
|
40
41
|
label: "StyledFlexbox"
|
|
41
|
-
})(allowClickStyle, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
42
|
+
})(allowClickStyle, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Gb3JtL2lucHV0cy9TZWxlY3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTJFc0IiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL0Zvcm0vaW5wdXRzL1NlbGVjdC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBBcnJvd0NoZXZyb25Eb3duSWNvbixcbiAgTWluaUNoZXZyb25Eb3duSWNvbixcbn0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtaWNvbnMnO1xuaW1wb3J0IHsgdmFyaWFudCB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgeyBTdHlsZVByb3BzIH0gZnJvbSAnQGNvZGVjYWRlbXkvdmFyaWFuY2UnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHtcbiAgQ2hhbmdlRXZlbnQsXG4gIGZvcndhcmRSZWYsXG4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50ID09PSAnc21hbGwnID8gNCA6IDB9XG4gICAgICAgICAgdG9wPVwiMFwiXG4gICAgICAgID5cbiAgICAgICAgICB7c2l6ZVZhcmlhbnQgPT09ICdzbWFsbCcgPyAoXG4gICAgICAgICAgICA8TWluaUNoZXZyb25Eb3duSWNvbiBzaXplPXsxMn0gLz5cbiAgICAgICAgICApIDogKFxuICAgICAgICAgICAgPEFycm93Q2hldnJvbkRvd25JY29uIHNpemU9ezE2fSAvPlxuICAgICAgICAgICl9XG4gICAgICAgIDwvU3R5bGVkRmxleGJveD5cbiAgICAgICAgPFNlbGVjdEJhc2VcbiAgICAgICAgICB7Li4ucmVzdH1cbiAgICAgICAgICBkZWZhdWx0VmFsdWU9e2RlZmF1bHRWYWx1ZSB8fCAnJ31cbiAgICAgICAgICBkaXNhYmxlZD17ZGlzYWJsZWR9XG4gICAgICAgICAgZXJyb3I9e2Vycm9yfVxuICAgICAgICAgIGlkPXtpZCB8fCByZXN0Lmh0bWxGb3J9XG4gICAgICAgICAgcmVmPXtyZWZ9XG4gICAgICAgICAgc2l6ZVZhcmlhbnQ9e3NpemVWYXJpYW50fVxuICAgICAgICAgIHZhcmlhbnQ9e2NvbmRpdGlvbmFsU3R5bGVTdGF0ZShCb29sZWFuKGVycm9yKSwgYWN0aXZhdGVkU3R5bGUpfVxuICAgICAgICAgIG9uQ2hhbmdlPXsoZXZlbnQpID0+IGNoYW5nZUhhbmRsZXIoZXZlbnQpfVxuICAgICAgICA+XG4gICAgICAgICAge3NlbGVjdE9wdGlvbnN9XG4gICAgICAgIDwvU2VsZWN0QmFzZT5cbiAgICAgIDwvQm94PlxuICAgICk7XG4gIH1cbik7XG4iXX0= */");
|
|
42
43
|
export const Select = /*#__PURE__*/forwardRef(({
|
|
43
44
|
className,
|
|
44
45
|
defaultValue,
|
|
@@ -72,7 +73,7 @@ export const Select = /*#__PURE__*/forwardRef(({
|
|
|
72
73
|
color: error ? 'feedback-error' : disabled ? 'text-disabled' : 'text',
|
|
73
74
|
position: "absolute",
|
|
74
75
|
pr: 12,
|
|
75
|
-
right:
|
|
76
|
+
right: sizeVariant === 'small' ? 4 : 0,
|
|
76
77
|
top: "0",
|
|
77
78
|
children: sizeVariant === 'small' ? /*#__PURE__*/_jsx(MiniChevronDownIcon, {
|
|
78
79
|
size: 12
|