@berenjena/react-dev-panel 1.0.4 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/README.md +75 -52
  2. package/dist/assets/index.css +1 -1
  3. package/dist/assets/index10.css +1 -0
  4. package/dist/assets/index11.css +1 -0
  5. package/dist/assets/index12.css +1 -0
  6. package/dist/assets/index13.css +1 -0
  7. package/dist/assets/index2.css +1 -1
  8. package/dist/assets/index3.css +1 -0
  9. package/dist/assets/index4.css +1 -0
  10. package/dist/assets/index5.css +1 -0
  11. package/dist/assets/index6.css +1 -0
  12. package/dist/assets/index7.css +1 -0
  13. package/dist/assets/index8.css +1 -0
  14. package/dist/assets/index9.css +1 -0
  15. package/dist/components/ControlRenderer/controls/BooleanControl/index.d.ts +32 -1
  16. package/dist/components/ControlRenderer/controls/BooleanControl/index.js +24 -2
  17. package/dist/components/ControlRenderer/controls/ButtonControl/index.d.ts +33 -1
  18. package/dist/components/ControlRenderer/controls/ButtonControl/index.js +8 -2
  19. package/dist/components/ControlRenderer/controls/ButtonGroupControl/index.d.ts +37 -1
  20. package/dist/components/ControlRenderer/controls/ButtonGroupControl/index.js +20 -2
  21. package/dist/components/ControlRenderer/controls/ColorControl/index.d.ts +23 -1
  22. package/dist/components/ControlRenderer/controls/ColorControl/index.js +67 -2
  23. package/dist/components/ControlRenderer/controls/ColorControl/types.d.ts +14 -0
  24. package/dist/components/ControlRenderer/controls/DateControl/index.d.ts +41 -1
  25. package/dist/components/ControlRenderer/controls/DateControl/index.js +29 -2
  26. package/dist/components/ControlRenderer/controls/MultiSelectControl/index.d.ts +28 -0
  27. package/dist/components/ControlRenderer/controls/MultiSelectControl/index.js +18 -0
  28. package/dist/components/ControlRenderer/controls/MultiSelectControl/types.d.ts +11 -0
  29. package/dist/components/ControlRenderer/controls/NumberControl/index.d.ts +45 -1
  30. package/dist/components/ControlRenderer/controls/NumberControl/index.js +30 -2
  31. package/dist/components/ControlRenderer/controls/RangeControl/index.d.ts +46 -1
  32. package/dist/components/ControlRenderer/controls/RangeControl/index.js +38 -2
  33. package/dist/components/ControlRenderer/controls/SelectControl/index.d.ts +39 -1
  34. package/dist/components/ControlRenderer/controls/SelectControl/index.js +6 -2
  35. package/dist/components/ControlRenderer/controls/SeparatorControl/index.d.ts +39 -1
  36. package/dist/components/ControlRenderer/controls/SeparatorControl/index.js +12 -2
  37. package/dist/components/ControlRenderer/controls/TextControl/index.d.ts +40 -1
  38. package/dist/components/ControlRenderer/controls/TextControl/index.js +28 -2
  39. package/dist/components/ControlRenderer/controls/index.d.ts +2 -0
  40. package/dist/components/ControlRenderer/controls/index.js +1 -0
  41. package/dist/components/ControlRenderer/controls/types.d.ts +2 -0
  42. package/dist/components/ControlRenderer/index.d.ts +6 -1
  43. package/dist/components/ControlRenderer/index.js +50 -2
  44. package/dist/components/DevPanel/index.d.ts +11 -1
  45. package/dist/components/DevPanel/index.js +69 -2
  46. package/dist/components/DevPanel/types.d.ts +36 -5
  47. package/dist/components/DevPanelPortal/index.d.ts +9 -0
  48. package/dist/components/DevPanelPortal/index.js +17 -0
  49. package/dist/components/EmptyContent/index.d.ts +1 -1
  50. package/dist/components/EmptyContent/index.js +17 -2
  51. package/dist/components/Icon/index.d.ts +16 -0
  52. package/dist/components/Icon/index.js +31 -0
  53. package/dist/components/Input/index.d.ts +1 -1
  54. package/dist/components/Input/index.js +8 -2
  55. package/dist/components/Section/index.d.ts +7 -1
  56. package/dist/components/Section/index.js +23 -2
  57. package/dist/components/Select/index.d.ts +15 -1
  58. package/dist/components/Select/index.js +176 -2
  59. package/dist/components/index.d.ts +3 -2
  60. package/dist/components/index.js +8 -6
  61. package/dist/hooks/useDebounceCallback/index.d.ts +8 -1
  62. package/dist/hooks/useDebounceCallback/index.js +15 -2
  63. package/dist/hooks/useDevPanel/index.d.ts +29 -1
  64. package/dist/hooks/useDevPanel/index.js +22 -2
  65. package/dist/hooks/useDragAndDrop/index.d.ts +20 -1
  66. package/dist/hooks/useDragAndDrop/index.js +53 -2
  67. package/dist/hooks/{useHotkeys/useHotkey.d.ts → useHotKey/index.d.ts} +1 -1
  68. package/dist/hooks/{useHotkeys/useHotkey.js → useHotKey/index.js} +1 -1
  69. package/dist/hooks/useHotkeys/index.d.ts +37 -2
  70. package/dist/hooks/useHotkeys/index.js +29 -4
  71. package/dist/index.d.ts +0 -1
  72. package/dist/index.js +2 -8
  73. package/dist/managers/DevPanelManager.d.ts +85 -0
  74. package/dist/managers/DevPanelManager.js +119 -0
  75. package/dist/store/SectionsStore.js +112 -5
  76. package/dist/store/UIStore.d.ts +78 -2
  77. package/dist/store/UIStore.js +176 -9
  78. package/dist/utils/getPositionAdjustment/getPositionAdjustment.d.ts +3 -2
  79. package/dist/utils/getPositionAdjustment/getPositionAdjustment.js +1 -4
  80. package/package.json +53 -30
  81. package/dist/UIStore-CQdr4U-2.js +0 -227
  82. package/dist/assets/BooleanControl.css +0 -1
  83. package/dist/assets/ButtonControl.css +0 -1
  84. package/dist/assets/ButtonGroupControl.css +0 -1
  85. package/dist/assets/ColorControl.css +0 -1
  86. package/dist/assets/ControlRenderer.css +0 -1
  87. package/dist/assets/DevPanel.css +0 -1
  88. package/dist/assets/EmptyContent.css +0 -1
  89. package/dist/assets/Input.css +0 -1
  90. package/dist/assets/RangeControl.css +0 -1
  91. package/dist/assets/Section.css +0 -1
  92. package/dist/assets/Select.css +0 -1
  93. package/dist/assets/SeparatorControl.css +0 -1
  94. package/dist/components/ControlRenderer/ControlRenderer.d.ts +0 -6
  95. package/dist/components/ControlRenderer/ControlRenderer.js +0 -32
  96. package/dist/components/ControlRenderer/controls/BooleanControl/BooleanControl.d.ts +0 -16
  97. package/dist/components/ControlRenderer/controls/BooleanControl/BooleanControl.js +0 -24
  98. package/dist/components/ControlRenderer/controls/ButtonControl/ButtonControl.d.ts +0 -16
  99. package/dist/components/ControlRenderer/controls/ButtonControl/ButtonControl.js +0 -10
  100. package/dist/components/ControlRenderer/controls/ButtonGroupControl/ButtonGroupControl.d.ts +0 -2
  101. package/dist/components/ControlRenderer/controls/ButtonGroupControl/ButtonGroupControl.js +0 -22
  102. package/dist/components/ControlRenderer/controls/ColorControl/ColorControl.d.ts +0 -16
  103. package/dist/components/ControlRenderer/controls/ColorControl/ColorControl.js +0 -27
  104. package/dist/components/ControlRenderer/controls/DateControl/DateControl.d.ts +0 -29
  105. package/dist/components/ControlRenderer/controls/DateControl/DateControl.js +0 -31
  106. package/dist/components/ControlRenderer/controls/NumberControl/NumberControl.d.ts +0 -30
  107. package/dist/components/ControlRenderer/controls/NumberControl/NumberControl.js +0 -32
  108. package/dist/components/ControlRenderer/controls/RangeControl/RangeControl.d.ts +0 -30
  109. package/dist/components/ControlRenderer/controls/RangeControl/RangeControl.js +0 -40
  110. package/dist/components/ControlRenderer/controls/SelectControl/SelectControl.d.ts +0 -15
  111. package/dist/components/ControlRenderer/controls/SelectControl/SelectControl.js +0 -11
  112. package/dist/components/ControlRenderer/controls/SeparatorControl/SeparatorControl.d.ts +0 -30
  113. package/dist/components/ControlRenderer/controls/SeparatorControl/SeparatorControl.js +0 -14
  114. package/dist/components/ControlRenderer/controls/TextControl/TextControl.d.ts +0 -29
  115. package/dist/components/ControlRenderer/controls/TextControl/TextControl.js +0 -30
  116. package/dist/components/DevPanel/DevPanel.d.ts +0 -11
  117. package/dist/components/DevPanel/DevPanel.js +0 -67
  118. package/dist/components/EmptyContent/EmptyContent.d.ts +0 -1
  119. package/dist/components/EmptyContent/EmptyContent.js +0 -18
  120. package/dist/components/Input/Input.d.ts +0 -1
  121. package/dist/components/Input/Input.js +0 -10
  122. package/dist/components/Logger/index.d.ts +0 -20
  123. package/dist/components/Logger/index.js +0 -85
  124. package/dist/components/Section/Section.d.ts +0 -7
  125. package/dist/components/Section/Section.js +0 -24
  126. package/dist/components/Select/Select.d.ts +0 -1
  127. package/dist/components/Select/Select.js +0 -10
  128. package/dist/hooks/useDebounceCallback/useDebounceCallback.d.ts +0 -8
  129. package/dist/hooks/useDebounceCallback/useDebounceCallback.js +0 -17
  130. package/dist/hooks/useDevPanel/useDevPanel.d.ts +0 -24
  131. package/dist/hooks/useDevPanel/useDevPanel.js +0 -15
  132. package/dist/hooks/useDragAndDrop/useDragAndDrop.d.ts +0 -16
  133. package/dist/hooks/useDragAndDrop/useDragAndDrop.js +0 -55
  134. package/dist/hooks/useHotkeys/useHotkeys.d.ts +0 -37
  135. package/dist/hooks/useHotkeys/useHotkeys.js +0 -31
  136. package/dist/store/index.d.ts +0 -3
  137. package/dist/store/index.js +0 -13
  138. package/dist/utils/index.d.ts +0 -9
  139. package/dist/utils/index.js +0 -20
