@ulu/frontend 0.2.0-beta.9 → 0.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/README.dev.md +52 -13
- package/README.md +3 -1
- package/dist/es/core/events.js +36 -25
- package/dist/es/core/settings.js +33 -22
- package/dist/es/index.js +47 -45
- package/dist/es/ui/dialog.d.ts +3 -1
- package/dist/es/ui/dialog.d.ts.map +1 -1
- package/dist/es/ui/dialog.js +70 -53
- package/dist/es/ui/index.d.ts +1 -0
- package/dist/es/ui/modal-builder.d.ts +6 -0
- package/dist/es/ui/modal-builder.d.ts.map +1 -1
- package/dist/es/ui/modal-builder.js +66 -47
- package/dist/es/ui/overflow-scroller.js +30 -24
- package/dist/es/ui/proxy-click.js +37 -26
- package/dist/es/ui/resizer.js +57 -49
- package/dist/es/ui/slider.d.ts.map +1 -1
- package/dist/es/ui/slider.js +90 -67
- package/dist/es/ui/tab-manager.d.ts +145 -0
- package/dist/es/ui/tab-manager.d.ts.map +1 -0
- package/dist/es/ui/tab-manager.js +155 -0
- package/dist/es/ui/tabs.d.ts +5 -5
- package/dist/es/ui/tabs.d.ts.map +1 -1
- package/dist/es/ui/tabs.js +34 -51
- package/dist/es/ui/theme-toggle.js +80 -69
- package/dist/es/ui/tooltip.js +53 -44
- package/dist/es/utils/dialog.d.ts +14 -0
- package/dist/es/utils/dialog.d.ts.map +1 -0
- package/dist/es/utils/dialog.js +16 -0
- package/dist/es/utils/floating-ui.js +35 -24
- package/dist/es/utils/iframe.d.ts +15 -0
- package/dist/es/utils/iframe.d.ts.map +1 -0
- package/dist/es/utils/iframe.js +33 -0
- package/dist/umd/frontend.css +1 -0
- package/dist/umd/ulu-frontend.umd.js +40 -47
- package/lib/js/exports.md +1 -0
- package/lib/js/ui/dialog.js +23 -3
- package/lib/js/ui/index.js +4 -0
- package/lib/js/ui/modal-builder.js +21 -0
- package/lib/js/ui/slider.js +3 -3
- package/lib/js/ui/tab-manager.js +324 -0
- package/lib/js/ui/tabs.js +33 -92
- package/lib/js/utils/dialog.js +29 -0
- package/lib/js/utils/iframe.js +59 -0
- package/lib/scss/_breakpoint.scss +3 -3
- package/lib/scss/_button.scss +3 -3
- package/lib/scss/_color.scss +4 -3
- package/lib/scss/_element.scss +25 -4
- package/lib/scss/_layout.scss +11 -4
- package/lib/scss/_selector.scss +2 -1
- package/lib/scss/_typography.scss +9 -10
- package/lib/scss/_utils.scss +74 -19
- package/lib/scss/base/_elements.scss +4 -1
- package/lib/scss/components/_accordion.scss +7 -2
- package/lib/scss/components/_badge.scss +1 -1
- package/lib/scss/components/_basic-hero.scss +1 -1
- package/lib/scss/components/_button-group.scss +8 -3
- package/lib/scss/components/_button-verbose.scss +2 -2
- package/lib/scss/components/_callout.scss +3 -4
- package/lib/scss/components/_card-grid.scss +8 -14
- package/lib/scss/components/_card.scss +15 -13
- package/lib/scss/components/_css-icon.scss +2 -2
- package/lib/scss/components/_data-grid.scss +5 -5
- package/lib/scss/components/_data-list.scss +270 -0
- package/lib/scss/components/_data-table.scss +3 -1
- package/lib/scss/components/_flipcard.scss +3 -2
- package/lib/scss/components/_index.scss +18 -0
- package/lib/scss/components/_menu-stack.scss +1 -1
- package/lib/scss/components/_modal.scss +97 -19
- package/lib/scss/components/_panel.scss +1 -1
- package/lib/scss/components/_popover.scss +9 -6
- package/lib/scss/components/_ratio-box.scss +11 -10
- package/lib/scss/components/_table-scroller.scss +63 -0
- package/lib/scss/components/_tabs.scss +20 -5
- package/lib/scss/components/_tagged.scss +59 -0
- package/lib/scss/helpers/_utilities.scss +23 -1
- package/package.json +28 -35
- package/dist/umd/style.css +0 -1
- package/lib/js/ui/dialog.todo +0 -3
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
|
|
12
12
|
/// Module Settings
|
|
13
13
|
/// @type Map
|
|
14
|
-
/// @prop {
|
|
15
|
-
/// @prop {Dimension}
|
|
16
|
-
/// @prop {Dimension} gap [
|
|
17
|
-
/// @prop {
|
|
14
|
+
/// @prop {Dimension} gap [1.5rem] The grid gap of the card-grid.
|
|
15
|
+
/// @prop {Dimension} min-width [20rem] The min-width for the implicit grid columns.
|
|
16
|
+
/// @prop {Dimension} compact-gap [0.75rem] The grid gap of the card-grid--compact.
|
|
17
|
+
/// @prop {Dimension} compact-min-width [14rem] The min-width for the implicit grid columns of the card-grid--compact.
|
|
18
18
|
|
|
19
19
|
$config: (
|
|
20
20
|
"gap" : 1.5rem,
|
|
21
|
-
"
|
|
21
|
+
"min-width" : 20rem,
|
|
22
22
|
"compact-gap" : 0.75rem,
|
|
23
|
-
"compact-
|
|
23
|
+
"compact-min-width" : 14rem,
|
|
24
24
|
) !default;
|
|
25
25
|
|
|
26
26
|
/// Change modules $config
|
|
@@ -51,12 +51,11 @@ $config: (
|
|
|
51
51
|
|
|
52
52
|
#{ $prefix } {
|
|
53
53
|
display: grid;
|
|
54
|
-
grid-template-columns: get("
|
|
54
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, get("min-width")), 1fr));
|
|
55
55
|
grid-auto-rows: 1fr;
|
|
56
56
|
gap: get("gap");
|
|
57
57
|
margin: get("gap") 0;
|
|
58
58
|
#{ $prefix-card } {
|
|
59
|
-
max-width: none;
|
|
60
59
|
margin: 0;
|
|
61
60
|
&:not(#{ $prefix-card }--overlay) {
|
|
62
61
|
height: 100%;
|
|
@@ -64,7 +63,7 @@ $config: (
|
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
#{ $prefix }--compact {
|
|
67
|
-
grid-template-columns: get("compact-
|
|
66
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, get("compact-min-width")), 1fr));
|
|
68
67
|
gap: get("compact-gap");
|
|
69
68
|
}
|
|
70
69
|
#{ $prefix }--one-column {
|
|
@@ -73,9 +72,4 @@ $config: (
|
|
|
73
72
|
#{ $prefix }--rows-fit {
|
|
74
73
|
grid-auto-rows: auto;
|
|
75
74
|
}
|
|
76
|
-
@include breakpoint.max("small") {
|
|
77
|
-
#{ $prefix } {
|
|
78
|
-
grid-template-columns: 1fr;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
75
|
}
|
|
@@ -235,9 +235,6 @@ $config: (
|
|
|
235
235
|
flex-direction: column;
|
|
236
236
|
min-height: get("body-min-height");
|
|
237
237
|
}
|
|
238
|
-
#{ $prefix }__main {
|
|
239
|
-
flex-grow: 1;
|
|
240
|
-
}
|
|
241
238
|
#{ $prefix }__footer {
|
|
242
239
|
grid-column: 1;
|
|
243
240
|
display: flex;
|
|
@@ -509,19 +506,23 @@ $config: (
|
|
|
509
506
|
}
|
|
510
507
|
}
|
|
511
508
|
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
509
|
+
|
|
510
|
+
@include when-clickable($hover: true) {
|
|
511
|
+
&#{ $prefix }--overlay {
|
|
512
|
+
#{ $prefix }__body,
|
|
513
|
+
#{ $prefix }__footer {
|
|
514
|
+
background-color: color.get(get("overlay-background-color-hover"));
|
|
515
|
+
}
|
|
516
|
+
@if (get("overlay-shading")) {
|
|
517
|
+
#{ $prefix }__body {
|
|
518
|
+
@include -overlay-shading-gradient(
|
|
519
|
+
color.get(get("overlay-background-color-hover"))
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
+
|
|
525
526
|
#{ $prefix }--overlay#{ $prefix }--footer-inline {
|
|
526
527
|
grid-template-columns: 1fr auto;
|
|
527
528
|
#{ $prefix }__footer {
|
|
@@ -561,6 +562,7 @@ $config: (
|
|
|
561
562
|
justify-content: space-between;
|
|
562
563
|
}
|
|
563
564
|
#{ $prefix }__main {
|
|
565
|
+
flex-grow: 1;
|
|
564
566
|
max-width: get("horizontal-main-max-width");
|
|
565
567
|
}
|
|
566
568
|
#{ $prefix }__aside {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
@use "sass:map";
|
|
19
19
|
@use "sass:math";
|
|
20
|
-
@use "../color";
|
|
21
20
|
|
|
21
|
+
@use "../color";
|
|
22
22
|
@use "../utils";
|
|
23
23
|
|
|
24
24
|
/// Module Settings
|
|
@@ -322,7 +322,7 @@ $config: (
|
|
|
322
322
|
|
|
323
323
|
@include for-each-stroke() using ($alt-width, $alt-border-radius) {
|
|
324
324
|
// $drag-gap-multiplier: map.get($props, "drag-gap-multiplier");
|
|
325
|
-
// $drag-gap-multiplier:
|
|
325
|
+
// $drag-gap-multiplier: utils.when($drag-gap-multiplier, $drag-gap-multiplier, 0);
|
|
326
326
|
&[class*="css-icon--drag"] {
|
|
327
327
|
&::before {
|
|
328
328
|
margin-top: -(($alt-width + $alt-width) * get("drag-gap-multiplier"));
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
@use "sass:map";
|
|
7
7
|
@use "sass:math";
|
|
8
8
|
|
|
9
|
+
@use "../utils";
|
|
9
10
|
@use "../breakpoint";
|
|
10
11
|
@use "../color";
|
|
11
12
|
@use "../element";
|
|
12
13
|
@use "../layout";
|
|
13
14
|
@use "../selector";
|
|
14
15
|
@use "../typography";
|
|
15
|
-
@use "../utils";
|
|
16
16
|
|
|
17
17
|
/// Module Settings
|
|
18
18
|
/// @type Map
|
|
@@ -96,7 +96,7 @@ $config: (
|
|
|
96
96
|
@if (not $name) {
|
|
97
97
|
@return get("gutter");
|
|
98
98
|
} @else {
|
|
99
|
-
$map:
|
|
99
|
+
$map: utils.fallback($custom-map, get("extra-breakpoints"));
|
|
100
100
|
$settings: utils.require-map-get($map, $name, "grid [get-gutter]");
|
|
101
101
|
@return map.get($settings, "gutter");
|
|
102
102
|
}
|
|
@@ -138,7 +138,7 @@ $config: (
|
|
|
138
138
|
@mixin create(
|
|
139
139
|
$columns: get("columns"),
|
|
140
140
|
$breakpoint: get-default-breakpoint(),
|
|
141
|
-
$extra-breakpoints:
|
|
141
|
+
$extra-breakpoints: utils.when(breakpoint.exists("large"), get("extra-breakpoints"), false),
|
|
142
142
|
$gutter: get("gutter"),
|
|
143
143
|
$include-rules: false,
|
|
144
144
|
$rule-size: get("rule-size"),
|
|
@@ -513,7 +513,7 @@ $config: (
|
|
|
513
513
|
@include -create-extra-breakpoint(
|
|
514
514
|
$name: $name,
|
|
515
515
|
$breakpoint: map.get($options, "breakpoint"),
|
|
516
|
-
$gutter:
|
|
516
|
+
$gutter: utils.fallback($g, $gutter),
|
|
517
517
|
$columns: $columns,
|
|
518
518
|
$attribute: $attribute,
|
|
519
519
|
$attribute-item: $attribute-item,
|
|
@@ -760,7 +760,7 @@ $config: (
|
|
|
760
760
|
$select-rule-row,
|
|
761
761
|
$between: false
|
|
762
762
|
) {
|
|
763
|
-
$key:
|
|
763
|
+
$key: utils.when($between, 'between', $position);
|
|
764
764
|
|
|
765
765
|
&#{'[#{ $attribute }*="rules-row: #{ $key }"]'} {
|
|
766
766
|
> #{ $select-item } {
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group data-list
|
|
3
|
+
/// A highly flexible, responsive list layout designed for displaying self-explanatory
|
|
4
|
+
/// or loosely structured data without relying on rigid table markup. On large screens,
|
|
5
|
+
/// it perfectly aligns item content into distinct columns using CSS Subgrid, while
|
|
6
|
+
/// seamlessly adapting to a clean, stacked flex view on smaller devices. Because it
|
|
7
|
+
/// is fundamentally a list and not a data table, content within should be comprehensible
|
|
8
|
+
/// when stacked without relying on explicit column headers. It handles complex structures
|
|
9
|
+
/// through nested groupings, supports optional visual headers, and provides interactive
|
|
10
|
+
/// states for clickable rows using simple presets or custom grids.
|
|
11
|
+
////
|
|
12
|
+
|
|
13
|
+
/// Benchmarks:
|
|
14
|
+
/// - size: 3kb (gzip 0.7 KB)
|
|
15
|
+
|
|
16
|
+
@use "sass:map";
|
|
17
|
+
@use "sass:math";
|
|
18
|
+
@use "sass:meta";
|
|
19
|
+
|
|
20
|
+
@use "../selector";
|
|
21
|
+
@use "../utils";
|
|
22
|
+
@use "../color";
|
|
23
|
+
@use "../breakpoint";
|
|
24
|
+
@use "../element";
|
|
25
|
+
|
|
26
|
+
// Used for function fallback
|
|
27
|
+
$-fallbacks: (
|
|
28
|
+
"stacked-breakpoint" : (
|
|
29
|
+
"function" : meta.get-function("get", false, "breakpoint"),
|
|
30
|
+
"property" : "default"
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
/// Module Settings
|
|
35
|
+
/// @type Map
|
|
36
|
+
/// @prop {String} grid-template-columns [1fr] The default master grid columns.
|
|
37
|
+
/// @prop {String} grid-template-columns-stacked [100%] The stacked grid columns (default is single column stack).
|
|
38
|
+
/// @prop {Dimension} row-gap [0] The space between list items (rows). Forced to 0 if overlap-borders is true.
|
|
39
|
+
/// @prop {Dimension} column-gap [1rem] The space between columns.
|
|
40
|
+
/// @prop {Dimension} column-gap-stacked [0.5rem] The space between stacked elements when stacked within an item.
|
|
41
|
+
/// @prop {Dimension} group-gap-stacked [0.25rem] The space between stacked elements inside a nested column when stacked.
|
|
42
|
+
/// @prop {Dimension} padding [1rem clamp(0.65rem, 3vw, 1.5rem),] The padding inside list items.
|
|
43
|
+
/// @prop {Boolean} overlap-borders [true] If true, applies a negative top margin to items to prevent double-thick borders between touching rows, and forces row-gap to 0.
|
|
44
|
+
/// @prop {Dimension} border-width [1px] The border width for the list items.
|
|
45
|
+
/// @prop {String} border-color ["rule-light"] The border color key for the list items.
|
|
46
|
+
/// @prop {Dimension} border-radius [null] The border radius for the list items.
|
|
47
|
+
/// @prop {CssValue} box-shadow [null] The box shadow for the list items.
|
|
48
|
+
/// @prop {Color} background-color [transparent] The default background color for items.
|
|
49
|
+
/// @prop {Color} background-color-even [null] The background color for even-numbered items (for striping).
|
|
50
|
+
/// @prop {Color} background-color-hover [null] The background color for items on hover.
|
|
51
|
+
/// @prop {Color} clickable-background-color-hover [#e8e8e8] The background color for clickable items on hover.
|
|
52
|
+
/// @prop {String} clickable-border-color-hover ["control-border-hover"] The border color for interactive (clickable) items on hover/focus.
|
|
53
|
+
/// @prop {String} stacked-breakpoint [true] The breakpoint below which groups stack. Defaults to the global default breakpoint via function fallback.
|
|
54
|
+
/// @prop {Number} span-count [4] The number of span modifiers to create, increase if needed, (ie. data-list__column--span-2, --span-3, ...)
|
|
55
|
+
/// @prop {CssValue} header-font-weight [bold] The font weight for the header row text.
|
|
56
|
+
/// @prop {Dimension} header-border-bottom-width [2px] The width for the bottom border of the header row.
|
|
57
|
+
/// @prop {String} header-border-bottom-color ["rule"] The color key for the bottom border of the header row.
|
|
58
|
+
|
|
59
|
+
$config: (
|
|
60
|
+
"grid-template-columns": 1fr,
|
|
61
|
+
"grid-template-columns-stacked": 100%,
|
|
62
|
+
"row-gap": 0,
|
|
63
|
+
"column-gap": 1rem,
|
|
64
|
+
"column-gap-stacked": 0.5rem,
|
|
65
|
+
"group-gap-stacked": 0.25rem,
|
|
66
|
+
"padding": 1rem clamp(0.65rem, 3vw, 1.5rem),
|
|
67
|
+
"overlap-borders": true,
|
|
68
|
+
"border-width": 1px,
|
|
69
|
+
"border-color": "rule-light",
|
|
70
|
+
"border-radius": null,
|
|
71
|
+
"box-shadow": null,
|
|
72
|
+
"background-color": transparent,
|
|
73
|
+
"background-color-even": #f9f9f9,
|
|
74
|
+
"background-color-hover": #f0f0f0,
|
|
75
|
+
"clickable-background-color-hover": #e8e8e8, // Slightly darker for interactive indication
|
|
76
|
+
"clickable-border-color-hover": "control-border-hover",
|
|
77
|
+
"stacked-breakpoint": true,
|
|
78
|
+
"span-count" : 6,
|
|
79
|
+
"header-font-weight": bold,
|
|
80
|
+
"header-border-bottom-width": 2px,
|
|
81
|
+
"header-border-bottom-color": "rule",
|
|
82
|
+
) !default;
|
|
83
|
+
|
|
84
|
+
/// Change modules $config
|
|
85
|
+
/// @param {Map} $changes Map of changes
|
|
86
|
+
@mixin set($changes) {
|
|
87
|
+
$config: map.merge($config, $changes) !global;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/// Get a config option
|
|
91
|
+
/// @param {Map} $name Name of property
|
|
92
|
+
@function get($name) {
|
|
93
|
+
$value: utils.require-map-get($config, $name, "data-list [config]");
|
|
94
|
+
@return utils.function-fallback($name, $value, $-fallbacks);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/// Prints component styles
|
|
98
|
+
/// @demo data-list
|
|
99
|
+
@mixin styles {
|
|
100
|
+
@include utils.file-header('component', 'data-list');
|
|
101
|
+
|
|
102
|
+
$prefix: selector.class("data-list");
|
|
103
|
+
$stacked-bp: get("stacked-breakpoint");
|
|
104
|
+
$overlap: get("overlap-borders");
|
|
105
|
+
$border-width: get("border-width");
|
|
106
|
+
|
|
107
|
+
#{ $prefix } {
|
|
108
|
+
display: grid;
|
|
109
|
+
|
|
110
|
+
@if $overlap {
|
|
111
|
+
gap: 0; // Forced to 0 when borders overlap to prevent disjointed negative margins
|
|
112
|
+
} @else {
|
|
113
|
+
gap: var(--ulu-data-list-row-gap, get("row-gap"));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Allows inline override via custom property, falls back to config default
|
|
117
|
+
grid-template-columns: var(--ulu-data-list-columns, get("grid-template-columns"));
|
|
118
|
+
list-style: none;
|
|
119
|
+
margin: 0;
|
|
120
|
+
padding: 0;
|
|
121
|
+
|
|
122
|
+
@include breakpoint.max($stacked-bp) {
|
|
123
|
+
// Switch to stacked grid template (defaults to 100% stack, but can be overridden for persistent cols)
|
|
124
|
+
grid-template-columns: var(--ulu-data-list-columns-stacked, get("grid-template-columns-stacked"));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Row Item (Passes the grid down)
|
|
129
|
+
#{ $prefix }__item {
|
|
130
|
+
display: grid;
|
|
131
|
+
grid-template-columns: subgrid;
|
|
132
|
+
grid-column: 1 / -1;
|
|
133
|
+
gap: var(--ulu-data-list-column-gap, get("column-gap"));
|
|
134
|
+
padding: get("padding");
|
|
135
|
+
background-color: color.get(get("background-color"));
|
|
136
|
+
border: element.optional-border($border-width, get("border-color"));
|
|
137
|
+
border-radius: get("border-radius");
|
|
138
|
+
box-shadow: get("box-shadow");
|
|
139
|
+
|
|
140
|
+
@if $overlap {
|
|
141
|
+
margin-top: calc(-1 * #{ $border-width });
|
|
142
|
+
&:first-child {
|
|
143
|
+
margin-top: 0;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
@include breakpoint.max($stacked-bp) {
|
|
150
|
+
// We keep display: grid/subgrid here to respect the stacked parent grid
|
|
151
|
+
gap: var(--ulu-data-list-column-gap-stacked, get("column-gap-stacked"));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@if (get("background-color-hover")) {
|
|
155
|
+
&:hover {
|
|
156
|
+
background-color: color.get(get("background-color-hover"));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Interactive z-index management for borders/shadows
|
|
162
|
+
#{ $prefix }__item:hover,
|
|
163
|
+
#{ $prefix }__item:focus-within,
|
|
164
|
+
#{ $prefix }__header #{ $prefix }__item {
|
|
165
|
+
position: relative;
|
|
166
|
+
z-index: 2;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Columns (The cells / wrappers)
|
|
170
|
+
#{ $prefix }__column {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
gap: var(--ulu-data-list-column-gap, get("column-gap"));
|
|
174
|
+
// Defensive Layout: Prevents flexbox/grid from refusing to shrink below intrinsic content size.
|
|
175
|
+
// Without this, a long unbroken word or URL could force the column to expand, blowing out the grid.
|
|
176
|
+
// It allows text-overflow: ellipsis to work safely within a column without breaking the layout.
|
|
177
|
+
min-width: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Automatic Groups (Subgrid on desktop, stack on smaller screens)
|
|
181
|
+
#{ $prefix }__column:has(> #{ $prefix }__column) {
|
|
182
|
+
display: grid;
|
|
183
|
+
grid-template-columns: subgrid;
|
|
184
|
+
// Default span is 1, use modifiers below for larger spans
|
|
185
|
+
|
|
186
|
+
@include breakpoint.max($stacked-bp) {
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
align-items: stretch;
|
|
191
|
+
gap: var(--ulu-data-list-group-gap-stacked, get("group-gap-stacked")); // Tighter vertical gap when stacked
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Header Row (Optional)
|
|
196
|
+
#{ $prefix }__header {
|
|
197
|
+
display: contents; // Removes wrapper so children participate in grid
|
|
198
|
+
|
|
199
|
+
// Hide headers when stacked since columns stack
|
|
200
|
+
@include breakpoint.max($stacked-bp) {
|
|
201
|
+
display: none;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
#{ $prefix }__item {
|
|
205
|
+
font-weight: get("header-font-weight");
|
|
206
|
+
background-color: transparent;
|
|
207
|
+
border-bottom: element.optional-border(get("header-border-bottom-width"), get("header-border-bottom-color"));
|
|
208
|
+
border-radius: 0; // Prevent rounding on headers
|
|
209
|
+
&:hover {
|
|
210
|
+
background-color: transparent; // No hover effect on headers
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Modifiers
|
|
216
|
+
|
|
217
|
+
// Structural Edge Modifiers (Decorating the default 1fr track)
|
|
218
|
+
#{ $prefix }--prefixed {
|
|
219
|
+
grid-template-columns: var(--ulu-data-list-columns, auto 1fr);
|
|
220
|
+
@include breakpoint.max($stacked-bp) {
|
|
221
|
+
grid-template-columns: var(--ulu-data-list-columns-stacked, auto 1fr);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
#{ $prefix }--suffixed {
|
|
225
|
+
grid-template-columns: var(--ulu-data-list-columns, 1fr auto);
|
|
226
|
+
@include breakpoint.max($stacked-bp) {
|
|
227
|
+
grid-template-columns: var(--ulu-data-list-columns-stacked, 1fr auto);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
#{ $prefix }--prefixed#{ $prefix }--suffixed {
|
|
231
|
+
grid-template-columns: var(--ulu-data-list-columns, auto 1fr auto);
|
|
232
|
+
@include breakpoint.max($stacked-bp) {
|
|
233
|
+
grid-template-columns: var(--ulu-data-list-columns-stacked, auto 1fr auto);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Striped Rows
|
|
238
|
+
#{ $prefix }--striped {
|
|
239
|
+
@if (get("background-color-even")) {
|
|
240
|
+
#{ $prefix }__item:nth-child(even) {
|
|
241
|
+
background-color: color.get(get("background-color-even"));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Interactive Rows (Proxy Click Support)
|
|
247
|
+
// Applied to parent to indicate all rows are interactive
|
|
248
|
+
#{ $prefix }--clickable {
|
|
249
|
+
#{ $prefix }__item {
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
&:hover,
|
|
252
|
+
&:focus-within {
|
|
253
|
+
background-color: color.get(get("clickable-background-color-hover"));
|
|
254
|
+
border-color: color.get(get("clickable-border-color-hover"));
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Spanning (Required when a subgrid contains multiple child columns)
|
|
260
|
+
@for $i from 2 through get("span-count") {
|
|
261
|
+
#{ $prefix }__column--span-#{$i} {
|
|
262
|
+
grid-column: span #{$i};
|
|
263
|
+
|
|
264
|
+
// Reset span when stacked so it fits the simplified grid
|
|
265
|
+
@include breakpoint.max($stacked-bp) {
|
|
266
|
+
grid-column: auto;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
@@ -27,6 +27,7 @@ $-fallbacks: (
|
|
|
27
27
|
/// @prop {Dimension} cell-padding [(0.5em,)] Padding of the th and td elements.
|
|
28
28
|
/// @prop {CssValue} text-align [left] Text align of the table.
|
|
29
29
|
/// @prop {String} type-size ["small"] Font size of the table.
|
|
30
|
+
/// @prop {CssValue} vertical-align [top] Vertical align for td/th
|
|
30
31
|
/// @prop {Color} background-color [white] Background color of table container.
|
|
31
32
|
/// @prop {Color} header-background-color [#f5f4f4] Background color of the the table header.
|
|
32
33
|
/// @prop {Color} body-background-color [white] Background color of table body.
|
|
@@ -58,6 +59,7 @@ $config: (
|
|
|
58
59
|
"cell-padding" : (0.5em,),
|
|
59
60
|
"text-align" : left,
|
|
60
61
|
"type-size" : "small",
|
|
62
|
+
"vertical-align" : top,
|
|
61
63
|
"background-color" : white,
|
|
62
64
|
"header-background-color" : #f5f4f4,
|
|
63
65
|
"body-background-color" : white,
|
|
@@ -148,9 +150,9 @@ $config: (
|
|
|
148
150
|
border-bottom: get("caption-border-bottom");
|
|
149
151
|
}
|
|
150
152
|
th,
|
|
151
|
-
tr,
|
|
152
153
|
td {
|
|
153
154
|
text-align: get("text-align");
|
|
155
|
+
vertical-align: get("vertical-align");
|
|
154
156
|
}
|
|
155
157
|
th {
|
|
156
158
|
min-width: get("column-min-width");
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
/// Flipcard (content revealed on backside of card after click)
|
|
6
6
|
|
|
7
7
|
@use "sass:map";
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
@use "../utils";
|
|
10
|
+
@use "../color";
|
|
10
11
|
@use "../selector";
|
|
11
12
|
|
|
12
13
|
/// Module Settings
|
|
@@ -196,7 +197,7 @@ $config: (
|
|
|
196
197
|
}
|
|
197
198
|
#{ $prefix }__front-content {
|
|
198
199
|
color: color.get(get("title-color-image"));
|
|
199
|
-
@if(get("bottom-shadow")) {
|
|
200
|
+
@if (get("bottom-shadow")) {
|
|
200
201
|
// bottom position includes padding so that the shadow
|
|
201
202
|
&::after {
|
|
202
203
|
content: '';
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
@forward "css-icon" as css-icon-*;
|
|
20
20
|
@forward "data-grid" as data-grid-*;
|
|
21
21
|
@forward "data-table" as data-table-*;
|
|
22
|
+
@forward "data-list" as data-list-*;
|
|
22
23
|
@forward "definition-list" as definition-list-*;
|
|
23
24
|
@forward "fill-context" as fill-context-*;
|
|
24
25
|
@forward "flipcard" as flipcard-*;
|
|
@@ -52,8 +53,10 @@
|
|
|
52
53
|
@forward "sticky-list" as sticky-list-*;
|
|
53
54
|
@forward "slider" as slider-*;
|
|
54
55
|
@forward "hero" as hero-*;
|
|
56
|
+
@forward "table-scroller" as table-scroller-*;
|
|
55
57
|
@forward "tabs" as tabs-*;
|
|
56
58
|
@forward "tag" as tag-*;
|
|
59
|
+
@forward "tagged" as tagged-*;
|
|
57
60
|
@forward "tile-grid" as tile-grid-*;
|
|
58
61
|
@forward "tile-button" as tile-button-*;
|
|
59
62
|
@forward "tile-grid-overlay" as tile-grid-overlay-*;
|
|
@@ -81,6 +84,7 @@
|
|
|
81
84
|
@use "css-icon";
|
|
82
85
|
@use "data-grid";
|
|
83
86
|
@use "data-table";
|
|
87
|
+
@use "data-list";
|
|
84
88
|
@use "definition-list";
|
|
85
89
|
@use "fill-context";
|
|
86
90
|
@use "flipcard";
|
|
@@ -115,7 +119,9 @@
|
|
|
115
119
|
@use "slider";
|
|
116
120
|
@use "hero";
|
|
117
121
|
@use "tabs";
|
|
122
|
+
@use "table-scroller";
|
|
118
123
|
@use "tag";
|
|
124
|
+
@use "tagged";
|
|
119
125
|
@use "tile-grid";
|
|
120
126
|
@use "tile-button";
|
|
121
127
|
@use "tile-grid-overlay";
|
|
@@ -144,6 +150,7 @@ $all-includes: (
|
|
|
144
150
|
"css-icon",
|
|
145
151
|
"data-grid",
|
|
146
152
|
"data-table",
|
|
153
|
+
"data-list",
|
|
147
154
|
"definition-list",
|
|
148
155
|
"fill-context",
|
|
149
156
|
"flipcard",
|
|
@@ -177,7 +184,9 @@ $all-includes: (
|
|
|
177
184
|
"slider",
|
|
178
185
|
"hero",
|
|
179
186
|
"tabs",
|
|
187
|
+
"table-scroller",
|
|
180
188
|
"tag",
|
|
189
|
+
"tagged",
|
|
181
190
|
"tile-grid",
|
|
182
191
|
"tile-button",
|
|
183
192
|
"tile-grid-overlay",
|
|
@@ -254,6 +263,9 @@ $current-includes: $all-includes;
|
|
|
254
263
|
@if (list.index($includes, "tag")) {
|
|
255
264
|
@include tag.styles;
|
|
256
265
|
}
|
|
266
|
+
@if (list.index($includes, "tagged")) {
|
|
267
|
+
@include tagged.styles;
|
|
268
|
+
}
|
|
257
269
|
@if (list.index($includes, "callout")) {
|
|
258
270
|
@include callout.styles;
|
|
259
271
|
}
|
|
@@ -275,6 +287,9 @@ $current-includes: $all-includes;
|
|
|
275
287
|
@if (list.index($includes, "data-table")) {
|
|
276
288
|
@include data-table.styles;
|
|
277
289
|
}
|
|
290
|
+
@if (list.index($includes, "data-list")) {
|
|
291
|
+
@include data-list.styles;
|
|
292
|
+
}
|
|
278
293
|
@if (list.index($includes, "definition-list")) {
|
|
279
294
|
@include definition-list.styles;
|
|
280
295
|
}
|
|
@@ -374,6 +389,9 @@ $current-includes: $all-includes;
|
|
|
374
389
|
@if (list.index($includes, "tabs")) {
|
|
375
390
|
@include tabs.styles;
|
|
376
391
|
}
|
|
392
|
+
@if (list.index($includes, "table-scroller")) {
|
|
393
|
+
@include table-scroller.styles;
|
|
394
|
+
}
|
|
377
395
|
@if (list.index($includes, "tile-grid")) {
|
|
378
396
|
@include tile-grid.styles;
|
|
379
397
|
}
|