@fastkit/vui 0.18.31 → 0.18.33

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.
Files changed (50) hide show
  1. package/dist/vui.d.ts +214 -214
  2. package/dist/vui.mjs +402 -484
  3. package/dist/vui.mjs.map +1 -1
  4. package/package.json +25 -25
  5. package/src/components/VApp/VApp.tsx +5 -7
  6. package/src/components/VAvatar/VAvatar.tsx +1 -0
  7. package/src/components/VBreadcrumbs/VBreadcrumbs.tsx +8 -7
  8. package/src/components/VButton/VButton.tsx +28 -28
  9. package/src/components/VButton/VButtonGroup.tsx +2 -2
  10. package/src/components/VCard/VCard.tsx +2 -13
  11. package/src/components/VCard/VCardActions.tsx +1 -3
  12. package/src/components/VCard/VCardContent.tsx +1 -3
  13. package/src/components/VCheckable/VCheckable.tsx +12 -14
  14. package/src/components/VCheckbox/VCheckbox.tsx +11 -12
  15. package/src/components/VChip/VChip.tsx +1 -0
  16. package/src/components/VContentSwitcher/VContentSwitcher.tsx +5 -7
  17. package/src/components/VControlField/VControlField.tsx +19 -20
  18. package/src/components/VDataTable/VDataTable.tsx +20 -23
  19. package/src/components/VDialog/VDialog.tsx +1 -2
  20. package/src/components/VForm/VForm.tsx +12 -13
  21. package/src/components/VFormControl/VFormControl.tsx +7 -2
  22. package/src/components/VFormGroup/VFormGroup.tsx +1 -0
  23. package/src/components/VGrid/schemes.ts +7 -5
  24. package/src/components/VListTile/VListTile.tsx +4 -1
  25. package/src/components/VMenu/VMenu.tsx +5 -7
  26. package/src/components/VNavigation/VNavigation.tsx +5 -3
  27. package/src/components/VNavigation/VNavigationItem.tsx +13 -66
  28. package/src/components/VNumberField/VNumberField.tsx +13 -14
  29. package/src/components/VOption/VOption.tsx +20 -23
  30. package/src/components/VOptionGroup/VOptionGroup.tsx +9 -11
  31. package/src/components/VPagination/VPagination.tsx +21 -20
  32. package/src/components/VPaper/VPaper.tsx +1 -1
  33. package/src/components/VRadio/VRadio.tsx +11 -12
  34. package/src/components/VSelect/VSelect.tsx +85 -95
  35. package/src/components/VSheetModal/VSheetModal.tsx +20 -36
  36. package/src/components/VSnackbar/VSnackbar.tsx +2 -4
  37. package/src/components/VSwitch/VSwitch.tsx +11 -12
  38. package/src/components/VTabs/VTab.tsx +13 -20
  39. package/src/components/VTabs/VTabs.tsx +12 -15
  40. package/src/components/VTextField/VTextField.tsx +34 -37
  41. package/src/components/VTextarea/VTextarea.tsx +36 -43
  42. package/src/components/VToolbar/VToolbar.tsx +11 -15
  43. package/src/components/VToolbar/VToolbarMenu.tsx +1 -0
  44. package/src/components/VTooltip/VTooltip.tsx +3 -7
  45. package/src/composables/control.ts +9 -16
  46. package/src/composables/form-selector.tsx +61 -67
  47. package/src/composables/vui.ts +2 -1
  48. package/src/injections.ts +5 -5
  49. package/src/plugin.tsx +8 -7
  50. package/src/service.tsx +42 -32
package/dist/vui.mjs CHANGED
@@ -189,10 +189,10 @@ var CONTROL_LOADING_SPINNER_SIZES = {
189
189
  md: 20,
190
190
  lg: 24
191
191
  };
192
- var VuiInjectionKey = Symbol();
193
- var VuiControlInjectionKey = Symbol();
194
- var VuiControlFieldInjectionKey = Symbol();
195
- var VuiColorProviderInjectionKey = Symbol();
192
+ var VuiInjectionKey = Symbol("Vui");
193
+ var VuiControlInjectionKey = Symbol("VuiControl");
194
+ var VuiControlFieldInjectionKey = Symbol("VuiControlField");
195
+ var VuiColorProviderInjectionKey = Symbol("VuiColorProvider");
196
196
  var VUI_TEXT_FIELD_SYMBOL = "vui-text-field";
197
197
  var VUI_TEXTAREA_SYMBOL = "vui-textarea";
198
198
  var VUI_SELECT_SYMBOL = "vui-select";
@@ -250,12 +250,10 @@ function useControl(props12, opts = {}) {
250
250
  const { defaultSize = "md" } = opts;
251
251
  const parentControl = inject(VuiControlInjectionKey, null);
252
252
  const size = computed(() => {
253
- const psize = props12.size;
254
- return psize ? psize : parentControl ? parentControl.size.value : defaultSize;
255
- });
256
- const classes = computed(() => {
257
- return ["v-control", `v-control--${size.value}`];
253
+ const propSize = props12.size;
254
+ return propSize || (parentControl ? parentControl.size.value : defaultSize);
258
255
  });
256
+ const classes = computed(() => ["v-control", `v-control--${size.value}`]);
259
257
  const provider = {
260
258
  parentControl,
261
259
  size,
@@ -280,8 +278,8 @@ function useControlField(props12, opts = {}) {
280
278
  const { defaultVariant = "flat" } = opts;
281
279
  const parentControlField = inject(VuiControlFieldInjectionKey, null);
282
280
  const variant = computed(() => {
283
- const pvariant = props12.variant;
284
- return pvariant ? pvariant : parentControlField ? parentControlField.variant.value : defaultVariant;
281
+ const propVariant = props12.variant;
282
+ return propVariant || (parentControlField ? parentControlField.variant.value : defaultVariant);
285
283
  });
286
284
  const provider = {
287
285
  parentControlField,
@@ -357,11 +355,9 @@ var VMenu = defineMenuComponent({
357
355
  ctx.setupContext.expose({
358
356
  menu: ctx
359
357
  });
360
- return (children) => {
361
- return createVNode("div", mergeProps({
362
- "class": ["v-menu__body", color.colorClasses.value]
363
- }, ctx.attrs), [children]);
364
- };
358
+ return (children) => createVNode("div", mergeProps({
359
+ "class": ["v-menu__body", color.colorClasses.value]
360
+ }, ctx.attrs), [children]);
365
361
  }
366
362
  });
367
363
 
@@ -386,11 +382,9 @@ var VTooltip = defineComponent({
386
382
  "class": "v-tooltip"
387
383
  }), {
388
384
  ...ctx.slots,
389
- default: (payload) => {
390
- return [createVNode("span", {
391
- "class": "v-tooltip__inner"
392
- }, [defaultSlot && defaultSlot(payload)])];
393
- }
385
+ default: (payload) => [createVNode("span", {
386
+ "class": "v-tooltip__inner"
387
+ }, [defaultSlot?.(payload)])]
394
388
  });
395
389
  };
396
390
  }
@@ -434,6 +428,7 @@ var VFormControl = defineComponent({
434
428
  },
435
429
  slots,
436
430
  emits,
431
+ // eslint-disable-next-line no-shadow
437
432
  setup(props12, ctx) {
438
433
  const vui = useVui();
439
434
  const control = useFormNodeWrapper(props12, ctx, {
@@ -470,7 +465,10 @@ var VFormControl = defineComponent({
470
465
  "v-form-control--untouched": control.untouched,
471
466
  "v-form-control--invalid": control.invalid,
472
467
  "v-form-control--valid": control.valid
473
- }, colorProvider.className(props12.error ? "error" : control.invalid && !control.isReadonly ? "error" : "primary")]);
468
+ }, colorProvider.className(
469
+ // eslint-disable-next-line no-nested-ternary
470
+ props12.error ? "error" : control.invalid && !control.isReadonly ? "error" : "primary"
471
+ )]);
474
472
  const getRequiredChip = createRequiredChipRenderer(() => control.isRequired, props12, vui);
475
473
  const handleClick = (ev) => ctx.emit("clickLabel", ev, control);
