@codecademy/gamut 68.7.1-alpha.77d9da.0 → 68.7.1-alpha.f618c1.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 (87) hide show
  1. package/agent-tools/DESIGN.Codecademy.md +30 -29
  2. package/agent-tools/DESIGN.LXStudio.md +100 -98
  3. package/agent-tools/DESIGN.Percipio.md +97 -97
  4. package/agent-tools/DESIGN.md +1 -7
  5. package/bin/lib/claude.mjs +14 -5
  6. package/bin/lib/cursor.mjs +4 -1
  7. package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.d.ts +2 -2
  8. package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.js +1 -1
  9. package/dist/AccordionButtonDeprecated/ButtonDeprecated/styles/index.module.scss +5 -5
  10. package/dist/AccordionButtonDeprecated/ButtonDeprecated/styles/mixins.scss +5 -5
  11. package/dist/AccordionButtonDeprecated/ButtonDeprecated/styles/variables.scss +23 -22
  12. package/dist/AccordionButtonDeprecated/styles.module.scss +6 -8
  13. package/dist/Alert/elements.d.ts +2 -2
  14. package/dist/Anchor/index.d.ts +19 -9
  15. package/dist/Anchor/index.js +9 -6
  16. package/dist/BarChart/BarRow/elements.d.ts +47 -45
  17. package/dist/BarChart/utils/hooks.d.ts +2 -2
  18. package/dist/BarChart/utils/hooks.js +3 -1
  19. package/dist/Box/GridBox.d.ts +1 -0
  20. package/dist/Box/GridBox.js +1 -1
  21. package/dist/Box/props.d.ts +1 -1
  22. package/dist/Breadcrumbs/index.d.ts +5 -5
  23. package/dist/Breadcrumbs/index.js +2 -2
  24. package/dist/Button/CTAButton.d.ts +2 -2
  25. package/dist/Button/FillButton.d.ts +4 -4
  26. package/dist/Button/IconButton.d.ts +4 -4
  27. package/dist/Button/StrokeButton.d.ts +4 -4
  28. package/dist/Button/TextButton.d.ts +4 -4
  29. package/dist/Button/shared/InlineIconButton.d.ts +2 -2
  30. package/dist/Button/shared/styles.d.ts +3 -3
  31. package/dist/Button/shared/types.d.ts +1 -1
  32. package/dist/ButtonBase/ButtonBase.d.ts +9 -4
  33. package/dist/ButtonBase/ButtonBase.js +11 -4
  34. package/dist/Card/elements.d.ts +109 -103
  35. package/dist/Card/styles.d.ts +8 -8
  36. package/dist/Coachmark/index.d.ts +1 -1
  37. package/dist/ConnectedForm/ConnectedForm.d.ts +1 -1
  38. package/dist/ConnectedForm/ConnectedFormGroup.js +4 -3
  39. package/dist/ConnectedForm/utils.d.ts +1 -1
  40. package/dist/ConnectedForm/utils.js +1 -1
  41. package/dist/DatePicker/DatePickerInput/index.d.ts +1 -1
  42. package/dist/Disclosure/elements.d.ts +18 -12
  43. package/dist/FeatureShimmer/index.js +1 -1
  44. package/dist/Form/SelectDropdown/SelectDropdown.js +1 -1
  45. package/dist/Form/SelectDropdown/elements/containers.js +1 -1
  46. package/dist/Form/SelectDropdown/elements/controls.js +2 -2
  47. package/dist/Form/SelectDropdown/elements/multi-value.js +2 -2
  48. package/dist/Form/SelectDropdown/types/internal.d.ts +2 -2
  49. package/dist/Form/SelectDropdown/utils.js +2 -1
  50. package/dist/Form/elements/Form.d.ts +15 -15
  51. package/dist/Form/elements/FormGroup.d.ts +1 -1
  52. package/dist/Form/styles/Checkbox-styles.d.ts +1 -1
  53. package/dist/GridForm/GridFormButtons/index.d.ts +4 -4
  54. package/dist/List/ListProvider.d.ts +1 -1
  55. package/dist/List/elements.d.ts +44 -42
  56. package/dist/Menu/MenuItem.js +10 -6
  57. package/dist/Menu/elements.d.ts +2 -2
  58. package/dist/Modals/Dialog.js +6 -2
  59. package/dist/Modals/Modal.js +5 -2
  60. package/dist/Modals/elements.d.ts +1 -1
  61. package/dist/Pagination/AnimatedPaginationButtons.d.ts +31 -29
  62. package/dist/Pagination/EllipsisButton.d.ts +2 -2
  63. package/dist/Pagination/PaginationButton.d.ts +6 -6
  64. package/dist/Pagination/utils.d.ts +31 -29
  65. package/dist/Pagination/utils.js +14 -11
  66. package/dist/Popover/Popover.js +6 -6
  67. package/dist/Popover/types.d.ts +4 -3
  68. package/dist/PopoverContainer/PopoverContainer.js +9 -9
  69. package/dist/PopoverContainer/hooks.d.ts +16 -4
  70. package/dist/PopoverContainer/hooks.js +50 -27
  71. package/dist/PopoverContainer/types.d.ts +2 -1
  72. package/dist/Tabs/TabButton.d.ts +2 -2
  73. package/dist/Tabs/TabNavLink.d.ts +2 -2
  74. package/dist/Tag/elements.d.ts +14 -8
  75. package/dist/Tag/index.js +1 -1
  76. package/dist/Tip/InfoTip/InfoTipButton.d.ts +4 -4
  77. package/dist/Tip/PreviewTip/elements.d.ts +12 -6
  78. package/dist/Tip/__tests__/helpers.d.ts +1 -1
  79. package/dist/Tip/shared/FloatingTip.js +2 -2
  80. package/dist/Tip/shared/types.d.ts +2 -2
  81. package/dist/Tip/shared/utils.js +1 -1
  82. package/dist/Video/styles/vds_base_theme.scss +1 -3
  83. package/dist/utils/nullish.d.ts +10 -0
  84. package/dist/utils/nullish.js +11 -0
  85. package/dist/utils/react.js +4 -2
  86. package/package.json +10 -10
  87. package/dist/Typography/styles/_variables.scss +0 -54
