@deque/cauldron-react 7.1.0 → 7.2.0-canary.5aff367f

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 (111) hide show
  1. package/lib/add-user.js +1 -1
  2. package/lib/arrow-circle.js +1 -1
  3. package/lib/arrow.js +1 -1
  4. package/lib/arrows-alt.js +1 -1
  5. package/lib/bolt.js +1 -1
  6. package/lib/broken-image.js +1 -1
  7. package/lib/caution.js +1 -1
  8. package/lib/check-circle.js +1 -1
  9. package/lib/check-shield.js +1 -1
  10. package/lib/check-solid.js +1 -1
  11. package/lib/check.js +1 -1
  12. package/lib/checkbox-checked.js +1 -1
  13. package/lib/checkbox-unchecked.js +1 -1
  14. package/lib/chevron-double.js +1 -1
  15. package/lib/chevron.js +1 -1
  16. package/lib/clipboard.js +1 -1
  17. package/lib/clock.js +1 -1
  18. package/lib/close.js +1 -1
  19. package/lib/code.js +1 -1
  20. package/lib/components/Accordion/Accordion.d.ts +1 -1
  21. package/lib/components/ActionList/ActionList.d.ts +1 -1
  22. package/lib/components/ActionMenu/ActionMenu.d.ts +14 -8
  23. package/lib/components/AnchoredOverlay/index.d.ts +2 -2
  24. package/lib/components/ClickOutsideListener/index.d.ts +1 -1
  25. package/lib/components/Combobox/Combobox.d.ts +1 -1
  26. package/lib/components/Dialog/DialogContext.d.ts +1 -1
  27. package/lib/components/Dialog/index.d.ts +1 -1
  28. package/lib/components/Drawer/index.d.ts +1 -1
  29. package/lib/components/ExpandCollapsePanel/ExpandCollapsePanel.d.ts +1 -1
  30. package/lib/components/Icon/types.d.ts +1 -1
  31. package/lib/components/Listbox/Listbox.d.ts +7 -2
  32. package/lib/components/MenuBar/index.d.ts +1 -0
  33. package/lib/components/MenuItem/index.d.ts +1 -6
  34. package/lib/components/Popover/index.d.ts +2 -2
  35. package/lib/components/Table/TableContext.d.ts +1 -1
  36. package/lib/components/Tabs/Tab.d.ts +1 -1
  37. package/lib/components/Toast/index.d.ts +4 -4
  38. package/lib/components/Tooltip/index.d.ts +2 -2
  39. package/lib/components/TreeView/helpers.d.ts +33 -0
  40. package/lib/components/TreeView/index.d.ts +6 -0
  41. package/lib/components/TreeView/types.d.ts +3 -0
  42. package/lib/copy.js +1 -1
  43. package/lib/download.js +1 -1
  44. package/lib/dropper.js +1 -1
  45. package/lib/exchange.js +1 -1
  46. package/lib/export-solid.js +1 -1
  47. package/lib/external-link.js +1 -1
  48. package/lib/eye.js +1 -1
  49. package/lib/filter.js +1 -1
  50. package/lib/flag.js +1 -1
  51. package/lib/gears.js +1 -1
  52. package/lib/github.js +1 -1
  53. package/lib/grid.js +1 -1
  54. package/lib/hamburger-menu.js +1 -1
  55. package/lib/hashtag.js +1 -1
  56. package/lib/highlight.js +1 -1
  57. package/lib/images.js +1 -1
  58. package/lib/index.js +276 -116
  59. package/lib/info-circle-alt.js +1 -1
  60. package/lib/info-circle.js +1 -1
  61. package/lib/info-square.js +1 -1
  62. package/lib/kabob.js +1 -1
  63. package/lib/link.js +1 -1
  64. package/lib/linkedin.js +1 -1
  65. package/lib/list.js +1 -1
  66. package/lib/lock.js +1 -1
  67. package/lib/magnifying-glass.js +1 -1
  68. package/lib/menu.js +1 -1
  69. package/lib/minus.js +1 -1
  70. package/lib/new-releases.js +1 -1
  71. package/lib/new.js +1 -1
  72. package/lib/no.js +1 -1
  73. package/lib/pause.js +1 -1
  74. package/lib/pencil.js +1 -1
  75. package/lib/person-running.js +1 -1
  76. package/lib/play.js +1 -1
  77. package/lib/plus.js +1 -1
  78. package/lib/question-circle-alt.js +1 -1
  79. package/lib/question-circle.js +1 -1
  80. package/lib/radio-checked.js +1 -1
  81. package/lib/radio-unchecked.js +1 -1
  82. package/lib/recycle-square.js +1 -1
  83. package/lib/recycle.js +1 -1
  84. package/lib/resend.js +1 -1
  85. package/lib/robot.js +1 -1
  86. package/lib/run-again.js +1 -1
  87. package/lib/save.js +1 -1
  88. package/lib/share-nodes.js +1 -1
  89. package/lib/share.js +1 -1
  90. package/lib/sort-triangle.js +1 -1
  91. package/lib/sort.js +1 -1
  92. package/lib/star-outline.js +36 -0
  93. package/lib/star.js +4 -7
  94. package/lib/step-back.js +1 -1
  95. package/lib/step-forward.js +1 -1
  96. package/lib/sun.js +1 -1
  97. package/lib/table-sort-ascending.js +1 -1
  98. package/lib/table-sort-descending.js +1 -1
  99. package/lib/tag.js +1 -1
  100. package/lib/target.js +1 -1
  101. package/lib/trash.js +1 -1
  102. package/lib/triangle.js +1 -1
  103. package/lib/twitter.js +1 -1
  104. package/lib/types.d.ts +1 -1
  105. package/lib/upload.js +1 -1
  106. package/lib/utils/getChildRef.d.ts +2 -0
  107. package/lib/utils/polymorphicComponent.d.ts +1 -1
  108. package/lib/utils/useFocusTrap.d.ts +1 -1
  109. package/lib/utils/useMnemonics.d.ts +2 -2
  110. package/lib/utils/useSharedRef.d.ts +3 -3
  111. package/package.json +35 -29
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function getChildRef(child: React.ReactElement, version?: string): React.Ref<HTMLElement> | null | undefined;
@@ -3,7 +3,7 @@ type Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;
3
3
  export type PolymorphicProps<Props = {}, ElementType extends React.ElementType = React.ElementType> = Props & {
4
4
  as?: ElementType;
5
5
  };