@@ -1 +1,37 @@
1
- export * from './ButtonGroupControl';
1
+ import { ButtonGroupControlProps } from './types';
2
+ /**
3
+ * Component that renders a group of related buttons in a horizontal layout
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The button group control configuration object
7
+ * @param props.control.type - The control type, must be 'buttonGroup'
8
+ * @param props.control.buttons - Array of button configurations to render
9
+ * @param props.control.buttons[].label - The text label displayed on the button
10
+ * @param props.control.buttons[].onClick - Callback function triggered when button is clicked
11
+ * @param props.control.buttons[].disabled - Optional flag to disable individual buttons
12
+ * @returns JSX element representing a group of buttons
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * <ButtonGroupControl control={{
17
+ * type: 'buttonGroup',
18
+ * buttons: [
19
+ * { label: 'Save', onClick: () => save() },
20
+ * { label: 'Cancel', onClick: () => cancel() },
21
+ * { label: 'Delete', onClick: () => delete(), disabled: true }
22
+ * ]
23
+ * }} />
24
+ * ```
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * <ButtonGroupControl control={{
29
+ * type: 'buttonGroup',
30
+ * buttons: [
31
+ * { label: 'Previous', onClick: () => goToPrevious() },
32
+ * { label: 'Next', onClick: () => goToNext() }
33
+ * ]
34
+ * }} />
35
+ * ```
36
+ */
37
+ export declare function ButtonGroupControl({ control }: ButtonGroupControlProps): React.ReactNode;
@@ -1,4 +1,22 @@
1
- import { ButtonGroupControl as t } from "./ButtonGroupControl.js";
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { ButtonControl as e } from "../ButtonControl/index.js";
3
+ import '../../../../assets/index11.css';const i = "_buttonGroupContainer_1irhu_217", l = {
4
+ buttonGroupContainer: i
5
+ };
6
+ function p({ control: n }) {
7
+ return /* @__PURE__ */ t("div", { className: l.buttonGroupContainer, children: n.buttons.map((o, r) => /* @__PURE__ */ t(
8
+ e,
9
+ {
10
+ control: {
11
+ type: "button",
12
+ label: o.label,
13
+ onClick: o.onClick,
14
+ disabled: o.disabled
15
+ }
16
+ },
17
+ r
18
+ )) });
19
+ }
2
20
  export {
3
- t as ButtonGroupControl
21
+ p as ButtonGroupControl
4
22
  };
