@fluidattacks/design 3.1.12 → 3.1.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.
Files changed (172) hide show
  1. package/dist/components/@core/index.js +2 -2
  2. package/dist/components/accordion/accordion-content/index.js +18 -5
  3. package/dist/components/accordion/index.js +71 -14
  4. package/dist/components/alert/index.js +108 -57
  5. package/dist/components/button/index.js +64 -13
  6. package/dist/components/card/card-header/index.js +78 -9
  7. package/dist/components/card/card-with-image/index.js +88 -13
  8. package/dist/components/card/card-with-input/index.js +72 -23
  9. package/dist/components/card/card-with-selector/index.js +63 -8
  10. package/dist/components/card/card-with-switch/index.js +46 -8
  11. package/dist/components/carousel/index.js +54 -28
  12. package/dist/components/checkbox/index.js +66 -32
  13. package/dist/components/cloud-image/index.js +2 -2
  14. package/dist/components/code-snippet/index.js +64 -19
  15. package/dist/components/code-snippet/location-code/index.js +146 -100
  16. package/dist/components/colors/index.js +220 -5
  17. package/dist/components/confirm-dialog/index.js +41 -18
  18. package/dist/components/container/index.js +39 -15
  19. package/dist/components/content-card/category-tag/index.js +37 -8
  20. package/dist/components/content-card/event-date/index.js +53 -10
  21. package/dist/components/content-card/index.js +118 -13
  22. package/dist/components/content-card-carousel/index.js +87 -7
  23. package/dist/components/content-card-carousel/scroll-buttons/index.js +1 -1
  24. package/dist/components/divider/index.js +22 -7
  25. package/dist/components/empty-state/empty-button/index.js +4 -4
  26. package/dist/components/empty-state/index.js +52 -15
  27. package/dist/components/file-preview/index.js +28 -12
  28. package/dist/components/form/index.js +46 -9
  29. package/dist/components/grid-container/index.js +31 -11
  30. package/dist/components/group-selector/index.js +126 -17
  31. package/dist/components/group-selector/option-container/index.js +1 -1
  32. package/dist/components/icon/index.js +78 -18
  33. package/dist/components/icon-button/index.js +63 -14
  34. package/dist/components/indicator-card/index.js +70 -11
  35. package/dist/components/info-sidebar/index.js +107 -7
  36. package/dist/components/inputs/fields/combobox/index.js +141 -21
  37. package/dist/components/inputs/fields/combobox/option/index.js +1 -1
  38. package/dist/components/inputs/fields/date/calendar/cell/index.js +22 -11
  39. package/dist/components/inputs/fields/date/calendar/grid/index.js +21 -10
  40. package/dist/components/inputs/fields/date/calendar/header/index.js +35 -13
  41. package/dist/components/inputs/fields/date/calendar/index.js +26 -11
  42. package/dist/components/inputs/fields/date/index.js +65 -15
  43. package/dist/components/inputs/fields/date-range/calendar/index.js +29 -10
  44. package/dist/components/inputs/fields/date-range/index.js +98 -18
  45. package/dist/components/inputs/fields/date-time/calendar/index.js +44 -15
  46. package/dist/components/inputs/fields/date-time/index.js +65 -14
  47. package/dist/components/inputs/fields/editable/index.js +22 -10
  48. package/dist/components/inputs/fields/input/index.js +74 -10
  49. package/dist/components/inputs/fields/input-file/index.js +114 -21
  50. package/dist/components/inputs/fields/input-tags/index.js +60 -11
  51. package/dist/components/inputs/fields/number/index.js +54 -7
  52. package/dist/components/inputs/fields/number-range/index.js +46 -8
  53. package/dist/components/inputs/fields/phone/index.js +446 -286
  54. package/dist/components/inputs/fields/text-area/index.js +78 -10
  55. package/dist/components/inputs/label/index.js +34 -8
  56. package/dist/components/inputs/outline-container/index.js +98 -12
  57. package/dist/components/inputs/utils/action-button/index.js +28 -7
  58. package/dist/components/inputs/utils/calendar-button/index.js +34 -10
  59. package/dist/components/inputs/utils/date-selector/index.js +60 -6
  60. package/dist/components/inputs/utils/date-time-field/index.js +129 -28
  61. package/dist/components/inputs/utils/dialog/index.js +10 -7
  62. package/dist/components/inputs/utils/number-field/index.js +81 -8
  63. package/dist/components/inputs/utils/popover/index.js +41 -10
  64. package/dist/components/interactive-card/icon/index.js +1 -1
  65. package/dist/components/interactive-card/index.js +110 -7
  66. package/dist/components/language-selector/index.js +34 -10
  67. package/dist/components/language-selector/item-list/index.js +1 -1
  68. package/dist/components/link/index.js +71 -17
  69. package/dist/components/list-item/index.js +64 -13
  70. package/dist/components/little-flag/index.js +26 -9
  71. package/dist/components/loading/index.js +48 -21
  72. package/dist/components/logo/index.js +10 -4
  73. package/dist/components/logo-carousel/index.js +40 -5
  74. package/dist/components/lottie/index.js +12 -7
  75. package/dist/components/menu/index.js +53 -9
  76. package/dist/components/message-banner/index.js +79 -13
  77. package/dist/components/modal/index.js +59 -13
  78. package/dist/components/modal/modal-confirm/index.js +48 -7
  79. package/dist/components/modal/modal-footer/index.js +22 -13
  80. package/dist/components/modal/modal-header/index.js +45 -19
  81. package/dist/components/notification/index.js +65 -20
  82. package/dist/components/notification-sign/index.js +27 -10
  83. package/dist/components/number-input/index.js +58 -21
  84. package/dist/components/oauth-selector/index.js +97 -23
  85. package/dist/components/oauth-selector/option-container/index.js +68 -7
  86. package/dist/components/plan-card/index.js +99 -28
  87. package/dist/components/plan-card/recommended-tag/index.js +23 -2
  88. package/dist/components/pop-up/description/index.js +47 -9
  89. package/dist/components/pop-up/index.js +146 -17
  90. package/dist/components/premium-feature/index.js +56 -16
  91. package/dist/components/priority-score/index.js +24 -9
  92. package/dist/components/progress/index.js +30 -17
  93. package/dist/components/progress-bar/index.js +99 -41
  94. package/dist/components/radio-button/index.js +64 -27
  95. package/dist/components/scroll-button/index.js +33 -15
  96. package/dist/components/search/index.js +77 -35
  97. package/dist/components/search-bar/index.js +211 -24
  98. package/dist/components/search-bar/item-searching/index.js +1 -1
  99. package/dist/components/severity-badge/index.js +66 -6
  100. package/dist/components/severity-overview/badge/index.js +62 -11
  101. package/dist/components/severity-overview/index.js +15 -5
  102. package/dist/components/show-on-hover/index.js +16 -10
  103. package/dist/components/slide-out-menu/index.js +2611 -1164
  104. package/dist/components/slide-out-menu/menu-item/index.js +58 -6
  105. package/dist/components/slider/index.js +79 -48
  106. package/dist/components/slider/thumb/index.js +13 -6
  107. package/dist/components/step-lapse/index.js +81 -23
  108. package/dist/components/table-button/index.js +65 -24
  109. package/dist/components/tabs/fixed-tabs/index.js +24 -4
  110. package/dist/components/tabs/index.js +54 -11
  111. package/dist/components/tabs/tab/index.js +37 -6
  112. package/dist/components/tag/index.js +95 -27
  113. package/dist/components/timeline/card/index.js +1 -1
  114. package/dist/components/timeline/index.js +15 -5
  115. package/dist/components/toggle/index.js +65 -25
  116. package/dist/components/toggle-buttons/index.js +51 -22
  117. package/dist/components/tooltip/index.js +1 -1
  118. package/dist/components/tour/index.js +3897 -1829
  119. package/dist/components/typography/heading/index.js +43 -5
  120. package/dist/components/typography/span/index.js +38 -6
  121. package/dist/components/typography/text/index.js +44 -6
  122. package/dist/components/web-form/index.js +28 -19
  123. package/dist/hooks/index.js +5 -5
  124. package/dist/index-BMHVi812.mjs +234 -0
  125. package/dist/index-BzAniA2J.mjs +135 -0
  126. package/dist/index-C6LbClYh.mjs +146 -0
  127. package/dist/index-CAIe8hBv.mjs +130 -0
  128. package/dist/index-CUQBAqt_.mjs +75 -0
  129. package/dist/index-CWlrSlUk.mjs +68 -0
  130. package/dist/index-Ckmu1TfV.mjs +86 -0
  131. package/dist/index-DwznImvK.mjs +1678 -0
  132. package/dist/index-maWH3JYC.mjs +3561 -0
  133. package/dist/index.js +11 -11
  134. package/dist/styles-B2N0JLw1.mjs +114 -0
  135. package/dist/styles-B64DVBIF.mjs +115 -0
  136. package/dist/{styles-lSVV9kjn.mjs → styles-BXFVwnWT.mjs} +28 -28
  137. package/dist/styles-BZQOqe8p.mjs +141 -0
  138. package/dist/styles-Bdque9TT.mjs +65 -0
  139. package/dist/{styles-CI-I6joH.mjs → styles-BlHspTrz.mjs} +18 -18
  140. package/dist/{styles-Cx93EcVo.mjs → styles-CROOwXEH.mjs} +5 -5
  141. package/dist/styles-CplEd2kw.mjs +228 -0
  142. package/dist/styles-D1eTIklB.mjs +110 -0
  143. package/dist/styles-ePGii_9g.mjs +74 -0
  144. package/dist/use-carousel-CgAF78h3.mjs +23 -0
  145. package/dist/use-click-outside-BUll8Ag-.mjs +18 -0
  146. package/dist/use-cloudinary-image-BCxwj15o.mjs +1176 -0
  147. package/dist/use-modal-CtgexKnf.mjs +14 -0
  148. package/dist/use-search-Dj47QDw9.mjs +15 -0
  149. package/dist/utils-V0EumEPM.mjs +6 -0
  150. package/package.json +1 -3
  151. package/dist/index-38JqtnAI.mjs +0 -122
  152. package/dist/index-B5yoGFs6.mjs +0 -54
  153. package/dist/index-BLbKylyw.mjs +0 -209
  154. package/dist/index-Bu448Tz2.mjs +0 -106
  155. package/dist/index-BwFnfaRh.mjs +0 -2310
  156. package/dist/index-Co_k0WFk.mjs +0 -75
  157. package/dist/index-Cu7uUMlx.mjs +0 -82
  158. package/dist/index-D-lcuEHY.mjs +0 -1018
  159. package/dist/index-DrfjITyT.mjs +0 -61
  160. package/dist/styles-7_q7nHce.mjs +0 -110
  161. package/dist/styles-BA0WIQL-.mjs +0 -74
  162. package/dist/styles-C3cZmKVJ.mjs +0 -131
  163. package/dist/styles-D85YYIjM.mjs +0 -131
  164. package/dist/styles-EIbGRPlk.mjs +0 -106
  165. package/dist/styles-Q1VXuWI7.mjs +0 -65
  166. package/dist/styles-fH2c4cfc.mjs +0 -77
  167. package/dist/use-carousel-CvRxi2FI.mjs +0 -17
  168. package/dist/use-click-outside-BtZLIoU1.mjs +0 -18
  169. package/dist/use-cloudinary-image-fG7ODNgr.mjs +0 -611
  170. package/dist/use-modal-CkrZ-_-M.mjs +0 -14
  171. package/dist/use-search-DpLNvt7Q.mjs +0 -12
  172. package/dist/utils-CQvBF-wY.mjs +0 -4
