@coveord/plasma-mantine 54.1.0 → 54.1.2
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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +34 -34
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/action-icon/ActionIcon.d.ts +10 -0
- package/dist/cjs/components/action-icon/ActionIcon.d.ts.map +1 -1
- package/dist/cjs/components/button/Button.d.ts +10 -0
- package/dist/cjs/components/button/Button.d.ts.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirmTarget.d.ts +10 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmTarget.d.ts.map +1 -1
- package/dist/cjs/components/prompt/Prompt.context.d.ts +12 -0
- package/dist/cjs/components/prompt/Prompt.context.d.ts.map +1 -0
- package/dist/cjs/components/prompt/Prompt.context.js +24 -0
- package/dist/cjs/components/prompt/Prompt.context.js.map +1 -0
- package/dist/cjs/components/prompt/Prompt.d.ts +37 -10
- package/dist/cjs/components/prompt/Prompt.d.ts.map +1 -1
- package/dist/cjs/components/prompt/Prompt.js +95 -27
- package/dist/cjs/components/prompt/Prompt.js.map +1 -1
- package/dist/cjs/components/prompt/Prompt.module.css +20 -30
- package/dist/cjs/components/prompt/PromptCancelButton.d.ts +18 -0
- package/dist/cjs/components/prompt/PromptCancelButton.d.ts.map +1 -0
- package/dist/cjs/components/prompt/PromptCancelButton.js +39 -0
- package/dist/cjs/components/prompt/PromptCancelButton.js.map +1 -0
- package/dist/cjs/components/prompt/PromptConfirmButton.d.ts +18 -0
- package/dist/cjs/components/prompt/PromptConfirmButton.d.ts.map +1 -0
- package/dist/cjs/components/prompt/PromptConfirmButton.js +46 -0
- package/dist/cjs/components/prompt/PromptConfirmButton.js.map +1 -0
- package/dist/cjs/components/prompt/PromptFooter.js +1 -2
- package/dist/cjs/components/prompt/PromptFooter.js.map +1 -1
- package/dist/cjs/components/prompt/icons/critical.svg +29 -0
- package/dist/cjs/components/prompt/icons/info.svg +27 -0
- package/dist/cjs/components/prompt/icons/success.svg +27 -0
- package/dist/cjs/components/prompt/icons/warning.svg +27 -0
- package/dist/cjs/components/table/Table.d.ts +6 -0
- package/dist/cjs/components/table/Table.d.ts.map +1 -1
- package/dist/cjs/components/table/Table.js +1 -1
- package/dist/cjs/components/table/Table.js.map +1 -1
- package/dist/cjs/components/table/table-actions/TableActionItem.d.ts +6 -0
- package/dist/cjs/components/table/table-actions/TableActionItem.d.ts.map +1 -1
- package/dist/cjs/theme/Theme.d.ts.map +1 -1
- package/dist/cjs/theme/Theme.js.map +1 -1
- package/dist/cjs/types/svg/index.d.js +3 -0
- package/dist/cjs/types/svg/index.d.js.map +1 -0
- package/dist/esm/components/action-icon/ActionIcon.d.ts +10 -0
- package/dist/esm/components/action-icon/ActionIcon.d.ts.map +1 -1
- package/dist/esm/components/button/Button.d.ts +10 -0
- package/dist/esm/components/button/Button.d.ts.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirmTarget.d.ts +10 -0
- package/dist/esm/components/inline-confirm/InlineConfirmTarget.d.ts.map +1 -1
- package/dist/esm/components/prompt/Prompt.context.d.ts +12 -0
- package/dist/esm/components/prompt/Prompt.context.d.ts.map +1 -0
- package/dist/esm/components/prompt/Prompt.context.js +4 -0
- package/dist/esm/components/prompt/Prompt.context.js.map +1 -0
- package/dist/esm/components/prompt/Prompt.d.ts +37 -10
- package/dist/esm/components/prompt/Prompt.d.ts.map +1 -1
- package/dist/esm/components/prompt/Prompt.js +92 -26
- package/dist/esm/components/prompt/Prompt.js.map +1 -1
- package/dist/esm/components/prompt/Prompt.module.css +20 -30
- package/dist/esm/components/prompt/PromptCancelButton.d.ts +18 -0
- package/dist/esm/components/prompt/PromptCancelButton.d.ts.map +1 -0
- package/dist/esm/components/prompt/PromptCancelButton.js +22 -0
- package/dist/esm/components/prompt/PromptCancelButton.js.map +1 -0
- package/dist/esm/components/prompt/PromptConfirmButton.d.ts +18 -0
- package/dist/esm/components/prompt/PromptConfirmButton.d.ts.map +1 -0
- package/dist/esm/components/prompt/PromptConfirmButton.js +29 -0
- package/dist/esm/components/prompt/PromptConfirmButton.js.map +1 -0
- package/dist/esm/components/prompt/PromptFooter.js +1 -2
- package/dist/esm/components/prompt/PromptFooter.js.map +1 -1
- package/dist/esm/components/prompt/icons/critical.svg +29 -0
- package/dist/esm/components/prompt/icons/info.svg +27 -0
- package/dist/esm/components/prompt/icons/success.svg +27 -0
- package/dist/esm/components/prompt/icons/warning.svg +27 -0
- package/dist/esm/components/table/Table.d.ts +6 -0
- package/dist/esm/components/table/Table.d.ts.map +1 -1
- package/dist/esm/components/table/Table.js +1 -1
- package/dist/esm/components/table/Table.js.map +1 -1
- package/dist/esm/components/table/table-actions/TableActionItem.d.ts +6 -0
- package/dist/esm/components/table/table-actions/TableActionItem.d.ts.map +1 -1
- package/dist/esm/theme/Theme.d.ts.map +1 -1
- package/dist/esm/theme/Theme.js +1 -1
- package/dist/esm/theme/Theme.js.map +1 -1
- package/dist/esm/types/svg/index.d.js +2 -0
- package/dist/esm/types/svg/index.d.js.map +1 -0
- package/package.json +12 -12
- package/src/components/prompt/Prompt.context.ts +11 -0
- package/src/components/prompt/Prompt.module.css +20 -30
- package/src/components/prompt/Prompt.tsx +106 -23
- package/src/components/prompt/PromptCancelButton.tsx +33 -0
- package/src/components/prompt/PromptConfirmButton.tsx +42 -0
- package/src/components/prompt/PromptFooter.tsx +1 -1
- package/src/components/prompt/__tests__/Prompt.spec.tsx +20 -2
- package/src/components/prompt/icons/critical.svg +29 -0
- package/src/components/prompt/icons/info.svg +27 -0
- package/src/components/prompt/icons/success.svg +27 -0
- package/src/components/prompt/icons/warning.svg +27 -0
- package/src/components/table/Table.tsx +1 -1
- package/src/theme/Theme.tsx +1 -1
- package/src/types/svg/index.d.ts +4 -0
|
@@ -4,7 +4,7 @@ import {Prompt} from '../Prompt';
|
|
|
4
4
|
describe('Prompt', () => {
|
|
5
5
|
it('displays the title, body and close button', () => {
|
|
6
6
|
render(
|
|
7
|
-
<Prompt
|
|
7
|
+
<Prompt opened onClose={vi.fn()} title="title modal">
|
|
8
8
|
content modal
|
|
9
9
|
<Prompt.Footer>footer content</Prompt.Footer>
|
|
10
10
|
</Prompt>,
|
|
@@ -18,7 +18,7 @@ describe('Prompt', () => {
|
|
|
18
18
|
it('calls onClose when clicking on the close button', () => {
|
|
19
19
|
const onClose = vi.fn();
|
|
20
20
|
render(
|
|
21
|
-
<Prompt
|
|
21
|
+
<Prompt opened onClose={onClose} title="title modal">
|
|
22
22
|
content modal
|
|
23
23
|
</Prompt>,
|
|
24
24
|
);
|
|
@@ -26,4 +26,22 @@ describe('Prompt', () => {
|
|
|
26
26
|
screen.getByRole('button').click();
|
|
27
27
|
expect(onClose).toHaveBeenCalledTimes(1);
|
|
28
28
|
});
|
|
29
|
+
|
|
30
|
+
it('display an icon', () => {
|
|
31
|
+
render(
|
|
32
|
+
<Prompt opened onClose={vi.fn()} title="title modal">
|
|
33
|
+
content modal
|
|
34
|
+
</Prompt>,
|
|
35
|
+
);
|
|
36
|
+
expect(screen.getByRole('presentation')).toBeVisible();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('does not display the icon when the icon prop is null', () => {
|
|
40
|
+
render(
|
|
41
|
+
<Prompt opened onClose={vi.fn()} title="title modal" icon={null}>
|
|
42
|
+
content modal
|
|
43
|
+
</Prompt>,
|
|
44
|
+
);
|
|
45
|
+
expect(screen.queryByRole('presentation')).not.toBeInTheDocument();
|
|
46
|
+
});
|
|
29
47
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 88 90">
|
|
2
|
+
<g filter="url(#critical-icon-a)">
|
|
3
|
+
<path fill="url(#critical-icon-b)" d="M54.217 15c1.155 0 2.257.489 3.032 1.346l12.694 14.031A4.089 4.089 0 0 1 71 33.121v18.856c0 .974-.348 1.916-.98 2.656L57.254 69.568A4.089 4.089 0 0 1 54.147 71H32.132a4.089 4.089 0 0 1-3.081-1.401L16.007 54.64A4.09 4.09 0 0 1 15 51.953V33.144c0-1.028.387-2.018 1.084-2.773l12.974-14.055A4.089 4.089 0 0 1 32.063 15h22.154Z"/>
|
|
4
|
+
<path stroke="url(#critical-icon-c)" stroke-linecap="round" d="M54.217 15.5a3.59 3.59 0 0 1 2.661 1.181l12.695 14.032c.597.66.927 1.518.927 2.408v18.856c0 .855-.305 1.681-.86 2.331L56.874 69.243a3.589 3.589 0 0 1-2.728 1.257H32.132a3.59 3.59 0 0 1-2.705-1.23L16.384 54.312a3.589 3.589 0 0 1-.884-2.358v-18.81c0-.902.34-1.771.952-2.434l12.974-14.055a3.589 3.589 0 0 1 2.637-1.155h22.154Z"/>
|
|
5
|
+
</g>
|
|
6
|
+
<path stroke="#FFD7D3" stroke-linecap="round" d="M44 51.91v-28"/>
|
|
7
|
+
<path stroke="#FFD7D3" stroke-linecap="round" stroke-linejoin="round" d="M44 60.088v2"/>
|
|
8
|
+
<defs>
|
|
9
|
+
<linearGradient id="critical-icon-b" x1="23" x2="97" y1="-9" y2="116.5" gradientUnits="userSpaceOnUse">
|
|
10
|
+
<stop stop-color="#FB8E85"/>
|
|
11
|
+
<stop offset=".314" stop-color="#E03729"/>
|
|
12
|
+
<stop offset="1" stop-color="#A11409"/>
|
|
13
|
+
</linearGradient>
|
|
14
|
+
<linearGradient id="critical-icon-c" x1="29.5" x2="43" y1="17" y2="71" gradientUnits="userSpaceOnUse">
|
|
15
|
+
<stop stop-color="#A11409"/>
|
|
16
|
+
<stop offset="1" stop-color="#CD2113"/>
|
|
17
|
+
</linearGradient>
|
|
18
|
+
<filter id="critical-icon-a" width="83.754" height="83.754" x="1.123" y="6.079" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
|
|
19
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
20
|
+
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
|
21
|
+
<feOffset dy="4.956"/>
|
|
22
|
+
<feGaussianBlur stdDeviation="6.939"/>
|
|
23
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
24
|
+
<feColorMatrix values="0 0 0 0 0.879167 0 0 0 0 0.215764 0 0 0 0 0.161181 0 0 0 0.37 0"/>
|
|
25
|
+
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_14620_3737"/>
|
|
26
|
+
<feBlend in="SourceGraphic" in2="effect1_dropShadow_14620_3737" result="shape"/>
|
|
27
|
+
</filter>
|
|
28
|
+
</defs>
|
|
29
|
+
</svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 88 88">
|
|
2
|
+
<g filter="url(#info-icon-a)">
|
|
3
|
+
<circle cx="44" cy="44" r="28" fill="url(#info-icon-b)"/>
|
|
4
|
+
<circle cx="44" cy="44" r="27.5" stroke="url(#info-icon-c)" stroke-linecap="round"/>
|
|
5
|
+
</g>
|
|
6
|
+
<path stroke="#F5F6FF" stroke-linecap="round" d="M44 57V35h-3m3 22h-4m4 0h4m-4-26v-1"/>
|
|
7
|
+
<defs>
|
|
8
|
+
<linearGradient id="info-icon-b" x1="34.308" x2="55.308" y1="12.231" y2="78.462" gradientUnits="userSpaceOnUse">
|
|
9
|
+
<stop stop-color="#8787DB"/>
|
|
10
|
+
<stop offset="1" stop-color="#525296"/>
|
|
11
|
+
</linearGradient>
|
|
12
|
+
<linearGradient id="info-icon-c" x1="56.385" x2="44" y1="79" y2="7" gradientUnits="userSpaceOnUse">
|
|
13
|
+
<stop stop-color="#AEB0F1"/>
|
|
14
|
+
<stop offset="1" stop-color="#525296"/>
|
|
15
|
+
</linearGradient>
|
|
16
|
+
<filter id="info-icon-a" width="70" height="70" x="9" y="13" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
|
|
17
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
18
|
+
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
|
19
|
+
<feOffset dy="4"/>
|
|
20
|
+
<feGaussianBlur stdDeviation="3.5"/>
|
|
21
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
22
|
+
<feColorMatrix values="0 0 0 0 0.420278 0 0 0 0 0.420278 0 0 0 0 0.741667 0 0 0 0.38 0"/>
|
|
23
|
+
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_14620_2221"/>
|
|
24
|
+
<feBlend in="SourceGraphic" in2="effect1_dropShadow_14620_2221" result="shape"/>
|
|
25
|
+
</filter>
|
|
26
|
+
</defs>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 88 88">
|
|
2
|
+
<g filter="url(#success-icon-a)">
|
|
3
|
+
<circle cx="44" cy="44" r="28" fill="url(#success-icon-b)"/>
|
|
4
|
+
<circle cx="44" cy="44" r="27.5" stroke="url(#success-icon-c)" stroke-linecap="round"/>
|
|
5
|
+
</g>
|
|
6
|
+
<path stroke="#F2FFF9" stroke-linecap="round" stroke-linejoin="round" d="m30.571 47 7.858 7.858L59 34.286" opacity=".61"/>
|
|
7
|
+
<defs>
|
|
8
|
+
<linearGradient id="success-icon-b" x1="35.923" x2="74.692" y1="11.154" y2="115.615" gradientUnits="userSpaceOnUse">
|
|
9
|
+
<stop stop-color="#12A344"/>
|
|
10
|
+
<stop offset="1" stop-color="#004A20"/>
|
|
11
|
+
</linearGradient>
|
|
12
|
+
<linearGradient id="success-icon-c" x1="16" x2="58" y1="-48" y2="93.5" gradientUnits="userSpaceOnUse">
|
|
13
|
+
<stop stop-color="#004A20"/>
|
|
14
|
+
<stop offset=".762" stop-color="#12A344"/>
|
|
15
|
+
</linearGradient>
|
|
16
|
+
<filter id="success-icon-a" width="78" height="78" x="5" y="9" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
|
|
17
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
18
|
+
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
|
19
|
+
<feOffset dy="4"/>
|
|
20
|
+
<feGaussianBlur stdDeviation="5.5"/>
|
|
21
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
22
|
+
<feColorMatrix values="0 0 0 0 0.0717188 0 0 0 0 0.6375 0 0 0 0 0.266536 0 0 0 0.43 0"/>
|
|
23
|
+
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_14620_10466"/>
|
|
24
|
+
<feBlend in="SourceGraphic" in2="effect1_dropShadow_14620_10466" result="shape"/>
|
|
25
|
+
</filter>
|
|
26
|
+
</defs>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 88 88">
|
|
2
|
+
<g filter="url(#warning-icon-a)">
|
|
3
|
+
<path fill="url(#warning-icon-b)" d="M38.827 17.951c1.795-3.383 6.643-3.383 8.438 0L70.37 61.495c1.688 3.181-.618 7.015-4.22 7.015H19.942c-3.6 0-5.907-3.834-4.219-7.015L38.827 17.95Z"/>
|
|
4
|
+
<path stroke="url(#warning-icon-c)" stroke-linecap="round" d="M39.269 18.186c1.607-3.03 5.947-3.03 7.555 0l23.104 43.543c1.511 2.848-.553 6.28-3.777 6.28H19.94c-3.224 0-5.288-3.432-3.777-6.28l23.105-43.543Z"/>
|
|
5
|
+
</g>
|
|
6
|
+
<path stroke="#493B08" stroke-linecap="round" d="M43 50.986v-22M43 58.151v2"/>
|
|
7
|
+
<defs>
|
|
8
|
+
<linearGradient id="warning-icon-b" x1="74.046" x2="37.546" y1="68.839" y2="4.839" gradientUnits="userSpaceOnUse">
|
|
9
|
+
<stop stop-color="#E2B104"/>
|
|
10
|
+
<stop offset="1" stop-color="#FFE300"/>
|
|
11
|
+
</linearGradient>
|
|
12
|
+
<linearGradient id="warning-icon-c" x1="29" x2="51" y1="10" y2="72" gradientUnits="userSpaceOnUse">
|
|
13
|
+
<stop stop-color="#E2B104"/>
|
|
14
|
+
<stop offset="1" stop-color="#F5D029"/>
|
|
15
|
+
</linearGradient>
|
|
16
|
+
<filter id="warning-icon-a" width="73.775" height="71.096" x="6.158" y="10.414" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
|
|
17
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
18
|
+
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
|
19
|
+
<feOffset dy="4"/>
|
|
20
|
+
<feGaussianBlur stdDeviation="4.5"/>
|
|
21
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
22
|
+
<feColorMatrix values="0 0 0 0 0.8875 0 0 0 0 0.695504 0 0 0 0 0.0147917 0 0 0 0.47 0"/>
|
|
23
|
+
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_14620_10171"/>
|
|
24
|
+
<feBlend in="SourceGraphic" in2="effect1_dropShadow_14620_10171" result="shape"/>
|
|
25
|
+
</filter>
|
|
26
|
+
</defs>
|
|
27
|
+
</svg>
|
|
@@ -216,7 +216,7 @@ export const Table = <T,>(props: TableProps<T> & {ref?: ForwardedRef<HTMLDivElem
|
|
|
216
216
|
const containerRef = useRef<HTMLDivElement>();
|
|
217
217
|
useClickOutside(
|
|
218
218
|
() => {
|
|
219
|
-
if (!store.multiRowSelectionEnabled) {
|
|
219
|
+
if (!store.multiRowSelectionEnabled && store.getSelectedRows().length > 0) {
|
|
220
220
|
store.clearRowSelection();
|
|
221
221
|
}
|
|
222
222
|
},
|
package/src/theme/Theme.tsx
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
ColorSwatch,
|
|
21
21
|
Combobox,
|
|
22
22
|
ComboboxSearch,
|
|
23
|
+
createTheme,
|
|
23
24
|
Divider,
|
|
24
25
|
Input,
|
|
25
26
|
InputWrapper,
|
|
@@ -43,7 +44,6 @@ import {
|
|
|
43
44
|
Text,
|
|
44
45
|
TextInput,
|
|
45
46
|
Tooltip,
|
|
46
|
-
createTheme,
|
|
47
47
|
} from '@mantine/core';
|
|
48
48
|
import {DatePicker} from '@mantine/dates';
|
|
49
49
|
import ActionIconClasses from '../styles/ActionIcon.module.css';
|