@genesislcap/foundation-ui 15.8.1-PTC-0.1 → 15.8.2

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.
@@ -20,18 +20,7 @@ export declare class Icon extends FoundationElement {
20
20
  uuid: UUID;
21
21
  tooltipId: string;
22
22
  tooltip: string;
23
- tooltipChanged(): void;
24
23
  isError: boolean;
25
- /**
26
- * The tooltip element is portaled to `document.body` rather than rendered inside this
27
- * component. In place, it inherits the stacking context of whatever hosts the icon — in
28
- * virtualized lists (e.g. AG Grid rows are absolutely-positioned, transformed siblings)
29
- * the next sibling paints over the tooltip no matter its z-index. The host is positioned
30
- * from the anchor's `getBoundingClientRect()` (see {@link Icon.positionTooltipElement});
31
- * the tooltip's internal anchored region cannot be relied on for placement because
32
- * `tagFor(AnchoredRegion)` does not resolve for the subclassed genesis components.
33
- */
34
- private tooltipElement;
35
24
  name: IconName;
36
25
  nameChanged(oldValue: string, newValue: string): void;
37
26
  size: FaSize;
@@ -42,9 +31,6 @@ export declare class Icon extends FoundationElement {
42
31
  disconnectedCallback(): void;
43
32
  getDefaultTooltipConfig(): void;
44
33
  loadIcon(): void;
45
- private ensureTooltipElement;
46
- private positionTooltipElement;
47
- private removeTooltipElement;
48
34
  }
49
35
  /**
50
36
  * The Foundation Icon
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,QAAQ,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAClG,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAU/D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAG/B,eAAO,MAAM,2BAA2B,EAAE,cAGzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,IAAK,CAAC;AAEpC,oBAAY,iBAAi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C;AAI/D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAG/B,eAAO,MAAM,2BAA2B,EAAE,cAGzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,IAAK,CAAC;AAEpC,oBAAY,iBAAiB;IAC3B,KAAK,QAAQ;IACb,OAAO,QAAQ;IACf,KAAK,QAAQ;CACd;AAED,eAAO,MAAM,kBAAkB,EAAG,IAAa,CAAC;AAEhD,eAAO,MAAM,YAAY,sIAmBf,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;GAEG;AACH,qBAAa,IAAK,SAAQ,iBAAiB;IAC7B,QAAQ,EAAE,WAAW,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC;IACkB,SAAS,EAAE,MAAM,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC;IACyB,OAAO,EAAE,OAAO,CAAS;IAElE,IAAI,EAAE,QAAQ,CAAC;IACrB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAIxC,IAAI,EAAE,MAAM,CAAQ;IAC1B,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAIxC,OAAO,EAAE,SAAS,CAAW;IACnC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAIjD,iBAAiB;IAMjB,oBAAoB;IAKpB,uBAAuB;IAQhB,QAAQ;CAwBhB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,oTAMzB,CAAC"}
@@ -1,19 +1,4 @@
1
1
  import type { ElementStyles } from '@microsoft/fast-element';
2
2
  import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
3
3
  export declare const foundationIconStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementStyles;
4
- /**
5
- * Class name marking icon tooltips portaled to `document.body`.
6
- *
7
- * @public
8
- */
9
- export declare const iconTooltipPortalClassName = "foundation-icon-tooltip";
10
- /**
11
- * Document-level styles for icon tooltips. The icon portals its tooltip element to
12
- * `document.body` (so it cannot be painted over by absolutely-positioned siblings of
13
- * its host, e.g. virtualized grid rows), which places the tooltip and its content
14
- * outside the icon's shadow root — these rules therefore target it from the document.
15
- *
16
- * @public
17
- */
18
- export declare const iconTooltipPortalStyles = "\n .foundation-icon-tooltip {\n position: fixed;\n top: 0;\n left: 0;\n z-index: 999;\n width: 300px;\n contain: unset;\n }\n\n .foundation-icon-tooltip::part(tooltip) {\n padding: calc(var(--design-unit) * 4px);\n background-color: color-mix(in srgb, var(--neutral-layer-4), #000 10%);\n border: 1px solid var(--neutral-layer-3);\n text-align: left;\n color: var(--neutral-foreground-hint);\n box-shadow: 0 4px 10px rgb(0 0 0 / 35%);\n font-size: var(--type-ramp-minus-1-font-size);\n }\n\n .foundation-icon-tooltip .tooltip-title {\n color: var(--neutral-fill-strong-hover);\n margin: 0;\n }\n\n .foundation-icon-tooltip .tooltip-description {\n margin-top: calc(var(--design-unit) * 2px);\n margin-bottom: 0;\n font-size: var(--type-ramp-base-font-size);\n }\n\n .foundation-icon-tooltip .tooltip-second-title-margin {\n margin-top: calc(var(--design-unit) * 2px);\n }\n\n .foundation-icon-tooltip .tooltip-list-padding {\n margin: 0;\n padding: 0 0 0 calc(var(--design-unit) * 4px);\n }\n\n .foundation-icon-tooltip a,\n .foundation-icon-tooltip a:active,\n .foundation-icon-tooltip a:visited {\n color: var(--accent-foreground-rest);\n text-decoration: none;\n }\n\n .foundation-icon-tooltip .warning {\n background: var(--warning-color);\n color: #000;\n }\n\n .foundation-icon-tooltip .info {\n margin-top: calc(var(--design-unit) * 2px);\n padding: 20px;\n margin-bottom: 20px;\n height: auto;\n box-sizing: border-box;\n }\n";
19
4
  //# sourceMappingURL=icon.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.styles.d.ts","sourceRoot":"","sources":["../../../src/icon/icon.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,4BAA4B,CAAC;AAGpC,eAAO,MAAM,oBAAoB,GAC/B,SAAS,wBAAwB,EACjC,YAAY,2BAA2B,KACtC,aAkBF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AAEpE;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,4gDA2DnC,CAAC"}
1
+ {"version":3,"file":"icon.styles.d.ts","sourceRoot":"","sources":["../../../src/icon/icon.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,4BAA4B,CAAC;AAGpC,eAAO,MAAM,oBAAoB,GAC/B,SAAS,wBAAwB,EACjC,YAAY,2BAA2B,KACtC,aA2EF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon.template.d.ts","sourceRoot":"","sources":["../../../src/icon/icon.template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI5D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,KAAG,YAYhD,CAAC;AAEF,eAAO,MAAM,sBAAsB,yBAElC,CAAC"}
1
+ {"version":3,"file":"icon.template.d.ts","sourceRoot":"","sources":["../../../src/icon/icon.template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI5D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,KAAG,YAsBhD,CAAC;AAEF,eAAO,MAAM,sBAAsB,yBAElC,CAAC"}
@@ -133,23 +133,23 @@ interface HTMLWCProps extends React.AriaAttributes {
133
133
  onInput?(e: Event): void;
134
134
  }
135
135
 
136
- export declare const Accordion: React.ForwardRefExoticComponent<
136
+ export declare const AccordionItem: React.ForwardRefExoticComponent<
137
137
  React.PropsWithChildren<
138
- Omit<PublicOf<AccordionWC>, 'children' | 'style'> &
138
+ Omit<PublicOf<AccordionItemWC>, 'children' | 'style'> &
139
139
  HTMLWCProps & {
140
140
  }
141
- > & React.RefAttributes<AccordionWC>
141
+ > & React.RefAttributes<AccordionItemWC>
142
142
  >;
143
- export type AccordionRef = AccordionWC;
143
+ export type AccordionItemRef = AccordionItemWC;
144
144
 
145
- export declare const AccordionItem: React.ForwardRefExoticComponent<
145
+ export declare const Accordion: React.ForwardRefExoticComponent<
146
146
  React.PropsWithChildren<
147
- Omit<PublicOf<AccordionItemWC>, 'children' | 'style'> &
147
+ Omit<PublicOf<AccordionWC>, 'children' | 'style'> &
148
148
  HTMLWCProps & {
149
149
  }
150
- > & React.RefAttributes<AccordionItemWC>
150
+ > & React.RefAttributes<AccordionWC>
151
151
  >;
152
- export type AccordionItemRef = AccordionItemWC;
152
+ export type AccordionRef = AccordionWC;
153
153
 
154
154
  export declare const ActionsMenu: React.ForwardRefExoticComponent<
155
155
  React.PropsWithChildren<
@@ -1 +1 @@
1
- {"version":3,"file":"search-bar.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,EACL,eAAe,EACf,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,iBAAiB;IACvC,QAAQ,EAAE,iBAAiB,CAA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U7B,OAAO,CAAC,kBAAkB,CAExB;IAEF,OAAO,CAAC,wBAAwB,CAQ9B;CACH;AAGD,eAAO,MAAM,gCAAgC,EAAE,cAA0B,CAAC;AAE1E,eAAO,MAAM,sBAAsB,IAAK,CAAC;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;oBAM9B,CAAC"}
@@ -3,8 +3,7 @@ import { findIconDefinition, icon } from '@fortawesome/fontawesome-svg-core';
3
3
  import { UUID } from '@genesislcap/foundation-utils';
4
4
  import { attr, observable } from '@microsoft/fast-element';
5
5
  import { FoundationElement } from '@microsoft/fast-foundation';
6
- import { getPrefix } from '../utils';
7
- import { foundationIconStyles as styles, iconTooltipPortalClassName, iconTooltipPortalStyles, } from './icon.styles';
6
+ import { foundationIconStyles as styles } from './icon.styles';
8
7
  import { foundationIconTemplate as template } from './icon.template';
9
8
  // explicitly declaring for extensibility
10
9
  export const foundationIconShadowOptions = {
@@ -39,16 +38,6 @@ export const faSizeValues = [
39
38
  'stack-1x',
40
39
  'stack-2x',
41
40
  ];
42
- const tooltipPortalStylesId = 'foundation-icon-tooltip-styles';
43
- const ensureTooltipPortalStyles = (document) => {
44
- if (document.getElementById(tooltipPortalStylesId)) {
45
- return;
46
- }
47
- const style = document.createElement('style');
48
- style.id = tooltipPortalStylesId;
49
- style.textContent = iconTooltipPortalStyles;
50
- document.head.append(style);
51
- };
52
41
  /**
53
42
  * @tagname %%prefix%%-icon
54
43
  */
@@ -56,32 +45,8 @@ export class Icon extends FoundationElement {
56
45
  constructor() {
57
46
  super(...arguments);
58
47
  this.isError = false;
59
- /**
60
- * The tooltip element is portaled to `document.body` rather than rendered inside this
61
- * component. In place, it inherits the stacking context of whatever hosts the icon — in
62
- * virtualized lists (e.g. AG Grid rows are absolutely-positioned, transformed siblings)
63
- * the next sibling paints over the tooltip no matter its z-index. The host is positioned
64
- * from the anchor's `getBoundingClientRect()` (see {@link Icon.positionTooltipElement});
65
- * the tooltip's internal anchored region cannot be relied on for placement because
66
- * `tagFor(AnchoredRegion)` does not resolve for the subclassed genesis components.
67
- */
68
- this.tooltipElement = null;
69
48
  this.size = 'sm';
70
49
  this.variant = 'solid';
71
- this.positionTooltipElement = () => {
72
- if (!this.tooltipElement || !this.iElement) {
73
- return;
74
- }
75
- const anchorRect = this.iElement.getBoundingClientRect();
76
- this.tooltipElement.style.top = `${anchorRect.top}px`;
77
- this.tooltipElement.style.left = `${anchorRect.right}px`;
78
- };
79
- }
80
- tooltipChanged() {
81
- if (!this.$fastController.isConnected) {
82
- return;
83
- }
84
- this.tooltip ? this.loadIcon() : this.removeTooltipElement();
85
50
  }
86
51
  nameChanged(oldValue, newValue) {
87
52
  newValue ? this.loadIcon() : '';
@@ -99,7 +64,6 @@ export class Icon extends FoundationElement {
99
64
  disconnectedCallback() {
100
65
  super.disconnectedCallback();
101
66
  this.iElement.replaceChildren();
102
- this.removeTooltipElement();
103
67
  }
104
68
  getDefaultTooltipConfig() {
105
69
  if (!this.name) {
@@ -117,7 +81,6 @@ export class Icon extends FoundationElement {
117
81
  this.tooltipId = this.uuid.createId();
118
82
  }
119
83
  this.getDefaultTooltipConfig();
120
- this.ensureTooltipElement();
121
84
  }
122
85
  const iconDefinition = findIconDefinition({
123
86
  prefix: FaPrefixFromStyle[this.variant],
@@ -129,44 +92,6 @@ export class Icon extends FoundationElement {
129
92
  Array.from(faIcon.node).map((n) => this.iElement.appendChild(n));
130
93
  }
131
94
  }
132
- ensureTooltipElement() {
133
- if (!this.$fastController.isConnected || !this.iElement) {
134
- return;
135
- }
136
- if (!this.tooltipElement) {
137
- ensureTooltipPortalStyles(document);
138
- const tooltipElement = document.createElement(`${getPrefix(this)}-tooltip`);
139
- tooltipElement.classList.add(iconTooltipPortalClassName);
140
- document.body.append(tooltipElement);
141
- this.tooltipElement = tooltipElement;
142
- // Reposition just before FASTTooltip's own (delayed) show logic runs, so the
143
- // bubble is placed from the anchor's current viewport position even after the
144
- // icon has moved (scrolled grid, resized layout).
145
- this.iElement.addEventListener('mouseover', this.positionTooltipElement, { passive: true });
146
- this.iElement.addEventListener('focusin', this.positionTooltipElement, { passive: true });
147
- }
148
- // Anchor by element reference, assigned only after the tooltip is connected:
149
- // FASTTooltip's connectedCallback re-resolves the `anchor` id within the tooltip's own
150
- // root node, which cannot reach this icon's shadow root and would clobber an earlier value.
151
- this.tooltipElement.anchorElement = this.iElement;
152
- // Raw HTML on purpose: the previous inline template interpolated the tooltip string as
153
- // markup, and consumers (e.g. foundation-forms) pass rich HTML tooltips.
154
- this.tooltipElement.innerHTML = this.tooltip;
155
- this.positionTooltipElement();
156
- }
157
- removeTooltipElement() {
158
- var _a, _b;
159
- if (!this.tooltipElement) {
160
- return;
161
- }
162
- (_a = this.iElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseover', this.positionTooltipElement);
163
- (_b = this.iElement) === null || _b === void 0 ? void 0 : _b.removeEventListener('focusin', this.positionTooltipElement);
164
- // Clearing the anchor while still connected detaches the hover/focus
165
- // listeners FASTTooltip registered on the anchor element.
166
- this.tooltipElement.anchorElement = null;
167
- this.tooltipElement.remove();
168
- this.tooltipElement = null;
169
- }
170
95
  }
171
96
  __decorate([
172
97
  observable
@@ -18,32 +18,15 @@ export const foundationIconStyles = (context, definition) => css `
18
18
  .error-tooltip {
19
19
  color: var(--error-color);
20
20
  }
21
- `;
22
- /**
23
- * Class name marking icon tooltips portaled to `document.body`.
24
- *
25
- * @public
26
- */
27
- export const iconTooltipPortalClassName = 'foundation-icon-tooltip';
28
- /**
29
- * Document-level styles for icon tooltips. The icon portals its tooltip element to
30
- * `document.body` (so it cannot be painted over by absolutely-positioned siblings of
31
- * its host, e.g. virtualized grid rows), which places the tooltip and its content
32
- * outside the icon's shadow root — these rules therefore target it from the document.
33
- *
34
- * @public
35
- */
36
- export const iconTooltipPortalStyles = `
37
- .${iconTooltipPortalClassName} {
38
- position: fixed;
39
- top: 0;
40
- left: 0;
21
+
22
+ .tooltip-element {
23
+ position: absolute;
41
24
  z-index: 999;
42
25
  width: 300px;
43
26
  contain: unset;
44
27
  }
45
28
 
46
- .${iconTooltipPortalClassName}::part(tooltip) {
29
+ .tooltip-element::part(tooltip) {
47
30
  padding: calc(var(--design-unit) * 4px);
48
31
  background-color: color-mix(in srgb, var(--neutral-layer-4), #000 10%);
49
32
  border: 1px solid var(--neutral-layer-3);
@@ -53,39 +36,39 @@ export const iconTooltipPortalStyles = `
53
36
  font-size: var(--type-ramp-minus-1-font-size);
54
37
  }
55
38
 
56
- .${iconTooltipPortalClassName} .tooltip-title {
39
+ .tooltip-title {
57
40
  color: var(--neutral-fill-strong-hover);
58
41
  margin: 0;
59
42
  }
60
43
 
61
- .${iconTooltipPortalClassName} .tooltip-description {
44
+ .tooltip-description {
62
45
  margin-top: calc(var(--design-unit) * 2px);
63
46
  margin-bottom: 0;
64
47
  font-size: var(--type-ramp-base-font-size);
65
48
  }
66
49
 
67
- .${iconTooltipPortalClassName} .tooltip-second-title-margin {
50
+ .tooltip-second-title-margin {
68
51
  margin-top: calc(var(--design-unit) * 2px);
69
52
  }
70
53
 
71
- .${iconTooltipPortalClassName} .tooltip-list-padding {
54
+ .tooltip-list-padding {
72
55
  margin: 0;
73
56
  padding: 0 0 0 calc(var(--design-unit) * 4px);
74
57
  }
75
58
 
76
- .${iconTooltipPortalClassName} a,
77
- .${iconTooltipPortalClassName} a:active,
78
- .${iconTooltipPortalClassName} a:visited {
59
+ a,
60
+ a:active,
61
+ a:visited {
79
62
  color: var(--accent-foreground-rest);
80
63
  text-decoration: none;
81
64
  }
82
65
 
83
- .${iconTooltipPortalClassName} .warning {
66
+ .warning {
84
67
  background: var(--warning-color);
85
68
  color: #000;
86
69
  }
87
70
 
88
- .${iconTooltipPortalClassName} .info {
71
+ .info {
89
72
  margin-top: calc(var(--design-unit) * 2px);
90
73
  padding: 20px;
91
74
  margin-bottom: 20px;
@@ -1,4 +1,4 @@
1
- import { html, ref } from '@microsoft/fast-element';
1
+ import { html, ref, when } from '@microsoft/fast-element';
2
2
  import { classNames } from '@microsoft/fast-web-utilities';
3
3
  import { getPrefix } from '../utils';
4
4
  export const getPrefixedIcon = (prefix) => html `
@@ -11,6 +11,13 @@ export const getPrefixedIcon = (prefix) => html `
11
11
  >
12
12
  <slot></slot>
13
13
  </i>
14
+ ${when((x) => x.tooltip, html `
15
+ <${prefix}-tooltip part="tooltip" class="tooltip-element" show anchor="${(x) => x.tooltipId}">
16
+ ${(x) => html `
17
+ ${x.tooltip}
18
+ `}
19
+ </${prefix}-tooltip>
20
+ `)}
14
21
  </template>
15
22
  `;
16
23
  export const foundationIconTemplate = html `
@@ -151,6 +151,9 @@ export class SearchBar extends FoundationElement {
151
151
  if ((newText === null || newText === void 0 ? void 0 : newText.length) >= this.minlength) {
152
152
  this.combobox.value = newText;
153
153
  this.searchTerm = newText;
154
+ if (this.options) {
155
+ this.filterSelectedOptions(newText);
156
+ }
154
157
  this.combobox.open = true;
155
158
  }
156
159
  this.loading = false;
@@ -53600,37 +53600,6 @@
53600
53600
  "isProtected": false,
53601
53601
  "isAbstract": false
53602
53602
  },
53603
- {
53604
- "kind": "Method",
53605
- "canonicalReference": "@genesislcap/foundation-ui!Icon#tooltipChanged:member(1)",
53606
- "docComment": "",
53607
- "excerptTokens": [
53608
- {
53609
- "kind": "Content",
53610
- "text": "tooltipChanged(): "
53611
- },
53612
- {
53613
- "kind": "Content",
53614
- "text": "void"
53615
- },
53616
- {
53617
- "kind": "Content",
53618
- "text": ";"
53619
- }
53620
- ],
53621
- "isStatic": false,
53622
- "returnTypeTokenRange": {
53623
- "startIndex": 1,
53624
- "endIndex": 2
53625
- },
53626
- "releaseTag": "Public",
53627
- "isProtected": false,
53628
- "overloadIndex": 1,
53629
- "parameters": [],
53630
- "isOptional": false,
53631
- "isAbstract": false,
53632
- "name": "tooltipChanged"
53633
- },
53634
53603
  {
53635
53604
  "kind": "Property",
53636
53605
  "canonicalReference": "@genesislcap/foundation-ui!Icon#tooltipId:member",
@@ -53794,60 +53763,6 @@
53794
53763
  },
53795
53764
  "implementsTokenRanges": []
53796
53765
  },
53797
- {
53798
- "kind": "Variable",
53799
- "canonicalReference": "@genesislcap/foundation-ui!iconTooltipPortalClassName:var",
53800
- "docComment": "/**\n * Class name marking icon tooltips portaled to `document.body`.\n *\n * @public\n */\n",
53801
- "excerptTokens": [
53802
- {
53803
- "kind": "Content",
53804
- "text": "iconTooltipPortalClassName = "
53805
- },
53806
- {
53807
- "kind": "Content",
53808
- "text": "\"foundation-icon-tooltip\""
53809
- }
53810
- ],
53811
- "fileUrlPath": "src/icon/icon.styles.ts",
53812
- "initializerTokenRange": {
53813
- "startIndex": 1,
53814
- "endIndex": 2
53815
- },
53816
- "isReadonly": true,
53817
- "releaseTag": "Public",
53818
- "name": "iconTooltipPortalClassName",
53819
- "variableTypeTokenRange": {
53820
- "startIndex": 0,
53821
- "endIndex": 0
53822
- }
53823
- },
53824
- {
53825
- "kind": "Variable",
53826
- "canonicalReference": "@genesislcap/foundation-ui!iconTooltipPortalStyles:var",
53827
- "docComment": "/**\n * Document-level styles for icon tooltips. The icon portals its tooltip element to `document.body` (so it cannot be painted over by absolutely-positioned siblings of its host, e.g. virtualized grid rows), which places the tooltip and its content outside the icon's shadow root — these rules therefore target it from the document.\n *\n * @public\n */\n",
53828
- "excerptTokens": [
53829
- {
53830
- "kind": "Content",
53831
- "text": "iconTooltipPortalStyles = "
53832
- },
53833
- {
53834
- "kind": "Content",
53835
- "text": "\"\\n .foundation-icon-tooltip {\\n position: fixed;\\n top: 0;\\n left: 0;\\n z-index: 999;\\n width: 300px;\\n contain: unset;\\n }\\n\\n .foundation-icon-tooltip::part(tooltip) {\\n padding: calc(var(--design-unit) * 4px);\\n background-color: color-mix(in srgb, var(--neutral-layer-4), #000 10%);\\n border: 1px solid var(--neutral-layer-3);\\n text-align: left;\\n color: var(--neutral-foreground-hint);\\n box-shadow: 0 4px 10px rgb(0 0 0 / 35%);\\n font-size: var(--type-ramp-minus-1-font-size);\\n }\\n\\n .foundation-icon-tooltip .tooltip-title {\\n color: var(--neutral-fill-strong-hover);\\n margin: 0;\\n }\\n\\n .foundation-icon-tooltip .tooltip-description {\\n margin-top: calc(var(--design-unit) * 2px);\\n margin-bottom: 0;\\n font-size: var(--type-ramp-base-font-size);\\n }\\n\\n .foundation-icon-tooltip .tooltip-second-title-margin {\\n margin-top: calc(var(--design-unit) * 2px);\\n }\\n\\n .foundation-icon-tooltip .tooltip-list-padding {\\n margin: 0;\\n padding: 0 0 0 calc(var(--design-unit) * 4px);\\n }\\n\\n .foundation-icon-tooltip a,\\n .foundation-icon-tooltip a:active,\\n .foundation-icon-tooltip a:visited {\\n color: var(--accent-foreground-rest);\\n text-decoration: none;\\n }\\n\\n .foundation-icon-tooltip .warning {\\n background: var(--warning-color);\\n color: #000;\\n }\\n\\n .foundation-icon-tooltip .info {\\n margin-top: calc(var(--design-unit) * 2px);\\n padding: 20px;\\n margin-bottom: 20px;\\n height: auto;\\n box-sizing: border-box;\\n }\\n\""
53836
- }
53837
- ],
53838
- "fileUrlPath": "src/icon/icon.styles.ts",
53839
- "initializerTokenRange": {
53840
- "startIndex": 1,
53841
- "endIndex": 2
53842
- },
53843
- "isReadonly": true,
53844
- "releaseTag": "Public",
53845
- "name": "iconTooltipPortalStyles",
53846
- "variableTypeTokenRange": {
53847
- "startIndex": 0,
53848
- "endIndex": 0
53849
- }
53850
- },
53851
53766
  {
53852
53767
  "kind": "Variable",
53853
53768
  "canonicalReference": "@genesislcap/foundation-ui!INPUT_MIN_LENGTH:var",
@@ -5346,18 +5346,7 @@ export declare class Icon extends FoundationElement {
5346
5346
  uuid: UUID;
5347
5347
  tooltipId: string;
5348
5348
  tooltip: string;
5349
- tooltipChanged(): void;
5350
5349
  isError: boolean;
5351
- /**
5352
- * The tooltip element is portaled to `document.body` rather than rendered inside this
5353
- * component. In place, it inherits the stacking context of whatever hosts the icon — in
5354
- * virtualized lists (e.g. AG Grid rows are absolutely-positioned, transformed siblings)
5355
- * the next sibling paints over the tooltip no matter its z-index. The host is positioned
5356
- * from the anchor's `getBoundingClientRect()` (see {@link Icon.positionTooltipElement});
5357
- * the tooltip's internal anchored region cannot be relied on for placement because
5358
- * `tagFor(AnchoredRegion)` does not resolve for the subclassed genesis components.
5359
- */
5360
- private tooltipElement;
5361
5350
  name: IconName;
5362
5351
  nameChanged(oldValue: string, newValue: string): void;
5363
5352
  size: FaSize;
@@ -5368,32 +5357,12 @@ export declare class Icon extends FoundationElement {
5368
5357
  disconnectedCallback(): void;
5369
5358
  getDefaultTooltipConfig(): void;
5370
5359
  loadIcon(): void;
5371
- private ensureTooltipElement;
5372
- private positionTooltipElement;
5373
- private removeTooltipElement;
5374
5360
  }
5375
5361
 
5376
5362
  export { IconName }
5377
5363
 
5378
5364
  export { IconStyle }
5379
5365
 
5380
- /**
5381
- * Class name marking icon tooltips portaled to `document.body`.
5382
- *
5383
- * @public
5384
- */
5385
- export declare const iconTooltipPortalClassName = "foundation-icon-tooltip";
5386
-
5387
- /**
5388
- * Document-level styles for icon tooltips. The icon portals its tooltip element to
5389
- * `document.body` (so it cannot be painted over by absolutely-positioned siblings of
5390
- * its host, e.g. virtualized grid rows), which places the tooltip and its content
5391
- * outside the icon's shadow root — these rules therefore target it from the document.
5392
- *
5393
- * @public
5394
- */
5395
- export declare const iconTooltipPortalStyles = "\n .foundation-icon-tooltip {\n position: fixed;\n top: 0;\n left: 0;\n z-index: 999;\n width: 300px;\n contain: unset;\n }\n\n .foundation-icon-tooltip::part(tooltip) {\n padding: calc(var(--design-unit) * 4px);\n background-color: color-mix(in srgb, var(--neutral-layer-4), #000 10%);\n border: 1px solid var(--neutral-layer-3);\n text-align: left;\n color: var(--neutral-foreground-hint);\n box-shadow: 0 4px 10px rgb(0 0 0 / 35%);\n font-size: var(--type-ramp-minus-1-font-size);\n }\n\n .foundation-icon-tooltip .tooltip-title {\n color: var(--neutral-fill-strong-hover);\n margin: 0;\n }\n\n .foundation-icon-tooltip .tooltip-description {\n margin-top: calc(var(--design-unit) * 2px);\n margin-bottom: 0;\n font-size: var(--type-ramp-base-font-size);\n }\n\n .foundation-icon-tooltip .tooltip-second-title-margin {\n margin-top: calc(var(--design-unit) * 2px);\n }\n\n .foundation-icon-tooltip .tooltip-list-padding {\n margin: 0;\n padding: 0 0 0 calc(var(--design-unit) * 4px);\n }\n\n .foundation-icon-tooltip a,\n .foundation-icon-tooltip a:active,\n .foundation-icon-tooltip a:visited {\n color: var(--accent-foreground-rest);\n text-decoration: none;\n }\n\n .foundation-icon-tooltip .warning {\n background: var(--warning-color);\n color: #000;\n }\n\n .foundation-icon-tooltip .info {\n margin-top: calc(var(--design-unit) * 2px);\n padding: 20px;\n margin-bottom: 20px;\n height: auto;\n box-sizing: border-box;\n }\n";
5396
-
5397
5366
  export declare const INPUT_MIN_LENGTH = 3;
5398
5367
 
5399
5368
  export declare const inputControls: ElementStyles;
package/dist/react.cjs CHANGED
@@ -113,14 +113,14 @@ function _mergeRefs(...refs) {
113
113
  };
114
114
  }
115
115
 
116
- const Accordion = React.forwardRef(function Accordion(props, ref) {
116
+ const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
117
117
  const { children, ...rest } = props;
118
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
118
+ return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
119
119
  });
120
120
 
121
- const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
121
+ const Accordion = React.forwardRef(function Accordion(props, ref) {
122
122
  const { children, ...rest } = props;
123
- return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
123
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
124
124
  });
125
125
 
126
126
  const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
@@ -1143,8 +1143,8 @@ const WeeklyRecurrence = React.forwardRef(function WeeklyRecurrence(props, ref)
1143
1143
  });
1144
1144
 
1145
1145
  module.exports = {
1146
- Accordion,
1147
1146
  AccordionItem,
1147
+ Accordion,
1148
1148
  ActionsMenu,
1149
1149
  AiCriteriaSearch,
1150
1150
  AiIndicator,
package/dist/react.mjs CHANGED
@@ -111,14 +111,14 @@ function _mergeRefs(...refs) {
111
111
  };
112
112
  }
113
113
 
114
- export const Accordion = React.forwardRef(function Accordion(props, ref) {
114
+ export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
115
115
  const { children, ...rest } = props;
116
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
116
+ return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
117
117
  });
118
118
 
119
- export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
119
+ export const Accordion = React.forwardRef(function Accordion(props, ref) {
120
120
  const { children, ...rest } = props;
121
- return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
121
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
122
122
  });
123
123
 
124
124
  export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-ui",
3
3
  "description": "Genesis Foundation UI",
4
- "version": "15.8.1-PTC-0.1",
4
+ "version": "15.8.2",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -85,13 +85,13 @@
85
85
  }
86
86
  },
87
87
  "devDependencies": {
88
- "@genesislcap/foundation-testing": "15.8.1-PTC-0.1",
89
- "@genesislcap/genx": "15.8.1-PTC-0.1",
90
- "@genesislcap/rollup-builder": "15.8.1-PTC-0.1",
91
- "@genesislcap/ts-builder": "15.8.1-PTC-0.1",
92
- "@genesislcap/uvu-playwright-builder": "15.8.1-PTC-0.1",
93
- "@genesislcap/vite-builder": "15.8.1-PTC-0.1",
94
- "@genesislcap/webpack-builder": "15.8.1-PTC-0.1",
88
+ "@genesislcap/foundation-testing": "15.8.2",
89
+ "@genesislcap/genx": "15.8.2",
90
+ "@genesislcap/rollup-builder": "15.8.2",
91
+ "@genesislcap/ts-builder": "15.8.2",
92
+ "@genesislcap/uvu-playwright-builder": "15.8.2",
93
+ "@genesislcap/vite-builder": "15.8.2",
94
+ "@genesislcap/webpack-builder": "15.8.2",
95
95
  "copyfiles": "^2.4.1"
96
96
  },
97
97
  "dependencies": {
@@ -100,16 +100,16 @@
100
100
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
101
101
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
102
102
  "@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
103
- "@genesislcap/expression-builder": "15.8.1-PTC-0.1",
104
- "@genesislcap/foundation-ai": "15.8.1-PTC-0.1",
105
- "@genesislcap/foundation-comms": "15.8.1-PTC-0.1",
106
- "@genesislcap/foundation-criteria": "15.8.1-PTC-0.1",
107
- "@genesislcap/foundation-errors": "15.8.1-PTC-0.1",
108
- "@genesislcap/foundation-events": "15.8.1-PTC-0.1",
109
- "@genesislcap/foundation-logger": "15.8.1-PTC-0.1",
110
- "@genesislcap/foundation-notifications": "15.8.1-PTC-0.1",
111
- "@genesislcap/foundation-user": "15.8.1-PTC-0.1",
112
- "@genesislcap/foundation-utils": "15.8.1-PTC-0.1",
103
+ "@genesislcap/expression-builder": "15.8.2",
104
+ "@genesislcap/foundation-ai": "15.8.2",
105
+ "@genesislcap/foundation-comms": "15.8.2",
106
+ "@genesislcap/foundation-criteria": "15.8.2",
107
+ "@genesislcap/foundation-errors": "15.8.2",
108
+ "@genesislcap/foundation-events": "15.8.2",
109
+ "@genesislcap/foundation-logger": "15.8.2",
110
+ "@genesislcap/foundation-notifications": "15.8.2",
111
+ "@genesislcap/foundation-user": "15.8.2",
112
+ "@genesislcap/foundation-utils": "15.8.2",
113
113
  "@microsoft/fast-colors": "5.3.1",
114
114
  "@microsoft/fast-components": "2.30.6",
115
115
  "@microsoft/fast-element": "1.14.0",
@@ -142,5 +142,5 @@
142
142
  "require": "./dist/react.cjs"
143
143
  }
144
144
  },
145
- "gitHead": "d3b158d9e91f31fc6a248b8b75d7c8f8d5589bc6"
145
+ "gitHead": "c62567e4acee7219798579d18a023be909bdd0a0"
146
146
  }