sprintify-ui 0.0.164 → 0.0.165

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,45 @@
1
+ import { Country } from '@/types/Country';
2
+ import { Region } from '@/types/Region';
3
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ modelValue: Record<string, string | number | null | undefined>;
5
+ prefix: string | null;
6
+ countries?: Country[] | undefined;
7
+ regions?: Region[] | undefined;
8
+ }>, {
9
+ modelValue(): {};
10
+ prefix: null;
11
+ countries(): never[];
12
+ regions(): never[];
13
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:model-value"[], "update:model-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
14
+ modelValue: Record<string, string | number | null | undefined>;
15
+ prefix: string | null;
16
+ countries?: Country[] | undefined;
17
+ regions?: Region[] | undefined;
18
+ }>, {
19
+ modelValue(): {};
20
+ prefix: null;
21
+ countries(): never[];
22
+ regions(): never[];
23
+ }>>> & {
24
+ "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
25
+ }, {
26
+ countries: Country[];
27
+ regions: Region[];
28
+ modelValue: Record<string, string | number | null | undefined>;
29
+ prefix: string | null;
30
+ }>;
31
+ export default _default;
32
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
+ type __VLS_TypePropsToRuntimeProps<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
35
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
36
+ } : {
37
+ type: import('vue').PropType<T[K]>;
38
+ required: true;
39
+ };
40
+ };
41
+ type __VLS_WithDefaults<P, D> = {
42
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
43
+ default: D[K];
44
+ } : P[K];
45
+ };
@@ -89,7 +89,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
89
89
  close: () => void;
90
90
  open: () => void;
91
91
  setKeywords: (input: string) => void;
92
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "clear" | "update:modelValue" | "close" | "scrollBottom" | "typing" | "open")[], "select" | "clear" | "update:modelValue" | "close" | "scrollBottom" | "typing" | "open", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
92
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "clear" | "close" | "update:modelValue" | "scrollBottom" | "typing" | "open")[], "select" | "clear" | "close" | "update:modelValue" | "scrollBottom" | "typing" | "open", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
93
93
  modelValue: {
94
94
  default: undefined;
95
95
  type: PropType<Option | null | undefined>;
@@ -175,8 +175,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
175
175
  onSelect?: ((...args: any[]) => any) | undefined;
176
176
  onScrollBottom?: ((...args: any[]) => any) | undefined;
177
177
  onClear?: ((...args: any[]) => any) | undefined;
178
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
179
178
  onClose?: ((...args: any[]) => any) | undefined;
179
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
180
180
  onTyping?: ((...args: any[]) => any) | undefined;
181
181
  onOpen?: ((...args: any[]) => any) | undefined;
182
182
  }, {
@@ -79,7 +79,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
79
79
  open: () => void | undefined;
80
80
  close: () => void | undefined;
81
81
  setKeywords: (input: string) => void | undefined;
82
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "update:modelValue" | "focus" | "scrollBottom" | "typing")[], "clear" | "update:modelValue" | "focus" | "scrollBottom" | "typing", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
82
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "update:modelValue" | "scrollBottom" | "typing")[], "clear" | "focus" | "update:modelValue" | "scrollBottom" | "typing", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
83
83
  modelValue: {
84
84
  default: undefined;
85
85
  type: PropType<Option | null | undefined>;
@@ -41,9 +41,9 @@ declare const _default: import("vue").DefineComponent<{
41
41
  type: BooleanConstructor;
42
42
  };
43
43
  }>>, {
44
+ trim: boolean;
44
45
  max: number;
45
46
  min: number;
46
- trim: boolean;
47
47
  removeDoubleSpaces: boolean;
48
48
  }>;
49
49
  export default _default;
@@ -84,13 +84,13 @@ declare const _default: import("vue").DefineComponent<{
84
84
  label: string;
85
85
  required: boolean;
86
86
  name: string;
87
+ locales: Locales;
87
88
  defaultValue: string | number | boolean;
88
89
  modelValue: {
89
90
  [locale: string]: string | number | boolean;
90
91
  } | null;
91
92
  hasError: boolean;
92
93
  component: "BaseInput" | "BaseTextarea";
93
- locales: Locales;
94
94
  componentProps: Record<string, any>;
95
95
  }>;
96
96
  export default _default;
@@ -71,7 +71,7 @@ declare const _default: import("vue").DefineComponent<{
71
71
  type: (StringConstructor | ArrayConstructor | FunctionConstructor)[];
72
72
  default(): null;
73
73
  };
