@companix/uikit 0.0.3 → 0.0.4
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/Button/Button.scss +128 -0
- package/dist/ButtonGroup/ButtonGroup.scss +18 -0
- package/dist/Checkbox/Checkbox.scss +115 -0
- package/dist/DateInput/DateInput.scss +11 -0
- package/dist/DatePicker/Calendar.scss +125 -0
- package/dist/DatePicker/DatePicker.scss +0 -0
- package/dist/Dialog/Dialog.scss +25 -0
- package/dist/Dialog/Popup.scss +55 -0
- package/dist/DialogAlert/Alert.scss +52 -0
- package/dist/Drawer/Drawer.scss +112 -0
- package/dist/Form/Form.scss +70 -0
- package/dist/Form/Input.scss +24 -0
- package/dist/Icon/icon.scss +18 -0
- package/dist/OptionItem/Option.scss +89 -0
- package/dist/Popover/Popover.scss +80 -0
- package/dist/Radio/Radio.scss +148 -0
- package/dist/Scrollable/Scrollable.scss +50 -0
- package/dist/Select/Select.scss +80 -0
- package/dist/SelectTags/SelectTags.scss +66 -0
- package/dist/Spinner/Spinner.scss +14 -0
- package/dist/Stepper/StepperInput.scss +35 -0
- package/dist/Switch/Switch.scss +102 -0
- package/dist/Tabs/Tabs.scss +58 -0
- package/dist/TextArea/TextArea.scss +34 -0
- package/dist/Toaster/Toaster.scss +151 -0
- package/dist/Tooltip/Tooltip.scss +28 -0
- package/dist/bundle.es.js +56 -59
- package/dist/bundle.es10.js +35 -84
- package/dist/bundle.es11.js +30 -72
- package/dist/bundle.es12.js +14 -34
- package/dist/bundle.es13.js +7 -30
- package/dist/bundle.es14.js +33 -16
- package/dist/bundle.es15.js +24 -8
- package/dist/bundle.es16.js +15 -27
- package/dist/bundle.es17.js +22 -25
- package/dist/bundle.es18.js +13 -21
- package/dist/bundle.es19.js +38 -22
- package/dist/bundle.es2.js +45 -0
- package/dist/bundle.es20.js +16 -13
- package/dist/bundle.es21.js +34 -39
- package/dist/bundle.es22.js +20 -15
- package/dist/bundle.es23.js +38 -32
- package/dist/bundle.es24.js +110 -20
- package/dist/bundle.es25.js +106 -34
- package/dist/bundle.es26.js +34 -110
- package/dist/bundle.es27.js +11 -113
- package/dist/bundle.es28.js +23 -34
- package/dist/bundle.es29.js +35 -10
- package/dist/bundle.es3.js +10 -42
- package/dist/bundle.es30.js +20 -21
- package/dist/bundle.es31.js +81 -36
- package/dist/bundle.es32.js +20 -0
- package/dist/bundle.es33.js +16 -0
- package/dist/bundle.es34.js +24 -0
- package/dist/bundle.es35.js +5 -41
- package/dist/bundle.es36.js +18 -437
- package/dist/bundle.es37.js +14 -22
- package/dist/bundle.es38.js +68 -22
- package/dist/bundle.es39.js +68 -81
- package/dist/bundle.es4.js +85 -12
- package/dist/bundle.es40.js +31 -17
- package/dist/bundle.es41.js +67 -13
- package/dist/bundle.es43.js +75 -5
- package/dist/bundle.es44.js +46 -18
- package/dist/bundle.es45.js +42 -13
- package/dist/bundle.es5.js +82 -83
- package/dist/bundle.es6.js +74 -81
- package/dist/bundle.es7.js +26 -78
- package/dist/bundle.es8.js +80 -22
- package/dist/bundle.es9.js +71 -43
- package/dist/css-properties.scss +120 -0
- package/dist/{types/index.d.ts → index.d.ts} +0 -1
- package/dist/index.scss +25 -0
- package/dist/mixins.scss +100 -0
- package/dist/theme.scss +101 -0
- package/package.json +1 -1
- package/dist/bundle.es46.js +0 -72
- package/dist/bundle.es47.js +0 -70
- package/dist/bundle.es48.js +0 -34
- package/dist/bundle.es49.js +0 -70
- package/dist/bundle.es51.js +0 -78
- package/dist/bundle.es52.js +0 -51
- package/dist/bundle.es53.js +0 -45
- package/dist/bundle.es54.js +0 -40
- package/dist/bundle.es55.js +0 -36
- package/dist/bundle.es56.js +0 -9
- package/dist/bundle.es57.js +0 -9
- package/dist/bundle.es58.js +0 -7
- package/dist/bundle.es59.js +0 -9
- package/dist/bundle.es60.js +0 -8
- package/dist/bundle.es61.js +0 -19
- package/dist/bundle.es62.js +0 -15
- package/dist/bundle.es63.js +0 -22
- package/dist/bundle.es64.js +0 -45
- package/dist/bundle.es65.js +0 -28
- package/dist/bundle.es66.js +0 -34
- package/dist/bundle.es67.js +0 -6
- package/dist/bundle.es68.js +0 -12
- package/dist/bundle.es69.js +0 -47
- package/dist/bundle.es70.js +0 -11
- package/dist/bundle.es71.js +0 -18
- package/dist/bundle.es72.js +0 -32
- package/dist/bundle.es73.js +0 -35
- package/dist/bundle.es74.js +0 -6
- package/dist/bundle.es75.js +0 -7
- package/dist/bundle.es76.js +0 -7
- package/dist/bundle.es77.js +0 -11
- package/dist/bundle.es78.js +0 -17
- package/dist/bundle.es79.js +0 -7
- package/dist/bundle.es80.js +0 -17
- package/dist/bundle.es81.js +0 -25
- package/dist/uikit.css +0 -1
- /package/dist/{types/Button → Button}/index.d.ts +0 -0
- /package/dist/{types/ButtonGroup → ButtonGroup}/index.d.ts +0 -0
- /package/dist/{types/Checkbox → Checkbox}/index.d.ts +0 -0
- /package/dist/{types/Countdown → Countdown}/index.d.ts +0 -0
- /package/dist/{types/DateInput → DateInput}/index.d.ts +0 -0
- /package/dist/{types/DatePicker → DatePicker}/Calendar.d.ts +0 -0
- /package/dist/{types/DatePicker → DatePicker}/CalendarHeader.d.ts +0 -0
- /package/dist/{types/DatePicker → DatePicker}/index.d.ts +0 -0
- /package/dist/{types/Dialog → Dialog}/index.d.ts +0 -0
- /package/dist/{types/DialogAlert → DialogAlert}/Alert.d.ts +0 -0
- /package/dist/{types/DialogAlert → DialogAlert}/Viewport.d.ts +0 -0
- /package/dist/{types/DialogAlert → DialogAlert}/index.d.ts +0 -0
- /package/dist/{types/Drawer → Drawer}/index.d.ts +0 -0
- /package/dist/{types/File → File}/index.d.ts +0 -0
- /package/dist/{types/Form → Form}/index.d.ts +0 -0
- /package/dist/{types/Icon → Icon}/index.d.ts +0 -0
- /package/dist/{types/LoadButton → LoadButton}/index.d.ts +0 -0
- /package/dist/{types/NumberInput → NumberInput}/index.d.ts +0 -0
- /package/dist/{types/OptionItem → OptionItem}/OptionItem.d.ts +0 -0
- /package/dist/{types/OptionItem → OptionItem}/OptionsList.d.ts +0 -0
- /package/dist/{types/Popover → Popover}/index.d.ts +0 -0
- /package/dist/{types/Radio → Radio}/index.d.ts +0 -0
- /package/dist/{types/Scrollable → Scrollable}/ImitateScroll.d.ts +0 -0
- /package/dist/{types/Scrollable → Scrollable}/index.d.ts +0 -0
- /package/dist/{types/Select → Select}/SelectInput.d.ts +0 -0
- /package/dist/{types/Select → Select}/index.d.ts +0 -0
- /package/dist/{types/SelectTags → SelectTags}/index.d.ts +0 -0
- /package/dist/{types/Spinner → Spinner}/index.d.ts +0 -0
- /package/dist/{types/Stepper → Stepper}/index.d.ts +0 -0
- /package/dist/{types/Switch → Switch}/index.d.ts +0 -0
- /package/dist/{types/Tabs → Tabs}/index.d.ts +0 -0
- /package/dist/{types/TextArea → TextArea}/index.d.ts +0 -0
- /package/dist/{types/Toaster → Toaster}/RemoveListener.d.ts +0 -0
- /package/dist/{types/Toaster → Toaster}/Toast.d.ts +0 -0
- /package/dist/{types/Toaster → Toaster}/Viewport.d.ts +0 -0
- /package/dist/{types/Toaster → Toaster}/index.d.ts +0 -0
- /package/dist/{types/Tooltip → Tooltip}/index.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/use-frooze-closing.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/use-loading.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/use-local-storage.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/use-popover-position.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/use-previos.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/use-resize.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/use-scrollbox.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/use-stepper-input.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/use-update.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/useCalendar.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/useCalendarOptions-copy.d.ts +0 -0
- /package/dist/{types/__hooks → __hooks}/useCalendarOptions.d.ts +0 -0
- /package/dist/{types/__libs → __libs}/calendar.d.ts +0 -0
- /package/dist/{types/__utils → __utils}/utils.d.ts +0 -0
- /package/dist/{bundle.es50.js → bundle.es42.js} +0 -0
- /package/dist/{types/types.d.ts → types.d.ts} +0 -0
package/dist/bundle.es13.js
CHANGED
|
@@ -1,33 +1,10 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
...e,
|
|
10
|
-
value: n.current,
|
|
11
|
-
onChange: (i) => {
|
|
12
|
-
const s = i.currentTarget.value.trim();
|
|
13
|
-
if (s === "")
|
|
14
|
-
return n.current = "", u(null);
|
|
15
|
-
if (!(s.startsWith(".") || s.replace(".", "").split("").some((c) => isNaN(parseInt(c))))) {
|
|
16
|
-
if (n.current = a(s.split("")), +n.current === r)
|
|
17
|
-
return t([]);
|
|
18
|
-
u(+n.current);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
}, o = (r) => r === null ? "" : r.toString(), a = (r) => {
|
|
24
|
-
const u = [...r], e = [...r];
|
|
25
|
-
if (e.every((t) => t === "0"))
|
|
26
|
-
return "0";
|
|
27
|
-
for (let t = 0; t < e.length && e[t] === "0"; t++)
|
|
28
|
-
e[t] === "0" && e[t + 1] !== "." && u.shift();
|
|
29
|
-
return u.join("");
|
|
30
|
-
};
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import a from "classnames";
|
|
4
|
+
import { attr as i } from "@companix/utils-browser";
|
|
5
|
+
const c = p(
|
|
6
|
+
({ children: r, className: o, fill: t }, m) => /* @__PURE__ */ f("div", { ref: m, className: a("button-group", o), "data-fill": i(t), children: r })
|
|
7
|
+
);
|
|
31
8
|
export {
|
|
32
|
-
|
|
9
|
+
c as ButtonGroup
|
|
33
10
|
};
|
package/dist/bundle.es14.js
CHANGED
|
@@ -1,18 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
)
|
|
1
|
+
import { jsxs as x, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "@radix-ui/react-checkbox";
|
|
3
|
+
import { Icon as h } from "./bundle.es34.js";
|
|
4
|
+
import { faCheck as l } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
import { useId as n } from "react";
|
|
6
|
+
import { attr as c } from "@companix/utils-browser";
|
|
7
|
+
const u = ({ checked: e, required: m, disabled: r, onCheckedChange: s, size: d, label: a }) => {
|
|
8
|
+
const i = n();
|
|
9
|
+
return /* @__PURE__ */ x(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
className: "checkbox",
|
|
13
|
+
"data-size": d ?? "md",
|
|
14
|
+
"data-required": c(m && !e),
|
|
15
|
+
"data-disabled": c(r),
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ o(
|
|
18
|
+
t.Root,
|
|
19
|
+
{
|
|
20
|
+
className: "checkbox-box",
|
|
21
|
+
checked: e,
|
|
22
|
+
onCheckedChange: s,
|
|
23
|
+
disabled: r,
|
|
24
|
+
id: i,
|
|
25
|
+
children: /* @__PURE__ */ o(t.Indicator, { className: "checkbox-icon", children: /* @__PURE__ */ o(h, { icon: l, size: "xxxs" }) })
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
a && /* @__PURE__ */ o("label", { className: "checkbox-label", htmlFor: i, "data-disabled": c(r), children: a })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
16
33
|
export {
|
|
17
|
-
|
|
34
|
+
u as Checkbox
|
|
18
35
|
};
|
package/dist/bundle.es15.js
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
import { forwardRef as f } from "react";
|
|
4
|
-
import i from "classnames";
|
|
1
|
+
import { jsxs as d, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "@radix-ui/react-switch";
|
|
5
3
|
import { attr as a } from "@companix/utils-browser";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
);
|
|
4
|
+
import { useId as n } from "react";
|
|
5
|
+
const u = (m) => {
|
|
6
|
+
const { checked: e, disabled: s, onCheckedChange: o, uncheckedIcon: i, checkedIcon: t, label: h } = m, l = n();
|
|
7
|
+
return /* @__PURE__ */ d("div", { className: "switch", "data-disabled": a(s), children: [
|
|
8
|
+
/* @__PURE__ */ c(
|
|
9
|
+
r.Root,
|
|
10
|
+
{
|
|
11
|
+
className: "switch-track",
|
|
12
|
+
checked: e,
|
|
13
|
+
onCheckedChange: o,
|
|
14
|
+
disabled: s,
|
|
15
|
+
id: l,
|
|
16
|
+
children: /* @__PURE__ */ d(r.Thumb, { className: "switch-thumb", children: [
|
|
17
|
+
i && /* @__PURE__ */ c("span", { className: "switch-thumb-icon", "data-visible": a(!e), children: i }),
|
|
18
|
+
t && /* @__PURE__ */ c("span", { className: "switch-thumb-icon", "data-visible": a(e), children: t })
|
|
19
|
+
] })
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
h && /* @__PURE__ */ c("label", { className: "switch-label", htmlFor: l, "data-disabled": s, children: h })
|
|
23
|
+
] });
|
|
24
|
+
};
|
|
9
25
|
export {
|
|
10
|
-
|
|
26
|
+
u as Switch
|
|
11
27
|
};
|
package/dist/bundle.es16.js
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return /* @__PURE__ */ x(
|
|
10
|
-
"div",
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useId as c } from "react";
|
|
3
|
+
import * as d from "@radix-ui/react-radio-group";
|
|
4
|
+
import { attr as i } from "@companix/utils-browser";
|
|
5
|
+
const h = ({ value: t, label: e, size: m = "md", disabled: a, required: s }) => {
|
|
6
|
+
const o = c();
|
|
7
|
+
return /* @__PURE__ */ l(
|
|
8
|
+
"span",
|
|
11
9
|
{
|
|
12
|
-
className: "
|
|
13
|
-
"data-
|
|
14
|
-
"data-
|
|
15
|
-
"data-
|
|
10
|
+
className: "radio",
|
|
11
|
+
"data-disabled": i(a),
|
|
12
|
+
"data-size": m,
|
|
13
|
+
"data-required": i(s),
|
|
16
14
|
children: [
|
|
17
|
-
/* @__PURE__ */ o(
|
|
18
|
-
|
|
19
|
-
{
|
|
20
|
-
className: "checkbox-box",
|
|
21
|
-
checked: e,
|
|
22
|
-
onCheckedChange: s,
|
|
23
|
-
disabled: r,
|
|
24
|
-
id: i,
|
|
25
|
-
children: /* @__PURE__ */ o(t.Indicator, { className: "checkbox-icon", children: /* @__PURE__ */ o(h, { icon: l, size: "xxxs" }) })
|
|
26
|
-
}
|
|
27
|
-
),
|
|
28
|
-
a && /* @__PURE__ */ o("label", { className: "checkbox-label", htmlFor: i, "data-disabled": c(r), children: a })
|
|
15
|
+
/* @__PURE__ */ r(d.Item, { className: "radio-box", value: t, disabled: a, id: o, children: /* @__PURE__ */ r(d.Indicator, { className: "radio-mark" }) }),
|
|
16
|
+
/* @__PURE__ */ r("label", { className: "radio-label", htmlFor: o, "data-disabled": i(a), children: e })
|
|
29
17
|
]
|
|
30
18
|
}
|
|
31
19
|
);
|
|
32
20
|
};
|
|
33
21
|
export {
|
|
34
|
-
|
|
22
|
+
h as Radio
|
|
35
23
|
};
|
package/dist/bundle.es17.js
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
h && /* @__PURE__ */ c("label", { className: "switch-label", htmlFor: l, "data-disabled": s, children: h })
|
|
23
|
-
] });
|
|
24
|
-
};
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import d from "classnames";
|
|
3
|
+
import * as r from "@radix-ui/react-dialog";
|
|
4
|
+
import { VisuallyHidden as n } from "@radix-ui/react-visually-hidden";
|
|
5
|
+
import { varToStyle as c } from "@companix/utils-browser";
|
|
6
|
+
const p = ({ open: i, onOpenChange: t, children: a, size: l, direction: s, className: m }) => /* @__PURE__ */ e(r.Root, { open: i, onOpenChange: t, children: /* @__PURE__ */ o(r.Portal, { children: [
|
|
7
|
+
/* @__PURE__ */ e(r.Overlay, { className: "drawer-overlay" }),
|
|
8
|
+
/* @__PURE__ */ o(
|
|
9
|
+
r.Content,
|
|
10
|
+
{
|
|
11
|
+
style: c({ "--drawer-size": l ?? "50%" }),
|
|
12
|
+
className: d("drawer", m),
|
|
13
|
+
"data-direction": s,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(r.Title, {}) }),
|
|
16
|
+
a
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
] }) });
|
|
21
|
+
p.Close = r.Close;
|
|
25
22
|
export {
|
|
26
|
-
|
|
23
|
+
p as Drawer
|
|
27
24
|
};
|
package/dist/bundle.es18.js
CHANGED
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"data-required": i(s),
|
|
14
|
-
children: [
|
|
15
|
-
/* @__PURE__ */ r(d.Item, { className: "radio-box", value: t, disabled: a, id: o, children: /* @__PURE__ */ r(d.Indicator, { className: "radio-mark" }) }),
|
|
16
|
-
/* @__PURE__ */ r("label", { className: "radio-label", htmlFor: o, "data-disabled": i(a), children: e })
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
};
|
|
1
|
+
import { jsx as i, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import n from "classnames";
|
|
3
|
+
import * as o from "@radix-ui/react-dialog";
|
|
4
|
+
import { VisuallyHidden as p } from "@radix-ui/react-visually-hidden";
|
|
5
|
+
const c = ({ size: e = "s", open: l, onOpenChange: a, children: s, className: t }) => /* @__PURE__ */ i(o.Root, { open: l, onOpenChange: a, children: /* @__PURE__ */ r(o.Portal, { children: [
|
|
6
|
+
/* @__PURE__ */ i(o.Overlay, { className: "popup-overlay dialog-overlay" }),
|
|
7
|
+
/* @__PURE__ */ i(o.Content, { className: "popup-container dialog-container", "data-size": e, children: /* @__PURE__ */ r("div", { className: n("popup dialog", t), children: [
|
|
8
|
+
/* @__PURE__ */ i(p, { children: /* @__PURE__ */ i(o.Title, {}) }),
|
|
9
|
+
s
|
|
10
|
+
] }) })
|
|
11
|
+
] }) });
|
|
12
|
+
c.Close = o.Close;
|
|
21
13
|
export {
|
|
22
|
-
|
|
14
|
+
c as Dialog
|
|
23
15
|
};
|
package/dist/bundle.es19.js
CHANGED
|
@@ -1,24 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "@radix-ui/react-alert-dialog";
|
|
3
|
+
import { Button as c } from "./bundle.es2.js";
|
|
4
|
+
import { RemoveListener as N } from "./bundle.es35.js";
|
|
5
|
+
import { VisuallyHidden as u } from "@radix-ui/react-visually-hidden";
|
|
6
|
+
const C = ({
|
|
7
|
+
open: d,
|
|
8
|
+
defaultOpen: p,
|
|
9
|
+
onOpenChange: m,
|
|
10
|
+
onUnMounted: h,
|
|
11
|
+
icon: i,
|
|
12
|
+
title: l,
|
|
13
|
+
description: o,
|
|
14
|
+
cancelDefaultText: n,
|
|
15
|
+
cancel: t,
|
|
16
|
+
disableCancel: v,
|
|
17
|
+
confirm: s
|
|
18
|
+
}) => /* @__PURE__ */ a(r.Root, { open: d, defaultOpen: p, onOpenChange: m, children: [
|
|
19
|
+
/* @__PURE__ */ e(N, { callback: h }),
|
|
20
|
+
/* @__PURE__ */ a(r.Portal, { children: [
|
|
21
|
+
/* @__PURE__ */ e(r.Overlay, { className: "popup-overlay dialog-overlay" }),
|
|
22
|
+
/* @__PURE__ */ e(r.Content, { className: "popup-container dialog-container", children: /* @__PURE__ */ a("div", { className: "popup alert", children: [
|
|
23
|
+
/* @__PURE__ */ a("div", { className: "alert-body", children: [
|
|
24
|
+
i && /* @__PURE__ */ e("span", { className: "alert-icon", children: i }),
|
|
25
|
+
/* @__PURE__ */ a("div", { className: "alert-content", children: [
|
|
26
|
+
l && /* @__PURE__ */ e(r.Title, { className: "alert-title", children: l }),
|
|
27
|
+
!l && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(r.Title, {}) }),
|
|
28
|
+
o && /* @__PURE__ */ e(r.Description, { className: "alert-description", children: o })
|
|
29
|
+
] })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ a("div", { className: "alert-footer", children: [
|
|
32
|
+
!v && (t?.text || n) && /* @__PURE__ */ e(r.Cancel, { asChild: !0, children: /* @__PURE__ */ e(c, { appearance: "neutral", ...t, text: t?.text ?? n }) }),
|
|
33
|
+
s?.text && /* @__PURE__ */ e(r.Action, { asChild: !0, children: /* @__PURE__ */ e(c, { appearance: "negative", ...s }) })
|
|
34
|
+
] })
|
|
35
|
+
] }) })
|
|
36
|
+
] })
|
|
37
|
+
] });
|
|
22
38
|
export {
|
|
23
|
-
|
|
39
|
+
C as AlertDialog
|
|
24
40
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as e, jsxs as b, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import j from "classnames";
|
|
3
|
+
import { Spinner as k } from "./bundle.es3.js";
|
|
4
|
+
import { forwardRef as v } from "react";
|
|
5
|
+
import { attr as r } from "@companix/utils-browser";
|
|
6
|
+
const F = v(
|
|
7
|
+
({
|
|
8
|
+
children: d,
|
|
9
|
+
fill: o,
|
|
10
|
+
text: m,
|
|
11
|
+
active: l,
|
|
12
|
+
mode: c = "default",
|
|
13
|
+
appearance: f = "neutral",
|
|
14
|
+
size: s = "md",
|
|
15
|
+
align: p,
|
|
16
|
+
icon: n,
|
|
17
|
+
loading: a,
|
|
18
|
+
className: u,
|
|
19
|
+
iconRight: i,
|
|
20
|
+
...t
|
|
21
|
+
}, x) => /* @__PURE__ */ e(
|
|
22
|
+
"button",
|
|
23
|
+
{
|
|
24
|
+
ref: x,
|
|
25
|
+
className: j("button", u),
|
|
26
|
+
"data-size": s,
|
|
27
|
+
"data-loading": r(a),
|
|
28
|
+
"data-align": a ? "center" : p ?? (n && i ? "left" : "center"),
|
|
29
|
+
"data-appearance": f,
|
|
30
|
+
"data-mode": c,
|
|
31
|
+
"data-fill": r(o),
|
|
32
|
+
"data-active": r(l),
|
|
33
|
+
...t,
|
|
34
|
+
onClick: a ?? t.disabled ? void 0 : t.onClick,
|
|
35
|
+
children: a ? /* @__PURE__ */ e(k, { size: 14, width: 2 }) : /* @__PURE__ */ b(h, { children: [
|
|
36
|
+
n,
|
|
37
|
+
(d ?? m) && /* @__PURE__ */ e("span", { className: "button-text", children: m ?? d }),
|
|
38
|
+
i
|
|
39
|
+
] })
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
export {
|
|
44
|
+
F as Button
|
|
45
|
+
};
|
package/dist/bundle.es20.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Button as m } from "./bundle.es2.js";
|
|
3
|
+
import { useLoading as p } from "./bundle.es36.js";
|
|
4
|
+
const g = ({ onClick: o, appearance: r = "primary", ...i }) => {
|
|
5
|
+
const { isLoading: n, isError: t, handleClick: a } = p({ onClick: o });
|
|
6
|
+
return /* @__PURE__ */ e(
|
|
7
|
+
m,
|
|
8
|
+
{
|
|
9
|
+
appearance: t ? "negative" : r,
|
|
10
|
+
...i,
|
|
11
|
+
loading: n,
|
|
12
|
+
onClick: a
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
};
|
|
13
16
|
export {
|
|
14
|
-
|
|
17
|
+
g as LoadButton
|
|
15
18
|
};
|
package/dist/bundle.es21.js
CHANGED
|
@@ -1,41 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
s?.text && /* @__PURE__ */ e(r.Action, { asChild: !0, children: /* @__PURE__ */ e(c, { appearance: "negative", ...s }) })
|
|
35
|
-
] })
|
|
36
|
-
] }) })
|
|
37
|
-
] })
|
|
38
|
-
] });
|
|
1
|
+
import { jsx as n, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "@radix-ui/react-tabs";
|
|
3
|
+
import { useRef as g, useId as p, createContext as v, useState as I, useContext as d, useEffect as R } from "react";
|
|
4
|
+
const l = v({ baseId: "", listRef: {} }), b = (t, e) => `radix-${t}-trigger-${e}`, y = ({ children: t, value: e, onChange: s }) => {
|
|
5
|
+
const r = g(null), o = p();
|
|
6
|
+
return /* @__PURE__ */ n(c.Root, { value: e, onValueChange: s, children: /* @__PURE__ */ n(l.Provider, { value: { baseId: o, listRef: r }, children: /* @__PURE__ */ T(c.List, { className: "tabs", ref: r, children: [
|
|
7
|
+
/* @__PURE__ */ n($, { value: e }),
|
|
8
|
+
t
|
|
9
|
+
] }) }) });
|
|
10
|
+
}, $ = ({ value: t }) => {
|
|
11
|
+
const [e, s] = I({}), { baseId: r, listRef: o } = d(l);
|
|
12
|
+
return R(() => {
|
|
13
|
+
const a = { observer: null };
|
|
14
|
+
if (o.current) {
|
|
15
|
+
const f = `.tab[id="${b(r, t)}"]`, i = o.current.querySelector(f);
|
|
16
|
+
i != null ? (a.observer = new ResizeObserver(() => {
|
|
17
|
+
const { clientHeight: u, clientWidth: m, offsetLeft: h, offsetTop: x } = i;
|
|
18
|
+
s({
|
|
19
|
+
height: u,
|
|
20
|
+
transform: `translateX(${Math.floor(h)}px) translateY(${Math.floor(x)}px)`,
|
|
21
|
+
width: m
|
|
22
|
+
});
|
|
23
|
+
}), a.observer.observe(i)) : s({ display: "none" });
|
|
24
|
+
}
|
|
25
|
+
return () => {
|
|
26
|
+
a.observer && a.observer.disconnect();
|
|
27
|
+
};
|
|
28
|
+
}, [t]), /* @__PURE__ */ n("div", { className: "tab-indicator-container", style: e, children: /* @__PURE__ */ n("div", { className: "tab-indicator" }) });
|
|
29
|
+
}, C = ({ children: t, value: e, ...s }) => {
|
|
30
|
+
const { baseId: r } = d(l), o = b(r, e);
|
|
31
|
+
return /* @__PURE__ */ n(c.Trigger, { ...s, id: o, className: "tab", value: e, children: t });
|
|
32
|
+
};
|
|
33
|
+
y.Tab = C;
|
|
39
34
|
export {
|
|
40
|
-
|
|
35
|
+
y as Tabs
|
|
41
36
|
};
|
package/dist/bundle.es22.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as d, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { getNextCandleTime as T, sleep as S, getTimes as x } from "@companix/utils-js";
|
|
3
|
+
import { useRef as g, useState as v, useEffect as s } from "react";
|
|
4
|
+
const n = (t) => String(t).padStart(2, "0"), j = ({ expiration: t, separator: m = ":", onExpired: a }) => {
|
|
5
|
+
const e = g(null), [, o] = v([]);
|
|
6
|
+
s(() => {
|
|
7
|
+
const c = Date.now(), f = T(c, "1s") - c;
|
|
8
|
+
return e.current && clearInterval(e.current), S(f).then(() => {
|
|
9
|
+
o([]), e.current = setInterval(() => {
|
|
10
|
+
o([]);
|
|
11
|
+
}, 1e3);
|
|
12
|
+
}), () => {
|
|
13
|
+
e.current && clearInterval(e.current);
|
|
14
|
+
};
|
|
15
|
+
}, [t]);
|
|
16
|
+
const r = t - Date.now(), { hours: i, minutes: u, seconds: l } = x(r);
|
|
17
|
+
return s(() => {
|
|
18
|
+
r <= 0 && (a?.(), e.current && clearInterval(e.current));
|
|
19
|
+
}, [r <= 0]), /* @__PURE__ */ d(p, { children: [n(i), n(u), n(l)].join(m) });
|
|
15
20
|
};
|
|
16
21
|
export {
|
|
17
|
-
|
|
22
|
+
j as Countdown
|
|
18
23
|
};
|
package/dist/bundle.es23.js
CHANGED
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useResizeTextarea as p } from "./bundle.es37.js";
|
|
3
|
+
import { attr as e, callMultiple as x } from "@companix/utils-browser";
|
|
4
|
+
import { useEffect as u } from "react";
|
|
5
|
+
const R = ({
|
|
6
|
+
onResize: s,
|
|
7
|
+
grow: a = !1,
|
|
8
|
+
value: t,
|
|
9
|
+
onChange: i,
|
|
10
|
+
disabled: o,
|
|
11
|
+
required: m,
|
|
12
|
+
rows: l = 2,
|
|
13
|
+
fill: c = !1,
|
|
14
|
+
...d
|
|
15
|
+
}) => {
|
|
16
|
+
const [n, r] = p(s, a);
|
|
17
|
+
return u(r, [r, t]), /* @__PURE__ */ f(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: "form form-textarea",
|
|
21
|
+
"data-required": e(m),
|
|
22
|
+
"data-disabled": e(o),
|
|
23
|
+
"data-fill": e(c),
|
|
24
|
+
children: /* @__PURE__ */ f(
|
|
25
|
+
"textarea",
|
|
26
|
+
{
|
|
27
|
+
className: "form-input",
|
|
28
|
+
"data-grow": e(a),
|
|
29
|
+
value: t,
|
|
30
|
+
ref: n,
|
|
31
|
+
rows: l,
|
|
32
|
+
disabled: o,
|
|
33
|
+
onChange: x(i, r),
|
|
34
|
+
...d
|
|
35
|
+
}
|
|
36
|
+
)
|
|
24
37
|
}
|
|
25
|
-
|
|
26
|
-
a.observer && a.observer.disconnect();
|
|
27
|
-
};
|
|
28
|
-
}, [t]), /* @__PURE__ */ n("div", { className: "tab-indicator-container", style: e, children: /* @__PURE__ */ n("div", { className: "tab-indicator" }) });
|
|
29
|
-
}, C = ({ children: t, value: e, ...s }) => {
|
|
30
|
-
const { baseId: r } = d(l), o = b(r, e);
|
|
31
|
-
return /* @__PURE__ */ n(c.Trigger, { ...s, id: o, className: "tab", value: e, children: t });
|
|
38
|
+
);
|
|
32
39
|
};
|
|
33
|
-
y.Tab = C;
|
|
34
40
|
export {
|
|
35
|
-
|
|
41
|
+
R as TextArea
|
|
36
42
|
};
|