@genesislcap/foundation-ui 15.0.0 → 15.1.0-FUI-2567.3

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.
@@ -95,6 +95,7 @@ import { foregroundOnAccentHover } from '@microsoft/fast-components';
95
95
  import { foregroundOnAccentHoverLarge } from '@microsoft/fast-components';
96
96
  import { foregroundOnAccentRest } from '@microsoft/fast-components';
97
97
  import { foregroundOnAccentRestLarge } from '@microsoft/fast-components';
98
+ import { FormAssociated } from '@microsoft/fast-foundation';
98
99
  import { FoundationAnalytics } from '@genesislcap/foundation-comms';
99
100
  import { dataGridCellTemplate as foundationDataGridCellTemplate } from '@microsoft/fast-foundation';
100
101
  import { dataGridRowTemplate as foundationDataGridRowTemplate } from '@microsoft/fast-foundation';
@@ -872,6 +873,17 @@ export declare const baseComponents: {
872
873
  foundationTreeItem: (overrideDefinition?: OverrideFoundationElementDefinition<TreeItemOptions>) => FoundationElementRegistry<TreeItemOptions, Constructable<FoundationElement>>;
873
874
  foundationTreeView: (overrideDefinition?: OverrideFoundationElementDefinition<FoundationElementDefinition>) => FoundationElementRegistry<FoundationElementDefinition, TreeView>;
874
875
  foundationUrlInput: (overrideDefinition?: OverrideFoundationElementDefinition<FoundationElementDefinition>) => FoundationElementRegistry<FoundationElementDefinition, UrlInput>;
876
+ foundationVerificationCodeInput: (overrideDefinition?: OverrideFoundationElementDefinition< {
877
+ baseName: string;
878
+ template: ViewTemplate<VerificationCodeInput, any>;
879
+ styles: ElementStyles;
880
+ shadowOptions: ShadowRootInit;
881
+ }>) => FoundationElementRegistry< {
882
+ baseName: string;
883
+ template: ViewTemplate<VerificationCodeInput, any>;
884
+ styles: ElementStyles;
885
+ shadowOptions: ShadowRootInit;
886
+ }, VerificationCodeInput>;
875
887
  foundationSectionNavigator: (overrideDefinition?: OverrideFoundationElementDefinition< {
876
888
  baseName: string;
877
889
  template: ViewTemplate<SectionNavigator, any>;
@@ -2297,6 +2309,8 @@ export declare const defaultTreeViewConfig: {};
2297
2309
 
2298
2310
  export declare const defaultUrlInputConfig: {};
2299
2311
 
2312
+ export declare const defaultVerificationCodeInputConfig: {};
2313
+
2300
2314
  /**
2301
2315
  * Defines a platform custom element based on the provided type and definition.
2302
2316
  *
@@ -5078,6 +5092,31 @@ export declare class FoundationValueExpressionBuilder extends ExpressionBuilder
5078
5092
  dispatchChangeEvent(group: ExpressionBuilderTypes.Group): void;
5079
5093
  }
5080
5094
 
5095
+ /**
5096
+ * The Foundation Verification Code Input
5097
+ *
5098
+ * @public
5099
+ * @remarks
5100
+ * HTML Element: \<foundation-verification-code-input\>
5101
+ */
5102
+ export declare const foundationVerificationCodeInput: (overrideDefinition?: OverrideFoundationElementDefinition< {
5103
+ baseName: string;
5104
+ template: ViewTemplate<VerificationCodeInput, any>;
5105
+ styles: ElementStyles;
5106
+ shadowOptions: ShadowRootInit;
5107
+ }>) => FoundationElementRegistry< {
5108
+ baseName: string;
5109
+ template: ViewTemplate<VerificationCodeInput, any>;
5110
+ styles: ElementStyles;
5111
+ shadowOptions: ShadowRootInit;
5112
+ }, typeof VerificationCodeInput>;
5113
+
5114
+ export declare const foundationVerificationCodeInputShadowOptions: ShadowRootInit;
5115
+
5116
+ export declare const foundationVerificationCodeInputStyles: ElementStyles;
5117
+
5118
+ export declare const foundationVerificationCodeInputTemplate: ViewTemplate<VerificationCodeInput, any>;
5119
+
5081
5120
  /**
5082
5121
  * Converts a server BinaryExpression to a client BinaryOperator
5083
5122
  *
@@ -7530,6 +7569,133 @@ export declare interface ValueChangeEventDetail {
7530
7569
  label: string;
7531
7570
  }
7532
7571
 
7572
+ /**
7573
+ * Multi-digit verification code input for OTP / 2FA flows.
7574
+ *
7575
+ * Form-associated (FAST `FormAssociated`): host `name` / `required` / `value` participate
7576
+ * in native HTML form validation and submission like {@link TextField}.
7577
+ *
7578
+ * @public
7579
+ * @tagname %%prefix%%-verification-code-input
7580
+ *
7581
+ * @fires change - Fired when any digit changes. detail: `VerificationCodeInputEventDetail`
7582
+ * @fires complete - Fired when all digits are filled. detail: `VerificationCodeInputEventDetail`
7583
+ */
7584
+ export declare class VerificationCodeInput extends VerificationCodeInput_base {
7585
+ /**
7586
+ * Proxy element for form association when ElementInternals is unavailable.
7587
+ * Initialized in the constructor (after `super()`) so it exists before attribute
7588
+ * change handlers run — same pattern as FAST `FormAssociatedTextField`.
7589
+ * @internal
7590
+ */
7591
+ proxy: HTMLInputElement;
7592
+ /** Per-digit values indexed from `0` to `digits - 1`. */
7593
+ values: string[];
7594
+ /** Slotted label content; when empty the label is visually hidden. */
7595
+ defaultSlottedNodes: any;
7596
+ private readonly controlListeners;
7597
+ /** Skip digit re-sync when `value` is updated from digit entry (`commitValues`). */
7598
+ private syncingFromDigits;
7599
+ constructor();
7600
+ /**
7601
+ * Optional host id used as a prefix for digit input ids (`{id}-0`, `{id}-1`, …)
7602
+ * and the associated label element.
7603
+ */
7604
+ id: string;
7605
+ /**
7606
+ * Visual treatment applied to each digit field.
7607
+ * @public
7608
+ * @remarks
7609
+ * HTML Attribute: appearance
7610
+ * @defaultValue outline
7611
+ */
7612
+ appearance: string;
7613
+ /**
7614
+ * Number of single-character digit fields to render.
7615
+ * @public
7616
+ * @remarks
7617
+ * HTML Attribute: digits
7618
+ * @defaultValue 6
7619
+ */
7620
+ digits: number;
7621
+ /**
7622
+ * When true, digit fields are non-interactive.
7623
+ * @public
7624
+ * @remarks
7625
+ * HTML Attribute: readonly
7626
+ */
7627
+ readOnly: boolean;
7628
+ /**
7629
+ * When true, focuses the first digit on connect (and after SPA route commit when hosted that way).
7630
+ * @public
7631
+ * @remarks
7632
+ * HTML Attribute: autofocus
7633
+ */
7634
+ autofocus: boolean;
7635
+ /**
7636
+ * When true, applies the error visual state to each digit field.
7637
+ * @public
7638
+ * @remarks
7639
+ * HTML Attribute: error
7640
+ */
7641
+ error: boolean;
7642
+ get digitsIndexes(): number[];
7643
+ get controlIdPrefix(): string;
7644
+ get labelId(): string;
7645
+ get hasLabel(): boolean;
7646
+ getControlId(index: number): string;
7647
+ /** Clears digits, emits `change`, and focuses the first field when connected. */
7648
+ clear(): void;
7649
+ focus(): void;
7650
+ /** @internal */
7651
+ valueChanged(previous: string, next: string): void;
7652
+ /** @internal */
7653
+ validate(anchor?: HTMLElement): void;
7654
+ connectedCallback(): void;
7655
+ disconnectedCallback(): void;
7656
+ digitsChanged(): void;
7657
+ get digitClassnames(): string;
7658
+ private sanitizeCode;
7659
+ private bindControlListeners;
7660
+ private unbindControlListeners;
7661
+ private onKeyDown;
7662
+ private isBlockedCharacter;
7663
+ private onInput;
7664
+ private onPaste;
7665
+ private handleBackspace;
7666
+ private handleDelete;
7667
+ private getIndexFromInput;
7668
+ /** Maps a sanitized code string into per-digit `values` and syncs the DOM when connected. */
7669
+ private syncDigitsFromValue;
7670
+ private updateDigit;
7671
+ private applyDigits;
7672
+ /** Pushes digit state into the form-associated `value` and emits change / complete. */
7673
+ private commitValues;
7674
+ private syncFieldValues;
7675
+ private syncFieldValue;
7676
+ private focusDigit;
7677
+ private get rootNode();
7678
+ private getControlElement;
7679
+ private isComplete;
7680
+ private emitChange;
7681
+ }
7682
+
7683
+ declare class _VerificationCodeInput extends FoundationElement {
7684
+ }
7685
+
7686
+ declare interface _VerificationCodeInput extends FormAssociated {
7687
+ }
7688
+
7689
+ declare const VerificationCodeInput_base: typeof _VerificationCodeInput;
7690
+
7691
+ /**
7692
+ * Detail payload of the `change` and `complete` events.
7693
+ * @public
7694
+ */
7695
+ export declare interface VerificationCodeInputEventDetail {
7696
+ value: string;
7697
+ }
7698
+
7533
7699
  export declare type VerticalAlign = 'baseline' | 'top' | 'middle' | 'bottom' | 'sub' | 'text-top';
7534
7700
 
7535
7701
  export declare type WeeklyConfig = {
package/dist/react.cjs CHANGED
@@ -102,6 +102,7 @@ const { Toolbar: ToolbarWC } = require('./esm/toolbar/toolbar.js');
102
102
  const { Tooltip: TooltipWC } = require('./esm/tooltip/tooltip.js');
103
103
  const { TreeView: TreeViewWC } = require('./esm/tree-view/tree-view.js');
104
104
  const { UrlInput: UrlInputWC } = require('./esm/url-input/url-input.js');
105
+ const { VerificationCodeInput: VerificationCodeInputWC } = require('./esm/verification-code-input/verification-code-input.js');
105
106
 
106
107
  function _mergeRefs(...refs) {
107
108
  return (value) => {
@@ -122,16 +123,6 @@ const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
122
123
  return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
123
124
  });
124
125
 
125
- const Accordion = React.forwardRef(function Accordion(props, ref) {
126
- const { children, ...rest } = props;
127
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
128
- });
129
-
130
- const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
131
- const { children, ...rest } = props;
132
- return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
133
- });
134
-
135
126
  const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
136
127
  const { onCriteriaChanged, onValidationErrors, children, ...rest } = props;
137
128
  const _innerRef = React.useRef(null);
@@ -154,6 +145,16 @@ const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref)
154
145
  return React.createElement(customElements.getName(AiCriteriaSearchWC) ?? '%%prefix%%-ai-criteria-search', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
155
146
  });