@@ -1 +1,23 @@
1
- export * from './ColorControl';
1
+ import { ColorControlProps } from './types';
2
+ /**
3
+ * Component that renders a color control with both visual color picker and text input
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The color control configuration object
7
+ * @param props.control.type - The control type, must be 'color'
8
+ * @param props.control.value - The current color value (hex, rgb, hsl, or named color)
9
+ * @param props.control.onChange - Callback function triggered when color value changes
10
+ * @param props.control.disabled - Optional flag to disable the control
11
+ * @returns JSX element representing the color control with picker and text input
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * <ColorControl control={{
16
+ * type: 'color',
17
+ * value: '#ff0000',
18
+ * onChange: (value) => setColor(value),
19
+ * disabled: false
20
+ * }}/>
21
+ * ```
22
+ */
23
+ export declare function ColorControl({ control }: ColorControlProps): React.ReactNode;
@@ -1,4 +1,69 @@
1
- import { ColorControl as l } from "./ColorControl.js";
1
+ import { jsxs as m, jsx as l } from "react/jsx-runtime";
2
+ import { useState as v, useEffect as C } from "react";
3
+ import { Input as p } from "../../../Input/index.js";
4
+ import { useDebouncedCallback as b } from "../../../../hooks/useDebounceCallback/index.js";
5
+ import '../../../../assets/index10.css';const y = "_container_1oo6z_1", x = "_colorPreview_1oo6z_7", V = "_errorMessage_1oo6z_52", c = {
6
+ container: y,
7
+ colorPreview: x,
8
+ errorMessage: V
9
+ };
10
+ function P({ control: n }) {
11
+ const [r, o] = v(n.value), [s, i] = v(!0), u = b(n.onChange, 300);
12
+ function d(e) {
13
+ if (!e) return !1;
14
+ const t = document.createElement("div");
15
+ return t.style.color = e, t.style.color !== "";
16
+ }
17
+ function f(e) {
18
+ if (!e) return "#000000";
19
+ if (e.startsWith("#") && (e.length === 4 || e.length === 7))
20
+ return e.length === 4 ? `#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}` : e;
21
+ try {
22
+ const a = document.createElement("canvas").getContext("2d");
23
+ return a ? (a.fillStyle = e, a.fillStyle) : "#000000";
24
+ } catch {
25
+ return "#000000";
26
+ }
27
+ }
28
+ function g(e) {
29
+ const t = e.target.value;
30
+ o(t), i(!0), u(t);
31
+ }
32
+ function h(e) {
33
+ const t = e.target.value;
34
+ o(t);
35
+ const a = d(t);
36
+ i(a), (a || t === "") && u(t);
37
+ }
38
+ return C(() => {
39
+ o(n.value), i(d(n.value));
40
+ }, [n.value]), /* @__PURE__ */ m("div", { className: c.container, children: [
41
+ /* @__PURE__ */ l("div", { className: c.colorPreview, style: { backgroundColor: s ? r : "transparent" }, children: /* @__PURE__ */ l(
42
+ "input",
43
+ {
44
+ type: "color",
45
+ value: f(r),
46
+ disabled: n.disabled,
47
+ onChange: g,
48
+ title: "Open color picker"
49
+ }
50
+ ) }),
51
+ /* @__PURE__ */ l(
52
+ p,
53
+ {
54
+ type: "text",
55
+ value: r || "",
56
+ disabled: n.disabled,
57
+ onChange: h,
58
+ placeholder: "Enter color value (hex, rgb, hsl, named)",
59
+ style: {
60
+ borderColor: !s && r ? "var(--dev-panel-danger-color)" : void 0
61
+ }
62
+ }
63
+ ),
64
+ !s && r && /* @__PURE__ */ l("div", { className: c.errorMessage, children: "Invalid color format" })
65
+ ] });
66
+ }
2
67
  export {
3
- l as ColorControl
68
+ P as ColorControl
4
69
  };
