Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## [Unreleased]

### Added

- Added `mergeProps` utility for combining multiple props objects with proper event handler and className merging.
- Added `createContext` utility for creating typed React contexts with improved DX.

```tsx
import { createContext } from '@ark-ui/react/utils'
```

### Fixed

- **AngleSlider**: Export `angleSliderAnatomy` from the anatomy exports
Expand Down
10 changes: 10 additions & 0 deletions packages/react/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@
"default": "./dist/providers/locale/index.cjs"
}
},
"./utils": {
"import": {
"types": "./dist/utils/index.d.ts",
"default": "./dist/utils/index.js"
},
"require": {
"types": "./dist/utils/index.d.cts",
"default": "./dist/utils/index.cjs"
}
},
"./*": {
"import": {
"types": "./dist/components/*/index.d.ts",
Expand Down
1 change: 0 additions & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"switch",
"tabs",
"tags input",
"time picker",
"timer",
"toast",
"toggle group",
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './components'
export * from './providers'
export * from './utils'
export type { Assign, Optional } from './types'
2 changes: 2 additions & 0 deletions packages/react/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { createContext } from './create-context'
export { mergeProps } from '@zag-js/core'
9 changes: 9 additions & 0 deletions packages/solid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## [Unreleased]

### Added

- Added `mergeProps` utility for combining multiple props objects with proper event handler and className merging.
- Added `createContext` utility for creating typed React contexts with improved DX.

```tsx
import { createContext } from '@ark-ui/solid/utils'
```

### Fixed

- **AngleSlider**: Export `angleSliderAnatomy` from the anatomy exports
Expand Down
5 changes: 5 additions & 0 deletions packages/solid/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
"solid": "./dist/providers/locale/index.jsx",
"default": "./dist/providers/locale/index.js"
},
"./utils": {
"types": "./dist/utils/index.d.ts",
"solid": "./dist/utils/index.jsx",
"default": "./dist/utils/index.js"
},
"./*": {
"types": "./dist/components/*/index.d.ts",
"solid": "./dist/components/*/index.jsx",
Expand Down
1 change: 0 additions & 1 deletion packages/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"switch",
"tabs",
"tags input",
"time picker",
"toast",
"toggle group",
"tooltip",
Expand Down
1 change: 1 addition & 0 deletions packages/solid/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './components'
export * from './providers'
export * from './utils'
export type { Assign, Optional } from './types'
2 changes: 2 additions & 0 deletions packages/solid/src/utils/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { createContext } from './create-context'
export { mergeProps } from '@zag-js/core'
9 changes: 9 additions & 0 deletions packages/svelte/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ description: All notable changes will be documented in this file.

## [Unreleased]

### Added

- Added `mergeProps` utility for combining multiple props objects with proper event handler and className merging.
- Added `createContext` utility for creating typed React contexts with improved DX.

```tsx
import { createContext } from '@ark-ui/solid/utils'
```

## [5.9.1] - 2025-09-14

### Fixed
Expand Down
7 changes: 6 additions & 1 deletion packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"switch",
"tabs",
"tags input",
"time picker",
"timer",
"toast",
"toggle group",
Expand Down Expand Up @@ -81,6 +80,10 @@
"types": "./src/lib/providers/locale/index.ts",
"svelte": "./src/lib/providers/locale/index.ts"
},
"./utils": {
"types": "./src/lib/utils/index.ts",
"svelte": "./src/lib/utils/index.ts"
},
"./*": {
"types": "./src/lib/components/*/index.ts",
"svelte": "./src/lib/components/*/index.ts"
Expand Down Expand Up @@ -110,6 +113,8 @@
"exports.\\./locale.types": "./dist/providers/locale/index.d.ts",
"exports.\\./environment.svelte": "./dist/providers/environment/index.js",
"exports.\\./environment.types": "./dist/providers/environment/index.d.ts",
"exports.\\./utils.svelte": "./dist/utils/index.js",
"exports.\\./utils.types": "./dist/utils/index.d.ts",
"exports.\\./*.svelte": "./dist/components/*/index.js",
"exports.\\./*.types": "./dist/components/*/index.d.ts"
}
Expand Down
1 change: 1 addition & 0 deletions packages/svelte/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './components'
export * from './providers'
export * from './utils'
export type { Assign, Optional } from './types'
2 changes: 2 additions & 0 deletions packages/svelte/src/lib/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { createContext } from './create-context'
export { mergeProps } from '@zag-js/core'
9 changes: 9 additions & 0 deletions packages/vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## [Unreleased]

### Added

- Added `mergeProps` utility for combining multiple props objects with proper event handler and className merging.
- Added `createContext` utility for creating typed React contexts with improved DX.

```tsx
import { createContext } from '@ark-ui/solid/utils'
```

## [5.24.1] - 2025-09-14

### Fixed
Expand Down
10 changes: 10 additions & 0 deletions packages/vue/clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@
"default": "./dist/providers/locale/index.cjs"
}
},
"./utils": {
"import": {
"types": "./dist/utils/index.d.ts",
"default": "./dist/utils/index.js"
},
"require": {
"types": "./dist/utils/index.d.cts",
"default": "./dist/utils/index.cjs"
}
},
"./*": {
"import": {
"types": "./dist/components/*/index.d.ts",
Expand Down
1 change: 0 additions & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"switch",
"tabs",
"tags input",
"time picker",
"toast",
"toggle group",
"tooltip",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface VisibilityProps {
<script setup lang="ts">
import { computed } from 'vue'
import { Collapsible } from '../..'
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'
import { createSplitProps } from '../create-split-props'
import { useAccordionContext } from './use-accordion-context'
import { useAccordionItemPropsContext } from './use-accordion-item-props-context'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface AccordionItemIndicatorProps
</script>

<script setup lang="ts">
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'
import { ark } from '../factory'
import { useAccordionContext } from './use-accordion-context'
import { useAccordionItemPropsContext } from './use-accordion-item-props-context'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface AccordionItemTriggerProps
</script>

<script setup lang="ts">
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'
import { ark } from '../factory'
import { computed } from 'vue'
import { useAccordionContext } from './use-accordion-context'
Expand Down
3 changes: 2 additions & 1 deletion packages/vue/src/components/accordion/accordion-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export interface AccordionItemProps

<script setup lang="ts">
import { computed } from 'vue'
import { useRenderStrategyProps, useForwardExpose } from '../../utils'
import { useRenderStrategyProps } from '../../utils/use-render-strategy'
import { useForwardExpose } from '../../utils/use-forward-expose'
import { Collapsible } from '../collapsible'
import { useAccordionContext } from './use-accordion-context'
import { AccordionItemProvider } from './use-accordion-item-context'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLAttributes, UnwrapRef } from 'vue'
import type { RenderStrategyProps } from '../../utils'
import type { RenderStrategyProps } from '../../utils/use-render-strategy'
import type { PolymorphicProps } from '../factory'
import type { UseAccordionReturn } from './use-accordion'

Expand All @@ -19,7 +19,8 @@ export interface AccordionRootProviderProps

<script setup lang="ts">
import { computed } from 'vue'
import { RenderStrategyPropsProvider, useForwardExpose } from '../../utils'
import { RenderStrategyPropsProvider } from '../../utils/use-render-strategy'
import { useForwardExpose } from '../../utils/use-forward-expose'
import { ark } from '../factory'
import { AccordionProvider } from './use-accordion-context'

Expand Down
5 changes: 3 additions & 2 deletions packages/vue/src/components/accordion/accordion-root.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import type { HTMLAttributes } from 'vue'
import type { BooleanDefaults } from '../../types'
import type { RenderStrategyProps } from '../../utils'
import type { RenderStrategyProps } from '../../utils/use-render-strategy'
import type { PolymorphicProps } from '../factory'
import type { RootEmits, RootProps } from './accordion.types'

Expand All @@ -17,7 +17,8 @@ export interface AccordionRootEmits extends RootEmits {}

<script setup lang="ts">
import { computed } from 'vue'
import { RenderStrategyPropsProvider, useForwardExpose } from '../../utils'
import { RenderStrategyPropsProvider } from '../../utils/use-render-strategy'
import { useForwardExpose } from '../../utils/use-forward-expose'
import { ark } from '../factory'
import { useAccordion } from './use-accordion'
import { AccordionProvider } from './use-accordion-context'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { defineEmits, ref } from 'vue'
import { Accordion, type AccordionRootEmits, type AccordionRootProps } from '../'
import { useForwardPropsEmits } from '../../../utils'
import { useForwardPropsEmits } from '../../../utils/use-forward-props-emits'

const props = defineProps<AccordionRootProps>()
const emits = defineEmits<AccordionRootEmits>()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContext } from '../../utils'
import { createContext } from '../../utils/create-context'
import type { UsePresenceProps } from '../presence'
import type { UseAccordionReturn } from './use-accordion'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ItemState } from '@zag-js/accordion'
import type { ComputedRef } from 'vue'
import { createContext } from '../../utils'
import { createContext } from '../../utils/create-context'

