@rebilly/revel 4.21.2 → 5.0.0

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 (77) hide show
  1. package/CHANGELOG.md +28 -46
  2. package/README.md +23 -14
  3. package/dist/common/date-picker-compat.d.ts +1 -0
  4. package/dist/common/datetime-formats.d.ts +28 -0
  5. package/dist/common/helpers/debounce.d.ts +2 -0
  6. package/dist/common/helpers/deep-clone.d.ts +2 -0
  7. package/dist/common/helpers/format-date.d.ts +4 -0
  8. package/dist/common/helpers/index.d.ts +6 -0
  9. package/dist/common/helpers/is-object.d.ts +2 -0
  10. package/dist/common/helpers/kebab-case.d.ts +2 -0
  11. package/dist/components/index.d.ts +27 -0
  12. package/dist/components/r-avatar/r-avatar.vue.d.ts +86 -0
  13. package/dist/components/r-badge/r-badge.vue.d.ts +40 -0
  14. package/dist/components/r-button/r-button.vue.d.ts +195 -0
  15. package/dist/components/r-button-group/r-button-group.vue.d.ts +18 -0
  16. package/dist/components/r-checkbox/r-checkbox.vue.d.ts +148 -0
  17. package/dist/components/r-date-input/calendar-presets.d.ts +36 -0
  18. package/dist/components/r-date-input/r-calendar.vue.d.ts +159 -0
  19. package/dist/components/r-date-input/r-date-input.vue.d.ts +297 -0
  20. package/dist/components/r-date-input/r-date-range-button-group.vue.d.ts +167 -0
  21. package/dist/components/r-date-input/r-range-calendar.vue.d.ts +211 -0
  22. package/dist/components/r-date-input/shared-calendar-options.d.ts +64 -0
  23. package/dist/components/r-date-input/types.d.ts +8 -0
  24. package/dist/components/r-date-input/v-calendar.es.d.ts +459 -0
  25. package/dist/components/r-file-upload/r-file-upload.vue.d.ts +68 -0
  26. package/dist/components/r-grid/columnTypes/badge.vue.d.ts +42 -0
  27. package/dist/components/r-grid/columnTypes/date.vue.d.ts +25 -0
  28. package/dist/components/r-grid/columnTypes/index.d.ts +93 -0
  29. package/dist/components/r-grid/columnTypes/numeric.vue.d.ts +24 -0
  30. package/dist/components/r-grid/columnTypes/text.vue.d.ts +26 -0
  31. package/dist/components/r-grid/columnTypes/types.d.ts +24 -0
  32. package/dist/components/r-grid/helpers/color-generator.d.ts +4 -0
  33. package/dist/components/r-grid/r-grid.vue.d.ts +196 -0
  34. package/dist/components/r-icon/r-icon-sprites.d.ts +128 -0
  35. package/dist/components/r-icon/r-icon.vue.d.ts +61 -0
  36. package/dist/components/r-icon-button/r-icon-button.vue.d.ts +133 -0
  37. package/dist/components/r-img/r-img.vue.d.ts +96 -0
  38. package/dist/components/r-input/r-input.vue.d.ts +411 -0
  39. package/dist/components/r-loader/r-loader.vue.d.ts +55 -0
  40. package/dist/components/r-modal/r-modal.vue.d.ts +132 -0
  41. package/dist/components/r-month-picker/months.d.ts +1 -0
  42. package/dist/components/r-month-picker/r-month-picker.vue.d.ts +122 -0
  43. package/dist/components/r-pagination/r-pagination.vue.d.ts +97 -0
  44. package/dist/components/r-pagination/types.d.ts +8 -0
  45. package/dist/components/r-pagination-control/r-pagination-control.vue.d.ts +33 -0
  46. package/dist/components/r-popper/r-popper.vue.d.ts +275 -0
  47. package/dist/components/r-radio/r-radio.vue.d.ts +132 -0
  48. package/dist/components/r-repeater/r-repeater.vue.d.ts +58 -0
  49. package/dist/components/r-select/async-extension.d.ts +91 -0
  50. package/dist/components/r-select/r-select.vue.d.ts +733 -0
  51. package/dist/components/r-select/types.d.ts +29 -0
  52. package/dist/components/r-tabs/r-tab.vue.d.ts +70 -0
  53. package/dist/components/r-tabs/r-tabs.vue.d.ts +6983 -0
  54. package/dist/components/r-tabs/types.d.ts +23 -0
  55. package/dist/components/r-tile/r-tile.vue.d.ts +2 -0
  56. package/dist/components/r-toast/default-error-handler.d.ts +4 -0
  57. package/dist/components/r-toast/r-toast-manager.d.ts +17 -0
  58. package/dist/components/r-toast/r-toast.vue.d.ts +141 -0
  59. package/dist/components/r-toast/types.d.ts +19 -0
  60. package/dist/components/r-toggle/r-toggle.vue.d.ts +69 -0
  61. package/dist/directives/index.d.ts +8 -0
  62. package/dist/directives/r-click-outside/r-click-outside.d.ts +10 -0
  63. package/dist/directives/r-content/r-content.d.ts +9 -0
  64. package/dist/directives/r-fs-exclude.d.ts +7 -0
  65. package/dist/directives/r-lazy.d.ts +5 -0
  66. package/dist/directives/r-tooltip/r-tooltip.d.ts +12 -0
  67. package/dist/index.d.ts +20 -0
  68. package/dist/playground/Playground-copyme.vue.d.ts +2 -0
  69. package/dist/playground/main.d.ts +1 -0
  70. package/dist/revel.mjs +5577 -4744
  71. package/dist/revel.umd.js +115 -115
  72. package/dist/style.css +1 -1
  73. package/dist/styles/config.d.ts +32 -0
  74. package/dist/styles/index.d.ts +5 -0
  75. package/dist/styles/tokens.d.ts +130 -0
  76. package/dist/types.d.ts +24 -0
  77. package/package.json +107 -85