@@ -3,6 +3,20 @@ export interface ColorControl extends BaseControl {
3
3
  type: "color";
4
4
  value: string;
5
5
  onChange: (value: string) => void;
6
+ /**
7
+ * Format to display/parse colors
8
+ * @default "any" - Accepts any valid CSS color format
9
+ */
10
+ format?: "hex" | "rgb" | "hsl" | "any";
11
+ /**
12
+ * Predefined color palette for quick selection
13
+ */
14
+ presets?: string[];
15
+ /**
16
+ * Allow transparency/alpha values
17
+ * @default false
18
+ */
19
+ allowAlpha?: boolean;
6
20
  }
7
21
 
8
22
  export interface ColorControlProps {
@@ -1 +1,41 @@
1
- export * from './DateControl';
1
+ import { DateControlProps } from './types';
2
+ /**
3
+ * Component that renders a date control with configurable event handling
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The date control configuration object
7
+ * @param props.control.type - The control type, must be 'date'
8
+ * @param props.control.value - The current date value in ISO format (YYYY-MM-DD)
9
+ * @param props.control.min - Optional minimum allowed date in ISO format
10
+ * @param props.control.max - Optional maximum allowed date in ISO format
11
+ * @param props.control.event - When to trigger onChange: "onChange" (real-time) or "onBlur" (on focus loss). Defaults to "onBlur"
12
+ * @param props.control.onChange - Callback function triggered when date value changes
13
+ * @param props.control.disabled - Optional flag to disable the control
14
+ * @returns JSX element representing the date input control
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * // Real-time updates
19
+ * <DateControl control={{
20
+ * type: 'date',
21
+ * value: '2025-07-26',
22
+ * min: '2025-01-01',
23
+ * max: '2025-12-31',
24
+ * event: 'onChange',
25
+ * onChange: (value) => setSelectedDate(value),
26
+ * disabled: false
27
+ * }} />
28
+ * ```
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * // Updates only when losing focus (default)
33
+ * <DateControl control={{
34
+ * type: 'date',
35
+ * value: '2025-07-26',
36
+ * event: 'onBlur',
37
+ * onChange: (value) => console.log('Date changed:', value)
38
+ * }} />
39
+ * ```
40
+ */
41
+ export declare function DateControl({ control }: DateControlProps): React.ReactNode;
@@ -1,4 +1,31 @@
1
- import { DateControl as t } from "./DateControl.js";
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { useState as o, useEffect as s } from "react";
3
+ import { Input as r } from "../../../Input/index.js";
4
+ function h({ control: e }) {
5
+ const n = e.event || "onBlur", [l, t] = o(e.value);
6
+ function i(u) {
7
+ const a = u.target.value;
8
+ t(a), n === "onChange" && e.onChange(a);
9
+ }
10
+ function f(u) {
11
+ const a = u.target.value;
12
+ n === "onBlur" && e.onChange(a);
13
+ }
14
+ return s(() => {
15
+ t(e.value);
16
+ }, [e.value]), /* @__PURE__ */ m(
17
+ r,
18
+ {
19
+ type: "date",
20
+ value: l,
21
+ min: e.min,
22
+ max: e.max,
23
+ disabled: e.disabled,
24
+ onChange: i,
25
+ ...n === "onBlur" && { onBlur: f }
26
+ }
27
+ );
28
+ }
2
29
  export {
3
- t as DateControl
30
+ h as DateControl
4
31
  };
@@ -0,0 +1,28 @@
1
+ import { MultiSelectControlProps } from './types';
2
+ /**
3
+ * Component that renders a multi-select control with checkbox options
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The multi-select control configuration object
7
+ * @param props.control.type - The control type, must be 'multiselect'
8
+ * @param props.control.value - Array of currently selected option values
9
+ * @param props.control.options - Array of available options (strings or objects with label/value)
10
+ * @param props.control.onChange - Callback function triggered when selection changes
11
+ * @param props.control.disabled - Optional flag to disable the control
12
+ * @returns JSX element representing the multi-select control
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * <MultiSelectControl control={{
17
+ * type: 'multiselect',
18
+ * value: ['red', 'blue'],
19
+ * options: [
20
+ * { label: 'Red Color', value: 'red' },
21
+ * { label: 'Blue Color', value: 'blue' },
22
+ * { label: 'Green Color', value: 'green' }
23
+ * ],
24
+ * onChange: (values) => setSelectedColors(values)
25
+ * }} />
26
+ * ```
27
+ */
28
+ export declare function MultiSelectControl({ control }: MultiSelectControlProps): React.ReactNode;
@@ -0,0 +1,18 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Select as i } from "../../../Select/index.js";
3
+ function p({ control: e }) {
4
+ return /* @__PURE__ */ o(
5
+ i,
6
+ {
7
+ multiple: !0,
8
+ value: e.value,
9
+ options: e.options,
10
+ disabled: e.disabled,
11
+ placeholder: "Select options...",
12
+ onChange: (t) => e.onChange(t)
13
+ }
14
+ );
15
+ }
16
+ export {
17
+ p as MultiSelectControl
18
+ };
@@ -0,0 +1,11 @@
1
+ import { BaseControl } from '../types';
2
+ export interface MultiSelectControl extends BaseControl {
3
+ type: "multiselect";
4
+ value: string[];
5
+ options: string[] | { label: string; value: string }[];
6
+ onChange: (value: string[]) => void;
7
+ }
8
+
9
+ export interface MultiSelectControlProps {
10
+ control: MultiSelectControl;
11
+ }
@@ -1 +1,45 @@
1
- export * from './NumberControl';
1
+ import { NumberControlProps } from './types';
2
+ /**
3
+ * Component that renders a number control with configurable event handling
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The number control configuration object
7
+ * @param props.control.type - The control type, must be 'number'
8
+ * @param props.control.value - The current numeric value
9
+ * @param props.control.min - Optional minimum allowed value
10
+ * @param props.control.max - Optional maximum allowed value
11
+ * @param props.control.step - Optional step increment for the number input (defaults to 1)
12
+ * @param props.control.event - When to trigger onChange: "onChange" (real-time) or "onBlur" (on focus loss). Defaults to "onChange"
13
+ * @param props.control.onChange - Callback function triggered when numeric value changes
14
+ * @param props.control.disabled - Optional flag to disable the control
15
+ * @returns JSX element representing the number input control
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * // Real-time updates with constraints
20
+ * <NumberControl control={{
21
+ * type: 'number',
22
+ * value: 50,
23
+ * min: 0,
24
+ * max: 100,
25
+ * step: 5,
26
+ * event: 'onChange',
27
+ * onChange: (value) => setProgress(value),
28
+ * disabled: false
29
+ * }} />
30
+ * ```
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * // Updates only when losing focus
35
+ * <NumberControl control={{
36
+ * type: 'number',
37
+ * value: 42,
38
+ * min: 1,
39
+ * step: 0.1,
40
+ * event: 'onBlur',
41
+ * onChange: (value) => console.log('Value changed:', value)
42
+ * }} />
43
+ * ```
44
+ */
45
+ export declare function NumberControl({ control }: NumberControlProps): React.ReactNode;
@@ -1,4 +1,32 @@
1
- import { NumberControl as e } from "./NumberControl.js";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { useState as r, useEffect as f } from "react";
3
+ import { Input as p } from "../../../Input/index.js";
4
+ function v({ control: e }) {
5
+ const n = e.event || "onChange", [m, t] = r(e.value);
6
+ function l(u) {
7
+ const a = Number(u.target.value);
8
+ t(a), n === "onChange" && e.onChange(a);
9
+ }
10
+ function i(u) {
11
+ const a = Number(u.target.value);
12
+ n === "onBlur" && e.onChange(a);
13
+ }
14
+ return f(() => {
15
+ t(e.value);
16
+ }, [e.value]), /* @__PURE__ */ s(
17
+ p,
18
+ {
19
+ type: "number",
20
+ value: m,
21
+ min: e.min,
22
+ max: e.max,
23
+ step: e.step,
24
+ disabled: e.disabled,
25
+ onChange: l,
26
+ ...n === "onBlur" && { onBlur: i }
27
+ }
28
+ );
29
+ }
2
30
  export {
3
- e as NumberControl
31
+ v as NumberControl
4
32
  };
