@hashicorp/design-system-components 4.22.0 → 4.22.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.
|
@@ -12,7 +12,7 @@ import { precompileTemplate } from '@ember/template-compilation';
|
|
|
12
12
|
import { g, i, n } from 'decorator-transforms/runtime';
|
|
13
13
|
import { setComponentTemplate } from '@ember/component';
|
|
14
14
|
|
|
15
|
-
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div\n class={{this.classNames}}\n role={{this.role}}\n aria-rowspan={{@rowspan}}\n aria-colspan={{@colspan}}\n aria-describedby={{@parentId}}\n {{style grid-row=this.rowspan grid-column=this.colspan padding-left=this.paddingLeft}}\n {{hds-advanced-table-cell\n handleEnableFocusTrap=this.enableFocusTrap\n shouldTrapFocus=this._shouldTrapFocus\n setCellElement=this.setElement\n }}\n {{! @glint-expect-error - https://github.com/josemarluedke/ember-focus-trap/issues/86 }}\n {{focus-trap\n isActive=this._shouldTrapFocus\n focusTrapOptions=(hash\n onDeactivate=this.onFocusTrapDeactivate initialFocus=this.getInitialFocus clickOutsideDeactivates=true\n )\n }}\n ...attributes\n>\n <Hds::Layout::Flex @justify=\"space-between\" @align=\"center\" @gap=\"8\">\n {{#if @column.isVisuallyHidden}}\n <span class=\"sr-only\">{{yield}}</span>\n {{else}}\n {{#if @tooltip}}\n
|
|
15
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div\n class={{this.classNames}}\n role={{this.role}}\n aria-rowspan={{@rowspan}}\n aria-colspan={{@colspan}}\n aria-describedby={{@parentId}}\n {{style grid-row=this.rowspan grid-column=this.colspan padding-left=this.paddingLeft}}\n {{hds-advanced-table-cell\n handleEnableFocusTrap=this.enableFocusTrap\n shouldTrapFocus=this._shouldTrapFocus\n setCellElement=this.setElement\n }}\n {{! @glint-expect-error - https://github.com/josemarluedke/ember-focus-trap/issues/86 }}\n {{focus-trap\n isActive=this._shouldTrapFocus\n focusTrapOptions=(hash\n onDeactivate=this.onFocusTrapDeactivate initialFocus=this.getInitialFocus clickOutsideDeactivates=true\n )\n }}\n ...attributes\n>\n <Hds::Layout::Flex @justify=\"space-between\" @align=\"center\" @gap=\"8\">\n {{#if @column.isVisuallyHidden}}\n <span class=\"sr-only\">{{yield}}</span>\n {{else}}\n {{#if @tooltip}}\n {{#if @isExpandable}}\n <Hds::AdvancedTable::ThButtonExpand\n @labelId={{this._labelId}}\n @onToggle={{@onClickToggle}}\n @isExpanded={{@isExpanded}}\n @isExpandAll={{@hasExpandAllButton}}\n {{this._manageExpandButton}}\n />\n {{/if}}\n <div class=\"hds-advanced-table__th-content\">\n <span\n id={{this._labelId}}\n class=\"hds-advanced-table__th-content-text hds-typography-body-200 hds-font-weight-semibold\"\n >\n {{yield}}\n </span>\n <Hds::AdvancedTable::ThButtonTooltip @tooltip={{@tooltip}} @labelId={{this._labelId}} />\n </div>\n {{else}}\n {{#if @isExpandable}}\n <Hds::AdvancedTable::ThButtonExpand\n @labelId={{this._labelId}}\n @onToggle={{@onClickToggle}}\n @isExpanded={{@isExpanded}}\n @isExpandAll={{@hasExpandAllButton}}\n {{this._manageExpandButton}}\n />\n {{/if}}\n <div class=\"hds-advanced-table__th-content\">\n <span\n class=\"hds-advanced-table__th-content-text hds-typography-body-200 hds-font-weight-semibold\"\n id={{this._labelId}}\n >{{yield}}</span>\n </div>\n {{/if}}\n {{/if}}\n\n {{#if @column}}\n {{#if this.showContextMenu}}\n <Hds::AdvancedTable::ThContextMenu\n @column={{@column}}\n @hasResizableColumns={{@hasResizableColumns}}\n @resizeHandleElement={{this._resizeHandleElement}}\n @onColumnResize={{@onColumnResize}}\n />\n {{/if}}\n\n {{#if (and @hasResizableColumns (not @column.isLast))}}\n <Hds::AdvancedTable::ThResizeHandle\n @column={{@column}}\n @hasResizableColumns={{@hasResizableColumns}}\n @tableHeight={{@tableHeight}}\n @onColumnResize={{@onColumnResize}}\n {{this._registerResizeHandleElement}}\n />\n {{/if}}\n {{/if}}\n </Hds::Layout::Flex>\n</div>");
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Copyright (c) HashiCorp, Inc.
|
|
@@ -1126,14 +1126,14 @@
|
|
|
1126
1126
|
z-index: 2;
|
|
1127
1127
|
content: "";
|
|
1128
1128
|
}
|
|
1129
|
-
.hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle:focus::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.mock-focus::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle:hover::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.mock-hover::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.hds-advanced-table__th-resize-handle--resizing::after {
|
|
1129
|
+
.hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle:focus::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.mock-focus::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle:hover::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.mock-hover::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.hds-advanced-table__th-resize-handle--resizing::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.mock-active::after {
|
|
1130
1130
|
width: 3px;
|
|
1131
1131
|
transform: translateX(-10.5px);
|
|
1132
1132
|
}
|
|
1133
1133
|
.hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle:hover::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.mock-hover::after {
|
|
1134
1134
|
background-color: #b1b1b5;
|
|
1135
1135
|
}
|
|
1136
|
-
.hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle:focus::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.mock-focus::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.hds-advanced-table__th-resize-handle--resizing::after {
|
|
1136
|
+
.hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle:focus::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.mock-focus::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.hds-advanced-table__th-resize-handle--resizing::after, .hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th-resize-handle.mock-active::after {
|
|
1137
1137
|
background-color: var(--token-color-palette-blue-300);
|
|
1138
1138
|
}
|
|
1139
1139
|
.hds-advanced-table__thead .hds-advanced-table__tr .hds-advanced-table__th--align-center,
|
|
@@ -1175,7 +1175,6 @@
|
|
|
1175
1175
|
}
|
|
1176
1176
|
.hds-advanced-table__thead.hds-advanced-table__thead--has-resizable-columns .hds-advanced-table__th .hds-advanced-table__th-content-text {
|
|
1177
1177
|
display: block;
|
|
1178
|
-
width: 100%;
|
|
1179
1178
|
min-width: 30px;
|
|
1180
1179
|
overflow: hidden;
|
|
1181
1180
|
white-space: nowrap;
|
|
@@ -1202,6 +1201,7 @@
|
|
|
1202
1201
|
|
|
1203
1202
|
.hds-advanced-table__th-content {
|
|
1204
1203
|
display: flex;
|
|
1204
|
+
flex-grow: 1;
|
|
1205
1205
|
flex-shrink: 1;
|
|
1206
1206
|
gap: 8px;
|
|
1207
1207
|
align-items: center;
|
|
@@ -1329,13 +1329,15 @@
|
|
|
1329
1329
|
.hds-advanced-table__tbody .hds-advanced-table__tr--last-row .hds-advanced-table__td:last-child {
|
|
1330
1330
|
border-bottom-right-radius: calc(var(--token-border-radius-medium) - 1px);
|
|
1331
1331
|
}
|
|
1332
|
-
.hds-advanced-table__tbody .hds-advanced-table__th,
|
|
1333
1332
|
.hds-advanced-table__tbody .hds-advanced-table__td {
|
|
1334
1333
|
display: flex;
|
|
1335
1334
|
gap: 8px;
|
|
1336
1335
|
align-content: center;
|
|
1337
1336
|
align-items: flex-start;
|
|
1338
1337
|
justify-content: flex-start;
|
|
1338
|
+
}
|
|
1339
|
+
.hds-advanced-table__tbody .hds-advanced-table__th,
|
|
1340
|
+
.hds-advanced-table__tbody .hds-advanced-table__td {
|
|
1339
1341
|
height: 100%;
|
|
1340
1342
|
font-weight: var(--token-typography-font-weight-regular);
|
|
1341
1343
|
font-size: var(--token-typography-body-200-font-size);
|
|
@@ -1417,20 +1419,24 @@
|
|
|
1417
1419
|
left: var(--hds-advanced-table-sticky-column-offset, 0);
|
|
1418
1420
|
border-left-width: 1px;
|
|
1419
1421
|
}
|
|
1420
|
-
.hds-advanced-table__tbody .hds-advanced-table__th--align-center,
|
|
1421
1422
|
.hds-advanced-table__tbody .hds-advanced-table__td--align-center {
|
|
1423
|
+
justify-content: center;
|
|
1424
|
+
text-align: center;
|
|
1425
|
+
}
|
|
1426
|
+
.hds-advanced-table__tbody .hds-advanced-table__th--align-center {
|
|
1422
1427
|
text-align: center;
|
|
1423
1428
|
}
|
|
1424
|
-
.hds-advanced-table__tbody .hds-advanced-table__th--align-center .hds-advanced-table__th-content
|
|
1425
|
-
.hds-advanced-table__tbody .hds-advanced-table__td--align-center .hds-advanced-table__th-content {
|
|
1429
|
+
.hds-advanced-table__tbody .hds-advanced-table__th--align-center .hds-advanced-table__th-content {
|
|
1426
1430
|
justify-content: center;
|
|
1427
1431
|
}
|
|
1428
|
-
.hds-advanced-table__tbody .hds-advanced-table__th--align-right,
|
|
1429
1432
|
.hds-advanced-table__tbody .hds-advanced-table__td--align-right {
|
|
1433
|
+
justify-content: flex-end;
|
|
1434
|
+
text-align: right;
|
|
1435
|
+
}
|
|
1436
|
+
.hds-advanced-table__tbody .hds-advanced-table__th--align-right {
|
|
1430
1437
|
text-align: right;
|
|
1431
1438
|
}
|
|
1432
|
-
.hds-advanced-table__tbody .hds-advanced-table__th--align-right .hds-advanced-table__th-content
|
|
1433
|
-
.hds-advanced-table__tbody .hds-advanced-table__td--align-right .hds-advanced-table__th-content {
|
|
1439
|
+
.hds-advanced-table__tbody .hds-advanced-table__th--align-right .hds-advanced-table__th-content {
|
|
1434
1440
|
justify-content: flex-end;
|
|
1435
1441
|
}
|
|
1436
1442
|
.hds-advanced-table--valign-top .hds-advanced-table__tbody .hds-advanced-table__th,
|
|
@@ -1814,7 +1820,7 @@
|
|
|
1814
1820
|
z-index: 21;
|
|
1815
1821
|
grid-area: header;
|
|
1816
1822
|
}
|
|
1817
|
-
@media (height
|
|
1823
|
+
@media (min-height: 480px) {
|
|
1818
1824
|
.hds-app-frame__header {
|
|
1819
1825
|
position: sticky;
|
|
1820
1826
|
top: 0;
|
|
@@ -1831,7 +1837,7 @@
|
|
|
1831
1837
|
height: 100vh;
|
|
1832
1838
|
min-height: 100vh;
|
|
1833
1839
|
}
|
|
1834
|
-
@media (height
|
|
1840
|
+
@media (min-height: 480px) {
|
|
1835
1841
|
.hds-app-frame--has-header-with-sidebar .hds-app-frame__sidebar {
|
|
1836
1842
|
top: var(--token-app-header-height);
|
|
1837
1843
|
height: calc(100vh - var(--token-app-header-height));
|
|
@@ -139,7 +139,8 @@ $hds-advanced-table-button-size: 24px; // the size of the buttons and dropdown t
|
|
|
139
139
|
&.mock-focus::after,
|
|
140
140
|
&:hover::after,
|
|
141
141
|
&.mock-hover::after,
|
|
142
|
-
&.hds-advanced-table__th-resize-handle--resizing::after
|
|
142
|
+
&.hds-advanced-table__th-resize-handle--resizing::after,
|
|
143
|
+
&.mock-active::after {
|
|
143
144
|
width: 3px;
|
|
144
145
|
transform: translateX(-10.5px); // (width of the handle (24px) - width of the visual handle (3px)) / 2 == 10.5px
|
|
145
146
|
}
|
|
@@ -151,7 +152,8 @@ $hds-advanced-table-button-size: 24px; // the size of the buttons and dropdown t
|
|
|
151
152
|
|
|
152
153
|
&:focus::after,
|
|
153
154
|
&.mock-focus::after,
|
|
154
|
-
&.hds-advanced-table__th-resize-handle--resizing::after
|
|
155
|
+
&.hds-advanced-table__th-resize-handle--resizing::after,
|
|
156
|
+
&.mock-active::after {
|
|
155
157
|
background-color: var(--token-color-palette-blue-300);
|
|
156
158
|
}
|
|
157
159
|
}
|
|
@@ -220,7 +222,6 @@ $hds-advanced-table-button-size: 24px; // the size of the buttons and dropdown t
|
|
|
220
222
|
&.hds-advanced-table__thead--has-resizable-columns {
|
|
221
223
|
.hds-advanced-table__th .hds-advanced-table__th-content-text {
|
|
222
224
|
display: block;
|
|
223
|
-
width: 100%;
|
|
224
225
|
min-width: 30px;
|
|
225
226
|
overflow: hidden;
|
|
226
227
|
white-space: nowrap;
|
|
@@ -261,6 +262,7 @@ $hds-advanced-table-button-size: 24px; // the size of the buttons and dropdown t
|
|
|
261
262
|
// multi-select (isSelectable=true)
|
|
262
263
|
.hds-advanced-table__th-content {
|
|
263
264
|
display: flex;
|
|
265
|
+
flex-grow: 1;
|
|
264
266
|
flex-shrink: 1;
|
|
265
267
|
gap: 8px;
|
|
266
268
|
align-items: center;
|
|
@@ -394,13 +396,16 @@ $hds-advanced-table-button-size: 24px; // the size of the buttons and dropdown t
|
|
|
394
396
|
}
|
|
395
397
|
}
|
|
396
398
|
|
|
397
|
-
.hds-advanced-table__th,
|
|
398
399
|
.hds-advanced-table__td {
|
|
399
400
|
display: flex;
|
|
400
401
|
gap: 8px;
|
|
401
402
|
align-content: center;
|
|
402
403
|
align-items: flex-start;
|
|
403
404
|
justify-content: flex-start;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.hds-advanced-table__th,
|
|
408
|
+
.hds-advanced-table__td {
|
|
404
409
|
height: 100%;
|
|
405
410
|
font-weight: var(--token-typography-font-weight-regular);
|
|
406
411
|
font-size: var(--token-typography-body-200-font-size);
|
|
@@ -468,8 +473,12 @@ $hds-advanced-table-button-size: 24px; // the size of the buttons and dropdown t
|
|
|
468
473
|
|
|
469
474
|
// horizontal alignment
|
|
470
475
|
|
|
471
|
-
.hds-advanced-table__th--align-center,
|
|
472
476
|
.hds-advanced-table__td--align-center {
|
|
477
|
+
justify-content: center;
|
|
478
|
+
text-align: center;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.hds-advanced-table__th--align-center {
|
|
473
482
|
text-align: center;
|
|
474
483
|
|
|
475
484
|
.hds-advanced-table__th-content {
|
|
@@ -477,8 +486,12 @@ $hds-advanced-table-button-size: 24px; // the size of the buttons and dropdown t
|
|
|
477
486
|
}
|
|
478
487
|
}
|
|
479
488
|
|
|
480
|
-
.hds-advanced-table__th--align-right,
|
|
481
489
|
.hds-advanced-table__td--align-right {
|
|
490
|
+
justify-content: flex-end;
|
|
491
|
+
text-align: right;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.hds-advanced-table__th--align-right {
|
|
482
495
|
text-align: right;
|
|
483
496
|
|
|
484
497
|
.hds-advanced-table__th-content {
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
grid-area: header;
|
|
26
26
|
|
|
27
27
|
// Make header position sticky/fixed if the viewport height is greater than 480px
|
|
28
|
-
|
|
28
|
+
// Note: HCP in prod doesn't support newer media queries, so we use the old syntax
|
|
29
|
+
// stylelint-disable-next-line media-feature-range-notation
|
|
30
|
+
@media (min-height: 480px) {
|
|
29
31
|
position: sticky;
|
|
30
32
|
top: 0;
|
|
31
33
|
right: 0;
|
|
@@ -42,7 +44,9 @@
|
|
|
42
44
|
min-height: 100vh;
|
|
43
45
|
|
|
44
46
|
// Modify sidenav layout when used together with fixed app-header
|
|
45
|
-
|
|
47
|
+
// Note: HCP in prod doesn't support newer media queries, so we use the old syntax
|
|
48
|
+
// stylelint-disable-next-line media-feature-range-notation
|
|
49
|
+
@media (min-height: 480px) {
|
|
46
50
|
.hds-app-frame--has-header-with-sidebar & {
|
|
47
51
|
top: var(--token-app-header-height);
|
|
48
52
|
height: calc(100vh - var(--token-app-header-height));
|