@companix/uikit 0.0.60 → 0.0.61

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 (42) hide show
  1. package/dist/Select/OptionsPopover.d.ts +41 -0
  2. package/dist/Select/SelectInput.d.ts +2 -1
  3. package/dist/Select/index.d.ts +5 -8
  4. package/dist/SelectTags/index.d.ts +7 -12
  5. package/dist/bundle.es12.js +74 -61
  6. package/dist/bundle.es13.js +2 -2
  7. package/dist/bundle.es15.js +1 -1
  8. package/dist/bundle.es21.js +1 -1
  9. package/dist/bundle.es22.js +1 -1
  10. package/dist/bundle.es23.js +1 -1
  11. package/dist/bundle.es26.js +1 -1
  12. package/dist/bundle.es27.js +81 -80
  13. package/dist/bundle.es28.js +4 -4
  14. package/dist/bundle.es29.js +2 -2
  15. package/dist/bundle.es32.js +2 -2
  16. package/dist/bundle.es36.js +1 -1
  17. package/dist/bundle.es40.js +1 -1
  18. package/dist/bundle.es41.js +1 -1
  19. package/dist/bundle.es42.js +1 -1
  20. package/dist/bundle.es48.js +39 -40
  21. package/dist/bundle.es50.js +66 -31
  22. package/dist/bundle.es51.js +24 -4
  23. package/dist/bundle.es52.js +35 -20
  24. package/dist/bundle.es53.js +5 -39
  25. package/dist/bundle.es54.js +14 -5
  26. package/dist/bundle.es55.js +13 -13
  27. package/dist/bundle.es56.js +69 -13
  28. package/dist/bundle.es57.js +66 -68
  29. package/dist/bundle.es58.js +69 -67
  30. package/dist/bundle.es59.js +10 -69
  31. package/dist/bundle.es60.js +42 -10
  32. package/dist/bundle.es61.js +14 -42
  33. package/dist/bundle.es62.js +32 -15
  34. package/dist/bundle.es63.js +61 -23
  35. package/dist/bundle.es64.js +13 -69
  36. package/dist/bundle.es65.js +74 -13
  37. package/dist/bundle.es66.js +45 -71
  38. package/dist/bundle.es67.js +13 -48
  39. package/package.json +1 -1
  40. package/dist/Select/SelectLoader.d.ts +0 -1
  41. package/dist/Select/SelectOptions.d.ts +0 -19
  42. package/dist/bundle.es68.js +0 -16
