doom-design-system 0.1.7 → 0.1.8
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/README.md +23 -20
- package/dist/DesignSystemProvider.d.ts +1 -0
- package/dist/DesignSystemProvider.js +3 -4
- package/dist/components/Accordion/Accordion.js +5 -63
- package/dist/components/Accordion/Accordion.module.css +69 -0
- package/dist/components/ActionRow/ActionRow.js +3 -28
- package/dist/components/ActionRow/ActionRow.module.css +24 -0
- package/dist/components/Alert/Alert.js +3 -58
- package/dist/components/Alert/Alert.module.css +77 -0
- package/dist/components/Avatar/Avatar.js +3 -45
- package/dist/components/Avatar/Avatar.module.css +67 -0
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +4 -42
- package/dist/components/Badge/Badge.module.css +31 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +6 -38
- package/dist/components/Breadcrumbs/Breadcrumbs.module.css +34 -0
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +5 -129
- package/dist/components/Button/Button.module.css +112 -0
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +4 -13
- package/dist/components/Card/Card.module.css +8 -0
- package/dist/components/Drawer/Drawer.js +5 -71
- package/dist/components/Drawer/Drawer.module.css +75 -0
- package/dist/components/Dropdown/Dropdown.d.ts +2 -1
- package/dist/components/Dropdown/Dropdown.js +6 -39
- package/dist/components/Dropdown/Dropdown.module.css +33 -0
- package/dist/components/Form/Form.d.ts +4 -9
- package/dist/components/Form/Form.js +9 -43
- package/dist/components/Form/Form.module.css +41 -0
- package/dist/components/Input/Input.js +3 -59
- package/dist/components/Input/Input.module.css +86 -0
- package/dist/components/Label/Label.d.ts +1 -1
- package/dist/components/Label/Label.js +4 -23
- package/dist/components/Label/Label.module.css +16 -0
- package/dist/components/Layout/Layout.d.ts +2 -2
- package/dist/components/Layout/Layout.js +5 -20
- package/dist/components/Layout/Layout.module.css +7 -0
- package/dist/components/Link/Link.d.ts +2 -1
- package/dist/components/Link/Link.js +4 -62
- package/dist/components/Link/Link.module.css +48 -0
- package/dist/components/Modal/Modal.js +9 -52
- package/dist/components/Modal/Modal.module.css +57 -0
- package/dist/components/Page/Page.js +3 -23
- package/dist/components/Page/Page.module.css +23 -0
- package/dist/components/Pagination/Pagination.js +4 -42
- package/dist/components/Pagination/Pagination.module.css +43 -0
- package/dist/components/Popover/Popover.js +21 -26
- package/dist/components/Popover/Popover.module.css +19 -0
- package/dist/components/ProgressBar/ProgressBar.js +7 -37
- package/dist/components/ProgressBar/ProgressBar.module.css +31 -0
- package/dist/components/RadioGroup/RadioGroup.js +4 -79
- package/dist/components/RadioGroup/RadioGroup.module.css +81 -0
- package/dist/components/Select/Select.js +6 -80
- package/dist/components/Select/Select.module.css +89 -0
- package/dist/components/Sheet/Sheet.js +5 -56
- package/dist/components/Sheet/Sheet.module.css +64 -0
- package/dist/components/Skeleton/Skeleton.js +4 -49
- package/dist/components/Skeleton/Skeleton.module.css +29 -0
- package/dist/components/Slider/Slider.js +3 -140
- package/dist/components/Slider/Slider.module.css +130 -0
- package/dist/components/SplitButton/SplitButton.d.ts +2 -1
- package/dist/components/SplitButton/SplitButton.js +6 -82
- package/dist/components/SplitButton/SplitButton.module.css +79 -0
- package/dist/components/Switch/Switch.js +3 -54
- package/dist/components/Switch/Switch.module.css +64 -0
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.js +13 -109
- package/dist/components/Table/Table.module.css +111 -0
- package/dist/components/Tabs/Tabs.js +7 -56
- package/dist/components/Tabs/Tabs.module.css +65 -0
- package/dist/components/Text/Text.js +4 -106
- package/dist/components/Text/Text.module.css +123 -0
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/Textarea/Textarea.js +16 -20
- package/dist/components/Textarea/Textarea.module.css +23 -0
- package/dist/components/Toast/Toast.js +3 -67
- package/dist/components/Toast/Toast.module.css +87 -0
- package/dist/components/Tooltip/Tooltip.js +3 -19
- package/dist/components/Tooltip/Tooltip.module.css +17 -0
- package/dist/styles/globals.css +999 -0
- package/dist/styles/themes/ThemeProvider.js +4 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -5
- package/dist/styles/index.d.ts +0 -3
- package/dist/styles/index.js +0 -3
- package/dist/styles/mixins.d.ts +0 -3
- package/dist/styles/mixins.js +0 -25
- package/dist/styles/reset.d.ts +0 -1
- package/dist/styles/reset.js +0 -29
- package/dist/styles/theme.d.ts +0 -1
- package/dist/styles/theme.js +0 -11
- package/dist/styles/utilities.d.ts +0 -1
- package/dist/styles/utilities.js +0 -184
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
@keyframes slideIn {
|
|
2
|
+
from {
|
|
3
|
+
transform: translateX(100%);
|
|
4
|
+
opacity: 0;
|
|
5
|
+
}
|
|
6
|
+
to {
|
|
7
|
+
transform: translateX(0);
|
|
8
|
+
opacity: 1;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
@keyframes slideOut {
|
|
12
|
+
from {
|
|
13
|
+
transform: translateX(0);
|
|
14
|
+
opacity: 1;
|
|
15
|
+
}
|
|
16
|
+
to {
|
|
17
|
+
transform: translateX(100%);
|
|
18
|
+
opacity: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
.container {
|
|
22
|
+
position: fixed;
|
|
23
|
+
bottom: 2rem;
|
|
24
|
+
right: 2rem;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: 1rem;
|
|
28
|
+
z-index: var(--z-tooltip);
|
|
29
|
+
pointer-events: none; /* Allow clicking through the container area */
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.toast {
|
|
33
|
+
min-width: 300px;
|
|
34
|
+
background: var(--card-bg);
|
|
35
|
+
border: var(--border-width) solid var(--card-border);
|
|
36
|
+
color: var(--foreground);
|
|
37
|
+
box-shadow: var(--shadow-hard);
|
|
38
|
+
padding: var(--spacing-md);
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 0.75rem;
|
|
42
|
+
animation: slideIn 0.3s ease-out forwards;
|
|
43
|
+
position: relative;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
pointer-events: auto; /* Re-enable pointer events for the toast itself */
|
|
46
|
+
border-radius: var(--radius);
|
|
47
|
+
}
|
|
48
|
+
.toast.exiting {
|
|
49
|
+
animation: slideOut 0.3s ease-in forwards;
|
|
50
|
+
}
|
|
51
|
+
.toast {
|
|
52
|
+
/* Left Accent Bar */
|
|
53
|
+
}
|
|
54
|
+
.toast::before {
|
|
55
|
+
content: "";
|
|
56
|
+
position: absolute;
|
|
57
|
+
left: 0;
|
|
58
|
+
top: 0;
|
|
59
|
+
bottom: 0;
|
|
60
|
+
width: 6px;
|
|
61
|
+
}
|
|
62
|
+
.toast.success::before {
|
|
63
|
+
background-color: var(--success);
|
|
64
|
+
}
|
|
65
|
+
.toast.error::before {
|
|
66
|
+
background-color: var(--error);
|
|
67
|
+
}
|
|
68
|
+
.toast.warning::before {
|
|
69
|
+
background-color: var(--warning);
|
|
70
|
+
}
|
|
71
|
+
.toast.info::before {
|
|
72
|
+
background-color: var(--primary);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.closeButton {
|
|
76
|
+
background: none;
|
|
77
|
+
border: none;
|
|
78
|
+
margin-left: auto;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
font-size: 1.25rem;
|
|
81
|
+
color: var(--foreground);
|
|
82
|
+
opacity: 0.5;
|
|
83
|
+
transition: opacity 0.2s;
|
|
84
|
+
}
|
|
85
|
+
.closeButton:hover {
|
|
86
|
+
opacity: 1;
|
|
87
|
+
}
|
|
@@ -1,24 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Popover } from '../Popover/Popover';
|
|
4
|
+
import styles from './Tooltip.module.css';
|
|
3
5
|
import { useState } from 'react';
|
|
4
|
-
import styled from '@emotion/styled';
|
|
5
|
-
import { Popover } from '../Popover';
|
|
6
|
-
const TooltipTriggerWrapper = styled.div `
|
|
7
|
-
display: inline-block;
|
|
8
|
-
cursor: help; /* Optional hint */
|
|
9
|
-
`;
|
|
10
|
-
const TooltipBody = styled.div `
|
|
11
|
-
padding: 0.5rem 0.75rem;
|
|
12
|
-
background-color: var(--foreground);
|
|
13
|
-
color: var(--background);
|
|
14
|
-
font-size: var(--text-sm);
|
|
15
|
-
font-weight: 500;
|
|
16
|
-
white-space: nowrap;
|
|
17
|
-
border-radius: var(--radius);
|
|
18
|
-
border: var(--border-width) solid var(--card-border);
|
|
19
|
-
box-shadow: var(--shadow-sm);
|
|
20
|
-
z-index: var(--z-tooltip);
|
|
21
|
-
`;
|
|
22
6
|
export function Tooltip({ content, children, delay = 200, placement = 'top' }) {
|
|
23
7
|
const [isVisible, setIsVisible] = useState(false);
|
|
24
8
|
const [timeoutId, setTimeoutId] = useState(null);
|
|
@@ -33,5 +17,5 @@ export function Tooltip({ content, children, delay = 200, placement = 'top' }) {
|
|
|
33
17
|
};
|
|
34
18
|
// Map simplified placement to Popover placement
|
|
35
19
|
const popoverPlacement = placement === 'top' ? 'top-center' : 'bottom-center';
|
|
36
|
-
return (_jsx(Popover, { isOpen: isVisible, onClose: hide, placement: popoverPlacement, offset: 8, trigger: _jsx(
|
|
20
|
+
return (_jsx(Popover, { isOpen: isVisible, onClose: hide, placement: popoverPlacement, offset: 8, trigger: _jsx("div", { className: styles.triggerWrapper, onMouseEnter: show, onMouseLeave: hide, onFocus: show, onBlur: hide, children: children }), content: _jsx("div", { className: styles.tooltipBody, role: "tooltip", children: content }) }));
|
|
37
21
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.triggerWrapper {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
cursor: help;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tooltipBody {
|
|
7
|
+
padding: 0.5rem 0.75rem;
|
|
8
|
+
background-color: var(--foreground);
|
|
9
|
+
color: var(--background);
|
|
10
|
+
font-size: var(--text-sm);
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
border-radius: var(--radius);
|
|
14
|
+
border: var(--border-width) solid var(--card-border);
|
|
15
|
+
box-shadow: var(--shadow-sm);
|
|
16
|
+
z-index: var(--z-tooltip);
|
|
17
|
+
}
|