@berenjena/react-dev-panel 1.0.3 → 2.0.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 (87) hide show
  1. package/README.md +32 -171
  2. package/dist/assets/BooleanControl.css +1 -1
  3. package/dist/assets/ButtonControl.css +1 -1
  4. package/dist/assets/ButtonGroupControl.css +1 -1
  5. package/dist/assets/ColorControl.css +1 -1
  6. package/dist/assets/ControlRenderer.css +1 -1
  7. package/dist/assets/DevPanel.css +1 -1
  8. package/dist/assets/EmptyContent.css +1 -1
  9. package/dist/assets/Input.css +1 -1
  10. package/dist/assets/MultiSelectControl.css +1 -0
  11. package/dist/assets/RangeControl.css +1 -1
  12. package/dist/assets/Section.css +1 -1
  13. package/dist/assets/Select.css +1 -1
  14. package/dist/assets/SeparatorControl.css +1 -1
  15. package/dist/assets/index.css +1 -1
  16. package/dist/components/ControlRenderer/ControlRenderer.js +38 -18
  17. package/dist/components/ControlRenderer/controls/BooleanControl/BooleanControl.d.ts +20 -4
  18. package/dist/components/ControlRenderer/controls/BooleanControl/BooleanControl.js +16 -14
  19. package/dist/components/ControlRenderer/controls/ButtonControl/ButtonControl.d.ts +22 -5
  20. package/dist/components/ControlRenderer/controls/ButtonControl/ButtonControl.js +2 -2
  21. package/dist/components/ControlRenderer/controls/ButtonGroupControl/ButtonGroupControl.d.ts +35 -0
  22. package/dist/components/ControlRenderer/controls/ButtonGroupControl/ButtonGroupControl.js +2 -2
  23. package/dist/components/ControlRenderer/controls/ColorControl/ColorControl.d.ts +13 -6
  24. package/dist/components/ControlRenderer/controls/ColorControl/ColorControl.js +61 -15
  25. package/dist/components/ControlRenderer/controls/ColorControl/types.d.ts +14 -0
  26. package/dist/components/ControlRenderer/controls/DateControl/DateControl.d.ts +17 -5
  27. package/dist/components/ControlRenderer/controls/DateControl/DateControl.js +12 -12
  28. package/dist/components/ControlRenderer/controls/MultiSelectControl/MultiSelectControl.d.ts +28 -0
  29. package/dist/components/ControlRenderer/controls/MultiSelectControl/MultiSelectControl.js +131 -0
  30. package/dist/components/ControlRenderer/controls/MultiSelectControl/index.d.ts +1 -0
  31. package/dist/components/ControlRenderer/controls/MultiSelectControl/index.js +4 -0
  32. package/dist/components/ControlRenderer/controls/MultiSelectControl/types.d.ts +11 -0
  33. package/dist/components/ControlRenderer/controls/NumberControl/NumberControl.d.ts +26 -11
  34. package/dist/components/ControlRenderer/controls/NumberControl/NumberControl.js +14 -14
  35. package/dist/components/ControlRenderer/controls/RangeControl/RangeControl.d.ts +27 -11
  36. package/dist/components/ControlRenderer/controls/RangeControl/RangeControl.js +19 -19
  37. package/dist/components/ControlRenderer/controls/SelectControl/SelectControl.d.ts +29 -5
  38. package/dist/components/ControlRenderer/controls/SeparatorControl/SeparatorControl.d.ts +16 -7
  39. package/dist/components/ControlRenderer/controls/SeparatorControl/SeparatorControl.js +6 -6
  40. package/dist/components/ControlRenderer/controls/TextControl/TextControl.d.ts +24 -13
  41. package/dist/components/ControlRenderer/controls/TextControl/TextControl.js +15 -15
  42. package/dist/components/ControlRenderer/controls/index.d.ts +2 -0
  43. package/dist/components/ControlRenderer/controls/index.js +1 -0
  44. package/dist/components/ControlRenderer/controls/types.d.ts +2 -0
  45. package/dist/components/DevPanel/DevPanel.js +45 -40
  46. package/dist/components/DevPanel/types.d.ts +26 -0
  47. package/dist/components/DevPanelPortal/DevPanelPortal.d.ts +8 -0
  48. package/dist/components/DevPanelPortal/DevPanelPortal.js +17 -0
  49. package/dist/components/DevPanelPortal/index.d.ts +1 -0
  50. package/dist/components/DevPanelPortal/index.js +4 -0
  51. package/dist/components/EmptyContent/EmptyContent.js +5 -5
  52. package/dist/components/Icon/index.d.ts +16 -0
  53. package/dist/components/Icon/index.js +31 -0
  54. package/dist/components/Input/Input.js +4 -4
  55. package/dist/components/Section/Section.js +17 -16
  56. package/dist/components/Select/Select.js +1 -1
  57. package/dist/components/index.d.ts +3 -2
  58. package/dist/components/index.js +8 -6
  59. package/dist/hooks/useDebounceCallback/index.d.ts +1 -0
  60. package/dist/hooks/useDebounceCallback/index.js +4 -0
  61. package/dist/hooks/useDebounceCallback/useDebounceCallback.d.ts +8 -0
  62. package/dist/hooks/useDebounceCallback/useDebounceCallback.js +17 -0
  63. package/dist/hooks/useDevPanel/useDevPanel.d.ts +10 -5
  64. package/dist/hooks/useDevPanel/useDevPanel.js +25215 -12
  65. package/dist/hooks/useDragAndDrop/useDragAndDrop.d.ts +5 -1
  66. package/dist/hooks/useDragAndDrop/useDragAndDrop.js +24 -24
  67. package/dist/index.d.ts +0 -1
  68. package/dist/index.js +2 -8
  69. package/dist/managers/DevPanelManager.d.ts +85 -0
  70. package/dist/managers/DevPanelManager.js +119 -0
  71. package/dist/managers/index.d.ts +1 -0
  72. package/dist/managers/index.js +4 -0
  73. package/dist/store/BaseStoreService.d.ts +90 -0
  74. package/dist/store/BaseStoreService.js +90 -0
  75. package/dist/store/SectionsStore.d.ts +40 -0
  76. package/dist/store/SectionsStore.js +114 -0
  77. package/dist/store/ThemeStore.d.ts +68 -0
  78. package/dist/store/ThemeStore.js +102 -0
  79. package/dist/store/{store.d.ts → UIStore.d.ts} +17 -35
  80. package/dist/store/UIStore.js +117 -0
  81. package/dist/store/index.d.ts +4 -1
  82. package/dist/store/index.js +16 -7
  83. package/package.json +12 -3
  84. package/dist/assets/index2.css +0 -1
  85. package/dist/components/Logger/index.d.ts +0 -20
  86. package/dist/components/Logger/index.js +0 -85
  87. package/dist/store/store.js +0 -239
