@tpc-mare/mare-ui-components-react 0.1.25 → 0.1.28
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/avatar/index.js +1 -1
- package/dist/badge/index.js +1 -1
- package/dist/banner/index.js +1 -1
- package/dist/button/index.js +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/confirm-dialog/index.js +1 -1
- package/dist/counter/index.js +1 -1
- package/dist/date-picker/index.js +1 -1
- package/dist/dialog/index.js +2 -2
- package/dist/divider/index.js +1 -1
- package/dist/drawer/index.js +1 -1
- package/dist/expandable-counter/index.js +1 -1
- package/dist/filter-chip/index.js +1 -1
- package/dist/filter-chip-dropdown-multiple/index.js +1 -1
- package/dist/filter-chip-dropdown-single/index.js +1 -1
- package/dist/floating-action-button/index.js +1 -1
- package/dist/image-item/index.js +1 -1
- package/dist/index/index.js +41 -41
- package/dist/input-number/index.js +1 -1
- package/dist/input-otp/index.js +1 -1
- package/dist/input-text/IconField.d.ts +3 -1
- package/dist/input-text/index.js +2 -2
- package/dist/keyboard-commands/index.d.ts +5 -0
- package/dist/keyboard-commands/index.js +825 -0
- package/dist/keyboard-commands/useKeyboardCommands.d.ts +27 -0
- package/dist/keyboard-commands/useKeyboardNavGrid.d.ts +19 -0
- package/dist/keyboard-commands/useKeyboardNavList.d.ts +17 -0
- package/dist/keyboard-commands/useKeyboardScope.d.ts +20 -0
- package/dist/message/index.js +1 -1
- package/dist/multi-select/index.js +1 -1
- package/dist/overlay-badge/index.js +1 -1
- package/dist/paginator/index.js +1 -1
- package/dist/password/index.js +1 -1
- package/dist/radio-group/index.js +1 -1
- package/dist/search-field/index.js +1 -1
- package/dist/segmented-control/index.js +1 -1
- package/dist/select-field/index.js +1 -1
- package/dist/shared/{Avatar-D3QlO3Tz.js → Avatar-BpJDY1wm.js} +24 -22
- package/dist/shared/{Badge-WC6my4Aw.js → Badge-CGotZzok.js} +16 -9
- package/dist/shared/Banner-D4na_bM8.js +60 -0
- package/dist/shared/{Button-DwJ5RTfQ.js → Button-C2ULmKj3.js} +64 -57
- package/dist/shared/{Checkbox-BXnSN2vK.js → Checkbox-DCq3_MWz.js} +35 -33
- package/dist/shared/{Combobox-CcmWgRYZ.js → Combobox-DrkeDMW0.js} +48 -47
- package/dist/shared/{ConfirmDialog-DLHY-c70.js → ConfirmDialog-CjrWhDx8.js} +33 -27
- package/dist/shared/{Counter-DjIoe4h3.js → Counter-0siKQRKc.js} +42 -41
- package/dist/shared/{DatePicker-CwAISvNc.js → DatePicker-DhIWE0V_.js} +246 -240
- package/dist/shared/{DialogFooter-DyltZzK-.js → DialogFooter-CDlh11Gy.js} +34 -32
- package/dist/shared/{DialogHeader-M5Bfyxos.js → DialogHeader-PMBgMjsb.js} +2 -2
- package/dist/shared/{Divider-UgKI7dtK.js → Divider-CSQOHeMo.js} +16 -14
- package/dist/shared/{DrawerFooter-B9-Vrgd3.js → DrawerFooter-Bb-X7keE.js} +62 -54
- package/dist/shared/{ExpandableCounter-DZxbdqRa.js → ExpandableCounter-pPJIrd6L.js} +2 -2
- package/dist/shared/{FilterChip-eECL3oO7.js → FilterChip-TpKF-4vP.js} +21 -20
- package/dist/shared/{FilterChipDropdownMultiple-D2eMYXyS.js → FilterChipDropdownMultiple-2mr_Z57i.js} +43 -42
- package/dist/shared/{FilterChipDropdownSingle-C7ahD-_3.js → FilterChipDropdownSingle-CLmWzX9q.js} +39 -38
- package/dist/shared/FloatingActionButton-BWB5Taeg.js +28 -0
- package/dist/shared/{HelperText-CVWWvLCI.js → HelperText-zmUym82m.js} +1 -1
- package/dist/shared/IconField-CqKydKep.js +81 -0
- package/dist/shared/ImageItem-CL2VGEha.js +19 -0
- package/dist/shared/InputNumber-nxus9h5s.js +64 -0
- package/dist/shared/{InputOtp-CUXXVP2E.js → InputOtp-BxBc6Vhs.js} +16 -15
- package/dist/shared/InputText.types-KhlkzHMw-BtRY371_.js +4 -0
- package/dist/shared/Message-CQUdM9rR.js +81 -0
- package/dist/shared/{MultiSelect-Dowp0_FX.js → MultiSelect-DlaYWcPo.js} +60 -59
- package/dist/shared/{OverlayBadge-DLskqll7.js → OverlayBadge-Dkosm3Il.js} +1 -1
- package/dist/shared/{Paginator-DxZdCXSC.js → Paginator-QTDpAJ-N.js} +2 -2
- package/dist/shared/Password-D4PRaleH.js +97 -0
- package/dist/shared/{RadioGroup-lw27DCoV.js → RadioGroup-B8CXU8-l.js} +44 -38
- package/dist/shared/{SearchField-DjJHDaR4.js → SearchField-DIsFhJ22.js} +1 -1
- package/dist/shared/{SegmentedControl-Ct5ZLXpN.js → SegmentedControl-BfE3jNM6.js} +35 -33
- package/dist/shared/{SelectField-B-g52vHx.js → SelectField-CcnbnPEi.js} +30 -29
- package/dist/shared/Skeleton-DpWtYSz4.js +30 -0
- package/dist/shared/{Slider-CXFkperZ.js → Slider-Cl9PyH2q.js} +28 -22
- package/dist/shared/Snackbar-3BxmqK8x.js +105 -0
- package/dist/shared/{Stepper-By8M5bs0.js → Stepper-DrKKSn_j.js} +42 -37
- package/dist/shared/{Switch-DNCn0xjb.js → Switch-B5DSQLFL.js} +31 -29
- package/dist/shared/{Tabs-BqIorZYD.js → Tabs-DuufYBV2.js} +19 -17
- package/dist/shared/{Tag-BtbmgIwL.js → Tag-uIK_GPrs.js} +24 -15
- package/dist/shared/{TagChip-Bs7srjIL.js → TagChip-CP3aX2_G.js} +28 -26
- package/dist/shared/Textarea-DHJIWBRM.js +42 -0
- package/dist/shared/{field-layout-D34MpDMB.js → field-layout-o6bDLvVU.js} +6 -6
- package/dist/shared/index-ByQ37VXf.js +6 -0
- package/dist/skeleton/index.js +1 -1
- package/dist/slider/index.js +1 -1
- package/dist/snackbar/index.js +1 -1
- package/dist/stepper/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/tag-chip/index.js +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/utilities-standalone.css +1 -1
- package/package.json +1 -1
- package/dist/shared/Banner-C4wLe6N0.js +0 -52
- package/dist/shared/FloatingActionButton-D4FK6uSs.js +0 -19
- package/dist/shared/IconField-Dh6j6SL1.js +0 -78
- package/dist/shared/ImageItem-BBy5fOl3.js +0 -17
- package/dist/shared/InputNumber-D48wsE-o.js +0 -62
- package/dist/shared/Message-BNsFuQU1.js +0 -70
- package/dist/shared/Password-BMKy8dAy.js +0 -95
- package/dist/shared/Skeleton-CAjoF-T2.js +0 -29
- package/dist/shared/Snackbar-CjTqCOaV.js +0 -100
- package/dist/shared/Textarea-iJhYTZos.js +0 -40
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createListCollection as
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
6
|
-
import { I as M } from "./
|
|
7
|
-
|
|
2
|
+
import { useState as I, useMemo as g } from "react";
|
|
3
|
+
import { createListCollection as z, SelectRoot as D, SelectControl as _, SelectTrigger as j, SelectPositioner as O, SelectContent as $, SelectItem as q, SelectItemText as E } from "@ark-ui/react/select";
|
|
4
|
+
import { C as x } from "./Checkbox-DCq3_MWz.js";
|
|
5
|
+
import { o as F } from "./index-ByQ37VXf.js";
|
|
6
|
+
import { I as M } from "./IconChevronDown-ev2ML7Ex.js";
|
|
7
|
+
import { I as P } from "./IconSearch-CgM6jEUh.js";
|
|
8
|
+
const T = ["medium", "large"], B = {
|
|
8
9
|
medium: "mare:h-10",
|
|
9
10
|
large: "mare:h-12"
|
|
10
|
-
},
|
|
11
|
+
}, K = {
|
|
11
12
|
medium: "mare:px-3.5",
|
|
12
13
|
large: "mare:px-4"
|
|
13
|
-
},
|
|
14
|
+
}, L = (r) => `
|
|
14
15
|
mare:group mare:inline-flex mare:items-center mare:gap-1.5 mare:max-w-full
|
|
15
16
|
mare:rounded-full mare:border mare:cursor-pointer mare:select-none
|
|
16
17
|
mare:tpc-typography-body-s mare:transition-colors mare:duration-150
|
|
17
|
-
${
|
|
18
|
+
${B[r]} ${K[r]}
|
|
18
19
|
mare:bg-default mare:text-default mare:border-default
|
|
19
20
|
mare:ark-open:outline-solid mare:ark-open:outline-2 mare:ark-open:outline-accent mare:ark-open:-outline-offset-2
|
|
20
21
|
mare:not-ark-disabled:hover:bg-hover
|
|
21
22
|
mare:ark-disabled:cursor-not-allowed mare:ark-disabled:text-disabled mare:ark-disabled:border-disabled-default
|
|
22
23
|
mare:data-[invalid]:outline-solid mare:data-[invalid]:outline-2 mare:data-[invalid]:outline-danger mare:data-[invalid]:-outline-offset-2
|
|
23
|
-
`,
|
|
24
|
+
`, Q = "mare:truncate mare:data-[placeholder-shown]:text-weak", R = "mare:flex mare:items-center mare:shrink-0 mare:[&>svg]:size-4 mare:transition-transform mare:ark-open:rotate-180", V = `
|
|
24
25
|
mare:flex mare:flex-col mare:gap-0.5 mare:p-1
|
|
25
26
|
mare:rounded-input mare:border mare:border-default mare:bg-raised
|
|
26
27
|
mare:shadow-[0_2px_6px_0_rgba(0,0,0,0.16)]
|
|
27
28
|
mare:max-h-72 mare:overflow-y-auto
|
|
28
29
|
mare:min-w-[var(--reference-width)]
|
|
29
30
|
mare:z-50
|
|
30
|
-
`,
|
|
31
|
+
`, G = `
|
|
31
32
|
mare:flex mare:items-center mare:gap-2 mare:mb-1 mare:px-3 mare:h-10
|
|
32
33
|
mare:rounded-input mare:border mare:border-strong mare:bg-default
|
|
33
34
|
mare:focus-within:outline-solid mare:focus-within:outline-2 mare:focus-within:outline-accent mare:focus-within:-outline-offset-2
|
|
34
|
-
`,
|
|
35
|
+
`, H = "mare:flex-auto mare:bg-transparent mare:outline-none mare:text-default mare:placeholder:text-weak mare:tpc-typography-body-s", J = "mare:flex mare:items-center mare:shrink-0 mare:text-weak", U = "mare:flex mare:items-center mare:gap-2 mare:py-2 mare:px-3 mare:mb-0.5 mare:rounded-menu-item mare:cursor-pointer mare:hover:bg-hover mare:tpc-typography-body-s mare:text-default", W = `
|
|
35
36
|
mare:group/option mare:flex mare:items-center mare:gap-2
|
|
36
37
|
mare:w-full mare:min-h-8 mare:py-2 mare:px-3 mare:cursor-pointer mare:rounded-menu-item
|
|
37
38
|
mare:tpc-typography-body-s mare:text-default
|
|
38
39
|
mare:ark-highlighted:bg-hover
|
|
39
40
|
mare:ark-selected:bg-accent-weak mare:ark-selected:text-accent
|
|
40
41
|
mare:ark-disabled:text-disabled mare:ark-disabled:cursor-not-allowed
|
|
41
|
-
`,
|
|
42
|
+
`, X = "mare:py-2 mare:px-3 mare:tpc-typography-body-s mare:text-weak", y = (r, m) => {
|
|
42
43
|
const a = r.filter((l) => !l.disabled);
|
|
43
44
|
return a.length > 0 && a.every((l) => m.includes(l.value));
|
|
44
|
-
},
|
|
45
|
-
const a = r.filter((
|
|
45
|
+
}, Y = (r, m) => {
|
|
46
|
+
const a = r.filter((o) => !o.disabled).map((o) => o.value), l = m.filter((o) => !a.includes(o));
|
|
46
47
|
return y(r, m) ? l : [...l, ...a];
|
|
47
|
-
},
|
|
48
|
-
function
|
|
48
|
+
}, Z = (r, m) => r.filter((a) => m.includes(a.value)).map((a) => a.label).join(", ");
|
|
49
|
+
function oe({
|
|
49
50
|
value: r = [],
|
|
50
51
|
onValueChange: m,
|
|
51
52
|
options: a,
|
|
52
53
|
placeholder: l = "Select…",
|
|
53
|
-
size:
|
|
54
|
+
size: o = "medium",
|
|
54
55
|
disabled: k = !1,
|
|
55
56
|
invalid: v = !1,
|
|
56
57
|
filter: s = !1,
|
|
@@ -59,27 +60,27 @@ function ae({
|
|
|
59
60
|
showToggleAll: c = !1,
|
|
60
61
|
renderOption: h
|
|
61
62
|
}) {
|
|
62
|
-
const [u, b] =
|
|
63
|
+
const w = F(o, T, "medium"), [u, b] = I(""), n = g(() => {
|
|
63
64
|
if (!s) return a;
|
|
64
65
|
const e = u.trim().toLowerCase();
|
|
65
66
|
return e ? a.filter(
|
|
66
67
|
(p) => p.label.toLowerCase().includes(e)
|
|
67
68
|
) : a;
|
|
68
|
-
}, [s, u, a]),
|
|
69
|
-
() =>
|
|
70
|
-
items:
|
|
69
|
+
}, [s, u, a]), S = g(
|
|
70
|
+
() => z({
|
|
71
|
+
items: n,
|
|
71
72
|
itemToValue: (e) => e.value,
|
|
72
73
|
itemToString: (e) => e.label,
|
|
73
74
|
isItemDisabled: (e) => !!e.disabled
|
|
74
75
|
}),
|
|
75
|
-
[
|
|
76
|
-
),
|
|
76
|
+
[n]
|
|
77
|
+
), C = Z(a, r), N = y(n, r);
|
|
77
78
|
return /* @__PURE__ */ i(
|
|
78
79
|
D,
|
|
79
80
|
{
|
|
80
81
|
multiple: !0,
|
|
81
82
|
closeOnSelect: !1,
|
|
82
|
-
collection:
|
|
83
|
+
collection: S,
|
|
83
84
|
value: r,
|
|
84
85
|
disabled: k,
|
|
85
86
|
invalid: v,
|
|
@@ -88,16 +89,16 @@ function ae({
|
|
|
88
89
|
e.open || b("");
|
|
89
90
|
},
|
|
90
91
|
children: [
|
|
91
|
-
/* @__PURE__ */ t(
|
|
92
|
-
/* @__PURE__ */ t("span", { className:
|
|
93
|
-
/* @__PURE__ */ t("span", { className:
|
|
92
|
+
/* @__PURE__ */ t(_, { children: /* @__PURE__ */ i(j, { className: L(w), children: [
|
|
93
|
+
/* @__PURE__ */ t("span", { className: Q, children: C || l }),
|
|
94
|
+
/* @__PURE__ */ t("span", { className: R, children: /* @__PURE__ */ t(M, { size: "1em" }) })
|
|
94
95
|
] }) }),
|
|
95
|
-
/* @__PURE__ */ t(
|
|
96
|
-
s && /* @__PURE__ */ i("div", { className:
|
|
96
|
+
/* @__PURE__ */ t(O, { children: /* @__PURE__ */ i($, { className: V, children: [
|
|
97
|
+
s && /* @__PURE__ */ i("div", { className: G, children: [
|
|
97
98
|
/* @__PURE__ */ t(
|
|
98
99
|
"input",
|
|
99
100
|
{
|
|
100
|
-
className:
|
|
101
|
+
className: H,
|
|
101
102
|
value: u,
|
|
102
103
|
onChange: (e) => b(e.target.value),
|
|
103
104
|
onKeyDown: (e) => {
|
|
@@ -106,23 +107,23 @@ function ae({
|
|
|
106
107
|
placeholder: "Buscar…"
|
|
107
108
|
}
|
|
108
109
|
),
|
|
109
|
-
/* @__PURE__ */ t("span", { className:
|
|
110
|
+
/* @__PURE__ */ t("span", { className: J, children: /* @__PURE__ */ t(P, { size: "1em" }) })
|
|
110
111
|
] }),
|
|
111
112
|
(c || d) && /* @__PURE__ */ i(
|
|
112
113
|
"div",
|
|
113
114
|
{
|
|
114
|
-
className:
|
|
115
|
+
className: U,
|
|
115
116
|
onClick: c ? () => m?.(
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
Y(
|
|
118
|
+
n,
|
|
118
119
|
r
|
|
119
120
|
)
|
|
120
121
|
) : void 0,
|
|
121
122
|
children: [
|
|
122
123
|
c && f && /* @__PURE__ */ t(
|
|
123
|
-
|
|
124
|
+
x,
|
|
124
125
|
{
|
|
125
|
-
checked:
|
|
126
|
+
checked: N,
|
|
126
127
|
readOnly: !0
|
|
127
128
|
}
|
|
128
129
|
),
|
|
@@ -130,17 +131,17 @@ function ae({
|
|
|
130
131
|
]
|
|
131
132
|
}
|
|
132
133
|
),
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
n.length === 0 && /* @__PURE__ */ t("div", { className: X, children: "Sin resultados" }),
|
|
135
|
+
n.map((e) => {
|
|
135
136
|
const p = r.includes(e.value);
|
|
136
137
|
return /* @__PURE__ */ i(
|
|
137
138
|
q,
|
|
138
139
|
{
|
|
139
140
|
item: e,
|
|
140
|
-
className:
|
|
141
|
+
className: W,
|
|
141
142
|
children: [
|
|
142
143
|
f && /* @__PURE__ */ t(
|
|
143
|
-
|
|
144
|
+
x,
|
|
144
145
|
{
|
|
145
146
|
checked: p,
|
|
146
147
|
readOnly: !0
|
|
@@ -158,5 +159,5 @@ function ae({
|
|
|
158
159
|
);
|
|
159
160
|
}
|
|
160
161
|
export {
|
|
161
|
-
|
|
162
|
+
oe as F
|
|
162
163
|
};
|
package/dist/shared/{FilterChipDropdownSingle-C7ahD-_3.js → FilterChipDropdownSingle-CLmWzX9q.js}
RENAMED
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createListCollection as
|
|
4
|
-
import {
|
|
5
|
-
import { I as
|
|
6
|
-
import { I as
|
|
7
|
-
import { I as
|
|
8
|
-
|
|
2
|
+
import { useState as y, useMemo as u } from "react";
|
|
3
|
+
import { createListCollection as S, SelectRoot as I, SelectControl as N, SelectTrigger as C, SelectValueText as z, SelectClearTrigger as T, SelectIndicator as D, SelectPositioner as _, SelectContent as $, SelectItem as j, SelectItemText as L, SelectItemIndicator as V } from "@ark-ui/react/select";
|
|
4
|
+
import { o as q } from "./index-ByQ37VXf.js";
|
|
5
|
+
import { I as E } from "./IconX-CpPADKjZ.js";
|
|
6
|
+
import { I as F } from "./IconChevronDown-ev2ML7Ex.js";
|
|
7
|
+
import { I as P } from "./IconSearch-CgM6jEUh.js";
|
|
8
|
+
import { I as B } from "./IconCheck-DzZA6b2U.js";
|
|
9
|
+
const K = ["medium", "large"], M = {
|
|
9
10
|
medium: "mare:h-10",
|
|
10
11
|
large: "mare:h-12"
|
|
11
|
-
},
|
|
12
|
+
}, Q = {
|
|
12
13
|
medium: "mare:pl-3.5",
|
|
13
14
|
large: "mare:pl-4"
|
|
14
|
-
},
|
|
15
|
+
}, R = () => "mare:relative mare:inline-flex mare:items-center mare:max-w-full", X = (t, o) => `
|
|
15
16
|
mare:w-full mare:flex mare:items-center mare:cursor-pointer mare:select-none mare:text-left mare:min-w-0
|
|
16
17
|
mare:rounded-full mare:border
|
|
17
18
|
mare:tpc-typography-body-s mare:transition-colors mare:duration-150
|
|
18
|
-
${
|
|
19
|
-
${
|
|
19
|
+
${M[t]}
|
|
20
|
+
${Q[t]} ${o ? "mare:pr-14" : "mare:pr-8"}
|
|
20
21
|
mare:bg-default mare:text-default mare:border-default
|
|
21
22
|
mare:focus-visible:outline-solid mare:focus-visible:outline-2 mare:focus-visible:outline-accent mare:focus-visible:-outline-offset-2
|
|
22
23
|
mare:not-ark-disabled:hover:bg-hover
|
|
23
24
|
mare:ark-disabled:cursor-not-allowed mare:ark-disabled:text-disabled mare:ark-disabled:border-disabled-default
|
|
24
25
|
mare:data-[invalid]:outline-solid mare:data-[invalid]:outline-2 mare:data-[invalid]:outline-danger mare:data-[invalid]:-outline-offset-2
|
|
25
|
-
`,
|
|
26
|
+
`, A = "mare:truncate mare:data-[placeholder-shown]:text-weak", G = "mare:absolute mare:right-3.5 mare:top-1/2 mare:-translate-y-1/2 mare:flex mare:items-center mare:gap-1.5 mare:pointer-events-none", H = "mare:pointer-events-auto mare:flex mare:items-center mare:shrink-0 mare:text-base mare:cursor-pointer mare:hover:text-weak", J = "mare:flex mare:items-center mare:shrink-0 mare:[&>svg]:size-4 mare:transition-transform mare:ark-open:rotate-180", O = `
|
|
26
27
|
mare:flex mare:flex-col mare:gap-0.5 mare:p-1
|
|
27
28
|
mare:rounded-input mare:border mare:border-default mare:bg-raised
|
|
28
29
|
mare:shadow-[0_2px_6px_0_rgba(0,0,0,0.16)]
|
|
29
30
|
mare:max-h-72 mare:overflow-y-auto
|
|
30
31
|
mare:min-w-[var(--reference-width)]
|
|
31
32
|
mare:z-50
|
|
32
|
-
`,
|
|
33
|
+
`, U = `
|
|
33
34
|
mare:flex mare:items-center mare:gap-2 mare:mb-1 mare:px-3 mare:h-10
|
|
34
35
|
mare:rounded-input mare:border mare:border-strong mare:bg-default
|
|
35
36
|
mare:focus-within:outline-solid mare:focus-within:outline-2 mare:focus-within:outline-accent mare:focus-within:-outline-offset-2
|
|
36
|
-
`,
|
|
37
|
+
`, W = "mare:flex-auto mare:bg-transparent mare:outline-none mare:text-default mare:placeholder:text-weak mare:tpc-typography-body-s", Y = "mare:flex mare:items-center mare:shrink-0 mare:text-weak", Z = `
|
|
37
38
|
mare:group/option mare:flex mare:items-center mare:justify-between mare:gap-2
|
|
38
39
|
mare:w-full mare:min-h-8 mare:py-2 mare:px-3 mare:cursor-pointer mare:rounded-menu-item
|
|
39
40
|
mare:tpc-typography-body-s mare:text-default
|
|
40
41
|
mare:ark-highlighted:bg-hover
|
|
41
42
|
mare:ark-selected:bg-accent-weak mare:ark-selected:text-accent
|
|
42
43
|
mare:ark-disabled:text-disabled mare:ark-disabled:cursor-not-allowed
|
|
43
|
-
`,
|
|
44
|
-
function
|
|
44
|
+
`, ee = "mare:flex mare:items-center mare:text-accent", ae = "mare:py-2 mare:px-3 mare:tpc-typography-body-s mare:text-weak";
|
|
45
|
+
function ce({
|
|
45
46
|
value: t = null,
|
|
46
47
|
onValueChange: o,
|
|
47
48
|
options: m,
|
|
@@ -55,12 +56,12 @@ function oe({
|
|
|
55
56
|
checkIcon: x,
|
|
56
57
|
clearIcon: g
|
|
57
58
|
}) {
|
|
58
|
-
const [n, d] =
|
|
59
|
+
const w = q(p, K, "medium"), [n, d] = y(""), l = u(() => {
|
|
59
60
|
if (!i) return m;
|
|
60
61
|
const e = n.trim().toLowerCase();
|
|
61
|
-
return e ? m.filter((
|
|
62
|
-
}, [i, n, m]),
|
|
63
|
-
() =>
|
|
62
|
+
return e ? m.filter((k) => k.label.toLowerCase().includes(e)) : m;
|
|
63
|
+
}, [i, n, m]), v = u(
|
|
64
|
+
() => S({
|
|
64
65
|
items: l,
|
|
65
66
|
itemToValue: (e) => e.value,
|
|
66
67
|
itemToString: (e) => e.label,
|
|
@@ -69,9 +70,9 @@ function oe({
|
|
|
69
70
|
[l]
|
|
70
71
|
);
|
|
71
72
|
return /* @__PURE__ */ r(
|
|
72
|
-
|
|
73
|
+
I,
|
|
73
74
|
{
|
|
74
|
-
collection:
|
|
75
|
+
collection: v,
|
|
75
76
|
value: t == null ? [] : [t],
|
|
76
77
|
disabled: h,
|
|
77
78
|
invalid: b,
|
|
@@ -80,25 +81,25 @@ function oe({
|
|
|
80
81
|
e.open || d("");
|
|
81
82
|
},
|
|
82
83
|
children: [
|
|
83
|
-
/* @__PURE__ */ r(
|
|
84
|
-
/* @__PURE__ */ a(
|
|
85
|
-
|
|
84
|
+
/* @__PURE__ */ r(N, { className: R(), children: [
|
|
85
|
+
/* @__PURE__ */ a(C, { className: X(w, s), children: /* @__PURE__ */ a(
|
|
86
|
+
z,
|
|
86
87
|
{
|
|
87
|
-
className:
|
|
88
|
+
className: A,
|
|
88
89
|
placeholder: f
|
|
89
90
|
}
|
|
90
91
|
) }),
|
|
91
|
-
/* @__PURE__ */ r("div", { className:
|
|
92
|
-
s && /* @__PURE__ */ a(
|
|
93
|
-
/* @__PURE__ */ a(
|
|
92
|
+
/* @__PURE__ */ r("div", { className: G, children: [
|
|
93
|
+
s && /* @__PURE__ */ a(T, { className: H, children: g ?? /* @__PURE__ */ a(E, { size: "1em" }) }),
|
|
94
|
+
/* @__PURE__ */ a(D, { className: J, children: /* @__PURE__ */ a(F, { size: "1em" }) })
|
|
94
95
|
] })
|
|
95
96
|
] }),
|
|
96
|
-
/* @__PURE__ */ a(
|
|
97
|
-
i && /* @__PURE__ */ r("div", { className:
|
|
97
|
+
/* @__PURE__ */ a(_, { children: /* @__PURE__ */ r($, { className: O, children: [
|
|
98
|
+
i && /* @__PURE__ */ r("div", { className: U, children: [
|
|
98
99
|
/* @__PURE__ */ a(
|
|
99
100
|
"input",
|
|
100
101
|
{
|
|
101
|
-
className:
|
|
102
|
+
className: W,
|
|
102
103
|
value: n,
|
|
103
104
|
onChange: (e) => d(e.target.value),
|
|
104
105
|
onKeyDown: (e) => {
|
|
@@ -107,21 +108,21 @@ function oe({
|
|
|
107
108
|
placeholder: "Buscar…"
|
|
108
109
|
}
|
|
109
110
|
),
|
|
110
|
-
/* @__PURE__ */ a("span", { className:
|
|
111
|
+
/* @__PURE__ */ a("span", { className: Y, children: /* @__PURE__ */ a(P, { size: "1em" }) })
|
|
111
112
|
] }),
|
|
112
|
-
l.length === 0 && /* @__PURE__ */ a("div", { className:
|
|
113
|
+
l.length === 0 && /* @__PURE__ */ a("div", { className: ae, children: "Sin resultados" }),
|
|
113
114
|
l.map((e) => /* @__PURE__ */ r(
|
|
114
115
|
j,
|
|
115
116
|
{
|
|
116
117
|
item: e,
|
|
117
|
-
className:
|
|
118
|
+
className: Z,
|
|
118
119
|
children: [
|
|
119
120
|
/* @__PURE__ */ a(L, { children: c ? c(e) : e.label }),
|
|
120
121
|
/* @__PURE__ */ a(
|
|
121
122
|
V,
|
|
122
123
|
{
|
|
123
|
-
className:
|
|
124
|
-
children: x ?? /* @__PURE__ */ a(
|
|
124
|
+
className: ee,
|
|
125
|
+
children: x ?? /* @__PURE__ */ a(B, { size: "1em" })
|
|
125
126
|
}
|
|
126
127
|
)
|
|
127
128
|
]
|
|
@@ -134,5 +135,5 @@ function oe({
|
|
|
134
135
|
);
|
|
135
136
|
}
|
|
136
137
|
export {
|
|
137
|
-
|
|
138
|
+
ce as F
|
|
138
139
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { a as i, B as n } from "./Button-C2ULmKj3.js";
|
|
3
|
+
import { o as a } from "./index-ByQ37VXf.js";
|
|
4
|
+
const s = i.filter(
|
|
5
|
+
(r) => r !== "ghost" && r !== "danger"
|
|
6
|
+
);
|
|
7
|
+
function p({
|
|
8
|
+
severity: r = "primary",
|
|
9
|
+
...t
|
|
10
|
+
}) {
|
|
11
|
+
const o = a(
|
|
12
|
+
r,
|
|
13
|
+
s,
|
|
14
|
+
"primary"
|
|
15
|
+
);
|
|
16
|
+
return /* @__PURE__ */ e(
|
|
17
|
+
n,
|
|
18
|
+
{
|
|
19
|
+
...t,
|
|
20
|
+
severity: o,
|
|
21
|
+
raised: !0,
|
|
22
|
+
rounded: !0
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
p as F
|
|
28
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as r, Fragment as m } from "react/jsx-runtime";
|
|
2
2
|
import { useFieldContext as s, FieldRoot as c, FieldLabel as d, FieldErrorText as u, FieldHelperText as h } from "@ark-ui/react/field";
|
|
3
|
-
import { x as f, g, F as x, p as l,
|
|
3
|
+
import { x as f, g, F as x, p as l, _ as y } from "./field-layout-o6bDLvVU.js";
|
|
4
4
|
function L({ value: e, max: o }) {
|
|
5
5
|
const a = s()?.disabled ?? !1;
|
|
6
6
|
return /* @__PURE__ */ i("span", { className: f(a), children: [
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as l, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { useFieldContext as b, FieldInput as v, FieldRoot as I } from "@ark-ui/react/field";
|
|
3
|
+
import { m as N } from "./InputText.types-KhlkzHMw-BtRY371_.js";
|
|
4
|
+
import { u as f, d as g, m as x, f as y, F as C } from "./field-layout-o6bDLvVU.js";
|
|
5
|
+
import { o as d } from "./index-ByQ37VXf.js";
|
|
6
|
+
function _({
|
|
7
|
+
value: o = "",
|
|
8
|
+
onValueChange: r,
|
|
9
|
+
size: s = "medium",
|
|
10
|
+
rounded: e = !1,
|
|
11
|
+
invalid: c = !1,
|
|
12
|
+
disabled: m = !1,
|
|
13
|
+
placeholder: a,
|
|
14
|
+
...i
|
|
15
|
+
}) {
|
|
16
|
+
const t = f(), n = !b(), h = d(s, N, "medium"), p = g({
|
|
17
|
+
size: h,
|
|
18
|
+
rounded: e,
|
|
19
|
+
hasFloatLabel: t?.hasFloatLabel ?? !1,
|
|
20
|
+
iconSide: t?.iconSide ?? null
|
|
21
|
+
}), F = t?.hasFloatLabel ? " " : a, u = /* @__PURE__ */ l(
|
|
22
|
+
v,
|
|
23
|
+
{
|
|
24
|
+
...i,
|
|
25
|
+
className: p,
|
|
26
|
+
placeholder: F,
|
|
27
|
+
value: o,
|
|
28
|
+
onChange: (S) => r?.(S.target.value)
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
return n ? /* @__PURE__ */ l(
|
|
32
|
+
I,
|
|
33
|
+
{
|
|
34
|
+
invalid: c,
|
|
35
|
+
disabled: m,
|
|
36
|
+
className: "mare:w-full",
|
|
37
|
+
children: u
|
|
38
|
+
}
|
|
39
|
+
) : u;
|
|
40
|
+
}
|
|
41
|
+
const P = ["left", "right"];
|
|
42
|
+
function D({
|
|
43
|
+
icon: o,
|
|
44
|
+
position: r = "left",
|
|
45
|
+
disabled: s = !1,
|
|
46
|
+
onIconClick: e,
|
|
47
|
+
iconLabel: c,
|
|
48
|
+
children: m
|
|
49
|
+
}) {
|
|
50
|
+
const a = d(r, P, "left"), i = f(), t = {
|
|
51
|
+
hasFloatLabel: i?.hasFloatLabel ?? !1,
|
|
52
|
+
iconSide: x(i?.iconSide ?? null, a)
|
|
53
|
+
}, n = y(a, {
|
|
54
|
+
disabled: s,
|
|
55
|
+
interactive: !!e
|
|
56
|
+
});
|
|
57
|
+
return /* @__PURE__ */ l(C.Provider, { value: t, children: /* @__PURE__ */ L(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: `mare:relative mare:w-full mare:group ${a === "left" ? "mare-icon-left" : "mare-icon-right"}`,
|
|
61
|
+
children: [
|
|
62
|
+
m,
|
|
63
|
+
e ? /* @__PURE__ */ l(
|
|
64
|
+
"button",
|
|
65
|
+
{
|
|
66
|
+
type: "button",
|
|
67
|
+
disabled: s,
|
|
68
|
+
onClick: e,
|
|
69
|
+
"aria-label": c,
|
|
70
|
+
className: n,
|
|
71
|
+
children: o
|
|
72
|
+
}
|
|
73
|
+
) : /* @__PURE__ */ l("span", { className: n, children: o })
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
) });
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
D as I,
|
|
80
|
+
_ as a
|
|
81
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { o as t } from "./index-ByQ37VXf.js";
|
|
3
|
+
const o = ["4:3", "1:1", "5:4", "3:2", "free"], s = {
|
|
4
|
+
"4:3": "mare:aspect-[4/3]",
|
|
5
|
+
"1:1": "mare:aspect-square",
|
|
6
|
+
"5:4": "mare:aspect-[5/4]",
|
|
7
|
+
"3:2": "mare:aspect-[3/2]",
|
|
8
|
+
free: "mare:aspect-auto"
|
|
9
|
+
}, c = (e) => `
|
|
10
|
+
mare:w-full mare:[&_img]:h-full mare:[&_img]:w-full mare:[&_img]:object-cover
|
|
11
|
+
${s[e]}
|
|
12
|
+
`;
|
|
13
|
+
function p({ ratio: e = "4:3", children: a }) {
|
|
14
|
+
const m = t(e, o, "4:3");
|
|
15
|
+
return /* @__PURE__ */ r("div", { className: c(m), children: a });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
p as I
|
|
19
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { NumberInput as t } from "@ark-ui/react/number-input";
|
|
3
|
+
import { useFieldContext as g } from "@ark-ui/react/field";
|
|
4
|
+
import { m as y } from "./InputText.types-KhlkzHMw-BtRY371_.js";
|
|
5
|
+
import { u as z, d as j } from "./field-layout-o6bDLvVU.js";
|
|
6
|
+
import { o as w } from "./index-ByQ37VXf.js";
|
|
7
|
+
function B({
|
|
8
|
+
value: o = null,
|
|
9
|
+
onValueChange: n,
|
|
10
|
+
size: u = "medium",
|
|
11
|
+
rounded: i = !1,
|
|
12
|
+
invalid: r,
|
|
13
|
+
disabled: s,
|
|
14
|
+
readOnly: m,
|
|
15
|
+
step: c = 1,
|
|
16
|
+
clampValueOnBlur: f = !0,
|
|
17
|
+
placeholder: d,
|
|
18
|
+
id: p,
|
|
19
|
+
name: h,
|
|
20
|
+
min: b,
|
|
21
|
+
max: v,
|
|
22
|
+
formatOptions: F,
|
|
23
|
+
locale: N,
|
|
24
|
+
allowMouseWheel: S
|
|
25
|
+
}) {
|
|
26
|
+
const e = z(), I = !g(), L = w(u, y, "medium"), x = j({
|
|
27
|
+
size: L,
|
|
28
|
+
rounded: i,
|
|
29
|
+
hasFloatLabel: e?.hasFloatLabel ?? !1,
|
|
30
|
+
iconSide: e?.iconSide ?? null
|
|
31
|
+
}), C = e?.hasFloatLabel ? " " : d;
|
|
32
|
+
return /* @__PURE__ */ a(
|
|
33
|
+
t.Root,
|
|
34
|
+
{
|
|
35
|
+
value: o == null ? "" : String(o),
|
|
36
|
+
min: b,
|
|
37
|
+
max: v,
|
|
38
|
+
step: c,
|
|
39
|
+
formatOptions: F,
|
|
40
|
+
locale: N,
|
|
41
|
+
allowMouseWheel: S,
|
|
42
|
+
clampValueOnBlur: f,
|
|
43
|
+
disabled: s,
|
|
44
|
+
readOnly: m,
|
|
45
|
+
name: h,
|
|
46
|
+
invalid: I ? r : void 0,
|
|
47
|
+
className: "mare:w-full",
|
|
48
|
+
onValueChange: (l) => n?.(
|
|
49
|
+
l.value === "" ? null : l.valueAsNumber
|
|
50
|
+
),
|
|
51
|
+
children: /* @__PURE__ */ a(
|
|
52
|
+
t.Input,
|
|
53
|
+
{
|
|
54
|
+
id: p,
|
|
55
|
+
className: x,
|
|
56
|
+
placeholder: C
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
B as I
|
|
64
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as j, jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { PinInput as a } from "@ark-ui/react/pin-input";
|
|
3
|
-
|
|
3
|
+
import { o as w } from "./index-ByQ37VXf.js";
|
|
4
|
+
const k = "mare:flex mare:items-center mare:gap-2", A = {
|
|
4
5
|
small: "mare:w-10 mare:h-10 mare:px-3",
|
|
5
6
|
medium: "mare:w-12 mare:h-12 mare:px-3.5",
|
|
6
7
|
large: "mare:w-14 mare:h-14 mare:px-3"
|
|
7
|
-
},
|
|
8
|
+
}, N = (e) => `
|
|
8
9
|
mare:text-center mare:tpc-typography-body-m
|
|
9
10
|
mare:appearance-none mare:rounded-input mare:outline-none
|
|
10
11
|
mare:text-default mare:placeholder:text-weak
|
|
@@ -13,9 +14,9 @@ const j = "mare:flex mare:items-center mare:gap-2", w = {
|
|
|
13
14
|
mare:disabled:text-disabled mare:disabled:border-disabled-default
|
|
14
15
|
mare:ark-invalid:border-2 mare:ark-invalid:border-danger
|
|
15
16
|
mare:transition-colors mare:duration-200
|
|
16
|
-
${
|
|
17
|
-
`, d = (e) => Array.from(e);
|
|
18
|
-
function
|
|
17
|
+
${A[e]}
|
|
18
|
+
`, V = ["small", "medium", "large"], d = (e) => Array.from(e);
|
|
19
|
+
function P({
|
|
19
20
|
length: e = 4,
|
|
20
21
|
value: o,
|
|
21
22
|
defaultValue: t,
|
|
@@ -30,14 +31,14 @@ function V({
|
|
|
30
31
|
readOnly: x,
|
|
31
32
|
required: h,
|
|
32
33
|
autoFocus: v,
|
|
33
|
-
name:
|
|
34
|
-
id:
|
|
34
|
+
name: g,
|
|
35
|
+
id: y
|
|
35
36
|
}) {
|
|
36
|
-
const C =
|
|
37
|
-
return /* @__PURE__ */
|
|
37
|
+
const C = w(s, V, "medium"), I = N(C);
|
|
38
|
+
return /* @__PURE__ */ j(
|
|
38
39
|
a.Root,
|
|
39
40
|
{
|
|
40
|
-
id:
|
|
41
|
+
id: y,
|
|
41
42
|
count: e,
|
|
42
43
|
value: o === void 0 ? void 0 : d(o),
|
|
43
44
|
defaultValue: t === void 0 ? void 0 : d(t),
|
|
@@ -50,15 +51,15 @@ function V({
|
|
|
50
51
|
readOnly: x,
|
|
51
52
|
required: h,
|
|
52
53
|
autoFocus: v,
|
|
53
|
-
name:
|
|
54
|
+
name: g,
|
|
54
55
|
onValueChange: (r) => i?.(r.value.join("")),
|
|
55
56
|
onValueComplete: (r) => l?.(r.value.join("")),
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */ m(a.Control, { className:
|
|
58
|
+
/* @__PURE__ */ m(a.Control, { className: k, children: Array.from({ length: e }, (r, n) => /* @__PURE__ */ m(
|
|
58
59
|
a.Input,
|
|
59
60
|
{
|
|
60
61
|
index: n,
|
|
61
|
-
className:
|
|
62
|
+
className: I
|
|
62
63
|
},
|
|
63
64
|
n
|
|
64
65
|
)) }),
|
|
@@ -68,5 +69,5 @@ function V({
|
|
|
68
69
|
);
|
|
69
70
|
}
|
|
70
71
|
export {
|
|
71
|
-
|
|
72
|
+
P as I
|
|
72
73
|
};
|