@tcn/ui 0.3.0 → 0.3.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 (127) hide show
  1. package/dist/Color-ASIRERSW-B4GaVKuQ.js +990 -0
  2. package/dist/Color-ASIRERSW-B4GaVKuQ.js.map +1 -0
  3. package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js +1485 -0
  4. package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js.map +1 -0
  5. package/dist/actions/__docs__/components/gallery.d.ts +8 -0
  6. package/dist/actions/__docs__/components/gallery.d.ts.map +1 -0
  7. package/dist/actions/__docs__/components/gallery.js +20 -0
  8. package/dist/actions/__docs__/components/gallery.js.map +1 -0
  9. package/dist/actions/__docs__/components/showcase.d.ts +27 -0
  10. package/dist/actions/__docs__/components/showcase.d.ts.map +1 -0
  11. package/dist/actions/__docs__/components/showcase.js +15 -0
  12. package/dist/actions/__docs__/components/showcase.js.map +1 -0
  13. package/dist/actions/button/base_button/base_button.d.ts +2 -0
  14. package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
  15. package/dist/actions/button/base_button/base_button.js +18 -16
  16. package/dist/actions/button/base_button/base_button.js.map +1 -1
  17. package/dist/actions/button/button/button.js +6 -6
  18. package/dist/actions/button/button_group/button_group.js +1 -1
  19. package/dist/actions/button/select_group/select_group.js +13 -13
  20. package/dist/actions/button/select_group/single_select_group.js +6 -6
  21. package/dist/actions/button/slim_button/slim_button.js +2 -2
  22. package/dist/actions/types.d.ts +2 -0
  23. package/dist/actions/types.d.ts.map +1 -0
  24. package/dist/actions/types.js +2 -0
  25. package/dist/actions/types.js.map +1 -0
  26. package/dist/feedback/loading/loading.js +12 -12
  27. package/dist/feedback/loading/loading.js.map +1 -1
  28. package/dist/feedback/progress/progress_bar.js +1 -1
  29. package/dist/form/field/common/field_control/field_control.js +8 -8
  30. package/dist/form/field/common/status_input/status_input.js +6 -6
  31. package/dist/form/field/field.js +5 -5
  32. package/dist/form/field/h_field/h_field.js +11 -11
  33. package/dist/form/field/v_field/v_field.js +10 -10
  34. package/dist/form/field_set/field_set.js +3 -3
  35. package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js +6 -0
  36. package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js.map +1 -0
  37. package/dist/gallery.css +1 -0
  38. package/dist/inputs/checkbox/checkbox.js +11 -11
  39. package/dist/inputs/color_input/color_picker.js +5 -5
  40. package/dist/inputs/combo_box/combo_box.js +16 -16
  41. package/dist/inputs/date_picker/date_picker.js +18 -18
  42. package/dist/inputs/date_picker/date_picker_body.js +2 -2
  43. package/dist/inputs/date_picker/date_picker_input.js +18 -18
  44. package/dist/inputs/input/input.js +5 -5
  45. package/dist/inputs/mask_input/key_capture_input.js +7 -7
  46. package/dist/inputs/mask_input/mask_input.js +4 -4
  47. package/dist/inputs/multi_combo_box/multi_combo_box.js +17 -17
  48. package/dist/inputs/multiselect/multiselect.js +13 -13
  49. package/dist/inputs/multiselect/multiselect_row.js +8 -8
  50. package/dist/inputs/phone_number_input/phone_number_input.js +11 -11
  51. package/dist/inputs/radio/radio.js +10 -10
  52. package/dist/inputs/radio/radio_row.js +3 -3
  53. package/dist/inputs/select/select.js +14 -14
  54. package/dist/inputs/slider/slider.js +10 -10
  55. package/dist/inputs/switch/switch.js +4 -4
  56. package/dist/inputs/textarea/textarea.js +7 -7
  57. package/dist/inputs/unit_input/unit_input.js +4 -4
  58. package/dist/layouts/body/h_body.js +7 -7
  59. package/dist/layouts/body/v_body.js +6 -6
  60. package/dist/layouts/column/column.js +17 -17
  61. package/dist/layouts/footer/footer.js +7 -7
  62. package/dist/layouts/grid/grid.js +24 -24
  63. package/dist/layouts/header/header.js +2 -2
  64. package/dist/layouts/list/item.js +2 -2
  65. package/dist/layouts/list/list.js +7 -7
  66. package/dist/layouts/list/section_header.js +6 -6
  67. package/dist/layouts/scaffold/scaffold.js +16 -16
  68. package/dist/layouts/sidebar_end/sidebar_end.js +14 -14
  69. package/dist/layouts/sidebar_start/sidebar_start.js +10 -10
  70. package/dist/layouts/utility_bar/utility_bar.js +10 -10
  71. package/dist/overlay/frame/frame.js +4 -4
  72. package/dist/overlay/menu/menu.js +34 -34
  73. package/dist/overlay/portal/portal_platform_context.js +4 -4
  74. package/dist/showcase-WfP6kBEb.js +58401 -0
  75. package/dist/showcase-WfP6kBEb.js.map +1 -0
  76. package/dist/showcase.css +1 -0
  77. package/dist/stacks/box/box.js +23 -23
  78. package/dist/stacks/h_collapsible_box.js +2 -2
  79. package/dist/stacks/h_stack.js +41 -41
  80. package/dist/stacks/spacer.js +11 -11
  81. package/dist/stacks/story_components/circle.js +10 -10
  82. package/dist/stacks/story_components/picture_placeholder.js +9 -9
  83. package/dist/stacks/story_components/rect.js +7 -7
  84. package/dist/stacks/story_components/style_box.js +4 -4
  85. package/dist/stacks/utils/use_is_collapsed.js +6 -6
  86. package/dist/stacks/v_collapsible_box.js +2 -2
  87. package/dist/stacks/v_stack.js +42 -42
  88. package/dist/stacks/z_stack.js +39 -39
  89. package/dist/surfaces/alert/alert.js +4 -4
  90. package/dist/surfaces/card/card.js +4 -4
  91. package/dist/surfaces/confirm/confirm.js +9 -9
  92. package/dist/surfaces/drawers/drawer_start/drawer_start.js +2 -2
  93. package/dist/surfaces/drawers/drawer_top/drawer_top.js +2 -2
  94. package/dist/surfaces/modal/modal.js +5 -5
  95. package/dist/surfaces/page/h_page.js +7 -7
  96. package/dist/surfaces/page/v_page.js +5 -5
  97. package/dist/surfaces/panel/h_panel.js +14 -14
  98. package/dist/surfaces/panel/v_panel.js +9 -9
  99. package/dist/surfaces/pop_confirm/pop_confirm.js +6 -6
  100. package/dist/surfaces/popconfirm/pop_confirm.js +8 -8
  101. package/dist/surfaces/tooltip/tooltip.js +8 -8
  102. package/dist/surfaces/window/window.js +9 -9
  103. package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js +3777 -0
  104. package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js.map +1 -0
  105. package/dist/themes/themes/ergo/ergo_theme.js +33 -1
  106. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  107. package/dist/tokens/badge/badge.js +9 -9
  108. package/dist/tokens/bubble/bubble.js +8 -8
  109. package/dist/tokens/chip/chip.js +3 -3
  110. package/dist/utils/click_away_listener.js +10 -10
  111. package/dist/utils/click_away_listener.js.map +1 -1
  112. package/dist/utils/dnd/draggable/draggable.js +4 -4
  113. package/dist/utils/dnd/handle.js +8 -8
  114. package/dist/utils/focus_redirect.js +5 -5
  115. package/dist/utils/hooks/make_context_hook.js +4 -4
  116. package/dist/utils/hooks/use_media_query.js +2 -2
  117. package/dist/utils/hooks/use_media_query.js.map +1 -1
  118. package/package.json +1 -1
  119. package/src/actions/__docs__/actions.mdx +131 -0
  120. package/src/actions/__docs__/actions.stories.tsx +309 -0
  121. package/src/actions/__docs__/components/gallery.module.css +6 -0
  122. package/src/actions/__docs__/components/gallery.tsx +28 -0
  123. package/src/actions/__docs__/components/showcase.module.css +55 -0
  124. package/src/actions/__docs__/components/showcase.tsx +121 -0
  125. package/src/actions/button/base_button/base_button.tsx +5 -1
  126. package/src/actions/types.ts +6 -0
  127. package/src/themes/themes/ergo/ergo_theme.css +33 -1
