@superleapai/flow-ui 2.5.4 → 2.5.6

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.
package/core/flow.js CHANGED
@@ -386,10 +386,13 @@
386
386
  * @param {Function} config.onChange - Optional change handler
387
387
  * @param {boolean} config.disabled - Whether time picker is disabled
388
388
  * @param {boolean} config.use24Hour - Use 24-hour format (default: false, i.e. 12-hour AM/PM)
389
+ * @param {string} [config.size] - 'default' | 'small' | 'large'
390
+ * @param {string} [config.variant] - 'default' | 'error' | 'warning' | 'success' | 'borderless' | 'inline'
391
+ * @param {string} [config.helpText] - Optional help text for tooltip
389
392
  * @returns {HTMLElement} Field element
390
393
  */
391
394
  function createTimePicker(config) {
392
- const { label, fieldId, value: initialValue, placeholder, required = false, onChange, disabled = false, use24Hour = false, helpText = null } = config;
395
+ const { label, fieldId, value: initialValue, placeholder, required = false, onChange, disabled = false, use24Hour = false, size, variant, helpText = null } = config;
393
396
 
394
397
  const field = createFieldWrapper(label, required, helpText);
395
398
 
@@ -402,6 +405,8 @@
402
405
  placeholder: placeholder || `Select ${label}`,
403
406
  disabled,
404
407
  use24Hour,
408
+ size,
409
+ variant,
405
410
  onChange: (value) => {
406
411
  set(fieldId, value);
407
412
  if (onChange) { onChange(value); }
@@ -441,6 +446,7 @@
441
446
  * @param {12|24} config.hourCycle - 12 or 24 hour format
442
447
  * @param {string} config.granularity - 'day' | 'hour' | 'minute' | 'second'
443
448
  * @param {string} config.size - 'small' | 'default' | 'large'
449
+ * @param {string} [config.variant] - 'default' | 'error' | 'warning' | 'success' | 'borderless' | 'inline'
444
450
  * @param {Date} config.fromDate - Min selectable date
445
451
  * @param {Date} config.toDate - Max selectable date
446
452
  * @param {string} config.helpText - Optional help text for tooltip
@@ -458,6 +464,7 @@
458
464
  hourCycle = 12,
459
465
  granularity = "minute",
460
466
  size = "default",
467
+ variant,
461
468
  fromDate,
462
469
  toDate,
463
470
  helpText = null,
@@ -488,6 +495,7 @@
488
495
  hourCycle,
489
496
  granularity,
490
497
  size,
498
+ variant,
491
499
  fromDate,
492
500
  toDate,
493
501
  onChange: (date) => {