@genesislcap/foundation-ui 15.15.0 → 15.15.1

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.
@@ -29,6 +29,7 @@ export declare class NumberField extends NumberField_base {
29
29
  stepDown(): void;
30
30
  hasSeparatorWithoutDecimals(): RegExp;
31
31
  private restoreControlToCommittedValue;
32
+ handleKeyDown(e: KeyboardEvent): boolean;
32
33
  handleTextInput(): void;
33
34
  valueChanged(previous: any, next: any): void;
34
35
  handleBlur(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"number-field.d.ts","sourceRoot":"","sources":["../../../src/number-field/number-field.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;;;;;;;;;;;AAoBrE;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,gBAA2B;IACpD,YAAY,EAAE,MAAM,CAAS;IACnC,OAAO,CAAC,mBAAmB;IAKA,QAAQ,EAAE,OAAO,CAAS;IAQrD,KAAK,EAAE,MAAM,CAAM;IACQ,cAAc,EAAE,OAAO,CAAS;IACrD,MAAM,EAAE,MAAM,CAAW;IACJ,iBAAiB,EAAE,OAAO,CAAS;IACxD,qBAAqB,EAAE,MAAM,CAAuB;IAE1D,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAG/B;IAEF,MAAM,IAAI,IAAI;IAuCd,QAAQ,IAAI,IAAI;IA0ChB,2BAA2B;IAK3B,OAAO,CAAC,8BAA8B;IAetC,eAAe,IAAI,IAAI;IA+DvB,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI;IAqC5C,UAAU,IAAI,IAAI;CA4BnB;AAED,eAAO,MAAM,kCAAkC,EAAE,cAGhD,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;CAWpC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,oTAMhC,CAAC"}
1
+ {"version":3,"file":"number-field.d.ts","sourceRoot":"","sources":["../../../src/number-field/number-field.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;;;;;;;;;;;AAqBrE;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,gBAA2B;IACpD,YAAY,EAAE,MAAM,CAAS;IACnC,OAAO,CAAC,mBAAmB;IAKA,QAAQ,EAAE,OAAO,CAAS;IAQrD,KAAK,EAAE,MAAM,CAAM;IACQ,cAAc,EAAE,OAAO,CAAS;IACrD,MAAM,EAAE,MAAM,CAAW;IACJ,iBAAiB,EAAE,OAAO,CAAS;IACxD,qBAAqB,EAAE,MAAM,CAAuB;IAE1D,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAG/B;IAEF,MAAM,IAAI,IAAI;IAuCd,QAAQ,IAAI,IAAI;IA0ChB,2BAA2B;IAK3B,OAAO,CAAC,8BAA8B;IAetC,aAAa,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO;IAOxC,eAAe,IAAI,IAAI;IA+DvB,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI;IAsC5C,UAAU,IAAI,IAAI;CA4BnB;AAED,eAAO,MAAM,kCAAkC,EAAE,cAGhD,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;CAWpC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,oTAMhC,CAAC"}
@@ -133,6 +133,15 @@ interface HTMLWCProps extends React.AriaAttributes {
133
133
  onInput?(e: Event): void;
134
134
  }
135
135
 
136
+ export declare const AccordionItem: React.ForwardRefExoticComponent<
137
+ React.PropsWithChildren<
138
+ Omit<PublicOf<AccordionItemWC>, 'children' | 'style'> &
139
+ HTMLWCProps & {
140
+ }
141
+ > & React.RefAttributes<AccordionItemWC>
142
+ >;
143
+ export type AccordionItemRef = AccordionItemWC;
144
+
136
145
  export declare const ActionsMenu: React.ForwardRefExoticComponent<
137
146
  React.PropsWithChildren<
138
147
  Omit<PublicOf<ActionsMenuWC>, 'children' | 'style'> &
@@ -142,14 +151,14 @@ export declare const ActionsMenu: React.ForwardRefExoticComponent<
142
151
  >;
143
152
  export type ActionsMenuRef = ActionsMenuWC;
144
153
 
145
- export declare const AccordionItem: React.ForwardRefExoticComponent<
154
+ export declare const Accordion: React.ForwardRefExoticComponent<
146
155
  React.PropsWithChildren<
147
- Omit<PublicOf<AccordionItemWC>, 'children' | 'style'> &
156
+ Omit<PublicOf<AccordionWC>, 'children' | 'style'> &
148
157
  HTMLWCProps & {
149
158
  }
150
- > & React.RefAttributes<AccordionItemWC>
159
+ > & React.RefAttributes<AccordionWC>
151
160
  >;
152
- export type AccordionItemRef = AccordionItemWC;
161
+ export type AccordionRef = AccordionWC;
153
162
 
154
163
  export declare const AiCriteriaSearch: React.ForwardRefExoticComponent<
155
164
  React.PropsWithChildren<
@@ -171,15 +180,6 @@ export declare const AiIndicator: React.ForwardRefExoticComponent<
171
180
  >;
172
181
  export type AiIndicatorRef = AiIndicatorWC;
173
182
 
174
- export declare const Accordion: React.ForwardRefExoticComponent<
175
- React.PropsWithChildren<
176
- Omit<PublicOf<AccordionWC>, 'children' | 'style'> &
177
- HTMLWCProps & {
178
- }
179
- > & React.RefAttributes<AccordionWC>
180
- >;
181
- export type AccordionRef = AccordionWC;
182
-
183
183
  export declare const Anchor: React.ForwardRefExoticComponent<
184
184
  React.PropsWithChildren<
185
185
  Omit<PublicOf<AnchorWC>, 'children' | 'style'> &
@@ -2,6 +2,7 @@ import { __decorate } from "tslib";
2
2
  import { NumberParser } from '@genesislcap/foundation-utils';
3
3
  import { NumberField as FASTNumberField } from '@microsoft/fast-components';
4
4
  import { DOM, attr } from '@microsoft/fast-element';
5
+ import { keyEnter } from '@microsoft/fast-web-utilities';
5
6
  import { AffixMixin } from '../_common';
6
7
  import { foundationNumberFieldStyles as styles } from './number-field.styles';
7
8
  import { foundationNumberFieldTemplate as template } from './number-field.template';
@@ -109,6 +110,12 @@ export class NumberField extends AffixMixin(FASTNumberField) {
109
110
  : formatControlValue(String(previousValue), this.locale);
110
111
  this['isUserInput'] = false;
111
112
  }
113
+ handleKeyDown(e) {
114
+ if (e.key === keyEnter) {
115
+ this['isUserInput'] = false;
116
+ }
117
+ return super.handleKeyDown(e);
118
+ }
112
119
  handleTextInput() {
113
120
  if (!this.control)
114
121
  return;
@@ -174,7 +181,8 @@ export class NumberField extends AffixMixin(FASTNumberField) {
174
181
  });
175
182
  return;
176
183
  }
177
- // While the user is typing, handleTextInput (and handleBlur on exit) own value + display.
184
+ // While the user is typing, handleTextInput owns value + display; handleBlur and
185
+ // handleKeyDown (Enter) both clear isUserInput to release that ownership on commit.
178
186
  return;
179
187
  }
180
188
  }
