@parallelogram-js/dashboard 0.0.0-stage → 0.1.1
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/CHANGELOG.md +113 -0
- package/LICENSE +21 -0
- package/README.md +1390 -2
- package/dist/parallelogram-dashboard.css +9401 -0
- package/dist/parallelogram-dashboard.css.map +1 -0
- package/dist/parallelogram-dashboard.min.css +1 -0
- package/package.json +72 -4
- package/scss/_base.scss +403 -0
- package/scss/_datetime.scss +50 -0
- package/scss/_icon.scss +40 -0
- package/scss/_index.scss +60 -0
- package/scss/_mixins.scss +396 -0
- package/scss/_tokens.scss +340 -0
- package/scss/_utilities.scss +464 -0
- package/scss/_variables.scss +219 -0
- package/scss/components/_accordion.scss +297 -0
- package/scss/components/_actionbar.scss +333 -0
- package/scss/components/_alert.scss +183 -0
- package/scss/components/_avatar.scss +203 -0
- package/scss/components/_badge.scss +176 -0
- package/scss/components/_banner.scss +344 -0
- package/scss/components/_breadcrumb.scss +220 -0
- package/scss/components/_button.scss +264 -0
- package/scss/components/_card.scss +256 -0
- package/scss/components/_chart.scss +246 -0
- package/scss/components/_command.scss +267 -0
- package/scss/components/_dashboard.scss +681 -0
- package/scss/components/_data-list.scss +280 -0
- package/scss/components/_dropdown.scss +318 -0
- package/scss/components/_empty.scss +226 -0
- package/scss/components/_filebrowser.scss +906 -0
- package/scss/components/_form-layout.scss +332 -0
- package/scss/components/_input.scss +310 -0
- package/scss/components/_list.scss +130 -0
- package/scss/components/_media.scss +239 -0
- package/scss/components/_modal.scss +298 -0
- package/scss/components/_navbar.scss +312 -0
- package/scss/components/_notification.scss +59 -0
- package/scss/components/_pageheader.scss +99 -0
- package/scss/components/_pagination.scss +165 -0
- package/scss/components/_progress.scss +333 -0
- package/scss/components/_separator.scss +129 -0
- package/scss/components/_sheet.scss +286 -0
- package/scss/components/_sidebar.scss +324 -0
- package/scss/components/_skeleton.scss +246 -0
- package/scss/components/_stat.scss +218 -0
- package/scss/components/_table.scss +589 -0
- package/scss/components/_tabs.scss +266 -0
- package/scss/components/_timeline.scss +339 -0
- package/scss/components/_toast.scss +259 -0
- package/scss/components/_toolbar.scss +301 -0
- package/scss/components/_tooltip.scss +250 -0
- package/scss/main.scss +6 -0
- package/src/js/behaviours/accordion.js +58 -0
- package/src/js/behaviours/action-bar-list.js +406 -0
- package/src/js/behaviours/action-bar.js +29 -0
- package/src/js/behaviours/chart.js +339 -0
- package/src/js/behaviours/collapsible.js +34 -0
- package/src/js/behaviours/editable-table.js +91 -0
- package/src/js/behaviours/expandable.js +80 -0
- package/src/js/behaviours/overflow-actions.js +137 -0
- package/src/js/behaviours/publish-schedule.js +91 -0
- package/src/js/behaviours/search-clear.js +19 -0
- package/src/js/behaviours/segmented-control.js +43 -0
- package/src/js/behaviours/submenu.js +73 -0
- package/src/js/behaviours/table-columns.js +77 -0
- package/src/js/behaviours/table-paste.js +305 -0
- package/src/js/behaviours/table-reorder.js +252 -0
- package/src/js/behaviours/table-sort.js +101 -0
- package/src/js/behaviours/tabs.js +148 -0
- package/src/js/behaviours/toast-manager.js +106 -0
- package/src/js/behaviours/toggle.js +186 -0
- package/src/js/behaviours/unsaved-guard.js +88 -0
- package/src/js/core-loader.js +26 -0
- package/src/js/index.js +85 -0
- package/src/js/polyfills/dialog-commands.js +20 -0
- package/src/js/util/dom.js +39 -0
package/package.json
CHANGED
|
@@ -1,6 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallelogram-js/dashboard",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "A BEM-style CSS dashboard library inspired by shadcn/ui",
|
|
5
|
+
"main": "dist/parallelogram-dashboard.css",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"scss",
|
|
10
|
+
"src",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"!scss/_demo.scss",
|
|
13
|
+
"!scss/demo-pages.scss"
|
|
14
|
+
],
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"*.css",
|
|
17
|
+
"*.scss",
|
|
18
|
+
"./src/js/behaviours/toggle.js",
|
|
19
|
+
"./src/js/behaviours/unsaved-guard.js",
|
|
20
|
+
"./src/js/behaviours/search-clear.js"
|
|
21
|
+
],
|
|
22
|
+
"exports": {
|
|
23
|
+
".": "./src/js/index.js",
|
|
24
|
+
"./behaviours/*": "./src/js/behaviours/*.js",
|
|
25
|
+
"./css": "./dist/parallelogram-dashboard.css",
|
|
26
|
+
"./css/min": "./dist/parallelogram-dashboard.min.css",
|
|
27
|
+
"./scss": "./scss/_index.scss",
|
|
28
|
+
"./scss/*": "./scss/*",
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "sass scss/main.scss dist/parallelogram-dashboard.css && sass scss/demo-pages.scss demo/css/demo.css --no-source-map && cp dist/parallelogram-dashboard.css demo/css/parallelogram-dashboard.css && npm run build:min && npm run vendor && npm run llms",
|
|
33
|
+
"build:min": "sass scss/main.scss dist/parallelogram-dashboard.min.css --style=compressed --no-source-map && lightningcss --minify dist/parallelogram-dashboard.min.css -o dist/parallelogram-dashboard.min.css",
|
|
34
|
+
"watch": "sass --watch scss/main.scss dist/parallelogram-dashboard.css",
|
|
35
|
+
"dev": "sass --watch scss/main.scss dist/parallelogram-dashboard.css",
|
|
36
|
+
"serve": "python3 scripts/serve.py 8080",
|
|
37
|
+
"playground:check": "node scripts/playground-check.mjs",
|
|
38
|
+
"vendor": "rm -rf demo/vendor && mkdir -p demo/vendor && rsync -a --exclude dev --exclude types --exclude '*.map' node_modules/@parallelogram-js/core/dist/ demo/vendor/parallelogram-js/ && rsync -a src/js/ demo/vendor/parallelogram-dashboard/",
|
|
39
|
+
"llms": "node scripts/build-llms.mjs",
|
|
40
|
+
"playground:register": "node scripts/register-specs.mjs",
|
|
41
|
+
"release": "node scripts/release.mjs",
|
|
42
|
+
"compare": "node scripts/compare-styles.mjs"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"css",
|
|
46
|
+
"scss",
|
|
47
|
+
"bem",
|
|
48
|
+
"dashboard",
|
|
49
|
+
"ui",
|
|
50
|
+
"components"
|
|
51
|
+
],
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"author": "PeptoLab",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/parallelogram-dev/parallelogram-dashboard.git"
|
|
57
|
+
},
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@parallelogram-js/core": "^0.7.19",
|
|
63
|
+
"lightningcss-cli": "^1.33.0",
|
|
64
|
+
"sass": "^1.69.0"
|
|
65
|
+
},
|
|
66
|
+
"peerDependencies": {
|
|
67
|
+
"@parallelogram-js/core": "^0.7.19"
|
|
68
|
+
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"@parallelogram-js/core": {
|
|
71
|
+
"optional": true
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
package/scss/_base.scss
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Base Styles - Reset & Typography
|
|
3
|
+
// ==========================================================================
|
|
4
|
+
|
|
5
|
+
@use "variables" as *;
|
|
6
|
+
@use "mixins" as *;
|
|
7
|
+
|
|
8
|
+
// --------------------------------------------------------------------------
|
|
9
|
+
// CSS Reset (Modern, minimal)
|
|
10
|
+
// --------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
*,
|
|
13
|
+
*::before,
|
|
14
|
+
*::after {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
* {
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Ensure hidden attribute always works
|
|
24
|
+
[hidden] {
|
|
25
|
+
display: none !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Let <dialog open> drive overlay components without the UA dialog box styles getting in the way
|
|
29
|
+
:where(dialog.modal, dialog.modaloverlay, dialog.alertdialog, dialog.sheet, dialog.drawer, dialog.command, dialog.navbarmobile) {
|
|
30
|
+
width: auto;
|
|
31
|
+
height: auto;
|
|
32
|
+
max-width: none;
|
|
33
|
+
max-height: none;
|
|
34
|
+
margin: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
border: 0;
|
|
37
|
+
background: transparent;
|
|
38
|
+
color: inherit;
|
|
39
|
+
overflow: visible;
|
|
40
|
+
|
|
41
|
+
&::backdrop {
|
|
42
|
+
background: transparent;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 100% keeps the reader's browser font size, so every rem in the library scales with it
|
|
47
|
+
html {
|
|
48
|
+
font-size: 100%;
|
|
49
|
+
-webkit-text-size-adjust: 100%;
|
|
50
|
+
text-size-adjust: 100%;
|
|
51
|
+
-webkit-font-smoothing: antialiased;
|
|
52
|
+
-moz-osx-font-smoothing: grayscale;
|
|
53
|
+
text-rendering: optimizeLegibility;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
body {
|
|
57
|
+
font-family: var(--font-sans);
|
|
58
|
+
font-size: $font-size-base;
|
|
59
|
+
line-height: var(--leading-normal);
|
|
60
|
+
color: var(--fg);
|
|
61
|
+
background-color: var(--bg);
|
|
62
|
+
min-height: 100vh;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
img,
|
|
66
|
+
picture,
|
|
67
|
+
video,
|
|
68
|
+
canvas,
|
|
69
|
+
svg {
|
|
70
|
+
display: block;
|
|
71
|
+
max-width: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
input,
|
|
75
|
+
button,
|
|
76
|
+
textarea,
|
|
77
|
+
select {
|
|
78
|
+
font: inherit;
|
|
79
|
+
color: inherit;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
button {
|
|
83
|
+
background: none;
|
|
84
|
+
border: none;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
a {
|
|
89
|
+
color: inherit;
|
|
90
|
+
text-decoration: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
ul,
|
|
94
|
+
ol {
|
|
95
|
+
list-style: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
table {
|
|
99
|
+
border-collapse: collapse;
|
|
100
|
+
border-spacing: 0;
|
|
101
|
+
font-variant-numeric: tabular-nums;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Remove default focus outline (we use custom focus rings)
|
|
105
|
+
:focus:not(:focus-visible) {
|
|
106
|
+
outline: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// --------------------------------------------------------------------------
|
|
110
|
+
// Typography
|
|
111
|
+
// --------------------------------------------------------------------------
|
|
112
|
+
|
|
113
|
+
// Element styles sit inside :where() so they carry no specificity: any component class
|
|
114
|
+
// overrides them without needing a more specific selector.
|
|
115
|
+
|
|
116
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
117
|
+
font-weight: $font-weight-semibold;
|
|
118
|
+
line-height: var(--leading-tight);
|
|
119
|
+
letter-spacing: var(--tracking-tight);
|
|
120
|
+
text-wrap: balance;
|
|
121
|
+
color: var(--fg);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@each $level, $sizes in $heading-sizes {
|
|
125
|
+
:where(h#{$level}) {
|
|
126
|
+
font-size: var(--heading-#{$level});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:where(p, li, dd, figcaption, blockquote) {
|
|
131
|
+
text-wrap: pretty;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:where(small) {
|
|
135
|
+
font-size: $font-size-sm;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:where(strong, b) {
|
|
139
|
+
font-weight: $font-weight-semibold;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:where(abbr[title]) {
|
|
143
|
+
text-decoration: underline dotted;
|
|
144
|
+
text-underline-offset: 2px;
|
|
145
|
+
cursor: help;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Keep superscripts and subscripts from opening up the line they sit on
|
|
149
|
+
:where(sub, sup) {
|
|
150
|
+
font-size: 0.75em;
|
|
151
|
+
line-height: 0;
|
|
152
|
+
position: relative;
|
|
153
|
+
vertical-align: baseline;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:where(sup) {
|
|
157
|
+
top: -0.5em;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:where(sub) {
|
|
161
|
+
bottom: -0.25em;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:where(code, kbd, samp, pre) {
|
|
165
|
+
font-family: var(--font-mono);
|
|
166
|
+
font-size: 0.875em;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:where(code) {
|
|
170
|
+
background-color: var(--bg-muted);
|
|
171
|
+
padding: 0.125rem 0.25rem;
|
|
172
|
+
border-radius: $radius-sm;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:where(kbd) {
|
|
176
|
+
display: inline-block;
|
|
177
|
+
min-width: 1.5em;
|
|
178
|
+
padding: 0.0625rem 0.375rem;
|
|
179
|
+
font-size: 0.75em;
|
|
180
|
+
font-weight: $font-weight-medium;
|
|
181
|
+
line-height: $line-height-normal;
|
|
182
|
+
text-align: center;
|
|
183
|
+
color: var(--fg-muted);
|
|
184
|
+
background-color: var(--bg);
|
|
185
|
+
border: 1px solid var(--border);
|
|
186
|
+
border-bottom-width: 2px;
|
|
187
|
+
border-radius: $radius-sm;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:where(pre) {
|
|
191
|
+
background-color: var(--bg-muted);
|
|
192
|
+
padding: $spacing-sm;
|
|
193
|
+
border-radius: $radius;
|
|
194
|
+
overflow-x: auto;
|
|
195
|
+
@include scrollbar-thin;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
:where(pre) :where(code) {
|
|
199
|
+
background: none;
|
|
200
|
+
padding: 0;
|
|
201
|
+
border-radius: 0;
|
|
202
|
+
font-size: inherit;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:where(blockquote) {
|
|
206
|
+
border-left: 4px solid var(--border);
|
|
207
|
+
padding-left: $spacing-sm;
|
|
208
|
+
color: var(--fg-muted);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// The system never sets type in italics: emphasis is shown with weight, and the elements
|
|
212
|
+
// browsers italicise by default stay upright
|
|
213
|
+
:where(em, i, cite, dfn, var, address) {
|
|
214
|
+
font-style: normal;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:where(em, i) {
|
|
218
|
+
font-weight: $font-weight-medium;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
:where(hr) {
|
|
222
|
+
border: none;
|
|
223
|
+
border-top: 1px solid var(--border);
|
|
224
|
+
margin: $spacing-lg 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// --------------------------------------------------------------------------
|
|
228
|
+
// Headings by class, for when the look and the document outline differ
|
|
229
|
+
// (e.g. a card title that is an h3 but should read as a small heading)
|
|
230
|
+
// --------------------------------------------------------------------------
|
|
231
|
+
|
|
232
|
+
.heading {
|
|
233
|
+
font-weight: $font-weight-semibold;
|
|
234
|
+
line-height: var(--leading-tight);
|
|
235
|
+
letter-spacing: var(--tracking-tight);
|
|
236
|
+
text-wrap: balance;
|
|
237
|
+
color: var(--fg);
|
|
238
|
+
|
|
239
|
+
@each $level, $sizes in $heading-sizes {
|
|
240
|
+
&--#{$level} {
|
|
241
|
+
font-size: var(--heading-#{$level});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// --------------------------------------------------------------------------
|
|
247
|
+
// Links (when styled)
|
|
248
|
+
// --------------------------------------------------------------------------
|
|
249
|
+
|
|
250
|
+
.link {
|
|
251
|
+
color: var(--primary);
|
|
252
|
+
text-decoration: underline;
|
|
253
|
+
text-underline-offset: 4px;
|
|
254
|
+
@include transition-colors;
|
|
255
|
+
|
|
256
|
+
&:hover {
|
|
257
|
+
color: var(--primary-hover);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&--muted {
|
|
261
|
+
color: var(--fg-muted);
|
|
262
|
+
|
|
263
|
+
&:hover {
|
|
264
|
+
color: var(--fg);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// --------------------------------------------------------------------------
|
|
270
|
+
// Text Utility Classes
|
|
271
|
+
// --------------------------------------------------------------------------
|
|
272
|
+
|
|
273
|
+
.text {
|
|
274
|
+
&--xs { font-size: $font-size-xs; }
|
|
275
|
+
&--sm { font-size: $font-size-sm; }
|
|
276
|
+
&--base { font-size: $font-size-base; }
|
|
277
|
+
&--lg { font-size: $font-size-lg; }
|
|
278
|
+
&--xl { font-size: $font-size-xl; }
|
|
279
|
+
&--2xl { font-size: $font-size-2xl; }
|
|
280
|
+
&--3xl { font-size: $font-size-3xl; }
|
|
281
|
+
&--4xl { font-size: $font-size-4xl; }
|
|
282
|
+
|
|
283
|
+
&--muted { color: var(--fg-muted); }
|
|
284
|
+
&--subtle { color: var(--fg-subtle); }
|
|
285
|
+
|
|
286
|
+
&--normal { font-weight: $font-weight-normal; }
|
|
287
|
+
&--medium { font-weight: $font-weight-medium; }
|
|
288
|
+
&--semibold { font-weight: $font-weight-semibold; }
|
|
289
|
+
&--bold { font-weight: $font-weight-bold; }
|
|
290
|
+
|
|
291
|
+
&--left { text-align: left; }
|
|
292
|
+
&--center { text-align: center; }
|
|
293
|
+
&--right { text-align: right; }
|
|
294
|
+
|
|
295
|
+
&--truncate { @include text-truncate; }
|
|
296
|
+
|
|
297
|
+
// Introductory paragraph under a page or section title
|
|
298
|
+
&--lead {
|
|
299
|
+
font-size: $font-size-lg;
|
|
300
|
+
line-height: var(--leading-relaxed);
|
|
301
|
+
color: var(--fg-muted);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Small uppercase label above a title or group
|
|
305
|
+
&--overline {
|
|
306
|
+
font-size: $font-size-xs;
|
|
307
|
+
font-weight: $font-weight-medium;
|
|
308
|
+
line-height: var(--leading-normal);
|
|
309
|
+
letter-spacing: 0.05em;
|
|
310
|
+
text-transform: uppercase;
|
|
311
|
+
color: var(--fg-muted);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// Figures that line up in columns and don't shift as they update
|
|
315
|
+
&--tabular { font-variant-numeric: tabular-nums; }
|
|
316
|
+
&--mono { font-family: var(--font-mono); }
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// --------------------------------------------------------------------------
|
|
320
|
+
// Prose (for content areas)
|
|
321
|
+
// --------------------------------------------------------------------------
|
|
322
|
+
|
|
323
|
+
.prose {
|
|
324
|
+
max-width: 65ch;
|
|
325
|
+
line-height: var(--leading-relaxed);
|
|
326
|
+
|
|
327
|
+
> * + * {
|
|
328
|
+
margin-top: $spacing-sm;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
h1, h2, h3, h4, h5, h6 {
|
|
332
|
+
margin-top: $spacing-xl;
|
|
333
|
+
margin-bottom: $spacing-sm;
|
|
334
|
+
|
|
335
|
+
&:first-child {
|
|
336
|
+
margin-top: 0;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
ul, ol {
|
|
341
|
+
padding-left: $spacing-lg;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
ul {
|
|
345
|
+
list-style-type: disc;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
ol {
|
|
349
|
+
list-style-type: decimal;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
li + li {
|
|
353
|
+
margin-top: $spacing-2xs;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
a {
|
|
357
|
+
color: var(--primary);
|
|
358
|
+
text-decoration: underline;
|
|
359
|
+
text-underline-offset: 4px;
|
|
360
|
+
|
|
361
|
+
&:hover {
|
|
362
|
+
text-decoration-thickness: 2px;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// --------------------------------------------------------------------------
|
|
368
|
+
// Screen Reader Only
|
|
369
|
+
// --------------------------------------------------------------------------
|
|
370
|
+
|
|
371
|
+
.sr-only {
|
|
372
|
+
@include sr-only;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// --------------------------------------------------------------------------
|
|
376
|
+
// Container
|
|
377
|
+
// --------------------------------------------------------------------------
|
|
378
|
+
|
|
379
|
+
.container {
|
|
380
|
+
width: 100%;
|
|
381
|
+
max-width: $breakpoint-xl;
|
|
382
|
+
margin-left: auto;
|
|
383
|
+
margin-right: auto;
|
|
384
|
+
padding-left: $spacing-sm;
|
|
385
|
+
padding-right: $spacing-sm;
|
|
386
|
+
|
|
387
|
+
@include md {
|
|
388
|
+
padding-left: $spacing-lg;
|
|
389
|
+
padding-right: $spacing-lg;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
@include lg {
|
|
393
|
+
padding-left: $spacing-xl;
|
|
394
|
+
padding-right: $spacing-xl;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
&--sm { max-width: $breakpoint-sm; }
|
|
398
|
+
&--md { max-width: $breakpoint-md; }
|
|
399
|
+
&--lg { max-width: $breakpoint-lg; }
|
|
400
|
+
&--xl { max-width: $breakpoint-xl; }
|
|
401
|
+
&--2xl { max-width: $breakpoint-2xl; }
|
|
402
|
+
&--full { max-width: none; }
|
|
403
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Datetime Picker
|
|
3
|
+
// Themes the shadow DOM of the @parallelogram-js/core <p-datetime> web component
|
|
4
|
+
// ==========================================================================
|
|
5
|
+
|
|
6
|
+
@use "variables" as *;
|
|
7
|
+
|
|
8
|
+
// Colours, surfaces and shadow come from the core tokens in _variables.scss; these are only the
|
|
9
|
+
// sizes where the dashboard differs from core's defaults
|
|
10
|
+
p-datetime {
|
|
11
|
+
// Spacing
|
|
12
|
+
--datetime-padding-x: #{$spacing-xs};
|
|
13
|
+
--datetime-padding-y: #{$spacing-2xs};
|
|
14
|
+
--datetime-space-sm: #{$spacing-3xs};
|
|
15
|
+
--datetime-space-lg: #{$spacing-xs};
|
|
16
|
+
--datetime-gap: #{$spacing-2xs};
|
|
17
|
+
|
|
18
|
+
// Border radius
|
|
19
|
+
--datetime-radius: #{$radius};
|
|
20
|
+
--datetime-radius-xl: #{$radius-lg};
|
|
21
|
+
|
|
22
|
+
// Opacity
|
|
23
|
+
--datetime-disabled-opacity: 0.4;
|
|
24
|
+
|
|
25
|
+
// Timing
|
|
26
|
+
--datetime-transition: #{$transition-base};
|
|
27
|
+
|
|
28
|
+
// Sizes
|
|
29
|
+
--datetime-cell-size: 2.5rem;
|
|
30
|
+
--datetime-font-sm: #{$font-size-xs};
|
|
31
|
+
--datetime-font-md: #{$font-size-sm};
|
|
32
|
+
|
|
33
|
+
display: block;
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Styling p-datetime to match our input styles
|
|
38
|
+
p-datetime.input {
|
|
39
|
+
position: relative;
|
|
40
|
+
min-height: #{$btn-height-md};
|
|
41
|
+
background-color: var(--bg);
|
|
42
|
+
border: 1px solid var(--border);
|
|
43
|
+
border-radius: #{$radius-md};
|
|
44
|
+
font-size: #{$font-size-sm};
|
|
45
|
+
|
|
46
|
+
&:focus-within {
|
|
47
|
+
border-color: var(--ring);
|
|
48
|
+
box-shadow: 0 0 0 3px var(--ring-alpha);
|
|
49
|
+
}
|
|
50
|
+
}
|
package/scss/_icon.scss
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Icon - SVG icon styling
|
|
3
|
+
// ==========================================================================
|
|
4
|
+
|
|
5
|
+
.icon {
|
|
6
|
+
width: 1.25rem;
|
|
7
|
+
height: 1.25rem;
|
|
8
|
+
stroke: currentColor;
|
|
9
|
+
stroke-width: var(--icon-stroke-width);
|
|
10
|
+
stroke-linecap: round;
|
|
11
|
+
stroke-linejoin: round;
|
|
12
|
+
fill: none;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Size variants
|
|
17
|
+
.icon--xs {
|
|
18
|
+
width: 0.75rem;
|
|
19
|
+
height: 0.75rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.icon--sm {
|
|
23
|
+
width: 1rem;
|
|
24
|
+
height: 1rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.icon--lg {
|
|
28
|
+
width: 1.5rem;
|
|
29
|
+
height: 1.5rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.icon--xl {
|
|
33
|
+
width: 2rem;
|
|
34
|
+
height: 2rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.icon--2xl {
|
|
38
|
+
width: 2.5rem;
|
|
39
|
+
height: 2.5rem;
|
|
40
|
+
}
|
package/scss/_index.scss
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/// Parallelogram Dashboard
|
|
2
|
+
///
|
|
3
|
+
/// Forwards the foundation and every component. Configure it with
|
|
4
|
+
/// @use "@parallelogram-js/dashboard/scss" with ($font-sans: ...);
|
|
5
|
+
|
|
6
|
+
// Foundation
|
|
7
|
+
@forward "variables";
|
|
8
|
+
@forward "tokens";
|
|
9
|
+
@forward "mixins";
|
|
10
|
+
@forward "base";
|
|
11
|
+
@forward "icon";
|
|
12
|
+
@forward "datetime";
|
|
13
|
+
@forward "utilities";
|
|
14
|
+
|
|
15
|
+
// Core Components
|
|
16
|
+
@forward "components/button";
|
|
17
|
+
@forward "components/input";
|
|
18
|
+
@forward "components/card";
|
|
19
|
+
@forward "components/badge";
|
|
20
|
+
@forward "components/alert";
|
|
21
|
+
@forward "components/table";
|
|
22
|
+
|
|
23
|
+
// Dashboard Components
|
|
24
|
+
@forward "components/sidebar";
|
|
25
|
+
@forward "components/navbar";
|
|
26
|
+
@forward "components/dropdown";
|
|
27
|
+
@forward "components/modal";
|
|
28
|
+
@forward "components/tabs";
|
|
29
|
+
@forward "components/breadcrumb";
|
|
30
|
+
@forward "components/pageheader";
|
|
31
|
+
@forward "components/dashboard";
|
|
32
|
+
|
|
33
|
+
// Additional Components
|
|
34
|
+
@forward "components/avatar";
|
|
35
|
+
@forward "components/tooltip";
|
|
36
|
+
@forward "components/progress";
|
|
37
|
+
@forward "components/skeleton";
|
|
38
|
+
@forward "components/stat";
|
|
39
|
+
@forward "components/separator";
|
|
40
|
+
@forward "components/command";
|
|
41
|
+
|
|
42
|
+
// New Components
|
|
43
|
+
@forward "components/pagination";
|
|
44
|
+
@forward "components/toolbar";
|
|
45
|
+
@forward "components/empty";
|
|
46
|
+
@forward "components/form-layout";
|
|
47
|
+
|
|
48
|
+
// Latest Components
|
|
49
|
+
@forward "components/accordion";
|
|
50
|
+
@forward "components/banner";
|
|
51
|
+
@forward "components/data-list";
|
|
52
|
+
@forward "components/sheet";
|
|
53
|
+
@forward "components/timeline";
|
|
54
|
+
@forward "components/toast";
|
|
55
|
+
@forward "components/chart";
|
|
56
|
+
@forward "components/actionbar";
|
|
57
|
+
@forward "components/notification";
|
|
58
|
+
@forward "components/list";
|
|
59
|
+
@forward "components/media";
|
|
60
|
+
@forward "components/filebrowser";
|