@ark-ui/react 1.0.0-beta.5 → 1.0.0
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,20 @@ description: All notable changes to this project will be documented in this file
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.0.0] - 2023-11-09
|
|
10
|
+
|
|
11
|
+
We are happy to announce the release of `@ark-ui/react@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.
|
|
12
|
+
|
|
13
|
+
### Highlights
|
|
14
|
+
|
|
15
|
+
- Revised the `Presence` component: `lazyMount` and `unmountOnExit` have been added at the root level. For some disclosure components like `Tabs` and `Accordion`, this constitutes a breaking change.
|
|
16
|
+
- Breaking changes have been implemented in `Accordion`, `ColorPicker`, `DatePicker`, `Dialog`, `RadioGroup`, `SegmentGroup`, `TagsInput`, `Toast`, and `ToggleGroup` to achieve a consistent and more intuitive API.
|
|
17
|
+
- Resolved various bugs and addressed accessibility issues across all components.
|
|
18
|
+
|
|
19
|
+
### Stability and Support
|
|
20
|
+
|
|
21
|
+
With the release of version 1.0.0, we are moving towards a more stable version of `@ark-ui/react`. 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
|
+
|
|
9
23
|
## [1.0.0-beta.5] - 2023-11-09
|
|
10
24
|
|
|
11
25
|
- Integrate latest `@zag-js` packages
|
|
@@ -4,12 +4,26 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
require('
|
|
7
|
+
const anatomy = require('@ark-ui/anatomy');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const factory = require('../factory.cjs');
|
|
8
10
|
const colorPickerContext = require('./color-picker-context.cjs');
|
|
9
11
|
|
|
10
|
-
const ColorPickerView = (props) => {
|
|
12
|
+
const ColorPickerView = react.forwardRef((props, ref) => {
|
|
11
13
|
const api = colorPickerContext.useColorPickerContext();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
if (api.format !== props.format) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18
|
+
factory.ark.div,
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
"data-format": props.format,
|
|
22
|
+
...anatomy.colorPickerAnatomy.build().view.attrs,
|
|
23
|
+
...props
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
ColorPickerView.displayName = "ColorPickerView";
|
|
14
28
|
|
|
15
29
|
exports.ColorPickerView = ColorPickerView;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
import type { ColorFormat } from '@zag-js/color-picker';
|
|
3
|
-
import { type
|
|
4
|
-
export interface ColorPickerViewProps extends
|
|
4
|
+
import { type HTMLArkProps } from '../factory';
|
|
5
|
+
export interface ColorPickerViewProps extends HTMLArkProps<'div'> {
|
|
5
6
|
format: ColorFormat;
|
|
6
7
|
}
|
|
7
|
-
export declare const ColorPickerView:
|
|
8
|
+
export declare const ColorPickerView: ForwardRefExoticComponent<ColorPickerViewProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx
|
|
3
|
-
import '
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { colorPickerAnatomy } from '@ark-ui/anatomy';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { ark } from '../factory.mjs';
|
|
4
6
|
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
5
7
|
|
|
6
|
-
const ColorPickerView = (props) => {
|
|
8
|
+
const ColorPickerView = forwardRef((props, ref) => {
|
|
7
9
|
const api = useColorPickerContext();
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
if (api.format !== props.format) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
ark.div,
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
"data-format": props.format,
|
|
18
|
+
...colorPickerAnatomy.build().view.attrs,
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
ColorPickerView.displayName = "ColorPickerView";
|
|
10
24
|
|
|
11
25
|
export { ColorPickerView };
|
package/color-picker/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { JSX } from 'react/jsx-runtime';
|
|
2
1
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
2
|
/// <reference types="react" />
|
|
4
3
|
import { type ColorPickerProps } from './color-picker';
|
|
@@ -44,7 +43,7 @@ declare const ColorPicker: ForwardRefExoticComponent<ColorPickerProps & RefAttri
|
|
|
44
43
|
TransparencyGrid: ForwardRefExoticComponent<ColorPickerTransparencyGridProps & RefAttributes<HTMLDivElement>>;
|
|
45
44
|
Trigger: ForwardRefExoticComponent<ColorPickerTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
46
45
|
ValueText: ForwardRefExoticComponent<ColorPickerValueTextProps & RefAttributes<HTMLDivElement>>;
|
|
47
|
-
View:
|
|
46
|
+
View: ForwardRefExoticComponent<ColorPickerViewProps & RefAttributes<HTMLDivElement>>;
|
|
48
47
|
};
|
|
49
48
|
export { ColorPicker, ColorPickerArea, ColorPickerAreaBackground, ColorPickerAreaThumb, ColorPickerChannelInput, ColorPickerChannelSlider, ColorPickerChannelSliderThumb, ColorPickerChannelSliderTrack, ColorPickerContent, ColorPickerControl, ColorPickerEyeDropperTrigger, ColorPickerLabel, ColorPickerPositioner, ColorPickerSwatch, ColorPickerSwatchGroup, ColorPickerSwatchTrigger, ColorPickerTransparencyGrid, ColorPickerTrigger, ColorPickerValueText, useColorPickerAreaContext, useColorPickerChannelSliderContext, useColorPickerContext, };
|
|
50
49
|
export type { ColorPickerAreaBackgroundProps, ColorPickerAreaContext, ColorPickerAreaProps, ColorPickerAreaThumbProps, ColorPickerChannelInputProps, ColorPickerChannelSliderContext, ColorPickerChannelSliderProps, ColorPickerChannelSliderThumbProps, ColorPickerChannelSliderTrackProps, ColorPickerContentProps, ColorPickerContext, ColorPickerControlProps, ColorPickerEyeDropperTriggerProps, ColorPickerLabelProps, ColorPickerPositionerProps, ColorPickerProps, ColorPickerSwatchGroupProps, ColorPickerSwatchProps, ColorPickerSwatchTriggerProps, ColorPickerTransparencyGridProps, ColorPickerTriggerProps, ColorPickerValueTextProps, ColorPickerViewProps, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark-ui/react",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accordion",
|
|
@@ -59,9 +59,8 @@
|
|
|
59
59
|
"release-it": "release-it --config ../../../release-it.json"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@ark-ui/anatomy": "1.0.0
|
|
62
|
+
"@ark-ui/anatomy": "1.0.0",
|
|
63
63
|
"@zag-js/accordion": "0.28.0",
|
|
64
|
-
"@zag-js/anatomy": "0.28.0",
|
|
65
64
|
"@zag-js/avatar": "0.28.0",
|
|
66
65
|
"@zag-js/carousel": "0.28.0",
|
|
67
66
|
"@zag-js/checkbox": "0.28.0",
|