@hashicorp/design-system-components 5.0.0 → 5.1.0-rc-20251106155636
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/declarations/components/hds/advanced-table/index.d.ts +10 -0
- package/declarations/components/hds/filter-bar/checkbox.d.ts +21 -0
- package/declarations/components/hds/filter-bar/filter-group.d.ts +46 -0
- package/declarations/components/hds/filter-bar/filters-dropdown.d.ts +36 -0
- package/declarations/components/hds/filter-bar/index.d.ts +40 -0
- package/declarations/components/hds/filter-bar/radio.d.ts +21 -0
- package/declarations/components/hds/filter-bar/range.d.ts +33 -0
- package/declarations/components/hds/filter-bar/tabs/index.d.ts +43 -0
- package/declarations/components/hds/filter-bar/tabs/panel.d.ts +28 -0
- package/declarations/components/hds/filter-bar/tabs/tab.d.ts +33 -0
- package/declarations/components/hds/filter-bar/types.d.ts +52 -0
- package/declarations/components.d.ts +10 -0
- package/declarations/template-registry.d.ts +27 -0
- package/dist/_app_/components/hds/filter-bar/checkbox.js +1 -0
- package/dist/_app_/components/hds/filter-bar/filter-group.js +1 -0
- package/dist/_app_/components/hds/filter-bar/filters-dropdown.js +1 -0
- package/dist/_app_/components/hds/filter-bar/radio.js +1 -0
- package/dist/_app_/components/hds/filter-bar/range.js +1 -0
- package/dist/_app_/components/hds/filter-bar/tabs/panel.js +1 -0
- package/dist/_app_/components/hds/filter-bar/tabs/tab.js +1 -0
- package/dist/_app_/components/hds/filter-bar/tabs.js +1 -0
- package/dist/_app_/components/hds/filter-bar.js +1 -0
- package/dist/components/hds/advanced-table/index.js +10 -1
- package/dist/components/hds/advanced-table/index.js.map +1 -1
- package/dist/components/hds/filter-bar/checkbox.js +40 -0
- package/dist/components/hds/filter-bar/checkbox.js.map +1 -0
- package/dist/components/hds/filter-bar/filter-group.js +173 -0
- package/dist/components/hds/filter-bar/filter-group.js.map +1 -0
- package/dist/components/hds/filter-bar/filters-dropdown.js +125 -0
- package/dist/components/hds/filter-bar/filters-dropdown.js.map +1 -0
- package/dist/components/hds/filter-bar/index.js +162 -0
- package/dist/components/hds/filter-bar/index.js.map +1 -0
- package/dist/components/hds/filter-bar/radio.js +40 -0
- package/dist/components/hds/filter-bar/radio.js.map +1 -0
- package/dist/components/hds/filter-bar/range.js +88 -0
- package/dist/components/hds/filter-bar/range.js.map +1 -0
- package/dist/components/hds/filter-bar/tabs/index.js +182 -0
- package/dist/components/hds/filter-bar/tabs/index.js.map +1 -0
- package/dist/components/hds/filter-bar/tabs/panel.js +67 -0
- package/dist/components/hds/filter-bar/tabs/panel.js.map +1 -0
- package/dist/components/hds/filter-bar/tabs/tab.js +99 -0
- package/dist/components/hds/filter-bar/tabs/tab.js.map +1 -0
- package/dist/components/hds/filter-bar/types.js +24 -0
- package/dist/components/hds/filter-bar/types.js.map +1 -0
- package/dist/components.js +10 -0
- package/dist/components.js.map +1 -1
- package/dist/styles/@hashicorp/design-system-components.css +198 -3
- package/dist/styles/@hashicorp/design-system-components.scss +1 -0
- package/dist/styles/components/advanced-table.scss +67 -1
- package/dist/styles/components/filter-bar.scss +155 -0
- package/package.json +10 -1
- package/translations/hds/components/advanced-table/en-us.yaml +3 -0
- package/translations/hds/components/filter-bar/en-us.yaml +3 -0
- package/translations/hds/components/filter-bar/filter-options/en-us.yaml +1 -0
- package/translations/hds/components/filter-bar/filters-dropdown/en-us.yaml +7 -0
- package/translations/hds/components/filter-bar/range/en-us.yaml +3 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { guidFor } from '@ember/object/internals';
|
|
3
|
+
import { action } from '@ember/object';
|
|
4
|
+
import { modifier } from 'ember-modifier';
|
|
5
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
6
|
+
import { n } from 'decorator-transforms/runtime';
|
|
7
|
+
import { setComponentTemplate } from '@ember/component';
|
|
8
|
+
|
|
9
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! template-lint-disable require-context-role no-invalid-role }}\n{{! template-lint-disable require-presentational-children }}\n<li class={{this.classNames}} ...attributes role=\"presentation\">\n <button\n class=\"hds-filter-bar__tabs__tab__button\"\n id={{this._tabId}}\n type=\"button\"\n role=\"tab\"\n aria-controls={{this.coupledPanelId}}\n aria-selected={{if this.isSelected \"true\" \"false\"}}\n tabindex={{unless this.isSelected \"-1\"}}\n {{on \"click\" this.onClick}}\n {{on \"keyup\" this.onKeyUp}}\n {{this._setUpTab this.didInsertNode this.willDestroyNode}}\n >\n <Hds::Text::Body @size=\"200\" @weight=\"medium\">{{yield}}</Hds::Text::Body>\n <Hds::Icon @name=\"chevron-right\" />\n </button>\n</li>\n{{! template-lint-enable require-presentational-children }}\n{{! template-lint-enable require-context-role no-invalid-role }}");
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Copyright (c) HashiCorp, Inc.
|
|
13
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
class HdsFilterBarTabsTab extends Component {
|
|
17
|
+
_tabId = 'tab-' + guidFor(this);
|
|
18
|
+
_elementId;
|
|
19
|
+
_setUpTab = modifier((element, [insertCallbackFunction, destroyCallbackFunction]) => {
|
|
20
|
+
if (typeof insertCallbackFunction === 'function') {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
22
|
+
insertCallbackFunction(element);
|
|
23
|
+
}
|
|
24
|
+
return () => {
|
|
25
|
+
if (typeof destroyCallbackFunction === 'function') {
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
27
|
+
destroyCallbackFunction(element);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
get nodeIndex() {
|
|
32
|
+
return this.args.tabIds?.indexOf(this._tabId);
|
|
33
|
+
}
|
|
34
|
+
get coupledPanelId() {
|
|
35
|
+
return this.nodeIndex !== undefined ? this.args.panelIds?.[this.nodeIndex] : undefined;
|
|
36
|
+
}
|
|
37
|
+
get isSelected() {
|
|
38
|
+
return this.nodeIndex !== undefined && this.nodeIndex === this.args.selectedTabIndex;
|
|
39
|
+
}
|
|
40
|
+
didInsertNode(element) {
|
|
41
|
+
const {
|
|
42
|
+
didInsertNode
|
|
43
|
+
} = this.args;
|
|
44
|
+
if (typeof didInsertNode === 'function') {
|
|
45
|
+
this._elementId = element.id;
|
|
46
|
+
didInsertNode();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
static {
|
|
50
|
+
n(this.prototype, "didInsertNode", [action]);
|
|
51
|
+
}
|
|
52
|
+
willDestroyNode(element) {
|
|
53
|
+
const {
|
|
54
|
+
willDestroyNode
|
|
55
|
+
} = this.args;
|
|
56
|
+
if (typeof willDestroyNode === 'function') {
|
|
57
|
+
willDestroyNode(element);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
static {
|
|
61
|
+
n(this.prototype, "willDestroyNode", [action]);
|
|
62
|
+
}
|
|
63
|
+
onClick(event) {
|
|
64
|
+
const {
|
|
65
|
+
onClick
|
|
66
|
+
} = this.args;
|
|
67
|
+
console.log('onClick event in Tab:', event);
|
|
68
|
+
if (this.nodeIndex !== undefined && typeof onClick === 'function') {
|
|
69
|
+
onClick(event, this.nodeIndex);
|
|
70
|
+
} else {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
static {
|
|
75
|
+
n(this.prototype, "onClick", [action]);
|
|
76
|
+
}
|
|
77
|
+
onKeyUp(event) {
|
|
78
|
+
const {
|
|
79
|
+
onKeyUp
|
|
80
|
+
} = this.args;
|
|
81
|
+
if (this.nodeIndex !== undefined && typeof onKeyUp === 'function') {
|
|
82
|
+
onKeyUp(event, this.nodeIndex);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
static {
|
|
86
|
+
n(this.prototype, "onKeyUp", [action]);
|
|
87
|
+
}
|
|
88
|
+
get classNames() {
|
|
89
|
+
const classes = ['hds-filter-bar__tabs__tab'];
|
|
90
|
+
if (this.isSelected) {
|
|
91
|
+
classes.push(`hds-filter-bar__tabs__tab--is-selected`);
|
|
92
|
+
}
|
|
93
|
+
return classes.join(' ');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
setComponentTemplate(TEMPLATE, HdsFilterBarTabsTab);
|
|
97
|
+
|
|
98
|
+
export { HdsFilterBarTabsTab as default };
|
|
99
|
+
//# sourceMappingURL=tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.js","sources":["../../../../../src/components/hds/filter-bar/tabs/tab.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { action } from '@ember/object';\nimport { modifier } from 'ember-modifier';\n\nexport interface HdsFilterBarTabsTabSignature {\n Args: {\n selectedTabIndex?: number;\n tabIds?: string[];\n panelIds?: string[];\n didInsertNode?: () => void;\n willDestroyNode?: (element: HTMLButtonElement) => void;\n onClick?: (event: MouseEvent, nodeIndex: number) => void;\n onKeyUp?: (event: KeyboardEvent, nodeIndex: number) => void;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLElement;\n}\n\nexport default class HdsFilterBarTabsTab extends Component<HdsFilterBarTabsTabSignature> {\n private _tabId = 'tab-' + guidFor(this);\n private _elementId?: string;\n\n private _setUpTab = modifier(\n (\n element: HTMLElement,\n [insertCallbackFunction, destroyCallbackFunction]\n ) => {\n if (typeof insertCallbackFunction === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n insertCallbackFunction(element);\n }\n\n return () => {\n if (typeof destroyCallbackFunction === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n destroyCallbackFunction(element);\n }\n };\n }\n );\n\n get nodeIndex(): number | undefined {\n return this.args.tabIds?.indexOf(this._tabId);\n }\n\n get coupledPanelId(): string | undefined {\n return this.nodeIndex !== undefined\n ? this.args.panelIds?.[this.nodeIndex]\n : undefined;\n }\n\n get isSelected(): boolean {\n return (\n this.nodeIndex !== undefined &&\n this.nodeIndex === this.args.selectedTabIndex\n );\n }\n\n @action\n didInsertNode(element: HTMLButtonElement): void {\n const { didInsertNode } = this.args;\n\n if (typeof didInsertNode === 'function') {\n this._elementId = element.id;\n didInsertNode();\n }\n }\n\n @action\n willDestroyNode(element: HTMLButtonElement): void {\n const { willDestroyNode } = this.args;\n\n if (typeof willDestroyNode === 'function') {\n willDestroyNode(element);\n }\n }\n\n @action\n onClick(event: MouseEvent): false | undefined {\n const { onClick } = this.args;\n\n console.log('onClick event in Tab:', event);\n\n if (this.nodeIndex !== undefined && typeof onClick === 'function') {\n onClick(event, this.nodeIndex);\n } else {\n return false;\n }\n }\n\n @action\n onKeyUp(event: KeyboardEvent): void {\n const { onKeyUp } = this.args;\n\n if (this.nodeIndex !== undefined && typeof onKeyUp === 'function') {\n onKeyUp(event, this.nodeIndex);\n }\n }\n\n get classNames(): string {\n const classes = ['hds-filter-bar__tabs__tab'];\n\n if (this.isSelected) {\n classes.push(`hds-filter-bar__tabs__tab--is-selected`);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsFilterBarTabsTab","Component","_tabId","guidFor","_elementId","_setUpTab","modifier","element","insertCallbackFunction","destroyCallbackFunction","nodeIndex","args","tabIds","indexOf","coupledPanelId","undefined","panelIds","isSelected","selectedTabIndex","didInsertNode","id","n","prototype","action","willDestroyNode","onClick","event","console","log","onKeyUp","classNames","classes","push","join","setComponentTemplate","TEMPLATE"],"mappings":"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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
let HdsFilterBarFilterTypeValues = /*#__PURE__*/function (HdsFilterBarFilterTypeValues) {
|
|
7
|
+
HdsFilterBarFilterTypeValues["multiSelect"] = "multi-select";
|
|
8
|
+
HdsFilterBarFilterTypeValues["singleSelect"] = "single-select";
|
|
9
|
+
HdsFilterBarFilterTypeValues["range"] = "range";
|
|
10
|
+
HdsFilterBarFilterTypeValues["generic"] = "generic";
|
|
11
|
+
HdsFilterBarFilterTypeValues["search"] = "search";
|
|
12
|
+
return HdsFilterBarFilterTypeValues;
|
|
13
|
+
}({});
|
|
14
|
+
let HdsFilterBarRangeFilterSelectorValues = /*#__PURE__*/function (HdsFilterBarRangeFilterSelectorValues) {
|
|
15
|
+
HdsFilterBarRangeFilterSelectorValues["lessThan"] = "less-than";
|
|
16
|
+
HdsFilterBarRangeFilterSelectorValues["lessThanOrEqualTo"] = "less-than-or-equal-to";
|
|
17
|
+
HdsFilterBarRangeFilterSelectorValues["equalTo"] = "equal-to";
|
|
18
|
+
HdsFilterBarRangeFilterSelectorValues["greaterThanOrEqualTo"] = "greater-than-or-equal-to";
|
|
19
|
+
HdsFilterBarRangeFilterSelectorValues["greaterThan"] = "greater-than";
|
|
20
|
+
return HdsFilterBarRangeFilterSelectorValues;
|
|
21
|
+
}({});
|
|
22
|
+
|
|
23
|
+
export { HdsFilterBarFilterTypeValues, HdsFilterBarRangeFilterSelectorValues };
|
|
24
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../src/components/hds/filter-bar/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsFilterBarFilterTypeValues {\n multiSelect = 'multi-select',\n singleSelect = 'single-select',\n range = 'range',\n generic = 'generic',\n search = 'search',\n}\n\nexport type HdsFilterBarFilterType = `${HdsFilterBarFilterTypeValues}`;\n\nexport interface HdsFilterBarGenericFilterData {\n value: unknown;\n}\n\nexport interface HdsFilterBarRangeFilterData {\n selector: HdsFilterBarRangeFilterSelector;\n value: number;\n}\n\nexport type HdsFilterBarData =\n | HdsFilterBarGenericFilterData[]\n | HdsFilterBarGenericFilterData\n | HdsFilterBarRangeFilterData;\n\nexport interface HdsFilterBarSingleSelectFilter {\n type: 'single-select';\n text?: string;\n data: HdsFilterBarGenericFilterData;\n}\n\nexport interface HdsFilterBarMultiSelectFilter {\n type: 'multi-select';\n text?: string;\n data: HdsFilterBarGenericFilterData[];\n}\n\nexport interface HdsFilterBarRangeFilter {\n type: 'range';\n text?: string;\n data: HdsFilterBarRangeFilterData;\n}\n\nexport interface HdsFilterBarSearchFilter {\n type: 'search';\n text?: string;\n data: HdsFilterBarGenericFilterData;\n}\n\nexport type HdsFilterBarFilter =\n | HdsFilterBarSingleSelectFilter\n | HdsFilterBarMultiSelectFilter\n | HdsFilterBarRangeFilter\n | HdsFilterBarSearchFilter;\n\nexport interface HdsFilterBarFilters {\n [name: string]: HdsFilterBarFilter;\n}\n\nexport enum HdsFilterBarRangeFilterSelectorValues {\n lessThan = 'less-than',\n lessThanOrEqualTo = 'less-than-or-equal-to',\n equalTo = 'equal-to',\n greaterThanOrEqualTo = 'greater-than-or-equal-to',\n greaterThan = 'greater-than',\n}\n\nexport type HdsFilterBarRangeFilterSelector =\n `${HdsFilterBarRangeFilterSelectorValues}`;\n"],"names":["HdsFilterBarFilterTypeValues","HdsFilterBarRangeFilterSelectorValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEA,IAAYA,4BAA4B,0BAA5BA,4BAA4B,EAAA;EAA5BA,4BAA4B,CAAA,aAAA,CAAA,GAAA,cAAA;EAA5BA,4BAA4B,CAAA,cAAA,CAAA,GAAA,eAAA;EAA5BA,4BAA4B,CAAA,OAAA,CAAA,GAAA,OAAA;EAA5BA,4BAA4B,CAAA,SAAA,CAAA,GAAA,SAAA;EAA5BA,4BAA4B,CAAA,QAAA,CAAA,GAAA,QAAA;AAAA,EAAA,OAA5BA,4BAA4B;AAAA,CAAA,CAAA,EAAA;AA0DxC,IAAYC,qCAAqC,0BAArCA,qCAAqC,EAAA;EAArCA,qCAAqC,CAAA,UAAA,CAAA,GAAA,WAAA;EAArCA,qCAAqC,CAAA,mBAAA,CAAA,GAAA,uBAAA;EAArCA,qCAAqC,CAAA,SAAA,CAAA,GAAA,UAAA;EAArCA,qCAAqC,CAAA,sBAAA,CAAA,GAAA,0BAAA;EAArCA,qCAAqC,CAAA,aAAA,CAAA,GAAA,cAAA;AAAA,EAAA,OAArCA,qCAAqC;AAAA,CAAA,CAAA,EAAA;;;;"}
|
package/dist/components.js
CHANGED
|
@@ -83,6 +83,16 @@ export { default as HdsDropdownToggleIcon } from './components/hds/dropdown/togg
|
|
|
83
83
|
export { HdsDropdownListItemInteractiveColorValues } from './components/hds/dropdown/list-item/types.js';
|
|
84
84
|
export { HdsDropdownToggleButtonColorValues, HdsDropdownToggleButtonSizeValues, HdsDropdownToggleIconAllowedIconValues, HdsDropdownToggleIconSizeValues } from './components/hds/dropdown/toggle/types.js';
|
|
85
85
|
export { HdsDropdownPositionToPlacementValues, HdsDropdownPositionValues } from './components/hds/dropdown/types.js';
|
|
86
|
+
export { default as HdsFilterBar } from './components/hds/filter-bar/index.js';
|
|
87
|
+
export { default as HdsFilterBarCheckbox } from './components/hds/filter-bar/checkbox.js';
|
|
88
|
+
export { default as HdsFilterBarFiltersDropdown } from './components/hds/filter-bar/filters-dropdown.js';
|
|
89
|
+
export { default as HdsFilterBarFilterGroup } from './components/hds/filter-bar/filter-group.js';
|
|
90
|
+
export { default as HdsFilterBarRadio } from './components/hds/filter-bar/radio.js';
|
|
91
|
+
export { default as HdsFilterBarRange } from './components/hds/filter-bar/range.js';
|
|
92
|
+
export { default as HdsFilterBarTabs } from './components/hds/filter-bar/tabs/index.js';
|
|
93
|
+
export { default as HdsFilterBarTabsPanel } from './components/hds/filter-bar/tabs/panel.js';
|
|
94
|
+
export { default as HdsFilterBarTabsTab } from './components/hds/filter-bar/tabs/tab.js';
|
|
95
|
+
export { HdsFilterBarFilterTypeValues, HdsFilterBarRangeFilterSelectorValues } from './components/hds/filter-bar/types.js';
|
|
86
96
|
export { default as HdsFlyout } from './components/hds/flyout/index.js';
|
|
87
97
|
export { HdsFlyoutSizesValues } from './components/hds/flyout/types.js';
|
|
88
98
|
export { default as HdsForm } from './components/hds/form/index.js';
|
package/dist/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1366,7 +1366,8 @@
|
|
|
1366
1366
|
background-color: var(--token-color-surface-interactive);
|
|
1367
1367
|
}
|
|
1368
1368
|
|
|
1369
|
-
.hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon
|
|
1369
|
+
.hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon,
|
|
1370
|
+
.hds-advanced-table__th-filter-menu .hds-dropdown-toggle-icon {
|
|
1370
1371
|
width: 24px;
|
|
1371
1372
|
height: 24px;
|
|
1372
1373
|
margin: -2px 0;
|
|
@@ -1376,14 +1377,19 @@
|
|
|
1376
1377
|
border: 1px solid transparent;
|
|
1377
1378
|
border-radius: var(--token-border-radius-x-small);
|
|
1378
1379
|
}
|
|
1379
|
-
.hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon:hover, .hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon.mock-hover
|
|
1380
|
+
.hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon:hover, .hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon.mock-hover,
|
|
1381
|
+
.hds-advanced-table__th-filter-menu .hds-dropdown-toggle-icon:hover,
|
|
1382
|
+
.hds-advanced-table__th-filter-menu .hds-dropdown-toggle-icon.mock-hover {
|
|
1380
1383
|
color: var(--token-color-foreground-primary);
|
|
1381
1384
|
background-color: var(--token-color-surface-interactive);
|
|
1382
1385
|
border-color: var(--token-color-border-strong);
|
|
1383
1386
|
box-shadow: var(--token-elevation-low-box-shadow);
|
|
1384
1387
|
}
|
|
1385
1388
|
.hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon:focus::before, .hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon.mock-focus::before,
|
|
1386
|
-
.hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon .hds-dropdown-toggle-icon--is-open::before
|
|
1389
|
+
.hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon .hds-dropdown-toggle-icon--is-open::before,
|
|
1390
|
+
.hds-advanced-table__th-filter-menu .hds-dropdown-toggle-icon:focus::before,
|
|
1391
|
+
.hds-advanced-table__th-filter-menu .hds-dropdown-toggle-icon.mock-focus::before,
|
|
1392
|
+
.hds-advanced-table__th-filter-menu .hds-dropdown-toggle-icon .hds-dropdown-toggle-icon--is-open::before {
|
|
1387
1393
|
top: 0;
|
|
1388
1394
|
right: 0;
|
|
1389
1395
|
bottom: 0;
|
|
@@ -1465,6 +1471,24 @@
|
|
|
1465
1471
|
align-self: flex-start;
|
|
1466
1472
|
}
|
|
1467
1473
|
|
|
1474
|
+
.hds-advanced-table__th-filter-menu--active {
|
|
1475
|
+
position: relative;
|
|
1476
|
+
}
|
|
1477
|
+
.hds-advanced-table__th-filter-menu--active::before {
|
|
1478
|
+
position: absolute;
|
|
1479
|
+
top: -4px;
|
|
1480
|
+
right: -4px;
|
|
1481
|
+
width: 6px;
|
|
1482
|
+
height: 6px;
|
|
1483
|
+
background-color: var(--token-color-foreground-action);
|
|
1484
|
+
border-radius: 50%;
|
|
1485
|
+
content: "";
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
.hds-advanced-table__clear-filters-button {
|
|
1489
|
+
margin-bottom: 16px;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1468
1492
|
.hds-advanced-table__tbody {
|
|
1469
1493
|
display: grid;
|
|
1470
1494
|
grid-column: 1/-1;
|
|
@@ -1672,6 +1696,42 @@
|
|
|
1672
1696
|
box-shadow: var(--token-elevation-mid-box-shadow);
|
|
1673
1697
|
}
|
|
1674
1698
|
|
|
1699
|
+
.hds-advanced-table__actions .hds-filter-bar {
|
|
1700
|
+
border-bottom: none;
|
|
1701
|
+
border-radius: var(--token-border-radius-medium) var(--token-border-radius-medium) 0 0;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
.hds-advanced-table__actions + .hds-advanced-table__container {
|
|
1705
|
+
border-top-left-radius: 0;
|
|
1706
|
+
border-top-right-radius: 0;
|
|
1707
|
+
}
|
|
1708
|
+
.hds-advanced-table__actions + .hds-advanced-table__container .hds-advanced-table__thead .hds-advanced-table__tr:first-of-type .hds-advanced-table__th:first-child {
|
|
1709
|
+
border-top-left-radius: 0;
|
|
1710
|
+
}
|
|
1711
|
+
.hds-advanced-table__actions + .hds-advanced-table__container .hds-advanced-table__thead .hds-advanced-table__tr:first-of-type .hds-advanced-table__th:last-child {
|
|
1712
|
+
border-top-right-radius: 0;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
.hds-advanced-table__empty-state {
|
|
1716
|
+
display: flex;
|
|
1717
|
+
align-items: center;
|
|
1718
|
+
justify-content: center;
|
|
1719
|
+
height: 400px;
|
|
1720
|
+
background-color: var(--token-color-surface-primary);
|
|
1721
|
+
border: 1px solid var(--token-color-border-primary);
|
|
1722
|
+
border-bottom-right-radius: var(--token-border-radius-medium);
|
|
1723
|
+
border-bottom-left-radius: var(--token-border-radius-medium);
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
.hds-advanced-table__empty-state__content {
|
|
1727
|
+
max-width: 450px;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
.hds-advanced-table:not(:has(+ .hds-advanced-table__empty-state)) {
|
|
1731
|
+
border-bottom-right-radius: 0;
|
|
1732
|
+
border-bottom-left-radius: 0;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1675
1735
|
/**
|
|
1676
1736
|
* Copyright (c) HashiCorp, Inc.
|
|
1677
1737
|
* SPDX-License-Identifier: MPL-2.0
|
|
@@ -5455,6 +5515,141 @@ button.hds-button[href]::after {
|
|
|
5455
5515
|
vertical-align: bottom;
|
|
5456
5516
|
}
|
|
5457
5517
|
|
|
5518
|
+
/**
|
|
5519
|
+
* Copyright (c) HashiCorp, Inc.
|
|
5520
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
5521
|
+
*/
|
|
5522
|
+
.hds-filter-bar {
|
|
5523
|
+
display: grid;
|
|
5524
|
+
gap: 8px;
|
|
5525
|
+
padding: 8px;
|
|
5526
|
+
background-color: var(--token-color-surface-faint);
|
|
5527
|
+
border: 1px solid var(--token-color-border-primary);
|
|
5528
|
+
border-radius: var(--token-border-radius-medium);
|
|
5529
|
+
}
|
|
5530
|
+
.hds-filter-bar .hds-filter-bar__filters {
|
|
5531
|
+
display: flex;
|
|
5532
|
+
flex-wrap: wrap;
|
|
5533
|
+
gap: 8px 12px;
|
|
5534
|
+
align-items: end;
|
|
5535
|
+
padding-top: 8px;
|
|
5536
|
+
border-top: 1px solid var(--token-color-border-primary);
|
|
5537
|
+
}
|
|
5538
|
+
.hds-filter-bar .hds-filter-bar__filters .hds-dropdown__list .hds-form-text-input {
|
|
5539
|
+
width: auto;
|
|
5540
|
+
}
|
|
5541
|
+
.hds-filter-bar .hds-filter-bar__actions {
|
|
5542
|
+
display: flex;
|
|
5543
|
+
flex-direction: row;
|
|
5544
|
+
gap: 8px;
|
|
5545
|
+
align-items: end;
|
|
5546
|
+
}
|
|
5547
|
+
|
|
5548
|
+
.hds-filter-bar__actions__right {
|
|
5549
|
+
display: flex;
|
|
5550
|
+
flex-direction: row;
|
|
5551
|
+
gap: 8px;
|
|
5552
|
+
margin-left: auto;
|
|
5553
|
+
}
|
|
5554
|
+
|
|
5555
|
+
.hds-filter-bar__search {
|
|
5556
|
+
--token-form-control-padding: 4px;
|
|
5557
|
+
}
|
|
5558
|
+
|
|
5559
|
+
.hds-filter-bar__filters-dropdown__filter-group .hds-form-field--layout-flag {
|
|
5560
|
+
padding: 8px 12px;
|
|
5561
|
+
}
|
|
5562
|
+
|
|
5563
|
+
.hds-filter-bar__filters-dropdown .hds-dropdown__list,
|
|
5564
|
+
.hds-filter-bar__filters-dropdown .hds-dropdown-list-item {
|
|
5565
|
+
padding: 0;
|
|
5566
|
+
}
|
|
5567
|
+
|
|
5568
|
+
.hds-filter-bar__filters-dropdown .hds-layout-flex {
|
|
5569
|
+
margin: 8px 0;
|
|
5570
|
+
}
|
|
5571
|
+
|
|
5572
|
+
.hds-filter-bar__filters-dropdown .hds-button-set {
|
|
5573
|
+
gap: 8px;
|
|
5574
|
+
}
|
|
5575
|
+
|
|
5576
|
+
.hds-filter-bar__filters-dropdown__filter-group__list {
|
|
5577
|
+
flex: 1 1 auto;
|
|
5578
|
+
margin: 0;
|
|
5579
|
+
padding: 0;
|
|
5580
|
+
overflow-y: auto;
|
|
5581
|
+
list-style: none;
|
|
5582
|
+
overscroll-behavior: contain;
|
|
5583
|
+
}
|
|
5584
|
+
|
|
5585
|
+
.hds-filter-bar__filters-dropdown__filters-count,
|
|
5586
|
+
.hds-filter-bar__filters-dropdown__filter-group__filters-count {
|
|
5587
|
+
margin-left: 8px;
|
|
5588
|
+
}
|
|
5589
|
+
|
|
5590
|
+
.hds-filter-bar__filters-dropdown__filter-option {
|
|
5591
|
+
display: block;
|
|
5592
|
+
padding: 8px 0;
|
|
5593
|
+
}
|
|
5594
|
+
.hds-filter-bar__filters-dropdown__filter-option--hidden {
|
|
5595
|
+
display: none;
|
|
5596
|
+
}
|
|
5597
|
+
|
|
5598
|
+
.hds-filter-bar__tabs {
|
|
5599
|
+
display: flex;
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
.hds-filter-bar__tabs__list {
|
|
5603
|
+
display: flex;
|
|
5604
|
+
flex-direction: column;
|
|
5605
|
+
gap: 4px;
|
|
5606
|
+
width: 50%;
|
|
5607
|
+
padding: 8px;
|
|
5608
|
+
list-style: none;
|
|
5609
|
+
background-color: var(--token-color-surface-faint);
|
|
5610
|
+
border-right: 1px solid var(--token-color-border-primary);
|
|
5611
|
+
border-top-left-radius: var(--token-border-radius-medium);
|
|
5612
|
+
}
|
|
5613
|
+
|
|
5614
|
+
.hds-filter-bar__tabs__panel:not([hidden]) {
|
|
5615
|
+
display: flex;
|
|
5616
|
+
flex-direction: column;
|
|
5617
|
+
gap: 8px;
|
|
5618
|
+
width: 50%;
|
|
5619
|
+
padding: 16px;
|
|
5620
|
+
background-color: var(--token-color-surface-primary);
|
|
5621
|
+
border-top-right-radius: var(--token-border-radius-medium);
|
|
5622
|
+
}
|
|
5623
|
+
|
|
5624
|
+
.hds-filter-bar__tabs__tab__button {
|
|
5625
|
+
display: flex;
|
|
5626
|
+
gap: 16px;
|
|
5627
|
+
align-items: center;
|
|
5628
|
+
justify-content: space-between;
|
|
5629
|
+
width: 100%;
|
|
5630
|
+
padding: 8px 12px;
|
|
5631
|
+
color: var(--token-color-foreground-primary);
|
|
5632
|
+
text-align: left;
|
|
5633
|
+
background-color: transparent;
|
|
5634
|
+
border: none;
|
|
5635
|
+
border-radius: var(--token-border-radius-small);
|
|
5636
|
+
}
|
|
5637
|
+
.hds-filter-bar__tabs__tab__button .hds-icon {
|
|
5638
|
+
fill: var(--token-color-foreground-primary);
|
|
5639
|
+
}
|
|
5640
|
+
.hds-filter-bar__tabs__tab__button.mock-hover, .hds-filter-bar__tabs__tab__button:hover, .hds-filter-bar__tabs__tab__button.mock-focus, .hds-filter-bar__tabs__tab__button:focus {
|
|
5641
|
+
background-color: var(--token-color-surface-interactive-hover);
|
|
5642
|
+
cursor: pointer;
|
|
5643
|
+
}
|
|
5644
|
+
|
|
5645
|
+
.hds-filter-bar__tabs__tab--is-selected .hds-filter-bar__tabs__tab__button {
|
|
5646
|
+
color: var(--token-color-foreground-strong);
|
|
5647
|
+
background-color: var(--token-color-surface-interactive-active);
|
|
5648
|
+
}
|
|
5649
|
+
.hds-filter-bar__tabs__tab--is-selected .hds-filter-bar__tabs__tab__button .hds-icon {
|
|
5650
|
+
fill: var(--token-color-foreground-strong);
|
|
5651
|
+
}
|
|
5652
|
+
|
|
5458
5653
|
/**
|
|
5459
5654
|
* Copyright (c) HashiCorp, Inc.
|
|
5460
5655
|
* SPDX-License-Identifier: MPL-2.0
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
@use "../components/disclosure-primitive";
|
|
37
37
|
@use "../components/dismiss-button";
|
|
38
38
|
@use "../components/dropdown";
|
|
39
|
+
@use "../components/filter-bar";
|
|
39
40
|
@use "../components/flyout";
|
|
40
41
|
@use "../components/form"; // multiple components
|
|
41
42
|
@use "../components/icon";
|
|
@@ -415,7 +415,8 @@ $hds-advanced-table-drag-preview-background-color: rgba(204, 227, 254, 30%);
|
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
.hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon
|
|
418
|
+
.hds-advanced-table__th-context-menu .hds-dropdown-toggle-icon,
|
|
419
|
+
.hds-advanced-table__th-filter-menu .hds-dropdown-toggle-icon {
|
|
419
420
|
width: $hds-advanced-table-button-size;
|
|
420
421
|
height: $hds-advanced-table-button-size;
|
|
421
422
|
margin: -2px 0;
|
|
@@ -504,6 +505,25 @@ $hds-advanced-table-drag-preview-background-color: rgba(204, 227, 254, 30%);
|
|
|
504
505
|
align-self: flex-start;
|
|
505
506
|
}
|
|
506
507
|
|
|
508
|
+
.hds-advanced-table__th-filter-menu--active {
|
|
509
|
+
position: relative;
|
|
510
|
+
|
|
511
|
+
&::before {
|
|
512
|
+
position: absolute;
|
|
513
|
+
top: -4px;
|
|
514
|
+
right: -4px;
|
|
515
|
+
width: 6px;
|
|
516
|
+
height: 6px;
|
|
517
|
+
background-color: var(--token-color-foreground-action);
|
|
518
|
+
border-radius: 50%;
|
|
519
|
+
content: "";
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.hds-advanced-table__clear-filters-button {
|
|
524
|
+
margin-bottom: 16px;
|
|
525
|
+
}
|
|
526
|
+
|
|
507
527
|
// ----------------------------------------------------------------
|
|
508
528
|
|
|
509
529
|
// TABLE BODY
|
|
@@ -745,3 +765,49 @@ $hds-advanced-table-drag-preview-background-color: rgba(204, 227, 254, 30%);
|
|
|
745
765
|
border-radius: var(--token-border-radius-medium);
|
|
746
766
|
box-shadow: var(--token-elevation-mid-box-shadow);
|
|
747
767
|
}
|
|
768
|
+
|
|
769
|
+
// ----------------------------------------------------------------
|
|
770
|
+
|
|
771
|
+
// FILTER BAR
|
|
772
|
+
.hds-advanced-table__actions .hds-filter-bar {
|
|
773
|
+
border-bottom: none;
|
|
774
|
+
border-radius: $hds-advanced-table-border-radius $hds-advanced-table-border-radius 0 0;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.hds-advanced-table__actions + .hds-advanced-table__container {
|
|
778
|
+
border-top-left-radius: 0;
|
|
779
|
+
border-top-right-radius: 0;
|
|
780
|
+
|
|
781
|
+
.hds-advanced-table__thead .hds-advanced-table__tr:first-of-type .hds-advanced-table__th {
|
|
782
|
+
&:first-child {
|
|
783
|
+
border-top-left-radius: 0;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
&:last-child {
|
|
787
|
+
border-top-right-radius: 0;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/// ----------------------------------------------------------------
|
|
793
|
+
|
|
794
|
+
// EMPTY STATE
|
|
795
|
+
.hds-advanced-table__empty-state {
|
|
796
|
+
display: flex;
|
|
797
|
+
align-items: center;
|
|
798
|
+
justify-content: center;
|
|
799
|
+
height: 400px;
|
|
800
|
+
background-color: var(--token-color-surface-primary);
|
|
801
|
+
border: 1px solid var(--token-color-border-primary);
|
|
802
|
+
border-bottom-right-radius: $hds-advanced-table-border-radius;
|
|
803
|
+
border-bottom-left-radius: $hds-advanced-table-border-radius;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
.hds-advanced-table__empty-state__content {
|
|
807
|
+
max-width: 450px;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
.hds-advanced-table:not(:has(+ .hds-advanced-table__empty-state)) {
|
|
811
|
+
border-bottom-right-radius: 0;
|
|
812
|
+
border-bottom-left-radius: 0;
|
|
813
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
//
|
|
7
|
+
// FILTER BAR
|
|
8
|
+
//
|
|
9
|
+
|
|
10
|
+
.hds-filter-bar {
|
|
11
|
+
display: grid;
|
|
12
|
+
gap: 8px;
|
|
13
|
+
padding: 8px;
|
|
14
|
+
background-color: var(--token-color-surface-faint);
|
|
15
|
+
border: 1px solid var(--token-color-border-primary);
|
|
16
|
+
border-radius: var(--token-border-radius-medium);
|
|
17
|
+
|
|
18
|
+
.hds-filter-bar__filters {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-wrap: wrap;
|
|
21
|
+
gap: 8px 12px;
|
|
22
|
+
align-items: end;
|
|
23
|
+
padding-top: 8px;
|
|
24
|
+
border-top: 1px solid var(--token-color-border-primary);
|
|
25
|
+
|
|
26
|
+
.hds-dropdown__list .hds-form-text-input {
|
|
27
|
+
width: auto;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.hds-filter-bar__actions {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
gap: 8px;
|
|
35
|
+
align-items: end;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.hds-filter-bar__actions__right {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: row;
|
|
42
|
+
gap: 8px;
|
|
43
|
+
margin-left: auto;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.hds-filter-bar__search {
|
|
47
|
+
--token-form-control-padding: 4px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// FILTERS DROPDOWN
|
|
51
|
+
//
|
|
52
|
+
|
|
53
|
+
.hds-filter-bar__filters-dropdown__filter-group .hds-form-field--layout-flag {
|
|
54
|
+
padding: 8px 12px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.hds-filter-bar__filters-dropdown .hds-dropdown__list,
|
|
58
|
+
.hds-filter-bar__filters-dropdown .hds-dropdown-list-item {
|
|
59
|
+
padding: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.hds-filter-bar__filters-dropdown .hds-layout-flex {
|
|
63
|
+
margin: 8px 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.hds-filter-bar__filters-dropdown .hds-button-set {
|
|
67
|
+
gap: 8px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.hds-filter-bar__filters-dropdown__filter-group__list {
|
|
71
|
+
flex: 1 1 auto;
|
|
72
|
+
margin: 0;
|
|
73
|
+
padding: 0;
|
|
74
|
+
overflow-y: auto;
|
|
75
|
+
list-style: none;
|
|
76
|
+
overscroll-behavior: contain;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.hds-filter-bar__filters-dropdown__filters-count,
|
|
80
|
+
.hds-filter-bar__filters-dropdown__filter-group__filters-count {
|
|
81
|
+
margin-left: 8px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.hds-filter-bar__filters-dropdown__filter-option {
|
|
85
|
+
display: block;
|
|
86
|
+
padding: 8px 0;
|
|
87
|
+
|
|
88
|
+
&--hidden {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// TABS
|
|
94
|
+
//
|
|
95
|
+
|
|
96
|
+
.hds-filter-bar__tabs {
|
|
97
|
+
display: flex;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.hds-filter-bar__tabs__list {
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
gap: 4px;
|
|
104
|
+
width: 50%;
|
|
105
|
+
padding: 8px;
|
|
106
|
+
list-style: none;
|
|
107
|
+
background-color: var(--token-color-surface-faint);
|
|
108
|
+
border-right: 1px solid var(--token-color-border-primary);
|
|
109
|
+
border-top-left-radius: var(--token-border-radius-medium);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.hds-filter-bar__tabs__panel:not([hidden]) {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
gap: 8px;
|
|
116
|
+
width: 50%;
|
|
117
|
+
padding: 16px;
|
|
118
|
+
background-color: var(--token-color-surface-primary);
|
|
119
|
+
border-top-right-radius: var(--token-border-radius-medium);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.hds-filter-bar__tabs__tab__button {
|
|
123
|
+
display: flex;
|
|
124
|
+
gap: 16px;
|
|
125
|
+
align-items: center;
|
|
126
|
+
justify-content: space-between;
|
|
127
|
+
width: 100%;
|
|
128
|
+
padding: 8px 12px;
|
|
129
|
+
color: var(--token-color-foreground-primary);
|
|
130
|
+
text-align: left;
|
|
131
|
+
background-color: transparent;
|
|
132
|
+
border: none;
|
|
133
|
+
border-radius: var(--token-border-radius-small);
|
|
134
|
+
|
|
135
|
+
.hds-icon {
|
|
136
|
+
fill: var(--token-color-foreground-primary);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&.mock-hover,
|
|
140
|
+
&:hover,
|
|
141
|
+
&.mock-focus,
|
|
142
|
+
&:focus {
|
|
143
|
+
background-color: var(--token-color-surface-interactive-hover);
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.hds-filter-bar__tabs__tab--is-selected .hds-filter-bar__tabs__tab__button {
|
|
149
|
+
color: var(--token-color-foreground-strong);
|
|
150
|
+
background-color: var(--token-color-surface-interactive-active);
|
|
151
|
+
|
|
152
|
+
.hds-icon {
|
|
153
|
+
fill: var(--token-color-foreground-strong);
|
|
154
|
+
}
|
|
155
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0-rc-20251106155636",
|
|
4
4
|
"description": "Helios Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -219,6 +219,15 @@
|
|
|
219
219
|
"./components/hds/dropdown/toggle/button.js": "./dist/_app_/components/hds/dropdown/toggle/button.js",
|
|
220
220
|
"./components/hds/dropdown/toggle/chevron.js": "./dist/_app_/components/hds/dropdown/toggle/chevron.js",
|
|
221
221
|
"./components/hds/dropdown/toggle/icon.js": "./dist/_app_/components/hds/dropdown/toggle/icon.js",
|
|
222
|
+
"./components/hds/filter-bar/checkbox.js": "./dist/_app_/components/hds/filter-bar/checkbox.js",
|
|
223
|
+
"./components/hds/filter-bar/filter-group.js": "./dist/_app_/components/hds/filter-bar/filter-group.js",
|
|
224
|
+
"./components/hds/filter-bar/filters-dropdown.js": "./dist/_app_/components/hds/filter-bar/filters-dropdown.js",
|
|
225
|
+
"./components/hds/filter-bar.js": "./dist/_app_/components/hds/filter-bar.js",
|
|
226
|
+
"./components/hds/filter-bar/radio.js": "./dist/_app_/components/hds/filter-bar/radio.js",
|
|
227
|
+
"./components/hds/filter-bar/range.js": "./dist/_app_/components/hds/filter-bar/range.js",
|
|
228
|
+
"./components/hds/filter-bar/tabs.js": "./dist/_app_/components/hds/filter-bar/tabs.js",
|
|
229
|
+
"./components/hds/filter-bar/tabs/panel.js": "./dist/_app_/components/hds/filter-bar/tabs/panel.js",
|
|
230
|
+
"./components/hds/filter-bar/tabs/tab.js": "./dist/_app_/components/hds/filter-bar/tabs/tab.js",
|
|
222
231
|
"./components/hds/flyout.js": "./dist/_app_/components/hds/flyout.js",
|
|
223
232
|
"./components/hds/form/character-count.js": "./dist/_app_/components/hds/form/character-count.js",
|
|
224
233
|
"./components/hds/form/checkbox/base.js": "./dist/_app_/components/hds/form/checkbox/base.js",
|