@@ -1,14 +1,14 @@
1
1
  import { jsxs as l, jsx as n, Fragment as T } from "react/jsx-runtime";
2
- import { useSignalValue as y, useSignalValueEffect as B } from "@tcn/state";
2
+ import { useSignalValue as y, useSignalValueEffect as _ } from "@tcn/state";
3
3
  import "../../utils/click_away_listener.js";
4
4
  import "../../utils/focus_redirect.js";
5
5
  import "../../utils/scroll_away_listener.js";
6
- import Y, { useState as R, useRef as L, useLayoutEffect as r } from "react";
6
+ import Y, { useState as B, useRef as L, useLayoutEffect as r } from "react";
7
7
  import { useResizeObserver as O } from "../../utils/hooks/use_resize_observer.js";
8
8
  import { HStack as U } from "../../stacks/h_stack.js";
9
- import { Spacer as V } from "../../stacks/spacer.js";
9
+ import { Spacer as R } from "../../stacks/spacer.js";
10
10
  import { VStack as u } from "../../stacks/v_stack.js";
11
- import { clsx as _ } from "clsx";
11
+ import { clsx as V } from "clsx";
12
12
  import { DatePickerBody as $ } from "./date_picker_body.js";
13
13
  import { DatePickerHeader as q } from "./date_picker_header.js";
14
14
  import { DatePickerPresenter as E } from "./date_picker_presenter.js";
@@ -22,22 +22,22 @@ import '../../date_picker.css';const J = "_date-picker_0a0d8e4", K = "_date-pick
22
22
  min: g = null,
23
23
  max: b = null,
24
24
  minVisibleTimeInMilliseconds: m,
25
- maxVisibleTimeInMilliseconds: p,
26
- disabledDates: f,
25
+ maxVisibleTimeInMilliseconds: f,
26
+ disabledDates: p,
27
27
  countryCode: D = "en-US",
28
28
  renderActions: P,
29
29
  onTimeSelected: S,
30
30
  timeIntervalInMinutes: d
