@khanacademy/wonder-blocks-accordion 2.0.1 → 3.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @khanacademy/wonder-blocks-accordion
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 56d961f1: - Migrate Wonder Blocks components off old id providers and onto new `Id` component
8
+
9
+ ### Patch Changes
10
+
11
+ - b6009b77: Deprecate the ID provider and unique ID utilities
12
+ - Updated dependencies [b6009b77]
13
+ - Updated dependencies [897686bc]
14
+ - Updated dependencies [56d961f1]
15
+ - @khanacademy/wonder-blocks-core@10.0.0
16
+ - @khanacademy/wonder-blocks-clickable@5.0.2
17
+ - @khanacademy/wonder-blocks-icon@5.0.2
18
+ - @khanacademy/wonder-blocks-typography@3.0.2
19
+
3
20
  ## 2.0.1
4
21
 
5
22
  ### Patch Changes
package/dist/es/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
+ import { useId } from 'react';
2
3
  import { StyleSheet } from 'aphrodite';
3
- import { addStyle, View, useUniqueIdWithMock } from '@khanacademy/wonder-blocks-core';
4
+ import { addStyle, View } from '@khanacademy/wonder-blocks-core';
4
5
  import * as tokens from '@khanacademy/wonder-blocks-tokens';
5
6
  import { HeadingSmall, Body } from '@khanacademy/wonder-blocks-typography';
6
7
  import caretDown from '@phosphor-icons/core/bold/caret-down-bold.svg';
@@ -316,10 +317,11 @@ const AccordionSection = React.forwardRef(function AccordionSection(props, ref)
316
317
  ariaProps = _objectWithoutPropertiesLoose(props, _excluded);
317
318
  const [internalExpanded, setInternalExpanded] = React.useState(expanded != null ? expanded : false);
318
319
  const controlledMode = expanded !== undefined && onToggle;
319
- const ids = useUniqueIdWithMock();
320
- const sectionId = id != null ? id : ids.get("accordion-section");
321
- const headerId = id ? `${id}-header` : ids.get("accordion-section-header");
322
- const sectionContentUniqueId = ids.get("accordion-section-content");
320
+ const uniqueSectionId = useId();
321
+ const sectionId = id != null ? id : uniqueSectionId;
322
+ const uniqueHeaderId = useId();
323
+ const headerId = id ? `${id}-header` : uniqueHeaderId;
324
+ const sectionContentUniqueId = useId();
323
325
  const sectionStyles = _generateStyles(cornerKind, isFirstSection, isLastSection);
324
326
  const handleClick = () => {
325
327
  if (controlledMode) {
package/dist/index.js CHANGED
@@ -345,10 +345,11 @@ const AccordionSection = React__namespace.forwardRef(function AccordionSection(p
345
345
  ariaProps = _objectWithoutPropertiesLoose(props, _excluded);
346
346
  const [internalExpanded, setInternalExpanded] = React__namespace.useState(expanded != null ? expanded : false);
347
347
  const controlledMode = expanded !== undefined && onToggle;
348
- const ids = wonderBlocksCore.useUniqueIdWithMock();
349
- const sectionId = id != null ? id : ids.get("accordion-section");
350
- const headerId = id ? `${id}-header` : ids.get("accordion-section-header");
351
- const sectionContentUniqueId = ids.get("accordion-section-content");
348
+ const uniqueSectionId = React.useId();
349
+ const sectionId = id != null ? id : uniqueSectionId;
350
+ const uniqueHeaderId = React.useId();
351
+ const headerId = id ? `${id}-header` : uniqueHeaderId;
352
+ const sectionContentUniqueId = React.useId();
352
353
  const sectionStyles = _generateStyles(cornerKind, isFirstSection, isLastSection);
353
354
  const handleClick = () => {
354
355
  if (controlledMode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-accordion",
3
- "version": "2.0.1",
3
+ "version": "3.0.0",
4
4
  "design": "v1",
5
5
  "description": "Accordion components for Wonder Blocks.",
6
6
  "main": "dist/index.js",
@@ -16,11 +16,11 @@
16
16
  "access": "public"
17
17
  },
18
18
  "dependencies": {
19
- "@khanacademy/wonder-blocks-clickable": "^5.0.1",
20
- "@khanacademy/wonder-blocks-core": "^9.0.0",
21
- "@khanacademy/wonder-blocks-icon": "^5.0.1",
19
+ "@khanacademy/wonder-blocks-clickable": "^5.0.2",
20
+ "@khanacademy/wonder-blocks-core": "^10.0.0",
21
+ "@khanacademy/wonder-blocks-icon": "^5.0.2",
22
22
  "@khanacademy/wonder-blocks-tokens": "^3.0.0",
23
- "@khanacademy/wonder-blocks-typography": "^3.0.1"
23
+ "@khanacademy/wonder-blocks-typography": "^3.0.2"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@phosphor-icons/core": "^2.0.2",