@codecademy/gamut 67.6.4-alpha.fb9da9.0 → 67.6.5-alpha.6a44f3.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 +2 -10
- package/dist/Badge/index.d.ts +2 -10
- package/dist/BarChart/BarChartProvider.d.ts +19 -0
- package/dist/BarChart/BarChartProvider.js +31 -0
- package/dist/BarChart/BarRow/elements.d.ts +713 -0
- package/dist/BarChart/BarRow/elements.js +89 -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 +156 -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 +17 -0
- package/dist/BarChart/shared/translations.js +16 -0
- package/dist/BarChart/shared/types.d.ts +88 -0
- package/dist/BarChart/shared/types.js +1 -0
- package/dist/BarChart/utils/hooks.d.ts +93 -0
- package/dist/BarChart/utils/hooks.js +301 -0
- package/dist/BarChart/utils/index.d.ts +86 -0
- package/dist/BarChart/utils/index.js +165 -0
- package/dist/Box/props.d.ts +2 -10
- package/dist/Button/shared/styles.d.ts +2 -10
- package/dist/Card/elements.d.ts +7 -30
- package/dist/ConnectedForm/utils.d.ts +1 -1
- package/dist/Form/SelectDropdown/styles.d.ts +1 -1
- package/dist/Form/elements/Form.d.ts +3 -11
- package/dist/Form/inputs/Select.js +6 -5
- package/dist/Layout/Column.d.ts +2 -10
- package/dist/Layout/LayoutGrid.d.ts +2 -10
- package/dist/List/elements.d.ts +6 -21
- package/dist/Menu/elements.d.ts +2 -10
- package/dist/Pagination/AnimatedPaginationButtons.d.ts +3 -10
- package/dist/Pagination/utils.d.ts +2 -10
- package/dist/Tabs/props.d.ts +2 -10
- package/dist/Tag/types.d.ts +2 -10
- package/dist/Tip/__tests__/helpers.d.ts +0 -2
- package/dist/Toggle/elements.d.ts +4 -20
- package/dist/Typography/Text.d.ts +2 -10
- 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
|
@@ -148,20 +148,12 @@ declare const anchorProps: import("@codecademy/variance/dist/types/config").Pars
|
|
|
148
148
|
readonly scale: "spacing";
|
|
149
149
|
};
|
|
150
150
|
readonly mr: {
|
|
151
|
-
readonly property:
|
|
152
|
-
readonly physical: "marginRight";
|
|
153
|
-
readonly logical: "marginInlineEnd";
|
|
154
|
-
};
|
|
151
|
+
readonly property: "marginRight";
|
|
155
152
|
readonly scale: "spacing";
|
|
156
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
157
153
|
};
|
|
158
154
|
readonly ml: {
|
|
159
|
-
readonly property:
|
|
160
|
-
readonly physical: "marginLeft";
|
|
161
|
-
readonly logical: "marginInlineStart";
|
|
162
|
-
};
|
|
155
|
+
readonly property: "marginLeft";
|
|
163
156
|
readonly scale: "spacing";
|
|
164
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
165
157
|
};
|
|
166
158
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
167
159
|
readonly fontFamily: {
|
package/dist/Badge/index.d.ts
CHANGED
|
@@ -62,20 +62,12 @@ declare const badgeProps: import("@codecademy/variance/dist/types/config").Parse
|
|
|
62
62
|
readonly scale: "spacing";
|
|
63
63
|
};
|
|
64
64
|
readonly mr: {
|
|
65
|
-
readonly property:
|
|
66
|
-
readonly physical: "marginRight";
|
|
67
|
-
readonly logical: "marginInlineEnd";
|
|
68
|
-
};
|
|
65
|
+
readonly property: "marginRight";
|
|
69
66
|
readonly scale: "spacing";
|
|
70
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
71
67
|
};
|
|
72
68
|
readonly ml: {
|
|
73
|
-
readonly property:
|
|
74
|
-
readonly physical: "marginLeft";
|
|
75
|
-
readonly logical: "marginInlineStart";
|
|
76
|
-
};
|
|
69
|
+
readonly property: "marginLeft";
|
|
77
70
|
readonly scale: "spacing";
|
|
78
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
79
71
|
};
|
|
80
72
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
81
73
|
readonly flexBasis: {
|
|
@@ -0,0 +1,19 @@
|
|
|
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 BarChartContext: import("react").Context<BarChartContextProps>;
|
|
19
|
+
export declare const BarChartProvider: import("react").Provider<BarChartContextProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
import { defaultBarChartTranslations } from './shared/translations';
|
|
3
|
+
const defaultStyleConfig = {
|
|
4
|
+
textColor: 'text',
|
|
5
|
+
foregroundBarColor: 'feedback-warning',
|
|
6
|
+
backgroundBarColor: 'background-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;
|