@fastkit/vui 1.5.0 → 1.5.2

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/dist/vui.d.mts CHANGED
@@ -31,7 +31,6 @@ export * from "@fastkit/vue-stack";
31
31
  export * from "@fastkit/vue-action";
32
32
  export * from "@fastkit/vue-utils";
33
33
  export * from "@fastkit/vue-loading";
34
-
35
34
  //#region src/schemes/control.d.ts
36
35
  declare const CONTROL_SIZES: readonly ["sm", "md", "lg"];
37
36
  type ControlSize = (typeof CONTROL_SIZES)[number];
@@ -2404,7 +2403,7 @@ declare module '@fastkit/vue-action' {
2404
2403
  }
2405
2404
  //#endregion
2406
2405
  //#region src/components/VBusyImage/VBusyImage.d.ts
2407
- declare type ImgHTMLAttributesPropOptions = { [K in keyof ImgHTMLAttributes]-?: PropType<ImgHTMLAttributes[K]> };
2406
+ declare type ImgHTMLAttributesPropOptions = { [K in keyof ImgHTMLAttributes]-?: PropType<ImgHTMLAttributes[K]>; };
2408
2407
  declare function splitAttrs(attrs: ImgHTMLAttributes): {
2409
2408
  el: HTMLAttributes;
2410
2409
  img: ImgHTMLAttributes;
@@ -3918,8 +3917,8 @@ declare const VButton: import("vue").DefineComponent<ExtractPropTypes<{
3918
3917
  borderColor: PropType<PaletteName>;
3919
3918
  }>> & Readonly<{}>, {
3920
3919
  loading: boolean;
3921
- align: "left" | "right" | "center";
3922
3920
  rounded: boolean;
3921
+ align: "left" | "right" | "center";
3923
3922
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3924
3923
  //#endregion
3925
3924
  //#region src/components/VButton/VButtonGroup.d.ts
@@ -7278,11 +7277,11 @@ declare const VForm: import("vue").DefineComponent<import("vue").ExtractPropType
7278
7277
  rules: import("@fastkit/vue-form-control").RecursiveVerifiableRuleOrFn;
7279
7278
  showOwnErrors: boolean;
7280
7279
  detach: boolean;
7281
- disableAutoScroll: boolean;
7282
7280
  novalidate: boolean;
7283
7281
  autoValidate: boolean;
7284
7282
  sending: boolean;
7285
7283
  acceptInvalidSubmission: import("@fastkit/vue-form-control").FormAcceptInvalidSubmissionSpec;
7284
+ disableAutoScroll: boolean;
7286
7285
  }, import("@fastkit/vue-utils").DefinedSlots<{
7287
7286
  default?: ((form: VueForm) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7288
7287
  [key: string]: any;
@@ -7480,7 +7479,8 @@ interface DataTableRowSettings<T extends DataTableItem = DataTableItem> {
7480
7479
  type DataTableRowSettingsFn<T extends DataTableItem = DataTableItem> = (payload: DataTableItemSlotPayload<T>) => DataTableRowSettings<T>;
7481
7480
  type RawDataTableRowSettings<T extends DataTableItem = DataTableItem> = DataTableRowSettingsFn<T> | DataTableRowSettings<T>;
7482
7481
  declare const VDataTable: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7483
- /** 選択中のkeyの配列 */modelValue: {
7482
+ /** 選択中のkeyの配列 */
7483
+ modelValue: {
7484
7484
  type: PropType<string[]>;
7485
7485
  default: () => never[];
7486
7486
  };
@@ -7568,7 +7568,8 @@ declare const VDataTable: import("vue").DefineComponent<import("vue").ExtractPro
7568
7568
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7569
7569
  input: (selectedValues: string[]) => true;
7570
7570
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7571
- /** 選択中のkeyの配列 */modelValue: {
7571
+ /** 選択中のkeyの配列 */
7572
+ modelValue: {
7572
7573
  type: PropType<string[]>;
7573
7574
  default: () => never[];
7574
7575
  };
@@ -7857,8 +7858,8 @@ declare const VToolbarMenu: import("vue").DefineComponent<import("vue").ExtractP
7857
7858
  borderColor: import("vue").PropType<PaletteName>;
7858
7859
  }>> & Readonly<{}>, {
7859
7860
  loading: boolean;
7860
- align: "left" | "right" | "center";
7861
7861
  rounded: boolean;
7862
+ align: "left" | "right" | "center";
7862
7863
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7863
7864
  //#endregion
7864
7865
  //#region src/components/VToolbar/VToolbarEdge.d.ts
package/dist/vui.mjs CHANGED
@@ -1313,23 +1313,33 @@ const VPagination = defineComponent({
1313
1313
  const even = maxLength % 2 === 0 ? 1 : 0;
1314
1314
  const left = Math.floor(maxLength / 2);
1315
1315
  const right = length - left + 1 + even;
1316
- if (pageValue > left && pageValue < right) return [
1317
- 1,
1318
- "truncate",
1319
- ..._range(pageValue - left + 2, pageValue + left - 2 - even),
1320
- "truncate",
1321
- length
1322
- ];
1323
- if (pageValue === left) return [
1324
- ..._range(1, pageValue + left - 1 - even),
1325
- "truncate",
1326
- length
1327
- ];
1328
- if (pageValue === right) return [
1329
- 1,
1330
- "truncate",
1331
- ..._range(pageValue - left + 1, length)
1332
- ];
1316
+ if (pageValue > left && pageValue < right) {
1317
+ const start = pageValue - left + 2;
1318
+ const end = pageValue + left - 2 - even;
1319
+ return [
1320
+ 1,
1321
+ "truncate",
1322
+ ..._range(start, end),
1323
+ "truncate",
1324
+ length
1325
+ ];
1326
+ }
1327
+ if (pageValue === left) {
1328
+ const end = pageValue + left - 1 - even;
1329
+ return [
1330
+ ..._range(1, end),
1331
+ "truncate",
1332
+ length
1333
+ ];
1334
+ }
1335
+ if (pageValue === right) {
1336
+ const start = pageValue - left + 1;
1337
+ return [
1338
+ 1,
1339
+ "truncate",
1340
+ ..._range(start, length)
1341
+ ];
1342
+ }
1333
1343
  return [
1334
1344
  ..._range(1, left),
1335
1345
  "truncate",
@@ -1450,7 +1460,8 @@ const VPagination = defineComponent({
1450
1460
  const style = window.getComputedStyle(el, "before");
1451
1461
  const width = style.getPropertyValue("width");
1452
1462
  const margin = style.getPropertyValue("margin");
1453
- itemSize.value = parseFloat(width) + parseFloat(margin) * .5;
1463
+ const size = parseFloat(width) + parseFloat(margin) * .5;
1464
+ itemSize.value = size;
1454
1465
  }
1455
1466
  containerWidth.value = width;
1456
1467
  })]);
@@ -3547,11 +3558,12 @@ const VDataTable = defineComponent({
3547
3558
  const { item: itemSlot = defaultItemSlot } = ctx.slots;
3548
3559
  return createVNode("tbody", { "class": "v-data-table__table__body" }, [items.map((item) => {
3549
3560
  const key = item[itemKey];
3550
- return itemSlot({
3561
+ const payload = {
3551
3562
  key,
3552
3563
  item,
3553
3564
  selected: isSelected(key)
3554
- });
3565
+ };
3566
+ return itemSlot(payload);
3555
3567
  })]);
3556
3568
  }
3557
3569
  watch(() => props.modelValue, (modelValue) => {