@progress/kendo-react-inputs 7.2.4-develop.3 → 7.3.0-develop.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 (205) hide show
  1. package/checkbox/Checkbox.js +8 -0
  2. package/checkbox/Checkbox.mjs +214 -0
  3. package/colors/ColorContrastLabels.js +8 -0
  4. package/colors/ColorContrastLabels.mjs +24 -0
  5. package/colors/ColorContrastSvg.js +8 -0
  6. package/colors/ColorContrastSvg.mjs +52 -0
  7. package/colors/ColorGradient.js +8 -0
  8. package/colors/ColorGradient.mjs +293 -0
  9. package/colors/ColorInput.js +8 -0
  10. package/colors/ColorInput.mjs +122 -0
  11. package/colors/ColorPalette.js +8 -0
  12. package/colors/ColorPalette.mjs +191 -0
  13. package/colors/ColorPicker.js +8 -0
  14. package/colors/ColorPicker.mjs +253 -0
  15. package/colors/FlatColorPicker.js +8 -0
  16. package/colors/FlatColorPicker.mjs +216 -0
  17. package/colors/HexInput.js +8 -0
  18. package/colors/HexInput.mjs +39 -0
  19. package/colors/Picker.js +8 -0
  20. package/colors/Picker.mjs +42 -0
  21. package/colors/models/palette-presets.js +8 -0
  22. package/colors/models/palette-presets.mjs +61 -0
  23. package/colors/utils/color-cache.js +8 -0
  24. package/colors/utils/color-cache.mjs +51 -0
  25. package/colors/utils/color-palette.service.js +8 -0
  26. package/colors/utils/color-palette.service.mjs +50 -0
  27. package/colors/utils/color-parser.js +8 -0
  28. package/colors/utils/color-parser.mjs +61 -0
  29. package/colors/utils/misc.js +8 -0
  30. package/colors/utils/misc.mjs +13 -0
  31. package/colors/utils/svg-calc.js +8 -0
  32. package/colors/utils/svg-calc.mjs +36 -0
  33. package/dist/cdn/js/kendo-react-inputs.js +8 -21
  34. package/index.d.mts +4275 -5
  35. package/index.d.ts +4275 -75
  36. package/index.js +8 -21
  37. package/index.mjs +97 -5042
  38. package/input/Input.js +8 -0
  39. package/input/Input.mjs +185 -0
  40. package/input/InputClearValue.js +8 -0
  41. package/input/InputClearValue.mjs +24 -0
  42. package/input/InputPrefix.js +8 -0
  43. package/input/InputPrefix.mjs +24 -0
  44. package/input/InputSeparator.js +8 -0
  45. package/input/InputSeparator.mjs +24 -0
  46. package/input/InputSuffix.js +8 -0
  47. package/input/InputSuffix.mjs +24 -0
  48. package/input/InputValidationIcon.js +8 -0
  49. package/input/InputValidationIcon.mjs +15 -0
  50. package/maskedtextbox/MaskedTextBox.js +8 -0
  51. package/maskedtextbox/MaskedTextBox.mjs +322 -0
  52. package/maskedtextbox/masking.service.js +8 -0
  53. package/maskedtextbox/masking.service.mjs +121 -0
  54. package/maskedtextbox/parsing/combinators.js +8 -0
  55. package/maskedtextbox/parsing/combinators.mjs +20 -0
  56. package/maskedtextbox/parsing/parsers.js +8 -0
  57. package/maskedtextbox/parsing/parsers.mjs +80 -0
  58. package/maskedtextbox/parsing/result.js +8 -0
  59. package/maskedtextbox/parsing/result.mjs +35 -0
  60. package/maskedtextbox/parsing/stream.js +8 -0
  61. package/maskedtextbox/parsing/stream.mjs +41 -0
  62. package/maskedtextbox/utils.js +8 -0
  63. package/maskedtextbox/utils.mjs +43 -0
  64. package/messages/index.js +8 -0
  65. package/messages/index.mjs +77 -0
  66. package/numerictextbox/NumericTextBox.js +8 -0
  67. package/numerictextbox/NumericTextBox.mjs +415 -0
  68. package/numerictextbox/utils/index.js +8 -0
  69. package/numerictextbox/utils/index.mjs +218 -0
  70. package/package-metadata.js +8 -0
  71. package/package-metadata.mjs +19 -0
  72. package/package.json +8 -8
  73. package/radiobutton/RadioButton.js +8 -0
  74. package/radiobutton/RadioButton.mjs +138 -0
  75. package/radiobutton/RadioGroup.js +8 -0
  76. package/radiobutton/RadioGroup.mjs +135 -0
  77. package/range-slider/RangeSlider.js +20 -0
  78. package/range-slider/RangeSlider.mjs +337 -0
  79. package/range-slider/range-raducer.js +8 -0
  80. package/range-slider/range-raducer.mjs +90 -0
  81. package/rating/Rating.js +12 -0
  82. package/rating/Rating.mjs +323 -0
  83. package/rating/RatingItem.js +8 -0
  84. package/rating/RatingItem.mjs +144 -0
  85. package/rating/rating-reducer.js +8 -0
  86. package/rating/rating-reducer.mjs +34 -0
  87. package/rating/utils/index.js +8 -0
  88. package/rating/utils/index.mjs +28 -0
  89. package/signature/Signature.js +8 -0
  90. package/signature/Signature.mjs +335 -0
  91. package/signature/utils/index.js +8 -0
  92. package/signature/utils/index.mjs +17 -0
  93. package/slider/Slider.js +8 -0
  94. package/slider/Slider.mjs +223 -0
  95. package/slider/SliderLabel.js +8 -0
  96. package/slider/SliderLabel.mjs +39 -0
  97. package/switch/Switch.js +8 -0
  98. package/switch/Switch.mjs +228 -0
  99. package/textarea/TextArea.js +8 -0
  100. package/textarea/TextArea.mjs +196 -0
  101. package/textbox/Textbox.js +8 -0
  102. package/textbox/Textbox.mjs +125 -0
  103. package/checkbox/Checkbox.d.ts +0 -36
  104. package/checkbox/interfaces/CheckboxBlurEvent.d.ts +0 -11
  105. package/checkbox/interfaces/CheckboxChangeEvent.d.ts +0 -15
  106. package/checkbox/interfaces/CheckboxFocusEvent.d.ts +0 -11
  107. package/checkbox/interfaces/CheckboxProps.d.ts +0 -126
  108. package/colors/ColorContrastLabels.d.ts +0 -19
  109. package/colors/ColorContrastSvg.d.ts +0 -22
  110. package/colors/ColorGradient.d.ts +0 -191
  111. package/colors/ColorInput.d.ts +0 -34
  112. package/colors/ColorPalette.d.ts +0 -127
  113. package/colors/ColorPicker.d.ts +0 -34
  114. package/colors/FlatColorPicker.d.ts +0 -139
  115. package/colors/HexInput.d.ts +0 -33
  116. package/colors/Picker.d.ts +0 -10
  117. package/colors/interfaces/ColorGradientChangeEvent.d.ts +0 -15
  118. package/colors/interfaces/ColorGradientProps.d.ts +0 -101
  119. package/colors/interfaces/ColorPaletteChangeEvent.d.ts +0 -19
  120. package/colors/interfaces/ColorPaletteProps.d.ts +0 -87
  121. package/colors/interfaces/ColorPickerActiveColorClick.d.ts +0 -21
  122. package/colors/interfaces/ColorPickerBlurEvent.d.ts +0 -17
  123. package/colors/interfaces/ColorPickerChangeEvent.d.ts +0 -21
  124. package/colors/interfaces/ColorPickerFocusEvent.d.ts +0 -17
  125. package/colors/interfaces/ColorPickerGradientSettings.d.ts +0 -22
  126. package/colors/interfaces/ColorPickerPaletteSettings.d.ts +0 -36
  127. package/colors/interfaces/ColorPickerPopupSettings.d.ts +0 -18
  128. package/colors/interfaces/ColorPickerProps.d.ts +0 -165
  129. package/colors/interfaces/ColorPickerView.d.ts +0 -14
  130. package/colors/interfaces/PickerPopupSettings.d.ts +0 -22
  131. package/colors/interfaces/PickerProps.d.ts +0 -46
  132. package/colors/models/hsva.d.ts +0 -13
  133. package/colors/models/output-format.d.ts +0 -8
  134. package/colors/models/palette-presets.d.ts +0 -57
  135. package/colors/models/rgb.d.ts +0 -12
  136. package/colors/models/rgba.d.ts +0 -13
  137. package/colors/models/table-cell.d.ts +0 -11
  138. package/colors/models/tile-size.d.ts +0 -15
  139. package/colors/utils/color-cache.d.ts +0 -34
  140. package/colors/utils/color-palette.service.d.ts +0 -16
  141. package/colors/utils/color-parser.d.ts +0 -69
  142. package/colors/utils/misc.d.ts +0 -19
  143. package/colors/utils/svg-calc.d.ts +0 -66
  144. package/input/Input.d.ts +0 -171
  145. package/input/InputClearValue.d.ts +0 -19
  146. package/input/InputPrefix.d.ts +0 -29
  147. package/input/InputSeparator.d.ts +0 -29
  148. package/input/InputSuffix.d.ts +0 -29
  149. package/input/InputValidationIcon.d.ts +0 -18
  150. package/input/interfaces/InputChangeEvent.d.ts +0 -15
  151. package/interfaces/Direction.d.ts +0 -5
  152. package/interfaces/ToggleBaseProps.d.ts +0 -12
  153. package/maskedtextbox/MaskedTextBox.d.ts +0 -238
  154. package/maskedtextbox/MaskedTextBoxProps.d.ts +0 -200
  155. package/maskedtextbox/masking.service.d.ts +0 -45
  156. package/maskedtextbox/parsing/combinators.d.ts +0 -13
  157. package/maskedtextbox/parsing/parsers.d.ts +0 -51
  158. package/maskedtextbox/parsing/result.d.ts +0 -27
  159. package/maskedtextbox/parsing/stream.d.ts +0 -26
  160. package/maskedtextbox/utils.d.ts +0 -20
  161. package/messages/index.d.ts +0 -169
  162. package/numerictextbox/NumericTextBox.d.ts +0 -18
  163. package/numerictextbox/interfaces/NumericTextBoxBlurEvent.d.ts +0 -11
  164. package/numerictextbox/interfaces/NumericTextBoxChangeEvent.d.ts +0 -15
  165. package/numerictextbox/interfaces/NumericTextBoxFocusEvent.d.ts +0 -11
  166. package/numerictextbox/interfaces/NumericTextBoxHandle.d.ts +0 -43
  167. package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +0 -188
  168. package/numerictextbox/interfaces/NumericTextBoxState.d.ts +0 -19
  169. package/numerictextbox/utils/index.d.ts +0 -123
  170. package/package-metadata.d.ts +0 -9
  171. package/radiobutton/RadioButton.d.ts +0 -27
  172. package/radiobutton/RadioGroup.d.ts +0 -27
  173. package/radiobutton/interfaces/RadioButtonBlurEvent.d.ts +0 -11
  174. package/radiobutton/interfaces/RadioButtonChangeEvent.d.ts +0 -15
  175. package/radiobutton/interfaces/RadioButtonFocusEvent.d.ts +0 -11
  176. package/radiobutton/interfaces/RadioButtonProps.d.ts +0 -101
  177. package/radiobutton/interfaces/RadioGroupChangeEvent.d.ts +0 -15
  178. package/radiobutton/interfaces/RadioGroupFocusEvent.d.ts +0 -11
  179. package/radiobutton/interfaces/RadioGroupProps.d.ts +0 -90
  180. package/range-slider/RangeSlider.d.ts +0 -142
  181. package/range-slider/range-raducer.d.ts +0 -40
  182. package/rating/Rating.d.ts +0 -170
  183. package/rating/RatingItem.d.ts +0 -108
  184. package/rating/models/index.d.ts +0 -88
  185. package/rating/rating-reducer.d.ts +0 -36
  186. package/rating/utils/index.d.ts +0 -28
  187. package/signature/Signature.d.ts +0 -18
  188. package/signature/interfaces/SignatureBlurEvent.d.ts +0 -11
  189. package/signature/interfaces/SignatureChangeEvent.d.ts +0 -15
  190. package/signature/interfaces/SignatureCloseEvent.d.ts +0 -11
  191. package/signature/interfaces/SignatureFocusEvent.d.ts +0 -11
  192. package/signature/interfaces/SignatureHandle.d.ts +0 -46
  193. package/signature/interfaces/SignatureOpenEvent.d.ts +0 -11
  194. package/signature/interfaces/SignatureProps.d.ts +0 -198
  195. package/signature/interfaces/index.d.ts +0 -11
  196. package/signature/utils/index.d.ts +0 -8
  197. package/slider/Slider.d.ts +0 -197
  198. package/slider/SliderLabel.d.ts +0 -38
  199. package/switch/Switch.d.ts +0 -294
  200. package/textarea/TextArea.d.ts +0 -40
  201. package/textarea/interfaces/TextAreaBlurEvent.d.ts +0 -11
  202. package/textarea/interfaces/TextAreaChangeEvent.d.ts +0 -15
  203. package/textarea/interfaces/TextAreaFocusEvent.d.ts +0 -11
  204. package/textarea/interfaces/TextAreaProps.d.ts +0 -140
  205. package/textbox/Textbox.d.ts +0 -80