@@ -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): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,131 @@
1
+ import { jsxs as f, Fragment as O, jsx as r } from "react/jsx-runtime";
2
+ import { useState as y, useRef as _, useCallback as R, useEffect as v } from "react";
3
+ import { createPortal as S } from "react-dom";
4
+ import { Icon as N } from "../../../Icon/index.js";
5
+ import "../../../../store/SectionsStore.js";
6
+ import "../../../../store/ThemeStore.js";
7
+ import { useDevPanelPosition as z } from "../../../../store/UIStore.js";
8
+ import { className as B } from "../../../../utils/className/className.js";
9
+ import '../../../../assets/MultiSelectControl.css';const I = "_multiselect_1agkw_1", $ = "_trigger_1agkw_6", j = "_open_1agkw_36", A = "_value_1agkw_40", T = "_arrow_1agkw_53", V = "_dropdownPortal_1agkw_68", W = "_dropdown_1agkw_68", q = "_option_1agkw_115", F = "_disabled_1agkw_127", U = "_checkbox_1agkw_134", G = "_checkmark_1agkw_139", J = "_label_1agkw_170", n = {
10
+ multiselect: I,
11
+ trigger: $,
12
+ open: j,
13
+ value: A,
14
+ arrow: T,
15
+ dropdownPortal: V,
16
+ dropdown: W,
17
+ option: q,
18
+ disabled: F,
19
+ checkbox: U,
20
+ checkmark: G,
21
+ label: J
22
+ };
23
+ function oe({ control: t }) {
24
+ const c = z(), [a, u] = y(!1), [d, b] = y({
25
+ top: 0,
26
+ left: 0,
27
+ width: 0,
28
+ maxHeight: 200
29
+ }), p = _(null), w = _(null), k = _(null), s = R(() => {
30
+ a && b(x());
31
+ }, [a]);
32
+ function x() {
33
+ if (!w.current)
34
+ return { top: 0, left: 0, width: 0, maxHeight: 200 };
35
+ const e = w.current.getBoundingClientRect(), i = window.innerHeight, o = window.innerWidth, l = 200, m = 4, g = i - e.bottom - m, h = e.top - m, P = g < l && h > g, H = P ? e.top - Math.min(l, h) : e.bottom + m, D = Math.max(8, Math.min(e.left, o - e.width - 8)), M = P ? Math.min(l, h) : Math.min(l, g);
36
+ return {
37
+ top: H,
38
+ left: D,
39
+ width: e.width,
40
+ maxHeight: M
41
+ };
42
+ }
43
+ function L(e) {
44
+ const i = t.value.includes(e) ? t.value.filter((o) => o !== e) : [...t.value, e];
45
+ t.onChange(i);
46
+ }
47
+ function C() {
48
+ if (t.value.length === 0)
49
+ return "Select options...";
50
+ if (t.value.length === 1) {
51
+ const e = t.options.find((o) => (typeof o == "string" ? o : o.value) === t.value[0]);
52
+ return (typeof e == "string" ? e : e?.label) || t.value[0];
53
+ }
54
+ return `${t.value.length} selected`;
55
+ }
56
+ function E() {
57
+ t.disabled || (a ? u(!1) : (b(x()), u(!0)));
58
+ }
59
+ return v(() => {
60
+ if (a)
61
+ return s(), window.addEventListener("resize", s), window.addEventListener("scroll", s, !0), () => {
62
+ window.removeEventListener("resize", s), window.removeEventListener("scroll", s, !0);
63
+ };
64
+ }, [a, s]), v(() => {
65
+ const e = k.current;
66
+ (!e || e.x !== c.x || e.y !== c.y) && (k.current = c, s());
67
+ }, [c, s]), v(() => {
68
+ function e(i) {
69
+ if (p.current && !p.current.contains(i.target)) {
70
+ const o = document.querySelector(`.${n.dropdownPortal}`);
71
+ if (o && o.contains(i.target))
72
+ return;
73
+ u(!1);
74
+ }
75
+ }
76
+ return document.addEventListener("mousedown", e), () => {
77
+ document.removeEventListener("mousedown", e);
78
+ };
79
+ }, []), /* @__PURE__ */ f(O, { children: [
80
+ /* @__PURE__ */ r(
81
+ "div",
82
+ {
83
+ ref: p,
84
+ ...B(n.multiselect, {
85
+ [n.disabled]: !!t.disabled,
86
+ [n.open]: a
87
+ }),
88
+ children: /* @__PURE__ */ f("button", { ref: w, type: "button", className: n.trigger, onClick: E, disabled: t.disabled, children: [
89
+ /* @__PURE__ */ r("span", { className: n.value, children: C() }),
90
+ /* @__PURE__ */ r(N, { name: "ArrowDown", className: n.arrow })
91
+ ] })
92
+ }
93
+ ),
94
+ typeof window < "u" && S(
95
+ a && !t.disabled && /* @__PURE__ */ r(
96
+ "div",
97
+ {
98
+ className: `${n.dropdownPortal}`,
99
+ style: {
100
+ position: "fixed",
101
+ top: d.top,
102
+ left: d.left,
103
+ width: d.width,
104
+ maxHeight: d.maxHeight,
105
+ zIndex: 9999
106
+ },
107
+ children: /* @__PURE__ */ r("div", { className: n.dropdown, children: t.options.map((e) => {
108
+ const i = typeof e == "string" ? e : e.value, o = typeof e == "string" ? e : e.label, l = t.value.includes(i);
109
+ return /* @__PURE__ */ f("label", { className: n.option, children: [
110
+ /* @__PURE__ */ r(
111
+ "input",
112
+ {
113
+ type: "checkbox",
114
+ checked: l,
115
+ onChange: () => L(i),
116
+ className: n.checkbox
117
+ }
118
+ ),
119
+ /* @__PURE__ */ r(N, { name: "Check", className: n.checkmark }),
120
+ /* @__PURE__ */ r("span", { className: n.label, children: o })
121
+ ] }, i);
122
+ }) })
123
+ }
124
+ ),
125
+ document.body
126
+ )
127
+ ] });
128
+ }
129
+ export {
130
+ oe as MultiSelectControl
131
+ };
@@ -0,0 +1 @@
1
+ export * from './MultiSelectControl';
@@ -0,0 +1,4 @@
1
+ import { MultiSelectControl as e } from "./MultiSelectControl.js";
2
+ export {
3
+ e as MultiSelectControl
4
+ };
@@ -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,29 +1,44 @@
1
1
  import { NumberControlProps } from './types';
