@raystack/apsara 0.48.5 → 0.49.1

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.
Files changed (115) hide show
  1. package/dist/components/amount/amount.cjs +39 -17
  2. package/dist/components/amount/amount.cjs.map +1 -1
  3. package/dist/components/amount/amount.d.ts +2 -1
  4. package/dist/components/amount/amount.d.ts.map +1 -1
  5. package/dist/components/amount/amount.js +39 -17
  6. package/dist/components/amount/amount.js.map +1 -1
  7. package/dist/components/calendar/range-picker.cjs +19 -18
  8. package/dist/components/calendar/range-picker.cjs.map +1 -1
  9. package/dist/components/calendar/range-picker.d.ts +5 -4
  10. package/dist/components/calendar/range-picker.d.ts.map +1 -1
  11. package/dist/components/calendar/range-picker.js +19 -18
  12. package/dist/components/calendar/range-picker.js.map +1 -1
  13. package/dist/components/color-picker/color-picker-alpha.cjs +15 -0
  14. package/dist/components/color-picker/color-picker-alpha.cjs.map +1 -0
  15. package/dist/components/color-picker/color-picker-alpha.d.ts +5 -0
  16. package/dist/components/color-picker/color-picker-alpha.d.ts.map +1 -0
  17. package/dist/components/color-picker/color-picker-alpha.js +13 -0
  18. package/dist/components/color-picker/color-picker-alpha.js.map +1 -0
  19. package/dist/components/color-picker/color-picker-area.cjs +73 -0
  20. package/dist/components/color-picker/color-picker-area.cjs.map +1 -0
  21. package/dist/components/color-picker/color-picker-area.d.ts +4 -0
  22. package/dist/components/color-picker/color-picker-area.d.ts.map +1 -0
  23. package/dist/components/color-picker/color-picker-area.js +71 -0
  24. package/dist/components/color-picker/color-picker-area.js.map +1 -0
  25. package/dist/components/color-picker/color-picker-hue.cjs +15 -0
  26. package/dist/components/color-picker/color-picker-hue.cjs.map +1 -0
  27. package/dist/components/color-picker/color-picker-hue.d.ts +5 -0
  28. package/dist/components/color-picker/color-picker-hue.d.ts.map +1 -0
  29. package/dist/components/color-picker/color-picker-hue.js +13 -0
  30. package/dist/components/color-picker/color-picker-hue.js.map +1 -0
  31. package/dist/components/color-picker/color-picker-input.cjs +16 -0
  32. package/dist/components/color-picker/color-picker-input.cjs.map +1 -0
  33. package/dist/components/color-picker/color-picker-input.d.ts +4 -0
  34. package/dist/components/color-picker/color-picker-input.d.ts.map +1 -0
  35. package/dist/components/color-picker/color-picker-input.js +14 -0
  36. package/dist/components/color-picker/color-picker-input.js.map +1 -0
  37. package/dist/components/color-picker/color-picker-mode.cjs +16 -0
  38. package/dist/components/color-picker/color-picker-mode.cjs.map +1 -0
  39. package/dist/components/color-picker/color-picker-mode.d.ts +8 -0
  40. package/dist/components/color-picker/color-picker-mode.d.ts.map +1 -0
  41. package/dist/components/color-picker/color-picker-mode.js +14 -0
  42. package/dist/components/color-picker/color-picker-mode.js.map +1 -0
  43. package/dist/components/color-picker/color-picker-root.cjs +53 -0
  44. package/dist/components/color-picker/color-picker-root.cjs.map +1 -0
  45. package/dist/components/color-picker/color-picker-root.d.ts +25 -0
  46. package/dist/components/color-picker/color-picker-root.d.ts.map +1 -0
  47. package/dist/components/color-picker/color-picker-root.js +50 -0
  48. package/dist/components/color-picker/color-picker-root.js.map +1 -0
  49. package/dist/components/color-picker/color-picker.cjs +19 -0
  50. package/dist/components/color-picker/color-picker.cjs.map +1 -0
  51. package/dist/components/color-picker/color-picker.js +17 -0
  52. package/dist/components/color-picker/color-picker.js.map +1 -0
  53. package/dist/components/color-picker/color-picker.module.css.cjs +8 -0
  54. package/dist/components/color-picker/color-picker.module.css.cjs.map +1 -0
  55. package/dist/components/color-picker/color-picker.module.css.js +4 -0
  56. package/dist/components/color-picker/color-picker.module.css.js.map +1 -0
  57. package/dist/components/color-picker/index.d.ts +2 -0
  58. package/dist/components/color-picker/index.d.ts.map +1 -0
  59. package/dist/components/color-picker/utils.cjs +18 -0
  60. package/dist/components/color-picker/utils.cjs.map +1 -0
  61. package/dist/components/color-picker/utils.d.ts +11 -0
  62. package/dist/components/color-picker/utils.d.ts.map +1 -0
  63. package/dist/components/color-picker/utils.js +15 -0
  64. package/dist/components/color-picker/utils.js.map +1 -0
  65. package/dist/components/filter-chip/filter-chip.cjs +4 -5
  66. package/dist/components/filter-chip/filter-chip.cjs.map +1 -1
  67. package/dist/components/filter-chip/filter-chip.d.ts.map +1 -1
  68. package/dist/components/filter-chip/filter-chip.js +4 -5
  69. package/dist/components/filter-chip/filter-chip.js.map +1 -1
  70. package/dist/components/filter-chip/filter-chip.module.css.cjs +1 -1
  71. package/dist/components/filter-chip/filter-chip.module.css.js +1 -1
  72. package/dist/index.cjs +2 -0
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.d.ts +1 -0
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +1 -0
  77. package/dist/index.js.map +1 -1
  78. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/conversions.cjs +986 -0
  79. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/conversions.cjs.map +1 -0
  80. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/conversions.js +982 -0
  81. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/conversions.js.map +1 -0
  82. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/index.cjs +86 -0
  83. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/index.cjs.map +1 -0
  84. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/index.js +82 -0
  85. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/index.js.map +1 -0
  86. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/route.cjs +103 -0
  87. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/route.cjs.map +1 -0
  88. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/route.js +99 -0
  89. package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/route.js.map +1 -0
  90. package/dist/node_modules/.pnpm/color-name@2.0.0/node_modules/color-name/index.cjs +157 -0
  91. package/dist/node_modules/.pnpm/color-name@2.0.0/node_modules/color-name/index.cjs.map +1 -0
  92. package/dist/node_modules/.pnpm/color-name@2.0.0/node_modules/color-name/index.js +153 -0
  93. package/dist/node_modules/.pnpm/color-name@2.0.0/node_modules/color-name/index.js.map +1 -0
  94. package/dist/node_modules/.pnpm/color-string@2.0.1/node_modules/color-string/index.cjs +235 -0
  95. package/dist/node_modules/.pnpm/color-string@2.0.1/node_modules/color-string/index.cjs.map +1 -0
  96. package/dist/node_modules/.pnpm/color-string@2.0.1/node_modules/color-string/index.js +231 -0
  97. package/dist/node_modules/.pnpm/color-string@2.0.1/node_modules/color-string/index.js.map +1 -0
  98. package/dist/node_modules/.pnpm/color@5.0.0/node_modules/color/index.cjs +501 -0
  99. package/dist/node_modules/.pnpm/color@5.0.0/node_modules/color/index.cjs.map +1 -0
  100. package/dist/node_modules/.pnpm/color@5.0.0/node_modules/color/index.js +497 -0
  101. package/dist/node_modules/.pnpm/color@5.0.0/node_modules/color/index.js.map +1 -0
  102. package/dist/style.css +1 -1
  103. package/package.json +2 -1
  104. package/dist/components/textfield/index.d.ts +0 -2
  105. package/dist/components/textfield/index.d.ts.map +0 -1
  106. package/dist/components/textfield/textfield.cjs +0 -44
  107. package/dist/components/textfield/textfield.cjs.map +0 -1
  108. package/dist/components/textfield/textfield.d.ts +0 -33
  109. package/dist/components/textfield/textfield.d.ts.map +0 -1
  110. package/dist/components/textfield/textfield.js +0 -42
  111. package/dist/components/textfield/textfield.js.map +0 -1
  112. package/dist/components/textfield/textfield.module.css.cjs +0 -8
  113. package/dist/components/textfield/textfield.module.css.cjs.map +0 -1
  114. package/dist/components/textfield/textfield.module.css.js +0 -4
  115. package/dist/components/textfield/textfield.module.css.js.map +0 -1
