@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
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as w } from "react";
|
|
3
|
-
import { createListCollection as S, SelectRoot as y, SelectLabel as v, SelectControl as
|
|
4
|
-
import {
|
|
3
|
+
import { createListCollection as S, SelectRoot as y, SelectLabel as v, SelectControl as I, SelectTrigger as N, SelectContext as C, SelectValueText as T, SelectClearTrigger as z, SelectIndicator as j, SelectPositioner as _, SelectContent as D, SelectItem as L, SelectItemText as V, SelectItemIndicator as $ } from "@ark-ui/react/select";
|
|
4
|
+
import { I as F } from "./IconX-CpPADKjZ.js";
|
|
5
|
+
import { I as M } from "./IconChevronDown-ev2ML7Ex.js";
|
|
6
|
+
import { I as P } from "./IconCheck-DzZA6b2U.js";
|
|
5
7
|
const R = {
|
|
6
8
|
small: "mare:h-10",
|
|
7
9
|
medium: "mare:h-12"
|
|
8
|
-
},
|
|
10
|
+
}, X = {
|
|
9
11
|
small: "mare:tpc-typography-body-s",
|
|
10
12
|
medium: "mare:tpc-typography-body-m"
|
|
11
|
-
},
|
|
13
|
+
}, q = (r) => `
|
|
12
14
|
mare:group mare:w-full mare:flex mare:items-center mare:justify-between mare:gap-3
|
|
13
15
|
${R[r]}
|
|
14
16
|
mare:px-3 mare:cursor-pointer
|
|
15
17
|
mare:rounded-input mare:border mare:border-strong mare:bg-default
|
|
16
|
-
mare:text-default ${
|
|
18
|
+
mare:text-default ${X[r]}
|
|
17
19
|
mare:ark-open:outline-solid mare:ark-open:outline-2 mare:ark-open:outline-accent mare:ark-open:-outline-offset-2
|
|
18
20
|
mare:ark-disabled:text-disabled mare:ark-disabled:border-disabled-default mare:ark-disabled:cursor-not-allowed
|
|
19
21
|
mare:data-[invalid]:outline-solid mare:data-[invalid]:outline-2 mare:data-[invalid]:outline-danger mare:data-[invalid]:-outline-offset-2
|
|
20
|
-
`, l = "mare:flex-auto mare:text-left mare:truncate mare:data-[placeholder-shown]:text-weak",
|
|
22
|
+
`, l = "mare:flex-auto mare:text-left mare:truncate mare:data-[placeholder-shown]:text-weak", A = "mare:flex mare:items-center mare:shrink-0 mare:text-lg mare:transition-transform mare:ark-open:rotate-180 mare:text-default", B = "mare:flex mare:items-center mare:shrink-0 mare:text-base mare:cursor-pointer mare:text-default mare:hover:text-weak", E = "mare:flex mare:items-center mare:shrink-0 mare:text-weak mare:[&>svg]:size-5", G = `
|
|
21
23
|
mare:flex mare:flex-col mare:gap-0.5 mare:p-1
|
|
22
24
|
mare:rounded-input mare:border mare:border-default mare:bg-raised
|
|
23
25
|
mare:shadow-[0_2px_6px_0_rgba(0,0,0,0.16)]
|
|
24
26
|
mare:max-h-72 mare:overflow-y-auto
|
|
25
27
|
mare:min-w-[var(--reference-width)]
|
|
26
28
|
mare:z-50
|
|
27
|
-
`,
|
|
29
|
+
`, H = `
|
|
28
30
|
mare:group/option mare:flex mare:items-center mare:justify-between mare:gap-2
|
|
29
31
|
mare:w-full mare:min-h-8 mare:py-2 mare:px-3 mare:cursor-pointer mare:rounded-menu-item
|
|
30
32
|
mare:tpc-typography-body-s mare:text-default
|
|
31
33
|
mare:ark-highlighted:bg-hover
|
|
32
34
|
mare:ark-selected:bg-accent-weak mare:ark-selected:text-accent
|
|
33
35
|
mare:ark-disabled:text-disabled mare:ark-disabled:cursor-not-allowed
|
|
34
|
-
`,
|
|
35
|
-
function
|
|
36
|
+
`, J = "mare:flex mare:items-center mare:text-accent", K = "mare:tpc-typography-label-s mare:text-default mare:mb-1.5 mare:block";
|
|
37
|
+
function ee({
|
|
36
38
|
value: r = null,
|
|
37
39
|
onValueChange: d,
|
|
38
40
|
options: t,
|
|
@@ -41,13 +43,13 @@ function Z({
|
|
|
41
43
|
disabled: p = !1,
|
|
42
44
|
invalid: f = !1,
|
|
43
45
|
clearable: h = !1,
|
|
44
|
-
label:
|
|
45
|
-
leadingIcon:
|
|
46
|
+
label: s,
|
|
47
|
+
leadingIcon: n,
|
|
46
48
|
indicator: x,
|
|
47
49
|
clearIcon: b,
|
|
48
50
|
checkIcon: g,
|
|
49
|
-
renderValue:
|
|
50
|
-
renderOption:
|
|
51
|
+
renderValue: i,
|
|
52
|
+
renderOption: c
|
|
51
53
|
}) {
|
|
52
54
|
const k = w(
|
|
53
55
|
() => S({
|
|
@@ -67,10 +69,10 @@ function Z({
|
|
|
67
69
|
invalid: f,
|
|
68
70
|
onValueChange: (a) => d?.(a.value[0] ?? null),
|
|
69
71
|
children: [
|
|
70
|
-
|
|
71
|
-
/* @__PURE__ */ e(
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
s && /* @__PURE__ */ e(v, { className: K, children: s }),
|
|
73
|
+
/* @__PURE__ */ e(I, { children: /* @__PURE__ */ m(N, { className: q(u), children: [
|
|
74
|
+
n && /* @__PURE__ */ e("span", { className: E, children: n }),
|
|
75
|
+
i ? /* @__PURE__ */ e(C, { children: (a) => a.selectedItems.length > 0 ? /* @__PURE__ */ e("span", { className: l, children: i(
|
|
74
76
|
a.selectedItems[0]
|
|
75
77
|
) }) : /* @__PURE__ */ e(
|
|
76
78
|
"span",
|
|
@@ -88,21 +90,21 @@ function Z({
|
|
|
88
90
|
placeholder: o
|
|
89
91
|
}
|
|
90
92
|
),
|
|
91
|
-
h && /* @__PURE__ */ e(
|
|
92
|
-
/* @__PURE__ */ e(
|
|
93
|
+
h && /* @__PURE__ */ e(z, { className: B, children: b ?? /* @__PURE__ */ e(F, { size: "1em" }) }),
|
|
94
|
+
/* @__PURE__ */ e(j, { className: A, children: x ?? /* @__PURE__ */ e(M, { size: "1em" }) })
|
|
93
95
|
] }) }),
|
|
94
|
-
/* @__PURE__ */ e(
|
|
96
|
+
/* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(D, { className: G, children: t.map((a) => /* @__PURE__ */ m(
|
|
95
97
|
L,
|
|
96
98
|
{
|
|
97
99
|
item: a,
|
|
98
|
-
className:
|
|
100
|
+
className: H,
|
|
99
101
|
children: [
|
|
100
|
-
/* @__PURE__ */ e(V, { children:
|
|
102
|
+
/* @__PURE__ */ e(V, { children: c ? c(a) : a.label }),
|
|
101
103
|
/* @__PURE__ */ e(
|
|
102
104
|
$,
|
|
103
105
|
{
|
|
104
|
-
className:
|
|
105
|
-
children: g ?? /* @__PURE__ */ e(P, {})
|
|
106
|
+
className: J,
|
|
107
|
+
children: g ?? /* @__PURE__ */ e(P, { size: "1em" })
|
|
106
108
|
}
|
|
107
109
|
)
|
|
108
110
|
]
|
|
@@ -114,5 +116,5 @@ function Z({
|
|
|
114
116
|
);
|
|
115
117
|
}
|
|
116
118
|
export {
|
|
117
|
-
|
|
119
|
+
ee as S
|
|
118
120
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e, Fragment as g } from "react/jsx-runtime";
|
|
2
2
|
import { Steps as a } from "@ark-ui/react/steps";
|
|
3
|
-
import {
|
|
3
|
+
import { I as k } from "./IconCheck-DzZA6b2U.js";
|
|
4
|
+
import { I as b, a as v } from "./IconChevronRight-DEIDRsvg.js";
|
|
4
5
|
const y = "mare:flex mare:ark-horizontal:flex-col mare:ark-vertical:flex-row mare:gap-4 mare:w-full", N = `
|
|
5
6
|
mare:hidden mare:sm:flex mare:gap-2 mare:overflow-x-auto
|
|
6
7
|
mare:ark-horizontal:flex-row mare:ark-horizontal:items-center mare:ark-horizontal:justify-between
|
|
7
8
|
mare:ark-vertical:flex-col mare:ark-vertical:items-start
|
|
8
|
-
`, w = "mare:relative mare:flex mare:items-center mare:ark-vertical:items-start mare:gap-3 mare:flex-1 mare:last:flex-none",
|
|
9
|
+
`, w = "mare:relative mare:flex mare:items-center mare:ark-vertical:items-start mare:gap-3 mare:flex-1 mare:last:flex-none", z = `
|
|
9
10
|
mare:group mare:flex mare:items-center mare:gap-3 mare:bg-transparent mare:border-none
|
|
10
11
|
mare:text-left mare:cursor-pointer mare:rounded-md mare:outline-none
|
|
11
12
|
mare:disabled:cursor-not-allowed mare:disabled:opacity-50
|
|
12
|
-
`,
|
|
13
|
+
`, j = (t) => `
|
|
13
14
|
mare:group mare:flex mare:items-center mare:justify-center mare:shrink-0 mare:relative
|
|
14
15
|
mare:size-8 mare:rounded-full mare:tpc-typography-label-s
|
|
15
16
|
mare:ark-incomplete:bg-neutral-weak mare:ark-incomplete:text-weak
|
|
16
17
|
mare:ark-current:bg-accent mare:ark-current:text-on-accent
|
|
17
18
|
${t === "strong" ? "mare:ark-complete:bg-accent mare:ark-complete:text-on-accent" : "mare:ark-complete:bg-accent-weak mare:ark-complete:text-accent"}
|
|
18
|
-
`, C = "mare:flex mare:items-center mare:justify-center mare:[&>svg]:size-4",
|
|
19
|
+
`, C = "mare:flex mare:items-center mare:justify-center mare:[&>svg]:size-4", I = "mare:flex mare:items-center mare:justify-center mare:group-[[data-complete]]:hidden", S = "mare:hidden mare:group-[[data-complete]]:flex mare:items-center mare:justify-center mare:absolute mare:inset-0 mare:[&>svg]:size-4", T = `
|
|
19
20
|
mare:flex-1 mare:h-[1.5px] mare:bg-neutral-weak mare:transition-colors mare:duration-300
|
|
20
21
|
mare:ark-complete:bg-accent
|
|
21
22
|
mare:ark-vertical:absolute mare:ark-vertical:flex-none mare:ark-vertical:w-[1.5px] mare:ark-vertical:h-auto
|
|
@@ -32,7 +33,7 @@ const y = "mare:flex mare:ark-horizontal:flex-col mare:ark-vertical:flex-row mar
|
|
|
32
33
|
`;
|
|
33
34
|
function $({ items: t }) {
|
|
34
35
|
return /* @__PURE__ */ m("div", { className: M, children: [
|
|
35
|
-
/* @__PURE__ */ e(a.PrevTrigger, { className: c, children: /* @__PURE__ */ e(
|
|
36
|
+
/* @__PURE__ */ e(a.PrevTrigger, { className: c, children: /* @__PURE__ */ e(b, { size: "1em" }) }),
|
|
36
37
|
/* @__PURE__ */ e(a.Context, { children: (n) => /* @__PURE__ */ m("span", { className: P, children: [
|
|
37
38
|
t[n.value]?.title,
|
|
38
39
|
" · ",
|
|
@@ -40,10 +41,10 @@ function $({ items: t }) {
|
|
|
40
41
|
"/",
|
|
41
42
|
n.count
|
|
42
43
|
] }) }),
|
|
43
|
-
/* @__PURE__ */ e(a.NextTrigger, { className: c, children: /* @__PURE__ */ e(v, {}) })
|
|
44
|
+
/* @__PURE__ */ e(a.NextTrigger, { className: c, children: /* @__PURE__ */ e(v, { size: "1em" }) })
|
|
44
45
|
] });
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function G({
|
|
47
48
|
items: t,
|
|
48
49
|
step: n,
|
|
49
50
|
defaultStep: o,
|
|
@@ -55,7 +56,7 @@ function E({
|
|
|
55
56
|
isStepValid: f,
|
|
56
57
|
isStepSkippable: h
|
|
57
58
|
}) {
|
|
58
|
-
const x =
|
|
59
|
+
const x = j(u);
|
|
59
60
|
return /* @__PURE__ */ m(
|
|
60
61
|
a.Root,
|
|
61
62
|
{
|
|
@@ -76,10 +77,10 @@ function E({
|
|
|
76
77
|
index: l,
|
|
77
78
|
className: w,
|
|
78
79
|
children: [
|
|
79
|
-
/* @__PURE__ */ m(a.Trigger, { className:
|
|
80
|
+
/* @__PURE__ */ m(a.Trigger, { className: z, children: [
|
|
80
81
|
/* @__PURE__ */ e(a.Indicator, { className: x, children: r.icon ? /* @__PURE__ */ e("span", { className: C, children: r.icon }) : /* @__PURE__ */ m(g, { children: [
|
|
81
|
-
/* @__PURE__ */ e("span", { className:
|
|
82
|
-
/* @__PURE__ */ e("span", { className:
|
|
82
|
+
/* @__PURE__ */ e("span", { className: S, children: /* @__PURE__ */ e(k, {}) }),
|
|
83
|
+
/* @__PURE__ */ e("span", { className: I, children: l + 1 })
|
|
83
84
|
] }) }),
|
|
84
85
|
/* @__PURE__ */ m("span", { className: L, children: [
|
|
85
86
|
/* @__PURE__ */ e("span", { className: R, children: r.title }),
|
|
@@ -106,5 +107,5 @@ function E({
|
|
|
106
107
|
);
|
|
107
108
|
}
|
|
108
109
|
export {
|
|
109
|
-
|
|
110
|
+
G as S
|
|
110
111
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { I as u } from "./IconX-CpPADKjZ.js";
|
|
3
3
|
const p = `
|
|
4
4
|
mare:inline-flex mare:items-center mare:gap-0.5 mare:rounded-full
|
|
5
5
|
mare:border mare:border-default mare:bg-default mare:text-default
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { forwardRef as u, createElement as e } from "react";
|
|
2
|
+
var k = {
|
|
3
|
+
outline: {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: 24,
|
|
6
|
+
height: 24,
|
|
7
|
+
viewBox: "0 0 24 24",
|
|
8
|
+
fill: "none",
|
|
9
|
+
stroke: "currentColor",
|
|
10
|
+
strokeWidth: 2,
|
|
11
|
+
strokeLinecap: "round",
|
|
12
|
+
strokeLinejoin: "round"
|
|
13
|
+
},
|
|
14
|
+
filled: {
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16
|
+
width: 24,
|
|
17
|
+
height: 24,
|
|
18
|
+
viewBox: "0 0 24 24",
|
|
19
|
+
fill: "currentColor",
|
|
20
|
+
stroke: "none"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const v = (i, s, a, l) => {
|
|
24
|
+
const o = u(
|
|
25
|
+
({ color: w = "currentColor", size: r = 24, stroke: c = 2, title: n, className: h, children: t, ...m }, d) => e(
|
|
26
|
+
"svg",
|
|
27
|
+
{
|
|
28
|
+
ref: d,
|
|
29
|
+
...k[i],
|
|
30
|
+
width: r,
|
|
31
|
+
height: r,
|
|
32
|
+
className: ["tabler-icon", `tabler-icon-${s}`, h].join(" "),
|
|
33
|
+
strokeWidth: c,
|
|
34
|
+
stroke: w,
|
|
35
|
+
...m
|
|
36
|
+
},
|
|
37
|
+
[
|
|
38
|
+
n && e("title", { key: "svg-title" }, n),
|
|
39
|
+
...l.map(([g, p]) => e(g, p)),
|
|
40
|
+
...Array.isArray(t) ? t : [t]
|
|
41
|
+
]
|
|
42
|
+
)
|
|
43
|
+
);
|
|
44
|
+
return o.displayName = `${a}`, o;
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
v as c
|
|
48
|
+
};
|
package/dist/stepper/index.js
CHANGED