@@ -1 +1,46 @@
1
- export * from './RangeControl';
1
+ import { RangeControlProps } from './types';
2
+ /**
3
+ * Component that renders a range/slider control with configurable event handling and visual value display
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The range control configuration object
7
+ * @param props.control.type - The control type, must be 'range'
8
+ * @param props.control.value - The current numeric value of the slider
9
+ * @param props.control.min - Optional minimum allowed value (defaults to 0)
10
+ * @param props.control.max - Optional maximum allowed value (defaults to 100)
11
+ * @param props.control.step - Optional step increment for the slider (defaults to 1)
12
+ * @param props.control.event - When to trigger onChange: "onChange" (real-time) or "onBlur" (on focus loss). Defaults to "onChange"
13
+ * @param props.control.onChange - Callback function triggered when slider value changes
14
+ * @param props.control.disabled - Optional flag to disable the control
15
+ * @returns JSX element representing the range slider control with value display
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * // Real-time updates with custom range (default behavior)
20
+ * <RangeControl control={{
21
+ * type: 'range',
22
+ * value: 75,
23
+ * min: 0,
24
+ * max: 100,
25
+ * step: 5,
26
+ * event: 'onChange',
27
+ * onChange: (value) => setVolume(value),
28
+ * disabled: false
29
+ * }} />
30
+ * ```
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * // Updates only when losing focus with decimal steps
35
+ * <RangeControl control={{
36
+ * type: 'range',
37
+ * value: 2.5,
38
+ * min: 0,
39
+ * max: 5,
40
+ * step: 0.1,
41
+ * event: 'onBlur',
42
+ * onChange: (value) => console.log('Rating changed:', value)
43
+ * }} />
44
+ * ```
45
+ */
46
+ export declare function RangeControl({ control }: RangeControlProps): React.ReactNode;
@@ -1,4 +1,40 @@
1
- import { RangeControl as e } from "./RangeControl.js";
1
+ import { jsxs as g, jsx as i } from "react/jsx-runtime";
2
+ import { useState as o, useEffect as m } from "react";
3
+ import '../../../../assets/index9.css';const v = "_container_1a1cs_1", h = "_range_1a1cs_9", d = "_value_1a1cs_115", u = {
4
+ container: v,
5
+ range: h,
6
+ value: d
7
+ };
8
+ function _({ control: e }) {
9
+ const n = e.event || "onChange", [t, l] = o(e.value);
10
+ function r(s) {
11
+ const a = Number(s.target.value);
12
+ l(a), n === "onChange" && e.onChange(a);
13
+ }
14
+ function c(s) {
15
+ const a = Number(s.target.value);
16
+ n === "onBlur" && e.onChange(a);
17
+ }
18
+ return m(() => {
19
+ l(e.value);
20
+ }, [e.value]), /* @__PURE__ */ g("div", { className: u.container, children: [
21
+ /* @__PURE__ */ i(
22
+ "input",
23
+ {
24
+ type: "range",
25
+ value: t,
26
+ min: e.min,
27
+ max: e.max,
28
+ step: e.step,
29
+ disabled: e.disabled,
30
+ onChange: r,
31
+ ...n === "onBlur" && { onBlur: c },
32
+ className: u.range
33
+ }
34
+ ),
35
+ /* @__PURE__ */ i("span", { className: u.value, children: t })
36
+ ] });
37
+ }
2
38
  export {
3
- e as RangeControl
39
+ _ as RangeControl
4
40
  };
