@yuva-devlab/ui 1.1.0 → 1.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.
- package/dist/common.css +158 -0
- package/dist/components/accordion/accordion.css +49 -0
- package/dist/components/alert/alert.css +63 -0
- package/dist/components/alert/alert.mdx +26 -0
- package/dist/components/alert-dialog/alert-dialog.css +84 -0
- package/dist/components/avatar/avatar.css +26 -0
- package/dist/components/avatar/avatar.mdx +18 -0
- package/dist/components/badge/badge.css +76 -0
- package/dist/components/badge/badge.mdx +24 -0
- package/dist/components/breadcrumb/breadcrumb.css +63 -0
- package/dist/components/button/button.css +106 -0
- package/dist/components/button/button.mdx +40 -0
- package/dist/components/card/card.css +30 -0
- package/dist/components/card/card.mdx +18 -0
- package/dist/components/carousel/carousel.css +67 -0
- package/dist/components/chart/chart.css +38 -0
- package/dist/components/checkbox/checkbox.css +27 -0
- package/dist/components/checkbox/checkbox.mdx +22 -0
- package/dist/components/command/command.css +125 -0
- package/dist/components/context-menu/context-menu.css +19 -0
- package/dist/components/date-picker/date-picker.css +30 -0
- package/dist/components/dialog/dialog.css +145 -0
- package/dist/components/dialog/dialog.mdx +18 -0
- package/dist/components/drawer/drawer.css +64 -0
- package/dist/components/dropdown-menu/dropdown-menu.css +82 -0
- package/dist/components/form/form.css +17 -0
- package/dist/components/hover-card/hover-card.css +23 -0
- package/dist/components/input/input.css +89 -0
- package/dist/components/input/input.mdx +30 -0
- package/dist/components/input-otp/input-otp.css +70 -0
- package/dist/components/label/label.css +9 -0
- package/dist/components/loading-state/loading-state.css +26 -0
- package/dist/components/menubar/menubar.css +36 -0
- package/dist/components/navigation-menu/navigation-menu.css +137 -0
- package/dist/components/pagination/pagination.css +43 -0
- package/dist/components/panel/panel.css +24 -0
- package/dist/components/popover/popover.css +17 -0
- package/dist/components/progress/progress.css +15 -0
- package/dist/components/progress/progress.mdx +18 -0
- package/dist/components/radio-group/radio-group.css +37 -0
- package/dist/components/resizable/resizable.css +67 -0
- package/dist/components/scroll-area/scroll-area.css +32 -0
- package/dist/components/searchable-select/searchable-select.css +128 -0
- package/dist/components/select/select.css +97 -0
- package/dist/components/select/select.mdx +18 -0
- package/dist/components/separator/separator.css +14 -0
- package/dist/components/sheet/sheet.css +83 -0
- package/dist/components/sidebar/sidebar.css +18 -0
- package/dist/components/skeleton/skeleton.css +5 -0
- package/dist/components/skeleton/skeleton.mdx +18 -0
- package/dist/components/slider/slider.css +37 -0
- package/dist/components/sonner/sonner.css +25 -0
- package/dist/components/sonner/sonner.mdx +22 -0
- package/dist/components/status-badge/status-badge.css +53 -0
- package/dist/components/status-badge/status-badge.mdx +24 -0
- package/dist/components/status-chip/status-chip.css +44 -0
- package/dist/components/switch/switch.css +45 -0
- package/dist/components/switch/switch.mdx +22 -0
- package/dist/components/table/table.css +46 -0
- package/dist/components/table/table.mdx +18 -0
- package/dist/components/tabs/tabs.css +46 -0
- package/dist/components/tabs/tabs.mdx +18 -0
- package/dist/components/textarea/textarea.css +30 -0
- package/dist/components/toggle/toggle.css +91 -0
- package/dist/components/tooltip/tooltip.css +17 -0
- package/dist/components.css +2618 -0
- package/dist/index.cjs +1447 -1836
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1819 -202
- package/dist/index.d.ts +1819 -202
- package/dist/index.js +1442 -1837
- package/dist/index.js.map +1 -1
- package/dist/preset.css +6 -157
- package/dist/root.css +1 -0
- package/dist/styles/common.css +158 -0
- package/dist/styles/components.css +2618 -0
- package/dist/styles/preset.css +6 -157
- package/dist/styles/root.css +1 -0
- package/dist/styles/styles.css +17 -5
- package/dist/styles/themes/finai.css +1 -114
- package/dist/styles/themes/orchestrai.css +1 -75
- package/dist/styles.css +17 -5
- package/dist/themes/finai.css +1 -114
- package/dist/themes/orchestrai.css +1 -75
- package/package.json +11 -5
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
|
|
2
|
+
import * as ButtonStories from "./button.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={ButtonStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Button
|
|
9
|
+
|
|
10
|
+
Buttons allow users to take actions, submit forms, and make choices with a single tap or click. Built with pure CSS tokens and accessible interactive states.
|
|
11
|
+
|
|
12
|
+
## Default
|
|
13
|
+
|
|
14
|
+
<Canvas of={ButtonStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Variants
|
|
17
|
+
|
|
18
|
+
Available in `default`, `secondary`, `outline`, `destructive`, `ghost`, and `link`.
|
|
19
|
+
|
|
20
|
+
<Canvas of={ButtonStories.AllVariants} />
|
|
21
|
+
|
|
22
|
+
## Sizes
|
|
23
|
+
|
|
24
|
+
Supports `sm`, `default`, `lg`, and `icon`.
|
|
25
|
+
|
|
26
|
+
<Canvas of={ButtonStories.AllSizes} />
|
|
27
|
+
|
|
28
|
+
## With Icons
|
|
29
|
+
|
|
30
|
+
Integrates seamlessly with Lucide or any SVG icon set.
|
|
31
|
+
|
|
32
|
+
<Canvas of={ButtonStories.WithIcons} />
|
|
33
|
+
|
|
34
|
+
## Disabled State
|
|
35
|
+
|
|
36
|
+
<Canvas of={ButtonStories.Disabled} />
|
|
37
|
+
|
|
38
|
+
## Component Properties
|
|
39
|
+
|
|
40
|
+
<Controls />
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.dl-card {
|
|
2
|
+
border-radius: var(--radius-lg, 0.5rem);
|
|
3
|
+
border: 1px solid var(--border);
|
|
4
|
+
background-color: var(--card);
|
|
5
|
+
color: var(--card-foreground);
|
|
6
|
+
box-shadow: 0 1px 3px rgb(0 0 0/0.08);
|
|
7
|
+
}
|
|
8
|
+
.dl-card__header {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 0.375rem;
|
|
12
|
+
padding: 1.5rem;
|
|
13
|
+
}
|
|
14
|
+
.dl-card__title {
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
line-height: 1;
|
|
17
|
+
letter-spacing: -0.01em;
|
|
18
|
+
}
|
|
19
|
+
.dl-card__desc {
|
|
20
|
+
font-size: 0.875rem;
|
|
21
|
+
color: var(--muted-foreground);
|
|
22
|
+
}
|
|
23
|
+
.dl-card__content {
|
|
24
|
+
padding: 1.5rem;
|
|
25
|
+
}
|
|
26
|
+
.dl-card__footer {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
padding: 1.5rem;
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
|
|
2
|
+
import * as CardStories from "./card.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={CardStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Card
|
|
9
|
+
|
|
10
|
+
Structured content container featuring header, title, description, content body, and action footer subcomponents.
|
|
11
|
+
|
|
12
|
+
## Default
|
|
13
|
+
|
|
14
|
+
<Canvas of={CardStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Component Properties
|
|
17
|
+
|
|
18
|
+
<Controls />
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
.dl-carousel {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dl-carousel-viewport {
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dl-carousel-track {
|
|
10
|
+
display: flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dl-carousel-track--horizontal {
|
|
14
|
+
margin-left: -1rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dl-carousel-track--vertical {
|
|
18
|
+
margin-top: -1rem;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dl-carousel-item {
|
|
23
|
+
min-width: 0;
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
flex-grow: 0;
|
|
26
|
+
flex-basis: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dl-carousel-item--horizontal {
|
|
30
|
+
padding-left: 1rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dl-carousel-item--vertical {
|
|
34
|
+
padding-top: 1rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dl-carousel-btn {
|
|
38
|
+
position: absolute;
|
|
39
|
+
border-radius: 9999px;
|
|
40
|
+
width: 2rem;
|
|
41
|
+
height: 2rem;
|
|
42
|
+
padding: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dl-carousel-btn--prev-horizontal {
|
|
46
|
+
left: -3rem;
|
|
47
|
+
top: 50%;
|
|
48
|
+
transform: translateY(-50%);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dl-carousel-btn--prev-vertical {
|
|
52
|
+
top: -3rem;
|
|
53
|
+
left: 50%;
|
|
54
|
+
transform: translateX(-50%) rotate(90deg);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dl-carousel-btn--next-horizontal {
|
|
58
|
+
right: -3rem;
|
|
59
|
+
top: 50%;
|
|
60
|
+
transform: translateY(-50%);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.dl-carousel-btn--next-vertical {
|
|
64
|
+
bottom: -3rem;
|
|
65
|
+
left: 50%;
|
|
66
|
+
transform: translateX(-50%) rotate(90deg);
|
|
67
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.dl-chart-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
aspect-ratio: 16 / 9;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
font-size: 0.75rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.dl-chart-container .recharts-cartesian-axis-tick text {
|
|
9
|
+
fill: var(--muted-foreground);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.dl-chart-container .recharts-cartesian-grid line[stroke="#ccc"] {
|
|
13
|
+
stroke: color-mix(in oklch, var(--border) 50%, transparent);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dl-chart-container .recharts-layer {
|
|
17
|
+
outline: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dl-chart-tooltip {
|
|
21
|
+
display: grid;
|
|
22
|
+
min-width: 8rem;
|
|
23
|
+
align-items: flex-start;
|
|
24
|
+
gap: 0.375rem;
|
|
25
|
+
border-radius: var(--radius-lg, 0.5rem);
|
|
26
|
+
border: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
|
|
27
|
+
background-color: var(--background);
|
|
28
|
+
padding: 0.375rem 0.625rem;
|
|
29
|
+
font-size: 0.75rem;
|
|
30
|
+
box-shadow: 0 8px 32px rgb(0 0 0 / 0.18);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dl-chart-legend {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
gap: 1rem;
|
|
38
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.dl-checkbox {
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 1rem;
|
|
4
|
+
width: 1rem;
|
|
5
|
+
flex-shrink: 0;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
border-radius: var(--radius-sm, 0.25rem);
|
|
9
|
+
border: 1px solid var(--primary);
|
|
10
|
+
box-shadow: 0 1px 2px rgb(0 0 0/0.05);
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
background: transparent;
|
|
13
|
+
padding: 0;
|
|
14
|
+
transition: background-color 0.15s ease;
|
|
15
|
+
}
|
|
16
|
+
.dl-checkbox:focus-visible {
|
|
17
|
+
outline: 2px solid var(--ring);
|
|
18
|
+
outline-offset: 2px;
|
|
19
|
+
}
|
|
20
|
+
.dl-checkbox:disabled {
|
|
21
|
+
cursor: not-allowed;
|
|
22
|
+
opacity: 0.5;
|
|
23
|
+
}
|
|
24
|
+
.dl-checkbox[data-state="checked"] {
|
|
25
|
+
background-color: var(--primary);
|
|
26
|
+
color: var(--primary-foreground);
|
|
27
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
|
|
2
|
+
import * as CheckboxStories from "./checkbox.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={CheckboxStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Checkbox
|
|
9
|
+
|
|
10
|
+
Accessible binary selection control built upon Radix UI Checkbox supporting checked, unchecked, and indeterminate states.
|
|
11
|
+
|
|
12
|
+
## Default
|
|
13
|
+
|
|
14
|
+
<Canvas of={CheckboxStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Disabled State
|
|
17
|
+
|
|
18
|
+
<Canvas of={CheckboxStories.Disabled} />
|
|
19
|
+
|
|
20
|
+
## Component Properties
|
|
21
|
+
|
|
22
|
+
<Controls />
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
.dl-command {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
border-radius: var(--radius-md, 0.375rem);
|
|
6
|
+
background-color: var(--popover);
|
|
7
|
+
color: var(--popover-foreground);
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.dl-command-dialog-content {
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
padding: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dl-command-input-wrapper {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
border-bottom: 1px solid var(--border);
|
|
21
|
+
padding-inline: 0.75rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dl-command-input-icon {
|
|
25
|
+
margin-inline-end: 0.5rem;
|
|
26
|
+
width: 1rem;
|
|
27
|
+
height: 1rem;
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dl-command-input {
|
|
33
|
+
display: flex;
|
|
34
|
+
height: 2.5rem;
|
|
35
|
+
width: 100%;
|
|
36
|
+
border-radius: var(--radius-md, 0.375rem);
|
|
37
|
+
background-color: transparent;
|
|
38
|
+
padding-block: 0.75rem;
|
|
39
|
+
font-size: 0.875rem;
|
|
40
|
+
color: var(--foreground);
|
|
41
|
+
outline: none;
|
|
42
|
+
border: none;
|
|
43
|
+
font-family: inherit;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.dl-command-input::placeholder {
|
|
47
|
+
color: var(--muted-foreground);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.dl-command-input:disabled {
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
opacity: 0.5;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dl-command-list {
|
|
56
|
+
max-height: 18.75rem;
|
|
57
|
+
overflow-y: auto;
|
|
58
|
+
overflow-x: hidden;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dl-command-empty {
|
|
62
|
+
padding-block: 1.5rem;
|
|
63
|
+
text-align: center;
|
|
64
|
+
font-size: 0.875rem;
|
|
65
|
+
color: var(--muted-foreground);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.dl-command-group {
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
padding: 0.25rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dl-command-group [cmdk-group-heading] {
|
|
74
|
+
padding-inline: 0.5rem;
|
|
75
|
+
padding-block: 0.375rem;
|
|
76
|
+
font-size: 0.75rem;
|
|
77
|
+
font-weight: 500;
|
|
78
|
+
color: var(--muted-foreground);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dl-command-separator {
|
|
82
|
+
margin-inline: -0.25rem;
|
|
83
|
+
height: 1px;
|
|
84
|
+
background-color: var(--border);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.dl-command-item {
|
|
88
|
+
position: relative;
|
|
89
|
+
display: flex;
|
|
90
|
+
cursor: default;
|
|
91
|
+
gap: 0.5rem;
|
|
92
|
+
user-select: none;
|
|
93
|
+
align-items: center;
|
|
94
|
+
border-radius: var(--radius-sm, 0.25rem);
|
|
95
|
+
padding: 0.375rem 0.5rem;
|
|
96
|
+
font-size: 0.875rem;
|
|
97
|
+
outline: none;
|
|
98
|
+
color: inherit;
|
|
99
|
+
transition:
|
|
100
|
+
background-color 0.1s ease,
|
|
101
|
+
color 0.1s ease;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.dl-command-item[data-disabled="true"] {
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
opacity: 0.5;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.dl-command-item[data-selected="true"] {
|
|
110
|
+
background-color: var(--accent);
|
|
111
|
+
color: var(--accent-foreground);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.dl-command-item svg {
|
|
115
|
+
width: 1rem;
|
|
116
|
+
height: 1rem;
|
|
117
|
+
flex-shrink: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.dl-command-shortcut {
|
|
121
|
+
margin-inline-start: auto;
|
|
122
|
+
font-size: 0.75rem;
|
|
123
|
+
letter-spacing: 0.1em;
|
|
124
|
+
color: var(--muted-foreground);
|
|
125
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.dl-context-menu-content {
|
|
2
|
+
z-index: 50;
|
|
3
|
+
min-width: 8rem;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
border-radius: var(--radius-md, 0.375rem);
|
|
6
|
+
border: 1px solid var(--border);
|
|
7
|
+
background-color: var(--popover);
|
|
8
|
+
color: var(--popover-foreground);
|
|
9
|
+
padding: 0.25rem;
|
|
10
|
+
box-shadow: 0 4px 24px rgb(0 0 0 / 0.12);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dl-context-menu-content[data-state="open"] {
|
|
14
|
+
animation: dl-fade-in 100ms ease;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dl-context-menu-content[data-state="closed"] {
|
|
18
|
+
animation: dl-fade-out 100ms ease;
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.dl-date-picker-trigger {
|
|
2
|
+
width: 100%;
|
|
3
|
+
justify-content: flex-start;
|
|
4
|
+
text-align: left;
|
|
5
|
+
font-weight: 400;
|
|
6
|
+
height: 2.25rem;
|
|
7
|
+
border-color: var(--border);
|
|
8
|
+
background-color: color-mix(in oklch, var(--secondary) 40%, transparent);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dl-date-picker-trigger:hover {
|
|
12
|
+
background-color: color-mix(in oklch, var(--secondary) 60%, transparent);
|
|
13
|
+
color: var(--foreground);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dl-date-picker-trigger--placeholder {
|
|
17
|
+
color: var(--muted-foreground);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dl-date-picker-icon {
|
|
21
|
+
margin-inline-end: 0.5rem;
|
|
22
|
+
width: 1rem;
|
|
23
|
+
height: 1rem;
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dl-date-picker-content {
|
|
28
|
+
width: auto;
|
|
29
|
+
padding: 0;
|
|
30
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
.dl-dialog-overlay {
|
|
2
|
+
position: fixed;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: 50;
|
|
5
|
+
background-color: rgb(0 0 0 / 0.75);
|
|
6
|
+
}
|
|
7
|
+
.dl-dialog-overlay[data-state="open"] {
|
|
8
|
+
animation: dl-fade-in 150ms ease;
|
|
9
|
+
}
|
|
10
|
+
.dl-dialog-overlay[data-state="closed"] {
|
|
11
|
+
animation: dl-fade-out 150ms ease;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.dl-dialog-content {
|
|
15
|
+
position: fixed;
|
|
16
|
+
left: 50%;
|
|
17
|
+
top: 50%;
|
|
18
|
+
transform: translate(-50%, -50%);
|
|
19
|
+
z-index: 50;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
width: calc(100% - 2rem);
|
|
23
|
+
max-width: var(--dl-dialog-max-width, 32rem);
|
|
24
|
+
max-height: calc(100dvh - 3rem);
|
|
25
|
+
border: 1px solid var(--border);
|
|
26
|
+
background-color: var(--background);
|
|
27
|
+
padding: 0;
|
|
28
|
+
gap: 0;
|
|
29
|
+
box-shadow: 0 16px 48px rgb(0 0 0 / 0.24);
|
|
30
|
+
border-radius: var(--radius-lg, 0.75rem);
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
overscroll-behavior: contain;
|
|
33
|
+
}
|
|
34
|
+
.dl-dialog-content[data-state="open"] {
|
|
35
|
+
animation: dl-zoom-in 150ms ease;
|
|
36
|
+
}
|
|
37
|
+
.dl-dialog-content[data-state="closed"] {
|
|
38
|
+
animation: dl-zoom-out 150ms ease;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* ── Sizing Variants ── */
|
|
42
|
+
.dl-dialog--sm {
|
|
43
|
+
max-width: 24rem;
|
|
44
|
+
}
|
|
45
|
+
.dl-dialog--md {
|
|
46
|
+
max-width: 32rem;
|
|
47
|
+
}
|
|
48
|
+
.dl-dialog--lg {
|
|
49
|
+
width: 90vw;
|
|
50
|
+
max-width: 44rem;
|
|
51
|
+
height: 80vh;
|
|
52
|
+
max-height: 80vh;
|
|
53
|
+
}
|
|
54
|
+
.dl-dialog--xl {
|
|
55
|
+
width: 92vw;
|
|
56
|
+
max-width: 56rem;
|
|
57
|
+
height: 85vh;
|
|
58
|
+
max-height: 85vh;
|
|
59
|
+
}
|
|
60
|
+
.dl-dialog--2xl {
|
|
61
|
+
width: 94vw;
|
|
62
|
+
max-width: 72rem;
|
|
63
|
+
height: 85vh;
|
|
64
|
+
max-height: 85vh;
|
|
65
|
+
}
|
|
66
|
+
.dl-dialog--full {
|
|
67
|
+
width: calc(100vw - 2rem);
|
|
68
|
+
max-width: calc(100vw - 2rem);
|
|
69
|
+
height: calc(100dvh - 2rem);
|
|
70
|
+
max-height: calc(100dvh - 2rem);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dl-dialog-close {
|
|
74
|
+
position: absolute;
|
|
75
|
+
right: 1.25rem;
|
|
76
|
+
top: 1.25rem;
|
|
77
|
+
border-radius: var(--radius-sm, 0.25rem);
|
|
78
|
+
opacity: 0.7;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
background: transparent;
|
|
81
|
+
border: none;
|
|
82
|
+
padding: 0.25rem;
|
|
83
|
+
transition: opacity 0.15s ease;
|
|
84
|
+
color: var(--foreground);
|
|
85
|
+
z-index: 10;
|
|
86
|
+
}
|
|
87
|
+
.dl-dialog-close:hover {
|
|
88
|
+
opacity: 1;
|
|
89
|
+
}
|
|
90
|
+
.dl-dialog-close:focus-visible {
|
|
91
|
+
outline: 2px solid var(--ring);
|
|
92
|
+
outline-offset: 2px;
|
|
93
|
+
}
|
|
94
|
+
.dl-dialog-close svg {
|
|
95
|
+
width: 1rem;
|
|
96
|
+
height: 1rem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.dl-dialog-sr-only {
|
|
100
|
+
position: absolute;
|
|
101
|
+
width: 1px;
|
|
102
|
+
height: 1px;
|
|
103
|
+
padding: 0;
|
|
104
|
+
margin: -1px;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
clip: rect(0, 0, 0, 0);
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
border-width: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.dl-dialog__header {
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
gap: 0.375rem;
|
|
115
|
+
padding: 1.25rem 1.5rem;
|
|
116
|
+
padding-right: 3.5rem;
|
|
117
|
+
border-bottom: 1px solid var(--border);
|
|
118
|
+
flex-shrink: 0;
|
|
119
|
+
}
|
|
120
|
+
.dl-dialog__body {
|
|
121
|
+
flex: 1 1 auto;
|
|
122
|
+
min-height: 0;
|
|
123
|
+
overflow-y: auto;
|
|
124
|
+
padding: 1.25rem 1.5rem;
|
|
125
|
+
}
|
|
126
|
+
.dl-dialog__footer {
|
|
127
|
+
display: flex;
|
|
128
|
+
flex-direction: row;
|
|
129
|
+
justify-content: flex-end;
|
|
130
|
+
gap: 0.5rem;
|
|
131
|
+
padding: 0.875rem 1.5rem;
|
|
132
|
+
border-top: 1px solid var(--border);
|
|
133
|
+
background-color: color-mix(in srgb, var(--muted) 35%, transparent);
|
|
134
|
+
flex-shrink: 0;
|
|
135
|
+
}
|
|
136
|
+
.dl-dialog__title {
|
|
137
|
+
font-size: 1.125rem;
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
line-height: 1.25;
|
|
140
|
+
letter-spacing: -0.01em;
|
|
141
|
+
}
|
|
142
|
+
.dl-dialog__desc {
|
|
143
|
+
font-size: 0.875rem;
|
|
144
|
+
color: var(--muted-foreground);
|
|
145
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
|
|
2
|
+
import * as DialogStories from "./dialog.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={DialogStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Dialog
|
|
9
|
+
|
|
10
|
+
Modal dialog built on accessible Radix primitives with focus trapping, ESC dismiss, and animated backdrop overlays.
|
|
11
|
+
|
|
12
|
+
## Default
|
|
13
|
+
|
|
14
|
+
<Canvas of={DialogStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Component Properties
|
|
17
|
+
|
|
18
|
+
<Controls />
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.dl-drawer-overlay {
|
|
2
|
+
position: fixed;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: 50;
|
|
5
|
+
background-color: rgb(0 0 0 / 0.8);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.dl-drawer-content {
|
|
9
|
+
position: fixed;
|
|
10
|
+
inset-inline: 0;
|
|
11
|
+
bottom: 0;
|
|
12
|
+
z-index: 50;
|
|
13
|
+
margin-top: 6rem;
|
|
14
|
+
display: flex;
|
|
15
|
+
height: auto;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
border-top-left-radius: 10px;
|
|
18
|
+
border-top-right-radius: 10px;
|
|
19
|
+
border: 1px solid var(--border);
|
|
20
|
+
background-color: var(--background);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dl-drawer-handle {
|
|
24
|
+
margin-inline: auto;
|
|
25
|
+
margin-top: 1rem;
|
|
26
|
+
height: 0.5rem;
|
|
27
|
+
width: 6.25rem;
|
|
28
|
+
border-radius: 9999px;
|
|
29
|
+
background-color: var(--muted);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dl-drawer-header {
|
|
33
|
+
display: grid;
|
|
34
|
+
gap: 0.375rem;
|
|
35
|
+
padding: 1rem;
|
|
36
|
+
text-align: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (min-width: 640px) {
|
|
40
|
+
.dl-drawer-header {
|
|
41
|
+
text-align: left;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dl-drawer-footer {
|
|
46
|
+
margin-top: auto;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
gap: 0.5rem;
|
|
50
|
+
padding: 1rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dl-drawer-title {
|
|
54
|
+
font-size: 1.125rem;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
line-height: 1;
|
|
57
|
+
letter-spacing: -0.01em;
|
|
58
|
+
color: var(--foreground);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dl-drawer-desc {
|
|
62
|
+
font-size: 0.875rem;
|
|
63
|
+
color: var(--muted-foreground);
|
|
64
|
+
}
|