@companix/uikit 0.0.62 → 0.0.64

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.
@@ -22,7 +22,12 @@ export interface SelectAddOption {
22
22
  closeOnClick?: boolean;
23
23
  onClick: () => void;
24
24
  }
25
- interface InternalListProps<T> {
25
+ export interface SelectOptionsPopoverParams {
26
+ minimalOptions?: boolean;
27
+ addOption?: SelectAddOption;
28
+ emptyText?: string;
29
+ }
30
+ interface InternalListProps<T> extends SelectOptionsPopoverParams {
26
31
  options: Option<T>[];
27
32
  scrollboxRef?: React.RefObject<HTMLDivElement>;
28
33
  optionsWrapperRef?: React.RefObject<HTMLDivElement>;
@@ -31,9 +36,6 @@ interface InternalListProps<T> {
31
36
  onOpened?: (activeIndex: number) => void;
32
37
  filterOptions?: (option: Option<T>) => boolean;
33
38
  disableFiltering?: boolean;
34
- minimalOptions?: boolean;
35
- addOption?: SelectAddOption;
36
- emptyText?: string;
37
39
  }
38
40
  export type OptionsPopoverProps<T> = OptionsSourceControl<T> & Omit<InternalListProps<T>, 'options'>;
39
41
  export declare const OptionsPopover: <T>(props: OptionsPopoverProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,27 +1,24 @@
1
1
  import { SelectFormProps } from './SelectInput';
2
- import { OptionsSource, SelectAddOption } from './OptionsPopover';
2
+ import { OptionsSource, SelectOptionsPopoverParams } from './OptionsPopover';
3
3
  interface Cleanable<T> {
4
4
  clearButton: true;
5
- onChange: (event: T | null) => void;
5
+ onChange: (value: T | null) => void;
6
6
  }
7
7
  interface UnCleanable<T> {
8
8
  clearButton?: false;
9
- onChange: (event: T) => void;
9
+ onChange: (value: T) => void;
10
10
  }
11
- type DependedValueType<T> = Cleanable<T> | UnCleanable<T>;
12
- export interface SelectParams {
11
+ type OnChangeValueType<T> = Cleanable<T> | UnCleanable<T>;
12
+ export interface SelectParams extends SelectOptionsPopoverParams {
13
13
  matchTarget?: 'width' | 'min-width';
14
14
  popoverRef?: React.Ref<HTMLDivElement>;
15
15
  scrollRef?: React.Ref<{
16
16
  scrollTo: (index: number) => void;
17
17
  }>;
18
- emptyText?: string;
19
- minimalOptions?: boolean;
20
- addOption?: SelectAddOption;
21
18
  }
22
- export type SelectProps<T> = Omit<SelectFormProps, 'value' | 'onChange' | 'closeButton'> & DependedValueType<T> & SelectParams & OptionsSource<T> & {
19
+ export type SelectProps<T> = OptionsSource<T> & Omit<SelectFormProps, 'value' | 'onChange' | 'closeButton'> & SelectParams & OnChangeValueType<T> & {
23
20
  value: T | null;
24
21
  children?: React.ReactNode;
25
22
  };
26
- export declare const Select: <T extends string | number>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const Select: <T>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
27
24
  export {};
@@ -1,19 +1,16 @@
1
- import { OptionsSource, SelectAddOption } from '../Select/OptionsPopover';
2
- export interface SelectParams<T> {
1
+ import { OptionsSource, SelectOptionsPopoverParams } from '../Select/OptionsPopover';
2
+ export interface SelectTagsParams<T> extends SelectOptionsPopoverParams {
3
3
  closeAfterSelect?: boolean;
4
4
  onInputChange?: (text: string) => void;
5
5
  onChange: (event: T[]) => void;
6
- placeholder?: string;
7
6
  value: T[];
7
+ placeholder?: string;
8
8
  disabled?: boolean;
9
9
  readOnly?: boolean;
10
10
  size?: 'sm' | 'md' | 'lg';
11
11
  fill?: boolean;
12
12
  inputRef?: React.Ref<HTMLInputElement>;
13
13
  required?: boolean;
14
- minimalOptions?: boolean;
15
- addOption?: SelectAddOption;
16
- emptyText?: string;
17
14
  }
18
- export type SelectTagsProps<T> = OptionsSource<T> & SelectParams<T>;
15
+ export type SelectTagsProps<T> = OptionsSource<T> & SelectTagsParams<T>;
19
16
  export declare const SelectTags: <T extends string | number>(props: SelectTagsProps<T>) => import("react/jsx-runtime").JSX.Element;
package/dist/bundle.es.js CHANGED
@@ -9,21 +9,21 @@ import { Segments as g } from "./bundle.es9.js";
9
9
  import { Popover as h } from "./bundle.es10.js";
10
10
  import { Tooltip as v } from "./bundle.es11.js";
11
11
  import { Select as P } from "./bundle.es12.js";
12
- import { Input as A } from "./bundle.es13.js";
13
- import { OptionItem as b } from "./bundle.es14.js";
14
- import { NumberInput as R } from "./bundle.es15.js";
15
- import { OptionsList as y } from "./bundle.es16.js";
16
- import { Checkbox as G } from "./bundle.es17.js";
17
- import { Switch as O } from "./bundle.es18.js";
18
- import { Radio as z, RadioGroup as N } from "./bundle.es19.js";
19
- import { Drawer as q } from "./bundle.es20.js";
20
- import { Dialog as H } from "./bundle.es21.js";
21
- import { AlertDialog as K } from "./bundle.es22.js";
22
- import { LoadingButton as Q } from "./bundle.es23.js";
23
- import { Tabs as V } from "./bundle.es24.js";
24
- import { Countdown as X } from "./bundle.es25.js";
25
- import { TextArea as Z } from "./bundle.es26.js";
26
- import { SelectTags as $ } from "./bundle.es27.js";
12
+ import { SelectTags as A } from "./bundle.es13.js";
13
+ import { Input as b } from "./bundle.es14.js";
14
+ import { OptionItem as R } from "./bundle.es15.js";
15
+ import { NumberInput as y } from "./bundle.es16.js";
16
+ import { OptionsList as G } from "./bundle.es17.js";
17
+ import { Checkbox as O } from "./bundle.es18.js";
18
+ import { Switch as z } from "./bundle.es19.js";
19
+ import { Radio as j, RadioGroup as q } from "./bundle.es20.js";
20
+ import { Drawer as H } from "./bundle.es21.js";
21
+ import { Dialog as K } from "./bundle.es22.js";
22
+ import { AlertDialog as Q } from "./bundle.es23.js";
23
+ import { LoadingButton as V } from "./bundle.es24.js";
24
+ import { Tabs as X } from "./bundle.es25.js";
25
+ import { Countdown as Z } from "./bundle.es26.js";
26
+ import { TextArea as $ } from "./bundle.es27.js";
27
27
  import { DatePicker as ro } from "./bundle.es28.js";
28
28
  import { DateInput as to } from "./bundle.es29.js";
29
29
  import { FileOverlay as mo } from "./bundle.es30.js";
@@ -42,40 +42,40 @@ import { Toast as Go } from "./bundle.es42.js";
42
42
  import { DialogShell as Oo, createDialogsRegistry as Fo } from "./bundle.es43.js";
43
43
  import { createPopoversRegistry as No } from "./bundle.es44.js";
44
44
  export {
45
- K as AlertDialog,
45
+ Q as AlertDialog,
46
46
  e as Avatar,
47
47
  x as Button,
48
48
  a as ButtonGroup,
49
- G as Checkbox,
49
+ O as Checkbox,
50
50
  vo as ColorSchemeScript,
51
- X as Countdown,
51
+ Z as Countdown,
52
52
  to as DateInput,
53
53
  ro as DatePicker,
54
- H as Dialog,
54
+ K as Dialog,
55
55
  Oo as DialogShell,
56
- q as Drawer,
56
+ H as Drawer,
57
57
  mo as FileOverlay,
58
58
  fo as FormGroup,
59
59
  co as Icon,
60
60
  S as ImitateScroll,
61
- A as Input,
62
- Q as LoadingButton,
63
- R as NumberInput,
64
- b as OptionItem,
65
- y as OptionsList,
61
+ b as Input,
62
+ V as LoadingButton,
63
+ y as NumberInput,
64
+ R as OptionItem,
65
+ G as OptionsList,
66
66
  h as Popover,
67
67
  so as ProgressBar,
68
- z as Radio,
69
- N as RadioGroup,
68
+ j as Radio,
69
+ q as RadioGroup,
70
70
  n as Scrollable,
71
71
  g as Segments,
72
72
  P as Select,
73
- $ as SelectTags,
73
+ A as SelectTags,
74
74
  uo as Skeleton,
75
75
  l as Spinner,
76
- O as Switch,
77
- V as Tabs,
78
- Z as TextArea,
76
+ z as Switch,
77
+ X as Tabs,
78
+ $ as TextArea,
79
79
  To as ThemeProvider,
80
80
  io as TimePicker,
81
81
  Go as Toast,
@@ -1,43 +1,122 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as b, useRef as R } from "react";
3
- import { mergeRefs as c } from "react-merge-refs";
4
- import { InputElement as x } from "./bundle.es51.js";
5
- import { InputContainer as I } from "./bundle.es52.js";
6
- import g from "classnames";
7
- const N = b(
8
- ({
9
- onChange: m,
10
- onValueChange: f,
11
- readOnly: i,
12
- inputClassName: o,
13
- value: p,
14
- placeholder: n,
15
- mask: d,
16
- inputType: s = "text",
17
- maskChar: u,
18
- inputRef: a,
19
- ...e
20
- }, l) => {
21
- const r = R(null);
22
- return /* @__PURE__ */ t(I, { ref: l, inputRef: r, ...e, children: /* @__PURE__ */ t(
23
- x,
24
- {
25
- type: s,
26
- ref: c([r, a]),
27
- className: g("form-input form-input-base", o),
28
- "aria-disabled": e.disabled,
29
- onChange: m,
30
- onValueChange: f,
31
- value: p,
32
- placeholder: n,
33
- disabled: e.disabled,
34
- readOnly: i,
35
- maskChar: u,
36
- mask: d
37
- }
38
- ) });
39
- }
40
- );
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) => {
12
+ const {
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(() => {
40
+ const e = {};
41
+ return (a.options ?? a.defaultOptions ?? []).forEach((r) => {
42
+ e[r.value] = r;
43
+ }), e;
44
+ }, [a.options, a.defaultOptions]);
45
+ return /* @__PURE__ */ o(
46
+ j,
47
+ {
48
+ minimal: !0,
49
+ ref: d,
50
+ sideOffset: 0,
51
+ matchTarget: "width",
52
+ onAnimationEnd: E,
53
+ onOpenAutoFocus: (e) => e.preventDefault(),
54
+ onCloseAutoFocus: (e) => e.preventDefault(),
55
+ content: ({ close: e }) => /* @__PURE__ */ o(
56
+ H,
57
+ {
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
+ }
68
+ }
69
+ ),
70
+ children: /* @__PURE__ */ o(
71
+ "div",
72
+ {
73
+ className: "form",
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(
83
+ "div",
84
+ {
85
+ className: "tag-container",
86
+ ref: z,
87
+ role: "listbox",
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" }) })
92
+ ] }, `tag-option-${e}-${t}`) : null)
93
+ }
94
+ ),
95
+ (!c || n.length === 0) && /* @__PURE__ */ o(
96
+ "input",
97
+ {
98
+ ref: L([R, s]),
99
+ type: "text",
100
+ autoCapitalize: "none",
101
+ autoComplete: "off",
102
+ autoCorrect: "off",
103
+ className: "form-input",
104
+ spellCheck: !1,
105
+ value: f,
106
+ disabled: u,
107
+ readOnly: c,
108
+ placeholder: C,
109
+ onChange: T
110
+ }
111
+ )
112
+ ] }),
113
+ /* @__PURE__ */ o(g, { className: "expand-icon", icon: G, size: "xxxs" })
114
+ ] })
115
+ }
116
+ )
117
+ }
118
+ );
119
+ };
41
120
  export {
42
- N as Input
121
+ ne as SelectTags
43
122
  };