@@ -1 +1,39 @@
1
- export * from './SelectControl';
1
+ import { SelectControlProps } from './types';
2
+ /**
3
+ * Component that renders a dropdown select control with single selection
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The select control configuration object
7
+ * @param props.control.type - The control type, must be 'select'
8
+ * @param props.control.value - The currently selected option value
9
+ * @param props.control.options - Array of available options (strings or objects with label/value)
10
+ * @param props.control.onChange - Callback function triggered when selection changes
11
+ * @param props.control.disabled - Optional flag to disable the control
12
+ * @returns JSX element representing a dropdown select control
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * <SelectControl control={{
17
+ * type: 'select',
18
+ * value: 'medium',
19
+ * options: ['small', 'medium', 'large'],
20
+ * onChange: (value) => setSize(value),
21
+ * disabled: false
22
+ * }} />
23
+ * ```
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * <SelectControl control={{
28
+ * type: 'select',
29
+ * value: 'red',
30
+ * options: [
31
+ * { label: 'Red Color', value: 'red' },
32
+ * { label: 'Blue Color', value: 'blue' },
33
+ * { label: 'Green Color', value: 'green' }
34
+ * ],
35
+ * onChange: (value) => console.log('Selected:', value)
36
+ * }} />
37
+ * ```
38
+ */
39
+ export declare function SelectControl({ control }: SelectControlProps): React.ReactNode;
@@ -1,4 +1,8 @@
1
- import { SelectControl as r } from "./SelectControl.js";
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { Select as n } from "../../../Select/index.js";
3
+ function p({ control: e }) {
4
+ return /* @__PURE__ */ i(n, { value: e.value, options: e.options, disabled: e.disabled, onChange: (o) => e.onChange(o) });
5
+ }
2
6
  export {
3
- r as SelectControl
7
+ p as SelectControl
4
8
  };
