@konstructio/ui 0.1.0-alpha.2 → 0.1.0-alpha.20
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/{Combination-b348x__d.js → Combination-VYaRRJBZ.js} +155 -157
- package/dist/DatePicker.css +1 -0
- package/dist/Modal-CrG0m703.js +98 -0
- package/dist/assets/icons/components/Search.js +26 -0
- package/dist/assets/icons/components/Warning.js +22 -0
- package/dist/assets/icons/components/index.js +6 -0
- package/dist/chevron-down-3QGcvbP_.js +11 -0
- package/dist/{chevron-up-DgLBQCKD.js → chevron-up-RLP4nX7V.js} +1 -1
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +55 -41
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +14 -14
- package/dist/components/Badge/Badge.variants.js +18 -17
- package/dist/components/Breadcrumb/Breadcrumb.js +44 -53
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +10 -41
- package/dist/components/Breadcrumb/components/Item/Item.js +27 -27
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +43 -56
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +30 -26
- package/dist/components/Button/Button.variants.js +116 -29
- package/dist/components/Checkbox/Checkbox.js +300 -185
- package/dist/components/Checkbox/Checkbox.variants.js +12 -15
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +2728 -0
- package/dist/components/Datepicker/DatePicker.variants.js +5 -0
- package/dist/components/Dropdown/components/List/List.js +55 -18
- package/dist/components/Dropdown/components/List/List.variants.js +5 -3
- package/dist/components/Dropdown/components/ListItem/ListItem.js +28 -22
- package/dist/components/Dropdown/components/Wrapper.js +110 -86
- package/dist/components/Dropdown/contexts/dropdown.context.js +6 -2
- package/dist/components/Dropdown/contexts/dropdown.hook.js +5 -3
- package/dist/components/Dropdown/contexts/dropdown.provider.js +18 -11
- package/dist/components/DropdownButton/DropdownButton.js +136 -0
- package/dist/components/Filter/Filter.js +20 -0
- package/dist/components/Filter/Filter.variants.js +22 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +86 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +95 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +87 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +90 -0
- package/dist/components/Filter/components/ResetButton/ResetButton.js +24 -0
- package/dist/components/Filter/components/index.js +8 -0
- package/dist/components/Filter/events/index.js +12 -0
- package/dist/components/Input/Input.js +134 -163
- package/dist/components/Input/Input.variants.js +15 -13
- package/dist/components/Loading/Loading.js +2 -2
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -4
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +4 -6
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PieChart/PieChart.js +5130 -0
- package/dist/components/Radio/Radio.js +64 -49
- package/dist/components/Radio/Radio.variants.js +14 -12
- package/dist/components/RadioCard/RadioCard.js +23 -21
- package/dist/components/RadioCardGroup/RadioCardGroup.js +18 -18
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +141 -126
- package/dist/components/Tabs/Tabs.js +27 -0
- package/dist/components/Tabs/Tabs.variants.js +58 -0
- package/dist/components/Tabs/components/Content.js +19 -0
- package/dist/components/Tabs/components/List.js +20 -0
- package/dist/components/Tabs/components/Trigger.js +26 -0
- package/dist/components/Tabs/components/index.js +8 -0
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/TimePicker/TimePicker.js +8 -0
- package/dist/components/TimePicker/TimePicker.variants.js +62 -0
- package/dist/components/TimePicker/components/HoursList/HoursList.js +93 -0
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +68 -0
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +60 -0
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +96 -0
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +51 -0
- package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +16 -0
- package/dist/components/TimePicker/components/index.js +4 -0
- package/dist/components/TimePicker/contexts/index.js +8 -0
- package/dist/components/TimePicker/contexts/time-picker.context.js +22 -0
- package/dist/components/TimePicker/contexts/time-picker.hook.js +13 -0
- package/dist/components/TimePicker/contexts/time-picker.provider.js +46 -0
- package/dist/components/TimePicker/utils/index.js +6 -0
- package/dist/components/Toast/Toast.js +38 -36
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Typography/Typography.js +14 -16
- package/dist/components/index.js +90 -66
- package/dist/createLucideIcon-B7yPYScZ.js +94 -0
- package/dist/index--EmNlyHx.js +31 -0
- package/dist/{index-Bk324h27.js → index-B5MIi2tR.js} +6 -5
- package/dist/{index-g-TFwd6Y.js → index-BCGvACM9.js} +2 -1
- package/dist/{index-AM3avohj.js → index-BNU3RH-3.js} +3 -3
- package/dist/{index-Bry5AFQ2.js → index-Bc1LNrRD.js} +1 -1
- package/dist/index-BdMNhZnh.js +9 -0
- package/dist/index-BvCZBMfr.js +432 -0
- package/dist/index-Cq1I1cG9.js +129 -0
- package/dist/index-Cs8Lv8Wj.js +13 -0
- package/dist/index-CvfCCTEO.js +323 -0
- package/dist/{index-DvFiic6N.js → index-DLYwlPRZ.js} +96 -102
- package/dist/{index-YaQrdkGE.js → index-DNRcvRTB.js} +31 -30
- package/dist/{index-dRxIWVBr.js → index-Dkt8F6CZ.js} +6 -5
- package/dist/{index-G_6jG4Qc.js → index-Dm-ooN_M.js} +18 -18
- package/dist/index-DwYXX2sM.js +13 -0
- package/dist/{index-C5psggHV.js → index-h-Ul0anl.js} +1 -2
- package/dist/{index-D9BbbgUq.js → index-rUBNhTeF.js} +2 -2
- package/dist/index.d.ts +263 -18
- package/dist/index.js +96 -72
- package/dist/package.json +42 -40
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +263 -0
- package/dist/ui/kubefirst-theme.css +1 -1
- package/dist/ui/theme.css +11 -0
- package/dist/useBreadcrumb-DMERrNkJ.js +1280 -0
- package/dist/utils/index.js +4 -4
- package/dist/{x-DU-Zw-L_.js → x-BPcqkRZd.js} +1 -1
- package/package.json +42 -40
- package/dist/Modal-i7eolhYH.js +0 -926
- package/dist/createLucideIcon-CoF3ywd5.js +0 -89
- package/dist/index-BOx5P4tS.js +0 -423
- package/dist/index-CWKdynYu.js +0 -32
- package/dist/index-bYyfdsls.js +0 -118
- package/dist/useBreadcrumb-BsIeMoR1.js +0 -1279
|
@@ -1,171 +1,186 @@
|
|
|
1
|
-
import { jsxs as x, jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { a as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as F, a as
|
|
7
|
-
import { P } from "../../index-
|
|
8
|
-
import { cn as
|
|
9
|
-
import { thumbVariants as
|
|
10
|
-
var
|
|
11
|
-
(
|
|
1
|
+
import { jsxs as x, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { forwardRef as H, useRef as M, useId as $, useImperativeHandle as j, useEffect as z } from "react";
|
|
4
|
+
import { a as A, c as U, b as q } from "../../index-Cq1I1cG9.js";
|
|
5
|
+
import { u as P } from "../../index-B5MIi2tR.js";
|
|
6
|
+
import { u as F, a as L } from "../../index-Bc1LNrRD.js";
|
|
7
|
+
import { P as y } from "../../index-BCGvACM9.js";
|
|
8
|
+
import { cn as R } from "../../utils/index.js";
|
|
9
|
+
import { thumbVariants as O, switchVariants as V } from "./Switch.variants.js";
|
|
10
|
+
var b = "Switch", [D, ce] = U(b), [W, X] = D(b), N = p.forwardRef(
|
|
11
|
+
(t, i) => {
|
|
12
12
|
const {
|
|
13
|
-
__scopeSwitch:
|
|
14
|
-
name:
|
|
15
|
-
checked:
|
|
16
|
-
defaultChecked:
|
|
17
|
-
required:
|
|
18
|
-
disabled:
|
|
19
|
-
value:
|
|
20
|
-
onCheckedChange:
|
|
21
|
-
form:
|
|
22
|
-
...
|
|
23
|
-
} =
|
|
24
|
-
prop:
|
|
25
|
-
defaultProp:
|
|
26
|
-
onChange:
|
|
13
|
+
__scopeSwitch: r,
|
|
14
|
+
name: a,
|
|
15
|
+
checked: s,
|
|
16
|
+
defaultChecked: d,
|
|
17
|
+
required: u,
|
|
18
|
+
disabled: o,
|
|
19
|
+
value: c = "on",
|
|
20
|
+
onCheckedChange: m,
|
|
21
|
+
form: e,
|
|
22
|
+
...f
|
|
23
|
+
} = t, [l, h] = p.useState(null), v = P(i, (S) => h(S)), k = p.useRef(!1), C = l ? e || !!l.closest("form") : !0, [w, B] = A({
|
|
24
|
+
prop: s,
|
|
25
|
+
defaultProp: d ?? !1,
|
|
26
|
+
onChange: m,
|
|
27
|
+
caller: b
|
|
27
28
|
});
|
|
28
|
-
return /* @__PURE__ */ x(
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
29
|
+
return /* @__PURE__ */ x(W, { scope: r, checked: w, disabled: o, children: [
|
|
30
|
+
/* @__PURE__ */ n(
|
|
31
|
+
y.button,
|
|
31
32
|
{
|
|
32
33
|
type: "button",
|
|
33
34
|
role: "switch",
|
|
34
|
-
"aria-checked":
|
|
35
|
-
"aria-required":
|
|
36
|
-
"data-state":
|
|
37
|
-
"data-disabled":
|
|
38
|
-
disabled:
|
|
39
|
-
value:
|
|
40
|
-
...
|
|
41
|
-
ref:
|
|
42
|
-
onClick: q(
|
|
43
|
-
|
|
35
|
+
"aria-checked": w,
|
|
36
|
+
"aria-required": u,
|
|
37
|
+
"data-state": g(w),
|
|
38
|
+
"data-disabled": o ? "" : void 0,
|
|
39
|
+
disabled: o,
|
|
40
|
+
value: c,
|
|
41
|
+
...f,
|
|
42
|
+
ref: v,
|
|
43
|
+
onClick: q(t.onClick, (S) => {
|
|
44
|
+
B((T) => !T), C && (k.current = S.isPropagationStopped(), k.current || S.stopPropagation());
|
|
44
45
|
})
|
|
45
46
|
}
|
|
46
47
|
),
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
C && /* @__PURE__ */ n(
|
|
49
|
+
I,
|
|
49
50
|
{
|
|
50
|
-
control:
|
|
51
|
-
bubbles: !
|
|
52
|
-
name:
|
|
53
|
-
value:
|
|
54
|
-
checked:
|
|
55
|
-
required:
|
|
56
|
-
disabled:
|
|
57
|
-
form:
|
|
51
|
+
control: l,
|
|
52
|
+
bubbles: !k.current,
|
|
53
|
+
name: a,
|
|
54
|
+
value: c,
|
|
55
|
+
checked: w,
|
|
56
|
+
required: u,
|
|
57
|
+
disabled: o,
|
|
58
|
+
form: e,
|
|
58
59
|
style: { transform: "translateX(-100%)" }
|
|
59
60
|
}
|
|
60
61
|
)
|
|
61
62
|
] });
|
|
62
63
|
}
|
|
63
64
|
);
|
|
64
|
-
|
|
65
|
-
var
|
|
66
|
-
(
|
|
67
|
-
const { __scopeSwitch:
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
|
|
65
|
+
N.displayName = b;
|
|
66
|
+
var E = "SwitchThumb", _ = p.forwardRef(
|
|
67
|
+
(t, i) => {
|
|
68
|
+
const { __scopeSwitch: r, ...a } = t, s = X(E, r);
|
|
69
|
+
return /* @__PURE__ */ n(
|
|
70
|
+
y.span,
|
|
70
71
|
{
|
|
71
|
-
"data-state":
|
|
72
|
-
"data-disabled":
|
|
73
|
-
...
|
|
74
|
-
ref:
|
|
72
|
+
"data-state": g(s.checked),
|
|
73
|
+
"data-disabled": s.disabled ? "" : void 0,
|
|
74
|
+
...a,
|
|
75
|
+
ref: i
|
|
75
76
|
}
|
|
76
77
|
);
|
|
77
78
|
}
|
|
78
79
|
);
|
|
79
|
-
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
...r,
|
|
100
|
-
position: "absolute",
|
|
101
|
-
pointerEvents: "none",
|
|
102
|
-
opacity: 0,
|
|
103
|
-
margin: 0
|
|
80
|
+
_.displayName = E;
|
|
81
|
+
var G = "SwitchBubbleInput", I = p.forwardRef(
|
|
82
|
+
({
|
|
83
|
+
__scopeSwitch: t,
|
|
84
|
+
control: i,
|
|
85
|
+
checked: r,
|
|
86
|
+
bubbles: a = !0,
|
|
87
|
+
...s
|
|
88
|
+
}, d) => {
|
|
89
|
+
const u = p.useRef(null), o = P(u, d), c = F(r), m = L(i);
|
|
90
|
+
return p.useEffect(() => {
|
|
91
|
+
const e = u.current;
|
|
92
|
+
if (!e) return;
|
|
93
|
+
const f = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
|
|
94
|
+
f,
|
|
95
|
+
"checked"
|
|
96
|
+
).set;
|
|
97
|
+
if (c !== r && h) {
|
|
98
|
+
const v = new Event("click", { bubbles: a });
|
|
99
|
+
h.call(e, r), e.dispatchEvent(v);
|
|
104
100
|
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
}, [c, r, a]), /* @__PURE__ */ n(
|
|
102
|
+
"input",
|
|
103
|
+
{
|
|
104
|
+
type: "checkbox",
|
|
105
|
+
"aria-hidden": !0,
|
|
106
|
+
defaultChecked: r,
|
|
107
|
+
...s,
|
|
108
|
+
tabIndex: -1,
|
|
109
|
+
ref: o,
|
|
110
|
+
style: {
|
|
111
|
+
...s.style,
|
|
112
|
+
...m,
|
|
113
|
+
position: "absolute",
|
|
114
|
+
pointerEvents: "none",
|
|
115
|
+
opacity: 0,
|
|
116
|
+
margin: 0
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
I.displayName = G;
|
|
123
|
+
function g(t) {
|
|
124
|
+
return t ? "checked" : "unchecked";
|
|
110
125
|
}
|
|
111
|
-
var
|
|
112
|
-
const
|
|
126
|
+
var J = N, K = _;
|
|
127
|
+
const ae = H(
|
|
113
128
|
({
|
|
114
|
-
name:
|
|
115
|
-
alignment:
|
|
116
|
-
theme:
|
|
117
|
-
thumbClassName:
|
|
118
|
-
className:
|
|
119
|
-
label:
|
|
120
|
-
defaultChecked:
|
|
121
|
-
onChange:
|
|
122
|
-
value:
|
|
123
|
-
},
|
|
124
|
-
const
|
|
125
|
-
return
|
|
126
|
-
|
|
127
|
-
}, [
|
|
129
|
+
name: t,
|
|
130
|
+
alignment: i = "horizontal",
|
|
131
|
+
theme: r,
|
|
132
|
+
thumbClassName: a,
|
|
133
|
+
className: s,
|
|
134
|
+
label: d,
|
|
135
|
+
defaultChecked: u,
|
|
136
|
+
onChange: o,
|
|
137
|
+
value: c
|
|
138
|
+
}, m) => {
|
|
139
|
+
const e = M(null), f = $(), l = t ? `${f}-${t}` : f;
|
|
140
|
+
return j(m, () => e.current, [e]), z(() => {
|
|
141
|
+
e.current && (e.current.value = `${c}`);
|
|
142
|
+
}, [c]), /* @__PURE__ */ x(
|
|
128
143
|
"div",
|
|
129
144
|
{
|
|
130
|
-
className:
|
|
145
|
+
className: R(
|
|
131
146
|
"w-full flex gap-3",
|
|
132
|
-
|
|
147
|
+
i === "vertical" ? "flex-col" : "flex-row"
|
|
133
148
|
),
|
|
134
|
-
"data-theme":
|
|
149
|
+
"data-theme": r,
|
|
135
150
|
children: [
|
|
136
|
-
|
|
151
|
+
d ? /* @__PURE__ */ n(
|
|
137
152
|
"label",
|
|
138
153
|
{
|
|
139
154
|
className: "text-base",
|
|
140
|
-
htmlFor:
|
|
155
|
+
htmlFor: l,
|
|
141
156
|
style: { paddingRight: 15 },
|
|
142
|
-
children:
|
|
157
|
+
children: d
|
|
143
158
|
}
|
|
144
159
|
) : null,
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
|
|
160
|
+
/* @__PURE__ */ n(
|
|
161
|
+
J,
|
|
147
162
|
{
|
|
148
|
-
id:
|
|
149
|
-
defaultChecked:
|
|
150
|
-
checked:
|
|
151
|
-
onCheckedChange: (
|
|
152
|
-
className:
|
|
153
|
-
"aria-label":
|
|
154
|
-
children: /* @__PURE__ */
|
|
155
|
-
|
|
163
|
+
id: l,
|
|
164
|
+
defaultChecked: u,
|
|
165
|
+
checked: c,
|
|
166
|
+
onCheckedChange: (h) => o == null ? void 0 : o(h),
|
|
167
|
+
className: R(V({ className: s })),
|
|
168
|
+
"aria-label": d,
|
|
169
|
+
children: /* @__PURE__ */ n(
|
|
170
|
+
K,
|
|
156
171
|
{
|
|
157
|
-
className:
|
|
158
|
-
className:
|
|
172
|
+
className: O({
|
|
173
|
+
className: a
|
|
159
174
|
})
|
|
160
175
|
}
|
|
161
176
|
)
|
|
162
177
|
}
|
|
163
178
|
),
|
|
164
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ n(
|
|
165
180
|
"input",
|
|
166
181
|
{
|
|
167
|
-
ref:
|
|
168
|
-
name:
|
|
182
|
+
ref: e,
|
|
183
|
+
name: t,
|
|
169
184
|
type: "text",
|
|
170
185
|
className: "hidden",
|
|
171
186
|
"aria-hidden": "true"
|
|
@@ -177,5 +192,5 @@ const se = _(
|
|
|
177
192
|
}
|
|
178
193
|
);
|
|
179
194
|
export {
|
|
180
|
-
|
|
195
|
+
ae as Switch
|
|
181
196
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { R as n } from "../../index-CvfCCTEO.js";
|
|
3
|
+
import { cn as s } from "../../utils/index.js";
|
|
4
|
+
import { rootVariants as p } from "./Tabs.variants.js";
|
|
5
|
+
import { List as f } from "./components/List.js";
|
|
6
|
+
import { Trigger as g } from "./components/Trigger.js";
|
|
7
|
+
import { Content as c } from "./components/Content.js";
|
|
8
|
+
const t = ({ children: o, theme: m, className: a, orientation: r, ...i }) => /* @__PURE__ */ e(
|
|
9
|
+
n,
|
|
10
|
+
{
|
|
11
|
+
...i,
|
|
12
|
+
"data-theme": m,
|
|
13
|
+
"data-orientation": r,
|
|
14
|
+
"aria-orientation": r,
|
|
15
|
+
className: s(p({ variant: r, className: a })),
|
|
16
|
+
children: o
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
t.List = f;
|
|
20
|
+
t.Trigger = g;
|
|
21
|
+
t.Content = c;
|
|
22
|
+
export {
|
|
23
|
+
c as Content,
|
|
24
|
+
f as List,
|
|
25
|
+
t as Tabs,
|
|
26
|
+
g as Trigger
|
|
27
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { c as a } from "../../index-BNmRGtA6.js";
|
|
2
|
+
const r = a([""], {
|
|
3
|
+
variants: {
|
|
4
|
+
variant: {
|
|
5
|
+
horizontal: "",
|
|
6
|
+
vertical: "flex gap-6"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
defaultVariants: {
|
|
10
|
+
variant: "horizontal"
|
|
11
|
+
}
|
|
12
|
+
}), i = a([""], {
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: ""
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: "default"
|
|
20
|
+
}
|
|
21
|
+
}), n = a(["flex"], {
|
|
22
|
+
variants: {
|
|
23
|
+
variant: {
|
|
24
|
+
default: "flex gap-6",
|
|
25
|
+
horizontal: "",
|
|
26
|
+
vertical: "flex-col min-w-[132px] h-full items-center"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default"
|
|
31
|
+
}
|
|
32
|
+
}), e = a(["cursor-pointer", "h-[27px]", "w-fit"], {
|
|
33
|
+
variants: {
|
|
34
|
+
variant: {
|
|
35
|
+
default: "",
|
|
36
|
+
active: [
|
|
37
|
+
"text-zinc-700",
|
|
38
|
+
"font-[600]",
|
|
39
|
+
"civo:border-b-2",
|
|
40
|
+
"civo:border-civo-primary",
|
|
41
|
+
"kubefirst:border-b-2",
|
|
42
|
+
"kubefirst:border-kubefirst-primary",
|
|
43
|
+
"colony:border-b-2",
|
|
44
|
+
"colony:border-colony-primary"
|
|
45
|
+
],
|
|
46
|
+
inactive: "text-slate-500 font-[600]"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
variant: "default"
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
export {
|
|
54
|
+
i as contentVariants,
|
|
55
|
+
n as listVariants,
|
|
56
|
+
r as rootVariants,
|
|
57
|
+
e as triggerVariants
|
|
58
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { C as m } from "../../../index-CvfCCTEO.js";
|
|
3
|
+
import { cn as a } from "../../../utils/index.js";
|
|
4
|
+
import { contentVariants as e } from "../Tabs.variants.js";
|
|
5
|
+
const c = ({
|
|
6
|
+
children: t,
|
|
7
|
+
className: o,
|
|
8
|
+
...r
|
|
9
|
+
}) => /* @__PURE__ */ n(
|
|
10
|
+
m,
|
|
11
|
+
{
|
|
12
|
+
...r,
|
|
13
|
+
className: a(e({ variant: "default", className: o })),
|
|
14
|
+
children: t
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
export {
|
|
18
|
+
c as Content
|
|
19
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { L as n } from "../../../index-CvfCCTEO.js";
|
|
3
|
+
import { cn as t } from "../../../utils/index.js";
|
|
4
|
+
import { listVariants as a } from "../Tabs.variants.js";
|
|
5
|
+
const p = ({
|
|
6
|
+
children: i,
|
|
7
|
+
className: s,
|
|
8
|
+
orientation: m,
|
|
9
|
+
...o
|
|
10
|
+
}) => /* @__PURE__ */ r("div", { className: t(a({ variant: "default" })), children: /* @__PURE__ */ r(
|
|
11
|
+
n,
|
|
12
|
+
{
|
|
13
|
+
className: t(a({ variant: m, className: s })),
|
|
14
|
+
...o,
|
|
15
|
+
children: i
|
|
16
|
+
}
|
|
17
|
+
) });
|
|
18
|
+
export {
|
|
19
|
+
p as List
|
|
20
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { T as e } from "../../../index-CvfCCTEO.js";
|
|
3
|
+
import { Typography as m } from "../../Typography/Typography.js";
|
|
4
|
+
import { cn as n } from "../../../utils/index.js";
|
|
5
|
+
import { triggerVariants as p } from "../Tabs.variants.js";
|
|
6
|
+
const l = ({
|
|
7
|
+
tab: i,
|
|
8
|
+
label: o,
|
|
9
|
+
isActive: t,
|
|
10
|
+
className: a
|
|
11
|
+
}) => /* @__PURE__ */ r(e, { value: i, children: /* @__PURE__ */ r(
|
|
12
|
+
m,
|
|
13
|
+
{
|
|
14
|
+
variant: "body2",
|
|
15
|
+
className: n(
|
|
16
|
+
p({
|
|
17
|
+
variant: t ? "active" : "inactive",
|
|
18
|
+
className: a
|
|
19
|
+
})
|
|
20
|
+
),
|
|
21
|
+
children: o
|
|
22
|
+
}
|
|
23
|
+
) });
|
|
24
|
+
export {
|
|
25
|
+
l as Trigger
|
|
26
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { S as r } from "../../index-
|
|
2
|
+
import { S as r } from "../../index-B5MIi2tR.js";
|
|
3
3
|
import { cn as o } from "../../utils/index.js";
|
|
4
4
|
import { tagVariants as c } from "./Tag.variants.js";
|
|
5
5
|
const u = ({
|
|
@@ -6,8 +6,8 @@ import { Tag as C } from "../../../Tag/Tag.js";
|
|
|
6
6
|
import { cn as r } from "../../../../utils/index.js";
|
|
7
7
|
import { useTagSelect as S } from "../../hooks/useTagSelect.js";
|
|
8
8
|
import { labelVariants as k, tagSelectVariants as R, wrapperVariants as I } from "../../TagSelect.variants.js";
|
|
9
|
-
import { X as O } from "../../../../x-
|
|
10
|
-
import { C as V } from "../../../../chevron-up-
|
|
9
|
+
import { X as O } from "../../../../x-BPcqkRZd.js";
|
|
10
|
+
import { C as V } from "../../../../chevron-up-RLP4nX7V.js";
|
|
11
11
|
import { useTagSelect as j } from "../../contexts/TagSelect.hook.js";
|
|
12
12
|
const B = w(
|
|
13
13
|
({
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { TimePickerProvider as m } from "./contexts/time-picker.provider.js";
|
|
3
|
+
import { Wrapper as o } from "./components/Wrapper/Wrapper.js";
|
|
4
|
+
const p = ({ format: i = "12", ...e }) => /* @__PURE__ */ r(m, { format: i, children: /* @__PURE__ */ r(o, { ...e }) });
|
|
5
|
+
p.displayName = "TimePicker";
|
|
6
|
+
export {
|
|
7
|
+
p as TimePicker
|
|
8
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { c as r } from "../../index-BNmRGtA6.js";
|
|
2
|
+
const t = r([
|
|
3
|
+
"border",
|
|
4
|
+
"rounded",
|
|
5
|
+
"p-[0.625rem]",
|
|
6
|
+
"w-full",
|
|
7
|
+
"flex",
|
|
8
|
+
"items-center",
|
|
9
|
+
"justify-between",
|
|
10
|
+
"border-gray-300",
|
|
11
|
+
"cursor-pointer",
|
|
12
|
+
"transition-all",
|
|
13
|
+
"transition-duration-100",
|
|
14
|
+
"data-[open=true]:border-blue-primary",
|
|
15
|
+
"data-[open=true]:border-civo-primary",
|
|
16
|
+
"text-sm"
|
|
17
|
+
]), o = r([
|
|
18
|
+
"snap-y",
|
|
19
|
+
"snap-mandatory",
|
|
20
|
+
"overflow-y-scroll",
|
|
21
|
+
"scrollbar-none",
|
|
22
|
+
"flex",
|
|
23
|
+
"flex-col"
|
|
24
|
+
]), a = r([
|
|
25
|
+
"w-[60px]",
|
|
26
|
+
"h-[40px]",
|
|
27
|
+
"snap-start",
|
|
28
|
+
"rounded",
|
|
29
|
+
"transition-all",
|
|
30
|
+
"transition-duration-100",
|
|
31
|
+
"focus-within:outline-2",
|
|
32
|
+
"border-2",
|
|
33
|
+
"border-transparent",
|
|
34
|
+
"outline-none",
|
|
35
|
+
"hover:bg-gray-100",
|
|
36
|
+
"hover:border-2",
|
|
37
|
+
"hover:border-white",
|
|
38
|
+
"data-[active=true]:bg-blue-600",
|
|
39
|
+
"data-[active=true]:hover:border-blue-200",
|
|
40
|
+
"data-[active=true]:text-white",
|
|
41
|
+
"data-[active=true]:font-medium",
|
|
42
|
+
"focus-visible:border-blue-200",
|
|
43
|
+
"focus-within:border-blue-200"
|
|
44
|
+
]), n = r([
|
|
45
|
+
"flex",
|
|
46
|
+
"items-center",
|
|
47
|
+
"justify-center",
|
|
48
|
+
"cursor-pointer",
|
|
49
|
+
"w-full",
|
|
50
|
+
"h-full",
|
|
51
|
+
"px-6",
|
|
52
|
+
"py-3",
|
|
53
|
+
"outline-none",
|
|
54
|
+
"focus:border-blue-200",
|
|
55
|
+
"text-sm"
|
|
56
|
+
]);
|
|
57
|
+
export {
|
|
58
|
+
n as buttonVariants,
|
|
59
|
+
a as liVariants,
|
|
60
|
+
t as timePickerVariants,
|
|
61
|
+
o as ulVariants
|
|
62
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p, useCallback as v, useEffect as y } from "react";
|
|
3
|
+
import { cn as o } from "../../../../utils/index.js";
|
|
4
|
+
import { buttonVariants as b, liVariants as d, ulVariants as h } from "../../TimePicker.variants.js";
|
|
5
|
+
import { useTimePickerContext as k } from "../../contexts/time-picker.hook.js";
|
|
6
|
+
const H = ({ hours: l, scrollBehavior: i }) => {
|
|
7
|
+
const n = p(null), u = p(!0), { format: c, onSelectHour: m } = k(), s = c === "12" && l >= 12 ? l - 12 : l, f = v(
|
|
8
|
+
(r, e) => {
|
|
9
|
+
var t;
|
|
10
|
+
(t = r.currentTarget) == null || t.blur(), m(e);
|
|
11
|
+
},
|
|
12
|
+
[m]
|
|
13
|
+
);
|
|
14
|
+
if (y(() => {
|
|
15
|
+
if (u.current) {
|
|
16
|
+
const r = n.current, e = s === 0 && c === "12" ? 12 : s;
|
|
17
|
+
if (r) {
|
|
18
|
+
const t = r.querySelector(
|
|
19
|
+
`[data-value="${`0${e}`.slice(-2)}"]`
|
|
20
|
+
);
|
|
21
|
+
t == null || t.scrollIntoView({
|
|
22
|
+
behavior: i,
|
|
23
|
+
block: "center"
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
u.current = !1;
|
|
27
|
+
}
|
|
28
|
+
}, [c, s, i]), c === "12") {
|
|
29
|
+
const r = s === 0 ? 12 : s;
|
|
30
|
+
return /* @__PURE__ */ a(
|
|
31
|
+
"ul",
|
|
32
|
+
{
|
|
33
|
+
ref: n,
|
|
34
|
+
className: o(h()),
|
|
35
|
+
"aria-label": "hours",
|
|
36
|
+
role: "listbox",
|
|
37
|
+
children: Array.from({ length: 12 }, (e, t) => /* @__PURE__ */ a(
|
|
38
|
+
"li",
|
|
39
|
+
{
|
|
40
|
+
className: o(d()),
|
|
41
|
+
"data-value": `0${t + 1}`.slice(-2),
|
|
42
|
+
"data-active": r - 1 === t,
|
|
43
|
+
role: "presentation",
|
|
44
|
+
children: /* @__PURE__ */ a(
|
|
45
|
+
"button",
|
|
46
|
+
{
|
|
47
|
+
type: "button",
|
|
48
|
+
role: "option",
|
|
49
|
+
className: o(b()),
|
|
50
|
+
onClick: (N) => f(N, t + 1),
|
|
51
|
+
children: t + 1
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
},
|
|
55
|
+
t
|
|
56
|
+
))
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
return /* @__PURE__ */ a(
|
|
61
|
+
"ul",
|
|
62
|
+
{
|
|
63
|
+
ref: n,
|
|
64
|
+
className: o(h()),
|
|
65
|
+
"aria-label": "hours",
|
|
66
|
+
role: "listbox",
|
|
67
|
+
children: Array.from({ length: 24 }, (r, e) => /* @__PURE__ */ a(
|
|
68
|
+
"li",
|
|
69
|
+
{
|
|
70
|
+
className: o(d()),
|
|
71
|
+
"data-value": `0${e}`.slice(-2),
|
|
72
|
+
"data-active": l === e,
|
|
73
|
+
role: "presentation",
|
|
74
|
+
children: /* @__PURE__ */ a(
|
|
75
|
+
"button",
|
|
76
|
+
{
|
|
77
|
+
type: "button",
|
|
78
|
+
role: "option",
|
|
79
|
+
className: o(b()),
|
|
80
|
+
onClick: (t) => f(t, e),
|
|
81
|
+
children: e
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
},
|
|
85
|
+
e
|
|
86
|
+
))
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
H.displayName = "HoursList";
|
|
91
|
+
export {
|
|
92
|
+
H as HoursList
|
|
93
|
+
};
|