@@ -0,0 +1,5 @@
1
+ import { Slider } from 'radix-ui';
2
+ import { type ComponentProps } from 'react';
3
+ export type ColorPickerAlphaProps = ComponentProps<typeof Slider.Root>;
4
+ export declare const ColorPickerAlpha: ({ className, ...props }: ColorPickerAlphaProps) => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=color-picker-alpha.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-alpha.d.ts","sourceRoot":"","sources":["../../../components/color-picker/color-picker-alpha.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AAEvE,eAAO,MAAM,gBAAgB,4BAG1B,qBAAqB,4CAkBvB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
+ import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
3
+ import { useColorPicker } from './color-picker-root.js';
4
+ import styles from './color-picker.module.css.js';
5
+ import { Root, Track, Range, Thumb } from '../../node_modules/.pnpm/@radix-ui_react-slider@1.3.5_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-slider/dist/index.js';
6
+
7
+ const ColorPickerAlpha = ({ className, ...props }) => {
8
+ const { alpha = 1, setColor } = useColorPicker();
9
+ return (jsxRuntimeExports.jsxs(Root, { className: cx(styles.sliderRoot, className), max: 100, onValueChange: ([alpha]) => setColor({ alpha: alpha / 100 }), step: 1, value: [alpha * 100], ...props, children: [jsxRuntimeExports.jsxs(Track, { className: cx(styles.sliderTrack, styles.alphaTrack), children: [jsxRuntimeExports.jsx("div", { className: styles.alphaTrackGradient }), jsxRuntimeExports.jsx(Range, { className: styles.sliderRange })] }), jsxRuntimeExports.jsx(Thumb, { className: styles.sliderThumb })] }));
10
+ };
11
+
12
+ export { ColorPickerAlpha };
13
+ //# sourceMappingURL=color-picker-alpha.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-alpha.js","sources":["../../../components/color-picker/color-picker-alpha.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport { Slider } from 'radix-ui';\nimport { type ComponentProps } from 'react';\nimport { useColorPicker } from './color-picker-root';\nimport styles from './color-picker.module.css';\n\nexport type ColorPickerAlphaProps = ComponentProps<typeof Slider.Root>;\n\nexport const ColorPickerAlpha = ({\n className,\n ...props\n}: ColorPickerAlphaProps) => {\n const { alpha = 1, setColor } = useColorPicker();\n return (\n <Slider.Root\n className={cx(styles.sliderRoot, className)}\n max={100}\n onValueChange={([alpha]) => setColor({ alpha: alpha / 100 })}\n step={1}\n value={[alpha * 100]}\n {...props}\n >\n <Slider.Track className={cx(styles.sliderTrack, styles.alphaTrack)}>\n <div className={styles.alphaTrackGradient} />\n <Slider.Range className={styles.sliderRange} />\n </Slider.Track>\n <Slider.Thumb className={styles.sliderThumb} />\n </Slider.Root>\n );\n};\n"],"names":["_jsxs","Slider.Root","Slider.Track","_jsx","Slider.Range","Slider.Thumb"],"mappings":";;;;;;AAQO,MAAM,gBAAgB,GAAG,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACc,KAAI;IAC1B,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,cAAc,EAAE,CAAC;IACjD,QACEA,uBAACC,IAAW,EACV,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,EAC3C,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,GAAG,EAAE,CAAC,EAC5D,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC,EAAA,GAChB,KAAK,EAET,QAAA,EAAA,CAAAD,sBAAA,CAACE,KAAY,EAAA,EAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,EAChE,QAAA,EAAA,CAAAC,qBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,EAAI,CAAA,EAC7CA,sBAACC,KAAY,EAAA,EAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAI,CAAA,CAAA,EAAA,CAClC,EACfD,qBAAA,CAACE,KAAY,EAAC,EAAA,SAAS,EAAE,MAAM,CAAC,WAAW,EAAA,CAAI,CACnC,EAAA,CAAA,EACd;AACJ;;;;"}
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
4
+ var index$1 = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
5
+ var index = require('../../node_modules/.pnpm/color@5.0.0/node_modules/color/index.cjs');
6
+ var React = require('react');
7
+ var colorPickerRoot = require('./color-picker-root.cjs');
8
+ var colorPicker_module = require('./color-picker.module.css.cjs');
9
+
10
+ const ColorPickerArea = ({ className, ...props }) => {
11
+ const containerRef = React.useRef(null);
12
+ const thumbRef = React.useRef(null);
13
+ const isDragging = React.useRef(false);
14
+ const isThumbVisible = React.useRef(false);
15
+ const { hue, saturation, lightness, setColor } = colorPickerRoot.useColorPicker();
16
+ const color = index.default.hsl(hue, saturation, lightness);
17
+ const backgroundGradient = React.useMemo(() => {
18
+ return `linear-gradient(0deg, rgba(0,0,0,1), rgba(0,0,0,0)),
19
+ linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0)),
20
+ hsl(${hue}, 100%, 50%)`;
21
+ }, [hue]);
22
+ // Need to use useEffect as color can change from outside, and we need to sync thumb position
23
+ React.useEffect(() => {
24
+ if (!containerRef.current || !thumbRef.current)
25
+ return;
26
+ const clamp = (v) => Math.max(0, Math.min(1, v));
27
+ const x = clamp(saturation / 100);
28
+ const topLightness = x < 0.01 ? 100 : 50 + 50 * (1 - x);
29
+ const y = clamp(1 - lightness / topLightness);
30
+ thumbRef.current.style.left = `${x * 100}%`;
31
+ thumbRef.current.style.top = `${y * 100}%`;
32
+ // This is needed to avoid flickering of the thumb on initial render
33
+ if (!isThumbVisible.current) {
34
+ isThumbVisible.current = true;
35
+ thumbRef.current.style.opacity = '1';
36
+ }
37
+ }, [saturation, lightness]);
38
+ const handlePointerMove = React.useCallback((event) => {
39
+ if (!(isDragging.current && containerRef.current && thumbRef.current)) {
40
+ return;
41
+ }
42
+ event.preventDefault();
43
+ event.stopPropagation();
44
+ const rect = containerRef.current.getBoundingClientRect();
45
+ const x = Math.max(0, Math.min(1, (event.clientX - rect.left) / rect.width));
46
+ const y = Math.max(0, Math.min(1, (event.clientY - rect.top) / rect.height));
47
+ const saturation = x * 100;
48
+ const topLightness = x < 0.01 ? 100 : 50 + 50 * (1 - x);
49
+ const lightness = topLightness * (1 - y);
50
+ setColor({ s: saturation, l: lightness });
51
+ }, [setColor]);
52
+ const handlePointerUp = React.useCallback(() => {
53
+ isDragging.current = false;
54
+ window.removeEventListener('pointermove', handlePointerMove);
55
+ window.removeEventListener('pointerup', handlePointerUp);
56
+ }, [handlePointerMove]);
57
+ const handlePointerDown = React.useCallback((e) => {
58
+ e.preventDefault();
59
+ isDragging.current = true;
60
+ handlePointerMove(e.nativeEvent);
61
+ window.addEventListener('pointermove', handlePointerMove);
62
+ window.addEventListener('pointerup', handlePointerUp);
63
+ }, [handlePointerMove, handlePointerUp]);
64
+ return (jsxRuntime.jsxRuntimeExports.jsx("div", { className: index$1.cx(colorPicker_module.default.selectionRoot, className), onPointerDown: handlePointerDown, ref: containerRef, style: {
65
+ background: backgroundGradient
66
+ }, ...props, children: jsxRuntime.jsxRuntimeExports.jsx("div", { className: index$1.cx(colorPicker_module.default.sliderThumb, colorPicker_module.default.selectionThumb), ref: thumbRef, style: {
67
+ background: color.hex().toString(),
68
+ opacity: 0
69
+ } }) }));
70
+ };
71
+
72
+ exports.ColorPickerArea = ColorPickerArea;
73
+ //# sourceMappingURL=color-picker-area.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-area.cjs","sources":["../../../components/color-picker/color-picker-area.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport Color from 'color';\nimport {\n type HTMLAttributes,\n PointerEvent as ReactPointerEvent,\n useCallback,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport { useColorPicker } from './color-picker-root';\nimport styles from './color-picker.module.css';\n\nexport type ColorPickerAreaProps = HTMLAttributes<HTMLDivElement>;\n\nexport const ColorPickerArea = ({\n className,\n ...props\n}: ColorPickerAreaProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const thumbRef = useRef<HTMLDivElement>(null);\n const isDragging = useRef(false);\n const isThumbVisible = useRef(false);\n\n const { hue, saturation, lightness, setColor } = useColorPicker();\n const color = Color.hsl(hue, saturation, lightness);\n\n const backgroundGradient = useMemo(() => {\n return `linear-gradient(0deg, rgba(0,0,0,1), rgba(0,0,0,0)),\n linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0)),\n hsl(${hue}, 100%, 50%)`;\n }, [hue]);\n\n // Need to use useEffect as color can change from outside, and we need to sync thumb position\n useEffect(() => {\n if (!containerRef.current || !thumbRef.current) return;\n\n const clamp = (v: number) => Math.max(0, Math.min(1, v));\n const x = clamp(saturation / 100);\n const topLightness = x < 0.01 ? 100 : 50 + 50 * (1 - x);\n const y = clamp(1 - lightness / topLightness);\n\n thumbRef.current.style.left = `${x * 100}%`;\n thumbRef.current.style.top = `${y * 100}%`;\n\n // This is needed to avoid flickering of the thumb on initial render\n if (!isThumbVisible.current) {\n isThumbVisible.current = true;\n thumbRef.current.style.opacity = '1';\n }\n }, [saturation, lightness]);\n\n const handlePointerMove = useCallback(\n (event: PointerEvent) => {\n if (!(isDragging.current && containerRef.current && thumbRef.current)) {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n const rect = containerRef.current.getBoundingClientRect();\n const x = Math.max(\n 0,\n Math.min(1, (event.clientX - rect.left) / rect.width)\n );\n const y = Math.max(\n 0,\n Math.min(1, (event.clientY - rect.top) / rect.height)\n );\n const saturation = x * 100;\n const topLightness = x < 0.01 ? 100 : 50 + 50 * (1 - x);\n const lightness = topLightness * (1 - y);\n setColor({ s: saturation, l: lightness });\n },\n [setColor]\n );\n\n const handlePointerUp = useCallback(() => {\n isDragging.current = false;\n window.removeEventListener('pointermove', handlePointerMove);\n window.removeEventListener('pointerup', handlePointerUp);\n }, [handlePointerMove]);\n\n const handlePointerDown = useCallback(\n (e: ReactPointerEvent<HTMLDivElement>) => {\n e.preventDefault();\n isDragging.current = true;\n handlePointerMove(e.nativeEvent);\n window.addEventListener('pointermove', handlePointerMove);\n window.addEventListener('pointerup', handlePointerUp);\n },\n [handlePointerMove, handlePointerUp]\n );\n\n return (\n <div\n className={cx(styles.selectionRoot, className)}\n onPointerDown={handlePointerDown}\n ref={containerRef}\n style={{\n background: backgroundGradient\n }}\n {...props}\n >\n <div\n className={cx(styles.sliderThumb, styles.selectionThumb)}\n ref={thumbRef}\n style={{\n background: color.hex().toString(),\n opacity: 0\n }}\n />\n </div>\n );\n};\n"],"names":["useRef","useColorPicker","Color","useMemo","useEffect","useCallback","_jsx","cx","styles"],"mappings":";;;;;;;;;AAeO,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACa,KAAI;AACzB,IAAA,MAAM,YAAY,GAAGA,YAAM,CAAiB,IAAI,CAAC,CAAC;AAClD,IAAA,MAAM,QAAQ,GAAGA,YAAM,CAAiB,IAAI,CAAC,CAAC;AAC9C,IAAA,MAAM,UAAU,GAAGA,YAAM,CAAC,KAAK,CAAC,CAAC;AACjC,IAAA,MAAM,cAAc,GAAGA,YAAM,CAAC,KAAK,CAAC,CAAC;AAErC,IAAA,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG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AAa,EAAE,iBAAiB,CAAC,CAAC;AAC7D,QAAA,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AAC3D,KAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAExB,IAAA,MAAM,iBAAiB,GAAGA,iBAAW,CACnC,CAAC,CAAoC,KAAI;QACvC,CAAC,CAAC,cAAc,EAAE,CAAC;AACnB,QAAA,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC;AAC1B,QAAA,iBAAiB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AACjC,QAAA,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;AAC1D,QAAA,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AACxD,KAAC,EACD,CAAC,iBAAiB,EAAE,eAAe,CAAC,CACrC,CAAC;IAEF,QACEC,0CACE,SAAS,EAAEC,UAAE,CAACC,0BAAM,CAAC,aAAa,EAAE,SAAS,CAAC,EAC9C,aAAa,EAAE,iBAAiB,EAChC,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE;AACL,YAAA,UAAU,EAAE,kBAAkB;SAC/B,EACG,GAAA,KAAK,YAETF,gCACE,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEC,UAAE,CAACC,0BAAM,CAAC,WAAW,EAAEA,0BAAM,CAAC,cAAc,CAAC,EACxD,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE;AACL,gBAAA,UAAU,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;AAClC,gBAAA,OAAO,EAAE,CAAC;aACX,EACD,CAAA,EAAA,CACE,EACN;AACJ;;;;"}
@@ -0,0 +1,4 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ export type ColorPickerAreaProps = HTMLAttributes<HTMLDivElement>;
3
+ export declare const ColorPickerArea: ({ className, ...props }: ColorPickerAreaProps) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=color-picker-area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-area.d.ts","sourceRoot":"","sources":["../../../components/color-picker/color-picker-area.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAMpB,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE,eAAO,MAAM,eAAe,4FAkG3B,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
+ import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
3
+ import Color from '../../node_modules/.pnpm/color@5.0.0/node_modules/color/index.js';
4
+ import { useRef, useMemo, useEffect, useCallback } from 'react';
5
+ import { useColorPicker } from './color-picker-root.js';
6
+ import styles from './color-picker.module.css.js';
7
+
8
+ const ColorPickerArea = ({ className, ...props }) => {
9
+ const containerRef = useRef(null);
10
+ const thumbRef = useRef(null);
11
+ const isDragging = useRef(false);
12
+ const isThumbVisible = useRef(false);
13
+ const { hue, saturation, lightness, setColor } = useColorPicker();
14
+ const color = Color.hsl(hue, saturation, lightness);
15
+ const backgroundGradient = useMemo(() => {
16
+ return `linear-gradient(0deg, rgba(0,0,0,1), rgba(0,0,0,0)),
17
+ linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0)),
18
+ hsl(${hue}, 100%, 50%)`;
19
+ }, [hue]);
20
+ // Need to use useEffect as color can change from outside, and we need to sync thumb position
21
+ useEffect(() => {
22
+ if (!containerRef.current || !thumbRef.current)
23
+ return;
24
+ const clamp = (v) => Math.max(0, Math.min(1, v));
25
+ const x = clamp(saturation / 100);
26
+ const topLightness = x < 0.01 ? 100 : 50 + 50 * (1 - x);
27
+ const y = clamp(1 - lightness / topLightness);
28
+ thumbRef.current.style.left = `${x * 100}%`;
29
+ thumbRef.current.style.top = `${y * 100}%`;
30
+ // This is needed to avoid flickering of the thumb on initial render
31
+ if (!isThumbVisible.current) {
32
+ isThumbVisible.current = true;
33
+ thumbRef.current.style.opacity = '1';
34
+ }
35
+ }, [saturation, lightness]);
36
+ const handlePointerMove = useCallback((event) => {
37
+ if (!(isDragging.current && containerRef.current && thumbRef.current)) {
38
+ return;
39
+ }
40
+ event.preventDefault();
41
+ event.stopPropagation();
42
+ const rect = containerRef.current.getBoundingClientRect();
43
+ const x = Math.max(0, Math.min(1, (event.clientX - rect.left) / rect.width));
44
+ const y = Math.max(0, Math.min(1, (event.clientY - rect.top) / rect.height));
45
+ const saturation = x * 100;
46
+ const topLightness = x < 0.01 ? 100 : 50 + 50 * (1 - x);
47
+ const lightness = topLightness * (1 - y);
48
+ setColor({ s: saturation, l: lightness });
49
+ }, [setColor]);
50
+ const handlePointerUp = useCallback(() => {
51
+ isDragging.current = false;
52
+ window.removeEventListener('pointermove', handlePointerMove);
53
+ window.removeEventListener('pointerup', handlePointerUp);
54
+ }, [handlePointerMove]);
55
+ const handlePointerDown = useCallback((e) => {
56
+ e.preventDefault();
57
+ isDragging.current = true;
58
+ handlePointerMove(e.nativeEvent);
59
+ window.addEventListener('pointermove', handlePointerMove);
60
+ window.addEventListener('pointerup', handlePointerUp);
61
+ }, [handlePointerMove, handlePointerUp]);
62
+ return (jsxRuntimeExports.jsx("div", { className: cx(styles.selectionRoot, className), onPointerDown: handlePointerDown, ref: containerRef, style: {
63
+ background: backgroundGradient
64
+ }, ...props, children: jsxRuntimeExports.jsx("div", { className: cx(styles.sliderThumb, styles.selectionThumb), ref: thumbRef, style: {
65
+ background: color.hex().toString(),
66
+ opacity: 0
67
+ } }) }));
68
+ };
69
+
70
+ export { ColorPickerArea };
71
+ //# sourceMappingURL=color-picker-area.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-area.js","sources":["../../../components/color-picker/color-picker-area.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport Color from 'color';\nimport {\n type HTMLAttributes,\n PointerEvent as ReactPointerEvent,\n useCallback,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport { useColorPicker } from './color-picker-root';\nimport styles from './color-picker.module.css';\n\nexport type ColorPickerAreaProps = HTMLAttributes<HTMLDivElement>;\n\nexport const ColorPickerArea = ({\n className,\n ...props\n}: ColorPickerAreaProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const thumbRef = useRef<HTMLDivElement>(null);\n const isDragging = useRef(false);\n const isThumbVisible = useRef(false);\n\n const { hue, saturation, lightness, setColor } = useColorPicker();\n const color = Color.hsl(hue, saturation, lightness);\n\n const backgroundGradient = useMemo(() => {\n return `linear-gradient(0deg, rgba(0,0,0,1), rgba(0,0,0,0)),\n linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0)),\n hsl(${hue}, 100%, 50%)`;\n }, [hue]);\n\n // Need to use useEffect as color can change from outside, and we need to sync thumb position\n useEffect(() => {\n if (!containerRef.current || !thumbRef.current) return;\n\n const clamp = (v: number) => Math.max(0, Math.min(1, v));\n const x = clamp(saturation / 100);\n const topLightness = x < 0.01 ? 100 : 50 + 50 * (1 - x);\n const y = clamp(1 - lightness / topLightness);\n\n thumbRef.current.style.left = `${x * 100}%`;\n thumbRef.current.style.top = `${y * 100}%`;\n\n // This is needed to avoid flickering of the thumb on initial render\n if (!isThumbVisible.current) {\n isThumbVisible.current = true;\n thumbRef.current.style.opacity = '1';\n }\n }, [saturation, lightness]);\n\n const handlePointerMove = useCallback(\n (event: PointerEvent) => {\n if (!(isDragging.current && containerRef.current && thumbRef.current)) {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n const rect = containerRef.current.getBoundingClientRect();\n const x = Math.max(\n 0,\n Math.min(1, (event.clientX - rect.left) / rect.width)\n );\n const y = Math.max(\n 0,\n Math.min(1, (event.clientY - rect.top) / rect.height)\n );\n const saturation = x * 100;\n const topLightness = x < 0.01 ? 100 : 50 + 50 * (1 - x);\n const lightness = topLightness * (1 - y);\n setColor({ s: saturation, l: lightness });\n },\n [setColor]\n );\n\n const handlePointerUp = useCallback(() => {\n isDragging.current = false;\n window.removeEventListener('pointermove', handlePointerMove);\n window.removeEventListener('pointerup', handlePointerUp);\n }, [handlePointerMove]);\n\n const handlePointerDown = useCallback(\n (e: ReactPointerEvent<HTMLDivElement>) => {\n e.preventDefault();\n isDragging.current = true;\n handlePointerMove(e.nativeEvent);\n window.addEventListener('pointermove', handlePointerMove);\n window.addEventListener('pointerup', handlePointerUp);\n },\n [handlePointerMove, handlePointerUp]\n );\n\n return (\n <div\n className={cx(styles.selectionRoot, className)}\n onPointerDown={handlePointerDown}\n ref={containerRef}\n style={{\n background: backgroundGradient\n }}\n {...props}\n >\n <div\n className={cx(styles.sliderThumb, styles.selectionThumb)}\n ref={thumbRef}\n style={{\n background: color.hex().toString(),\n opacity: 0\n }}\n />\n </div>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;;;AAeO,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACa,KAAI;AACzB,IAAA,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;AAClD,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;AAC9C,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACjC,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAErC,IAAA,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,cAAc,EAAE,CAAC;AAClE,IAAA,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;AAEpD,IAAA,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAK;QACtC,OAAO,CAAA;;AAEO,gBAAA,EAAA,GAAG,cAAc,CAAC;AAClC,KAAC,EAAE,CAAC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,QAAA,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC;AAC1B,QAAA,iBAAiB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AACjC,QAAA,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;AAC1D,QAAA,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AACxD,KAAC,EACD,CAAC,iBAAiB,EAAE,eAAe,CAAC,CACrC,CAAC;IAEF,QACEA,+BACE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,EAC9C,aAAa,EAAE,iBAAiB,EAChC,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE;AACL,YAAA,UAAU,EAAE,kBAAkB;SAC/B,EACG,GAAA,KAAK,YAETA,qBACE,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,EACxD,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE;AACL,gBAAA,UAAU,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;AAClC,gBAAA,OAAO,EAAE,CAAC;aACX,EACD,CAAA,EAAA,CACE,EACN;AACJ;;;;"}
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
4
+ var index$1 = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
5
+ var colorPickerRoot = require('./color-picker-root.cjs');
6
+ var colorPicker_module = require('./color-picker.module.css.cjs');
7
+ var index = require('../../node_modules/.pnpm/@radix-ui_react-slider@1.3.5_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-slider/dist/index.cjs');
8
+
9
+ const ColorPickerHue = ({ className, ...props }) => {
10
+ const { hue, setColor } = colorPickerRoot.useColorPicker();
11
+ return (jsxRuntime.jsxRuntimeExports.jsxs(index.Root, { className: index$1.cx(colorPicker_module.default.sliderRoot, className), max: 360, onValueChange: ([hue]) => setColor({ h: hue }), step: 1, value: [hue], ...props, children: [jsxRuntime.jsxRuntimeExports.jsx(index.Track, { className: index$1.cx(colorPicker_module.default.sliderTrack, colorPicker_module.default.hueTrack), children: jsxRuntime.jsxRuntimeExports.jsx(index.Range, { className: colorPicker_module.default.sliderRange }) }), jsxRuntime.jsxRuntimeExports.jsx(index.Thumb, { className: colorPicker_module.default.sliderThumb })] }));
12
+ };
13
+
14
+ exports.ColorPickerHue = ColorPickerHue;
15
+ //# sourceMappingURL=color-picker-hue.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-hue.cjs","sources":["../../../components/color-picker/color-picker-hue.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport { Slider } from 'radix-ui';\nimport { type ComponentProps } from 'react';\nimport { useColorPicker } from './color-picker-root';\nimport styles from './color-picker.module.css';\n\nexport type ColorPickerHueProps = ComponentProps<typeof Slider.Root>;\nexport const ColorPickerHue = ({\n className,\n ...props\n}: ColorPickerHueProps) => {\n const { hue, setColor } = useColorPicker();\n return (\n <Slider.Root\n className={cx(styles.sliderRoot, className)}\n max={360}\n onValueChange={([hue]) => setColor({ h: hue })}\n step={1}\n value={[hue]}\n {...props}\n >\n <Slider.Track className={cx(styles.sliderTrack, styles.hueTrack)}>\n <Slider.Range className={styles.sliderRange} />\n </Slider.Track>\n <Slider.Thumb className={styles.sliderThumb} />\n </Slider.Root>\n );\n};\n"],"names":["useColorPicker","_jsxs","Slider.Root","cx","styles","_jsx","Slider.Track","Slider.Range","Slider.Thumb"],"mappings":";;;;;;;;AAOO,MAAM,cAAc,GAAG,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACY,KAAI;IACxB,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAGA,8BAAc,EAAE,CAAC;IAC3C,QACEC,kCAACC,UAAW,EACV,EAAA,SAAS,EAAEC,UAAE,CAACC,0BAAM,CAAC,UAAU,EAAE,SAAS,CAAC,EAC3C,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAC9C,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,CAAC,GAAG,CAAC,EACR,GAAA,KAAK,aAETC,gCAAC,CAAAC,WAAY,EAAA,EAAC,SAAS,EAAEH,UAAE,CAACC,0BAAM,CAAC,WAAW,EAAEA,0BAAM,CAAC,QAAQ,CAAC,EAC9D,QAAA,EAAAC,gCAAA,CAACE,WAAY,EAAC,EAAA,SAAS,EAAEH,0BAAM,CAAC,WAAW,EAAI,CAAA,EAAA,CAClC,EACfC,gCAAC,CAAAG,WAAY,EAAA,EAAC,SAAS,EAAEJ,0BAAM,CAAC,WAAW,EAAA,CAAI,CACnC,EAAA,CAAA,EACd;AACJ;;;;"}
@@ -0,0 +1,5 @@
1
+ import { Slider } from 'radix-ui';
2
+ import { type ComponentProps } from 'react';
3
+ export type ColorPickerHueProps = ComponentProps<typeof Slider.Root>;
4
+ export declare const ColorPickerHue: ({ className, ...props }: ColorPickerHueProps) => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=color-picker-hue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-hue.d.ts","sourceRoot":"","sources":["../../../components/color-picker/color-picker-hue.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACrE,eAAO,MAAM,cAAc,4BAGxB,mBAAmB,4CAiBrB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
+ import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
3
+ import { useColorPicker } from './color-picker-root.js';
4
+ import styles from './color-picker.module.css.js';
5
+ import { Root, Track, Range, Thumb } from '../../node_modules/.pnpm/@radix-ui_react-slider@1.3.5_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-slider/dist/index.js';
6
+
7
+ const ColorPickerHue = ({ className, ...props }) => {
8
+ const { hue, setColor } = useColorPicker();
9
+ return (jsxRuntimeExports.jsxs(Root, { className: cx(styles.sliderRoot, className), max: 360, onValueChange: ([hue]) => setColor({ h: hue }), step: 1, value: [hue], ...props, children: [jsxRuntimeExports.jsx(Track, { className: cx(styles.sliderTrack, styles.hueTrack), children: jsxRuntimeExports.jsx(Range, { className: styles.sliderRange }) }), jsxRuntimeExports.jsx(Thumb, { className: styles.sliderThumb })] }));
10
+ };
11
+
12
+ export { ColorPickerHue };
13
+ //# sourceMappingURL=color-picker-hue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-hue.js","sources":["../../../components/color-picker/color-picker-hue.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport { Slider } from 'radix-ui';\nimport { type ComponentProps } from 'react';\nimport { useColorPicker } from './color-picker-root';\nimport styles from './color-picker.module.css';\n\nexport type ColorPickerHueProps = ComponentProps<typeof Slider.Root>;\nexport const ColorPickerHue = ({\n className,\n ...props\n}: ColorPickerHueProps) => {\n const { hue, setColor } = useColorPicker();\n return (\n <Slider.Root\n className={cx(styles.sliderRoot, className)}\n max={360}\n onValueChange={([hue]) => setColor({ h: hue })}\n step={1}\n value={[hue]}\n {...props}\n >\n <Slider.Track className={cx(styles.sliderTrack, styles.hueTrack)}>\n <Slider.Range className={styles.sliderRange} />\n </Slider.Track>\n <Slider.Thumb className={styles.sliderThumb} />\n </Slider.Root>\n );\n};\n"],"names":["_jsxs","Slider.Root","_jsx","Slider.Track","Slider.Range","Slider.Thumb"],"mappings":";;;;;;AAOO,MAAM,cAAc,GAAG,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACY,KAAI;IACxB,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,cAAc,EAAE,CAAC;IAC3C,QACEA,uBAACC,IAAW,EACV,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,EAC3C,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAC9C,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,CAAC,GAAG,CAAC,EACR,GAAA,KAAK,aAETC,qBAAC,CAAAC,KAAY,EAAA,EAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,EAC9D,QAAA,EAAAD,qBAAA,CAACE,KAAY,EAAC,EAAA,SAAS,EAAE,MAAM,CAAC,WAAW,EAAI,CAAA,EAAA,CAClC,EACfF,qBAAC,CAAAG,KAAY,EAAA,EAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAA,CAAI,CACnC,EAAA,CAAA,EACd;AACJ;;;;"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
4
+ var index = require('../../node_modules/.pnpm/color@5.0.0/node_modules/color/index.cjs');
5
+ var inputField = require('../input-field/input-field.cjs');
6
+ var colorPickerRoot = require('./color-picker-root.cjs');
7
+ var utils = require('./utils.cjs');
8
+
9
+ const ColorPickerInput = (props) => {
10
+ const { hue, saturation, lightness, alpha, mode } = colorPickerRoot.useColorPicker();
11
+ const color = index.default.hsl(hue, saturation, lightness, alpha ?? 1);
12
+ return jsxRuntime.jsxRuntimeExports.jsx(inputField.InputField, { value: utils.getColorString(color, mode), readOnly: true, ...props });
13
+ };
14
+
15
+ exports.ColorPickerInput = ColorPickerInput;
16
+ //# sourceMappingURL=color-picker-input.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-input.cjs","sources":["../../../components/color-picker/color-picker-input.tsx"],"sourcesContent":["import Color from 'color';\nimport { ComponentPropsWithoutRef } from 'react';\nimport { InputField } from '../input-field';\nimport { useColorPicker } from './color-picker-root';\nimport { getColorString } from './utils';\n\nexport const ColorPickerInput = (\n props: ComponentPropsWithoutRef<typeof InputField>\n) => {\n const { hue, saturation, lightness, alpha, mode } = useColorPicker();\n const color = Color.hsl(hue, saturation, lightness, alpha ?? 1);\n\n return <InputField value={getColorString(color, mode)} readOnly {...props} />;\n};\n"],"names":["useColorPicker","Color","_jsx","InputField","getColorString"],"mappings":";;;;;;;;AAMa,MAAA,gBAAgB,GAAG,CAC9B,KAAkD,KAChD;AACF,IAAA,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,GAAGA,8BAAc,EAAE,CAAC;AACrE,IAAA,MAAM,KAAK,GAAGC,aAAK,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;AAEhE,IAAA,OAAOC,iCAACC,qBAAU,EAAA,EAAC,KAAK,EAAEC,oBAAc,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,QAAQ,EAAK,IAAA,EAAA,GAAA,KAAK,GAAI,CAAC;AAChF;;;;"}
@@ -0,0 +1,4 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { InputField } from '../input-field';
3
+ export declare const ColorPickerInput: (props: ComponentPropsWithoutRef<typeof InputField>) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=color-picker-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-input.d.ts","sourceRoot":"","sources":["../../../components/color-picker/color-picker-input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAI5C,eAAO,MAAM,gBAAgB,UACpB,yBAAyB,iBAAiB,CAAC,4CAMnD,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
+ import Color from '../../node_modules/.pnpm/color@5.0.0/node_modules/color/index.js';
3
+ import { InputField } from '../input-field/input-field.js';
4
+ import { useColorPicker } from './color-picker-root.js';
5
+ import { getColorString } from './utils.js';
6
+
7
+ const ColorPickerInput = (props) => {
8
+ const { hue, saturation, lightness, alpha, mode } = useColorPicker();
9
+ const color = Color.hsl(hue, saturation, lightness, alpha ?? 1);
10
+ return jsxRuntimeExports.jsx(InputField, { value: getColorString(color, mode), readOnly: true, ...props });
11
+ };
12
+
13
+ export { ColorPickerInput };
14
+ //# sourceMappingURL=color-picker-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-input.js","sources":["../../../components/color-picker/color-picker-input.tsx"],"sourcesContent":["import Color from 'color';\nimport { ComponentPropsWithoutRef } from 'react';\nimport { InputField } from '../input-field';\nimport { useColorPicker } from './color-picker-root';\nimport { getColorString } from './utils';\n\nexport const ColorPickerInput = (\n props: ComponentPropsWithoutRef<typeof InputField>\n) => {\n const { hue, saturation, lightness, alpha, mode } = useColorPicker();\n const color = Color.hsl(hue, saturation, lightness, alpha ?? 1);\n\n return <InputField value={getColorString(color, mode)} readOnly {...props} />;\n};\n"],"names":["_jsx"],"mappings":";;;;;;AAMa,MAAA,gBAAgB,GAAG,CAC9B,KAAkD,KAChD;AACF,IAAA,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,cAAc,EAAE,CAAC;AACrE,IAAA,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;AAEhE,IAAA,OAAOA,sBAAC,UAAU,EAAA,EAAC,KAAK,EAAE,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,QAAQ,EAAK,IAAA,EAAA,GAAA,KAAK,GAAI,CAAC;AAChF;;;;"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
4
+ var index = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
5
+ var select = require('../select/select.cjs');
6
+ var colorPickerRoot = require('./color-picker-root.cjs');
7
+ var colorPicker_module = require('./color-picker.module.css.cjs');
8
+ var utils = require('./utils.cjs');
9
+
10
+ const ColorPickerMode = ({ className, options = utils.SUPPORTED_MODES, ...props }) => {
11
+ const { mode, setMode } = colorPickerRoot.useColorPicker();
12
+ return (jsxRuntime.jsxRuntimeExports.jsxs(select.Select, { onValueChange: value => setMode(value), value: mode, children: [jsxRuntime.jsxRuntimeExports.jsx(select.Select.Trigger, { className: index.cx(colorPicker_module.default.selectTrigger, className), ...props, children: jsxRuntime.jsxRuntimeExports.jsx(select.Select.Value, { placeholder: 'Mode' }) }), jsxRuntime.jsxRuntimeExports.jsx(select.Select.Content, { children: options.map(option => (jsxRuntime.jsxRuntimeExports.jsx(select.Select.Item, { value: option, children: option.toUpperCase() }, option))) })] }));
13
+ };
14
+
15
+ exports.ColorPickerMode = ColorPickerMode;
16
+ //# sourceMappingURL=color-picker-mode.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-mode.cjs","sources":["../../../components/color-picker/color-picker-mode.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport { type ComponentProps } from 'react';\nimport { Select } from '../select';\nimport { useColorPicker } from './color-picker-root';\nimport styles from './color-picker.module.css';\nimport { ModeType, SUPPORTED_MODES } from './utils';\n\nexport interface ColorPickerModeProps\n extends ComponentProps<typeof Select.Trigger> {\n options?: ModeType[];\n}\n\nexport const ColorPickerMode = ({\n className,\n options = SUPPORTED_MODES,\n ...props\n}: ColorPickerModeProps) => {\n const { mode, setMode } = useColorPicker();\n return (\n <Select onValueChange={value => setMode(value as ModeType)} value={mode}>\n <Select.Trigger\n className={cx(styles.selectTrigger, className)}\n {...props}\n >\n <Select.Value placeholder='Mode' />\n </Select.Trigger>\n <Select.Content>\n {options.map(option => (\n <Select.Item key={option} value={option}>\n {option.toUpperCase()}\n </Select.Item>\n ))}\n </Select.Content>\n </Select>\n );\n};\n"],"names":["SUPPORTED_MODES","useColorPicker","_jsxs","Select","_jsx","cx","styles"],"mappings":";;;;;;;;;AAYa,MAAA,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,OAAO,GAAGA,qBAAe,EACzB,GAAG,KAAK,EACa,KAAI;IACzB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAGC,8BAAc,EAAE,CAAC;AAC3C,IAAA,QACEC,iCAAC,CAAAC,aAAM,EAAC,EAAA,aAAa,EAAE,KAAK,IAAI,OAAO,CAAC,KAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAA,QAAA,EAAA,CACrEC,gCAAC,CAAAD,aAAM,CAAC,OAAO,EAAA,EACb,SAAS,EAAEE,QAAE,CAACC,0BAAM,CAAC,aAAa,EAAE,SAAS,CAAC,EAAA,GAC1C,KAAK,EAET,QAAA,EAAAF,gCAAA,CAACD,aAAM,CAAC,KAAK,EAAC,EAAA,WAAW,EAAC,MAAM,EAAA,CAAG,GACpB,EACjBC,gCAAA,CAACD,aAAM,CAAC,OAAO,EACZ,EAAA,QAAA,EAAA,OAAO,CAAC,GAAG,CAAC,MAAM,KACjBC,gCAAA,CAACD,aAAM,CAAC,IAAI,EAAc,EAAA,KAAK,EAAE,MAAM,EAAA,QAAA,EACpC,MAAM,CAAC,WAAW,EAAE,EAAA,EADL,MAAM,CAEV,CACf,CAAC,EACa,CAAA,CAAA,EAAA,CACV,EACT;AACJ;;;;"}
@@ -0,0 +1,8 @@
1
+ import { type ComponentProps } from 'react';
2
+ import { Select } from '../select';
3
+ import { ModeType } from './utils';
4
+ export interface ColorPickerModeProps extends ComponentProps<typeof Select.Trigger> {
5
+ options?: ModeType[];
6
+ }
7
+ export declare const ColorPickerMode: ({ className, options, ...props }: ColorPickerModeProps) => import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=color-picker-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-mode.d.ts","sourceRoot":"","sources":["../../../components/color-picker/color-picker-mode.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,OAAO,EAAE,QAAQ,EAAmB,MAAM,SAAS,CAAC;AAEpD,MAAM,WAAW,oBACf,SAAQ,cAAc,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC;IAC7C,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,qCAIzB,oBAAoB,4CAmBtB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
+ import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
3
+ import { Select } from '../select/select.js';
4
+ import { useColorPicker } from './color-picker-root.js';
5
+ import styles from './color-picker.module.css.js';
6
+ import { SUPPORTED_MODES } from './utils.js';
7
+
8
+ const ColorPickerMode = ({ className, options = SUPPORTED_MODES, ...props }) => {
9
+ const { mode, setMode } = useColorPicker();
10
+ return (jsxRuntimeExports.jsxs(Select, { onValueChange: value => setMode(value), value: mode, children: [jsxRuntimeExports.jsx(Select.Trigger, { className: cx(styles.selectTrigger, className), ...props, children: jsxRuntimeExports.jsx(Select.Value, { placeholder: 'Mode' }) }), jsxRuntimeExports.jsx(Select.Content, { children: options.map(option => (jsxRuntimeExports.jsx(Select.Item, { value: option, children: option.toUpperCase() }, option))) })] }));
11
+ };
12
+
13
+ export { ColorPickerMode };
14
+ //# sourceMappingURL=color-picker-mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-mode.js","sources":["../../../components/color-picker/color-picker-mode.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport { type ComponentProps } from 'react';\nimport { Select } from '../select';\nimport { useColorPicker } from './color-picker-root';\nimport styles from './color-picker.module.css';\nimport { ModeType, SUPPORTED_MODES } from './utils';\n\nexport interface ColorPickerModeProps\n extends ComponentProps<typeof Select.Trigger> {\n options?: ModeType[];\n}\n\nexport const ColorPickerMode = ({\n className,\n options = SUPPORTED_MODES,\n ...props\n}: ColorPickerModeProps) => {\n const { mode, setMode } = useColorPicker();\n return (\n <Select onValueChange={value => setMode(value as ModeType)} value={mode}>\n <Select.Trigger\n className={cx(styles.selectTrigger, className)}\n {...props}\n >\n <Select.Value placeholder='Mode' />\n </Select.Trigger>\n <Select.Content>\n {options.map(option => (\n <Select.Item key={option} value={option}>\n {option.toUpperCase()}\n </Select.Item>\n ))}\n </Select.Content>\n </Select>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAYa,MAAA,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,OAAO,GAAG,eAAe,EACzB,GAAG,KAAK,EACa,KAAI;IACzB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,CAAC;AAC3C,IAAA,QACEA,sBAAC,CAAA,MAAM,EAAC,EAAA,aAAa,EAAE,KAAK,IAAI,OAAO,CAAC,KAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAA,QAAA,EAAA,CACrEC,qBAAC,CAAA,MAAM,CAAC,OAAO,EAAA,EACb,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,EAAA,GAC1C,KAAK,EAET,QAAA,EAAAA,qBAAA,CAAC,MAAM,CAAC,KAAK,EAAC,EAAA,WAAW,EAAC,MAAM,EAAA,CAAG,GACpB,EACjBA,qBAAA,CAAC,MAAM,CAAC,OAAO,EACZ,EAAA,QAAA,EAAA,OAAO,CAAC,GAAG,CAAC,MAAM,KACjBA,qBAAA,CAAC,MAAM,CAAC,IAAI,EAAc,EAAA,KAAK,EAAE,MAAM,EAAA,QAAA,EACpC,MAAM,CAAC,WAAW,EAAE,EAAA,EADL,MAAM,CAEV,CACf,CAAC,EACa,CAAA,CAAA,EAAA,CACV,EACT;AACJ;;;;"}
@@ -0,0 +1,53 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
4
+ var index = require('../../node_modules/.pnpm/color@5.0.0/node_modules/color/index.cjs');
5
+ var React = require('react');
6
+ var flex = require('../flex/flex.cjs');
7
+ var utils = require('./utils.cjs');
8
+
9
+ const ColorPickerContext = React.createContext(undefined);
10
+ const useColorPicker = () => {
11
+ const context = React.useContext(ColorPickerContext);
12
+ if (!context) {
13
+ throw new Error('useColorPicker must be used within a ColorPickerProvider');
14
+ }
15
+ return context;
16
+ };
17
+ const ColorPickerRoot = ({ value, defaultValue = '#ffffff', onValueChange, defaultMode = 'hex', mode: providedMode, onModeChange, ...props }) => {
18
+ const providedColor = value && index.default(value).hsl().object();
19
+ const [internalColor, setInternalColor] = React.useState(index.default(defaultValue).hsl().object());
20
+ const [internalMode, setInternalMode] = React.useState(defaultMode);
21
+ const hue = providedColor ? providedColor.h : internalColor.h;
22
+ const saturation = providedColor ? providedColor.s : internalColor.s;
23
+ const lightness = providedColor ? providedColor.l : internalColor.l;
24
+ const alpha = (providedColor ? providedColor?.alpha : internalColor?.alpha) ?? 1;
25
+ const mode = providedMode ?? internalMode;
26
+ const setColor = React.useCallback(value => {
27
+ setInternalColor(_color => {
28
+ const updatedColor = { ..._color, ...value };
29
+ if (!onValueChange)
30
+ return updatedColor;
31
+ const color = index.default.hsl(updatedColor.h, updatedColor.s, updatedColor.l, updatedColor?.alpha ?? 1);
32
+ onValueChange(utils.getColorString(color, mode), mode);
33
+ return updatedColor;
34
+ });
35
+ }, [mode, onValueChange]);
36
+ const setMode = React.useCallback(value => {
37
+ setInternalMode(value);
38
+ onModeChange?.(value);
39
+ }, [onModeChange]);
40
+ return (jsxRuntime.jsxRuntimeExports.jsx(ColorPickerContext.Provider, { value: {
41
+ hue,
42
+ saturation,
43
+ lightness,
44
+ alpha,
45
+ mode,
46
+ setColor,
47
+ setMode
48
+ }, children: jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { direction: 'column', gap: 4, ...props }) }));
49
+ };
50
+
51
+ exports.ColorPickerRoot = ColorPickerRoot;
52
+ exports.useColorPicker = useColorPicker;
53
+ //# sourceMappingURL=color-picker-root.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-root.cjs","sources":["../../../components/color-picker/color-picker-root.tsx"],"sourcesContent":["import Color, { type ColorLike } from 'color';\nimport {\n ComponentPropsWithoutRef,\n createContext,\n useCallback,\n useContext,\n useState\n} from 'react';\nimport { Flex } from '../flex';\nimport { ColorObject, ModeType, getColorString } from './utils';\n\ntype ColorPickerContextValue = {\n hue: number;\n saturation: number;\n lightness: number;\n alpha: number;\n mode: ModeType;\n setColor: (color: Partial<ColorObject>) => void;\n setMode: (mode: ModeType) => void;\n};\n\nconst ColorPickerContext = createContext<ColorPickerContextValue | undefined>(\n undefined\n);\n\nexport const useColorPicker = () => {\n const context = useContext(ColorPickerContext);\n if (!context) {\n throw new Error('useColorPicker must be used within a ColorPickerProvider');\n }\n return context;\n};\n\nexport interface ColorPickerProps\n extends Omit<ComponentPropsWithoutRef<typeof Flex>, 'defaultValue'> {\n value?: ColorLike;\n defaultValue?: ColorLike;\n onValueChange?: (value: string, mode: string) => void;\n defaultMode?: ModeType;\n mode?: ModeType;\n onModeChange?: (mode: ModeType) => void;\n}\nexport const ColorPickerRoot = ({\n value,\n defaultValue = '#ffffff',\n onValueChange,\n defaultMode = 'hex',\n mode: providedMode,\n onModeChange,\n ...props\n}: ColorPickerProps) => {\n const providedColor = value && (Color(value).hsl().object() as ColorObject);\n\n const [internalColor, setInternalColor] = useState(\n Color(defaultValue).hsl().object() as ColorObject\n );\n const [internalMode, setInternalMode] = useState(defaultMode);\n\n const hue = providedColor ? providedColor.h : internalColor.h;\n const saturation = providedColor ? providedColor.s : internalColor.s;\n const lightness = providedColor ? providedColor.l : internalColor.l;\n const alpha =\n (providedColor ? providedColor?.alpha : internalColor?.alpha) ?? 1;\n\n const mode = providedMode ?? internalMode;\n\n const setColor = useCallback<ColorPickerContextValue['setColor']>(\n value => {\n setInternalColor(_color => {\n const updatedColor = { ..._color, ...value };\n\n if (!onValueChange) return updatedColor;\n\n const color = Color.hsl(\n updatedColor.h,\n updatedColor.s,\n updatedColor.l,\n updatedColor?.alpha ?? 1\n );\n\n onValueChange(getColorString(color, mode), mode);\n\n return updatedColor;\n });\n },\n [mode, onValueChange]\n );\n\n const setMode = useCallback<ColorPickerContextValue['setMode']>(\n value => {\n setInternalMode(value);\n onModeChange?.(value);\n },\n [onModeChange]\n );\n\n return (\n <ColorPickerContext.Provider\n value={{\n hue,\n saturation,\n lightness,\n alpha,\n mode,\n setColor,\n setMode\n }}\n >\n <Flex direction='column' gap={4} {...props} />\n </ColorPickerContext.Provider>\n );\n};\n"],"names":["createContext","useContext","Color","useState","useCallback","getColorString","_jsx","Flex"],"mappings":";;;;;;;;AAqBA,MAAM,kBAAkB,GAAGA,mBAAa,CACtC,SAAS,CACV,CAAC;AAEK,MAAM,cAAc,GAAG,MAAK;AACjC,IAAA,MAAM,OAAO,GAAGC,gBAAU,CAAC,kB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AAG,KAAK,EAAE,CAAC;AAE7C,YAAA,IAAI,CAAC,aAAa;AAAE,gBAAA,OAAO,YAAY,CAAC;YAExC,MAAM,KAAK,GAAGF,aAAK,CAAC,GAAG,CACrB,YAAY,CAAC,CAAC,EACd,YAAY,CAAC,CAAC,EACd,YAAY,CAAC,CAAC,EACd,YAAY,EAAE,KAAK,IAAI,CAAC,CACzB,CAAC;YAEF,aAAa,CAACG,oBAAc,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AAEjD,YAAA,OAAO,YAAY,CAAC;AACtB,SAAC,CAAC,CAAC;AACL,KAAC,EACD,CAAC,IAAI,EAAE,aAAa,CAAC,CACtB,CAAC;AAEF,IAAA,MAAM,OAAO,GAAGD,iBAAW,CACzB,KAAK,IAAG;QACN,eAAe,CAAC,KAAK,CAAC,CAAC;AACvB,QAAA,YAAY,GAAG,KAAK,CAAC,CAAC;AACxB,KAAC,EACD,CAAC,YAAY,CAAC,CACf,CAAC;AAEF,IAAA,QACEE,gCAAC,CAAA,kBAAkB,CAAC,QAAQ,EAAA,EAC1B,KAAK,EAAE;YACL,GAAG;YACH,UAAU;YACV,SAAS;YACT,KAAK;YACL,IAAI;YACJ,QAAQ;YACR,OAAO;AACR,SAAA,EAAA,QAAA,EAEDA,gCAAC,CAAAC,SAAI,EAAC,EAAA,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,EAAM,GAAA,KAAK,EAAI,CAAA,EAAA,CAClB,EAC9B;AACJ;;;;;"}
@@ -0,0 +1,25 @@
1
+ import { type ColorLike } from 'color';
2
+ import { ComponentPropsWithoutRef } from 'react';
3
+ import { Flex } from '../flex';
4
+ import { ColorObject, ModeType } from './utils';
5
+ type ColorPickerContextValue = {
6
+ hue: number;
7
+ saturation: number;
8
+ lightness: number;
9
+ alpha: number;
10
+ mode: ModeType;
11
+ setColor: (color: Partial<ColorObject>) => void;
12
+ setMode: (mode: ModeType) => void;
13
+ };
14
+ export declare const useColorPicker: () => ColorPickerContextValue;
15
+ export interface ColorPickerProps extends Omit<ComponentPropsWithoutRef<typeof Flex>, 'defaultValue'> {
16
+ value?: ColorLike;
17
+ defaultValue?: ColorLike;
18
+ onValueChange?: (value: string, mode: string) => void;
19
+ defaultMode?: ModeType;
20
+ mode?: ModeType;
21
+ onModeChange?: (mode: ModeType) => void;
22
+ }
23
+ export declare const ColorPickerRoot: ({ value, defaultValue, onValueChange, defaultMode, mode: providedMode, onModeChange, ...props }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
24
+ export {};
25
+ //# sourceMappingURL=color-picker-root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-root.d.ts","sourceRoot":"","sources":["../../../components/color-picker/color-picker-root.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EACL,wBAAwB,EAKzB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAkB,MAAM,SAAS,CAAC;AAEhE,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAChD,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACnC,CAAC;AAMF,eAAO,MAAM,cAAc,+BAM1B,CAAC;AAEF,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,IAAI,CAAC,EAAE,cAAc,CAAC;IACnE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACzC;AACD,eAAO,MAAM,eAAe,oGAQzB,gBAAgB,4CA6DlB,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
+ import Color from '../../node_modules/.pnpm/color@5.0.0/node_modules/color/index.js';
3
+ import { createContext, useState, useCallback, useContext } from 'react';
4
+ import { Flex } from '../flex/flex.js';
5
+ import { getColorString } from './utils.js';
6
+
7
+ const ColorPickerContext = createContext(undefined);
8
+ const useColorPicker = () => {
9
+ const context = useContext(ColorPickerContext);
10
+ if (!context) {
11
+ throw new Error('useColorPicker must be used within a ColorPickerProvider');
12
+ }
13
+ return context;
14
+ };
15
+ const ColorPickerRoot = ({ value, defaultValue = '#ffffff', onValueChange, defaultMode = 'hex', mode: providedMode, onModeChange, ...props }) => {
16
+ const providedColor = value && Color(value).hsl().object();
17
+ const [internalColor, setInternalColor] = useState(Color(defaultValue).hsl().object());
18
+ const [internalMode, setInternalMode] = useState(defaultMode);
19
+ const hue = providedColor ? providedColor.h : internalColor.h;
20
+ const saturation = providedColor ? providedColor.s : internalColor.s;
21
+ const lightness = providedColor ? providedColor.l : internalColor.l;
22
+ const alpha = (providedColor ? providedColor?.alpha : internalColor?.alpha) ?? 1;
23
+ const mode = providedMode ?? internalMode;
24
+ const setColor = useCallback(value => {
25
+ setInternalColor(_color => {
26
+ const updatedColor = { ..._color, ...value };
27
+ if (!onValueChange)
28
+ return updatedColor;
29
+ const color = Color.hsl(updatedColor.h, updatedColor.s, updatedColor.l, updatedColor?.alpha ?? 1);
30
+ onValueChange(getColorString(color, mode), mode);
31
+ return updatedColor;
32
+ });
33
+ }, [mode, onValueChange]);
34
+ const setMode = useCallback(value => {
35
+ setInternalMode(value);
36
+ onModeChange?.(value);
37
+ }, [onModeChange]);
38
+ return (jsxRuntimeExports.jsx(ColorPickerContext.Provider, { value: {
39
+ hue,
40
+ saturation,
41
+ lightness,
42
+ alpha,
43
+ mode,
44
+ setColor,
45
+ setMode
46
+ }, children: jsxRuntimeExports.jsx(Flex, { direction: 'column', gap: 4, ...props }) }));
47
+ };
48
+
49
+ export { ColorPickerRoot, useColorPicker };
50
+ //# sourceMappingURL=color-picker-root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker-root.js","sources":["../../../components/color-picker/color-picker-root.tsx"],"sourcesContent":["import Color, { type ColorLike } from 'color';\nimport {\n ComponentPropsWithoutRef,\n createContext,\n useCallback,\n useContext,\n useState\n} from 'react';\nimport { Flex } from '../flex';\nimport { ColorObject, ModeType, getColorString } from './utils';\n\ntype ColorPickerContextValue = {\n hue: number;\n saturation: number;\n lightness: number;\n alpha: number;\n mode: ModeType;\n setColor: (color: Partial<ColorObject>) => void;\n setMode: (mode: ModeType) => void;\n};\n\nconst ColorPickerContext = createContext<ColorPickerContextValue | undefined>(\n undefined\n);\n\nexport const useColorPicker = () => {\n const context = useContext(ColorPickerContext);\n if (!context) {\n throw new Error('useColorPicker must be used within a ColorPickerProvider');\n }\n return context;\n};\n\nexport interface ColorPickerProps\n extends Omit<ComponentPropsWithoutRef<typeof Flex>, 'defaultValue'> {\n value?: ColorLike;\n defaultValue?: ColorLike;\n onValueChange?: (value: string, mode: string) => void;\n defaultMode?: ModeType;\n mode?: ModeType;\n onModeChange?: (mode: ModeType) => void;\n}\nexport const ColorPickerRoot = ({\n value,\n defaultValue = '#ffffff',\n onValueChange,\n defaultMode = 'hex',\n mode: providedMode,\n onModeChange,\n ...props\n}: ColorPickerProps) => {\n const providedColor = value && (Color(value).hsl().object() as ColorObject);\n\n const [internalColor, setInternalColor] = useState(\n Color(defaultValue).hsl().object() as ColorObject\n );\n const [internalMode, setInternalMode] = useState(defaultMode);\n\n const hue = providedColor ? providedColor.h : internalColor.h;\n const saturation = providedColor ? providedColor.s : internalColor.s;\n const lightness = providedColor ? providedColor.l : internalColor.l;\n const alpha =\n (providedColor ? providedColor?.alpha : internalColor?.alpha) ?? 1;\n\n const mode = providedMode ?? internalMode;\n\n const setColor = useCallback<ColorPickerContextValue['setColor']>(\n value => {\n setInternalColor(_color => {\n const updatedColor = { ..._color, ...value };\n\n if (!onValueChange) return updatedColor;\n\n const color = Color.hsl(\n updatedColor.h,\n updatedColor.s,\n updatedColor.l,\n updatedColor?.alpha ?? 1\n );\n\n onValueChange(getColorString(color, mode), mode);\n\n return updatedColor;\n });\n },\n [mode, onValueChange]\n );\n\n const setMode = useCallback<ColorPickerContextValue['setMode']>(\n value => {\n setInternalMode(value);\n onModeChange?.(value);\n },\n [onModeChange]\n );\n\n return (\n <ColorPickerContext.Provider\n value={{\n hue,\n saturation,\n lightness,\n alpha,\n mode,\n setColor,\n setMode\n }}\n >\n <Flex direction='column' gap={4} {...props} />\n </ColorPickerContext.Provider>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;;AAqBA,MAAM,kBAAkB,GAAG,aAAa,CACtC,SAAS,CACV,CAAC;AAEK,MAAM,cAAc,GAAG,MAAK;AACjC,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAC/C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC7E;AACD,IAAA,OAAO,OAAO,CAAC;AACjB,EAAE;AAWK,MAAM,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,YAAY,GAAG,SAAS,EACxB,aAAa,EACb,WAAW,GAAG,KAAK,EACnB,IAAI,EAAE,YAAY,EAClB,YAAY,EACZ,GAAG,KAAK,EACS,KAAI;AACrB,IAAA,MAAM,aAAa,GAAG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tB,SAAC,CAAC,CAAC;AACL,KAAC,EACD,CAAC,IAAI,EAAE,aAAa,CAAC,CACtB,CAAC;AAEF,IAAA,MAAM,OAAO,GAAG,WAAW,CACzB,KAAK,IAAG;QACN,eAAe,CAAC,KAAK,CAAC,CAAC;AACvB,QAAA,YAAY,GAAG,KAAK,CAAC,CAAC;AACxB,KAAC,EACD,CAAC,YAAY,CAAC,CACf,CAAC;AAEF,IAAA,QACEA,qBAAC,CAAA,kBAAkB,CAAC,QAAQ,EAAA,EAC1B,KAAK,EAAE;YACL,GAAG;YACH,UAAU;YACV,SAAS;YACT,KAAK;YACL,IAAI;YACJ,QAAQ;YACR,OAAO;AACR,SAAA,EAAA,QAAA,EAEDA,qBAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,EAAM,GAAA,KAAK,EAAI,CAAA,EAAA,CAClB,EAC9B;AACJ;;;;"}
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var colorPickerAlpha = require('./color-picker-alpha.cjs');
4
+ var colorPickerArea = require('./color-picker-area.cjs');
5
+ var colorPickerHue = require('./color-picker-hue.cjs');
6
+ var colorPickerInput = require('./color-picker-input.cjs');
7
+ var colorPickerMode = require('./color-picker-mode.cjs');
8
+ var colorPickerRoot = require('./color-picker-root.cjs');
9
+
10
+ const ColorPicker = Object.assign(colorPickerRoot.ColorPickerRoot, {
11
+ Area: colorPickerArea.ColorPickerArea,
12
+ Hue: colorPickerHue.ColorPickerHue,
13
+ Alpha: colorPickerAlpha.ColorPickerAlpha,
14
+ Input: colorPickerInput.ColorPickerInput,
15
+ Mode: colorPickerMode.ColorPickerMode
16
+ });
17
+
18
+ exports.ColorPicker = ColorPicker;
19
+ //# sourceMappingURL=color-picker.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker.cjs","sources":["../../../components/color-picker/color-picker.tsx"],"sourcesContent":["import { ColorPickerAlpha } from './color-picker-alpha';\nimport { ColorPickerArea } from './color-picker-area';\nimport { ColorPickerHue } from './color-picker-hue';\nimport { ColorPickerInput } from './color-picker-input';\nimport { ColorPickerMode } from './color-picker-mode';\nimport { ColorPickerRoot } from './color-picker-root';\n\nexport const ColorPicker = Object.assign(ColorPickerRoot, {\n Area: ColorPickerArea,\n Hue: ColorPickerHue,\n Alpha: ColorPickerAlpha,\n Input: ColorPickerInput,\n Mode: ColorPickerMode\n});\n"],"names":["ColorPickerRoot","ColorPickerArea","ColorPickerHue","ColorPickerAlpha","ColorPickerInput","ColorPickerMode"],"mappings":";;;;;;;;;MAOa,WAAW,GAAG,MAAM,CAAC,MAAM,CAACA,+BAAe,EAAE;AACxD,IAAA,IAAI,EAAEC,+BAAe;AACrB,IAAA,GAAG,EAAEC,6BAAc;AACnB,IAAA,KAAK,EAAEC,iCAAgB;AACvB,IAAA,KAAK,EAAEC,iCAAgB;AACvB,IAAA,IAAI,EAAEC,+BAAe;AACtB,CAAA;;;;"}