@@ -1 +1,39 @@
1
- export * from './SeparatorControl';
1
+ import { SeparatorControlProps } from './types';
2
+ /**
3
+ * Component that renders a visual separator to organize control groups
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The separator control configuration object
7
+ * @param props.control.type - The control type, must be 'separator'
8
+ * @param props.control.style - The style of separator: "line" (default), "space", or "label"
9
+ * @param props.control.label - Optional label text (only displayed when style is "label")
10
+ * @returns JSX element representing a visual separator
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * // Simple line separator (default)
15
+ * <SeparatorControl control={{
16
+ * type: 'separator'
17
+ * }} />
18
+ * ```
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * // Separator with label text
23
+ * <SeparatorControl control={{
24
+ * type: 'separator',
25
+ * style: 'label',
26
+ * label: 'Advanced Settings'
27
+ * }} />
28
+ * ```
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * // Space separator for extra spacing
33
+ * <SeparatorControl control={{
34
+ * type: 'separator',
35
+ * style: 'space'
36
+ * }} />
37
+ * ```
38
+ */
39
+ export declare function SeparatorControl({ control }: SeparatorControlProps): React.ReactNode;
@@ -1,4 +1,14 @@
1
- import { SeparatorControl as t } from "./SeparatorControl.js";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import '../../../../assets/index8.css';const s = "_line_174q4_1", t = "_space_174q4_9", i = "_labelContainer_174q4_14", c = "_label_174q4_14", l = {
3
+ line: s,
4
+ space: t,
5
+ labelContainer: i,
6
+ label: c
7
+ };
8
+ function o({ control: a }) {
9
+ const n = a.style || "line";
10
+ return n === "space" ? /* @__PURE__ */ e("div", { className: l.space }) : n === "label" && a.label ? /* @__PURE__ */ e("div", { className: l.labelContainer, children: /* @__PURE__ */ e("span", { className: l.label, children: a.label }) }) : /* @__PURE__ */ e("div", { className: l.line });
11
+ }
2
12
  export {
3
- t as SeparatorControl
13
+ o as SeparatorControl
4
14
  };
