@tpc-mare/mare-ui-components-react 0.1.12 → 0.1.14
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.
- package/dist/accordion/index.js +1 -1
- package/dist/banner/index.js +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/counter/Counter.d.ts +2 -0
- package/dist/counter/Counter.types.d.ts +23 -0
- package/dist/counter/index.d.ts +2 -0
- package/dist/counter/index.js +4 -0
- package/dist/date-picker/index.js +1 -1
- package/dist/dialog/index.js +1 -1
- package/dist/drawer/index.js +1 -1
- package/dist/image-slider/index.js +1 -1
- package/dist/index/index.d.ts +4 -0
- package/dist/index/index.js +72 -68
- package/dist/message/Message.d.ts +2 -0
- package/dist/message/Message.types.d.ts +17 -0
- package/dist/message/index.d.ts +2 -0
- package/dist/message/index.js +4 -0
- package/dist/paginator/index.js +1 -1
- package/dist/panel-menu/index.js +1 -1
- package/dist/password/index.js +1 -1
- package/dist/search-field/index.js +1 -1
- package/dist/select-field/index.js +1 -1
- package/dist/shared/{Accordion-Dhs7EeM6.js → Accordion-BLQ1mWZZ.js} +1 -1
- package/dist/shared/{Banner-B41NQS5P.js → Banner-DXftmx9P.js} +1 -1
- package/dist/shared/{Checkbox-B7vM1mxP.js → Checkbox-BXnSN2vK.js} +10 -9
- package/dist/shared/{Combobox-oSS0Rlbv.js → Combobox-SkrEe5He.js} +44 -41
- package/dist/shared/Counter-D4Al7Yme.js +94 -0
- package/dist/shared/{DatePicker-GYH3uorm.js → DatePicker-CwAISvNc.js} +140 -137
- package/dist/shared/{DialogHeader-CZ5OrC8_.js → DialogHeader-RzfQm-pi.js} +14 -14
- package/dist/shared/{DrawerFooter-OFrTFvy2.js → DrawerFooter-BxOEFQ-W.js} +3 -3
- package/dist/shared/IconCheck-DzZA6b2U.js +5 -0
- package/dist/shared/IconChevronDown-ev2ML7Ex.js +5 -0
- package/dist/shared/IconChevronRight-DEIDRsvg.js +7 -0
- package/dist/shared/IconMinus-fS_GL0Et.js +5 -0
- package/dist/shared/IconSearch-CgM6jEUh.js +5 -0
- package/dist/shared/IconX-CpPADKjZ.js +5 -0
- package/dist/shared/{ImageSlider-CdBVmAYC.js → ImageSlider-Bgb1kNQ4.js} +1 -1
- package/dist/shared/Message-BjC8CCSI.js +70 -0
- package/dist/shared/{Paginator-BndcA6Ax.js → Paginator-Bp2nghqW.js} +48 -46
- package/dist/shared/{PanelMenu-Bz-fg6px.js → PanelMenu-BpjNM7O_.js} +2 -2
- package/dist/shared/Password-BMKy8dAy.js +95 -0
- package/dist/shared/SearchField-DjJHDaR4.js +64 -0
- package/dist/shared/{SelectField-CGbdf8C2.js → SelectField-CvKaukCG.js} +27 -25
- package/dist/shared/{Stepper-BpKdB3ip.js → Stepper-By8M5bs0.js} +13 -12
- package/dist/shared/{TagChip-BNszVayi.js → TagChip-Bs7srjIL.js} +1 -1
- package/dist/shared/createReactComponent-Cb6Pzf10.js +48 -0
- package/dist/stepper/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tag-chip/index.js +1 -1
- package/package.json +2 -1
- package/dist/shared/Password-cqTK9OlT.js +0 -94
- package/dist/shared/SearchField-CgZV2Am-.js +0 -63
- package/dist/shared/icons-BFOFrum4.js +0 -55
- package/dist/shared/icons.d.ts +0 -15
package/dist/accordion/index.js
CHANGED
package/dist/banner/index.js
CHANGED
package/dist/checkbox/index.js
CHANGED
package/dist/combobox/index.js
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CounterSize, CounterVariant } from '@tpc-development/mare-ui-components-core/counter';
|
|
2
|
+
export type { CounterSize, CounterVariant, } from '@tpc-development/mare-ui-components-core/counter';
|
|
3
|
+
export interface CounterProperties {
|
|
4
|
+
/** Controlled numeric value. `null` when the field is empty. */
|
|
5
|
+
value?: number | null;
|
|
6
|
+
/** Change handler — receives the next number, or `null` when cleared. */
|
|
7
|
+
onValueChange?: (value: number | null) => void;
|
|
8
|
+
size?: CounterSize;
|
|
9
|
+
variant?: CounterVariant;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Disables only the increment ("+") trigger, regardless of `max`. */
|
|
12
|
+
disabledIncrement?: boolean;
|
|
13
|
+
/** Disables only the decrement ("-") trigger, regardless of `min`. */
|
|
14
|
+
disabledDecrement?: boolean;
|
|
15
|
+
id?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
/** Minimum allowed value. */
|
|
18
|
+
min?: number;
|
|
19
|
+
/** Maximum allowed value. */
|
|
20
|
+
max?: number;
|
|
21
|
+
/** Step for the +/- triggers. @default 1 */
|
|
22
|
+
step?: number;
|
|
23
|
+
}
|
package/dist/dialog/index.js
CHANGED
package/dist/drawer/index.js
CHANGED
package/dist/index/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { TagChip } from '../tag-chip';
|
|
|
10
10
|
export type { TagChipProperties, TagChipSeverity, TagChipSize, } from '../tag-chip';
|
|
11
11
|
export { Banner } from '../banner';
|
|
12
12
|
export type { BannerProperties, BannerSeverity } from '../banner';
|
|
13
|
+
export { Message } from '../message';
|
|
14
|
+
export type { MessageProperties, MessageSeverity, MessageVariant, } from '../message';
|
|
13
15
|
export { Button } from '../button';
|
|
14
16
|
export type { ButtonProperties, ButtonSeverity, ButtonSize, ButtonVariant, IconPosition, } from '../button';
|
|
15
17
|
export { Breadcrumbs } from '../breadcrumbs';
|
|
@@ -34,6 +36,8 @@ export { InputNumber } from '../input-number';
|
|
|
34
36
|
export type { InputNumberProperties, InputNumberSize, } from '../input-number';
|
|
35
37
|
export { InputOtp } from '../input-otp';
|
|
36
38
|
export type { InputOtpProperties, InputOtpSize } from '../input-otp';
|
|
39
|
+
export { Counter } from '../counter';
|
|
40
|
+
export type { CounterProperties, CounterSize, CounterVariant, } from '../counter';
|
|
37
41
|
export { Checkbox } from '../checkbox';
|
|
38
42
|
export type { CheckboxProperties, CheckboxSize, CheckedState, } from '../checkbox';
|
|
39
43
|
export { RadioGroup } from '../radio-group';
|
package/dist/index/index.js
CHANGED
|
@@ -1,79 +1,83 @@
|
|
|
1
|
-
import { A as a } from "../shared/Accordion-
|
|
1
|
+
import { A as a } from "../shared/Accordion-BLQ1mWZZ.js";
|
|
2
2
|
import { A as t } from "../shared/Avatar-D3QlO3Tz.js";
|
|
3
3
|
import { B as p } from "../shared/Badge-WC6my4Aw.js";
|
|
4
4
|
import { T as x } from "../shared/Tag-BtbmgIwL.js";
|
|
5
|
-
import { T as n } from "../shared/TagChip-
|
|
6
|
-
import { B as c } from "../shared/Banner-
|
|
7
|
-
import {
|
|
8
|
-
import { B as S } from "../shared/
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { I as J } from "../shared/
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { D as tr
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
5
|
+
import { T as n } from "../shared/TagChip-Bs7srjIL.js";
|
|
6
|
+
import { B as c } from "../shared/Banner-DXftmx9P.js";
|
|
7
|
+
import { M as d } from "../shared/Message-BjC8CCSI.js";
|
|
8
|
+
import { B as S } from "../shared/Button-AfMqNCme.js";
|
|
9
|
+
import { B as C } from "../shared/Breadcrumbs-Cqr3Jitd.js";
|
|
10
|
+
import { S as u } from "../shared/SelectField-CvKaukCG.js";
|
|
11
|
+
import { C as F } from "../shared/Combobox-SkrEe5He.js";
|
|
12
|
+
import { T } from "../shared/Tabs-BqIorZYD.js";
|
|
13
|
+
import { P as w } from "../shared/ProgressSpinner-B-lrS-tu.js";
|
|
14
|
+
import { I as M, a as k } from "../shared/IconField-Dh6j6SL1.js";
|
|
15
|
+
import { C as H, F as R, a as v, H as G } from "../shared/HelperText-CVWWvLCI.js";
|
|
16
|
+
import { T as N } from "../shared/Textarea-iJhYTZos.js";
|
|
17
|
+
import { S as j } from "../shared/SearchField-DjJHDaR4.js";
|
|
18
|
+
import { P as y, a as z } from "../shared/Password-BMKy8dAy.js";
|
|
19
|
+
import { I as J } from "../shared/InputNumber-D48wsE-o.js";
|
|
20
|
+
import { I as Q } from "../shared/InputOtp-CUXXVP2E.js";
|
|
21
|
+
import { C as V } from "../shared/Counter-D4Al7Yme.js";
|
|
22
|
+
import { C as X } from "../shared/Checkbox-BXnSN2vK.js";
|
|
23
|
+
import { R as Z } from "../shared/RadioGroup-lw27DCoV.js";
|
|
24
|
+
import { S as $ } from "../shared/Switch-D6E2OmgE.js";
|
|
25
|
+
import { D as or, a as ar } from "../shared/DialogFooter-DyltZzK-.js";
|
|
26
|
+
import { D as tr } from "../shared/DialogHeader-RzfQm-pi.js";
|
|
27
|
+
import { C as pr } from "../shared/ConfirmDialog-Bvk8KZ0M.js";
|
|
28
|
+
import { D as xr, a as fr, b as nr } from "../shared/DrawerFooter-BxOEFQ-W.js";
|
|
29
|
+
import { M as cr } from "../shared/Menu-Cv9dU1iA.js";
|
|
30
|
+
import { P as dr } from "../shared/PanelMenu-BpjNM7O_.js";
|
|
31
|
+
import { S as Sr, c as gr } from "../shared/Snackbar-C29nLHO9.js";
|
|
32
|
+
import { S as Dr } from "../shared/Stepper-By8M5bs0.js";
|
|
33
|
+
import { D as br } from "../shared/DatePicker-CwAISvNc.js";
|
|
34
|
+
import { P as Pr } from "../shared/Paginator-Bp2nghqW.js";
|
|
35
|
+
import { I as Br } from "../shared/ImageItem-BBy5fOl3.js";
|
|
36
|
+
import { I as hr } from "../shared/ImageSlider-Bgb1kNQ4.js";
|
|
35
37
|
export {
|
|
36
38
|
a as Accordion,
|
|
37
39
|
t as Avatar,
|
|
38
40
|
p as Badge,
|
|
39
41
|
c as Banner,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
tr as
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
J as
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
42
|
+
C as Breadcrumbs,
|
|
43
|
+
S as Button,
|
|
44
|
+
H as CharacterCount,
|
|
45
|
+
X as Checkbox,
|
|
46
|
+
F as Combobox,
|
|
47
|
+
pr as ConfirmDialog,
|
|
48
|
+
V as Counter,
|
|
49
|
+
br as DatePicker,
|
|
50
|
+
or as Dialog,
|
|
51
|
+
ar as DialogFooter,
|
|
52
|
+
tr as DialogHeader,
|
|
53
|
+
xr as Drawer,
|
|
54
|
+
fr as DrawerFooter,
|
|
55
|
+
nr as DrawerHeader,
|
|
56
|
+
R as FloatLabel,
|
|
57
|
+
v as FormField,
|
|
58
|
+
G as HelperText,
|
|
59
|
+
M as IconField,
|
|
60
|
+
Br as ImageItem,
|
|
61
|
+
hr as ImageSlider,
|
|
62
|
+
J as InputNumber,
|
|
63
|
+
Q as InputOtp,
|
|
64
|
+
k as InputText,
|
|
65
|
+
cr as Menu,
|
|
66
|
+
d as Message,
|
|
67
|
+
Pr as Paginator,
|
|
68
|
+
dr as PanelMenu,
|
|
69
|
+
y as Password,
|
|
70
|
+
z as PasswordFooterItem,
|
|
71
|
+
w as ProgressSpinner,
|
|
72
|
+
Z as RadioGroup,
|
|
73
|
+
j as SearchField,
|
|
74
|
+
u as SelectField,
|
|
75
|
+
Sr as Snackbar,
|
|
76
|
+
Dr as Stepper,
|
|
77
|
+
$ as Switch,
|
|
78
|
+
T as Tabs,
|
|
75
79
|
x as Tag,
|
|
76
80
|
n as TagChip,
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
N as Textarea,
|
|
82
|
+
gr as createSnackbar
|
|
79
83
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MessageSeverity, MessageVariant } from '@tpc-development/mare-ui-components-core/message';
|
|
3
|
+
export type { MessageSeverity, MessageVariant, } from '@tpc-development/mare-ui-components-core/message';
|
|
4
|
+
export interface MessageProperties {
|
|
5
|
+
/** @default 'neutral' */
|
|
6
|
+
severity?: MessageSeverity;
|
|
7
|
+
/** @default 'simple' */
|
|
8
|
+
variant?: MessageVariant;
|
|
9
|
+
title?: string;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
/** @default false */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** @default false */
|
|
14
|
+
closable?: boolean;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
package/dist/paginator/index.js
CHANGED
package/dist/panel-menu/index.js
CHANGED
package/dist/password/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { Accordion as r } from "@ark-ui/react/accordion";
|
|
3
|
-
import {
|
|
3
|
+
import { I as c } from "./IconChevronDown-ev2ML7Ex.js";
|
|
4
4
|
const d = "mare:w-full", u = (t) => `
|
|
5
5
|
mare:flex mare:flex-col
|
|
6
6
|
${t ? "mare:border-b mare:border-default" : ""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { B as d } from "./Button-AfMqNCme.js";
|
|
3
|
-
import {
|
|
3
|
+
import { I as o } from "./IconX-CpPADKjZ.js";
|
|
4
4
|
const c = `
|
|
5
5
|
mare:w-full mare:max-w-md mare:rounded-tpc-container-s mare:p-4
|
|
6
6
|
mare:flex mare:items-start mare:justify-between mare:gap-4
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Checkbox as a } from "@ark-ui/react/checkbox";
|
|
3
|
-
import {
|
|
3
|
+
import { I as f } from "./IconCheck-DzZA6b2U.js";
|
|
4
|
+
import { I as x } from "./IconMinus-fS_GL0Et.js";
|
|
4
5
|
const v = `
|
|
5
6
|
mare:group/checkbox
|
|
6
7
|
mare:relative mare:inline-flex mare:items-center mare:gap-2
|
|
@@ -52,11 +53,11 @@ const v = `
|
|
|
52
53
|
`, C = `
|
|
53
54
|
mare:sr-only
|
|
54
55
|
`;
|
|
55
|
-
function
|
|
56
|
+
function L({
|
|
56
57
|
checked: s,
|
|
57
58
|
defaultChecked: l,
|
|
58
59
|
onCheckedChange: n,
|
|
59
|
-
children:
|
|
60
|
+
children: m,
|
|
60
61
|
size: r = "small",
|
|
61
62
|
disabled: c = !1,
|
|
62
63
|
invalid: o = !1,
|
|
@@ -67,7 +68,7 @@ function M({
|
|
|
67
68
|
form: z,
|
|
68
69
|
id: u
|
|
69
70
|
}) {
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ d(
|
|
71
72
|
a.Root,
|
|
72
73
|
{
|
|
73
74
|
checked: s,
|
|
@@ -86,7 +87,7 @@ function M({
|
|
|
86
87
|
className: v,
|
|
87
88
|
"data-size": r,
|
|
88
89
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ d(
|
|
90
91
|
a.Control,
|
|
91
92
|
{
|
|
92
93
|
className: y,
|
|
@@ -116,12 +117,12 @@ function M({
|
|
|
116
117
|
]
|
|
117
118
|
}
|
|
118
119
|
),
|
|
119
|
-
|
|
120
|
+
m && /* @__PURE__ */ e(
|
|
120
121
|
a.Label,
|
|
121
122
|
{
|
|
122
123
|
className: w,
|
|
123
124
|
"data-size": r,
|
|
124
|
-
children:
|
|
125
|
+
children: m
|
|
125
126
|
}
|
|
126
127
|
),
|
|
127
128
|
/* @__PURE__ */ e(a.HiddenInput, { className: C })
|
|
@@ -130,5 +131,5 @@ function M({
|
|
|
130
131
|
);
|
|
131
132
|
}
|
|
132
133
|
export {
|
|
133
|
-
|
|
134
|
+
L as C
|
|
134
135
|
};
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as T, useMemo as b } from "react";
|
|
3
|
-
import { createListCollection as V, ComboboxRoot as _, ComboboxLabel as j, ComboboxControl as
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { createListCollection as V, ComboboxRoot as _, ComboboxLabel as j, ComboboxControl as z, ComboboxTrigger as $, ComboboxClearTrigger as q, ComboboxPositioner as D, ComboboxContent as E, ComboboxInput as M, ComboboxEmpty as O, ComboboxItem as P, ComboboxItemText as Q, ComboboxItemIndicator as R } from "@ark-ui/react/combobox";
|
|
4
|
+
import { I as X } from "./IconX-CpPADKjZ.js";
|
|
5
|
+
import { I as A } from "./IconChevronDown-ev2ML7Ex.js";
|
|
6
|
+
import { I as B } from "./IconSearch-CgM6jEUh.js";
|
|
7
|
+
import { I as F } from "./IconCheck-DzZA6b2U.js";
|
|
8
|
+
const G = {
|
|
6
9
|
small: "mare:h-10",
|
|
7
10
|
medium: "mare:h-12"
|
|
8
11
|
}, f = {
|
|
9
12
|
small: "mare:tpc-typography-body-s",
|
|
10
13
|
medium: "mare:tpc-typography-body-m"
|
|
11
|
-
},
|
|
14
|
+
}, H = (r) => `
|
|
12
15
|
mare:relative mare:flex mare:items-center mare:gap-2
|
|
13
|
-
${
|
|
16
|
+
${G[r]}
|
|
14
17
|
mare:px-3 mare:rounded-input mare:border mare:border-strong mare:bg-default
|
|
15
18
|
mare:focus-within:outline-solid mare:focus-within:outline-2 mare:focus-within:outline-accent mare:focus-within:-outline-offset-2
|
|
16
19
|
mare:ark-disabled:text-disabled mare:ark-disabled:border-disabled-default mare:ark-disabled:cursor-not-allowed
|
|
17
20
|
mare:data-[invalid]:outline-solid mare:data-[invalid]:outline-2 mare:data-[invalid]:outline-danger mare:data-[invalid]:-outline-offset-2
|
|
18
|
-
`, p = "mare:flex mare:items-center mare:shrink-0 mare:text-weak mare:[&>svg]:size-5",
|
|
21
|
+
`, p = "mare:flex mare:items-center mare:shrink-0 mare:text-weak mare:[&>svg]:size-5", J = (r) => `
|
|
19
22
|
mare:flex-auto mare:flex mare:items-center mare:cursor-pointer
|
|
20
23
|
mare:bg-transparent mare:text-left mare:truncate mare:text-default ${f[r]}
|
|
21
|
-
`,
|
|
24
|
+
`, K = `
|
|
22
25
|
mare:flex mare:items-center mare:gap-2 mare:mb-1 mare:px-3 mare:h-10
|
|
23
26
|
mare:rounded-input mare:border mare:border-strong mare:bg-default
|
|
24
27
|
mare:focus-within:outline-solid mare:focus-within:outline-2 mare:focus-within:outline-accent mare:focus-within:-outline-offset-2
|
|
25
|
-
`,
|
|
28
|
+
`, U = (r) => `
|
|
26
29
|
mare:flex-auto mare:bg-transparent mare:outline-none mare:text-default
|
|
27
30
|
mare:placeholder:text-weak ${f[r]}
|
|
28
|
-
`,
|
|
31
|
+
`, W = "mare:flex mare:items-center mare:shrink-0 mare:text-base mare:cursor-pointer mare:text-default mare:hover:text-weak", Y = "mare:flex mare:items-center mare:shrink-0 mare:text-lg mare:transition-transform mare:ark-open:rotate-180 mare:text-default", Z = `
|
|
29
32
|
mare:flex mare:flex-col mare:gap-0.5 mare:p-1
|
|
30
33
|
mare:rounded-input mare:border mare:border-default mare:bg-raised
|
|
31
34
|
mare:shadow-[0_2px_6px_0_rgba(0,0,0,0.16)]
|
|
@@ -39,29 +42,29 @@ const H = {
|
|
|
39
42
|
mare:ark-highlighted:bg-hover
|
|
40
43
|
mare:ark-selected:bg-accent-weak mare:ark-selected:text-accent
|
|
41
44
|
mare:ark-disabled:text-disabled mare:ark-disabled:cursor-not-allowed
|
|
42
|
-
`, ae = "mare:flex mare:items-center mare:text-accent", re = "mare:py-2 mare:px-3 mare:tpc-typography-body-s mare:text-weak",
|
|
43
|
-
function
|
|
45
|
+
`, ae = "mare:flex mare:items-center mare:text-accent", re = "mare:py-2 mare:px-3 mare:tpc-typography-body-s mare:text-weak", me = "mare:tpc-typography-label-s mare:text-weak mare:mb-1.5 mare:block";
|
|
46
|
+
function de({
|
|
44
47
|
value: r = null,
|
|
45
48
|
onValueChange: h,
|
|
46
|
-
options:
|
|
49
|
+
options: t,
|
|
47
50
|
placeholder: x = "Select…",
|
|
48
51
|
searchPlaceholder: g = "",
|
|
49
52
|
size: o = "small",
|
|
50
|
-
disabled:
|
|
51
|
-
invalid:
|
|
53
|
+
disabled: w = !1,
|
|
54
|
+
invalid: C = !1,
|
|
52
55
|
clearable: k = !1,
|
|
53
56
|
emptyText: y = "Sin resultados",
|
|
54
57
|
label: i,
|
|
55
58
|
leadingIcon: s,
|
|
56
59
|
triggerIcon: v,
|
|
57
|
-
checkIcon:
|
|
58
|
-
clearIcon:
|
|
60
|
+
checkIcon: I,
|
|
61
|
+
clearIcon: N,
|
|
59
62
|
renderOption: c
|
|
60
63
|
}) {
|
|
61
64
|
const [l, d] = T(""), n = b(() => {
|
|
62
65
|
const e = l.trim().toLowerCase();
|
|
63
|
-
return e ?
|
|
64
|
-
}, [l,
|
|
66
|
+
return e ? t.filter((S) => S.label.toLowerCase().includes(e)) : t;
|
|
67
|
+
}, [l, t]), L = b(
|
|
65
68
|
() => V({
|
|
66
69
|
items: n,
|
|
67
70
|
itemToValue: (e) => e.value,
|
|
@@ -69,14 +72,14 @@ function ie({
|
|
|
69
72
|
isItemDisabled: (e) => !!e.disabled
|
|
70
73
|
}),
|
|
71
74
|
[n]
|
|
72
|
-
), u =
|
|
73
|
-
return /* @__PURE__ */
|
|
75
|
+
), u = t.find((e) => e.value === r)?.label ?? null;
|
|
76
|
+
return /* @__PURE__ */ m(
|
|
74
77
|
_,
|
|
75
78
|
{
|
|
76
|
-
collection:
|
|
79
|
+
collection: L,
|
|
77
80
|
value: r == null ? [] : [r],
|
|
78
|
-
disabled:
|
|
79
|
-
invalid:
|
|
81
|
+
disabled: w,
|
|
82
|
+
invalid: C,
|
|
80
83
|
openOnClick: !0,
|
|
81
84
|
inputValue: l,
|
|
82
85
|
onValueChange: (e) => h?.(e.value[0] ?? null),
|
|
@@ -87,37 +90,37 @@ function ie({
|
|
|
87
90
|
e.open || d("");
|
|
88
91
|
},
|
|
89
92
|
children: [
|
|
90
|
-
i && /* @__PURE__ */ a(j, { className:
|
|
91
|
-
/* @__PURE__ */
|
|
93
|
+
i && /* @__PURE__ */ a(j, { className: me, children: i }),
|
|
94
|
+
/* @__PURE__ */ m(z, { className: H(o), children: [
|
|
92
95
|
s && /* @__PURE__ */ a("span", { className: p, children: s }),
|
|
93
|
-
/* @__PURE__ */ a(
|
|
94
|
-
k && /* @__PURE__ */ a(
|
|
95
|
-
/* @__PURE__ */ a("span", { className: Y, children: v ?? /* @__PURE__ */ a(
|
|
96
|
+
/* @__PURE__ */ a($, { className: J(o), children: u ? /* @__PURE__ */ a("span", { children: u }) : /* @__PURE__ */ a("span", { className: "mare:text-weak", children: x }) }),
|
|
97
|
+
k && /* @__PURE__ */ a(q, { className: W, children: N ?? /* @__PURE__ */ a(X, { size: "1em" }) }),
|
|
98
|
+
/* @__PURE__ */ a("span", { className: Y, children: v ?? /* @__PURE__ */ a(A, { size: "1em" }) })
|
|
96
99
|
] }),
|
|
97
|
-
/* @__PURE__ */ a(
|
|
98
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ a(D, { children: /* @__PURE__ */ m(E, { className: Z, children: [
|
|
101
|
+
/* @__PURE__ */ m("div", { className: K, children: [
|
|
99
102
|
/* @__PURE__ */ a(
|
|
100
|
-
|
|
103
|
+
M,
|
|
101
104
|
{
|
|
102
105
|
placeholder: g,
|
|
103
|
-
className:
|
|
106
|
+
className: U(o)
|
|
104
107
|
}
|
|
105
108
|
),
|
|
106
|
-
/* @__PURE__ */ a("span", { className: p, children: /* @__PURE__ */ a(
|
|
109
|
+
/* @__PURE__ */ a("span", { className: p, children: /* @__PURE__ */ a(B, {}) })
|
|
107
110
|
] }),
|
|
108
|
-
/* @__PURE__ */ a(
|
|
109
|
-
n.map((e) => /* @__PURE__ */
|
|
110
|
-
|
|
111
|
+
/* @__PURE__ */ a(O, { className: re, children: y }),
|
|
112
|
+
n.map((e) => /* @__PURE__ */ m(
|
|
113
|
+
P,
|
|
111
114
|
{
|
|
112
115
|
item: e,
|
|
113
116
|
className: ee,
|
|
114
117
|
children: [
|
|
115
|
-
/* @__PURE__ */ a(
|
|
118
|
+
/* @__PURE__ */ a(Q, { children: c ? c(e) : e.label }),
|
|
116
119
|
/* @__PURE__ */ a(
|
|
117
|
-
|
|
120
|
+
R,
|
|
118
121
|
{
|
|
119
122
|
className: ae,
|
|
120
|
-
children:
|
|
123
|
+
children: I ?? /* @__PURE__ */ a(F, { size: "1em" })
|
|
121
124
|
}
|
|
122
125
|
)
|
|
123
126
|
]
|
|
@@ -130,5 +133,5 @@ function ie({
|
|
|
130
133
|
);
|
|
131
134
|
}
|
|
132
135
|
export {
|
|
133
|
-
|
|
136
|
+
de as C
|
|
134
137
|
};
|