156
147
 
148
+ const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
149
+ const { children, ...rest } = props;
150
+ return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
151
+ });
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
+
157
158
  const Anchor = React.forwardRef(function Anchor(props, ref) {
158
159
  const { children, ...rest } = props;
159
160
  return React.createElement(customElements.getName(AnchorWC) ?? '%%prefix%%-anchor', { ...rest, ref }, children);
@@ -1073,6 +1074,23 @@ const UrlInput = React.forwardRef(function UrlInput(props, ref) {
1073
1074
  return React.createElement(customElements.getName(UrlInputWC) ?? '%%prefix%%-url-input', { ...rest, ref }, children);
1074
1075
  });
1075
1076
 
1077
+ const VerificationCodeInput = React.forwardRef(function VerificationCodeInput(props, ref) {
1078
+ const { onComplete, children, ...rest } = props;
1079
+ const _innerRef = React.useRef(null);
1080
+ const _onCompleteRef = React.useRef(onComplete);
1081
+ _onCompleteRef.current = onComplete;
1082
+ React.useLayoutEffect(() => {
1083
+ const el = _innerRef.current;
1084
+ if (!el) return;
1085
+ const _onCompleteFn = (e) => _onCompleteRef.current?.(e);
1086
+ el.addEventListener('complete', _onCompleteFn);
1087
+ return () => {
1088
+ el.removeEventListener('complete', _onCompleteFn);
1089
+ };
1090
+ }, []);
1091
+ return React.createElement(customElements.getName(VerificationCodeInputWC) ?? '%%prefix%%-verification-code-input', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
1092
+ });
1093
+
1076
1094
  const DailyRecurrence = React.forwardRef(function DailyRecurrence(props, ref) {
1077
1095
  const { onUpdateCronConfig, children, ...rest } = props;
1078
1096
  const _innerRef = React.useRef(null);
@@ -1127,9 +1145,9 @@ const WeeklyRecurrence = React.forwardRef(function WeeklyRecurrence(props, ref)
1127
1145
  module.exports = {
1128
1146
  AccordionItem,
1129
1147
  ActionsMenu,
1130
- Accordion,
1131
- AiIndicator,
1132
1148
  AiCriteriaSearch,
1149
+ AiIndicator,
1150
+ Accordion,
1133
1151
  Anchor,
1134
1152
  AnchoredRegion,
1135
1153
  Avatar,
@@ -1218,6 +1236,7 @@ module.exports = {
1218
1236
  Tooltip,
1219
1237
  TreeView,
1220
1238
  UrlInput,
1239
+ VerificationCodeInput,
1221
1240
  DailyRecurrence,
1222
1241
  MonthlyYearlyRecurrence,
1223
1242
  WeeklyRecurrence,
package/dist/react.mjs CHANGED
@@ -100,6 +100,7 @@ import { Toolbar as ToolbarWC } from './esm/toolbar/toolbar.js';
100
100
  import { Tooltip as TooltipWC } from './esm/tooltip/tooltip.js';
101
101
  import { TreeView as TreeViewWC } from './esm/tree-view/tree-view.js';
102
102
  import { UrlInput as UrlInputWC } from './esm/url-input/url-input.js';
103
+ import { VerificationCodeInput as VerificationCodeInputWC } from './esm/verification-code-input/verification-code-input.js';
103
104
 
104
105
  function _mergeRefs(...refs) {
105
106
  return (value) => {
@@ -120,16 +121,6 @@ export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
120
121
  return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
121
122
  });
122
123
 
123
- export const Accordion = React.forwardRef(function Accordion(props, ref) {
124
- const { children, ...rest } = props;
125
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
126
- });
127
-
128
- export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
129
- const { children, ...rest } = props;
130
- return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
131
- });
132
-
133
124
  export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
134
125
  const { onCriteriaChanged, onValidationErrors, children, ...rest } = props;
135
126
  const _innerRef = React.useRef(null);
@@ -152,6 +143,16 @@ export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props
152
143
  return React.createElement(customElements.getName(AiCriteriaSearchWC) ?? '%%prefix%%-ai-criteria-search', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
153
144
  });
154
145
 
146
+ export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
147
+ const { children, ...rest } = props;
148
+ return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
149
+ });
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
+
155
156
  export const Anchor = React.forwardRef(function Anchor(props, ref) {
156
157
  const { children, ...rest } = props;
157
158
  return React.createElement(customElements.getName(AnchorWC) ?? '%%prefix%%-anchor', { ...rest, ref }, children);
@@ -1071,6 +1072,23 @@ export const UrlInput = React.forwardRef(function UrlInput(props, ref) {
1071
1072
  return React.createElement(customElements.getName(UrlInputWC) ?? '%%prefix%%-url-input', { ...rest, ref }, children);
1072
1073
  });
1073
1074
 
1075
+ export const VerificationCodeInput = React.forwardRef(function VerificationCodeInput(props, ref) {
1076
+ const { onComplete, children, ...rest } = props;
1077
+ const _innerRef = React.useRef(null);
1078
+ const _onCompleteRef = React.useRef(onComplete);
1079
+ _onCompleteRef.current = onComplete;
1080
+ React.useLayoutEffect(() => {
1081
+ const el = _innerRef.current;
1082
+ if (!el) return;
1083
+ const _onCompleteFn = (e) => _onCompleteRef.current?.(e);
1084
+ el.addEventListener('complete', _onCompleteFn);
1085
+ return () => {
1086
+ el.removeEventListener('complete', _onCompleteFn);
1087
+ };
1088
+ }, []);
1089
+ return React.createElement(customElements.getName(VerificationCodeInputWC) ?? '%%prefix%%-verification-code-input', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
1090
+ });
1091
+
1074
1092
  export const DailyRecurrence = React.forwardRef(function DailyRecurrence(props, ref) {
1075
1093
  const { onUpdateCronConfig, children, ...rest } = props;
1076
1094
  const _innerRef = React.useRef(null);
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.0.0",
4
+ "version": "15.1.0-FUI-2567.3",
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.0.0",
89
- "@genesislcap/genx": "15.0.0",
90
- "@genesislcap/rollup-builder": "15.0.0",
91
- "@genesislcap/ts-builder": "15.0.0",
92
- "@genesislcap/uvu-playwright-builder": "15.0.0",
93
- "@genesislcap/vite-builder": "15.0.0",
94
- "@genesislcap/webpack-builder": "15.0.0",
88
+ "@genesislcap/foundation-testing": "15.1.0-FUI-2567.3",
89
+ "@genesislcap/genx": "15.1.0-FUI-2567.3",
90
+ "@genesislcap/rollup-builder": "15.1.0-FUI-2567.3",
91
+ "@genesislcap/ts-builder": "15.1.0-FUI-2567.3",
92
+ "@genesislcap/uvu-playwright-builder": "15.1.0-FUI-2567.3",
93
+ "@genesislcap/vite-builder": "15.1.0-FUI-2567.3",
94
+ "@genesislcap/webpack-builder": "15.1.0-FUI-2567.3",
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.0.0",
104
- "@genesislcap/foundation-ai": "15.0.0",
105
- "@genesislcap/foundation-comms": "15.0.0",
106
- "@genesislcap/foundation-criteria": "15.0.0",
107
- "@genesislcap/foundation-errors": "15.0.0",
108
- "@genesislcap/foundation-events": "15.0.0",
109
- "@genesislcap/foundation-logger": "15.0.0",
110
- "@genesislcap/foundation-notifications": "15.0.0",
111
- "@genesislcap/foundation-user": "15.0.0",
112
- "@genesislcap/foundation-utils": "15.0.0",
103
+ "@genesislcap/expression-builder": "15.1.0-FUI-2567.3",
104
+ "@genesislcap/foundation-ai": "15.1.0-FUI-2567.3",
105
+ "@genesislcap/foundation-comms": "15.1.0-FUI-2567.3",
106
+ "@genesislcap/foundation-criteria": "15.1.0-FUI-2567.3",
107
+ "@genesislcap/foundation-errors": "15.1.0-FUI-2567.3",
108
+ "@genesislcap/foundation-events": "15.1.0-FUI-2567.3",
109
+ "@genesislcap/foundation-logger": "15.1.0-FUI-2567.3",
110
+ "@genesislcap/foundation-notifications": "15.1.0-FUI-2567.3",
111
+ "@genesislcap/foundation-user": "15.1.0-FUI-2567.3",
112
+ "@genesislcap/foundation-utils": "15.1.0-FUI-2567.3",
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": "035852ede9f26ea4434f1b3dfaff98db41490246"
145
+ "gitHead": "7ca16e74cbe5ce3f8503756bb708162eb7246897"
146
146
  }