@digiko-npm/designsystem 0.1.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/README.md +89 -0
- package/dist/designsystem.css +4642 -0
- package/dist/designsystem.js +67 -0
- package/package.json +32 -0
- package/src/base/index.css +2 -0
- package/src/base/reset.css +120 -0
- package/src/base/typography.css +163 -0
- package/src/components/accordion.css +150 -0
- package/src/components/alert.css +150 -0
- package/src/components/avatar.css +109 -0
- package/src/components/badge.css +80 -0
- package/src/components/breadcrumb.css +95 -0
- package/src/components/button.css +168 -0
- package/src/components/card.css +121 -0
- package/src/components/command.css +185 -0
- package/src/components/divider.css +66 -0
- package/src/components/drawer.css +209 -0
- package/src/components/dropdown.css +139 -0
- package/src/components/empty-state.css +69 -0
- package/src/components/index.css +35 -0
- package/src/components/input.css +116 -0
- package/src/components/kbd.css +55 -0
- package/src/components/modal.css +103 -0
- package/src/components/nav.css +153 -0
- package/src/components/pagination.css +166 -0
- package/src/components/popover.css +112 -0
- package/src/components/progress.css +214 -0
- package/src/components/skeleton.css +96 -0
- package/src/components/slider.css +125 -0
- package/src/components/table.css +48 -0
- package/src/components/tabs.css +163 -0
- package/src/components/tag.css +159 -0
- package/src/components/timeline.css +131 -0
- package/src/components/toast.css +70 -0
- package/src/components/toggle.css +135 -0
- package/src/components/tooltip.css +161 -0
- package/src/index.css +19 -0
- package/src/js/theme.js +67 -0
- package/src/tokens/colors.css +180 -0
- package/src/tokens/index.css +11 -0
- package/src/tokens/shadows.css +26 -0
- package/src/tokens/spacing.css +53 -0
- package/src/tokens/typography.css +51 -0
- package/src/utilities/index.css +3 -0
- package/src/utilities/layout.css +134 -0
- package/src/utilities/spacing.css +75 -0
- package/src/utilities/text.css +221 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Form Inputs
|
|
3
|
+
Surface bg, clean borders, focus ring.
|
|
4
|
+
========================================================================== */
|
|
5
|
+
|
|
6
|
+
.ds-label {
|
|
7
|
+
display: block;
|
|
8
|
+
font-size: var(--ds-text-sm);
|
|
9
|
+
font-weight: var(--ds-weight-medium);
|
|
10
|
+
color: var(--ds-color-text-secondary);
|
|
11
|
+
margin-bottom: var(--ds-space-1-5);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ds-input,
|
|
15
|
+
.ds-textarea,
|
|
16
|
+
.ds-select {
|
|
17
|
+
width: 100%;
|
|
18
|
+
padding: var(--ds-space-2-5) var(--ds-space-4);
|
|
19
|
+
font-family: var(--ds-font-sans);
|
|
20
|
+
font-size: var(--ds-text-sm);
|
|
21
|
+
line-height: var(--ds-leading-normal);
|
|
22
|
+
color: var(--ds-color-text);
|
|
23
|
+
background-color: var(--ds-color-surface);
|
|
24
|
+
border: 1px solid var(--ds-color-border);
|
|
25
|
+
border-radius: var(--ds-radius-lg);
|
|
26
|
+
transition: all var(--ds-duration-fast) ease;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ds-input:hover,
|
|
30
|
+
.ds-textarea:hover,
|
|
31
|
+
.ds-select:hover {
|
|
32
|
+
border-color: var(--ds-color-border-hover);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ds-input:focus,
|
|
36
|
+
.ds-textarea:focus,
|
|
37
|
+
.ds-select:focus {
|
|
38
|
+
border-color: var(--ds-color-border-active);
|
|
39
|
+
box-shadow: 0 0 0 1px var(--ds-color-border-active);
|
|
40
|
+
outline: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ds-input::placeholder,
|
|
44
|
+
.ds-textarea::placeholder {
|
|
45
|
+
color: var(--ds-color-text-tertiary);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* States */
|
|
49
|
+
.ds-input--error,
|
|
50
|
+
.ds-textarea--error {
|
|
51
|
+
border-color: var(--ds-color-error);
|
|
52
|
+
}
|
|
53
|
+
.ds-input--error:focus,
|
|
54
|
+
.ds-textarea--error:focus {
|
|
55
|
+
box-shadow: 0 0 0 1px var(--ds-color-error);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ds-input--success {
|
|
59
|
+
border-color: var(--ds-color-success);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Sizes */
|
|
63
|
+
.ds-input--sm {
|
|
64
|
+
padding: var(--ds-space-1) var(--ds-space-2);
|
|
65
|
+
font-size: var(--ds-text-xs);
|
|
66
|
+
border-radius: var(--ds-radius-md);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ds-input--lg {
|
|
70
|
+
padding: var(--ds-space-3) var(--ds-space-4);
|
|
71
|
+
font-size: var(--ds-text-base);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Textarea */
|
|
75
|
+
.ds-textarea {
|
|
76
|
+
min-height: 6rem;
|
|
77
|
+
padding: var(--ds-space-2-5) var(--ds-space-4);
|
|
78
|
+
resize: vertical;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Select */
|
|
82
|
+
.ds-select {
|
|
83
|
+
appearance: none;
|
|
84
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1aa' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
|
|
85
|
+
background-repeat: no-repeat;
|
|
86
|
+
background-position: right var(--ds-space-3) center;
|
|
87
|
+
padding-right: var(--ds-space-8);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Help text */
|
|
91
|
+
.ds-help {
|
|
92
|
+
font-size: var(--ds-text-xs);
|
|
93
|
+
color: var(--ds-color-text-tertiary);
|
|
94
|
+
margin-top: var(--ds-space-1-5);
|
|
95
|
+
}
|
|
96
|
+
.ds-help--error { color: var(--ds-color-error); }
|
|
97
|
+
|
|
98
|
+
/* Form Group */
|
|
99
|
+
.ds-form-group { margin-bottom: var(--ds-space-4); }
|
|
100
|
+
|
|
101
|
+
/* Checkbox / Radio */
|
|
102
|
+
.ds-checkbox,
|
|
103
|
+
.ds-radio {
|
|
104
|
+
display: inline-flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
gap: var(--ds-space-2);
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
font-size: var(--ds-text-sm);
|
|
109
|
+
color: var(--ds-color-text-secondary);
|
|
110
|
+
}
|
|
111
|
+
.ds-checkbox input,
|
|
112
|
+
.ds-radio input {
|
|
113
|
+
accent-color: var(--ds-color-interactive);
|
|
114
|
+
width: 0.875rem;
|
|
115
|
+
height: 0.875rem;
|
|
116
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
* Kbd
|
|
3
|
+
* ==========================================================================
|
|
4
|
+
*
|
|
5
|
+
* Keyboard shortcut display component with a raised 3D key appearance.
|
|
6
|
+
* Use individually or group multiple keys with ds-kbd-group for combos
|
|
7
|
+
* like "Cmd + K".
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* <kbd class="ds-kbd">Esc</kbd>
|
|
11
|
+
*
|
|
12
|
+
* <span class="ds-kbd-group">
|
|
13
|
+
* <kbd class="ds-kbd">Cmd</kbd>
|
|
14
|
+
* <span class="ds-kbd-group__separator">+</span>
|
|
15
|
+
* <kbd class="ds-kbd">K</kbd>
|
|
16
|
+
* </span>
|
|
17
|
+
*
|
|
18
|
+
* Modifiers:
|
|
19
|
+
* .ds-kbd--lg — Larger key display
|
|
20
|
+
* ========================================================================== */
|
|
21
|
+
|
|
22
|
+
.ds-kbd {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: var(--ds-space-1);
|
|
26
|
+
padding: var(--ds-space-0-5) var(--ds-space-1-5);
|
|
27
|
+
font-family: var(--ds-font-mono);
|
|
28
|
+
font-size: var(--ds-text-xs);
|
|
29
|
+
background-color: var(--ds-color-bg-elevated);
|
|
30
|
+
border: 1px solid var(--ds-color-border);
|
|
31
|
+
border-bottom-width: 2px;
|
|
32
|
+
border-radius: var(--ds-radius-sm);
|
|
33
|
+
color: var(--ds-color-text-secondary);
|
|
34
|
+
line-height: 1;
|
|
35
|
+
vertical-align: baseline;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Large variant */
|
|
39
|
+
.ds-kbd--lg {
|
|
40
|
+
font-size: var(--ds-text-sm);
|
|
41
|
+
padding: var(--ds-space-1) var(--ds-space-2);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Key group (for combos like Cmd + K) */
|
|
45
|
+
.ds-kbd-group {
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: var(--ds-space-1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Separator between keys */
|
|
52
|
+
.ds-kbd-group__separator {
|
|
53
|
+
font-size: var(--ds-text-xs);
|
|
54
|
+
color: var(--ds-color-text-tertiary);
|
|
55
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Modal
|
|
3
|
+
Backdrop blur, shadow-2xl, rounded-xl. Smooth scale transition.
|
|
4
|
+
========================================================================== */
|
|
5
|
+
|
|
6
|
+
.ds-modal {
|
|
7
|
+
position: fixed;
|
|
8
|
+
inset: 0;
|
|
9
|
+
z-index: var(--ds-z-modal);
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
padding: var(--ds-space-4);
|
|
14
|
+
background-color: var(--ds-color-overlay);
|
|
15
|
+
backdrop-filter: blur(4px);
|
|
16
|
+
-webkit-backdrop-filter: blur(4px);
|
|
17
|
+
opacity: 0;
|
|
18
|
+
visibility: hidden;
|
|
19
|
+
transition:
|
|
20
|
+
opacity var(--ds-duration-slow) var(--ds-ease-default),
|
|
21
|
+
visibility var(--ds-duration-slow) var(--ds-ease-default);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ds-modal[open],
|
|
25
|
+
.ds-modal--open {
|
|
26
|
+
opacity: 1;
|
|
27
|
+
visibility: visible;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ds-modal__content {
|
|
31
|
+
width: 100%;
|
|
32
|
+
max-width: 28rem;
|
|
33
|
+
max-height: 90dvh;
|
|
34
|
+
background-color: var(--ds-color-surface);
|
|
35
|
+
border: 1px solid var(--ds-color-border);
|
|
36
|
+
border-radius: var(--ds-radius-xl);
|
|
37
|
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
transform: scale(0.96);
|
|
42
|
+
transition: transform var(--ds-duration-slow) var(--ds-ease-out-expo);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ds-modal[open] .ds-modal__content,
|
|
46
|
+
.ds-modal--open .ds-modal__content {
|
|
47
|
+
transform: scale(1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ds-modal__header {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: flex-start;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
padding: var(--ds-space-4) var(--ds-space-5);
|
|
55
|
+
border-bottom: 1px solid var(--ds-color-border);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ds-modal__header h3 {
|
|
59
|
+
font-family: var(--ds-font-display);
|
|
60
|
+
font-weight: var(--ds-font-display-weight);
|
|
61
|
+
font-size: var(--ds-text-lg);
|
|
62
|
+
color: var(--ds-color-text);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ds-modal__header p {
|
|
66
|
+
font-size: var(--ds-text-sm);
|
|
67
|
+
color: var(--ds-color-text-tertiary);
|
|
68
|
+
margin-top: var(--ds-space-1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ds-modal__close {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
width: 2rem;
|
|
76
|
+
height: 2rem;
|
|
77
|
+
color: var(--ds-color-text-tertiary);
|
|
78
|
+
border-radius: var(--ds-radius-md);
|
|
79
|
+
transition: all var(--ds-duration-fast) var(--ds-ease-default);
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
}
|
|
82
|
+
.ds-modal__close:hover {
|
|
83
|
+
color: var(--ds-color-text);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ds-modal__body {
|
|
87
|
+
padding: var(--ds-space-5);
|
|
88
|
+
overflow-y: auto;
|
|
89
|
+
flex: 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ds-modal__footer {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: flex-end;
|
|
96
|
+
gap: var(--ds-space-2);
|
|
97
|
+
padding: var(--ds-space-4) var(--ds-space-5);
|
|
98
|
+
border-top: 1px solid var(--ds-color-border);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Size variants */
|
|
102
|
+
.ds-modal--md .ds-modal__content { max-width: var(--ds-container-md); }
|
|
103
|
+
.ds-modal--lg .ds-modal__content { max-width: var(--ds-container-lg); }
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Navigation
|
|
3
|
+
Fixed glass header, backdrop-blur, h-16. Clean links.
|
|
4
|
+
========================================================================== */
|
|
5
|
+
|
|
6
|
+
.ds-nav {
|
|
7
|
+
position: fixed;
|
|
8
|
+
top: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
z-index: var(--ds-z-sticky);
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
padding: 0 var(--ds-container-padding);
|
|
16
|
+
height: 4rem;
|
|
17
|
+
background-color: var(--ds-color-nav-bg);
|
|
18
|
+
border-bottom: 1px solid var(--ds-color-nav-border);
|
|
19
|
+
backdrop-filter: blur(20px) saturate(1.5);
|
|
20
|
+
-webkit-backdrop-filter: blur(20px) saturate(1.5);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ds-nav--static {
|
|
24
|
+
position: relative;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ds-nav__inner {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
width: 100%;
|
|
32
|
+
max-width: var(--ds-container-max);
|
|
33
|
+
margin-inline: auto;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ds-nav__brand {
|
|
37
|
+
font-family: var(--ds-font-display);
|
|
38
|
+
font-weight: var(--ds-font-display-weight);
|
|
39
|
+
font-size: var(--ds-text-lg);
|
|
40
|
+
color: var(--ds-color-text);
|
|
41
|
+
letter-spacing: var(--ds-tracking-tight);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ds-nav__menu {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
gap: var(--ds-space-8);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ds-nav__link {
|
|
51
|
+
font-size: var(--ds-text-sm);
|
|
52
|
+
color: var(--ds-color-text-secondary);
|
|
53
|
+
transition: color var(--ds-duration-normal) var(--ds-ease-default);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.ds-nav__link:hover {
|
|
57
|
+
color: var(--ds-color-text);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ds-nav__link--active {
|
|
61
|
+
color: var(--ds-color-text);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Nav actions (theme toggle, etc) */
|
|
65
|
+
.ds-nav__actions {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: var(--ds-space-2);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Icon button in nav */
|
|
72
|
+
.ds-nav__icon-btn {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
width: 2.25rem;
|
|
77
|
+
height: 2.25rem;
|
|
78
|
+
border-radius: var(--ds-radius-md);
|
|
79
|
+
color: var(--ds-color-text-secondary);
|
|
80
|
+
transition: all var(--ds-duration-normal) var(--ds-ease-default);
|
|
81
|
+
}
|
|
82
|
+
.ds-nav__icon-btn:hover {
|
|
83
|
+
color: var(--ds-color-text);
|
|
84
|
+
background-color: var(--ds-color-overlay-hover);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* --- Mobile nav overlay --- */
|
|
88
|
+
.ds-nav__mobile {
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
max-height: 0;
|
|
91
|
+
border-bottom: 0 solid var(--ds-color-nav-border);
|
|
92
|
+
background-color: var(--ds-color-nav-bg);
|
|
93
|
+
backdrop-filter: blur(20px);
|
|
94
|
+
transition: all var(--ds-duration-slow) var(--ds-ease-out-expo);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ds-nav__mobile--open {
|
|
98
|
+
max-height: 16rem;
|
|
99
|
+
border-bottom-width: 1px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ds-nav__mobile-links {
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
gap: var(--ds-space-4);
|
|
106
|
+
padding: var(--ds-space-4) var(--ds-container-padding);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* --- Sidebar --- */
|
|
110
|
+
|
|
111
|
+
.ds-sidebar {
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
width: 16rem;
|
|
115
|
+
padding: var(--ds-space-5);
|
|
116
|
+
background-color: var(--ds-color-surface);
|
|
117
|
+
border-right: 1px solid var(--ds-color-border);
|
|
118
|
+
height: 100%;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.ds-sidebar__section {
|
|
122
|
+
margin-bottom: var(--ds-space-6);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ds-sidebar__title {
|
|
126
|
+
font-size: var(--ds-text-sm);
|
|
127
|
+
font-weight: var(--ds-weight-medium);
|
|
128
|
+
text-transform: uppercase;
|
|
129
|
+
letter-spacing: var(--ds-tracking-wide);
|
|
130
|
+
color: var(--ds-color-text-tertiary);
|
|
131
|
+
margin-bottom: var(--ds-space-3);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ds-sidebar__link {
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
gap: var(--ds-space-2);
|
|
138
|
+
padding: var(--ds-space-2) var(--ds-space-3);
|
|
139
|
+
font-size: var(--ds-text-sm);
|
|
140
|
+
color: var(--ds-color-text-secondary);
|
|
141
|
+
border-radius: var(--ds-radius-md);
|
|
142
|
+
transition: all var(--ds-duration-normal) var(--ds-ease-default);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ds-sidebar__link:hover {
|
|
146
|
+
color: var(--ds-color-text);
|
|
147
|
+
background-color: var(--ds-color-overlay-hover);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.ds-sidebar__link--active {
|
|
151
|
+
color: var(--ds-color-text);
|
|
152
|
+
background-color: var(--ds-color-bg-elevated);
|
|
153
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Pagination Component
|
|
3
|
+
==========================================================================
|
|
4
|
+
A row of page-number controls for navigating multi-page content.
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
<nav class="ds-pagination" aria-label="Pagination">
|
|
8
|
+
<button class="ds-pagination__prev" aria-label="Previous page">‹</button>
|
|
9
|
+
<button class="ds-pagination__item">1</button>
|
|
10
|
+
<button class="ds-pagination__item ds-pagination__item--active" aria-current="page">2</button>
|
|
11
|
+
<span class="ds-pagination__ellipsis">…</span>
|
|
12
|
+
<button class="ds-pagination__item">10</button>
|
|
13
|
+
<button class="ds-pagination__next" aria-label="Next page">›</button>
|
|
14
|
+
</nav>
|
|
15
|
+
========================================================================== */
|
|
16
|
+
|
|
17
|
+
/* ---------------------------------------------------------------------------
|
|
18
|
+
Container
|
|
19
|
+
--------------------------------------------------------------------------- */
|
|
20
|
+
|
|
21
|
+
.ds-pagination {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: row;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: var(--ds-space-1);
|
|
26
|
+
font-family: var(--ds-font-sans);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* ---------------------------------------------------------------------------
|
|
30
|
+
Item (page number)
|
|
31
|
+
--------------------------------------------------------------------------- */
|
|
32
|
+
|
|
33
|
+
.ds-pagination__item {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
min-width: 2rem;
|
|
38
|
+
height: 2rem;
|
|
39
|
+
padding: 0 var(--ds-space-1);
|
|
40
|
+
border: none;
|
|
41
|
+
border-radius: var(--ds-radius-md);
|
|
42
|
+
background: transparent;
|
|
43
|
+
color: var(--ds-color-text-secondary);
|
|
44
|
+
font-size: var(--ds-text-sm);
|
|
45
|
+
font-family: var(--ds-font-sans);
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
transition:
|
|
48
|
+
background-color var(--ds-duration-fast) var(--ds-ease-out),
|
|
49
|
+
color var(--ds-duration-fast) var(--ds-ease-out);
|
|
50
|
+
-webkit-appearance: none;
|
|
51
|
+
appearance: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ds-pagination__item:hover {
|
|
55
|
+
background-color: var(--ds-color-bg-elevated);
|
|
56
|
+
color: var(--ds-color-text);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ds-pagination__item:focus-visible {
|
|
60
|
+
outline: 2px solid var(--ds-color-interactive);
|
|
61
|
+
outline-offset: 2px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ---------------------------------------------------------------------------
|
|
65
|
+
Active page
|
|
66
|
+
--------------------------------------------------------------------------- */
|
|
67
|
+
|
|
68
|
+
.ds-pagination__item--active,
|
|
69
|
+
.ds-pagination__item--active:hover {
|
|
70
|
+
background-color: var(--ds-color-inverted);
|
|
71
|
+
color: var(--ds-color-on-inverted);
|
|
72
|
+
cursor: default;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ---------------------------------------------------------------------------
|
|
76
|
+
Disabled item
|
|
77
|
+
--------------------------------------------------------------------------- */
|
|
78
|
+
|
|
79
|
+
.ds-pagination__item--disabled,
|
|
80
|
+
.ds-pagination__item--disabled:hover {
|
|
81
|
+
opacity: var(--ds-opacity-disabled);
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* ---------------------------------------------------------------------------
|
|
86
|
+
Previous / Next navigation buttons
|
|
87
|
+
--------------------------------------------------------------------------- */
|
|
88
|
+
|
|
89
|
+
.ds-pagination__prev,
|
|
90
|
+
.ds-pagination__next {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
min-width: 2rem;
|
|
95
|
+
height: 2rem;
|
|
96
|
+
padding: 0;
|
|
97
|
+
border: none;
|
|
98
|
+
border-radius: var(--ds-radius-md);
|
|
99
|
+
background: transparent;
|
|
100
|
+
color: var(--ds-color-text-secondary);
|
|
101
|
+
font-size: var(--ds-text-sm);
|
|
102
|
+
font-family: var(--ds-font-sans);
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
transition:
|
|
105
|
+
background-color var(--ds-duration-fast) var(--ds-ease-out),
|
|
106
|
+
color var(--ds-duration-fast) var(--ds-ease-out);
|
|
107
|
+
-webkit-appearance: none;
|
|
108
|
+
appearance: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.ds-pagination__prev:hover,
|
|
112
|
+
.ds-pagination__next:hover {
|
|
113
|
+
background-color: var(--ds-color-bg-elevated);
|
|
114
|
+
color: var(--ds-color-text);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ds-pagination__prev:focus-visible,
|
|
118
|
+
.ds-pagination__next:focus-visible {
|
|
119
|
+
outline: 2px solid var(--ds-color-interactive);
|
|
120
|
+
outline-offset: 2px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.ds-pagination__prev:disabled,
|
|
124
|
+
.ds-pagination__next:disabled {
|
|
125
|
+
opacity: var(--ds-opacity-disabled);
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* ---------------------------------------------------------------------------
|
|
130
|
+
Ellipsis
|
|
131
|
+
--------------------------------------------------------------------------- */
|
|
132
|
+
|
|
133
|
+
.ds-pagination__ellipsis {
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
min-width: 2rem;
|
|
138
|
+
height: 2rem;
|
|
139
|
+
color: var(--ds-color-text-tertiary);
|
|
140
|
+
font-size: var(--ds-text-sm);
|
|
141
|
+
user-select: none;
|
|
142
|
+
pointer-events: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* ---------------------------------------------------------------------------
|
|
146
|
+
Page info text (e.g. "Page 1 of 10")
|
|
147
|
+
--------------------------------------------------------------------------- */
|
|
148
|
+
|
|
149
|
+
.ds-pagination__info {
|
|
150
|
+
font-size: var(--ds-text-sm);
|
|
151
|
+
color: var(--ds-color-text-tertiary);
|
|
152
|
+
white-space: nowrap;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* ---------------------------------------------------------------------------
|
|
156
|
+
Modifier: Compact
|
|
157
|
+
--------------------------------------------------------------------------- */
|
|
158
|
+
|
|
159
|
+
.ds-pagination--compact .ds-pagination__item,
|
|
160
|
+
.ds-pagination--compact .ds-pagination__prev,
|
|
161
|
+
.ds-pagination--compact .ds-pagination__next,
|
|
162
|
+
.ds-pagination--compact .ds-pagination__ellipsis {
|
|
163
|
+
min-width: 1.75rem;
|
|
164
|
+
height: 1.75rem;
|
|
165
|
+
font-size: var(--ds-text-xs);
|
|
166
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
* Popover
|
|
3
|
+
* ==========================================================================
|
|
4
|
+
*
|
|
5
|
+
* Flexible popover component for displaying complex content anchored to a
|
|
6
|
+
* trigger element. Supports four placement directions (top, bottom, left,
|
|
7
|
+
* right) and multiple size variants. Default placement is bottom.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* <div class="ds-popover ds-popover--open">
|
|
11
|
+
* <button>Trigger</button>
|
|
12
|
+
* <div class="ds-popover__content">...</div>
|
|
13
|
+
* </div>
|
|
14
|
+
*
|
|
15
|
+
* Modifiers:
|
|
16
|
+
* .ds-popover--open — Shows the popover content
|
|
17
|
+
* .ds-popover--top — Places content above the trigger
|
|
18
|
+
* .ds-popover--bottom — Places content below the trigger (default)
|
|
19
|
+
* .ds-popover--left — Places content to the left of the trigger
|
|
20
|
+
* .ds-popover--right — Places content to the right of the trigger
|
|
21
|
+
* .ds-popover__content--sm — Smaller popover (12rem min-width)
|
|
22
|
+
* .ds-popover__content--lg — Larger popover (24rem min-width)
|
|
23
|
+
* ========================================================================== */
|
|
24
|
+
|
|
25
|
+
.ds-popover {
|
|
26
|
+
position: relative;
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ds-popover__content {
|
|
31
|
+
position: absolute;
|
|
32
|
+
z-index: var(--ds-z-dropdown);
|
|
33
|
+
background-color: var(--ds-color-surface);
|
|
34
|
+
border: 1px solid var(--ds-color-border);
|
|
35
|
+
border-radius: var(--ds-radius-xl);
|
|
36
|
+
box-shadow: var(--ds-shadow-lg);
|
|
37
|
+
padding: var(--ds-space-4);
|
|
38
|
+
min-width: 16rem;
|
|
39
|
+
opacity: 0;
|
|
40
|
+
visibility: hidden;
|
|
41
|
+
transform: scale(0.96);
|
|
42
|
+
transition:
|
|
43
|
+
opacity var(--ds-duration-fast) var(--ds-ease),
|
|
44
|
+
visibility var(--ds-duration-fast) var(--ds-ease),
|
|
45
|
+
transform var(--ds-duration-fast) var(--ds-ease-out-expo);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Open state */
|
|
49
|
+
.ds-popover--open .ds-popover__content {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
visibility: visible;
|
|
52
|
+
transform: scale(1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Placement: bottom (default) */
|
|
56
|
+
.ds-popover__content,
|
|
57
|
+
.ds-popover--bottom .ds-popover__content {
|
|
58
|
+
top: calc(100% + 8px);
|
|
59
|
+
left: 50%;
|
|
60
|
+
transform: translateX(-50%) scale(0.96);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ds-popover--open .ds-popover__content,
|
|
64
|
+
.ds-popover--bottom.ds-popover--open .ds-popover__content {
|
|
65
|
+
transform: translateX(-50%) scale(1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Placement: top */
|
|
69
|
+
.ds-popover--top .ds-popover__content {
|
|
70
|
+
bottom: calc(100% + 8px);
|
|
71
|
+
top: auto;
|
|
72
|
+
left: 50%;
|
|
73
|
+
transform: translateX(-50%) scale(0.96);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ds-popover--top.ds-popover--open .ds-popover__content {
|
|
77
|
+
transform: translateX(-50%) scale(1);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Placement: left */
|
|
81
|
+
.ds-popover--left .ds-popover__content {
|
|
82
|
+
right: calc(100% + 8px);
|
|
83
|
+
top: 50%;
|
|
84
|
+
left: auto;
|
|
85
|
+
transform: translateY(-50%) scale(0.96);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.ds-popover--left.ds-popover--open .ds-popover__content {
|
|
89
|
+
transform: translateY(-50%) scale(1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Placement: right */
|
|
93
|
+
.ds-popover--right .ds-popover__content {
|
|
94
|
+
left: calc(100% + 8px);
|
|
95
|
+
top: 50%;
|
|
96
|
+
transform: translateY(-50%) scale(0.96);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ds-popover--right.ds-popover--open .ds-popover__content {
|
|
100
|
+
transform: translateY(-50%) scale(1);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Size: small */
|
|
104
|
+
.ds-popover__content--sm {
|
|
105
|
+
min-width: 12rem;
|
|
106
|
+
padding: var(--ds-space-3);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Size: large */
|
|
110
|
+
.ds-popover__content--lg {
|
|
111
|
+
min-width: 24rem;
|
|
112
|
+
}
|