@ck-ui/component-library 1.0.16 → 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.
Files changed (61) hide show
  1. package/dist/CalendarGrid-xx9nYA1_.js +237 -0
  2. package/dist/{DropdownFooter-CJnM_ECj.js → DropdownFooter-DIxlKK1Y.js} +3 -4
  3. package/dist/{Grow-wzNsNKt2.js → Grow-gzixxVwK.js} +22 -27
  4. package/dist/ScrollDropdown-tf6ex2lE.js +80 -0
  5. package/dist/assets/DateRangePicker-DNHTCnqT.css +1 -0
  6. package/dist/assets/ScrollDropdown-CQTxVikn.css +1 -0
  7. package/dist/assets/index-C4-S_v9y.css +1 -0
  8. package/dist/assets/index-Dpv0OAoW.css +1 -0
  9. package/dist/assets/theme-CDdq9khQ.css +1 -0
  10. package/dist/components/DateRangePicker/Calendar/CalendarGrid.d.ts +4 -0
  11. package/dist/components/DateRangePicker/Calendar/CalendarGrid.d.ts.map +1 -0
  12. package/dist/components/DateRangePicker/Calendar/CalendarGrid.js +10 -0
  13. package/dist/components/DateRangePicker/Calendar/ScrollDropdown.d.ts +4 -0
  14. package/dist/components/DateRangePicker/Calendar/ScrollDropdown.d.ts.map +1 -0
  15. package/dist/components/DateRangePicker/Calendar/ScrollDropdown.js +6 -0
  16. package/dist/components/DateRangePicker/Calendar/calendarGrid.types.d.ts +35 -0
  17. package/dist/components/DateRangePicker/Calendar/calendarGrid.types.d.ts.map +1 -0
  18. package/dist/components/DateRangePicker/Calendar/calendarGrid.types.js +1 -0
  19. package/dist/components/DateRangePicker/Calendar/calendarGrid.util.d.ts +15 -0
  20. package/dist/components/DateRangePicker/Calendar/calendarGrid.util.d.ts.map +1 -0
  21. package/dist/components/DateRangePicker/Calendar/calendarGrid.util.js +36 -0
  22. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  23. package/dist/components/DateRangePicker/DateRangePicker.js +256 -6068
  24. package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts +3 -1
  25. package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts.map +1 -1
  26. package/dist/components/DateRangePicker/{helper → _utils}/util.d.ts.map +1 -1
  27. package/dist/components/DateRangePicker/{helper → _utils}/util.js +2 -2
  28. package/dist/components/DateRangePicker/constants.d.ts +6 -0
  29. package/dist/components/DateRangePicker/constants.d.ts.map +1 -1
  30. package/dist/components/DateRangePicker/constants.js +5 -2
  31. package/dist/components/MAVDropdown/index.d.ts +1 -1
  32. package/dist/components/MAVDropdown/index.d.ts.map +1 -1
  33. package/dist/components/MAVDropdown/index.js +70 -73
  34. package/dist/components/Popover/index.d.ts.map +1 -1
  35. package/dist/components/Popover/index.js +48 -44
  36. package/dist/components/ProfileDropdown/index.d.ts.map +1 -1
  37. package/dist/components/ProfileDropdown/index.js +70 -83
  38. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +3 -4
  39. package/dist/components/SingleSelectDropdown/index.js +12 -13
  40. package/dist/components/Table/_helpers/TableFilterModal/RangeSelector.js +1 -1
  41. package/dist/components/TextField/index.js +6940 -690
  42. package/dist/components/Tooltip/index.js +2 -2
  43. package/dist/theme/Theme.js +1 -1
  44. package/dist/theme/theme.css +1 -1
  45. package/dist/{useSlot-BiMlGawc.js → useSlot-BAOpgsKZ.js} +562 -606
  46. package/dist/utils/array.d.ts +8 -0
  47. package/dist/utils/array.d.ts.map +1 -0
  48. package/dist/utils/array.js +9 -0
  49. package/dist/utils/color.d.ts +10 -0
  50. package/dist/utils/color.d.ts.map +1 -0
  51. package/dist/utils/color.js +22 -0
  52. package/dist/utils/index.d.ts +2 -0
  53. package/dist/utils/index.d.ts.map +1 -1
  54. package/dist/utils/index.js +6 -2
  55. package/package.json +19 -1
  56. package/dist/Select-CiuwMSD7.js +0 -6350
  57. package/dist/assets/DateRangePicker-C72TW2vD.css +0 -1
  58. package/dist/assets/index-Cdmws__2.css +0 -1
  59. package/dist/assets/index-PKpDB4Cl.css +0 -1
  60. package/dist/assets/theme-gJHYUL9y.css +0 -1
  61. /package/dist/components/DateRangePicker/{helper → _utils}/util.d.ts +0 -0