476
474
  return () => {
@@ -546,6 +544,7 @@ function defineFormSelectorComponent(opts) {
546
544
  },
547
545
  slots: slots2,
548
546
  emits: emits12,
547
+ // eslint-disable-next-line no-shadow
549
548
  setup(props13, ctx) {
550
549
  const selectorControl = useFormSelectorControl(props13, ctx, {
551
550
  nodeType,
@@ -565,58 +564,54 @@ function defineFormSelectorComponent(opts) {
565
564
  const slot = resolveVNodeChildOrSlots(props13.failedToLoadItemsMessage, vui.setting("failedToLoadDataMessage"), "Failed to load data.");
566
565
  return slot && slot(vui);
567
566
  });
568
- const defaultSlot = () => {
569
- return createVNode("div", {
570
- "class": "v-form-selector__body"
571
- }, [selectorControl.itemsLoadFailed && createVNode("div", {
572
- "key": "failed",
573
- "class": "v-form-selector__placeholder v-form-selector__placeholder--error"
574
- }, [failedToLoadItemsMessageRef.value]), selectorControl.itemsLoading && createVNode("div", {
575
- "key": "loading",
576
- "class": "v-form-selector__placeholder"
577
- }, [createVNode(loading_exports.VProgressCircular, {
578
- "indeterminate": true,
579
- "class": "mr-1",
580
- "size": CONTROL_LOADING_SPINNER_SIZES[control.size.value || "md"]
581
- }, null), loadingMessageRef.value]), selectorControl.propGroups.map((group) => {
582
- const {
583
- items
584
- } = group;
585
- return createVNode(Fragment, null, [items.map((attrs) => {
586
- const selected = selectorControl.isSelected(attrs.value);
587
- return itemRenderer({
588
- selected,
589
- control: selectorControl,
590
- attrs: {
591
- ...attrs,
592
- modelValue: selected,
593
- key: attrs.value
594
- },
595
- slots: {
596
- default: () => attrs.label(selectorControl)
597
- }
598
- });
599
- })]);
600
- }), ctx.slots.default?.()]);
601
- };
567
+ const defaultSlot = () => createVNode("div", {
568
+ "class": "v-form-selector__body"
569
+ }, [selectorControl.itemsLoadFailed && createVNode("div", {
570
+ "key": "failed",
571
+ "class": "v-form-selector__placeholder v-form-selector__placeholder--error"
572
+ }, [failedToLoadItemsMessageRef.value]), selectorControl.itemsLoading && createVNode("div", {
573
+ "key": "loading",
574
+ "class": "v-form-selector__placeholder"
575
+ }, [createVNode(loading_exports.VProgressCircular, {
576
+ "indeterminate": true,
577
+ "class": "mr-1",
578
+ "size": CONTROL_LOADING_SPINNER_SIZES[control.size.value || "md"]
579
+ }, null), loadingMessageRef.value]), selectorControl.propGroups.map((group) => {
580
+ const {
581
+ items
582
+ } = group;
583
+ return createVNode(Fragment, null, [items.map((attrs) => {
584
+ const selected = selectorControl.isSelected(attrs.value);
585
+ return itemRenderer({
586
+ selected,
587
+ control: selectorControl,
588
+ attrs: {
589
+ ...attrs,
590
+ modelValue: selected,
591
+ key: attrs.value
592
+ },
593
+ slots: {
594
+ default: () => attrs.label(selectorControl)
595
+ }
596
+ });
597
+ })]);
598
+ }), ctx.slots.default?.()]);
602
599
  ctx.expose({
603
600
  control: selectorControl
604
601
  });
605
- return () => {
606
- return createVNode(VFormControl, {
607
- "nodeControl": selectorControl,
608
- "hiddenInfo": props13.hiddenInfo,
609
- "class": classes.value,
610
- "label": props13.label,
611
- "hint": props13.hint,
612
- "hinttip": props13.hinttip,
613
- "requiredChip": props13.requiredChip,
614
- "error": selectorControl.itemsLoadFailed
615
- }, {
616
- ...ctx.slots,
617
- default: defaultSlot
618
- });
619
- };
602
+ return () => createVNode(VFormControl, {
603
+ "nodeControl": selectorControl,
604
+ "hiddenInfo": props13.hiddenInfo,
605
+ "class": classes.value,
606
+ "label": props13.label,
607
+ "hint": props13.hint,
608
+ "hinttip": props13.hinttip,
609
+ "requiredChip": props13.requiredChip,
610
+ "error": selectorControl.itemsLoadFailed
611
+ }, {
612
+ ...ctx.slots,
613
+ default: defaultSlot
614
+ });
620
615
  }
621
616
  });
622
617
  }
@@ -746,9 +741,8 @@ var VDialog = defineDialogComponent({
746
741
  resolver: (actions) => {
747
742
  if (actions.length === 0) {
748
743
  return [vui.stackAction("close")];
749
- } else {
750
- return actions;
751
744
  }
745
+ return actions;
752
746
  }
753
747
  });
