@codecademy/gamut 68.1.1-alpha.aaebbc.0 → 68.1.1-alpha.b9019a.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.
Files changed (136) hide show
  1. package/README.md +0 -17
  2. package/dist/AccordionAreaDeprecated/index.js +2 -2
  3. package/dist/Alert/elements.d.ts +7 -14
  4. package/dist/Alert/elements.js +5 -5
  5. package/dist/Anchor/index.d.ts +7 -11
  6. package/dist/Anchor/index.js +3 -4
  7. package/dist/Animation/ExpandInCollapseOut.js +1 -1
  8. package/dist/Animation/FadeInSlideOut.js +1 -1
  9. package/dist/Animation/Rotation.js +1 -1
  10. package/dist/BarChart/BarChartProvider.d.ts +19 -0
  11. package/dist/BarChart/BarChartProvider.js +27 -0
  12. package/dist/BarChart/BarRow/ValueLabelsContent.d.ts +7 -0
  13. package/dist/BarChart/BarRow/ValueLabelsContent.js +34 -0
  14. package/dist/BarChart/BarRow/elements.d.ts +943 -0
  15. package/dist/BarChart/BarRow/elements.js +102 -0
  16. package/dist/BarChart/BarRow/index.d.ts +6 -0
  17. package/dist/BarChart/BarRow/index.js +235 -0
  18. package/dist/BarChart/GENERIC_EXAMPLE.d.ts +14 -0
  19. package/dist/BarChart/GENERIC_EXAMPLE.js +327 -0
  20. package/dist/BarChart/SortSelect/index.d.ts +15 -0
  21. package/dist/BarChart/SortSelect/index.js +18 -0
  22. package/dist/BarChart/index.d.ts +4 -0
  23. package/dist/BarChart/index.js +136 -0
  24. package/dist/BarChart/layout/GridLines.d.ts +3 -0
  25. package/dist/BarChart/layout/GridLines.js +69 -0
  26. package/dist/BarChart/layout/LabelSpacer.d.ts +6 -0
  27. package/dist/BarChart/layout/LabelSpacer.js +56 -0
  28. package/dist/BarChart/layout/ScaleChartHeader.d.ts +3 -0
  29. package/dist/BarChart/layout/ScaleChartHeader.js +87 -0
  30. package/dist/BarChart/shared/elements.d.ts +7 -0
  31. package/dist/BarChart/shared/elements.js +12 -0
  32. package/dist/BarChart/shared/styles.d.ts +4 -0
  33. package/dist/BarChart/shared/styles.js +4 -0
  34. package/dist/BarChart/shared/translations.d.ts +69 -0
  35. package/dist/BarChart/shared/translations.js +57 -0
  36. package/dist/BarChart/shared/types.d.ts +100 -0
  37. package/dist/BarChart/shared/types.js +1 -0
  38. package/dist/BarChart/utils/hooks.d.ts +89 -0
  39. package/dist/BarChart/utils/hooks.js +281 -0
  40. package/dist/BarChart/utils/index.d.ts +56 -0
  41. package/dist/BarChart/utils/index.js +122 -0
  42. package/dist/Box/Box.d.ts +4 -6
  43. package/dist/Box/Box.js +3 -5
  44. package/dist/Box/FlexBox.d.ts +4 -6
  45. package/dist/Box/FlexBox.js +3 -5
  46. package/dist/Box/GridBox.d.ts +4 -7
  47. package/dist/Box/GridBox.js +3 -5
  48. package/dist/Box/props.d.ts +3 -3
  49. package/dist/Button/CTAButton.d.ts +3 -8
  50. package/dist/Button/FillButton.d.ts +7 -17
  51. package/dist/Button/IconButton.d.ts +7 -17
  52. package/dist/Button/StrokeButton.d.ts +7 -17
  53. package/dist/Button/TextButton.d.ts +7 -17
  54. package/dist/Button/shared/InlineIconButton.d.ts +4 -9
  55. package/dist/Button/shared/styles.d.ts +4 -9
  56. package/dist/Button/shared/types.d.ts +1 -2
  57. package/dist/ButtonBase/ButtonBase.d.ts +3 -9
  58. package/dist/ButtonBase/ButtonBase.js +2 -2
  59. package/dist/Card/elements.d.ts +109 -119
  60. package/dist/Card/styles.d.ts +8 -8
  61. package/dist/Card/types.d.ts +1 -1
  62. package/dist/Coachmark/index.d.ts +1 -1
  63. package/dist/ConnectedForm/ConnectedForm.d.ts +1 -9
  64. package/dist/ConnectedForm/ConnectedForm.js +1 -9
  65. package/dist/ConnectedForm/utils.d.ts +8 -2
  66. package/dist/ContentContainer/index.d.ts +2 -4
  67. package/dist/Disclosure/elements.d.ts +22 -43
  68. package/dist/Disclosure/index.js +1 -1
  69. package/dist/Drawer/index.js +2 -2
  70. package/dist/FeatureShimmer/index.js +2 -2
  71. package/dist/Form/SelectDropdown/SelectDropdown.js +1 -1
  72. package/dist/Form/SelectDropdown/styles.d.ts +1 -1
  73. package/dist/Form/SelectDropdown/types/internal.d.ts +1 -1
  74. package/dist/Form/elements/Form.d.ts +17 -17
  75. package/dist/Form/elements/Form.js +1 -1
  76. package/dist/Form/elements/FormError.d.ts +2 -2
  77. package/dist/Form/elements/FormError.js +1 -1
  78. package/dist/Form/elements/FormGroup.d.ts +3 -5
  79. package/dist/Form/elements/FormGroupLabel.js +2 -2
  80. package/dist/Form/inputs/Checkbox.d.ts +1 -1
  81. package/dist/Form/inputs/Checkbox.js +7 -7
  82. package/dist/Form/inputs/Input.d.ts +1 -2
  83. package/dist/Form/inputs/Input.js +2 -4
  84. package/dist/Form/inputs/Radio.d.ts +1 -1
  85. package/dist/Form/inputs/Radio.js +2 -2
  86. package/dist/Form/inputs/Select.d.ts +1 -1
  87. package/dist/Form/inputs/Select.js +6 -5
  88. package/dist/Form/inputs/TextArea.d.ts +5 -5
  89. package/dist/Form/inputs/TextArea.js +2 -2
  90. package/dist/GridForm/GridFormButtons/index.d.ts +7 -17
  91. package/dist/List/Header/ListHeaderCol.d.ts +2 -3
  92. package/dist/List/List.d.ts +2 -2
  93. package/dist/List/ListCol.d.ts +2 -3
  94. package/dist/List/ListProvider.d.ts +1 -1
  95. package/dist/List/ListRow.d.ts +2 -2
  96. package/dist/List/ListRow.js +3 -3
  97. package/dist/List/TableHeader.d.ts +2 -3
  98. package/dist/List/elements.d.ts +933 -30
  99. package/dist/List/elements.js +8 -10
  100. package/dist/Menu/elements.d.ts +2 -2
  101. package/dist/Modals/elements.d.ts +1 -1
  102. package/dist/Modals/types.d.ts +4 -5
  103. package/dist/Pagination/AnimatedPaginationButtons.d.ts +36 -45
  104. package/dist/Pagination/EllipsisButton.d.ts +8 -18
  105. package/dist/Pagination/PaginationButton.d.ts +10 -25
  106. package/dist/Pagination/utils.d.ts +32 -36
  107. package/dist/Pagination/utils.js +10 -6
  108. package/dist/Popover/elements.d.ts +4 -8
  109. package/dist/Popover/elements.js +6 -6
  110. package/dist/Popover/types.d.ts +2 -2
  111. package/dist/PopoverContainer/hooks.d.ts +2 -2
  112. package/dist/PopoverContainer/types.d.ts +1 -1
  113. package/dist/Tabs/TabButton.d.ts +3 -8
  114. package/dist/Tabs/TabNavLink.d.ts +4 -9
  115. package/dist/Tag/elements.d.ts +22 -27
  116. package/dist/Tip/InfoTip/InfoTipButton.d.ts +7 -17
  117. package/dist/Tip/InfoTip/styles.d.ts +2 -4
  118. package/dist/Tip/PreviewTip/elements.d.ts +8 -12
  119. package/dist/Tip/ToolTip/elements.d.ts +2 -4
  120. package/dist/Tip/__tests__/helpers.d.ts +1 -1
  121. package/dist/Tip/shared/FloatingTip.js +2 -2
  122. package/dist/Tip/shared/elements.d.ts +6 -12
  123. package/dist/Tip/shared/types.d.ts +2 -2
  124. package/dist/Toaster/index.js +1 -1
  125. package/dist/Toggle/elements.d.ts +2 -4
  126. package/dist/Typography/Text.d.ts +9 -11
  127. package/dist/Typography/Text.js +2 -4
  128. package/dist/index.d.ts +1 -0
  129. package/dist/index.js +1 -0
  130. package/dist/utils/index.d.ts +1 -1
  131. package/dist/utils/index.js +1 -1
  132. package/dist/utils/react.d.ts +0 -1
  133. package/dist/utils/react.js +1 -4
  134. package/dist/utils/types.d.ts +1 -51
  135. package/dist/utils/types.js +1 -48
  136. package/package.json +11 -12
