prlg-ui 1.8.59 → 1.8.60

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.
@@ -17,9 +17,9 @@ const b = () => {
17
17
  BASE: 1e3,
18
18
  DROPDOWN: 1010,
19
19
  STICKY: 1020,
20
- DRAWER: 1030,
21
- TOOLTIP: 1040,
22
- POPOVER: 1050,
20
+ TOOLTIP: 1030,
21
+ POPOVER: 1040,
22
+ DRAWER: 1050,
23
23
  MODAL: 1060,
24
24
  NOTIFICATION: 1070,
25
25
  DEBUG: 9999
@@ -1 +1 @@
1
- "use strict";const o=require("vue");let s=null;function u(){const e=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${e}px`,()=>{document.body.style.position="",document.body.style.top="",window.scrollTo(0,e)}}const d=()=>{s||(s=u())},i=()=>{s&&(s(),s=null)},f=()=>({unlockScroll:i,lockScroll:d}),a={BASE:1e3,DROPDOWN:1010,STICKY:1020,DRAWER:1030,TOOLTIP:1040,POPOVER:1050,MODAL:1060,NOTIFICATION:1070,DEBUG:9999},y=Symbol("z-index-context");let c=a.BASE;function p(){const e=o.inject(y,null);return e||{currentLayer:o.ref(c),getNextLayer:()=>(c+=10,c)}}const S=["data-layer"],m=o.defineComponent({__name:"Portal",props:{layer:{default:"BASE"},teleport:{type:Boolean,default:!0},target:{default:"body"},zIndex:{},show:{type:Boolean,default:!0}},setup(e){const t=e,{getNextLayer:l}=p(),n=o.computed(()=>t.zIndex?t.zIndex:t.layer&&t.layer!=="BASE"?a[t.layer]:l());return(r,B)=>r.show?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:r.target,disabled:!r.teleport},[o.createElementVNode("div",{style:o.normalizeStyle({zIndex:n.value,position:"relative"}),"data-layer":r.layer},[o.renderSlot(r.$slots,"default")],12,S)],8,["to","disabled"])):o.createCommentVNode("",!0)}});function E(){const e=new Map;return{on(t,l){const n=e.get(t)||[];n.push(l),e.set(t,n)},off(t,l){const n=e.get(t);n&&e.set(t,n.filter(r=>r!==l))},emit(t,l){const n=e.get(t);n&&n.forEach(r=>r(l))},clear(){e.clear()}}}exports.EventBus=E;exports._sfc_main=m;exports.useBodyScroll=f;
1
+ "use strict";const o=require("vue");let s=null;function u(){const e=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${e}px`,()=>{document.body.style.position="",document.body.style.top="",window.scrollTo(0,e)}}const d=()=>{s||(s=u())},i=()=>{s&&(s(),s=null)},f=()=>({unlockScroll:i,lockScroll:d}),a={BASE:1e3,DROPDOWN:1010,STICKY:1020,TOOLTIP:1030,POPOVER:1040,DRAWER:1050,MODAL:1060,NOTIFICATION:1070,DEBUG:9999},y=Symbol("z-index-context");let c=a.BASE;function p(){const e=o.inject(y,null);return e||{currentLayer:o.ref(c),getNextLayer:()=>(c+=10,c)}}const S=["data-layer"],m=o.defineComponent({__name:"Portal",props:{layer:{default:"BASE"},teleport:{type:Boolean,default:!0},target:{default:"body"},zIndex:{},show:{type:Boolean,default:!0}},setup(e){const t=e,{getNextLayer:l}=p(),n=o.computed(()=>t.zIndex?t.zIndex:t.layer&&t.layer!=="BASE"?a[t.layer]:l());return(r,B)=>r.show?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:r.target,disabled:!r.teleport},[o.createElementVNode("div",{style:o.normalizeStyle({zIndex:n.value,position:"relative"}),"data-layer":r.layer},[o.renderSlot(r.$slots,"default")],12,S)],8,["to","disabled"])):o.createCommentVNode("",!0)}});function E(){const e=new Map;return{on(t,l){const n=e.get(t)||[];n.push(l),e.set(t,n)},off(t,l){const n=e.get(t);n&&e.set(t,n.filter(r=>r!==l))},emit(t,l){const n=e.get(t);n&&n.forEach(r=>r(l))},clear(){e.clear()}}}exports.EventBus=E;exports._sfc_main=m;exports.useBodyScroll=f;
package/dist/index.d.ts CHANGED
@@ -139,7 +139,7 @@ modelValue: boolean;
139
139
  placement: Placement;