@@ -0,0 +1,41 @@
1
+ import { Option } from '..';
2
+ export interface UseOptionsResponse<T> {
3
+ options: Option<T>[];
4
+ isLoading: boolean;
5
+ }
6
+ interface HookControlled<T> {
7
+ useOptions: () => UseOptionsResponse<T>;
8
+ defaultOptions?: Option<T>[];
9
+ options?: undefined;
10
+ }
11
+ interface PropsProvided<T> {
12
+ defaultOptions?: undefined;
13
+ useOptions?: undefined;
14
+ options: Option<T>[];
15
+ }
16
+ export type OptionsSource<T> = HookControlled<T> | PropsProvided<T>;
17
+ export type OptionsSourceControl<T> = OptionsSource<T> & {
18
+ onOptionsLoaded?: (options: Option<T>[]) => void;
19
+ };
20
+ export interface SelectAddOption {
21
+ text: string;
22
+ closeOnClick?: boolean;
23
+ onClick: () => void;
24
+ }
25
+ interface InternalListProps<T> {
26
+ options: Option<T>[];
27
+ scrollboxRef?: React.RefObject<HTMLDivElement>;
28
+ optionsWrapperRef?: React.RefObject<HTMLDivElement>;
29
+ isActive: (value: T) => boolean;
30
+ onSelect?: (value: T) => void;
31
+ onOpened?: (activeIndex: number) => void;
32
+ filterOptions?: (option: Option<T>) => boolean;
33
+ disableFiltering?: boolean;
34
+ minimalOptions?: boolean;
35
+ addOption?: SelectAddOption;
36
+ emptyText?: string;
37
+ }
38
+ export type OptionsPopoverProps<T> = OptionsSourceControl<T> & Omit<InternalListProps<T>, 'options'>;
39
+ export declare const OptionsPopover: <T>(props: OptionsPopoverProps<T>) => import("react/jsx-runtime").JSX.Element;
40
+ export declare const SelectOptionsList: <T>(props: InternalListProps<T>) => import("react/jsx-runtime").JSX.Element;
41
+ export {};
@@ -1,4 +1,4 @@
1
- export interface SelectFormProps extends React.HTMLAttributes<HTMLDivElement> {
1
+ export interface SelectFormProps {
2
2
  required?: boolean;
3
3
  disabled?: boolean;
4
4
  className?: string;
@@ -11,5 +11,6 @@ export interface SelectFormProps extends React.HTMLAttributes<HTMLDivElement> {
11
11
  clearButtonIcon?: boolean;
12
12
  inputRef?: React.Ref<HTMLInputElement>;
13
13
  onClear?: (event: React.MouseEvent<HTMLButtonElement>) => void;
14
+ onClick?: () => void;
14
15
  }
15
16
  export declare const SelectInput: import('react').ForwardRefExoticComponent<SelectFormProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,5 @@
1
- import { Option } from '../types';
2
1
  import { SelectFormProps } from './SelectInput';
3
- import { SelectAddOption } from './SelectOptions';
2
+ import { OptionsSource, SelectAddOption } from './OptionsPopover';
4
3
  interface Cleanable<T> {
5
4
  clearButton: true;
6
5
  onChange: (event: T | null) => void;
@@ -11,20 +10,18 @@ interface UnCleanable<T> {
11
10
  }
12
11
  type DependedValueType<T> = Cleanable<T> | UnCleanable<T>;
13
12
  export interface SelectParams {
14
- minimalOptions?: boolean;
15
13
  matchTarget?: 'width' | 'min-width';
16
14
  popoverRef?: React.Ref<HTMLDivElement>;
17
15
  scrollRef?: React.Ref<{
18
16
  scrollTo: (index: number) => void;
19
17
  }>;
20
- addOption?: SelectAddOption;
21
- isLoading?: boolean;
22
18
  emptyText?: string;
19
+ minimalOptions?: boolean;
20
+ addOption?: SelectAddOption;
23
21
  }
24
- export type SelectProps<T> = Omit<SelectFormProps, 'value' | 'onChange' | 'closeButton'> & DependedValueType<T> & SelectParams & {
22
+ export type SelectProps<T> = Omit<SelectFormProps, 'value' | 'onChange' | 'closeButton'> & DependedValueType<T> & SelectParams & OptionsSource<T> & {
25
23
  value: T | null;
26
- options: Option<T>[];
27
24
  children?: React.ReactNode;
28
25
  };
29
- export declare const Select: <T>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const Select: <T extends string | number>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
30
27
  export {};
@@ -1,23 +1,18 @@
1
- import { Option } from '../types';
2
- import { SelectAddOption } from '../Select/SelectOptions';
3
- export interface SelectTagsProps<T> {
4
- options: Option<T>[];
5
- onChange: (event: T[]) => void;
1
+ import { OptionsSource, SelectAddOption } from '../Select/OptionsPopover';
2
+ export type SelectTagsProps<T> = OptionsSource<T> & {
3
+ closeAfterSelect?: boolean;
6
4
  onInputChange?: (text: string) => void;
7
- onPopoverOpen?: (open: boolean) => void;
5
+ onChange: (event: T[]) => void;
8
6
  placeholder?: string;
9
7
  value: T[];
10
- children?: React.ReactNode;
11
8
  disabled?: boolean;
12
9
  readOnly?: boolean;
13
- closeAfterSelect?: boolean;
14
- emptyText?: string;
15
10
  size?: 'sm' | 'md' | 'lg';
16
11
  fill?: boolean;
17
- minimalOptions?: boolean;
18
12
  inputRef?: React.Ref<HTMLInputElement>;
19
13
  required?: boolean;
20
- isLoading?: boolean;
14
+ minimalOptions?: boolean;
21
15
  addOption?: SelectAddOption;
22
- }
16
+ emptyText?: string;
17
+ };
23
18
  export declare const SelectTags: <T extends string | number>(props: SelectTagsProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,83 +1,96 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { useMemo as I, useImperativeHandle as b } from "react";
3
- import { Popover as z } from "./bundle.es10.js";
4
- import { useFroozeClosing as B } from "./bundle.es47.js";
5
- import { SelectInput as D } from "./bundle.es48.js";
6
- import { useScrollListController as j } from "./bundle.es49.js";
7
- import { SelectOptionsList as w } from "./bundle.es50.js";
8
- import { mergeRefs as y } from "react-merge-refs";
9
- import { SelectLoader as H } from "./bundle.es51.js";
10
- const U = (a) => {
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { useMemo as L, useImperativeHandle as j } from "react";
3
+ import { Popover as k } from "./bundle.es10.js";
4
+ import { useFroozeClosing as q } from "./bundle.es47.js";
5
+ import { SelectInput as w } from "./bundle.es48.js";
6
+ import { useScrollListController as H } from "./bundle.es49.js";
7
+ import { OptionsPopover as M } from "./bundle.es50.js";
8
+ import { mergeRefs as N } from "react-merge-refs";
9
+ const Y = (t) => {
11
10
  const {
12
- options: t,
13
- onChange: l,
14
- value: i,
15
- minimalOptions: m,
16
- matchTarget: f = "width",
17
- children: u,
18
- disabled: p,
19
- scrollRef: d,
20
- popoverRef: v,
11
+ onChange: i,
12
+ value: r,
13
+ matchTarget: u = "width",
14
+ children: f,
15
+ scrollRef: m,
16
+ popoverRef: d,
21
17
  clearButton: s,
22
- emptyText: h,
23
- addOption: x,
24
- isLoading: R,
25
- ...g
26
- } = a, n = I(() => {
27
- const o = i === null ? -1 : t.findIndex((e) => e.value === i);
28
- return {
29
- index: o,
30
- option: t[o]
31
- };
32
- }, [t, i]), C = n.option?.value ?? null, { popoverRef: O, froozePopoverPosition: P, handleAnimationEnd: S } = B(), { scrollToElement: c, optionsWrapperRef: A, scrollBoxRef: L } = j();
33
- b(d, () => ({
18
+ // select props
19
+ disabled: a,
20
+ required: v,
21
+ className: h,
22
+ clearButtonIcon: O,
23
+ leftElement: C,
24
+ inputRef: R,
25
+ onClear: W,
26
+ fill: P,
27
+ size: g,
28
+ placeholder: E,
29
+ onClick: A,
30
+ // options popover
31
+ ...S
32
+ } = t, p = L(() => {
33
+ const o = {};
34
+ return (t.options ?? t.defaultOptions ?? []).forEach((n) => {
35
+ o[n.value] = n;
36
+ }), o;
37
+ }, [t.options, t.defaultOptions]), x = r === null ? null : p[r] ?? null, { popoverRef: z, froozePopoverPosition: B, handleAnimationEnd: F } = q(), { scrollToElement: c, optionsWrapperRef: I, scrollBoxRef: T } = H();
38
+ j(m, () => ({
34
39
  scrollTo: (o) => c(o, "top")
35
40
  }));
36
- const T = (o, e) => {
37
- P(), l(o), e();
38
- }, E = (o) => {
39
- o.stopPropagation(), s && l(null);
40
- }, F = () => {
41
- n.index !== -1 && c(n.index, "center");
41
+ const b = (o, e) => {
42
+ B(), i(o), e();
43
+ }, D = (o) => {
44
+ o.stopPropagation(), s && i(null);
42
45
  };
43
- return /* @__PURE__ */ r(
44
- z,
46
+ return /* @__PURE__ */ l(
47
+ k,
45
48
  {
46
49
  minimal: !0,
47
- ref: y([O, v]),
50
+ ref: N([z, d]),
48
51
  sideOffset: 0,
49
- matchTarget: f,
50
- onAnimationEnd: S,
52
+ matchTarget: u,
53
+ onAnimationEnd: F,
51
54
  onOpenAutoFocus: (o) => o.preventDefault(),
52
55
  onCloseAutoFocus: (o) => o.preventDefault(),
53
- disabled: p,
54
- content: ({ close: o }) => R ? /* @__PURE__ */ r(H, {}) : /* @__PURE__ */ r(
55
- w,
56
+ disabled: a,
57
+ content: ({ close: o }) => /* @__PURE__ */ l(
58
+ M,
56
59
  {
57
- options: t,
58
- isActive: (e) => e === C,
59
- emptyText: h,
60
- scrollboxRef: L,
61
- optionsWrapperRef: A,
62
- minimalOptions: m,
63
- addOption: x,
64
- onOpened: F,
65
- onSelect: (e) => T(e, o)
60
+ ...S,
61
+ isActive: (e) => e === r,
62
+ onSelect: (e) => b(e, o),
63
+ scrollboxRef: T,
64
+ optionsWrapperRef: I,
65
+ onOpened: (e) => c(e, "center"),
66
+ onOptionsLoaded: (e) => {
67
+ e.forEach((n) => {
68
+ p[n.value] = n;
69
+ });
70
+ }
66
71
  }
67
72
  ),
68
- children: u ?? /* @__PURE__ */ r(
69
- D,
73
+ children: f ?? /* @__PURE__ */ l(
74
+ w,
70
75
  {
71
- ...g,
72
- disabled: p,
76
+ required: v,
77
+ className: h,
78
+ leftElement: C,
79
+ inputRef: R,
80
+ onClear: D,
81
+ fill: P,
82
+ size: g,
83
+ placeholder: E,
84
+ onClick: A,
85
+ disabled: a,
73
86
  clearButton: s,
74
- value: n.option?.title ?? "",
75
- onClear: E
87
+ clearButtonIcon: O,
88
+ value: x?.title ?? ""
76
89
  }
77
90
  )
78
91
  }
79
92
  );
80
93
  };
81
94
  export {
82
- U as Select
95
+ Y as Select
83
96
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as b, useRef as R } from "react";
3
3
  import { mergeRefs as c } from "react-merge-refs";
4
- import { InputElement as x } from "./bundle.es52.js";
5
- import { InputContainer as I } from "./bundle.es53.js";
4
+ import { InputElement as x } from "./bundle.es51.js";
5
+ import { InputContainer as I } from "./bundle.es52.js";
6
6
  import g from "classnames";
7
7
  const N = b(
8
8
  ({
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import C from "classnames";
3
3
  import { forwardRef as j, useRef as w } from "react";
4
4
  import { mergeRefs as y } from "react-merge-refs";
5
- import { InputContainer as F } from "./bundle.es53.js";
5
+ import { InputContainer as F } from "./bundle.es52.js";
6
6
  import { NumericFormat as V } from "react-number-format";
7
7
  const D = j(
8
8
  ({
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import f from "classnames";
3
3
  import * as o from "@radix-ui/react-dialog";
4
4
  import { VisuallyHidden as a } from "@radix-ui/react-visually-hidden";
5
- import { RemoveListener as v } from "./bundle.es54.js";
5
+ import { RemoveListener as v } from "./bundle.es53.js";
6
6
  const g = (l) => {
7
7
  const { size: n = "s", open: r, onOpenChange: s, children: c, onClosed: t, disableEsc: p, className: d } = l, m = (h) => {
8
8
  p && h.preventDefault();
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import * as r from "@radix-ui/react-alert-dialog";
3
3
  import { Button as c } from "./bundle.es4.js";
4
- import { RemoveListener as N } from "./bundle.es54.js";
4
+ import { RemoveListener as N } from "./bundle.es53.js";
5
5
  import { VisuallyHidden as u } from "@radix-ui/react-visually-hidden";
6
6
  const C = ({
7
7
  open: d,
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { Button as m } from "./bundle.es4.js";
3
- import { useLoading as p } from "./bundle.es55.js";
3
+ import { useLoading as p } from "./bundle.es54.js";
4
4
  const g = ({ onClick: o, appearance: r = "primary", ...i }) => {
5
5
  const { isLoading: n, isError: t, handleClick: a } = p({ onClick: o });
6
6
  return /* @__PURE__ */ e(
@@ -1,5 +1,5 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
- import { useResizeTextarea as x } from "./bundle.es56.js";
2
+ import { useResizeTextarea as x } from "./bundle.es55.js";
3
3
  import { attr as e, callMultiple as u } from "@companix/utils-browser";
4
4
  import { useEffect as z } from "react";
5
5
  import { mergeRefs as R } from "react-merge-refs";
@@ -1,115 +1,116 @@
1
- import { jsx as n, jsxs as u } from "react/jsx-runtime";
2
- import { useFroozeClosing as B } from "./bundle.es47.js";
3
- import { Popover as X } from "./bundle.es10.js";
4
- import { useState as G, useRef as f, useMemo as d } from "react";
5
- import { Icon as h } from "./bundle.es33.js";
6
- import { attr as g, getActiveElementByAnotherElement as H, contains as J } from "@companix/utils-browser";
7
- import { mergeRefs as K } from "react-merge-refs";
8
- import { faXmark as Q, faChevronDown as U } from "@companix/icons-solid";
9
- import { matchPattern as W } from "@companix/utils-js";
10
- import { SelectOptionsList as Y } from "./bundle.es50.js";
11
- import { SelectLoader as Z } from "./bundle.es51.js";
12
- const ue = (v) => {
1
+ import { jsx as o, jsxs as p } from "react/jsx-runtime";
2
+ import { useFroozeClosing as M } from "./bundle.es47.js";
3
+ import { Popover as j } from "./bundle.es10.js";
4
+ import { useState as q, useRef as h, useMemo as V } from "react";
5
+ import { Icon as g } from "./bundle.es33.js";
6
+ import { attr as i, getActiveElementByAnotherElement as $, contains as B } from "@companix/utils-browser";
7
+ import { mergeRefs as L } from "react-merge-refs";
8
+ import { faXmark as X, faChevronDown as G } from "@companix/icons-solid";
9
+ import { OptionsPopover as H } from "./bundle.es50.js";
10
+ import { matchPattern as J } from "@companix/utils-js";
11
+ const ne = (a) => {
13
12
  const {
14
- options: r,
15
- closeAfterSelect: C,
16
- placeholder: x,
17
- onChange: s,
18
- onInputChange: N,
19
- emptyText: R,
20
- readOnly: l,
21
- size: A = "md",
22
- value: o,
23
- inputRef: O,
24
- onPopoverOpen: P,
25
- minimalOptions: z,
26
- isLoading: D,
27
- disabled: m,
28
- required: S,
29
- addOption: b
30
- } = v, [a, E] = G(""), i = f(null), k = f(null), { popoverRef: c, froozePopoverPosition: y, handleAnimationEnd: I } = B(), p = d(() => {
13
+ closeAfterSelect: v,
14
+ placeholder: C,
15
+ onChange: l,
16
+ onInputChange: x,
17
+ readOnly: c,
18
+ size: N = "md",
19
+ fill: O,
20
+ value: n,
21
+ inputRef: R,
22
+ disabled: u,
23
+ required: A,
24
+ // options popover
25
+ ...P
26
+ } = a, [f, b] = q(""), s = h(null), z = h(null), { popoverRef: d, froozePopoverPosition: D, handleAnimationEnd: E } = M(), S = (e) => n.includes(e) ? [...n] : [...n, e], k = (e) => n.filter((t) => e !== t), I = (e, t) => {
27
+ v ? (D(), l(e), t()) : l(e);
28
+ }, w = (e) => {
29
+ if (u) return;
30
+ d.current && d.current.getAttribute("data-state") === "open" && e.preventDefault();
31
+ const t = $(e.currentTarget);
32
+ e.defaultPrevented || B(e.currentTarget, t) || s.current && s.current.focus();
33
+ }, y = (e) => {
34
+ e.target !== s.current && e.preventDefault();
35
+ }, F = (e, t) => {
36
+ e.stopPropagation(), l(k(t));
37
+ }, T = ({ target: e }) => {
38
+ b(e.value), x?.(e.value);
39
+ }, m = V(() => {
31
40
  const e = {};
32
- return r.forEach((t) => {
33
- e[t.value] = t;
41
+ return (a.options ?? a.defaultOptions ?? []).forEach((r) => {
42
+ e[r.value] = r;
34
43
  }), e;
35
- }, [r]), T = (e) => o.includes(e) ? [...o] : [...o, e], w = (e) => o.filter((t) => e !== t), F = (e, t) => {
36
- C ? (y(), s(e), t()) : s(e);
37
- }, L = d(() => a.trim() ? r.filter(({ title: e }) => W(e, a)) : r, [a, r]), M = (e) => {
38
- if (m) return;
39
- c.current && c.current.getAttribute("data-state") === "open" && e.preventDefault();
40
- const t = H(e.currentTarget);
41
- e.defaultPrevented || J(e.currentTarget, t) || i.current && i.current.focus();
42
- }, j = (e) => {
43
- e.target !== i.current && e.preventDefault();
44
- }, q = (e, t) => {
45
- e.stopPropagation(), s(w(t));
46
- }, V = ({ target: e }) => {
47
- E(e.value), N?.(e.value);
48
- };
49
- return /* @__PURE__ */ n(
50
- X,
44
+ }, [a.options, a.defaultOptions]);
45
+ return /* @__PURE__ */ o(
46
+ j,
51
47
  {
52
48
  minimal: !0,
53
- ref: c,
49
+ ref: d,
54
50
  sideOffset: 0,
55
51
  matchTarget: "width",
56
- onAnimationEnd: I,
52
+ onAnimationEnd: E,
57
53
  onOpenAutoFocus: (e) => e.preventDefault(),
58
54
  onCloseAutoFocus: (e) => e.preventDefault(),
59
- onOpenChange: P,
60
- content: ({ close: e }) => D ? /* @__PURE__ */ n(Z, {}) : /* @__PURE__ */ n(
61
- Y,
55
+ content: ({ close: e }) => /* @__PURE__ */ o(
56
+ H,
62
57
  {
63
- isActive: (t) => o.includes(t),
64
- options: L,
65
- emptyText: R,
66
- onSelect: (t) => F(T(t), e),
67
- minimalOptions: z,
68
- addOption: b
58
+ ...P,
59
+ isActive: (t) => n.includes(t),
60
+ onSelect: (t) => I(S(t), e),
61
+ disableFiltering: !f.trim(),
62
+ filterOptions: ({ title: t }) => J(t, f),
63
+ onOptionsLoaded: (t) => {
64
+ t.forEach((r) => {
65
+ m[r.value] = r;
66
+ });
67
+ }
69
68
  }
70
69
  ),
71
- children: /* @__PURE__ */ n(
70
+ children: /* @__PURE__ */ o(
72
71
  "div",
73
72
  {
74
73
  className: "form",
75
- onClick: M,
76
- onMouseDown: j,
77
- "data-size": A,
78
- "data-required": g(S),
79
- children: /* @__PURE__ */ u("div", { className: "select-tags-container", children: [
80
- /* @__PURE__ */ u("div", { className: "select-tags", children: [
81
- o.length > 0 && /* @__PURE__ */ n(
74
+ onClick: w,
75
+ onMouseDown: y,
76
+ "data-size": N ?? "md",
77
+ "data-fill": i(O),
78
+ "data-required": i(A),
79
+ "data-disabled": i(u),
80
+ children: /* @__PURE__ */ p("div", { className: "select-tags-container", children: [
81
+ /* @__PURE__ */ p("div", { className: "select-tags", children: [
82
+ n.length > 0 && /* @__PURE__ */ o(
82
83
  "div",
83
84
  {
84
85
  className: "tag-container",
85
- ref: k,
86
+ ref: z,
86
87
  role: "listbox",
87
- "data-readonly": g(l),
88
- children: o.map((e, t) => p[e] ? /* @__PURE__ */ u("div", { className: "tag", children: [
89
- /* @__PURE__ */ n("span", { className: "tag-name", children: p[e].title }),
90
- /* @__PURE__ */ n("button", { className: "tag-close-button", onClick: ($) => q($, e), children: /* @__PURE__ */ n(h, { className: "tag-close-icon", icon: Q, size: "xxxs" }) })
88
+ "data-readonly": i(c),
89
+ children: n.map((e, t) => m[e] ? /* @__PURE__ */ p("div", { className: "tag", children: [
90
+ /* @__PURE__ */ o("span", { className: "tag-name", children: m[e].title }),
91
+ /* @__PURE__ */ o("button", { className: "tag-close-button", onClick: (r) => F(r, e), children: /* @__PURE__ */ o(g, { className: "tag-close-icon", icon: X, size: "xxxs" }) })
91
92
  ] }, `tag-option-${e}-${t}`) : null)
92
93
  }
93
94
  ),
94
- (!l || o.length === 0) && /* @__PURE__ */ n(
95
+ (!c || n.length === 0) && /* @__PURE__ */ o(
95
96
  "input",
96
97
  {
97
- ref: K([O, i]),
98
+ ref: L([R, s]),
98
99
  type: "text",
99
100
  autoCapitalize: "none",
100
101
  autoComplete: "off",
101
102
  autoCorrect: "off",
102
103
  className: "form-input",
103
104
  spellCheck: !1,
104
- value: a,
105
- disabled: m,
106
- readOnly: l,
107
- placeholder: x,
108
- onChange: V
105
+ value: f,
106
+ disabled: u,
107
+ readOnly: c,
108
+ placeholder: C,
109
+ onChange: T
109
110
  }
110
111
  )
111
112
  ] }),
112
- /* @__PURE__ */ n(h, { className: "expand-icon", icon: U, size: "xxxs" })
113
+ /* @__PURE__ */ o(g, { className: "expand-icon", icon: G, size: "xxxs" })
113
114
  ] })
114
115
  }
115
116
  )
@@ -117,5 +118,5 @@ const ue = (v) => {
117
118
  );
118
119
  };
119
120
  export {
120
- ue as SelectTags
121
+ ne as SelectTags
121
122
  };
@@ -2,11 +2,11 @@ import { jsx as u } from "react/jsx-runtime";
2
2
  import { Popover as T } from "./bundle.es10.js";
3
3
  import { Input as w } from "./bundle.es13.js";
4
4
  import { useState as A, useRef as j } from "react";
5
- import { Calendar as E } from "./bundle.es57.js";
6
- import { useDayDisableCheker as N } from "./bundle.es58.js";
5
+ import { Calendar as E } from "./bundle.es56.js";
6
+ import { useDayDisableCheker as N } from "./bundle.es57.js";
7
7
  import { getNum as h, formatTime as v } from "@companix/utils-js";
8
- import { removeDigits as O } from "./bundle.es59.js";
9
- import { SelectRightElements as Y } from "./bundle.es60.js";
8
+ import { removeDigits as O } from "./bundle.es58.js";
9
+ import { SelectRightElements as Y } from "./bundle.es59.js";
10
10
  const i = {
11
11
  char: "-",
12
12
  toString: (e) => {
@@ -1,8 +1,8 @@
1
1
  import { jsxs as D, jsx as h } from "react/jsx-runtime";
2
2
  import { useMemo as M, useEffect as C } from "react";
3
3
  import { Select as c } from "./bundle.es12.js";
4
- import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es59.js";
5
- import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es61.js";
4
+ import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es58.js";
5
+ import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es60.js";
6
6
  const B = ({
7
7
  min: o = j,
8
8
  max: e = N,
@@ -1,8 +1,8 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { useRef as _, useMemo as b, useState as P, useEffect as j } from "react";
3
3
  import { getNum as v } from "@companix/utils-js";
4
- import { getTimesOptions as D, getTimeValue as A, removeDigits as W, convertTimeToOption as q } from "./bundle.es59.js";
5
- import { SelectRightElements as w } from "./bundle.es60.js";
4
+ import { getTimesOptions as D, getTimeValue as A, removeDigits as W, convertTimeToOption as q } from "./bundle.es58.js";
5
+ import { SelectRightElements as w } from "./bundle.es59.js";
6
6
  import { Select as y } from "./bundle.es12.js";
7
7
  import { Input as z } from "./bundle.es13.js";
8
8
  const r = {
@@ -1,6 +1,6 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
2
  import { useState as h, useEffect as c, createContext as f, useContext as w } from "react";
3
- import { getColorScheme as v, updateDOM as m } from "./bundle.es62.js";
3
+ import { getColorScheme as v, updateDOM as m } from "./bundle.es61.js";
4
4
  const i = f({
5
5
  setColorScheme: () => {
6
6
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { hash as m } from "@companix/utils-js";
3
3
  import { useRef as n, useMemo as s } from "react";
4
- import { Viewport as p } from "./bundle.es63.js";
4
+ import { Viewport as p } from "./bundle.es62.js";
5
5
  const a = (t = {}) => {
6
6
  const e = {
7
7
  emit: (r) => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { hash as r } from "@companix/utils-js";
3
- import { Viewport as a } from "./bundle.es64.js";
3
+ import { Viewport as a } from "./bundle.es63.js";
4
4
  import { useRef as c, useMemo as h } from "react";
5
5
  const m = (i = {}) => {
6
6
  const o = {
@@ -2,7 +2,7 @@ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
2
  import * as t from "@radix-ui/react-toast";
3
3
  import { attr as T } from "@companix/utils-browser";
4
4
  import { useState as d, useRef as b, useEffect as j, useLayoutEffect as E } from "react";
5
- import { RemoveListener as I } from "./bundle.es54.js";
5
+ import { RemoveListener as I } from "./bundle.es53.js";
6
6
  const m = (o) => {
7
7
  const [r, u] = d(!0), [p, f] = d(!1), s = b(null), {
8
8
  appearance: C = "neutral",