@dnb/eufemia 9.40.0 → 9.41.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/CHANGELOG.md +18 -0
- package/cjs/components/autocomplete/style/dnb-autocomplete.css +3 -14
- package/cjs/components/autocomplete/style/dnb-autocomplete.min.css +2 -2
- package/cjs/components/checkbox/style/dnb-checkbox.css +0 -7
- package/cjs/components/checkbox/style/dnb-checkbox.min.css +1 -1
- package/cjs/components/date-picker/style/dnb-date-picker.css +3 -35
- package/cjs/components/date-picker/style/dnb-date-picker.min.css +2 -2
- package/cjs/components/drawer/types.d.ts +5 -5
- package/cjs/components/dropdown/style/dnb-dropdown.css +0 -7
- package/cjs/components/dropdown/style/dnb-dropdown.min.css +1 -1
- package/cjs/components/form-label/FormLabel.js +1 -1
- package/cjs/components/form-label/style/_form-label.scss +0 -13
- package/cjs/components/form-label/style/dnb-form-label.css +0 -7
- package/cjs/components/form-label/style/dnb-form-label.min.css +1 -1
- package/cjs/components/form-row/style/dnb-form-row.css +0 -7
- package/cjs/components/form-row/style/dnb-form-row.min.css +1 -1
- package/cjs/components/input/style/_input.scss +4 -0
- package/cjs/components/input/style/dnb-input.css +3 -7
- package/cjs/components/input/style/dnb-input.min.css +1 -1
- package/cjs/components/input-masked/style/dnb-input-masked.css +3 -7
- package/cjs/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/cjs/components/modal/Modal.d.ts +2 -2
- package/cjs/components/number-format/NumberUtils.d.ts +3 -0
- package/cjs/components/radio/style/dnb-radio.css +0 -7
- package/cjs/components/radio/style/dnb-radio.min.css +1 -1
- package/cjs/components/slider/style/dnb-slider.css +0 -7
- package/cjs/components/slider/style/dnb-slider.min.css +1 -1
- package/cjs/components/switch/style/dnb-switch.css +0 -7
- package/cjs/components/switch/style/dnb-switch.min.css +1 -1
- package/cjs/components/table/Table.d.ts +2 -0
- package/cjs/components/table/Table.js +14 -50
- package/cjs/components/table/TableAccordion.d.ts +10 -0
- package/cjs/components/table/TableAccordion.js +265 -0
- package/cjs/components/table/TableAccordionContent.d.ts +18 -0
- package/cjs/components/table/TableAccordionContent.js +126 -0
- package/cjs/components/table/TableContainer.js +3 -4
- package/cjs/components/table/TableScrollView.js +2 -1
- package/cjs/components/table/TableTd.d.ts +6 -1
- package/cjs/components/table/TableTd.js +5 -1
- package/cjs/components/table/TableTh.d.ts +3 -3
- package/cjs/components/table/TableTh.js +2 -0
- package/cjs/components/table/TableTr.d.ts +27 -0
- package/cjs/components/table/TableTr.js +95 -18
- package/cjs/components/table/style/_table-accordion.scss +280 -0
- package/cjs/components/table/style/_table-td.scss +29 -2
- package/cjs/components/table/style/_table-tr.scss +8 -2
- package/cjs/components/table/style/_table.scss +9 -7
- package/cjs/components/table/style/dnb-table.css +540 -322
- package/cjs/components/table/style/dnb-table.min.css +11 -2
- package/cjs/components/table/style/themes/dnb-table-theme-ui.css +5 -1
- package/cjs/components/table/style/themes/dnb-table-theme-ui.min.css +1 -1
- package/cjs/components/table/style/themes/dnb-table-theme-ui.scss +9 -1
- package/cjs/components/textarea/style/dnb-textarea.css +0 -7
- package/cjs/components/textarea/style/dnb-textarea.min.css +1 -1
- package/cjs/components/toggle-button/style/dnb-toggle-button.css +0 -21
- package/cjs/components/toggle-button/style/dnb-toggle-button.min.css +1 -1
- package/cjs/elements/Element.d.ts +1 -1
- package/cjs/fragments/lib.d.ts +4 -7
- package/cjs/fragments/scroll-view/ScrollView.d.ts +12 -11
- package/cjs/fragments/scroll-view/ScrollView.js +8 -5
- package/cjs/fragments/scroll-view/style/_scroll-view.scss +8 -0
- package/cjs/shared/Eufemia.js +1 -1
- package/cjs/shared/helpers.js +7 -1
- package/cjs/shared/locales/en-GB.d.ts +4 -0
- package/cjs/shared/locales/en-GB.js +4 -0
- package/cjs/shared/locales/en-US.d.ts +4 -0
- package/cjs/shared/locales/index.d.ts +8 -0
- package/cjs/shared/locales/nb-NO.d.ts +4 -0
- package/cjs/shared/locales/nb-NO.js +4 -0
- package/cjs/style/dnb-ui-components.css +545 -317
- package/cjs/style/dnb-ui-components.min.css +13 -4
- package/cjs/style/dnb-ui-fragments.css +14 -0
- package/cjs/style/dnb-ui-fragments.min.css +1 -1
- package/cjs/style/themes/theme-eiendom/dnb-theme-eiendom.css +5 -1
- package/cjs/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +1 -1
- package/cjs/style/themes/theme-ui/dnb-theme-ui.css +5 -1
- package/cjs/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
- package/components/autocomplete/style/dnb-autocomplete.css +3 -14
- package/components/autocomplete/style/dnb-autocomplete.min.css +2 -2
- package/components/checkbox/style/dnb-checkbox.css +0 -7
- package/components/checkbox/style/dnb-checkbox.min.css +1 -1
- package/components/date-picker/style/dnb-date-picker.css +3 -35
- package/components/date-picker/style/dnb-date-picker.min.css +2 -2
- package/components/drawer/types.d.ts +5 -5
- package/components/dropdown/style/dnb-dropdown.css +0 -7
- package/components/dropdown/style/dnb-dropdown.min.css +1 -1
- package/components/form-label/FormLabel.js +1 -1
- package/components/form-label/style/_form-label.scss +0 -13
- package/components/form-label/style/dnb-form-label.css +0 -7
- package/components/form-label/style/dnb-form-label.min.css +1 -1
- package/components/form-row/style/dnb-form-row.css +0 -7
- package/components/form-row/style/dnb-form-row.min.css +1 -1
- package/components/input/style/_input.scss +4 -0
- package/components/input/style/dnb-input.css +3 -7
- package/components/input/style/dnb-input.min.css +1 -1
- package/components/input-masked/style/dnb-input-masked.css +3 -7
- package/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/components/modal/Modal.d.ts +2 -2
- package/components/number-format/NumberUtils.d.ts +3 -0
- package/components/radio/style/dnb-radio.css +0 -7
- package/components/radio/style/dnb-radio.min.css +1 -1
- package/components/slider/style/dnb-slider.css +0 -7
- package/components/slider/style/dnb-slider.min.css +1 -1
- package/components/switch/style/dnb-switch.css +0 -7
- package/components/switch/style/dnb-switch.min.css +1 -1
- package/components/table/Table.d.ts +2 -0
- package/components/table/Table.js +12 -20
- package/components/table/TableAccordion.d.ts +10 -0
- package/components/table/TableAccordion.js +192 -0
- package/components/table/TableAccordionContent.d.ts +18 -0
- package/components/table/TableAccordionContent.js +63 -0
- package/components/table/TableContainer.js +3 -4
- package/components/table/TableScrollView.js +2 -1
- package/components/table/TableTd.d.ts +6 -1
- package/components/table/TableTd.js +3 -1
- package/components/table/TableTh.d.ts +3 -3
- package/components/table/TableTh.js +2 -0
- package/components/table/TableTr.d.ts +27 -0
- package/components/table/TableTr.js +59 -16
- package/components/table/style/_table-accordion.scss +280 -0
- package/components/table/style/_table-td.scss +29 -2
- package/components/table/style/_table-tr.scss +8 -2
- package/components/table/style/_table.scss +9 -7
- package/components/table/style/dnb-table.css +540 -322
- package/components/table/style/dnb-table.min.css +11 -2
- package/components/table/style/themes/dnb-table-theme-ui.css +5 -1
- package/components/table/style/themes/dnb-table-theme-ui.min.css +1 -1
- package/components/table/style/themes/dnb-table-theme-ui.scss +9 -1
- package/components/textarea/style/dnb-textarea.css +0 -7
- package/components/textarea/style/dnb-textarea.min.css +1 -1
- package/components/toggle-button/style/dnb-toggle-button.css +0 -21
- package/components/toggle-button/style/dnb-toggle-button.min.css +1 -1
- package/elements/Element.d.ts +1 -1
- package/es/components/autocomplete/style/dnb-autocomplete.css +3 -14
- package/es/components/autocomplete/style/dnb-autocomplete.min.css +2 -2
- package/es/components/checkbox/style/dnb-checkbox.css +0 -7
- package/es/components/checkbox/style/dnb-checkbox.min.css +1 -1
- package/es/components/date-picker/style/dnb-date-picker.css +3 -35
- package/es/components/date-picker/style/dnb-date-picker.min.css +2 -2
- package/es/components/drawer/types.d.ts +5 -5
- package/es/components/dropdown/style/dnb-dropdown.css +0 -7
- package/es/components/dropdown/style/dnb-dropdown.min.css +1 -1
- package/es/components/form-label/FormLabel.js +1 -1
- package/es/components/form-label/style/_form-label.scss +0 -13
- package/es/components/form-label/style/dnb-form-label.css +0 -7
- package/es/components/form-label/style/dnb-form-label.min.css +1 -1
- package/es/components/form-row/style/dnb-form-row.css +0 -7
- package/es/components/form-row/style/dnb-form-row.min.css +1 -1
- package/es/components/input/style/_input.scss +4 -0
- package/es/components/input/style/dnb-input.css +3 -7
- package/es/components/input/style/dnb-input.min.css +1 -1
- package/es/components/input-masked/style/dnb-input-masked.css +3 -7
- package/es/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/es/components/modal/Modal.d.ts +2 -2
- package/es/components/number-format/NumberUtils.d.ts +3 -0
- package/es/components/radio/style/dnb-radio.css +0 -7
- package/es/components/radio/style/dnb-radio.min.css +1 -1
- package/es/components/slider/style/dnb-slider.css +0 -7
- package/es/components/slider/style/dnb-slider.min.css +1 -1
- package/es/components/switch/style/dnb-switch.css +0 -7
- package/es/components/switch/style/dnb-switch.min.css +1 -1
- package/es/components/table/Table.d.ts +2 -0
- package/es/components/table/Table.js +13 -14
- package/es/components/table/TableAccordion.d.ts +10 -0
- package/es/components/table/TableAccordion.js +175 -0
- package/es/components/table/TableAccordionContent.d.ts +18 -0
- package/es/components/table/TableAccordionContent.js +54 -0
- package/es/components/table/TableContainer.js +3 -4
- package/es/components/table/TableScrollView.js +2 -1
- package/es/components/table/TableTd.d.ts +6 -1
- package/es/components/table/TableTd.js +3 -1
- package/es/components/table/TableTh.d.ts +3 -3
- package/es/components/table/TableTh.js +2 -0
- package/es/components/table/TableTr.d.ts +27 -0
- package/es/components/table/TableTr.js +51 -15
- package/es/components/table/style/_table-accordion.scss +280 -0
- package/es/components/table/style/_table-td.scss +29 -2
- package/es/components/table/style/_table-tr.scss +8 -2
- package/es/components/table/style/_table.scss +9 -7
- package/es/components/table/style/dnb-table.css +540 -322
- package/es/components/table/style/dnb-table.min.css +11 -2
- package/es/components/table/style/themes/dnb-table-theme-ui.css +5 -1
- package/es/components/table/style/themes/dnb-table-theme-ui.min.css +1 -1
- package/es/components/table/style/themes/dnb-table-theme-ui.scss +9 -1
- package/es/components/textarea/style/dnb-textarea.css +0 -7
- package/es/components/textarea/style/dnb-textarea.min.css +1 -1
- package/es/components/toggle-button/style/dnb-toggle-button.css +0 -21
- package/es/components/toggle-button/style/dnb-toggle-button.min.css +1 -1
- package/es/elements/Element.d.ts +1 -1
- package/es/fragments/lib.d.ts +4 -7
- package/es/fragments/scroll-view/ScrollView.d.ts +12 -11
- package/es/fragments/scroll-view/ScrollView.js +7 -3
- package/es/fragments/scroll-view/style/_scroll-view.scss +8 -0
- package/es/shared/Eufemia.js +1 -1
- package/es/shared/helpers.js +7 -1
- package/es/shared/locales/en-GB.d.ts +4 -0
- package/es/shared/locales/en-GB.js +4 -0
- package/es/shared/locales/en-US.d.ts +4 -0
- package/es/shared/locales/index.d.ts +8 -0
- package/es/shared/locales/nb-NO.d.ts +4 -0
- package/es/shared/locales/nb-NO.js +4 -0
- package/es/style/dnb-ui-components.css +545 -317
- package/es/style/dnb-ui-components.min.css +13 -4
- package/es/style/dnb-ui-fragments.css +14 -0
- package/es/style/dnb-ui-fragments.min.css +1 -1
- package/es/style/themes/theme-eiendom/dnb-theme-eiendom.css +5 -1
- package/es/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +1 -1
- package/es/style/themes/theme-ui/dnb-theme-ui.css +5 -1
- package/es/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
- package/esm/dnb-ui-basis.min.mjs +1 -1
- package/esm/dnb-ui-components.min.mjs +1 -1
- package/esm/dnb-ui-elements.min.mjs +3 -3
- package/esm/dnb-ui-extensions.min.mjs +4 -4
- package/esm/dnb-ui-lib.min.mjs +2 -2
- package/esm/dnb-ui-web-components.min.mjs +2 -2
- package/fragments/lib.d.ts +4 -7
- package/fragments/scroll-view/ScrollView.d.ts +12 -11
- package/fragments/scroll-view/ScrollView.js +8 -4
- package/fragments/scroll-view/style/_scroll-view.scss +8 -0
- package/package.json +1 -1
- package/shared/Eufemia.js +1 -1
- package/shared/helpers.js +7 -1
- package/shared/locales/en-GB.d.ts +4 -0
- package/shared/locales/en-GB.js +4 -0
- package/shared/locales/en-US.d.ts +4 -0
- package/shared/locales/index.d.ts +8 -0
- package/shared/locales/nb-NO.d.ts +4 -0
- package/shared/locales/nb-NO.js +4 -0
- package/style/dnb-ui-components.css +545 -317
- package/style/dnb-ui-components.min.css +13 -4
- package/style/dnb-ui-fragments.css +14 -0
- package/style/dnb-ui-fragments.min.css +1 -1
- package/style/themes/theme-eiendom/dnb-theme-eiendom.css +5 -1
- package/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +1 -1
- package/style/themes/theme-ui/dnb-theme-ui.css +5 -1
- package/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
- package/umd/dnb-ui-basis.min.js +1 -1
- package/umd/dnb-ui-components.min.js +1 -1
- package/umd/dnb-ui-elements.min.js +3 -3
- package/umd/dnb-ui-extensions.min.js +4 -4
- package/umd/dnb-ui-lib.min.js +2 -2
- package/umd/dnb-ui-web-components.min.js +2 -2
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Table component
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@mixin tableAccordionActiveColor {
|
|
7
|
+
.dnb-table__td__accordion-icon .dnb-icon {
|
|
8
|
+
color: var(--color-emerald-green);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
@mixin tableAccordionDisabledColor {
|
|
12
|
+
.dnb-table__td__accordion-icon .dnb-icon {
|
|
13
|
+
color: var(--color-sea-green-30);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dnb-table {
|
|
18
|
+
--accordion-background: var(--color-white);
|
|
19
|
+
--accordion-border-width: 0.0625rem;
|
|
20
|
+
--accordion-border: var(--accordion-border-width) solid
|
|
21
|
+
var(--color-black-20);
|
|
22
|
+
|
|
23
|
+
&__th#{&}__th__accordion-icon {
|
|
24
|
+
padding: 0;
|
|
25
|
+
|
|
26
|
+
// In case the table-layout is fixed
|
|
27
|
+
div {
|
|
28
|
+
width: 3.5rem;
|
|
29
|
+
|
|
30
|
+
.dnb-table__size--medium & {
|
|
31
|
+
width: 3rem;
|
|
32
|
+
}
|
|
33
|
+
.dnb-table__size--small & {
|
|
34
|
+
width: 2.5rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
text-indent: -300vw;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&__td#{&}__td__accordion-icon {
|
|
42
|
+
padding: 0;
|
|
43
|
+
user-select: none; // prevent selection on double-click
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__tr--has-accordion-content &__toggle-button {
|
|
47
|
+
display: flex; // to ensure we inherit the correct size from its content
|
|
48
|
+
justify-content: center;
|
|
49
|
+
|
|
50
|
+
.dnb-icon {
|
|
51
|
+
color: var(--color-sea-green);
|
|
52
|
+
transition: transform 500ms var(--accordion-easing);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
&__tr--has-accordion-content#{&}__tr--no-animation
|
|
56
|
+
&__toggle-button
|
|
57
|
+
.dnb-icon,
|
|
58
|
+
html[data-visual-test]
|
|
59
|
+
&__tr--has-accordion-content
|
|
60
|
+
&__toggle-button
|
|
61
|
+
.dnb-icon {
|
|
62
|
+
transition: none !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&__tr--has-accordion-content,
|
|
66
|
+
&__tr__accordion_content {
|
|
67
|
+
position: relative;
|
|
68
|
+
z-index: 2;
|
|
69
|
+
}
|
|
70
|
+
&__tr--has-accordion-content:hover,
|
|
71
|
+
&__tr--has-accordion-content:active,
|
|
72
|
+
&__tr--has-accordion-content:focus,
|
|
73
|
+
&__tr--has-accordion-content#{&}__tr--expanded,
|
|
74
|
+
&__tr__accordion_content {
|
|
75
|
+
// ensure borders are visible in certain states
|
|
76
|
+
z-index: 3;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__tr--has-accordion-content#{&}__tr--expanded
|
|
80
|
+
&__toggle-button
|
|
81
|
+
.dnb-icon {
|
|
82
|
+
transform: rotate(180deg);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&__tr--has-accordion-content#{&}__tr--expanded {
|
|
86
|
+
.dnb-table--border & td::after {
|
|
87
|
+
border-bottom: none;
|
|
88
|
+
}
|
|
89
|
+
.dnb-table--border & td:not(:first-of-type)::after {
|
|
90
|
+
border-left: none;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__tr--has-accordion-content#{&}__tr:not(&__tr--disabled) {
|
|
95
|
+
outline: none;
|
|
96
|
+
|
|
97
|
+
td::before {
|
|
98
|
+
content: '';
|
|
99
|
+
position: absolute;
|
|
100
|
+
z-index: 3; // ensure we are over the "tableBorder"
|
|
101
|
+
|
|
102
|
+
// A negative number will force the table to overflow and a scrollbar will show up
|
|
103
|
+
inset: 0;
|
|
104
|
+
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
|
|
107
|
+
// Here we use border to support Safari v16 on macOS
|
|
108
|
+
// but also to only have a border on specific sides
|
|
109
|
+
border: $focusRingWidth solid transparent;
|
|
110
|
+
}
|
|
111
|
+
td:not(:first-of-type)::before {
|
|
112
|
+
border-left: none;
|
|
113
|
+
}
|
|
114
|
+
td:not(:last-of-type)::before {
|
|
115
|
+
border-right: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@include hover() {
|
|
119
|
+
td::before {
|
|
120
|
+
border-color: var(--color-emerald-green);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@include tableAccordionActiveColor();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&__tr--has-accordion-content#{&}__tr--expanded:not(&__tr--disabled):hover
|
|
128
|
+
&__td {
|
|
129
|
+
background-color: var(--color-white);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&__tr--has-accordion-content#{&}__tr:not(&__tr--disabled):not(:active):not(:hover):focus {
|
|
133
|
+
td::before {
|
|
134
|
+
@include whatInput(keyboard) {
|
|
135
|
+
top: 0;
|
|
136
|
+
bottom: 0;
|
|
137
|
+
border-color: var(--color-emerald-green);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
td:first-of-type::before {
|
|
141
|
+
left: 0;
|
|
142
|
+
}
|
|
143
|
+
td:last-of-type::before {
|
|
144
|
+
right: 0;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&__tr--has-accordion-content#{&}__tr:not(&__tr--disabled):active {
|
|
149
|
+
html:not([data-whatintent='touch']) &:hover td::before,
|
|
150
|
+
td::before {
|
|
151
|
+
border-color: var(--color-emerald-green);
|
|
152
|
+
border-width: 0.0625rem; // TODO: we should have something like activeRingWidth
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&__tr--has-accordion-content#{&}__tr:not(&__tr--disabled):active &__td {
|
|
157
|
+
background-color: var(--color-pistachio);
|
|
158
|
+
|
|
159
|
+
@include tableAccordionActiveColor();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&__tr--has-accordion-content#{&}__tr--expanded:not(&__tr--disabled)#{&}__tr--hover:not(:active):hover
|
|
163
|
+
&__td {
|
|
164
|
+
background-color: var(--accordion-background);
|
|
165
|
+
|
|
166
|
+
&::before {
|
|
167
|
+
border: none;
|
|
168
|
+
border-top: var(--accordion-border);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&__tr--has-accordion-content#{&}__tr#{&}__tr--expanded:not(&__tr--disabled):not(:active):not(:hover) {
|
|
173
|
+
@include whatInputNot('keyboard') {
|
|
174
|
+
background-color: var(--accordion-background);
|
|
175
|
+
|
|
176
|
+
td::before {
|
|
177
|
+
border: none;
|
|
178
|
+
border-top: var(--accordion-border);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&__tr--has-accordion-content#{&}__tr--disabled {
|
|
184
|
+
@include tableAccordionDisabledColor();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&__tr__accordion_content {
|
|
188
|
+
@include IS_SAFARI_DESKTOP {
|
|
189
|
+
&[hidden] {
|
|
190
|
+
/**
|
|
191
|
+
* By reverting the display from "none" to "block",
|
|
192
|
+
* we trick VoiceOver to not make this row as the end of the table. We still need "hidden" to get the correct number of rows (childCount).
|
|
193
|
+
*/
|
|
194
|
+
display: block;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
td::before {
|
|
199
|
+
content: '';
|
|
200
|
+
position: absolute;
|
|
201
|
+
top: auto;
|
|
202
|
+
left: 0;
|
|
203
|
+
right: 0;
|
|
204
|
+
bottom: calc(var(--accordion-border-width) * -1);
|
|
205
|
+
|
|
206
|
+
pointer-events: none;
|
|
207
|
+
|
|
208
|
+
border-bottom: var(--accordion-border);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// because, when table has --outline
|
|
212
|
+
.dnb-table--outline &:last-of-type td::before {
|
|
213
|
+
border-bottom: none;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// because, when table has --border
|
|
217
|
+
.dnb-table--border & td::after {
|
|
218
|
+
border-top: none;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&__inner {
|
|
222
|
+
overflow: hidden;
|
|
223
|
+
will-change: height;
|
|
224
|
+
transition: height 400ms var(--accordion-easing);
|
|
225
|
+
|
|
226
|
+
&__spacing {
|
|
227
|
+
padding: 1rem;
|
|
228
|
+
|
|
229
|
+
transform: translateY(-10px);
|
|
230
|
+
transition: transform 500ms var(--accordion-easing);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
position: relative;
|
|
234
|
+
}
|
|
235
|
+
&--parallax &__inner {
|
|
236
|
+
&__spacing {
|
|
237
|
+
transform: translateY(0);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
> td,
|
|
242
|
+
> td.dnb-table__td {
|
|
243
|
+
padding: 0;
|
|
244
|
+
|
|
245
|
+
.dnb-dl,
|
|
246
|
+
.dnb-dl dt {
|
|
247
|
+
margin: 0;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&--expanded > td,
|
|
252
|
+
&--expanded > td.dnb-table__td {
|
|
253
|
+
background-color: var(--color-white);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&__tr__accordion_content#{&}__tr &__td {
|
|
258
|
+
background-color: var(--accordion-background);
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Safari on iOS and macOS has problems on animating when vertical-align is baseline.
|
|
262
|
+
* What happens is that the td is not 0, even the content inside is 0. With vertical top, we omit that.
|
|
263
|
+
* But we do not need baseline in this tr > td, so we reset it.
|
|
264
|
+
*/
|
|
265
|
+
vertical-align: top;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&__tr--has-accordion-content:not(&__tr--disabled) {
|
|
269
|
+
cursor: pointer;
|
|
270
|
+
}
|
|
271
|
+
// prevent selection while animating – useful when user double-clicks
|
|
272
|
+
// TODO: Our SASS version doe sot support :has – so we may use this in future
|
|
273
|
+
// &__tr--has-accordion-content:has(& + &__tr__accordion_content--animating) {
|
|
274
|
+
// user-select: none;
|
|
275
|
+
// }
|
|
276
|
+
|
|
277
|
+
&__td-wrapper {
|
|
278
|
+
display: flex;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
@@ -53,20 +53,47 @@
|
|
|
53
53
|
border-bottom: var(--outline);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
&--outline
|
|
56
|
+
&--outline thead &__th:first-of-type {
|
|
57
|
+
&,
|
|
58
|
+
&::after {
|
|
59
|
+
border-radius: 0.5rem 0 0 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
&--outline thead &__th:last-of-type {
|
|
63
|
+
&,
|
|
64
|
+
&::after {
|
|
65
|
+
border-radius: 0 0.5rem 0 0;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
&--outline tbody &__tr:last-of-type &__td:first-of-type,
|
|
69
|
+
&--outline
|
|
70
|
+
tbody
|
|
71
|
+
&__tr#{&}__tr--has-accordion-content:not(#{&}__tr--expanded):nth-last-child(2)
|
|
72
|
+
&__td:first-of-type {
|
|
57
73
|
&,
|
|
58
74
|
&::before,
|
|
59
75
|
&::after {
|
|
60
76
|
border-radius: 0 0 0 0.5rem;
|
|
61
77
|
}
|
|
62
78
|
}
|
|
63
|
-
&--outline tbody &__tr:last-of-type &__td:last-of-type
|
|
79
|
+
&--outline tbody &__tr:last-of-type &__td:last-of-type,
|
|
80
|
+
&--outline
|
|
81
|
+
tbody
|
|
82
|
+
&__tr#{&}__tr--has-accordion-content:not(#{&}__tr--expanded):nth-last-child(2)
|
|
83
|
+
&__td:last-of-type {
|
|
64
84
|
&,
|
|
65
85
|
&::before,
|
|
66
86
|
&::after {
|
|
67
87
|
border-radius: 0 0 0.5rem 0;
|
|
68
88
|
}
|
|
69
89
|
}
|
|
90
|
+
&--outline tbody &__tr#{&}__tr__accordion_content:last-of-type &__td {
|
|
91
|
+
&,
|
|
92
|
+
&::before,
|
|
93
|
+
&::after {
|
|
94
|
+
border-radius: 0 0 0.5rem 0.5rem;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
70
97
|
|
|
71
98
|
// reset parts if a "th" is used before td (row header)
|
|
72
99
|
&--outline tbody &__tr &__th ~ &__td:first-of-type {
|
|
@@ -20,11 +20,17 @@
|
|
|
20
20
|
background-color: var(--color-white);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
&--outline thead &__tr:first-of-type
|
|
23
|
+
&--outline thead &__tr:first-of-type,
|
|
24
|
+
&--outline
|
|
25
|
+
tbody
|
|
26
|
+
&__tr#{&}__tr--has-accordion-content:not(#{&}__tr--expanded):nth-last-child(2) {
|
|
24
27
|
// use clip-path, because border-radius does not clip on tr's
|
|
25
28
|
clip-path: inset(0 round 0.5rem 0.5rem 0 0);
|
|
26
29
|
}
|
|
27
|
-
&--outline tbody &__tr:last-of-type
|
|
30
|
+
&--outline tbody &__tr:last-of-type,
|
|
31
|
+
&--outline
|
|
32
|
+
tbody
|
|
33
|
+
&__tr#{&}__tr--has-accordion-content:not(#{&}__tr--expanded):nth-last-child(2) {
|
|
28
34
|
// use clip-path, because border-radius does not clip on tr's
|
|
29
35
|
clip-path: inset(0 round 0 0 0.5rem 0.5rem);
|
|
30
36
|
}
|
|
@@ -16,13 +16,6 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
@import './_table-header-buttons.scss';
|
|
19
|
-
@import './_table-th.scss';
|
|
20
|
-
@import './_table-td.scss';
|
|
21
|
-
@import './_table-tr.scss';
|
|
22
|
-
@import './_table-cell.scss';
|
|
23
|
-
@import './_table-sticky.scss';
|
|
24
|
-
@import './_table-container.scss';
|
|
25
|
-
@import './_table-deprecated.scss';
|
|
26
19
|
|
|
27
20
|
.dnb-table {
|
|
28
21
|
display: table;
|
|
@@ -60,6 +53,15 @@
|
|
|
60
53
|
@include buttonsInTable();
|
|
61
54
|
}
|
|
62
55
|
|
|
56
|
+
@import './_table-th.scss';
|
|
57
|
+
@import './_table-td.scss';
|
|
58
|
+
@import './_table-tr.scss';
|
|
59
|
+
@import './_table-cell.scss';
|
|
60
|
+
@import './_table-sticky.scss';
|
|
61
|
+
@import './_table-container.scss';
|
|
62
|
+
@import './_table-deprecated.scss';
|
|
63
|
+
@import './_table-accordion.scss';
|
|
64
|
+
|
|
63
65
|
// Reset Table spacing
|
|
64
66
|
.dnb-spacing .dnb-table {
|
|
65
67
|
p,
|