2
2
  /**
3
3
  * Component that renders a number control with configurable event handling
4
- * @param control - The control to render
5
- * @param control.event - When to trigger onChange: "onChange" (real-time) or "onBlur" (on focus loss). Defaults to "onBlur"
6
- * @returns The number control component
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
7
16
  *
8
17
  * @example
9
18
  * ```typescript
10
- * // Real-time updates
19
+ * // Real-time updates with constraints
11
20
  * <NumberControl control={{
12
21
  * type: 'number',
13
- * value: 10,
22
+ * value: 50,
14
23
  * min: 0,
15
24
  * max: 100,
16
- * step: 1,
25
+ * step: 5,
17
26
  * event: 'onChange',
18
- * onChange: (value) => setValue(value)
27
+ * onChange: (value) => setProgress(value),
28
+ * disabled: false
19
29
  * }} />
30
+ * ```
20
31
  *
21
- * // Updates only when losing focus (default behavior)
32
+ * @example
33
+ * ```typescript
34
+ * // Updates only when losing focus
22
35
  * <NumberControl control={{
23
36
  * type: 'number',
24
- * value: 10,
25
- * event: 'onBlur', // or omit for default
26
- * onChange: (value) => setValue(value)
37
+ * value: 42,
38
+ * min: 1,
39
+ * step: 0.1,
40
+ * event: 'onBlur',
41
+ * onChange: (value) => console.log('Value changed:', value)
27
42
  * }} />
28
43
  * ```
29
44
  */