@@ -1,38 +1,43 @@
1
- import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
- import N from "classnames";
3
- import { Icon as v } from "./bundle.es33.js";
4
- import { attr as t } from "@companix/utils-browser";
5
- import { forwardRef as k } from "react";
6
- import { faCheck as x } from "@companix/icons-solid";
7
- const O = k(
8
- ({ title: d, icon: n, active: c, label: e, disabled: r, minimal: a, onClick: l, className: m, ...s }, p) => {
9
- const f = (h) => {
10
- r || l?.(h);
11
- };
12
- return /* @__PURE__ */ i(
13
- "div",
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as b, useRef as R } from "react";
3
+ import { mergeRefs as c } from "react-merge-refs";
4
+ import { InputElement as x } from "./bundle.es51.js";
5
+ import { InputContainer as I } from "./bundle.es52.js";
6
+ import g from "classnames";
7
+ const N = b(
8
+ ({
9
+ onChange: m,
10
+ onValueChange: f,
11
+ readOnly: i,
12
+ inputClassName: o,
13
+ value: p,
14
+ placeholder: n,
15
+ mask: d,
16
+ inputType: s = "text",
17
+ maskChar: u,
18
+ inputRef: a,
19
+ ...e
20
+ }, l) => {
21
+ const r = R(null);
22
+ return /* @__PURE__ */ t(I, { ref: l, inputRef: r, ...e, children: /* @__PURE__ */ t(
23
+ x,
14
24
  {
15
- ref: p,
16
- ...s,
17
- className: N("option", m),
18
- "data-selected": t(c),
19
- "data-disabled": t(r),
20
- "data-minimal": t(a),
21
- onClick: f,
22
- children: [
23
- /* @__PURE__ */ i("div", { className: "option-content", children: [
24
- n && /* @__PURE__ */ o("div", { className: "option-icon", children: n }),
25
- /* @__PURE__ */ i("div", { className: "option-content-layout", children: [
26
- /* @__PURE__ */ o("div", { className: "option-title", children: d }),
27
- e && /* @__PURE__ */ o("div", { className: "option-label", children: e })
28
- ] })
29
- ] }),
30
- c && !a && /* @__PURE__ */ o("div", { className: "option-check", children: /* @__PURE__ */ o(v, { icon: x }) })
31
- ]
25
+ type: s,
26
+ ref: c([r, a]),
27
+ className: g("form-input form-input-base", o),
28
+ "aria-disabled": e.disabled,
29
+ onChange: m,
30
+ onValueChange: f,
31
+ value: p,
32
+ placeholder: n,
33
+ disabled: e.disabled,
34
+ readOnly: i,
35
+ maskChar: u,
36
+ mask: d
32
37
  }
33
- );
38
+ ) });
34
39
  }
35
40
  );
36
41
  export {
37
- O as OptionItem
42
+ N as Input
38
43
  };
@@ -1,58 +1,38 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import C from "classnames";
3
- import { forwardRef as j, useRef as w } from "react";
4
- import { mergeRefs as y } from "react-merge-refs";
5
- import { InputContainer as F } from "./bundle.es52.js";
6
- import { NumericFormat as V } from "react-number-format";
7
- const D = j(
8
- ({
9
- onChange: m,
10
- onValueChange: o,
11
- readOnly: f,
12
- inputClassName: i,
13
- value: n,
14
- placeholder: u,
15
- thousandSeparator: a,
16
- decimalSeparator: p,
17
- allowedDecimalSeparators: l,
18
- thousandsGroupStyle: s,
19
- decimalScale: d,
20
- fixedDecimalScale: b,
21
- allowNegative: R = !1,
22
- allowLeadingZeros: c,
23
- suffix: g,
24
- prefix: x,
25
- inputRef: I,
26
- ...e
27
- }, N) => {
28
- const r = w(null);
29
- return /* @__PURE__ */ t(F, { ref: N, inputRef: r, ...e, children: /* @__PURE__ */ t(
30
- V,
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ import N from "classnames";
3
+ import { Icon as v } from "./bundle.es33.js";
4
+ import { attr as t } from "@companix/utils-browser";
5
+ import { forwardRef as k } from "react";
6
+ import { faCheck as x } from "@companix/icons-solid";
7
+ const O = k(
8
+ ({ title: d, icon: n, active: c, label: e, disabled: r, minimal: a, onClick: l, className: m, ...s }, p) => {
9
+ const f = (h) => {
10
+ r || l?.(h);
11
+ };
12
+ return /* @__PURE__ */ i(
13
+ "div",
31
14
  {
32
- type: "text",
33
- getInputRef: y([r, I]),
34
- className: C("form-input form-input-base", i),
35
- "aria-disabled": e.disabled,
36
- onChange: m,
37
- onValueChange: ({ floatValue: h }) => o?.(h ?? null),
38
- value: n,
39
- placeholder: u,
40
- disabled: e.disabled,
41
- readOnly: f,
42
- thousandSeparator: a,
43
- decimalSeparator: p,
44
- allowedDecimalSeparators: l,
45
- thousandsGroupStyle: s,
46
- decimalScale: d,
47
- fixedDecimalScale: b,
48
- allowNegative: R,
49
- allowLeadingZeros: c,
50
- suffix: g,
51
- prefix: x
15
+ ref: p,
16
+ ...s,
17
+ className: N("option", m),
18
+ "data-selected": t(c),
19
+ "data-disabled": t(r),
20
+ "data-minimal": t(a),
21
+ onClick: f,
22
+ children: [
23
+ /* @__PURE__ */ i("div", { className: "option-content", children: [
24
+ n && /* @__PURE__ */ o("div", { className: "option-icon", children: n }),
25
+ /* @__PURE__ */ i("div", { className: "option-content-layout", children: [
26
+ /* @__PURE__ */ o("div", { className: "option-title", children: d }),
27
+ e && /* @__PURE__ */ o("div", { className: "option-label", children: e })
28
+ ] })
29
+ ] }),
30
+ c && !a && /* @__PURE__ */ o("div", { className: "option-check", children: /* @__PURE__ */ o(v, { icon: x }) })
31
+ ]
52
32
  }
53
- ) });
33
+ );
54
34
  }
55
35
  );
56
36
  export {
57
- D as NumberInput
37
+ O as OptionItem
58
38
  };
@@ -1,23 +1,58 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { Scrollable as n } from "./bundle.es7.js";
3
- const s = ({
4
- children: o,
5
- maxHeight: t,
6
- scrollboxRef: i,
7
- optionsWrapperRef: e
8
- }) => /* @__PURE__ */ r(
9
- n,
10
- {
11
- ref: i,
12
- implementation: "inner",
13
- padding: 10,
14
- thumbPadding: 3,
15
- thumbColor: "#0000002b",
16
- maxHeight: t,
17
- scrollY: !0,
18
- children: /* @__PURE__ */ r("div", { className: "option-list", ref: e, children: o })
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import C from "classnames";
3
+ import { forwardRef as j, useRef as w } from "react";
4
+ import { mergeRefs as y } from "react-merge-refs";
5
+ import { InputContainer as F } from "./bundle.es52.js";
6
+ import { NumericFormat as V } from "react-number-format";
7
+ const D = j(
8
+ ({
9
+ onChange: m,
10
+ onValueChange: o,
11
+ readOnly: f,
12
+ inputClassName: i,
13
+ value: n,
14
+ placeholder: u,
15
+ thousandSeparator: a,
16
+ decimalSeparator: p,
17
+ allowedDecimalSeparators: l,
18
+ thousandsGroupStyle: s,
19
+ decimalScale: d,
20
+ fixedDecimalScale: b,
21
+ allowNegative: R = !1,
22
+ allowLeadingZeros: c,
23
+ suffix: g,
24
+ prefix: x,
25
+ inputRef: I,
26
+ ...e
27
+ }, N) => {
28
+ const r = w(null);
29
+ return /* @__PURE__ */ t(F, { ref: N, inputRef: r, ...e, children: /* @__PURE__ */ t(
30
+ V,
31
+ {
32
+ type: "text",
33
+ getInputRef: y([r, I]),
34
+ className: C("form-input form-input-base", i),
35
+ "aria-disabled": e.disabled,
36
+ onChange: m,
37
+ onValueChange: ({ floatValue: h }) => o?.(h ?? null),
38
+ value: n,
39
+ placeholder: u,
40
+ disabled: e.disabled,
41
+ readOnly: f,
42
+ thousandSeparator: a,
43
+ decimalSeparator: p,
44
+ allowedDecimalSeparators: l,
45
+ thousandsGroupStyle: s,
46
+ decimalScale: d,
47
+ fixedDecimalScale: b,
48
+ allowNegative: R,
49
+ allowLeadingZeros: c,
50
+ suffix: g,
51
+ prefix: x
52
+ }
53
+ ) });
19
54
  }
20
55
  );
21
56
  export {
22
- s as OptionsList
57
+ D as NumberInput
23
58
  };
@@ -1,35 +1,23 @@
1
- import { jsxs as x, jsx as o } from "react/jsx-runtime";
2
- import * as t from "@radix-ui/react-checkbox";
3
- import { Icon as h } from "./bundle.es33.js";
4
- import { faCheck as l } from "@companix/icons-solid";
5
- import { useId as n } from "react";
6
- import { attr as c } from "@companix/utils-browser";
7
- const u = ({ checked: e, required: m, disabled: r, onCheckedChange: s, size: d, label: a }) => {
8
- const i = n();
9
- return /* @__PURE__ */ x(
10
- "div",
11
- {
12
- className: "checkbox",
13
- "data-size": d ?? "md",
14
- "data-required": c(m && !e),
15
- "data-disabled": c(r),
16
- children: [
17
- /* @__PURE__ */ o(
18
- t.Root,
19
- {
20
- className: "checkbox-box",
21
- checked: e,
22
- onCheckedChange: s,
23
- disabled: r,
24
- id: i,
25
- children: /* @__PURE__ */ o(t.Indicator, { className: "checkbox-icon", children: /* @__PURE__ */ o(h, { icon: l, size: "xxxs" }) })
26
- }
27
- ),
28
- a && /* @__PURE__ */ o("label", { className: "checkbox-label", htmlFor: i, "data-disabled": c(r), children: a })
29
- ]
30
- }
31
- );
32
- };
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Scrollable as n } from "./bundle.es7.js";
3
+ const s = ({
4
+ children: o,
5
+ maxHeight: t,
6
+ scrollboxRef: i,
7
+ optionsWrapperRef: e
8
+ }) => /* @__PURE__ */ r(
9
+ n,
10
+ {
11
+ ref: i,
12
+ implementation: "inner",
13
+ padding: 10,
14
+ thumbPadding: 3,
15
+ thumbColor: "#0000002b",
16
+ maxHeight: t,
17
+ scrollY: !0,
18
+ children: /* @__PURE__ */ r("div", { className: "option-list", ref: e, children: o })
19
+ }
20
+ );
33
21
  export {
34
- u as Checkbox
22
+ s as OptionsList
35
23
  };