@konstructio/ui 0.0.12-alpha.2 → 0.0.12-alpha.21
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/{Modal-DZUwNzSW.js → Modal-B-E9uaA6.js} +354 -346
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.variants.js +0 -1
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +18 -15
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +32 -0
- package/dist/components/Command/Command.variants.js +97 -0
- package/dist/components/Command/components/Command.js +8 -0
- package/dist/components/Command/components/CommandEmpty.js +15 -0
- package/dist/components/Command/components/CommandGroup.js +19 -0
- package/dist/components/Command/components/CommandInput.js +84 -0
- package/dist/components/Command/components/CommandItem.js +29 -0
- package/dist/components/Command/components/CommandList.js +16 -0
- package/dist/components/Command/components/CommandSeparator.js +16 -0
- package/dist/components/Command/components/CommandShortcut.js +19 -0
- package/dist/components/Command/components/DialogContent.js +31 -0
- package/dist/components/Command/components/DialogOverlay.js +19 -0
- package/dist/components/Command/components/index.js +20 -0
- package/dist/components/Command/contexts/Command.context.js +13 -0
- package/dist/components/Command/contexts/Command.provider.js +24 -0
- package/dist/components/Command/contexts/index.js +6 -0
- package/dist/components/Dropdown/Dropdown.js +6 -6
- package/dist/components/Dropdown/Dropdown.variants.js +22 -3
- package/dist/components/Dropdown/components/List/List.js +42 -16
- package/dist/components/Dropdown/components/List/List.variants.js +7 -5
- package/dist/components/Dropdown/components/ListItem/ListItem.js +26 -21
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +6 -4
- package/dist/components/Dropdown/components/Wrapper.js +97 -63
- package/dist/components/Dropdown/contexts/dropdown.context.js +1 -1
- package/dist/components/Dropdown/contexts/dropdown.provider.js +9 -9
- package/dist/components/Input/Input.js +112 -67
- package/dist/components/Input/Input.variants.js +5 -6
- package/dist/components/Loading/Loading.js +102 -21
- package/dist/components/Loading/Loading.variants.js +13 -14
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -4
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +88 -88
- package/dist/components/NumberInput/NumberInput.variants.js +23 -19
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Sidebar/Sidebar.variants.js +2 -1
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +9 -17
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +2 -2
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +6 -5
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +99 -101
- package/dist/components/Switch/Switch.variants.js +4 -4
- package/dist/components/Table/Table.js +31 -0
- package/dist/components/Table/Table.variants.js +78 -0
- package/dist/components/Table/components/Body.js +28 -0
- package/dist/components/Table/components/Filter.js +9 -0
- package/dist/components/Table/components/Head.js +28 -0
- package/dist/components/Table/components/Row.js +34 -0
- package/dist/components/Tag/Tag.js +17 -5
- package/dist/components/Tag/Tag.variants.js +11 -1
- package/dist/components/TagSelect/TagSelect.js +6 -71
- package/dist/components/TagSelect/TagSelect.variants.js +29 -50
- package/dist/components/TagSelect/components/Item/Item.js +23 -0
- package/dist/components/TagSelect/components/Item/Item.variants.js +31 -0
- package/dist/components/TagSelect/components/List/List.js +13 -0
- package/dist/components/TagSelect/components/List/List.variants.js +37 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +88 -0
- package/dist/components/TagSelect/components/index.js +8 -0
- package/dist/components/TagSelect/contexts/TagSelect.context.js +19 -0
- package/dist/components/TagSelect/contexts/TagSelect.hook.js +11 -0
- package/dist/components/TagSelect/contexts/TagSelect.provider.js +69 -0
- package/dist/components/TagSelect/contexts/index.js +6 -0
- package/dist/components/TagSelect/hooks/useTagSelect.js +22 -27
- package/dist/components/TextArea/TextArea.js +28 -22
- package/dist/components/TextArea/TextArea.variants.js +0 -1
- package/dist/components/Toast/Toast.js +141 -128
- package/dist/components/Toast/Toast.variants.js +2 -3
- package/dist/components/Typography/Typography.js +23 -22
- package/dist/components/Typography/Typography.variants.js +49 -22
- package/dist/components/index.js +22 -20
- package/dist/{index-C6WtlN_F.js → index-BzaHYXkt.js} +1 -1
- package/dist/{index-Z1voPZOH.js → index-CbTU3cnP.js} +1 -1
- package/dist/index-CzSBQN5S.js +432 -0
- package/dist/index-D7QNmo_D.js +422 -0
- package/dist/index-DUA6Y_AE.js +126 -0
- package/dist/{index-B33at13_.js → index-D_76wh4w.js} +1 -1
- package/dist/index-DyKo5ZJT.js +446 -0
- package/dist/index.d.ts +85 -17
- package/dist/index.js +18 -16
- package/dist/package.json +26 -24
- package/dist/styles.css +1 -1
- package/dist/utils/index.js +320 -322
- package/package.json +26 -24
- package/dist/index-3jTPaVvh.js +0 -551
- package/dist/index-BTeAm7mx.js +0 -19133
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import { jsxs as P, jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as _,
|
|
4
|
-
import { a as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { P as
|
|
1
|
+
import { jsxs as P, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as h from "react";
|
|
3
|
+
import { forwardRef as _, useRef as H, useId as M, useImperativeHandle as $, useEffect as j } from "react";
|
|
4
|
+
import { a as z, c as B, b as q } from "../../index-Cva-e5M4.js";
|
|
5
|
+
import { u as A } from "../../index-B_6_jmOO.js";
|
|
6
|
+
import { u as F, a as O } from "../../index-4ecjw_Aj.js";
|
|
7
|
+
import { P as R } from "../../index-D7QNmo_D.js";
|
|
8
8
|
import { cn as x } from "../../utils/index.js";
|
|
9
|
-
import { thumbVariants as
|
|
10
|
-
import { useTheme as
|
|
11
|
-
var
|
|
12
|
-
(e,
|
|
9
|
+
import { thumbVariants as V, switchVariants as D } from "./Switch.variants.js";
|
|
10
|
+
import { useTheme as L } from "../../contexts/theme.hook.js";
|
|
11
|
+
var S = "Switch", [U, ae] = B(S), [W, X] = U(S), y = h.forwardRef(
|
|
12
|
+
(e, d) => {
|
|
13
13
|
const {
|
|
14
14
|
__scopeSwitch: t,
|
|
15
|
-
name:
|
|
16
|
-
checked:
|
|
17
|
-
defaultChecked:
|
|
18
|
-
required:
|
|
19
|
-
disabled:
|
|
20
|
-
value:
|
|
15
|
+
name: s,
|
|
16
|
+
checked: a,
|
|
17
|
+
defaultChecked: n,
|
|
18
|
+
required: u,
|
|
19
|
+
disabled: r,
|
|
20
|
+
value: o = "on",
|
|
21
21
|
onCheckedChange: m,
|
|
22
|
-
form:
|
|
22
|
+
form: c,
|
|
23
23
|
...l
|
|
24
|
-
} = e, [
|
|
25
|
-
prop:
|
|
26
|
-
defaultProp:
|
|
24
|
+
} = e, [p, b] = h.useState(null), w = A(d, (k) => b(k)), f = h.useRef(!1), C = p ? c || !!p.closest("form") : !0, [v = !1, g] = z({
|
|
25
|
+
prop: a,
|
|
26
|
+
defaultProp: n,
|
|
27
27
|
onChange: m
|
|
28
28
|
});
|
|
29
|
-
return /* @__PURE__ */ P(
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
29
|
+
return /* @__PURE__ */ P(W, { scope: t, checked: v, disabled: r, children: [
|
|
30
|
+
/* @__PURE__ */ i(
|
|
31
|
+
R.button,
|
|
32
32
|
{
|
|
33
33
|
type: "button",
|
|
34
34
|
role: "switch",
|
|
35
|
-
"aria-checked":
|
|
36
|
-
"aria-required":
|
|
37
|
-
"data-state":
|
|
38
|
-
"data-disabled":
|
|
39
|
-
disabled:
|
|
40
|
-
value:
|
|
35
|
+
"aria-checked": v,
|
|
36
|
+
"aria-required": u,
|
|
37
|
+
"data-state": T(v),
|
|
38
|
+
"data-disabled": r ? "" : void 0,
|
|
39
|
+
disabled: r,
|
|
40
|
+
value: o,
|
|
41
41
|
...l,
|
|
42
|
-
ref:
|
|
43
|
-
onClick:
|
|
44
|
-
|
|
42
|
+
ref: w,
|
|
43
|
+
onClick: q(e.onClick, (k) => {
|
|
44
|
+
g((I) => !I), C && (f.current = k.isPropagationStopped(), f.current || k.stopPropagation());
|
|
45
45
|
})
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
C && /* @__PURE__ */ i(
|
|
49
|
+
G,
|
|
50
50
|
{
|
|
51
|
-
control:
|
|
51
|
+
control: p,
|
|
52
52
|
bubbles: !f.current,
|
|
53
|
-
name:
|
|
54
|
-
value:
|
|
55
|
-
checked:
|
|
56
|
-
required:
|
|
57
|
-
disabled:
|
|
58
|
-
form:
|
|
53
|
+
name: s,
|
|
54
|
+
value: o,
|
|
55
|
+
checked: v,
|
|
56
|
+
required: u,
|
|
57
|
+
disabled: r,
|
|
58
|
+
form: c,
|
|
59
59
|
style: { transform: "translateX(-100%)" }
|
|
60
60
|
}
|
|
61
61
|
)
|
|
62
62
|
] });
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
|
-
|
|
66
|
-
var
|
|
67
|
-
(e,
|
|
68
|
-
const { __scopeSwitch: t, ...
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
|
|
65
|
+
y.displayName = S;
|
|
66
|
+
var N = "SwitchThumb", E = h.forwardRef(
|
|
67
|
+
(e, d) => {
|
|
68
|
+
const { __scopeSwitch: t, ...s } = e, a = X(N, t);
|
|
69
|
+
return /* @__PURE__ */ i(
|
|
70
|
+
R.span,
|
|
71
71
|
{
|
|
72
|
-
"data-state":
|
|
73
|
-
"data-disabled":
|
|
74
|
-
...
|
|
75
|
-
ref:
|
|
72
|
+
"data-state": T(a.checked),
|
|
73
|
+
"data-disabled": a.disabled ? "" : void 0,
|
|
74
|
+
...s,
|
|
75
|
+
ref: d
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
|
-
|
|
81
|
-
var
|
|
82
|
-
const { control:
|
|
83
|
-
return
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
l.call(
|
|
80
|
+
E.displayName = N;
|
|
81
|
+
var G = (e) => {
|
|
82
|
+
const { control: d, checked: t, bubbles: s = !0, ...a } = e, n = h.useRef(null), u = F(t), r = O(d);
|
|
83
|
+
return h.useEffect(() => {
|
|
84
|
+
const o = n.current, m = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(m, "checked").set;
|
|
85
|
+
if (u !== t && l) {
|
|
86
|
+
const p = new Event("click", { bubbles: s });
|
|
87
|
+
l.call(o, t), o.dispatchEvent(p);
|
|
88
88
|
}
|
|
89
|
-
}, [
|
|
89
|
+
}, [u, t, s]), /* @__PURE__ */ i(
|
|
90
90
|
"input",
|
|
91
91
|
{
|
|
92
92
|
type: "checkbox",
|
|
93
93
|
"aria-hidden": !0,
|
|
94
94
|
defaultChecked: t,
|
|
95
|
-
...
|
|
95
|
+
...a,
|
|
96
96
|
tabIndex: -1,
|
|
97
|
-
ref:
|
|
97
|
+
ref: n,
|
|
98
98
|
style: {
|
|
99
99
|
...e.style,
|
|
100
|
-
...
|
|
100
|
+
...r,
|
|
101
101
|
position: "absolute",
|
|
102
102
|
pointerEvents: "none",
|
|
103
103
|
opacity: 0,
|
|
@@ -106,68 +106,66 @@ var K = (e) => {
|
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
108
|
};
|
|
109
|
-
function
|
|
109
|
+
function T(e) {
|
|
110
110
|
return e ? "checked" : "unchecked";
|
|
111
111
|
}
|
|
112
|
-
var
|
|
113
|
-
const
|
|
112
|
+
var J = y, K = E;
|
|
113
|
+
const ne = _(
|
|
114
114
|
({
|
|
115
115
|
name: e,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
[]
|
|
130
|
-
);
|
|
131
|
-
return /* @__PURE__ */ P(
|
|
116
|
+
alignment: d = "horizontal",
|
|
117
|
+
theme: t,
|
|
118
|
+
thumbClassName: s,
|
|
119
|
+
className: a,
|
|
120
|
+
label: n,
|
|
121
|
+
defaultChecked: u,
|
|
122
|
+
onChange: r,
|
|
123
|
+
value: o
|
|
124
|
+
}, m) => {
|
|
125
|
+
const c = H(null), l = M(), { theme: p } = L(), b = t ?? p, w = e ? `${l}-${e}` : l;
|
|
126
|
+
return $(m, () => c.current, [c]), j(() => {
|
|
127
|
+
c.current && (c.current.value = `${o}`);
|
|
128
|
+
}, [o]), /* @__PURE__ */ P(
|
|
132
129
|
"div",
|
|
133
130
|
{
|
|
134
131
|
className: x(
|
|
135
132
|
"w-full flex gap-3",
|
|
136
|
-
|
|
133
|
+
d === "vertical" ? "flex-col" : "flex-row"
|
|
137
134
|
),
|
|
138
135
|
children: [
|
|
139
|
-
|
|
136
|
+
n ? /* @__PURE__ */ i(
|
|
140
137
|
"label",
|
|
141
138
|
{
|
|
142
139
|
className: "text-base",
|
|
143
|
-
htmlFor:
|
|
140
|
+
htmlFor: w,
|
|
144
141
|
style: { paddingRight: 15 },
|
|
145
|
-
children:
|
|
142
|
+
children: n
|
|
146
143
|
}
|
|
147
144
|
) : null,
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
|
|
145
|
+
/* @__PURE__ */ i(
|
|
146
|
+
J,
|
|
150
147
|
{
|
|
151
|
-
id:
|
|
152
|
-
defaultChecked:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
148
|
+
id: w,
|
|
149
|
+
defaultChecked: u,
|
|
150
|
+
checked: o,
|
|
151
|
+
onCheckedChange: (f) => r == null ? void 0 : r(f),
|
|
152
|
+
className: x(D({ theme: b, className: a })),
|
|
153
|
+
"aria-label": n,
|
|
154
|
+
children: /* @__PURE__ */ i(
|
|
155
|
+
K,
|
|
158
156
|
{
|
|
159
|
-
className:
|
|
157
|
+
className: V({
|
|
160
158
|
theme: b,
|
|
161
|
-
className:
|
|
159
|
+
className: s
|
|
162
160
|
})
|
|
163
161
|
}
|
|
164
162
|
)
|
|
165
163
|
}
|
|
166
164
|
),
|
|
167
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ i(
|
|
168
166
|
"input",
|
|
169
167
|
{
|
|
170
|
-
ref:
|
|
168
|
+
ref: c,
|
|
171
169
|
name: e,
|
|
172
170
|
type: "text",
|
|
173
171
|
className: "hidden",
|
|
@@ -180,5 +178,5 @@ const ue = _(
|
|
|
180
178
|
}
|
|
181
179
|
);
|
|
182
180
|
export {
|
|
183
|
-
|
|
181
|
+
ne as Switch
|
|
184
182
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as t } from "../../index-BNmRGtA6.js";
|
|
2
2
|
const e = t(
|
|
3
3
|
[
|
|
4
|
-
"w-
|
|
5
|
-
"h-
|
|
4
|
+
"w-[44px]",
|
|
5
|
+
"h-[22px]",
|
|
6
6
|
"flex",
|
|
7
7
|
"items-center",
|
|
8
8
|
"rounded-full",
|
|
@@ -28,8 +28,8 @@ const e = t(
|
|
|
28
28
|
), r = t(
|
|
29
29
|
[
|
|
30
30
|
"block",
|
|
31
|
-
"w-
|
|
32
|
-
"h-
|
|
31
|
+
"w-[18px]",
|
|
32
|
+
"h-[18px]",
|
|
33
33
|
"bg-white",
|
|
34
34
|
"rounded-full",
|
|
35
35
|
"shadow-md",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as p } from "../../utils/index.js";
|
|
3
|
+
import { tableVariants as f } from "./Table.variants.js";
|
|
4
|
+
import { Head as s } from "./components/Head.js";
|
|
5
|
+
import { Row as l } from "./components/Row.js";
|
|
6
|
+
import { Filter as n } from "./components/Filter.js";
|
|
7
|
+
import { Body as c } from "./components/Body.js";
|
|
8
|
+
import { useTheme as d } from "../../contexts/theme.hook.js";
|
|
9
|
+
const o = ({ children: r, className: t, theme: m, ...e }) => {
|
|
10
|
+
const { theme: i } = d();
|
|
11
|
+
return /* @__PURE__ */ a(
|
|
12
|
+
"table",
|
|
13
|
+
{
|
|
14
|
+
className: p(
|
|
15
|
+
f({
|
|
16
|
+
className: t,
|
|
17
|
+
theme: m ?? i
|
|
18
|
+
})
|
|
19
|
+
),
|
|
20
|
+
...e,
|
|
21
|
+
children: r
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
o.Head = s;
|
|
26
|
+
o.Row = l;
|
|
27
|
+
o.Filter = n;
|
|
28
|
+
o.Body = c;
|
|
29
|
+
export {
|
|
30
|
+
o as Table
|
|
31
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { c as t } from "../../index-BNmRGtA6.js";
|
|
2
|
+
const r = t(
|
|
3
|
+
[
|
|
4
|
+
"table-auto",
|
|
5
|
+
"w-full",
|
|
6
|
+
"border-collapse",
|
|
7
|
+
"border-spacing-0",
|
|
8
|
+
"rounded",
|
|
9
|
+
"shadow-sm"
|
|
10
|
+
],
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
theme: {
|
|
14
|
+
kubefirst: "",
|
|
15
|
+
colony: "",
|
|
16
|
+
civo: ""
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
theme: "kubefirst"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
), a = t(
|
|
24
|
+
[
|
|
25
|
+
"h-8",
|
|
26
|
+
"text-inherit",
|
|
27
|
+
"[&>td]:py-3",
|
|
28
|
+
"[&>td]:px-4",
|
|
29
|
+
"text-slate-700",
|
|
30
|
+
"hover:bg-zinc-100",
|
|
31
|
+
"hover:cursor-pointer"
|
|
32
|
+
],
|
|
33
|
+
{
|
|
34
|
+
variants: {
|
|
35
|
+
theme: {
|
|
36
|
+
kubefirst: "",
|
|
37
|
+
colony: "",
|
|
38
|
+
civo: ""
|
|
39
|
+
},
|
|
40
|
+
isSelected: {
|
|
41
|
+
true: "bg-purple-50",
|
|
42
|
+
false: ""
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
), o = t(
|
|
47
|
+
[
|
|
48
|
+
"h-[18px]",
|
|
49
|
+
"bg-slate-100",
|
|
50
|
+
"[&>tr>th]:py-3",
|
|
51
|
+
"[&>tr>th]:px-4",
|
|
52
|
+
"[&>tr>th]:uppercase",
|
|
53
|
+
"text-left"
|
|
54
|
+
],
|
|
55
|
+
{
|
|
56
|
+
variants: {
|
|
57
|
+
theme: {
|
|
58
|
+
kubefirst: "",
|
|
59
|
+
colony: "",
|
|
60
|
+
civo: ""
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
), s = t([], {
|
|
65
|
+
variants: {
|
|
66
|
+
theme: {
|
|
67
|
+
kubefirst: "",
|
|
68
|
+
colony: "",
|
|
69
|
+
civo: ""
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export {
|
|
74
|
+
s as bodyVariants,
|
|
75
|
+
o as headVariants,
|
|
76
|
+
a as rowVariants,
|
|
77
|
+
r as tableVariants
|
|
78
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { bodyVariants as n } from "../Table.variants.js";
|
|
3
|
+
import { cn as i } from "../../../utils/index.js";
|
|
4
|
+
import { useTheme as p } from "../../../contexts/theme.hook.js";
|
|
5
|
+
const d = ({
|
|
6
|
+
children: o,
|
|
7
|
+
className: t,
|
|
8
|
+
theme: e,
|
|
9
|
+
...m
|
|
10
|
+
}) => {
|
|
11
|
+
const { theme: r } = p();
|
|
12
|
+
return /* @__PURE__ */ s(
|
|
13
|
+
"tbody",
|
|
14
|
+
{
|
|
15
|
+
className: i(
|
|
16
|
+
n({
|
|
17
|
+
className: t,
|
|
18
|
+
theme: e ?? r
|
|
19
|
+
})
|
|
20
|
+
),
|
|
21
|
+
...m,
|
|
22
|
+
children: o
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
d as Body
|
|
28
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Input as i } from "../../Input/Input.js";
|
|
3
|
+
const o = ({ children: s, ...r }) => /* @__PURE__ */ t("div", { className: "flex px-4 py-6 rounded-t", children: [
|
|
4
|
+
/* @__PURE__ */ e(i, { className: "!w-1/3", ...r }),
|
|
5
|
+
/* @__PURE__ */ e("div", { className: "w-1/4 flex justify-end", children: s })
|
|
6
|
+
] });
|
|
7
|
+
export {
|
|
8
|
+
o as Filter
|
|
9
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { headVariants as s } from "../Table.variants.js";
|
|
3
|
+
import { cn as h } from "../../../utils/index.js";
|
|
4
|
+
import { useTheme as n } from "../../../contexts/theme.hook.js";
|
|
5
|
+
const d = ({
|
|
6
|
+
children: e,
|
|
7
|
+
className: t,
|
|
8
|
+
theme: m,
|
|
9
|
+
...o
|
|
10
|
+
}) => {
|
|
11
|
+
const { theme: r } = n();
|
|
12
|
+
return /* @__PURE__ */ a(
|
|
13
|
+
"thead",
|
|
14
|
+
{
|
|
15
|
+
className: h(
|
|
16
|
+
s({
|
|
17
|
+
className: t,
|
|
18
|
+
theme: m ?? r
|
|
19
|
+
})
|
|
20
|
+
),
|
|
21
|
+
...o,
|
|
22
|
+
children: e
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
d as Head
|
|
28
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { rowVariants as p } from "../Table.variants.js";
|
|
3
|
+
import { cn as a } from "../../../utils/index.js";
|
|
4
|
+
import { useTheme as f } from "../../../contexts/theme.hook.js";
|
|
5
|
+
const w = ({
|
|
6
|
+
children: t,
|
|
7
|
+
className: o,
|
|
8
|
+
theme: e,
|
|
9
|
+
width: r,
|
|
10
|
+
isSelected: m,
|
|
11
|
+
onSelect: s,
|
|
12
|
+
...n
|
|
13
|
+
}) => {
|
|
14
|
+
const { theme: i } = f();
|
|
15
|
+
return /* @__PURE__ */ c(
|
|
16
|
+
"tr",
|
|
17
|
+
{
|
|
18
|
+
style: { width: r },
|
|
19
|
+
onClick: s,
|
|
20
|
+
className: a(
|
|
21
|
+
p({
|
|
22
|
+
className: o,
|
|
23
|
+
theme: e ?? i,
|
|
24
|
+
isSelected: m
|
|
25
|
+
})
|
|
26
|
+
),
|
|
27
|
+
...n,
|
|
28
|
+
children: t
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
w as Row
|
|
34
|
+
};
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { S as r } from "../../index-B_6_jmOO.js";
|
|
3
|
+
import { cn as o } from "../../utils/index.js";
|
|
4
|
+
import { tagVariants as c } from "./Tag.variants.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
label: i,
|
|
7
|
+
color: s,
|
|
8
|
+
rightIcon: t,
|
|
9
|
+
leftIcon: e,
|
|
10
|
+
className: l,
|
|
11
|
+
"data-value": m
|
|
12
|
+
}) => /* @__PURE__ */ n("div", { className: o(c({ color: s, className: l })), "data-value": m, children: [
|
|
13
|
+
e ? /* @__PURE__ */ a(r, { className: "text-inherit", children: e }) : null,
|
|
14
|
+
/* @__PURE__ */ a("span", { className: "text-inherit", children: i }),
|
|
15
|
+
t ? /* @__PURE__ */ a(r, { className: "text-inherit", children: t }) : null
|
|
16
|
+
] });
|
|
5
17
|
export {
|
|
6
|
-
|
|
18
|
+
u as Tag
|
|
7
19
|
};
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { c as e } from "../../index-BNmRGtA6.js";
|
|
2
2
|
const f = e(
|
|
3
|
-
[
|
|
3
|
+
[
|
|
4
|
+
"px-2",
|
|
5
|
+
"py-1",
|
|
6
|
+
"rounded-md",
|
|
7
|
+
"w-max",
|
|
8
|
+
"text-xs",
|
|
9
|
+
"flex",
|
|
10
|
+
"items-center",
|
|
11
|
+
"justify-center",
|
|
12
|
+
"gap-1"
|
|
13
|
+
],
|
|
4
14
|
{
|
|
5
15
|
variants: {
|
|
6
16
|
color: {
|
|
@@ -1,73 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { tagSelectVariants as k, tagItemVariants as I, tagListVariants as V } from "./TagSelect.variants.js";
|
|
7
|
-
import { C as j } from "../../chevron-up-DgLBQCKD.js";
|
|
8
|
-
import { useTheme as y } from "../../contexts/theme.hook.js";
|
|
9
|
-
const z = g(({ label: s, name: l, options: f, placeholder: h = "Select a value...", theme: o }, x) => {
|
|
10
|
-
const c = w(), { theme: a } = y(), t = C(null), {
|
|
11
|
-
isOpen: n,
|
|
12
|
-
selectedTag: m,
|
|
13
|
-
value: p,
|
|
14
|
-
wrapperRef: b,
|
|
15
|
-
handleClickTag: N,
|
|
16
|
-
handleOpenDropdown: v
|
|
17
|
-
} = S();
|
|
18
|
-
return T(x, () => t.current, [t]), R(() => {
|
|
19
|
-
t.current && (t.current.value = p);
|
|
20
|
-
}, [p]), /* @__PURE__ */ u("div", { ref: b, className: "flex flex-col w-full relative", children: [
|
|
21
|
-
s ? /* @__PURE__ */ e("label", { className: "m-2 cursor-pointer", htmlFor: l ?? c, children: s }) : null,
|
|
22
|
-
/* @__PURE__ */ u(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
id: l ?? c,
|
|
26
|
-
className: r(k({ theme: o ?? a })),
|
|
27
|
-
role: "combobox",
|
|
28
|
-
onClick: v,
|
|
29
|
-
"aria-expanded": n,
|
|
30
|
-
children: [
|
|
31
|
-
m ? /* @__PURE__ */ e(d, { ...m }) : /* @__PURE__ */ e("span", { className: "text-base text-inherit", children: h }),
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
j,
|
|
34
|
-
{
|
|
35
|
-
className: r(
|
|
36
|
-
"w-4 h-4 text-inherit transition-all duration-50",
|
|
37
|
-
n ? "rotate-0" : "rotate-180"
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
/* @__PURE__ */ e("input", { ref: t, type: "text", name: l, className: "hidden" }),
|
|
45
|
-
n ? /* @__PURE__ */ e(
|
|
46
|
-
"ul",
|
|
47
|
-
{
|
|
48
|
-
role: "listbox",
|
|
49
|
-
className: r(V({ theme: o ?? a })),
|
|
50
|
-
children: f.map((i) => /* @__PURE__ */ e(
|
|
51
|
-
"li",
|
|
52
|
-
{
|
|
53
|
-
className: r(I({ theme: o ?? a })),
|
|
54
|
-
role: "option",
|
|
55
|
-
children: /* @__PURE__ */ e(
|
|
56
|
-
"button",
|
|
57
|
-
{
|
|
58
|
-
type: "button",
|
|
59
|
-
role: "button",
|
|
60
|
-
className: "m-0 p-0 w-full",
|
|
61
|
-
onClick: () => N(i),
|
|
62
|
-
children: /* @__PURE__ */ e(d, { label: i.label, color: i.color })
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
))
|
|
67
|
-
}
|
|
68
|
-
) : null
|
|
69
|
-
] });
|
|
70
|
-
});
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { TagSelectProvider as f } from "./contexts/TagSelect.provider.js";
|
|
4
|
+
import { Wrapper as i } from "./components/Wrapper/Wrapper.js";
|
|
5
|
+
const n = p(({ options: o, multiselect: e, ...t }, m) => /* @__PURE__ */ r(f, { defaultOptions: o, multiselect: e, children: /* @__PURE__ */ r(i, { ref: m, ...t }) }));
|
|
71
6
|
export {
|
|
72
|
-
|
|
7
|
+
n as TagSelect
|
|
73
8
|
};
|