@@ -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 a } from "../../utils/mergeClasses.js";
4
- import { Avatar as f } from "../Avatar/index.js";
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 { DEFAULT_VIEWS as D, PROFILE_VIEW as S } from "./_types/profileDropdown.types.js";
7
- import { VIEW_LABELS as x } from "./constants.js";
8
- import { S as A } from "../../chevron-down-Cm9R64Fe.js";
9
- import '../../assets/index-Cdmws__2.css';const e = {
10
- "ckds-profile-dropdown": "_ckds-profile-dropdown_1vyrh_1",
11
- "ckds-profile-trigger": "_ckds-profile-trigger_1vyrh_12",
12
- "ckds-profile-trigger--open": "_ckds-profile-trigger--open_1vyrh_24",
13
- "ckds-profile-trigger-text": "_ckds-profile-trigger-text_1vyrh_32",
14
- "ckds-profile-welcome-label": "_ckds-profile-welcome-label_1vyrh_39",
15
- "ckds-profile-user-name": "_ckds-profile-user-name_1vyrh_47",
16
- "ckds-profile-chevron": "_ckds-profile-chevron_1vyrh_55",
17
- "ckds-profile-chevron--open": "_ckds-profile-chevron--open_1vyrh_68",
18
- "ckds-profile-dropdown-panel": "_ckds-profile-dropdown-panel_1vyrh_72",
19
- "ckds-profile-panel-row": "_ckds-profile-panel-row_1vyrh_84",
20
- "ckds-profile-divider": "_ckds-profile-divider_1vyrh_91",
21
- "ckds-profile-role-info": "_ckds-profile-role-info_1vyrh_97",
22
- "ckds-profile-role-label": "_ckds-profile-role-label_1vyrh_105",
23
- "ckds-profile-role-value": "_ckds-profile-role-value_1vyrh_112",
24
- "ckds-profile-view-toggle": "_ckds-profile-view-toggle_1vyrh_122",
25
- "ckds-profile-view-btn": "_ckds-profile-view-btn_1vyrh_129",
26
- "ckds-profile-view-btn--active": "_ckds-profile-view-btn--active_1vyrh_147",
27
- "ckds-profile-org-info": "_ckds-profile-org-info_1vyrh_162",
28
- "ckds-profile-org-label": "_ckds-profile-org-label_1vyrh_170",
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 C({
30
+ function P({
33
31
  userName: i,
34
- welcomeLabel: p = "Welcome",
35
- role: k,
36
- organization: _,
37
- activeView: v = S.PARTNER,
38
- views: h = D,
39
- onViewChange: m,
40
- onChangeOrganization: g,
41
- className: u
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, c] = N(!1), d = E(null), y = () => {
44
- d.current && clearTimeout(d.current), c(!0);
45
- }, b = () => {
46
- d.current = setTimeout(() => c(!1), 120);
47
- }, w = (o) => {
48
- (o.key === "Enter" || o.key === " ") && (o.preventDefault(), c((n) => !n)), o.key === "Escape" && c(!1);
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: a(e["ckds-profile-dropdown"], u),
54
- onMouseEnter: y,
55
- onMouseLeave: b,
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: a(
59
+ className: n(
62
60
  e["ckds-profile-trigger"],
63
61
  s && e["ckds-profile-trigger--open"]
64
62
  ),
65
- onKeyDown: w,
63
+ onKeyDown: z,
66
64
  "aria-haspopup": "true",
67
65
  "aria-expanded": s,
68
- "aria-label": `${p} ${i}, open profile menu`,
66
+ "aria-label": `${d} ${i}, open profile menu`,
69
67
  children: [
70
- /* @__PURE__ */ r(f, { name: i, size: t.SMALL }),
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: p }),
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: a(
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(A, {})
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(f, { name: i, size: t.MEDIUM }),
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: k })
98
+ /* @__PURE__ */ r("span", { className: e["ckds-profile-role-value"], children: f })
101
99
  ] }),
102
100
  /* @__PURE__ */ r(
103
- "div",
101
+ y,
104
102
  {
105
- className: e["ckds-profile-view-toggle"],
106
- role: "group",
107
- "aria-label": "Switch view",
108
- children: h.map((o) => {
109
- const n = v === o;
110
- return /* @__PURE__ */ r(
111
- "button",
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
- "button",
121
+ D,
136
122
  {
137
- type: "button",
138
- className: e["ckds-profile-change-org-btn"],
139
- onClick: g,
140
- children: "Change Organization"
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
- C.displayName = "ProfileDropdown";
138
+ P.displayName = "ProfileDropdown";
152
139
  export {
153
- C as ProfileDropdown
140
+ P as ProfileDropdown
154
141
  };
@@ -1,17 +1,16 @@
1
1
  import "react/jsx-runtime";
2
- import { D as y } from "../../../DropdownFooter-CJnM_ECj.js";
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-gJHYUL9y.css';import '../../../assets/styles-DrYTmjez.css';import '../../../assets/styles-CwZG1jzB.css';import '../../../assets/styles-0GdZsGyi.css';import '../../../assets/ReactToastify-GNLSjkBZ.css';/* empty css */
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";
13
13
  import "../../Pagination/index.js";
14
- import "../../DateRangePicker/DateRangePicker.js";
15
14
  import "react-dom";
16
15
  import "../../Loader/index.js";
17
16
  /* empty css */
@@ -24,5 +23,5 @@ import "../../MAVDropdown/index.js";
24
23
  /* empty css */
25
24
  import "../../FusionChart/index.js";
26
25
  export {
27
- y as DropdownFooter
26
+ v as DropdownFooter
28
27
  };
@@ -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-CJnM_ECj.js";
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,14 +9,14 @@ 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-gJHYUL9y.css';import '../../assets/styles-DrYTmjez.css';import '../../assets/styles-CwZG1jzB.css';import '../../assets/styles-0GdZsGyi.css';import '../../assets/ReactToastify-GNLSjkBZ.css';/* empty css */
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";
16
16
  import "../GroupedMultiSelect/_helpers/OptionRow.js";
17
17
  import "../GroupedSingleSelect/_helpers/OptionRow.js";
18
18
  import "../Pagination/index.js";
19
- import "../DateRangePicker/DateRangePicker.js";
19
+ import { useDropdownDirection as K } from "../MultiSelect/_utils/useDropdownDirection.js";
20
20
  import "react-dom";
21
21
  import "../Loader/index.js";
22
22
  /* empty css */
@@ -24,12 +24,11 @@ import "../Loader/index.js";
24
24
  /* empty css */
25
25
  import "../MultiSelect/_helpers/TagContent.js";
26
26
  import "../MultiSelect/_helpers/OptionRow.js";
27
- import { useDropdownDirection as K } from "../MultiSelect/_utils/useDropdownDirection.js";
28
27
  import "../ProfileDropdown/index.js";
29
28
  import "../MAVDropdown/index.js";
30
29
  /* empty css */
31
30
  import "../FusionChart/index.js";
32
- function De({
31
+ function ge({
33
32
  options: u,
34
33
  value: t = null,
35
34
  onChange: y,
@@ -43,20 +42,20 @@ function De({
43
42
  mandatory: L = !1,
44
43
  width: b = ""
45
44
  }) {
46
- const [l, i] = d(!1), [h, c] = d(""), [f, p] = d(t), v = g(null), { vertical: R, horizontal: j } = K(v, l), C = g(null), [z, E] = d(!1), a = u.find((r) => r.value === t), S = V(() => u.filter(
45
+ const [l, c] = d(!1), [h, i] = d(""), [f, p] = d(t), v = g(null), { vertical: R, horizontal: j } = K(v, l), C = g(null), [z, E] = d(!1), a = u.find((r) => r.value === t), S = V(() => u.filter(
47
46
  (r) => r.label.toLowerCase().includes(h.toLowerCase())
48
47
  ), [h, u]), W = (r) => {
49
48
  p?.(r);
50
49
  }, B = () => {
51
50
  p(null);
52
51
  }, F = () => {
53
- y?.(f), i(!1);
52
+ y?.(f), c(!1);
54
53
  }, T = () => {
55
- p(t), i(!1), c("");
54
+ p(t), c(!1), i("");
56
55
  };
57
56
  return D(() => {
58
57
  const r = (m) => {
59
- v.current?.contains(m.target) || (i(!1), p(t), c(""));
58
+ v.current?.contains(m.target) || (c(!1), p(t), i(""));
60
59
  };
61
60
  return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
62
61
  }, [t]), D(() => {
@@ -84,7 +83,7 @@ function De({
84
83
  {
85
84
  type: "button",
86
85
  className: `${e.trigger} ${l ? e.active : ""}`,
87
- onClick: () => !n && i((r) => !r),
86
+ onClick: () => !n && c((r) => !r),
88
87
  "aria-haspopup": "listbox",
89
88
  "aria-expanded": l,
90
89
  disabled: n,
@@ -120,8 +119,8 @@ function De({
120
119
  value: h,
121
120
  placeholder: "Search",
122
121
  autoFocus: !1,
123
- onChange: (r) => c(r),
124
- onClear: () => c(""),
122
+ onChange: (r) => i(r),
123
+ onClear: () => i(""),
125
124
  wrapperClassName: e.searchWrapper,
126
125
  inputClassName: e.searchInput
127
126
  }
@@ -157,5 +156,5 @@ function De({
157
156
  );
158
157
  }
159
158
  export {
160
- De as SingleSelectDropdown
159
+ ge as SingleSelectDropdown
161
160
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as O, jsx as w } from "react/jsx-runtime";
2
2
  import * as h from "react";
3
- import { u as ke, a as rt, c as le, b as nt, d as at, o as ue, e as je, g as ot, f as st, P as t, h as it, i as lt, j as G, s as ae, k as Ue, l as Re, m as ct, n as de, p as Ge, q as Ke } from "../../../../useSlot-BiMlGawc.js";
3
+ import { u as ke, a as rt, c as le, b as nt, d as at, o as ue, e as je, g as ot, f as st, P as t, h as it, i as lt, j as G, s as ae, k as Ue, l as Re, m as ct, n as de, p as Ge, q as Ke } from "../../../../useSlot-BAOpgsKZ.js";
4
4
  import { c as xe } from "../../../../clsx-OuTLNxxd.js";
5
5
  import { a as Ye, c as qe } from "../../../../createSimplePaletteValueFilter-BqxST_wX.js";
6
6
  import { i as _e } from "../../../../isFocusVisible-BzX3wEi7.js";