@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.
Files changed (51) hide show
  1. package/dist/Anchor/index.d.ts +2 -10
  2. package/dist/Badge/index.d.ts +2 -10
  3. package/dist/BarChart/BarChartProvider.d.ts +19 -0
  4. package/dist/BarChart/BarChartProvider.js +31 -0
  5. package/dist/BarChart/BarRow/elements.d.ts +713 -0
  6. package/dist/BarChart/BarRow/elements.js +89 -0
  7. package/dist/BarChart/BarRow/index.d.ts +26 -0
  8. package/dist/BarChart/BarRow/index.js +254 -0
  9. package/dist/BarChart/GENERIC_EXAMPLE.d.ts +14 -0
  10. package/dist/BarChart/GENERIC_EXAMPLE.js +333 -0
  11. package/dist/BarChart/index.d.ts +4 -0
  12. package/dist/BarChart/index.js +156 -0
  13. package/dist/BarChart/layout/GridLines.d.ts +7 -0
  14. package/dist/BarChart/layout/GridLines.js +78 -0
  15. package/dist/BarChart/layout/ScaleChartHeader.d.ts +10 -0
  16. package/dist/BarChart/layout/ScaleChartHeader.js +89 -0
  17. package/dist/BarChart/layout/VerticalSpacer.d.ts +6 -0
  18. package/dist/BarChart/layout/VerticalSpacer.js +56 -0
  19. package/dist/BarChart/shared/elements.d.ts +7 -0
  20. package/dist/BarChart/shared/elements.js +12 -0
  21. package/dist/BarChart/shared/styles.d.ts +4 -0
  22. package/dist/BarChart/shared/styles.js +4 -0
  23. package/dist/BarChart/shared/translations.d.ts +17 -0
  24. package/dist/BarChart/shared/translations.js +16 -0
  25. package/dist/BarChart/shared/types.d.ts +88 -0
  26. package/dist/BarChart/shared/types.js +1 -0
  27. package/dist/BarChart/utils/hooks.d.ts +93 -0
  28. package/dist/BarChart/utils/hooks.js +301 -0
  29. package/dist/BarChart/utils/index.d.ts +86 -0
  30. package/dist/BarChart/utils/index.js +165 -0
  31. package/dist/Box/props.d.ts +2 -10
  32. package/dist/Button/shared/styles.d.ts +2 -10
  33. package/dist/Card/elements.d.ts +7 -30
  34. package/dist/ConnectedForm/utils.d.ts +1 -1
  35. package/dist/Form/SelectDropdown/styles.d.ts +1 -1
  36. package/dist/Form/elements/Form.d.ts +3 -11
  37. package/dist/Form/inputs/Select.js +6 -5
  38. package/dist/Layout/Column.d.ts +2 -10
  39. package/dist/Layout/LayoutGrid.d.ts +2 -10
  40. package/dist/List/elements.d.ts +6 -21
  41. package/dist/Menu/elements.d.ts +2 -10
  42. package/dist/Pagination/AnimatedPaginationButtons.d.ts +3 -10
  43. package/dist/Pagination/utils.d.ts +2 -10
  44. package/dist/Tabs/props.d.ts +2 -10
  45. package/dist/Tag/types.d.ts +2 -10
  46. package/dist/Tip/__tests__/helpers.d.ts +0 -2
  47. package/dist/Toggle/elements.d.ts +4 -20
  48. package/dist/Typography/Text.d.ts +2 -10
  49. package/dist/index.d.ts +1 -0
  50. package/dist/index.js +1 -0
  51. package/package.json +7 -7
@@ -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: {
@@ -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;