@@ -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);
package/dist/Box/Box.d.ts CHANGED
@@ -1,9 +1,7 @@
1
- import React from 'react';
2
- import type { CompatibleStyledComponentProps } from '../utils/types';
1
+ /// <reference types="react" />
3
2
  import { BoxProps } from './props';
4
- declare const StyledBox: import("@emotion/styled").StyledComponent<{
3
+ export declare const Box: import("@emotion/styled").StyledComponent<{
5
4
  theme?: import("@emotion/react").Theme | undefined;
6
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
7
- } & BoxProps, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | keyof React.ClassAttributes<HTMLDivElement> | "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">, {}>;
8
- export declare const Box: React.ForwardRefExoticComponent<CompatibleStyledComponentProps<typeof StyledBox, HTMLDivElement>> & Pick<typeof StyledBox, 'withComponent'>;
5
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ } & BoxProps, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | keyof import("react").ClassAttributes<HTMLDivElement> | "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">, {}>;
9
7
  export type { BoxProps } from './props';
package/dist/Box/Box.js CHANGED
@@ -1,10 +1,8 @@
1
1
  import _styled from "@emotion/styled/base";
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  import { styledOptions } from '@codecademy/gamut-styles';
4
- import { asCompatibleForwardRefComponentWithStyled } from '../utils/types';
5
4
  import { boxProps, sharedStates } from './props';
