@ark-ui/solid 1.0.0 → 1.0.1

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
@@ -6,6 +6,16 @@ description: All notable changes to this project will be documented in this file
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.1] - 2023-11-10
10
+
11
+ ### Fixed
12
+
13
+ - Resolved an issue where the `Dialog` component would not animate on exit.
14
+ - Resolved various issues for `Menu` when lazy mounted.
15
+ - Resolved an issue where `MenuTrigger` could still work even when disabled.
16
+ - Resolved an issue where components like `Dialog`, `Popover` etc would not invoke `onExitComplete`
17
+ - Fixed an issue where placement of the `Combobox` could be incorrect when lazy mounted.
18
+
9
19
  ## [1.0.0] - 2023-11-09
10
20
 
11
21
  We are happy to announce the release of `@ark-ui/solid@1.0.0`. This release includes a number of breaking changes, new features, and bug fixes. Since our last release over two months ago, we will only highlight some key changes. Please refer to the documentation for each component to learn more.
@@ -20,67 +30,6 @@ We are happy to announce the release of `@ark-ui/solid@1.0.0`. This release incl
20
30
 
21
31
  With the release of version 1.0.0, we are moving towards a more stable version of `@ark-ui/solid`. Future updates will strive to avoid breaking changes, ensuring a smoother experience for our users. If you encounter any issues while upgrading, please do not hesitate to open an issue on our [GitHub repository](https://github.com/chakra-ui/ark/issues). Your feedback is invaluable in helping us improve.
22
32
 
23
- ## [1.0.0-beta.3] - 2023-10-31
24
-
25
- ### Added
26
-
27
- - Added support to lazy mount the `DatePicker` and `ColorPicker` components using the `Presence` component
28
- - Added `ValueText` to the `ColorPicker` component
29
-
30
- ### Changed
31
-
32
- - Improved accessibility of all disclosure components when lazy mounting is enabled.
33
- - Renamed `htmlFor` prop to `for` in `MenuItemGroupLabel`,
34
- `ComboboxItemGroupLabel` and `SelectItemGroupLabel` component
35
-
36
- ### Fixed
37
-
38
- - Added missing data attributes to `DatePickerView` component
39
- - Resolved an accessibility issue with `Select`
40
-
41
- ## [1.0.0-beta.2] - 2023-10-24
42
-
43
- ### Changed
44
-
45
- - Replaced `vite` with `rollup-preset-solid` for bundling.
46
-
47
- ## [1.0.0-beta.1] - 2023-10-20
48
-
49
- ### Added
50
-
51
- - Parsed `focusedValue` in `DatePicker`
52
-
53
- ### Fixed
54
-
55
- - Resolved an issue with `@ark-ui/anatomy`
56
-
57
- ## [1.0.0-beta.0] - 2023-10-20
58
-
59
- ### Added
60
-
61
- - Added `ToggleGroup` component
62
-
63
- ### Changed
64
-
65
- - Revised `Comoobox` component to support multiple selection
66
- - Revised `Select` component to support multiple selection
67
-
68
- ### Fixed
69
-
70
- - Resolved an issue where the `asChild` property was not working as expected
71
-
72
- ### Removed
73
-
74
- - Removed anatomy exports. These exports are now available in `@ark-ui/anatomy`.
75
-
76
- ```tsx
77
- // before
78
- import { accordionAnatomy } from '@ark-ui/solid'
79
- // after
80
- import { accordionAnatomy } from '@ark-ui/anatomy' // or
81
- import { anatomy } from '@ark-ui/anatomy/accordion'
82
- ```
83
-
84
33
  ## [0.11.0] - 2023-09-08
85
34
 
86
35
  ### Added
package/cjs/index.js CHANGED
@@ -1646,10 +1646,15 @@ const Dialog$1 = props => {
1646
1646
  return web.createComponent(DialogProvider, {
1647
1647
  value: api,
1648
1648
  get children() {
1649
- return web.createComponent(PresenceProvider, {
1650
- value: apiPresence,
1649
+ return web.createComponent(PresencePropsProvider, {
1650
+ value: presenceProps,
1651
1651
  get children() {
1652
- return getChildren();
1652
+ return web.createComponent(PresenceProvider, {
1653
+ value: apiPresence,
1654
+ get children() {
1655
+ return getChildren();
1656
+ }
1657
+ });
1653
1658
  }
1654
1659
  });
1655
1660
  }
@@ -1658,8 +1663,11 @@ const Dialog$1 = props => {
1658
1663
 
1659
1664
  const DialogBackdrop = props => {
1660
1665
  const api = useDialogContext();
1661
- const presenceApi = usePresenceContext();
1662
- const mergedProps = solid.mergeProps(() => api().backdropProps, props);
1666
+ const presenceProps = usePresencePropsContext();
1667
+ const presenceApi = usePresence(solid.mergeProps(presenceProps, () => ({
1668
+ present: api().isOpen
1669
+ })));
1670
+ const mergedProps = solid.mergeProps(() => api().backdropProps, () => presenceApi().presenceProps, props);
1663
1671
  return web.createComponent(solidJs.Show, {
1664
1672
  get when() {
1665
1673
  return !presenceApi().isUnmounted;
@@ -2088,8 +2096,13 @@ const MenuSeparator = props => {
2088
2096
  };
2089
2097
 
2090
2098
  const MenuTrigger = props => {
2091
- const menu = useMenuContext();
2092
- const mergedProps = solid.mergeProps(() => menu?.().triggerProps, props);
2099
+ const api = useMenuContext();
2100
+ const presenceApi = usePresenceContext();
2101
+ const mergedProps = solid.mergeProps(() => api().triggerProps, () => ({
2102
+ 'aria-controls': presenceApi().isUnmounted && null
2103
+ }), props);
2104
+
2105
+ // @ts-expect-error we want aria-controls to be null to remove them if the popover if lazy mounted
2093
2106
  return web.createComponent(ark.button, mergedProps);
2094
2107
  };
2095
2108