@@ -0,0 +1,23 @@
1
+ import type { Ref } from 'vue';
2
+ import type { RouteLocation } from 'vue-router';
3
+ import type { Optional } from '../../types';
4
+ export interface ReactiveTab {
5
+ tabId: Ref<string>;
6
+ tabPanelId: Ref<string>;
7
+ hidden: Ref<boolean>;
8
+ isActive: Ref<boolean>;
9
+ name: Ref<string>;
10
+ value: Ref<string>;
11
+ active: Ref<boolean>;
12
+ to: Optional<Ref<RouteLocation>>;
13
+ }
14
+ export interface Tab {
15
+ tabId: string;
16
+ tabPanelId: string;
17
+ hidden: boolean;
18
+ isActive: boolean;
19
+ name: string;
20
+ value: string;
21
+ active: boolean;
22
+ to: Optional<RouteLocation>;
23
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { ApiError, Nullable } from '../../types';
2
+ export declare class DefaultErrorHandler {
3
+ static parseError(error: Nullable<ApiError>, defaultMessage?: string): string[];
4
+ }
@@ -0,0 +1,17 @@
1
+ import type { App } from 'vue';
2
+ import { type ToastOption } from './types';
3
+ import type { ApiError } from '../../types';
4
+ interface GlobalOptions {
5
+ ErrorHandler?: {
6
+ parseError?: () => string[];
7
+ };
8
+ }
9
+ export declare const createRToastManager: (app: App, globalOptions?: GlobalOptions) => {
10
+ show(options: Partial<ToastOption> | string): void;
11
+ positive(message: string, options?: Partial<ToastOption>): void;
12
+ negative(message: string, options?: Partial<ToastOption>): void;
13
+ info(message: string, options?: Partial<ToastOption>): void;
14
+ warning(message: string, options?: Partial<ToastOption>): void;
15
+ fromError(error: ApiError, defaultMsg: string, params?: Partial<ToastOption>): void;
16
+ };
17
+ export {};
@@ -0,0 +1,141 @@
1
+ import { type PropType, type Component } from 'vue';
2
+ import type { Nullable } from '../../types';
3
+ interface State {
4
+ isVisible: boolean;
5
+ timerHandle: Nullable<ReturnType<typeof setTimeout>>;
6
+ parent: Nullable<HTMLElement>;
7
+ }
8
+ declare const _default: import("vue").DefineComponent<{
9
+ /**
10
+ * Specify toast type according to your theme colors
11
+ */
12
+ type: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ /**
17
+ * Change the toast title
18
+ */
19
+ title: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ /**
24
+ * Change the toast message
25
+ */
26
+ message: {
27
+ type: (StringConstructor | FunctionConstructor)[];
28
+ default: string;
29
+ };
30
+ /**
31
+ * Specify if the user is allowed to close the toast
32
+ */
33
+ allowClose: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ /**
38
+ * Specify is the toast visible
39
+ */
40
+ visible: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ /**
45
+ * Specify does the toast hide
46
+ */
47
+ autoHide: {
48
+ type: BooleanConstructor;
49
+ default: boolean;
50
+ };
51
+ /**
52
+ * Specify a hide delay time, ms
53
+ */
54
+ hideDelay: {
55
+ type: NumberConstructor;
56
+ default: number;
57
+ };
58
+ container: {
59
+ type: PropType<Nullable<HTMLElement>>;
60
+ default: null;
61
+ };
62
+ }, unknown, State, {
63
+ classes(): {
64
+ [x: string]: boolean;
65
+ 'is-closable': boolean;
66
+ 'is-visible': boolean;
67
+ };
68
+ markup(): Component | null;
69
+ }, {
70
+ setupContainer(): void;
71
+ setupAutoHide(): void;
72
+ disableAutoHide(): void;
73
+ show(): void;
74
+ hide(): void;
75
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "hide"[], "hide", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
76
+ /**
77
+ * Specify toast type according to your theme colors
78
+ */
79
+ type: {
80
+ type: StringConstructor;
81
+ default: string;
82
+ };
83
+ /**
84
+ * Change the toast title
85
+ */
86
+ title: {
87
+ type: StringConstructor;
88
+ default: string;
89
+ };
90
+ /**
91
+ * Change the toast message
92
+ */
93
+ message: {
94
+ type: (StringConstructor | FunctionConstructor)[];
95
+ default: string;
96
+ };
97
+ /**
98
+ * Specify if the user is allowed to close the toast
99
+ */
100
+ allowClose: {
101
+ type: BooleanConstructor;
102
+ default: boolean;
103
+ };
104
+ /**
105
+ * Specify is the toast visible
106
+ */
107
+ visible: {
108
+ type: BooleanConstructor;
109
+ default: boolean;
110
+ };
111
+ /**
112
+ * Specify does the toast hide
113
+ */
114
+ autoHide: {
115
+ type: BooleanConstructor;
116
+ default: boolean;
117
+ };
118
+ /**
119
+ * Specify a hide delay time, ms
120
+ */
121
+ hideDelay: {
122
+ type: NumberConstructor;
123
+ default: number;
124
+ };
125
+ container: {
126
+ type: PropType<Nullable<HTMLElement>>;
127
+ default: null;
128
+ };
129
+ }>> & {
130
+ onHide?: ((...args: any[]) => any) | undefined;
131
+ }, {
132
+ type: string;
133
+ title: string;
134
+ container: Nullable<HTMLElement>;
135
+ autoHide: boolean;
136
+ visible: boolean;
137
+ message: string | Function;
138
+ allowClose: boolean;
139
+ hideDelay: number;
140
+ }>;
141
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import type { ApiError } from '../../types';
2
+ export declare enum RToastTypes {
3
+ Positive = "positive",
4
+ Negative = "negative",
5
+ Warning = "warning",
6
+ Info = "info"
7
+ }
8
+ export interface ToastOption {
9
+ message: string;
10
+ type: `${RToastTypes}`;
11
+ }
12
+ export interface ToastPlugin {
13
+ show(options: ToastOption | string): void;
14
+ positive(message: string, options?: Partial<ToastOption>): void;
15
+ negative(message: string, options?: Partial<ToastOption>): void;
16
+ info(message: string, options?: Partial<ToastOption>): void;
17
+ warning(message: string, options?: Partial<ToastOption>): void;
18
+ fromError(error: ApiError, defaultMsg: string, params?: Partial<ToastOption>): void;
19
+ }
@@ -0,0 +1,69 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ /**
3
+ * Append text label near checkbox
4
+ */
5
+ label: {
6
+ type: StringConstructor;
7
+ default: null;
8
+ };
9
+ /**
10
+ * Native html input name for element
11
+ */
12
+ name: {
13
+ type: StringConstructor;
14
+ default: () => string;
15
+ };
16
+ /**
17
+ * Used to decide if checkbox is selected
18
+ */
19
+ modelValue: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ /**
24
+ * Disabled state similar to navite html element
25
+ */
26
+ disabled: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ }, unknown, unknown, {}, {
31
+ change(event: Event): void;
32
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
+ /**
34
+ * Append text label near checkbox
35
+ */
36
+ label: {
37
+ type: StringConstructor;
38
+ default: null;
39
+ };
40
+ /**
41
+ * Native html input name for element
42
+ */
43
+ name: {
44
+ type: StringConstructor;
45
+ default: () => string;
46
+ };
47
+ /**
48
+ * Used to decide if checkbox is selected
49
+ */
50
+ modelValue: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
54
+ /**
55
+ * Disabled state similar to navite html element
56
+ */
57
+ disabled: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
61
+ }>> & {
62
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
63
+ }, {
64
+ name: string;
65
+ label: string;
66
+ disabled: boolean;
67
+ modelValue: boolean;
68
+ }>;
69
+ export default _default;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Export all directives
3
+ */
4
+ export { RFSExcludeDirective as fsExclude } from './r-fs-exclude';
5
+ export { RClickOutsideDirective as clickOutside } from './r-click-outside/r-click-outside';
6
+ export { RTooltipDirective as tooltip } from './r-tooltip/r-tooltip';
7
+ export { RContentDirective as content } from './r-content/r-content';
8
+ export { RLazyDirective as lazy } from './r-lazy';
@@ -0,0 +1,10 @@
1
+ import type { Directive } from 'vue';
2
+ import type { Nullable } from '../../types';
3
+ interface ClickOutsideTarget extends HTMLElement {
4
+ clickOutside: Nullable<(event: MouseEvent) => void>;
5
+ }
6
+ /**
7
+ * Simple directive to add click-outside detection to a component
8
+ */
9
+ export declare const RClickOutsideDirective: Directive<ClickOutsideTarget>;
10
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { Directive } from 'vue';
2
+ interface ContentHTMLElement extends HTMLElement {
3
+ rContentAddedClass: string;
4
+ }
5
+ /**
6
+ * Simple directive to add additional content to RTile
7
+ */
8
+ export declare const RContentDirective: Directive<ContentHTMLElement>;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { Directive } from 'vue';
2
+ /**
3
+ * Simple directive to exclude element from Full Story
4
+ * Adding 'fs-exclude' class
5
+ * @see https://help.fullstory.com/technical-questions/exclude-elements
6
+ */
7
+ export declare const RFSExcludeDirective: Directive;
@@ -0,0 +1,5 @@
1
+ import type { Directive } from 'vue';
2
+ /**
3
+ * Simple directive to add lazy image loading
4
+ */
5
+ export declare const RLazyDirective: Directive;
@@ -0,0 +1,12 @@
1
+ import type { Directive } from 'vue';
2
+ import './r-tooltip.scss';
3
+ import type { Nullable } from '../../types';
4
+ interface ToolTipTarget extends HTMLElement {
5
+ vTooltipEnter: Nullable<() => void>;
6
+ vTooltipLeave: Nullable<() => void>;
7
+ }
8
+ /**
9
+ * Simple directive to add a tooltip
10
+ */
11
+ export declare const RTooltipDirective: Directive<ToolTipTarget>;
12
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { App } from 'vue';
2
+ import { createRToastManager } from './components/r-toast/r-toast-manager';
3
+ import * as tokens from './styles/tokens';
4
+ export * from './components';
5
+ export { createRToastManager };
6
+ export { tokens };
7
+ /**
8
+ * This plugin registers all revel components and directives
9
+ * install can be imported and called as a named import or as a default import (for plugin mode)
10
+ * It is also used by the doc examples and vitests)
11
+ */
12
+ export declare const install: (app: App, { registerDirectives }?: {
13
+ registerDirectives?: boolean | undefined;
14
+ }) => void;
15
+ declare const _default: {
16
+ install: (app: App<any>, { registerDirectives }?: {
17
+ registerDirectives?: boolean | undefined;
18
+ }) => void;
19
+ };
20
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};