754
748
  const color = useColorClasses(props12, {
@@ -785,9 +779,8 @@ var VSnackbar = defineSnackbarComponent({
785
779
  resolver: (actions) => {
786
780
  if (actions.length === 0) {
787
781
  return [vui.stackAction("close")];
788
- } else {
789
- return actions;
790
782
  }
783
+ return actions;
791
784
  }
792
785
  });
793
786
  const color = useColorClasses(props12, {
@@ -829,6 +822,7 @@ var VSheetModal = defineComponent({
829
822
  inheritAttrs: false,
830
823
  props: sheetModalProps,
831
824
  emits: emits2,
825
+ // eslint-disable-next-line no-shadow
832
826
  setup(props12, ctx) {
833
827
  const stackControl = useStackControl(props12, ctx, {
834
828
  stackType: SHEET_STACK_TYPE
@@ -846,25 +840,18 @@ var VSheetModal = defineComponent({
846
840
  render() {
847
841
  const {
848
842
  render
849
- // color,
850
843
  } = this.stackControl;
851
844
  const headerSlot = this.$slots.header || this.header;
852
- return render((children) => {
853
- return createVNode("div", {
854
- "class": [
855
- "v-sheet-modal",
856
- {
857
- "v-sheet-modal--has-active-child": this.hasActiveChild
858
- }
859
- // color.colorClasses.value,
860
- ],
861
- "tabindex": "0"
862
- }, [headerSlot && createVNode("div", {
863
- "class": "v-sheet-modal__header"
864
- }, [headerSlot(this.stackControl)]), createVNode("div", {
865
- "class": "v-sheet-modal__scroller"
866
- }, [children])]);
867
- });
845
+ return render((children) => createVNode("div", {
846
+ "class": ["v-sheet-modal", {
847
+ "v-sheet-modal--has-active-child": this.hasActiveChild
848
+ }],
849
+ "tabindex": "0"
850
+ }, [headerSlot && createVNode("div", {
851
+ "class": "v-sheet-modal__header"
852
+ }, [headerSlot(this.stackControl)]), createVNode("div", {
853
+ "class": "v-sheet-modal__scroller"
854
+ }, [children])]));
868
855
  }
869
856
  });
870
857
  var VSkeltonLoaderBone = defineComponent({
@@ -1083,9 +1070,9 @@ function isAvailableSrc(src) {
1083
1070
  function extractRawGridValueClasses(value, prefix, getter) {
1084
1071
  if (typeof value !== "object")
1085
1072
  return `${prefix}${getter ? getter(value) : value}`;
1086
- return Object.entries(value).map(([breakpoint, breakpointValue]) => {
1087
- return `${prefix}${getter ? getter(breakpointValue) : breakpointValue}--${breakpoint}`;
1088
- });
1073
+ return Object.entries(value).map(
1074
+ ([breakpoint, breakpointValue]) => `${prefix}${getter ? getter(breakpointValue) : breakpointValue}--${breakpoint}`
1075
+ );
1089
1076
  }
1090
1077
 
1091
1078
  // src/components/VGrid/VGridItem.tsx
@@ -1454,29 +1441,23 @@ var VCard = defineComponent({
1454
1441
  attrs
1455
1442
  };
1456
1443
  });
1457
- return () => {
1458
- return createVNode(VPaper, data.value.attrs, ctx.slots);
1459
- };
1444
+ return () => createVNode(VPaper, data.value.attrs, ctx.slots);
1460
1445
  }
1461
1446
  });
1462
1447
  var VCardContent = defineComponent({
1463
1448
  name: "VCardContent",
1464
1449
  setup(_props, ctx) {
1465
- return () => {
1466
- return createVNode("div", {
1467
- "class": "v-card-content"
1468
- }, [ctx.slots.default?.()]);
1469
- };
1450
+ return () => createVNode("div", {
1451
+ "class": "v-card-content"
1452
+ }, [ctx.slots.default?.()]);
1470
1453
  }
1471
1454
  });
1472
1455
  var VCardActions = defineComponent({
1473
1456
  name: "VCardActions",
1474
1457
  setup(_props, ctx) {
1475
- return () => {
1476
- return createVNode("div", {
1477
- "class": "v-card-actions"
1478
- }, [ctx.slots.default?.()]);
1479
- };
1458
+ return () => createVNode("div", {
1459
+ "class": "v-card-actions"
1460
+ }, [ctx.slots.default?.()]);
1480
1461
  }
1481
1462
  });
1482
1463
  var BUTTON_ALIGNS = ["left", "center", "right"];
@@ -1539,26 +1520,24 @@ var VButton = defineComponent({
1539
1520
  return;
1540
1521
  return _spacer === true ? "left" : _spacer;
1541
1522
  });
1542
- const classes = computed(() => [color.colorClasses.value, spacer.value ? `v-button--spacer-${spacer.value}` : void 0, `v-button--${control.size.value}`, `v-button--align-${props12.align}`, {
1523
+ const classes = computed(() => [color.colorClasses.value, spacer.value ? `v-button--spacer-${spacer.value}` : void 0, `v-button--${control.size.value}`, `v-button--align-${props12.align}`, "clickable", {
1543
1524
  "v-button--loading": isLoading.value,
1544
1525
  "v-button--icon": !!icon.value,
1545
1526
  "v-button--rounded": props12.rounded,
1546
1527
  "v-button--plain": isPlain.value
1547
1528
  }]);
1548
- return () => {
1549
- return createVNode(VAction, mergeProps(ctx.attrs, {
1550
- "class": ["v-button", classes.value],
1551
- "guardInProgressClass": "v-button--guard-in-progress"
1552
- }), {
1553
- default: () => createVNode(Fragment, null, [createVNode("span", {
1554
- "class": "v-button__content"
1555
- }, [startIcon.value, ctx.slots.default?.(), icon.value, endIcon.value]), isLoading.value && createVNode(loading_exports.VProgressCircular, {
1556
- "class": "v-button__loading",
1557
- "indeterminate": true,
1558
- "size": LOADING_SIZE_MAP[control.size.value]
1559
- }, null)])
1560
- });
1561
- };
1529
+ return () => createVNode(VAction, mergeProps(ctx.attrs, {
1530
+ "class": ["v-button", classes.value],
1531
+ "guardInProgressClass": "v-button--guard-in-progress"
1532
+ }), {
1533
+ default: () => createVNode(Fragment, null, [createVNode("span", {
1534
+ "class": "v-button__content"
1535
+ }, [startIcon.value, ctx.slots.default?.(), icon.value, endIcon.value]), isLoading.value && createVNode(loading_exports.VProgressCircular, {
1536
+ "class": "v-button__loading",
1537
+ "indeterminate": true,
1538
+ "size": LOADING_SIZE_MAP[control.size.value]
1539
+ }, null)])
1540
+ });
1562
1541
  }
1563
1542
  });
1564
1543
  var VButtonGroup = defineComponent({
@@ -1602,7 +1581,7 @@ var VButtonGroup = defineComponent({
1602
1581
  return cloneVNode(child.node, {
1603
1582
  ...props12,
1604
1583
  ...childProps,
1605
- rouded: false,
1584
+ rounded: false,
1606
1585
  class: ["v-button-group__item", {
1607
1586
  "v-button--icon": hasIcon,
1608
1587
  "v-button-group__item--has-left": hasLeft,
@@ -1720,15 +1699,16 @@ var VPagination = defineComponent({
1720
1699
  const start = pageValue - left + 2;
1721
1700
  const end = pageValue + left - 2 - even;
1722
1701
  return [1, "truncate", ..._range(start, end), "truncate", length];
1723
- } else if (pageValue === left) {
1702
+ }
1703
+ if (pageValue === left) {
1724
1704
  const end = pageValue + left - 1 - even;
1725
1705
  return [..._range(1, end), "truncate", length];
1726
- } else if (pageValue === right) {
1706
+ }
1707
+ if (pageValue === right) {
1727
1708
  const start = pageValue - left + 1;
1728
1709
  return [1, "truncate", ..._range(start, length)];
1729
- } else {
1730
- return [..._range(1, left), "truncate", ..._range(right, length)];
1731
1710
  }
1711
+ return [..._range(1, left), "truncate", ..._range(right, length)];
1732
1712
  });
1733
1713
  const isActive = computed(() => computedLength.value > 1);
1734
1714
  const isTransitioning = computed(() => {
@@ -1768,11 +1748,10 @@ var VPagination = defineComponent({
1768
1748
  return router.push(to).then((failure) => {
1769
1749
  !failure && ctx.emit("change", newPage);
1770
1750
  });
1771
- } else {
1772
- internalValue.value = newPage;
1773
- ctx.emit("update:modelValue", newPage);
1774
- ctx.emit("change", newPage);
1775
1751
  }
1752
+ internalValue.value = newPage;
1753
+ ctx.emit("update:modelValue", newPage);
1754
+ ctx.emit("change", newPage);
1776
1755
  }
1777
1756
  function createPageInfo(source) {
1778
1757
  const currentPage = computedPage.value;
@@ -1852,15 +1831,14 @@ var VPagination = defineComponent({
1852
1831
  }, _isSlot(children) ? children : {
1853
1832
  default: () => [children]
1854
1833
  });
1855
- } else {
1856
- return createVNode("button", {
1857
- "class": classes2,
1858
- "type": "button",
1859
- "value": page,
1860
- "onClick": onClick,
1861
- "key": key
1862
- }, [children]);
1863
1834
  }
1835
+ return createVNode("button", {
1836
+ "class": classes2,
1837
+ "type": "button",
1838
+ "value": page,
1839
+ "onClick": onClick,
1840
+ "key": key
1841
+ }, [children]);
1864
1842
  }
1865
1843
  watch(() => props12.modelValue, (modelValue) => {
1866
1844
  internalValue.value = resolveNumberish(modelValue);
@@ -1940,17 +1918,22 @@ var VListTile = defineComponent({
1940
1918
  const classes = computed(() => {
1941
1919
  const _color = color.value;
1942
1920
  const hasColor = !!_color.value;
1943
- return [color.value.className, {
1921
+ return [color.value.className, "clickable", {
1944
1922
  "v-list-tile--plain": !hasColor,
1945
1923
  "v-list-tile--has-color": hasColor,
1946
1924
  "v-list-tile--active": isActive.value
1947
1925
  }];
1948
1926
  });
1949
- watch(() => isActive.value, (isActive2) => {
1950
- ctx.emit("changeActive", isActive2);
1951
- }, {
1952
- immediate: true
1953
- });
1927
+ watch(
1928
+ () => isActive.value,
1929
+ // eslint-disable-next-line no-shadow
1930
+ (isActive2) => {
1931
+ ctx.emit("changeActive", isActive2);
1932
+ },
1933
+ {
1934
+ immediate: true
1935
+ }
1936
+ );
1954
1937
  return () => {
1955
1938
  const _startIcon = startIcon.value;
1956
1939
  const _endIcon = endIcon.value;
@@ -2054,14 +2037,12 @@ function createNavigationItemProps() {
2054
2037
  },
2055
2038
  nested: Boolean,
2056
2039
  color: String
2057
- // key: {
2058
- // type: [String, Number],
2059
- // required: true,
2060
- // },
2061
2040
  };
2062
2041
  }
2063
2042
  function resolveNavigationItemInput(input) {
2064
- let label = input.label;
2043
+ let {
2044
+ label
2045
+ } = input;
2065
2046
  const props12 = {
2066
2047
  ...input
2067
2048
  };
@@ -2087,8 +2068,8 @@ function renderNavigationItemInput(input, extraProps) {
2087
2068
  });
2088
2069
  }
2089
2070
  var TRIM_END_SLASH_RE = /\/$/;
2090
- function trimEndSlash(sorce) {
2091
- return sorce ? sorce.replace(TRIM_END_SLASH_RE, "") : sorce;
2071
+ function trimEndSlash(source) {
2072
+ return source ? source.replace(TRIM_END_SLASH_RE, "") : source;
2092
2073
  }
2093
2074
  var VNavigationItem = defineComponent({
2094
2075
  name: "VNavigationItem",
@@ -2136,8 +2117,8 @@ var VNavigationItem = defineComponent({
2136
2117
  if (!c || !m || !m.length) {
2137
2118
  return;
2138
2119
  }
2139
- const trimedNewPath = trimEndSlash(newPath);
2140
- if (m.some((_) => trimedNewPath.match(_))) {
2120
+ const trimmedNewPath = trimEndSlash(newPath);
2121
+ if (m.some((_) => trimmedNewPath.match(_))) {
2141
2122
  open();
2142
2123
  } else {
2143
2124
  close();
@@ -2154,12 +2135,10 @@ var VNavigationItem = defineComponent({
2154
2135
  endIcon = vui.icon("navigationExpand");
2155
2136
  if (typeof endIcon === "string") {
2156
2137
  const name = endIcon;
2157
- endIcon = (gen) => {
2158
- return gen({
2159
- name,
2160
- rotate: opened.value ? 180 : 0
2161
- });
2162
- };
2138
+ endIcon = (gen) => gen({
2139
+ name,
2140
+ rotate: opened.value ? 180 : 0
2141
+ });
2163
2142
  }
2164
2143
  }
2165
2144
  const __props = {
@@ -2169,9 +2148,6 @@ var VNavigationItem = defineComponent({
2169
2148
  delete __props.children;
2170
2149
  return {
2171
2150
  ...__props
2172
- // activeClass,
2173
- // startIcon: toRawIconProp(__props.startIcon, iconPayload),
2174
- // endIcon: toRawIconProp(__props.endIcon, iconPayload),
2175
2151
  };
2176
2152
  });
2177
2153
  function open() {
@@ -2216,8 +2192,6 @@ var VNavigationItem = defineComponent({
2216
2192
  }, {
2217
2193
  startIconEmptySpace: _props.value.startIconEmptySpace,
2218
2194
  depth: props12.nested ? props12.depth + 1 : props12.depth
2219
- // onClick,
2220
- // onChangeActive,
2221
2195
  }))]), [[vShow, opened.value]])]
2222
2196
  })]);
2223
2197
  };
@@ -2278,6 +2252,7 @@ var VNavigation = defineComponent({
2278
2252
  }, [$caption]), items.value.map((item) => renderNavigationItemInput(item, {
2279
2253
  class: "v-navigation__item",
2280
2254
  startIconEmptySpace: startIconEmptySpace.value,
2255
+ // eslint-disable-next-line no-shadow
2281
2256
  ref: (ref10) => {
2282
2257
  setItemRef(item, ref10);
2283
2258
  },
@@ -2330,22 +2305,25 @@ var VControlField = defineComponent({
2330
2305
  const readonly = computed(() => !!parentNode && parentNode.isReadonly);
2331
2306
  const colorProvider = useVuiColorProvider();
2332
2307
  const classes = computed(() => {
2333
- const classes2 = ["v-control-field", `v-control-field--${inputBox.variant.value}`, {
2308
+ const _classes = ["v-control-field", `v-control-field--${inputBox.variant.value}`, {
2334
2309
  "v-control-field--disabled": disabled.value,
2335
2310
  "v-control-field--invalid": invalid.value || props12.error,
2336
2311
  "v-control-field--readonly": readonly.value,
2337
2312
  "v-control-field--focused": props12.focused,
2338
2313
  "v-control-field--auto-height": autoHeight.value
2339
- }, control.classes.value, colorProvider.className(props12.error ? "error" : invalid.value && !readonly.value ? "error" : "primary")];
2340
- return classes2;
2314
+ }, control.classes.value, colorProvider.className(
2315
+ // eslint-disable-next-line no-nested-ternary
2316
+ props12.error ? "error" : invalid.value && !readonly.value ? "error" : "primary"
2317
+ )];
2318
+ return _classes;
2341
2319
  });
2342
2320
  const resolvedSlots = computed(() => {
2343
- const slots12 = {};
2321
+ const _slots = {};
2344
2322
  ADORNMENT_POSITIONS.forEach((position) => {
2345
2323
  const key = `${position}Adornment`;
2346
- slots12[position] = resolveVNodeChildOrSlots(props12[key], ctx.slots[key]);
2324
+ _slots[position] = resolveVNodeChildOrSlots(props12[key], ctx.slots[key]);
2347
2325
  });
2348
- return slots12;
2326
+ return _slots;
2349
2327
  });
2350
2328
  const renderAdornment = (position) => {
2351
2329
  let child;
@@ -2364,15 +2342,13 @@ var VControlField = defineComponent({
2364
2342
  }, [child]);
2365
2343
  };
2366
2344
  const handleClick = (ev) => ctx.emit("click", ev);
2367
- return () => {
2368
- return createVNode("div", {
2369
- "class": classes.value,
2370
- "onClick": handleClick,
2371
- "ref": hostElRef
2372
- }, [renderAdornment("start"), createVNode("div", {
2373
- "class": "v-control-field__body"
2374
- }, [ctx.slots.default?.()]), renderAdornment("end")]);
2375
- };
2345
+ return () => createVNode("div", {
2346
+ "class": classes.value,
2347
+ "onClick": handleClick,
2348
+ "ref": hostElRef
2349
+ }, [renderAdornment("start"), createVNode("div", {
2350
+ "class": "v-control-field__body"
2351
+ }, [ctx.slots.default?.()]), renderAdornment("end")]);
2376
2352
  }
2377
2353
  });
2378
2354
  var VTextCounter = defineComponent({
@@ -2411,16 +2387,14 @@ var VCheckable = defineComponent({
2411
2387
  const disabled = computed(() => props12.disabled);
2412
2388
  const readonly = computed(() => props12.readonly);
2413
2389
  const checked = computed(() => props12.checked);
2414
- const classes = computed(() => {
2415
- return [{
2416
- "v-checkable--invalid": invalid.value,
2417
- "v-checkable--disabled": disabled.value,
2418
- "v-checkable--readonly": readonly.value,
2419
- "v-checkable--checked": checked.value,
2420
- "v-checkable--custom-icon": !!ctx.slots.icon,
2421
- disabled: disabled.value
2422
- }, colorProvider.className(invalid.value ? "error" : "primary")];
2423
- });
2390
+ const classes = computed(() => [{
2391
+ "v-checkable--invalid": invalid.value,
2392
+ "v-checkable--disabled": disabled.value,
2393
+ "v-checkable--readonly": readonly.value,
2394
+ "v-checkable--checked": checked.value,
2395
+ "v-checkable--custom-icon": !!ctx.slots.icon,
2396
+ disabled: disabled.value
2397
+ }, colorProvider.className(invalid.value ? "error" : "primary")]);
2424
2398
  return () => createVNode("label", {
2425
2399
  "class": ["v-checkable", classes.value]
2426
2400
  }, [createVNode("span", {
@@ -2446,6 +2420,7 @@ var VCheckbox = defineComponent({
2446
2420
  indeterminate: Boolean
2447
2421
  },
2448
2422
  emits: emits3,
2423
+ // eslint-disable-next-line no-shadow
2449
2424
  setup(props12, ctx) {
2450
2425
  const nodeControl = useFormSelectorItemControl(props12, ctx, {
2451
2426
  nodeType: VUI_CHECKBOX_SYMBOL,
@@ -2474,15 +2449,13 @@ var VCheckbox = defineComponent({
2474
2449
  }, null),
2475
2450
  label: () => ctx.slots.default?.()
2476
2451
  };
2477
- return () => {
2478
- return createVNode(VCheckable, {
2479
- "class": classes.value,
2480
- "checked": nodeControl.selected || isIndeterminate.value,
2481
- "invalid": nodeControl.invalid,
2482
- "disabled": nodeControl.isDisabled,
2483
- "readonly": nodeControl.isReadonly
2484
- }, slots12);
2485
- };
2452
+ return () => createVNode(VCheckable, {
2453
+ "class": classes.value,
2454
+ "checked": nodeControl.selected || isIndeterminate.value,
2455
+ "invalid": nodeControl.invalid,
2456
+ "disabled": nodeControl.isDisabled,
2457
+ "readonly": nodeControl.isReadonly
2458
+ }, slots12);
2486
2459
  }
2487
2460
  });
2488
2461
  function _isSlot3(s) {
@@ -2511,6 +2484,7 @@ var VRadio = defineComponent({
2511
2484
  ...createControlProps()
2512
2485
  },
2513
2486
  emits: emits4,
2487
+ // eslint-disable-next-line no-shadow
2514
2488
  setup(props12, ctx) {
2515
2489
  const nodeControl = useFormSelectorItemControl(props12, ctx, {
2516
2490
  nodeType: VUI_RADIO_SYMBOL,
@@ -2529,15 +2503,13 @@ var VRadio = defineComponent({
2529
2503
  }, null),
2530
2504
  label: () => ctx.slots.default?.()
2531
2505
  };
2532
- return () => {
2533
- return createVNode(VCheckable, {
2534
- "class": classes.value,
2535
- "checked": nodeControl.selected,
2536
- "invalid": nodeControl.invalid,
2537
- "disabled": nodeControl.isDisabled,
2538
- "readonly": nodeControl.isReadonly
2539
- }, slots12);
2540
- };
2506
+ return () => createVNode(VCheckable, {
2507
+ "class": classes.value,
2508
+ "checked": nodeControl.selected,
2509
+ "invalid": nodeControl.invalid,
2510
+ "disabled": nodeControl.isDisabled,
2511
+ "readonly": nodeControl.isReadonly
2512
+ }, slots12);
2541
2513
  }
2542
2514
  });
2543
2515
  function _isSlot4(s) {
@@ -2565,6 +2537,7 @@ var VSwitch = defineComponent({
2565
2537
  ...createControlProps()
2566
2538
  },
2567
2539
  emits: emits5,
2540
+ // eslint-disable-next-line no-shadow
2568
2541
  setup(props12, ctx) {
2569
2542
  const nodeControl = useFormSelectorItemControl(props12, ctx, {
2570
2543
  nodeType: VUI_SWITCH_SYMBOL,
@@ -2593,15 +2566,13 @@ var VSwitch = defineComponent({
2593
2566
  ctx.expose({
2594
2567
  control: nodeControl
2595
2568
  });
2596
- return () => {
2597
- return createVNode(VCheckable, {
2598
- "class": classes.value,
2599
- "checked": nodeControl.selected,
2600
- "invalid": nodeControl.invalid,
2601
- "disabled": nodeControl.isDisabled,
2602
- "readonly": nodeControl.isReadonly
2603
- }, slots12);
2604
- };
2569
+ return () => createVNode(VCheckable, {
2570
+ "class": classes.value,
2571
+ "checked": nodeControl.selected,
2572
+ "invalid": nodeControl.invalid,
2573
+ "disabled": nodeControl.isDisabled,
2574
+ "readonly": nodeControl.isReadonly
2575
+ }, slots12);
2605
2576
  }
2606
2577
  });
2607
2578
  function _isSlot5(s) {
@@ -2630,30 +2601,27 @@ var VOption = defineComponent({
2630
2601
  ...createControlProps()
2631
2602
  },
2632
2603
  emits: emits6,
2604
+ // eslint-disable-next-line no-shadow
2633
2605
  setup(props12, ctx) {
2634
2606
  const nodeControl = useFormSelectorItemControl(props12, ctx, {
2635
2607
  nodeType: VUI_OPTION_SYMBOL,
2636
2608
  parentNodeType: VUI_SELECT_SYMBOL
2637
2609
  });
2638
2610
  const control = useControl(props12);
2639
- const classes = computed(() => {
2640
- return ["v-option", {
2641
- "v-option--selected": nodeControl.selected,
2642
- "v-option--has-not-value": !nodeControl.hasValue,
2643
- "v-option--disabled": nodeControl.isDisabled
2644
- }, control.classes.value];
2645
- });
2646
- return () => {
2647
- return createVNode("label", {
2648
- "class": classes.value,
2649
- "onClick": nodeControl.handleClickElement,
2650
- "tabindex": nodeControl.tabindex,
2651
- "data-value": nodeControl.propValue,
2652
- "aria-disabled": nodeControl.isDisabled
2653
- }, [createVNode("span", {
2654
- "class": "v-option__label"
2655
- }, [ctx.slots.default?.()])]);
2656
- };
2611
+ const classes = computed(() => ["v-option", {
2612
+ "v-option--selected": nodeControl.selected,
2613
+ "v-option--has-not-value": !nodeControl.hasValue,
2614
+ "v-option--disabled": nodeControl.isDisabled
2615
+ }, control.classes.value]);
2616
+ return () => createVNode("label", {
2617
+ "class": classes.value,
2618
+ "onClick": nodeControl.handleClickElement,
2619
+ "tabindex": nodeControl.tabindex,
2620
+ "data-value": nodeControl.propValue,
2621
+ "aria-disabled": nodeControl.isDisabled
2622
+ }, [createVNode("span", {
2623
+ "class": "v-option__label"
2624
+ }, [ctx.slots.default?.()])]);
2657
2625
  }
2658
2626
  });
2659
2627
  var slots6 = defineSlots();
@@ -2670,14 +2638,10 @@ var VOptionGroup = defineComponent({
2670
2638
  const groupControl = useFormSelectorItemGroupControl(props12, ctx, {
2671
2639
  parentNodeType: VUI_SELECT_SYMBOL
2672
2640
  });
2673
- const labelSlot = computed(() => {
2674
- return resolveVNodeChildOrSlots(props12.label, ctx.slots.label);
2675
- });
2676
- const classes = computed(() => {
2677
- return ["v-option-group", {
2678
- "v-option-group--disabled": groupControl.isDisabled
2679
- }];
2680
- });
2641
+ const labelSlot = computed(() => resolveVNodeChildOrSlots(props12.label, ctx.slots.label));
2642
+ const classes = computed(() => ["v-option-group", {
2643
+ "v-option-group--disabled": groupControl.isDisabled
2644
+ }]);
2681
2645
  ctx.expose({
2682
2646
  control: groupControl
2683
2647
  });
@@ -2722,6 +2686,7 @@ var VSelect = defineComponent({
2722
2686
  },
2723
2687
  slots: slots7,
2724
2688
  emits: emits7,
2689
+ // eslint-disable-next-line no-shadow
2725
2690
  setup(props12, ctx) {
2726
2691
  const menuRef = ref(null);
2727
2692
  const menuOpened = ref(false);
@@ -2920,27 +2885,23 @@ var VSelect = defineComponent({
2920
2885
  const classes = computed(() => ["v-select", control.classes.value, {
2921
2886
  "v-select--multiple": inputControl.multiple
2922
2887
  }]);
2923
- const controlDefaultSlot = () => {
2924
- return [withDirectives(createVNode("select", {
2925
- "class": "v-select__input__element",
2926
- "name": inputControl.name,
2927
- "tabindex": inputControl.tabindex,
2928
- "disabled": inputControl.isDisabled,
2929
- "multiple": inputControl.multiple,
2930
- "onFocus": inputControl.focusHandler,
2931
- "onBlur": inputControl.blurHandler,
2932
- "onUpdate:modelValue": ($event) => inputControl.value = $event
2933
- }, [inputControl.items.map((item) => {
2934
- return createVNode("option", {
2935
- "value": item.propValue,
2936
- "key": item.propValue
2937
- }, [item.renderDefaultSlot()]);
2938
- })]), [[vModelSelect, inputControl.value]]), createVNode("div", {
2939
- "class": "v-select__selections"
2940
- }, [createVNode("div", {
2941
- "class": "v-select__selections__inner"
2942
- }, [renderSelections(inputControl.selectedItems)])])];
2943
- };
2888
+ const controlDefaultSlot = () => [withDirectives(createVNode("select", {
2889
+ "class": "v-select__input__element",
2890
+ "name": inputControl.name,
2891
+ "tabindex": inputControl.tabindex,
2892
+ "disabled": inputControl.isDisabled,
2893
+ "multiple": inputControl.multiple,
2894
+ "onFocus": inputControl.focusHandler,
2895
+ "onBlur": inputControl.blurHandler,
2896
+ "onUpdate:modelValue": ($event) => inputControl.value = $event
2897
+ }, [inputControl.items.map((item) => createVNode("option", {
2898
+ "value": item.propValue,
2899
+ "key": item.propValue
2900
+ }, [item.renderDefaultSlot()]))]), [[vModelSelect, inputControl.value]]), createVNode("div", {
2901
+ "class": "v-select__selections"
2902
+ }, [createVNode("div", {
2903
+ "class": "v-select__selections__inner"
2904
+ }, [renderSelections(inputControl.selectedItems)])])];
2944
2905
  const endAdornmentSlot = () => {
2945
2906
  if (inputControl.itemsLoadFailed) {
2946
2907
  return createVNode(VButton, {
@@ -2972,57 +2933,53 @@ var VSelect = defineComponent({
2972
2933
  };
2973
2934
  const menuActivatorSlot = ({
2974
2935
  control: menu
2975
- }) => {
2976
- return createVNode(VControlField, {
2977
- "class": "v-select__input",
2978
- "ref": fieldRef,
2979
- "loading": inputControl.itemsLoading,
2980
- "error": inputControl.itemsLoadFailed,
2981
- "startAdornment": props12.startAdornment,
2982
- "endAdornment": props12.endAdornment,
2983
- "size": control.size.value,
2984
- "focused": menuOpened.value,
2985
- "autoHeight": inputControl.multiple,
2986
- "onClick": (ev) => {
2987
- if (inputControl.canOperation && !menu.isActive) {
2988
- let t = ev.target;
2989
- const count = 0;
2990
- let hit = false;
2991
- while (count < 5) {
2992
- if (t.classList.contains("v-select__input")) {
2993
- hit = true;
2994
- break;
2995
- }
2996
- t = t.parentElement;
2936
+ }) => createVNode(VControlField, {
2937
+ "class": "v-select__input",
2938
+ "ref": fieldRef,
2939
+ "loading": inputControl.itemsLoading,
2940
+ "error": inputControl.itemsLoadFailed,
2941
+ "startAdornment": props12.startAdornment,
2942
+ "endAdornment": props12.endAdornment,
2943
+ "size": control.size.value,
2944
+ "focused": menuOpened.value,
2945
+ "autoHeight": inputControl.multiple,
2946
+ "onClick": (ev) => {
2947
+ if (inputControl.canOperation && !menu.isActive) {
2948
+ let t = ev.target;
2949
+ const count = 0;
2950
+ let hit = false;
2951
+ while (count < 5) {
2952
+ if (t.classList.contains("v-select__input")) {
2953
+ hit = true;
2954
+ break;
2997
2955
  }
2998
- menu.setActivator(hit ? t : ev).show();
2956
+ t = t.parentElement;
2999
2957
  }
2958
+ menu.setActivator(hit ? t : ev).show();
3000
2959
  }
3001
- }, {
3002
- ...ctx.slots,
3003
- default: controlDefaultSlot,
3004
- endAdornment: endAdornmentSlot
3005
- });
3006
- };
2960
+ }
2961
+ }, {
2962
+ ...ctx.slots,
2963
+ default: controlDefaultSlot,
2964
+ endAdornment: endAdornmentSlot
2965
+ });
3007
2966
  const menuSlots = {
3008
2967
  activator: menuActivatorSlot,
3009
2968
  default: () => createVNode("div", {
3010
2969
  "class": ["v-select__body", control.classes.value]
3011
2970
  }, [children, propGroups])
3012
2971
  };
3013
- const defaultSlot = () => {
3014
- return createVNode(VMenu, {
3015
- "width": "fit",
3016
- "maxWidth": "fit",
3017
- "closeOnNavigation": props12.closeOnNavigation,
3018
- "distance": 0,
3019
- "alwaysRender": true,
3020
- "modelValue": menuOpened.value,
3021
- "onUpdate:modelValue": ($event) => menuOpened.value = $event,
3022
- "ref": menuRef,
3023
- "onClose": clearKeyFocused
3024
- }, menuSlots);
3025
- };
2972
+ const defaultSlot = () => createVNode(VMenu, {
2973
+ "width": "fit",
2974
+ "maxWidth": "fit",
2975
+ "closeOnNavigation": props12.closeOnNavigation,
2976
+ "distance": 0,
2977
+ "alwaysRender": true,
2978
+ "modelValue": menuOpened.value,
2979
+ "onUpdate:modelValue": ($event) => menuOpened.value = $event,
2980
+ "ref": menuRef,
2981
+ "onClose": clearKeyFocused
2982
+ }, menuSlots);
3026
2983
  return createVNode(VFormControl, {
3027
2984
  "nodeControl": inputControl,
3028
2985
  "class": classes.value,
@@ -3059,6 +3016,7 @@ var VTextField = defineComponent({
3059
3016
  props: createTextFieldProps(),
3060
3017
  emits: emits8,
3061
3018
  slots: slots8,
3019
+ // eslint-disable-next-line no-shadow
3062
3020
  setup(props12, ctx) {
3063
3021
  const inputControl = useTextInputNodeControl(props12, ctx, {
3064
3022
  nodeType: VUI_TEXT_FIELD_SYMBOL
@@ -3069,19 +3027,17 @@ var VTextField = defineComponent({
3069
3027
  const handleClickLabel = (ev) => {
3070
3028
  inputControl.focus();
3071
3029
  };
3072
- const defaultSlot = () => {
3073
- return createVNode(VControlField, {
3074
- "class": "v-text-field__input",
3075
- "startAdornment": props12.startAdornment,
3076
- "endAdornment": props12.endAdornment,
3077
- "size": control.size.value
3078
- }, {
3079
- ...ctx.slots,
3080
- default: () => inputControl.createInputElement({
3081
- class: "v-text-field__input__element"
3082
- })
3083
- });
3084
- };
3030
+ const defaultSlot = () => createVNode(VControlField, {
3031
+ "class": "v-text-field__input",
3032
+ "startAdornment": props12.startAdornment,
3033
+ "endAdornment": props12.endAdornment,
3034
+ "size": control.size.value
3035
+ }, {
3036
+ ...ctx.slots,
3037
+ default: () => inputControl.createInputElement({
3038
+ class: "v-text-field__input__element"
3039
+ })
3040
+ });
3085
3041
  const infoAppendsSlot = () => {
3086
3042
  const {
3087
3043
  counterResult
@@ -3093,22 +3049,20 @@ var VTextField = defineComponent({
3093
3049
  ctx.expose({
3094
3050
  control: inputControl
3095
3051
  });
3096
- return () => {
3097
- return createVNode(VFormControl, {
3098
- "nodeControl": inputControl,
3099
- "hiddenInfo": props12.hiddenInfo,
3100
- "class": classes.value,
3101
- "label": props12.label,
3102
- "hint": props12.hint,
3103
- "hinttip": props12.hinttip,
3104
- "requiredChip": props12.requiredChip,
3105
- "onClickLabel": handleClickLabel
3106
- }, {
3107
- ...ctx.slots,
3108
- default: defaultSlot,
3109
- infoAppends: infoAppendsSlot
3110
- });
3111
- };
3052
+ return () => createVNode(VFormControl, {
3053
+ "nodeControl": inputControl,
3054
+ "hiddenInfo": props12.hiddenInfo,
3055
+ "class": classes.value,
3056
+ "label": props12.label,
3057
+ "hint": props12.hint,
3058
+ "hinttip": props12.hinttip,
3059
+ "requiredChip": props12.requiredChip,
3060
+ "onClickLabel": handleClickLabel
3061
+ }, {
3062
+ ...ctx.slots,
3063
+ default: defaultSlot,
3064
+ infoAppends: infoAppendsSlot
3065
+ });
3112
3066
  }
3113
3067
  });
3114
3068
  var toString = (value) => {
@@ -3160,16 +3114,14 @@ var VNumberField = defineComponent({
3160
3114
  const onChange = (value) => {
3161
3115
  ctx.emit("change", toNumber(value));
3162
3116
  };
3163
- return () => {
3164
- return createVNode(VTextField, mergeProps(ctx.attrs, {
3165
- "type": hasNumberMask.value ? "text" : "number",
3166
- "inputmode": inputmode.value,
3167
- "maskModel": "typed",
3168
- "modelValue": toString(props12.modelValue),
3169
- "onUpdate:modelValue": onUpdateModelValue,
3170
- "onChange": onChange
3171
- }), ctx.slots);
3172
- };
3117
+ return () => createVNode(VTextField, mergeProps(ctx.attrs, {
3118
+ "type": hasNumberMask.value ? "text" : "number",
3119
+ "inputmode": inputmode.value,
3120
+ "maskModel": "typed",
3121
+ "modelValue": toString(props12.modelValue),
3122
+ "onUpdate:modelValue": onUpdateModelValue,
3123
+ "onChange": onChange
3124
+ }), ctx.slots);
3173
3125
  }
3174
3126
  });
3175
3127
  var {
@@ -3188,6 +3140,7 @@ var VTextarea = defineComponent({
3188
3140
  ...slots9()
3189
3141
  },
3190
3142
  emits: emits9,
3143
+ // eslint-disable-next-line no-shadow
3191
3144
  setup(props12, ctx) {
3192
3145
  const vui = useVui();
3193
3146
  const inputControl = useTextareaNodeControl(props12, ctx, {
@@ -3199,20 +3152,18 @@ var VTextarea = defineComponent({
3199
3152
  ctx.expose({
3200
3153
  control: inputControl
3201
3154
  });
3202
- const defaultSlot = () => {
3203
- return createVNode(VControlField, {
3204
- "class": "v-textarea__input",
3205
- "size": control.size.value,
3206
- "autoHeight": true,
3207
- "startAdornment": props12.startAdornment,
3208
- "endAdornment": props12.endAdornment
3209
- }, {
3210
- ...ctx.slots,
3211
- default: () => inputControl.createInputElement({
3212
- class: "v-textarea__input__element"
3213
- })
3214
- });
3215
- };
3155
+ const defaultSlot = () => createVNode(VControlField, {
3156
+ "class": "v-textarea__input",
3157
+ "size": control.size.value,
3158
+ "autoHeight": true,
3159
+ "startAdornment": props12.startAdornment,
3160
+ "endAdornment": props12.endAdornment
3161
+ }, {
3162
+ ...ctx.slots,
3163
+ default: () => inputControl.createInputElement({
3164
+ class: "v-textarea__input__element"
3165
+ })
3166
+ });
3216
3167
  const infoAppendsSlot = () => {
3217
3168
  const {
3218
3169
  counterResult
@@ -3221,24 +3172,22 @@ var VTextarea = defineComponent({
3221
3172
  return;
3222
3173
  return createVNode(VTextCounter, counterResult, null);
3223
3174
  };
3224
- return () => {
3225
- return createVNode(VFormControl, {
3226
- "nodeControl": inputControl,
3227
- "class": ["v-textarea", control.classes.value],
3228
- "label": props12.label,
3229
- "hint": props12.hint,
3230
- "hinttip": props12.hinttip,
3231
- "hiddenInfo": props12.hiddenInfo,
3232
- "requiredChip": props12.requiredChip,
3233
- "onClickLabel": (ev) => {
3234
- inputControl.focus();
3235
- }
3236
- }, {
3237
- ...ctx.slots,
3238
- default: defaultSlot,
3239
- infoAppends: infoAppendsSlot
3240
- });
3241
- };
3175
+ return () => createVNode(VFormControl, {
3176
+ "nodeControl": inputControl,
3177
+ "class": ["v-textarea", control.classes.value],
3178
+ "label": props12.label,
3179
+ "hint": props12.hint,
3180
+ "hinttip": props12.hinttip,
3181
+ "hiddenInfo": props12.hiddenInfo,
3182
+ "requiredChip": props12.requiredChip,
3183
+ "onClickLabel": (ev) => {
3184
+ inputControl.focus();
3185
+ }
3186
+ }, {
3187
+ ...ctx.slots,
3188
+ default: defaultSlot,
3189
+ infoAppends: infoAppendsSlot
3190
+ });
3242
3191
  }
3243
3192
  });
3244
3193
  var {
@@ -3259,6 +3208,7 @@ var VFormGroup = defineComponent({
3259
3208
  props: createVFormGroupProps(),
3260
3209
  emits: emits10,
3261
3210
  slots: formGroupSlots,
3211
+ // eslint-disable-next-line no-shadow
3262
3212
  setup(props12, ctx) {
3263
3213
  const nodeControl = useFormGroup(props12, ctx, {
3264
3214
  nodeType: VUI_FORM_GROUP_SYMBOL
@@ -3289,20 +3239,19 @@ var VForm = defineComponent({
3289
3239
  props: createVFormProps(),
3290
3240
  emits: emits11,
3291
3241
  slots: formSlots,
3242
+ // eslint-disable-next-line no-shadow
3292
3243
  setup(props12, ctx) {
3293
3244
  const nodeControl = useForm(props12, ctx, {
3294
3245
  nodeType: VUI_FORM_SYMBOL
3295
3246
  });
3296
- const classes = computed(() => {
3297
- return ["v-form", {
3298
- "v-form--valid": nodeControl.valid,
3299
- "v-form--invalid": nodeControl.invalid,
3300
- "v-form--disabled": nodeControl.isDisabled,
3301
- "v-form--validating": nodeControl.validating,
3302
- "v-form--pending": nodeControl.pending,
3303
- "v-form--sending": nodeControl.sending
3304
- }];
3305
- });
3247
+ const classes = computed(() => ["v-form", {
3248
+ "v-form--valid": nodeControl.valid,
3249
+ "v-form--invalid": nodeControl.invalid,
3250
+ "v-form--disabled": nodeControl.isDisabled,
3251
+ "v-form--validating": nodeControl.validating,
3252
+ "v-form--pending": nodeControl.pending,
3253
+ "v-form--sending": nodeControl.sending
3254
+ }]);
3306
3255
  useControl(props12);
3307
3256
  ctx.expose({
3308
3257
  control: nodeControl
@@ -3360,19 +3309,20 @@ var VTab = defineComponent({
3360
3309
  }, _isSlot7(children) ? children : {
3361
3310
  default: () => [children]
3362
3311
  });
3363
- } else {
3364
- return createVNode("button", {
3365
- "class": classes,
3366
- "type": "button",
3367
- "value": value,
3368
- "onClick": (ev) => {
3369
- ctx.emit("click", ev);
3370
- }
3371
- }, [children]);
3372
3312
  }
3313
+ return createVNode("button", {
3314
+ "class": classes,
3315
+ "type": "button",
3316
+ "value": value,
3317
+ "onClick": (ev) => {
3318
+ ctx.emit("click", ev);
3319
+ }
3320
+ }, [children]);
3373
3321
  };
3374
3322
  }
3375
3323
  });
3324
+
3325
+ // src/components/VTabs/VTabs.tsx
3376
3326
  function _isSlot8(s) {
3377
3327
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
3378
3328
  }
@@ -3384,9 +3334,6 @@ var VTabs = defineComponent({
3384
3334
  items: {
3385
3335
  type: Array,
3386
3336
  required: true
3387
- // validator: (value: VTabsItem[]) => {
3388
- // return Array.isArray(value) && value.length > 0;
3389
- // },
3390
3337
  },
3391
3338
  /**
3392
3339
  * 自動スクロールする際の余剰オフセット幅(px)
@@ -3527,9 +3474,7 @@ var VTabs = defineComponent({
3527
3474
  scrollResult = void 0;
3528
3475
  }
3529
3476
  }
3530
- const findTab = (tab) => {
3531
- return tabRefs.value.find((t) => t.value === tab);
3532
- };
3477
+ const findTab = (tab) => tabRefs.value.find((t) => t.value === tab);
3533
3478
  function scrollToTab(tabValue) {
3534
3479
  const tab = findTab(tabValue);
3535
3480
  if (!tab)
@@ -3588,9 +3533,7 @@ var VTabs = defineComponent({
3588
3533
  const path = props12.withQuery ? route.fullPath : route.path;
3589
3534
  const hit = computedItemsRef.value.find(({
3590
3535
  location
3591
- }) => {
3592
- return location && location.route.fullPath === path;
3593
- });
3536
+ }) => location && location.route.fullPath === path);
3594
3537
  if (hit) {
3595
3538
  currentRef.value = hit.value;
3596
3539
  }
@@ -3671,11 +3614,9 @@ var VBreadcrumbs = defineComponent({
3671
3614
  setup(props12, ctx) {
3672
3615
  const vui = useVui();
3673
3616
  const computedItemsRef = computed(() => {
3674
- const items = props12.items.map((rawItem) => {
3675
- return typeof rawItem === "string" ? {
3676
- text: rawItem
3677
- } : rawItem;
3678
- });
3617
+ const items = props12.items.map((rawItem) => typeof rawItem === "string" ? {
3618
+ text: rawItem
3619
+ } : rawItem);
3679
3620
  return items.map((item) => {
3680
3621
  const {
3681
3622
  to,
@@ -3692,11 +3633,9 @@ var VBreadcrumbs = defineComponent({
3692
3633
  });
3693
3634
  });
3694
3635
  const lengthRef = computed(() => computedItemsRef.value.length);
3695
- const defaultDividerSlot = () => {
3696
- return [createVNode("i", {
3697
- "class": "v-breadcrumbs__divider__icon"
3698
- }, null)];
3699
- };
3636
+ const defaultDividerSlot = () => [createVNode("i", {
3637
+ "class": "v-breadcrumbs__divider__icon"
3638
+ }, null)];
3700
3639
  return () => {
3701
3640
  if (lengthRef.value < 1)
3702
3641
  return;
@@ -3778,9 +3717,7 @@ var VContentSwitcher = defineComponent({
3778
3717
  const transitionRef = ref("");
3779
3718
  const elRef = ref(null);
3780
3719
  const anchorRef = ref(null);
3781
- const computedOrderRef = computed(() => props12.order.map((row) => {
3782
- return typeof row === "string" ? row : row.value;
3783
- }));
3720
+ const computedOrderRef = computed(() => props12.order.map((row) => typeof row === "string" ? row : row.value));
3784
3721
  const currentRef = computed({
3785
3722
  get: () => internalValueRef.value,
3786
3723
  set: (current) => {
@@ -3803,12 +3740,12 @@ var VContentSwitcher = defineComponent({
3803
3740
  };
3804
3741
  });
3805
3742
  function seeTop(options) {
3806
- const scoller = getDocumentScroller();
3743
+ const scroller2 = getDocumentScroller();
3807
3744
  const {
3808
3745
  value: anchor
3809
3746
  } = anchorRef;
3810
3747
  if (anchor) {
3811
- scoller.toElement(anchor, options);
3748
+ scroller2.toElement(anchor, options);
3812
3749
  }
3813
3750
  }
3814
3751
  function getEl() {
@@ -3863,10 +3800,10 @@ var VContentSwitcher = defineComponent({
3863
3800
  }, null), createVNode(Transition, {
3864
3801
  "name": transitionRef.value,
3865
3802
  "onBeforeLeave": (el) => {
3866
- getEl().style.height = el.offsetHeight + "px";
3803
+ getEl().style.height = `${el.offsetHeight}px`;
3867
3804
  },
3868
3805
  "onEnter": (el) => {
3869
- getEl().style.height = el.offsetHeight + "px";
3806
+ getEl().style.height = `${el.offsetHeight}px`;
3870
3807
  },
3871
3808
  "onAfterEnter": () => {
3872
3809
  getEl().style.height = "";
@@ -4084,15 +4021,11 @@ var VDataTable = defineComponent({
4084
4021
  };
4085
4022
  });
4086
4023
  const defaultOrderQueryRef = computed(() => props12.defaultOrder === props12.ascQueryValue ? props12.ascQueryValue : props12.descQueryValue);
4087
- const isTransitioningRef = computed(() => {
4088
- return vui.location.isQueryOnlyTransitioning([props12.pageQuery, props12.sortQuery, props12.orderQuery, props12.limitQuery]);
4089
- });
4024
+ const isTransitioningRef = computed(() => vui.location.isQueryOnlyTransitioning([props12.pageQuery, props12.sortQuery, props12.orderQuery, props12.limitQuery]));
4090
4025
  const pageRef = computed(() => vui.location.getQuery(props12.pageQuery, Number, 1));
4091
4026
  const needShowHeaderControlRef = computed(() => props12.items.length > props12.controlThreshold);
4092
4027
  const sortByRef = computed({
4093
- get: () => {
4094
- return vui.location.getQuery(props12.sortQuery);
4095
- },
4028
+ get: () => vui.location.getQuery(props12.sortQuery),
4096
4029
  set(value) {
4097
4030
  vui.location.pushQuery({
4098
4031
  [props12.sortQuery]: value || null,
@@ -4143,12 +4076,10 @@ var VDataTable = defineComponent({
4143
4076
  let icon = vui.icon("sort");
4144
4077
  if (typeof icon === "string") {
4145
4078
  const name = icon;
4146
- icon = (gen) => {
4147
- return gen({
4148
- name,
4149
- rotate: isASCRef.value ? 180 : 0
4150
- });
4151
- };
4079
+ icon = (gen) => gen({
4080
+ name,
4081
+ rotate: isASCRef.value ? 180 : 0
4082
+ });
4152
4083
  }
4153
4084
  return icon;
4154
4085
  });
@@ -4274,12 +4205,10 @@ var VDataTable = defineComponent({
4274
4205
  "size": "sm",
4275
4206
  "hiddenInfo": true,
4276
4207
  "disabled": isTransitioningRef.value,
4277
- "items": props12.limits.map((limit) => {
4278
- return {
4279
- label: `${limit}\u4EF6`,
4280
- value: limit
4281
- };
4282
- }),
4208
+ "items": props12.limits.map((limit) => ({
4209
+ label: `${limit}\u4EF6`,
4210
+ value: limit
4211
+ })),
4283
4212
  "modelValue": limitRef.value,
4284
4213
  "onUpdate:modelValue": ($event) => limitRef.value = $event
4285
4214
  }, null)]), createVNode("div", {
@@ -4463,9 +4392,7 @@ var VDataTable = defineComponent({
4463
4392
  internalValues.value = modelValue.slice();
4464
4393
  });
4465
4394
  watch(() => props12.items, (items) => {
4466
- internalValues.value = internalValues.value.filter((key) => {
4467
- return sortedItemKeysRef.value.includes(key);
4468
- });
4395
+ internalValues.value = internalValues.value.filter((key) => sortedItemKeysRef.value.includes(key));
4469
4396
  });
4470
4397
  onMounted(() => {
4471
4398
  bootedRef.value = true;
@@ -4512,11 +4439,9 @@ var VApp = defineComponent({
4512
4439
  name: "VApp",
4513
4440
  setup(_props, ctx) {
4514
4441
  useInjectTheme();
4515
- return () => {
4516
- return createVNode(VDynamicStacks, null, {
4517
- default: () => [createVNode(VAppLayout, null, ctx.slots)]
4518
- });
4519
- };
4442
+ return () => createVNode(VDynamicStacks, null, {
4443
+ default: () => [createVNode(VAppLayout, null, ctx.slots)]
4444
+ });
4520
4445
  }
4521
4446
  });
4522
4447
  var VToolbar = defineComponent({
@@ -4536,17 +4461,13 @@ var VToolbar = defineComponent({
4536
4461
  color: () => props12.color,
4537
4462
  variant: () => props12.variant || vui.setting("containedVariant")
4538
4463
  });
4539
- const classes = computed(() => {
4540
- return [elevation.elevationClassName.value, color.colorClasses.value, {
4541
- "v-toolbar--plain": !color.color.value.value,
4542
- "v-toolbar--dense": dense.value
4543
- }];
4544
- });
4545
- return () => {
4546
- return createVNode("div", {
4547
- "class": ["v-toolbar", classes.value]
4548
- }, [ctx.slots.default?.()]);
4549
- };
4464
+ const classes = computed(() => [elevation.elevationClassName.value, color.colorClasses.value, {
4465
+ "v-toolbar--plain": !color.color.value.value,
4466
+ "v-toolbar--dense": dense.value
4467
+ }]);
4468
+ return () => createVNode("div", {
4469
+ "class": ["v-toolbar", classes.value]
4470
+ }, [ctx.slots.default?.()]);
4550
4471
  }
4551
4472
  });
4552
4473
  var VToolbarMenu = defineComponent({
@@ -4783,26 +4704,24 @@ var VuiService = class {
4783
4704
  }
4784
4705
  }
4785
4706
  })];
4786
- return this.dialog(options, (stack) => {
4787
- return createVNode(VForm, {
4788
- "disableAutoScroll": true,
4789
- "size": size,
4790
- "onVnodeBeforeUnmount": () => {
4791
- form = void 0;
4792
- },
4793
- "onSubmit": (ev) => {
4794
- stack.resolve(_state);
4795
- }
4796
- }, {
4797
- default: (_form) => {
4798
- form = _form;
4799
- return slot(_state, {
4800
- form,
4801
- stack
4802
- });
4803
- }
4804
- });
4805
- });
4707
+ return this.dialog(options, (stack) => createVNode(VForm, {
4708
+ "disableAutoScroll": true,
4709
+ "size": size,
4710
+ "onVnodeBeforeUnmount": () => {
4711
+ form = void 0;
4712
+ },
4713
+ "onSubmit": (ev) => {
4714
+ stack.resolve(_state);
4715
+ }
4716
+ }, {
4717
+ default: (_form) => {
4718
+ form = _form;
4719
+ return slot(_state, {
4720
+ form,
4721
+ stack
4722
+ });
4723
+ }
4724
+ }));
4806
4725
  }
4807
4726
  prompt(rawOptions = {}) {
4808
4727
  const options = typeof rawOptions === "string" ? {
@@ -4832,21 +4751,19 @@ var VuiService = class {
4832
4751
  }, (state) => createVNode(VTextField, mergeProps(options.input, {
4833
4752
  "modelValue": state.input,
4834
4753
  "onUpdate:modelValue": ($event) => state.input = $event
4835
- }), null)).then((result) => {
4836
- return result ? result.input : result;
4837
- });
4754
+ }), null)).then((result) => result ? result.input : result);
4838
4755
  }
4839
4756
  stackAction(key, override, attrs) {
4840
4757
  const factory = this.stackActions[key];
4841
4758
  const _onClick = BUILTIN_ACTION_HANDLERS[key];
4842
4759
  const action = {
4843
4760
  key,
4761
+ // eslint-disable-next-line no-shadow
4844
4762
  content: ({
4845
4763
  control,
4846
4764
  key: key2
4847
4765
  }) => {
4848
4766
  const onClick = (ev) => _onClick(control, ev);
4849
- control.guardInProgress;
4850
4767
  const _attrs = {
4851
4768
  disabled: control.guardInProgress,
4852
4769
  ...attrs
@@ -4903,6 +4820,7 @@ var VuiPlugin = class {
4903
4820
  options: {
4904
4821
  behavior: "smooth"
4905
4822
  },
4823
+ // eslint-disable-next-line no-shadow
4906
4824
  fn: (el, opts2) => {
4907
4825
  const duration = opts2?.behavior === "smooth" ? void 0 : 0;
4908
4826
  return scroller.toElement(el, {