@povio/ui 2.3.0-rc.21 → 2.3.0-rc.23

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.
@@ -306,7 +306,7 @@ var NumberInputBase = (props) => {
306
306
  return t28;
307
307
  };
308
308
  var NumberInputInner = (t0) => {
309
- const $ = c(10);
309
+ const $ = c(9);
310
310
  const { renderStaticInput, isFormControlDisabled, ...props } = t0;
311
311
  const ui = UIConfig.useConfig();
312
312
  const { locale } = useLocale();
@@ -378,23 +378,21 @@ var NumberInputInner = (t0) => {
378
378
  });
379
379
  }
380
380
  const T0 = NumberInputBase;
381
- const t2 = props.value === null || props.value === void 0 ? "empty" : "filled";
382
- const t3 = mergeRefs(props.ref, inputRef);
383
- let t4;
384
- if ($[4] !== T0 || $[5] !== props || $[6] !== shouldFocus || $[7] !== t2 || $[8] !== t3) {
385
- t4 = /* @__PURE__ */ jsx(T0, {
381
+ const t2 = mergeRefs(props.ref, inputRef);
382
+ let t3;
383
+ if ($[4] !== T0 || $[5] !== props || $[6] !== shouldFocus || $[7] !== t2) {
384
+ t3 = /* @__PURE__ */ jsx(T0, {
386
385
  ...props,
387
- ref: t3,
386
+ ref: t2,
388
387
  autoFocusOnMount: shouldFocus
389
- }, t2);
388
+ });
390
389
  $[4] = T0;
391
390
  $[5] = props;
392
391
  $[6] = shouldFocus;
393
392
  $[7] = t2;
394
393
  $[8] = t3;
395
- $[9] = t4;
396
- } else t4 = $[9];
397
- return t4;
394
+ } else t3 = $[8];
395
+ return t3;
398
396
  };