@@ -58330,6 +58330,55 @@
58330
58330
  "isAbstract": false,
58331
58331
  "name": "handleBlur"
58332
58332
  },
58333
+ {
58334
+ "kind": "Method",
58335
+ "canonicalReference": "@genesislcap/foundation-ui!NumberField#handleKeyDown:member(1)",
58336
+ "docComment": "",
58337
+ "excerptTokens": [
58338
+ {
58339
+ "kind": "Content",
58340
+ "text": "handleKeyDown(e: "
58341
+ },
58342
+ {
58343
+ "kind": "Reference",
58344
+ "text": "KeyboardEvent",
58345
+ "canonicalReference": "!KeyboardEvent:interface"
58346
+ },
58347
+ {
58348
+ "kind": "Content",
58349
+ "text": "): "
58350
+ },
58351
+ {
58352
+ "kind": "Content",
58353
+ "text": "boolean"
58354
+ },
58355
+ {
58356
+ "kind": "Content",
58357
+ "text": ";"
58358
+ }
58359
+ ],
58360
+ "isStatic": false,
58361
+ "returnTypeTokenRange": {
58362
+ "startIndex": 3,
58363
+ "endIndex": 4
58364
+ },
58365
+ "releaseTag": "Public",
58366
+ "isProtected": false,
58367
+ "overloadIndex": 1,
58368
+ "parameters": [
58369
+ {
58370
+ "parameterName": "e",
58371
+ "parameterTypeTokenRange": {
58372
+ "startIndex": 1,
58373
+ "endIndex": 2
58374
+ },
58375
+ "isOptional": false
58376
+ }
58377
+ ],
58378
+ "isOptional": false,
58379
+ "isAbstract": false,
58380
+ "name": "handleKeyDown"
58381
+ },
58333
58382
  {
58334
58383
  "kind": "Method",
58335
58384
  "canonicalReference": "@genesislcap/foundation-ui!NumberField#handleTextInput:member(1)",
@@ -5842,6 +5842,7 @@ export declare class NumberField extends NumberField_base {
5842
5842
  stepDown(): void;
5843
5843
  hasSeparatorWithoutDecimals(): RegExp;
5844
5844
  private restoreControlToCommittedValue;
5845
+ handleKeyDown(e: KeyboardEvent): boolean;
5845
5846
  handleTextInput(): void;
5846
5847
  valueChanged(previous: any, next: any): void;
5847
5848
  handleBlur(): void;
package/dist/react.cjs CHANGED
@@ -113,14 +113,19 @@ function _mergeRefs(...refs) {
113
113
  };
114
114
  }
115
115
 
116
+ const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
117
+ const { children, ...rest } = props;
118
+ return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
119
+ });
120
+
116
121
  const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
