@db-vincent/components 0.0.0-stage → 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.
Files changed (62) hide show
  1. package/package.json +28 -4
  2. package/src/astro/Accordion.astro +37 -0
  3. package/src/astro/Alert.astro +73 -0
  4. package/src/astro/Badge.astro +23 -0
  5. package/src/astro/Breadcrumbs.astro +45 -0
  6. package/src/astro/Button.astro +125 -0
  7. package/src/astro/Card.astro +63 -0
  8. package/src/astro/Checkbox.astro +61 -0
  9. package/src/astro/Chip.astro +116 -0
  10. package/src/astro/CodeBlock.astro +17 -0
  11. package/src/astro/EmptyState.astro +45 -0
  12. package/src/astro/Example.astro +37 -0
  13. package/src/astro/Grid.astro +50 -0
  14. package/src/astro/GridItem.astro +23 -0
  15. package/src/astro/Icon.astro +52 -0
  16. package/src/astro/Modal.astro +117 -0
  17. package/src/astro/Navbar.astro +756 -0
  18. package/src/astro/PageHeader.astro +34 -0
  19. package/src/astro/Pagination.astro +162 -0
  20. package/src/astro/Radio.astro +58 -0
  21. package/src/astro/RadioGroup.astro +25 -0
  22. package/src/astro/Section.astro +25 -0
  23. package/src/astro/Select.astro +403 -0
  24. package/src/astro/Sidebar.astro +215 -0
  25. package/src/astro/Skeleton.astro +39 -0
  26. package/src/astro/Spinner.astro +19 -0
  27. package/src/astro/Table.astro +254 -0
  28. package/src/astro/TextField.astro +287 -0
  29. package/src/astro/ThemeToggle.astro +66 -0
  30. package/src/astro/Toast.astro +181 -0
  31. package/src/astro/TopBar.astro +29 -0
  32. package/src/data/icons.ts +104 -0
  33. package/src/scripts/toast.ts +531 -0
  34. package/src/styles/accordion.css +77 -0
  35. package/src/styles/alert.css +106 -0
  36. package/src/styles/badge.css +46 -0
  37. package/src/styles/base.css +203 -0
  38. package/src/styles/breadcrumbs.css +52 -0
  39. package/src/styles/button.css +163 -0
  40. package/src/styles/card.css +108 -0
  41. package/src/styles/chip.css +104 -0
  42. package/src/styles/choice.css +137 -0
  43. package/src/styles/code.css +42 -0
  44. package/src/styles/empty.css +57 -0
  45. package/src/styles/example.css +55 -0
  46. package/src/styles/grid.css +62 -0
  47. package/src/styles/input.css +198 -0
  48. package/src/styles/modal.css +143 -0
  49. package/src/styles/motion.css +96 -0
  50. package/src/styles/nav.css +230 -0
  51. package/src/styles/navbar.css +656 -0
  52. package/src/styles/page-header.css +59 -0
  53. package/src/styles/pagination.css +77 -0
  54. package/src/styles/section.css +36 -0
  55. package/src/styles/select.css +235 -0
  56. package/src/styles/skeleton.css +64 -0
  57. package/src/styles/spinner.css +42 -0
  58. package/src/styles/table.css +175 -0
  59. package/src/styles/theme-toggle.css +29 -0
  60. package/src/styles/toast.css +207 -0
  61. package/src/styles/topbar.css +30 -0
  62. package/README.md +0 -3
