@fluidattacks/design 10.4.0 → 11.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/components/@core/types.d.ts +2 -2
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.js +59 -54
- package/dist/components/drawer/types.d.ts +6 -0
- package/dist/components/form/index.js +58 -57
- package/dist/components/form/styles.d.ts +6 -2
- package/dist/components/form/styles.js +16 -12
- package/dist/components/form/types.d.ts +1 -1
- package/dist/components/icon/index.js +8 -6
- package/dist/components/icon/styles.d.ts +1 -0
- package/dist/components/icon/styles.js +17 -15
- package/dist/components/icon/types.d.ts +3 -0
- package/dist/components/modal/footer/index.js +12 -10
- package/dist/components/modal/index.js +55 -71
- package/dist/components/modal/index.stories.d.ts +13 -27
- package/dist/components/modal/modal-confirm/index.d.ts +1 -1
- package/dist/components/modal/modal-confirm/index.js +20 -34
- package/dist/components/modal/styles.js +60 -31
- package/dist/components/modal/types.d.ts +2 -4
- package/dist/components/table/table-column-toggle/index.js +1 -1
- package/dist/components/tabs/index.stories.d.ts +2 -4
- package/dist/components/tabs/styles.js +4 -4
- package/dist/components/tabs/types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -10,6 +10,8 @@ import { IIconModifiable, IMarginModifiable } from '../@core';
|
|
|
10
10
|
* @property {Function} [onClick] - Function handler for click event.
|
|
11
11
|
* @property {boolean} [disabled] - Show disabled icon state.
|
|
12
12
|
* @property {number} [rotation] - Rotation degrees to modify icon style.
|
|
13
|
+
* @property {string} [secondaryColor] - Color of a duotone icon's secondary layer.
|
|
14
|
+
* @property {number} [secondaryOpacity] - Opacity of a duotone icon's secondary layer.
|
|
13
15
|
*/
|
|
14
16
|
interface IIconWrapProps extends IIconModifiable, IMarginModifiable {
|
|
15
17
|
clickable?: boolean;
|
|
@@ -18,6 +20,7 @@ interface IIconWrapProps extends IIconModifiable, IMarginModifiable {
|
|
|
18
20
|
disabled?: boolean;
|
|
19
21
|
rotation?: number;
|
|
20
22
|
secondaryColor?: string;
|
|
23
|
+
secondaryOpacity?: number;
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
* Icon component props.
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { l as
|
|
2
|
+
import { l as C } from "../../../_virtual/lodash.js";
|
|
3
3
|
import { useCallback as l } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { useTheme as f } from "styled-components";
|
|
5
|
+
import { Footer as k } from "../styles.js";
|
|
5
6
|
import { Button as s } from "../../button/index.js";
|
|
6
|
-
import { Container as
|
|
7
|
+
import { Container as n } from "../../container/index.js";
|
|
7
8
|
const w = ({
|
|
8
9
|
alert: p,
|
|
9
10
|
modalRef: a,
|
|
10
11
|
confirmButton: i = void 0,
|
|
11
12
|
cancelButton: r = void 0
|
|
12
13
|
}) => {
|
|
13
|
-
const { close: o } = a,
|
|
14
|
+
const m = f(), { close: o } = a, t = l(() => {
|
|
14
15
|
r?.onClick && r.onClick(), o();
|
|
15
|
-
}, [r, o]),
|
|
16
|
+
}, [r, o]), h = l(() => {
|
|
16
17
|
i?.onClick && i.onClick(), o();
|
|
17
18
|
}, [i, o]);
|
|
18
19
|
return [i, r].some(
|
|
19
|
-
(
|
|
20
|
+
(x) => !C.isEmpty(x)
|
|
20
21
|
) ? /* @__PURE__ */ d(
|
|
21
|
-
|
|
22
|
+
n,
|
|
22
23
|
{
|
|
24
|
+
borderTop: `1px solid ${m.palette.gray[200]}`,
|
|
23
25
|
display: "flex",
|
|
24
26
|
flexDirection: "column",
|
|
25
27
|
gap: 0.625,
|
|
@@ -29,12 +31,12 @@ const w = ({
|
|
|
29
31
|
py: 1.25,
|
|
30
32
|
children: [
|
|
31
33
|
p,
|
|
32
|
-
/* @__PURE__ */ e(
|
|
34
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ d("div", { children: [
|
|
33
35
|
r && /* @__PURE__ */ e(
|
|
34
36
|
s,
|
|
35
37
|
{
|
|
36
38
|
id: r.id,
|
|
37
|
-
onClick:
|
|
39
|
+
onClick: t,
|
|
38
40
|
variant: i ? "tertiary" : "primary",
|
|
39
41
|
width: "100%",
|
|
40
42
|
children: r.text
|
|
@@ -44,7 +46,7 @@ const w = ({
|
|
|
44
46
|
s,
|
|
45
47
|
{
|
|
46
48
|
id: i.id,
|
|
47
|
-
onClick:
|
|
49
|
+
onClick: h,
|
|
48
50
|
variant: "primary",
|
|
49
51
|
width: "100%",
|
|
50
52
|
children: i.text
|
|
@@ -1,107 +1,91 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import o from "../../_virtual/lodash.js";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { Tabs as _ } from "../tabs/index.js";
|
|
3
|
+
import { useState as S, useRef as h, useEffect as T } from "react";
|
|
4
|
+
import { createPortal as F } from "react-dom";
|
|
5
|
+
import { Dialog as z } from "./dialog/index.js";
|
|
6
|
+
import { ModalFooter as E } from "./footer/index.js";
|
|
7
|
+
import { Header as k } from "./header/index.js";
|
|
8
|
+
import { ModalConfirm as ei } from "./modal-confirm/index.js";
|
|
9
|
+
import { ModalContainer as A, ModalContent as B, ImageContainer as D } from "./styles.js";
|
|
10
|
+
import { CloudImage as I } from "../cloud-image/index.js";
|
|
11
|
+
import { Container as $ } from "../container/index.js";
|
|
12
|
+
import { Tabs as w } from "../tabs/index.js";
|
|
14
13
|
import "../typography/heading/index.js";
|
|
15
14
|
import "../typography/span/index.js";
|
|
16
|
-
import { Text as
|
|
17
|
-
import { ColumnsModal as
|
|
18
|
-
const
|
|
19
|
-
_portal:
|
|
20
|
-
alert:
|
|
21
|
-
cancelButton:
|
|
22
|
-
children:
|
|
23
|
-
confirmButton:
|
|
15
|
+
import { Text as N } from "../typography/text/index.js";
|
|
16
|
+
import { ColumnsModal as ti } from "./columns-modal/index.js";
|
|
17
|
+
const R = ({
|
|
18
|
+
_portal: v = !0,
|
|
19
|
+
alert: x,
|
|
20
|
+
cancelButton: y = void 0,
|
|
21
|
+
children: n = void 0,
|
|
22
|
+
confirmButton: C = void 0,
|
|
24
23
|
content: i = void 0,
|
|
25
24
|
description: M = void 0,
|
|
26
25
|
dismissable: O = !0,
|
|
27
|
-
headerActions:
|
|
26
|
+
headerActions: b = void 0,
|
|
28
27
|
modalRef: e,
|
|
29
28
|
onClose: j = void 0,
|
|
30
29
|
tabItems: t = void 0,
|
|
31
|
-
title:
|
|
30
|
+
title: d = void 0,
|
|
32
31
|
size: H,
|
|
33
|
-
id:
|
|
32
|
+
id: l = "modal-container"
|
|
34
33
|
}) => {
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
if (m && !a.current &&
|
|
38
|
-
const
|
|
39
|
-
|
|
34
|
+
const [p, c] = S(void 0), s = h(null), a = h(!1), m = Array.isArray(t) && t.length > 0;
|
|
35
|
+
T(() => {
|
|
36
|
+
if (m && !a.current && s.current) {
|
|
37
|
+
const u = s.current.getBoundingClientRect().height;
|
|
38
|
+
u > 50 && (c(u), a.current = !0);
|
|
40
39
|
}
|
|
41
|
-
e.isOpen || (
|
|
40
|
+
e.isOpen || (c(void 0), a.current = !1);
|
|
42
41
|
}, [m, e.isOpen]);
|
|
43
|
-
const
|
|
44
|
-
|
|
42
|
+
const f = /* @__PURE__ */ r(z, { id: "modal-wrapper", label: e.name, children: /* @__PURE__ */ g(
|
|
43
|
+
A,
|
|
45
44
|
{
|
|
46
45
|
$size: H,
|
|
47
|
-
"data-testid":
|
|
46
|
+
"data-testid": l,
|
|
48
47
|
flexDirection: "column",
|
|
49
|
-
id:
|
|
50
|
-
ref: m ?
|
|
51
|
-
style: m &&
|
|
48
|
+
id: l,
|
|
49
|
+
ref: m ? s : void 0,
|
|
50
|
+
style: m && p ? { height: p } : void 0,
|
|
52
51
|
children: [
|
|
53
|
-
!o.isEmpty(
|
|
54
|
-
|
|
52
|
+
!o.isEmpty(d) && !o.isNil(d) && /* @__PURE__ */ r(
|
|
53
|
+
k,
|
|
55
54
|
{
|
|
56
55
|
description: M,
|
|
57
56
|
dismissable: O,
|
|
58
|
-
headerActions:
|
|
57
|
+
headerActions: b,
|
|
59
58
|
modalRef: e,
|
|
60
59
|
onClose: j,
|
|
61
|
-
title:
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
t && /* @__PURE__ */ r(
|
|
65
|
-
P,
|
|
66
|
-
{
|
|
67
|
-
borderTop: `1px solid ${f.palette.gray[300]}`,
|
|
68
|
-
display: "block",
|
|
69
|
-
mb: 1.25,
|
|
70
|
-
position: "sticky",
|
|
71
|
-
children: /* @__PURE__ */ r(_, { items: t })
|
|
72
|
-
}
|
|
73
|
-
),
|
|
74
|
-
(o.isObject(i) || l) && /* @__PURE__ */ v(
|
|
75
|
-
w,
|
|
76
|
-
{
|
|
77
|
-
style: S ? { borderBottom: `1px solid ${f.palette.gray[200]}` } : void 0,
|
|
78
|
-
children: [
|
|
79
|
-
l,
|
|
80
|
-
o.isObject(i) && o.isString(i.imageSrc) && /* @__PURE__ */ r(B, { $framed: i.imageFramed, children: /* @__PURE__ */ r(N, { alt: "modal-img", publicId: i.imageSrc }) }),
|
|
81
|
-
o.isObject(i) && o.isString(i.imageText) && /* @__PURE__ */ r(q, { size: "md", children: i.imageText })
|
|
82
|
-
]
|
|
60
|
+
title: d
|
|
83
61
|
}
|
|
84
62
|
),
|
|
63
|
+
t && /* @__PURE__ */ r($, { display: "block", position: "sticky", children: /* @__PURE__ */ r(w, { items: t }) }),
|
|
64
|
+
(o.isObject(i) || n) && /* @__PURE__ */ g(B, { children: [
|
|
65
|
+
n,
|
|
66
|
+
o.isObject(i) && o.isString(i.imageSrc) && /* @__PURE__ */ r(D, { $framed: i.imageFramed, children: /* @__PURE__ */ r(I, { alt: "modal-img", publicId: i.imageSrc }) }),
|
|
67
|
+
o.isObject(i) && o.isString(i.imageText) && /* @__PURE__ */ r(N, { size: "md", children: i.imageText })
|
|
68
|
+
] }),
|
|
85
69
|
/* @__PURE__ */ r(
|
|
86
|
-
|
|
70
|
+
E,
|
|
87
71
|
{
|
|
88
|
-
alert:
|
|
89
|
-
cancelButton:
|
|
90
|
-
confirmButton:
|
|
72
|
+
alert: x,
|
|
73
|
+
cancelButton: y,
|
|
74
|
+
confirmButton: C,
|
|
91
75
|
modalRef: e
|
|
92
76
|
}
|
|
93
77
|
)
|
|
94
78
|
]
|
|
95
79
|
}
|
|
96
80
|
) });
|
|
97
|
-
return
|
|
98
|
-
|
|
81
|
+
return v && e.isOpen ? F(
|
|
82
|
+
f,
|
|
99
83
|
document.getElementById("portals") ?? document.body
|
|
100
|
-
) : e.isOpen ?
|
|
84
|
+
) : e.isOpen ? f : null;
|
|
101
85
|
};
|
|
102
86
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
87
|
+
ti as ColumnsModal,
|
|
88
|
+
R as Modal,
|
|
89
|
+
ei as ModalConfirm,
|
|
90
|
+
E as ModalFooter
|
|
107
91
|
};
|
|
@@ -1,31 +1,17 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react-vite';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { IModalProps } from './types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
declare const
|
|
12
|
-
declare const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
declare const
|
|
16
|
-
id: string;
|
|
17
|
-
}>>;
|
|
18
|
-
declare const SingleAction: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IModalProps & {
|
|
19
|
-
id: string;
|
|
20
|
-
}>>;
|
|
21
|
-
declare const WithoutFooter: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IModalProps & {
|
|
22
|
-
id: string;
|
|
23
|
-
}>>;
|
|
24
|
-
declare const ImageModal: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IModalProps & {
|
|
25
|
-
id: string;
|
|
26
|
-
}>>;
|
|
27
|
-
declare const WithTabs: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IModalProps & {
|
|
28
|
-
id: string;
|
|
29
|
-
}>>;
|
|
4
|
+
type TContentExample = "Inputs" | "None" | "Text" | "Text with tags and alert";
|
|
5
|
+
interface IStoryProps extends IModalProps {
|
|
6
|
+
contentExample?: TContentExample;
|
|
7
|
+
footerAlert?: boolean;
|
|
8
|
+
id: string;
|
|
9
|
+
}
|
|
10
|
+
declare const config: Meta<IStoryProps>;
|
|
11
|
+
declare const Default: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IStoryProps>>;
|
|
12
|
+
declare const ImageModal: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IStoryProps>>;
|
|
13
|
+
declare const WithTabs: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IStoryProps>>;
|
|
14
|
+
declare const LongContent: StoryFn;
|
|
15
|
+
declare const LongForm: StoryFn;
|
|
30
16
|
export default config;
|
|
31
|
-
export { Default, ImageModal, WithTabs,
|
|
17
|
+
export { Default, ImageModal, WithTabs, LongContent, LongForm };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IModalConfirmProps } from '../types';
|
|
2
|
-
declare const ModalConfirm: ({ disabled, id, onCancel, onConfirm,
|
|
2
|
+
declare const ModalConfirm: ({ disabled, id, onCancel, onConfirm, txtCancel, txtConfirm, }: Readonly<IModalConfirmProps>) => JSX.Element;
|
|
3
3
|
export { ModalConfirm };
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useTheme as u } from "styled-components";
|
|
1
|
+
import { jsxs as s, jsx as m } from "react/jsx-runtime";
|
|
3
2
|
import { Button as n } from "../../button/index.js";
|
|
4
|
-
import { Container as
|
|
5
|
-
const
|
|
6
|
-
disabled:
|
|
7
|
-
id:
|
|
3
|
+
import { Container as c } from "../../container/index.js";
|
|
4
|
+
const u = ({
|
|
5
|
+
disabled: e,
|
|
6
|
+
id: i = "modal-confirm",
|
|
8
7
|
onCancel: t,
|
|
9
8
|
onConfirm: r = "submit",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
txtConfirm: l
|
|
9
|
+
txtCancel: a,
|
|
10
|
+
txtConfirm: d
|
|
13
11
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
12
|
+
const o = r === "submit";
|
|
13
|
+
return /* @__PURE__ */ s(
|
|
14
|
+
c,
|
|
16
15
|
{
|
|
17
16
|
display: "flex",
|
|
18
17
|
gap: 0.75,
|
|
@@ -20,47 +19,34 @@ const j = ({
|
|
|
20
19
|
maxWidth: t ? "392px" : "190px",
|
|
21
20
|
mt: 1.5,
|
|
22
21
|
children: [
|
|
23
|
-
t ? /* @__PURE__ */
|
|
22
|
+
t ? /* @__PURE__ */ m(
|
|
24
23
|
n,
|
|
25
24
|
{
|
|
26
|
-
id: `${
|
|
25
|
+
id: `${i}-cancel`,
|
|
27
26
|
justify: "center",
|
|
28
27
|
onClick: t,
|
|
29
28
|
variant: "tertiary",
|
|
30
29
|
width: "100%",
|
|
31
|
-
children:
|
|
30
|
+
children: a ?? "Cancel"
|
|
32
31
|
}
|
|
33
32
|
) : void 0,
|
|
34
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ m(
|
|
35
34
|
n,
|
|
36
35
|
{
|
|
37
|
-
disabled:
|
|
38
|
-
id:
|
|
36
|
+
disabled: e,
|
|
37
|
+
id: i,
|
|
39
38
|
justify: "center",
|
|
40
|
-
onClick:
|
|
41
|
-
type:
|
|
39
|
+
onClick: o ? void 0 : r,
|
|
40
|
+
type: o ? "submit" : "button",
|
|
42
41
|
variant: "primary",
|
|
43
42
|
width: "100%",
|
|
44
|
-
children:
|
|
43
|
+
children: d ?? "Confirm"
|
|
45
44
|
}
|
|
46
45
|
)
|
|
47
46
|
]
|
|
48
47
|
}
|
|
49
48
|
);
|
|
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;
|
|
63
49
|
};
|
|
64
50
|
export {
|
|
65
|
-
|
|
51
|
+
u as ModalConfirm
|
|
66
52
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { styled as a } from "styled-components";
|
|
2
|
-
import { variantBuilder as
|
|
3
|
-
import { Container as
|
|
4
|
-
|
|
2
|
+
import { variantBuilder as p } from "../@core/variants/utils.js";
|
|
3
|
+
import { Container as c } from "../container/index.js";
|
|
4
|
+
import { FormContent as g } from "../form/styles.js";
|
|
5
|
+
const { getVariant: l } = p(
|
|
5
6
|
(i) => ({
|
|
6
7
|
fixed: `
|
|
7
8
|
height: auto;
|
|
@@ -31,7 +32,7 @@ const { getVariant: r } = n(
|
|
|
31
32
|
}
|
|
32
33
|
`
|
|
33
34
|
})
|
|
34
|
-
),
|
|
35
|
+
), b = a.div.attrs({
|
|
35
36
|
className: "comp-modal fixed inset-0 overflow-auto"
|
|
36
37
|
})`
|
|
37
38
|
align-items: center;
|
|
@@ -39,7 +40,7 @@ const { getVariant: r } = n(
|
|
|
39
40
|
display: flex;
|
|
40
41
|
justify-content: center;
|
|
41
42
|
z-index: 99999;
|
|
42
|
-
`,
|
|
43
|
+
`, w = a(c)`
|
|
43
44
|
${({ theme: i, $size: o }) => `
|
|
44
45
|
background-color: ${i.palette.white};
|
|
45
46
|
border: 1px solid ${i.palette.gray[200]};
|
|
@@ -58,9 +59,12 @@ const { getVariant: r } = n(
|
|
|
58
59
|
margin-top: auto;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
${
|
|
62
|
+
${l(i, o)}
|
|
62
63
|
`}
|
|
63
|
-
`,
|
|
64
|
+
`, t = (i, o) => {
|
|
65
|
+
const n = i.spacing[1.5], r = `1px + ${i.spacing[1.25]}`, d = `${i.spacing[1.25]} + 2 * ${o} + 2px`, s = i.spacing[0.5];
|
|
66
|
+
return `calc(${n} + ${r} + ${d} + ${s})`;
|
|
67
|
+
}, m = a.div`
|
|
64
68
|
${({ theme: i }) => `
|
|
65
69
|
background-color: ${i.palette.white};
|
|
66
70
|
border-radius: 0 0 ${i.spacing[0.25]} ${i.spacing[0.25]};
|
|
@@ -68,32 +72,57 @@ const { getVariant: r } = n(
|
|
|
68
72
|
flex-direction: column;
|
|
69
73
|
flex-grow: 1;
|
|
70
74
|
overflow: hidden auto;
|
|
71
|
-
padding:
|
|
75
|
+
padding: ${i.spacing[1.25]} ${i.spacing[1.5]} ${i.spacing[1.5]};
|
|
72
76
|
scrollbar-color: ${i.palette.gray[600]} ${i.palette.gray[100]};
|
|
73
77
|
scroll-padding: ${i.spacing[0.5]};
|
|
74
78
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
&,
|
|
80
|
+
${g} {
|
|
81
|
+
> #footer {
|
|
82
|
+
background-color: ${i.palette.white};
|
|
83
|
+
border-top: 1px solid transparent;
|
|
84
|
+
border-image: linear-gradient(
|
|
85
|
+
${i.palette.gray[200]},
|
|
86
|
+
${i.palette.gray[200]}
|
|
87
|
+
)
|
|
88
|
+
1 / 1px 0 0 / 0 100vmax;
|
|
89
|
+
bottom: 0;
|
|
90
|
+
box-shadow: 0 0 0 100vmax ${i.palette.white};
|
|
91
|
+
clip-path: inset(0 -100vmax -100vmax);
|
|
92
|
+
padding-top: ${i.spacing[1.25]};
|
|
93
|
+
position: sticky;
|
|
94
|
+
z-index: 1;
|
|
95
|
+
}
|
|
79
96
|
|
|
80
|
-
>
|
|
81
|
-
|
|
97
|
+
> :has(+ #footer) {
|
|
98
|
+
margin-bottom: auto;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
> #footer:first-child {
|
|
102
|
+
margin-top: auto;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:has(> #footer) {
|
|
106
|
+
scroll-padding-bottom: ${t(i, i.spacing[0.625])};
|
|
107
|
+
|
|
108
|
+
@media screen and (max-width: ${i.breakpoints.mobile}) {
|
|
109
|
+
scroll-padding-bottom: ${t(i, i.spacing[1])};
|
|
110
|
+
}
|
|
82
111
|
}
|
|
83
112
|
}
|
|
84
113
|
|
|
85
|
-
&:has(
|
|
86
|
-
flex-direction:
|
|
114
|
+
&:has(form) {
|
|
115
|
+
flex-direction: unset;
|
|
87
116
|
overflow: hidden;
|
|
88
|
-
|
|
117
|
+
padding: ${i.spacing[1.25]} 0 0;
|
|
89
118
|
|
|
90
|
-
>
|
|
91
|
-
flex: 1
|
|
92
|
-
overflow-y: auto;
|
|
119
|
+
> form > div {
|
|
120
|
+
flex-grow: 1;
|
|
93
121
|
}
|
|
94
122
|
}
|
|
95
123
|
`}
|
|
96
|
-
`,
|
|
124
|
+
`, u = a.div`
|
|
125
|
+
border-bottom: 1px solid ${({ theme: i }) => i.palette.gray[200]};
|
|
97
126
|
border-radius: ${({ theme: i }) => `${i.spacing[0.25]} ${i.spacing[0.25]} 0 0`};
|
|
98
127
|
display: block;
|
|
99
128
|
overflow: unset;
|
|
@@ -104,9 +133,9 @@ const { getVariant: r } = n(
|
|
|
104
133
|
padding-bottom: ${({ theme: i }) => `${i.spacing[1.5]}`};
|
|
105
134
|
position: sticky;
|
|
106
135
|
z-index: 1;
|
|
107
|
-
`,
|
|
136
|
+
`, y = a.div.attrs({
|
|
108
137
|
className: "flex items-center justify-between"
|
|
109
|
-
})``,
|
|
138
|
+
})``, v = a.div`
|
|
110
139
|
${({ theme: i }) => `
|
|
111
140
|
border-radius: 0 0 ${i.spacing[0.25]} ${i.spacing[0.25]};
|
|
112
141
|
display: flex;
|
|
@@ -137,7 +166,7 @@ const { getVariant: r } = n(
|
|
|
137
166
|
margin-right: 0;
|
|
138
167
|
}
|
|
139
168
|
`}
|
|
140
|
-
`,
|
|
169
|
+
`, h = a.div`
|
|
141
170
|
img {
|
|
142
171
|
margin: 0 calc(-${({ theme: i }) => i.spacing[1.25]} - 1px)
|
|
143
172
|
${({ theme: i }) => i.spacing[1.25]};
|
|
@@ -155,11 +184,11 @@ const { getVariant: r } = n(
|
|
|
155
184
|
}
|
|
156
185
|
`;
|
|
157
186
|
export {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
187
|
+
v as Footer,
|
|
188
|
+
u as Header,
|
|
189
|
+
h as ImageContainer,
|
|
190
|
+
w as ModalContainer,
|
|
191
|
+
m as ModalContent,
|
|
192
|
+
b as ModalWrapper,
|
|
193
|
+
y as Title
|
|
165
194
|
};
|
|
@@ -54,12 +54,12 @@ interface IModalHeaderAction {
|
|
|
54
54
|
tooltip?: string;
|
|
55
55
|
visible?: boolean;
|
|
56
56
|
}
|
|
57
|
-
type TModalHeaderActions = readonly [IModalHeaderAction, IModalHeaderAction
|
|
57
|
+
type TModalHeaderActions = readonly [IModalHeaderAction, IModalHeaderAction] | readonly [IModalHeaderAction];
|
|
58
58
|
/**
|
|
59
59
|
* Modal header component props.
|
|
60
60
|
* @interface IModalHeaderProps
|
|
61
61
|
* @property { React.ReactNode | string } [description] - The description of the modal.
|
|
62
|
-
* @property { TModalHeaderActions } [headerActions] - Up to
|
|
62
|
+
* @property { TModalHeaderActions } [headerActions] - Up to two buttons shown left of the close button.
|
|
63
63
|
* @property { IUseModal } [modalRef] - The modal reference.
|
|
64
64
|
* @property { Function } [onClose] - The function to call when the modal is closed.
|
|
65
65
|
* @property { React.ReactNode | string } [title] - The title of the modal.
|
|
@@ -111,7 +111,6 @@ 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.
|
|
115
114
|
* @property { string } [txtCancel] - The text of the cancel button.
|
|
116
115
|
* @property { React.ReactNode | string } [txtConfirm] - The text of the confirm button.
|
|
117
116
|
*/
|
|
@@ -120,7 +119,6 @@ interface IModalConfirmProps {
|
|
|
120
119
|
id?: string;
|
|
121
120
|
onCancel?: () => void;
|
|
122
121
|
onConfirm?: "submit" | (() => void);
|
|
123
|
-
sticky?: boolean;
|
|
124
122
|
txtCancel?: string;
|
|
125
123
|
txtConfirm?: React.ReactNode | string;
|
|
126
124
|
}
|
|
@@ -4,8 +4,8 @@ import { useMemo as l, useCallback as c } from "react";
|
|
|
4
4
|
import { Button as f } from "../../button/index.js";
|
|
5
5
|
import "../../../_virtual/lodash.js";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
import "styled-components";
|
|
8
7
|
import { useColumnsModal as b } from "../../../hooks/use-columns-modal.js";
|
|
8
|
+
import "styled-components";
|
|
9
9
|
import "../../container/index.js";
|
|
10
10
|
import "../../icon-button/index.js";
|
|
11
11
|
import "../../typography/heading/index.js";
|
|
@@ -4,9 +4,7 @@ import { ITabsProps } from './types';
|
|
|
4
4
|
declare const config: Meta;
|
|
5
5
|
declare const Default: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<ITabsProps>>;
|
|
6
6
|
declare const WithTooltips: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<ITabsProps>>;
|
|
7
|
-
declare const
|
|
8
|
-
declare const SecondaryNavTabs: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<ITabsProps>>;
|
|
7
|
+
declare const SecondaryNav: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<ITabsProps>>;
|
|
9
8
|
declare const WithTag: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<ITabsProps>>;
|
|
10
|
-
|
|
11
|
-
export { Default, WithTooltips, SecondaryTabs, SecondaryNavTabs, WithTag, SecondaryTagTabs, };
|
|
9
|
+
export { Default, WithTooltips, SecondaryNav, WithTag };
|
|
12
10
|
export default config;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styled as o } from "styled-components";
|
|
2
|
-
const e = (a, r
|
|
2
|
+
const e = (a, r) => r ? `3px solid ${a.palette.primary[500]}` : "unset", n = (a, r) => `
|
|
3
3
|
background-color: ${r ? a.palette.gray[200] : a.palette.white};
|
|
4
4
|
border: 1px solid ${r ? a.palette.gray[300] : a.palette.gray[200]};
|
|
5
5
|
border-radius: ${a.spacing[0.25]};
|
|
@@ -13,11 +13,11 @@ const e = (a, r, t) => t ? r === "secondary" ? `3px solid ${a.palette.primary[10
|
|
|
13
13
|
font-weight: ${r ? a.typography.weight.bold : a.typography.weight.regular};
|
|
14
14
|
line-height: 20px;
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
16
|
+
`, g = o.div`
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: row;
|
|
19
19
|
gap: ${({ theme: a }) => a.spacing[0.25]};
|
|
20
|
-
border-bottom: ${({ theme: a, $borderButton: r
|
|
20
|
+
border-bottom: ${({ theme: a, $borderButton: r }) => e(a, r)};
|
|
21
21
|
align-items: center;
|
|
22
22
|
padding: ${({ theme: a }) => a.spacing[0.625]}
|
|
23
23
|
${({ theme: a }) => a.spacing[0.5]};
|
|
@@ -60,5 +60,5 @@ const e = (a, r, t) => t ? r === "secondary" ? `3px solid ${a.palette.primary[10
|
|
|
60
60
|
${({ theme: a, $borderButton: r, $variant: t }) => t === "secondaryNav" ? n(a, r) : ""}
|
|
61
61
|
`;
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
g as TabContainer
|
|
64
64
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { INotificationSignProps } from '../notification-sign/types';
|
|
2
|
-
type TVariant = "primary" | "
|
|
2
|
+
type TVariant = "primary" | "secondaryNav";
|
|
3
3
|
/**
|
|
4
4
|
* Individual tab props.
|
|
5
5
|
* @property {boolean} [isActive] - Set the current tab active.
|
|
@@ -46,7 +46,7 @@ interface ITabProps extends IFixedTabProps {
|
|
|
46
46
|
* @property {ITabProps[]} items - The lists of tabs to display.
|
|
47
47
|
* @property {boolean} [borders] - Whether to add borders to set of tabs.
|
|
48
48
|
* @property {boolean} [box] - Whether to add box container to set of tabs.
|
|
49
|
-
* @property {"primary" | "
|
|
49
|
+
* @property {"primary" | "secondaryNav"} [variant] - The variant of the tabs items.
|
|
50
50
|
*/
|
|
51
51
|
interface ITabsProps {
|
|
52
52
|
items: ITabProps[];
|
package/package.json
CHANGED