6
- export type PolymorphicComponentProps<Props = {}, ElementType extends React.ElementType = React.ElementType> = Merge<ElementType extends keyof JSX.IntrinsicElements ? React.PropsWithRef<JSX.IntrinsicElements[ElementType]> : ElementType extends React.ElementType ? React.ComponentPropsWithRef<ElementType> : never, PolymorphicProps<Props, ElementType>>;
6
+ export type PolymorphicComponentProps<Props = {}, ElementType extends React.ElementType = React.ElementType> = Merge<ElementType extends keyof React.JSX.IntrinsicElements ? React.PropsWithRef<React.JSX.IntrinsicElements[ElementType]> : ElementType extends React.ElementType ? React.ComponentPropsWithRef<ElementType> : never, PolymorphicProps<Props, ElementType>>;
7
7
  export type PolymorphicComponent<Props = {}, ElementType extends React.ElementType = React.ElementType> = Merge<React.ForwardRefExoticComponent<Props>, {
8
8
  <T extends React.ElementType = ElementType>(props: PolymorphicComponentProps<Props, T>): React.ReactElement | null;
9
9
  }>;
@@ -30,5 +30,5 @@ export default function useFocusTrap<TargetElement extends Element = Element, Fo
30
30
  * can be provided to override the default active element behavior.
31
31
  */
32
32
  returnFocusElement?: ElementOrRef<FocusElement>;
33
- }): React.RefObject<Readonly<FocusTrap>>;
33
+ }): React.RefObject<Readonly<FocusTrap> | null>;
34
34
  export {};
@@ -1,4 +1,4 @@
1
- import type { RefObject } from 'react';
1
+ import type { MutableRefObject } from 'react';
2
2
  import type { ElementOrRef } from '../types';
3
3
  type useMnemonicsOptions = {
4
4
  /**
@@ -19,7 +19,7 @@ type useMnemonicsOptions = {
19
19
  */
20
20
  enabled?: boolean;
21
21
  };
22
- type useMnemonicsResults<T extends HTMLElement> = RefObject<T>;
22
+ type useMnemonicsResults<T extends HTMLElement> = MutableRefObject<T | null>;
23
23
  /**
24
24
  * A hook that provides mnemonic navigation for keyboard users.
25
25
  *
@@ -1,7 +1,7 @@
1
- import { MutableRefObject, Ref } from 'react';
1
+ import { RefObject, Ref } from 'react';
2
2
  /**
3
3
  * When a component needs to track an internal ref on a component that has a
4
- * forwarded ref, useSharedRef will return a MutableRefObject<T> that will
4
+ * forwarded ref, useSharedRef will return a RefObject<T | null> that will
5
5
  * correctly invoke the parent ref as well providing an internal ref.
6
6
  *
7
7
  * @example
@@ -13,4 +13,4 @@ import { MutableRefObject, Ref } from 'react';
13
13
  * return (<div ref={internalRef}>...</div>)
14
14
  * })
15
15
  */
16
- export default function useSharedRef<T>(ref: Ref<T>): MutableRefObject<T>;
16
+ export default function useSharedRef<T>(ref: Ref<T>): RefObject<T | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "7.1.0",
3
+ "version": "7.2.0-canary.5aff367f",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Fully accessible react components library for Deque Cauldron",
6
6
  "homepage": "https://cauldron.dequelabs.com/",
@@ -13,31 +13,24 @@
13
13
  "files": [
14
14
  "lib/"
15
15
  ],
