@hashicorp/design-system-components 4.18.2 → 4.19.0-rc-20250421170446

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.
@@ -46,31 +46,8 @@ export default class HdsFormSuperSelectMultipleBase extends Component<HdsFormSup
46
46
  showSelected(): void;
47
47
  showAll(): void;
48
48
  clearSelected(): void;
49
- /**
50
- * Determine if `@afterOptionsComponent` gets displayed
51
- * @param showAfterOptions
52
- * @type {boolean}
53
- * @default true
54
- */
55
49
  get showAfterOptions(): boolean;
56
- /**
57
- * Get the search placeholder text
58
- * @param searchPlaceholder
59
- * @type {string}
60
- * @default 'Search'
61
- */
62
50
  get searchPlaceholder(): string;
63
- /**
64
- * Get the maxWidth to apply to the dropdown
65
- * @param dropdownMaxWidth
66
- * @type {string}
67
- * @default 'none'
68
- */
69
- get dropdownMaxWidthStyle(): Record<string, string>;
70
- /**
71
- * Get the class names to apply to the component.
72
- * @method classNames
73
- * @return {string} The "class" attribute to apply to the component.
74
- */
51
+ get styles(): Record<string, string>;
75
52
  get classNames(): string;
76
53
  }
@@ -17,3 +17,5 @@ export declare const HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL = "#EF3016";
17
17
  export declare const HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY = "#0D0E12";
18
18
  export declare const HDS_CODE_EDITOR_COLOR_SURFACE_FAINT = "#15181e";
19
19
  export declare const HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE = "#2B303C";
20
+ export declare const HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_INTERNAL = "#9BC7FD";
21
+ export declare const HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_EXTERNAL = "#0D69F2";
@@ -7,7 +7,7 @@ import { precompileTemplate } from '@ember/template-compilation';
7
7
  import { g, i, n } from 'decorator-transforms/runtime';
8
8
  import { setComponentTemplate } from '@ember/component';
9
9
 
