@pantograph/vue 0.24.0 → 0.25.1

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 (119) hide show
  1. package/dist/ActionButton/index.js +1 -1
  2. package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-jhaE9j9X.js → ActionButton.vue_vue_type_script_setup_true_lang-CZTRz3hl.js} +2 -2
  3. package/dist/Alert/index.js +1 -1
  4. package/dist/{Alert.vue_vue_type_style_index_0_lang-89bXo9jG.js → Alert.vue_vue_type_style_index_0_lang-BNoDGnDR.js} +3 -3
  5. package/dist/Avatar/index.js +1 -1
  6. package/dist/{Avatar.vue_vue_type_style_index_0_lang-kaq1iN2X.js → Avatar.vue_vue_type_style_index_0_lang--OU5sgDR.js} +3 -3
  7. package/dist/AvatarGroup/index.js +1 -1
  8. package/dist/Badge/index.js +1 -1
  9. package/dist/{Badge.vue_vue_type_script_setup_true_lang-C6x4r-P7.js → Badge.vue_vue_type_script_setup_true_lang-ov_fhvSB.js} +2 -2
  10. package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-CAdrPXmH.js → BaseBadge.vue_vue_type_style_index_0_lang-Cwko3Hlm.js} +1 -1
  11. package/dist/{BaseButton.vue_vue_type_style_index_0_lang-favf_C7t.js → BaseButton.vue_vue_type_style_index_0_lang-DV59KCrZ.js} +4 -4
  12. package/dist/Button/index.js +1 -1
  13. package/dist/{Button.vue_vue_type_script_setup_true_lang-DTZUw0pf.js → Button.vue_vue_type_script_setup_true_lang-CYE9whgK.js} +2 -2
  14. package/dist/Checkbox/index.js +1 -1
  15. package/dist/{Checkbox.vue_vue_type_style_index_0_lang-Dzren1pf.js → Checkbox.vue_vue_type_style_index_0_lang-B37LXBOT.js} +2 -2
  16. package/dist/CheckboxGroup/index.js +1 -1
  17. package/dist/Chip/index.js +2 -2
  18. package/dist/{Chip.vue_vue_type_style_index_0_lang-BPdU3Pgk.js → Chip.vue_vue_type_style_index_0_lang-B8XnEjIk.js} +2 -2
  19. package/dist/ChipGroup/index.js +1 -1
  20. package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-D4A14AxB.js → ChipGroup.vue_vue_type_style_index_0_lang-CYarh7Jx.js} +2 -2
  21. package/dist/ColorPicker/index.js +1 -1
  22. package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-CAzVW3da.js → ColorPicker.vue_vue_type_style_index_0_lang-BhznZQOS.js} +3 -3
  23. package/dist/ColorSwatch/index.js +1 -1
  24. package/dist/{ColorSwatch-LVdDBugO.js → ColorSwatch-GhXGfFR9.js} +1 -1
  25. package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-htOyCGxU.js → ColorSwatch.vue_vue_type_style_index_0_lang-CXh-dgyg.js} +3 -3
  26. package/dist/ColorSwatchGroup/index.js +1 -1
  27. package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-Cv2D2XJ5.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DMWiKVRG.js} +4 -4
  28. package/dist/ColorTrigger/index.js +1 -1
  29. package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-CNeFfFIE.js → ColorTrigger.vue_vue_type_style_index_0_lang-Cu8MO8RU.js} +3 -3
  30. package/dist/Combobox/index.js +1 -1
  31. package/dist/{Combobox.vue_vue_type_style_index_0_lang-Cj3maBpd.js → Combobox.vue_vue_type_style_index_0_lang-BsO5vzLB.js} +15 -15
  32. package/dist/Comment/CommentEditor.d.ts +14 -13
  33. package/dist/Comment/index.js +340 -1751
  34. package/dist/Comment/index.umd.cjs +1 -1
  35. package/dist/DataTable/index.js +1 -1
  36. package/dist/{DataTable.vue_vue_type_style_index_0_lang-CW2i09wf.js → DataTable.vue_vue_type_style_index_0_lang-DE97OF7f.js} +13 -13
  37. package/dist/DropZone/index.js +1 -1
  38. package/dist/{DropZone.vue_vue_type_style_index_0_lang-CF9qXlg0.js → DropZone.vue_vue_type_style_index_0_lang-gguAkRve.js} +2 -2
  39. package/dist/Empty/index.js +1 -1
  40. package/dist/{Empty.vue_vue_type_style_index_0_lang-BAbEBeZo.js → Empty.vue_vue_type_style_index_0_lang-YvYjr_zz.js} +1 -1
  41. package/dist/FloatButton/index.js +1 -1
  42. package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-PYw1Yz9o.js → FloatButton.vue_vue_type_script_setup_true_lang-Ck9ilRKa.js} +2 -2
  43. package/dist/Form/index.js +1 -1
  44. package/dist/GOPicker/index.js +1 -1
  45. package/dist/{GOPicker.vue_vue_type_style_index_0_lang-DVZ2wSgV.js → GOPicker.vue_vue_type_style_index_0_lang-D9A9w-Pa.js} +11 -11
  46. package/dist/GraphicalObject/index.js +1 -1
  47. package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-C949W-Ro.js → GraphicalObject.vue_vue_type_script_setup_true_lang-CEul2ZDZ.js} +3 -3
  48. package/dist/GraphicalObjectGroup/index.js +1 -1
  49. package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-CYUJM_Vv.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-lN6Gzj19.js} +2 -2
  50. package/dist/Icon/index.js +1 -1
  51. package/dist/{Icon.vue_vue_type_style_index_0_lang-BUvEzzua.js → Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js} +13 -13
  52. package/dist/IconButton/index.js +1 -1
  53. package/dist/{IconButton.vue_vue_type_script_setup_true_lang-BBnCpnF1.js → IconButton.vue_vue_type_script_setup_true_lang-BG-vYXAP.js} +2 -2
  54. package/dist/Image/index.js +1 -1
  55. package/dist/{Image.vue_vue_type_style_index_0_lang-UVOAmZXt.js → Image.vue_vue_type_style_index_0_lang-Bzg_B3NK.js} +2 -2
  56. package/dist/IndentLevel/index.js +1 -1
  57. package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-59akXJBr.js → IndentLevel.vue_vue_type_style_index_0_lang-C7d2_3hI.js} +3 -3
  58. package/dist/Indicator/index.js +1 -1
  59. package/dist/{Indicator.vue_vue_type_script_setup_true_lang-AJV4EFOO.js → Indicator.vue_vue_type_script_setup_true_lang-DMYJ5Fn6.js} +2 -2
  60. package/dist/Input/index.js +1 -1
  61. package/dist/{Input.vue_vue_type_style_index_0_lang-D4aCRGW6.js → Input.vue_vue_type_style_index_0_lang-DkuxhdXR.js} +2 -2
  62. package/dist/Kbd/index.js +1 -1
  63. package/dist/{Kbd.vue_vue_type_style_index_0_lang-DpjuML9o.js → Kbd.vue_vue_type_style_index_0_lang-iUfSP9TC.js} +1 -1
  64. package/dist/Label/index.js +1 -1
  65. package/dist/Link/index.js +1 -1
  66. package/dist/{Link.vue_vue_type_style_index_0_lang-CsBkek74.js → Link.vue_vue_type_style_index_0_lang-TePg8XgW.js} +1 -1
  67. package/dist/Menu/index.js +1 -1
  68. package/dist/MenuItem/index.js +1 -1
  69. package/dist/{MenuItem.vue_vue_type_style_index_0_lang-DNlGDoyp.js → MenuItem.vue_vue_type_style_index_0_lang-D_lWThP0.js} +3 -3
  70. package/dist/Pagination/Pagination.d.ts +60 -0
  71. package/dist/Pagination/index.d.ts +2 -1
  72. package/dist/Pagination/index.js +6 -1
  73. package/dist/Pagination/index.umd.cjs +1 -1
  74. package/dist/Pagination.vue_vue_type_style_index_0_lang-CDaeQOJb.js +1 -0
  75. package/dist/Pagination.vue_vue_type_style_index_0_lang-D8oCaF6X.js +224 -0
  76. package/dist/Popover/index.js +1 -1
  77. package/dist/{Popover.vue_vue_type_style_index_0_lang-Bdu86hho.js → Popover.vue_vue_type_style_index_0_lang-DLboppFN.js} +1 -1
  78. package/dist/Progress/index.d.ts +3 -0
  79. package/dist/Progress/index.js +15 -0
  80. package/dist/Progress/index.umd.cjs +1 -0
  81. package/dist/Progress.vue_vue_type_style_index_0_lang-BEHOwYFc.js +447 -0
  82. package/dist/Progress.vue_vue_type_style_index_0_lang-WHi3Gv1W.js +1 -0
  83. package/dist/RadioGroup/index.js +1 -1
  84. package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-BVfQx8wD.js → RadioGroup.vue_vue_type_script_setup_true_lang-BEPTbeyN.js} +2 -2
  85. package/dist/ScrollContainer/index.js +1 -1
  86. package/dist/{ScrollContainer.vue_vue_type_style_index_0_lang-DGUSuq_n.js → ScrollContainer.vue_vue_type_style_index_0_lang-DqLbpFbD.js} +1 -1
  87. package/dist/Segmented/index.js +1 -1
  88. package/dist/{Segmented.vue_vue_type_style_index_0_lang-MoP3QO8x.js → Segmented.vue_vue_type_style_index_0_lang-B52Fuc2U.js} +1 -1
  89. package/dist/Select/index.js +1 -1
  90. package/dist/{Select.vue_vue_type_style_index_0_lang-D-dLDaBy.js → Select.vue_vue_type_style_index_0_lang-NsFWEuv3.js} +7 -7
  91. package/dist/Shortcut/index.js +1 -1
  92. package/dist/{Shortcut.vue_vue_type_style_index_0_lang-BXy0S1__.js → Shortcut.vue_vue_type_style_index_0_lang-D0pRaguA.js} +2 -2
  93. package/dist/Spinner/index.js +1 -1
  94. package/dist/{Spinner.vue_vue_type_style_index_0_lang-BacaASPe.js → Spinner.vue_vue_type_style_index_0_lang-Bx_MQ7lE.js} +1 -1
  95. package/dist/SubMenu/index.js +1 -1
  96. package/dist/Switch/index.js +1 -1
  97. package/dist/{Switch.vue_vue_type_style_index_0_lang--RYeL-jW.js → Switch.vue_vue_type_style_index_0_lang-CnwcbtZs.js} +2 -2
  98. package/dist/{THead.vue_vue_type_style_index_0_lang-DfOi9-Nh.js → THead.vue_vue_type_style_index_0_lang-BEFUWFjk.js} +1 -1
  99. package/dist/Table/index.js +1 -1
  100. package/dist/Textarea/index.js +1 -1
  101. package/dist/{Textarea.vue_vue_type_style_index_0_lang-CPto-5VY.js → Textarea.vue_vue_type_style_index_0_lang-DPWaIFuD.js} +3 -3
  102. package/dist/Tree/index.js +1 -1
  103. package/dist/{Tree.vue_vue_type_style_index_0_lang-D-mTy1Es.js → Tree.vue_vue_type_style_index_0_lang-Dh0qoB5W.js} +5 -5
  104. package/dist/Upload/UploadTrigger.d.ts +2 -2
  105. package/dist/Upload/index.d.ts +4 -1
  106. package/dist/Upload/index.js +14 -1
  107. package/dist/Upload/index.umd.cjs +1 -1
  108. package/dist/Upload/types.d.ts +4 -1
  109. package/dist/Upload.vue_vue_type_style_index_0_lang-DC0jVRjM.js +1012 -0
  110. package/dist/Upload.vue_vue_type_style_index_0_lang-oVgy1020.js +1 -0
  111. package/dist/index.d.ts +1 -0
  112. package/dist/index.js +198 -171
  113. package/dist/index.umd.cjs +1 -1
  114. package/dist/{sortBy-BoHPhPoZ.js → sortBy-CUiSA46K.js} +16 -16
  115. package/dist/style/index.css +1 -1
  116. package/dist/{uniq-iuU6YkEW.js → uniq-Bk9D4jYg.js} +1 -1
  117. package/dist/{useInputDataStates-CJoP9BXy.js → useInputDataStates-RRZVY4Vg.js} +1 -1
  118. package/dist/utils/index.js +2 -2
  119. package/package.json +6 -1
