@drawbridge/components 0.0.40 → 0.0.43
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.
- package/dist/advertisement.js +13 -5
- package/dist/advertisement.mjs +7 -4
- package/dist/{chunk-HDOA3Y3U.mjs → chunk-BHQBSNGK.mjs} +8 -7
- package/dist/chunk-BZ6WMIH7.mjs +37 -0
- package/dist/{chunk-7ZLMDYBR.mjs → chunk-JJH46E7B.mjs} +6 -2
- package/dist/input-group.js +6 -2
- package/dist/input-group.mjs +1 -1
- package/dist/input-name.js +307 -0
- package/dist/input-name.mjs +115 -0
- package/dist/input-number.mjs +3 -3
- package/dist/input-phone.js +183 -0
- package/dist/input-phone.mjs +139 -0
- package/dist/input-text.mjs +3 -32
- package/dist/product.js +10 -5
- package/dist/product.mjs +4 -4
- package/dist/provider-font.js +94 -0
- package/dist/provider-font.mjs +74 -0
- package/dist/video.js +19 -1
- package/dist/video.mjs +19 -1
- package/package.json +15 -2
- package/types/advertisement.d.ts +1 -0
- package/types/input-group.d.ts +1 -0
- package/types/input-name.d.ts +24 -0
- package/types/input-phone.d.ts +20 -0
- package/types/product.d.ts +1 -0
- package/types/provider-font.d.ts +23 -0
- package/types/video.d.ts +2 -0
package/dist/video.mjs
CHANGED
|
@@ -14,12 +14,14 @@ var ReactPlayer = dynamic(
|
|
|
14
14
|
}
|
|
15
15
|
);
|
|
16
16
|
var Video = ({
|
|
17
|
+
className,
|
|
17
18
|
controls = false,
|
|
18
19
|
loop = false,
|
|
19
20
|
onEnded = () => {
|
|
20
21
|
},
|
|
21
22
|
onDuration = () => {
|
|
22
23
|
},
|
|
24
|
+
onTime,
|
|
23
25
|
muted = true,
|
|
24
26
|
onPlay,
|
|
25
27
|
playing = false,
|
|
@@ -41,7 +43,7 @@ var Video = ({
|
|
|
41
43
|
},
|
|
42
44
|
[player, reset]
|
|
43
45
|
);
|
|
44
|
-
|
|
46
|
+
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45
47
|
/* @__PURE__ */ jsx(
|
|
46
48
|
ReactPlayer,
|
|
47
49
|
{
|
|
@@ -67,6 +69,13 @@ var Video = ({
|
|
|
67
69
|
onDuration(value);
|
|
68
70
|
}
|
|
69
71
|
},
|
|
72
|
+
onProgress: ({ playedSeconds }) => {
|
|
73
|
+
onTime == null ? void 0 : onTime(playedSeconds);
|
|
74
|
+
},
|
|
75
|
+
onSeek: (seconds) => {
|
|
76
|
+
onTime == null ? void 0 : onTime(seconds);
|
|
77
|
+
},
|
|
78
|
+
progressInterval: 100,
|
|
70
79
|
onError: () => {
|
|
71
80
|
setVideoUrl(mp4);
|
|
72
81
|
},
|
|
@@ -100,6 +109,15 @@ var Video = ({
|
|
|
100
109
|
}
|
|
101
110
|
)
|
|
102
111
|
] });
|
|
112
|
+
return className ? /* @__PURE__ */ jsx(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
...{
|
|
116
|
+
className
|
|
117
|
+
},
|
|
118
|
+
children: inner
|
|
119
|
+
}
|
|
120
|
+
) : inner;
|
|
103
121
|
};
|
|
104
122
|
var video_default = Video;
|
|
105
123
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drawbridge/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./advertisement": {
|
|
6
6
|
"types": "./types/advertisement.d.ts",
|
|
@@ -282,10 +282,18 @@
|
|
|
282
282
|
"types": "./types/input-group.d.ts",
|
|
283
283
|
"default": "./dist/input-group.js"
|
|
284
284
|
},
|
|
285
|
+
"./input-name": {
|
|
286
|
+
"types": "./types/input-name.d.ts",
|
|
287
|
+
"default": "./dist/input-name.js"
|
|
288
|
+
},
|
|
285
289
|
"./input-number": {
|
|
286
290
|
"types": "./types/input-number.d.ts",
|
|
287
291
|
"default": "./dist/input-number.js"
|
|
288
292
|
},
|
|
293
|
+
"./input-phone": {
|
|
294
|
+
"types": "./types/input-phone.d.ts",
|
|
295
|
+
"default": "./dist/input-phone.js"
|
|
296
|
+
},
|
|
289
297
|
"./input-select": {
|
|
290
298
|
"types": "./types/input-select.d.ts",
|
|
291
299
|
"default": "./dist/input-select.js"
|
|
@@ -302,6 +310,10 @@
|
|
|
302
310
|
"types": "./types/product.d.ts",
|
|
303
311
|
"default": "./dist/product.js"
|
|
304
312
|
},
|
|
313
|
+
"./provider-font": {
|
|
314
|
+
"types": "./types/provider-font.d.ts",
|
|
315
|
+
"default": "./dist/provider-font.js"
|
|
316
|
+
},
|
|
305
317
|
"./styles": {
|
|
306
318
|
"types": "./types/styles.d.ts",
|
|
307
319
|
"default": "./dist/styles.js"
|
|
@@ -342,6 +354,7 @@
|
|
|
342
354
|
"dependencies": {
|
|
343
355
|
"@drawbridge/drawbridge-agents": "0.0.10",
|
|
344
356
|
"embla-carousel-react": "8.6.0",
|
|
345
|
-
"react-player": "2.16.0"
|
|
357
|
+
"react-player": "2.16.0",
|
|
358
|
+
"react-phone-number-input": "3.4.12"
|
|
346
359
|
}
|
|
347
360
|
}
|
package/types/advertisement.d.ts
CHANGED
package/types/input-group.d.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BrandStyle } from './styles';
|
|
3
|
+
|
|
4
|
+
export interface InputNameValue {
|
|
5
|
+
first?: string;
|
|
6
|
+
last?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface InputNameProps {
|
|
11
|
+
error?: {
|
|
12
|
+
first?: { message?: string };
|
|
13
|
+
last?: { message?: string };
|
|
14
|
+
name?: { message?: string };
|
|
15
|
+
};
|
|
16
|
+
onChange: ( value: InputNameValue ) => void;
|
|
17
|
+
settings: { capture?: Array<'first' | 'last' | 'name'> };
|
|
18
|
+
style?: BrandStyle;
|
|
19
|
+
value?: InputNameValue;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare const InputName: ComponentType<InputNameProps>;
|
|
23
|
+
|
|
24
|
+
export default InputName;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BrandStyle } from './styles';
|
|
3
|
+
|
|
4
|
+
export declare const isValidPhone: ( number?: string, country?: string ) => boolean;
|
|
5
|
+
|
|
6
|
+
export interface InputPhoneValue {
|
|
7
|
+
country?: string;
|
|
8
|
+
number?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface InputPhoneProps {
|
|
12
|
+
countries?: string[];
|
|
13
|
+
onChange: ( value: InputPhoneValue ) => void;
|
|
14
|
+
style?: BrandStyle;
|
|
15
|
+
value?: InputPhoneValue;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare const InputPhone: ComponentType<InputPhoneProps>;
|
|
19
|
+
|
|
20
|
+
export default InputPhone;
|
package/types/product.d.ts
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ProviderFontFamily {
|
|
4
|
+
family?: string;
|
|
5
|
+
transform?: string;
|
|
6
|
+
weight?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ProviderFontFonts {
|
|
10
|
+
body: Record<string, string | undefined>;
|
|
11
|
+
heading: Record<string, string | undefined>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ProviderFontProps {
|
|
15
|
+
body?: ProviderFontFamily;
|
|
16
|
+
children: ( fonts: ProviderFontFonts ) => ReactNode;
|
|
17
|
+
heading?: ProviderFontFamily;
|
|
18
|
+
onError?: () => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare const ProviderFont: ComponentType<ProviderFontProps>;
|
|
22
|
+
|
|
23
|
+
export default ProviderFont;
|
package/types/video.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface VideoProps {
|
|
4
|
+
className?: string;
|
|
4
5
|
controls?: boolean;
|
|
5
6
|
hls?: string;
|
|
6
7
|
loop?: boolean;
|
|
@@ -9,6 +10,7 @@ export interface VideoProps {
|
|
|
9
10
|
onDuration?: ( seconds: number ) => void;
|
|
10
11
|
onEnded?: () => void;
|
|
11
12
|
onPlay?: () => void;
|
|
13
|
+
onTime?: ( seconds: number ) => void;
|
|
12
14
|
playing?: boolean;
|
|
13
15
|
poster?: string;
|
|
14
16
|
reset?: boolean;
|