export interface UseAccordionItemContext extends ComputedRef<ItemState> {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ItemProps } from '@zag-js/accordion'
import { createContext } from '../../utils'
import { createContext } from '../../utils/create-context'

export interface UseAccordionItemPropsContext extends ItemProps {}

Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/components/accordion/use-accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { type PropTypes, normalizeProps, useMachine } from '@zag-js/vue'
import { type ComputedRef, type MaybeRef, computed, toValue, useId } from 'vue'
import { DEFAULT_ENVIRONMENT, DEFAULT_LOCALE, useEnvironmentContext, useLocaleContext } from '../../providers'
import type { EmitFn, Optional } from '../../types'
import { cleanProps } from '../../utils'
import { cleanProps } from '../../utils/clean-props'
import type { RootEmits } from './accordion.types'

export interface UseAccordionProps extends Optional<Omit<accordion.Props, 'dir' | 'getRootNode'>, 'id'> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface AngleSliderControlProps
<script setup lang="ts">
import { ark } from '../factory'
import { useAngleSliderContext } from './use-angle-slider-context'
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'

defineProps<AngleSliderControlProps>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface AngleSliderHiddenInputProps
<script setup lang="ts">
import { ark } from '../factory'
import { useAngleSliderContext } from './use-angle-slider-context'
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'