@@ -0,0 +1,207 @@
1
+ @layer components {
2
+ /* A toast is a neutral, raised popover surface. The type lives in the icon;
3
+ the card itself stays calm so a stack never reads as inline content. */
4
+ .ds-toast {
5
+ align-items: center;
6
+ background: var(--toast-bg);
7
+ border: 1px solid var(--toast-border);
8
+ border-radius: var(--toast-radius);
9
+ box-shadow: var(--toast-shadow);
10
+ color: var(--toast-fg);
11
+ display: flex;
12
+ gap: var(--toast-gap);
13
+ max-width: min(var(--toast-width), calc(100vw - var(--space-8)));
14
+ min-width: 0;
15
+ padding: var(--toast-padding);
16
+ pointer-events: auto;
17
+ width: 100%;
18
+ }
19
+
20
+ .ds-toast__icon {
21
+ color: var(--toast-icon-fg);
22
+ display: inline-flex;
23
+ flex: none;
24
+ }
25
+
26
+ .ds-toast--info .ds-toast__icon {
27
+ color: var(--toast-info-icon);
28
+ }
29
+
30
+ .ds-toast--success .ds-toast__icon {
31
+ color: var(--toast-success-icon);
32
+ }
33
+
34
+ .ds-toast--warning .ds-toast__icon {
35
+ color: var(--toast-warning-icon);
36
+ }
37
+
38
+ .ds-toast--danger .ds-toast__icon {
39
+ color: var(--toast-danger-icon);
40
+ }
41
+
42
+ .ds-toast--loading .ds-toast__icon {
43
+ animation: ds-toast-spin calc(var(--duration-slower) * 2) linear infinite;
44
+ color: var(--toast-loading-icon);
45
+ }
46
+
47
+ .ds-toast__content {
48
+ display: grid;
49
+ flex: 1;
50
+ gap: var(--toast-body-gap);
51
+ min-width: 0;
52
+ }
53
+
54
+ .ds-toast__title {
55
+ color: var(--toast-fg);
56
+ font-size: var(--toast-title-size);
57
+ font-weight: var(--toast-title-weight);
58
+ line-height: var(--leading-sm);
59
+ margin: 0;
60
+ }
61
+
62
+ .ds-toast__body {
63
+ color: var(--toast-body-fg);
64
+ font-size: var(--toast-body-size);
65
+ line-height: var(--leading-sm);
66
+ margin: 0;
67
+ }
68
+
69
+ .ds-toast__actions {
70
+ align-items: center;
71
+ display: flex;
72
+ flex: none;
73
+ gap: var(--space-2);
74
+ }
75
+
76
+ .ds-toast__action {
77
+ align-items: center;
78
+ background: var(--toast-action-bg);
79
+ border: 1px solid var(--toast-action-border);
80
+ border-radius: var(--toast-action-radius);
81
+ color: var(--toast-action-fg);
82
+ cursor: pointer;
83
+ display: inline-flex;
84
+ font: inherit;
85
+ font-size: var(--toast-action-font-size);
86
+ font-weight: var(--toast-action-font-weight);
87
+ height: var(--toast-action-height);
88
+ justify-content: center;
89
+ padding-inline: var(--toast-action-padding-x);
90
+ text-decoration: none;
91
+ transition:
92
+ background-color var(--duration-fast) var(--ease-standard),
93
+ border-color var(--duration-fast) var(--ease-standard);
94
+ white-space: nowrap;
95
+ }
96
+
97
+ .ds-toast__action:hover {
98
+ background: var(--toast-action-bg-hover);
99
+ }
100
+
101
+ .ds-toast__action:focus-visible {
102
+ outline: var(--toast-focus-width) solid var(--toast-focus-color);
103
+ outline-offset: var(--toast-focus-offset);
104
+ }
105
+
106
+ .ds-toast__close {
107
+ align-items: center;
108
+ background: transparent;
109
+ border: 0;
110
+ border-radius: var(--radius-sm);
111
+ color: var(--toast-close-fg);
112
+ cursor: pointer;
113
+ display: inline-flex;
114
+ flex: none;
115
+ height: var(--space-7);
116
+ justify-content: center;
117
+ padding: 0;
118
+ transition:
119
+ background-color var(--duration-fast) var(--ease-standard),
120
+ color var(--duration-fast) var(--ease-standard);
121
+ width: var(--space-7);
122
+ }
123
+
124
+ .ds-toast__close:hover {
125
+ background: var(--toast-close-bg-hover);
126
+ color: var(--toast-close-fg-hover);
127
+ }
128
+
129
+ .ds-toast__close:focus-visible {
130
+ outline: var(--toast-focus-width) solid var(--toast-focus-color);
131
+ outline-offset: var(--toast-focus-offset);
132
+ }
133
+
134
+ .ds-toast-region {
135
+ bottom: var(--space-4);
136
+ display: flex;
137
+ flex-direction: column;
138
+ gap: var(--toast-viewport-gap);
139
+ inset-inline-end: var(--space-4);
140
+ max-width: calc(100vw - var(--space-8));
141
+ pointer-events: none;
142
+ position: fixed;
143
+ width: min(var(--toast-width), calc(100vw - var(--space-8)));
144
+ z-index: var(--z-toast);
145
+ }
146
+
147
+ /* Toast cards share one bottom-end anchor. Collapsed, older cards peek out
148
+ behind the frontmost one; hover or keyboard focus expands the stack. */
149
+ .ds-toast-region .ds-toast {
150
+ animation: ds-toast-in var(--duration-base) var(--ease-standard);
151
+ bottom: 0;
152
+ inset-inline-end: 0;
153
+ position: absolute;
154
+ transform: translateY(
155
+ calc(var(--toast-index, 0) * var(--toast-stack-peek) * -1)
156
+ )
157
+ scale(calc(1 - var(--toast-index, 0) * var(--toast-stack-scale-step)));
158
+ transform-origin: bottom center;
159
+ transition:
160
+ transform var(--duration-base) var(--ease-spring),
161
+ opacity var(--duration-base) var(--ease-standard);
162
+ z-index: calc(100 - var(--toast-index, 0));
163
+ }
164
+
165
+ .ds-toast-region:hover .ds-toast,
166
+ .ds-toast-region:focus-within .ds-toast {
167
+ transform: translateY(calc(-1 * var(--toast-offset, 0px))) scale(1);
168
+ }
169
+
170
+ .ds-toast-region .ds-toast[data-toast-leaving] {
171
+ animation: ds-toast-out var(--duration-fast) var(--ease-exit) forwards;
172
+ }
173
+
174
+ .ds-toast-region .ds-toast[data-toast-limited] {
175
+ opacity: 0;
176
+ pointer-events: none;
177
+ transform: translateY(var(--space-3)) scale(0.98);
178
+ transition: opacity var(--duration-fast) var(--ease-exit);
179
+ }
180
+
181
+ @keyframes ds-toast-in {
182
+ from {
183
+ opacity: 0;
184
+ }
185
+ }
186
+
187
+ @keyframes ds-toast-out {
188
+ to {
189
+ opacity: 0;
190
+ }
191
+ }
192
+
193
+ @keyframes ds-toast-spin {
194
+ to {
195
+ transform: rotate(360deg);
196
+ }
197
+ }
198
+
199
+ @media (prefers-reduced-motion: reduce) {
200
+ .ds-toast-region .ds-toast,
201
+ .ds-toast-region .ds-toast[data-toast-leaving],
202
+ .ds-toast--loading .ds-toast__icon {
203
+ animation: none;
204
+ transition: none;
205
+ }
206
+ }
207
+ }
@@ -0,0 +1,30 @@
1
+ @layer components {
2
+ .ds-topbar {
3
+ background: var(--topbar-bg);
4
+ border-bottom: 1px solid var(--topbar-border);
5
+ }
6
+
7
+ .ds-topbar__inner {
8
+ align-items: center;
9
+ display: flex;
10
+ gap: var(--topbar-gap);
11
+ min-height: var(--topbar-height);
12
+ padding-inline: var(--topbar-padding-x);
13
+ }
14
+
15
+ .ds-topbar__start {
16
+ flex: 1 1 auto;
17
+ min-width: 0;
18
+ }
19
+
20
+ .ds-topbar__actions {
21
+ display: flex;
22
+ flex-shrink: 0;
23
+ gap: var(--topbar-gap);
24
+ margin-inline-start: auto;
25
+ }
26
+
27
+ .ds-topbar__start:empty + .ds-topbar__actions {
28
+ margin-inline-start: 0;
29
+ }
30
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.