@@ -1,13 +1,81 @@
1
- import { jsx as i, jsxs as w } from "react/jsx-runtime";
2
- import { forwardRef as L } from "react";
3
- import { useTheme as k } from "styled-components";
4
- import { OutlineContainer as v } from "../../outline-container/index.js";
5
- import { S as T } from "../../../../styles-lSVV9kjn.mjs";
6
- import { Icon as q } from "../../../icon/index.js";
7
- const A = L(function({ disabled: o = !1, error: r, helpLink: s, helpText: n, label: d, name: e = "input-text", id: m, maskValue: p = !1, maxLength: t, placeholder: h, required: l, rows: c, tooltip: u, value: a, weight: x, ...f }, b) {
8
- const g = k();
9
- return i(v, { error: r, helpLink: s, helpText: n, htmlFor: e, label: d, maxLength: t, required: l, tooltip: u, value: a ? String(a) : void 0, weight: x, children: w(T, { className: `${o ? "disabled" : ""} ${r ? "error" : ""}`, children: [i("textarea", { "aria-hidden": !1, "aria-invalid": r ? "true" : "false", "aria-label": e, "aria-required": l, className: p ? "sr-block" : "", "data-testid": `${e}-text-area`, disabled: o, id: m ?? e, maxLength: t, name: e, placeholder: h, ref: b, rows: c, value: a, ...f }), r ? i(q, { icon: "exclamation-circle", iconClass: "error-icon", iconColor: g.palette.error[500], iconSize: "xs" }) : void 0] }) });
1
+ import { jsx as i, jsxs as T } from "react/jsx-runtime";
2
+ import { forwardRef as $ } from "react";
3
+ import { useTheme as b } from "styled-components";
4
+ import { OutlineContainer as j } from "../../outline-container/index.js";
5
+ import { S as A } from "../../../../styles-BXFVwnWT.mjs";
6
+ import { Icon as I } from "../../../icon/index.js";
7
+ const R = $(function({
8
+ disabled: o = !1,
9
+ error: r,
10
+ helpLink: s,
11
+ helpText: l,
12
+ label: c,
13
+ name: e = "input-text",
14
+ id: f,
15
+ maskValue: d = !1,
16
+ maxLength: a,
17
+ placeholder: m,
18
+ required: n,
19
+ rows: p,
20
+ tooltip: x,
21
+ value: t,
22
+ weight: u,
23
+ ...h
24
+ }, C) {
25
+ const S = b();
26
+ return /* @__PURE__ */ i(
27
+ j,
28
+ {
29
+ error: r,
30
+ helpLink: s,
31
+ helpText: l,
32
+ htmlFor: e,
33
+ label: c,
34
+ maxLength: a,
35
+ required: n,
36
+ tooltip: x,
37
+ value: t ? String(t) : void 0,
38
+ weight: u,
39
+ children: /* @__PURE__ */ T(
40
+ A,
41
+ {
42
+ className: `${o ? "disabled" : ""} ${r ? "error" : ""}`,
43
+ children: [
44
+ /* @__PURE__ */ i(
45
+ "textarea",
46
+ {
47
+ "aria-hidden": !1,
48
+ "aria-invalid": r ? "true" : "false",
49
+ "aria-label": e,
50
+ "aria-required": n,
51
+ className: d ? "sr-block" : "",
52
+ "data-testid": `${e}-text-area`,
53
+ disabled: o,
54
+ id: f ?? e,
55
+ maxLength: a,
56
+ name: e,
57
+ placeholder: m,
58
+ ref: C,
59
+ rows: p,
60
+ value: t,
61
+ ...h
62
+ }
63
+ ),
64
+ r ? /* @__PURE__ */ i(
65
+ I,
66
+ {
67
+ icon: "exclamation-circle",
68
+ iconClass: "error-icon",
69
+ iconColor: S.palette.error[500],
70
+ iconSize: "xs"
71
+ }
72
+ ) : void 0
73
+ ]
74
+ }
75
+ )
76
+ }
77
+ );
10
78
  });
11
79
  export {
12
- A as TextArea
80
+ R as TextArea
13
81
  };
@@ -1,11 +1,37 @@
1
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- import { isEmpty as p } from "lodash";
3
- import { useTheme as f } from "styled-components";
4
- import { Icon as c } from "../../icon/index.js";
5
- import { T as x } from "../../../index-D-lcuEHY.mjs";
6
- const j = ({ htmlFor: i, label: l, required: e, tooltip: o, weight: t = "normal" }) => {
7
- const s = f(), a = `${i}-tooltip`, m = o !== void 0 && !p(o);
8
- return n("label", { className: `flex font-${t} gap-1 w-full`, htmlFor: i, children: [l, e && r(c, { icon: "asterisk", iconColor: s.palette.error[500], iconSize: "xxss" }), m ? r(x, { display: "inline-flex", icon: "circle-info", id: a, place: "top", tip: o }) : null] });
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
+ import { isEmpty as m } from "lodash";
3
+ import { useTheme as a } from "styled-components";
4
+ import { Icon as f } from "../../icon/index.js";
5
+ import { T as x } from "../../../index-DwznImvK.mjs";
6
+ const j = ({
7
+ htmlFor: e,
8
+ label: r,
9
+ required: t,
10
+ tooltip: o,
11
+ weight: l = "normal"
12
+ }) => {
13
+ const n = a(), s = `${e}-tooltip`, p = o !== void 0 && !m(o);
14
+ return /* @__PURE__ */ c("label", { className: `flex font-${l} gap-1 w-full`, htmlFor: e, children: [
15
+ r,
16
+ t && /* @__PURE__ */ i(
17
+ f,
18
+ {
19
+ icon: "asterisk",
20
+ iconColor: n.palette.error[500],
21
+ iconSize: "xxss"
22
+ }
23
+ ),
24
+ p ? /* @__PURE__ */ i(
25
+ x,
26
+ {
27
+ display: "inline-flex",
28
+ icon: "circle-info",
29
+ id: s,
30
+ place: "top",
31
+ tip: o
32
+ }
33
+ ) : null
34
+ ] });
9
35
  };
10
36
  export {
11
37
  j as Label
@@ -1,17 +1,103 @@
1
- import { jsxs as i, jsx as e, Fragment as L } from "react/jsx-runtime";
2
- import { useTheme as b } from "styled-components";
3
- import { Label as u } from "../label/index.js";
4
- import { a as v } from "../../../styles-lSVV9kjn.mjs";
5
- import { Container as m } from "../../container/index.js";
6
- import { Icon as w } from "../../icon/index.js";
7
- import { Link as T } from "../../link/index.js";
8
- import { Tag as k } from "../../tag/index.js";
1
+ import { jsxs as r, jsx as e, Fragment as b } from "react/jsx-runtime";
2
+ import { useTheme as w } from "styled-components";
3
+ import { Label as x } from "../label/index.js";
4
+ import { a as C } from "../../../styles-BXFVwnWT.mjs";
5
+ import { Container as c } from "../../container/index.js";
6
+ import { Icon as j } from "../../icon/index.js";
7
+ import { Link as z } from "../../link/index.js";
8
+ import { Tag as S } from "../../tag/index.js";
9
9
  import "../../typography/heading/index.js";
10
10
  import "../../typography/span/index.js";
11
- import { Text as p } from "../../typography/text/index.js";
12
- const B = ({ children: d, error: r, helpLink: o, helpLinkText: c = "Link here", helpText: t, htmlFor: h, label: n, maxLength: l, required: f, tooltip: g, value: s, weight: x }) => {
13
- const a = b(), y = s ? s.length : 0;
14
- return i(v, { children: [n === void 0 ? void 0 : e(u, { htmlFor: h, label: n, required: f, tooltip: g, weight: x }), d, r || l ? i(m, { display: "flex", justify: r === void 0 ? "end" : "space-between", width: "100%", children: [r && e(p, { className: "error-msg", color: a.palette.error[500], display: "block", lineSpacing: 1, size: "sm", children: r }), l && e(k, { priority: "low", tagLabel: `${y}/${l}`, variant: "error" })] }) : void 0, t || o ? i(m, { alignItems: "center", display: "flex", gap: 0.25, width: "100%", children: [t && i(L, { children: [e(w, { icon: "circle-info", iconColor: a.palette.gray[400], iconSize: "xxs", iconType: "fa-light" }), e(p, { color: a.palette.gray[400], display: "inline-block", size: "sm", children: t })] }), o && e(T, { href: o, children: c })] }) : void 0] });
11
+ import { Text as d } from "../../typography/text/index.js";
12
+ const B = ({
13
+ children: s,
14
+ error: i,
15
+ helpLink: n,
16
+ helpLinkText: f = "Link here",
17
+ helpText: o,
18
+ htmlFor: p,
19
+ label: m,
20
+ maxLength: t,
21
+ required: g,
22
+ tooltip: h,
23
+ value: a,
24
+ weight: u
25
+ }) => {
26
+ const l = w(), y = a ? a.length : 0;
27
+ return /* @__PURE__ */ r(C, { children: [
28
+ m === void 0 ? void 0 : /* @__PURE__ */ e(
29
+ x,
30
+ {
31
+ htmlFor: p,
32
+ label: m,
33
+ required: g,
34
+ tooltip: h,
35
+ weight: u
36
+ }
37
+ ),
38
+ s,
39
+ i || t ? /* @__PURE__ */ r(
40
+ c,
41
+ {
42
+ display: "flex",
43
+ justify: i === void 0 ? "end" : "space-between",
44
+ width: "100%",
45
+ children: [
46
+ i && /* @__PURE__ */ e(
47
+ d,
48
+ {
49
+ className: "error-msg",
50
+ color: l.palette.error[500],
51
+ display: "block",
52
+ lineSpacing: 1,
53
+ size: "sm",
54
+ children: i
55
+ }
56
+ ),
57
+ t && /* @__PURE__ */ e(
58
+ S,
59
+ {
60
+ priority: "low",
61
+ tagLabel: `${y}/${t}`,
62
+ variant: "error"
63
+ }
64
+ )
65
+ ]
66
+ }
67
+ ) : void 0,
68
+ o || n ? /* @__PURE__ */ r(
69
+ c,
70
+ {
71
+ alignItems: "center",
72
+ display: "flex",
73
+ gap: 0.25,
74
+ width: "100%",
75
+ children: [
76
+ o && /* @__PURE__ */ r(b, { children: [
77
+ /* @__PURE__ */ e(
78
+ j,
79
+ {
80
+ icon: "circle-info",
81
+ iconColor: l.palette.gray[400],
82
+ iconSize: "xxs",
83
+ iconType: "fa-light"
84
+ }
85
+ ),
86
+ /* @__PURE__ */ e(
87
+ d,
88
+ {
89
+ color: l.palette.gray[400],
90
+ display: "inline-block",
91
+ size: "sm",
92
+ children: o
93
+ }
94
+ )
95
+ ] }),
96
+ n && /* @__PURE__ */ e(z, { href: n, children: f })
97
+ ]
98
+ }
99
+ ) : void 0
100
+ ] });
15
101
  };
16
102
  export {
17
103
  B as OutlineContainer
@@ -1,10 +1,31 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as s } from "react";
3
- import { S as e } from "../../../../styles-7_q7nHce.mjs";
4
- import { Icon as m } from "../../../icon/index.js";
5
- const b = s(function({ disabled: n, icon: o, margin: a, onClick: r, ...t }, c) {
6
- return i(e, { $margin: a, "aria-label": o, className: "action-btn", disabled: n, onClick: r, ref: c, type: "button", ...t, children: i(m, { icon: o, iconClass: "action", iconSize: "xs", iconType: "fa-light" }) });
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as e } from "react";
3
+ import { S as m } from "../../../../styles-D1eTIklB.mjs";
4
+ import { Icon as f } from "../../../icon/index.js";
5
+ const d = e(function({ disabled: n, icon: t, margin: i, onClick: r, ...a }, c) {
6
+ return /* @__PURE__ */ o(
7
+ m,
8
+ {
9
+ $margin: i,
10
+ "aria-label": t,
11
+ className: "action-btn",
12
+ disabled: n,
13
+ onClick: r,
14
+ ref: c,
15
+ type: "button",
16
+ ...a,
17
+ children: /* @__PURE__ */ o(
18
+ f,
19
+ {
20
+ icon: t,
21
+ iconClass: "action",
22
+ iconSize: "xs",
23
+ iconType: "fa-light"
24
+ }
25
+ )
26
+ }
27
+ );
7
28
  });
8
29
  export {
9
- b as ActionButton
30
+ d as ActionButton
10
31
  };
@@ -1,13 +1,37 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { useRef as s } from "react";
3
- import { useButton as n } from "react-aria";
4
- import { C as l } from "../../../../styles-7_q7nHce.mjs";
5
- import { theme as p } from "../../../colors/index.js";
6
- import { Icon as d } from "../../../icon/index.js";
7
- const x = ({ disabled: o = !1, icon: r, props: i }) => {
8
- const e = s(null), { buttonProps: t } = n(i, e);
9
- return a(l, { ...t, $disabled: o, $focus: !!t["aria-expanded"], $header: r === "calendar" || r === "calendar-clock", disabled: o, ref: e, type: "button", children: a(d, { icon: r, iconColor: p.palette.gray[o ? 400 : 700], iconSize: "xs", iconType: "fa-light" }) });
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { useRef as m } from "react";
3
+ import { useButton as c } from "react-aria";
4
+ import { C as p } from "../../../../styles-D1eTIklB.mjs";
5
+ import { theme as f } from "../../../colors/index.js";
6
+ import { Icon as i } from "../../../icon/index.js";
7
+ const B = ({
8
+ disabled: o = !1,
9
+ icon: t,
10
+ props: a
11
+ }) => {
12
+ const r = m(null), { buttonProps: e } = c(a, r);
13
+ return /* @__PURE__ */ n(
14
+ p,
15
+ {
16
+ ...e,
17
+ $disabled: o,
18
+ $focus: !!e["aria-expanded"],
19
+ $header: t === "calendar" || t === "calendar-clock",
20
+ disabled: o,
21
+ ref: r,
22
+ type: "button",
23
+ children: /* @__PURE__ */ n(
24
+ i,
25
+ {
26
+ icon: t,
27
+ iconColor: f.palette.gray[o ? 400 : 700],
28
+ iconSize: "xs",
29
+ iconType: "fa-light"
30
+ }
31
+ )
32
+ }
33
+ );
10
34
  };
11
35
  export {
12
- x as Button
36
+ B as Button
13
37
  };
@@ -1,8 +1,62 @@
1
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
- import { S as m } from "../../../../styles-lSVV9kjn.mjs";
3
- import { Button as c } from "../calendar-button/index.js";
4
- import { DateField as f } from "../date-time-field/index.js";
5
- const P = ({ error: a, buttonProps: t, datePickerRef: i, disabled: r = !1, granularity: o = "day", fieldProps: d, groupProps: l, inputRef: p, name: s, ...n }) => u(m, { ...l, className: `${r ? "disabled" : ""} ${a ? "error" : ""}`, ref: i, children: [e(f, { disabled: r, error: a != null, props: { ...d, autoFocus: !1, granularity: o, shouldForceLeadingZeros: !0 } }), e(c, { disabled: r, icon: o === "minute" ? "calendar-clock" : "calendar", props: t }), e("input", { ...n, "aria-label": s, className: "date-input", disabled: r, name: s, ref: p, type: "text", value: "" })] });
1
+ import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
+ import { S as m } from "../../../../styles-BXFVwnWT.mjs";
3
+ import { Button as f } from "../calendar-button/index.js";
4
+ import { DateField as d } from "../date-time-field/index.js";
5
+ const j = ({
6
+ error: t,
7
+ buttonProps: n,
8
+ datePickerRef: s,
9
+ disabled: e = !1,
10
+ granularity: o = "day",
11
+ fieldProps: p,
12
+ groupProps: c,
13
+ inputRef: l,
14
+ name: a,
15
+ ...i
16
+ }) => /* @__PURE__ */ u(
17
+ m,
18
+ {
19
+ ...c,
20
+ className: `${e ? "disabled" : ""} ${t ? "error" : ""}`,
21
+ ref: s,
22
+ children: [
23
+ /* @__PURE__ */ r(
24
+ d,
25
+ {
26
+ disabled: e,
27
+ error: t != null,
28
+ props: {
29
+ ...p,
30
+ autoFocus: !1,
31
+ granularity: o,
32
+ shouldForceLeadingZeros: !0
33
+ }
34
+ }
35
+ ),
36
+ /* @__PURE__ */ r(
37
+ f,
38
+ {
39
+ disabled: e,
40
+ icon: o === "minute" ? "calendar-clock" : "calendar",
41
+ props: n
42
+ }
43
+ ),
44
+ /* @__PURE__ */ r(
45
+ "input",
46
+ {
47
+ ...i,
48
+ "aria-label": a,
49
+ className: "date-input",
50
+ disabled: e,
51
+ name: a,
52
+ ref: l,
53
+ type: "text",
54
+ value: ""
55
+ }
56
+ )
57
+ ]
58
+ }
59
+ );
6
60
  export {
7
- P as DateSelector
61
+ j as DateSelector
8
62
  };
@@ -1,32 +1,133 @@
1
- import { jsxs as u, jsx as o } from "react/jsx-runtime";
2
- import { createCalendar as b } from "@internationalized/date";
3
- import { isNil as d } from "lodash";
4
- import { useRef as y, useCallback as f, useState as x } from "react";
5
- import { useDateField as S, useTimeField as C, useDateSegment as A } from "react-aria";
6
- import { useDateFieldState as F, useTimeFieldState as T } from "react-stately";
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
+ import { createCalendar as D } from "@internationalized/date";
3
+ import { isNil as u } from "lodash";
4
+ import { useRef as y, useCallback as P, useState as S } from "react";
5
+ import { useDateField as C, useTimeField as F, useDateSegment as T } from "react-aria";
6
+ import { useDateFieldState as b, useTimeFieldState as k } from "react-stately";
7
7
  import { useTheme as M } from "styled-components";
8
- import { I as k, T as D, a as g, b as h } from "../../../../styles-7_q7nHce.mjs";
9
- import { Icon as N } from "../../../icon/index.js";
10
- const P = ({ segment: i, state: m }) => {
11
- const e = M(), a = y(null), t = { ...i, placeholder: { day: "dd", dayPeriod: "(AM/PM)", era: "", hour: "hh", literal: "", minute: "mm", month: "mm", second: "", timeZoneName: "", year: "yyyy" }[i.type] }, { segmentProps: r } = A(t, m, a), c = e.palette.gray[t.isEditable ? 800 : 500];
12
- return o("div", { ...t.type !== "literal" && { ...r, className: "segment-cell" }, ref: a, style: t.type === "literal" ? void 0 : { color: t.isPlaceholder ? e.palette.gray[400] : c }, children: t.isPlaceholder ? t.placeholder : t.text });
13
- }, B = ({ disabled: i, error: m = !1, props: e }) => {
14
- const a = M(), t = y(null), r = F({ ...e, createCalendar: b, locale: "en-US" }), { fieldProps: c } = S(e, r, t), p = f((l) => {
15
- const n = document.getElementsByClassName("segment-cell"), s = l.currentTarget;
16
- Object.values(n).some((v) => v.contains(s)) || (l.preventDefault(), l.stopPropagation());
17
- }, []);
18
- return u(k, { ...c, onClick: p, children: [o("div", { className: "flex flex-row", style: { color: a.palette.gray[d(r.value) ? 400 : 800] }, tabIndex: -1, children: r.segments.map((l, n) => {
19
- const s = `key_${n}`;
20
- return o(P, { segment: { ...l, isEditable: !i }, state: r }, s);
21
- }) }), m ? o(N, { icon: "exclamation-circle", iconColor: a.palette.error[500], iconSize: "xs" }) : void 0] });
22
- }, L = (i) => {
23
- const m = y(null), e = T({ ...i, locale: "en-US", shouldForceLeadingZeros: !0 }), { timeValue: a } = e, t = !d(a) && a.hour < 12 ? "AM" : "PM", [r, c] = x(d(a) ? "AM" : t), { fieldProps: p } = C(i, e, m), l = f((n) => {
24
- const s = n.currentTarget.name;
25
- s !== r && (d(a) || (s === "AM" ? e.setSegment("dayPeriod", 0) : s === "PM" && e.setSegment("dayPeriod", 12))), c(s);
26
- }, [r, e, a]);
27
- return u(D, { children: [o(g, { ...p, ref: m, children: e.segments.slice(0, -2).map((n, s) => o(P, { segment: n, state: e }, `key_${s}`)) }), u(g, { children: [o(h, { id: r === "AM" ? "active" : "", name: "AM", onClick: l, type: "button", children: "AM" }), o(h, { id: r === "PM" ? "active" : "", name: "PM", onClick: l, type: "button", children: "PM" })] })] });
8
+ import { I as A, T as v, a as h, b as g } from "../../../../styles-D1eTIklB.mjs";
9
+ import { Icon as I } from "../../../icon/index.js";
10
+ const x = ({
11
+ segment: i,
12
+ state: a
13
+ }) => {
14
+ const t = M(), n = y(null), e = { ...i, placeholder: {
15
+ day: "dd",
16
+ dayPeriod: "(AM/PM)",
17
+ era: "",
18
+ hour: "hh",
19
+ literal: "",
20
+ minute: "mm",
21
+ month: "mm",
22
+ second: "",
23
+ timeZoneName: "",
24
+ year: "yyyy"
25
+ }[i.type] }, { segmentProps: c } = T(e, a, n), m = t.palette.gray[e.isEditable ? 800 : 500];
26
+ return /* @__PURE__ */ r(
27
+ "div",
28
+ {
29
+ ...e.type !== "literal" && {
30
+ ...c,
31
+ className: "segment-cell"
32
+ },
33
+ ref: n,
34
+ style: e.type === "literal" ? void 0 : {
35
+ color: e.isPlaceholder ? t.palette.gray[400] : m
36
+ },
37
+ children: e.isPlaceholder ? e.placeholder : e.text
38
+ }
39
+ );
40
+ }, $ = ({
41
+ disabled: i,
42
+ error: a = !1,
43
+ props: t
44
+ }) => {
45
+ const n = M(), d = y(null), e = b({
46
+ ...t,
47
+ createCalendar: D,
48
+ locale: "en-US"
49
+ }), { fieldProps: c } = C(t, e, d), m = P(
50
+ (l) => {
51
+ const s = document.getElementsByClassName("segment-cell"), o = l.currentTarget;
52
+ Object.values(s).some(
53
+ (p) => p.contains(o)
54
+ ) || (l.preventDefault(), l.stopPropagation());
55
+ },
56
+ []
57
+ );
58
+ return /* @__PURE__ */ f(A, { ...c, onClick: m, children: [
59
+ /* @__PURE__ */ r(
60
+ "div",
61
+ {
62
+ className: "flex flex-row",
63
+ style: { color: n.palette.gray[u(e.value) ? 400 : 800] },
64
+ tabIndex: -1,
65
+ children: e.segments.map((l, s) => {
66
+ const o = `key_${s}`;
67
+ return /* @__PURE__ */ r(
68
+ x,
69
+ {
70
+ segment: { ...l, isEditable: !i },
71
+ state: e
72
+ },
73
+ o
74
+ );
75
+ })
76
+ }
77
+ ),
78
+ a ? /* @__PURE__ */ r(
79
+ I,
80
+ {
81
+ icon: "exclamation-circle",
82
+ iconColor: n.palette.error[500],
83
+ iconSize: "xs"
84
+ }
85
+ ) : void 0
86
+ ] });
87
+ }, w = (i) => {
88
+ const a = y(null), t = k({
89
+ ...i,
90
+ locale: "en-US",
91
+ shouldForceLeadingZeros: !0
92
+ }), { timeValue: n } = t, d = !u(n) && n.hour < 12 ? "AM" : "PM", [e, c] = S(
93
+ u(n) ? "AM" : d
94
+ ), { fieldProps: m } = F(i, t, a), l = P(
95
+ (s) => {
96
+ const o = s.currentTarget.name;
97
+ o !== e && (u(n) || (o === "AM" ? t.setSegment("dayPeriod", 0) : o === "PM" && t.setSegment("dayPeriod", 12))), c(o);
98
+ },
99
+ [e, t, n]
100
+ );
101
+ return /* @__PURE__ */ f(v, { children: [
102
+ /* @__PURE__ */ r(h, { ...m, ref: a, children: t.segments.slice(0, -2).map((s, o) => {
103
+ const p = `key_${o}`;
104
+ return /* @__PURE__ */ r(x, { segment: s, state: t }, p);
105
+ }) }),
106
+ /* @__PURE__ */ f(h, { children: [
107
+ /* @__PURE__ */ r(
108
+ g,
109
+ {
110
+ id: e === "AM" ? "active" : "",
111
+ name: "AM",
112
+ onClick: l,
113
+ type: "button",
114
+ children: "AM"
115
+ }
116
+ ),
117
+ /* @__PURE__ */ r(
118
+ g,
119
+ {
120
+ id: e === "PM" ? "active" : "",
121
+ name: "PM",
122
+ onClick: l,
123
+ type: "button",
124
+ children: "PM"
125
+ }
126
+ )
127
+ ] })
128
+ ] });
28
129
  };
29
130
  export {
30
- B as DateField,
31
- L as TimeField
131
+ $ as DateField,
132
+ w as TimeField
32
133
  };
@@ -1,11 +1,14 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { useRef as i } from "react";
3
- import { useDialog as m } from "react-aria";
4
- import { D as t } from "../../../../styles-7_q7nHce.mjs";
5
- const c = ({ children: r, ...s }) => {
6
- const o = i(null), { dialogProps: a } = m(s, o);
7
- return e(t, { ...a, ref: o, children: r });
2
+ import { useRef as m } from "react";
3
+ import { useDialog as s } from "react-aria";
4
+ import { D as a } from "../../../../styles-D1eTIklB.mjs";
5
+ const g = ({
6
+ children: r,
7
+ ...i
8
+ }) => {
9
+ const o = m(null), { dialogProps: t } = s(i, o);
10
+ return /* @__PURE__ */ e(a, { ...t, ref: o, children: r });
8
11
  };
9
12
  export {
10
- c as Dialog
13
+ g as Dialog
11
14
  };