defineProps<AngleSliderHiddenInputProps>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface AngleSliderLabelProps
</script>

<script setup lang="ts">
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'
import { ark } from '../factory'
import { useAngleSliderContext } from './use-angle-slider-context'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface AngleSliderMarkerGroupProps
<script setup lang="ts">
import { ark } from '../factory'
import { useAngleSliderContext } from './use-angle-slider-context'
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'

defineProps<AngleSliderMarkerGroupProps>()
const angleSlider = useAngleSliderContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface AngleSliderMarkerProps
<script setup lang="ts">
import { ark } from '../factory'
import { useAngleSliderContext } from './use-angle-slider-context'
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'

const props = defineProps<AngleSliderMarkerProps>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface AngleSliderRootProviderProps

<script setup lang="ts">
import { computed } from 'vue'
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'
import { ark } from '../factory'
import { AngleSliderProvider } from './use-angle-slider-context'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface AngleSliderRootEmits extends RootEmits {}
import { ark } from '../factory'
import { useAngleSlider } from './use-angle-slider'
import { AngleSliderProvider } from './use-angle-slider-context'
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'

const props = withDefaults(defineProps<AngleSliderRootProps>(), {
disabled: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface AngleSliderThumbProps
<script setup lang="ts">
import { ark } from '../factory'
import { useAngleSliderContext } from './use-angle-slider-context'
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'

defineProps<AngleSliderThumbProps>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface AngleSliderValueTextProps
<script setup lang="ts">
import { ark } from '../factory'
import { useAngleSliderContext } from './use-angle-slider-context'
import { useForwardExpose } from '../../utils'
import { useForwardExpose } from '../../utils/use-forward-expose'

defineProps<AngleSliderValueTextProps>()
const angleSlider = useAngleSliderContext()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContext } from '../../utils'
import { createContext } from '../../utils/create-context'
import type { UseAngleSliderReturn } from './use-angle-slider'

export interface UseAngleSliderContext extends UseAngleSliderReturn {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { type PropTypes, normalizeProps, useMachine } from '@zag-js/vue'
import { type ComputedRef, type EmitFn, type MaybeRef, computed, toValue, useId } from 'vue'
import { DEFAULT_ENVIRONMENT, DEFAULT_LOCALE, useEnvironmentContext, useLocaleContext } from '../../providers'
import type { Optional } from '../../types'
import { cleanProps } from '../../utils'
import { cleanProps } from '../../utils/clean-props'
import type { RootEmits } from './angle-slider.types'

export interface UseAngleSliderProps extends Optional<angleSlider.Props, 'id'> {
Expand Down
Loading
Loading