31
31
  }, H) {
32
- const [F, I] = R(0), M = L(!1), j = O((t, o) => {
32
+ const [F, I] = B(0), M = L(!1), j = O((t, o) => {
33
33
  I(o);
34
- }), [e] = R(() => {
34
+ }), [e] = B(() => {
35
35
  const t = /* @__PURE__ */ new Date(), o = i == null ? t.getFullYear() : i.getFullYear(), c = i == null ? t.getMonth() : i.getMonth();
36
36
  return new E(i, o, c, s);
37
37
  }), a = y(e.stateBroadcast), z = y(e.valueBroadcast), N = a.error;
38
- return B((t) => {
38
+ return _((t) => {
39
39
  N !== t && x && x(t);
40
- }, e.errorBroadcast), B((t) => {
40
+ }, e.errorBroadcast), _((t) => {
41
41
  M.current ? k && k(t) : M.current = !0;
42
42
  }, e.valueBroadcast), r(() => {
43
43
  e.initialize();
@@ -48,12 +48,12 @@ import '../../date_picker.css';const J = "_date-picker_0a0d8e4", K = "_date-pick
48
48
  }, [e, g]), r(() => {
49
49
  e.setMaxDate(b);
50
50
  }, [e, b]), r(() => {
51
- f == null ? e.setDisabledDates([]) : e.setDisabledDates(f);
52
- }, [e, f]), r(() => {
51
+ p == null ? e.setDisabledDates([]) : e.setDisabledDates(p);
52
+ }, [e, p]), r(() => {
53
53
  typeof m == "number" && e.setMinVisibleTime(m);
54
54
  }, [e, m]), r(() => {
55
- typeof p == "number" && e.setMaxVisibleTime(p);
56
- }, [e, p]), r(() => {
55
+ typeof f == "number" && e.setMaxVisibleTime(f);
56
+ }, [e, f]), r(() => {
57
57
  typeof d == "number" && e.setTimeIntervalInMinutes(d);
58
58
  }, [e, d]), r(() => {
59
59
  e.selectDate(i);
@@ -63,7 +63,7 @@ import '../../date_picker.css';const J = "_date-picker_0a0d8e4", K = "_date-pick
63
63
  ref: H,
64
64
  width: "auto",
65
65
  height: "auto",
66
- className: _(w["date-picker"], "date-picker"),
66
+ className: V(w["date-picker"], "date-picker"),
67
67
  tabIndex: 0,
68
68
  children: [
69
69
  /* @__PURE__ */ l(
@@ -73,7 +73,7 @@ import '../../date_picker.css';const J = "_date-picker_0a0d8e4", K = "_date-pick
73
73
  inline: !0,
74
74
  height: "auto",
75
75
  width: "auto",
76
- className: _(w["date-picker-box"], "date-picker-box"),
76
+ className: V(w["date-picker-box"], "date-picker-box"),
77
77
  "data-is-disabled": h,
78
78
  children: [
79
79
  /* @__PURE__ */ l(u, { height: "auto", children: [
@@ -81,12 +81,12 @@ import '../../date_picker.css';const J = "_date-picker_0a0d8e4", K = "_date-pick
81
81
  /* @__PURE__ */ n($, { countryCode: D, presenter: e })
82
82
  ] }),
83
83
  P && /* @__PURE__ */ n(u, { paddingInline: "8px", children: P(e) }),
84
- /* @__PURE__ */ n(V, { height: "8px" })
84
+ /* @__PURE__ */ n(R, { height: "8px" })
85
85
  ]
86
86
  }
87
87
  ),
88
88
  s && /* @__PURE__ */ l(T, { children: [
89
- /* @__PURE__ */ n(V, { width: "8px" }),
89
+ /* @__PURE__ */ n(R, { width: "8px" }),
90
90
  /* @__PURE__ */ n(
91
91
  G,
92
92
  {
@@ -7,7 +7,7 @@ import { Spacer as c } from "../../stacks/spacer.js";
7
7
  import { VStack as d } from "../../stacks/v_stack.js";
8
8
  import { DatePickerDate as g } from "./date_picker_date.js";
9
9
  import { DatePickerDay as k } from "./date_picker_day.js";
10
- function V({ presenter: o, countryCode: p }) {
10
+ function j({ presenter: o, countryCode: p }) {
11
11
  const { visibleDates: i } = n(o.stateBroadcast), a = [];
12
12
  for (let t = 0; t < i.length; t += 7)
13
13
  a.push(i.slice(t, t + 7));
@@ -21,6 +21,6 @@ function V({ presenter: o, countryCode: p }) {
21
21
  ] });
22
22
  }
23
23
  export {
24
- V as DatePickerBody
24
+ j as DatePickerBody
25
25
  };
26
26
  //# sourceMappingURL=date_picker_body.js.map
@@ -1,8 +1,8 @@
1
- import { jsxs as m, Fragment as q, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as u, Fragment as q, jsx as o } from "react/jsx-runtime";
2
2
  import B, { useState as L, useRef as M, useCallback as V, useMemo as W, useLayoutEffect as Z } from "react";
3
3
  import { ZStack as G } from "../../stacks/z_stack.js";
4
4
  import { Popper as H } from "../../overlay/popper/legacy/popper.js";
5
- import { clsx as u } from "clsx";
5
+ import { clsx as m } from "clsx";
6
6
  import "../../actions/button/base_button/base_button.js";
7
7
  import "../../actions/button/button_group/button_group.js";
8
8
  import "../../actions/button/slim_button/slim_button.js";
@@ -33,17 +33,17 @@ import '../../date_picker_input.css';const U = "_button_f404820", X = "_popover_
33
33
  countryCode: s,
34
34
  renderActions: S,
35
35
  onTimeSelected: w,
36
- ...b
37
- }, v) => {
38
- const [n, a] = L(null), C = n != null, i = M(null), p = V((t) => t.closest(".suggestion-list") != null, []), F = W(() => {
36
+ ..._
37
+ }, b) => {
38
+ const [n, a] = L(null), v = n != null, i = M(null), p = V((t) => t.closest(".suggestion-list") != null, []), C = W(() => {
39
39
  const t = {
40
40
  year: "numeric",
41
41
  month: "short",
42
42
  day: "numeric"
43
43
  };
44
44
  return r && (t.hour = "numeric", t.minute = "2-digit", t.hour12 = !0), new Intl.DateTimeFormat(s, t);
45
- }, [s, r]), P = c != null ? F.format(c) : R;
46
- function O(t) {
45
+ }, [s, r]), F = c != null ? C.format(c) : R;
46
+ function P(t) {
47
47
  a(t.currentTarget);
48
48
  }
49
49
  function e() {
@@ -54,7 +54,7 @@ import '../../date_picker_input.css';const U = "_button_f404820", X = "_popover_
54
54
  n != null && i.current && i.current.focus();
55
55
  });
56
56
  }, [n]);
57
- function _(t) {
57
+ function O(t) {
58
58
  t.key === "Escape" && e();
59
59
  }
60
60
  function I() {
@@ -67,20 +67,20 @@ import '../../date_picker_input.css';const U = "_button_f404820", X = "_popover_
67
67
  function j(t, z, K) {
68
68
  w?.(t, z, K), e();
69
69
  }
70
- return /* @__PURE__ */ m(q, { children: [
70
+ return /* @__PURE__ */ u(q, { children: [
71
71
  /* @__PURE__ */ o(
72
72
  J,
73
73
  {
74
- ref: v,
75
- className: u(f.button, "select"),
74
+ ref: b,
75
+ className: m(f.button, "select"),
76
76
  hAlign: "start",
77
77
  disabled: l,
78
78
  hierarchy: A,
79
- onClick: O,
79
+ onClick: P,
80
80
  width: y,
81
81
  maxWidth: D,
82
- ...b,
83
- children: /* @__PURE__ */ o("span", { className: "ellipsis", children: P })
82
+ ..._,
83
+ children: /* @__PURE__ */ o("span", { className: "ellipsis", children: F })
84
84
  }
85
85
  ),
86
86
  /* @__PURE__ */ o(
@@ -95,16 +95,16 @@ import '../../date_picker_input.css';const U = "_button_f404820", X = "_popover_
95
95
  horizontalAnchor: "start",
96
96
  verticalOrigin: "top",
97
97
  horizontalOrigin: "start",
98
- open: C,
98
+ open: v,
99
99
  isClickAwayException: p,
100
100
  isScrollAwayException: p,
101
101
  restoreFocus: !0,
102
- children: /* @__PURE__ */ m(
102
+ children: /* @__PURE__ */ u(
103
103
  G,
104
104
  {
105
105
  padding: "8px",
106
- className: u(f.popover, "date-picker-popover"),
107
- onKeyDown: _,
106
+ className: m(f.popover, "date-picker-popover"),
107
+ onKeyDown: O,
108
108
  children: [
109
109
  /* @__PURE__ */ o(
110
110
  Q,
@@ -1,11 +1,11 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import { clsx as o } from "clsx";
3
- import f from "react";
4
- import '../../input.css';const c = "_input_a16553f", m = { input: c }, I = f.forwardRef(function({ type: i = "text", style: s, className: n, width: r, height: l, onChange: a, ...t }, u) {
2
+ import { clsx as f } from "clsx";
3
+ import o from "react";
4
+ import '../../input.css';const c = "_input_a16553f", m = { input: c }, y = o.forwardRef(function({ type: i = "text", style: s, className: n, width: r, height: l, onChange: a, ...t }, u) {
5
5
  return /* @__PURE__ */ d(
6
6
  "input",
7
7
  {
8
- className: o(m.input, n, "input"),
8
+ className: f(m.input, n, "input"),
9
9
  type: i,
10
10
  ref: u,
11
11
  "data-is-disabled": t.disabled || !1,
@@ -19,6 +19,6 @@ import '../../input.css';const c = "_input_a16553f", m = { input: c }, I = f.for
19
19
  );
20
20
  });
21
21
  export {
22
- I as Input
22
+ y as Input
23
23
  };
24
24
  //# sourceMappingURL=input.js.map
@@ -2,12 +2,12 @@ import { jsx as L } from "react/jsx-runtime";
2
2
  import "../../utils/click_away_listener.js";
3
3
  import "../../utils/focus_redirect.js";
4
4
  import "../../utils/scroll_away_listener.js";
5
- import j, { useRef as e } from "react";
6
- import { useForkRef as B } from "../../utils/hooks/use_fork_ref.js";
5
+ import _, { useRef as e } from "react";
6
+ import { useForkRef as j } from "../../utils/hooks/use_fork_ref.js";
7
7
  import "../../utils/hooks/use_resize_observer.js";
8
- import { Input as D } from "../input/input.js";
9
- const O = j.forwardRef(function({ onKeyCapture: n, onKeyDown: m, onInput: d, ...E }, v) {
10
- const p = e(0), c = e(0), r = e(0), u = e(0), x = e(0), o = e(0), i = e(null), P = B(v, i);
8
+ import { Input as B } from "../input/input.js";
9
+ const N = _.forwardRef(function({ onKeyCapture: n, onKeyDown: m, onInput: d, ...E }, v) {
10
+ const p = e(0), c = e(0), r = e(0), u = e(0), x = e(0), o = e(0), i = e(null), P = j(v, i);
11
11
  function g(f) {
12
12
  const t = i.current;
13
13
  t != null && (p.current = t.value.length, c.current = t.selectionStart == null ? 0 : t.selectionStart, r.current = t.selectionEnd == null ? 0 : t.selectionEnd, o.current = r.current, u.current = Math.min(
@@ -71,9 +71,9 @@ const O = j.forwardRef(function({ onKeyCapture: n, onKeyDown: m, onInput: d, ...
71
71
  }
72
72
  d && d(f);
73
73
  }
74
- return /* @__PURE__ */ L(D, { ref: P, onKeyDown: g, onInput: I, ...E });
74
+ return /* @__PURE__ */ L(B, { ref: P, onKeyDown: g, onInput: I, ...E });
75
75
  });
76
76
  export {
77
- O as KeyCaptureInput
77
+ N as KeyCaptureInput
78
78
  };
79
79
  //# sourceMappingURL=key_capture_input.js.map
@@ -6,8 +6,8 @@ import "../../utils/scroll_away_listener.js";
6
6
  import A, { useRef as I, useState as j, useLayoutEffect as p } from "react";
7
7
  import { useForkRef as K } from "../../utils/hooks/use_fork_ref.js";
8
8
  import "../../utils/hooks/use_resize_observer.js";
9
- import { KeyCaptureInput as F } from "./key_capture_input.js";
10
- import { MaskPresenter as _ } from "./mask_presenter.js";
9
+ import { KeyCaptureInput as _ } from "./key_capture_input.js";
10
+ import { MaskPresenter as F } from "./mask_presenter.js";
11
11
  const Y = A.forwardRef(
12
12
  function({
13
13
  value: m = "",
@@ -21,7 +21,7 @@ const Y = A.forwardRef(
21
21
  prepareCopyValue: y = (i) => i,
22
22
  ...C
23
23
  }, E) {
24
- const i = Array.isArray(c) ? c : [c], f = I(null), D = K(E, f), [e] = j(() => new _(i)), P = B(e.valueBroadcast);
24
+ const i = Array.isArray(c) ? c : [c], f = I(null), D = K(E, f), [e] = j(() => new F(i)), P = B(e.valueBroadcast);
25
25
  B(e.maskConfigsBroadcast);
26
26
  function T(t, s, n, o, l, r) {
27
27
  switch (n != null ? e.setSelection(n.start, n.end) : e.forceMoveCursorTo(o), s) {
@@ -103,7 +103,7 @@ const Y = A.forwardRef(
103
103
  document.removeEventListener("selectionchange", l), document.removeEventListener("mousedown", n), document.removeEventListener("keydown", o);
104
104
  };
105
105
  }, [e]), /* @__PURE__ */ V(
106
- F,
106
+ _,
107
107
  {
108
108
  value: P,
109
109
  ref: D,
@@ -1,12 +1,12 @@
1
1
  import { jsx as t, jsxs as h, Fragment as C } from "react/jsx-runtime";
2
- import O, { useState as N } from "react";
2
+ import O, { useState as _ } from "react";
3
3
  import { ComboBox as v } from "../combo_box/combo_box.js";
4
- import { MultiselectInlineValues as R } from "../multiselect/multiselect_inline_values.js";
5
- import { MultiselectValues as T } from "../multiselect/multiselect_values.js";
6
- import { makeAvailableOptions as g } from "../options/utils.js";
7
- import { Option as j } from "../options/option.js";
8
- import { clsx as k } from "clsx";
9
- import { VStack as _ } from "../../stacks/v_stack.js";
4
+ import { MultiselectInlineValues as N } from "../multiselect/multiselect_inline_values.js";
5
+ import { MultiselectValues as R } from "../multiselect/multiselect_values.js";
6
+ import { makeAvailableOptions as T } from "../options/utils.js";
7
+ import { Option as g } from "../options/option.js";
8
+ import { clsx as j } from "clsx";
9
+ import { VStack as k } from "../../stacks/v_stack.js";
10
10
  import '../../multi_combo_box.css';const E = "_multi-combo-box-container_9528df3", F = { "multi-combo-box-container": E }, P = O.forwardRef(function({
11
11
  value: e = [],
12
12
  children: M,
@@ -19,11 +19,11 @@ import '../../multi_combo_box.css';const E = "_multi-combo-box-container_9528df3
19
19
  inputProps: m,
20
20
  ...y
21
21
  }, S) {
22
- const [f, l] = N(""), p = O.Children.toArray(
22
+ const [f, l] = _(""), u = O.Children.toArray(
23
23
  M
24
- ), u = g(p, e), d = e.map((o) => {
25
- const i = p.find((a) => a.props.value === o);
26
- return i ?? /* @__PURE__ */ t(j, { value: o, label: o, children: o });
24
+ ), p = T(u, e), d = e.map((o) => {
25
+ const i = u.find((a) => a.props.value === o);
26
+ return i ?? /* @__PURE__ */ t(g, { value: o, label: o, children: o });
27
27
  });
28
28
  function x(o) {
29
29
  if (e.indexOf(o.props.value) > -1) {
@@ -49,11 +49,11 @@ import '../../multi_combo_box.css';const E = "_multi-combo-box-container_9528df3
49
49
  noOptionMatchedMessage: "Press Enter To Add",
50
50
  placeholder: "Type to Add",
51
51
  ...m,
52
- children: u
52
+ children: p
53
53
  }
54
54
  ),
55
55
  /* @__PURE__ */ t(
56
- R,
56
+ N,
57
57
  {
58
58
  values: d,
59
59
  disabled: n,
@@ -61,11 +61,11 @@ import '../../multi_combo_box.css';const E = "_multi-combo-box-container_9528df3
61
61
  }
62
62
  )
63
63
  ] }) : /* @__PURE__ */ h(
64
- _,
64
+ k,
65
65
  {
66
66
  ref: S,
67
67
  ...y,
68
- className: k(F["multi-combo-box-container"], A),
68
+ className: j(F["multi-combo-box-container"], A),
69
69
  children: [
70
70
  /* @__PURE__ */ t(
71
71
  v,
@@ -79,11 +79,11 @@ import '../../multi_combo_box.css';const E = "_multi-combo-box-container_9528df3
79
79
  noOptionMatchedMessage: "No Options Matched",
80
80
  placeholder: "Type to Search or Add",
81
81
  ...m,
82
- children: u
82
+ children: p
83
83
  }
84
84
  ),
85
85
  /* @__PURE__ */ t(
86
- T,
86
+ R,
87
87
  {
88
88
  values: d,
89
89
  onRemove: x,
@@ -1,9 +1,9 @@
1
- import { jsxs as v, Fragment as j, jsx as l } from "react/jsx-runtime";
2
- import A, { useRef as V, useLayoutEffect as q } from "react";
3
- import { Spacer as C } from "../../stacks/spacer.js";
4
- import { VStack as E } from "../../stacks/v_stack.js";
5
- import { MultiselectInlineValues as N } from "./multiselect_inline_values.js";
6
- import { MultiselectValues as _ } from "./multiselect_values.js";
1
+ import { jsxs as v, Fragment as w, jsx as l } from "react/jsx-runtime";
2
+ import A, { useRef as V, useLayoutEffect as j } from "react";
3
+ import { Spacer as q } from "../../stacks/spacer.js";
4
+ import { VStack as C } from "../../stacks/v_stack.js";
5
+ import { MultiselectInlineValues as E } from "./multiselect_inline_values.js";
6
+ import { MultiselectValues as N } from "./multiselect_values.js";
7
7
  import { makeAvailableOptions as g, makeValuesAsOptions as I } from "../options/utils.js";
8
8
  import { Select as S } from "../select/select.js";
9
9
  import "../../utils/click_away_listener.js";
@@ -26,7 +26,7 @@ import '../../multiselect.css';const $ = "_multiselect-container_009951a", z = {
26
26
  const r = V(null), F = L(m, r), c = e[e.length - 1] || null, O = V(null), f = A.Children.toArray(
27
27
  x
28
28
  ), p = g(f, e), d = I(f, e);
29
- q(() => {
29
+ j(() => {
30
30
  const t = O.current;
31
31
  c != null && t != null && (t.querySelector(`[data-value='${c}']`)?.focus(), requestAnimationFrame(() => {
32
32
  r.current && r.current.focus();
@@ -37,11 +37,11 @@ import '../../multiselect.css';const $ = "_multiselect-container_009951a", z = {
37
37
  }
38
38
  function R(t) {
39
39
  if (e.indexOf(t.props.value) > -1) {
40
- const M = e.filter((w) => w !== t.props.value);
40
+ const M = e.filter((_) => _ !== t.props.value);
41
41
  n && n(M);
42
42
  }
43
43
  }
44
- return y ? /* @__PURE__ */ v(j, { children: [
44
+ return y ? /* @__PURE__ */ v(w, { children: [
45
45
  /* @__PURE__ */ l(
46
46
  S,
47
47
  {
@@ -55,9 +55,9 @@ import '../../multiselect.css';const $ = "_multiselect-container_009951a", z = {
55
55
  children: p
56
56
  }
57
57
  ),
58
- /* @__PURE__ */ l(C, { width: "8px" }),
58
+ /* @__PURE__ */ l(q, { width: "8px" }),
59
59
  /* @__PURE__ */ l(
60
- N,
60
+ E,
61
61
  {
62
62
  values: d,
63
63
  onRemove: R,
@@ -65,7 +65,7 @@ import '../../multiselect.css';const $ = "_multiselect-container_009951a", z = {
65
65
  }
66
66
  )
67
67
  ] }) : /* @__PURE__ */ v(
68
- E,
68
+ C,
69
69
  {
70
70
  width: s,
71
71
  minWidth: i,
@@ -88,7 +88,7 @@ import '../../multiselect.css';const $ = "_multiselect-container_009951a", z = {
88
88
  }
89
89
  ),
90
90
  /* @__PURE__ */ l(
91
- _,
91
+ N,
92
92
  {
93
93
  disabled: o,
94
94
  values: d,
@@ -3,21 +3,21 @@ import R from "react";
3
3
  import { useSignalValue as p } from "@tcn/state";
4
4
  import { HField as E } from "../../form/field/h_field/h_field.js";
5
5
  import { Multiselect as S } from "./multiselect.js";
6
- const C = R.forwardRef(function({ presenter: r, children: c, id: u, ...m }, d) {
6
+ const j = R.forwardRef(function({ presenter: r, children: c, id: u, ...m }, d) {
7
7
  let n = [];
8
- const s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), f = p(r.optionsBroadcast), { value: g, label: M, description: w, error: v } = p(r.stateBroadcast), V = f.map((e, o) => {
8
+ const a = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), f = p(r.optionsBroadcast), { value: g, label: M, description: w, error: v } = p(r.stateBroadcast), V = f.map((e, o) => {
9
9
  const t = c(e, o);
10
- return s.set(e, t.props.value), a.set(t.props.value, e), t;
10
+ return a.set(e, t.props.value), l.set(t.props.value, e), t;
11
11
  });
12
12
  function h(e) {
13
13
  const o = e.map((t) => {
14
- const l = a.get(t);
15
- if (l == null) throw new Error(`Invalid value: ${t}`);
16
- return l;
14
+ const s = l.get(t);
15
+ if (s == null) throw new Error(`Invalid value: ${t}`);
16
+ return s;
17
17
  });
18
18
  o && r.setValue(o);
19
19
  }
20
- return n = g.map((e) => s.get(e) || "") || [], /* @__PURE__ */ i(
20
+ return n = g.map((e) => a.get(e) || "") || [], /* @__PURE__ */ i(
21
21
  E,
22
22
  {
23
23
  id: u,
@@ -30,6 +30,6 @@ const C = R.forwardRef(function({ presenter: r, children: c, id: u, ...m }, d) {
30
30
  );
31
31
  });
32
32
  export {
33
- C as MultiselectRow
33
+ j as MultiselectRow
34
34
  };
35
35
  //# sourceMappingURL=multiselect_row.js.map
@@ -14,13 +14,13 @@ import { countriesPhoneInformation as $ } from "./countries_phone_information.js
14
14
  import { NotebookIcon as Ie } from "@tcn/icons/notebook_icon.js";
15
15
  import { Option as F } from "../options/option.js";
16
16
  import { SuggestionList as Ne } from "../suggestions/suggestion_list.js";
17
- import { stripNonNumericAfterCountryCode as S } from "./utils.js";
17
+ import { stripNonNumericAfterCountryCode as _ } from "./utils.js";
18
18
  import "../../utils/click_away_listener.js";
19
19
  import "../../utils/focus_redirect.js";
20
20
  import "../../utils/scroll_away_listener.js";
21
21
  import { useForkRef as ye } from "../../utils/hooks/use_fork_ref.js";
22
22
  import "../../utils/hooks/use_resize_observer.js";
23
- import '../../phone_number_input.css';const xe = "_phone-number-input_5c4483d", ge = "_phone-number-input-select_a7b33ac", Pe = "_phone-number-input-input_5b14556", Se = "_phone-number-input-phone-book-popover_1511f35", _e = "_phone-number-input-phone-book_7999ca1", Be = "_phone-number-input-obfuscated_5a0ed8c", f = { "phone-number-input": xe, "phone-number-input-select": ge, "phone-number-input-input": Pe, "phone-number-input-phone-book-popover": Se, "phone-number-input-phone-book": _e, "phone-number-input-obfuscated": Be }, Oe = "•";
23
+ import '../../phone_number_input.css';const xe = "_phone-number-input_5c4483d", ge = "_phone-number-input-select_a7b33ac", Pe = "_phone-number-input-input_5b14556", _e = "_phone-number-input-phone-book-popover_1511f35", Se = "_phone-number-input-phone-book_7999ca1", Be = "_phone-number-input-obfuscated_5a0ed8c", f = { "phone-number-input": xe, "phone-number-input-select": ge, "phone-number-input-input": Pe, "phone-number-input-phone-book-popover": _e, "phone-number-input-phone-book": Se, "phone-number-input-obfuscated": Be }, Oe = "•";
24
24
  function Ve(o) {
25
25
  return o.map((n) => ({
26
26
  ...n,
@@ -66,7 +66,7 @@ function Me(o) {
66
66
  n.value
67
67
  ));
68
68
  }
69
- function _(o, n, r) {
69
+ function S(o, n, r) {
70
70
  for (let h = 5; h > 1; h--) {
71
71
  const c = o.slice(0, h), u = B.get(c);
72
72
  if (u != null) {
@@ -93,13 +93,13 @@ const Ye = me.forwardRef(function({
93
93
  }, ne) {
94
94
  const N = Y(n), [j, V] = m(
95
95
  null
96
- ), z = j != null, [b, M] = m(c), H = _(
96
+ ), z = j != null, [b, M] = m(c), H = S(
97
97
  n,
98
98
  b,
99
99
  c
100
100
  ), [y, x] = m(() => {
101
101
  const e = n.split(H.prefix)[1];
102
- return e == null ? "" : S(e);
102
+ return e == null ? "" : _(e);
103
103
  }), D = Z(() => fe.toArray(T).filter(
104
104
  (e) => he(e) && e.type === F
105
105
  ), [T]), R = D.length > 0, [C, g] = m(H.code), [W, P] = m([
@@ -109,11 +109,11 @@ const Ye = me.forwardRef(function({
109
109
  const t = k.get(e);
110
110
  if (t == null || (g(t.code), P([...t.masks]), M(t.code), y == null))
111
111
  return;
112
- const p = `${t.prefix}${S(y)}`;
112
+ const p = `${t.prefix}${_(y)}`;
113
113
  N.current = p, u && u(p, !1);
114
114
  }
115
115
  A(() => {
116
- const e = _(
116
+ const e = S(
117
117
  n,
118
118
  b,
119
119
  c
@@ -121,7 +121,7 @@ const Ye = me.forwardRef(function({
121
121
  g(e.code), P([...e.masks]), M(e.code);
122
122
  }, [n, b, c]);
123
123
  function ue(e) {
124
- const t = k.get(C)?.prefix, p = S(e), s = t + p;
124
+ const t = k.get(C)?.prefix, p = _(e), s = t + p;
125
125
  a && E(!1), N.current = s, y !== e && x(e), u && u(s, !1);
126
126
  }
127
127
  function se(e) {
@@ -135,7 +135,7 @@ const Ye = me.forwardRef(function({
135
135
  }
136
136
  function ce(e) {
137
137
  if (e.startsWith("+")) {
138
- const t = _(
138
+ const t = S(
139
139
  e,
140
140
  b,
141
141
  c
@@ -148,12 +148,12 @@ const Ye = me.forwardRef(function({
148
148
  }
149
149
  function ae(e) {
150
150
  G(!0), E(!1), x(e);
151
- const t = k.get(C)?.prefix, p = S(e), s = t + p;
151
+ const t = k.get(C)?.prefix, p = _(e), s = t + p;
152
152
  N.current = s, u && u(s, !1);
153
153
  }
154
154
  const w = be(
155
155
  (e, t = !1) => {
156
- const p = N.current, s = _(
156
+ const p = N.current, s = S(
157
157
  e,
158
158
  b,
159
159
  c
@@ -3,32 +3,32 @@ import { clsx as x } from "clsx";
3
3
  import h from "react";
4
4
  import { HStack as p } from "../../stacks/h_stack.js";
5
5
  import '../../radio.css';const y = "_radio_ce5c4e1", R = { radio: y };
6
- let g = 0;
7
- function k(o) {
8
- return o ?? `radio-${g++}`;
6
+ let _ = 0;
7
+ function g(o) {
8
+ return o ?? `radio-${_++}`;
9
9
  }
10
- const C = h.forwardRef(function({
10
+ const j = h.forwardRef(function({
11
11
  name: l,
12
12
  id: s,
13
13
  label: a,
14
14
  className: c,
15
15
  checked: r,
16
16
  backgroundColor: u,
17
- value: m,
17
+ value: f,
18
18
  onChange: e,
19
19
  ...t
20
- }, f) {
21
- const d = k(s);
20
+ }, m) {
21
+ const d = g(s);
22
22
  return /* @__PURE__ */ b(p, { inline: !0, width: "auto", children: [
23
23
  /* @__PURE__ */ n(
24
24
  "input",
25
25
  {
26
- ref: f,
26
+ ref: m,
27
27
  className: x(c, R.radio, "radio"),
28
28
  type: "radio",
29
29
  id: d,
30
30
  name: l,
31
- value: m,
31
+ value: f,
32
32
  style: { backgroundColor: u },
33
33
  checked: r,
34
34
  "data-checked": r,
@@ -52,6 +52,6 @@ const C = h.forwardRef(function({
52
52
  ] });
53
53
  });
54
54
  export {
55
- C as Radio
55
+ j as Radio
56
56
  };
57
57
  //# sourceMappingURL=radio.js.map
@@ -4,14 +4,14 @@ import r, { useState as c } from "react";
4
4
  import { HField as d } from "../../form/field/h_field/h_field.js";
5
5
  import { FieldPresenter as R } from "../../form/field_presenters/field_presenter.js";
6
6
  function C({ presenter: t, id: n, ...a }) {
7
- const [o] = c(() => t ?? new R("Label", "")), { label: i, value: s, description: l, error: m } = f(
7
+ const [o] = c(() => t ?? new R("Label", "")), { label: i, value: s, description: l, error: u } = f(
8
8
  o.stateBroadcast
9
- ), u = r.Children.map(a.children, (e) => !r.isValidElement(e) || e.type !== "Radio" ? e : r.cloneElement(e, {
9
+ ), m = r.Children.map(a.children, (e) => !r.isValidElement(e) || e.type !== "Radio" ? e : r.cloneElement(e, {
10
10
  ...e.props,
11
11
  checked: s === e.props,
12
12
  onChange: o.setValue
13
13
  }));
14
- return /* @__PURE__ */ p(d, { id: n, label: i, description: l, errorMessage: m, children: u });
14
+ return /* @__PURE__ */ p(d, { id: n, label: i, description: l, errorMessage: u, children: m });
15
15
  }
16
16
  export {
17
17
  C as RadioRow