140
140
  arrowVisible: boolean;
141
141
  closeMode: PopoverCloseMode;
142
- zIndexLayer: "BASE" | "DROPDOWN" | "STICKY" | "DRAWER" | "TOOLTIP" | "POPOVER" | "MODAL" | "NOTIFICATION" | "DEBUG";
142
+ zIndexLayer: "BASE" | "DROPDOWN" | "STICKY" | "TOOLTIP" | "POPOVER" | "DRAWER" | "MODAL" | "NOTIFICATION" | "DEBUG";
143
143
  withoutStyle: boolean;
144
144
  }, {}, {}, {}, string, ComponentProvideOptions, true, {
145
145
  reference: HTMLDivElement;
@@ -237,6 +237,23 @@ declare const __VLS_component_23: DefineComponent<__VLS_Props_33, {}, {}, {}, {}
237
237
 
238
238
  declare const __VLS_component_24: DefineComponent<__VLS_Props_34, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_34> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
239
239
 
240
+ declare const __VLS_component_25: DefineComponent<ScheduleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
241
+ clear: () => any;
242
+ change: (value: DayOfWeek[]) => any;
243
+ "update:modelValue": (value: DayOfWeek[]) => any;
244
+ }, string, PublicProps, Readonly<ScheduleProps> & Readonly<{
245
+ onClear?: (() => any) | undefined;
246
+ onChange?: ((value: DayOfWeek[]) => any) | undefined;
247
+ "onUpdate:modelValue"?: ((value: DayOfWeek[]) => any) | undefined;
248
+ }>, {
249
+ disabled: boolean;
250
+ placeholder: string;
251
+ clearable: boolean;
252
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
253
+ scheduleTrigger: HTMLDivElement;
254
+ scheduleOverlay: HTMLDivElement;
255
+ }, HTMLDivElement>;
256
+
240
257
  declare const __VLS_component_3: DefineComponent<ColumnProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ColumnProps> & Readonly<{}>, {
241
258
  visible: boolean;
242
259
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
@@ -801,6 +818,26 @@ declare function __VLS_template_24(): {
801
818
  rootEl: HTMLDivElement;
802
819
  };
803
820
 
821
+ declare function __VLS_template_25(): {
822
+ attrs: Partial<{}>;
823
+ slots: {
824
+ input?(_: {
825
+ value: string;
826
+ }): any;
827
+ content?(_: {
828
+ close: typeof closeSchedule;
829
+ days: DayOfWeek[];
830
+ toggleDay: typeof toggleDay;
831
+ updateDayTime: typeof updateDayTime;
832
+ }): any;
833
+ };
834
+ refs: {
835
+ scheduleTrigger: HTMLDivElement;
836
+ scheduleOverlay: HTMLDivElement;
837
+ };
838
+ rootEl: HTMLDivElement;
839
+ };
840
+
804
841
  declare function __VLS_template_3(): {
805
842
  attrs: Partial<{}>;
806
843
  slots: Readonly<ColumnSlots> & ColumnSlots;
@@ -903,6 +940,8 @@ declare type __VLS_TemplateResult_23 = ReturnType<typeof __VLS_template_23>;
903
940
 
904
941
  declare type __VLS_TemplateResult_24 = ReturnType<typeof __VLS_template_24>;
905
942
 
943
+ declare type __VLS_TemplateResult_25 = ReturnType<typeof __VLS_template_25>;
944
+
906
945
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
907
946
 
908
947
  declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
@@ -1019,6 +1058,12 @@ declare type __VLS_WithTemplateSlots_24<T, S> = T & {
1019
1058
  };
1020
1059
  };
1021
1060
 
1061
+ declare type __VLS_WithTemplateSlots_25<T, S> = T & {
1062
+ new (): {
1063
+ $slots: S;
1064
+ };
1065
+ };
1066
+
1022
1067
  declare type __VLS_WithTemplateSlots_3<T, S> = T & {
1023
1068
  new (): {
1024
1069
  $slots: S;
@@ -1163,6 +1208,8 @@ export declare const ChipCheckbox: DefineComponent<__VLS_PublicProps_4, {}, {},
1163
1208
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
1164
1209
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1165
1210
 
1211
+ declare function closeSchedule(): void;
1212
+
1166
1213
  export declare const Column: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
1167
1214
 
1168
1215
  declare type Column_2 = {
@@ -1299,6 +1346,13 @@ inputRef: HTMLDivElement;
1299
1346
  popoverRef: HTMLDivElement;
1300
1347
  }, HTMLDivElement>;
1301
1348
 
1349
+ declare interface DayOfWeek {
1350
+ key: string;
1351
+ label: string;
1352
+ enabled: boolean;
1353
+ time?: TimeRange;
1354
+ }
1355
+
1302
1356
  export declare const Divider: __VLS_WithTemplateSlots_19<typeof __VLS_component_19, __VLS_TemplateResult_19["slots"]>;
1303
1357
 
1304
1358
  export declare const Drawer: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
@@ -1348,6 +1402,9 @@ declare interface ICalendarProps {
1348
1402
  * - day - выбор дня, месяца и года
1349
1403
  * - month - выбор месяца и года
1350
1404
  * - year - выбор года
1405
+ * - date - только выбор даты
1406
+ * - datetime - выбор даты и времени
1407
+ * - time - только выбор времени
1351
1408
  *
1352
1409
  * @default 'day'
1353
1410
  * */
@@ -1402,7 +1459,7 @@ declare type ICalendarResult = {
1402
1459
 
1403
1460
  declare type ICalendarResultValue = string | ICalendarResult | null;
1404
1461
 
1405
- declare type ICalendarType = 'month' | 'year' | 'day';
1462
+ declare type ICalendarType = 'month' | 'year' | 'day' | 'date' | 'datetime' | 'time';
1406
1463
 
1407
1464
  export declare const IconField: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
1408
1465
 
@@ -1653,6 +1710,19 @@ declare interface Props_2 {
1653
1710
 
1654
1711
  export declare const Radio: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
1655
1712
 
1713
+ export declare const Schedule: __VLS_WithTemplateSlots_25<typeof __VLS_component_25, __VLS_TemplateResult_25["slots"]>;
1714
+
1715
+ declare interface ScheduleProps {
1716
+ /** Массив дней недели с их состоянием */
1717
+ modelValue?: DayOfWeek[];
1718
+ /** Текст плейсхолдера, отображаемый при отсутствии значения */
1719
+ placeholder?: string;
1720
+ /** Отключает взаимодействие с компонентом */
1721
+ disabled?: boolean;
1722
+ /** Показывает кнопку очистки значения */
1723
+ clearable?: boolean;
1724
+ }
1725
+
1656
1726
  export declare const SelectButton: DefineComponent<__VLS_PublicProps_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1657
1727
  "update:modelValue": (value: any) => any;
1658
1728
  }, string, PublicProps, Readonly<__VLS_PublicProps_10> & Readonly<{
@@ -1869,6 +1939,11 @@ onFocusOut?: ((value: FocusEvent) => any) | undefined;
1869
1939
  textareaRef: HTMLTextAreaElement;
1870
1940
  }, HTMLDivElement>;
1871
1941
 
1942
+ declare interface TimeRange {
1943
+ from: string;
1944
+ to: string;
1945
+ }
1946
+
1872
1947
  export declare const Toast: DefineComponent<ToastProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ToastProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1873
1948
 
1874
1949
  /**
@@ -1969,6 +2044,8 @@ declare interface ToastServiceMethods {
1969
2044
  removeAllGroups(): void;
1970
2045
  }
1971
2046
 
2047
+ declare function toggleDay(dayKey: string): void;
2048
+
1972
2049
  export declare const Tooltip: DefineComponent<TooltipProps, {
1973
2050
  show: (element: HTMLElement) => void;
1974
2051
  hide: () => void;
@@ -2005,6 +2082,8 @@ declare interface TooltipProps {
2005
2082
  delay?: number;
2006
2083
  }
2007
2084
 
2085
+ declare function updateDayTime(dayKey: string, timeRange: TimeRange | undefined): void;
2086
+
2008
2087
  export declare const useConfirmDialog: () => ConfirmDialogService;
2009
2088
 
2010
2089
  export declare const useConfirmPopup: () => ConfirmPopupService;
@@ -2015,9 +2094,9 @@ declare const Z_INDEX: {
2015
2094
  readonly BASE: 1000;
2016
2095
  readonly DROPDOWN: 1010;
2017
2096
  readonly STICKY: 1020;
2018
- readonly DRAWER: 1030;
2019
- readonly TOOLTIP: 1040;
2020
- readonly POPOVER: 1050;
2097
+ readonly TOOLTIP: 1030;
2098
+ readonly POPOVER: 1040;
2099
+ readonly DRAWER: 1050;
2021
2100
  readonly MODAL: 1060;
2022
2101
  readonly NOTIFICATION: 1070;
2023
2102
  readonly DEBUG: 9999;