@tpc-mare/mare-ui-components-react 0.1.22 → 0.1.24

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 (56) hide show
  1. package/dist/banner/index.js +1 -1
  2. package/dist/button/Button.d.ts +1 -1
  3. package/dist/button/Button.types.d.ts +6 -0
  4. package/dist/button/index.js +1 -1
  5. package/dist/confirm-dialog/index.js +1 -1
  6. package/dist/counter/index.js +1 -1
  7. package/dist/dialog/index.js +1 -1
  8. package/dist/drawer/index.js +1 -1
  9. package/dist/expandable-counter/index.js +1 -1
  10. package/dist/filter-chip/FilterChip.d.ts +2 -0
  11. package/dist/filter-chip/FilterChip.types.d.ts +40 -0
  12. package/dist/filter-chip/index.d.ts +2 -0
  13. package/dist/filter-chip/index.js +4 -0
  14. package/dist/filter-chip-dropdown-multiple/FilterChipDropdownMultiple.d.ts +9 -0
  15. package/dist/filter-chip-dropdown-multiple/FilterChipDropdownMultiple.types.d.ts +19 -0
  16. package/dist/filter-chip-dropdown-multiple/index.d.ts +2 -0
  17. package/dist/filter-chip-dropdown-multiple/index.js +4 -0
  18. package/dist/filter-chip-dropdown-single/FilterChipDropdownSingle.d.ts +11 -0
  19. package/dist/filter-chip-dropdown-single/FilterChipDropdownSingle.types.d.ts +15 -0
  20. package/dist/filter-chip-dropdown-single/index.d.ts +2 -0
  21. package/dist/filter-chip-dropdown-single/index.js +4 -0
  22. package/dist/filter-chip-group/FilterChipGroup.d.ts +8 -0
  23. package/dist/filter-chip-group/FilterChipGroup.types.d.ts +12 -0
  24. package/dist/filter-chip-group/index.d.ts +2 -0
  25. package/dist/filter-chip-group/index.js +5 -0
  26. package/dist/floating-action-button/FloatingActionButton.d.ts +2 -0
  27. package/dist/floating-action-button/FloatingActionButton.types.d.ts +9 -0
  28. package/dist/floating-action-button/index.d.ts +2 -0
  29. package/dist/floating-action-button/index.js +4 -0
  30. package/dist/index/index.d.ts +12 -0
  31. package/dist/index/index.js +97 -85
  32. package/dist/message/index.js +1 -1
  33. package/dist/paginator/index.js +1 -1
  34. package/dist/segmented-control/SegmentedControl.d.ts +2 -0
  35. package/dist/segmented-control/SegmentedControl.types.d.ts +54 -0
  36. package/dist/segmented-control/index.d.ts +2 -0
  37. package/dist/segmented-control/index.js +4 -0
  38. package/dist/shared/{Banner-DXftmx9P.js → Banner-B_4xUzqu.js} +1 -1
  39. package/dist/shared/{Button-AfMqNCme.js → Button-BDnOdO_d.js} +36 -29
  40. package/dist/shared/{ConfirmDialog-Bvk8KZ0M.js → ConfirmDialog-DBX-JpDu.js} +1 -1
  41. package/dist/shared/{Counter-DpOtUolN.js → Counter-DRUUEj_u.js} +1 -1
  42. package/dist/shared/{DialogHeader-RzfQm-pi.js → DialogHeader-DhmbjN0J.js} +1 -1
  43. package/dist/shared/{DrawerFooter-BxOEFQ-W.js → DrawerFooter-DoOWN-f3.js} +1 -1
  44. package/dist/shared/{ExpandableCounter-BEMcnTGQ.js → ExpandableCounter-DkmezZIB.js} +2 -2
  45. package/dist/shared/FilterChip-eECL3oO7.js +71 -0
  46. package/dist/shared/FilterChipDropdownMultiple-D2eMYXyS.js +162 -0
  47. package/dist/shared/FilterChipDropdownSingle-4G5LDRCw.js +135 -0
  48. package/dist/shared/FilterChipGroup-BzE-EQsA.js +19 -0
  49. package/dist/shared/FloatingActionButton-DPWP3O5C.js +19 -0
  50. package/dist/shared/{Message-BjC8CCSI.js → Message-D7kmscvR.js} +1 -1
  51. package/dist/shared/{Paginator-Bp2nghqW.js → Paginator-Bxe9nv_5.js} +1 -1
  52. package/dist/shared/SegmentedControl-BpH7DANc.js +94 -0
  53. package/dist/shared/{Snackbar-C29nLHO9.js → Snackbar-CfFmZUci.js} +1 -1
  54. package/dist/snackbar/index.js +1 -1
  55. package/dist/styles.css +1 -1
  56. package/package.json +1 -1
