ezfw-core 1.0.48 → 1.0.50

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.
@@ -7,6 +7,7 @@ const cls = cx(styles);
7
7
 
8
8
  declare const ez: {
9
9
  _createElement(config: unknown): Promise<HTMLElement>;
10
+ getControllerSync(name: string): { state: Record<string, unknown>; [key: string]: unknown } | null;
10
11
  };
11
12
 
12
13
  export interface EzInputConfig extends EzBaseComponentConfig {
@@ -156,11 +157,18 @@ export class EzInput extends EzBaseComponent {
156
157
  }
157
158
 
158
159
  // Handle onEnter
159
- if (cfg.onEnter && typeof cfg.onEnter === 'function') {
160
- const onEnterFn = cfg.onEnter;
160
+ if (cfg.onEnter) {
161
161
  this._input.addEventListener('keydown', e => {
162
162
  if (e.key === 'Enter') {
163
- onEnterFn(this._input!.value);
163
+ if (typeof cfg.onEnter === 'function') {
164
+ cfg.onEnter(this._input!.value);
165
+ } else if (typeof cfg.onEnter === 'string' && cfg.controller) {
166
+ const ctrl = ez.getControllerSync(cfg.controller);
167
+ const method = ctrl?.[cfg.onEnter];
168
+ if (typeof method === 'function') {
169
+ (method as (value: string) => void).call(ctrl, this._input!.value);
170
+ }
171
+ }
164
172
  }
165
173
  });
166
174
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezfw-core",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
4
4
  "description": "Ez Framework - A declarative component framework for building modern web applications",
5
5
  "type": "module",
6
6
  "main": "./core/ez.ts",
@@ -385,12 +385,20 @@ body {
385
385
  --ez-surface-active: #475569;
386
386
  --ez-surface-raised: #1e293b;
387
387
 
388
+ // Backward compatibility aliases
389
+ --ez-surface-primary: #0f172a;
390
+ --ez-surface-secondary: #1e293b;
391
+ --ez-surface-tertiary: #334155;
392
+
388
393
  --ez-text: #f8fafc;
394
+ --ez-text-primary: #f8fafc;
389
395
  --ez-text-secondary: #94a3b8;
396
+ --ez-text-tertiary: #64748b;
390
397
  --ez-text-muted: #64748b;
391
398
  --ez-muted: #64748b;
392
399
 
393
400
  --ez-border: #334155;
401
+ --ez-border-primary: #334155;
394
402
  --ez-border-light: #1e293b;
395
403
  --ez-border-strong: #475569;
396
404