Skip to content

Commit

Permalink
Publish (#2738)
Browse files Browse the repository at this point in the history
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @ariakit/core@0.3.0

### Minor Changes

- [`#2783`](#2783) **BREAKING**
_(This should affect very few people)_: The `select` and `menu` props on
`useComboboxStore` have been removed. If you need to compose `Combobox`
with `Select` or `Menu`, use the `combobox` prop on `useSelectStore` or
`useMenuStore` instead.

- [`#2745`](#2745) Component
stores will now throw an error if they receive another store prop in
conjunction with default prop values.

### Patch Changes

- [`#2782`](#2782) Fixed form
store not synchrozining validate and submit callbacks with another form
store through the `store` property.

- [`#2783`](#2783) Component
store objects now contain properties for the composed stores passed to
them as props. For instance, `useSelectStore({ combobox })` will return
a `combobox` property if the `combobox` prop is specified.

- [`#2785`](#2785) Added `parent`
and `menubar` properties to the menu store. These properties are
automatically set when rendering nested menus or menus within a menubar.

Now, it also supports rendering nested menus that aren't nested in the
React tree. In this case, you would have to supply the parent menu store
manually to the child menu store.

These properties are also included in the returned menu store object,
allowing you to verify whether the menu is nested. For instance:

    ```jsx
    const menu = useMenuStore(props);
    const isNested = Boolean(menu.parent);
    ```

- [`#2796`](#2796) Composed store
props such as `useSelectStore({ combobox })` now accept `null` as a
value.

## @ariakit/react@0.3.0

### Minor Changes

- [`#2714`](#2714) Added support
for a dynamic `store` prop on component stores.

This is similar to the `store` prop on components, keeping both stores
in sync. Now, component store hooks can support modifying the value of
the `store` prop after the initial render. For instance:

    ```js
    // props.store can change between renders now
    const checkbox = useCheckboxStore({ store: props.store });
    ```

When the `store` prop changes, the object returned from the store hook
will update as well. Consequently, effects and hooks that rely on the
store will re-run.

While it's unlikely, this **could represent a breaking change** if
you're depending on the `store` prop in component stores to only
acknowledge the first value passed to it.

- [`#2783`](#2783) **BREAKING**
_(This should affect very few people)_: The `combobox` state on
`useSelectStore` has been replaced by the `combobox` property on the
store object.

    **Before:**

    ```js
    const combobox = useComboboxStore();
    const select = useSelectStore({ combobox });
    const hasCombobox = select.useState("combobox");
    ```

    **After:**

    ```js
    const combobox = useComboboxStore();
    const select = useSelectStore({ combobox });
    const hasCombobox = Boolean(select.combobox);
    ```

In the example above, `select.combobox` is literally the same as the
`combobox` store. It will be defined if the `combobox` store is passed
to `useSelectStore`.

- [`#2783`](#2783) **BREAKING**
_(This should affect very few people)_: The `select` and `menu` props on
`useComboboxStore` have been removed. If you need to compose `Combobox`
with `Select` or `Menu`, use the `combobox` prop on `useSelectStore` or
`useMenuStore` instead.

- [`#2717`](#2717) The `children`
prop as a function has been deprecated on all components. Use the
[`render`](https://ariakit.org/guide/composition#explicit-render-function)
prop instead.

- [`#2717`](#2717) The `as` prop
has been deprecated on all components. Use the
[`render`](https://ariakit.org/guide/composition) prop instead.

- [`#2717`](#2717) The
`backdropProps` prop has been deprecated on `Dialog` and derived
components. Use the
[`backdrop`](https://ariakit.org/reference/dialog#backdrop) prop
instead.

- [`#2745`](#2745) Component
stores will now throw an error if they receive another store prop in
conjunction with default prop values.

### Patch Changes

- [`#2737`](#2737) Fixed
controlled component stores rendering with a stale state.

- [`#2783`](#2783) Component
store objects now contain properties for the composed stores passed to
them as props. For instance, `useSelectStore({ combobox })` will return
a `combobox` property if the `combobox` prop is specified.

- [`#2785`](#2785) Added `parent`
and `menubar` properties to the menu store. These properties are
automatically set when rendering nested menus or menus within a menubar.

Now, it also supports rendering nested menus that aren't nested in the
React tree. In this case, you would have to supply the parent menu store
manually to the child menu store.

These properties are also included in the returned menu store object,
allowing you to verify whether the menu is nested. For instance:

    ```jsx
    const menu = useMenuStore(props);
    const isNested = Boolean(menu.parent);
    ```

- [`#2795`](#2795) Updated the
`Menu` component so the `composite` and `typeahead` props are
automatically set to `false` when combining it with a `Combobox`
component.

This means you'll not need to explicitly pass `composite={false}` when
building a [Menu with
Combobox](https://ariakit.org/examples/menu-combobox) component.

- [`#2796`](#2796) Composed store
props such as `useSelectStore({ combobox })` now accept `null` as a
value.

-   Updated dependencies: `@ariakit/react-core@0.3.0`.

## @ariakit/react-core@0.3.0

### Minor Changes

- [`#2714`](#2714) Added support
for a dynamic `store` prop on component stores.

This is similar to the `store` prop on components, keeping both stores
in sync. Now, component store hooks can support modifying the value of
the `store` prop after the initial render. For instance:

    ```js
    // props.store can change between renders now
    const checkbox = useCheckboxStore({ store: props.store });
    ```

When the `store` prop changes, the object returned from the store hook
will update as well. Consequently, effects and hooks that rely on the
store will re-run.

While it's unlikely, this **could represent a breaking change** if
you're depending on the `store` prop in component stores to only
acknowledge the first value passed to it.

- [`#2714`](#2714) **BREAKING**:
The `useStore` function exported by `@ariakit/react-core/utils/store`
has been updated.

- [`#2760`](#2760) **BREAKING**:
The `useStoreState` function exported by
`@ariakit/react-core/utils/store` has been updated so it'll always run
the selector callback even when the passed store is `null` or
`undefined`.

- [`#2783`](#2783) **BREAKING**
_(This should affect very few people)_: The `combobox` state on
`useSelectStore` has been replaced by the `combobox` property on the
store object.

    **Before:**

    ```js
    const combobox = useComboboxStore();
    const select = useSelectStore({ combobox });
    const hasCombobox = select.useState("combobox");
    ```

    **After:**

    ```js
    const combobox = useComboboxStore();
    const select = useSelectStore({ combobox });
    const hasCombobox = Boolean(select.combobox);
    ```

In the example above, `select.combobox` is literally the same as the
`combobox` store. It will be defined if the `combobox` store is passed
to `useSelectStore`.

- [`#2783`](#2783) **BREAKING**
_(This should affect very few people)_: The `select` and `menu` props on
`useComboboxStore` have been removed. If you need to compose `Combobox`
with `Select` or `Menu`, use the `combobox` prop on `useSelectStore` or
`useMenuStore` instead.

- [`#2717`](#2717) The `children`
prop as a function has been deprecated on all components. Use the
[`render`](https://ariakit.org/guide/composition#explicit-render-function)
prop instead.

- [`#2717`](#2717) The `as` prop
has been deprecated on all components. Use the
[`render`](https://ariakit.org/guide/composition) prop instead.

- [`#2717`](#2717) The
`backdropProps` prop has been deprecated on `Dialog` and derived
components. Use the
[`backdrop`](https://ariakit.org/reference/dialog#backdrop) prop
instead.

- [`#2745`](#2745) Component
stores will now throw an error if they receive another store prop in
conjunction with default prop values.

### Patch Changes

- [`#2737`](#2737) Fixed
controlled component stores rendering with a stale state.

- [`#2758`](#2758) Added
`CheckboxProvider` component and `useCheckboxContext` hook.

- [`#2759`](#2759) Added
`CollectionProvider` component and `useCollectionContext` hook.

- [`#2769`](#2769) Added
`DisclosureProvider` component and `useDisclosureContext` hook.

- [`#2770`](#2770) Added
`CompositeProvider` component and `useCompositeContext` hook.

- [`#2771`](#2771) Added
`DialogProvider` component and `useDialogContext` hook.

- [`#2774`](#2774) Added
`PopoverProvider` component and `usePopoverContext` hook.

- [`#2775`](#2775) Added
`ComboboxProvider` component and `useComboboxContext` hook.

- [`#2776`](#2776) Added
`SelectProvider` component and `useSelectContext` hook.

- [`#2777`](#2777) Added
`RadioProvider` component and `useRadioContext` hook.

- [`#2778`](#2778) Added
`HovercardProvider` component and `useHovercardContext` hook.

- [`#2779`](#2779) Added
`TabProvider` component and `useTabContext` hook.

- [`#2780`](#2780) Added
`ToolbarProvider` component and `useToolbarContext` hook.

- [`#2781`](#2781) Added
`TooltipProvider` component and `useTooltipContext` hook.

- [`#2782`](#2782) Added
`FormProvider` component and `useFormContext` hook.

- [`#2783`](#2783) Component
store objects now contain properties for the composed stores passed to
them as props. For instance, `useSelectStore({ combobox })` will return
a `combobox` property if the `combobox` prop is specified.

- [`#2785`](#2785) Added
`MenuProvider` component and `useMenuContext` hook.

- [`#2785`](#2785) Added
`MenuBarProvider` component and `useMenuBarContext` hook.

- [`#2785`](#2785) Added `parent`
and `menubar` properties to the menu store. These properties are
automatically set when rendering nested menus or menus within a menubar.

Now, it also supports rendering nested menus that aren't nested in the
React tree. In this case, you would have to supply the parent menu store
manually to the child menu store.

These properties are also included in the returned menu store object,
allowing you to verify whether the menu is nested. For instance:

    ```jsx
    const menu = useMenuStore(props);
    const isNested = Boolean(menu.parent);
    ```

- [`#2794`](#2794) The `combobox`
prop on `useSelectStore` is now automatically set based on the context.

- [`#2795`](#2795) Updated the
`Menu` component so the `composite` and `typeahead` props are
automatically set to `false` when combining it with a `Combobox`
component.

This means you'll not need to explicitly pass `composite={false}` when
building a [Menu with
Combobox](https://ariakit.org/examples/menu-combobox) component.

- [`#2795`](#2795) The `combobox`
prop on `useMenuStore` is now automatically set based on the context.

- [`#2796`](#2796) Composed store
props such as `useSelectStore({ combobox })` now accept `null` as a
value.

-   Updated dependencies: `@ariakit/core@0.3.0`.

## @ariakit/test@0.2.3

### Patch Changes

-   Updated dependencies: `@ariakit/core@0.3.0`.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] committed Sep 6, 2023
1 parent 4ac001c commit 0945bc8
Show file tree
Hide file tree
Showing 42 changed files with 231 additions and 236 deletions.
17 changes: 0 additions & 17 deletions .changeset/0-2714-clean-coins-play-1.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/0-2714-clean-coins-play-2.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/0-2760-real-toes-prove.md

This file was deleted.

24 changes: 0 additions & 24 deletions .changeset/0-2783-has-combobox.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/0-2783-menu-select-on-combobox-store.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/2717-large-shrimps-cross-1.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/2717-large-shrimps-cross-2.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/2717-large-shrimps-cross-3.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/2737-chilly-rivers-argue.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/2745-thin-pugs-thank.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2758-rich-peas-fix-1.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2759-big-waves-build-1.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2769-big-waves-build-1.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2770-big-waves-build-1.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2771-big-waves-dialog-1.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2774-big-waves-dialog-1.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2775-big-waves-dialog-2.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2776-big-waves-dialog-3.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2777-big-waves-dialog-4.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2778-big-waves-dialog-6.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2779-big-waves-dialog-5.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2780-big-waves-build-5.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2781-big-waves-build.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2782-big-waves-build-2.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2782-big-waves-build.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/2783-sync-stores.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2785-menu-provider-2.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2785-menu-provider-3.md

This file was deleted.

16 changes: 0 additions & 16 deletions .changeset/2785-menu-provider-4.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2794-select-provider-auto-combobox.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/2795-menu-list-automatic-composite-1.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/2795-menu-list-automatic-composite-2.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/2796-store-null.md

This file was deleted.

14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions packages/ariakit-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# @ariakit/core

## 0.3.0

### Minor Changes

- [`#2783`](https://github.com/ariakit/ariakit/pull/2783) **BREAKING** _(This should affect very few people)_: The `select` and `menu` props on `useComboboxStore` have been removed. If you need to compose `Combobox` with `Select` or `Menu`, use the `combobox` prop on `useSelectStore` or `useMenuStore` instead.

- [`#2745`](https://github.com/ariakit/ariakit/pull/2745) Component stores will now throw an error if they receive another store prop in conjunction with default prop values.

### Patch Changes

- [`#2782`](https://github.com/ariakit/ariakit/pull/2782) Fixed form store not synchrozining validate and submit callbacks with another form store through the `store` property.

- [`#2783`](https://github.com/ariakit/ariakit/pull/2783) Component store objects now contain properties for the composed stores passed to them as props. For instance, `useSelectStore({ combobox })` will return a `combobox` property if the `combobox` prop is specified.

- [`#2785`](https://github.com/ariakit/ariakit/pull/2785) Added `parent` and `menubar` properties to the menu store. These properties are automatically set when rendering nested menus or menus within a menubar.

Now, it also supports rendering nested menus that aren't nested in the React tree. In this case, you would have to supply the parent menu store manually to the child menu store.

These properties are also included in the returned menu store object, allowing you to verify whether the menu is nested. For instance:

```jsx
const menu = useMenuStore(props);
const isNested = Boolean(menu.parent);
```

- [`#2796`](https://github.com/ariakit/ariakit/pull/2796) Composed store props such as `useSelectStore({ combobox })` now accept `null` as a value.

## 0.2.9

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ariakit-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ariakit/core",
"version": "0.2.9",
"version": "0.3.0",
"description": "Ariakit core",
"sideEffects": false,
"license": "MIT",
Expand Down

1 comment on commit 0945bc8

@vercel
Copy link

@vercel vercel bot commented on 0945bc8 Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ariakit – ./

ariakit-ariakit.vercel.app
ariakit-git-main-ariakit.vercel.app
www.ariakit.org
ariakit.org

Please sign in to comment.