10
- var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! Important: if an argument is added in base.hbs, it must also be added/processed in the Base component used in field.hbs }}\n<div class={{this.classNames}} {{style this.dropdownMaxWidthStyle}}>\n <PowerSelectMultiple\n @afterOptionsComponent={{if\n this.showAfterOptions\n (or\n @afterOptionsComponent\n (component\n \"hds/form/super-select/after-options\"\n content=@afterOptionsContent\n resultCountMessage=this.resultCountMessage\n showNoSelectedMessage=this._showNoSelectedMessage\n showOnlySelected=this._showOnlySelected\n showSelected=this.showSelected\n showAll=this.showAll\n clearSelected=this.clearSelected\n selectedCount=this.selectedCount\n )\n )\n }}\n @ariaDescribedBy={{@ariaDescribedBy}}\n @ariaInvalid={{@ariaInvalid}}\n @ariaLabel={{@ariaLabel}}\n @ariaLabelledBy={{@ariaLabelledBy}}\n @beforeOptionsComponent={{@beforeOptionsComponent}}\n @calculatePosition={{if @verticalPosition undefined this.calculatePosition}}\n @closeOnSelect={{false}}\n @disabled={{@disabled}}\n @dropdownClass={{@dropdownClass}}\n @extra={{@extra}}\n @groupComponent={{component \"hds/form/super-select/option-group\"}}\n @horizontalPosition={{@horizontalPosition}}\n @initiallyOpened={{@initiallyOpened}}\n @labelText={{@labelText}}\n @loadingMessage={{@loadingMessage}}\n @matcher={{@matcher}}\n @matchTriggerWidth={{if @dropdownMaxWidth false @matchTriggerWidth}}\n @noMatchesMessage={{@noMatchesMessage}}\n @onBlur={{@onBlur}}\n @onChange={{@onChange}}\n @onClose={{@onClose}}\n @onFocus={{@onFocus}}\n @onInput={{@onInput}}\n @onKeydown={{@onKeydown}}\n @onOpen={{@onOpen}}\n @options={{@options}}\n @optionsComponent={{@optionsComponent}}\n @placeholder={{@placeholder}}\n @placeholderComponent={{@placeholderComponent}}\n @preventScroll={{@preventScroll}}\n @registerAPI={{this.setPowerSelectAPI}}\n @renderInPlace={{true}}\n @resultCountMessage={{@resultCountMessage}}\n @scrollTo={{@scrollTo}}\n @search={{@search}}\n @searchEnabled={{@searchEnabled}}\n @searchField={{@searchField}}\n @searchFieldPosition=\"before-options\"\n @searchMessage={{@searchMessage}}\n @searchPlaceholder={{this.searchPlaceholder}}\n @selected={{@selected}}\n @selectedItemComponent={{@selectedItemComponent}}\n @tabindex={{@tabindex}}\n @triggerClass={{@triggerClass}}\n @triggerComponent={{@triggerComponent}}\n @triggerId={{@triggerId}}\n @triggerRole={{@triggerRole}}\n @typeAheadOptionMatcher={{@typeAheadOptionMatcher}}\n @verticalPosition={{@verticalPosition}}\n ...attributes\n as |option select|\n >\n {{! even if technically what is yielded here are _a list_ of options, we\'ve decided to keep the `option` name for consistency with the existing `PowerSelect` API }}\n {{yield option select}}\n </PowerSelectMultiple>\n</div>");
10
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! Important: if an argument is added in base.hbs, it must also be added/processed in the Base component used in field.hbs }}\n<div class={{this.classNames}} {{style this.styles}}>\n <PowerSelectMultiple\n @afterOptionsComponent={{if\n this.showAfterOptions\n (or\n @afterOptionsComponent\n (component\n \"hds/form/super-select/after-options\"\n content=@afterOptionsContent\n resultCountMessage=this.resultCountMessage\n showNoSelectedMessage=this._showNoSelectedMessage\n showOnlySelected=this._showOnlySelected\n showSelected=this.showSelected\n showAll=this.showAll\n clearSelected=this.clearSelected\n selectedCount=this.selectedCount\n )\n )\n }}\n @ariaDescribedBy={{@ariaDescribedBy}}\n @ariaInvalid={{@ariaInvalid}}\n @ariaLabel={{@ariaLabel}}\n @ariaLabelledBy={{@ariaLabelledBy}}\n @beforeOptionsComponent={{@beforeOptionsComponent}}\n @calculatePosition={{if @verticalPosition undefined this.calculatePosition}}\n @closeOnSelect={{false}}\n @disabled={{@disabled}}\n @dropdownClass={{@dropdownClass}}\n @extra={{@extra}}\n @groupComponent={{component \"hds/form/super-select/option-group\"}}\n @horizontalPosition={{@horizontalPosition}}\n @initiallyOpened={{@initiallyOpened}}\n @labelText={{@labelText}}\n @loadingMessage={{@loadingMessage}}\n @matcher={{@matcher}}\n @matchTriggerWidth={{if @dropdownMaxWidth false @matchTriggerWidth}}\n @noMatchesMessage={{@noMatchesMessage}}\n @onBlur={{@onBlur}}\n @onChange={{@onChange}}\n @onClose={{@onClose}}\n @onFocus={{@onFocus}}\n @onInput={{@onInput}}\n @onKeydown={{@onKeydown}}\n @onOpen={{@onOpen}}\n @options={{@options}}\n @optionsComponent={{@optionsComponent}}\n @placeholder={{@placeholder}}\n @placeholderComponent={{@placeholderComponent}}\n @preventScroll={{@preventScroll}}\n @registerAPI={{this.setPowerSelectAPI}}\n @renderInPlace={{true}}\n @resultCountMessage={{@resultCountMessage}}\n @scrollTo={{@scrollTo}}\n @search={{@search}}\n @searchEnabled={{@searchEnabled}}\n @searchField={{@searchField}}\n @searchFieldPosition=\"before-options\"\n @searchMessage={{@searchMessage}}\n @searchPlaceholder={{this.searchPlaceholder}}\n @selected={{@selected}}\n @selectedItemComponent={{@selectedItemComponent}}\n @tabindex={{@tabindex}}\n @triggerClass={{@triggerClass}}\n @triggerComponent={{@triggerComponent}}\n @triggerId={{@triggerId}}\n @triggerRole={{@triggerRole}}\n @typeAheadOptionMatcher={{@typeAheadOptionMatcher}}\n @verticalPosition={{@verticalPosition}}\n ...attributes\n as |option select|\n >\n {{! even if technically what is yielded here are _a list_ of options, we\'ve decided to keep the `option` name for consistency with the existing `PowerSelect` API }}\n {{yield option select}}\n </PowerSelectMultiple>\n</div>");
11
11
 
12
12
  /**
13
13
  * Copyright (c) HashiCorp, Inc.
@@ -47,7 +47,7 @@ class HdsFormSuperSelectMultipleBase extends Component {
47
47
  return this._powerSelectAPI?.resultsCount.toString() || '0';
48
48
  }
49
49
  get resultCountMessage() {
50
- return this.args.resultCountMessage || `${this.selectedCount} selected of ${this.optionsCount} total`;
50
+ return this.args.resultCountMessage || `${this.optionsCount} total`;
51
51
  }
52
52
  calculatePosition(trigger, content) {
53
53
  // use `hds-anchored-position` to calculate and set position
@@ -108,13 +108,6 @@ class HdsFormSuperSelectMultipleBase extends Component {
108
108
  this._showNoSelectedMessage = false;
109
109
  this._showOnlySelected = false;
110
110
  }
111
-
112
- /**
113
- * Determine if `@afterOptionsComponent` gets displayed
114
- * @param showAfterOptions
115
- * @type {boolean}
116
- * @default true
117
- */
118
111
  static {
119
112
  n(this.prototype, "clearSelected", [action]);
120
113
  }
@@ -123,35 +116,22 @@ class HdsFormSuperSelectMultipleBase extends Component {
123
116
  }
124
117
 
125
118
  // NOTE: The searchPlaceholder doesn't currently work for the multiple select
126
- /**
127
- * Get the search placeholder text
128
- * @param searchPlaceholder
129
- * @type {string}
130
- * @default 'Search'
131
- */
132
119
  get searchPlaceholder() {
133
120
  return this.args.searchPlaceholder ?? 'Search';
134
121
  }
135
-
136
- /**
137
- * Get the maxWidth to apply to the dropdown
138
- * @param dropdownMaxWidth
139
- * @type {string}
140
- * @default 'none'
141
- */
142
- get dropdownMaxWidthStyle() {
143
- const maxWidthStyle = {};
122
+ get styles() {
123
+ const styles = {};
144
124
  if (this.args.dropdownMaxWidth) {
145
- maxWidthStyle['--hds-form-super-select-dropdown-max-width'] = this.args.dropdownMaxWidth;
125
+ styles['--hds-form-super-select-dropdown-max-width'] = this.args.dropdownMaxWidth;
126
+ }
127
+ if (this.selectedCount === '0') {
128
+ styles['--hds-form-super-select-selected-text-display'] = 'none';
129
+ } else {
130
+ styles['--hds-form-super-select-selected-text-display'] = 'flex';
146
131
  }
147
- return maxWidthStyle;
132
+ styles['--hds-form-super-select-selected-text'] = `'${this.selectedCount} selected'`;
133
+ return styles;
148
134
  }
149
-
150
- /**
151
- * Get the class names to apply to the component.
152
- * @method classNames
153
- * @return {string} The "class" attribute to apply to the component.
154
- */
155
135
  get classNames() {
156
136
  const classes = ['hds-form-super-select', 'hds-form-super-select-multiple'];
157
137
 
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../../src/components/hds/form/super-select/multiple/base.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport anchoredPositionModifier from '../../../../../modifiers/hds-anchored-position.ts';\n\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport {\n HdsFormSuperSelectHorizontalPositionValues,\n HdsFormSuperSelectHorizontalPositionToPlacementValues,\n} from '../types.ts';\n\nimport type { PowerSelectSignature } from 'ember-power-select/components/power-select';\nimport type { Select as PowerSelect } from 'ember-power-select/components/power-select';\nimport type { CalculatePositionResult } from 'ember-basic-dropdown/utils/calculate-position';\nimport type { HdsFormSuperSelectHorizontalPositions } from '../types.ts';\n\nexport const DEFAULT_HORIZONTAL_POSITION: string =\n HdsFormSuperSelectHorizontalPositionValues.Left;\nexport const HORIZONTAL_POSITION_MAPPING =\n HdsFormSuperSelectHorizontalPositionToPlacementValues;\n\nexport interface HdsFormSuperSelectMultipleBaseSignature {\n Args: PowerSelectSignature['Args'] & {\n showAfterOptions?: boolean;\n afterOptionsContent?: string;\n resultCountMessage?: string;\n dropdownMaxWidth?: string;\n matchTriggerWidth?: boolean;\n isInvalid?: boolean;\n };\n Blocks: PowerSelectSignature['Blocks'];\n Element: PowerSelectSignature['Element'];\n}\n\nexport default class HdsFormSuperSelectMultipleBase extends Component<HdsFormSuperSelectMultipleBaseSignature> {\n @tracked private _powerSelectAPI?: PowerSelect;\n @tracked private _showOnlySelected = false;\n @tracked private _showNoSelectedMessage = false;\n\n get horizontalPosition(): HdsFormSuperSelectHorizontalPositions {\n const { horizontalPosition = DEFAULT_HORIZONTAL_POSITION } = this.args;\n return horizontalPosition as HdsFormSuperSelectHorizontalPositions;\n }\n\n get selectedCount(): string {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access\n return this._powerSelectAPI?.selected?.length || '0';\n }\n\n get optionsCount(): string {\n return this._powerSelectAPI?.resultsCount.toString() || '0';\n }\n\n get resultCountMessage(): string {\n return (\n this.args.resultCountMessage ||\n `${this.selectedCount} selected of ${this.optionsCount} total`\n );\n }\n\n @action calculatePosition(\n trigger: Element,\n content: HTMLElement\n ): CalculatePositionResult {\n // use `hds-anchored-position` to calculate and set position\n // @ts-expect-error: known issue with type of invocation\n anchoredPositionModifier(content, [trigger], {\n placement: HORIZONTAL_POSITION_MAPPING[this.horizontalPosition],\n offsetOptions: 4,\n enableCollisionDetection: true,\n });\n // prevent PowerSelect from setting position\n return {\n horizontalPosition: 'auto',\n verticalPosition: 'auto',\n style: {},\n };\n }\n\n /**\n * This action sets the powerSelectAPI property and optionally calls a registerAPI function.\n *\n * @param {Object} powerSelectAPI - The API object for the PowerSelect component.\n *\n * If a `registerAPI` function is passed in through the component's arguments,\n * this function will be called with the `powerSelectAPI` as its argument.\n * This allows parent components or controllers to have access to the PowerSelect API.\n *\n * The `powerSelectAPI` is also stored on the component instance and used in `clearSelected`\n */\n @action\n setPowerSelectAPI(powerSelectAPI: PowerSelect): void {\n if (typeof this.args.registerAPI === 'function') {\n this.args.registerAPI(powerSelectAPI);\n }\n this._powerSelectAPI = powerSelectAPI;\n }\n\n @action showSelected(): void {\n this._showNoSelectedMessage = this.selectedCount === '0';\n this._showOnlySelected = true;\n }\n\n @action showAll(): void {\n this._showNoSelectedMessage = false;\n this._showOnlySelected = false;\n }\n\n @action clearSelected(): void {\n this._powerSelectAPI?.actions.select(null);\n // show all options after clearing all selection\n this._showNoSelectedMessage = false;\n this._showOnlySelected = false;\n }\n\n /**\n * Determine if `@afterOptionsComponent` gets displayed\n * @param showAfterOptions\n * @type {boolean}\n * @default true\n */\n get showAfterOptions(): boolean {\n return this.args.showAfterOptions ?? true;\n }\n\n // NOTE: The searchPlaceholder doesn't currently work for the multiple select\n /**\n * Get the search placeholder text\n * @param searchPlaceholder\n * @type {string}\n * @default 'Search'\n */\n get searchPlaceholder(): string {\n return this.args.searchPlaceholder ?? 'Search';\n }\n\n /**\n * Get the maxWidth to apply to the dropdown\n * @param dropdownMaxWidth\n * @type {string}\n * @default 'none'\n */\n get dropdownMaxWidthStyle(): Record<string, string> {\n const maxWidthStyle: { [key: string]: string } = {};\n if (this.args.dropdownMaxWidth) {\n maxWidthStyle['--hds-form-super-select-dropdown-max-width'] =\n this.args.dropdownMaxWidth;\n }\n return maxWidthStyle;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-form-super-select', 'hds-form-super-select-multiple'];\n\n // add a class based on the @matchTriggerWidth argument or whether dropdownMaxWidth is set\n if (this.args.matchTriggerWidth === false || this.args.dropdownMaxWidth) {\n classes.push('hds-form-super-select--dropdown-content-auto-width');\n }\n\n // add a class based on the @isInvalid argument\n if (this.args.isInvalid) {\n classes.push(`hds-form-super-select--is-invalid`);\n }\n\n // add a class based on the showOnlySelected\n if (this._showOnlySelected) {\n classes.push(`hds-form-super-select--show-only-selected`);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_HORIZONTAL_POSITION","HdsFormSuperSelectHorizontalPositionValues","Left","HORIZONTAL_POSITION_MAPPING","HdsFormSuperSelectHorizontalPositionToPlacementValues","HdsFormSuperSelectMultipleBase","Component","g","prototype","tracked","i","void 0","horizontalPosition","args","selectedCount","_powerSelectAPI","selected","length","optionsCount","resultsCount","toString","resultCountMessage","calculatePosition","trigger","content","anchoredPositionModifier","placement","offsetOptions","enableCollisionDetection","verticalPosition","style","n","action","setPowerSelectAPI","powerSelectAPI","registerAPI","showSelected","_showNoSelectedMessage","_showOnlySelected","showAll","clearSelected","actions","select","showAfterOptions","searchPlaceholder","dropdownMaxWidthStyle","maxWidthStyle","dropdownMaxWidth","classNames","classes","matchTriggerWidth","push","isInvalid","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;;AAiBaA,MAAAA,2BAAmC,GAC9CC,0CAA0C,CAACC;AACtC,MAAMC,2BAA2B,GACtCC;AAea,MAAMC,8BAA8B,SAASC,SA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ACtC,IAAI,CAACuC,SAAS,EAAE;AACvBH,MAAAA,OAAO,CAACE,IAAI,CAAC,CAAA,iCAAA,CAAmC,CAAC;AACnD;;AAEA;IACA,IAAI,IAAI,CAACb,iBAAiB,EAAE;AAC1BW,MAAAA,OAAO,CAACE,IAAI,CAAC,CAAA,yCAAA,CAA2C,CAAC;AAC3D;AAEA,IAAA,OAAOF,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EA9IoBlD,8BAA8B,CAAA;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../../src/components/hds/form/super-select/multiple/base.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport anchoredPositionModifier from '../../../../../modifiers/hds-anchored-position.ts';\n\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport {\n HdsFormSuperSelectHorizontalPositionValues,\n HdsFormSuperSelectHorizontalPositionToPlacementValues,\n} from '../types.ts';\n\nimport type { PowerSelectSignature } from 'ember-power-select/components/power-select';\nimport type { Select as PowerSelect } from 'ember-power-select/components/power-select';\nimport type { CalculatePositionResult } from 'ember-basic-dropdown/utils/calculate-position';\nimport type { HdsFormSuperSelectHorizontalPositions } from '../types.ts';\n\nexport const DEFAULT_HORIZONTAL_POSITION: string =\n HdsFormSuperSelectHorizontalPositionValues.Left;\nexport const HORIZONTAL_POSITION_MAPPING =\n HdsFormSuperSelectHorizontalPositionToPlacementValues;\n\nexport interface HdsFormSuperSelectMultipleBaseSignature {\n Args: PowerSelectSignature['Args'] & {\n showAfterOptions?: boolean;\n afterOptionsContent?: string;\n resultCountMessage?: string;\n dropdownMaxWidth?: string;\n matchTriggerWidth?: boolean;\n isInvalid?: boolean;\n };\n Blocks: PowerSelectSignature['Blocks'];\n Element: PowerSelectSignature['Element'];\n}\n\nexport default class HdsFormSuperSelectMultipleBase extends Component<HdsFormSuperSelectMultipleBaseSignature> {\n @tracked private _powerSelectAPI?: PowerSelect;\n @tracked private _showOnlySelected = false;\n @tracked private _showNoSelectedMessage = false;\n\n get horizontalPosition(): HdsFormSuperSelectHorizontalPositions {\n const { horizontalPosition = DEFAULT_HORIZONTAL_POSITION } = this.args;\n return horizontalPosition as HdsFormSuperSelectHorizontalPositions;\n }\n\n get selectedCount(): string {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access\n return this._powerSelectAPI?.selected?.length || '0';\n }\n\n get optionsCount(): string {\n return this._powerSelectAPI?.resultsCount.toString() || '0';\n }\n\n get resultCountMessage(): string {\n return this.args.resultCountMessage || `${this.optionsCount} total`;\n }\n\n @action calculatePosition(\n trigger: Element,\n content: HTMLElement\n ): CalculatePositionResult {\n // use `hds-anchored-position` to calculate and set position\n // @ts-expect-error: known issue with type of invocation\n anchoredPositionModifier(content, [trigger], {\n placement: HORIZONTAL_POSITION_MAPPING[this.horizontalPosition],\n offsetOptions: 4,\n enableCollisionDetection: true,\n });\n // prevent PowerSelect from setting position\n return {\n horizontalPosition: 'auto',\n verticalPosition: 'auto',\n style: {},\n };\n }\n\n /**\n * This action sets the powerSelectAPI property and optionally calls a registerAPI function.\n *\n * @param {Object} powerSelectAPI - The API object for the PowerSelect component.\n *\n * If a `registerAPI` function is passed in through the component's arguments,\n * this function will be called with the `powerSelectAPI` as its argument.\n * This allows parent components or controllers to have access to the PowerSelect API.\n *\n * The `powerSelectAPI` is also stored on the component instance and used in `clearSelected`\n */\n @action\n setPowerSelectAPI(powerSelectAPI: PowerSelect): void {\n if (typeof this.args.registerAPI === 'function') {\n this.args.registerAPI(powerSelectAPI);\n }\n this._powerSelectAPI = powerSelectAPI;\n }\n\n @action showSelected(): void {\n this._showNoSelectedMessage = this.selectedCount === '0';\n this._showOnlySelected = true;\n }\n\n @action showAll(): void {\n this._showNoSelectedMessage = false;\n this._showOnlySelected = false;\n }\n\n @action clearSelected(): void {\n this._powerSelectAPI?.actions.select(null);\n // show all options after clearing all selection\n this._showNoSelectedMessage = false;\n this._showOnlySelected = false;\n }\n\n get showAfterOptions(): boolean {\n return this.args.showAfterOptions ?? true;\n }\n\n // NOTE: The searchPlaceholder doesn't currently work for the multiple select\n get searchPlaceholder(): string {\n return this.args.searchPlaceholder ?? 'Search';\n }\n\n get styles(): Record<string, string> {\n const styles: { [key: string]: string } = {};\n\n if (this.args.dropdownMaxWidth) {\n styles['--hds-form-super-select-dropdown-max-width'] =\n this.args.dropdownMaxWidth;\n }\n\n if (this.selectedCount === '0') {\n styles['--hds-form-super-select-selected-text-display'] = 'none';\n } else {\n styles['--hds-form-super-select-selected-text-display'] = 'flex';\n }\n\n styles['--hds-form-super-select-selected-text'] =\n `'${this.selectedCount} selected'`;\n\n return styles;\n }\n\n get classNames(): string {\n const classes = ['hds-form-super-select', 'hds-form-super-select-multiple'];\n\n // add a class based on the @matchTriggerWidth argument or whether dropdownMaxWidth is set\n if (this.args.matchTriggerWidth === false || this.args.dropdownMaxWidth) {\n classes.push('hds-form-super-select--dropdown-content-auto-width');\n }\n\n // add a class based on the @isInvalid argument\n if (this.args.isInvalid) {\n classes.push(`hds-form-super-select--is-invalid`);\n }\n\n // add a class based on the showOnlySelected\n if (this._showOnlySelected) {\n classes.push(`hds-form-super-select--show-only-selected`);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_HORIZONTAL_POSITION","HdsFormSuperSelectHorizontalPositionValues","Left","HORIZONTAL_POSITION_MAPPING","HdsFormSuperSelectHorizontalPositionToPlacementValues","HdsFormSuperSelectMultipleBase","Component","g","prototype","tracked","i","void 0","horizontalPosition","args","selectedCount","_powerSelectAPI","selected","length","optionsCount","resultsCount","toString","resultCountMessage","calculatePosition","trigger","content","anchoredPositionModifier","placement","offsetOptions","enableCollisionDetection","verticalPosition","style","n","action","setPowerSelectAPI","powerSelectAPI","registerAPI","showSelected","_showNoSelectedMessage","_showOnlySelected","showAll","clearSelected","actions","select","showAfterOptions","searchPlaceholder","styles","dropdownMaxWidth","classNames","classes","matchTriggerWidth","push","isInvalid","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;;AAiBaA,MAAAA,2BAAmC,GAC9CC,0CAA0C,CAACC;AACtC,MAAMC,2BAA2B,GACtCC;AAea,MAAMC,8BAA8B,SAASC,SAAS,CAA0C;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,iBAAA,EAAA,CAC5GC,OAAO,CAAA,CAAA;AAAA;AAAA,EAAA,gBAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,iBAAA,CAAA,EAAAC,MAAA;AAAA,EAAA;IAAAJ,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,mBAAA,EAAA,CACPC,OAAO,CAAA,EAAA,YAAA;AAAA,MAAA,OAA6B,KAAK;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,kBAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,mBAAA,CAAA,EAAAC,MAAA;AAAA,EAAA;IAAAJ,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,wBAAA,EAAA,CACzCC,OAAO,CAAA,EAAA,YAAA;AAAA,MAAA,OAAkC,KAAK;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,uBAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,wBAAA,CAAA,EAAAC,MAAA;EAE/C,IAAIC,kBAAkBA,GAA0C;IAC9D,MAAM;AAAEA,MAAAA,kBAAkB,GAAGZ;KAA6B,GAAG,IAAI,CAACa,IAAI;AACtE,IAAA,OAAOD,kBAAkB;AAC3B;EAEA,IAAIE,aAAaA,GAAW;AAC1B;IACA,OAAO,IAAI,CAACC,eAAe,EAAEC,QAAQ,EAAEC,MAAM,IAAI,GAAG;AACtD;EAEA,IAAIC,YAAYA,GAAW;IACzB,OAAO,IAAI,CAACH,eAAe,EAAEI,YAAY,CAACC,QAAQ,EAAE,IAAI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a,CAAY,UAAA,CAAA;AAEpC,IAAA,OAAO+B,MAAM;AACf;EAEA,IAAIE,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,uBAAuB,EAAE,gCAAgC,CAAC;;AAE3E;AACA,IAAA,IAAI,IAAI,CAACnC,IAAI,CAACoC,iBAAiB,KAAK,KAAK,IAAI,IAAI,CAACpC,IAAI,CAACiC,gBAAgB,EAAE;AACvEE,MAAAA,OAAO,CAACE,IAAI,CAAC,oDAAoD,CAAC;AACpE;;AAEA;AACA,IAAA,IAAI,IAAI,CAACrC,IAAI,CAACsC,SAAS,EAAE;AACvBH,MAAAA,OAAO,CAACE,IAAI,CAAC,CAAA,iCAAA,CAAmC,CAAC;AACnD;;AAEA;IACA,IAAI,IAAI,CAACZ,iBAAiB,EAAE;AAC1BU,MAAAA,OAAO,CAACE,IAAI,CAAC,CAAA,yCAAA,CAA2C,CAAC;AAC3D;AAEA,IAAA,OAAOF,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EA/HoBjD,8BAA8B,CAAA;;;;"}
@@ -18,6 +18,8 @@ const HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL = '#EF3016';
18
18
  const HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY = '#0D0E12';
19
19
  const HDS_CODE_EDITOR_COLOR_SURFACE_FAINT = '#15181e';
20
20
  const HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE = '#2B303C';
21
+ const HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_INTERNAL = '#9BC7FD';
22
+ const HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_EXTERNAL = '#0D69F2';
21
23
 
22
- export { HDS_CODE_BLOCK_BLUE, HDS_CODE_BLOCK_CYAN, HDS_CODE_BLOCK_GREEN, HDS_CODE_BLOCK_LINE_HIGHLIGHT, HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER, HDS_CODE_BLOCK_ORANGE, HDS_CODE_BLOCK_PURPLE, HDS_CODE_BLOCK_RED, HDS_CODE_BLOCK_WHITE, HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL, HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT, HDS_CODE_EDITOR_COLOR_FOREGROUND_PRIMARY, HDS_CODE_EDITOR_COLOR_SURFACE_FAINT, HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE, HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY };
24
+ export { HDS_CODE_BLOCK_BLUE, HDS_CODE_BLOCK_CYAN, HDS_CODE_BLOCK_GREEN, HDS_CODE_BLOCK_LINE_HIGHLIGHT, HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER, HDS_CODE_BLOCK_ORANGE, HDS_CODE_BLOCK_PURPLE, HDS_CODE_BLOCK_RED, HDS_CODE_BLOCK_WHITE, HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_EXTERNAL, HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_INTERNAL, HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL, HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT, HDS_CODE_EDITOR_COLOR_FOREGROUND_PRIMARY, HDS_CODE_EDITOR_COLOR_SURFACE_FAINT, HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE, HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY };
23
25
  //# sourceMappingURL=hds-dark-palette.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hds-dark-palette.js","sources":["../../../../src/modifiers/hds-code-editor/palettes/hds-dark-palette.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport const HDS_CODE_BLOCK_WHITE = '#efeff1';\nexport const HDS_CODE_BLOCK_BLUE = '#2d8eff';\nexport const HDS_CODE_BLOCK_GREEN = '#86ff13';\nexport const HDS_CODE_BLOCK_ORANGE = '#ffa800';\nexport const HDS_CODE_BLOCK_PURPLE = '#c76cff';\nexport const HDS_CODE_BLOCK_RED = '#ff3b20';\nexport const HDS_CODE_BLOCK_CYAN = '#32fff7';\n\nexport const HDS_CODE_BLOCK_LINE_HIGHLIGHT = 'rgba(0, 74, 222, 0.2)';\nexport const HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER = '#1b5fe5';\n\nexport const HDS_CODE_EDITOR_COLOR_FOREGROUND_PRIMARY = '#d5d7db';\nexport const HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT = '#878a8f';\nexport const HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL = '#EF3016';\n\nexport const HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY = '#0D0E12';\nexport const HDS_CODE_EDITOR_COLOR_SURFACE_FAINT = '#15181e';\nexport const HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE = '#2B303C';\n"],"names":["HDS_CODE_BLOCK_WHITE","HDS_CODE_BLOCK_BLUE","HDS_CODE_BLOCK_GREEN","HDS_CODE_BLOCK_ORANGE","HDS_CODE_BLOCK_PURPLE","HDS_CODE_BLOCK_RED","HDS_CODE_BLOCK_CYAN","HDS_CODE_BLOCK_LINE_HIGHLIGHT","HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER","HDS_CODE_EDITOR_COLOR_FOREGROUND_PRIMARY","HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT","HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL","HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY","HDS_CODE_EDITOR_COLOR_SURFACE_FAINT","HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE"],"mappings":"AAAA;AACA;AACA;AACA;;AAEO,MAAMA,oBAAoB,GAAG;AAC7B,MAAMC,mBAAmB,GAAG;AAC5B,MAAMC,oBAAoB,GAAG;AAC7B,MAAMC,qBAAqB,GAAG;AAC9B,MAAMC,qBAAqB,GAAG;AAC9B,MAAMC,kBAAkB,GAAG;AAC3B,MAAMC,mBAAmB,GAAG;AAE5B,MAAMC,6BAA6B,GAAG;AACtC,MAAMC,oCAAoC,GAAG;AAE7C,MAAMC,wCAAwC,GAAG;AACjD,MAAMC,sCAAsC,GAAG;AAC/C,MAAMC,yCAAyC,GAAG;AAElD,MAAMC,qCAAqC,GAAG;AAC9C,MAAMC,mCAAmC,GAAG;AAC5C,MAAMC,gDAAgD,GAAG;;;;"}
1
+ {"version":3,"file":"hds-dark-palette.js","sources":["../../../../src/modifiers/hds-code-editor/palettes/hds-dark-palette.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport const HDS_CODE_BLOCK_WHITE = '#efeff1';\nexport const HDS_CODE_BLOCK_BLUE = '#2d8eff';\nexport const HDS_CODE_BLOCK_GREEN = '#86ff13';\nexport const HDS_CODE_BLOCK_ORANGE = '#ffa800';\nexport const HDS_CODE_BLOCK_PURPLE = '#c76cff';\nexport const HDS_CODE_BLOCK_RED = '#ff3b20';\nexport const HDS_CODE_BLOCK_CYAN = '#32fff7';\n\nexport const HDS_CODE_BLOCK_LINE_HIGHLIGHT = 'rgba(0, 74, 222, 0.2)';\nexport const HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER = '#1b5fe5';\n\nexport const HDS_CODE_EDITOR_COLOR_FOREGROUND_PRIMARY = '#d5d7db';\nexport const HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT = '#878a8f';\nexport const HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL = '#EF3016';\n\nexport const HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY = '#0D0E12';\nexport const HDS_CODE_EDITOR_COLOR_SURFACE_FAINT = '#15181e';\nexport const HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE = '#2B303C';\nexport const HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_INTERNAL = '#9BC7FD';\nexport const HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_EXTERNAL = '#0D69F2';\n"],"names":["HDS_CODE_BLOCK_WHITE","HDS_CODE_BLOCK_BLUE","HDS_CODE_BLOCK_GREEN","HDS_CODE_BLOCK_ORANGE","HDS_CODE_BLOCK_PURPLE","HDS_CODE_BLOCK_RED","HDS_CODE_BLOCK_CYAN","HDS_CODE_BLOCK_LINE_HIGHLIGHT","HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER","HDS_CODE_EDITOR_COLOR_FOREGROUND_PRIMARY","HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT","HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL","HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY","HDS_CODE_EDITOR_COLOR_SURFACE_FAINT","HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE","HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_INTERNAL","HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_EXTERNAL"],"mappings":"AAAA;AACA;AACA;AACA;;AAEO,MAAMA,oBAAoB,GAAG;AAC7B,MAAMC,mBAAmB,GAAG;AAC5B,MAAMC,oBAAoB,GAAG;AAC7B,MAAMC,qBAAqB,GAAG;AAC9B,MAAMC,qBAAqB,GAAG;AAC9B,MAAMC,kBAAkB,GAAG;AAC3B,MAAMC,mBAAmB,GAAG;AAE5B,MAAMC,6BAA6B,GAAG;AACtC,MAAMC,oCAAoC,GAAG;AAE7C,MAAMC,wCAAwC,GAAG;AACjD,MAAMC,sCAAsC,GAAG;AAC/C,MAAMC,yCAAyC,GAAG;AAElD,MAAMC,qCAAqC,GAAG;AAC9C,MAAMC,mCAAmC,GAAG;AAC5C,MAAMC,gDAAgD,GAAG;AACzD,MAAMC,2CAA2C,GAAG;AACpD,MAAMC,2CAA2C,GAAG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { EditorView } from '@codemirror/view';
2
- import { HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE, HDS_CODE_EDITOR_COLOR_SURFACE_FAINT, HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY, HDS_CODE_BLOCK_WHITE, HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER, HDS_CODE_BLOCK_LINE_HIGHLIGHT, HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT, HDS_CODE_BLOCK_GREEN, HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL } from '../palettes/hds-dark-palette.js';
2
+ import { HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE, HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_INTERNAL, HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_EXTERNAL, HDS_CODE_EDITOR_COLOR_SURFACE_FAINT, HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY, HDS_CODE_BLOCK_WHITE, HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER, HDS_CODE_BLOCK_LINE_HIGHLIGHT, HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT, HDS_CODE_BLOCK_GREEN, HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL } from '../palettes/hds-dark-palette.js';
3
3
 
4
4
  /**
5
5
  * Copyright (c) HashiCorp, Inc.
@@ -107,8 +107,8 @@ const hdsDark = EditorView.theme({
107
107
  '.cm-panel.cm-panel-lint ul:focus li.cm-diagnostic[aria-selected]': {
108
108
  background: 'none',
109
109
  backgroundColor: 'var(--token-color-palette-neutral-700)',
110
- border: `4px solid var(--token-color-focus-critical-external)`,
111
- boxShadow: `inset 0 0 0 1px var(--token-color-focus-critical-internal)`,
110
+ border: `4px solid ${HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_EXTERNAL}`,
111
+ boxShadow: `inset 0 0 0 1px ${HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_INTERNAL}`,
112
112
  color: 'var(--token-color-foreground-high-contrast)'
113
113
  },
114
114
  '.cm-panels-bottom .cm-panel.cm-panel-lint': {
@@ -1 +1 @@
1
- {"version":3,"file":"hds-dark-theme.js","sources":["../../../../src/modifiers/hds-code-editor/themes/hds-dark-theme.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport { EditorView } from '@codemirror/view';\nimport {\n HDS_CODE_BLOCK_LINE_HIGHLIGHT,\n HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER,\n HDS_CODE_BLOCK_GREEN,\n HDS_CODE_BLOCK_WHITE,\n HDS_CODE_EDITOR_COLOR_SURFACE_FAINT,\n HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE,\n HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL,\n HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT,\n} from '../palettes/hds-dark-palette.ts';\n\nconst CLOSE_BUTTON_SELECTOR = '.cm-panel.cm-panel-lint button[name=\"close\"]';\nconst PANEL_DIAGNOSTIC_ITEM_SELECTOR =\n '.cm-panel.cm-panel-lint ul li.cm-diagnostic';\n\nconst hdsDark = EditorView.theme(\n {\n '&': {\n color: HDS_CODE_BLOCK_WHITE,\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n height: '100%',\n },\n '.cm-content': {\n borderLeft: `1px solid var(--token-color-palette-neutral-500)`,\n height: '100%',\n padding: '16px 0',\n },\n '.cm-content ::selection': {\n backgroundColor: HDS_CODE_BLOCK_GREEN,\n color: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n },\n '.cm-gutters': {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n },\n '.cm-gutter:first-of-type .cm-gutterElement': {\n borderLeft: '4px solid transparent',\n },\n '.cm-lineNumbers': {\n color: HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT,\n },\n '.cm-lineNumbers .cm-gutterElement': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'end',\n padding: '0px 16px',\n },\n '.cm-gutterElement.cm-activeLineGutter': {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n },\n '&:not(.cm-hasSelection).cm-focused .cm-gutterElement.cm-activeLineGutter':\n {\n borderColor: HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER,\n backgroundColor: HDS_CODE_BLOCK_LINE_HIGHLIGHT,\n color: 'var(--token-color-foreground-high-contrast)',\n outline: `1px solid ${HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER}`,\n },\n '.cm-line': {\n padding: '4px 16px',\n },\n '.cm-activeLine': {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n },\n '&:not(.cm-hasSelection).cm-focused .cm-activeLine': {\n backgroundColor: HDS_CODE_BLOCK_LINE_HIGHLIGHT,\n outline: `1px solid ${HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER}`,\n },\n '.cm-matchingBracket': {\n outline: `1px solid ${HDS_CODE_BLOCK_WHITE}`,\n },\n\n // set a minimum height on the editor content when linting is enabled\n '&.cm-lintingEnabled .cm-content': {\n minHeight: '160px',\n },\n\n // replace the underline svg\n '.cm-lintRange-error': {\n backgroundImage: `url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"3\">%3Cpath%20d%3D%22m0%202.5%20l2%20-1.5%20l1%200%20l2%201.5%20l1%200%22%20stroke%3D%22${encodeURIComponent(HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL)}%22%20fill%3D%22none%22%20stroke-width%3D%22.7%22%2F%3E</svg>')`,\n },\n\n // linting gutter\n '&.cm-lintingEnabled .cm-lineNumbers .cm-gutterElement': {\n paddingLeft: '8px',\n },\n '.cm-gutter-lint': {\n width: '28px',\n },\n '.cm-gutter-lint .cm-gutterElement': {\n padding: '0',\n },\n '.cm-lint-marker-error': {\n width: '24px',\n height: '24px',\n padding: '6px',\n content: `url('data:image/svg+xml,<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M9.56912 0.752289C8.69045 -0.126408 7.26581 -0.126415 6.38713 0.752272L0.730298 6.40911C-0.148388 7.28779 -0.148379 8.71243 0.730316 9.5911L6.38715 15.2478C7.26583 16.1265 8.69044 16.1265 9.56911 15.2478L15.2258 9.59109C16.1045 8.71241 16.1045 7.2878 15.2258 6.40912L9.56912 0.752289ZM5.21967 5.21955C5.51256 4.92665 5.98744 4.92665 6.28033 5.21955L8 6.93922L9.71967 5.21955C10.0126 4.92665 10.4874 4.92665 10.7803 5.21955C11.0732 5.51244 11.0732 5.98731 10.7803 6.28021L9.06066 7.99988L10.7803 9.71955C11.0732 10.0124 11.0732 10.4873 10.7803 10.7802C10.4874 11.0731 10.0126 11.0731 9.71967 10.7802L8 9.06054L6.28033 10.7802C5.98744 11.0731 5.51256 11.0731 5.21967 10.7802C4.92678 10.4873 4.92678 10.0124 5.21967 9.71955L6.93934 7.99988L5.21967 6.28021C4.92678 5.98731 4.92678 5.51244 5.21967 5.21955Z\" fill=\"${encodeURIComponent(HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL)}\"/></svg>');`,\n },\n\n // linter diagnostics panel\n '.cm-panel.cm-panel-lint ul': {\n backgroundColor: 'var(--token-color-palette-neutral-500)',\n maxHeight: '85px',\n },\n [`${PANEL_DIAGNOSTIC_ITEM_SELECTOR}`]: {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n border: '4px solid transparent',\n color: 'var(--token-color-foreground-high-contrast)',\n fontFamily: 'var(--token-typography-body-100-font-family)',\n fontSize: '13px',\n marginBottom: '1px',\n padding: '16px 12px',\n },\n [`${PANEL_DIAGNOSTIC_ITEM_SELECTOR}:last-of-type`]: {\n marginBottom: '0',\n },\n [`${PANEL_DIAGNOSTIC_ITEM_SELECTOR}:hover`]: {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_FAINT,\n },\n '.cm-panel.cm-panel-lint ul:focus li.cm-diagnostic[aria-selected]': {\n background: 'none',\n backgroundColor: 'var(--token-color-palette-neutral-700)',\n border: `4px solid var(--token-color-focus-critical-external)`,\n boxShadow: `inset 0 0 0 1px var(--token-color-focus-critical-internal)`,\n color: 'var(--token-color-foreground-high-contrast)',\n },\n '.cm-panels-bottom .cm-panel.cm-panel-lint': {\n borderTop: `3px solid var(--token-color-palette-neutral-500)`,\n },\n '.cm-diagnostic': {\n borderLeft: 'none',\n },\n '.cm-diagnosticText-inner': {\n alignItems: 'center',\n display: 'flex',\n gap: '16px',\n },\n '.cm-diagnosticText-inner .cm-lint-marker-error': {\n width: '16px',\n height: '16px',\n padding: '0',\n },\n // linter diagnostics panel close button\n [`${CLOSE_BUTTON_SELECTOR}`]: {\n alignItems: 'center',\n borderRadius: 'var(--token-border-radius-small)',\n color: 'var(--token-color-palette-neutral-300)',\n cursor: 'pointer',\n display: 'flex',\n fontFamily: 'var(--token-typography-body-100-font-family)',\n fontSize: '20px',\n height: '20px',\n lineHeight: '20px',\n paddingBottom: '3px',\n justifyContent: 'center',\n right: '22px',\n top: '6px',\n width: '20px',\n },\n [`${CLOSE_BUTTON_SELECTOR}:hover, ${CLOSE_BUTTON_SELECTOR}:active, ${CLOSE_BUTTON_SELECTOR}:focus`]:\n {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE,\n border: '1px solid transparent',\n color: 'var(--token-color-palette-neutral-400)',\n },\n [`${CLOSE_BUTTON_SELECTOR}:focus`]: {\n borderColor: 'var(--token-color-focus-action-internal)',\n outline: `3px solid var(--token-color-focus-action-external)`,\n },\n\n // tooltips\n '.cm-tooltip': {\n backgroundColor: 'var(--token-color-palette-neutral-600)',\n borderRadius: 'var(--token-border-radius-small)',\n color: 'var(--token-color-foreground-high-contrast)',\n fontFamily: 'var(--token-typography-body-100-font-family)',\n fontSize: '13px',\n padding: '8px 12px',\n },\n '.cm-tooltip-above': {\n transform: 'translateX(-4px) translateY(-6px)',\n },\n '.cm-tooltip-below': {\n transform: 'translateX(-4px) translateY(6px)',\n },\n // tooltips arrow\n '.cm-tooltip::before': {\n borderLeft: '8px solid transparent',\n borderRight: '8px solid transparent',\n content: '\"\"',\n left: '16px',\n position: 'absolute',\n transform: 'translateX(-50%)',\n },\n '.cm-tooltip-above::before': {\n borderTop: `8px solid var(--token-color-palette-neutral-600)`,\n bottom: '-8px',\n },\n '.cm-tooltip-below::before': {\n borderBottom: `8px solid var(--token-color-palette-neutral-600)`,\n top: '-8px',\n },\n // only show the marker within the diagnostics panel\n '.cm-tooltip .cm-lint-marker-error': {\n display: 'none',\n },\n },\n { dark: true }\n);\n\nexport default hdsDark;\n"],"names":["CLOSE_BUTTON_SELECTOR","PANEL_DIAGNOSTIC_ITEM_SELECTOR","hdsDark","EditorView","theme","color","HDS_CODE_BLOCK_WHITE","backgroundColor","HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY","height","borderLeft","padding","HDS_CODE_BLOCK_GREEN","HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT","display","alignItems","justifyContent","borderColor","HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER","HDS_CODE_BLOCK_LINE_HIGHLIGHT","outline","minHeight","backgroundImage","encodeURIComponent","HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL","paddingLeft","width","content","maxHeight","border","fontFamily","fontSize","marginBottom","HDS_CODE_EDITOR_COLOR_SURFACE_FAINT","background","boxShadow","borderTop","gap","borderRadius","cursor","lineHeight","paddingBottom","right","top","HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE","transform","borderRight","left","position","bottom","borderBottom","dark"],"mappings":";;;AAAA;AACA;AACA;AACA;;AAeA,MAAMA,qBAAqB,GAAG,8CAA8C;AAC5E,MA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dark-theme.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport { EditorView } from '@codemirror/view';\nimport {\n HDS_CODE_BLOCK_LINE_HIGHLIGHT,\n HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER,\n HDS_CODE_BLOCK_GREEN,\n HDS_CODE_BLOCK_WHITE,\n HDS_CODE_EDITOR_COLOR_SURFACE_FAINT,\n HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE,\n HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL,\n HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT,\n HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_INTERNAL,\n HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_EXTERNAL,\n} from '../palettes/hds-dark-palette.ts';\n\nconst CLOSE_BUTTON_SELECTOR = '.cm-panel.cm-panel-lint button[name=\"close\"]';\nconst PANEL_DIAGNOSTIC_ITEM_SELECTOR =\n '.cm-panel.cm-panel-lint ul li.cm-diagnostic';\n\nconst hdsDark = EditorView.theme(\n {\n '&': {\n color: HDS_CODE_BLOCK_WHITE,\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n height: '100%',\n },\n '.cm-content': {\n borderLeft: `1px solid var(--token-color-palette-neutral-500)`,\n height: '100%',\n padding: '16px 0',\n },\n '.cm-content ::selection': {\n backgroundColor: HDS_CODE_BLOCK_GREEN,\n color: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n },\n '.cm-gutters': {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n },\n '.cm-gutter:first-of-type .cm-gutterElement': {\n borderLeft: '4px solid transparent',\n },\n '.cm-lineNumbers': {\n color: HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT,\n },\n '.cm-lineNumbers .cm-gutterElement': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'end',\n padding: '0px 16px',\n },\n '.cm-gutterElement.cm-activeLineGutter': {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n },\n '&:not(.cm-hasSelection).cm-focused .cm-gutterElement.cm-activeLineGutter':\n {\n borderColor: HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER,\n backgroundColor: HDS_CODE_BLOCK_LINE_HIGHLIGHT,\n color: 'var(--token-color-foreground-high-contrast)',\n outline: `1px solid ${HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER}`,\n },\n '.cm-line': {\n padding: '4px 16px',\n },\n '.cm-activeLine': {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n },\n '&:not(.cm-hasSelection).cm-focused .cm-activeLine': {\n backgroundColor: HDS_CODE_BLOCK_LINE_HIGHLIGHT,\n outline: `1px solid ${HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER}`,\n },\n '.cm-matchingBracket': {\n outline: `1px solid ${HDS_CODE_BLOCK_WHITE}`,\n },\n\n // set a minimum height on the editor content when linting is enabled\n '&.cm-lintingEnabled .cm-content': {\n minHeight: '160px',\n },\n\n // replace the underline svg\n '.cm-lintRange-error': {\n backgroundImage: `url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"3\">%3Cpath%20d%3D%22m0%202.5%20l2%20-1.5%20l1%200%20l2%201.5%20l1%200%22%20stroke%3D%22${encodeURIComponent(HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL)}%22%20fill%3D%22none%22%20stroke-width%3D%22.7%22%2F%3E</svg>')`,\n },\n\n // linting gutter\n '&.cm-lintingEnabled .cm-lineNumbers .cm-gutterElement': {\n paddingLeft: '8px',\n },\n '.cm-gutter-lint': {\n width: '28px',\n },\n '.cm-gutter-lint .cm-gutterElement': {\n padding: '0',\n },\n '.cm-lint-marker-error': {\n width: '24px',\n height: '24px',\n padding: '6px',\n content: `url('data:image/svg+xml,<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M9.56912 0.752289C8.69045 -0.126408 7.26581 -0.126415 6.38713 0.752272L0.730298 6.40911C-0.148388 7.28779 -0.148379 8.71243 0.730316 9.5911L6.38715 15.2478C7.26583 16.1265 8.69044 16.1265 9.56911 15.2478L15.2258 9.59109C16.1045 8.71241 16.1045 7.2878 15.2258 6.40912L9.56912 0.752289ZM5.21967 5.21955C5.51256 4.92665 5.98744 4.92665 6.28033 5.21955L8 6.93922L9.71967 5.21955C10.0126 4.92665 10.4874 4.92665 10.7803 5.21955C11.0732 5.51244 11.0732 5.98731 10.7803 6.28021L9.06066 7.99988L10.7803 9.71955C11.0732 10.0124 11.0732 10.4873 10.7803 10.7802C10.4874 11.0731 10.0126 11.0731 9.71967 10.7802L8 9.06054L6.28033 10.7802C5.98744 11.0731 5.51256 11.0731 5.21967 10.7802C4.92678 10.4873 4.92678 10.0124 5.21967 9.71955L6.93934 7.99988L5.21967 6.28021C4.92678 5.98731 4.92678 5.51244 5.21967 5.21955Z\" fill=\"${encodeURIComponent(HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL)}\"/></svg>');`,\n },\n\n // linter diagnostics panel\n '.cm-panel.cm-panel-lint ul': {\n backgroundColor: 'var(--token-color-palette-neutral-500)',\n maxHeight: '85px',\n },\n [`${PANEL_DIAGNOSTIC_ITEM_SELECTOR}`]: {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY,\n border: '4px solid transparent',\n color: 'var(--token-color-foreground-high-contrast)',\n fontFamily: 'var(--token-typography-body-100-font-family)',\n fontSize: '13px',\n marginBottom: '1px',\n padding: '16px 12px',\n },\n [`${PANEL_DIAGNOSTIC_ITEM_SELECTOR}:last-of-type`]: {\n marginBottom: '0',\n },\n [`${PANEL_DIAGNOSTIC_ITEM_SELECTOR}:hover`]: {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_FAINT,\n },\n '.cm-panel.cm-panel-lint ul:focus li.cm-diagnostic[aria-selected]': {\n background: 'none',\n backgroundColor: 'var(--token-color-palette-neutral-700)',\n border: `4px solid ${HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_EXTERNAL}`,\n boxShadow: `inset 0 0 0 1px ${HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_INTERNAL}`,\n color: 'var(--token-color-foreground-high-contrast)',\n },\n '.cm-panels-bottom .cm-panel.cm-panel-lint': {\n borderTop: `3px solid var(--token-color-palette-neutral-500)`,\n },\n '.cm-diagnostic': {\n borderLeft: 'none',\n },\n '.cm-diagnosticText-inner': {\n alignItems: 'center',\n display: 'flex',\n gap: '16px',\n },\n '.cm-diagnosticText-inner .cm-lint-marker-error': {\n width: '16px',\n height: '16px',\n padding: '0',\n },\n // linter diagnostics panel close button\n [`${CLOSE_BUTTON_SELECTOR}`]: {\n alignItems: 'center',\n borderRadius: 'var(--token-border-radius-small)',\n color: 'var(--token-color-palette-neutral-300)',\n cursor: 'pointer',\n display: 'flex',\n fontFamily: 'var(--token-typography-body-100-font-family)',\n fontSize: '20px',\n height: '20px',\n lineHeight: '20px',\n paddingBottom: '3px',\n justifyContent: 'center',\n right: '22px',\n top: '6px',\n width: '20px',\n },\n [`${CLOSE_BUTTON_SELECTOR}:hover, ${CLOSE_BUTTON_SELECTOR}:active, ${CLOSE_BUTTON_SELECTOR}:focus`]:\n {\n backgroundColor: HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE,\n border: '1px solid transparent',\n color: 'var(--token-color-palette-neutral-400)',\n },\n [`${CLOSE_BUTTON_SELECTOR}:focus`]: {\n borderColor: 'var(--token-color-focus-action-internal)',\n outline: `3px solid var(--token-color-focus-action-external)`,\n },\n\n // tooltips\n '.cm-tooltip': {\n backgroundColor: 'var(--token-color-palette-neutral-600)',\n borderRadius: 'var(--token-border-radius-small)',\n color: 'var(--token-color-foreground-high-contrast)',\n fontFamily: 'var(--token-typography-body-100-font-family)',\n fontSize: '13px',\n padding: '8px 12px',\n },\n '.cm-tooltip-above': {\n transform: 'translateX(-4px) translateY(-6px)',\n },\n '.cm-tooltip-below': {\n transform: 'translateX(-4px) translateY(6px)',\n },\n // tooltips arrow\n '.cm-tooltip::before': {\n borderLeft: '8px solid transparent',\n borderRight: '8px solid transparent',\n content: '\"\"',\n left: '16px',\n position: 'absolute',\n transform: 'translateX(-50%)',\n },\n '.cm-tooltip-above::before': {\n borderTop: `8px solid var(--token-color-palette-neutral-600)`,\n bottom: '-8px',\n },\n '.cm-tooltip-below::before': {\n borderBottom: `8px solid var(--token-color-palette-neutral-600)`,\n top: '-8px',\n },\n // only show the marker within the diagnostics panel\n '.cm-tooltip .cm-lint-marker-error': {\n display: 'none',\n },\n },\n { dark: true }\n);\n\nexport default hdsDark;\n"],"names":["CLOSE_BUTTON_SELECTOR","PANEL_DIAGNOSTIC_ITEM_SELECTOR","hdsDark","EditorView","theme","color","HDS_CODE_BLOCK_WHITE","backgroundColor","HDS_CODE_EDITOR_COLOR_SURFACE_PRIMARY","height","borderLeft","padding","HDS_CODE_BLOCK_GREEN","HDS_CODE_EDITOR_COLOR_FOREGROUND_FAINT","display","alignItems","justifyContent","borderColor","HDS_CODE_BLOCK_LINE_HIGHLIGHT_BORDER","HDS_CODE_BLOCK_LINE_HIGHLIGHT","outline","minHeight","backgroundImage","encodeURIComponent","HDS_CODE_EDITOR_COLOR_FOREGROUND_CRITICAL","paddingLeft","width","content","maxHeight","border","fontFamily","fontSize","marginBottom","HDS_CODE_EDITOR_COLOR_SURFACE_FAINT","background","HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_EXTERNAL","boxShadow","HDS_CODE_EDITOR_COLOR_FOCUS_ACTION_INTERNAL","borderTop","gap","borderRadius","cursor","lineHeight","paddingBottom","right","top","HDS_CODE_EDITOR_COLOR_SURFACE_INTERACTIVE_ACTIVE","trans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AO,EAAE;AACX;AACF,CAAC,EACD;AAAEuC,EAAAA,IAAI,EAAE;AAAK,CACf;;;;"}
@@ -2674,6 +2674,8 @@ button.hds-button[href]::after {
2674
2674
  --hds-code-block-color-surface-selection: #86ff13;
2675
2675
  --hds-code-block-color-line-highlight: rgba(0, 74, 222, 20%);
2676
2676
  --hds-code-block-color-line-highlight-border: #1555d4;
2677
+ --hds-code-block-color-focus-action-internal: #9bc7fd;
2678
+ --hds-code-block-color-focus-action-external: #0d69f2;
2677
2679
  --hds-code-block-color-token: var(--hds-code-block-color-foreground-primary);
2678
2680
  --hds-code-block-color-atrule: var(--hds-code-block-color-blue);
2679
2681
  --hds-code-block-color-code-block-attr-name: var(--hds-code-block-color-blue);
@@ -2984,6 +2986,10 @@ button.hds-button[href]::after {
2984
2986
  }
2985
2987
  .hds-code-block__copy-button:focus, .hds-code-block__copy-button.mock-focus, .hds-code-block__copy-button:focus-visible {
2986
2988
  background-color: var(--hds-code-block-color-surface-faint);
2989
+ border-color: var(--hds-code-block-color-focus-action-internal);
2990
+ }
2991
+ .hds-code-block__copy-button:focus::before, .hds-code-block__copy-button.mock-focus::before, .hds-code-block__copy-button:focus-visible::before {
2992
+ border-color: var(--hds-code-block-color-focus-action-external);
2987
2993
  }
2988
2994
  .hds-code-block__copy-button.hds-copy-button--status-success .hds-icon {
2989
2995
  color: var(--hds-code-block-color-foreground-success);
@@ -3068,6 +3074,8 @@ button.hds-button[href]::after {
3068
3074
  --hds-code-editor-color-surface-faint: #15181e;
3069
3075
  --hds-code-editor-color-surface-primary: #0d0e12;
3070
3076
  --hds-code-editor-color-surface-interactive-active: #2b303c;
3077
+ --hds-code-editor-color-focus-action-internal: #9bc7fd;
3078
+ --hds-code-editor-color-focus-action-external: #0d69f2;
3071
3079
  }
3072
3080
 
3073
3081
  .hds-code-editor {
@@ -3143,6 +3151,10 @@ button.hds-button[href]::after {
3143
3151
  }
3144
3152
  .hds-code-editor .hds-button:focus, .hds-code-editor .hds-button:hover {
3145
3153
  background-color: var(--hds-code-editor-color-surface-primary);
3154
+ border-color: var(--hds-code-editor-color-focus-action-internal);
3155
+ }
3156
+ .hds-code-editor .hds-button:focus::before, .hds-code-editor .hds-button:hover::before {
3157
+ border-color: var(--hds-code-editor-color-focus-action-external);
3146
3158
  }
3147
3159
  .hds-code-editor .hds-button:focus .hds-button__icon, .hds-code-editor .hds-button:hover .hds-button__icon {
3148
3160
  color: var(--hds-code-editor-color-foreground-primary);
@@ -4840,12 +4852,13 @@ button.hds-button[href]::after {
4840
4852
 
4841
4853
  .hds-form-super-select .ember-basic-dropdown .ember-basic-dropdown-trigger,
4842
4854
  .hds-form-super-select .ember-basic-dropdown .ember-power-select-trigger {
4843
- display: flex;
4855
+ display: grid;
4856
+ grid-template-columns: 1fr auto;
4844
4857
  align-items: center;
4845
4858
  max-width: 100%;
4846
4859
  min-height: 36px;
4847
4860
  padding-top: 4px;
4848
- padding-right: calc(var(--token-form-control-padding) + 24px);
4861
+ padding-right: calc(var(--token-form-control-padding) + 21px);
4849
4862
  padding-bottom: 4px;
4850
4863
  padding-left: 11px;
4851
4864
  color: var(--token-form-control-base-foreground-value-color);
@@ -4907,6 +4920,20 @@ button.hds-button[href]::after {
4907
4920
  .hds-form-super-select .ember-basic-dropdown .ember-power-select-trigger[aria-disabled=true] .ember-power-select-selected-item {
4908
4921
  opacity: inherit;
4909
4922
  }
4923
+ .hds-form-super-select .ember-basic-dropdown .ember-basic-dropdown-trigger::after,
4924
+ .hds-form-super-select .ember-basic-dropdown .ember-power-select-trigger::after {
4925
+ display: var(--hds-form-super-select-selected-text-display);
4926
+ flex-shrink: 0;
4927
+ align-items: center;
4928
+ align-self: stretch;
4929
+ padding-left: 8px;
4930
+ color: var(--token-color-foreground-faint);
4931
+ font-size: var(--token-typography-body-100-font-size);
4932
+ font-family: var(--token-typography-body-100-font-family);
4933
+ line-height: var(--token-typography-body-100-line-height);
4934
+ border-left: 1px solid var(--token-color-border-strong);
4935
+ content: var(--hds-form-super-select-selected-text);
4936
+ }
4910
4937
  .hds-form-super-select .ember-basic-dropdown .ember-basic-dropdown-content {
4911
4938
  max-width: var(--hds-form-super-select-dropdown-max-width, none);
4912
4939
  margin: 0;
@@ -5037,15 +5064,16 @@ button.hds-button[href]::after {
5037
5064
  .hds-form-super-select .ember-basic-dropdown .ember-power-select-multiple-options {
5038
5065
  display: flex;
5039
5066
  flex-grow: 1;
5040
- flex-wrap: wrap;
5041
- gap: 4px;
5067
+ flex-wrap: nowrap;
5042
5068
  min-width: 0;
5069
+ overflow: hidden;
5043
5070
  list-style: none;
5044
5071
  }
5045
5072
  .hds-form-super-select .ember-basic-dropdown .ember-power-select-multiple-option {
5073
+ flex-shrink: 0;
5046
5074
  float: none;
5047
5075
  min-width: 0;
5048
- margin: 0;
5076
+ margin: 0 4px 0 0;
5049
5077
  padding: 3px 10px 5px 10px;
5050
5078
  font-size: var(--token-typography-body-100-font-size);
5051
5079
  font-family: var(--token-typography-body-100-font-family);
@@ -6747,6 +6775,14 @@ button.hds-button[href]::after {
6747
6775
  margin: 0;
6748
6776
  }
6749
6777
 
6778
+ /**
6779
+ * Copyright (c) HashiCorp, Inc.
6780
+ * SPDX-License-Identifier: MPL-2.0
6781
+ */
6782
+ /**
6783
+ * Copyright (c) HashiCorp, Inc.
6784
+ * SPDX-License-Identifier: MPL-2.0
6785
+ */
6750
6786
  /**
6751
6787
  * Copyright (c) HashiCorp, Inc.
6752
6788
  * SPDX-License-Identifier: MPL-2.0
@@ -6764,6 +6800,9 @@ button.hds-button[href]::after {
6764
6800
  --hds-app-sidenav-animation-delay: var(--hds-app-sidenav-animation-duration);
6765
6801
  --hds-app-sidenav-animation-easing: cubic-bezier(0.65, 0, 0.35, 1);
6766
6802
  --hds-app-sidenav-toggle-button-width: 24px;
6803
+ --hds-app-sidenav-color-focus-action-internal: #bcc7fd;
6804
+ --hds-app-sidenav-color-focus-action-external: #0d69f2;
6805
+ --hds-app-sidenav-focus-ring-action-box-shadow: inset 0 0 0 1px #bcc7fd, 0 0 0 3px #0d69f2;
6767
6806
  }
6768
6807
 
6769
6808
  @media (prefers-reduced-motion) {
@@ -6885,10 +6924,6 @@ button.hds-button[href]::after {
6885
6924
  * Copyright (c) HashiCorp, Inc.
6886
6925
  * SPDX-License-Identifier: MPL-2.0
6887
6926
  */
6888
- /**
6889
- * Copyright (c) HashiCorp, Inc.
6890
- * SPDX-License-Identifier: MPL-2.0
6891
- */
6892
6927
  .hds-side-nav-header {
6893
6928
  display: flex;
6894
6929
  align-items: center;
@@ -6910,6 +6945,7 @@ button.hds-button[href]::after {
6910
6945
  }
6911
6946
 
6912
6947
  .hds-side-nav__home-link {
6948
+ --token-focus-ring-action-box-shadow: inset 0 0 0 1px #bcc7fd, 0 0 0 3px #0d69f2;
6913
6949
  border: 1px solid transparent;
6914
6950
  cursor: pointer;
6915
6951
  color: var(--token-side-nav-color-foreground-strong);
@@ -6957,10 +6993,9 @@ button.hds-button[href]::after {
6957
6993
  .hds-side-nav__home-link:focus::before, .hds-side-nav__home-link.mock-focus::before {
6958
6994
  color: var(--token-color-foreground-high-contrast);
6959
6995
  border: none;
6960
- box-shadow: var(--token-focus-ring-action-box-shadow);
6961
6996
  }
6962
6997
  .hds-side-nav__home-link:focus:focus:not(:focus-visible)::before {
6963
- box-shadow: var(--token-focus-ring-action-box-shadow);
6998
+ box-shadow: inset 0 0 0 1px #bcc7fd, 0 0 0 3px #0d69f2;
6964
6999
  }
6965
7000
  .hds-side-nav__home-link:active, .hds-side-nav__home-link.mock-active {
6966
7001
  color: var(--token-side-nav-color-foreground-strong);
@@ -6986,6 +7021,7 @@ button.hds-button[href]::after {
6986
7021
  .hds-side-nav-header .hds-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *),
6987
7022
  .hds-side-nav-header .hds-dropdown-toggle-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *),
6988
7023
  .hds-side-nav-header .hds-dropdown-toggle-icon:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *) {
7024
+ --token-focus-ring-action-box-shadow: inset 0 0 0 1px #bcc7fd, 0 0 0 3px #0d69f2;
6989
7025
  border: 1px solid transparent;
6990
7026
  cursor: pointer;
6991
7027
  border-color: var(--token-color-palette-neutral-500);
@@ -7037,7 +7073,7 @@ button.hds-button[href]::after {
7037
7073
  isolation: isolate;
7038
7074
  color: var(--token-color-foreground-high-contrast);
7039
7075
  background-color: var(--token-color-palette-neutral-700);
7040
- border-color: var(--token-color-focus-action-internal);
7076
+ border-color: #bcc7fd;
7041
7077
  }
7042
7078
  .hds-side-nav__dropdown .hds-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *):focus::before, .hds-side-nav__dropdown .hds-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *).mock-focus::before,
7043
7079
  .hds-side-nav__dropdown .hds-dropdown-toggle-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *):focus::before,
@@ -7192,7 +7228,6 @@ button.hds-button[href]::after {
7192
7228
  .hds-side-nav-header .hds-dropdown-toggle-icon:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *).mock-focus::before {
7193
7229
  color: var(--token-color-foreground-high-contrast);
7194
7230
  border: none;
7195
- box-shadow: var(--token-focus-ring-action-box-shadow);
7196
7231
  }
7197
7232
  .hds-side-nav__dropdown .hds-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *):focus:focus:not(:focus-visible)::before,
7198
7233
  .hds-side-nav__dropdown .hds-dropdown-toggle-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *):focus:focus:not(:focus-visible)::before,
@@ -7203,7 +7238,7 @@ button.hds-button[href]::after {
7203
7238
  .hds-side-nav-header .hds-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *):focus:focus:not(:focus-visible)::before,
7204
7239
  .hds-side-nav-header .hds-dropdown-toggle-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *):focus:focus:not(:focus-visible)::before,
7205
7240
  .hds-side-nav-header .hds-dropdown-toggle-icon:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *):focus:focus:not(:focus-visible)::before {
7206
- box-shadow: var(--token-focus-ring-action-box-shadow);
7241
+ box-shadow: inset 0 0 0 1px #bcc7fd, 0 0 0 3px #0d69f2;
7207
7242
  }
7208
7243
  .hds-side-nav__dropdown .hds-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *):active, .hds-side-nav__dropdown .hds-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *).mock-active,
7209
7244
  .hds-side-nav__dropdown .hds-dropdown-toggle-button:not(.hds-dropdown * *, .ember-basic-dropdown-trigger * *, .ember-basic-dropdown-content * *):active,
@@ -7305,6 +7340,7 @@ button.hds-button[href]::after {
7305
7340
  }
7306
7341
 
7307
7342
  .hds-side-nav__icon-button {
7343
+ --token-focus-ring-action-box-shadow: inset 0 0 0 1px #bcc7fd, 0 0 0 3px #0d69f2;
7308
7344
  border: 1px solid transparent;
7309
7345
  cursor: pointer;
7310
7346
  border-color: var(--token-color-palette-neutral-500);
@@ -7330,7 +7366,7 @@ button.hds-button[href]::after {
7330
7366
  isolation: isolate;
7331
7367
  color: var(--token-color-foreground-high-contrast);
7332
7368
  background-color: var(--token-color-palette-neutral-700);
7333
- border-color: var(--token-color-focus-action-internal);
7369
+ border-color: #bcc7fd;
7334
7370
  }
7335
7371
  .hds-side-nav__icon-button:focus::before, .hds-side-nav__icon-button.mock-focus::before {
7336
7372
  position: absolute;
@@ -7357,10 +7393,9 @@ button.hds-button[href]::after {
7357
7393
  .hds-side-nav__icon-button:focus::before, .hds-side-nav__icon-button.mock-focus::before {
7358
7394
  color: var(--token-color-foreground-high-contrast);
7359
7395
  border: none;
7360
- box-shadow: var(--token-focus-ring-action-box-shadow);
7361
7396
  }
7362
7397
  .hds-side-nav__icon-button:focus:focus:not(:focus-visible)::before {
7363
- box-shadow: var(--token-focus-ring-action-box-shadow);
7398
+ box-shadow: inset 0 0 0 1px #bcc7fd, 0 0 0 3px #0d69f2;
7364
7399
  }
7365
7400
  .hds-side-nav__icon-button:active, .hds-side-nav__icon-button.mock-active {
7366
7401
  color: var(--token-color-foreground-high-contrast);
@@ -7424,6 +7459,7 @@ button.hds-button[href]::after {
7424
7459
  }
7425
7460
 
7426
7461
  .hds-side-nav__list-item-link {
7462
+ --token-focus-ring-action-box-shadow: var(--hds-app-sidenav-focus-ring-action-box-shadow);
7427
7463
  display: flex;
7428
7464
  gap: var(--token-side-nav-body-list-item-content-spacing-horizontal);
7429
7465
  align-items: center;
@@ -7598,8 +7634,8 @@ button.hds-button[href]::after {
7598
7634
  box-shadow: 0 calc(var(--token-side-nav-toggle-button-border-radius) * -1) 0 var(--token-side-nav-color-surface-interactive-active);
7599
7635
  }
7600
7636
  .hds-side-nav__toggle-button:focus-visible, .hds-side-nav__toggle-button.mock-focus {
7601
- border-color: var(--token-color-focus-action-internal);
7602
- outline: 3px solid var(--token-color-focus-action-external);
7637
+ border-color: var(--hds-app-sidenav-color-focus-action-internal);
7638
+ outline: 3px solid var(--hds-app-sidenav-color-focus-action-external);
7603
7639
  }
7604
7640
  .hds-side-nav__toggle-button:focus-visible::before, .hds-side-nav__toggle-button:focus-visible::after, .hds-side-nav__toggle-button.mock-focus::before, .hds-side-nav__toggle-button.mock-focus::after {
7605
7641
  display: none;
@@ -8723,6 +8759,7 @@ button.hds-button[href]::after {
8723
8759
  flex: 1 0 0;
8724
8760
  max-width: 166px;
8725
8761
  padding: 3px 10px 5px 10px;
8762
+ font: inherit;
8726
8763
  border-radius: inherit;
8727
8764
  }
8728
8765
 
@@ -167,6 +167,11 @@ $hds-code-block-code-padding: 16px;
167
167
  &.mock-focus,
168
168
  &:focus-visible {
169
169
  background-color: var(--hds-code-block-color-surface-faint);
170
+ border-color: var(--hds-code-block-color-focus-action-internal);
171
+
172
+ &::before {
173
+ border-color: var(--hds-code-block-color-focus-action-external);
174
+ }
170
175
  }
171
176
 
172
177
  &.hds-copy-button--status-success {
@@ -47,6 +47,10 @@
47
47
  // lines of code - highlighted ----
48
48
  --hds-code-block-color-line-highlight: rgba(0, 74, 222, 20%);
49
49
  --hds-code-block-color-line-highlight-border: #1555d4;
50
+ // Copy Button
51
+ // TODO: Remove focus tokens once global tokens for dark themes are implemented
52
+ --hds-code-block-color-focus-action-internal: #9bc7fd;
53
+ --hds-code-block-color-focus-action-external: #0d69f2;
50
54
 
51
55
  // Syntax highlighting tokens:
52
56
  // general ----
@@ -96,6 +96,11 @@
96
96
  &:focus,
97
97
  &:hover {
98
98
  background-color: var(--hds-code-editor-color-surface-primary);
99
+ border-color: var(--hds-code-editor-color-focus-action-internal);
100
+
101
+ &::before {
102
+ border-color: var(--hds-code-editor-color-focus-action-external);
103
+ }
99
104
 
100
105
  .hds-button__icon {
101
106
  color: var(--hds-code-editor-color-foreground-primary);
@@ -17,4 +17,7 @@
17
17
  --hds-code-editor-color-surface-faint: #15181e;
18
18
  --hds-code-editor-color-surface-primary: #0d0e12;
19
19
  --hds-code-editor-color-surface-interactive-active: #2b303c;
20
+ // TODO: Remove focus tokens once global tokens for dark themes are implemented
21
+ --hds-code-editor-color-focus-action-internal: #9bc7fd;
22
+ --hds-code-editor-color-focus-action-external: #0d69f2;
20
23
  }
@@ -20,12 +20,13 @@ $hds-super-select-item-height: 36px;
20
20
  // TRIGGER
21
21
  .ember-basic-dropdown-trigger,
22
22
  .ember-power-select-trigger {
23
- display: flex;
23
+ display: grid;
24
+ grid-template-columns: 1fr auto;
24
25
  align-items: center;
25
26
  max-width: 100%;
26
27
  min-height: $hds-super-select-item-height;
27
28
  padding-top: 4px;
28
- padding-right: calc(var(--token-form-control-padding) + 24px); // extra space for the icon
29
+ padding-right: calc(var(--token-form-control-padding) + 21px); // extra space for the icon
29
30
  padding-bottom: 4px;
30
31
  padding-left: 11px;
31
32
  color: var(--token-form-control-base-foreground-value-color);
@@ -94,6 +95,20 @@ $hds-super-select-item-height: 36px;
94
95
  opacity: inherit;
95
96
  }
96
97
  }
98
+
99
+ &::after {
100
+ display: var(--hds-form-super-select-selected-text-display);
101
+ flex-shrink: 0;
102
+ align-items: center;
103
+ align-self: stretch;
104
+ padding-left: 8px;
105
+ color: var(--token-color-foreground-faint);
106
+ font-size: var(--token-typography-body-100-font-size);
107
+ font-family: var(--token-typography-body-100-font-family);
108
+ line-height: var(--token-typography-body-100-line-height);
109
+ border-left: 1px solid var(--token-color-border-strong);
110
+ content: var(--hds-form-super-select-selected-text);
111
+ }
97
112
  }
98
113
 
99
114
  // DROPDOWN
@@ -278,17 +293,18 @@ $hds-super-select-item-height: 36px;
278
293
  .ember-power-select-multiple-options {
279
294
  display: flex;
280
295
  flex-grow: 1;
281
- flex-wrap: wrap;
282
- gap: 4px;
296
+ flex-wrap: nowrap;
283
297
  min-width: 0;
298
+ overflow: hidden;
284
299
  list-style: none;
285
300
  }
286
301
 
287
302
  // Tag item
288
303
  .ember-power-select-multiple-option {
304
+ flex-shrink: 0;
289
305
  float: none;
290
306
  min-width: 0;
291
- margin: 0;
307
+ margin: 0 4px 0 0;
292
308
  padding: 3px 10px 5px 10px;
293
309
  font-size: var(--token-typography-body-100-font-size);
294
310
  font-family: var(--token-typography-body-100-font-family);
@@ -79,6 +79,8 @@
79
79
 
80
80
  // <a>/<button> element (via Hds::Interactive)
81
81
  .hds-side-nav__list-item-link {
82
+ // Override token used in focus ring mixin
83
+ --token-focus-ring-action-box-shadow: var(--hds-app-sidenav-focus-ring-action-box-shadow);
82
84
  display: flex;
83
85
  gap: var(--token-side-nav-body-list-item-content-spacing-horizontal);
84
86
  align-items: center;
@@ -93,8 +93,8 @@
93
93
 
94
94
  &:focus-visible,
95
95
  &.mock-focus {
96
- border-color: var(--token-color-focus-action-internal);
97
- outline: 3px solid var(--token-color-focus-action-external);
96
+ border-color: var(--hds-app-sidenav-color-focus-action-internal);
97
+ outline: 3px solid var(--hds-app-sidenav-color-focus-action-external);
98
98
 
99
99
  &::before,
100
100
  &::after {
@@ -7,6 +7,8 @@
7
7
  // SIDE-NAV - VARS
8
8
  //
9
9
 
10
+ @use "../../mixins/interactive-dark-theme" as *;
11
+
10
12
  // LOCAL VARIABLES
11
13
  // we use `hds-app` as prefix to distinguish them from the normal tokens
12
14
  // notice: they may be overwritten at consumer-level side if needed by re-defining the variables in a container element
@@ -24,6 +26,11 @@
24
26
  --hds-app-sidenav-animation-easing: cubic-bezier(0.65, 0, 0.35, 1);
25
27
  // toggle-button
26
28
  --hds-app-sidenav-toggle-button-width: 24px;
29
+ // focus ring
30
+ // TODO: Remove focus tokens once global tokens for dark themes are implemented
31
+ --hds-app-sidenav-color-focus-action-internal: #{$hds-interactive-dark-theme-color-focus-action-internal};
32
+ --hds-app-sidenav-color-focus-action-external: #{$hds-interactive-dark-theme-color-focus-action-external};
33
+ --hds-app-sidenav-focus-ring-action-box-shadow: #{$hds-interactive-dark-theme-focus-ring-action-box-shadow};
27
34
  }
28
35
 
29
36
  // reduced motion
@@ -45,6 +45,7 @@ $hds-tag-border-radius: 50px;
45
45
  flex: 1 0 0;
46
46
  max-width: 166px; // account for excess horizontal padding of text in non-dismissible variant
47
47
  padding: 3px 10px 5px 10px;
48
+ font: inherit;
48
49
  border-radius: inherit;
49
50
  }
50
51
 
@@ -6,8 +6,18 @@
6
6
  @use "../mixins/focus-ring" as *;
7
7
  @use "../mixins/button" as *;
8
8
 
9
+ // TODO: Remove focus tokens once global tokens for dark themes are implemented
10
+ $hds-interactive-dark-theme-color-focus-action-internal: #bcc7fd;
11
+ $hds-interactive-dark-theme-color-focus-action-external: #0d69f2;
12
+ $hds-interactive-dark-theme-focus-ring-action-box-shadow:
13
+ inset 0 0 0 1px #{$hds-interactive-dark-theme-color-focus-action-internal},
14
+ 0 0 0 3px #{$hds-interactive-dark-theme-color-focus-action-external};
15
+
9
16
  // Used to apply dark theme to interactive elements such as Button & Dropdown
10
17
  @mixin hds-interactive-dark-theme($add-visible-border: true, $is-within-side-nav: false) {
18
+ // Override token used in focus ring mixin
19
+ --token-focus-ring-action-box-shadow: #{$hds-interactive-dark-theme-focus-ring-action-box-shadow};
20
+
11
21
  // Default:
12
22
  border: 1px solid transparent;
13
23
  cursor: pointer;
@@ -55,20 +65,19 @@
55
65
  background-color: var(--token-color-palette-neutral-700);
56
66
 
57
67
  @if ($add-visible-border) {
58
- border-color: var(--token-color-focus-action-internal);
68
+ border-color: $hds-interactive-dark-theme-color-focus-action-internal;
59
69
  }
60
70
 
61
71
  // focus ring:
62
72
  &::before {
63
73
  color: var(--token-color-foreground-high-contrast);
64
74
  border: none;
65
- box-shadow: var(--token-focus-ring-action-box-shadow);
66
75
  }
67
76
  }
68
77
 
69
78
  // override style removing the focus style
70
79
  &:focus:focus:not(:focus-visible)::before {
71
- box-shadow: var(--token-focus-ring-action-box-shadow);
80
+ box-shadow: $hds-interactive-dark-theme-focus-ring-action-box-shadow;
72
81
  }
73
82
 
74
83
  // Active:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashicorp/design-system-components",
3
- "version": "4.18.2",
3
+ "version": "4.19.0-rc-20250421170446",
4
4
  "description": "Helios Design System Components",
5
5
  "keywords": [
6
6
  "hashicorp",