@yamada-ui/color-picker 2.0.0-dev-20240410060337 → 2.0.0-next-20240513035416
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{chunk-VO2YWPCO.mjs → chunk-5CQI26IR.mjs} +2 -2
- package/dist/{chunk-MVCNJELN.mjs → chunk-KCV32DAB.mjs} +4 -4
- package/dist/{chunk-MVCNJELN.mjs.map → chunk-KCV32DAB.mjs.map} +1 -1
- package/dist/{chunk-DSAPB5E3.mjs → chunk-NGSPXJBL.mjs} +2 -2
- package/dist/{chunk-DSAPB5E3.mjs.map → chunk-NGSPXJBL.mjs.map} +1 -1
- package/dist/{chunk-JLVD63SI.mjs → chunk-NMHU434U.mjs} +2 -2
- package/dist/chunk-NMHU434U.mjs.map +1 -0
- package/dist/{chunk-VBH7AXVT.mjs → chunk-ZUPKUHBV.mjs} +3 -3
- package/dist/color-picker.js +3 -3
- package/dist/color-picker.js.map +1 -1
- package/dist/color-picker.mjs +5 -5
- package/dist/color-selector-body.js +1 -1
- package/dist/color-selector-body.js.map +1 -1
- package/dist/color-selector-body.mjs +2 -2
- package/dist/color-selector-eye-dropper.js +1 -1
- package/dist/color-selector-eye-dropper.js.map +1 -1
- package/dist/color-selector-eye-dropper.mjs +1 -1
- package/dist/color-selector-swatches.js +1 -1
- package/dist/color-selector-swatches.js.map +1 -1
- package/dist/color-selector-swatches.mjs +1 -1
- package/dist/color-selector.js +2 -2
- package/dist/color-selector.js.map +1 -1
- package/dist/color-selector.mjs +4 -4
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/package.json +15 -15
- package/dist/chunk-JLVD63SI.mjs.map +0 -1
- /package/dist/{chunk-VO2YWPCO.mjs.map → chunk-5CQI26IR.mjs.map} +0 -0
- /package/dist/{chunk-VBH7AXVT.mjs.map → chunk-ZUPKUHBV.mjs.map} +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
ColorSelectorEyeDropper
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-NMHU434U.mjs";
|
5
5
|
import {
|
6
6
|
ColorSelectorSliders
|
7
7
|
} from "./chunk-JFTUHZYL.mjs";
|
@@ -72,4 +72,4 @@ var ColorSelectorBody = forwardRef(
|
|
72
72
|
export {
|
73
73
|
ColorSelectorBody
|
74
74
|
};
|
75
|
-
//# sourceMappingURL=chunk-
|
75
|
+
//# sourceMappingURL=chunk-5CQI26IR.mjs.map
|
@@ -6,10 +6,10 @@ import {
|
|
6
6
|
} from "./chunk-CR3JRFXA.mjs";
|
7
7
|
import {
|
8
8
|
ColorSelector
|
9
|
-
} from "./chunk-
|
9
|
+
} from "./chunk-ZUPKUHBV.mjs";
|
10
10
|
import {
|
11
11
|
EyeDropperIcon
|
12
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-NMHU434U.mjs";
|
13
13
|
import {
|
14
14
|
ColorSwatch
|
15
15
|
} from "./chunk-UQWAM6TA.mjs";
|
@@ -223,7 +223,7 @@ var ColorPickerEyeDropper = forwardRef(
|
|
223
223
|
className: cx("ui-color-picker__eye-dropper", className),
|
224
224
|
__css: css,
|
225
225
|
...rest,
|
226
|
-
children: isValidElement(children) ? cloneChildren : /* @__PURE__ */ jsx(EyeDropperIcon, { className: "ui-color-picker__eye-
|
226
|
+
children: isValidElement(children) ? cloneChildren : /* @__PURE__ */ jsx(EyeDropperIcon, { className: "ui-color-picker__eye-dropper-icon" })
|
227
227
|
}
|
228
228
|
);
|
229
229
|
}
|
@@ -232,4 +232,4 @@ var ColorPickerEyeDropper = forwardRef(
|
|
232
232
|
export {
|
233
233
|
ColorPicker
|
234
234
|
};
|
235
|
-
//# sourceMappingURL=chunk-
|
235
|
+
//# sourceMappingURL=chunk-KCV32DAB.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/color-picker.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n ui,\n forwardRef,\n useMultiComponentStyle,\n omitThemeProps,\n} from \"@yamada-ui/core\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@yamada-ui/popover\"\nimport { Portal, type PortalProps } from \"@yamada-ui/portal\"\nimport {\n cx,\n getValidChildren,\n isValidElement,\n omitObject,\n} from \"@yamada-ui/utils\"\nimport { cloneElement } from \"react\"\nimport type { ColorSelectorProps } from \"./color-selector\"\nimport { ColorSelector } from \"./color-selector\"\nimport { EyeDropperIcon } from \"./color-selector-eye-dropper\"\nimport type { ColorSwatchProps } from \"./color-swatch\"\nimport { ColorSwatch } from \"./color-swatch\"\nimport type { UseColorPickerProps } from \"./use-color-picker\"\nimport {\n ColorPickerProvider,\n useColorPicker,\n useColorPickerContext,\n} from \"./use-color-picker\"\n\ntype ColorPickerOptions = {\n /**\n * If `true`, display the color swatch component.\n *\n * @default true\n */\n withSwatch?: boolean\n /**\n * If `true`, display the eye dropper component.\n *\n * @default true\n */\n withEyeDropper?: boolean\n /**\n * The border color when the input is focused.\n */\n focusBorderColor?: string\n /**\n * The border color when the input is invalid.\n */\n errorBorderColor?: string\n /**\n * Props for color picker container element.\n */\n containerProps?: Omit<HTMLUIProps<\"div\">, \"children\">\n /**\n * Props for color picker element.\n */\n inputProps?: HTMLUIProps<\"input\">\n /**\n * Props for color swatch component.\n */\n swatchProps?: ColorPickerSwatchProps\n /**\n * Props for color eye dropper component.\n */\n eyeDropperProps?: ColorPickerEyeDropperProps\n /**\n * Props to be forwarded to the portal component.\n *\n * @default '{ isDisabled: true }'\n */\n portalProps?: Omit<PortalProps, \"children\">\n}\n\nexport type ColorPickerProps = ThemeProps<\"ColorPicker\"> &\n UseColorPickerProps &\n ColorPickerOptions &\n Pick<\n ColorSelectorProps,\n | \"saturationSliderRef\"\n | \"saturationSliderProps\"\n | \"swatchesProps\"\n | \"hueSliderRef\"\n | \"hueSliderProps\"\n | \"alphaSliderRef\"\n | \"alphaSliderProps\"\n | \"channelsProps\"\n | \"channelProps\"\n | \"children\"\n >\n\n/**\n * `ColorPicker` is a component used by the user to select a color or enter an arbitrary color value.\n *\n * @see Docs https://yamada-ui.com/components/forms/color-picker\n */\nexport const ColorPicker = forwardRef<ColorPickerProps, \"input\">(\n ({ withSwatch = true, ...props }, ref) => {\n const [styles, mergedProps] = useMultiComponentStyle(\"ColorPicker\", {\n withSwatch,\n ...props,\n })\n let {\n className,\n children,\n withEyeDropper = true,\n color,\n h,\n height,\n minH,\n minHeight,\n containerProps,\n inputProps,\n swatchProps,\n eyeDropperProps,\n saturationSliderRef,\n saturationSliderProps,\n swatchesProps,\n hueSliderRef,\n hueSliderProps,\n alphaSliderRef,\n alphaSliderProps,\n channelsProps,\n channelProps,\n portalProps = { isDisabled: true },\n ...computedProps\n } = omitThemeProps(omitObject(mergedProps, [\"withSwatch\"]))\n const {\n allowInput,\n eyeDropperSupported,\n getPopoverProps,\n getContainerProps,\n getFieldProps,\n getSelectorProps,\n getEyeDropperProps,\n ...rest\n } = useColorPicker(computedProps)\n\n h ??= height\n minH ??= minHeight\n\n const css: CSSUIObject = {\n w: \"100%\",\n h: \"fit-content\",\n color,\n ...styles.container,\n }\n\n return (\n <ColorPickerProvider value={{ styles, ...rest }}>\n <Popover {...getPopoverProps()}>\n <ui.div\n className={cx(\"ui-color-picker\", className)}\n __css={css}\n {...getContainerProps(containerProps)}\n >\n <ui.div\n className=\"ui-color-picker__inner\"\n __css={{\n position: \"relative\",\n cursor: !allowInput ? \"pointer\" : undefined,\n ...styles.inner,\n }}\n >\n {withSwatch ? <ColorPickerSwatch {...swatchProps} /> : null}\n\n <PopoverTrigger>\n <ColorPickerField\n h={h}\n minH={minH}\n {...getFieldProps(inputProps, ref)}\n />\n </PopoverTrigger>\n\n {eyeDropperSupported && withEyeDropper ? (\n <ColorPickerEyeDropper\n {...getEyeDropperProps(eyeDropperProps)}\n />\n ) : null}\n </ui.div>\n\n <Portal {...portalProps}>\n <PopoverContent\n className=\"ui-color-picker__popover\"\n __css={{ ...styles.list }}\n >\n <ColorSelector\n className=\"ui-color-picker__picker\"\n {...getSelectorProps({\n saturationSliderRef,\n saturationSliderProps,\n swatchesProps,\n hueSliderRef,\n hueSliderProps,\n alphaSliderRef,\n alphaSliderProps,\n channelsProps,\n channelProps,\n })}\n >\n {children}\n </ColorSelector>\n </PopoverContent>\n </Portal>\n </ui.div>\n </Popover>\n </ColorPickerProvider>\n )\n },\n)\n\ntype ColorPickerFieldProps = HTMLUIProps<\"input\">\n\nconst ColorPickerField = forwardRef<ColorPickerFieldProps, \"input\">(\n ({ className, h, minH, ...rest }, ref) => {\n const { styles } = useColorPickerContext()\n\n const css: CSSUIObject = {\n ps: \"2rem\",\n pe: \"2rem\",\n h,\n minH,\n display: \"flex\",\n alignItems: \"center\",\n ...styles.field,\n }\n\n return (\n <ui.input\n ref={ref}\n className={cx(\"ui-color-picker__field\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\ntype ColorPickerSwatchProps = ColorSwatchProps\n\nconst ColorPickerSwatch = forwardRef<ColorPickerSwatchProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const { value, styles } = useColorPickerContext()\n\n const css: CSSUIObject = {\n position: \"absolute\",\n top: \"50%\",\n transform: \"translateY(-50%)\",\n zIndex: 2,\n ...styles.swatch,\n }\n\n return (\n <ColorSwatch\n ref={ref}\n className={cx(\"ui-color-picker__swatch\", className)}\n __css={css}\n color={value}\n isRounded\n {...rest}\n />\n )\n },\n)\n\ntype ColorPickerEyeDropperProps = HTMLUIProps<\"button\">\n\nconst ColorPickerEyeDropper = forwardRef<ColorPickerEyeDropperProps, \"button\">(\n ({ className, children, ...rest }, ref) => {\n const { styles } = useColorPickerContext()\n\n const css: CSSUIObject = {\n position: \"absolute\",\n top: \"50%\",\n transform: \"translateY(-50%)\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n zIndex: 1,\n ...styles.eyeDropper,\n }\n\n const validChildren = getValidChildren(children)\n\n const cloneChildren = validChildren.map((child) =>\n cloneElement(child, {\n focusable: false,\n \"aria-hidden\": true,\n style: {\n maxWidth: \"1em\",\n maxHeight: \"1em\",\n color: \"currentColor\",\n },\n }),\n )\n\n return (\n <ui.button\n ref={ref}\n className={cx(\"ui-color-picker__eye-dropper\", className)}\n __css={css}\n {...rest}\n >\n {isValidElement(children) ? (\n cloneChildren\n ) : (\n <EyeDropperIcon className=\"ui-color-picker__eye-dropper__icon\" />\n )}\n </ui.button>\n )\n },\n)\n"],"mappings":";;;;;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAS,cAAgC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB;AA4IjB,SAQgB,KARhB;AA5DL,IAAM,cAAc;AAAA,EACzB,CAAC,EAAE,aAAa,MAAM,GAAG,MAAM,GAAG,QAAQ;AACxC,UAAM,CAAC,QAAQ,WAAW,IAAI,uBAAuB,eAAe;AAAA,MAClE;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AACD,QAAI;AAAA,MACF;AAAA,MACA;AAAA,MACA,iBAAiB;AAAA,MACjB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc,EAAE,YAAY,KAAK;AAAA,MACjC,GAAG;AAAA,IACL,IAAI,eAAe,WAAW,aAAa,CAAC,YAAY,CAAC,CAAC;AAC1D,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI,eAAe,aAAa;AAEhC,wBAAM;AACN,iCAAS;AAET,UAAM,MAAmB;AAAA,M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O;AAAA,QAClB,WAAW;AAAA,QACX,eAAe;AAAA,QACf,OAAO;AAAA,UACL,UAAU;AAAA,UACV,WAAW;AAAA,UACX,OAAO;AAAA,QACT;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,WAAW,GAAG,gCAAgC,SAAS;AAAA,QACvD,OAAO;AAAA,QACN,GAAG;AAAA,QAEH,yBAAe,QAAQ,IACtB,gBAEA,oBAAC,kBAAe,WAAU,sCAAqC;AAAA;AAAA,IAEnE;AAAA,EAEJ;AACF;","names":[]}
|
1
|
+
{"version":3,"sources":["../src/color-picker.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n ui,\n forwardRef,\n useMultiComponentStyle,\n omitThemeProps,\n} from \"@yamada-ui/core\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@yamada-ui/popover\"\nimport { Portal, type PortalProps } from \"@yamada-ui/portal\"\nimport {\n cx,\n getValidChildren,\n isValidElement,\n omitObject,\n} from \"@yamada-ui/utils\"\nimport { cloneElement } from \"react\"\nimport type { ColorSelectorProps } from \"./color-selector\"\nimport { ColorSelector } from \"./color-selector\"\nimport { EyeDropperIcon } from \"./color-selector-eye-dropper\"\nimport type { ColorSwatchProps } from \"./color-swatch\"\nimport { ColorSwatch } from \"./color-swatch\"\nimport type { UseColorPickerProps } from \"./use-color-picker\"\nimport {\n ColorPickerProvider,\n useColorPicker,\n useColorPickerContext,\n} from \"./use-color-picker\"\n\ntype ColorPickerOptions = {\n /**\n * If `true`, display the color swatch component.\n *\n * @default true\n */\n withSwatch?: boolean\n /**\n * If `true`, display the eye dropper component.\n *\n * @default true\n */\n withEyeDropper?: boolean\n /**\n * The border color when the input is focused.\n */\n focusBorderColor?: string\n /**\n * The border color when the input is invalid.\n */\n errorBorderColor?: string\n /**\n * Props for color picker container element.\n */\n containerProps?: Omit<HTMLUIProps<\"div\">, \"children\">\n /**\n * Props for color picker element.\n */\n inputProps?: HTMLUIProps<\"input\">\n /**\n * Props for color swatch component.\n */\n swatchProps?: ColorPickerSwatchProps\n /**\n * Props for color eye dropper component.\n */\n eyeDropperProps?: ColorPickerEyeDropperProps\n /**\n * Props to be forwarded to the portal component.\n *\n * @default '{ isDisabled: true }'\n */\n portalProps?: Omit<PortalProps, \"children\">\n}\n\nexport type ColorPickerProps = ThemeProps<\"ColorPicker\"> &\n UseColorPickerProps &\n ColorPickerOptions &\n Pick<\n ColorSelectorProps,\n | \"saturationSliderRef\"\n | \"saturationSliderProps\"\n | \"swatchesProps\"\n | \"hueSliderRef\"\n | \"hueSliderProps\"\n | \"alphaSliderRef\"\n | \"alphaSliderProps\"\n | \"channelsProps\"\n | \"channelProps\"\n | \"children\"\n >\n\n/**\n * `ColorPicker` is a component used by the user to select a color or enter an arbitrary color value.\n *\n * @see Docs https://yamada-ui.com/components/forms/color-picker\n */\nexport const ColorPicker = forwardRef<ColorPickerProps, \"input\">(\n ({ withSwatch = true, ...props }, ref) => {\n const [styles, mergedProps] = useMultiComponentStyle(\"ColorPicker\", {\n withSwatch,\n ...props,\n })\n let {\n className,\n children,\n withEyeDropper = true,\n color,\n h,\n height,\n minH,\n minHeight,\n containerProps,\n inputProps,\n swatchProps,\n eyeDropperProps,\n saturationSliderRef,\n saturationSliderProps,\n swatchesProps,\n hueSliderRef,\n hueSliderProps,\n alphaSliderRef,\n alphaSliderProps,\n channelsProps,\n channelProps,\n portalProps = { isDisabled: true },\n ...computedProps\n } = omitThemeProps(omitObject(mergedProps, [\"withSwatch\"]))\n const {\n allowInput,\n eyeDropperSupported,\n getPopoverProps,\n getContainerProps,\n getFieldProps,\n getSelectorProps,\n getEyeDropperProps,\n ...rest\n } = useColorPicker(computedProps)\n\n h ??= height\n minH ??= minHeight\n\n const css: CSSUIObject = {\n w: \"100%\",\n h: \"fit-content\",\n color,\n ...styles.container,\n }\n\n return (\n <ColorPickerProvider value={{ styles, ...rest }}>\n <Popover {...getPopoverProps()}>\n <ui.div\n className={cx(\"ui-color-picker\", className)}\n __css={css}\n {...getContainerProps(containerProps)}\n >\n <ui.div\n className=\"ui-color-picker__inner\"\n __css={{\n position: \"relative\",\n cursor: !allowInput ? \"pointer\" : undefined,\n ...styles.inner,\n }}\n >\n {withSwatch ? <ColorPickerSwatch {...swatchProps} /> : null}\n\n <PopoverTrigger>\n <ColorPickerField\n h={h}\n minH={minH}\n {...getFieldProps(inputProps, ref)}\n />\n </PopoverTrigger>\n\n {eyeDropperSupported && withEyeDropper ? (\n <ColorPickerEyeDropper\n {...getEyeDropperProps(eyeDropperProps)}\n />\n ) : null}\n </ui.div>\n\n <Portal {...portalProps}>\n <PopoverContent\n className=\"ui-color-picker__popover\"\n __css={{ ...styles.list }}\n >\n <ColorSelector\n className=\"ui-color-picker__picker\"\n {...getSelectorProps({\n saturationSliderRef,\n saturationSliderProps,\n swatchesProps,\n hueSliderRef,\n hueSliderProps,\n alphaSliderRef,\n alphaSliderProps,\n channelsProps,\n channelProps,\n })}\n >\n {children}\n </ColorSelector>\n </PopoverContent>\n </Portal>\n </ui.div>\n </Popover>\n </ColorPickerProvider>\n )\n },\n)\n\ntype ColorPickerFieldProps = HTMLUIProps<\"input\">\n\nconst ColorPickerField = forwardRef<ColorPickerFieldProps, \"input\">(\n ({ className, h, minH, ...rest }, ref) => {\n const { styles } = useColorPickerContext()\n\n const css: CSSUIObject = {\n ps: \"2rem\",\n pe: \"2rem\",\n h,\n minH,\n display: \"flex\",\n alignItems: \"center\",\n ...styles.field,\n }\n\n return (\n <ui.input\n ref={ref}\n className={cx(\"ui-color-picker__field\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\ntype ColorPickerSwatchProps = ColorSwatchProps\n\nconst ColorPickerSwatch = forwardRef<ColorPickerSwatchProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const { value, styles } = useColorPickerContext()\n\n const css: CSSUIObject = {\n position: \"absolute\",\n top: \"50%\",\n transform: \"translateY(-50%)\",\n zIndex: 2,\n ...styles.swatch,\n }\n\n return (\n <ColorSwatch\n ref={ref}\n className={cx(\"ui-color-picker__swatch\", className)}\n __css={css}\n color={value}\n isRounded\n {...rest}\n />\n )\n },\n)\n\ntype ColorPickerEyeDropperProps = HTMLUIProps<\"button\">\n\nconst ColorPickerEyeDropper = forwardRef<ColorPickerEyeDropperProps, \"button\">(\n ({ className, children, ...rest }, ref) => {\n const { styles } = useColorPickerContext()\n\n const css: CSSUIObject = {\n position: \"absolute\",\n top: \"50%\",\n transform: \"translateY(-50%)\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n zIndex: 1,\n ...styles.eyeDropper,\n }\n\n const validChildren = getValidChildren(children)\n\n const cloneChildren = validChildren.map((child) =>\n cloneElement(child, {\n focusable: false,\n \"aria-hidden\": true,\n style: {\n maxWidth: \"1em\",\n maxHeight: \"1em\",\n color: \"currentColor\",\n },\n }),\n )\n\n return (\n <ui.button\n ref={ref}\n className={cx(\"ui-color-picker__eye-dropper\", className)}\n __css={css}\n {...rest}\n >\n {isValidElement(children) ? (\n cloneChildren\n ) : (\n <EyeDropperIcon className=\"ui-color-picker__eye-dropper-icon\" />\n )}\n </ui.button>\n )\n },\n)\n"],"mappings":";;;;;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAS,cAAgC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB;AA4IjB,SAQgB,KARhB;AA5DL,IAAM,cAAc;AAAA,EACzB,CAAC,EAAE,aAAa,MAAM,GAAG,MAAM,GAAG,QAAQ;AACxC,UAAM,CAAC,QAAQ,WAAW,IAAI,uBAAuB,eAAe;AAAA,MAClE;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AACD,QAAI;AAAA,MACF;AAAA,MACA;AAA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B,SAAS;AAAA,QAClD,OAAO;AAAA,QACP,OAAO;AAAA,QACP,WAAS;AAAA,QACR,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIA,IAAM,wBAAwB;AAAA,EAC5B,CAAC,EAAE,WAAW,UAAU,GAAG,KAAK,GAAG,QAAQ;AACzC,UAAM,EAAE,OAAO,IAAI,sBAAsB;AAEzC,UAAM,MAAmB;AAAA,MACvB,UAAU;AAAA,MACV,KAAK;AAAA,MACL,WAAW;AAAA,MACX,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,QAAQ;AAAA,MACR,GAAG,OAAO;AAAA,IACZ;AAEA,UAAM,gBAAgB,iBAAiB,QAAQ;AAE/C,UAAM,gBAAgB,cAAc;AAAA,MAAI,CAAC,UACvC,aAAa,OAAO;AAAA,QAClB,WAAW;AAAA,QACX,eAAe;AAAA,QACf,OAAO;AAAA,UACL,UAAU;AAAA,UACV,WAAW;AAAA,UACX,OAAO;AAAA,QACT;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,WAAW,GAAG,gCAAgC,SAAS;AAAA,QACvD,OAAO;AAAA,QACN,GAAG;AAAA,QAEH,yBAAe,QAAQ,IACtB,gBAEA,oBAAC,kBAAe,WAAU,qCAAoC;AAAA;AAAA,IAElE;AAAA,EAEJ;AACF;","names":[]}
|
@@ -33,7 +33,7 @@ var ColorSelectorSwatches = forwardRef(
|
|
33
33
|
swatchesLabel ? /* @__PURE__ */ jsx(
|
34
34
|
ui.p,
|
35
35
|
{
|
36
|
-
className: "ui-color-
|
36
|
+
className: "ui-color-selector__swatches-label",
|
37
37
|
__css: { ...styles.swatchesLabel },
|
38
38
|
children: swatchesLabel
|
39
39
|
}
|
@@ -67,4 +67,4 @@ var ColorSelectorSwatches = forwardRef(
|
|
67
67
|
export {
|
68
68
|
ColorSelectorSwatches
|
69
69
|
};
|
70
|
-
//# sourceMappingURL=chunk-
|
70
|
+
//# sourceMappingURL=chunk-NGSPXJBL.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/color-selector-swatches.tsx"],"sourcesContent":["import { forwardRef, ui } from \"@yamada-ui/core\"\nimport type { CSSUIObject, HTMLUIProps, Token } from \"@yamada-ui/core\"\nimport { cx, replaceObject } from \"@yamada-ui/utils\"\nimport type { ReactNode } from \"react\"\nimport type { ColorSwatchProps } from \"./color-swatch\"\nimport { ColorSwatch } from \"./color-swatch\"\nimport { useColorSelectorContext } from \"./use-color-selector\"\n\ntype ColorSelectorSwatchesOptions = {\n /**\n * The swatches label to use.\n */\n swatchesLabel?: ReactNode\n /**\n * An array of colors in one of the supported formats.\n * Used to render swatches list below the color selector.\n */\n swatches?: string[]\n /**\n * Number of swatches grid columns.\n *\n * @default 7\n */\n swatchesColumns?: Token<number>\n /**\n * Props for the color swatch component.\n */\n swatchProps?: ColorSwatchProps\n /**\n * Props for the swatches container element.\n */\n swatchesContainerProps?: Omit<HTMLUIProps<\"div\">, \"children\">\n}\n\nexport type ColorSelectorSwatchesProps = Omit<HTMLUIProps<\"div\">, \"children\"> &\n ColorSelectorSwatchesOptions\n\nexport const ColorSelectorSwatches = forwardRef<\n ColorSelectorSwatchesProps,\n \"div\"\n>(\n (\n {\n className,\n swatchesLabel,\n swatches,\n swatchesContainerProps,\n swatchProps,\n swatchesColumns,\n ...rest\n },\n ref,\n ) => {\n const { getSwatchProps, readOnly, styles } = useColorSelectorContext()\n\n const css: CSSUIObject = {\n display: \"grid\",\n gridTemplateColumns: replaceObject(swatchesColumns, (value) =>\n value != null ? `repeat(${value}, minmax(0, 1fr))` : undefined,\n ) as CSSUIObject[\"gridTemplateColumns\"],\n ...styles.swatches,\n }\n\n return swatches?.length ? (\n <ui.div {...swatchesContainerProps}>\n {swatchesLabel ? (\n <ui.p\n className=\"ui-color-
|
1
|
+
{"version":3,"sources":["../src/color-selector-swatches.tsx"],"sourcesContent":["import { forwardRef, ui } from \"@yamada-ui/core\"\nimport type { CSSUIObject, HTMLUIProps, Token } from \"@yamada-ui/core\"\nimport { cx, replaceObject } from \"@yamada-ui/utils\"\nimport type { ReactNode } from \"react\"\nimport type { ColorSwatchProps } from \"./color-swatch\"\nimport { ColorSwatch } from \"./color-swatch\"\nimport { useColorSelectorContext } from \"./use-color-selector\"\n\ntype ColorSelectorSwatchesOptions = {\n /**\n * The swatches label to use.\n */\n swatchesLabel?: ReactNode\n /**\n * An array of colors in one of the supported formats.\n * Used to render swatches list below the color selector.\n */\n swatches?: string[]\n /**\n * Number of swatches grid columns.\n *\n * @default 7\n */\n swatchesColumns?: Token<number>\n /**\n * Props for the color swatch component.\n */\n swatchProps?: ColorSwatchProps\n /**\n * Props for the swatches container element.\n */\n swatchesContainerProps?: Omit<HTMLUIProps<\"div\">, \"children\">\n}\n\nexport type ColorSelectorSwatchesProps = Omit<HTMLUIProps<\"div\">, \"children\"> &\n ColorSelectorSwatchesOptions\n\nexport const ColorSelectorSwatches = forwardRef<\n ColorSelectorSwatchesProps,\n \"div\"\n>(\n (\n {\n className,\n swatchesLabel,\n swatches,\n swatchesContainerProps,\n swatchProps,\n swatchesColumns,\n ...rest\n },\n ref,\n ) => {\n const { getSwatchProps, readOnly, styles } = useColorSelectorContext()\n\n const css: CSSUIObject = {\n display: \"grid\",\n gridTemplateColumns: replaceObject(swatchesColumns, (value) =>\n value != null ? `repeat(${value}, minmax(0, 1fr))` : undefined,\n ) as CSSUIObject[\"gridTemplateColumns\"],\n ...styles.swatches,\n }\n\n return swatches?.length ? (\n <ui.div {...swatchesContainerProps}>\n {swatchesLabel ? (\n <ui.p\n className=\"ui-color-selector__swatches-label\"\n __css={{ ...styles.swatchesLabel }}\n >\n {swatchesLabel}\n </ui.p>\n ) : null}\n\n <ui.div\n ref={ref}\n className={cx(\"ui-color-selector__swatches\", className)}\n __css={css}\n {...rest}\n >\n {swatches.map((color) => (\n <ColorSwatch\n as=\"button\"\n key={color}\n __css={{\n boxSize: \"100%\",\n pointerEvents: readOnly ? \"none\" : undefined,\n ...styles.swatch,\n }}\n {...getSwatchProps({ color, ...swatchProps })}\n />\n ))}\n </ui.div>\n </ui.div>\n ) : null\n },\n)\n"],"mappings":";;;;;;;;;AAAA,SAAS,YAAY,UAAU;AAE/B,SAAS,IAAI,qBAAqB;AA8D5B,SAEI,KAFJ;AA3BC,IAAM,wBAAwB;AAAA,EAInC,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,EAAE,gBAAgB,UAAU,OAAO,IAAI,wBAAwB;AAErE,UAAM,MAAmB;AAAA,MACvB,SAAS;AAAA,MACT,qBAAqB;AAAA,QAAc;AAAA,QAAiB,CAAC,UACnD,SAAS,OAAO,UAAU,KAAK,sBAAsB;AAAA,MACvD;AAAA,MACA,GAAG,OAAO;AAAA,IACZ;AAEA,YAAO,qCAAU,UACf,qBAAC,GAAG,KAAH,EAAQ,GAAG,wBACT;AAAA,sBACC;AAAA,QAAC,GAAG;AAAA,QAAH;AAAA,UACC,WAAU;AAAA,UACV,OAAO,EAAE,GAAG,OAAO,cAAc;AAAA,UAEhC;AAAA;AAAA,MACH,IACE;AAAA,MAEJ;AAAA,QAAC,GAAG;AAAA,QAAH;AAAA,UACC;AAAA,UACA,WAAW,GAAG,+BAA+B,SAAS;AAAA,UACtD,OAAO;AAAA,UACN,GAAG;AAAA,UAEH,mBAAS,IAAI,CAAC,UACb;AAAA,YAAC;AAAA;AAAA,cACC,IAAG;AAAA,cAEH,OAAO;AAAA,gBACL,SAAS;AAAA,gBACT,eAAe,WAAW,SAAS;AAAA,gBACnC,GAAG,OAAO;AAAA,cACZ;AAAA,cACC,GAAG,eAAe,EAAE,OAAO,GAAG,YAAY,CAAC;AAAA;AAAA,YANvC;AAAA,UAOP,CACD;AAAA;AAAA,MACH;AAAA,OACF,IACE;AAAA,EACN;AACF;","names":[]}
|
@@ -25,7 +25,7 @@ var ColorSelectorEyeDropper = forwardRef(({ className, ...rest }, ref) => {
|
|
25
25
|
size,
|
26
26
|
__css: css,
|
27
27
|
...getEyeDropperProps(rest, ref),
|
28
|
-
children: /* @__PURE__ */ jsx(EyeDropperIcon, { className: "ui-color-selector__eye-
|
28
|
+
children: /* @__PURE__ */ jsx(EyeDropperIcon, { className: "ui-color-selector__eye-dropper-icon" })
|
29
29
|
}
|
30
30
|
);
|
31
31
|
});
|
@@ -53,4 +53,4 @@ export {
|
|
53
53
|
ColorSelectorEyeDropper,
|
54
54
|
EyeDropperIcon
|
55
55
|
};
|
56
|
-
//# sourceMappingURL=chunk-
|
56
|
+
//# sourceMappingURL=chunk-NMHU434U.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/color-selector-eye-dropper.tsx"],"sourcesContent":["import type { IconButtonProps } from \"@yamada-ui/button\"\nimport { IconButton } from \"@yamada-ui/button\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { IconProps } from \"@yamada-ui/icon\"\nimport { Icon } from \"@yamada-ui/icon\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { FC } from \"react\"\nimport { useColorSelectorContext } from \"./use-color-selector\"\n\nexport type ColorSelectorEyeDropperProps = IconButtonProps\n\nexport const ColorSelectorEyeDropper = forwardRef<\n ColorSelectorEyeDropperProps,\n \"button\"\n>(({ className, ...rest }, ref) => {\n const { getEyeDropperProps, readOnly, size, styles } =\n useColorSelectorContext()\n\n const css: CSSUIObject = {\n h: \"auto\",\n minW: \"auto\",\n pointerEvents: readOnly ? \"none\" : undefined,\n ...styles.eyeDropper,\n }\n\n return (\n <IconButton\n className={cx(\"ui-color-selector__eye-dropper\", className)}\n variant=\"outline\"\n size={size}\n __css={css}\n {...getEyeDropperProps(rest, ref)}\n >\n <EyeDropperIcon className=\"ui-color-selector__eye-dropper-icon\" />\n </IconButton>\n )\n})\n\nexport const EyeDropperIcon: FC<IconProps> = ({ ...rest }) => {\n return (\n <Icon\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...rest}\n >\n <path d=\"m2 22 1-1h3l9-9\" />\n <path d=\"M3 21v-3l9-9\" />\n <path d=\"m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z\" />\n </Icon>\n )\n}\n"],"mappings":";;;;;;AACA,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAG3B,SAAS,YAAY;AACrB,SAAS,UAAU;AA4Bb,cAOF,YAPE;AAtBC,IAAM,0BAA0B,WAGrC,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AACjC,QAAM,EAAE,oBAAoB,UAAU,MAAM,OAAO,IACjD,wBAAwB;AAE1B,QAAM,MAAmB;AAAA,IACvB,GAAG;AAAA,IACH,MAAM;AAAA,IACN,eAAe,WAAW,SAAS;AAAA,IACnC,GAAG,OAAO;AAAA,EACZ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,kCAAkC,SAAS;AAAA,MACzD,SAAQ;AAAA,MACR;AAAA,MACA,OAAO;AAAA,MACN,GAAG,mBAAmB,MAAM,GAAG;AAAA,MAEhC,8BAAC,kBAAe,WAAU,uCAAsC;AAAA;AAAA,EAClE;AAEJ,CAAC;AAEM,IAAM,iBAAgC,CAAC,EAAE,GAAG,KAAK,MAAM;AAC5D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACd,GAAG;AAAA,MAEJ;AAAA,4BAAC,UAAK,GAAE,mBAAkB;AAAA,QAC1B,oBAAC,UAAK,GAAE,gBAAe;AAAA,QACvB,oBAAC,UAAK,GAAE,gGAA+F;AAAA;AAAA;AAAA,EACzG;AAEJ;","names":[]}
|
@@ -4,13 +4,13 @@ import {
|
|
4
4
|
} from "./chunk-RR6V37S5.mjs";
|
5
5
|
import {
|
6
6
|
ColorSelectorBody
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-5CQI26IR.mjs";
|
8
8
|
import {
|
9
9
|
ColorSelectorChannels
|
10
10
|
} from "./chunk-2PW2Z2XD.mjs";
|
11
11
|
import {
|
12
12
|
ColorSelectorSwatches
|
13
|
-
} from "./chunk-
|
13
|
+
} from "./chunk-NGSPXJBL.mjs";
|
14
14
|
import {
|
15
15
|
ColorSelectorProvider,
|
16
16
|
useColorSelector
|
@@ -127,4 +127,4 @@ var ColorSelector = forwardRef(
|
|
127
127
|
export {
|
128
128
|
ColorSelector
|
129
129
|
};
|
130
|
-
//# sourceMappingURL=chunk-
|
130
|
+
//# sourceMappingURL=chunk-ZUPKUHBV.mjs.map
|
package/dist/color-picker.js
CHANGED
@@ -465,7 +465,7 @@ var ColorSelectorEyeDropper = (0, import_core.forwardRef)(({ className, ...rest
|
|
465
465
|
size,
|
466
466
|
__css: css,
|
467
467
|
...getEyeDropperProps(rest, ref),
|
468
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EyeDropperIcon, { className: "ui-color-selector__eye-
|
468
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EyeDropperIcon, { className: "ui-color-selector__eye-dropper-icon" })
|
469
469
|
}
|
470
470
|
);
|
471
471
|
});
|
@@ -1241,7 +1241,7 @@ var ColorSelectorSwatches = (0, import_core8.forwardRef)(
|
|
1241
1241
|
swatchesLabel ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
1242
1242
|
import_core8.ui.p,
|
1243
1243
|
{
|
1244
|
-
className: "ui-color-
|
1244
|
+
className: "ui-color-selector__swatches-label",
|
1245
1245
|
__css: { ...styles.swatchesLabel },
|
1246
1246
|
children: swatchesLabel
|
1247
1247
|
}
|
@@ -2287,7 +2287,7 @@ var ColorPickerEyeDropper = (0, import_core12.forwardRef)(
|
|
2287
2287
|
className: (0, import_utils15.cx)("ui-color-picker__eye-dropper", className),
|
2288
2288
|
__css: css,
|
2289
2289
|
...rest,
|
2290
|
-
children: (0, import_utils15.isValidElement)(children) ? cloneChildren : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(EyeDropperIcon, { className: "ui-color-picker__eye-
|
2290
|
+
children: (0, import_utils15.isValidElement)(children) ? cloneChildren : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(EyeDropperIcon, { className: "ui-color-picker__eye-dropper-icon" })
|
2291
2291
|
}
|
2292
2292
|
);
|
2293
2293
|
}
|