@@ -1,4 +1,5 @@
1
1
  import { Children, isValidElement } from 'react';
2
+ import { isNullish } from './nullish';
2
3
 
3
4
  /**
4
5
  * Recursively extracts plain text content from React children.
@@ -29,11 +30,12 @@ export const extractTextContent = children => {
29
30
  if (typeof child === 'string' || typeof child === 'number') {
30
31
  return String(child);
31
32
  }
32
- if (typeof child === 'boolean' || child == null) {
33
+ if (typeof child === 'boolean' || isNullish(child)) {
33
34
  return '';
34
35
  }
35
36
  if (/*#__PURE__*/isValidElement(child)) {
36
- const textContent = child.props.children ?? child.props.text ?? '';
37
+ const props = child.props;
38
+ const textContent = props.children ?? props.text ?? '';
37
39
  return extractTextContent(textContent);
38
40
  }
39
41
  return '';
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@codecademy/gamut",
3
3
  "description": "Styleguide & Component library for Codecademy",
4
- "version": "68.7.1-alpha.77d9da.0",
4
+ "version": "68.7.1-alpha.f618c1.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "bin": "./bin/gamut.mjs",
7
7
  "dependencies": {
8
- "@codecademy/gamut-icons": "9.57.6-alpha.77d9da.0",
9
- "@codecademy/gamut-illustrations": "0.58.12-alpha.77d9da.0",
10
- "@codecademy/gamut-patterns": "0.10.31-alpha.77d9da.0",
11
- "@codecademy/gamut-styles": "18.0.1-alpha.77d9da.0",
12
- "@codecademy/variance": "0.26.2-alpha.77d9da.0",
8
+ "@codecademy/gamut-icons": "9.57.6-alpha.f618c1.0",
9
+ "@codecademy/gamut-illustrations": "0.58.12-alpha.f618c1.0",
10
+ "@codecademy/gamut-patterns": "0.10.31-alpha.f618c1.0",
11
+ "@codecademy/gamut-styles": "18.0.1-alpha.f618c1.0",
12
+ "@codecademy/variance": "0.26.2-alpha.f618c1.0",
13
13
  "@formatjs/intl-locale": "5.3.1",
14
14
  "@react-aria/interactions": "3.25.0",
15
15
  "@types/marked": "^4.0.8",
16
16
  "@vidstack/react": "^1.12.12",
17
17
  "classnames": "^2.2.5",
18
- "framer-motion": "^11.18.0",
18
+ "framer-motion": "^12.0.0",
19
19
  "html-to-react": "^1.6.0",
20
20
  "invariant": "^2.2.4",
21
21
  "lodash": "^4.17.23",
@@ -23,7 +23,7 @@
23
23
  "polished": "^4.1.2",
24
24
  "react-aria-components": "1.7.1",
25
25
  "react-focus-on": "3.10.0",
26
- "react-hook-form": "^7.65.0",
26
+ "react-hook-form": "^7.71.2",
27
27
  "react-player": "^2.16.0",
28
28
  "react-select": "^5.2.2",
29
29
  "react-truncate-markup": "^5.1.2",
@@ -44,8 +44,8 @@
44
44
  "peerDependencies": {
45
45
  "@emotion/react": "^11.4.0",
46
46
  "@emotion/styled": "^11.3.0",
47
- "react": "^17.0.2 || ^18.3.0",
48
- "react-dom": "^17.0.2 || ^18.3.0"
47
+ "react": "^17.0.2 || ^18.3.0 || ^19.0.0",
48
+ "react-dom": "^17.0.2 || ^18.3.0 || ^19.0.0"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"
@@ -1,54 +0,0 @@
1
- @use "~@codecademy/gamut-styles/utils";
2
-
3
- $headingSizes: (
4
- "xxs": (
5
- "size": 16,
6
- "margin": 16,
7
- "font": $font-family-base
8
- ),
9
- "xs": (
10
- "size": 20,
11
- "margin": 16,
12
- "font": $font-family-base
13
- ),
14
- "sm": (
15
- "size": 22,
16
- "margin": 16,
17
- "font": $font-family-base
18
- ),
19
- "md": (
20
- "size": 26,
21
- "margin": 20,
22
- "font": $font-family-base
23
- ),
24
- "lg": (
25
- "size": 34,
26
- "margin": 24,
27
- "font": $font-family-base
28
- ),
29
- "xl": (
30
- "size": 44,
31
- "margin": 24,
32
- "font": $font-family-base
33
- ),
34
- "xxl": (
35
- "size": 64,
36
- "margin": 32,
37
- "font": $font-family-base
38
- )
39
- );
40
-
41
- $textSizes: (
42
- "sm": (
43
- "size": 14,
44
- "font": $font-family-base
45
- ),
46
- "md": (
47
- "size": 16,
48
- "font": $font-family-base
49
- ),
50
- "lg": (
51
- "size": 20,
52
- "font": $font-family-base
53
- )
54
- );