@mobileaction/action-kit 1.38.2 → 1.38.4

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.
@@ -0,0 +1,17 @@
1
+ import { openBlock as l, createElementBlock as o, createElementVNode as t } from "vue";
2
+ const r = {
3
+ xmlns: "http://www.w3.org/2000/svg",
4
+ fill: "currentColor",
5
+ viewBox: "0 0 24 24"
6
+ };
7
+ function n(c, e) {
8
+ return l(), o("svg", r, e[0] || (e[0] = [
9
+ t("path", { d: "M15.712 16.773 7.227 8.288a.755.755 0 0 1 0-1.061c.29-.29.77-.29 1.06 0l8.486 8.485c.29.29.29.771 0 1.06-.29.29-.77.29-1.06 0Z" }, null, -1),
10
+ t("path", { d: "M7.227 16.773a.755.755 0 0 1 0-1.06l8.485-8.486a.756.756 0 0 1 1.061 0c.29.29.29.77 0 1.06l-8.485 8.486a.754.754 0 0 1-1.06 0Z" }, null, -1)
11
+ ]));
12
+ }
13
+ const s = { render: n };
14
+ export {
15
+ s as default,
16
+ n as render
17
+ };
@@ -1,2 +1,2 @@
1
- export declare const Animations: readonly ["rocket", "success-confetti", "rounded-loading", "fly-waiting", "no-data-found", "sad-not-found", "404-page", "maintenance"];
1
+ export declare const Animations: readonly ["rocket", "success-confetti", "rounded-loading", "fly-waiting", "no-data-found", "sad-not-found", "404-page", "maintenance", "rocket-loading"];
2
2
  export type AnimationName = (typeof Animations)[number];
@@ -0,0 +1 @@
1
+ export {};
@@ -1,26 +1,145 @@
1
+ export type MaDrawerPlacement = 'left' | 'right';
2
+ export type MaDrawerMarginSize = 'small' | 'medium' | 'none';
1
3
  export interface MaDrawerProps {
2
- placement?: string;
3
- visible?: boolean;
4
- header?: string;
5
- content?: string;
6
- footer?: string;
7
- title?: string;
8
- description?: string;
4
+ /**
5
+ * Controls the visibility of the drawer.
6
+ * @default false
7
+ */
8
+ visible: boolean;
9
+ /**
10
+ * Sets the width of the drawer container.
11
+ */
12
+ width?: string;
13
+ /**
14
+ * Specifies the z-index of the drawer overlay.
15
+ * @default 10
16
+ */
17
+ zIndex?: number;
18
+ /**
19
+ * Determines the placement of the drawer on the screen.
20
+ * @default right
21
+ */
22
+ placement?: MaDrawerPlacement;
23
+ /**
24
+ * Determines whether the drawer should close when the close button is clicked.
25
+ * @default true
26
+ */
9
27
  closable?: boolean;
28
+ /**
29
+ * Determines whether the drawer should close when the overlay is clicked.
30
+ * @default true
31
+ */
32
+ maskClosable?: boolean;
33
+ /**
34
+ * Specifies the height of an external header (e.g., dashboard header) to account for when the drawer is fixed.
35
+ * This allows the drawer to adjust its position or size accordingly.
36
+ */
37
+ headerHeight?: string;
38
+ /**
39
+ * Makes the drawer header sticky (fixed) when scrolling.
40
+ * @default false
41
+ */
42
+ headerSticky?: boolean;
43
+ /**
44
+ * Makes the drawer footer sticky (fixed) when scrolling.
45
+ * @default false
46
+ */
47
+ footerSticky?: boolean;
48
+ /**
49
+ * Sets the margin size of the drawer container.
50
+ * @default small
51
+ */
52
+ marginSize?: MaDrawerMarginSize;
53
+ /**
54
+ * Sets the drawer's title.
55
+ */
56
+ title?: string;
57
+ /**
58
+ * Sets the drawer's subtitle.
59
+ */
60
+ hintText?: string;
10
61
  }
