@adamosuiteservices/ui 2.10.12 → 2.11.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion-rounded.cjs +7 -7
- package/dist/accordion-rounded.js +1 -1
- package/dist/calendar-Bapd0vmU.js +2949 -0
- package/dist/calendar-DMvGcwMp.cjs +76 -0
- package/dist/calendar.cjs +1 -76
- package/dist/calendar.js +3 -2945
- package/dist/colors.css +1 -1
- package/dist/combobox-CW07jN3o.cjs +37 -0
- package/dist/combobox-CtdzWxGX.js +598 -0
- package/dist/combobox.cjs +1 -37
- package/dist/combobox.js +2 -596
- package/dist/components/layout/full-screen-loader/full-screen-loader-manager.d.ts +6 -0
- package/dist/components/layout/full-screen-loader/full-screen-loader-observable.d.ts +8 -0
- package/dist/components/layout/full-screen-loader/full-screen-loader.d.ts +4 -0
- package/dist/components/layout/full-screen-loader/index.d.ts +3 -0
- package/dist/components/ui/date-picker-selector/date-picker-selector.d.ts +21 -0
- package/dist/components/ui/date-picker-selector/index.d.ts +1 -0
- package/dist/date-picker-selector.cjs +1 -0
- package/dist/date-picker-selector.js +105 -0
- package/dist/full-screen-loader.cjs +4 -0
- package/dist/full-screen-loader.js +50 -0
- package/dist/spinner-B-sC3DVC.cjs +1 -0
- package/dist/spinner-DvrliN2E.js +19 -0
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.js +1 -16
- package/dist/styles.css +1 -1
- package/dist/table.cjs +5 -5
- package/dist/table.js +2 -2
- package/dist/tailwind-colors.css +1 -1
- package/dist/tailwind-theme.css +1 -1
- package/dist/themes.css +1 -1
- package/dist/tooltip.cjs +5 -4
- package/dist/tooltip.js +4 -3
- package/dist/types/theme.type.d.ts +1 -1
- package/docs/components/layout/full-screen-loader.md +500 -0
- package/docs/components/ui/accordion-rounded.md +7 -7
- package/docs/components/ui/accordion.md +2 -2
- package/docs/components/ui/alert.md +3 -3
- package/docs/components/ui/avatar.md +10 -10
- package/docs/components/ui/badge.md +10 -53
- package/docs/components/ui/button.md +1 -1
- package/docs/components/ui/calendar.md +1 -1
- package/docs/components/ui/combobox.md +7 -7
- package/docs/components/ui/date-picker-selector.md +376 -0
- package/docs/components/ui/hover-card.md +1 -1
- package/docs/components/ui/icon.md +12 -12
- package/docs/components/ui/input-group.md +9 -14
- package/docs/components/ui/popover.md +2 -2
- package/docs/components/ui/spinner.md +1 -1
- package/docs/components/ui/table.md +1 -1
- package/docs/components/ui/tooltip.md +3 -3
- package/docs/components/ui/typography.md +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { j as a } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import { B as p } from "./button-CBy_oQDu.js";
|
|
3
|
+
import { b as v, C, s as g } from "./calendar-Bapd0vmU.js";
|
|
4
|
+
import { C as k } from "./combobox-CtdzWxGX.js";
|
|
5
|
+
import { I as P } from "./input-DFvZLcgm.js";
|
|
6
|
+
import { P as w, c as L, b as _ } from "./popover-DcQ18EVl.js";
|
|
7
|
+
import { c as N } from "./index-CRiPKpXj.js";
|
|
8
|
+
import { useState as d } from "react";
|
|
9
|
+
function i(r, o, n) {
|
|
10
|
+
return v(r, -o, n);
|
|
11
|
+
}
|
|
12
|
+
function E({ dateRange: r, onDateRangeChange: o, labels: n, combobox: u, calendar: f, className: y, ...x }) {
|
|
13
|
+
const [h, D] = d(void 0), [b, l] = d(!1), [c, m] = d(r), s = { ...{
|
|
14
|
+
last30Days: "Last 30 days",
|
|
15
|
+
last7Days: "Last 7 days",
|
|
16
|
+
last90Days: "Last 90 days",
|
|
17
|
+
custom: "Custom",
|
|
18
|
+
placeholder: "Date",
|
|
19
|
+
cancel: "Cancel",
|
|
20
|
+
apply: "Apply"
|
|
21
|
+
}, ...n }, j = (t) => {
|
|
22
|
+
const e = g(/* @__PURE__ */ new Date());
|
|
23
|
+
switch (t) {
|
|
24
|
+
case "7_days":
|
|
25
|
+
return { from: i(e, 7), to: e };
|
|
26
|
+
case "30_days":
|
|
27
|
+
return { from: i(e, 30), to: e };
|
|
28
|
+
case "90_days":
|
|
29
|
+
return { from: i(e, 90), to: e };
|
|
30
|
+
default:
|
|
31
|
+
return { from: void 0, to: void 0 };
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ a.jsxs("div", { className: N("adm:flex adm:w-max adm:flex-col", y), ...x, children: [
|
|
35
|
+
/* @__PURE__ */ a.jsx(
|
|
36
|
+
k,
|
|
37
|
+
{
|
|
38
|
+
alwaysShowPlaceholder: !0,
|
|
39
|
+
selectedFeedback: "check",
|
|
40
|
+
icon: "calendar_today",
|
|
41
|
+
options: [
|
|
42
|
+
{ label: s.last30Days, value: "30_days" },
|
|
43
|
+
{ label: s.last7Days, value: "7_days" },
|
|
44
|
+
{ label: s.last90Days, value: "90_days" },
|
|
45
|
+
{ label: s.custom, value: "custom" }
|
|
46
|
+
],
|
|
47
|
+
value: h,
|
|
48
|
+
onValueChange: (t) => {
|
|
49
|
+
if (typeof t == "string")
|
|
50
|
+
if (t === "custom")
|
|
51
|
+
l(!0);
|
|
52
|
+
else {
|
|
53
|
+
const e = j(t);
|
|
54
|
+
o(e), m(void 0);
|
|
55
|
+
}
|
|
56
|
+
D(t);
|
|
57
|
+
},
|
|
58
|
+
labels: { placeholder: s.placeholder },
|
|
59
|
+
...u
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ a.jsxs(w, { open: b, onOpenChange: l, children: [
|
|
63
|
+
/* @__PURE__ */ a.jsx(L, { asChild: !0, children: /* @__PURE__ */ a.jsx(P, { className: "adm:sr-only" }) }),
|
|
64
|
+
/* @__PURE__ */ a.jsxs(_, { align: "start", children: [
|
|
65
|
+
/* @__PURE__ */ a.jsx(
|
|
66
|
+
C,
|
|
67
|
+
{
|
|
68
|
+
required: !0,
|
|
69
|
+
mode: "range",
|
|
70
|
+
selected: c,
|
|
71
|
+
onSelect: m,
|
|
72
|
+
captionLayout: "dropdown",
|
|
73
|
+
classNames: { root: "adm:p-0!" },
|
|
74
|
+
...f
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ a.jsxs("div", { className: "adm:mt-2 adm:flex adm:justify-end adm:gap-2", children: [
|
|
78
|
+
/* @__PURE__ */ a.jsx(
|
|
79
|
+
p,
|
|
80
|
+
{
|
|
81
|
+
variant: "link",
|
|
82
|
+
onClick: () => {
|
|
83
|
+
l(!1);
|
|
84
|
+
},
|
|
85
|
+
children: s.cancel
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ a.jsx(
|
|
89
|
+
p,
|
|
90
|
+
{
|
|
91
|
+
variant: "link",
|
|
92
|
+
onClick: () => {
|
|
93
|
+
c && o(c), l(!1);
|
|
94
|
+
},
|
|
95
|
+
children: s.apply
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] })
|
|
99
|
+
] })
|
|
100
|
+
] })
|
|
101
|
+
] });
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
E as DatePickerSelector
|
|
105
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-BB_1_6y_.cjs"),i=require("./spinner-B-sC3DVC.cjs"),a=require("react");class l{subscribers=[];subscribe(e){return this.subscribers.push(e),()=>{this.subscribers=this.subscribers.filter(r=>r!==e)}}emit(e){this.subscribers.forEach(r=>r(e))}}const s=new l;function c(){const[t,e]=a.useState(!1);return a.useEffect(()=>{const r=s.subscribe(({open:u})=>{e(u)});return()=>{r()}},[]),t?n.jsxRuntimeExports.jsx("div",{"data-slot":"full-screen-loader",className:`
|
|
2
|
+
adm:fixed adm:inset-0 adm:z-100 adm:flex adm:items-center
|
|
3
|
+
adm:justify-center adm:bg-black/50
|
|
4
|
+
`,children:n.jsxRuntimeExports.jsx(i.Spinner,{className:"adm:text-4xl adm:text-primary"})}):null}class o{show(){s.emit({open:!0})}hide(){s.emit({open:!1})}}const b=new o;exports.FullScreenLoader=c;exports.FullScreenLoaderManager=b;exports.FullScreenLoaderObservable=s;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { j as a } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import { S as i } from "./spinner-DvrliN2E.js";
|
|
3
|
+
import { useState as c, useEffect as l } from "react";
|
|
4
|
+
class u {
|
|
5
|
+
subscribers = [];
|
|
6
|
+
subscribe(e) {
|
|
7
|
+
return this.subscribers.push(e), () => {
|
|
8
|
+
this.subscribers = this.subscribers.filter((s) => s !== e);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
emit(e) {
|
|
12
|
+
this.subscribers.forEach((s) => s(e));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const t = new u();
|
|
16
|
+
function f() {
|
|
17
|
+
const [r, e] = c(!1);
|
|
18
|
+
return l(() => {
|
|
19
|
+
const s = t.subscribe(({ open: n }) => {
|
|
20
|
+
e(n);
|
|
21
|
+
});
|
|
22
|
+
return () => {
|
|
23
|
+
s();
|
|
24
|
+
};
|
|
25
|
+
}, []), r ? /* @__PURE__ */ a.jsx(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "full-screen-loader",
|
|
29
|
+
className: `
|
|
30
|
+
adm:fixed adm:inset-0 adm:z-100 adm:flex adm:items-center
|
|
31
|
+
adm:justify-center adm:bg-black/50
|
|
32
|
+
`,
|
|
33
|
+
children: /* @__PURE__ */ a.jsx(i, { className: "adm:text-4xl adm:text-primary" })
|
|
34
|
+
}
|
|
35
|
+
) : null;
|
|
36
|
+
}
|
|
37
|
+
class o {
|
|
38
|
+
show() {
|
|
39
|
+
t.emit({ open: !0 });
|
|
40
|
+
}
|
|
41
|
+
hide() {
|
|
42
|
+
t.emit({ open: !1 });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const p = new o();
|
|
46
|
+
export {
|
|
47
|
+
f as FullScreenLoader,
|
|
48
|
+
p as FullScreenLoaderManager,
|
|
49
|
+
t as FullScreenLoaderObservable
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const i=require("./jsx-runtime-BB_1_6y_.cjs"),s=require("./icon-DPMQJBkA.cjs"),t=require("./index-DoxiiusW.cjs");function r({className:e,...n}){return i.jsxRuntimeExports.jsx(s.Icon,{symbol:"progress_activity",role:"status","aria-label":"Loading",className:t.cn("adm:animate-spin adm:text-lg",e),...n})}exports.Spinner=r;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
+
import { I as r } from "./icon-DKAhvlX_.js";
|
|
4
|
+
import { c as o } from "./index-CRiPKpXj.js";
|
|
5
|
+
function n({ className: a, ...s }) {
|
|
6
|
+
return /* @__PURE__ */ t.jsx(
|
|
7
|
+
r,
|
|
8
|
+
{
|
|
9
|
+
symbol: "progress_activity",
|
|
10
|
+
role: "status",
|
|
11
|
+
"aria-label": "Loading",
|
|
12
|
+
className: o("adm:animate-spin adm:text-lg", a),
|
|
13
|
+
...s
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
n as S
|
|
19
|
+
};
|
package/dist/spinner.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./spinner-B-sC3DVC.cjs");exports.Spinner=e.Spinner;
|
package/dist/spinner.js
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { j as r } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
-
import { I as s } from "./icon-DKAhvlX_.js";
|
|
4
|
-
import { c as o } from "./index-CRiPKpXj.js";
|
|
5
|
-
function n({ className: t, ...a }) {
|
|
6
|
-
return /* @__PURE__ */ r.jsx(
|
|
7
|
-
s,
|
|
8
|
-
{
|
|
9
|
-
symbol: "progress_activity",
|
|
10
|
-
role: "status",
|
|
11
|
-
"aria-label": "Loading",
|
|
12
|
-
className: o("adm:animate-spin adm:text-lg", t),
|
|
13
|
-
...a
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
}
|
|
1
|
+
import { S as n } from "./spinner-DvrliN2E.js";
|
|
17
2
|
export {
|
|
18
3
|
n as Spinner
|
|
19
4
|
};
|