@almadar/ui 4.4.0 → 4.5.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.
@@ -7147,7 +7147,8 @@ var init_AnimatedCounter = __esm({
7147
7147
  suffix,
7148
7148
  className
7149
7149
  }) => {
7150
- const value = typeof rawValue === "number" && !Number.isNaN(rawValue) ? rawValue : 0;
7150
+ const numericRaw = typeof rawValue === "number" ? rawValue : Number.parseFloat(String(rawValue ?? ""));
7151
+ const value = !Number.isNaN(numericRaw) ? numericRaw : 0;
7151
7152
  const [displayValue, setDisplayValue] = React126.useState(value);
7152
7153
  const previousValueRef = React126.useRef(value);
7153
7154
  const animationFrameRef = React126.useRef(null);
@@ -11265,7 +11266,8 @@ function InputPattern({
11265
11266
  fieldError,
11266
11267
  onChange,
11267
11268
  onBlur,
11268
- className
11269
+ className,
11270
+ fieldName
11269
11271
  }) {
11270
11272
  const { emit } = useEventBus();
11271
11273
  const [localValue, setLocalValue] = React126__namespace.default.useState(value);
@@ -11290,7 +11292,8 @@ function InputPattern({
11290
11292
  error: fieldError,
11291
11293
  onChange: handleChange,
11292
11294
  onBlur: handleBlur,
11293
- className
11295
+ className,
11296
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
11294
11297
  }
11295
11298
  );
11296
11299
  }
@@ -11301,7 +11304,8 @@ function TextareaPattern({
11301
11304
  disabled = false,
11302
11305
  fieldError,
11303
11306
  onChange,
11304
- className
11307
+ className,
11308
+ fieldName
11305
11309
  }) {
11306
11310
  const { emit } = useEventBus();
11307
11311
  const [localValue, setLocalValue] = React126__namespace.default.useState(value);
@@ -11320,7 +11324,8 @@ function TextareaPattern({
11320
11324
  disabled,
11321
11325
  error: fieldError,
11322
11326
  onChange: handleChange,
11323
- className
11327
+ className,
11328
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
11324
11329
  }
11325
11330
  );
11326
11331
  }
@@ -11331,7 +11336,8 @@ function SelectPattern({
11331
11336
  disabled = false,
11332
11337
  fieldError,
11333
11338
  onChange,
11334
- className
11339
+ className,
11340
+ fieldName
11335
11341
  }) {
11336
11342
  const { emit } = useEventBus();
11337
11343
  const [localValue, setLocalValue] = React126__namespace.default.useState(value);
@@ -11350,7 +11356,8 @@ function SelectPattern({
11350
11356
  disabled,
11351
11357
  error: fieldError,
11352
11358
  onChange: handleChange,
11353
- className
11359
+ className,
11360
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
11354
11361
  }
11355
11362
  );
11356
11363
  }
package/dist/avl/index.js CHANGED
@@ -7101,7 +7101,8 @@ var init_AnimatedCounter = __esm({
7101
7101
  suffix,
7102
7102
  className
7103
7103
  }) => {
7104
- const value = typeof rawValue === "number" && !Number.isNaN(rawValue) ? rawValue : 0;
7104
+ const numericRaw = typeof rawValue === "number" ? rawValue : Number.parseFloat(String(rawValue ?? ""));
7105
+ const value = !Number.isNaN(numericRaw) ? numericRaw : 0;
7105
7106
  const [displayValue, setDisplayValue] = useState(value);
7106
7107
  const previousValueRef = useRef(value);
7107
7108
  const animationFrameRef = useRef(null);
@@ -11219,7 +11220,8 @@ function InputPattern({
11219
11220
  fieldError,
11220
11221
  onChange,
11221
11222
  onBlur,
11222
- className
11223
+ className,
11224
+ fieldName
11223
11225
  }) {
11224
11226
  const { emit } = useEventBus();
11225
11227
  const [localValue, setLocalValue] = React126__default.useState(value);
@@ -11244,7 +11246,8 @@ function InputPattern({
11244
11246
  error: fieldError,
11245
11247
  onChange: handleChange,
11246
11248
  onBlur: handleBlur,
11247
- className
11249
+ className,
11250
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
11248
11251
  }
11249
11252
  );
11250
11253
  }
@@ -11255,7 +11258,8 @@ function TextareaPattern({
11255
11258
  disabled = false,
11256
11259
  fieldError,
11257
11260
  onChange,
11258
- className
11261
+ className,
11262
+ fieldName
11259
11263
  }) {
11260
11264
  const { emit } = useEventBus();
11261
11265
  const [localValue, setLocalValue] = React126__default.useState(value);
@@ -11274,7 +11278,8 @@ function TextareaPattern({
11274
11278
  disabled,
11275
11279
  error: fieldError,
11276
11280
  onChange: handleChange,
11277
- className
11281
+ className,
11282
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
11278
11283
  }
11279
11284
  );
11280
11285
  }
@@ -11285,7 +11290,8 @@ function SelectPattern({
11285
11290
  disabled = false,
11286
11291
  fieldError,
11287
11292
  onChange,
11288
- className
11293
+ className,
11294
+ fieldName
11289
11295
  }) {
11290
11296
  const { emit } = useEventBus();
11291
11297
  const [localValue, setLocalValue] = React126__default.useState(value);
@@ -11304,7 +11310,8 @@ function SelectPattern({
11304
11310
  disabled,
11305
11311
  error: fieldError,
11306
11312
  onChange: handleChange,
11307
- className
11313
+ className,
11314
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
11308
11315
  }
11309
11316
  );
11310
11317
  }
@@ -6,8 +6,8 @@
6
6
  */
7
7
  import React from "react";
8
8
  export interface AnimatedCounterProps {
9
- /** The target number to animate to */
10
- value: number;
9
+ /** The target value to animate to. Strings are parsed numerically (e.g. "500", "99.9"). */
10
+ value: number | string;
11
11
  /** Animation duration in milliseconds */
12
12
  duration?: number;
13
13
  /** Text to display before the number */
@@ -3178,7 +3178,8 @@ var init_AnimatedCounter = __esm({
3178
3178
  suffix,
3179
3179
  className
3180
3180
  }) => {
3181
- const value = typeof rawValue === "number" && !Number.isNaN(rawValue) ? rawValue : 0;
3181
+ const numericRaw = typeof rawValue === "number" ? rawValue : Number.parseFloat(String(rawValue ?? ""));
3182
+ const value = !Number.isNaN(numericRaw) ? numericRaw : 0;
3182
3183
  const [displayValue, setDisplayValue] = React110.useState(value);
3183
3184
  const previousValueRef = React110.useRef(value);
3184
3185
  const animationFrameRef = React110.useRef(null);
@@ -6518,7 +6519,8 @@ function InputPattern({
6518
6519
  fieldError,
6519
6520
  onChange,
6520
6521
  onBlur,
6521
- className
6522
+ className,
6523
+ fieldName
6522
6524
  }) {
6523
6525
  const { emit } = useEventBus();
6524
6526
  const [localValue, setLocalValue] = React110__namespace.default.useState(value);
@@ -6543,7 +6545,8 @@ function InputPattern({
6543
6545
  error: fieldError,
6544
6546
  onChange: handleChange,
6545
6547
  onBlur: handleBlur,
6546
- className
6548
+ className,
6549
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
6547
6550
  }
6548
6551
  );
6549
6552
  }
@@ -6554,7 +6557,8 @@ function TextareaPattern({
6554
6557
  disabled = false,
6555
6558
  fieldError,
6556
6559
  onChange,
6557
- className
6560
+ className,
6561
+ fieldName
6558
6562
  }) {
6559
6563
  const { emit } = useEventBus();
6560
6564
  const [localValue, setLocalValue] = React110__namespace.default.useState(value);
@@ -6573,7 +6577,8 @@ function TextareaPattern({
6573
6577
  disabled,
6574
6578
  error: fieldError,
6575
6579
  onChange: handleChange,
6576
- className
6580
+ className,
6581
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
6577
6582
  }
6578
6583
  );
6579
6584
  }
@@ -6584,7 +6589,8 @@ function SelectPattern({
6584
6589
  disabled = false,
6585
6590
  fieldError,
6586
6591
  onChange,
6587
- className
6592
+ className,
6593
+ fieldName
6588
6594
  }) {
6589
6595
  const { emit } = useEventBus();
6590
6596
  const [localValue, setLocalValue] = React110__namespace.default.useState(value);
@@ -6603,7 +6609,8 @@ function SelectPattern({
6603
6609
  disabled,
6604
6610
  error: fieldError,
6605
6611
  onChange: handleChange,
6606
- className
6612
+ className,
6613
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
6607
6614
  }
6608
6615
  );
6609
6616
  }
@@ -3133,7 +3133,8 @@ var init_AnimatedCounter = __esm({
3133
3133
  suffix,
3134
3134
  className
3135
3135
  }) => {
3136
- const value = typeof rawValue === "number" && !Number.isNaN(rawValue) ? rawValue : 0;
3136
+ const numericRaw = typeof rawValue === "number" ? rawValue : Number.parseFloat(String(rawValue ?? ""));
3137
+ const value = !Number.isNaN(numericRaw) ? numericRaw : 0;
3137
3138
  const [displayValue, setDisplayValue] = useState(value);
3138
3139
  const previousValueRef = useRef(value);
3139
3140
  const animationFrameRef = useRef(null);
@@ -6473,7 +6474,8 @@ function InputPattern({
6473
6474
  fieldError,
6474
6475
  onChange,
6475
6476
  onBlur,
6476
- className
6477
+ className,
6478
+ fieldName
6477
6479
  }) {
6478
6480
  const { emit } = useEventBus();
6479
6481
  const [localValue, setLocalValue] = React110__default.useState(value);
@@ -6498,7 +6500,8 @@ function InputPattern({
6498
6500
  error: fieldError,
6499
6501
  onChange: handleChange,
6500
6502
  onBlur: handleBlur,
6501
- className
6503
+ className,
6504
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
6502
6505
  }
6503
6506
  );
6504
6507
  }
@@ -6509,7 +6512,8 @@ function TextareaPattern({
6509
6512
  disabled = false,
6510
6513
  fieldError,
6511
6514
  onChange,
6512
- className
6515
+ className,
6516
+ fieldName
6513
6517
  }) {
6514
6518
  const { emit } = useEventBus();
6515
6519
  const [localValue, setLocalValue] = React110__default.useState(value);
@@ -6528,7 +6532,8 @@ function TextareaPattern({
6528
6532
  disabled,
6529
6533
  error: fieldError,
6530
6534
  onChange: handleChange,
6531
- className
6535
+ className,
6536
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
6532
6537
  }
6533
6538
  );
6534
6539
  }
@@ -6539,7 +6544,8 @@ function SelectPattern({
6539
6544
  disabled = false,
6540
6545
  fieldError,
6541
6546
  onChange,
6542
- className
6547
+ className,
6548
+ fieldName
6543
6549
  }) {
6544
6550
  const { emit } = useEventBus();
6545
6551
  const [localValue, setLocalValue] = React110__default.useState(value);
@@ -6558,7 +6564,8 @@ function SelectPattern({
6558
6564
  disabled,
6559
6565
  error: fieldError,
6560
6566
  onChange: handleChange,
6561
- className
6567
+ className,
6568
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
6562
6569
  }
6563
6570
  );
6564
6571
  }
@@ -6,8 +6,8 @@
6
6
  */
7
7
  import React from 'react';
8
8
  export interface AnimatedCounterProps {
9
- /** Target value to count to (e.g. "500+", "99.9%", "3x") */
10
- value: string;
9
+ /** Target value to count to. Strings allow display formats (e.g. "500+", "99.9%", "3x"); numbers are coerced. */
10
+ value: string | number;
11
11
  /** Label displayed below the number */
12
12
  label: string;
13
13
  /** Animation duration in ms */
@@ -237,11 +237,17 @@ export interface InputPatternProps extends ClosedCircuitProps {
237
237
  onChange?: string;
238
238
  onBlur?: string;
239
239
  className?: string;
240
+ /** Form field name. When the input is rendered inside a form-section's
241
+ * `fields:` array, the runtime injects this from the field config so
242
+ * the rendered DOM input carries `data-field-name="<name>"` and
243
+ * `name="<name>"` — verifier-side automation (e.g. orbital-verify's
244
+ * `fillFormFieldsFromMap`) selects fields by these attributes. */
245
+ fieldName?: string;
240
246
  }
241
247
  /**
242
248
  * Input pattern.
243
249
  */
244
- export declare function InputPattern({ value, placeholder, inputType, disabled, fieldError, onChange, onBlur, className, }: InputPatternProps): React.ReactElement;
250
+ export declare function InputPattern({ value, placeholder, inputType, disabled, fieldError, onChange, onBlur, className, fieldName, }: InputPatternProps): React.ReactElement;
245
251
  export declare namespace InputPattern {
246
252
  var displayName: string;
247
253
  }
@@ -254,11 +260,13 @@ export interface TextareaPatternProps extends ClosedCircuitProps {
254
260
  fieldError?: string;
255
261
  onChange?: string;
256
262
  className?: string;
263
+ /** Form field name — see `InputPatternProps.fieldName`. */
264
+ fieldName?: string;
257
265
  }
258
266
  /**
259
267
  * Textarea pattern.
260
268
  */
261
- export declare function TextareaPattern({ value, placeholder, rows, disabled, fieldError, onChange, className, }: TextareaPatternProps): React.ReactElement;
269
+ export declare function TextareaPattern({ value, placeholder, rows, disabled, fieldError, onChange, className, fieldName, }: TextareaPatternProps): React.ReactElement;
262
270
  export declare namespace TextareaPattern {
263
271
  var displayName: string;
264
272
  }
@@ -274,11 +282,13 @@ export interface SelectPatternProps extends ClosedCircuitProps {
274
282
  fieldError?: string;
275
283
  onChange?: string;
276
284
  className?: string;
285
+ /** Form field name — see `InputPatternProps.fieldName`. */
286
+ fieldName?: string;
277
287
  }
278
288
  /**
279
289
  * Select pattern.
280
290
  */
281
- export declare function SelectPattern({ value, options, placeholder, disabled, fieldError, onChange, className, }: SelectPatternProps): React.ReactElement;
291
+ export declare function SelectPattern({ value, options, placeholder, disabled, fieldError, onChange, className, fieldName, }: SelectPatternProps): React.ReactElement;
282
292
  export declare namespace SelectPattern {
283
293
  var displayName: string;
284
294
  }
@@ -4641,7 +4641,7 @@ var PullQuote = ({
4641
4641
  };
4642
4642
  PullQuote.displayName = "PullQuote";
4643
4643
  function parseValue(value) {
4644
- if (!value) return { num: 0, prefix: "", suffix: "", decimals: 0 };
4644
+ if (value === "" || value == null) return { num: 0, prefix: "", suffix: "", decimals: 0 };
4645
4645
  const match = String(value).match(/^([^0-9]*)([0-9]+(?:\.[0-9]+)?)(.*)$/);
4646
4646
  if (!match) {
4647
4647
  return { num: 0, prefix: "", suffix: String(value), decimals: 0 };
@@ -4668,7 +4668,7 @@ var AnimatedCounter = ({
4668
4668
  const animate = React5.useCallback(() => {
4669
4669
  const { num, prefix, suffix, decimals } = parseValue(value);
4670
4670
  if (num === 0) {
4671
- setDisplayValue(value);
4671
+ setDisplayValue(String(value));
4672
4672
  return;
4673
4673
  }
4674
4674
  const startTime = performance.now();
@@ -4681,7 +4681,7 @@ var AnimatedCounter = ({
4681
4681
  if (progress < 1) {
4682
4682
  requestAnimationFrame(tick);
4683
4683
  } else {
4684
- setDisplayValue(value);
4684
+ setDisplayValue(String(value));
4685
4685
  }
4686
4686
  };
4687
4687
  requestAnimationFrame(tick);
@@ -822,8 +822,8 @@ declare const PullQuote: React.FC<PullQuoteProps>;
822
822
  */
823
823
 
824
824
  interface AnimatedCounterProps {
825
- /** Target value to count to (e.g. "500+", "99.9%", "3x") */
826
- value: string;
825
+ /** Target value to count to. Strings allow display formats (e.g. "500+", "99.9%", "3x"); numbers are coerced. */
826
+ value: string | number;
827
827
  /** Label displayed below the number */
828
828
  label: string;
829
829
  /** Animation duration in ms */
@@ -4617,7 +4617,7 @@ var PullQuote = ({
4617
4617
  };
4618
4618
  PullQuote.displayName = "PullQuote";
4619
4619
  function parseValue(value) {
4620
- if (!value) return { num: 0, prefix: "", suffix: "", decimals: 0 };
4620
+ if (value === "" || value == null) return { num: 0, prefix: "", suffix: "", decimals: 0 };
4621
4621
  const match = String(value).match(/^([^0-9]*)([0-9]+(?:\.[0-9]+)?)(.*)$/);
4622
4622
  if (!match) {
4623
4623
  return { num: 0, prefix: "", suffix: String(value), decimals: 0 };
@@ -4644,7 +4644,7 @@ var AnimatedCounter = ({
4644
4644
  const animate = useCallback(() => {
4645
4645
  const { num, prefix, suffix, decimals } = parseValue(value);
4646
4646
  if (num === 0) {
4647
- setDisplayValue(value);
4647
+ setDisplayValue(String(value));
4648
4648
  return;
4649
4649
  }
4650
4650
  const startTime = performance.now();
@@ -4657,7 +4657,7 @@ var AnimatedCounter = ({
4657
4657
  if (progress < 1) {
4658
4658
  requestAnimationFrame(tick);
4659
4659
  } else {
4660
- setDisplayValue(value);
4660
+ setDisplayValue(String(value));
4661
4661
  }
4662
4662
  };
4663
4663
  requestAnimationFrame(tick);
@@ -3681,7 +3681,8 @@ var init_AnimatedCounter = __esm({
3681
3681
  suffix,
3682
3682
  className
3683
3683
  }) => {
3684
- const value = typeof rawValue === "number" && !Number.isNaN(rawValue) ? rawValue : 0;
3684
+ const numericRaw = typeof rawValue === "number" ? rawValue : Number.parseFloat(String(rawValue ?? ""));
3685
+ const value = !Number.isNaN(numericRaw) ? numericRaw : 0;
3685
3686
  const [displayValue, setDisplayValue] = React115.useState(value);
3686
3687
  const previousValueRef = React115.useRef(value);
3687
3688
  const animationFrameRef = React115.useRef(null);
@@ -8149,7 +8150,8 @@ function InputPattern({
8149
8150
  fieldError,
8150
8151
  onChange,
8151
8152
  onBlur,
8152
- className
8153
+ className,
8154
+ fieldName
8153
8155
  }) {
8154
8156
  const { emit } = useEventBus();
8155
8157
  const [localValue, setLocalValue] = React115__namespace.default.useState(value);
@@ -8174,7 +8176,8 @@ function InputPattern({
8174
8176
  error: fieldError,
8175
8177
  onChange: handleChange,
8176
8178
  onBlur: handleBlur,
8177
- className
8179
+ className,
8180
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8178
8181
  }
8179
8182
  );
8180
8183
  }
@@ -8185,7 +8188,8 @@ function TextareaPattern({
8185
8188
  disabled = false,
8186
8189
  fieldError,
8187
8190
  onChange,
8188
- className
8191
+ className,
8192
+ fieldName
8189
8193
  }) {
8190
8194
  const { emit } = useEventBus();
8191
8195
  const [localValue, setLocalValue] = React115__namespace.default.useState(value);
@@ -8204,7 +8208,8 @@ function TextareaPattern({
8204
8208
  disabled,
8205
8209
  error: fieldError,
8206
8210
  onChange: handleChange,
8207
- className
8211
+ className,
8212
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8208
8213
  }
8209
8214
  );
8210
8215
  }
@@ -8215,7 +8220,8 @@ function SelectPattern({
8215
8220
  disabled = false,
8216
8221
  fieldError,
8217
8222
  onChange,
8218
- className
8223
+ className,
8224
+ fieldName
8219
8225
  }) {
8220
8226
  const { emit } = useEventBus();
8221
8227
  const [localValue, setLocalValue] = React115__namespace.default.useState(value);
@@ -8234,7 +8240,8 @@ function SelectPattern({
8234
8240
  disabled,
8235
8241
  error: fieldError,
8236
8242
  onChange: handleChange,
8237
- className
8243
+ className,
8244
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8238
8245
  }
8239
8246
  );
8240
8247
  }
@@ -3636,7 +3636,8 @@ var init_AnimatedCounter = __esm({
3636
3636
  suffix,
3637
3637
  className
3638
3638
  }) => {
3639
- const value = typeof rawValue === "number" && !Number.isNaN(rawValue) ? rawValue : 0;
3639
+ const numericRaw = typeof rawValue === "number" ? rawValue : Number.parseFloat(String(rawValue ?? ""));
3640
+ const value = !Number.isNaN(numericRaw) ? numericRaw : 0;
3640
3641
  const [displayValue, setDisplayValue] = useState(value);
3641
3642
  const previousValueRef = useRef(value);
3642
3643
  const animationFrameRef = useRef(null);
@@ -8104,7 +8105,8 @@ function InputPattern({
8104
8105
  fieldError,
8105
8106
  onChange,
8106
8107
  onBlur,
8107
- className
8108
+ className,
8109
+ fieldName
8108
8110
  }) {
8109
8111
  const { emit } = useEventBus();
8110
8112
  const [localValue, setLocalValue] = React115__default.useState(value);
@@ -8129,7 +8131,8 @@ function InputPattern({
8129
8131
  error: fieldError,
8130
8132
  onChange: handleChange,
8131
8133
  onBlur: handleBlur,
8132
- className
8134
+ className,
8135
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8133
8136
  }
8134
8137
  );
8135
8138
  }
@@ -8140,7 +8143,8 @@ function TextareaPattern({
8140
8143
  disabled = false,
8141
8144
  fieldError,
8142
8145
  onChange,
8143
- className
8146
+ className,
8147
+ fieldName
8144
8148
  }) {
8145
8149
  const { emit } = useEventBus();
8146
8150
  const [localValue, setLocalValue] = React115__default.useState(value);
@@ -8159,7 +8163,8 @@ function TextareaPattern({
8159
8163
  disabled,
8160
8164
  error: fieldError,
8161
8165
  onChange: handleChange,
8162
- className
8166
+ className,
8167
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8163
8168
  }
8164
8169
  );
8165
8170
  }
@@ -8170,7 +8175,8 @@ function SelectPattern({
8170
8175
  disabled = false,
8171
8176
  fieldError,
8172
8177
  onChange,
8173
- className
8178
+ className,
8179
+ fieldName
8174
8180
  }) {
8175
8181
  const { emit } = useEventBus();
8176
8182
  const [localValue, setLocalValue] = React115__default.useState(value);
@@ -8189,7 +8195,8 @@ function SelectPattern({
8189
8195
  disabled,
8190
8196
  error: fieldError,
8191
8197
  onChange: handleChange,
8192
- className
8198
+ className,
8199
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8193
8200
  }
8194
8201
  );
8195
8202
  }
@@ -4349,7 +4349,8 @@ var init_AnimatedCounter = __esm({
4349
4349
  suffix,
4350
4350
  className
4351
4351
  }) => {
4352
- const value = typeof rawValue === "number" && !Number.isNaN(rawValue) ? rawValue : 0;
4352
+ const numericRaw = typeof rawValue === "number" ? rawValue : Number.parseFloat(String(rawValue ?? ""));
4353
+ const value = !Number.isNaN(numericRaw) ? numericRaw : 0;
4353
4354
  const [displayValue, setDisplayValue] = React115.useState(value);
4354
4355
  const previousValueRef = React115.useRef(value);
4355
4356
  const animationFrameRef = React115.useRef(null);
@@ -8300,7 +8301,8 @@ function InputPattern({
8300
8301
  fieldError,
8301
8302
  onChange,
8302
8303
  onBlur,
8303
- className
8304
+ className,
8305
+ fieldName
8304
8306
  }) {
8305
8307
  const { emit } = useEventBus();
8306
8308
  const [localValue, setLocalValue] = React115__namespace.default.useState(value);
@@ -8325,7 +8327,8 @@ function InputPattern({
8325
8327
  error: fieldError,
8326
8328
  onChange: handleChange,
8327
8329
  onBlur: handleBlur,
8328
- className
8330
+ className,
8331
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8329
8332
  }
8330
8333
  );
8331
8334
  }
@@ -8336,7 +8339,8 @@ function TextareaPattern({
8336
8339
  disabled = false,
8337
8340
  fieldError,
8338
8341
  onChange,
8339
- className
8342
+ className,
8343
+ fieldName
8340
8344
  }) {
8341
8345
  const { emit } = useEventBus();
8342
8346
  const [localValue, setLocalValue] = React115__namespace.default.useState(value);
@@ -8355,7 +8359,8 @@ function TextareaPattern({
8355
8359
  disabled,
8356
8360
  error: fieldError,
8357
8361
  onChange: handleChange,
8358
- className
8362
+ className,
8363
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8359
8364
  }
8360
8365
  );
8361
8366
  }
@@ -8366,7 +8371,8 @@ function SelectPattern({
8366
8371
  disabled = false,
8367
8372
  fieldError,
8368
8373
  onChange,
8369
- className
8374
+ className,
8375
+ fieldName
8370
8376
  }) {
8371
8377
  const { emit } = useEventBus();
8372
8378
  const [localValue, setLocalValue] = React115__namespace.default.useState(value);
@@ -8385,7 +8391,8 @@ function SelectPattern({
8385
8391
  disabled,
8386
8392
  error: fieldError,
8387
8393
  onChange: handleChange,
8388
- className
8394
+ className,
8395
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8389
8396
  }
8390
8397
  );
8391
8398
  }
@@ -4304,7 +4304,8 @@ var init_AnimatedCounter = __esm({
4304
4304
  suffix,
4305
4305
  className
4306
4306
  }) => {
4307
- const value = typeof rawValue === "number" && !Number.isNaN(rawValue) ? rawValue : 0;
4307
+ const numericRaw = typeof rawValue === "number" ? rawValue : Number.parseFloat(String(rawValue ?? ""));
4308
+ const value = !Number.isNaN(numericRaw) ? numericRaw : 0;
4308
4309
  const [displayValue, setDisplayValue] = useState(value);
4309
4310
  const previousValueRef = useRef(value);
4310
4311
  const animationFrameRef = useRef(null);
@@ -8255,7 +8256,8 @@ function InputPattern({
8255
8256
  fieldError,
8256
8257
  onChange,
8257
8258
  onBlur,
8258
- className
8259
+ className,
8260
+ fieldName
8259
8261
  }) {
8260
8262
  const { emit } = useEventBus();
8261
8263
  const [localValue, setLocalValue] = React115__default.useState(value);
@@ -8280,7 +8282,8 @@ function InputPattern({
8280
8282
  error: fieldError,
8281
8283
  onChange: handleChange,
8282
8284
  onBlur: handleBlur,
8283
- className
8285
+ className,
8286
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8284
8287
  }
8285
8288
  );
8286
8289
  }
@@ -8291,7 +8294,8 @@ function TextareaPattern({
8291
8294
  disabled = false,
8292
8295
  fieldError,
8293
8296
  onChange,
8294
- className
8297
+ className,
8298
+ fieldName
8295
8299
  }) {
8296
8300
  const { emit } = useEventBus();
8297
8301
  const [localValue, setLocalValue] = React115__default.useState(value);
@@ -8310,7 +8314,8 @@ function TextareaPattern({
8310
8314
  disabled,
8311
8315
  error: fieldError,
8312
8316
  onChange: handleChange,
8313
- className
8317
+ className,
8318
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8314
8319
  }
8315
8320
  );
8316
8321
  }
@@ -8321,7 +8326,8 @@ function SelectPattern({
8321
8326
  disabled = false,
8322
8327
  fieldError,
8323
8328
  onChange,
8324
- className
8329
+ className,
8330
+ fieldName
8325
8331
  }) {
8326
8332
  const { emit } = useEventBus();
8327
8333
  const [localValue, setLocalValue] = React115__default.useState(value);
@@ -8340,7 +8346,8 @@ function SelectPattern({
8340
8346
  disabled,
8341
8347
  error: fieldError,
8342
8348
  onChange: handleChange,
8343
- className
8349
+ className,
8350
+ ...fieldName !== void 0 && { name: fieldName, "data-field-name": fieldName }
8344
8351
  }
8345
8352
  );
8346
8353
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/components/index.js",