16
- "scripts": {
17
- "build": "yarn build:lib && yarn build:css",
18
- "prebuild:lib": "node scripts/buildIconTypes.js",
19
- "build:lib": "rollup -c",
20
- "build:css": "postcss --output=lib/cauldron.css src/index.css",
21
- "dev": "concurrently 'yarn build:css --watch' 'rollup -c --watch'",
22
- "prepublishOnly": "NODE_ENV=production yarn build",
23
- "test": "jest --maxWorkers=1 --coverage"
24
- },
25
16
  "dependencies": {
17
+ "@floating-ui/dom": "^1.0.0",
26
18
  "@floating-ui/react-dom": "^2.1.2",
27
19
  "classnames": "^2.2.6",
28
20
  "focusable": "^2.3.0",
29
21
  "keyname": "^0.1.0",
30
22
  "react-aria-components": "^1.13.0",
31
23
  "react-id-generator": "^3.0.1",
32
- "react-syntax-highlighter": "^16.0.1",
24
+ "react-syntax-highlighter": "^16.1.1",
33
25
  "tslib": "^2.4.0"
34
26
  },
35
27
  "devDependencies": {
36
- "@babel/core": "^7.22.10",
37
- "@babel/plugin-proposal-export-default-from": "^7.22.5",
38
- "@babel/preset-env": "^7.22.10",
39
- "@babel/preset-react": "^7.22.5",
40
- "@babel/preset-typescript": "^7.22.5",
28
+ "@babel/core": "^7.29.7",
29
+ "@babel/plugin-proposal-export-default-from": "^7.29.7",
30
+ "@babel/preset-env": "^7.29.7",
31
+ "@babel/preset-react": "^7.29.7",
32
+ "@babel/preset-typescript": "^7.29.7",
33
+ "@figma/code-connect": "^1.4.5",
41
34
  "@rollup/plugin-commonjs": "^14.0.0",
42
35
  "@rollup/plugin-dynamic-import-vars": "^1.4.2",
43
36
  "@rollup/plugin-typescript": "^11.1.2",
@@ -50,24 +43,25 @@
50
43
  "@types/jest": "^29.5.11",
51
44
  "@types/jest-axe": "^3.5.4",
52
45
  "@types/node": "^17.0.42",
53
- "@types/react": "^18.0.12",
54
- "@types/react-dom": "^18.0.5",
46
+ "@types/react": "^19.0.0",
47
+ "@types/react-dom": "^19.0.0",
55
48
  "@types/react-syntax-highlighter": "^15.5.13",
56
49
  "@types/sinon": "^10",
57
- "autoprefixer": "^9.7.6",
58
- "babel-plugin-module-resolver": "^4.0.0",
50
+ "autoprefixer": "^10.5.0",
51
+ "babel-plugin-module-resolver": "^5.0.3",
59
52
  "babel-plugin-transform-export-extensions": "^6.22.0",
60
53
  "concurrently": "^5.3.0",
61
54
  "jest": "^29.7.0",
62
- "jest-axe": "^8.0.0",
55
+ "jest-axe": "^10.0.0",
63
56
  "jest-environment-jsdom": "^29.7.0",
64
57
  "nyc": "^15.0.1",
65
- "postcss-cli": "^7.1.1",
66
- "postcss-import": "^12.0.1",
67
- "postcss-loader": "^3.0.0",
58
+ "postcss": "^8.5.15",
59
+ "postcss-cli": "^11.0.1",
60
+ "postcss-import": "^16.1.1",
61
+ "postcss-loader": "^8.2.1",
68
62
  "prop-types": "^15.8.1",
69
- "react": "^18",
70
- "react-dom": "^18",
63
+ "react": "^19",
64
+ "react-dom": "^19",
71
65
  "rollup": "^2.23.0",
72
66
  "sinon": "^10.0.0",
73
67
  "ts-node": "^10.9.2",
@@ -78,7 +72,19 @@
78
72
  "url": "git+https://github.com/dequelabs/cauldron.git"
79
73
  },
80
74
  "peerDependencies": {
81
- "react": ">=16.6 <= 18",
82
- "react-dom": ">=16.6 <= 18"
75
+ "react": ">=16.6 <20",
76
+ "react-dom": ">=16.6 <20"
77
+ },
78
+ "scripts": {
79
+ "build": "pnpm build:lib && pnpm build:css",
80
+ "prebuild:lib": "node scripts/buildIconTypes.js",
81
+ "build:lib": "rollup -c",
82
+ "build:css": "postcss --output=lib/cauldron.css src/index.css",
83
+ "typecheck": "tsc --noEmit --skipLibCheck",
84
+ "dev": "concurrently 'pnpm build:css --watch' 'rollup -c --watch'",
85
+ "test": "jest --maxWorkers=1 --coverage",
86
+ "figma:parse": "figma connect parse",
87
+ "figma:publish": "figma connect publish",
88
+ "figma:publish:dry-run": "figma connect publish --dry-run"
83
89
  }
84
- }
90
+ }