@fluidattacks/design 10.1.0 → 10.3.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 (32) hide show
  1. package/dist/components/filters/hooks.d.ts +4 -1
  2. package/dist/components/filters/hooks.js +35 -17
  3. package/dist/components/filters/options-menu/include-exclude/multi-select.d.ts +5 -1
  4. package/dist/components/filters/options-menu/include-exclude/multi-select.js +142 -112
  5. package/dist/components/filters/options-menu/index.js +156 -151
  6. package/dist/components/filters/options-menu/options/index.js +141 -114
  7. package/dist/components/filters/options-menu/options/types.d.ts +1 -0
  8. package/dist/components/filters/options-menu/single-select/index.js +83 -97
  9. package/dist/components/filters/options-menu/single-select/styles.d.ts +1 -2
  10. package/dist/components/filters/options-menu/single-select/styles.js +5 -22
  11. package/dist/components/filters/styles.d.ts +2 -1
  12. package/dist/components/filters/styles.js +27 -10
  13. package/dist/components/filters/types.d.ts +2 -2
  14. package/dist/components/form/styles.js +12 -7
  15. package/dist/components/inputs/fields/combobox/field/index.d.ts +1 -1
  16. package/dist/components/inputs/fields/combobox/field/index.js +115 -112
  17. package/dist/components/inputs/fields/combobox/index.d.ts +1 -1
  18. package/dist/components/inputs/fields/combobox/index.js +34 -31
  19. package/dist/components/inputs/fields/combobox/index.stories.d.ts +4 -1
  20. package/dist/components/inputs/fields/combobox/option/index.d.ts +1 -1
  21. package/dist/components/inputs/fields/combobox/option/index.js +79 -68
  22. package/dist/components/inputs/fields/combobox/styles.js +10 -3
  23. package/dist/components/inputs/fields/combobox/types.d.ts +5 -0
  24. package/dist/components/inputs/fields/combobox/utils.d.ts +1 -1
  25. package/dist/components/inputs/fields/combobox/utils.js +10 -10
  26. package/dist/components/loading/index.js +11 -11
  27. package/dist/components/loading/index.stories.d.ts +2 -1
  28. package/dist/components/modal/index.stories.d.ts +4 -1
  29. package/dist/components/modal/modal-confirm/index.d.ts +1 -1
  30. package/dist/components/modal/modal-confirm/index.js +34 -20
  31. package/dist/components/modal/types.d.ts +2 -0
  32. package/package.json +1 -1
@@ -1,126 +1,137 @@
1
- import { jsx as l, jsxs as G } from "react/jsx-runtime";
2
- import { useRef as H, useMemo as k, useCallback as f } from "react";
3
- import { useOption as J } from "../../../../../node_modules/react-aria/dist/private/listbox/useOption.js";
4
- import { useTheme as Q } from "styled-components";
5
- import { StyledOption as W } from "../styles.js";
6
- import { describeSelection as X, toSelection as j } from "../utils.js";
7
- import { Checkbox as u } from "../../../../checkbox/index.js";
8
- import { Icon as Y } from "../../../../icon/index.js";
9
- import { Link as Z } from "../../../../link/index.js";
10
- import { Tag as _ } from "../../../../tag/index.js";
1
+ import { jsx as l, jsxs as H } from "react/jsx-runtime";
2
+ import { useRef as J, useMemo as k, useCallback as f } from "react";
3
+ import { useOption as Q } from "../../../../../node_modules/react-aria/dist/private/listbox/useOption.js";
4
+ import { useTheme as W } from "styled-components";
5
+ import { StyledOption as X } from "../styles.js";
6
+ import { describeSelection as Y, toSelection as u } from "../utils.js";
7
+ import { Checkbox as D } from "../../../../checkbox/index.js";
8
+ import { Icon as Z } from "../../../../icon/index.js";
9
+ import { Link as _ } from "../../../../link/index.js";
10
+ import { Tag as I } from "../../../../tag/index.js";
11
11
  import "../../../../typography/heading/index.js";
12
12
  import "../../../../typography/span/index.js";
