@ck-ui/component-library 1.0.17 → 2.0.0
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/CalendarGrid-xx9nYA1_.js +237 -0
- package/dist/{DropdownFooter-DL--mVls.js → DropdownFooter-DIxlKK1Y.js} +1 -1
- package/dist/ScrollDropdown-tf6ex2lE.js +80 -0
- package/dist/assets/DateRangePicker-DNHTCnqT.css +1 -0
- package/dist/assets/ScrollDropdown-CQTxVikn.css +1 -0
- package/dist/assets/index-C4-S_v9y.css +1 -0
- package/dist/assets/index-Dpv0OAoW.css +1 -0
- package/dist/assets/theme-CDdq9khQ.css +1 -0
- package/dist/components/DateRangePicker/Calendar/CalendarGrid.d.ts.map +1 -1
- package/dist/components/DateRangePicker/Calendar/CalendarGrid.js +2 -2
- package/dist/components/DateRangePicker/Calendar/ScrollDropdown.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +229 -190
- package/dist/components/DateRangePicker/_utils/util.js +2 -2
- package/dist/components/MAVDropdown/index.d.ts +1 -1
- package/dist/components/MAVDropdown/index.d.ts.map +1 -1
- package/dist/components/MAVDropdown/index.js +70 -73
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +48 -44
- package/dist/components/ProfileDropdown/index.d.ts.map +1 -1
- package/dist/components/ProfileDropdown/index.js +70 -83
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +2 -2
- package/dist/components/SingleSelectDropdown/index.js +2 -2
- package/dist/theme/Theme.js +1 -1
- package/dist/theme/theme.css +1 -1
- package/dist/utils/array.d.ts +8 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/array.js +9 -0
- package/dist/utils/color.d.ts +10 -0
- package/dist/utils/color.d.ts.map +1 -0
- package/dist/utils/color.js +22 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +6 -2
- package/package.json +19 -1
- package/dist/CalendarGrid-CsD34cNQ.js +0 -232
- package/dist/ScrollDropdown-SqirjC7s.js +0 -81
- package/dist/assets/DateRangePicker-DLr3_fJA.css +0 -1
- package/dist/assets/ScrollDropdown-BAUrkqoH.css +0 -1
- package/dist/assets/index-Cdmws__2.css +0 -1
- package/dist/assets/index-PKpDB4Cl.css +0 -1
- package/dist/assets/theme-gJHYUL9y.css +0 -1
|
@@ -1,146 +1,143 @@
|
|
|
1
|
-
import { jsxs as m, jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Popover as
|
|
1
|
+
import { jsxs as m, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as _, useRef as k, useCallback as x } from "react";
|
|
3
|
+
import { Popover as D } from "../Popover/index.js";
|
|
4
4
|
import { Tooltip as M } from "../Tooltip/index.js";
|
|
5
|
-
import { mergeClasses as
|
|
6
|
-
import { S as
|
|
7
|
-
import '../../assets/index-
|
|
8
|
-
"ckds-mav-dropdown": "_ckds-mav-
|
|
9
|
-
"ckds-mav-trigger": "_ckds-mav-
|
|
10
|
-
"ckds-mav-trigger
|
|
11
|
-
"ckds-mav-trigger-
|
|
12
|
-
"ckds-mav-trigger-
|
|
13
|
-
"ckds-mav-
|
|
14
|
-
"ckds-mav-chevron": "_ckds-mav-
|
|
15
|
-
"ckds-mav-
|
|
16
|
-
"ckds-mav-
|
|
17
|
-
"ckds-mav-item
|
|
18
|
-
"ckds-mav-item": "_ckds-mav-
|
|
19
|
-
"ckds-mav-item-
|
|
20
|
-
"ckds-mav-item
|
|
21
|
-
"ckds-mav-item--active": "_ckds-mav-item--active_1w4zu_121"
|
|
5
|
+
import { mergeClasses as v } from "../../utils/mergeClasses.js";
|
|
6
|
+
import { S as C } from "../../chevron-down-Cm9R64Fe.js";
|
|
7
|
+
import '../../assets/index-Dpv0OAoW.css';const s = {
|
|
8
|
+
"ckds-mav-dropdown": "_ckds-mav-dropdown_1llbq_1",
|
|
9
|
+
"ckds-mav-trigger": "_ckds-mav-trigger_1llbq_7",
|
|
10
|
+
"ckds-mav-trigger-content": "_ckds-mav-trigger-content_1llbq_24",
|
|
11
|
+
"ckds-mav-trigger-label": "_ckds-mav-trigger-label_1llbq_31",
|
|
12
|
+
"ckds-mav-trigger-selected": "_ckds-mav-trigger-selected_1llbq_39",
|
|
13
|
+
"ckds-mav-chevron": "_ckds-mav-chevron_1llbq_49",
|
|
14
|
+
"ckds-mav-chevron--open": "_ckds-mav-chevron--open_1llbq_63",
|
|
15
|
+
"ckds-mav-popover": "_ckds-mav-popover_1llbq_67",
|
|
16
|
+
"ckds-mav-item-list": "_ckds-mav-item-list_1llbq_75",
|
|
17
|
+
"ckds-mav-item": "_ckds-mav-item_1llbq_75",
|
|
18
|
+
"ckds-mav-item-label": "_ckds-mav-item-label_1llbq_111",
|
|
19
|
+
"ckds-mav-item-sublabel": "_ckds-mav-item-sublabel_1llbq_114",
|
|
20
|
+
"ckds-mav-item--active": "_ckds-mav-item--active_1llbq_122"
|
|
22
21
|
};
|
|
23
|
-
function
|
|
24
|
-
const
|
|
25
|
-
return /* @__PURE__ */
|
|
22
|
+
function q({ text: a, className: t }) {
|
|
23
|
+
const n = k(null), [u, o] = _(!1);
|
|
24
|
+
return /* @__PURE__ */ l(M, { title: u ? a : "", placement: "top", children: /* @__PURE__ */ l(
|
|
26
25
|
"span",
|
|
27
26
|
{
|
|
28
|
-
ref:
|
|
29
|
-
className:
|
|
27
|
+
ref: n,
|
|
28
|
+
className: t,
|
|
30
29
|
onMouseEnter: () => {
|
|
31
|
-
|
|
30
|
+
n.current && n.current.scrollWidth > n.current.clientWidth && o(!0);
|
|
32
31
|
},
|
|
33
32
|
onMouseLeave: () => o(!1),
|
|
34
|
-
children:
|
|
33
|
+
children: a
|
|
35
34
|
}
|
|
36
35
|
) });
|
|
37
36
|
}
|
|
38
|
-
function
|
|
39
|
-
triggerLabel:
|
|
40
|
-
selectedItem:
|
|
41
|
-
items:
|
|
42
|
-
onSelect:
|
|
43
|
-
|
|
44
|
-
className: f
|
|
37
|
+
function A({
|
|
38
|
+
triggerLabel: a = "MAV",
|
|
39
|
+
selectedItem: t,
|
|
40
|
+
items: n,
|
|
41
|
+
onSelect: u,
|
|
42
|
+
className: o
|
|
45
43
|
}) {
|
|
46
|
-
const [
|
|
47
|
-
i.current &&
|
|
48
|
-
}, []),
|
|
44
|
+
const [r, c] = _(!1), [N, w] = _(!1), h = k(null), i = k(null), p = k(null), E = x(() => {
|
|
45
|
+
i.current && w(i.current.scrollWidth > i.current.clientWidth);
|
|
46
|
+
}, []), f = () => {
|
|
49
47
|
p.current && clearTimeout(p.current), c(!0);
|
|
50
|
-
},
|
|
48
|
+
}, g = () => {
|
|
51
49
|
p.current = setTimeout(() => c(!1), 120);
|
|
52
50
|
}, T = (e) => {
|
|
53
51
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), c((d) => !d)), e.key === "Escape" && c(!1);
|
|
54
52
|
}, y = (e) => {
|
|
55
|
-
|
|
53
|
+
u(e), c(!1);
|
|
56
54
|
};
|
|
57
55
|
return /* @__PURE__ */ m(
|
|
58
56
|
"div",
|
|
59
57
|
{
|
|
60
|
-
className:
|
|
61
|
-
onMouseEnter:
|
|
62
|
-
onMouseLeave:
|
|
58
|
+
className: v(s["ckds-mav-dropdown"], o),
|
|
59
|
+
onMouseEnter: f,
|
|
60
|
+
onMouseLeave: g,
|
|
63
61
|
children: [
|
|
64
62
|
/* @__PURE__ */ m(
|
|
65
63
|
"button",
|
|
66
64
|
{
|
|
67
|
-
ref:
|
|
65
|
+
ref: h,
|
|
68
66
|
type: "button",
|
|
69
|
-
className:
|
|
67
|
+
className: v(
|
|
70
68
|
s["ckds-mav-trigger"],
|
|
71
|
-
|
|
69
|
+
r && s["ckds-mav-trigger--open"]
|
|
72
70
|
),
|
|
73
71
|
onKeyDown: T,
|
|
74
72
|
"aria-haspopup": "listbox",
|
|
75
|
-
"aria-expanded":
|
|
76
|
-
"aria-label": `${
|
|
73
|
+
"aria-expanded": r,
|
|
74
|
+
"aria-label": `${a}: ${t.label}, open MAV selector`,
|
|
77
75
|
children: [
|
|
78
76
|
/* @__PURE__ */ m("span", { className: s["ckds-mav-trigger-content"], children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ l("span", { className: s["ckds-mav-trigger-label"], children: a }),
|
|
78
|
+
/* @__PURE__ */ l(M, { title: N ? t.label : "", placement: "bottom", children: /* @__PURE__ */ l(
|
|
81
79
|
"span",
|
|
82
80
|
{
|
|
83
81
|
ref: i,
|
|
84
82
|
className: s["ckds-mav-trigger-selected"],
|
|
85
83
|
onMouseEnter: E,
|
|
86
|
-
children:
|
|
84
|
+
children: t.label
|
|
87
85
|
}
|
|
88
86
|
) })
|
|
89
87
|
] }),
|
|
90
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ l(
|
|
91
89
|
"span",
|
|
92
90
|
{
|
|
93
|
-
className:
|
|
91
|
+
className: v(
|
|
94
92
|
s["ckds-mav-chevron"],
|
|
95
|
-
|
|
93
|
+
r && s["ckds-mav-chevron--open"]
|
|
96
94
|
),
|
|
97
95
|
"aria-hidden": "true",
|
|
98
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ l(C, {})
|
|
99
97
|
}
|
|
100
98
|
)
|
|
101
99
|
]
|
|
102
100
|
}
|
|
103
101
|
),
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
|
|
102
|
+
/* @__PURE__ */ l(
|
|
103
|
+
D,
|
|
106
104
|
{
|
|
107
|
-
open:
|
|
105
|
+
open: r,
|
|
108
106
|
onClose: () => c(!1),
|
|
109
|
-
anchorRef:
|
|
107
|
+
anchorRef: h,
|
|
110
108
|
align: "left",
|
|
111
109
|
minWidth: "0",
|
|
112
110
|
className: s["ckds-mav-popover"],
|
|
113
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ l(
|
|
114
112
|
"div",
|
|
115
113
|
{
|
|
116
|
-
onMouseEnter:
|
|
117
|
-
onMouseLeave:
|
|
118
|
-
children: /* @__PURE__ */
|
|
114
|
+
onMouseEnter: f,
|
|
115
|
+
onMouseLeave: g,
|
|
116
|
+
children: /* @__PURE__ */ l(
|
|
119
117
|
"ul",
|
|
120
118
|
{
|
|
121
119
|
role: "listbox",
|
|
122
|
-
"aria-label": `${
|
|
120
|
+
"aria-label": `${a} options`,
|
|
123
121
|
className: s["ckds-mav-item-list"],
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const d = e.key === n.key;
|
|
122
|
+
children: n.map((e) => {
|
|
123
|
+
const d = e.key === t.key;
|
|
127
124
|
return /* @__PURE__ */ m(
|
|
128
125
|
"li",
|
|
129
126
|
{
|
|
130
127
|
role: "option",
|
|
131
128
|
"aria-selected": d,
|
|
132
|
-
className:
|
|
129
|
+
className: v(
|
|
133
130
|
s["ckds-mav-item"],
|
|
134
131
|
d && s["ckds-mav-item--active"]
|
|
135
132
|
),
|
|
136
133
|
onClick: () => y(e),
|
|
137
|
-
onKeyDown: (
|
|
138
|
-
(
|
|
134
|
+
onKeyDown: (b) => {
|
|
135
|
+
(b.key === "Enter" || b.key === " ") && (b.preventDefault(), y(e));
|
|
139
136
|
},
|
|
140
137
|
tabIndex: 0,
|
|
141
138
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
e.subLabel && /* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ l(q, { text: e.label, className: s["ckds-mav-item-label"] }),
|
|
140
|
+
e.subLabel && /* @__PURE__ */ l(q, { text: e.subLabel, className: s["ckds-mav-item-sublabel"] })
|
|
144
141
|
]
|
|
145
142
|
},
|
|
146
143
|
e.key
|
|
@@ -156,7 +153,7 @@ function R({
|
|
|
156
153
|
}
|
|
157
154
|
);
|
|
158
155
|
}
|
|
159
|
-
|
|
156
|
+
A.displayName = "MAVDropdown";
|
|
160
157
|
export {
|
|
161
|
-
|
|
158
|
+
A as MAVDropdown
|
|
162
159
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Popover/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Popover/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,OAAO,EACP,SAAS,EACT,QAAQ,EACR,SAAc,EACd,KAAe,EACf,QAAkB,GACnB,EAAE,YAAY,kDA2Id;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1,74 +1,78 @@
|
|
|
1
1
|
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as g, useState as L, useEffect as
|
|
3
|
-
import '../../assets/index-BkNXS5fR.css';const
|
|
2
|
+
import { useRef as g, useState as L, useLayoutEffect as k, useEffect as f } from "react";
|
|
3
|
+
import '../../assets/index-BkNXS5fR.css';const y = {
|
|
4
4
|
"ckds-popover": "_ckds-popover_erslc_1"
|
|
5
5
|
};
|
|
6
|
-
function
|
|
7
|
-
open:
|
|
6
|
+
function z({
|
|
7
|
+
open: o,
|
|
8
8
|
onClose: i,
|
|
9
|
-
anchorRef:
|
|
10
|
-
children:
|
|
11
|
-
className:
|
|
9
|
+
anchorRef: e,
|
|
10
|
+
children: m,
|
|
11
|
+
className: p = "",
|
|
12
12
|
align: s = "right",
|
|
13
|
-
minWidth:
|
|
13
|
+
minWidth: v = "540px"
|
|
14
14
|
}) {
|
|
15
|
-
const
|
|
15
|
+
const c = g(null), [d, l] = L({
|
|
16
16
|
top: 0,
|
|
17
17
|
left: 0
|
|
18
18
|
});
|
|
19
|
-
if (
|
|
20
|
-
if (!
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
if (k(() => {
|
|
20
|
+
if (!o || !e.current) return;
|
|
21
|
+
const r = e.current.getBoundingClientRect(), t = r.bottom + 8, u = s === "right" ? r.right : r.left;
|
|
22
|
+
l({ top: t, left: u });
|
|
23
|
+
}, [o, e, s]), f(() => {
|
|
24
|
+
if (!o || !e.current) return;
|
|
25
|
+
const n = () => {
|
|
26
|
+
const r = e.current;
|
|
27
|
+
if (!r) return;
|
|
28
|
+
const t = r.getBoundingClientRect(), u = t.bottom + 8, w = s === "right" ? t.right : t.left;
|
|
29
|
+
l({
|
|
30
|
+
top: u,
|
|
27
31
|
left: w
|
|
28
32
|
});
|
|
29
33
|
};
|
|
30
|
-
return
|
|
34
|
+
return window.addEventListener("scroll", n, !0), window.addEventListener("resize", n), () => {
|
|
31
35
|
window.removeEventListener(
|
|
32
36
|
"scroll",
|
|
33
|
-
|
|
37
|
+
n,
|
|
34
38
|
!0
|
|
35
39
|
), window.removeEventListener(
|
|
36
40
|
"resize",
|
|
37
|
-
|
|
41
|
+
n
|
|
38
42
|
);
|
|
39
43
|
};
|
|
40
|
-
}, [
|
|
41
|
-
if (!
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
) &&
|
|
46
|
-
|
|
44
|
+
}, [o, e, s]), f(() => {
|
|
45
|
+
if (!o) return;
|
|
46
|
+
const n = (t) => {
|
|
47
|
+
c.current && !c.current.contains(
|
|
48
|
+
t.target
|
|
49
|
+
) && e.current && !e.current.contains(
|
|
50
|
+
t.target
|
|
47
51
|
) && i();
|
|
48
|
-
},
|
|
49
|
-
|
|
52
|
+
}, r = (t) => {
|
|
53
|
+
t.key === "Escape" && i();
|
|
50
54
|
};
|
|
51
55
|
return document.addEventListener(
|
|
52
56
|
"mousedown",
|
|
53
|
-
|
|
57
|
+
n
|
|
54
58
|
), document.addEventListener(
|
|
55
59
|
"keydown",
|
|
56
|
-
|
|
60
|
+
r
|
|
57
61
|
), () => {
|
|
58
62
|
document.removeEventListener(
|
|
59
63
|
"mousedown",
|
|
60
|
-
|
|
64
|
+
n
|
|
61
65
|
), document.removeEventListener(
|
|
62
66
|
"keydown",
|
|
63
|
-
|
|
67
|
+
r
|
|
64
68
|
);
|
|
65
69
|
};
|
|
66
|
-
}, [
|
|
67
|
-
const
|
|
70
|
+
}, [o, i, e]), !o) return null;
|
|
71
|
+
const a = {
|
|
68
72
|
position: "fixed",
|
|
69
|
-
top:
|
|
70
|
-
left:
|
|
71
|
-
minWidth:
|
|
73
|
+
top: d.top,
|
|
74
|
+
left: d.left,
|
|
75
|
+
minWidth: v,
|
|
72
76
|
zIndex: 50,
|
|
73
77
|
transform: s === "right" ? "translateX(-100%)" : void 0,
|
|
74
78
|
transformOrigin: s === "right" ? "top right" : "top left"
|
|
@@ -76,16 +80,16 @@ function h({
|
|
|
76
80
|
return /* @__PURE__ */ E(
|
|
77
81
|
"div",
|
|
78
82
|
{
|
|
79
|
-
ref:
|
|
80
|
-
className: `${
|
|
81
|
-
style:
|
|
83
|
+
ref: c,
|
|
84
|
+
className: `${y["ckds-popover"]} ${p}`,
|
|
85
|
+
style: a,
|
|
82
86
|
role: "dialog",
|
|
83
87
|
"aria-modal": "false",
|
|
84
|
-
children:
|
|
88
|
+
children: m
|
|
85
89
|
}
|
|
86
90
|
);
|
|
87
91
|
}
|
|
88
92
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
93
|
+
z as Popover,
|
|
94
|
+
z as default
|
|
91
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/ProfileDropdown/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/ProfileDropdown/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAK3E,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,YAAwB,EACxB,IAAI,EACJ,YAAY,EACZ,UAAiC,EACjC,KAAqB,EACrB,YAAY,EACZ,oBAAoB,EACpB,SAAS,GACV,EAAE,oBAAoB,2CA+GtB;yBAzHe,eAAe"}
|
|
@@ -1,86 +1,84 @@
|
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as N, useRef as E } from "react";
|
|
3
|
-
import { mergeClasses as
|
|
4
|
-
import { Avatar as
|
|
3
|
+
import { mergeClasses as n } from "../../utils/mergeClasses.js";
|
|
4
|
+
import { Avatar as p } from "../Avatar/index.js";
|
|
5
5
|
import { AvatarSizes as t } from "../Avatar/_types/avatar.types.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"ckds-profile-
|
|
13
|
-
"ckds-profile-trigger
|
|
14
|
-
"ckds-profile-
|
|
15
|
-
"ckds-profile-
|
|
16
|
-
"ckds-profile-
|
|
17
|
-
"ckds-profile-chevron
|
|
18
|
-
"ckds-profile-
|
|
19
|
-
"ckds-profile-panel
|
|
20
|
-
"ckds-profile-
|
|
21
|
-
"ckds-profile-
|
|
22
|
-
"ckds-profile-role-
|
|
23
|
-
"ckds-profile-role-
|
|
24
|
-
"ckds-profile-
|
|
25
|
-
"ckds-profile-
|
|
26
|
-
"ckds-profile-
|
|
27
|
-
"ckds-profile-org-
|
|
28
|
-
"ckds-profile-org-
|
|
29
|
-
"ckds-profile-org-value": "_ckds-profile-org-value_1vyrh_177",
|
|
30
|
-
"ckds-profile-change-org-btn": "_ckds-profile-change-org-btn_1vyrh_187"
|
|
6
|
+
import { Tabs as y } from "../Tab/index.js";
|
|
7
|
+
import { CKButton as D } from "../CKButton/index.js";
|
|
8
|
+
import { DEFAULT_VIEWS as x, PROFILE_VIEW as C } from "./_types/profileDropdown.types.js";
|
|
9
|
+
import { VIEW_LABELS as I } from "./constants.js";
|
|
10
|
+
import { S as M } from "../../chevron-down-Cm9R64Fe.js";
|
|
11
|
+
import '../../assets/index-C4-S_v9y.css';const e = {
|
|
12
|
+
"ckds-profile-dropdown": "_ckds-profile-dropdown_1mtwz_1",
|
|
13
|
+
"ckds-profile-trigger": "_ckds-profile-trigger_1mtwz_12",
|
|
14
|
+
"ckds-profile-trigger-text": "_ckds-profile-trigger-text_1mtwz_29",
|
|
15
|
+
"ckds-profile-welcome-label": "_ckds-profile-welcome-label_1mtwz_36",
|
|
16
|
+
"ckds-profile-user-name": "_ckds-profile-user-name_1mtwz_44",
|
|
17
|
+
"ckds-profile-chevron": "_ckds-profile-chevron_1mtwz_52",
|
|
18
|
+
"ckds-profile-chevron--open": "_ckds-profile-chevron--open_1mtwz_66",
|
|
19
|
+
"ckds-profile-dropdown-panel": "_ckds-profile-dropdown-panel_1mtwz_70",
|
|
20
|
+
"ckds-profile-panel-row": "_ckds-profile-panel-row_1mtwz_82",
|
|
21
|
+
"ckds-profile-divider": "_ckds-profile-divider_1mtwz_89",
|
|
22
|
+
"ckds-profile-role-info": "_ckds-profile-role-info_1mtwz_94",
|
|
23
|
+
"ckds-profile-role-label": "_ckds-profile-role-label_1mtwz_102",
|
|
24
|
+
"ckds-profile-role-value": "_ckds-profile-role-value_1mtwz_109",
|
|
25
|
+
"ckds-profile-org-info": "_ckds-profile-org-info_1mtwz_159",
|
|
26
|
+
"ckds-profile-org-label": "_ckds-profile-org-label_1mtwz_167",
|
|
27
|
+
"ckds-profile-org-value": "_ckds-profile-org-value_1mtwz_174",
|
|
28
|
+
"ckds-profile-change-org-btn": "_ckds-profile-change-org-btn_1mtwz_184"
|
|
31
29
|
};
|
|
32
|
-
function
|
|
30
|
+
function P({
|
|
33
31
|
userName: i,
|
|
34
|
-
welcomeLabel:
|
|
35
|
-
role:
|
|
36
|
-
organization:
|
|
37
|
-
activeView:
|
|
38
|
-
views:
|
|
39
|
-
onViewChange:
|
|
40
|
-
onChangeOrganization:
|
|
41
|
-
className:
|
|
32
|
+
welcomeLabel: d = "Welcome",
|
|
33
|
+
role: f,
|
|
34
|
+
organization: m,
|
|
35
|
+
activeView: k = C.PARTNER,
|
|
36
|
+
views: _ = x,
|
|
37
|
+
onViewChange: g,
|
|
38
|
+
onChangeOrganization: u,
|
|
39
|
+
className: w
|
|
42
40
|
}) {
|
|
43
|
-
const [s,
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
(o.key === "Enter" || o.key === " ") && (o.preventDefault(),
|
|
41
|
+
const [s, a] = N(!1), c = E(null), h = () => {
|
|
42
|
+
c.current && clearTimeout(c.current), a(!0);
|
|
43
|
+
}, v = () => {
|
|
44
|
+
c.current = setTimeout(() => a(!1), 120);
|
|
45
|
+
}, z = (o) => {
|
|
46
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), a((b) => !b)), o.key === "Escape" && a(!1);
|
|
49
47
|
};
|
|
50
48
|
return /* @__PURE__ */ l(
|
|
51
49
|
"div",
|
|
52
50
|
{
|
|
53
|
-
className:
|
|
54
|
-
onMouseEnter:
|
|
55
|
-
onMouseLeave:
|
|
51
|
+
className: n(e["ckds-profile-dropdown"], w),
|
|
52
|
+
onMouseEnter: h,
|
|
53
|
+
onMouseLeave: v,
|
|
56
54
|
children: [
|
|
57
55
|
/* @__PURE__ */ l(
|
|
58
56
|
"button",
|
|
59
57
|
{
|
|
60
58
|
type: "button",
|
|
61
|
-
className:
|
|
59
|
+
className: n(
|
|
62
60
|
e["ckds-profile-trigger"],
|
|
63
61
|
s && e["ckds-profile-trigger--open"]
|
|
64
62
|
),
|
|
65
|
-
onKeyDown:
|
|
63
|
+
onKeyDown: z,
|
|
66
64
|
"aria-haspopup": "true",
|
|
67
65
|
"aria-expanded": s,
|
|
68
|
-
"aria-label": `${
|
|
66
|
+
"aria-label": `${d} ${i}, open profile menu`,
|
|
69
67
|
children: [
|
|
70
|
-
/* @__PURE__ */ r(
|
|
68
|
+
/* @__PURE__ */ r(p, { name: i, size: t.MEDIUM, color: "blue" }),
|
|
71
69
|
/* @__PURE__ */ l("span", { className: e["ckds-profile-trigger-text"], children: [
|
|
72
|
-
/* @__PURE__ */ r("span", { className: e["ckds-profile-welcome-label"], children:
|
|
70
|
+
/* @__PURE__ */ r("span", { className: e["ckds-profile-welcome-label"], children: d }),
|
|
73
71
|
/* @__PURE__ */ r("span", { className: e["ckds-profile-user-name"], children: i })
|
|
74
72
|
] }),
|
|
75
73
|
/* @__PURE__ */ r(
|
|
76
74
|
"span",
|
|
77
75
|
{
|
|
78
|
-
className:
|
|
76
|
+
className: n(
|
|
79
77
|
e["ckds-profile-chevron"],
|
|
80
78
|
s && e["ckds-profile-chevron--open"]
|
|
81
79
|
),
|
|
82
80
|
"aria-hidden": "true",
|
|
83
|
-
children: /* @__PURE__ */ r(
|
|
81
|
+
children: /* @__PURE__ */ r(M, {})
|
|
84
82
|
}
|
|
85
83
|
)
|
|
86
84
|
]
|
|
@@ -94,34 +92,22 @@ function C({
|
|
|
94
92
|
"aria-label": "Profile details",
|
|
95
93
|
children: [
|
|
96
94
|
/* @__PURE__ */ l("div", { className: e["ckds-profile-panel-row"], children: [
|
|
97
|
-
/* @__PURE__ */ r(
|
|
95
|
+
/* @__PURE__ */ r(p, { name: i, size: t.MEDIUM, color: "blue" }),
|
|
98
96
|
/* @__PURE__ */ l("div", { className: e["ckds-profile-role-info"], children: [
|
|
99
97
|
/* @__PURE__ */ r("span", { className: e["ckds-profile-role-label"], children: "Role" }),
|
|
100
|
-
/* @__PURE__ */ r("span", { className: e["ckds-profile-role-value"], children:
|
|
98
|
+
/* @__PURE__ */ r("span", { className: e["ckds-profile-role-value"], children: f })
|
|
101
99
|
] }),
|
|
102
100
|
/* @__PURE__ */ r(
|
|
103
|
-
|
|
101
|
+
y,
|
|
104
102
|
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
type: "button",
|
|
114
|
-
className: a(
|
|
115
|
-
e["ckds-profile-view-btn"],
|
|
116
|
-
n && e["ckds-profile-view-btn--active"]
|
|
117
|
-
),
|
|
118
|
-
onClick: () => m?.(o),
|
|
119
|
-
"aria-pressed": n,
|
|
120
|
-
children: x[o]
|
|
121
|
-
},
|
|
122
|
-
o
|
|
123
|
-
);
|
|
124
|
-
})
|
|
103
|
+
value: k,
|
|
104
|
+
items: _.map((o) => ({
|
|
105
|
+
value: o,
|
|
106
|
+
label: I[o]
|
|
107
|
+
})),
|
|
108
|
+
onChange: (o) => g?.(o),
|
|
109
|
+
buttonView: !0,
|
|
110
|
+
size: "small"
|
|
125
111
|
}
|
|
126
112
|
)
|
|
127
113
|
] }),
|
|
@@ -129,15 +115,16 @@ function C({
|
|
|
129
115
|
/* @__PURE__ */ l("div", { className: e["ckds-profile-panel-row"], children: [
|
|
130
116
|
/* @__PURE__ */ l("div", { className: e["ckds-profile-org-info"], children: [
|
|
131
117
|
/* @__PURE__ */ r("span", { className: e["ckds-profile-org-label"], children: "Organization" }),
|
|
132
|
-
/* @__PURE__ */ r("span", { className: e["ckds-profile-org-value"], children:
|
|
118
|
+
/* @__PURE__ */ r("span", { className: e["ckds-profile-org-value"], children: m })
|
|
133
119
|
] }),
|
|
134
120
|
/* @__PURE__ */ r(
|
|
135
|
-
|
|
121
|
+
D,
|
|
136
122
|
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
123
|
+
variant: "primary",
|
|
124
|
+
size: "medium",
|
|
125
|
+
label: "Change Organization",
|
|
126
|
+
onClick: u,
|
|
127
|
+
className: e["ckds-profile-change-org-btn"]
|
|
141
128
|
}
|
|
142
129
|
)
|
|
143
130
|
] })
|
|
@@ -148,7 +135,7 @@ function C({
|
|
|
148
135
|
}
|
|
149
136
|
);
|
|
150
137
|
}
|
|
151
|
-
|
|
138
|
+
P.displayName = "ProfileDropdown";
|
|
152
139
|
export {
|
|
153
|
-
|
|
140
|
+
P as ProfileDropdown
|
|
154
141
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { D as v } from "../../../DropdownFooter-
|
|
2
|
+
import { D as v } from "../../../DropdownFooter-DIxlKK1Y.js";
|
|
3
3
|
import "../../Avatar/index.js";
|
|
4
4
|
import "../../CKButton/index.js";
|
|
5
5
|
import "../../IconButton/index.js";
|
|
6
6
|
import "../../Stepper/index.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "../../../index-BR6M9zUI.js";
|
|
9
|
-
import '../../../assets/theme-
|
|
9
|
+
import '../../../assets/theme-CDdq9khQ.css';import '../../../assets/styles-DrYTmjez.css';import '../../../assets/styles-CwZG1jzB.css';import '../../../assets/styles-0GdZsGyi.css';import '../../../assets/ReactToastify-GNLSjkBZ.css';/* empty css */
|
|
10
10
|
import "../../GroupedMultiSelect/_helpers/TagContent.js";
|
|
11
11
|
import "../../GroupedMultiSelect/_helpers/OptionRow.js";
|
|
12
12
|
import "../../GroupedSingleSelect/_helpers/OptionRow.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as g, useMemo as V, useEffect as D } from "react";
|
|
3
|
-
import { s as e, D as A } from "../../DropdownFooter-
|
|
3
|
+
import { s as e, D as A } from "../../DropdownFooter-DIxlKK1Y.js";
|
|
4
4
|
import { S as M } from "../../chevron-down-Cm9R64Fe.js";
|
|
5
5
|
import { S as q } from "../../info-icon-ooYw3va_.js";
|
|
6
6
|
import "../Avatar/index.js";
|
|
@@ -9,7 +9,7 @@ import "../IconButton/index.js";
|
|
|
9
9
|
import "../Stepper/index.js";
|
|
10
10
|
import { Tooltip as G } from "../Tooltip/index.js";
|
|
11
11
|
import "../../index-BR6M9zUI.js";
|
|
12
|
-
import '../../assets/theme-
|
|
12
|
+
import '../../assets/theme-CDdq9khQ.css';import '../../assets/styles-DrYTmjez.css';import '../../assets/styles-CwZG1jzB.css';import '../../assets/styles-0GdZsGyi.css';import '../../assets/ReactToastify-GNLSjkBZ.css';/* empty css */
|
|
13
13
|
import { RadioButton as H } from "../RadioButton/index.js";
|
|
14
14
|
import { Search as J } from "../Search/index.js";
|
|
15
15
|
import "../GroupedMultiSelect/_helpers/TagContent.js";
|
package/dist/theme/Theme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, Fragment as o } from "react/jsx-runtime";
|
|
2
|
-
import '../assets/theme-
|
|
2
|
+
import '../assets/theme-CDdq9khQ.css';/* empty css */
|
|
3
3
|
const i = ({ children: r }) => /* @__PURE__ */ e(o, { children: r });
|
|
4
4
|
export {
|
|
5
5
|
i as CKThemeProvider
|