Skip to content

Commit

Permalink
chore: changeset 1.12.0 (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
jer3m01 authored Jan 13, 2024
1 parent 27f29a7 commit 7252051
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 9 deletions.
25 changes: 25 additions & 0 deletions .changeset/gentle-poems-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
"@kobalte/core": major
---

## v0.12.0 (January 14, 2024)

**Breaking changes**

- [#299](https://github.com/kobaltedev/kobalte/pull/299)
- `"@internationalized/message"` is no longer required in `ssr.noExternal` for [SSR with vite/SolidStart](https://kobalte.dev/docs/core/overview/ssr).
- `Breadcrumbs.Root` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/breadcrumbs#breadcrumbsroot).
- `Combobox.Root` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/combobox#comboboxroot).
- `Dialog.Root` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/dialog#dialogroot).
- `Popover.Root` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/popover#popoverroot).
- `Toast.Region` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/toast#toastregion).
- `Toast.Root` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/toast#toastroot).

**New features**

- [#301](https://github.com/kobaltedev/kobalte/pull/301)

**Bug fixes**

- [#292](https://github.com/kobaltedev/kobalte/pull/292)
- [#295](https://github.com/kobaltedev/kobalte/pull/295)
3 changes: 2 additions & 1 deletion apps/docs/src/VERSIONS.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const CORE_VERSIONS = [
"0.12.x",
"0.11.x",
"0.10.x",
"0.9.x",
Expand All @@ -14,4 +15,4 @@ export const CORE_VERSIONS = [

export const LATEST_CORE_CHANGELOG_URL = `/docs/changelog/${CORE_VERSIONS[0].replaceAll(".", "-")}`;

export const LATEST_CORE_VERSION_NAME = "v0.11.2";
export const LATEST_CORE_VERSION_NAME = "v0.12.0";
23 changes: 23 additions & 0 deletions apps/docs/src/routes/docs/changelog/0-12-x.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# v0.12.x

## v0.12.0 (January 14, 2024)

**Breaking changes**

- [#299](https://github.com/kobaltedev/kobalte/pull/299)
- `"@internationalized/message"` is no longer required in `ssr.noExternal` for [SSR with vite/SolidStart](https://kobalte.dev/docs/core/overview/ssr).
- `Breadcrumbs.Root` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/breadcrumbs#breadcrumbsroot).
- `Combobox.Root` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/combobox#comboboxroot).
- `Dialog.Root` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/dialog#dialogroot).
- `Popover.Root` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/popover#popoverroot).
- `Toast.Region` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/toast#toastregion).
- `Toast.Root` exposes a new [`translations` prop for localization](https://kobalte.dev/docs/core/components/toast#toastroot).

**New features**

- [#301](https://github.com/kobaltedev/kobalte/pull/301)

**Bug fixes**

- [#292](https://github.com/kobaltedev/kobalte/pull/292)
- [#295](https://github.com/kobaltedev/kobalte/pull/295)
7 changes: 4 additions & 3 deletions apps/docs/src/routes/docs/core/components/breadcrumbs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@ function App() {

### Breadcrumbs.Root

| Prop | Description |
| :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------- |
| separator | `string \| JSX.Element` <br/> The visual separator between each breadcrumb item. It will be used as the default children of `Breadcrumbs.Separator`. |
| Prop | Description |
| :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| separator | `string \| JSX.Element` <br/> The visual separator between each breadcrumb item. It will be used as the default children of `Breadcrumbs.Separator`. |
| translations | [`BreadcrumbsIntlTranslations`](https://github.com/kobaltedev/kobalte/blob/main/packages/core/src/breadcrumbs/breadcrumbs.intl.ts) <br/> Localization strings. |

### Breadcrumbs.Link

Expand Down
1 change: 1 addition & 0 deletions apps/docs/src/routes/docs/core/components/combobox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ We expose a CSS custom property `--kb-combobox-content-transform-origin` which c
| disabled | `boolean` <br/> Whether the combobox is disabled. |
| readOnly | `boolean` <br/> Whether the combobox items can be selected but not changed by the user. |
| autoComplete | `string` <br/> Describes the type of autocomplete functionality the input should provide if any. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete) |
| translations | [`ComboboxIntlTranslations`](https://github.com/kobaltedev/kobalte/blob/main/packages/core/src/combobox/combobox.intl.ts) <br/> Localization strings. |

`Combobox.Root` also accepts the following props to customize the placement of the `Combobox.Content`.

Expand Down
1 change: 1 addition & 0 deletions apps/docs/src/routes/docs/core/components/dialog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ function ControlledExample() {
| modal | `boolean` <br/> Whether the dialog should be the only visible content for screen readers, when set to `true`: <br/> - interaction with outside elements will be disabled. <br/> - scroll will be locked. <br/> - focus will be locked inside the dialog content. <br/> - elements outside the dialog content will not be visible for screen readers. |
| preventScroll | `boolean` <br/> Whether the scroll should be locked even if the dialog is not modal. |
| forceMount | `boolean` <br/> Used to force mounting the dialog (portal, overlay and content) when more control is needed. Useful when controlling animation with SolidJS animation libraries. |
| translations | [`DialogIntlTranslations`](https://github.com/kobaltedev/kobalte/blob/main/packages/core/src/dialog/dialog.intl.ts) <br/> Localization strings. |

### Dialog.Trigger

Expand Down
1 change: 1 addition & 0 deletions apps/docs/src/routes/docs/core/components/popover.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ We expose a CSS custom property `--kb-popover-content-transform-origin` which ca
| modal | `boolean` <br/> Whether the popover should be the only visible content for screen readers, when set to `true`: <br/> - interaction with outside elements will be disabled. <br/> - scroll will be locked. <br/> - focus will be locked inside the popover content. <br/> - elements outside the popover content will not be visible for screen readers. |
| preventScroll | `boolean` <br/> Whether the scroll should be locked even if the popover is not modal. |
| forceMount | `boolean` <br/> Used to force mounting the popover (portal and content) when more control is needed. Useful when controlling animation with SolidJS animation libraries. |
| translations | [`PopoverIntlTranslations`](https://github.com/kobaltedev/kobalte/blob/main/packages/core/src/popover/popover.intl.ts) <br/> Localization strings. |

`Popover.Root` also accepts the following props to customize the placement of the `Popover.Content`.

Expand Down
2 changes: 2 additions & 0 deletions apps/docs/src/routes/docs/core/components/toast.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ Inside your application, use add your custom region:
| pauseOnPageIdle | `boolean` <br/> **default:** true <br/> Whether the toasts close timeout should pause when the document loses focus or the page is idle (e.g. switching to a new browser tab). |
| topLayer | `boolean` <br/> **default:** true <br/> Whether the toast region is marked as a "top layer", so that it: <br/> - is not aria-hidden when opening an overlay. <br/> - allows focus even outside a containing focus scope. <br/> - doesn’t dismiss overlays when clicking on it, even though it is outside. |
| regionId | `string` <br/> The custom id of the region used for multiple regions. |
| translations | [`ToastRegionIntlTranslations`](https://github.com/kobaltedev/kobalte/blob/main/packages/core/src/toast/toast.intl.ts) <br/> Localization strings. |

### Toast.Root

Expand All @@ -596,6 +597,7 @@ Inside your application, use add your custom region:
| onSwipeCancel | `(event: SwipeEvent) => void` <br/> Event handler called when a swipe interaction is cancelled. |
| onSwipeEnd | `(event: SwipeEvent) => void` <br/> Event handler called at the end of a swipe interaction. |
| onEscapeKeyDown | `(event: KeyboardEvent) => void` <br/> Event handler called when the escape key is down. It can be prevented by calling `event.preventDefault`. |
| translations | [`ToastIntlTranslations`](https://github.com/kobaltedev/kobalte/blob/main/packages/core/src/toast/toast.intl.ts) <br/> Localization strings. |

| Data attribute | Description |
| :------------------- | :----------------------------------------------------------------------- |
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/breadcrumbs/breadcrumbs.intl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const BREADCRUMBS_INTL_TRANSLATIONS = {
// `aria-label` of the navigation.
breadcrumbs: "Breadcrumbs",
};

Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/combobox/combobox.intl.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export const COMBOBOX_INTL_TRANSLATIONS = {
// Annouce option to screen readers on focus.
focusAnnouncement: (optionText: string, isSelected: boolean) =>
`${optionText}${isSelected ? ", selected" : ""}`,
// Annouce the number of options available to screen readers on open.
countAnnouncement: (optionCount: number) => {
switch (optionCount) {
case 1:
Expand All @@ -9,8 +11,11 @@ export const COMBOBOX_INTL_TRANSLATIONS = {
`${optionCount} options available`;
}
},
// Annouce the selection of an option to screen readers.
selectedAnnouncement: (optionText: string) => `${optionText}, selected`,
// `aria-label` of Combobox.Trigger.
triggerLabel: "Show suggestions",
// `aria-label` of Combobox.Listbox.
listboxLabel: "Suggestions",
};

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/dialog/dialog.intl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const DIALOG_INTL_TRANSLATIONS = {
// `aria-label` of Dialog.CloseButton.
dismiss: "Dismiss",
};

Expand Down
5 changes: 0 additions & 5 deletions packages/core/src/dialog/dialog/dialog.intl.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/core/src/popover/popover.intl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const POPOVER_INTL_TRANSLATIONS = {
// `aria-label` of Popover.CloseButton.
dismiss: "Dismiss",
};

Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/toast/toast.intl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
export const TOAST_HOTKEY_PLACEHOLDER = "{hotkey}";

export const TOAST_INTL_TRANSLATIONS = {
// `aria-label` of Toast.CloseButton.
close: "Close",
};

export type ToastIntlTranslations = typeof TOAST_INTL_TRANSLATIONS;

export const TOAST_REGION_INTL_TRANSLATIONS = {
// `aria-label` of Toast.Region with notification count.
notifications: (hotkeyPlaceholder: string) => `Notifications (${hotkeyPlaceholder})`,
};

Expand Down

0 comments on commit 7252051

Please sign in to comment.