@@ -1,20 +1,20 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { useState as i, useEffect as p } from "react";
3
- import { Input as f } from "../../../Input/Input.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/Input.js";
4
4
  function v({ control: e }) {
5
- const n = e.event || "onChange", [m, t] = i(e.value);
6
- p(() => {
7
- t(e.value);
8
- }, [e.value]);
9
- const s = (u) => {
5
+ const n = e.event || "onChange", [m, t] = r(e.value);
6
+ function l(u) {
10
7
  const a = Number(u.target.value);
11
8
  t(a), n === "onChange" && e.onChange(a);
12
- }, l = (u) => {
9
+ }
10
+ function i(u) {
13
11
  const a = Number(u.target.value);
14
12
  n === "onBlur" && e.onChange(a);
15
- };
16
- return /* @__PURE__ */ r(
17
- f,
13
+ }
14
+ return f(() => {
15
+ t(e.value);
16
+ }, [e.value]), /* @__PURE__ */ s(
17
+ p,
18
18
  {
19
19
  type: "number",
20
20
  value: m,
@@ -22,8 +22,8 @@ function v({ control: e }) {
22
22
  max: e.max,
23
23
  step: e.step,
24
24
  disabled: e.disabled,
25
- onChange: s,
26
- ...n === "onBlur" && { onBlur: l }
25
+ onChange: l,
26
+ ...n === "onBlur" && { onBlur: i }
27
27
  }
28
28
  );
29
29
  }
@@ -1,29 +1,45 @@
1
1
  import { RangeControlProps } from './types';
2
2
  /**
3
- * Component that renders a range/slider control with configurable event handling
4
- * @param control - The control to render
5
- * @param control.event - When to trigger onChange: "onChange" (real-time) or "onBlur" (on focus loss). Defaults to "onChange"
6
- * @returns The range control component
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
7
16
  *
8
17
  * @example
9
18
  * ```typescript
10
- * // Real-time updates (default)
19
+ * // Real-time updates with custom range (default behavior)
11
20
  * <RangeControl control={{
12
21
  * type: 'range',
13
- * value: 50,
22
+ * value: 75,
14
23
  * min: 0,
15
24
  * max: 100,
16
- * step: 1,
25
+ * step: 5,
17
26
  * event: 'onChange',
18
- * onChange: (value) => setValue(value)
27
+ * onChange: (value) => setVolume(value),
28
+ * disabled: false
19
29
  * }} />
30
+ * ```
20
31
  *
21
- * // Updates only when losing focus
32
+ * @example
33
+ * ```typescript
34
+ * // Updates only when losing focus with decimal steps
22
35
  * <RangeControl control={{
23
36
  * type: 'range',
24
- * value: 50,
37
+ * value: 2.5,
38
+ * min: 0,
39
+ * max: 5,
40
+ * step: 0.1,
25
41
  * event: 'onBlur',
26
- * onChange: (value) => setValue(value)
42
+ * onChange: (value) => console.log('Rating changed:', value)
27
43
  * }} />
28
44
  * ```
29
45
  */
@@ -1,40 +1,40 @@
1
- import { jsxs as g, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
2
  import { useState as o, useEffect as m } from "react";
3
- import '../../../../assets/RangeControl.css';const v = "_container_1ewrb_1", h = "_range_1ewrb_9", d = "_value_1ewrb_116", t = {
3
+ import '../../../../assets/RangeControl.css';const v = "_container_lg827_1", h = "_range_lg827_9", d = "_value_lg827_115", u = {
4
4
  container: v,
5
5
  range: h,
6
6
  value: d
7
7
  };
8
- function b({ control: e }) {
9
- const n = e.event || "onChange", [u, l] = o(e.value);
10
- m(() => {
11
- l(e.value);
12
- }, [e.value]);
13
- const i = (s) => {
8
+ function _({ control: e }) {
9
+ const n = e.event || "onChange", [l, t] = o(e.value);
10
+ function r(s) {
14
11
  const a = Number(s.target.value);
15
- l(a), n === "onChange" && e.onChange(a);
16
- }, c = (s) => {
12
+ t(a), n === "onChange" && e.onChange(a);
13
+ }
14
+ function g(s) {
17
15
  const a = Number(s.target.value);
18
16
  n === "onBlur" && e.onChange(a);
19
- };
20
- return /* @__PURE__ */ g("div", { className: t.container, children: [
21
- /* @__PURE__ */ r(
17
+ }
18
+ return m(() => {
19
+ t(e.value);
20
+ }, [e.value]), /* @__PURE__ */ c("div", { className: u.container, children: [
21
+ /* @__PURE__ */ i(
22
22
  "input",
23
23
  {
24
24
  type: "range",
25
- value: u,
25
+ value: l,
26
26
  min: e.min,
27
27
  max: e.max,
28
28
  step: e.step,
29
29
  disabled: e.disabled,
30
- onChange: i,
31
- ...n === "onBlur" && { onBlur: c },
32
- className: t.range
30
+ onChange: r,
31
+ ...n === "onBlur" && { onBlur: g },
32
+ className: u.range
33
33
  }
34
34
  ),
35
- /* @__PURE__ */ r("span", { className: t.value, children: u })
35
+ /* @__PURE__ */ i("span", { className: u.value, children: l })
36
36
  ] });
37
37
  }
38
38
  export {
39
- b as RangeControl
39
+ _ as RangeControl
40
40
  };
@@ -1,15 +1,39 @@
1
1
  import { SelectControlProps } from './types';
2
2
  /**
3
- * Component that renders a select control
4
- * @param control - The control to render
5
- * @returns The select control component
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
+ * ```
6
24
  *
7
25
  * @example
8
26
  * ```typescript
9
27
  * <SelectControl control={{
10
28
  * type: 'select',
11
- * value: 'option1',
12
- * options: ['option1', 'option2', 'option3'],
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)
13
36
  * }} />
37
+ * ```
14
38
  */
15
39
  export declare function SelectControl({ control }: SelectControlProps): import("react/jsx-runtime").JSX.Element;
@@ -1,26 +1,35 @@
1
1
  import { SeparatorControlProps } from './types';
2
2
  /**
3
3
  * Component that renders a visual separator to organize control groups
4
- * @param control - The control to render
5
- * @param control.style - The style of separator: "line" (default), "space", or "label"
6
- * @param control.label - Optional label text (only shown when style is "label")
7
- * @returns The separator control component
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
8
11
  *
9
12
  * @example
10
13
  * ```typescript
11
- * // Simple line separator
14
+ * // Simple line separator (default)
12
15
  * <SeparatorControl control={{
13
16
  * type: 'separator'
14
17
  * }} />
18
+ * ```
15
19
  *
16
- * // Separator with label
20
+ * @example
21
+ * ```typescript
22
+ * // Separator with label text
17
23
  * <SeparatorControl control={{
18
24
  * type: 'separator',
19
25
  * style: 'label',
20
26
  * label: 'Advanced Settings'
21
27
  * }} />
28
+ * ```
22
29
  *
23
- * // Space separator
30
+ * @example
31
+ * ```typescript
32
+ * // Space separator for extra spacing
24
33
  * <SeparatorControl control={{
25
34
  * type: 'separator',
26
35
  * style: 'space'
@@ -1,14 +1,14 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import '../../../../assets/SeparatorControl.css';const s = "_line_12cvo_1", c = "_space_12cvo_9", t = "_labelContainer_12cvo_14", i = "_label_12cvo_14", l = {
2
+ import '../../../../assets/SeparatorControl.css';const s = "_line_174q4_1", t = "_space_174q4_9", i = "_labelContainer_174q4_14", c = "_label_174q4_14", l = {
3
3
  line: s,
4
- space: c,
5
- labelContainer: t,
6
- label: i
4
+ space: t,
5
+ labelContainer: i,
6
+ label: c
7
7
  };
8
- function r({ control: a }) {
8
+ function o({ control: a }) {
9
9
  const n = a.style || "line";
10
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
11
  }
12
12
  export {
13
- r as SeparatorControl
13
+ o as SeparatorControl
14
14
  };
@@ -1,28 +1,39 @@
1
1
  import { TextControlProps } from './types';
2
2
  /**
3
- * Component that renders a text control with configurable event handling
4
- * @param control - The control to render
5
- * @param control.event - When to trigger onChange: "onChange" (real-time) or "onBlur" (on focus loss). Defaults to "onBlur"
6
- * @returns The text control component
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
7
14
  *
8
15
  * @example
9
16
  * ```typescript
10
- * // Real-time updates
17
+ * // Real-time updates (default behavior)
11
18
  * <TextControl control={{
12
19
  * type: 'text',
13
- * value: 'Hello',
14
- * placeholder: 'Enter your name',
20
+ * value: 'John Doe',
21
+ * placeholder: 'Enter your full name',
15
22
  * event: 'onChange',
16
- * onChange: (value) => setValue(value)
23
+ * onChange: (value) => setUserName(value),
24
+ * disabled: false
17
25
  * }} />
26
+ * ```
18
27
  *
19
- * // Updates only when losing focus (default behavior)
28
+ * @example
29
+ * ```typescript
30
+ * // Updates only when losing focus
20
31
  * <TextControl control={{
21
32
  * type: 'text',
22
- * value: 'Hello',
23
- * placeholder: 'Enter your name',
24
- * event: 'onBlur', // or omit for default
25
- * onChange: (value) => setValue(value)
33
+ * value: 'search query',
34
+ * placeholder: 'Type to search...',
35
+ * event: 'onBlur',
36
+ * onChange: (value) => console.log('Search term:', value)
26
37
  * }} />
27
38
  * ```
28
39
  */
@@ -1,27 +1,27 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { useState as h, useEffect as p } from "react";
3
- import { Input as d } from "../../../Input/Input.js";
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { useState as h, useEffect as i } from "react";
3
+ import { Input as s } from "../../../Input/Input.js";
4
4
  function v({ control: e }) {
5
- const n = e.event || "onChange", [u, l] = h(e.value);
6
- p(() => {
7
- l(e.value);
8
- }, [e.value]);
9
- const o = (t) => {
5
+ const n = e.event || "onChange", [l, u] = h(e.value);
6
+ function o(t) {
10
7
  const a = t.target.value;
11
- l(a), n === "onChange" && e.onChange(a);
12
- }, s = (t) => {
8
+ u(a), n === "onChange" && e.onChange(a);
9
+ }
10
+ function r(t) {
13
11
  const a = t.target.value;
14
12
  n === "onBlur" && e.onChange(a);
15
- };
16
- return /* @__PURE__ */ r(
17
- d,
13
+ }
14
+ return i(() => {
15
+ u(e.value);
16
+ }, [e.value]), /* @__PURE__ */ f(
17
+ s,
18
18
  {
19
19
  type: "text",
20
- value: u,
20
+ value: l,
21
21
  placeholder: e.placeholder,
22
22
  disabled: e.disabled,
23
23
  onChange: o,
24
- ...n === "onBlur" && { onBlur: s }
24
+ ...n === "onBlur" && { onBlur: r }
25
25
  }
26
26
  );
27
27
  }
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Exports all control components as a frozen object.
3
+ *
3
4
  * **Note:** This allows components to be loaded lazily.
4
5
  */
5
6
  export declare const controls: Readonly<{
@@ -10,6 +11,7 @@ export declare const controls: Readonly<{
10
11
  number: import('react').LazyExoticComponent<typeof import('./NumberControl').NumberControl>;
11
12
  range: import('react').LazyExoticComponent<typeof import('./RangeControl').RangeControl>;
12
13
  select: import('react').LazyExoticComponent<typeof import('./SelectControl').SelectControl>;
14
+ multiselect: import('react').LazyExoticComponent<typeof import('./MultiSelectControl').MultiSelectControl>;
13
15
  separator: import('react').LazyExoticComponent<typeof import('./SeparatorControl').SeparatorControl>;
14
16
  text: import('react').LazyExoticComponent<typeof import('./TextControl').TextControl>;
15
17
  buttonGroup: import('react').LazyExoticComponent<typeof import('./ButtonGroupControl').ButtonGroupControl>;
@@ -7,6 +7,7 @@ const r = Object.freeze({
7
7
  number: o(() => import("./NumberControl/index.js").then((t) => ({ default: t.NumberControl }))),
8
8
  range: o(() => import("./RangeControl/index.js").then((t) => ({ default: t.RangeControl }))),
9
9
  select: o(() => import("./SelectControl/index.js").then((t) => ({ default: t.SelectControl }))),
10
+ multiselect: o(() => import("./MultiSelectControl/index.js").then((t) => ({ default: t.MultiSelectControl }))),
10
11
  separator: o(() => import("./SeparatorControl/index.js").then((t) => ({ default: t.SeparatorControl }))),
11
12
  text: o(() => import("./TextControl/index.js").then((t) => ({ default: t.TextControl }))),
12
13
  buttonGroup: o(() => import("./ButtonGroupControl/index.js").then((t) => ({ default: t.ButtonGroupControl })))
@@ -3,6 +3,7 @@ import { ButtonControl } from './ButtonControl/types';
3
3
  import { ButtonGroupControl } from './ButtonGroupControl/types';
4
4
  import { ColorControl } from './ColorControl/types';
5
5
  import { DateControl } from './DateControl/types';
6
+ import { MultiSelectControl } from './MultiSelectControl/types';
6
7
  import { NumberControl } from './NumberControl/types';
7
8
  import { RangeControl } from './RangeControl/types';
8
9
  import { SelectControl } from './SelectControl/types';
@@ -23,6 +24,7 @@ export type Controls = {
23
24
  color: ColorControl;
24
25
  boolean: BooleanControl;
25
26
  select: SelectControl;
27
+ multiselect: MultiSelectControl;
26
28
  text: TextControl;
27
29
  button: ButtonControl;
28
30
  number: NumberControl;