74
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus")[], "update:modelValue" | "blur" | "focus", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
74
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "focus" | "update:modelValue")[], "blur" | "focus" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
75
75
  modelValue: {
76
76
  default: string;
77
77
  type: PropType<string | number | null>;
@@ -56,7 +56,7 @@ declare const _default: import("vue").DefineComponent<{
56
56
  default: undefined;
57
57
  type: NumberConstructor;
58
58
  };
59
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus")[], "update:modelValue" | "blur" | "focus", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
59
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "focus" | "update:modelValue")[], "blur" | "focus" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
60
60
  /**
61
61
  * The value of the input. Can be a number or null.
62
62
  * 0.1 = 10%
@@ -59,11 +59,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
59
59
  }>> & {
60
60
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
61
61
  }, {
62
+ closeOnOutsideClick: boolean;
62
63
  modelValue: boolean;
63
64
  clipped: boolean;
64
65
  maxWidth: string;
65
66
  backdropClass: string;
66
- closeOnOutsideClick: boolean;
67
67
  verticalAlign: string;
68
68
  showCloseButton: boolean;
69
69
  }>, {
@@ -43,11 +43,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
43
43
  }>> & {
44
44
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
45
45
  }, {
46
+ closeOnOutsideClick: boolean;
46
47
  modelValue: boolean;
47
48
  clipped: boolean;
48
49
  maxWidth: string;
49
50
  backdropClass: string;
50
- closeOnOutsideClick: boolean;
51
51
  }>, {
52
52
  default: (_: {
53
53
  close: () => void;
@@ -47,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
47
47
  default: string;
48
48
  type: PropType<"left" | "right" | "none" | "full">;
49
49
  };
50
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "keydown")[], "update:modelValue" | "blur" | "focus" | "keydown", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
50
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "focus" | "keydown" | "update:modelValue")[], "blur" | "focus" | "keydown" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
51
51
  modelValue: {
52
52
  default: undefined;
53
53
  type: PropType<number | null>;
@@ -71,7 +71,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
71
71
  close: () => void;
72
72
  open: () => void;
73
73
  setKeywords: (input: string) => void;
74
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "close" | "scrollBottom" | "typing" | "open")[], "update:modelValue" | "close" | "scrollBottom" | "typing" | "open", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
74
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue" | "scrollBottom" | "typing" | "open")[], "close" | "update:modelValue" | "scrollBottom" | "typing" | "open", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
75
75
  modelValue: {
76
76
  required: true;
77
77
  type: PropType<Option[] | null>;
@@ -138,8 +138,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
138
138
  };
139
139
  }>> & {
140
140
  onScrollBottom?: ((...args: any[]) => any) | undefined;
141
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
142
141
  onClose?: ((...args: any[]) => any) | undefined;
142
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
143
143
  onTyping?: ((...args: any[]) => any) | undefined;
144
144
  onOpen?: ((...args: any[]) => any) | undefined;
145
145
  }, {
@@ -47,7 +47,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
47
47
  open: () => void | undefined;
48
48
  close: () => void | undefined;
49
49
  setKeywords: (input: string) => void | undefined;
50
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "scrollBottom" | "typing")[], "update:modelValue" | "focus" | "scrollBottom" | "typing", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
50
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "update:modelValue" | "scrollBottom" | "typing")[], "focus" | "update:modelValue" | "scrollBottom" | "typing", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
51
51
  modelValue: {
52
52
  required: true;
53
53
  type: PropType<Option[]>;
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  default: boolean;
40
40
  type: BooleanConstructor;
41
41
  };
42
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "submit" | "update:modelValue" | "focus")[], "input" | "submit" | "update:modelValue" | "focus", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "submit" | "focus" | "update:modelValue")[], "input" | "submit" | "focus" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
43
  modelValue: {
44
44
  default: string;
45
45
  type: StringConstructor;
@@ -9,16 +9,21 @@ import { useField } from './composables/field';
9
9
  declare const messages: {
10
10
  en: {
11
11
  sui: {
12
+ address: string;
13
+ address_1_placeholder: string;
14
+ address_2_description: string;
12
15
  and: string;
13
16
  apply_filters: string;
14
17
  autocomplete_placeholder: string;
15
18
  cancel: string;
19
+ city: string;
16
20
  clear: string;
17
21
  click_or_select_date: string;
18
22
  click_to_copy: string;
19
23
  columns: string;
20
24
  confirm: string;
21
25
  copied: string;
26
+ country: string;
22
27
  create_new: string;
23
28
  day: string;
24
29
  delete_record: string;
@@ -43,9 +48,11 @@ declare const messages: {
43
48
  or: string;
44
49
  page: string;
45
50
  pagination_detail: string;
51
+ postal_code_zip_code: string;
46
52
  previous: string;
47
53
  previous_month: string;
48
54
  read_more: string;
55
+ region: string;
49
56
  remove: string;
50
57
  remove_file: string;
51
58
  remove_file_description: string;
@@ -77,16 +84,21 @@ declare const messages: {
77
84
  };
78
85
  fr: {
79
86
  sui: {
87
+ address: string;
88
+ address_1_placeholder: string;
89
+ address_2_description: string;
80
90
  and: string;
81
91
  apply_filters: string;
82
92
  autocomplete_placeholder: string;
83
93
  cancel: string;
94
+ city: string;
84
95
  clear: string;
85
96
  click_or_select_date: string;
86
97
  click_to_copy: string;
87
98
  columns: string;
88
99
  confirm: string;
89
100
  copied: string;
101
+ country: string;
90
102
  create_new: string;
91
103
  day: string;
92
104
  delete_record: string;
@@ -111,9 +123,11 @@ declare const messages: {
111
123
  or: string;
112
124
  page: string;
113
125
  pagination_detail: string;
126
+ postal_code_zip_code: string;
114
127
  previous: string;
115
128
  previous_month: string;
116
129
  read_more: string;
130
+ region: string;
117
131
  remove: string;
118
132
  remove_file: string;
119
133
  remove_file_description: string;
@@ -146,6 +160,8 @@ declare const messages: {
146
160
  };
147
161
  import './assets/main.css';
148
162
  import { Locales } from './types';
163
+ import { Country } from './types/Country';
164
+ import { Region } from './types/Region';
149
165
  export interface Options {
150
166
  i18n?: I18n<typeof messages, {}, {}, string, true>;
151
167
  http?: AxiosInstance;
@@ -153,21 +169,28 @@ export interface Options {
153
169
  locales?: Locales;
154
170
  formatQueryString?: (params: Record<string, any>) => string;
155
171
  parseQueryString?: (params: string) => Record<string, any>;
172
+ countries?: Country[];
173
+ regions?: Region[];
156
174
  }
157
175
  declare const config: {
158
176
  i18n: I18n<{
159
177
  en: {
160
178
  sui: {
179
+ address: string;
180
+ address_1_placeholder: string;
181
+ address_2_description: string;
161
182
  and: string;
162
183
  apply_filters: string;
163
184
  autocomplete_placeholder: string;
164
185
  cancel: string;
186
+ city: string;
165
187
  clear: string;
166
188
  click_or_select_date: string;
167
189
  click_to_copy: string;
168
190
  columns: string;
169
191
  confirm: string;
170
192
  copied: string;
193
+ country: string;
171
194
  create_new: string;
172
195
  day: string;
173
196
  delete_record: string;
@@ -192,9 +215,11 @@ declare const config: {
192
215
  or: string;
193
216
  page: string;
194
217
  pagination_detail: string;
218
+ postal_code_zip_code: string;
195
219
  previous: string;
196
220
  previous_month: string;
197
221
  read_more: string;
222
+ region: string;
198
223
  remove: string;
199
224
  remove_file: string;
200
225
  remove_file_description: string;
@@ -226,16 +251,21 @@ declare const config: {
226
251
  };
227
252
  fr: {
228
253
  sui: {
254
+ address: string;
255
+ address_1_placeholder: string;
256
+ address_2_description: string;
229
257
  and: string;
230
258
  apply_filters: string;
231
259
  autocomplete_placeholder: string;
232
260
  cancel: string;
261
+ city: string;
233
262
  clear: string;
234
263
  click_or_select_date: string;
235
264
  click_to_copy: string;
236
265
  columns: string;
237
266
  confirm: string;
238
267
  copied: string;
268
+ country: string;
239
269
  create_new: string;
240
270
  day: string;
241
271
  delete_record: string;
@@ -260,9 +290,11 @@ declare const config: {
260
290
  or: string;
261
291
  page: string;
262
292
  pagination_detail: string;
293
+ postal_code_zip_code: string;
263
294
  previous: string;
264
295
  previous_month: string;
265
296
  read_more: string;
297
+ region: string;
266
298
  remove: string;
267
299
  remove_file: string;
268
300
  remove_file_description: string;
@@ -298,6 +330,8 @@ declare const config: {
298
330
  upload_url: string;
299
331
  formatQueryString(params: Record<string, any>): string;
300
332
  parseQueryString(params: string): Record<string, any>;
333
+ countries: Country[];
334
+ regions: Region[];
301
335
  };
302
336
  declare function install(app: App, options?: Options): void;
303
337
  declare const _default: {
@@ -0,0 +1,4 @@
1
+ export interface Country {
2
+ id: string;
3
+ name: string;
4
+ }
@@ -0,0 +1,5 @@
1
+ export interface Region {
2
+ id: string;
3
+ name: string;
4
+ country_id: string;
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.0.164",
3
+ "version": "0.0.165",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -52,6 +52,7 @@
52
52
  "@tailwindcss/forms": "^0.5.3",
53
53
  "@tailwindcss/line-clamp": "^0.4.2",
54
54
  "@tailwindcss/typography": "^0.5.8",
55
+ "@types/google.maps": "^3.51.0",
55
56
  "@types/humanize-duration": "^3.27.1",
56
57
  "@types/luxon": "^3.1.0",
57
58
  "@types/object-hash": "^2.2.1",
@@ -0,0 +1,63 @@
1
+ import BaseAddressForm from './BaseAddressForm.vue';
2
+ import ShowValue from '../../.storybook/components/ShowValue.vue';
3
+
4
+ export default {
5
+ title: 'Form/BaseAddressForm',
6
+ component: BaseAddressForm,
7
+ argTypes: {},
8
+ args: {
9
+ countries: [
10
+ { code: 'US', name: 'United States', id: 'us' },
11
+ { code: 'CA', name: 'Canada', id: 'ca' },
12
+ { code: 'MX', name: 'Mexico', id: 'mx' },
13
+ ],
14
+ regions: [
15
+ { code: 'AL', name: 'Alabama', id: 'al', country_id: 'us' },
16
+ { code: 'AK', name: 'Alaska', id: 'ak', country_id: 'us' },
17
+ { code: 'AZ', name: 'Arizona', id: 'az', country_id: 'us' },
18
+ { code: 'AB', name: 'Alberta', id: 'ab', country_id: 'ca' },
19
+ { code: 'BC', name: 'British Columbia', id: 'bc', country_id: 'ca' },
20
+ { code: 'MB', name: 'Manitoba', id: 'mb', country_id: 'ca' },
21
+ { code: 'NS', name: 'Nova Scotia', id: 'ns', country_id: 'ca' },
22
+ { code: 'ON', name: 'Ontario', id: 'on', country_id: 'ca' },
23
+ { code: 'PE', name: 'Prince Edward Island', id: 'pe', country_id: 'ca' },
24
+ { code: 'QC', name: 'Quebec', id: 'qc', country_id: 'ca' },
25
+ { code: 'SK', name: 'Saskatchewan', id: 'sk', country_id: 'ca' },
26
+ { code: 'NT', name: 'Northwest Territories', id: 'nt', country_id: 'ca' },
27
+ ],
28
+ },
29
+ };
30
+
31
+ const Template = (args) => ({
32
+ components: { BaseAddressForm, ShowValue },
33
+ setup() {
34
+ const form = ref({});
35
+ return { args, form };
36
+ },
37
+ template: `
38
+ <BaseAddressForm v-model="form.shipping_address" prefix="shipping_address" v-bind="args"></BaseAddressForm>
39
+ <ShowValue :value="form" />
40
+ `,
41
+ });
42
+
43
+ export const Demo = Template.bind({});
44
+ Demo.args = {};
45
+
46
+ const DefaultCountryTemplate = (args) => ({
47
+ components: { BaseAddressForm, ShowValue },
48
+ setup() {
49
+ const form = ref({
50
+ shipping_address: {
51
+ country: 'ca',
52
+ },
53
+ });
54
+ return { args, form };
55
+ },
56
+ template: `
57
+ <BaseAddressForm v-model="form.shipping_address" prefix="shipping_address" v-bind="args"></BaseAddressForm>
58
+ <ShowValue :value="form" />
59
+ `,
60
+ });
61
+
62
+ export const DefaultCountry = DefaultCountryTemplate.bind({});
63
+ DefaultCountry.args = {};