@richardmcquiston01/dashboard-widgets-toolkit 0.1.0 → 0.4.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 +113 -8
- package/dist/core.cjs +690 -64
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +87 -18
- package/dist/core.d.ts +87 -18
- package/dist/core.js +666 -65
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +690 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +666 -65
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +1594 -72
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +164 -14
- package/dist/react.d.ts +164 -14
- package/dist/react.js +1592 -74
- package/dist/react.js.map +1 -1
- package/dist/{scale-WlRozDCf.d.cts → scale-dWDGE1zW.d.cts} +327 -108
- package/dist/{scale-WlRozDCf.d.ts → scale-dWDGE1zW.d.ts} +327 -108
- package/dist/styles.css +156 -6
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* the page sets data-theme="light"; data-theme="dark" or a "dark" class on
|
|
8
8
|
* <html> forces it.
|
|
9
9
|
*
|
|
10
|
-
* Chart
|
|
11
|
-
* validated for
|
|
10
|
+
* Chart colors are the dataviz reference palette: eight categorical slots
|
|
11
|
+
* validated for color-vision deficiency, each stepped separately for the
|
|
12
12
|
* dark surface (not an automatic flip).
|
|
13
13
|
*/
|
|
14
14
|
|
|
@@ -124,10 +124,37 @@
|
|
|
124
124
|
grid-column: span 2;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
:where(.dwt-card--fill-height) {
|
|
128
|
+
align-self: stretch;
|
|
129
|
+
}
|
|
130
|
+
|
|
127
131
|
:where(.dwt-card--size-full) {
|
|
128
132
|
grid-column: 1 / -1;
|
|
129
133
|
}
|
|
130
134
|
|
|
135
|
+
/* Twelve-column grid: used when any widget sets `width`. A widget spans
|
|
136
|
+
--dwt-width twelfths; narrower grids give widgets more room. */
|
|
137
|
+
:where(.dwt-grid--twelve) {
|
|
138
|
+
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
139
|
+
container-type: inline-size;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:where(.dwt-grid--twelve > .dwt-card) {
|
|
143
|
+
grid-column: span var(--dwt-width, 4);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@container (max-width: 900px) {
|
|
147
|
+
:where(.dwt-grid--twelve > .dwt-card) {
|
|
148
|
+
grid-column: span min(12, calc(var(--dwt-width, 4) * 2));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@container (max-width: 560px) {
|
|
153
|
+
:where(.dwt-grid--twelve > .dwt-card) {
|
|
154
|
+
grid-column: 1 / -1;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
131
158
|
@media (max-width: 640px) {
|
|
132
159
|
:where(.dwt-card--size-large) {
|
|
133
160
|
grid-column: auto;
|
|
@@ -226,10 +253,30 @@
|
|
|
226
253
|
}
|
|
227
254
|
|
|
228
255
|
:where(.dwt-icon-button) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
256
|
+
display: inline-flex;
|
|
257
|
+
align-items: center;
|
|
258
|
+
justify-content: center;
|
|
259
|
+
box-sizing: border-box;
|
|
260
|
+
width: 28px;
|
|
261
|
+
height: 28px;
|
|
262
|
+
padding: 0;
|
|
263
|
+
line-height: 1;
|
|
264
|
+
background: var(--dwt-surface, transparent);
|
|
265
|
+
border-color: var(--dwt-border);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
:where(.dwt-external-icon) {
|
|
269
|
+
margin-left: 0.25em;
|
|
270
|
+
vertical-align: -0.1em;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
:where(.dwt-visually-hidden) {
|
|
274
|
+
position: absolute;
|
|
275
|
+
width: 1px;
|
|
276
|
+
height: 1px;
|
|
277
|
+
overflow: hidden;
|
|
278
|
+
clip-path: inset(50%);
|
|
279
|
+
white-space: nowrap;
|
|
233
280
|
}
|
|
234
281
|
|
|
235
282
|
:where(
|
|
@@ -548,3 +595,106 @@
|
|
|
548
595
|
border: 1px solid CanvasText;
|
|
549
596
|
}
|
|
550
597
|
}
|
|
598
|
+
|
|
599
|
+
/* Detail view ------------------------------------------------------------- */
|
|
600
|
+
|
|
601
|
+
:where(.dwt-card-title-button) {
|
|
602
|
+
all: unset;
|
|
603
|
+
cursor: pointer;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
:where(.dwt-card-title-button:hover) {
|
|
607
|
+
text-decoration: underline;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
:where(.dwt-detail-dialog) {
|
|
611
|
+
box-sizing: border-box;
|
|
612
|
+
width: min(960px, 100vw - 32px);
|
|
613
|
+
max-height: calc(100vh - 32px);
|
|
614
|
+
padding: 0;
|
|
615
|
+
overflow: auto;
|
|
616
|
+
color: var(--dwt-text);
|
|
617
|
+
background: var(--dwt-surface);
|
|
618
|
+
border: 1px solid var(--dwt-border);
|
|
619
|
+
border-radius: var(--dwt-radius, 8px);
|
|
620
|
+
font-family: var(--dwt-font);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
:where(.dwt-detail-dialog)::backdrop {
|
|
624
|
+
background: rgba(0, 0, 0, 0.5);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
:where(.dwt-detail-dialog-body) {
|
|
628
|
+
position: relative;
|
|
629
|
+
padding: 20px;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
:where(.dwt-detail-close) {
|
|
633
|
+
position: absolute;
|
|
634
|
+
top: 16px;
|
|
635
|
+
right: 16px;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
:where(.dwt-detail-title) {
|
|
639
|
+
margin: 0 72px 12px 0;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
:where(.dwt-detail-controls) {
|
|
643
|
+
display: flex;
|
|
644
|
+
flex-wrap: wrap;
|
|
645
|
+
gap: 12px;
|
|
646
|
+
margin-bottom: 8px;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
:where(.dwt-detail-field) {
|
|
650
|
+
display: flex;
|
|
651
|
+
flex-direction: column;
|
|
652
|
+
gap: 4px;
|
|
653
|
+
font-size: 0.8125rem;
|
|
654
|
+
color: var(--dwt-text-secondary);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
:where(.dwt-detail-field input) {
|
|
658
|
+
font: inherit;
|
|
659
|
+
color: var(--dwt-text);
|
|
660
|
+
background: var(--dwt-surface);
|
|
661
|
+
border: 1px solid var(--dwt-border);
|
|
662
|
+
border-radius: 6px;
|
|
663
|
+
padding: 4px 8px;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
:where(.dwt-detail-summary) {
|
|
667
|
+
margin: 8px 0;
|
|
668
|
+
font-size: 0.8125rem;
|
|
669
|
+
color: var(--dwt-text-secondary);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
:where(.dwt-detail-sort) {
|
|
673
|
+
all: unset;
|
|
674
|
+
cursor: pointer;
|
|
675
|
+
font-weight: inherit;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
:where(.dwt-detail-sort:focus-visible) {
|
|
679
|
+
outline: 2px solid var(--dwt-focus);
|
|
680
|
+
outline-offset: 2px;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
:where(.dwt-detail-pager) {
|
|
684
|
+
display: flex;
|
|
685
|
+
align-items: center;
|
|
686
|
+
justify-content: center;
|
|
687
|
+
gap: 12px;
|
|
688
|
+
margin-top: 12px;
|
|
689
|
+
font-size: 0.875rem;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
@media (max-width: 640px) {
|
|
693
|
+
:where(.dwt-detail-dialog) {
|
|
694
|
+
width: 100vw;
|
|
695
|
+
max-width: 100vw;
|
|
696
|
+
height: 100vh;
|
|
697
|
+
max-height: 100vh;
|
|
698
|
+
border-radius: 0;
|
|
699
|
+
}
|
|
700
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@richardmcquiston01/dashboard-widgets-toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Framework-agnostic dashboard widget toolkit: typed widget definitions and data payloads (KPI, gauge, table, bar list, alert list, chart), user layout (order, hide, minimise), and React renderers. Bring your own data providers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dashboard",
|