@@ -2,10 +2,10 @@ import { defineComponent as U, useSlots as J, computed as m, useAttrs as ce, cre
2
2
  import { getBemBlock as x, generateVariantClassList as I, normCls as b, getBemElement as M, usePCId as ee } from "@pantograph/utils";
3
3
  import { g as Q } from "./options-Bh1s18jm.js";
4
4
  import { cva as te } from "class-variance-authority";
5
- import { j as E, k as me, o as ve, t as Y, s as fe, q as be } from "./Icon.vue_vue_type_style_index_0_lang-BUvEzzua.js";
5
+ import { j as E, k as me, o as ve, t as Y, s as fe, q as be } from "./Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js";
6
6
  import { i as he } from "./index-BTuMaS--.js";
7
- import { _ as ke } from "./Popover.vue_vue_type_style_index_0_lang-Bdu86hho.js";
8
- import { U as le } from "./useInputDataStates-CJoP9BXy.js";
7
+ import { _ as ke } from "./Popover.vue_vue_type_style_index_0_lang-DLboppFN.js";
8
+ import { U as le } from "./useInputDataStates-RRZVY4Vg.js";
9
9
  import { createContext as ae } from "reka-ui";
10
10
  const oe = ["sm", "md", "lg"], Se = [...oe, "none"], y = x("menu_item"), ie = /* @__PURE__ */ U({
11
11
  ...Q("MenuItemContent"),
@@ -0,0 +1,60 @@
1
+ import { PaginationJustify } from './Pagination.model';
2
+ import { ClassValue } from 'class-variance-authority/types';
3
+ export interface PaginationProps {
4
+ page?: number;
5
+ total?: number;
6
+ showInput?: boolean;
7
+ iconButton?: boolean;
8
+ simple?: boolean;
9
+ hidePerv?: boolean;
10
+ hideNext?: boolean;
11
+ hideSize?: boolean;
12
+ hideTotal?: boolean;
13
+ resetPageOnChangeSize?: boolean;
14
+ sizes?: number[];
15
+ pageSize?: number;
16
+ pervText?: string;
17
+ nextText?: string;
18
+ pageText?: string;
19
+ justify?: PaginationJustify;
20
+ class?: ClassValue;
21
+ sizeCls?: ClassValue;
22
+ paginationCls?: ClassValue;
23
+ totalCls?: ClassValue;
24
+ itemCls?: ClassValue;
25
+ paginationTextCls?: ClassValue;
26
+ paginationCurrentCls?: ClassValue;
27
+ paginationCountCls?: ClassValue;
28
+ }
29
+ export interface PaginationEmits {
30
+ 'update:pageSize': [value: number];
31
+ /** Event handler called when the page value changes */
32
+ 'update:page': [value: number];
33
+ }
34
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<PaginationProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
35
+ "update:pageSize": (value: number) => any;
36
+ "update:page": (value: number) => any;
37
+ }, string, import('vue').PublicProps, Readonly<PaginationProps> & Readonly<{
38
+ "onUpdate:pageSize"?: ((value: number) => any) | undefined;
39
+ "onUpdate:page"?: ((value: number) => any) | undefined;
40
+ }>, {
41
+ total: number;
42
+ pervText: string;
43
+ nextText: string;
44
+ pageText: string;
45
+ justify: PaginationJustify;
46
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
47
+ total?(_: {
48
+ start: number;
49
+ end: number;
50
+ total: number;
51
+ page: number;
52
+ pageCount: number;
53
+ }): any;
54
+ }>;
55
+ export default _default;
56
+ type __VLS_WithTemplateSlots<T, S> = T & {
57
+ new (): {
58
+ $slots: S;
59
+ };
60
+ };
@@ -1 +1,2 @@
1
- export {};
1
+ export { type PaginationProps, type PaginationEmits, default, default as Pagination, } from './Pagination';
2
+ export * from './Pagination.model';
@@ -1 +1,6 @@
1
-
1
+ import { _ as s, P as t, _ as n } from "../Pagination.vue_vue_type_style_index_0_lang-D8oCaF6X.js";
2
+ export {
3
+ s as Pagination,
4
+ t as PaginationJustifies,
5
+ n as default
6
+ };
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Pagination.vue_vue_type_style_index_0_lang-CDaeQOJb.js");exports.Pagination=e._sfc_main;exports.PaginationJustifies=e.PaginationJustifies;exports.default=e._sfc_main;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),y=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),L=require("class-variance-authority"),O=require("./Divider.vue_vue_type_style_index_0_lang-B1VnMpBg.js"),F=require("./Segmented.vue_vue_type_style_index_0_lang-BvBq13y7.js"),$=require("./Input.vue_vue_type_style_index_0_lang-DEQgofJ1.js"),E=require("./BaseButton.vue_vue_type_style_index_0_lang-Cc9byFK5.js"),j=require("lodash-es"),A=require("./options-CY2uxp5A.js"),l=require("@pantograph/utils"),V=["between","start","center","end"],J=["onClick"],U=e.defineComponent({...A.getComponentOptions("Pagination"),__name:"Pagination",props:{page:{},total:{default:0},showInput:{type:Boolean},iconButton:{type:Boolean},simple:{type:Boolean},hidePerv:{type:Boolean},hideNext:{type:Boolean},hideSize:{type:Boolean},hideTotal:{type:Boolean},resetPageOnChangeSize:{type:Boolean},sizes:{},pageSize:{},pervText:{default:"Previous"},nextText:{default:"Next"},pageText:{default:"Page"},justify:{default:"between"},class:{},sizeCls:{},paginationCls:{},totalCls:{},itemCls:{},paginationTextCls:{},paginationCurrentCls:{},paginationCountCls:{}},emits:["update:pageSize","update:page"],setup(S,{emit:b}){const o=S,z=b,i=l.getBemBlock("pagination"),c=l.getBemElement(i,"pagination"),I=L.cva(i,{variants:{justify:l.generateVariantClassList(V,i),simple:l.generateVariantClassList("simple",i)}}),x=e.computed(()=>o.sizes??[10,25,50,100]),s=y.useVModel(o,"page",z,{passive:o.page===void 0,defaultValue:1}),d=y.useVModel(o,"pageSize",z,{passive:o.pageSize===void 0,defaultValue:o.pageSize??j.first(x.value),onChange(){o.resetPageOnChangeSize&&(s.value=1)}}),g=e.computed(()=>Math.min(Math.max(s.value??1,0),r.value)),N=e.computed(()=>o.total??0),k=e.computed(()=>d.value??0),r=e.computed(()=>Math.max(1,Math.ceil(N.value/k.value))),M=e.computed(()=>{const n=o.total??0,t=g.value,a=n&&t?(t-1)*k.value+1:0;return{start:a,end:Math.min(a+k.value-1,n),total:o.total,page:t,pageCount:r.value}}),f="ellipsis",v=(n,t)=>{const a=t-n+1;return Array.from({length:a},(m,u)=>u+n)},C=n=>n.map(t=>typeof t=="number"?{type:"page",value:t}:{type:"ellipsis"}),T=e.computed(()=>{const t=r.value,a=2,m=Math.max(g.value-a,1),u=Math.min(g.value+a,t),B=Math.min(2*a+5,r.value)-2,_=m>3&&Math.abs(t-B-1+1)>2&&Math.abs(m-1)>2,h=u<t-2&&Math.abs(t-B)>2&&Math.abs(t-u)>2;if(!_&&h){const p=v(1,B);return C([...p,f,t])}if(_&&!h){const p=v(t-B+1,t);return C([1,f,...p])}if(_&&h){const p=v(m,u);return C([1,f,...p,f,t])}return C(v(1,t))}),q=()=>{s.value=(s.value??2)-1},D=()=>{s.value=(s.value??0)+1},w=n=>{y.isNumber(n.value)&&(s.value=n.value,e.nextTick(()=>{var t,a;return(a=(t=P.value)==null?void 0:t.focus)==null?void 0:a.call(t)}))},P=e.ref(),R=n=>{const t=n.value===g.value;return{"data-selected":t,ref:a=>{a&&t&&(P.value=a)}}};return(n,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(I)(o),o.class))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(c),o.paginationCls))},[n.hidePerv?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E._sfc_main,{key:0,size:"sm",type:"ghost",variant:o.iconButton?"icon":"simple",preIcon:"tabler:chevron-left",icon:"tabler:chevron-left",preIconFlipOnDir:"rtl",disabled:!!(e.unref(s)&&e.unref(s)<=1),onClick:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.pervText),1)]),_:1},8,["variant","disabled"])),n.simple?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(c),"text"),o.paginationTextCls))},e.toDisplayString(n.pageText),3),n.showInput?(e.openBlock(),e.createBlock($._sfc_main,{key:0,modelValue:e.unref(s),"onUpdate:modelValue":t[0]||(t[0]=a=>e.isRef(s)?s.value=a:null),size:"sm",type:"number",min:"1",step:"1",max:r.value,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(c),"current"),o.paginationCurrentCls))},null,8,["modelValue","max","class"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(c),"current"),o.paginationCurrentCls))},e.toDisplayString(e.unref(s)),3)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(c),"count"),o.paginationCountCls))},[t[2]||(t[2]=e.createElementVNode("div",null,"/",-1)),e.createElementVNode("div",null,e.toDisplayString(r.value),1)],2)],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(T.value,(a,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.value??a.type},[a.type==="page"?(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:0,onClick:u=>w(a),class:e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(i),"item"),n.itemCls)},{ref_for:!0},R(a)),e.toDisplayString(a.value),17,J)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(i),"item"),n.itemCls))},[e.createVNode(y._sfc_main$3,{size:"12px",icon:"tabler:dots"})],2))],64))),128)),n.hideNext?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E._sfc_main,{key:3,size:"sm",type:"ghost",variant:o.iconButton?"icon":"simple",postIcon:"tabler:chevron-right",icon:"tabler:chevron-right",postIconFlipOnDir:"rtl",disabled:!!(e.unref(s)&&e.unref(s)>=r.value),onClick:D},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.nextText),1)]),_:1},8,["variant","disabled"]))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(i),"pageSize"),o.sizeCls))},[n.hideSize?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F._sfc_main,{key:0,options:x.value,size:"sm",modelValue:e.unref(d),"onUpdate:modelValue":t[1]||(t[1]=a=>e.isRef(d)?d.value=a:null)},null,8,["options","modelValue"])),!n.hideTotal&&!n.hideSize?(e.openBlock(),e.createBlock(O._sfc_main,{key:1,type:"vertical",class:e.normalizeClass(e.unref(l.getBemElement)(e.unref(i),"divider"))},null,8,["class"])):e.createCommentVNode("",!0),n.hideTotal?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(i),"total"),o.totalCls))},[e.renderSlot(n.$slots,"total",e.normalizeProps(e.guardReactiveProps(M.value)))],2))],2)],2))}});exports.PaginationJustifies=V;exports._sfc_main=U;
@@ -0,0 +1,224 @@
1
+ import { defineComponent as X, computed as c, ref as Y, createElementBlock as d, openBlock as o, normalizeClass as l, unref as e, createElementVNode as v, createBlock as P, createCommentVNode as x, withCtx as E, createTextVNode as O, toDisplayString as f, Fragment as N, isRef as R, renderList as Z, mergeProps as ee, createVNode as te, renderSlot as ae, normalizeProps as ne, guardReactiveProps as se, nextTick as ie } from "vue";
2
+ import { u as L, k as oe, q as le } from "./Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js";
3
+ import { cva as re } from "class-variance-authority";
4
+ import { _ as ue } from "./Divider.vue_vue_type_style_index_0_lang-CfBklijs.js";
5
+ import { _ as pe } from "./Segmented.vue_vue_type_style_index_0_lang-B52Fuc2U.js";
6
+ import { _ as de } from "./Input.vue_vue_type_style_index_0_lang-DkuxhdXR.js";
7
+ import { _ as D } from "./BaseButton.vue_vue_type_style_index_0_lang-DV59KCrZ.js";
8
+ import { first as me } from "lodash-es";
9
+ import { g as ce } from "./options-Bh1s18jm.js";
10
+ import { getBemBlock as ge, getBemElement as r, generateVariantClassList as F, normCls as u } from "@pantograph/utils";
11
+ const ve = ["between", "start", "center", "end"], fe = ["onClick"], Me = /* @__PURE__ */ X({
12
+ ...ce("Pagination"),
13
+ __name: "Pagination",
14
+ props: {
15
+ page: {},
16
+ total: { default: 0 },
17
+ showInput: { type: Boolean },
18
+ iconButton: { type: Boolean },
19
+ simple: { type: Boolean },
20
+ hidePerv: { type: Boolean },
21
+ hideNext: { type: Boolean },
22
+ hideSize: { type: Boolean },
23
+ hideTotal: { type: Boolean },
24
+ resetPageOnChangeSize: { type: Boolean },
25
+ sizes: {},
26
+ pageSize: {},
27
+ pervText: { default: "Previous" },
28
+ nextText: { default: "Next" },
29
+ pageText: { default: "Page" },
30
+ justify: { default: "between" },
31
+ class: {},
32
+ sizeCls: {},
33
+ paginationCls: {},
34
+ totalCls: {},
35
+ itemCls: {},
36
+ paginationTextCls: {},
37
+ paginationCurrentCls: {},
38
+ paginationCountCls: {}
39
+ },
40
+ emits: ["update:pageSize", "update:page"],
41
+ setup(j, { emit: U }) {
42
+ const s = j, _ = U, p = ge("pagination"), C = r(p, "pagination"), q = re(p, {
43
+ variants: {
44
+ justify: F(ve, p),
45
+ simple: F("simple", p)
46
+ }
47
+ }), w = c(() => s.sizes ?? [10, 25, 50, 100]), i = L(s, "page", _, {
48
+ passive: s.page === void 0,
49
+ defaultValue: 1
50
+ }), z = L(
51
+ s,
52
+ "pageSize",
53
+ _,
54
+ {
55
+ passive: s.pageSize === void 0,
56
+ defaultValue: s.pageSize ?? me(w.value),
57
+ onChange() {
58
+ s.resetPageOnChangeSize && (i.value = 1);
59
+ }
60
+ }
61
+ ), b = c(() => Math.min(Math.max(i.value ?? 1, 0), m.value)), A = c(() => s.total ?? 0), M = c(() => z.value ?? 0), m = c(() => Math.max(1, Math.ceil(A.value / M.value))), J = c(() => {
62
+ const a = s.total ?? 0, t = b.value, n = a && t ? (t - 1) * M.value + 1 : 0;
63
+ return {
64
+ start: n,
65
+ end: Math.min(n + M.value - 1, a),
66
+ total: s.total,
67
+ page: t,
68
+ pageCount: m.value
69
+ };
70
+ }), k = "ellipsis", B = (a, t) => {
71
+ const n = t - a + 1;
72
+ return Array.from({ length: n }, (h, g) => g + a);
73
+ }, I = (a) => a.map((t) => typeof t == "number" ? { type: "page", value: t } : { type: "ellipsis" }), G = c(() => {
74
+ const t = m.value, n = 2, h = Math.max(b.value - n, 1), g = Math.min(b.value + n, t), S = Math.min(2 * n + 5, m.value) - 2, V = (
75
+ // default condition
76
+ h > 3 && // if the current page is towards the end of the list
77
+ Math.abs(t - S - 1 + 1) > 2 && // if the current page is towards the middle of the list
78
+ Math.abs(h - 1) > 2
79
+ ), T = (
80
+ // default condition
81
+ g < t - 2 && // if the current page is towards the start of the list
82
+ Math.abs(t - S) > 2 && // if the current page is towards the middle of the list
83
+ Math.abs(t - g) > 2
84
+ );
85
+ if (!V && T) {
86
+ const y = B(1, S);
87
+ return I([...y, k, t]);
88
+ }
89
+ if (V && !T) {
90
+ const y = B(t - S + 1, t);
91
+ return I([1, k, ...y]);
92
+ }
93
+ if (V && T) {
94
+ const y = B(h, g);
95
+ return I([1, k, ...y, k, t]);
96
+ }
97
+ return I(B(1, t));
98
+ }), H = () => {
99
+ i.value = (i.value ?? 2) - 1;
100
+ }, K = () => {
101
+ i.value = (i.value ?? 0) + 1;
102
+ }, Q = (a) => {
103
+ le(a.value) && (i.value = a.value, ie(() => {
104
+ var t, n;
105
+ return (n = (t = $.value) == null ? void 0 : t.focus) == null ? void 0 : n.call(t);
106
+ }));
107
+ }, $ = Y(), W = (a) => {
108
+ const t = a.value === b.value;
109
+ return {
110
+ "data-selected": t,
111
+ ref: (n) => {
112
+ n && t && ($.value = n);
113
+ }
114
+ };
115
+ };
116
+ return (a, t) => (o(), d("div", {
117
+ class: l(e(u)(e(q)(s), s.class))
118
+ }, [
119
+ v("div", {
120
+ class: l(e(u)(e(C), s.paginationCls))
121
+ }, [
122
+ a.hidePerv ? x("", !0) : (o(), P(D, {
123
+ key: 0,
124
+ size: "sm",
125
+ type: "ghost",
126
+ variant: s.iconButton ? "icon" : "simple",
127
+ preIcon: "tabler:chevron-left",
128
+ icon: "tabler:chevron-left",
129
+ preIconFlipOnDir: "rtl",
130
+ disabled: !!(e(i) && e(i) <= 1),
131
+ onClick: H
132
+ }, {
133
+ default: E(() => [
134
+ O(f(a.pervText), 1)
135
+ ]),
136
+ _: 1
137
+ }, 8, ["variant", "disabled"])),
138
+ a.simple ? (o(), d(N, { key: 1 }, [
139
+ v("div", {
140
+ class: l(e(u)(e(r)(e(C), "text"), s.paginationTextCls))
141
+ }, f(a.pageText), 3),
142
+ a.showInput ? (o(), P(de, {
143
+ key: 0,
144
+ modelValue: e(i),
145
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => R(i) ? i.value = n : null),
146
+ size: "sm",
147
+ type: "number",
148
+ min: "1",
149
+ step: "1",
150
+ max: m.value,
151
+ class: l(e(u)(e(r)(e(C), "current"), s.paginationCurrentCls))
152
+ }, null, 8, ["modelValue", "max", "class"])) : (o(), d("div", {
153
+ key: 1,
154
+ class: l(e(u)(e(r)(e(C), "current"), s.paginationCurrentCls))
155
+ }, f(e(i)), 3)),
156
+ v("div", {
157
+ class: l(e(u)(e(r)(e(C), "count"), s.paginationCountCls))
158
+ }, [
159
+ t[2] || (t[2] = v("div", null, "/", -1)),
160
+ v("div", null, f(m.value), 1)
161
+ ], 2)
162
+ ], 64)) : (o(!0), d(N, { key: 2 }, Z(G.value, (n, h) => (o(), d(N, {
163
+ key: n.value ?? n.type
164
+ }, [
165
+ n.type === "page" ? (o(), d("button", ee({
166
+ key: 0,
167
+ onClick: (g) => Q(n),
168
+ class: e(u)(e(r)(e(p), "item"), a.itemCls)
169
+ }, { ref_for: !0 }, W(n)), f(n.value), 17, fe)) : (o(), d("div", {
170
+ key: 1,
171
+ class: l(e(u)(e(r)(e(p), "item"), a.itemCls))
172
+ }, [
173
+ te(oe, {
174
+ size: "12px",
175
+ icon: "tabler:dots"
176
+ })
177
+ ], 2))
178
+ ], 64))), 128)),
179
+ a.hideNext ? x("", !0) : (o(), P(D, {
180
+ key: 3,
181
+ size: "sm",
182
+ type: "ghost",
183
+ variant: s.iconButton ? "icon" : "simple",
184
+ postIcon: "tabler:chevron-right",
185
+ icon: "tabler:chevron-right",
186
+ postIconFlipOnDir: "rtl",
187
+ disabled: !!(e(i) && e(i) >= m.value),
188
+ onClick: K
189
+ }, {
190
+ default: E(() => [
191
+ O(f(a.nextText), 1)
192
+ ]),
193
+ _: 1
194
+ }, 8, ["variant", "disabled"]))
195
+ ], 2),
196
+ v("div", {
197
+ class: l(e(u)(e(r)(e(p), "pageSize"), s.sizeCls))
198
+ }, [
199
+ a.hideSize ? x("", !0) : (o(), P(pe, {
200
+ key: 0,
201
+ options: w.value,
202
+ size: "sm",
203
+ modelValue: e(z),
204
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => R(z) ? z.value = n : null)
205
+ }, null, 8, ["options", "modelValue"])),
206
+ !a.hideTotal && !a.hideSize ? (o(), P(ue, {
207
+ key: 1,
208
+ type: "vertical",
209
+ class: l(e(r)(e(p), "divider"))
210
+ }, null, 8, ["class"])) : x("", !0),
211
+ a.hideTotal ? x("", !0) : (o(), d("div", {
212
+ key: 2,
213
+ class: l(e(u)(e(r)(e(p), "total"), s.totalCls))
214
+ }, [
215
+ ae(a.$slots, "total", ne(se(J.value)))
216
+ ], 2))
217
+ ], 2)
218
+ ], 2));
219
+ }
220
+ });
221
+ export {
222
+ ve as P,
223
+ Me as _
224
+ };
@@ -1,4 +1,4 @@
1
- import { _ as a, a as s, P as r, _ as P } from "../Popover.vue_vue_type_style_index_0_lang-Bdu86hho.js";
1
+ import { _ as a, a as s, P as r, _ as P } from "../Popover.vue_vue_type_style_index_0_lang-DLboppFN.js";
2
2
  export {
3
3
  a as Popover,
4
4
  s as PopoverPlacements,
@@ -4,7 +4,7 @@ import { cva as Ce } from "class-variance-authority";
4
4
  import { useEmitAsProps as Oe, HoverCardRoot as De, PopoverRoot as be, HoverCardTrigger as Se, PopoverTrigger as Be, HoverCardPortal as Ne, PopoverPortal as Fe, HoverCardContent as ze, PopoverContent as we } from "reka-ui";
5
5
  import { g as Ae } from "./options-Bh1s18jm.js";
6
6
  import { u as Me } from "./index-BTuMaS--.js";
7
- import { w as n, r as Ie, o as ke, l as T, v as Ee, g as Le, h as Ue, f as $e } from "./Icon.vue_vue_type_style_index_0_lang-BUvEzzua.js";
7
+ import { w as n, r as Ie, o as ke, l as T, v as Ee, g as Le, h as Ue, f as $e } from "./Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js";
8
8
  const Re = ["sm", "md", "lg"], Xe = [
9
9
  "top",
10
10
  "top-start",
@@ -0,0 +1,3 @@
1
+ export * from './Progress.model';
2
+ export { default, default as Progress } from './Progress';
3
+ export { type ProgressStep, type ProgressSlots, type ProgressProps, type ProgressContext, injectProgressContext, provideProgressContext, } from './types';
@@ -0,0 +1,15 @@
1
+ import { _ as e, P as o, a, e as g, f as P, g as i, _ as t, i as p, c as f, d as x, b as l, p as C } from "../Progress.vue_vue_type_style_index_0_lang-BEHOwYFc.js";
2
+ export {
3
+ e as Progress,
4
+ o as ProgressBoldColors,
5
+ a as ProgressColors,
6
+ g as ProgressSizes,
7
+ P as ProgressStatuses,
8
+ i as ProgressTypes,
9
+ t as default,
10
+ p as injectProgressContext,
11
+ f as progressCirclePrefix,
12
+ x as progressLinePrefix,
13
+ l as progressPrefix,
14
+ C as provideProgressContext
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Progress.vue_vue_type_style_index_0_lang-WHi3Gv1W.js");exports.Progress=e._sfc_main;exports.ProgressBoldColors=e.ProgressBoldColors;exports.ProgressColors=e.ProgressColors;exports.ProgressSizes=e.ProgressSizes;exports.ProgressStatuses=e.ProgressStatuses;exports.ProgressTypes=e.ProgressTypes;exports.default=e._sfc_main;exports.injectProgressContext=e.injectProgressContext;exports.progressCirclePrefix=e.progressCirclePrefix;exports.progressLinePrefix=e.progressLinePrefix;exports.progressPrefix=e.progressPrefix;exports.provideProgressContext=e.provideProgressContext;