6
- const StyledBox = /*#__PURE__*/_styled('div', _extends({}, {
5
+ export const Box = /*#__PURE__*/_styled('div', _extends({}, {
7
6
  target: "ebnwbv90",
8
- label: "StyledBox"
9
- }, styledOptions(['fit'])))(sharedStates, boxProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Cb3gvQm94LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRa0IiLCJmaWxlIjoiLi4vLi4vc3JjL0JveC9Cb3gudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc3R5bGVkT3B0aW9ucyB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuXG5pbXBvcnQgdHlwZSB7IENvbXBhdGlibGVTdHlsZWRDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL3V0aWxzL3R5cGVzJztcbmltcG9ydCB7IGFzQ29tcGF0aWJsZUZvcndhcmRSZWZDb21wb25lbnRXaXRoU3R5bGVkIH0gZnJvbSAnLi4vdXRpbHMvdHlwZXMnO1xuaW1wb3J0IHsgQm94UHJvcHMsIGJveFByb3BzLCBzaGFyZWRTdGF0ZXMgfSBmcm9tICcuL3Byb3BzJztcblxuY29uc3QgU3R5bGVkQm94ID0gc3R5bGVkKCdkaXYnLCBzdHlsZWRPcHRpb25zKFsnZml0J10pKTxCb3hQcm9wcz4oXG4gIHNoYXJlZFN0YXRlcyxcbiAgYm94UHJvcHNcbik7XG5cbmV4cG9ydCBjb25zdCBCb3g6IFJlYWN0LkZvcndhcmRSZWZFeG90aWNDb21wb25lbnQ8XG4gIENvbXBhdGlibGVTdHlsZWRDb21wb25lbnRQcm9wczx0eXBlb2YgU3R5bGVkQm94LCBIVE1MRGl2RWxlbWVudD5cbj4gJlxuICBQaWNrPHR5cGVvZiBTdHlsZWRCb3gsICd3aXRoQ29tcG9uZW50Jz4gPVxuICBhc0NvbXBhdGlibGVGb3J3YXJkUmVmQ29tcG9uZW50V2l0aFN0eWxlZDxcbiAgICBDb21wYXRpYmxlU3R5bGVkQ29tcG9uZW50UHJvcHM8dHlwZW9mIFN0eWxlZEJveCwgSFRNTERpdkVsZW1lbnQ+LFxuICAgIHR5cGVvZiBTdHlsZWRCb3hcbiAgPihTdHlsZWRCb3gpO1xuXG5leHBvcnQgdHlwZSB7IEJveFByb3BzIH0gZnJvbSAnLi9wcm9wcyc7XG4iXX0= */");
10
- export const Box = asCompatibleForwardRefComponentWithStyled(StyledBox);
7
+ label: "Box"
8
+ }, styledOptions(['fit'])))(sharedStates, boxProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Cb3gvQm94LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLbUIiLCJmaWxlIjoiLi4vLi4vc3JjL0JveC9Cb3gudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc3R5bGVkT3B0aW9ucyB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IEJveFByb3BzLCBib3hQcm9wcywgc2hhcmVkU3RhdGVzIH0gZnJvbSAnLi9wcm9wcyc7XG5cbmV4cG9ydCBjb25zdCBCb3ggPSBzdHlsZWQoJ2RpdicsIHN0eWxlZE9wdGlvbnMoWydmaXQnXSkpPEJveFByb3BzPihcbiAgc2hhcmVkU3RhdGVzLFxuICBib3hQcm9wc1xuKTtcblxuZXhwb3J0IHR5cGUgeyBCb3hQcm9wcyB9IGZyb20gJy4vcHJvcHMnO1xuIl19 */");
@@ -1,9 +1,7 @@
1
- import React from 'react';
2
- import type { CompatibleStyledComponentProps } from '../utils/types';
1
+ /// <reference types="react" />
3
2
  import { FlexBoxProps } from './props';
4
- declare const StyledFlexBox: import("@emotion/styled").StyledComponent<{
3
+ export declare const FlexBox: import("@emotion/styled").StyledComponent<{
5
4
  theme?: import("@emotion/react").Theme | undefined;
6
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
7
- } & FlexBoxProps, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | keyof React.ClassAttributes<HTMLDivElement> | "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">, {}>;
8
- export declare const FlexBox: React.ForwardRefExoticComponent<CompatibleStyledComponentProps<typeof StyledFlexBox, HTMLDivElement>> & Pick<typeof StyledFlexBox, 'withComponent'>;
5
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ } & FlexBoxProps, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | keyof import("react").ClassAttributes<HTMLDivElement> | "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">, {}>;
9
7
  export type { FlexBoxProps } from './props';
@@ -1,12 +1,10 @@
1
1
  import _styled from "@emotion/styled/base";
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  import { css, styledOptions } from '@codecademy/gamut-styles';
4
- import { asCompatibleForwardRefComponentWithStyled } from '../utils/types';
5
4
  import { boxProps, flexStates, sharedStates } from './props';
6
- const StyledFlexBox = /*#__PURE__*/_styled('div', _extends({}, {
5
+ export const FlexBox = /*#__PURE__*/_styled('div', _extends({}, {
7
6
  target: "e1tc6bzh0",
8
- label: "StyledFlexBox"
7
+ label: "FlexBox"
9
8
  }, styledOptions(['fit', 'wrap', 'center', 'column', 'row', 'inline'])))(css({
10
9
  display: 'flex'
11
- }), sharedStates, flexStates, boxProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Cb3gvRmxleEJveC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUXNCIiwiZmlsZSI6Ii4uLy4uL3NyYy9Cb3gvRmxleEJveC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MsIHN0eWxlZE9wdGlvbnMgfSBmcm9tICdAY29kZWNhZGVteS9nYW11dC1zdHlsZXMnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcblxuaW1wb3J0IHR5cGUgeyBDb21wYXRpYmxlU3R5bGVkQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi91dGlscy90eXBlcyc7XG5pbXBvcnQgeyBhc0NvbXBhdGlibGVGb3J3YXJkUmVmQ29tcG9uZW50V2l0aFN0eWxlZCB9IGZyb20gJy4uL3V0aWxzL3R5cGVzJztcbmltcG9ydCB7IGJveFByb3BzLCBGbGV4Qm94UHJvcHMsIGZsZXhTdGF0ZXMsIHNoYXJlZFN0YXRlcyB9IGZyb20gJy4vcHJvcHMnO1xuXG5jb25zdCBTdHlsZWRGbGV4Qm94ID0gc3R5bGVkKFxuICAnZGl2JyxcbiAgc3R5bGVkT3B0aW9ucyhbJ2ZpdCcsICd3cmFwJywgJ2NlbnRlcicsICdjb2x1bW4nLCAncm93JywgJ2lubGluZSddKVxuKTxGbGV4Qm94UHJvcHM+KGNzcyh7IGRpc3BsYXk6ICdmbGV4JyB9KSwgc2hhcmVkU3RhdGVzLCBmbGV4U3RhdGVzLCBib3hQcm9wcyk7XG5cbmV4cG9ydCBjb25zdCBGbGV4Qm94OiBSZWFjdC5Gb3J3YXJkUmVmRXhvdGljQ29tcG9uZW50PFxuICBDb21wYXRpYmxlU3R5bGVkQ29tcG9uZW50UHJvcHM8dHlwZW9mIFN0eWxlZEZsZXhCb3gsIEhUTUxEaXZFbGVtZW50PlxuPiAmXG4gIFBpY2s8dHlwZW9mIFN0eWxlZEZsZXhCb3gsICd3aXRoQ29tcG9uZW50Jz4gPVxuICBhc0NvbXBhdGlibGVGb3J3YXJkUmVmQ29tcG9uZW50V2l0aFN0eWxlZDxcbiAgICBDb21wYXRpYmxlU3R5bGVkQ29tcG9uZW50UHJvcHM8dHlwZW9mIFN0eWxlZEZsZXhCb3gsIEhUTUxEaXZFbGVtZW50PixcbiAgICB0eXBlb2YgU3R5bGVkRmxleEJveFxuICA+KFN0eWxlZEZsZXhCb3gpO1xuXG5leHBvcnQgdHlwZSB7IEZsZXhCb3hQcm9wcyB9IGZyb20gJy4vcHJvcHMnO1xuIl19 */");
12
- export const FlexBox = asCompatibleForwardRefComponentWithStyled(StyledFlexBox);
10
+ }), sharedStates, flexStates, boxProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Cb3gvRmxleEJveC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS3VCIiwiZmlsZSI6Ii4uLy4uL3NyYy9Cb3gvRmxleEJveC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MsIHN0eWxlZE9wdGlvbnMgfSBmcm9tICdAY29kZWNhZGVteS9nYW11dC1zdHlsZXMnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyBib3hQcm9wcywgRmxleEJveFByb3BzLCBmbGV4U3RhdGVzLCBzaGFyZWRTdGF0ZXMgfSBmcm9tICcuL3Byb3BzJztcblxuZXhwb3J0IGNvbnN0IEZsZXhCb3ggPSBzdHlsZWQoXG4gICdkaXYnLFxuICBzdHlsZWRPcHRpb25zKFsnZml0JywgJ3dyYXAnLCAnY2VudGVyJywgJ2NvbHVtbicsICdyb3cnLCAnaW5saW5lJ10pXG4pPEZsZXhCb3hQcm9wcz4oY3NzKHsgZGlzcGxheTogJ2ZsZXgnIH0pLCBzaGFyZWRTdGF0ZXMsIGZsZXhTdGF0ZXMsIGJveFByb3BzKTtcblxuZXhwb3J0IHR5cGUgeyBGbGV4Qm94UHJvcHMgfSBmcm9tICcuL3Byb3BzJztcbiJdfQ== */");
@@ -1,9 +1,6 @@
1
- import React from 'react';
2
- import type { CompatibleStyledComponentProps } from '../utils/types';
1
+ /// <reference types="react" />
3
2
  import { GridBoxProps } from './props';
4
- declare const StyledGridBox: import("@emotion/styled").StyledComponent<{
3
+ export declare const GridBox: import("@emotion/styled").StyledComponent<{
5
4
  theme?: import("@emotion/react").Theme | undefined;
6
- as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
7
- } & GridBoxProps, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | keyof React.ClassAttributes<HTMLDivElement> | "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">, {}>;
8
- export declare const GridBox: React.ForwardRefExoticComponent<CompatibleStyledComponentProps<typeof StyledGridBox, HTMLDivElement>> & Pick<typeof StyledGridBox, 'withComponent'>;
9
- export {};
5
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ } & GridBoxProps, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | keyof import("react").ClassAttributes<HTMLDivElement> | "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">, {}>;