117
122
  const { children, ...rest } = props;
118
123
  return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
119
124
  });
120
125
 
121
- const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
126
+ const Accordion = React.forwardRef(function Accordion(props, ref) {
122
127
  const { children, ...rest } = props;
123
- return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
128
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
124
129
  });
125
130
 
126
131
  const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
@@ -150,11 +155,6 @@ const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
150
155
  return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
151
156
  });
152
157
 
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
- ActionsMenu,
1147
1146
  AccordionItem,
1147
+ ActionsMenu,
1148
+ Accordion,
1148
1149
  AiCriteriaSearch,
1149
1150
  AiIndicator,
1150
- Accordion,
1151
1151
  Anchor,
1152
1152
  AnchoredRegion,
1153
1153
  Avatar,
package/dist/react.mjs CHANGED
@@ -111,14 +111,19 @@ function _mergeRefs(...refs) {
111
111
  };
112
112
  }
113
113
 
114
+ export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
115
+ const { children, ...rest } = props;
116
+ return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
117
+ });
118
+
114
119
  export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
115
120
  const { children, ...rest } = props;
116
121
  return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
117
122
  });
118
123
 
119
- export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
124
+ export const Accordion = React.forwardRef(function Accordion(props, ref) {
120
125
  const { children, ...rest } = props;
121
- return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
126
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
122
127
  });
123
128
 
124
129
  export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
@@ -148,11 +153,6 @@ export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
148
153
  return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
149
154
  });
150
155
 
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.15.0",
4
+ "version": "15.15.1",
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.15.0",
89
- "@genesislcap/genx": "15.15.0",
90
- "@genesislcap/rollup-builder": "15.15.0",
91
- "@genesislcap/ts-builder": "15.15.0",
92
- "@genesislcap/uvu-playwright-builder": "15.15.0",
93
- "@genesislcap/vite-builder": "15.15.0",
94
- "@genesislcap/webpack-builder": "15.15.0",
88
+ "@genesislcap/foundation-testing": "15.15.1",
89
+ "@genesislcap/genx": "15.15.1",
90
+ "@genesislcap/rollup-builder": "15.15.1",
91
+ "@genesislcap/ts-builder": "15.15.1",
92
+ "@genesislcap/uvu-playwright-builder": "15.15.1",
93
+ "@genesislcap/vite-builder": "15.15.1",
94
+ "@genesislcap/webpack-builder": "15.15.1",
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.15.0",
104
- "@genesislcap/foundation-ai": "15.15.0",
105
- "@genesislcap/foundation-comms": "15.15.0",
106
- "@genesislcap/foundation-criteria": "15.15.0",
107
- "@genesislcap/foundation-errors": "15.15.0",
108
- "@genesislcap/foundation-events": "15.15.0",
109
- "@genesislcap/foundation-logger": "15.15.0",
110
- "@genesislcap/foundation-notifications": "15.15.0",
111
- "@genesislcap/foundation-user": "15.15.0",
112
- "@genesislcap/foundation-utils": "15.15.0",
103
+ "@genesislcap/expression-builder": "15.15.1",
104
+ "@genesislcap/foundation-ai": "15.15.1",
105
+ "@genesislcap/foundation-comms": "15.15.1",
106
+ "@genesislcap/foundation-criteria": "15.15.1",
107
+ "@genesislcap/foundation-errors": "15.15.1",
108
+ "@genesislcap/foundation-events": "15.15.1",
109
+ "@genesislcap/foundation-logger": "15.15.1",
110
+ "@genesislcap/foundation-notifications": "15.15.1",
111
+ "@genesislcap/foundation-user": "15.15.1",
112
+ "@genesislcap/foundation-utils": "15.15.1",
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": "6cb5a251c9b3e1bf509fece8db32acdc1d4c747b"
145
+ "gitHead": "773a578497ada0a9cee047399defa317c2982940"
146
146
  }