@genesislcap/foundation-ui 15.75.0 → 15.77.0

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;
@@ -6957,7 +7018,7 @@ export declare interface SetStatesEventDetail {
6957
7018
 
6958
7019
  export declare const sharedFieldStyles: ElementStyles;
6959
7020
 
6960
- export declare const singleOptionTemplate: (prefix: string) => ViewTemplate<ActionsMenu, any>;
7021
+ export declare const singleOptionTemplate: (prefix: string) => ViewTemplate<ActionsMenu>;
6961
7022
 
6962
7023
  /**
6963
7024
  * @tagname %%prefix%%-skeleton
package/dist/react.cjs CHANGED
@@ -118,6 +118,11 @@ const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
118
118
  return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
119
119
  });
120
120
 
121
+ const Accordion = React.forwardRef(function Accordion(props, ref) {
122
+ const { children, ...rest } = props;
123
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
124
+ });
125
+
121
126
  const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
122
127
  const { children, ...rest } = props;
123
128
  return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
@@ -145,11 +150,6 @@ const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref)
145
150
  return React.createElement(customElements.getName(AiCriteriaSearchWC) ?? '%%prefix%%-ai-criteria-search', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
146
151
  });
147
152
 
148
- const Accordion = React.forwardRef(function Accordion(props, ref) {
149
- const { children, ...rest } = props;
150
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
151
- });
152
-
153
153
  const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
154
154
  const { children, ...rest } = props;
155
155
  return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
@@ -1144,9 +1144,9 @@ const WeeklyRecurrence = React.forwardRef(function WeeklyRecurrence(props, ref)
1144
1144
 
1145
1145
  module.exports = {
1146
1146
  AccordionItem,
1147
+ Accordion,
1147
1148
  ActionsMenu,
1148
1149
  AiCriteriaSearch,
1149
- Accordion,
1150
1150
  AiIndicator,
1151
1151
  Anchor,
1152
1152
  AnchoredRegion,
package/dist/react.mjs CHANGED
@@ -116,6 +116,11 @@ export const AccordionItem = React.forwardRef(function AccordionItem(props, ref)
116
116
  return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
117
117
  });
118
118
 
119
+ export const Accordion = React.forwardRef(function Accordion(props, ref) {
120
+ const { children, ...rest } = props;
121
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
122
+ });
123
+
119
124
  export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
120
125
  const { children, ...rest } = props;
121
126
  return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
@@ -143,11 +148,6 @@ export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props
143
148
  return React.createElement(customElements.getName(AiCriteriaSearchWC) ?? '%%prefix%%-ai-criteria-search', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
144
149
  });
145
150
 
146
- export const Accordion = React.forwardRef(function Accordion(props, ref) {
147
- const { children, ...rest } = props;
148
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
149
- });
150
-
151
151
  export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
152
152
  const { children, ...rest } = props;
153
153
  return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...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.75.0",
4
+ "version": "15.77.0",
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.75.0",
86
- "@genesislcap/genx": "15.75.0",
87
- "@genesislcap/ts-builder": "15.75.0",
88
- "@genesislcap/uvu-playwright-builder": "15.75.0",
89
- "@genesislcap/vite-builder": "15.75.0",
90
- "@genesislcap/webpack-builder": "15.75.0",
85
+ "@genesislcap/foundation-testing": "15.77.0",
86
+ "@genesislcap/genx": "15.77.0",
87
+ "@genesislcap/ts-builder": "15.77.0",
88
+ "@genesislcap/uvu-playwright-builder": "15.77.0",
89
+ "@genesislcap/vite-builder": "15.77.0",
90
+ "@genesislcap/webpack-builder": "15.77.0",
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.75.0",
100
- "@genesislcap/foundation-ai": "15.75.0",
101
- "@genesislcap/foundation-comms": "15.75.0",
102
- "@genesislcap/foundation-criteria": "15.75.0",
103
- "@genesislcap/foundation-errors": "15.75.0",
104
- "@genesislcap/foundation-events": "15.75.0",
105
- "@genesislcap/foundation-logger": "15.75.0",
106
- "@genesislcap/foundation-notifications": "15.75.0",
107
- "@genesislcap/foundation-user": "15.75.0",
108
- "@genesislcap/foundation-utils": "15.75.0",
99
+ "@genesislcap/expression-builder": "15.77.0",
100
+ "@genesislcap/foundation-ai": "15.77.0",
101
+ "@genesislcap/foundation-comms": "15.77.0",
102
+ "@genesislcap/foundation-criteria": "15.77.0",
103
+ "@genesislcap/foundation-errors": "15.77.0",
104
+ "@genesislcap/foundation-events": "15.77.0",
105
+ "@genesislcap/foundation-logger": "15.77.0",
106
+ "@genesislcap/foundation-notifications": "15.77.0",
107
+ "@genesislcap/foundation-user": "15.77.0",
108
+ "@genesislcap/foundation-utils": "15.77.0",
109
109
  "@microsoft/fast-colors": "5.3.1",
110
110
  "@microsoft/fast-components": "2.30.6",
111
111
  "@microsoft/fast-element": "1.14.0",