@@ -1,20 +1,20 @@
1
- import { jsxs as f, jsx as m } from "react/jsx-runtime";
2
- import { P as z } from "./ProgressSpinner-B-lrS-tu.js";
3
- const x = {
1
+ import { jsxs as x, jsx as m } from "react/jsx-runtime";
2
+ import { P as k } from "./ProgressSpinner-B-lrS-tu.js";
3
+ const w = {
4
4
  left: "mare:-order-1",
5
5
  right: "mare:order-1",
6
6
  top: "mare:-order-1",
7
7
  bottom: "mare:order-1"
8
- }, k = {
8
+ }, $ = {
9
9
  primary: "mare:stroke-on-accent",
10
10
  secondary: "mare:stroke-default",
11
11
  ghost: "mare:stroke-default",
12
12
  danger: "mare:stroke-on-danger",
13
13
  neutral: "mare:stroke-default"
14
- }, w = (e) => e === "bordered" ? `mare:data-severity-neutral:border mare:data-severity-neutral:border-strong
14
+ }, _ = (e) => e === "bordered" ? `mare:data-severity-neutral:border mare:data-severity-neutral:border-strong
15
15
  mare:data-severity-ghost:border mare:data-severity-ghost:border-strong mare:not-p-disabled:data-severity-ghost:hover:bg-transparent` : `
16
16
  mare:not-p-disabled:not-data-link:[&[data-severity~='ghost']:active]:bg-active
17
- mare:not-p-disabled:not-data-link:[&[data-severity~='danger']:active]:bg-danger-active`, $ = (e, a) => `
17
+ mare:not-p-disabled:not-data-link:[&[data-severity~='danger']:active]:bg-danger-active`, L = (e, a) => `
18
18
  mare:group/button
19
19
  mare:relative
20
20
  mare:rounded-button mare:flex mare:items-center mare:justify-center
@@ -40,7 +40,7 @@ const x = {
40
40
  mare:not-p-disabled:not-data-link:[&[data-severity~='danger']:active]:bg-danger-active
41
41
 
42
42
  mare:data-severity-neutral:bg-default mare:data-severity-neutral:text-default
43
- ${w(e)}
43
+ ${_(e)}
44
44
  mare:data-size-small:py-2.5 mare:data-size-small:px-3.5 mare:data-size-small:gap-1
45
45
  mare:data-size-small:icon-only:rounded:p-2.5 mare:data-size-small:h-10 mare:data-size-small:icon-only:w-10 mare:data-size-small:icon-only:min-w-10
46
46
 
@@ -67,6 +67,8 @@ const x = {
67
67
  mare:icon-only:rounded-full!
68
68
  mare:rounded:rounded-full
69
69
  mare:p-raised:shadow-[0_4px_16px_0_rgba(0,0,0,0.16)]
70
+ mare:p-raised:data-severity-secondary:bg-raised mare:p-raised:data-severity-secondary:border-default
71
+ mare:p-raised:data-size-medium:px-7 mare:p-raised:data-size-medium:py-3 mare:p-raised:data-size-medium:gap-2 mare:p-raised:data-size-medium:h-14 mare:p-raised:data-size-medium:icon-only:w-14 mare:p-raised:data-size-medium:icon-only:min-w-14
70
72
 
71
73
  mare:data-link:bg-transparent
72
74
  mare:data-link:border-0
@@ -91,21 +93,22 @@ const x = {
91
93
 
92
94
  mare:data-link:data-size-large:h-auto
93
95
  mare:data-link:data-size-large:gap-2
94
- `, _ = "mare:relative mare:inline-block mare:no-underline! mare:after:content-[''] mare:after:absolute mare:after:left-0 mare:after:-bottom-[4px] mare:after:h-[1px] mare:after:w-full mare:after:bg-inverse mare:after:origin-left mare:after:scale-x-[1] mare:after:transform-gpu mare:after:will-change-transform mare:after:transition-transform mare:after:duration-[500ms] mare:after:ease-[cubic-bezier(0.19,1,0.22,1)] mare:hover:after:scale-x-0 mare:hover:after:origin-right", L = (e) => {
96
+ `, j = "mare:relative mare:inline-block mare:no-underline! mare:after:content-[''] mare:after:absolute mare:after:left-0 mare:after:-bottom-[4px] mare:after:h-[1px] mare:after:w-full mare:after:bg-inverse mare:after:origin-left mare:after:scale-x-[1] mare:after:transform-gpu mare:after:will-change-transform mare:after:transition-transform mare:after:duration-[500ms] mare:after:ease-[cubic-bezier(0.19,1,0.22,1)] mare:hover:after:scale-x-0 mare:hover:after:origin-right", N = (e) => {
95
97
  const { isLink: a, animateLink: r, hiddenLabel: s, loading: d } = e;
96
98
  return `mare:relative
99
+ mare:group-[[data-raised]]/button:tpc-typography-label-m!
97
100
  ${a ? "mare:data-size-xsmall:tpc-typography-label-s-underline" : "mare:data-size-xsmall:tpc-typography-label-s"}
98
101
  ${a ? "mare:data-size-small:tpc-typography-label-s-underline" : "mare:data-size-small:tpc-typography-label-s"}
99
102
  ${a ? "mare:data-size-medium:tpc-typography-label-m-underline" : "mare:data-size-medium:tpc-typography-label-m"}
100
103
  ${a ? "mare:data-size-large:tpc-typography-label-m-underline" : "mare:data-size-large:tpc-typography-label-m"}
101
- ${r && a ? _ : ""}
104
+ ${r && a ? j : ""}
102
105
  ${s ? "mare:hidden" : ""} ${a ? "" : "mare:px-0.5"} ${d ? "mare:opacity-0" : ""}
103
106
  `;
104
- }, j = (e, a, r) => a ? e === "xsmall" || e === "small" ? "small" : "medium" : e === "xsmall" ? r ? "medium" : "small" : "medium", N = {
107
+ }, P = (e, a, r) => a ? e === "xsmall" || e === "small" ? "small" : "medium" : e === "xsmall" ? r ? "medium" : "small" : "medium", B = {
105
108
  small: 16,
106
109
  medium: 20
107
110
  };
108
- function S({
111
+ function q({
109
112
  label: e,
110
113
  severity: a = "primary",
111
114
  size: r = "medium",
@@ -113,41 +116,45 @@ function S({
113
116
  iconOnly: d = !1,
114
117
  disabled: l = !1,
115
118
  loading: t = !1,
116
- link: c = !1,
117
- linkAnimation: y = !1,
119
+ link: y = !1,
120
+ linkAnimation: c = !1,
121
+ raised: g = !1,
122
+ rounded: b = !1,
118
123
  icon: n,
119
- iconPos: g = "left",
124
+ iconPos: u = "left",
120
125
  children: o,
121
- type: b = "button",
122
- ...u
126
+ type: v = "button",
127
+ ...h
123
128
  }) {
124
- const i = c, v = !!e || !!o, h = d && !!n, p = N[j(r, i, d)];
125
- return /* @__PURE__ */ f(
129
+ const i = y, z = !!e || !!o, f = d && !!n, p = B[P(r, i, d)];
130
+ return /* @__PURE__ */ x(
126
131
  "button",
127
132
  {
128
- type: b,
129
- className: $(s, i),
133
+ type: v,
134
+ className: L(s, i),
130
135
  "data-severity": a,
131
136
  "data-size": r,
132
137
  "data-icon-only": d ? "true" : void 0,
133
138
  "data-disabled": l ? "true" : void 0,
134
139
  "data-loading": t ? "true" : void 0,
135
140
  "data-link": i ? "true" : void 0,
141
+ "data-raised": g ? "true" : void 0,
142
+ "data-rounded": b ? "true" : void 0,
136
143
  disabled: l || t,
137
144
  "aria-busy": t || void 0,
138
- ...u,
145
+ ...h,
139
146
  children: [
140
147
  t && /* @__PURE__ */ m("span", { className: "mare:absolute mare:inset-0 mare:flex mare:items-center mare:justify-center", children: /* @__PURE__ */ m(
141
- z,
148
+ k,
142
149
  {
143
- circleClass: k[a],
150
+ circleClass: $[a],
144
151
  className: "mare:size-5"
145
152
  }
146
153
  ) }),
147
154
  n && /* @__PURE__ */ m(
148
155
  "span",
149
156
  {
150
- className: `mare:inline-flex mare:shrink-0 mare:items-center mare:justify-center mare:[&>svg]:size-full! ${x[g]} ${t ? "mare:opacity-0" : ""}`,
157
+ className: `mare:inline-flex mare:shrink-0 mare:items-center mare:justify-center mare:[&>svg]:size-full! ${w[u]} ${t ? "mare:opacity-0" : ""}`,
151
158
  style: {
152
159
  width: `${p}px`,
153
160
  height: `${p}px`
@@ -156,13 +163,13 @@ function S({
156
163
  children: n
157
164
  }
158
165
  ),
159
- v && /* @__PURE__ */ m(
166
+ z && /* @__PURE__ */ m(
160
167
  "span",
161
168
  {
162
- className: L({
169
+ className: N({
163
170
  isLink: i,
164
- animateLink: y,
165
- hiddenLabel: h,
171
+ animateLink: c,
172
+ hiddenLabel: f,
166
173
  loading: t
167
174
  }),
168
175
  children: o ?? e
@@ -173,5 +180,5 @@ function S({
173
180
  );
174
181
  }
175
182
  export {
176
- S as B
183
+ q as B
177
184
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, jsxs as t } from "react/jsx-runtime";
2
2
  import { D as g, a as h } from "./DialogFooter-DyltZzK-.js";
3
- import { B as n } from "./Button-AfMqNCme.js";
3
+ import { B as n } from "./Button-BDnOdO_d.js";
4
4
  const u = (e) => `
5
5
  mare:w-full mare:h-full
6
6
  ${e === "column" ? "mare:pt-10 mare:pb-4" : "mare:pt-8"}
@@ -1,6 +1,6 @@
1
1
  import { jsxs as h, jsx as r } from "react/jsx-runtime";
2
2
  import { NumberInput as a } from "@ark-ui/react/number-input";
3
- import { B as i } from "./Button-AfMqNCme.js";
3
+ import { B as i } from "./Button-BDnOdO_d.js";
4
4
  import { I as x } from "./IconMinus-fS_GL0Et.js";
5
5
  import { c as I } from "./createReactComponent-Cb6Pzf10.js";
6
6
  const v = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M5 12l14 0", key: "svg-1" }]], C = I("outline", "plus", "Plus", v), N = {
@@ -1,7 +1,7 @@
1
1
  import { jsxs as t, jsx as s } from "react/jsx-runtime";
2
2
  import { Dialog as l } from "@ark-ui/react/dialog";
3
3
  import { l as h, i as o, n as d, s as u } from "./DialogFooter-DyltZzK-.js";
4
- import { B as r } from "./Button-AfMqNCme.js";
4
+ import { B as r } from "./Button-BDnOdO_d.js";
5
5
  import { I as p } from "./IconX-CpPADKjZ.js";
6
6
  function y({
7
7
  title: e,
@@ -1,7 +1,7 @@
1
1
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
2
  import { Dialog as t } from "@ark-ui/react/dialog";
3
3
  import { Portal as g } from "@ark-ui/react/portal";
4
- import { B as d } from "./Button-AfMqNCme.js";
4
+ import { B as d } from "./Button-BDnOdO_d.js";
5
5
  import { I as y } from "./IconX-CpPADKjZ.js";
6
6
  const _ = (e) => {
7
7
  switch (e) {
@@ -1,6 +1,6 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { B as p } from "./Button-AfMqNCme.js";
3
- import { C as x, I as d } from "./Counter-DpOtUolN.js";
2
+ import { B as p } from "./Button-BDnOdO_d.js";
3
+ import { C as x, I as d } from "./Counter-DRUUEj_u.js";
4
4
  const m = `
5
5
  mare:inline-flex mare:origin-left mare:[animation:mare-expandable-counter-enter_100ms_ease-out]
6
6
  `, C = (e, a) => e > a;
@@ -0,0 +1,71 @@
1
+ import { jsxs as g, jsx as a } from "react/jsx-runtime";
2
+ import { useContext as v } from "react";
3
+ import { a as h } from "./FilterChipGroup-BzE-EQsA.js";
4
+ import { c as x } from "./createReactComponent-Cb6Pzf10.js";
5
+ import { I as C } from "./IconChevronDown-ev2ML7Ex.js";
6
+ const z = [["path", { d: "M6 15l6 -6l6 6", key: "svg-0" }]], y = x("outline", "chevron-up", "ChevronUp", z), k = `
7
+ mare:group mare:relative mare:inline-flex mare:items-center mare:gap-1.5
8
+ mare:rounded-full mare:border mare:cursor-pointer mare:select-none
9
+ mare:tpc-typography-body-s mare:transition-colors mare:duration-150
10
+
11
+ mare:data-size-medium:h-10 mare:data-size-medium:px-3.5
12
+ mare:data-size-large:h-12 mare:data-size-large:px-4
13
+
14
+ mare:not-data-selected:bg-default mare:not-data-selected:text-default mare:not-data-selected:border-default
15
+ mare:not-data-selected:not-p-disabled:hover:bg-hover
16
+
17
+ mare:data-selected:bg-accent-weak mare:data-selected:text-accent mare:data-selected:border-transparent
18
+ mare:data-selected:outline-solid mare:data-selected:outline-2 mare:data-selected:outline-accent mare:data-selected:-outline-offset-2
19
+
20
+ mare:focus-visible:outline-solid mare:focus-visible:outline-2 mare:focus-visible:outline-accent mare:focus-visible:-outline-offset-2
21
+
22
+ mare:p-disabled:cursor-not-allowed mare:p-disabled:text-disabled mare:p-disabled:border-disabled-default
23
+ mare:p-disabled:bg-transparent mare:p-disabled:hover:bg-transparent
24
+ `, N = "mare:truncate mare:px-0.5", F = "mare:flex mare:items-center mare:shrink-0 mare:[&>svg]:size-4 mare:cursor-pointer";
25
+ function M({
26
+ value: d,
27
+ size: c = "medium",
28
+ disabled: t = !1,
29
+ dropdown: e = !1,
30
+ selected: u = !1,
31
+ onSelectedChange: p,
32
+ dropdownOpen: r = !1,
33
+ onDropdownOpenChange: f,
34
+ onToggleDropdown: b,
35
+ children: s
36
+ }) {
37
+ const i = v(h), l = d ?? (typeof s == "string" ? s : ""), m = !!i && !e, o = e ? !1 : m ? i.isSelected(l) : u;
38
+ return /* @__PURE__ */ g(
39
+ "button",
40
+ {
41
+ type: "button",
42
+ className: k,
43
+ "data-size": c,
44
+ "data-selected": o ? "true" : void 0,
45
+ "data-disabled": t ? "true" : void 0,
46
+ disabled: t,
47
+ "aria-pressed": e ? void 0 : o,
48
+ "aria-expanded": e ? r : void 0,
49
+ onClick: (n) => {
50
+ if (!t) {
51
+ if (e) {
52
+ f?.(!r), b?.(n, n.currentTarget);
53
+ return;
54
+ }
55
+ if (m) {
56
+ i.toggle(l);
57
+ return;
58
+ }
59
+ p?.(!o);
60
+ }
61
+ },
62
+ children: [
63
+ /* @__PURE__ */ a("span", { className: N, children: s }),
64
+ e && /* @__PURE__ */ a("span", { className: F, children: r ? /* @__PURE__ */ a(y, { size: "1em" }) : /* @__PURE__ */ a(C, { size: "1em" }) })
65
+ ]
66
+ }
67
+ );
68
+ }
69
+ export {
70
+ M as F
71
+ };
@@ -0,0 +1,162 @@
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import { useState as N, useMemo as x } from "react";
3
+ import { createListCollection as I, SelectRoot as D, SelectControl as z, SelectTrigger as _, SelectPositioner as j, SelectContent as O, SelectItem as q, SelectItemText as E } from "@ark-ui/react/select";
4
+ import { C as g } from "./Checkbox-BXnSN2vK.js";
5
+ import { I as F } from "./IconChevronDown-ev2ML7Ex.js";
6
+ import { I as M } from "./IconSearch-CgM6jEUh.js";
7
+ const P = {
8
+ medium: "mare:h-10",
9
+ large: "mare:h-12"
10
+ }, T = {
11
+ medium: "mare:px-3.5",
12
+ large: "mare:px-4"
13
+ }, $ = (r) => `
14
+ mare:group mare:inline-flex mare:items-center mare:gap-1.5 mare:max-w-full
15
+ mare:rounded-full mare:border mare:cursor-pointer mare:select-none
16
+ mare:tpc-typography-body-s mare:transition-colors mare:duration-150
17
+ ${P[r]} ${T[r]}
18
+ mare:bg-default mare:text-default mare:border-default
19
+ mare:ark-open:outline-solid mare:ark-open:outline-2 mare:ark-open:outline-accent mare:ark-open:-outline-offset-2
20
+ mare:not-ark-disabled:hover:bg-hover
21
+ mare:ark-disabled:cursor-not-allowed mare:ark-disabled:text-disabled mare:ark-disabled:border-disabled-default
22
+ mare:data-[invalid]:outline-solid mare:data-[invalid]:outline-2 mare:data-[invalid]:outline-danger mare:data-[invalid]:-outline-offset-2
23
+ `, B = "mare:truncate mare:data-[placeholder-shown]:text-weak", K = "mare:flex mare:items-center mare:shrink-0 mare:[&>svg]:size-4 mare:transition-transform mare:ark-open:rotate-180", L = `
24
+ mare:flex mare:flex-col mare:gap-0.5 mare:p-1
25
+ mare:rounded-input mare:border mare:border-default mare:bg-raised
26
+ mare:shadow-[0_2px_6px_0_rgba(0,0,0,0.16)]
27
+ mare:max-h-72 mare:overflow-y-auto
28
+ mare:min-w-[var(--reference-width)]
29
+ mare:z-50
30
+ `, Q = `
31
+ mare:flex mare:items-center mare:gap-2 mare:mb-1 mare:px-3 mare:h-10
32
+ mare:rounded-input mare:border mare:border-strong mare:bg-default
33
+ mare:focus-within:outline-solid mare:focus-within:outline-2 mare:focus-within:outline-accent mare:focus-within:-outline-offset-2
34
+ `, R = "mare:flex-auto mare:bg-transparent mare:outline-none mare:text-default mare:placeholder:text-weak mare:tpc-typography-body-s", V = "mare:flex mare:items-center mare:shrink-0 mare:text-weak", G = "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", H = `
35
+ mare:group/option mare:flex mare:items-center mare:gap-2
36
+ mare:w-full mare:min-h-8 mare:py-2 mare:px-3 mare:cursor-pointer mare:rounded-menu-item
37
+ mare:tpc-typography-body-s mare:text-default
38
+ mare:ark-highlighted:bg-hover
39
+ mare:ark-selected:bg-accent-weak mare:ark-selected:text-accent
40
+ mare:ark-disabled:text-disabled mare:ark-disabled:cursor-not-allowed
41
+ `, J = "mare:py-2 mare:px-3 mare:tpc-typography-body-s mare:text-weak", y = (r, m) => {
42
+ const a = r.filter((l) => !l.disabled);
43
+ return a.length > 0 && a.every((l) => m.includes(l.value));
44
+ }, U = (r, m) => {
45
+ const a = r.filter((n) => !n.disabled).map((n) => n.value), l = m.filter((n) => !a.includes(n));
46
+ return y(r, m) ? l : [...l, ...a];
47
+ }, W = (r, m) => r.filter((a) => m.includes(a.value)).map((a) => a.label).join(", ");
48
+ function ae({
49
+ value: r = [],
50
+ onValueChange: m,
51
+ options: a,
52
+ placeholder: l = "Select…",
53
+ size: n = "medium",
54
+ disabled: k = !1,
55
+ invalid: v = !1,
56
+ filter: s = !1,
57
+ headerLabel: d,
58
+ hasCheckbox: f = !0,
59
+ showToggleAll: c = !1,
60
+ renderOption: h
61
+ }) {
62
+ const [u, b] = N(""), o = x(() => {
63
+ if (!s) return a;
64
+ const e = u.trim().toLowerCase();
65
+ return e ? a.filter(
66
+ (p) => p.label.toLowerCase().includes(e)
67
+ ) : a;
68
+ }, [s, u, a]), w = x(
69
+ () => I({
70
+ items: o,
71
+ itemToValue: (e) => e.value,
72
+ itemToString: (e) => e.label,
73
+ isItemDisabled: (e) => !!e.disabled
74
+ }),
75
+ [o]
76
+ ), S = W(a, r), C = y(o, r);
77
+ return /* @__PURE__ */ i(
78
+ D,
79
+ {
80
+ multiple: !0,
81
+ closeOnSelect: !1,
82
+ collection: w,
83
+ value: r,
84
+ disabled: k,
85
+ invalid: v,
86
+ onValueChange: (e) => m?.(e.value),
87
+ onOpenChange: (e) => {
88
+ e.open || b("");
89
+ },
90
+ children: [
91
+ /* @__PURE__ */ t(z, { children: /* @__PURE__ */ i(_, { className: $(n), children: [
92
+ /* @__PURE__ */ t("span", { className: B, children: S || l }),
93
+ /* @__PURE__ */ t("span", { className: K, children: /* @__PURE__ */ t(F, { size: "1em" }) })
94
+ ] }) }),
95
+ /* @__PURE__ */ t(j, { children: /* @__PURE__ */ i(O, { className: L, children: [
96
+ s && /* @__PURE__ */ i("div", { className: Q, children: [
97
+ /* @__PURE__ */ t(
98
+ "input",
99
+ {
100
+ className: R,
101
+ value: u,
102
+ onChange: (e) => b(e.target.value),
103
+ onKeyDown: (e) => {
104
+ e.key === "Enter" && e.preventDefault(), e.key !== "Escape" && e.stopPropagation();
105
+ },
106
+ placeholder: "Buscar…"
107
+ }
108
+ ),
109
+ /* @__PURE__ */ t("span", { className: V, children: /* @__PURE__ */ t(M, { size: "1em" }) })
110
+ ] }),
111
+ (c || d) && /* @__PURE__ */ i(
112
+ "div",
113
+ {
114
+ className: G,
115
+ onClick: c ? () => m?.(
116
+ U(
117
+ o,
118
+ r
119
+ )
120
+ ) : void 0,
121
+ children: [
122
+ c && f && /* @__PURE__ */ t(
123
+ g,
124
+ {
125
+ checked: C,
126
+ readOnly: !0
127
+ }
128
+ ),
129
+ d && /* @__PURE__ */ t("span", { children: d })
130
+ ]
131
+ }
132
+ ),
133
+ o.length === 0 && /* @__PURE__ */ t("div", { className: J, children: "Sin resultados" }),
134
+ o.map((e) => {
135
+ const p = r.includes(e.value);
136
+ return /* @__PURE__ */ i(
137
+ q,
138
+ {
139
+ item: e,
140
+ className: H,
141
+ children: [
142
+ f && /* @__PURE__ */ t(
143
+ g,
144
+ {
145
+ checked: p,
146
+ readOnly: !0
147
+ }
148
+ ),
149
+ /* @__PURE__ */ t(E, { children: h ? h(e) : e.label })
150
+ ]
151
+ },
152
+ e.value
153
+ );
154
+ })
155
+ ] }) })
156
+ ]
157
+ }
158
+ );
159
+ }
160
+ export {
161
+ ae as F
162
+ };
@@ -0,0 +1,135 @@
1
+ import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
+ import { useState as y, useMemo as c } from "react";
3
+ import { createListCollection as v, SelectRoot as S, SelectControl as I, SelectTrigger as C, SelectValueText as N, SelectClearTrigger as z, SelectIndicator as T, SelectPositioner as D, SelectContent as _, SelectItem as j, SelectItemText as L, SelectItemIndicator as V } from "@ark-ui/react/select";
4
+ import { I as q } from "./IconX-CpPADKjZ.js";
5
+ import { I as E } from "./IconChevronDown-ev2ML7Ex.js";
6
+ import { I as F } from "./IconSearch-CgM6jEUh.js";
7
+ import { I as P } from "./IconCheck-DzZA6b2U.js";
8
+ const $ = {
9
+ medium: "mare:h-10",
10
+ large: "mare:h-12"
11
+ }, B = {
12
+ medium: "mare:px-3.5",
13
+ large: "mare:px-4"
14
+ }, K = (r) => `
15
+ mare:group mare:relative mare:inline-flex mare:items-center mare:gap-1.5 mare:max-w-full
16
+ mare:rounded-full mare:border mare:cursor-pointer mare:select-none
17
+ mare:tpc-typography-body-s mare:transition-colors mare:duration-150
18
+ ${$[r]} ${B[r]}
19
+ mare:bg-default mare:text-default mare:border-default
20
+ mare:focus-within:outline-solid mare:focus-within:outline-2 mare:focus-within:outline-accent mare:focus-within:-outline-offset-2
21
+ mare:not-ark-disabled:hover:bg-hover
22
+ mare:ark-disabled:cursor-not-allowed mare:ark-disabled:text-disabled mare:ark-disabled:border-disabled-default
23
+ mare:data-[invalid]:outline-solid mare:data-[invalid]:outline-2 mare:data-[invalid]:outline-danger mare:data-[invalid]:-outline-offset-2
24
+ `, M = "mare:flex-auto mare:flex mare:items-center mare:cursor-pointer mare:bg-transparent mare:text-left mare:min-w-0", Q = "mare:truncate mare:data-[placeholder-shown]:text-weak", R = "mare:flex mare:items-center mare:shrink-0 mare:text-base mare:cursor-pointer mare:hover:text-weak", X = "mare:flex mare:items-center mare:shrink-0 mare:[&>svg]:size-4 mare:transition-transform mare:ark-open:rotate-180", A = `
25
+ mare:flex mare:flex-col mare:gap-0.5 mare:p-1
26
+ mare:rounded-input mare:border mare:border-default mare:bg-raised
27
+ mare:shadow-[0_2px_6px_0_rgba(0,0,0,0.16)]
28
+ mare:max-h-72 mare:overflow-y-auto
29
+ mare:min-w-[var(--reference-width)]
30
+ mare:z-50
31
+ `, G = `
32
+ mare:flex mare:items-center mare:gap-2 mare:mb-1 mare:px-3 mare:h-10
33
+ mare:rounded-input mare:border mare:border-strong mare:bg-default
34
+ mare:focus-within:outline-solid mare:focus-within:outline-2 mare:focus-within:outline-accent mare:focus-within:-outline-offset-2
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", O = `
36
+ mare:group/option mare:flex mare:items-center mare:justify-between mare:gap-2
37
+ mare:w-full mare:min-h-8 mare:py-2 mare:px-3 mare:cursor-pointer mare:rounded-menu-item
38
+ mare:tpc-typography-body-s mare:text-default
39
+ mare:ark-highlighted:bg-hover
40
+ mare:ark-selected:bg-accent-weak mare:ark-selected:text-accent
41
+ mare:ark-disabled:text-disabled mare:ark-disabled:cursor-not-allowed
42
+ `, U = "mare:flex mare:items-center mare:text-accent", W = "mare:py-2 mare:px-3 mare:tpc-typography-body-s mare:text-weak";
43
+ function le({
44
+ value: r = null,
45
+ onValueChange: d,
46
+ options: m,
47
+ placeholder: u = "Select…",
48
+ size: f = "medium",
49
+ disabled: p = !1,
50
+ invalid: h = !1,
51
+ filter: o = !1,
52
+ clearable: x = !1,
53
+ renderOption: n,
54
+ checkIcon: g,
55
+ clearIcon: b
56
+ }) {
57
+ const [i, s] = y(""), l = c(() => {
58
+ if (!o) return m;
59
+ const e = i.trim().toLowerCase();
60
+ return e ? m.filter((k) => k.label.toLowerCase().includes(e)) : m;
61
+ }, [o, i, m]), w = c(
62
+ () => v({
63
+ items: l,
64
+ itemToValue: (e) => e.value,
65
+ itemToString: (e) => e.label,
66
+ isItemDisabled: (e) => !!e.disabled
67
+ }),
68
+ [l]
69
+ );
70
+ return /* @__PURE__ */ t(
71
+ S,
72
+ {
73
+ collection: w,
74
+ value: r == null ? [] : [r],
75
+ disabled: p,
76
+ invalid: h,
77
+ onValueChange: (e) => d?.(e.value[0] ?? null),
78
+ onOpenChange: (e) => {
79
+ e.open || s("");
80
+ },
81
+ children: [
82
+ /* @__PURE__ */ t(I, { className: K(f), children: [
83
+ /* @__PURE__ */ a(C, { className: M, children: /* @__PURE__ */ a(
84
+ N,
85
+ {
86
+ className: Q,
87
+ placeholder: u
88
+ }
89
+ ) }),
90
+ x && /* @__PURE__ */ a(z, { className: R, children: b ?? /* @__PURE__ */ a(q, { size: "1em" }) }),
91
+ /* @__PURE__ */ a(T, { className: X, children: /* @__PURE__ */ a(E, { size: "1em" }) })
92
+ ] }),
93
+ /* @__PURE__ */ a(D, { children: /* @__PURE__ */ t(_, { className: A, children: [
94
+ o && /* @__PURE__ */ t("div", { className: G, children: [
95
+ /* @__PURE__ */ a(
96
+ "input",
97
+ {
98
+ className: H,
99
+ value: i,
100
+ onChange: (e) => s(e.target.value),
101
+ onKeyDown: (e) => {
102
+ e.key === "Enter" && e.preventDefault(), e.key !== "Escape" && e.stopPropagation();
103
+ },
104
+ placeholder: "Buscar…"
105
+ }
106
+ ),
107
+ /* @__PURE__ */ a("span", { className: J, children: /* @__PURE__ */ a(F, { size: "1em" }) })
108
+ ] }),
109
+ l.length === 0 && /* @__PURE__ */ a("div", { className: W, children: "Sin resultados" }),
110
+ l.map((e) => /* @__PURE__ */ t(
111
+ j,
112
+ {
113
+ item: e,
114
+ className: O,
115
+ children: [
116
+ /* @__PURE__ */ a(L, { children: n ? n(e) : e.label }),
117
+ /* @__PURE__ */ a(
118
+ V,
119
+ {
120
+ className: U,
121
+ children: g ?? /* @__PURE__ */ a(P, { size: "1em" })
122
+ }
123
+ )
124
+ ]
125
+ },
126
+ e.value
127
+ ))
128
+ ] }) })
129
+ ]
130
+ }
131
+ );
132
+ }
133
+ export {
134
+ le as F
135
+ };
@@ -0,0 +1,19 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { createContext as l } from "react";
3
+ const c = "mare:inline-flex mare:flex-wrap mare:gap-2", p = (e, i) => i ? Array.isArray(e) ? e : [] : typeof e == "string" ? [e] : [], f = (e, i) => e.includes(i), d = (e, i, o) => o ? e.includes(i) ? e.filter((r) => r !== i) : [...e, i] : e[0] === i ? void 0 : i, m = l(null);
4
+ function g({
5
+ multiple: e = !1,
6
+ value: i,
7
+ onValueChange: o,
8
+ children: r
9
+ }) {
10
+ const t = p(i, e), s = {
11
+ isSelected: (n) => f(t, n),
12
+ toggle: (n) => o?.(d(t, n, e))
13
+ };
14
+ return /* @__PURE__ */ a("div", { className: c, children: /* @__PURE__ */ a(m.Provider, { value: s, children: r }) });
15
+ }
16
+ export {
17
+ g as F,
18
+ m as a
19
+ };
@@ -0,0 +1,19 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { B as n } from "./Button-BDnOdO_d.js";
3
+ function e({
4
+ severity: r = "primary",
5
+ ...t
6
+ }) {
7
+ return /* @__PURE__ */ o(
8
+ n,
9
+ {
10
+ ...t,
11
+ severity: r,
12
+ raised: !0,
13
+ rounded: !0
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ e as F
19
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { B as o } from "./Button-AfMqNCme.js";
2
+ import { B as o } from "./Button-BDnOdO_d.js";
3
3
  import { I as p } from "./IconX-CpPADKjZ.js";
4
4
  const c = (e) => e === "filled" ? `mare:w-full mare:max-w-md mare:rounded-tpc-container-s mare:p-4
5
5
  mare:flex mare:items-start mare:justify-between mare:gap-4
@@ -1,7 +1,7 @@
1
1
  import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
2
  import { useRef as P, useState as R, useEffect as k } from "react";
3
3
  import { Pagination as c } from "@ark-ui/react/pagination";
4
- import { B as h } from "./Button-AfMqNCme.js";
4
+ import { B as h } from "./Button-BDnOdO_d.js";
5
5
  import { S as N } from "./SelectField-CvKaukCG.js";
6
6
  import { c as b } from "./createReactComponent-Cb6Pzf10.js";
7
7
  import { I as M, a as j } from "./IconChevronRight-DEIDRsvg.js";