399
397
  var NumberInput = (t0) => {
400
398
  const $ = c(21);
@@ -1,6 +1,5 @@
1
1
  import { UIStyle } from "../../../config/uiStyle.context.js";
2
2
  import { typography } from "../../text/Typography/typography.cva.js";
3
- import { Loader } from "../../status/Loader/Loader.js";
4
3
  import { UIConfig } from "../../../config/uiConfig.context.js";
5
4
  import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButton.js";
6
5
  import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
@@ -14,14 +13,14 @@ import { clsx } from "clsx";
14
13
  import { isValidElement, useId } from "react";
15
14
  //#region src/components/inputs/Skeleton/InputFrame.tsx
16
15
  var InputFrame = (props) => {
17
- const $ = c(182);
16
+ const $ = c(181);
18
17
  const ui = UIConfig.useConfig();
19
18
  const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
20
19
  const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
21
20
  const inputContentWrapperCva = UIStyle.useCva("input.contentWrapperCva", inputContentWrapper);
22
21
  const typographyCva = UIStyle.useCva("typography.cva", typography);
23
22
  const generatedInputId = useId();
24
- const { ref, children, formFieldRef, labelProps: labelPropsProp, headerProps, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isHeaderHidden, hideLabel: hideLabelProp, headerClassName, errorClassName, className, leadingContent, leadingIcon, actionContent, actionContentPlacement: t0, trailingContent, trailingIcon, trailingAction, unit, isLoading, action, isClearable: isClearableProp, showClear, renderStatic, onStaticInteract, clearClassName, onClear, dataAttributes, typographySize, id: idProp, inputClassName, contentClassName, contentWrapperClassName, contentAndTrailingClassName, wrapContentAndTrailing, wrapTrailingContent: t1, labelPlacement: t2, trailingClassName, onMouseEnter, onFocusCapture, variant: variantProp, as: asProp, size: sizeProp } = props;
23
+ const { ref, children, formFieldRef, labelProps: labelPropsProp, headerProps, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isHeaderHidden, hideLabel: hideLabelProp, headerClassName, errorClassName, className, leadingContent, leadingIcon, actionContent, actionContentPlacement: t0, trailingContent, trailingIcon, trailingAction, unit, action, isClearable: isClearableProp, showClear, renderStatic, onStaticInteract, clearClassName, onClear, dataAttributes, typographySize, id: idProp, inputClassName, contentClassName, contentWrapperClassName, contentAndTrailingClassName, wrapContentAndTrailing, wrapTrailingContent: t1, labelPlacement: t2, trailingClassName, onMouseEnter, onFocusCapture, variant: variantProp, as: asProp, size: sizeProp } = props;
25
24
  const actionContentPlacement = t0 === void 0 ? "content-wrapper" : t0;
26
25
  const wrapTrailingContent = t1 === void 0 ? true : t1;
27
26
  const labelPlacement = t2 === void 0 ? "content-wrapper" : t2;
@@ -44,7 +43,7 @@ var InputFrame = (props) => {
44
43
  $[3] = t4;
45
44
  } else t4 = $[3];
46
45
  const isTrailingIconElement = t4;
47
- const hasTrailingContent = hasClear || !!trailingContent || !!unit || !!isLoading || !!action || !!trailingIcon || !!trailingAction;
46
+ const hasTrailingContent = hasClear || !!trailingContent || !!unit || !!action || !!trailingIcon || !!trailingAction;
48
47
  const isTrailingInteractive = !!action || !!trailingAction || !!isTrailingIconElement || hasClear && !!showClear || !!trailingContent;
49
48
  let dataAttributeProps;
50
49
  let formFieldProps;
@@ -301,7 +300,7 @@ var InputFrame = (props) => {
301
300
  } else t15 = $[111];
302
301
  const contentRow = t15;
303
302
  let t16;
304
- if ($[112] !== action || $[113] !== clearClassName || $[114] !== hasClear || $[115] !== hasTrailingContent || $[116] !== isDisabled || $[117] !== isLoading || $[118] !== onClear || $[119] !== renderStatic || $[120] !== showClear || $[121] !== trailingAction || $[122] !== trailingContent || $[123] !== trailingIcon || $[124] !== typographyCva || $[125] !== unit) {
303
+ if ($[112] !== action || $[113] !== clearClassName || $[114] !== hasClear || $[115] !== hasTrailingContent || $[116] !== isDisabled || $[117] !== onClear || $[118] !== renderStatic || $[119] !== showClear || $[120] !== trailingAction || $[121] !== trailingContent || $[122] !== trailingIcon || $[123] !== typographyCva || $[124] !== unit) {
305
304
  t16 = hasTrailingContent ? /* @__PURE__ */ jsxs(Fragment, { children: [
306
305
  hasClear && /* @__PURE__ */ jsx(InputClear, {
307
306
  onClear: () => onClear?.(),
@@ -319,11 +318,7 @@ var InputFrame = (props) => {
319
318
  }),
320
319
  children: unit
321
320
  }),
322
- isLoading && /* @__PURE__ */ jsx("div", {
323
- className: "inline-flex",
324
- children: /* @__PURE__ */ jsx(Loader, {})
325
- }),
326
- !isLoading && action && /* @__PURE__ */ jsx(InlineIconButton, {
321
+ action && /* @__PURE__ */ jsx(InlineIconButton, {
327
322
  color: "secondary",
328
323
  icon: action.icon,
329
324
  isDisabled,
@@ -332,7 +327,7 @@ var InputFrame = (props) => {
332
327
  label: action.altText,
333
328
  className: clsx("border-0!", action.className)
334
329
  }),
335
- !isLoading && !action && trailingIcon && renderIconVisual(trailingIcon),
330
+ !action && trailingIcon && renderIconVisual(trailingIcon),
336
331
  trailingAction
337
332
  ] }) : null;
338
333
  $[112] = action;
@@ -340,20 +335,19 @@ var InputFrame = (props) => {
340
335
  $[114] = hasClear;
341
336
  $[115] = hasTrailingContent;
342
337
  $[116] = isDisabled;
343
- $[117] = isLoading;
344
- $[118] = onClear;
345
- $[119] = renderStatic;
346
- $[120] = showClear;
347
- $[121] = trailingAction;
348
- $[122] = trailingContent;
349
- $[123] = trailingIcon;
350
- $[124] = typographyCva;
351
- $[125] = unit;
352
- $[126] = t16;
353
- } else t16 = $[126];
338
+ $[117] = onClear;
339
+ $[118] = renderStatic;
340
+ $[119] = showClear;
341
+ $[120] = trailingAction;
342
+ $[121] = trailingContent;
343
+ $[122] = trailingIcon;
344
+ $[123] = typographyCva;
345
+ $[124] = unit;
346
+ $[125] = t16;
347
+ } else t16 = $[125];
354
348
  const trailingContentNodes = t16;
355
349
  let t17;
356
- if ($[127] !== as || $[128] !== inputSizeCva || $[129] !== isTrailingInteractive || $[130] !== size || $[131] !== trailingClassName || $[132] !== trailingContentNodes || $[133] !== wrapTrailingContent) {
350
+ if ($[126] !== as || $[127] !== inputSizeCva || $[128] !== isTrailingInteractive || $[129] !== size || $[130] !== trailingClassName || $[131] !== trailingContentNodes || $[132] !== wrapTrailingContent) {
357
351
  t17 = wrapTrailingContent && trailingContentNodes ? /* @__PURE__ */ jsx("div", {
358
352
  className: clsx("flex items-center gap-input-gap-trailing-elements", inputSizeCva({
359
353
  size,
@@ -361,70 +355,70 @@ var InputFrame = (props) => {
361
355
  }), !isTrailingInteractive && "pointer-events-none", trailingClassName),
362
356
  children: trailingContentNodes
363
357
  }) : trailingContentNodes;
364
- $[127] = as;
365
- $[128] = inputSizeCva;
366
- $[129] = isTrailingInteractive;
367
- $[130] = size;
368
- $[131] = trailingClassName;
369
- $[132] = trailingContentNodes;
370
- $[133] = wrapTrailingContent;
371
- $[134] = t17;
372
- } else t17 = $[134];
358
+ $[126] = as;
359
+ $[127] = inputSizeCva;
360
+ $[128] = isTrailingInteractive;
361
+ $[129] = size;
362
+ $[130] = trailingClassName;
363
+ $[131] = trailingContentNodes;
364
+ $[132] = wrapTrailingContent;
365
+ $[133] = t17;
366
+ } else t17 = $[133];
373
367
  const trailingRow = t17;
374
368
  let t18;
375
- if ($[135] !== contentAndTrailingClassName || $[136] !== contentRow || $[137] !== trailingRow || $[138] !== wrapContentAndTrailing) {
369
+ if ($[134] !== contentAndTrailingClassName || $[135] !== contentRow || $[136] !== trailingRow || $[137] !== wrapContentAndTrailing) {
376
370
  t18 = wrapContentAndTrailing ? /* @__PURE__ */ jsxs("div", {
377
371
  className: clsx("flex w-full items-center gap-input-gap-input-text-to-elements", contentAndTrailingClassName),
378
372
  children: [contentRow, trailingRow]
379
373
  }) : /* @__PURE__ */ jsxs(Fragment, { children: [contentRow, trailingRow] });
380
- $[135] = contentAndTrailingClassName;
381
- $[136] = contentRow;
382
- $[137] = trailingRow;
383
- $[138] = wrapContentAndTrailing;
384
- $[139] = t18;
385
- } else t18 = $[139];
374
+ $[134] = contentAndTrailingClassName;
375
+ $[135] = contentRow;
376
+ $[136] = trailingRow;
377
+ $[137] = wrapContentAndTrailing;
378
+ $[138] = t18;
379
+ } else t18 = $[138];
386
380
  const inputFrameContent = t18;
387
381
  const t19 = as === "inline" ? -1 : void 0;
388
382
  const t20 = as === "inline" ? -1 : void 0;
389
383
  let t21;
390
- if ($[140] !== onMouseEnter || $[141] !== onStaticInteract || $[142] !== renderStatic) {
384
+ if ($[139] !== onMouseEnter || $[140] !== onStaticInteract || $[141] !== renderStatic) {
391
385
  t21 = (event) => {
392
386
  onMouseEnter?.(event);
393
387
  if (renderStatic) onStaticInteract?.(false);
394
388
  };
395
- $[140] = onMouseEnter;
396
- $[141] = onStaticInteract;
397
- $[142] = renderStatic;
398
- $[143] = t21;
399
- } else t21 = $[143];
389
+ $[139] = onMouseEnter;
390
+ $[140] = onStaticInteract;
391
+ $[141] = renderStatic;
392
+ $[142] = t21;
393
+ } else t21 = $[142];
400
394
  let t22;
401
- if ($[144] !== onFocusCapture || $[145] !== onStaticInteract || $[146] !== renderStatic) {
395
+ if ($[143] !== onFocusCapture || $[144] !== onStaticInteract || $[145] !== renderStatic) {
402
396
  t22 = (event_0) => {
403
397
  onFocusCapture?.(event_0);
404
398
  if (renderStatic) onStaticInteract?.(true);
405
399
  };
406
- $[144] = onFocusCapture;
407
- $[145] = onStaticInteract;
408
- $[146] = renderStatic;
409
- $[147] = t22;
410
- } else t22 = $[147];
400
+ $[143] = onFocusCapture;
401
+ $[144] = onStaticInteract;
402
+ $[145] = renderStatic;
403
+ $[146] = t22;
404
+ } else t22 = $[146];
411
405
  let t23;
412
- if ($[148] !== as || $[149] !== inputBaseCva || $[150] !== inputClassName || $[151] !== variant) {
406
+ if ($[147] !== as || $[148] !== inputBaseCva || $[149] !== inputClassName || $[150] !== variant) {
413
407
  t23 = clsx("relative flex cursor-text has-disabled:cursor-default", inputBaseCva({
414
408
  variant,
415
409
  as
416
410
  }), inputClassName);
417
- $[148] = as;
418
- $[149] = inputBaseCva;
419
- $[150] = inputClassName;
420
- $[151] = variant;
421
- $[152] = t23;
422
- } else t23 = $[152];
411
+ $[147] = as;
412
+ $[148] = inputBaseCva;
413
+ $[149] = inputClassName;
414
+ $[150] = variant;
415
+ $[151] = t23;
416
+ } else t23 = $[151];
423
417
  const t24 = renderStatic ? isDisabled ? -1 : 0 : void 0;
424
418
  let t25;
425
419
  let t26;
426
420
  let t27;
427
- if ($[153] !== onStaticInteract || $[154] !== renderStatic) {
421
+ if ($[152] !== onStaticInteract || $[153] !== renderStatic) {
428
422
  t25 = () => {
429
423
  if (renderStatic) onStaticInteract?.(true);
430
424
  };
@@ -434,18 +428,18 @@ var InputFrame = (props) => {
434
428
  t27 = () => {
435
429
  if (renderStatic) onStaticInteract?.(true);
436
430
  };
437
- $[153] = onStaticInteract;
438
- $[154] = renderStatic;
439
- $[155] = t25;
440
- $[156] = t26;
441
- $[157] = t27;
431
+ $[152] = onStaticInteract;
432
+ $[153] = renderStatic;
433
+ $[154] = t25;
434
+ $[155] = t26;
435
+ $[156] = t27;
442
436
  } else {
443
- t25 = $[155];
444
- t26 = $[156];
445
- t27 = $[157];
437
+ t25 = $[154];
438
+ t26 = $[155];
439
+ t27 = $[156];
446
440
  }
447
441
  let t28;
448
- if ($[158] !== dataAttributeProps || $[159] !== inputFrameContent || $[160] !== ref || $[161] !== t23 || $[162] !== t24 || $[163] !== t25 || $[164] !== t26 || $[165] !== t27) {
442
+ if ($[157] !== dataAttributeProps || $[158] !== inputFrameContent || $[159] !== ref || $[160] !== t23 || $[161] !== t24 || $[162] !== t25 || $[163] !== t26 || $[164] !== t27) {
449
443
  t28 = /* @__PURE__ */ jsx("div", {
450
444
  ref,
451
445
  ...dataAttributeProps,
@@ -457,18 +451,18 @@ var InputFrame = (props) => {
457
451
  "data-rac": "",
458
452
  children: inputFrameContent
459
453
  });
460
- $[158] = dataAttributeProps;
461
- $[159] = inputFrameContent;
462
- $[160] = ref;
463
- $[161] = t23;
464
- $[162] = t24;
465
- $[163] = t25;
466
- $[164] = t26;
467
- $[165] = t27;
468
- $[166] = t28;
469
- } else t28 = $[166];
454
+ $[157] = dataAttributeProps;
455
+ $[158] = inputFrameContent;
456
+ $[159] = ref;
457
+ $[160] = t23;
458
+ $[161] = t24;
459
+ $[162] = t25;
460
+ $[163] = t26;
461
+ $[164] = t27;
462
+ $[165] = t28;
463
+ } else t28 = $[165];
470
464
  let t29;
471
- if ($[167] !== as || $[168] !== dataAttributeProps || $[169] !== formFieldProps || $[170] !== formFieldRef || $[171] !== labelProps || $[172] !== t20 || $[173] !== t21 || $[174] !== t22 || $[175] !== t28) {
465
+ if ($[166] !== as || $[167] !== dataAttributeProps || $[168] !== formFieldProps || $[169] !== formFieldRef || $[170] !== labelProps || $[171] !== t20 || $[172] !== t21 || $[173] !== t22 || $[174] !== t28) {
472
466
  t29 = /* @__PURE__ */ jsx(FormField, {
473
467
  ...formFieldProps,
474
468
  ...dataAttributeProps,
@@ -480,31 +474,31 @@ var InputFrame = (props) => {
480
474
  onFocusCapture: t22,
481
475
  children: t28
482
476
  });
483
- $[167] = as;
484
- $[168] = dataAttributeProps;
485
- $[169] = formFieldProps;
486
- $[170] = formFieldRef;
487
- $[171] = labelProps;
488
- $[172] = t20;
489
- $[173] = t21;
490
- $[174] = t22;
491
- $[175] = t28;
492
- $[176] = t29;
493
- } else t29 = $[176];
477
+ $[166] = as;
478
+ $[167] = dataAttributeProps;
479
+ $[168] = formFieldProps;
480
+ $[169] = formFieldRef;
481
+ $[170] = labelProps;
482
+ $[171] = t20;
483
+ $[172] = t21;
484
+ $[173] = t22;
485
+ $[174] = t28;
486
+ $[175] = t29;
487
+ } else t29 = $[175];
494
488
  let t30;
495
- if ($[177] !== as || $[178] !== error || $[179] !== t19 || $[180] !== t29) {
489
+ if ($[176] !== as || $[177] !== error || $[178] !== t19 || $[179] !== t29) {
496
490
  t30 = /* @__PURE__ */ jsx(TooltipWrapper, {
497
491
  as,
498
492
  error,
499
493
  triggerTabIndex: t19,
500
494
  children: t29
501
495
  });
502
- $[177] = as;
503
- $[178] = error;
504
- $[179] = t19;
505
- $[180] = t29;
506
- $[181] = t30;
507
- } else t30 = $[181];
496
+ $[176] = as;
497
+ $[177] = error;
498
+ $[178] = t19;
499
+ $[179] = t29;
500
+ $[180] = t30;
501
+ } else t30 = $[180];
508
502
  return t30;
509
503
  };
510
504
  var renderIconVisual = (icon) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "2.3.0-rc.21",
3
+ "version": "2.3.0-rc.23",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",