@@ -0,0 +1,216 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as e from "react";
10
+ import l from "prop-types";
11
+ import { validatePackage as q, getTabIndex as D, classNames as K } from "@progress/kendo-react-common";
12
+ import { ButtonGroup as _, Button as u } from "@progress/kendo-react-buttons";
13
+ import { dropletSliderIcon as j, paletteIcon as J, dropletSlashIcon as O } from "@progress/kendo-svg-icons";
14
+ import { ColorPalette as Q } from "./ColorPalette.mjs";
15
+ import { ColorGradient as U } from "./ColorGradient.mjs";
16
+ import { packageMetadata as W } from "../package-metadata.mjs";
17
+ import { useLocalization as X } from "@progress/kendo-react-intl";
18
+ import { flatColorPickerColorGradientBtn as w, messages as v, flatColorPickerColorPaletteBtn as B, flatColorPickerClearBtn as N, flatColorPickerCancelBtn as Y, flatColorPickerApplyBtn as Z } from "../messages/index.mjs";
19
+ const I = "rgba(255, 255, 255, 1)", L = e.forwardRef((a, G) => {
20
+ q(W);
21
+ const s = e.useRef(null), i = e.useRef(null), S = e.useRef(null), { defaultValue: r = I, showButtons: C = !0, showPreview: x = !0, showClearButton: R = !0 } = a, [c, F] = e.useState((a.view || "ColorGradient") === "ColorGradient"), [o, m] = e.useState(a.value || r), [d, k] = e.useState(a.value || r), g = a.value !== void 0 ? a.value : d;
22
+ e.useEffect(() => {
23
+ m(a.value || r);
24
+ }, [a.value, r]);
25
+ const f = X(), b = e.useCallback(
26
+ () => {
27
+ s.current && s.current.focus();
28
+ },
29
+ [s]
30
+ );
31
+ e.useImperativeHandle(s, () => ({
32
+ element: i.current,
33
+ focus: b,
34
+ props: a,
35
+ value: g
36
+ }), [g, b, a]), e.useImperativeHandle(G, () => s.current);
37
+ const h = e.useCallback(
38
+ (t) => {
39
+ (t === "ColorGradient" && !c || t === "ColorPalette" && c) && F(!c);
40
+ },
41
+ [c]
42
+ ), V = e.useCallback(
43
+ (t) => {
44
+ if (m(r), a.onPreviewChange) {
45
+ const n = {
46
+ value: r,
47
+ nativeEvent: t.nativeEvent,
48
+ syntheticEvent: t
49
+ };
50
+ a.onPreviewChange.call(void 0, n);
51
+ }
52
+ },
53
+ [r, a.onPreviewChange]
54
+ ), E = e.useCallback(
55
+ (t) => {
56
+ if (m(t.value), a.onPreviewChange) {
57
+ const n = {
58
+ value: t.value,
59
+ nativeEvent: t.nativeEvent,
60
+ syntheticEvent: t.syntheticEvent
61
+ };
62
+ a.onPreviewChange.call(void 0, n);
63
+ }
64
+ },
65
+ [a.onPreviewChange]
66
+ ), T = e.useCallback(
67
+ (t) => {
68
+ if (k(o), a.onChange) {
69
+ const n = {
70
+ value: o,
71
+ nativeEvent: t.nativeEvent,
72
+ syntheticEvent: t
73
+ };
74
+ a.onChange.call(void 0, n);
75
+ }
76
+ },
77
+ [o, a.onChange]
78
+ ), M = e.useCallback(
79
+ () => {
80
+ k(I);
81
+ },
82
+ []
83
+ ), H = e.useCallback(
84
+ (t) => {
85
+ if (m(d), a.onPreviewChange) {
86
+ const n = {
87
+ value: d,
88
+ nativeEvent: t.nativeEvent,
89
+ syntheticEvent: t
90
+ };
91
+ a.onPreviewChange.call(void 0, n);
92
+ }
93
+ },
94
+ [d, a.onPreviewChange]
95
+ ), y = e.useCallback(
96
+ (t) => {
97
+ i.current && !(t.nativeEvent.target instanceof HTMLInputElement) && i.current.focus();
98
+ },
99
+ [i]
100
+ ), z = e.useCallback(
101
+ (t) => {
102
+ var P;
103
+ if ((!t.relatedTarget || !((P = i.current) != null && P.contains(t.relatedTarget))) && (C || k(o), !C && a.onChange)) {
104
+ const A = {
105
+ value: o,
106
+ nativeEvent: t.nativeEvent,
107
+ syntheticEvent: t
108
+ };
109
+ a.onChange.call(void 0, A);
110
+ }
111
+ },
112
+ [o, C, a.onChange]
113
+ );
114
+ return /* @__PURE__ */ e.createElement(
115
+ "div",
116
+ {
117
+ id: a.id,
118
+ role: "textbox",
119
+ "aria-label": a.ariaLabel,
120
+ "aria-labelledby": a.ariaLabelledBy,
121
+ "aria-disabled": a.disabled ? "true" : void 0,
122
+ style: a.style,
123
+ ref: i,
124
+ tabIndex: D(a.tabIndex, a.disabled),
125
+ className: K(
126
+ "k-flatcolorpicker k-coloreditor",
127
+ {
128
+ "k-disabled": a.disabled
129
+ },
130
+ a.className
131
+ ),
132
+ onBlur: z
133
+ },
134
+ /* @__PURE__ */ e.createElement(e.Fragment, null, a.header || /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-header k-hstack" }, /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, /* @__PURE__ */ e.createElement(_, { className: "k-button-group-flat" }, /* @__PURE__ */ e.createElement(
135
+ u,
136
+ {
137
+ type: "button",
138
+ "aria-label": f.toLanguageString(
139
+ w,
140
+ v[w]
141
+ ),
142
+ togglable: !0,
143
+ fillMode: "flat",
144
+ selected: c,
145
+ onClick: () => h("ColorGradient"),
146
+ icon: "droplet-slider",
147
+ svgIcon: j
148
+ }
149
+ ), /* @__PURE__ */ e.createElement(
150
+ u,
151
+ {
152
+ type: "button",
153
+ "aria-label": f.toLanguageString(
154
+ B,
155
+ v[B]
156
+ ),
157
+ togglable: !0,
158
+ fillMode: "flat",
159
+ selected: !c,
160
+ onClick: () => h("ColorPalette"),
161
+ icon: "palette",
162
+ svgIcon: J
163
+ }
164
+ ))), /* @__PURE__ */ e.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, R && /* @__PURE__ */ e.createElement(
165
+ u,
166
+ {
167
+ type: "button",
168
+ fillMode: "flat",
169
+ onClick: V,
170
+ "aria-label": f.toLanguageString(
171
+ N,
172
+ v[N]
173
+ ),
174
+ icon: "droplet-slash",
175
+ svgIcon: O
176
+ }
177
+ ), x && /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-preview k-vstack" }, /* @__PURE__ */ e.createElement("span", { className: "k-coloreditor-preview-color k-color-preview", style: { background: o } }), /* @__PURE__ */ e.createElement("span", { className: "k-coloreditor-current-color k-color-preview", style: { background: d }, onClick: H })))), /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-views k-vstack" }, c ? /* @__PURE__ */ e.createElement(
178
+ U,
179
+ {
180
+ ref: S,
181
+ role: "none",
182
+ tabIndex: -1,
183
+ ariaLabel: void 0,
184
+ value: o,
185
+ onChange: E,
186
+ onFocus: y,
187
+ opacity: a.opacity,
188
+ format: a.format
189
+ }
190
+ ) : /* @__PURE__ */ e.createElement(Q, { ariaDisabled: !0, ariaLabelledBy: "required_label", value: o, onChange: E, onFocus: y })), C && /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end" }, /* @__PURE__ */ e.createElement(u, { type: "button", className: "k-coloreditor-cancel", onClick: M }, v[Y]), /* @__PURE__ */ e.createElement(u, { type: "button", className: "k-coloreditor-apply k-primary", onClick: T }, v[Z])))
191
+ );
192
+ }), $ = {
193
+ id: l.string,
194
+ style: l.any,
195
+ className: l.string,
196
+ value: l.string,
197
+ defaultValue: l.string,
198
+ onPreviewChange: l.func,
199
+ onChange: l.func,
200
+ opacity: l.bool,
201
+ format: l.any,
202
+ tabIndex: l.number,
203
+ ariaLabel: l.string,
204
+ ariaLabelledBy: l.string,
205
+ disabled: l.bool,
206
+ view: l.any,
207
+ header: l.any,
208
+ showClearButton: l.bool,
209
+ showPreview: l.bool,
210
+ showButtons: l.bool
211
+ };
212
+ L.displayName = "KendoFlatColorPicker";
213
+ L.propTypes = $;
214
+ export {
215
+ L as FlatColorPicker
216
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";const u=require("react"),i=require("./utils/color-parser.js"),o=require("./utils/misc.js"),c=require("../input/Input.js");function h(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const a=h(u);class l extends a.Component{constructor(e){super(e),this.onChange=t=>{const s=t.target.value,n=i.parseColor(s,"rgba");this.setState({hex:s}),o.isPresent(n)&&this.props.onHexChange(s,n,t)},this.onBlur=()=>{o.isPresent(i.parseColor(this.state.hex,"rgba"))||this.setState({hex:this.state.originalHex})},this.state={hex:this.props.hex,originalHex:this.props.hex}}render(){return a.createElement(c.Input,{value:this.state.hex,onChange:this.onChange,onBlur:this.onBlur,disabled:this.props.disabled})}static getDerivedStateFromProps(e,t){return e.hex!==t.originalHex?{hex:e.hex,originalHex:e.hex}:null}}module.exports=l;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as i from "react";
10
+ import { parseColor as o } from "./utils/color-parser.mjs";
11
+ import { isPresent as a } from "./utils/misc.mjs";
12
+ import { Input as n } from "../input/Input.mjs";
13
+ class p extends i.Component {
14
+ constructor(e) {
15
+ super(e), this.onChange = (t) => {
16
+ const r = t.target.value, s = o(r, "rgba");
17
+ this.setState({ hex: r }), a(s) && this.props.onHexChange(r, s, t);
18
+ }, this.onBlur = () => {
19
+ a(o(this.state.hex, "rgba")) || this.setState({ hex: this.state.originalHex });
20
+ }, this.state = { hex: this.props.hex, originalHex: this.props.hex };
21
+ }
22
+ render() {
23
+ return /* @__PURE__ */ i.createElement(
24
+ n,
25
+ {
26
+ value: this.state.hex,
27
+ onChange: this.onChange,
28
+ onBlur: this.onBlur,
29
+ disabled: this.props.disabled
30
+ }
31
+ );
32
+ }
33
+ static getDerivedStateFromProps(e, t) {
34
+ return e.hex !== t.originalHex ? { hex: e.hex, originalHex: e.hex } : null;
35
+ }
36
+ }
37
+ export {
38
+ p as default
39
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),l=require("@progress/kendo-react-popup"),s=require("@progress/kendo-react-common");function u(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=u(i),m="bottom",d="top",r=e=>{const n=e.popupSettings||{},t=e.dir==="rtl"?"right":"left",c=o.useMemo(()=>({horizontal:t,vertical:m}),[t]),a=o.useMemo(()=>({horizontal:t,vertical:d}),[t]);return o.createElement(o.Fragment,null,e.input,e.button,o.createElement(l.Popup,{style:{...(n||{}).style,direction:e.dir},...n,anchor:e.popupAnchor,anchorAlign:c,popupAlign:a,show:e.open,onOpen:e.onOpen,onClose:e.onClose,className:s.classNames("k-reset",n.className)},e.content))};r.displayName="KendoPickerComponent";exports.Picker=r;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as e from "react";
10
+ import { Popup as l } from "@progress/kendo-react-popup";
11
+ import { classNames as a } from "@progress/kendo-react-common";
12
+ const r = "bottom", s = "top", m = (t) => {
13
+ const o = t.popupSettings || {}, n = t.dir === "rtl" ? "right" : "left", c = e.useMemo(
14
+ () => ({ horizontal: n, vertical: r }),
15
+ [n]
16
+ ), i = e.useMemo(
17
+ () => ({ horizontal: n, vertical: s }),
18
+ [n]
19
+ );
20
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, t.input, t.button, /* @__PURE__ */ e.createElement(
21
+ l,
22
+ {
23
+ style: {
24
+ ...(o || {}).style,
25
+ direction: t.dir
26
+ },
27
+ ...o,
28
+ anchor: t.popupAnchor,
29
+ anchorAlign: c,
30
+ popupAlign: i,
31
+ show: t.open,
32
+ onOpen: t.onOpen,
33
+ onClose: t.onClose,
34
+ className: a("k-reset", o.className)
35
+ },
36
+ t.content
37
+ ));
38
+ };
39
+ m.displayName = "KendoPickerComponent";
40
+ export {
41
+ m as Picker
42
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f={basic:{colors:["#000000","#7f7f7f","#880015","#ed1c24","#ff7f27","#fff200","#22b14c","#00a2e8","#3f48cc","#a349a4"," ffffff","#c3c3c3","#b97a57","#ffaec9","#ffc90e","#efe4b0","#b5e61d","#99d9ea","#7092be","#c8bfe7"],columns:10},office:{colors:["#ffffff","#000000","#e6e6e6","#435569","#4371c4","#ed7e32","#a5a4a5","#febf04","#5a9bd5","#71ae48","#f2f2f3","#7f7f7f","#d1cece","#d5dde3","#dae1f4","#fce5d4","#deeded","#fff2cc","#deeaf6","#e1efd9","#d7d8d8","#585959","#aeabab","#adbaca","#b4c5e7","#f6caac","#dbdbdb","#ffe498","#bcd6ee","#c5e0b2","#bfbfc0","#3f3f3f","#767070","#8595b1","#8fabdb","#f5b183","#c9c8c9","#fed965","#9bc4e5","#a8d08d","#a5a5a6","#262625","#393939","#334050","#2e5496","#c45a11","#7b7b7a","#bf9000","#2f75b5","#548235","#7f7f7f","#0b0c0c","#161616","#222a34","#203764","#843d0b","#525252","#7f6000","#1d4d79","#375623"],columns:10},apex:{colors:["#ffffff","#000000","#c9c2d1","#69676d","#ceb966","#9cb084","#6bb1c9","#6585cf","#7e6bc9","#a379bb","#f2f2f2","#7f7f7f","#f4f2f5","#e0e0e2","#f5f1e0","#ebefe6","#e1eff4","#e0e6f5","#e5e1f4","#ece4f1","#d8d8d8","#595959","#e9e6ec","#c2c1c5","#ebe3c1","#d7dfcd","#c3dfe9","#c1ceeb","#cbc3e9","#dac9e3","#bfbfbf","#3f3f3f","#dedae3","#a4a3a8","#e1d5a3","#c3cfb5","#a6d0de","#a2b5e2","#b1a6de","#c7aed6","#a5a5a5","#262626","#9688a5","#4e4d51","#ae9638","#758c5a","#3d8da9","#365bb0","#533da9","#7d4d99","#7f7f7f","#0c0c0c","#635672","#343336","#746425","#4e5d3c","#295e70","#243c75","#372970","#533366"],columns:10},austin:{colors:["#ffffff","#000000","#caf278","#3e3d2d","#94c600","#71685a","#ff6700","#909465","#956b43","#fea022","#f2f2f2","#7f7f7f","#f4fce4","#dddcd0","#efffc0","#e3e1dc","#ffe0cb","#e8e9df","#ece1d6","#feecd2","#d8d8d8","#595959","#e9f9c9","#bbb9a1","#dfff82","#c8c3ba","#ffc299","#d2d4c0","#dac3ad","#fed9a6","#bfbfbf","#3f3f3f","#dff7ae","#ada598","#cfff43","#ada598","#ffa365","#bcbfa1","#c8a585","#fec67a","#a5a5a5","#262626","#a9ea25","#2e2d21","#6f9400","#544e43","#bf4d00","#6c6f4b","#6f5032","#d77b00","#7f7f7f","#0c0c0c","#74a50f","#1f1e16","#4a6300","#38342d","#7f3300","#484a32","#4a3521","#8f5200"],columns:10},clarity:{colors:["#ffffff","#292934","#f3f2dc","#d2533c","#93a299","#ad8f67","#726056","#4c5a6a","#808da0","#79463d","#f2f2f2","#e7e7ec","#e7e5b9","#f6dcd8","#e9ecea","#eee8e0","#e4dedb","#d8dde3","#e5e8ec","#e9d6d3","#d8d8d8","#c4c4d1","#d5d185","#edbab1","#d3d9d6","#ded2c2","#c9beb8","#b2bcc8","#ccd1d9","#d3aea7","#bfbfbf","#8a8aa3","#aca73b","#e4978a","#bec7c1","#cdbba3","#af9e94","#8c9bac","#b2bac6","#bd857c","#a5a5a5","#56566e","#56531d","#a43925","#6b7c72","#866b48","#554840","#39434f","#5c697b","#5a342d","#7f7f7f","#3b3b4b","#22210b","#6d2619","#47534c","#594730","#39302b","#262d35","#3d4652","#3c231e"],columns:10},slipstream:{colors:["#ffffff","#000000","#b4dcfa","#212745","#4e67c8","#5eccf3","#a7ea52","#5dceaf","#ff8021","#f14124","#f2f2f2","#7f7f7f","#8bc9f7","#c7cce4","#dbe0f4","#def4fc","#edfadc","#def5ef","#ffe5d2","#fcd9d3","#d8d8d8","#595959","#4facf3","#909aca","#b8c2e9","#beeafa","#dbf6b9","#beebdf","#ffcca6","#f9b3a7","#bfbfbf","#3f3f3f","#0d78c9","#5967af","#94a3de","#9ee0f7","#caf297","#9de1cf","#ffb279","#f68d7b","#a5a5a5","#262626","#063c64","#181d33","#31479f","#11b2eb","#81d319","#34ac8b","#d85c00","#c3260c","#7f7f7f","#0c0c0c","#021828","#101322","#202f6a","#0b769c","#568c11","#22725c","#903d00","#821908"],columns:10},metro:{colors:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],columns:10},flow:{colors:["#ffffff","#000000","#dbf5f9","#04617b","#0f6fc6","#009dd9","#0bd0d9","#10cf9b","#7cca62","#a5c249","#f2f2f2","#7f7f7f","#b2e9f2","#b4ecfc","#c7e2fa","#c4eeff","#c9fafc","#c9faed","#e4f4df","#edf2da","#d8d8d8","#595959","#76d9e8","#6adafa","#90c6f6","#89deff","#93f5f9","#94f6db","#cae9c0","#dbe6b6","#bfbfbf","#3f3f3f","#21b2c8","#20c8f7","#59a9f2","#4fceff","#5df0f6","#5ff2ca","#b0dfa0","#c9da91","#a5a5a5","#262626","#105964","#02485c","#0b5394","#0075a2","#089ca2","#0b9b74","#54a838","#7e9532","#7f7f7f","#0c0c0c","#062328","#01303d","#073763","#004e6c","#05686c","#07674d","#387025","#546321"],columns:10},hardcover:{colors:["#ffffff","#000000","#ece9c6","#895d1d","#873624","#d6862d","#d0be40","#877f6c","#972109","#aeb795","#f2f2f2","#7f7f7f","#e1dca5","#f2e0c6","#f0d0c9","#f6e6d5","#f5f2d8","#e7e5e1","#fbc7bc","#eef0e9","#d8d8d8","#595959","#d0c974","#e6c28d","#e2a293","#eeceaa","#ece5b2","#cfccc3","#f78f7a","#dee2d4","#bfbfbf","#3f3f3f","#a29a36","#daa454","#d4735e","#e6b681","#e2d88c","#b7b2a5","#f35838","#ced3bf","#a5a5a5","#262626","#514d1b","#664515","#65281a","#a2641f","#a39428","#655f50","#711806","#879464","#7f7f7f","#0c0c0c","#201e0a","#442e0e","#431b11","#6c4315","#6d621a","#433f35","#4b1004","#5a6243"],columns:10},trek:{colors:["#ffffff","#000000","#fbeec9","#4e3b30","#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529","#f2f2f2","#7f7f7f","#f7e09e","#e1d6cf","#fcecd5","#eddfda","#f0e7e5","#f3eae1","#ece9e3","#f5e3d1","#d8d8d8","#595959","#f3cc5f","#c4ad9f","#f9d9ab","#dcc0b6","#e1d0cc","#e7d5c4","#d9d4c7","#ebc7a3","#bfbfbf","#3f3f3f","#d29f0f","#a78470","#f6c781","#cba092","#d2b9b2","#dbc1a7","#c6bfab","#e1ac76","#a5a5a5","#262626","#694f07","#3a2c24","#c87d0e","#7b4b3a","#926255","#a17242","#7b7153","#90571e","#7f7f7f","#0c0c0c","#2a1f03","#271d18","#855309","#523226","#614138","#6b4c2c","#524b37","#603a14"],columns:10},verve:{colors:["#ffffff","#000000","#d2d2d2","#666666","#ff388c","#e40059","#9c007f","#68007f","#005bd3","#00349e","#f2f2f2","#7f7f7f","#bdbdbd","#e0e0e0","#ffd7e8","#ffc6dc","#ffb8f1","#f1b2ff","#c3dcff","#b8cfff","#d8d8d8","#595959","#9d9d9d","#c1c1c1","#ffafd1","#ff8eba","#ff71e4","#e365ff","#87baff","#72a0ff","#bfbfbf","#3f3f3f","#696969","#a3a3a3","#ff87ba","#ff5597","#ff2ad7","#d519ff","#4b98ff","#2b71ff","#a5a5a5","#262626","#343434","#4c4c4c","#e90062","#ab0042","#75005f","#4e005f","#00449e","#002676","#7f7f7f","#0c0c0c","#151515","#333333","#9b0041","#72002c","#4e003f","#34003f","#002d69","#00194f"],columns:10},monochrome:{colors:["#000000","#1a1a1a","#333333","#4d4d4d","#666666","#808080","#999999","#b3b3b3","#cccccc","#e6e6e6","#f2f2f2","#ffffff"],columns:12}};exports.PALETTEPRESETS=f;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ const f = {
10
+ basic: {
11
+ colors: ["#000000", "#7f7f7f", "#880015", "#ed1c24", "#ff7f27", "#fff200", "#22b14c", "#00a2e8", "#3f48cc", "#a349a4", " ffffff", "#c3c3c3", "#b97a57", "#ffaec9", "#ffc90e", "#efe4b0", "#b5e61d", "#99d9ea", "#7092be", "#c8bfe7"],
12
+ columns: 10
13
+ },
14
+ office: {
15
+ colors: ["#ffffff", "#000000", "#e6e6e6", "#435569", "#4371c4", "#ed7e32", "#a5a4a5", "#febf04", "#5a9bd5", "#71ae48", "#f2f2f3", "#7f7f7f", "#d1cece", "#d5dde3", "#dae1f4", "#fce5d4", "#deeded", "#fff2cc", "#deeaf6", "#e1efd9", "#d7d8d8", "#585959", "#aeabab", "#adbaca", "#b4c5e7", "#f6caac", "#dbdbdb", "#ffe498", "#bcd6ee", "#c5e0b2", "#bfbfc0", "#3f3f3f", "#767070", "#8595b1", "#8fabdb", "#f5b183", "#c9c8c9", "#fed965", "#9bc4e5", "#a8d08d", "#a5a5a6", "#262625", "#393939", "#334050", "#2e5496", "#c45a11", "#7b7b7a", "#bf9000", "#2f75b5", "#548235", "#7f7f7f", "#0b0c0c", "#161616", "#222a34", "#203764", "#843d0b", "#525252", "#7f6000", "#1d4d79", "#375623"],
16
+ columns: 10
17
+ },
18
+ apex: {
19
+ colors: ["#ffffff", "#000000", "#c9c2d1", "#69676d", "#ceb966", "#9cb084", "#6bb1c9", "#6585cf", "#7e6bc9", "#a379bb", "#f2f2f2", "#7f7f7f", "#f4f2f5", "#e0e0e2", "#f5f1e0", "#ebefe6", "#e1eff4", "#e0e6f5", "#e5e1f4", "#ece4f1", "#d8d8d8", "#595959", "#e9e6ec", "#c2c1c5", "#ebe3c1", "#d7dfcd", "#c3dfe9", "#c1ceeb", "#cbc3e9", "#dac9e3", "#bfbfbf", "#3f3f3f", "#dedae3", "#a4a3a8", "#e1d5a3", "#c3cfb5", "#a6d0de", "#a2b5e2", "#b1a6de", "#c7aed6", "#a5a5a5", "#262626", "#9688a5", "#4e4d51", "#ae9638", "#758c5a", "#3d8da9", "#365bb0", "#533da9", "#7d4d99", "#7f7f7f", "#0c0c0c", "#635672", "#343336", "#746425", "#4e5d3c", "#295e70", "#243c75", "#372970", "#533366"],
20
+ columns: 10
21
+ },
22
+ austin: {
23
+ colors: ["#ffffff", "#000000", "#caf278", "#3e3d2d", "#94c600", "#71685a", "#ff6700", "#909465", "#956b43", "#fea022", "#f2f2f2", "#7f7f7f", "#f4fce4", "#dddcd0", "#efffc0", "#e3e1dc", "#ffe0cb", "#e8e9df", "#ece1d6", "#feecd2", "#d8d8d8", "#595959", "#e9f9c9", "#bbb9a1", "#dfff82", "#c8c3ba", "#ffc299", "#d2d4c0", "#dac3ad", "#fed9a6", "#bfbfbf", "#3f3f3f", "#dff7ae", "#ada598", "#cfff43", "#ada598", "#ffa365", "#bcbfa1", "#c8a585", "#fec67a", "#a5a5a5", "#262626", "#a9ea25", "#2e2d21", "#6f9400", "#544e43", "#bf4d00", "#6c6f4b", "#6f5032", "#d77b00", "#7f7f7f", "#0c0c0c", "#74a50f", "#1f1e16", "#4a6300", "#38342d", "#7f3300", "#484a32", "#4a3521", "#8f5200"],
24
+ columns: 10
25
+ },
26
+ clarity: {
27
+ colors: ["#ffffff", "#292934", "#f3f2dc", "#d2533c", "#93a299", "#ad8f67", "#726056", "#4c5a6a", "#808da0", "#79463d", "#f2f2f2", "#e7e7ec", "#e7e5b9", "#f6dcd8", "#e9ecea", "#eee8e0", "#e4dedb", "#d8dde3", "#e5e8ec", "#e9d6d3", "#d8d8d8", "#c4c4d1", "#d5d185", "#edbab1", "#d3d9d6", "#ded2c2", "#c9beb8", "#b2bcc8", "#ccd1d9", "#d3aea7", "#bfbfbf", "#8a8aa3", "#aca73b", "#e4978a", "#bec7c1", "#cdbba3", "#af9e94", "#8c9bac", "#b2bac6", "#bd857c", "#a5a5a5", "#56566e", "#56531d", "#a43925", "#6b7c72", "#866b48", "#554840", "#39434f", "#5c697b", "#5a342d", "#7f7f7f", "#3b3b4b", "#22210b", "#6d2619", "#47534c", "#594730", "#39302b", "#262d35", "#3d4652", "#3c231e"],
28
+ columns: 10
29
+ },
30
+ slipstream: {
31
+ colors: ["#ffffff", "#000000", "#b4dcfa", "#212745", "#4e67c8", "#5eccf3", "#a7ea52", "#5dceaf", "#ff8021", "#f14124", "#f2f2f2", "#7f7f7f", "#8bc9f7", "#c7cce4", "#dbe0f4", "#def4fc", "#edfadc", "#def5ef", "#ffe5d2", "#fcd9d3", "#d8d8d8", "#595959", "#4facf3", "#909aca", "#b8c2e9", "#beeafa", "#dbf6b9", "#beebdf", "#ffcca6", "#f9b3a7", "#bfbfbf", "#3f3f3f", "#0d78c9", "#5967af", "#94a3de", "#9ee0f7", "#caf297", "#9de1cf", "#ffb279", "#f68d7b", "#a5a5a5", "#262626", "#063c64", "#181d33", "#31479f", "#11b2eb", "#81d319", "#34ac8b", "#d85c00", "#c3260c", "#7f7f7f", "#0c0c0c", "#021828", "#101322", "#202f6a", "#0b769c", "#568c11", "#22725c", "#903d00", "#821908"],
32
+ columns: 10
33
+ },
34
+ metro: {
35
+ colors: ["#ffffff", "#000000", "#d6ecff", "#4e5b6f", "#7fd13b", "#ea157a", "#feb80a", "#00addc", "#738ac8", "#1ab39f", "#f2f2f2", "#7f7f7f", "#a7d6ff", "#d9dde4", "#e5f5d7", "#fad0e4", "#fef0cd", "#c5f2ff", "#e2e7f4", "#c9f7f1", "#d8d8d8", "#595959", "#60b5ff", "#b3bcca", "#cbecb0", "#f6a1c9", "#fee29c", "#8be6ff", "#c7d0e9", "#94efe3", "#bfbfbf", "#3f3f3f", "#007dea", "#8d9baf", "#b2e389", "#f272af", "#fed46b", "#51d9ff", "#aab8de", "#5fe7d5", "#a5a5a5", "#262626", "#003e75", "#3a4453", "#5ea226", "#af0f5b", "#c58c00", "#0081a5", "#425ea9", "#138677", "#7f7f7f", "#0c0c0c", "#00192e", "#272d37", "#3f6c19", "#750a3d", "#835d00", "#00566e", "#2c3f71", "#0c594f"],
36
+ columns: 10
37
+ },
38
+ flow: {
39
+ colors: ["#ffffff", "#000000", "#dbf5f9", "#04617b", "#0f6fc6", "#009dd9", "#0bd0d9", "#10cf9b", "#7cca62", "#a5c249", "#f2f2f2", "#7f7f7f", "#b2e9f2", "#b4ecfc", "#c7e2fa", "#c4eeff", "#c9fafc", "#c9faed", "#e4f4df", "#edf2da", "#d8d8d8", "#595959", "#76d9e8", "#6adafa", "#90c6f6", "#89deff", "#93f5f9", "#94f6db", "#cae9c0", "#dbe6b6", "#bfbfbf", "#3f3f3f", "#21b2c8", "#20c8f7", "#59a9f2", "#4fceff", "#5df0f6", "#5ff2ca", "#b0dfa0", "#c9da91", "#a5a5a5", "#262626", "#105964", "#02485c", "#0b5394", "#0075a2", "#089ca2", "#0b9b74", "#54a838", "#7e9532", "#7f7f7f", "#0c0c0c", "#062328", "#01303d", "#073763", "#004e6c", "#05686c", "#07674d", "#387025", "#546321"],
40
+ columns: 10
41
+ },
42
+ hardcover: {
43
+ colors: ["#ffffff", "#000000", "#ece9c6", "#895d1d", "#873624", "#d6862d", "#d0be40", "#877f6c", "#972109", "#aeb795", "#f2f2f2", "#7f7f7f", "#e1dca5", "#f2e0c6", "#f0d0c9", "#f6e6d5", "#f5f2d8", "#e7e5e1", "#fbc7bc", "#eef0e9", "#d8d8d8", "#595959", "#d0c974", "#e6c28d", "#e2a293", "#eeceaa", "#ece5b2", "#cfccc3", "#f78f7a", "#dee2d4", "#bfbfbf", "#3f3f3f", "#a29a36", "#daa454", "#d4735e", "#e6b681", "#e2d88c", "#b7b2a5", "#f35838", "#ced3bf", "#a5a5a5", "#262626", "#514d1b", "#664515", "#65281a", "#a2641f", "#a39428", "#655f50", "#711806", "#879464", "#7f7f7f", "#0c0c0c", "#201e0a", "#442e0e", "#431b11", "#6c4315", "#6d621a", "#433f35", "#4b1004", "#5a6243"],
44
+ columns: 10
45
+ },
46
+ trek: {
47
+ colors: ["#ffffff", "#000000", "#fbeec9", "#4e3b30", "#f0a22e", "#a5644e", "#b58b80", "#c3986d", "#a19574", "#c17529", "#f2f2f2", "#7f7f7f", "#f7e09e", "#e1d6cf", "#fcecd5", "#eddfda", "#f0e7e5", "#f3eae1", "#ece9e3", "#f5e3d1", "#d8d8d8", "#595959", "#f3cc5f", "#c4ad9f", "#f9d9ab", "#dcc0b6", "#e1d0cc", "#e7d5c4", "#d9d4c7", "#ebc7a3", "#bfbfbf", "#3f3f3f", "#d29f0f", "#a78470", "#f6c781", "#cba092", "#d2b9b2", "#dbc1a7", "#c6bfab", "#e1ac76", "#a5a5a5", "#262626", "#694f07", "#3a2c24", "#c87d0e", "#7b4b3a", "#926255", "#a17242", "#7b7153", "#90571e", "#7f7f7f", "#0c0c0c", "#2a1f03", "#271d18", "#855309", "#523226", "#614138", "#6b4c2c", "#524b37", "#603a14"],
48
+ columns: 10
49
+ },
50
+ verve: {
51
+ colors: ["#ffffff", "#000000", "#d2d2d2", "#666666", "#ff388c", "#e40059", "#9c007f", "#68007f", "#005bd3", "#00349e", "#f2f2f2", "#7f7f7f", "#bdbdbd", "#e0e0e0", "#ffd7e8", "#ffc6dc", "#ffb8f1", "#f1b2ff", "#c3dcff", "#b8cfff", "#d8d8d8", "#595959", "#9d9d9d", "#c1c1c1", "#ffafd1", "#ff8eba", "#ff71e4", "#e365ff", "#87baff", "#72a0ff", "#bfbfbf", "#3f3f3f", "#696969", "#a3a3a3", "#ff87ba", "#ff5597", "#ff2ad7", "#d519ff", "#4b98ff", "#2b71ff", "#a5a5a5", "#262626", "#343434", "#4c4c4c", "#e90062", "#ab0042", "#75005f", "#4e005f", "#00449e", "#002676", "#7f7f7f", "#0c0c0c", "#151515", "#333333", "#9b0041", "#72002c", "#4e003f", "#34003f", "#002d69", "#00194f"],
52
+ columns: 10
53
+ },
54
+ monochrome: {
55
+ colors: ["#000000", "#1a1a1a", "#333333", "#4d4d4d", "#666666", "#808080", "#999999", "#b3b3b3", "#cccccc", "#e6e6e6", "#f2f2f2", "#ffffff"],
56
+ columns: 12
57
+ }
58
+ };
59
+ export {
60
+ f as PALETTEPRESETS
61
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={};function o(c,a,e){t[c]={value:a,hsva:e}}function r(c,a,e){t[c]={value:a,rgba:e}}function n(c,a,e){t[c]={value:a,hex:e}}function h(c){delete t[c]}function d(c,a){if(c){const e=t[c];return e&&e.value===a?e.hex:void 0}else return}function i(c,a){if(c){const e=t[c];return e&&e.value===a?e.hsva:void 0}else return}function u(c,a){if(c){const e=t[c];return e&&e.value===a?e.rgba:void 0}else return}exports.cacheHex=n;exports.cacheHsva=o;exports.cacheRgba=r;exports.getCachedHex=d;exports.getCachedHsva=i;exports.getCachedRgba=u;exports.removeCachedColor=h;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ const a = {};
10
+ function t(c, o, e) {
11
+ a[c] = { value: o, hsva: e };
12
+ }
13
+ function n(c, o, e) {
14
+ a[c] = { value: o, rgba: e };
15
+ }
16
+ function r(c, o, e) {
17
+ a[c] = { value: o, hex: e };
18
+ }
19
+ function i(c) {
20
+ delete a[c];
21
+ }
22
+ function u(c, o) {
23
+ if (c) {
24
+ const e = a[c];
25
+ return e && e.value === o ? e.hex : void 0;
26
+ } else
27
+ return;
28
+ }
29
+ function h(c, o) {
30
+ if (c) {
31
+ const e = a[c];
32
+ return e && e.value === o ? e.hsva : void 0;
33
+ } else
34
+ return;
35
+ }
36
+ function v(c, o) {
37
+ if (c) {
38
+ const e = a[c];
39
+ return e && e.value === o ? e.rgba : void 0;
40
+ } else
41
+ return;
42
+ }
43
+ export {
44
+ r as cacheHex,
45
+ t as cacheHsva,
46
+ n as cacheRgba,
47
+ u as getCachedHex,
48
+ h as getCachedHsva,
49
+ v as getCachedRgba,
50
+ i as removeCachedColor
51
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./misc.js"),l=require("@progress/kendo-drawing");class c{constructor(){this.colorRows=[]}setColorMatrix(r,o){if(this.colorRows=[],!!(e.isPresent(r)&&r.length)){o=o||r.length;for(let s=0;s<r.length;s+=o){const t=r.slice(s,o+s);this.colorRows.push(t)}}}getCellCoordsFor(r){if(!e.isPresent(r))return;const o=r&&l.parseColor(r,!0),s=[r];e.isPresent(o)&&s.push(o.toCss(),o.toCssRgba());for(let t=0;t<this.colorRows.length;t++)for(let i=0;i<this.colorRows[t].length;i++)if(s.some(n=>n===this.colorRows[t][i]))return{row:t,col:i}}getColorAt(r){if(e.isPresent(r)&&e.isPresent(this.colorRows[r.row]))return this.colorRows[r.row][r.col]}getNextCell(r,o,s){if(!(e.isPresent(r)&&e.isPresent(r.row)&&e.isPresent(r.col)))return{row:0,col:0};const t=this.clampIndex(r.row+s,this.colorRows.length-1),i=this.clampIndex(r.col+o,this.colorRows[t].length-1);return{row:t,col:i}}clampIndex(r,o){return r<0?0:r>o?o:r}}exports.ColorPaletteService=c;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import { isPresent as e } from "./misc.mjs";
10
+ import { parseColor as n } from "@progress/kendo-drawing";
11
+ class f {
12
+ constructor() {
13
+ this.colorRows = [];
14
+ }
15
+ setColorMatrix(o, r) {
16
+ if (this.colorRows = [], !!(e(o) && o.length)) {
17
+ r = r || o.length;
18
+ for (let t = 0; t < o.length; t += r) {
19
+ const s = o.slice(t, r + t);
20
+ this.colorRows.push(s);
21
+ }
22
+ }
23
+ }
24
+ getCellCoordsFor(o) {
25
+ if (!e(o))
26
+ return;
27
+ const r = o && n(o, !0), t = [o];
28
+ e(r) && t.push(r.toCss(), r.toCssRgba());
29
+ for (let s = 0; s < this.colorRows.length; s++)
30
+ for (let i = 0; i < this.colorRows[s].length; i++)
31
+ if (t.some((l) => l === this.colorRows[s][i]))
32
+ return { row: s, col: i };
33
+ }
34
+ getColorAt(o) {
35
+ if (e(o) && e(this.colorRows[o.row]))
36
+ return this.colorRows[o.row][o.col];
37
+ }
38
+ getNextCell(o, r, t) {
39
+ if (!(e(o) && e(o.row) && e(o.col)))
40
+ return { row: 0, col: 0 };
41
+ const s = this.clampIndex(o.row + t, this.colorRows.length - 1), i = this.clampIndex(o.col + r, this.colorRows[s].length - 1);
42
+ return { row: s, col: i };
43
+ }
44
+ clampIndex(o, r) {
45
+ return o < 0 ? 0 : o > r ? r : o;
46
+ }
47
+ }
48
+ export {
49
+ f as ColorPaletteService
50
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@progress/kendo-drawing"),r=require("./misc.js"),m=(t,o,n=!0)=>{if(["hex","rgba"].indexOf(o)===-1)throw new Error(`Unsupported color output format '${o}'. The available options are 'hex' or 'rgba'.`);if(!r.isPresent(t))return;const s=a.parseColor(t.trim(),n);if(r.isPresent(s))return o==="hex"?s.toCss():s.toCssRgba()},p=(t,o=!0)=>{const n=a.parseColor(t,o);return r.isPresent(n)?n.toHSV():{}},C=(t,o=!0)=>{const n=a.parseColor(t,o);return r.isPresent(n)?n.toBytes():{}},B=t=>{const o=r.fitIntoBounds(t.h,0,359.9),n=r.fitIntoBounds(t.s,0,1),e=r.fitIntoBounds(t.v,0,1),s=r.fitIntoBounds(t.a,0,1);return a.Color.fromHSV(o,n,e,s).toCssRgba()},I=t=>B({h:t,s:1,v:1,a:1}),h=t=>{const o=r.fitIntoBounds(t.r,0,255),n=r.fitIntoBounds(t.g,0,255),e=r.fitIntoBounds(t.b,0,255),s=r.fitIntoBounds(t.a,0,1);return a.Color.fromBytes(o,n,e,s).toCssRgba()},i=(t,o)=>{const n=r.fitIntoBounds(t.r,0,255),e=r.fitIntoBounds(t.g,0,255),s=r.fitIntoBounds(t.b,0,255),u=r.fitIntoBounds(t.a,0,1),d=r.fitIntoBounds(o.r,0,255),l=r.fitIntoBounds(o.g,0,255),f=r.fitIntoBounds(o.b,0,255);return{r:Math.round((1-u)*d+u*n),g:Math.round((1-u)*l+u*e),b:Math.round((1-u)*f+u*s)}},c=t=>{let o=[t.r||0,t.g||0,t.b||0].map(function(n){return n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)});return o[0]*.2126+o[1]*.7152+o[2]*.0722},g=(t,o)=>{const n=Math.max(t,o),e=Math.min(t,o);return(n+.05)/(e+.05)},R=(t,o)=>g(c(i(t,o)),c(i(o,{r:0,g:0,b:0,a:1})));exports.getColorFromHSV=B;exports.getColorFromHue=I;exports.getColorFromRGBA=h;exports.getContrast=g;exports.getContrastFromTwoRGBAs=R;exports.getHSV=p;exports.getLuminance=c;exports.getRGBA=C;exports.getRGBFromRGBA=i;exports.parseColor=m;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import { parseColor as u, Color as m } from "@progress/kendo-drawing";
10
+ import { isPresent as c, fitIntoBounds as s } from "./misc.mjs";
11
+ const B = (t, r, o = !0) => {
12
+ if (["hex", "rgba"].indexOf(r) === -1)
13
+ throw new Error(`Unsupported color output format '${r}'. The available options are 'hex' or 'rgba'.`);
14
+ if (!c(t))
15
+ return;
16
+ const n = u(t.trim(), o);
17
+ if (c(n))
18
+ return r === "hex" ? n.toCss() : n.toCssRgba();
19
+ }, R = (t, r = !0) => {
20
+ const o = u(t, r);
21
+ return c(o) ? o.toHSV() : {};
22
+ }, F = (t, r = !0) => {
23
+ const o = u(t, r);
24
+ return c(o) ? o.toBytes() : {};
25
+ }, C = (t) => {
26
+ const r = s(t.h, 0, 359.9), o = s(t.s, 0, 1), e = s(t.v, 0, 1), n = s(t.a, 0, 1);
27
+ return m.fromHSV(r, o, e, n).toCssRgba();
28
+ }, w = (t) => C({ h: t, s: 1, v: 1, a: 1 }), x = (t) => {
29
+ const r = s(t.r, 0, 255), o = s(t.g, 0, 255), e = s(t.b, 0, 255), n = s(t.a, 0, 1);
30
+ return m.fromBytes(r, o, e, n).toCssRgba();
31
+ }, i = (t, r) => {
32
+ const o = s(t.r, 0, 255), e = s(t.g, 0, 255), n = s(t.b, 0, 255), a = s(t.a, 0, 1), g = s(r.r, 0, 255), h = s(r.g, 0, 255), l = s(r.b, 0, 255);
33
+ return {
34
+ r: Math.round((1 - a) * g + a * o),
35
+ g: Math.round((1 - a) * h + a * e),
36
+ b: Math.round((1 - a) * l + a * n)
37
+ };
38
+ }, p = (t) => {
39
+ let r = [t.r || 0, t.g || 0, t.b || 0].map(function(o) {
40
+ return o /= 255, o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4);
41
+ });
42
+ return r[0] * 0.2126 + r[1] * 0.7152 + r[2] * 0.0722;
43
+ }, b = (t, r) => {
44
+ const o = Math.max(t, r), e = Math.min(t, r);
45
+ return (o + 0.05) / (e + 0.05);
46
+ }, M = (t, r) => b(
47
+ p(i(t, r)),
48
+ p(i(r, { r: 0, g: 0, b: 0, a: 1 }))
49
+ );
50
+ export {
51
+ C as getColorFromHSV,
52
+ w as getColorFromHue,
53
+ x as getColorFromRGBA,
54
+ b as getContrast,
55
+ M as getContrastFromTwoRGBAs,
56
+ R as getHSV,
57
+ p as getLuminance,
58
+ F as getRGBA,
59
+ i as getRGBFromRGBA,
60
+ B as parseColor
61
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=t=>t!=null,o=(t,s,i)=>!u(t)||isNaN(t)||t<=s?s:t>=i?i:t;exports.fitIntoBounds=o;exports.isPresent=u;