11
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<MaDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
- "update:visible": (...args: any[]) => void;
62
+ export interface MaDrawerEvents {
63
+ /**
64
+ * Emitted when the drawer's visibility changes.
65
+ * @param open - Indicates whether the drawer is now open (`true`) or closed (`false`).
66
+ */
67
+ (e: 'update:visible', open: boolean): void;
68
+ /**
69
+ * Emitted after the drawer has fully opened and the opening animation is complete.
70
+ */
71
+ (e: 'opened'): void;
72
+ /**
73
+ * Emitted after the drawer has fully closed and the closing animation is complete.
74
+ */
75
+ (e: 'closed'): void;
76
+ }
77
+ declare function __VLS_template(): {
78
+ attrs: Partial<{}>;
79
+ slots: Readonly<{
80
+ /**
81
+ * Slot for the drawer's header content.
82
+ * Typically used to display the title or controls.
83
+ */
84
+ header(): unknown;
85
+ /**
86
+ * Slot for the drawer's tab menu.
87
+ */
88
+ tabs(): unknown;
89
+ /**
90
+ * Default slot for the main content of the drawer.
91
+ * Used to display the primary information or interactive elements.
92
+ */
93
+ default(): unknown;
94
+ /**
95
+ * Slot for the drawer's footer content.
96
+ * Commonly used for action buttons or supplementary information.
97
+ */
98
+ footer(): unknown;
99
+ }> & {
100
+ /**
101
+ * Slot for the drawer's header content.
102
+ * Typically used to display the title or controls.
103
+ */
104
+ header(): unknown;
105
+ /**
106
+ * Slot for the drawer's tab menu.
107
+ */
108
+ tabs(): unknown;
109
+ /**
110
+ * Default slot for the main content of the drawer.
111
+ * Used to display the primary information or interactive elements.
112
+ */
113
+ default(): unknown;
114
+ /**
115
+ * Slot for the drawer's footer content.
116
+ * Commonly used for action buttons or supplementary information.
117
+ */
118
+ footer(): unknown;
119
+ };
120
+ refs: {};
121
+ rootEl: any;
122
+ };
123
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
124
+ declare const __VLS_component: import("vue").DefineComponent<MaDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
125
+ "update:visible": (open: boolean) => any;
126
+ opened: () => any;
127
+ closed: () => any;
13
128
  }, string, import("vue").PublicProps, Readonly<MaDrawerProps> & Readonly<{
14
- "onUpdate:visible"?: (...args: any[]) => any;
129
+ "onUpdate:visible"?: (open: boolean) => any;
130
+ onOpened?: () => any;
131
+ onClosed?: () => any;
15
132
  }>, {
16
- placement: string;
133
+ placement: MaDrawerPlacement;
17
134
  closable: boolean;
18
135
  visible: boolean;
19
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>, {
20
- header?(_: {}): any;
21
- content?(_: {}): any;
22
- footer?(_: {}): any;
23
- }>;
136
+ maskClosable: boolean;
137
+ zIndex: number;
138
+ headerSticky: boolean;
139
+ footerSticky: boolean;
140
+ marginSize: MaDrawerMarginSize;
141
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
142
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
143
  export default _default;
25
144
  type __VLS_WithTemplateSlots<T, S> = T & {
26
145
  new (): {
@@ -0,0 +1,19 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3';
2
+ import MaDrawer from '@/components/drawer/index.vue';
3
+ declare const meta: Meta<typeof MaDrawer>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof MaDrawer>;
6
+ export declare const Default: Story;
7
+ export declare const WithNoTitle: Story;
8
+ export declare const WithoutHeaderAndFooter: Story;
9
+ export declare const WithHintText: Story;
10
+ export declare const WithCustomWidth: Story;
11
+ export declare const WithCustomHeader: Story;
12
+ export declare const WithHeaderAndTabs: Story;
13
+ export declare const WithScrollContent: Story;
14
+ export declare const WithTopOffset: Story;
15
+ export declare const WithStickyHeader: Story;
16
+ export declare const WithStickyFooter: Story;
17
+ export declare const WithStickyHeaderAndFooter: Story;
18
+ export declare const WithAdvancedHeader: Story;
19
+ export declare const WithBodyOverflow: Story;
@@ -1,15 +1,15 @@
1
1
  import { Popover2TriggerType, Popover2Placement } from './types';
2
2
  export interface MaPopover2Props {
3
- visible: boolean | undefined;
3
+ visible?: boolean | undefined;
4
4
  trigger?: Popover2TriggerType[];
5
5
  autoHide?: boolean;
6
6
  placement?: Popover2Placement;
7
7
  disabled?: boolean;
8
8
  isMobile?: boolean;
9
- className?: string;
9
+ overlayClassName?: string;
10
10
  showArrow?: boolean;
11
11
  noPadding?: boolean;
12
- popUpContainer?: HTMLElement | null | string;
12
+ popupContainer?: HTMLElement | null | string;
13
13
  }
14
14
  declare function __VLS_template(): {
15
15
  attrs: Partial<{}>;
@@ -31,14 +31,14 @@ declare const __VLS_component: import("vue").DefineComponent<MaPopover2Props, {}
31
31
  disabled: boolean;
32
32
  placement: Popover2Placement;
33
33
  trigger: Popover2TriggerType[];
34
+ overlayClassName: string;
34
35
  visible: boolean | undefined;
35
36
  showArrow: boolean;
36
- className: string;
37
37
  noPadding: boolean;
38
38
  autoHide: boolean;
39
39
  isMobile: boolean;
40
- popUpContainer: HTMLElement | null | string;
41
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
+ popupContainer: HTMLElement | null | string;
41
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
42
42
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
43
43
  export default _default;
44
44
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -12,14 +12,14 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
12
12
  disabled: boolean;
13
13
  placement: import("../types").Popover2Placement;
14
14
  trigger: import("../types").Popover2TriggerType[];
15
+ overlayClassName: string;
15
16
  visible: boolean | undefined;
16
17
  showArrow: boolean;
17
- className: string;
18
18
  noPadding: boolean;
19
19
  autoHide: boolean;
20
20
  isMobile: boolean;
21
- popUpContainer: HTMLElement | null | string;
22
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
21
+ popupContainer: HTMLElement | null | string;
22
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
23
23
  P: {};
24
24
  B: {};
25
25
  D: {};
@@ -33,13 +33,13 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
33
33
  disabled: boolean;
34
34
  placement: import("../types").Popover2Placement;
35
35
  trigger: import("../types").Popover2TriggerType[];
36
+ overlayClassName: string;
36
37
  visible: boolean | undefined;
37
38
  showArrow: boolean;
38
- className: string;
39
39
  noPadding: boolean;
40
40
  autoHide: boolean;
41
41
  isMobile: boolean;
42
- popUpContainer: HTMLElement | null | string;
42
+ popupContainer: HTMLElement | null | string;
43
43
  }>;
44
44
  __isFragment?: never;
45
45
  __isTeleport?: never;
@@ -54,13 +54,13 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
54
54
  disabled: boolean;
55
55
  placement: import("../types").Popover2Placement;
56
56
  trigger: import("../types").Popover2TriggerType[];
57
+ overlayClassName: string;
57
58
  visible: boolean | undefined;
58
59
  showArrow: boolean;
59
- className: string;
60
60
  noPadding: boolean;
61
61
  autoHide: boolean;
62
62
  isMobile: boolean;
63
- popUpContainer: HTMLElement | null | string;
63
+ popupContainer: HTMLElement | null | string;
64
64
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
65
65
  $slots: {
66
66
  default?(_: {}): any;
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof MaPopover2>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof MaPopover2>;
6
6
  export declare const Default: Story;
7
+ export declare const WithArrow: Story;
7
8
  export declare const Placements: Story;
8
9
  export declare const Mobile: Story;
9
10
  export declare const FooterExample: Story;