Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia committed Oct 27, 2024
2 parents e17a9b4 + fc58681 commit d263245
Show file tree
Hide file tree
Showing 47 changed files with 298 additions and 121 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
- Read the [docs](https://radix-vue.com/)
- Ask on [Discord Chat](https://chat.radix-vue.com/)
- Ask on [GitHub Discussions](https://github.com/radix-vue/radix-vue/discussions)
- Ask on [GitHub Discussions](https://github.com/unovue/radix-vue/discussions)
Also try to search for your issue - it may have already been answered or even fixed.
However, if you find that an old, closed issue still persists in the latest version,
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export default defineConfig({
provider: 'local',
},
editLink: {
pattern: 'https://github.com/radix-vue/radix-vue/edit/main/docs/content/:path',
pattern: 'https://github.com/unovue/radix-vue/edit/main/docs/content/:path',
},
carbonAds: {
code: 'CW7DP2JW',
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/custom/Showcase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const { frontmatter } = useData()
<a
class="w-max text-sm mt-4 flex items-center justify-center gap-2 whitespace-nowrap rounded-lg py-2.5 px-4 bg-primary font-semibold text-primary-foreground hover:bg-primary/90"
target="_blank"
href="https://github.com/radix-vue/radix-vue/edit/main/docs/content/showcase.md"
href="https://github.com/unovue/reka-ui/edit/main/docs/content/showcase.md"
>
Add Showcase
</a>
Expand Down
6 changes: 3 additions & 3 deletions docs/.vitepress/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export const legacyVersion = 'Radix Vue v1.9.x'
export const legacyLink = 'https://radix-vue.com/'

/* GitHub and social links */
export const github = 'https://github.com/radix-vue/radix-vue'
export const releases = 'https://github.com/radix-vue/radix-vue/releases'
export const contributing = 'https://github.com/radix-vue/radix-vue/blob/main/CONTRIBUTING.md'
export const github = 'https://github.com/unovue/radix-vue'
export const releases = 'https://github.com/unovue/radix-vue/releases'
export const contributing = 'https://github.com/unovue/radix-vue/blob/main/CONTRIBUTING.md'
export const discord = 'https://chat.radix-vue.com'
// export const mastodon = "https://elk.zone/m.webtoo.ls/@vitest";
// export const twitter = "https://twitter.com/vitest_dev";
Expand Down
1 change: 1 addition & 0 deletions docs/components/demo/Accordion/css/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const accordionItems = [
<Icon
icon="radix-icons:chevron-down"
class="AccordionChevron"
aria-label="Expand/Collapse"
/>
</AccordionTrigger>
</AccordionHeader>
Expand Down
1 change: 1 addition & 0 deletions docs/components/demo/Accordion/tailwind/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const accordionItems = [
<Icon
icon="radix-icons:chevron-down"
class="text-green10 ease-[cubic-bezier(0.87,_0,_0.13,_1)] transition-transform duration-300 group-data-[state=open]:rotate-180"
aria-label="Expand/Collapse"
/>
</AccordionTrigger>
</AccordionHeader>
Expand Down
1 change: 0 additions & 1 deletion docs/components/demo/Calendar/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
.CalendarHeading {
font-weight: 500;
color: #000000;
color: 15px;
}

.CalendarWrapper {
Expand Down
2 changes: 1 addition & 1 deletion docs/components/demo/CalendarSelect/css/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const preferences = [
{ locale: 'en-US', label: 'Default', ordering: 'gregory' },
{ label: 'Arabic (Algeria)', locale: 'ar-DZ', territories: 'DJ DZ EH ER IQ JO KM LB LY MA MR OM PS SD SY TD TN YE', ordering: 'gregory islamic islamic-civil islamic-tbla' },
{ label: 'Arabic (United Arab Emirates)', locale: 'ar-AE', territories: 'AE BH KW QA', ordering: 'gregory islamic-umalqura islamic islamic-civil islamic-tbla' },
{ label: 'Arabic (Egypt)', locale: 'AR-EG', territories: 'EG', ordering: 'gregory coptic islamic islamic-civil islamic-tbla' },
{ label: 'Arabic (Egypt)', locale: 'ar-EG', territories: 'EG', ordering: 'gregory coptic islamic islamic-civil islamic-tbla' },
{ label: 'Arabic (Saudi Arabia)', locale: 'ar-SA', territories: 'SA', ordering: 'islamic-umalqura gregory islamic islamic-rgsa' },
{ label: 'Farsi (Afghanistan)', locale: 'fa-AF', territories: 'AF IR', ordering: 'persian gregory islamic islamic-civil islamic-tbla' },
{ label: 'Amharic (Ethiopia)', locale: 'am-ET', territories: 'ET', ordering: 'gregory ethiopic ethioaa' },
Expand Down
2 changes: 1 addition & 1 deletion docs/components/demo/Collapsible/css/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const open = ref(false)
</div>

<div class="Repository">
<span class="Text">@radix-vue/radix-vue</span>
<span class="Text">@unovue/radix-vue</span>
</div>

<CollapsibleContent>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/components/combobox.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ const selectedPeople = ref([people[0], people[1]])

### Custom filtering

Internally, `ComboboxRoot` would apply default [filter function](https://github.com/radix-vue/radix-vue/blob/main/packages/core/src/Combobox/ComboboxRoot.vue#L128) to filter relevant `ComboboxItem` (only apply when `modelValue` is type `string`).
Internally, `ComboboxRoot` would apply default [filter function](https://github.com/unovue/reka-ui/blob/main/packages/core/src/Combobox/ComboboxRoot.vue#L128) to filter relevant `ComboboxItem` (only apply when `modelValue` is type `string`).

However this behavior can be replaced using 2 different method.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/components/slider.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ const forward = useForwardPropsEmits(props, emits)

### Mouse events are not fired

Because of [a limitation](https://github.com/radix-vue/radix-vue/blob/main/packages/core/src/Slider/SliderImpl.vue#L48-L49) we faced during implementation, the following example won't work as expected and the `@mousedown` and `@mousedown` event handlers won't be fired:
Because of [a limitation](https://github.com/unovue/reka-ui/blob/main/packages/core/src/Slider/SliderImpl.vue#L48-L49) we faced during implementation, the following example won't work as expected and the `@mousedown` and `@mousedown` event handlers won't be fired:

```vue
<SliderRoot
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/components/stepper.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ If you want to hide the description, wrap it inside our Visually Hidden utility

### Vertical

You can create vertical tabs by using the `orientation` prop.
You can create vertical steps by using the `orientation` prop.

```vue line=8
<script setup>
Expand Down
18 changes: 9 additions & 9 deletions docs/content/docs/guides/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ npx codemod reka-ui/update-css-and-data-attributes

### Combobox

- [Remove `filter-function` props](https://github.com/radix-vue/radix-vue/commit/ee8a3f2366a5c27c2bf1cc0a1ecbb0fea559a9f7) - `Combobox` has been refactored and improve to support better custom filtering. Read more.
- [Remove `filter-function` props](https://github.com/unovue/reka-ui/commit/ee8a3f2366a5c27c2bf1cc0a1ecbb0fea559a9f7) - `Combobox` has been refactored and improve to support better custom filtering. Read more.

```vue
<template>
Expand All @@ -96,8 +96,8 @@ npx codemod reka-ui/update-css-and-data-attributes

</Callout>

- [Replace `searchTerm` props of Root to Input's `v-model`](https://github.com/radix-vue/radix-vue/commit/e1bab6598c3533dfbf6a86ad26b471ab826df069#diff-833593a5ce28a8c3fabc7d77462b116405e25df2b93bcab449798b5799e73474)
- [Move `displayValue` props from Root to Input](https://github.com/radix-vue/radix-vue/commit/e1bab6598c3533dfbf6a86ad26b471ab826df069#diff-833593a5ce28a8c3fabc7d77462b116405e25df2b93bcab449798b5799e73474)
- [Replace `searchTerm` props of Root to Input's `v-model`](https://github.com/unovue/reka-ui/commit/e1bab6598c3533dfbf6a86ad26b471ab826df069#diff-833593a5ce28a8c3fabc7d77462b116405e25df2b93bcab449798b5799e73474)
- [Move `displayValue` props from Root to Input](https://github.com/unovue/reka-ui/commit/e1bab6598c3533dfbf6a86ad26b471ab826df069#diff-833593a5ce28a8c3fabc7d77462b116405e25df2b93bcab449798b5799e73474)

```vue
<template>
Expand All @@ -110,11 +110,11 @@ npx codemod reka-ui/update-css-and-data-attributes

### Arrow

- [Improve arrow polygon](https://github.com/radix-vue/radix-vue/commit/ac8f3c34760f4c9c0f952ecd027b32951b9c416c) - Change the svg polygon to allow better styling.
- [Improve arrow polygon](https://github.com/unovue/reka-ui/commit/ac8f3c34760f4c9c0f952ecd027b32951b9c416c) - Change the svg polygon to allow better styling.

### Form component

- [Rename controlled state to `v-model`](https://github.com/radix-vue/radix-vue/commit/87aa5ba6016fa7a98f02ea43062212906b2633a0) - Replace `v-model:checked`, `v-model:pressed` with more familiar API for form component.
- [Rename controlled state to `v-model`](https://github.com/unovue/reka-ui/commit/87aa5ba6016fa7a98f02ea43062212906b2633a0) - Replace `v-model:checked`, `v-model:pressed` with more familiar API for form component.

```vue
<template>
Expand All @@ -131,11 +131,11 @@ npx codemod reka-ui/update-css-and-data-attributes

</Callout>

- [Reposition `VisuallyHidden`](https://github.com/radix-vue/radix-vue/commit/107389a9c230d2c94232887b9cbe2710222564aa) - Previously `VisuallyHidden` were position at the root node, causing style scoped to not be applied.
- [Reposition `VisuallyHidden`](https://github.com/unovue/reka-ui/commit/107389a9c230d2c94232887b9cbe2710222564aa) - Previously `VisuallyHidden` were position at the root node, causing style scoped to not be applied.

### Pagination

- [Required `itemsPerPage` prop](https://github.com/radix-vue/radix-vue/commit/37bba0c26a3cbe7e7e3e4ac36770be3ef5224f0c) - Instead of default `itemsPerPage` value, now it is required as to provide a more explicit hint about the page size.
- [Required `itemsPerPage` prop](https://github.com/unovue/reka-ui/commit/37bba0c26a3cbe7e7e3e4ac36770be3ef5224f0c) - Instead of default `itemsPerPage` value, now it is required as to provide a more explicit hint about the page size.

```vue
<template>
Expand All @@ -145,7 +145,7 @@ npx codemod reka-ui/update-css-and-data-attributes

### Calendar

- [Remove deprecated step prop](https://github.com/radix-vue/radix-vue/commit/ec146dd8fa0f95f64baf0b29c3424ee31cfb9666) - Use `prevPage/nextPage` props for greater control.
- [Remove deprecated step prop](https://github.com/unovue/reka-ui/commit/ec146dd8fa0f95f64baf0b29c3424ee31cfb9666) - Use `prevPage/nextPage` props for greater control.

```vue
<script setup lang="ts">
Expand Down Expand Up @@ -175,7 +175,7 @@ npx codemod reka-ui/update-css-and-data-attributes

### Select

- [`SelectValue` no longer render teleported element](https://github.com/radix-vue/radix-vue/commit/6a623484d610cc3b7c1a23a77c253c8e95cef518) - Previous implmenentation of `SelectValue` will render the selected `SelectItem` via teleporting fragment. This causes SSR flickering, and it is unnecessarily computation.
- [`SelectValue` no longer render teleported element](https://github.com/unovue/reka-ui/commit/6a623484d610cc3b7c1a23a77c253c8e95cef518) - Previous implmenentation of `SelectValue` will render the selected `SelectItem` via teleporting fragment. This causes SSR flickering, and it is unnecessarily computation.

```vue
<template>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/guides/namespaced-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Reka UI design pattern is to create primitives for each component, and allow use

However, importing all the necessary components 1-by-1 can be quite an effort, and the user might sometimes accidentally leave out an important component.

In order to solve this pain point, we've introduced [Namespaced components](https://vuejs.org/api/sfc-script-setup.html#namespaced-components) starting from [v.1.2.0](https://github.com/radix-vue/radix-vue/releases/tag/v1.2.0).
In order to solve this pain point, we've introduced [Namespaced components](https://vuejs.org/api/sfc-script-setup.html#namespaced-components) starting from [v.1.2.0](https://github.com/unovue/radix-vue/releases/tag/v1.2.0).

## How to use?

Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/overview/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ To receive updates on new primitives, announcements, blog posts, and general Rad

To file issues, request features, and contribute, check out our GitHub.

[GitHub repo](https://github.com/radix-vue/radix-vue)
[GitHub repo](https://github.com/unovue/radix-vue)

[Code of conduct](https://github.com/radix-vue/radix-vue/CODE_OF_CONDUCT.md)
[Code of conduct](https://github.com/unovue/radix-vue/CODE_OF_CONDUCT.md)
2 changes: 1 addition & 1 deletion docs/content/docs/overview/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ description: Discover the latest release of Reka UI.
Discover the latest release of Reka UI.
</Description>

[Latest releases on github](https://github.com/radix-vue/radix-vue/releases)
[Latest releases on github](https://github.com/unovue/radix-vue/releases)
2 changes: 1 addition & 1 deletion docs/content/docs/utilities/config-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { ConfigProvider } from 'reka-ui'

When creating localized apps that require right-to-left (RTL) reading direction, you need to wrap your application with the `ConfigProvider` component to ensure all of the primitives adjust their behavior based on the `dir` prop.

You can also change the global behavior of `bodylock` for components such as `Alert`, `DropdownMenu` and etc to fit your layout to prevent any [content shifts](https://github.com/radix-vue/radix-vue/issues/385).
You can also change the global behavior of `bodylock` for components such as `Alert`, `DropdownMenu` and etc to fit your layout to prevent any [content shifts](https://github.com/unovue/radix-vue/issues/385).

<!-- @include: @/meta/ConfigProvider.md -->

Expand Down
2 changes: 1 addition & 1 deletion docs/scripts/update-contributors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface Contributor {
async function fetchContributors(page = 1) {
const collaborators: string[] = []

const res = await fetch(`https://api.github.com/repos/radix-vue/radix-vue/contributors?per_page=100&page=${page}`, {
const res = await fetch(`https://api.github.com/repos/unovue/radix-vue/contributors?per_page=100&page=${page}`, {
headers: {
Accept: 'application/vnd.github+json',
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"packageManager": "pnpm@9.4.0",
"license": "MIT",
"repository": "radix-vue/radix-vue",
"repository": "unovue/radix-vue",
"workspaces": [
"packages/*"
],
Expand Down
12 changes: 6 additions & 6 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"description": "Vue port for Radix UI Primitives.",
"author": "UnoVue Contributors (https://github.com/radix-vue)",
"license": "MIT",
"homepage": "https://github.com/radix-vue/radix-vue",
"homepage": "https://github.com/unovue/radix-vue",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-vue/radix-vue.git"
"url": "git+https://github.com/unovue/radix-vue.git"
},
"bugs": {
"url": "https://github.com/radix-vue/radix-vue/issues"
"url": "https://github.com/unovue/radix-vue/issues"
},
"keywords": [
"ui",
Expand Down Expand Up @@ -127,9 +127,9 @@
"@vitest/coverage-istanbul": "^2.1.1",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.5.1",
"jsdom": "^25.0.0",
"vite": "^5.4.6",
"vite-plugin-dts": "^4.2.1",
"jsdom": "^25.0.1",
"vite": "^5.4.8",
"vite-plugin-dts": "^4.2.3",
"vitest": "^2.1.1",
"vitest-axe": "0.1.0",
"vitest-canvas-mock": "^0.3.3",
Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/Accordion/AccordionContent.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import type { PrimitiveProps } from '@/Primitive'
import type { CollapsibleContentProps } from '../Collapsible'
export interface AccordionContentProps extends PrimitiveProps {}
export interface AccordionContentProps extends CollapsibleContentProps {}
</script>

<script setup lang="ts">
Expand All @@ -22,6 +22,7 @@ useForwardExpose()
<CollapsibleContent
role="region"
:as-child="props.asChild"
:force-mount="props.forceMount"
:aria-labelledby="itemContext.triggerId"
:data-state="itemContext.dataState.value"
:data-disabled="itemContext.dataDisabled.value"
Expand Down
9 changes: 3 additions & 6 deletions packages/core/src/Calendar/CalendarRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,10 @@ function onDateChange(value: DateValue) {
}
else { modelValue.value = value.copy() }
}
else if (!modelValue.value) {
modelValue.value = [value.copy()]
}
else if (Array.isArray(modelValue.value)) {
if (!modelValue.value) {
modelValue.value = [value.copy()]
return
}
const index = modelValue.value.findIndex(date => isSameDay(date, value))
if (index === -1) {
modelValue.value = [...modelValue.value, value]
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/Collapsible/CollapsibleRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ useForwardExpose()
<Primitive
:as="as"
:as-child="props.asChild"
:data-state="props.open ? 'open' : 'closed'"
:data-disabled="props.disabled ? '' : undefined"
:data-state="open ? 'open' : 'closed'"
:data-disabled="disabled ? '' : undefined"
>
<slot :open="open" />
</Primitive>
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Collapsible/story/Collapsible.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const rootDisabled = ref(false)
<div
class="bg-white rounded my-[10px] p-[10px] shadow-[0_2px_10px] shadow-blackA7"
>
<span class="text-violet11 text-[15px] leading-[25px]">radix-vue/radix-vue</span>
<span class="text-violet11 text-[15px] leading-[25px]">unovue/radix-vue</span>
</div>

<CollapsibleContent class=" data-[state=open]:animate-slideDown data-[state=closed]:animate-slideUp">
Expand Down
Loading

0 comments on commit d263245

Please sign in to comment.