@codecademy/gamut 68.0.1-alpha.4aeb6d.0 → 68.0.1-alpha.5950e5.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/Anchor/index.d.ts +12 -60
- package/dist/Badge/index.d.ts +14 -74
- package/dist/BarChart/BarChartProvider.d.ts +20 -0
- package/dist/BarChart/BarChartProvider.js +31 -0
- package/dist/BarChart/BarRow/elements.d.ts +719 -0
- package/dist/BarChart/BarRow/elements.js +97 -0
- package/dist/BarChart/BarRow/index.d.ts +26 -0
- package/dist/BarChart/BarRow/index.js +254 -0
- package/dist/BarChart/GENERIC_EXAMPLE.d.ts +14 -0
- package/dist/BarChart/GENERIC_EXAMPLE.js +333 -0
- package/dist/BarChart/index.d.ts +4 -0
- package/dist/BarChart/index.js +158 -0
- package/dist/BarChart/layout/GridLines.d.ts +7 -0
- package/dist/BarChart/layout/GridLines.js +78 -0
- package/dist/BarChart/layout/ScaleChartHeader.d.ts +10 -0
- package/dist/BarChart/layout/ScaleChartHeader.js +89 -0
- package/dist/BarChart/layout/VerticalSpacer.d.ts +6 -0
- package/dist/BarChart/layout/VerticalSpacer.js +56 -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 +68 -0
- package/dist/BarChart/shared/translations.js +52 -0
- package/dist/BarChart/shared/types.d.ts +92 -0
- package/dist/BarChart/shared/types.js +1 -0
- package/dist/BarChart/utils/hooks.d.ts +93 -0
- package/dist/BarChart/utils/hooks.js +293 -0
- package/dist/BarChart/utils/index.d.ts +88 -0
- package/dist/BarChart/utils/index.js +207 -0
- package/dist/Box/props.d.ts +40 -204
- package/dist/Button/shared/styles.d.ts +38 -190
- package/dist/Card/elements.d.ts +120 -612
- package/dist/ConnectedForm/utils.d.ts +1 -1
- package/dist/Form/SelectDropdown/styles.d.ts +1 -1
- package/dist/Form/elements/Form.d.ts +39 -191
- package/dist/Form/elements/FormGroupLabel.js +2 -2
- package/dist/Form/inputs/Select.js +6 -5
- package/dist/GridForm/GridFormSections/GridFormSectionBreak.d.ts +28 -144
- package/dist/InternalFloatingCard/InternalFloatingCard.d.ts +6 -30
- package/dist/Layout/Column.d.ts +12 -60
- package/dist/Layout/LayoutGrid.d.ts +12 -60
- package/dist/List/elements.d.ts +53 -265
- package/dist/Menu/elements.d.ts +40 -204
- package/dist/Pagination/AnimatedPaginationButtons.d.ts +38 -190
- package/dist/Pagination/utils.d.ts +38 -190
- package/dist/Tabs/props.d.ts +12 -60
- package/dist/Tag/types.d.ts +12 -60
- package/dist/Toggle/elements.d.ts +26 -134
- package/dist/Typography/Text.d.ts +14 -74
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +7 -7
package/dist/Anchor/index.d.ts
CHANGED
|
@@ -101,53 +101,29 @@ declare const anchorProps: import("@codecademy/variance/dist/types/config").Pars
|
|
|
101
101
|
};
|
|
102
102
|
readonly px: {
|
|
103
103
|
readonly property: "padding";
|
|
104
|
-
readonly properties:
|
|
105
|
-
readonly physical: readonly ["paddingLeft", "paddingRight"];
|
|
106
|
-
readonly logical: readonly ["paddingInlineStart", "paddingInlineEnd"];
|
|
107
|
-
};
|
|
104
|
+
readonly properties: readonly ["paddingLeft", "paddingRight"];
|
|
108
105
|
readonly scale: "spacing";
|
|
109
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
110
106
|
};
|
|
111
107
|
readonly py: {
|
|
112
108
|
readonly property: "padding";
|
|
113
|
-
readonly properties:
|
|
114
|
-
readonly physical: readonly ["paddingTop", "paddingBottom"];
|
|
115
|
-
readonly logical: readonly ["paddingBlockStart", "paddingBlockEnd"];
|
|
116
|
-
};
|
|
109
|
+
readonly properties: readonly ["paddingTop", "paddingBottom"];
|
|
117
110
|
readonly scale: "spacing";
|
|
118
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
119
111
|
};
|
|
120
112
|
readonly pt: {
|
|
121
|
-
readonly property:
|
|
122
|
-
readonly physical: "paddingTop";
|
|
123
|
-
readonly logical: "paddingBlockStart";
|
|
124
|
-
};
|
|
113
|
+
readonly property: "paddingTop";
|
|
125
114
|
readonly scale: "spacing";
|
|
126
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
127
115
|
};
|
|
128
116
|
readonly pb: {
|
|
129
|
-
readonly property:
|
|
130
|
-
readonly physical: "paddingBottom";
|
|
131
|
-
readonly logical: "paddingBlockEnd";
|
|
132
|
-
};
|
|
117
|
+
readonly property: "paddingBottom";
|
|
133
118
|
readonly scale: "spacing";
|
|
134
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
135
119
|
};
|
|
136
120
|
readonly pr: {
|
|
137
|
-
readonly property:
|
|
138
|
-
readonly physical: "paddingRight";
|
|
139
|
-
readonly logical: "paddingInlineEnd";
|
|
140
|
-
};
|
|
121
|
+
readonly property: "paddingRight";
|
|
141
122
|
readonly scale: "spacing";
|
|
142
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
143
123
|
};
|
|
144
124
|
readonly pl: {
|
|
145
|
-
readonly property:
|
|
146
|
-
readonly physical: "paddingLeft";
|
|
147
|
-
readonly logical: "paddingInlineStart";
|
|
148
|
-
};
|
|
125
|
+
readonly property: "paddingLeft";
|
|
149
126
|
readonly scale: "spacing";
|
|
150
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
151
127
|
};
|
|
152
128
|
readonly m: {
|
|
153
129
|
readonly property: "margin";
|
|
@@ -155,53 +131,29 @@ declare const anchorProps: import("@codecademy/variance/dist/types/config").Pars
|
|
|
155
131
|
};
|
|
156
132
|
readonly mx: {
|
|
157
133
|
readonly property: "margin";
|
|
158
|
-
readonly properties:
|
|
159
|
-
readonly physical: readonly ["marginLeft", "marginRight"];
|
|
160
|
-
readonly logical: readonly ["marginInlineStart", "marginInlineEnd"];
|
|
161
|
-
};
|
|
162
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
134
|
+
readonly properties: readonly ["marginLeft", "marginRight"];
|
|
163
135
|
readonly scale: "spacing";
|
|
164
136
|
};
|
|
165
137
|
readonly my: {
|
|
166
138
|
readonly property: "margin";
|
|
167
|
-
readonly properties:
|
|
168
|
-
readonly physical: readonly ["marginTop", "marginBottom"];
|
|
169
|
-
readonly logical: readonly ["marginBlockStart", "marginBlockEnd"];
|
|
170
|
-
};
|
|
171
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
139
|
+
readonly properties: readonly ["marginTop", "marginBottom"];
|
|
172
140
|
readonly scale: "spacing";
|
|
173
141
|
};
|
|
174
142
|
readonly mt: {
|
|
175
|
-
readonly property:
|
|
176
|
-
readonly physical: "marginTop";
|
|
177
|
-
readonly logical: "marginBlockStart";
|
|
178
|
-
};
|
|
143
|
+
readonly property: "marginTop";
|
|
179
144
|
readonly scale: "spacing";
|
|
180
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
181
145
|
};
|
|
182
146
|
readonly mb: {
|
|
183
|
-
readonly property:
|
|
184
|
-
readonly physical: "marginBottom";
|
|
185
|
-
readonly logical: "marginBlockEnd";
|
|
186
|
-
};
|
|
147
|
+
readonly property: "marginBottom";
|
|
187
148
|
readonly scale: "spacing";
|
|
188
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
189
149
|
};
|
|
190
150
|
readonly mr: {
|
|
191
|
-
readonly property:
|
|
192
|
-
readonly physical: "marginRight";
|
|
193
|
-
readonly logical: "marginInlineEnd";
|
|
194
|
-
};
|
|
151
|
+
readonly property: "marginRight";
|
|
195
152
|
readonly scale: "spacing";
|
|
196
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
197
153
|
};
|
|
198
154
|
readonly ml: {
|
|
199
|
-
readonly property:
|
|
200
|
-
readonly physical: "marginLeft";
|
|
201
|
-
readonly logical: "marginInlineStart";
|
|
202
|
-
};
|
|
155
|
+
readonly property: "marginLeft";
|
|
203
156
|
readonly scale: "spacing";
|
|
204
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
205
157
|
};
|
|
206
158
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
207
159
|
readonly fontFamily: {
|
package/dist/Badge/index.d.ts
CHANGED
|
@@ -15,53 +15,29 @@ declare const badgeProps: import("@codecademy/variance/dist/types/config").Parse
|
|
|
15
15
|
};
|
|
16
16
|
readonly px: {
|
|
17
17
|
readonly property: "padding";
|
|
18
|
-
readonly properties:
|
|
19
|
-
readonly physical: readonly ["paddingLeft", "paddingRight"];
|
|
20
|
-
readonly logical: readonly ["paddingInlineStart", "paddingInlineEnd"];
|
|
21
|
-
};
|
|
18
|
+
readonly properties: readonly ["paddingLeft", "paddingRight"];
|
|
22
19
|
readonly scale: "spacing";
|
|
23
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
24
20
|
};
|
|
25
21
|
readonly py: {
|
|
26
22
|
readonly property: "padding";
|
|
27
|
-
readonly properties:
|
|
28
|
-
readonly physical: readonly ["paddingTop", "paddingBottom"];
|
|
29
|
-
readonly logical: readonly ["paddingBlockStart", "paddingBlockEnd"];
|
|
30
|
-
};
|
|
23
|
+
readonly properties: readonly ["paddingTop", "paddingBottom"];
|
|
31
24
|
readonly scale: "spacing";
|
|
32
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
33
25
|
};
|
|
34
26
|
readonly pt: {
|
|
35
|
-
readonly property:
|
|
36
|
-
readonly physical: "paddingTop";
|
|
37
|
-
readonly logical: "paddingBlockStart";
|
|
38
|
-
};
|
|
27
|
+
readonly property: "paddingTop";
|
|
39
28
|
readonly scale: "spacing";
|
|
40
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
41
29
|
};
|
|
42
30
|
readonly pb: {
|
|
43
|
-
readonly property:
|
|
44
|
-
readonly physical: "paddingBottom";
|
|
45
|
-
readonly logical: "paddingBlockEnd";
|
|
46
|
-
};
|
|
31
|
+
readonly property: "paddingBottom";
|
|
47
32
|
readonly scale: "spacing";
|
|
48
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
49
33
|
};
|
|
50
34
|
readonly pr: {
|
|
51
|
-
readonly property:
|
|
52
|
-
readonly physical: "paddingRight";
|
|
53
|
-
readonly logical: "paddingInlineEnd";
|
|
54
|
-
};
|
|
35
|
+
readonly property: "paddingRight";
|
|
55
36
|
readonly scale: "spacing";
|
|
56
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
57
37
|
};
|
|
58
38
|
readonly pl: {
|
|
59
|
-
readonly property:
|
|
60
|
-
readonly physical: "paddingLeft";
|
|
61
|
-
readonly logical: "paddingInlineStart";
|
|
62
|
-
};
|
|
39
|
+
readonly property: "paddingLeft";
|
|
63
40
|
readonly scale: "spacing";
|
|
64
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
65
41
|
};
|
|
66
42
|
readonly m: {
|
|
67
43
|
readonly property: "margin";
|
|
@@ -69,53 +45,29 @@ declare const badgeProps: import("@codecademy/variance/dist/types/config").Parse
|
|
|
69
45
|
};
|
|
70
46
|
readonly mx: {
|
|
71
47
|
readonly property: "margin";
|
|
72
|
-
readonly properties:
|
|
73
|
-
readonly physical: readonly ["marginLeft", "marginRight"];
|
|
74
|
-
readonly logical: readonly ["marginInlineStart", "marginInlineEnd"];
|
|
75
|
-
};
|
|
76
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
48
|
+
readonly properties: readonly ["marginLeft", "marginRight"];
|
|
77
49
|
readonly scale: "spacing";
|
|
78
50
|
};
|
|
79
51
|
readonly my: {
|
|
80
52
|
readonly property: "margin";
|
|
81
|
-
readonly properties:
|
|
82
|
-
readonly physical: readonly ["marginTop", "marginBottom"];
|
|
83
|
-
readonly logical: readonly ["marginBlockStart", "marginBlockEnd"];
|
|
84
|
-
};
|
|
85
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
53
|
+
readonly properties: readonly ["marginTop", "marginBottom"];
|
|
86
54
|
readonly scale: "spacing";
|
|
87
55
|
};
|
|
88
56
|
readonly mt: {
|
|
89
|
-
readonly property:
|
|
90
|
-
readonly physical: "marginTop";
|
|
91
|
-
readonly logical: "marginBlockStart";
|
|
92
|
-
};
|
|
57
|
+
readonly property: "marginTop";
|
|
93
58
|
readonly scale: "spacing";
|
|
94
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
95
59
|
};
|
|
96
60
|
readonly mb: {
|
|
97
|
-
readonly property:
|
|
98
|
-
readonly physical: "marginBottom";
|
|
99
|
-
readonly logical: "marginBlockEnd";
|
|
100
|
-
};
|
|
61
|
+
readonly property: "marginBottom";
|
|
101
62
|
readonly scale: "spacing";
|
|
102
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
103
63
|
};
|
|
104
64
|
readonly mr: {
|
|
105
|
-
readonly property:
|
|
106
|
-
readonly physical: "marginRight";
|
|
107
|
-
readonly logical: "marginInlineEnd";
|
|
108
|
-
};
|
|
65
|
+
readonly property: "marginRight";
|
|
109
66
|
readonly scale: "spacing";
|
|
110
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
111
67
|
};
|
|
112
68
|
readonly ml: {
|
|
113
|
-
readonly property:
|
|
114
|
-
readonly physical: "marginLeft";
|
|
115
|
-
readonly logical: "marginInlineStart";
|
|
116
|
-
};
|
|
69
|
+
readonly property: "marginLeft";
|
|
117
70
|
readonly scale: "spacing";
|
|
118
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
119
71
|
};
|
|
120
72
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
121
73
|
readonly flexBasis: {
|
|
@@ -274,40 +226,28 @@ declare const badgeProps: import("@codecademy/variance/dist/types/config").Parse
|
|
|
274
226
|
};
|
|
275
227
|
readonly borderColorX: {
|
|
276
228
|
readonly property: "borderColor";
|
|
277
|
-
readonly properties:
|
|
278
|
-
readonly physical: readonly ["borderLeftColor", "borderRightColor"];
|
|
279
|
-
readonly logical: readonly ["borderInlineStartColor", "borderInlineEndColor"];
|
|
280
|
-
};
|
|
281
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
229
|
+
readonly properties: readonly ["borderLeftColor", "borderRightColor"];
|
|
282
230
|
readonly scale: "colors";
|
|
283
231
|
};
|
|
284
232
|
readonly borderColorY: {
|
|
285
233
|
readonly property: "borderColor";
|
|
286
|
-
readonly properties:
|
|
287
|
-
readonly physical: readonly ["borderTopColor", "borderBottomColor"];
|
|
288
|
-
readonly logical: readonly ["borderBlockStartColor", "borderBlockEndColor"];
|
|
289
|
-
};
|
|
290
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
234
|
+
readonly properties: readonly ["borderTopColor", "borderBottomColor"];
|
|
291
235
|
readonly scale: "colors";
|
|
292
236
|
};
|
|
293
237
|
readonly borderColorLeft: {
|
|
294
238
|
readonly property: "borderLeftColor";
|
|
295
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
296
239
|
readonly scale: "colors";
|
|
297
240
|
};
|
|
298
241
|
readonly borderColorRight: {
|
|
299
242
|
readonly property: "borderRightColor";
|
|
300
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
301
243
|
readonly scale: "colors";
|
|
302
244
|
};
|
|
303
245
|
readonly borderColorTop: {
|
|
304
246
|
readonly property: "borderTopColor";
|
|
305
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
306
247
|
readonly scale: "colors";
|
|
307
248
|
};
|
|
308
249
|
readonly borderColorBottom: {
|
|
309
250
|
readonly property: "borderBottomColor";
|
|
310
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
311
251
|
readonly scale: "colors";
|
|
312
252
|
};
|
|
313
253
|
}>>]>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BarChartTranslations } from './shared/translations';
|
|
3
|
+
import { BarChartStyles } from './shared/types';
|
|
4
|
+
export interface BarChartContextProps {
|
|
5
|
+
minRange: number;
|
|
6
|
+
maxRange: number;
|
|
7
|
+
xScale: number;
|
|
8
|
+
unit: string;
|
|
9
|
+
styleConfig: Required<BarChartStyles>;
|
|
10
|
+
animate: boolean;
|
|
11
|
+
widestLeftLabelWidth: number | null;
|
|
12
|
+
setWidestLeftLabelWidth: (width: number) => void;
|
|
13
|
+
widestRightLabelWidth: number | null;
|
|
14
|
+
setWidestRightLabelWidth: (width: number) => void;
|
|
15
|
+
isMeasuring: boolean;
|
|
16
|
+
translations: BarChartTranslations;
|
|
17
|
+
}
|
|
18
|
+
export declare const defaultStyleConfig: Required<BarChartStyles>;
|
|
19
|
+
export declare const BarChartContext: import("react").Context<BarChartContextProps>;
|
|
20
|
+
export declare const BarChartProvider: import("react").Provider<BarChartContextProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
import { defaultBarChartTranslations } from './shared/translations';
|
|
3
|
+
export const defaultStyleConfig = {
|
|
4
|
+
textColor: 'text',
|
|
5
|
+
seriesOneBarColor: 'text',
|
|
6
|
+
seriesTwoBarColor: 'primary',
|
|
7
|
+
seriesOneLabel: 'text-secondary',
|
|
8
|
+
seriesTwoLabel: 'primary'
|
|
9
|
+
};
|
|
10
|
+
export const BarChartContext = /*#__PURE__*/createContext({
|
|
11
|
+
minRange: 0,
|
|
12
|
+
maxRange: 100,
|
|
13
|
+
xScale: 10,
|
|
14
|
+
unit: '',
|
|
15
|
+
styleConfig: defaultStyleConfig,
|
|
16
|
+
animate: false,
|
|
17
|
+
widestLeftLabelWidth: null,
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
19
|
+
setWidestLeftLabelWidth: () => {
|
|
20
|
+
// No-op: default context value
|
|
21
|
+
},
|
|
22
|
+
widestRightLabelWidth: null,
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
24
|
+
setWidestRightLabelWidth: () => {
|
|
25
|
+
// No-op: default context value
|
|
26
|
+
},
|
|
27
|
+
isMeasuring: true,
|
|
28
|
+
translations: defaultBarChartTranslations
|
|
29
|
+
});
|
|
30
|
+
BarChartContext.displayName = 'BarChartContext';
|
|
31
|
+
export const BarChartProvider = BarChartContext.Provider;
|