@rebilly/revel 4.21.3 → 5.1.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 +29 -47
  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 +5580 -4747
  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,195 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ /**
3
+ * Specify button size
4
+ */
5
+ size: {
6
+ type: StringConstructor;
7
+ default: string;
8
+ validator: (val: string) => boolean;
9
+ };
10
+ /**
11
+ * Specify button as anchor link
12
+ */
13
+ link: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ /**
18
+ * Specify button type according to your theme colors
19
+ */
20
+ type: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ validator: (val: string) => boolean;
24
+ };
25
+ /**
26
+ * Disabled state just like for regular html button
27
+ */
28
+ disabled: {
29
+ type: BooleanConstructor;
30
+ default: boolean;
31
+ };
32
+ /**
33
+ * Active state just like for regular button
34
+ */
35
+ active: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ /**
40
+ * Make button full width
41
+ */
42
+ fluid: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ /**
47
+ * Append loading spinner to button
48
+ */
49
+ loading: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
53
+ /**
54
+ * Capitalize the first letter
55
+ */
56
+ capitalizeFirstLetter: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ /**
61
+ * Append icon to the left side of the button
62
+ */
63
+ iconLeft: {
64
+ type: StringConstructor;
65
+ default: null;
66
+ };
67
+ /**
68
+ * Append icon to the right side of the button
69
+ */
70
+ iconRight: {
71
+ type: StringConstructor;
72
+ default: null;
73
+ };
74
+ /**
75
+ * Displays only icon
76
+ */
77
+ icon: {
78
+ type: StringConstructor;
79
+ default: null;
80
+ };
81
+ }, unknown, {
82
+ messages: {
83
+ loading: string;
84
+ disabled: string;
85
+ };
86
+ }, {
87
+ classes(): {
88
+ 'r-has-icon-left': boolean;
89
+ 'r-has-icon-right': boolean;
90
+ 'r-has-icon': boolean;
91
+ 'r-button-type-link': boolean;
92
+ } | {
93
+ 'r-has-icon-left': boolean;
94
+ 'r-has-icon-right': boolean;
95
+ 'r-has-icon': boolean;
96
+ 'r-button-fluid': boolean;
97
+ 'r-is-active': boolean;
98
+ };
99
+ title(): string;
100
+ divRole(): "" | "button";
101
+ href(): string;
102
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
103
+ /**
104
+ * Specify button size
105
+ */
106
+ size: {
107
+ type: StringConstructor;
108
+ default: string;
109
+ validator: (val: string) => boolean;
110
+ };
111
+ /**
112
+ * Specify button as anchor link
113
+ */
114
+ link: {
115
+ type: BooleanConstructor;
116
+ default: boolean;
117
+ };
118
+ /**
119
+ * Specify button type according to your theme colors
120
+ */
121
+ type: {
122
+ type: StringConstructor;
123
+ default: string;
124
+ validator: (val: string) => boolean;
125
+ };
126
+ /**
127
+ * Disabled state just like for regular html button
128
+ */
129
+ disabled: {
130
+ type: BooleanConstructor;
131
+ default: boolean;
132
+ };
133
+ /**
134
+ * Active state just like for regular button
135
+ */
136
+ active: {
137
+ type: BooleanConstructor;
138
+ default: boolean;
139
+ };
140
+ /**
141
+ * Make button full width
142
+ */
143
+ fluid: {
144
+ type: BooleanConstructor;
145
+ default: boolean;
146
+ };
147
+ /**
148
+ * Append loading spinner to button
149
+ */
150
+ loading: {
151
+ type: BooleanConstructor;
152
+ default: boolean;
153
+ };
154
+ /**
155
+ * Capitalize the first letter
156
+ */
157
+ capitalizeFirstLetter: {
158
+ type: BooleanConstructor;
159
+ default: boolean;
160
+ };
161
+ /**
162
+ * Append icon to the left side of the button
163
+ */
164
+ iconLeft: {
165
+ type: StringConstructor;
166
+ default: null;
167
+ };
168
+ /**
169
+ * Append icon to the right side of the button
170
+ */
171
+ iconRight: {
172
+ type: StringConstructor;
173
+ default: null;
174
+ };
175
+ /**
176
+ * Displays only icon
177
+ */
178
+ icon: {
179
+ type: StringConstructor;
180
+ default: null;
181
+ };
182
+ }>>, {
183
+ loading: boolean;
184
+ icon: string;
185
+ type: string;
186
+ link: boolean;
187
+ size: string;
188
+ disabled: boolean;
189
+ active: boolean;
190
+ fluid: boolean;
191
+ capitalizeFirstLetter: boolean;
192
+ iconLeft: string;
193
+ iconRight: string;
194
+ }>;
195
+ export default _default;
@@ -0,0 +1,18 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ fluid: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ }, unknown, unknown, {
7
+ classes(): {
8
+ 'r-button-group-fluid': boolean;
9
+ };
10
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ fluid: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ }>>, {
16
+ fluid: boolean;
17
+ }>;
18
+ export default _default;
@@ -0,0 +1,148 @@
1
+ import { type PropType } from 'vue';
2
+ import type { ValidationState } from '../../types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ /**
5
+ * Label for the checkbox
6
+ */
7
+ label: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ /**
12
+ * Unique id of the checkbox
13
+ */
14
+ id: {
15
+ type: StringConstructor;
16
+ default: () => string;
17
+ };
18
+ /**
19
+ * A text to describe the checkbox
20
+ */
21
+ caption: {
22
+ type: StringConstructor;
23
+ default: null;
24
+ };
25
+ /**
26
+ * Actual parent model for the component
27
+ * @model
28
+ */
29
+ modelValue: {
30
+ type: (StringConstructor | BooleanConstructor | ArrayConstructor | NumberConstructor)[];
31
+ default: boolean;
32
+ };
33
+ /**
34
+ * Used to decide if checkbox is selected. If this value exists
35
+ * in the v-model (array) or equals it, the checkbox shows as checked.
36
+ */
37
+ value: {
38
+ type: (StringConstructor | BooleanConstructor)[];
39
+ default: string;
40
+ };
41
+ /**
42
+ * Semi-selected state
43
+ */
44
+ fuzzy: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ /**
49
+ * Disable checkbox
50
+ */
51
+ disabled: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ /**
56
+ * Validation result sent by Vuelidate
57
+ */
58
+ validate: {
59
+ type: PropType<ValidationState>;
60
+ default: null;
61
+ };
62
+ }, unknown, unknown, {
63
+ isInvalid(): boolean;
64
+ isChecked(): boolean;
65
+ checkIcon(): "dash-l" | "checkbox-checkmark";
66
+ }, {
67
+ /**
68
+ * Method used to calculate the modified internal state *after* user action.
69
+ *
70
+ * This method is (and must be) used *only* when the checkbox is clicked by the user (@see change).
71
+ * Checkbox does not keep internal state - it calculates it based on the properties passed.
72
+ * Therfore on update, it sends the opposite of the current state (as the user has just changed it).
73
+ * It's up to the parent to update it's model and pass the new value as property, so the checkbox can update itself.
74
+ */
75
+ getNegateInternalState(): boolean | unknown[];
76
+ change(): void;
77
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
78
+ /**
79
+ * Label for the checkbox
80
+ */
81
+ label: {
82
+ type: StringConstructor;
83
+ default: string;
84
+ };
85
+ /**
86
+ * Unique id of the checkbox
87
+ */
88
+ id: {
89
+ type: StringConstructor;
90
+ default: () => string;
91
+ };
92
+ /**
93
+ * A text to describe the checkbox
94
+ */
95
+ caption: {
96
+ type: StringConstructor;
97
+ default: null;
98
+ };
99
+ /**
100
+ * Actual parent model for the component
101
+ * @model
102
+ */
103
+ modelValue: {
104
+ type: (StringConstructor | BooleanConstructor | ArrayConstructor | NumberConstructor)[];
105
+ default: boolean;
106
+ };
107
+ /**
108
+ * Used to decide if checkbox is selected. If this value exists
109
+ * in the v-model (array) or equals it, the checkbox shows as checked.
110
+ */
111
+ value: {
112
+ type: (StringConstructor | BooleanConstructor)[];
113
+ default: string;
114
+ };
115
+ /**
116
+ * Semi-selected state
117
+ */
118
+ fuzzy: {
119
+ type: BooleanConstructor;
120
+ default: boolean;
121
+ };
122
+ /**
123
+ * Disable checkbox
124
+ */
125
+ disabled: {
126
+ type: BooleanConstructor;
127
+ default: boolean;
128
+ };
129
+ /**
130
+ * Validation result sent by Vuelidate
131
+ */
132
+ validate: {
133
+ type: PropType<ValidationState>;
134
+ default: null;
135
+ };
136
+ }>> & {
137
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
138
+ }, {
139
+ id: string;
140
+ caption: string;
141
+ label: string;
142
+ value: string | boolean;
143
+ disabled: boolean;
144
+ modelValue: string | number | boolean | unknown[];
145
+ fuzzy: boolean;
146
+ validate: ValidationState;
147
+ }>;
148
+ export default _default;
@@ -0,0 +1,36 @@
1
+ import { type Moment } from 'moment';
2
+ export declare const calendarPresets: {
3
+ readonly today: "today";
4
+ readonly yesterday: "yesterday";
5
+ readonly thisWeek: "thisWeek";
6
+ readonly lastWeek: "lastWeek";
7
+ readonly last30Days: "last30Days";
8
+ readonly thisMonth: "thisMonth";
9
+ readonly lastMonth: "lastMonth";
10
+ readonly last3Months: "last3Months";
11
+ readonly last6Months: "last6Months";
12
+ readonly thisYear: "thisYear";
13
+ readonly lastYear: "lastYear";
14
+ };
15
+ export declare const oneValuePresetsList: string[];
16
+ export declare const calendarPresetsLabels: {
17
+ readonly today: "Today";
18
+ readonly yesterday: "Yesterday";
19
+ readonly thisWeek: "This week";
20
+ readonly lastWeek: "Last week";
21
+ readonly last30Days: "Last 30 days";
22
+ readonly thisMonth: "This month";
23
+ readonly lastMonth: "Last month";
24
+ readonly last3Months: "Last 3 months";
25
+ readonly last6Months: "Last 6 months";
26
+ readonly thisYear: "This year";
27
+ readonly lastYear: "Last year";
28
+ };
29
+ export type CalendarPresetLabel = keyof typeof calendarPresetsLabels;
30
+ export type CalendarPreset = keyof typeof calendarPresets;
31
+ export type CalendarPresetPeriod = {
32
+ relativeFilterValue: string;
33
+ start: Moment;
34
+ end: Moment;
35
+ };
36
+ export declare const getCalendarPresetPeriods: (tz?: string) => Record<CalendarPreset, CalendarPresetPeriod>;
@@ -0,0 +1,159 @@
1
+ import { type PropType } from 'vue';
2
+ import type { ValidationState } from '../../types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ /**
5
+ * Dates
6
+ */
7
+ modelValue: {
8
+ type: PropType<string | boolean | Date>;
9
+ default: boolean;
10
+ };
11
+ /**
12
+ * Disable
13
+ */
14
+ disabled: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
18
+ /**
19
+ * Validation result sent by Vuelidate
20
+ */
21
+ validate: {
22
+ type: PropType<ValidationState>;
23
+ default: null;
24
+ };
25
+ /**
26
+ * Time zone
27
+ */
28
+ timezone: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
32
+ /**
33
+ * Type
34
+ */
35
+ type: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ /**
40
+ * v-calendar model config configuration
41
+ */
42
+ modelConfig: {
43
+ type: ObjectConstructor;
44
+ default: null;
45
+ };
46
+ }, {
47
+ themeStyles: {
48
+ wrapper: {
49
+ background: string;
50
+ borderRadius: string;
51
+ boxShadow: string;
52
+ border: string;
53
+ fontFamily: string;
54
+ };
55
+ header: {
56
+ padding: string;
57
+ };
58
+ headerTitle: {
59
+ fontSize: string;
60
+ lineHeight: string;
61
+ fontFamily: string;
62
+ fontWeight: string;
63
+ color: string;
64
+ };
65
+ weekdays: {
66
+ fontSize: string;
67
+ lineHeight: string;
68
+ color: string;
69
+ fontWeight: string;
70
+ };
71
+ dayCell: {
72
+ backgroundColor: string;
73
+ };
74
+ dayContent: {
75
+ fontSize: string;
76
+ lineHeight: string;
77
+ color: string;
78
+ width: string;
79
+ height: string;
80
+ };
81
+ dayContentHover: {
82
+ backgroundColor: string;
83
+ };
84
+ verticalDivider: {
85
+ borderLeft: string;
86
+ };
87
+ bars: {
88
+ backgroundColor: string;
89
+ };
90
+ tintColor: string;
91
+ };
92
+ popoverConfigs: {
93
+ placement: {};
94
+ visibility: string;
95
+ modifiers: {
96
+ name: string;
97
+ options: {
98
+ allowedAutoPlacements: string[];
99
+ fallbackPlacements: string[];
100
+ };
101
+ }[];
102
+ };
103
+ computedModelConfig: import("vue").ComputedRef<Record<string, any>>;
104
+ }, unknown, {}, {
105
+ onDateInput(date: Date): void;
106
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
107
+ /**
108
+ * Dates
109
+ */
110
+ modelValue: {
111
+ type: PropType<string | boolean | Date>;
112
+ default: boolean;
113
+ };
114
+ /**
115
+ * Disable
116
+ */
117
+ disabled: {
118
+ type: BooleanConstructor;
119
+ default: boolean;
120
+ };
121
+ /**
122
+ * Validation result sent by Vuelidate
123
+ */
124
+ validate: {
125
+ type: PropType<ValidationState>;
126
+ default: null;
127
+ };
128
+ /**
129
+ * Time zone
130
+ */
131
+ timezone: {
132
+ type: StringConstructor;
133
+ default: string;
134
+ };
135
+ /**
136
+ * Type
137
+ */
138
+ type: {
139
+ type: StringConstructor;
140
+ default: string;
141
+ };
142
+ /**
143
+ * v-calendar model config configuration
144
+ */
145
+ modelConfig: {
146
+ type: ObjectConstructor;
147
+ default: null;
148
+ };
149
+ }>> & {
150
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
151
+ }, {
152
+ type: string;
153
+ disabled: boolean;
154
+ modelValue: string | boolean | Date;
155
+ validate: ValidationState;
156
+ timezone: string;
157
+ modelConfig: Record<string, any>;
158
+ }>;
159
+ export default _default;