@yamada-ui/color-picker 1.4.9-dev-20241109144901 → 1.4.9-dev-20241110143958

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
1
1
  "use client"
2
2
  import {
3
3
  ColorPicker
4
- } from "./chunk-OJVCLBAG.mjs";
5
- import "./chunk-MEG43CIO.mjs";
4
+ } from "./chunk-CRZIBBBY.mjs";
5
+ import "./chunk-Z2KAER2U.mjs";
6
6
  import "./chunk-HJMXAALX.mjs";
7
7
  import "./chunk-YU3KOEL7.mjs";
8
8
  import "./chunk-XCHWCHHP.mjs";
package/dist/index.js CHANGED
@@ -1903,7 +1903,8 @@ var [ColorPickerProvider, useColorPickerContext] = (0, import_utils14.createCont
1903
1903
  errorMessage: `useColorPickerContext returned is 'undefined'. Seems you forgot to wrap the components in "<ColorPicker />"`
1904
1904
  });
1905
1905
  var useColorPicker = (props) => {
1906
- const {
1906
+ let {
1907
+ id,
1907
1908
  allowInput = true,
1908
1909
  animation,
1909
1910
  boundary,
@@ -1983,6 +1984,8 @@ var useColorPicker = (props) => {
1983
1984
  onClose: onCloseProp,
1984
1985
  onOpen: onOpenProp
1985
1986
  });
1987
+ const uuid = (0, import_react5.useId)();
1988
+ id != null ? id : id = uuid;
1986
1989
  const onOpen = (0, import_react5.useCallback)(() => {
1987
1990
  if (disabled || readOnly) return;
1988
1991
  onInternalOpen();
@@ -2191,6 +2194,8 @@ var useColorPicker = (props) => {
2191
2194
  ...disabled || !allowInput ? { pointerEvents: "none" } : {}
2192
2195
  };
2193
2196
  return {
2197
+ "aria-controls": id,
2198
+ role: "combobox",
2194
2199
  tabIndex: !allowInput ? -1 : 0,
2195
2200
  ...formControlProps,
2196
2201
  ...inputProps,
@@ -2202,6 +2207,7 @@ var useColorPicker = (props) => {
2202
2207
  };
2203
2208
  },
2204
2209
  [
2210
+ id,
2205
2211
  inputProps,
2206
2212
  allowInput,
2207
2213
  disabled,
@@ -2272,6 +2278,7 @@ var useColorPicker = (props) => {
2272
2278
  ]
2273
2279
  );
2274
2280
  return {
2281
+ id,
2275
2282
  allowInput,
2276
2283
  eyeDropperSupported,
2277
2284
  value,
@@ -2320,6 +2327,7 @@ var ColorPicker = (0, import_core12.forwardRef)(
2320
2327
  ...computedProps
2321
2328
  } = (0, import_core12.omitThemeProps)(mergedProps, ["withSwatch"]);
2322
2329
  const {
2330
+ id,
2323
2331
  eyeDropperSupported,
2324
2332
  value,
2325
2333
  getContainerProps,
@@ -2377,6 +2385,7 @@ var ColorPicker = (0, import_core12.forwardRef)(
2377
2385
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2378
2386
  import_popover.PopoverContent,
2379
2387
  {
2388
+ id,
2380
2389
  className: "ui-color-picker__content",
2381
2390
  __css: { ...styles.content },
2382
2391
  children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(