@@ -1 +1,40 @@
1
- export * from './TextControl';
1
+ import { TextControlProps } from './types';
2
+ /**
3
+ * Component that renders a text input control with configurable event handling
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The text control configuration object
7
+ * @param props.control.type - The control type, must be 'text'
8
+ * @param props.control.value - The current string value of the text input
9
+ * @param props.control.placeholder - Optional placeholder text displayed when input is empty
10
+ * @param props.control.event - When to trigger onChange: "onChange" (real-time) or "onBlur" (on focus loss). Defaults to "onChange"
11
+ * @param props.control.onChange - Callback function triggered when text value changes
12
+ * @param props.control.disabled - Optional flag to disable the control
13
+ * @returns JSX element representing the text input control
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * // Real-time updates (default behavior)
18
+ * <TextControl control={{
19
+ * type: 'text',
20
+ * value: 'John Doe',
21
+ * placeholder: 'Enter your full name',
22
+ * event: 'onChange',
23
+ * onChange: (value) => setUserName(value),
24
+ * disabled: false
25
+ * }} />
26
+ * ```
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * // Updates only when losing focus
31
+ * <TextControl control={{
32
+ * type: 'text',
33
+ * value: 'search query',
34
+ * placeholder: 'Type to search...',
35
+ * event: 'onBlur',
36
+ * onChange: (value) => console.log('Search term:', value)
37
+ * }} />
38
+ * ```
39
+ */
40
+ export declare function TextControl({ control }: TextControlProps): React.ReactNode;