@genesislcap/foundation-ui 15.71.0 → 15.72.0-FUI-2629.7

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.
@@ -312,19 +312,47 @@ export declare type ActionMenuItem = {
312
312
  callback: (rowData: any) => void | any;
313
313
  isDisabled?: (rowData: any) => boolean;
314
314
  color?: string;
315
+ icon?: {
316
+ variant?: IconStyle;
317
+ name: string;
318
+ size?: FaSize;
319
+ };
315
320
  };
316
321
 
322
+ /**
323
+ * The actions a grid column's Actions Menu shows: a fixed array, or a resolver per row.
324
+ * @public
325
+ */
326
+ export declare type ActionMenuItems = ActionMenuItem[] | ActionMenuItemsResolver;
327
+
328
+ /**
329
+ * A function of the row data returning the actions for that row (for row-scoped
330
+ * eligibility/permission filtering).
331
+ * @public
332
+ */
333
+ export declare type ActionMenuItemsResolver = (rowData: any) => ActionMenuItem[];
334
+
317
335
  /**
318
336
  * @tagname %%prefix%%-actions-menu
319
337
  */
320
338
  export declare class ActionsMenu extends FoundationElement {
321
339
  actions: ActionMenuItem[];
340
+ /**
341
+ * Resolves the actions per row instead of `actions`, from the row data in `definition`.
342
+ * @remarks Set from a function passed as the cell params' `actions`.
343
+ */
344
+ actionsResolver?: ActionMenuItemsResolver;
322
345
  isVertical: boolean;
323
346
  addDefaultActions: boolean;
324
347
  autoCloseOnAction: boolean;
325
348
  classNames: string;
326
349
  definition: any;
327
350
  name: string;
351
+ /**
352
+ * When set, the opener renders this icon instead of the `name` text (e.g. `ellipsis`
353
+ * for an icon-only "kebab" opener).
354
+ */
355
+ iconName: string;
328
356
  open: boolean;
329
357
  buttonAppearance: string;
330
358
  hideDisabled: boolean;
@@ -332,12 +360,30 @@ export declare class ActionsMenu extends FoundationElement {
332
360
  singleOption: ActionMenuItem;
333
361
  actionsMenu: HTMLElement;
334
362
  actionsOpener: HTMLElement;
363
+ private positionTracker?;
364
+ /** Set when the keyboard opens the menu, so focus moves into it as screen readers announce. */
365
+ private focusMenuOnOpen;
335
366
  disconnectedCallback(): void;
336
367
  private updateMenuPosition;
368
+ private startTrackingPosition;
369
+ private stopTrackingPosition;
337
370
  protected definitionChanged(oldValue: any, newValue: any): void;
338
371
  protected openChanged(): void;
339
372
  toggleActionsMenuVisibility(): void;
373
+ /**
374
+ * Syncs `open` when the native `popover="auto"` light-dismiss (outside click / Escape) closes
375
+ * the vertical menu without going through `toggleActionsMenuVisibility()`.
376
+ */
377
+ onPopoverToggle(event: Event): void;
378
+ /** Opens the icon-only opener from the keyboard, as a native button would. */
379
+ onIconOpenerKeydown(event: KeyboardEvent): boolean;
340
380
  onActionMenuItemClick(callback: (rowData: any) => void | any): void;
381
+ /** Resolves an action's `isDisabled` for the current row. */
382
+ isActionDisabled(action: ActionMenuItem): boolean;
383
+ /** The actions for the current row: from `actionsResolver` when set, else `actions`. */
384
+ get resolvedActions(): ActionMenuItem[];
385
+ /** Whether the row has an action to show: an enabled one, or any when disabled ones show. */
386
+ get hasVisibleActions(): boolean;
341
387
  get allActions(): ActionMenuItem[];
342
388
  get rowData(): any;
343
389
  getLabel(name: string | ((rowData: any) => string)): string;
@@ -391,6 +437,21 @@ declare interface AffixMixinBase {
391
437
  id: string;
392
438
  }
393
439
 
440
+ /**
441
+ * Styles a menu to match AG Grid's own menu (ag-menu / ag-menu-list / ag-menu-option), so a menu
442
+ * drawn over a grid looks like the grid's. AG Grid's `--ag-*` variables apply where they are set;
443
+ * elsewhere the design system's tokens do, with fallbacks for when neither is in scope.
444
+ *
445
+ * @remarks Shared by the vertical actions menu and grid-pro's right-click menu. Each adds its own
446
+ * layout (display, sizing) around these rules.
447
+ *
448
+ * @param menuSelector - Selects the menu surface. May be a selector list.
449
+ * @param itemSelector - Selects a menu item. Must be a single selector, as states are appended to it.
450
+ * @returns The menu surface and item styles.
451
+ * @public
452
+ */
453
+ export declare const agMenuStyles: (menuSelector: string, itemSelector: string) => ElementStyles;
454
+
394
455
  /**
395
456
  * Natural-language criteria search input with AI interpretation.
396
457
  *
@@ -5481,7 +5542,7 @@ export declare class Listbox extends Listbox_2 {
5481
5542
  export declare class ListboxOption extends ListboxOption_2 {
5482
5543
  }
5483
5544
 
5484
- export declare const mapType: (TYPE: string) => "boolean" | "number" | "date" | "text" | "enum";
5545
+ export declare const mapType: (TYPE: string) => "boolean" | "number" | "text" | "date" | "enum";
5485
5546
 
5486
5547
  export declare const MAX_DAYS = 31;
5487
5548
 
@@ -5516,7 +5577,7 @@ export declare class MenuItem extends MenuItem_2 {
5516
5577
  connectedCallback(): void;
5517
5578
  }
5518
5579
 
5519
- export declare const menuTemplate: (prefix: string) => ViewTemplate<ActionsMenu, any>;
5580
+ export declare const menuTemplate: (prefix: string) => ViewTemplate<ActionsMenu>;
5520
5581
 
5521
5582
  export declare type MinutesConfig = Omit<baseConfig, 'minutes'> & {
5522
5583
  type: RecurrenceType.MINUTES;
@@ -6949,7 +7010,7 @@ export declare interface SetStatesEventDetail {
6949
7010
 
6950
7011
  export declare const sharedFieldStyles: ElementStyles;
6951
7012
 
6952
- export declare const singleOptionTemplate: (prefix: string) => ViewTemplate<ActionsMenu, any>;
7013
+ export declare const singleOptionTemplate: (prefix: string) => ViewTemplate<ActionsMenu>;
6953
7014
 
6954
7015
  /**
6955
7016
  * @tagname %%prefix%%-skeleton
package/dist/react.cjs CHANGED
@@ -113,11 +113,6 @@ function _mergeRefs(...refs) {
113
113
  };
114
114
  }
115
115
 
116
- const Accordion = React.forwardRef(function Accordion(props, ref) {
117
- const { children, ...rest } = props;
118
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
119
- });
120
-
121
116
  const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
122
117
  const { children, ...rest } = props;
123
118
  return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
@@ -155,6 +150,11 @@ const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
155
150
  return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
156
151
  });
157
152
 
153
+ const Accordion = React.forwardRef(function Accordion(props, ref) {
154
+ const { children, ...rest } = props;
155
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
156
+ });
157
+
158
158
  const Anchor = React.forwardRef(function Anchor(props, ref) {
159
159
  const { children, ...rest } = props;
160
160
  return React.createElement(customElements.getName(AnchorWC) ?? '%%prefix%%-anchor', { ...rest, ref }, children);
@@ -1143,11 +1143,11 @@ const WeeklyRecurrence = React.forwardRef(function WeeklyRecurrence(props, ref)
1143
1143
  });
1144
1144
 
1145
1145
  module.exports = {
1146
- Accordion,
1147
1146
  AccordionItem,
1148
1147
  ActionsMenu,
1149
1148
  AiCriteriaSearch,
1150
1149
  AiIndicator,
1150
+ Accordion,
1151
1151
  Anchor,
1152
1152
  AnchoredRegion,
1153
1153
  Avatar,
package/dist/react.mjs CHANGED
@@ -111,11 +111,6 @@ function _mergeRefs(...refs) {
111
111
  };
112
112
  }
113
113
 
114
- export const Accordion = React.forwardRef(function Accordion(props, ref) {
115
- const { children, ...rest } = props;
116
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
117
- });
118
-
119
114
  export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
120
115
  const { children, ...rest } = props;
121
116
  return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
@@ -153,6 +148,11 @@ export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
153
148
  return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
154
149
  });
155
150
 
151
+ export const Accordion = React.forwardRef(function Accordion(props, ref) {
152
+ const { children, ...rest } = props;
153
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
154
+ });
155
+
156
156
  export const Anchor = React.forwardRef(function Anchor(props, ref) {
157
157
  const { children, ...rest } = props;
158
158
  return React.createElement(customElements.getName(AnchorWC) ?? '%%prefix%%-anchor', { ...rest, ref }, children);
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.71.0",
4
+ "version": "15.72.0-FUI-2629.7",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -82,12 +82,12 @@
82
82
  }
83
83
  },
84
84
  "devDependencies": {
85
- "@genesislcap/foundation-testing": "15.71.0",
86
- "@genesislcap/genx": "15.71.0",
87
- "@genesislcap/ts-builder": "15.71.0",
88
- "@genesislcap/uvu-playwright-builder": "15.71.0",
89
- "@genesislcap/vite-builder": "15.71.0",
90
- "@genesislcap/webpack-builder": "15.71.0",
85
+ "@genesislcap/foundation-testing": "15.72.0-FUI-2629.7",
86
+ "@genesislcap/genx": "15.72.0-FUI-2629.7",
87
+ "@genesislcap/ts-builder": "15.72.0-FUI-2629.7",
88
+ "@genesislcap/uvu-playwright-builder": "15.72.0-FUI-2629.7",
89
+ "@genesislcap/vite-builder": "15.72.0-FUI-2629.7",
90
+ "@genesislcap/webpack-builder": "15.72.0-FUI-2629.7",
91
91
  "copyfiles": "^2.4.1"
92
92
  },
93
93
  "dependencies": {
@@ -96,16 +96,16 @@
96
96
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
97
97
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
98
98
  "@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
99
- "@genesislcap/expression-builder": "15.71.0",
100
- "@genesislcap/foundation-ai": "15.71.0",
101
- "@genesislcap/foundation-comms": "15.71.0",
102
- "@genesislcap/foundation-criteria": "15.71.0",
103
- "@genesislcap/foundation-errors": "15.71.0",
104
- "@genesislcap/foundation-events": "15.71.0",
105
- "@genesislcap/foundation-logger": "15.71.0",
106
- "@genesislcap/foundation-notifications": "15.71.0",
107
- "@genesislcap/foundation-user": "15.71.0",
108
- "@genesislcap/foundation-utils": "15.71.0",
99
+ "@genesislcap/expression-builder": "15.72.0-FUI-2629.7",
100
+ "@genesislcap/foundation-ai": "15.72.0-FUI-2629.7",
101
+ "@genesislcap/foundation-comms": "15.72.0-FUI-2629.7",
102
+ "@genesislcap/foundation-criteria": "15.72.0-FUI-2629.7",
103
+ "@genesislcap/foundation-errors": "15.72.0-FUI-2629.7",
104
+ "@genesislcap/foundation-events": "15.72.0-FUI-2629.7",
105
+ "@genesislcap/foundation-logger": "15.72.0-FUI-2629.7",
106
+ "@genesislcap/foundation-notifications": "15.72.0-FUI-2629.7",
107
+ "@genesislcap/foundation-user": "15.72.0-FUI-2629.7",
108
+ "@genesislcap/foundation-utils": "15.72.0-FUI-2629.7",
109
109
  "@microsoft/fast-colors": "5.3.1",
110
110
  "@microsoft/fast-components": "2.30.6",
111
111
  "@microsoft/fast-element": "1.14.0",