13
- import { Text as I } from "../../../../typography/text/index.js";
14
- import { useClickOutside as V } from "../../../../../hooks/use-click-outside.js";
15
- import { openUrl as oo } from "../../../../../utils/open-url.js";
16
- const $o = ({
13
+ import { Text as V } from "../../../../typography/text/index.js";
14
+ import { useClickOutside as oo } from "../../../../../hooks/use-click-outside.js";
15
+ import { openUrl as eo } from "../../../../../utils/open-url.js";
16
+ const yo = ({
17
17
  allItemKeys: a,
18
- containerRef: D,
18
+ containerRef: w,
19
+ countLabel: $,
19
20
  item: o,
20
21
  multiSelection: s,
21
22
  name: e,
22
- popoverRef: w,
23
- setInputValue: i,
23
+ popoverRef: z,
24
+ setInputValue: t,
24
25
  setValue: n,
25
26
  state: c,
26
- tag: $,
27
+ tag: y,
27
28
  watch: h
28
29
  }) => {
29
- const z = Q(), y = H(null), d = o.props.hrefLang, g = c.disabledKeys, C = a.filter(
30
+ const F = W(), C = J(null), d = o.props.hrefLang, g = c.disabledKeys, A = a.filter(
30
31
  (r) => !Array.from(g).includes(r) && r !== "All"
31
- ), { optionProps: F, isSelected: A, isFocused: q, isDisabled: O } = J(
32
+ ), { optionProps: q, isSelected: S, isFocused: B, isDisabled: O } = Q(
32
33
  { key: o.key },
33
34
  c,
34
- y
35
- ), b = k(() => c.collection.getItem("All")?.rendered?.toString(), [c.collection]), B = [
36
- A ? "selected" : "",
37
- q ? "focused" : "",
35
+ C
36
+ ), b = k(() => c.collection.getItem("All")?.rendered?.toString(), [c.collection]), K = [
37
+ S ? "selected" : "",
38
+ B ? "focused" : "",
38
39
  O ? "disabled" : ""
39
- ].join(" "), S = f(
40
+ ].join(" "), m = f(
40
41
  (r) => {
41
- const { allSelected: t, text: p } = X(
42
+ const { allSelected: i, text: p } = Y(
42
43
  r,
43
44
  a,
44
45
  g,
45
- b
46
+ b,
47
+ $
46
48
  );
47
- n?.(`${e}CheckAll`, t ? p : ""), i(p);
49
+ n?.(`${e}CheckAll`, i ? p : ""), t(p);
48
50
  },
49
- [a, b, g, e, i, n]
50
- ), K = f(
51
+ [
52
+ a,
53
+ b,
54
+ $,
55
+ g,
56
+ e,
57
+ t,
58
+ n
59
+ ]
60
+ ), M = f(
51
61
  (r) => {
52
62
  if (r.target.checked) {
53
- const t = [...C].sort();
54
- n?.(`${e}Options`, t), n?.(`${e}CheckAll`, r.target.value), i(r.target.value);
63
+ const i = [...A].sort();
64
+ n?.(`${e}Options`, i), n?.(`${e}CheckAll`, r.target.value), t(r.target.value);
55
65
  } else
56
- n?.(`${e}Options`, []), n?.(`${e}CheckAll`, ""), i("");
66
+ n?.(`${e}Options`, []), n?.(`${e}CheckAll`, ""), t("");
57
67
  },
58
- [C, e, i, n]
59
- ), M = f(
68
+ [A, e, t, n]
69
+ ), N = f(
60
70
  (r) => {
61
- const t = r.target.value, p = j(h?.(`${e}Options`)), T = r.target.checked ? [...p, t] : p.filter((E) => E !== t);
62
- n?.(`${e}Options`, T), S(T);
71
+ const i = r.target.value, p = u(h?.(`${e}Options`)), j = r.target.checked ? [...p, i] : p.filter((G) => G !== i);
72
+ n?.(`${e}Options`, j), m(j);
63
73
  },
64
- [e, n, h, S]
65
- ), m = h?.(`${e}Options`), v = k(
66
- () => j(m),
67
- [m]
68
- ), N = k(
69
- () => v.includes(o.key.toString()),
70
- [v, o.key]
71
- ), x = h?.(`${e}CheckAll`), P = k(() => !!x, [x]), R = o.key === "All" ? /* @__PURE__ */ l(
72
- u,
74
+ [e, n, h, m]
75
+ ), v = h?.(`${e}Options`), x = k(
76
+ () => u(v),
77
+ [v]
78
+ ), P = k(
79
+ () => x.includes(o.key.toString()),
80
+ [x, o.key]
81
+ ), L = h?.(`${e}CheckAll`), R = k(() => !!L, [L]), U = o.key === "All" ? /* @__PURE__ */ l(
82
+ D,
73
83
  {
74
- checked: P,
84
+ checked: R,
75
85
  label: o.rendered?.toString(),
76
86
  name: `${e}CheckAll`,
77
- onChange: K,
87
+ onChange: M,
78
88
  value: o.rendered?.toString()
79
89
  }
80
90
  ) : /* @__PURE__ */ l(
81
- u,
91
+ D,
82
92
  {
83
- checked: N,
93
+ checked: P,
84
94
  label: o.rendered?.toString(),
85
95
  name: `${e}Options`,
86
- onChange: M,
96
+ onChange: N,
87
97
  value: o.key.toString()
88
98
  }
89
- ), L = s && !O ? R : /* @__PURE__ */ l(
90
- I,
99
+ ), T = s && !O ? U : /* @__PURE__ */ l(
100
+ V,
91
101
  {
92
- color: z.palette.gray[800],
102
+ color: F.palette.gray[800],
93
103
  size: "md",
94
104
  textOverflow: "ellipsis",
95
105
  whiteSpace: "nowrap",
96
106
  children: o.rendered
97
107
  }
98
- ), U = f(
108
+ ), E = f(
99
109
  (r) => {
100
- r.preventDefault(), i(o.rendered?.toString() ?? ""), c.setSelectedKey(o.key), requestAnimationFrame(() => {
110
+ r.preventDefault(), t(o.rendered?.toString() ?? ""), c.setSelectedKey(o.key), requestAnimationFrame(() => {
101
111
  c.setOpen(!1);
102
- }), oo(d);
112
+ }), eo(d);
103
113
  },
104
- [d, o.key, o.rendered, c, i]
114
+ [d, o.key, o.rendered, c, t]
105
115
  );
106
- return V(w, () => {
116
+ return oo(z, () => {
107
117
  s && c.close();
108
- }, [D]), /* @__PURE__ */ G(
109
- W,
118
+ }, [w]), /* @__PURE__ */ H(
119
+ X,
110
120
  {
111
- ...!s && !d ? F : {},
121
+ ...!s && !d ? q : {},
112
122
  $multiSelection: s,
113
- className: B,
123
+ className: K,
114
124
  "data-testid": `${e}-option-${o.key}`,
115
- ref: y,
125
+ ref: C,
126
+ title: o.textValue,
116
127
  children: [
117
- d ? /* @__PURE__ */ l(Z, { href: d, onClick: U, children: L }) : L,
118
- A && !O && !s ? /* @__PURE__ */ l(Y, { icon: "check", iconSize: "sm", iconType: "fa-light" }) : void 0,
119
- $ === void 0 ? void 0 : /* @__PURE__ */ l(_, { tagLabel: $, variant: "inactive" })
128
+ d ? /* @__PURE__ */ l(_, { href: d, onClick: E, children: T }) : T,
129
+ S && !O && !s ? /* @__PURE__ */ l(Z, { icon: "check", iconSize: "sm", iconType: "fa-light" }) : void 0,
130
+ y === void 0 ? void 0 : /* @__PURE__ */ l(I, { tagLabel: y, variant: "inactive" })
120
131
  ]
121
132
  }
122
133
  );
123
134
  };
124
135
  export {
125
- $o as Option
136
+ yo as Option
126
137
  };
@@ -1,5 +1,5 @@
1
1
  import { styled as o } from "styled-components";
2
- import { StyledIconButton as s } from "../../../icon-button/styles.js";
2
+ import { StyledIconButton as l } from "../../../icon-button/styles.js";
3
3
  const t = o.ul`
4
4
  ${({ theme: a, $hasStatus: n, $multiSelection: p, $width: i }) => `
5
5
  align-self: center;
@@ -23,6 +23,7 @@ const t = o.ul`
23
23
  `, d = o.li`
24
24
  ${({ theme: a, $multiSelection: n }) => `
25
25
  align-items: center;
26
+ background: ${a.palette.white};
26
27
  color: ${a.palette.gray[800]};
27
28
  cursor: pointer;
28
29
  display: flex;
@@ -42,6 +43,12 @@ const t = o.ul`
42
43
  width: 100%;
43
44
  }
44
45
 
46
+ label {
47
+ display: block;
48
+ text-overflow: ellipsis;
49
+ white-space: nowrap;
50
+ }
51
+
45
52
  span {
46
53
  color: ${a.palette.gray[700]};
47
54
  }
@@ -51,7 +58,7 @@ const t = o.ul`
51
58
  }
52
59
 
53
60
  &.selected {
54
- background: ${n ? "unset" : a.palette.gray[200]};
61
+ background: ${n ? a.palette.white : a.palette.gray[200]};
55
62
  }
56
63
 
57
64
  &.disabled {
@@ -74,7 +81,7 @@ const t = o.ul`
74
81
  padding: ${a.spacing[0.25]} ${a.spacing[1]};
75
82
  size: 28;
76
83
  `}
77
- `, g = o(s)`
84
+ `, g = o(l)`
78
85
  ${({ disabled: a, theme: n }) => `
79
86
  position: relative;
80
87
 
@@ -23,6 +23,7 @@ interface IItem {
23
23
  * Props for the option component.
24
24
  * @interface IOptionProps
25
25
  * @property { MutableRefObject } containerRef - The ref of the ComboBox container.
26
+ * @property { string } [countLabel] - Plural noun of the selection summary.
26
27
  * @property { IItem } item - The item to be rendered as an option.
27
28
  * @property { boolean } multiSelection - Enable to select more than one option.
28
29
  * @property { string } name - The name of the Select.
@@ -33,6 +34,7 @@ interface IItem {
33
34
  interface IOptionProps<T> {
34
35
  allItemKeys: string[];
35
36
  containerRef: MutableRefObject<HTMLDivElement | null>;
37
+ countLabel?: string;
36
38
  item: Node<IItem>;
37
39
  multiSelection: boolean;
38
40
  name: string;
@@ -59,6 +61,8 @@ interface IOptionProps<T> {
59
61
  * next to the items it describes.
60
62
  * @property { boolean } [clearable] - Whether the clear button is shown.
61
63
  * @property {Function} [onClear] - Called when the clear button is clicked.
64
+ * @property { string } [countLabel] - Plural noun that summarizes two or
65
+ * more selected options as "N countLabel".
62
66
  */
63
67
  interface IComboBoxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "onBlur">, Partial<Omit<IOutlineContainerProps, "maxLength" | "value">> {
64
68
  control?: Control<any>;
@@ -76,6 +80,7 @@ interface IComboBoxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "on
76
80
  emptyMessage?: string;
77
81
  statusMessage?: string;
78
82
  clearable?: boolean;
83
+ countLabel?: string;
79
84
  setValue?: UseFormSetValue<any>;
80
85
  watch?: UseFormWatch<any>;
81
86
  }
@@ -1,6 +1,6 @@
1
1
  import { Key } from 'react-aria';
2
2
  declare const toSelection: (options: unknown) => string[];
3
- declare const describeSelection: (selected: readonly string[], keys: readonly string[], disabledKeys: Iterable<Key>, allName: string | undefined) => {
3
+ declare const describeSelection: (selected: readonly string[], keys: readonly string[], disabledKeys: Iterable<Key>, allName: string | undefined, countLabel?: string) => {
4
4
  allSelected: boolean;
5
5
  text: string;
6
6
  };
@@ -1,16 +1,16 @@
1
- import h from "../../../../_virtual/isEqual.js";
2
- const g = (t) => Array.isArray(t) ? t : typeof t == "string" && t ? [t] : [], u = (t, i, a, c) => {
3
- const o = new Set(a), r = i.filter(
4
- (s) => s !== "All" && !o.has(s)
5
- ), l = o.has("All") ? void 0 : c, n = !!l && r.length > 0 && t.length === r.length && h([...r].sort(), [...t].sort());
6
- if (n && l) return { allSelected: n, text: l };
1
+ import g from "../../../../_virtual/isEqual.js";
2
+ const u = (t) => Array.isArray(t) ? t : typeof t == "string" && t ? [t] : [], d = (t, a, c, h, o) => {
3
+ const i = new Set(c), l = a.filter(
4
+ (s) => s !== "All" && !i.has(s)
5
+ ), n = i.has("All") ? void 0 : h, r = !!n && l.length > 0 && t.length === l.length && g([...l].sort(), [...t].sort());
6
+ if (r && n) return { allSelected: r, text: n };
7
7
  const e = [...t].sort();
8
- return {
9
- allSelected: n,
8
+ return o !== void 0 && e.length > 1 ? { allSelected: r, text: `${e.length} ${o}` } : {
9
+ allSelected: r,
10
10
  text: e.length <= 2 ? e.join(", ") : `${e.slice(0, 2).join(", ")}, +${e.length - 2} more`
11
11
  };
12
12
  };
13
13
  export {
14
- u as describeSelection,
15
- g as toSelection
14
+ d as describeSelection,
15
+ u as toSelection
16
16
  };
@@ -1,24 +1,24 @@
1
1
  import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
- import { useTheme as s } from "styled-components";
3
- import { LoadingContainer as c, CircleBg as p, Circle as l } from "./styles.js";
4
- import { Container as d } from "../container/index.js";
2
+ import { useTheme as p } from "styled-components";
3
+ import { LoadingContainer as c, CircleBg as s, Circle as a } from "./styles.js";
4
+ import { Container as l } from "../container/index.js";
5
5
  import "../typography/heading/index.js";
6
6
  import "../typography/span/index.js";
7
- import { Text as x } from "../typography/text/index.js";
8
- const w = ({
7
+ import { Text as d } from "../typography/text/index.js";
8
+ const y = ({
9
9
  color: e = "red",
10
10
  label: t,
11
11
  size: n
12
12
  }) => {
13
- const i = s(), m = e === "red" || e === "blue" ? i.palette.gray[700] : e === "white" ? i.palette.white : e;
14
- return /* @__PURE__ */ o(d, { alignItems: "center", display: "flex", children: [
13
+ const i = p(), m = e === "red" || e === "blue" ? i.palette.gray[700] : e === "white" ? i.palette.white : e;
14
+ return /* @__PURE__ */ o(l, { alignItems: "center", display: "flex", children: [
15
15
  /* @__PURE__ */ o(c, { $size: n, viewBox: "0 0 100 100", children: [
16
- /* @__PURE__ */ r(p, { $color: e, cx: "50", cy: "50", r: "45" }),
17
- /* @__PURE__ */ r(l, { $color: e, cx: "50", cy: "50", r: "45" })
16
+ /* @__PURE__ */ r(s, { $color: e, cx: "50", cy: "50", r: "45" }),
17
+ /* @__PURE__ */ r(a, { $color: e, cx: "50", cy: "50", r: "45" })
18
18
  ] }),
19
- t && /* @__PURE__ */ r(x, { color: m, ml: 0.5, size: "md", children: t })
19
+ t && /* @__PURE__ */ r(d, { color: m, ml: 0.5, size: "md", whiteSpace: "nowrap", children: t })
20
20
  ] });
21
21
  };
22
22
  export {
23
- w as Loading
23
+ y as Loading
24
24
  };
@@ -3,5 +3,6 @@ import { ILoadingProps } from '.';
3
3
  declare const config: Meta;
4
4
  declare const Default: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ILoadingProps>;
5
5
  declare const DarkBackground: StoryFn;
6
- export { Default, DarkBackground };
6
+ declare const InConfirmButton: StoryFn;
7
+ export { Default, DarkBackground, InConfirmButton };
7
8
  export default config;
@@ -9,6 +9,9 @@ declare const WithForm: import('storybook/internal/csf').AnnotatedStoryFn<import
9
9
  id: string;
10
10
  }>>;
11
11
  declare const WithTabsAndLongForm: StoryFn;
12
+ declare const WithStickyConfirm: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IModalProps & {
13
+ id: string;
14
+ }>>;
12
15
  declare const ScrollableContent: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IModalProps & {
13
16
  id: string;
14
17
  }>>;
@@ -25,4 +28,4 @@ declare const WithTabs: import('storybook/internal/csf').AnnotatedStoryFn<import
25
28
  id: string;
26
29
  }>>;
27
30
  export default config;
28
- export { Default, ImageModal, WithTabs, ScrollableContent, SingleAction, WithoutFooter, WithForm, WithTabsAndLongForm, };
31
+ export { Default, ImageModal, WithTabs, ScrollableContent, SingleAction, WithoutFooter, WithForm, WithStickyConfirm, WithTabsAndLongForm, };
@@ -1,3 +1,3 @@
1
1
  import { IModalConfirmProps } from '../types';
2
- declare const ModalConfirm: ({ disabled, id, onCancel, onConfirm, txtCancel, txtConfirm, }: Readonly<IModalConfirmProps>) => JSX.Element;
2
+ declare const ModalConfirm: ({ disabled, id, onCancel, onConfirm, sticky, txtCancel, txtConfirm, }: Readonly<IModalConfirmProps>) => JSX.Element;
3
3
  export { ModalConfirm };
@@ -1,17 +1,18 @@
1
- import { jsxs as s, jsx as m } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as f } from "react/jsx-runtime";
2
+ import { useTheme as u } from "styled-components";
2
3
  import { Button as n } from "../../button/index.js";
3
- import { Container as c } from "../../container/index.js";
4
- const u = ({
5
- disabled: e,
6
- id: i = "modal-confirm",
4
+ import { Container as p } from "../../container/index.js";
5
+ const j = ({
6
+ disabled: a,
7
+ id: o = "modal-confirm",
7
8
  onCancel: t,
8
9
  onConfirm: r = "submit",
9
- txtCancel: a,
10
- txtConfirm: d
10
+ sticky: c = !1,
11
+ txtCancel: d,
12
+ txtConfirm: l
11
13
  }) => {
12
- const o = r === "submit";
13
- return /* @__PURE__ */ s(
14
- c,
14
+ const e = u(), m = r === "submit", s = /* @__PURE__ */ f(
15
+ p,
15
16
  {
16
17
  display: "flex",
17
18
  gap: 0.75,
@@ -19,34 +20,47 @@ const u = ({
19
20
  maxWidth: t ? "392px" : "190px",
20
21
  mt: 1.5,
21
22
  children: [
22
- t ? /* @__PURE__ */ m(
23
+ t ? /* @__PURE__ */ i(
23
24
  n,
24
25
  {
25
- id: `${i}-cancel`,
26
+ id: `${o}-cancel`,
26
27
  justify: "center",
27
28
  onClick: t,
28
29
  variant: "tertiary",
29
30
  width: "100%",
30
- children: a ?? "Cancel"
31
+ children: d ?? "Cancel"
31
32
  }
32
33
  ) : void 0,
33
- /* @__PURE__ */ m(
34
+ /* @__PURE__ */ i(
34
35
  n,
35
36
  {
36
- disabled: e,
37
- id: i,
37
+ disabled: a,
38
+ id: o,
38
39
  justify: "center",
39
- onClick: o ? void 0 : r,
40
- type: o ? "submit" : "button",
40
+ onClick: m ? void 0 : r,
41
+ type: m ? "submit" : "button",
41
42
  variant: "primary",
42
43
  width: "100%",
43
- children: d ?? "Confirm"
44
+ children: l ?? "Confirm"
44
45
  }
45
46
  )
46
47
  ]
47
48
  }
48
49
  );
50
+ return c ? /* @__PURE__ */ i(
51
+ p,
52
+ {
53
+ bgColor: e.palette.white,
54
+ borderTop: `1px solid ${e.palette.gray[200]}`,
55
+ bottom: "0",
56
+ id: "sticky-footer",
57
+ pb: 1.25,
58
+ position: "sticky",
59
+ px: 1.25,
60
+ children: s
61
+ }
62
+ ) : s;
49
63
  };
50
64
  export {
51
- u as ModalConfirm
65
+ j as ModalConfirm
52
66
  };
@@ -111,6 +111,7 @@ interface IModalProps extends Omit<IModalHeaderProps, "modalRef">, IModalFooterP
111
111
  * @property { string } [id] - The id of the confirm button.
112
112
  * @property { Function } [onCancel] - The function to call when the cancel button is clicked.
113
113
  * @property { "submit" | Function } [onConfirm] - The function to call when the confirm button is clicked.
114
+ * @property { boolean } [sticky] - Whether the buttons stay at the bottom while the content scrolls.
114
115
  * @property { string } [txtCancel] - The text of the cancel button.
115
116
  * @property { React.ReactNode | string } [txtConfirm] - The text of the confirm button.
116
117
  */
@@ -119,6 +120,7 @@ interface IModalConfirmProps {
119
120
  id?: string;
120
121
  onCancel?: () => void;
121
122
  onConfirm?: "submit" | (() => void);
123
+ sticky?: boolean;
122
124
  txtCancel?: string;
123
125
  txtConfirm?: React.ReactNode | string;
124
126
  }
package/package.json CHANGED
@@ -135,5 +135,5 @@
135
135
  "./dist/index.js"
136
136
  ],
137
137
  "typings": "./dist/index.d.ts",
138
- "version": "10.1.0"
138
+ "version": "10.3.0"
139
139
  }