mado-ui 0.5.4 → 0.5.7
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/css/index.css +283 -8
- package/dist/components/drop-down.d.ts +12 -12
- package/dist/components/drop-down.d.ts.map +1 -1
- package/dist/components/form/human-verification.d.ts +15 -0
- package/dist/components/form/human-verification.d.ts.map +1 -0
- package/dist/components/form/input/date/views/calendar-view.d.ts +2 -0
- package/dist/components/form/input/date/views/calendar-view.d.ts.map +1 -0
- package/dist/components/form/input/date/views/clock-view.d.ts +2 -0
- package/dist/components/form/input/date/views/clock-view.d.ts.map +1 -0
- package/dist/components/form/input/date/views/dropdown-view.d.ts +2 -0
- package/dist/components/form/input/date/views/dropdown-view.d.ts.map +1 -0
- package/dist/components/form/input/date/views/rotary-view.d.ts +2 -0
- package/dist/components/form/input/date/views/rotary-view.d.ts.map +1 -0
- package/dist/components/form/input/date/views/view-handler.d.ts +21 -0
- package/dist/components/form/input/date/views/view-handler.d.ts.map +1 -0
- package/dist/components/form/input/index.d.ts +24 -24
- package/dist/components/form/input/index.d.ts.map +1 -1
- package/dist/components/form/input/input-types.d.ts +102 -0
- package/dist/components/form/input/input-types.d.ts.map +1 -0
- package/dist/components/form/input/number-input.d.ts +4 -0
- package/dist/components/form/input/number-input.d.ts.map +1 -0
- package/dist/components/form/input/text-input.d.ts +36 -0
- package/dist/components/form/input/text-input.d.ts.map +1 -0
- package/dist/components/form/select.d.ts +41 -0
- package/dist/components/form/select.d.ts.map +1 -0
- package/dist/components/link.d.ts +14 -13
- package/dist/components/link.d.ts.map +1 -1
- package/dist/components/tooltip.d.ts +7 -7
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/video.d.ts +6 -6
- package/dist/components/video.d.ts.map +1 -1
- package/dist/components.d.ts +50 -49
- package/dist/components.esm.js +600 -459
- package/dist/components.esm.js.map +1 -1
- package/dist/components.js +598 -456
- package/dist/components.js.map +1 -1
- package/dist/graphics/index.d.ts +2 -0
- package/dist/graphics/index.d.ts.map +1 -0
- package/dist/graphics/social-media/facebook-logo.d.ts +33 -0
- package/dist/graphics/social-media/facebook-logo.d.ts.map +1 -0
- package/dist/graphics/social-media/google-logo.d.ts +13 -0
- package/dist/graphics/social-media/google-logo.d.ts.map +1 -0
- package/dist/graphics/social-media/index.d.ts +8 -0
- package/dist/graphics/social-media/index.d.ts.map +1 -0
- package/dist/graphics/social-media/instagram-logo.d.ts +13 -0
- package/dist/graphics/social-media/instagram-logo.d.ts.map +1 -0
- package/dist/graphics/social-media/linkedin-logo.d.ts +26 -0
- package/dist/graphics/social-media/linkedin-logo.d.ts.map +1 -0
- package/dist/graphics/social-media/tiktok-logo.d.ts +26 -0
- package/dist/graphics/social-media/tiktok-logo.d.ts.map +1 -0
- package/dist/graphics/social-media/x-logo.d.ts +6 -0
- package/dist/graphics/social-media/x-logo.d.ts.map +1 -0
- package/dist/graphics/social-media/youtube-logo.d.ts +26 -0
- package/dist/graphics/social-media/youtube-logo.d.ts.map +1 -0
- package/dist/graphics.d.ts +141 -0
- package/dist/graphics.d.ts.map +1 -0
- package/dist/graphics.esm.js +241 -0
- package/dist/graphics.esm.js.map +1 -0
- package/dist/graphics.js +249 -0
- package/dist/graphics.js.map +1 -0
- package/dist/icons/index.d.ts +142 -143
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/square-and-arrow-up-right.d.ts +3 -0
- package/dist/icons/square-and-arrow-up-right.d.ts.map +1 -0
- package/dist/icons/square-and-pencil.d.ts +2 -2
- package/dist/icons/square-and-pencil.d.ts.map +1 -1
- package/dist/icons.d.ts +2 -4
- package/dist/icons.esm.js +2 -6
- package/dist/icons.esm.js.map +1 -1
- package/dist/icons.js +1 -6
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +50 -49
- package/dist/index.esm.js +600 -459
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +598 -456
- package/dist/index.js.map +1 -1
- package/dist/utils/string-manipulation.d.ts +23 -1
- package/dist/utils/string-manipulation.d.ts.map +1 -1
- package/dist/utils.d.ts +24 -2
- package/dist/utils.esm.js +76 -18
- package/dist/utils.esm.js.map +1 -1
- package/dist/utils.js +78 -17
- package/dist/utils.js.map +1 -1
- package/package.json +24 -32
- package/dist/components/mado-ui-provider.d.ts +0 -1
- package/dist/hooks/use-anime-scope.d.ts +0 -15
- package/dist/icons/square-and-pencil-fill.d.ts +0 -3
- package/dist/icons/square-and-pencil-fill.d.ts.map +0 -1
- package/dist/types.esm.js +0 -2
- package/dist/types.esm.js.map +0 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-view.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/date/views/dropdown-view.tsx"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,4CAE3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rotary-view.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/date/views/rotary-view.tsx"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,4CAEzB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OneOf } from '../../../../../types';
|
|
2
|
+
import { DateUIOption, DateTimeUIOption, TimeUIOption } from '..';
|
|
3
|
+
export type ViewHandlerProps = OneOf<[
|
|
4
|
+
{
|
|
5
|
+
type: 'date';
|
|
6
|
+
/** Using an array, offers multiple, defaulting to the first listed option. */
|
|
7
|
+
ui: DateUIOption;
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
type: 'datetime';
|
|
11
|
+
/** Using an array, offers multiple, defaulting to the first listed option. */
|
|
12
|
+
ui: DateTimeUIOption;
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: 'time';
|
|
16
|
+
/** Using an array, offers multiple, defaulting to the first listed option. */
|
|
17
|
+
ui: TimeUIOption;
|
|
18
|
+
}
|
|
19
|
+
]>;
|
|
20
|
+
export declare function ViewHandler({ type, ui }: ViewHandlerProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=view-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-handler.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/date/views/view-handler.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAsC,MAAM,IAAI,CAAA;AAErG,MAAM,MAAM,gBAAgB,GAAG,KAAK,CACnC;IACC;QACC,IAAI,EAAE,MAAM,CAAA;QACZ,8EAA8E;QAC9E,EAAE,EAAE,YAAY,CAAA;KAChB;IACD;QACC,IAAI,EAAE,UAAU,CAAA;QAChB,8EAA8E;QAC9E,EAAE,EAAE,gBAAgB,CAAA;KACpB;IACD;QACC,IAAI,EAAE,MAAM,CAAA;QACZ,8EAA8E;QAC9E,EAAE,EAAE,YAAY,CAAA;KAChB;CACD,CACD,CAAA;AAWD,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,gBAAgB,2CAkKzD"}
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { OneOf } from
|
|
2
|
-
type DateMinMax = Date | [number, DateTimeObject[
|
|
1
|
+
import { OneOf } from "../../../types";
|
|
2
|
+
type DateMinMax = Date | [number, DateTimeObject["month"], DateTimeObject["day"]] | Pick<DateTimeObject, "day" | "month" | "year">;
|
|
3
3
|
type DateTimeMinMax = Date | [
|
|
4
4
|
number,
|
|
5
|
-
DateTimeObject[
|
|
6
|
-
DateTimeObject[
|
|
7
|
-
DateTimeObject[
|
|
8
|
-
DateTimeObject[
|
|
9
|
-
DateTimeObject[
|
|
5
|
+
DateTimeObject["month"],
|
|
6
|
+
DateTimeObject["day"],
|
|
7
|
+
DateTimeObject["hour"],
|
|
8
|
+
DateTimeObject["minute"],
|
|
9
|
+
DateTimeObject["second"]
|
|
10
10
|
] | DateTimeObject;
|
|
11
|
-
type TimeMinMax = [DateTimeObject[
|
|
11
|
+
type TimeMinMax = [DateTimeObject["hour"], DateTimeObject["minute"], DateTimeObject["second"]] | Pick<DateTimeObject, "hour" | "minute" | "second">;
|
|
12
12
|
type WeekMinMax = [number, WeekNumber];
|
|
13
13
|
type InputType = OneOf<[
|
|
14
14
|
{
|
|
15
|
-
type?:
|
|
15
|
+
type?: "date";
|
|
16
16
|
min?: DateMinMax;
|
|
17
17
|
max?: DateMinMax;
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
|
-
type?:
|
|
20
|
+
type?: "datetime" | "datetime-local";
|
|
21
21
|
min?: DateTimeMinMax;
|
|
22
22
|
max?: DateTimeMinMax;
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
type?:
|
|
25
|
+
type?: "number";
|
|
26
26
|
max?: number;
|
|
27
27
|
min?: number;
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
type?:
|
|
30
|
+
type?: "password";
|
|
31
31
|
options?: Partial<PasswordOptions>;
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
type?:
|
|
34
|
+
type?: "tel";
|
|
35
35
|
options?: Partial<PhoneOptions>;
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
type?:
|
|
38
|
+
type?: "time";
|
|
39
39
|
min?: TimeMinMax;
|
|
40
40
|
max?: TimeMinMax;
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
type?:
|
|
43
|
+
type?: "week";
|
|
44
44
|
min?: WeekMinMax;
|
|
45
45
|
max?: WeekMinMax;
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
-
type?: Exclude<HTMLInputTypeAttribute,
|
|
48
|
+
type?: Exclude<HTMLInputTypeAttribute, "date" | "datetime" | "datetime-local" | "number" | "password" | "tel" | "time" | "week">;
|
|
49
49
|
}
|
|
50
50
|
]>;
|
|
51
|
-
export type InputProps = Omit<HeadlessInputProps,
|
|
51
|
+
export type InputProps = Omit<HeadlessInputProps, "max" | "min" | "name" | "type"> & InputType & {
|
|
52
52
|
description?: ReactNode;
|
|
53
|
-
descriptionProps?: Omit<DescriptionProps,
|
|
53
|
+
descriptionProps?: Omit<DescriptionProps, "children"> & {
|
|
54
54
|
/** @deprecated Use the `description` prop instead. */
|
|
55
55
|
children?: never;
|
|
56
56
|
};
|
|
57
|
-
fieldProps?: Omit<FieldProps,
|
|
57
|
+
fieldProps?: Omit<FieldProps, "children" | "disabled">;
|
|
58
58
|
label?: ReactNode;
|
|
59
|
-
labelProps?: Omit<LabelProps,
|
|
59
|
+
labelProps?: Omit<LabelProps, "children"> & {
|
|
60
60
|
/** @deprecated Use the `label` prop instead. */
|
|
61
61
|
children?: never;
|
|
62
62
|
};
|
|
@@ -93,11 +93,11 @@ type PhoneOptions = {
|
|
|
93
93
|
* format: 'standard' (default)
|
|
94
94
|
* returns: (555) 555-5555
|
|
95
95
|
*/
|
|
96
|
-
format:
|
|
96
|
+
format: "continuous" | "dot" | "hyphenated" | "none" | "space" | "standard";
|
|
97
97
|
};
|
|
98
|
-
import { HTMLInputTypeAttribute, ReactElement, ReactNode, RefObject } from
|
|
99
|
-
import { DescriptionProps, FieldProps, InputProps as HeadlessInputProps, LabelProps } from
|
|
100
|
-
import { DateTimeObject, WeekNumber } from
|
|
98
|
+
import { HTMLInputTypeAttribute, ReactElement, ReactNode, RefObject } from "react";
|
|
99
|
+
import { DescriptionProps, FieldProps, InputProps as HeadlessInputProps, LabelProps } from "@headlessui/react";
|
|
100
|
+
import { DateTimeObject, WeekNumber } from "../../../utils";
|
|
101
101
|
export declare function Input({ checked, className, defaultValue, description, descriptionProps, disabled, fieldProps, invalid, label, labelProps, max, min, name, onBlur, onChange, options, placeholder, ref, required, type, value, ...props }: InputProps): ReactElement;
|
|
102
102
|
export {};
|
|
103
103
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,KAAK,UAAU,GACZ,IAAI,GACJ,CAAC,MAAM,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,GACxD,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AAElD,KAAK,cAAc,GAChB,IAAI,GACJ;IACD,MAAM;IACN,cAAc,CAAC,OAAO,CAAC;IACvB,cAAc,CAAC,KAAK,CAAC;IACrB,cAAc,CAAC,MAAM,CAAC;IACtB,cAAc,CAAC,QAAQ,CAAC;IACxB,cAAc,CAAC,QAAQ,CAAC;CACxB,GACC,cAAc,CAAC;AAElB,KAAK,UAAU,GACZ,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC,GAC5E,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC;AAEtD,KAAK,UAAU,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAEvC,KAAK,SAAS,GAAG,KAAK,CACrB;IACC;QACC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,GAAG,CAAC,EAAE,UAAU,CAAC;QACjB,GAAG,CAAC,EAAE,UAAU,CAAC;KACjB;IACD;QACC,IAAI,CAAC,EAAE,UAAU,GAAG,gBAAgB,CAAC;QACrC,GAAG,CAAC,EAAE,cAAc,CAAC;QACrB,GAAG,CAAC,EAAE,cAAc,CAAC;KACrB;IACD;QACC,IAAI,CAAC,EAAE,QAAQ,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AAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;CACzC,CAAC;AAEH,KAAK,eAAe,GAAG;IACtB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,yBAAyB,EAAE,OAAO,CAAC;IACnC,aAAa,EAAE,OAAO,CAAC;IACvB,uBAAuB,EAAE,OAAO,CAAC;IACjC,yBAAyB,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,KAAK,YAAY,GAAG;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,EAAE,YAAY,GAAG,KAAK,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;CAC5E,CAAC;AAGF,OAAO,EAGN,sBAAsB,EACtB,YAAY,EACZ,SAAS,EACT,SAAS,EAIT,MAAM,OAAO,CAAC;AAYf,OAAO,EAEN,gBAAgB,EAEhB,UAAU,EAEV,UAAU,IAAI,kBAAkB,EAEhC,UAAU,EACV,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EACN,cAAc,EAQd,UAAU,EACV,MAAM,gBAAgB,CAAC;AAMxB,wBAAgB,KAAK,CAAC,EACrB,OAAO,EACP,SAAS,EACT,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,OAAc,EACd,KAAK,EACL,UAAU,EACV,GAAG,EACH,GAAG,EACH,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAW,EACX,GAAG,EACH,QAAe,EACf,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACR,EAAE,UAAU,GAAG,YAAY,CA0Z3B"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { InputProps as HeadlessInputProps } from '@headlessui/react';
|
|
2
|
+
import { ChangeEvent, FocusEvent } from 'react';
|
|
3
|
+
import { DateMinMax, DateTimeMinMax, DateTimeUIOption, DateUIOption, TimeMinMax, TimeUIOption } from './date/';
|
|
4
|
+
import { PasswordOptions, PhoneOptions } from './text-input';
|
|
5
|
+
import { OneOf } from '../../../types';
|
|
6
|
+
import { MonthNumber, WeekNumber } from '../../../utils';
|
|
7
|
+
import { InputProps } from './index';
|
|
8
|
+
export type BaseInputComponentProps = Omit<HeadlessInputProps, 'type'> & InputTypeProps & {
|
|
9
|
+
fieldContextID: string;
|
|
10
|
+
handleBlur: (props: OnBlurProps) => void;
|
|
11
|
+
handleChange: (props: OnChangeProps) => void;
|
|
12
|
+
};
|
|
13
|
+
export type InputType = 'button' | 'checkbox' | 'color' | 'date' | 'datetime' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'list' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | 'year';
|
|
14
|
+
export type DateTimeTypeProps = {
|
|
15
|
+
type: 'datetime' | 'datetime-local';
|
|
16
|
+
min?: DateTimeMinMax;
|
|
17
|
+
max?: DateTimeMinMax;
|
|
18
|
+
options?: Partial<{
|
|
19
|
+
ui: DateTimeUIOption;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
export type DateTypeProps = {
|
|
23
|
+
type: 'date';
|
|
24
|
+
min?: DateMinMax;
|
|
25
|
+
max?: DateMinMax;
|
|
26
|
+
options?: Partial<{
|
|
27
|
+
ui: DateUIOption;
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
export type MonthTypeProps = {
|
|
31
|
+
type: 'month';
|
|
32
|
+
min?: MonthNumber;
|
|
33
|
+
max?: MonthNumber;
|
|
34
|
+
options?: Partial<{
|
|
35
|
+
ui: DateUIOption;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
export type NumberTypeProps = {
|
|
39
|
+
type: 'number';
|
|
40
|
+
max?: number;
|
|
41
|
+
min?: number;
|
|
42
|
+
};
|
|
43
|
+
export type PasswordTypeProps = {
|
|
44
|
+
type: 'password';
|
|
45
|
+
options?: Partial<PasswordOptions>;
|
|
46
|
+
};
|
|
47
|
+
export type PhoneTypeProps = {
|
|
48
|
+
type: 'tel';
|
|
49
|
+
options?: Partial<PhoneOptions>;
|
|
50
|
+
};
|
|
51
|
+
export type TimeTypeProps = {
|
|
52
|
+
type: 'time';
|
|
53
|
+
min?: TimeMinMax;
|
|
54
|
+
max?: TimeMinMax;
|
|
55
|
+
options?: {
|
|
56
|
+
ui: TimeUIOption;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export type WeekTypeProps = {
|
|
60
|
+
type: 'week';
|
|
61
|
+
min?: WeekNumber;
|
|
62
|
+
max?: WeekNumber;
|
|
63
|
+
options?: {
|
|
64
|
+
ui: DateUIOption;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export type YearTypeProps = {
|
|
68
|
+
type: 'year';
|
|
69
|
+
min?: number;
|
|
70
|
+
max?: number;
|
|
71
|
+
options?: Partial<{
|
|
72
|
+
ui: DateUIOption;
|
|
73
|
+
}>;
|
|
74
|
+
};
|
|
75
|
+
export type InputTypeProps = OneOf<[
|
|
76
|
+
DateTypeProps,
|
|
77
|
+
DateTimeTypeProps,
|
|
78
|
+
MonthTypeProps,
|
|
79
|
+
NumberTypeProps,
|
|
80
|
+
PasswordTypeProps,
|
|
81
|
+
PhoneTypeProps,
|
|
82
|
+
TimeTypeProps,
|
|
83
|
+
WeekTypeProps,
|
|
84
|
+
YearTypeProps,
|
|
85
|
+
{
|
|
86
|
+
type?: Exclude<InputType, 'date' | 'datetime' | 'datetime-local' | 'month' | 'number' | 'password' | 'tel' | 'time' | 'week' | 'year'>;
|
|
87
|
+
}
|
|
88
|
+
]>;
|
|
89
|
+
export type OnBlurProps = {
|
|
90
|
+
e: FocusEvent<HTMLInputElement>;
|
|
91
|
+
format?: (value: string) => string | void;
|
|
92
|
+
validation?: ValidationHandler;
|
|
93
|
+
};
|
|
94
|
+
export type OnChangeProps = {
|
|
95
|
+
e: ChangeEvent<HTMLInputElement>;
|
|
96
|
+
validation?: ValidationHandler;
|
|
97
|
+
};
|
|
98
|
+
export type ValidationCheckers = Partial<Pick<InputProps, 'max' | 'min' | 'maxLength' | 'minLength' | 'multiple' | 'pattern' | 'step'>> & {
|
|
99
|
+
value: string;
|
|
100
|
+
};
|
|
101
|
+
export type ValidationHandler = (validationCheckers: ValidationCheckers) => string | string[] | void;
|
|
102
|
+
//# sourceMappingURL=input-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-types.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input/input-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC9G,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,GACrE,cAAc,GAAG;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;IACxC,YAAY,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;CAC5C,CAAA;AAEF,MAAM,MAAM,SAAS,GAClB,QAAQ,GACR,UAAU,GACV,OAAO,GACP,MAAM,GACN,UAAU,GACV,gBAAgB,GAChB,OAAO,GACP,MAAM,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AE,iBAAiB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC3B,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;IAChC,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACvC,IAAI,CAAC,UAAU,EAAE,KAAK,GAAG,KAAK,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC,CAC7F,GAAG;IACH,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,kBAAkB,EAAE,kBAAkB,KAAK,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BaseInputComponentProps } from './input-types';
|
|
2
|
+
export type NumberInputProps = BaseInputComponentProps;
|
|
3
|
+
export declare function NumberInput({ className, fieldContextID, handleBlur, handleChange, options, placeholder, type, ...props }: NumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=number-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-input.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input/number-input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAqB,MAAM,eAAe,CAAA;AAE1E,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,CAAA;AAWtD,wBAAgB,WAAW,CAAC,EAC3B,SAAS,EACT,cAAc,EACd,UAAU,EACV,YAAY,EACZ,OAAO,EACP,WAAW,EACX,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,gBAAgB,2CAkDlB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BaseInputComponentProps } from './input-types';
|
|
2
|
+
export type PasswordOptions = {
|
|
3
|
+
matchPreviousInput: boolean;
|
|
4
|
+
requireLowercaseCharacter: boolean;
|
|
5
|
+
requireNumber: boolean;
|
|
6
|
+
requireSpecialCharacter: boolean;
|
|
7
|
+
requireUppercaseCharacter: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type PhoneOptions = {
|
|
10
|
+
countryCode: string;
|
|
11
|
+
/**
|
|
12
|
+
* @example
|
|
13
|
+
* format: 'continuous'
|
|
14
|
+
* returns: 5555555555
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* format: 'dot'
|
|
18
|
+
* returns: 555.555.5555
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* format: 'hyphenated'
|
|
22
|
+
* returns: 555-555-5555
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* format: 'space'
|
|
26
|
+
* returns: 555 555 5555
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* format: 'standard' (default)
|
|
30
|
+
* returns: (555) 555-5555
|
|
31
|
+
*/
|
|
32
|
+
format: 'continuous' | 'dot' | 'hyphenated' | 'none' | 'space' | 'standard';
|
|
33
|
+
};
|
|
34
|
+
export type TextInputProps = BaseInputComponentProps;
|
|
35
|
+
export declare function TextInput({ className, fieldContextID, handleBlur, handleChange, options, placeholder, type, ...props }: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
//# sourceMappingURL=text-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input/text-input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAqB,MAAM,eAAe,CAAA;AAE1E,MAAM,MAAM,eAAe,GAAG;IAC7B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,yBAAyB,EAAE,OAAO,CAAA;IAClC,aAAa,EAAE,OAAO,CAAA;IACtB,uBAAuB,EAAE,OAAO,CAAA;IAChC,yBAAyB,EAAE,OAAO,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,EAAE,YAAY,GAAG,KAAK,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAA;CAC3E,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,uBAAuB,CAAA;AAapD,wBAAgB,SAAS,CAAC,EACzB,SAAS,EACT,cAAc,EACd,UAAU,EACV,YAAY,EACZ,OAAO,EACP,WAAW,EACX,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,cAAc,2CAwIhB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { OneOf } from '../../types';
|
|
2
|
+
type IsolatedValue<T extends ValueOption | ValueOption[]> = {
|
|
3
|
+
defaultValue?: T;
|
|
4
|
+
} | {
|
|
5
|
+
value?: T;
|
|
6
|
+
};
|
|
7
|
+
type MultipleOrSingleValue = OneOf<[
|
|
8
|
+
{
|
|
9
|
+
multiple: true;
|
|
10
|
+
} & IsolatedValue<ValueOption[]>,
|
|
11
|
+
{
|
|
12
|
+
multiple?: false;
|
|
13
|
+
} & IsolatedValue<ValueOption>
|
|
14
|
+
]>;
|
|
15
|
+
export type SelectProps = Omit<ListboxProps, 'defaultValue' | 'multiple' | 'name' | 'value'> & Pick<FieldProps, 'disabled'> & MultipleOrSingleValue & {
|
|
16
|
+
description?: ReactNode;
|
|
17
|
+
descriptionProps?: Omit<DescriptionProps, 'children'> & {
|
|
18
|
+
/** @deprecated Use the `description` prop instead. */
|
|
19
|
+
children?: never;
|
|
20
|
+
};
|
|
21
|
+
fieldProps?: Omit<FieldProps, 'children' | 'disabled'>;
|
|
22
|
+
label?: ReactNode;
|
|
23
|
+
labelProps?: Omit<LabelProps, 'children'> & {
|
|
24
|
+
/** @deprecated Use the `label` prop instead. */
|
|
25
|
+
children?: never;
|
|
26
|
+
};
|
|
27
|
+
name: string;
|
|
28
|
+
optionList: ListboxSelectedOptionProps['options'];
|
|
29
|
+
ref?: RefObject<HTMLInputElement | null>;
|
|
30
|
+
required?: boolean;
|
|
31
|
+
};
|
|
32
|
+
type ValueOption = string | {
|
|
33
|
+
id: string;
|
|
34
|
+
render?: ReactNode;
|
|
35
|
+
value: string;
|
|
36
|
+
};
|
|
37
|
+
import { ReactElement, ReactNode, RefObject } from 'react';
|
|
38
|
+
import { DescriptionProps, FieldProps, LabelProps, ListboxProps, ListboxSelectedOptionProps } from '@headlessui/react';
|
|
39
|
+
export declare function Select({ defaultValue, description, descriptionProps, disabled, fieldProps, invalid, label, labelProps, multiple, name, onChange, optionList, required, value, ...props }: SelectProps): ReactElement;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/form/select.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,KAAK,aAAa,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,IAAI;IAAE,YAAY,CAAC,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,KAAK,CAAC,EAAE,CAAC,CAAA;CAAE,CAAA;AAEhG,KAAK,qBAAqB,GAAG,KAAK,CACjC;IACC;QACC,QAAQ,EAAE,IAAI,CAAA;KACd,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC;IAChC;QACC,QAAQ,CAAC,EAAE,KAAK,CAAA;KAChB,GAAG,aAAa,CAAC,WAAW,CAAC;CAC9B,CACD,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC,GAC3F,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,GAC5B,qBAAqB,GAAG;IACvB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,gBAAgB,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;QACvD,sDAAsD;QACtD,QAAQ,CAAC,EAAE,KAAK,CAAA;KAChB,CAAA;IACD,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC,CAAA;IACtD,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG;QAC3C,gDAAgD;QAChD,QAAQ,CAAC,EAAE,KAAK,CAAA;KAChB,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAA;IACjD,GAAG,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAEF,KAAK,WAAW,GAAG,MAAM,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAG7E,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAA;AAM5E,OAAO,EAEN,gBAAgB,EAEhB,UAAU,EAEV,UAAU,EAKV,YAAY,EAEZ,0BAA0B,EAC1B,MAAM,mBAAmB,CAAA;AAa1B,wBAAgB,MAAM,CAAC,EACtB,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,OAAO,EACP,KAAK,EACL,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACR,EAAE,WAAW,GAAG,YAAY,CA2I5B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AnyElementProps, ColorTheme, OneOf } from
|
|
2
|
-
import { ElementType, ReactElement } from
|
|
3
|
-
export type AnchorProps<TTag extends ElementType =
|
|
1
|
+
import { AnyElementProps, ColorTheme, OneOf } from "../types";
|
|
2
|
+
import { ElementType, ReactElement } from "react";
|
|
3
|
+
export type AnchorProps<TTag extends ElementType = "a"> = AnyElementProps<TTag> & {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare function Anchor<TTag extends ElementType =
|
|
6
|
+
export declare function Anchor<TTag extends ElementType = "a">({ as, className, disabled, href, onClick, target, rel, ...props }: AnchorProps<TTag>): ReactElement;
|
|
7
7
|
type ThemeColorOrClasses = OneOf<[
|
|
8
8
|
{
|
|
9
9
|
/**
|
|
@@ -19,12 +19,13 @@ type ThemeColorOrClasses = OneOf<[
|
|
|
19
19
|
]>;
|
|
20
20
|
export type LinkProps<TTag extends ElementType = typeof Anchor> = AnyElementProps<TTag, OneOf<[
|
|
21
21
|
{
|
|
22
|
-
type?:
|
|
22
|
+
type?: "center" | "lift" | "ltr" | "multiline" | "multiline-center" | "multiline-lift" | "multiline-ltr" | "multiline-rtl" | "multiline-static" | "normal" | "rtl" | "static";
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
type?:
|
|
25
|
+
type?: "fill" | "fill-lift" | "fill-ltr" | "fill-rtl" | "multiline-fill" | "multiline-fill-center" | "multiline-fill-ltr" | "multiline-fill-lift" | "multiline-fill-rtl";
|
|
26
26
|
} & ColorTheme
|
|
27
27
|
]>>;
|
|
28
|
+
export declare function getLinkClasses({ customTheme, theme, type }: Pick<LinkProps, "customTheme" | "theme" | "type">): string;
|
|
28
29
|
/**
|
|
29
30
|
* # Link
|
|
30
31
|
*
|
|
@@ -61,14 +62,14 @@ export type ExtendedLinkConfig = {
|
|
|
61
62
|
/** Adds default classes. */
|
|
62
63
|
className?: string;
|
|
63
64
|
/** Sets the default theme. */
|
|
64
|
-
defaultTheme?: ColorTheme[
|
|
65
|
+
defaultTheme?: ColorTheme["theme"] | string;
|
|
65
66
|
/** Sets the default for the `type` prop. */
|
|
66
|
-
type?: LinkProps[
|
|
67
|
+
type?: LinkProps["type"];
|
|
67
68
|
/** Add more theme options. */
|
|
68
69
|
theme?: {
|
|
69
70
|
[themeName: string]: {
|
|
70
71
|
/** Custom theme configuration - supports both multiline and regular link theme formats */
|
|
71
|
-
customTheme: Omit<ThemeColorOrClasses,
|
|
72
|
+
customTheme: Omit<ThemeColorOrClasses, "themeColor"> & {
|
|
72
73
|
themeColor?: {
|
|
73
74
|
/** Example: `'after:[--theme-color:var(--color-blue-500)]'` */
|
|
74
75
|
fill: string;
|
|
@@ -81,10 +82,10 @@ export type ExtendedLinkConfig = {
|
|
|
81
82
|
};
|
|
82
83
|
};
|
|
83
84
|
};
|
|
84
|
-
type ExtendedThemeNames<T extends ExtendedLinkConfig> = T[
|
|
85
|
-
export type ExtendedLinkProps<TExtendedConfig extends ExtendedLinkConfig, TTag extends ElementType = typeof Anchor> = Omit<LinkProps<TTag>,
|
|
86
|
-
theme?: LinkProps<TTag>[
|
|
87
|
-
customTheme?: LinkProps<TTag>[
|
|
85
|
+
type ExtendedThemeNames<T extends ExtendedLinkConfig> = T["theme"] extends Record<string, unknown> ? keyof T["theme"] : never;
|
|
86
|
+
export type ExtendedLinkProps<TExtendedConfig extends ExtendedLinkConfig, TTag extends ElementType = typeof Anchor> = Omit<LinkProps<TTag>, "theme" | "customTheme"> & {
|
|
87
|
+
theme?: LinkProps<TTag>["theme"] | ExtendedThemeNames<TExtendedConfig>;
|
|
88
|
+
customTheme?: LinkProps<TTag>["customTheme"];
|
|
88
89
|
};
|
|
89
90
|
/**
|
|
90
91
|
* # createLink
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,UAAU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GAAG,aAAa,CAAC,GAAG;IACpD,KAAK,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACvE,WAAW,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,UAAU,CAAC,eAAe,SAAS,kBAAkB,EACpE,MAAM,EAAE,eAAe,IAEM,IAAI,SAAS,WAAW,GAAG,OAAO,MAAM,EAAE,uDAOpE,iBAAiB,CAAC,eAAe,EAAE,IAAI,CAAC,6CA0F3C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyElementProps } from
|
|
1
|
+
import { AnyElementProps } from "../types";
|
|
2
2
|
export type TooltipProps = {
|
|
3
3
|
anchor?: Placement;
|
|
4
4
|
arrow?: boolean;
|
|
@@ -14,14 +14,14 @@ export type TooltipProps = {
|
|
|
14
14
|
portal?: boolean;
|
|
15
15
|
maxWidth?: number;
|
|
16
16
|
};
|
|
17
|
-
export type TooltipTriggerProps<T extends ElementType =
|
|
17
|
+
export type TooltipTriggerProps<T extends ElementType = "button"> = AnyElementProps<T> & {
|
|
18
18
|
asChild?: boolean;
|
|
19
19
|
};
|
|
20
|
-
export type TooltipPanelProps<T extends ElementType =
|
|
21
|
-
import { ElementType, ReactElement, ReactNode } from
|
|
22
|
-
import { Placement } from
|
|
23
|
-
import { Button as HeadlessButton } from
|
|
20
|
+
export type TooltipPanelProps<T extends ElementType = "div"> = AnyElementProps<T>;
|
|
21
|
+
import { ElementType, ReactElement, ReactNode } from "react";
|
|
22
|
+
import { Placement } from "@floating-ui/react-dom";
|
|
23
|
+
import { Button as HeadlessButton } from "@headlessui/react";
|
|
24
24
|
export declare function TooltipTrigger<T extends ElementType = typeof HeadlessButton>({ as, asChild, children, ...props }: TooltipTriggerProps<T>): ReactElement;
|
|
25
|
-
export declare function TooltipPanel<T extends ElementType =
|
|
25
|
+
export declare function TooltipPanel<T extends ElementType = "div">({ as, children, className, style, ...props }: TooltipPanelProps<T>): ReactElement;
|
|
26
26
|
export declare function Tooltip({ anchor, arrow, arrowClassName, children, delay, offset, onClose, onOpen, portal, }: TooltipProps): ReactElement;
|
|
27
27
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,EACL,SAAS,GACT,CAAC,CACF,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE;QAC9B,WAAW,EAAE,MAAM,IAAI,CAAC;QACxB,YAAY,EAAE,MAAM,IAAI,CAAC;KACzB,KACG,SAAS,CAAC,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,IAC7D,eAAe,CAAC,CAAC,CAAC,GAClB;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,IAAI,eAAe,CAC7E,CAAC,CACD,CAAC;AAGF,OAAO,EAIN,WAAW,EAIX,YAAY,EACZ,SAAS,EAMT,MAAM,OAAO,CAAC;AAIf,OAAO,EAKN,SAAS,EAIT,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAK7D,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,OAAO,cAAc,EAAE,EAC7E,EAAE,EACF,OAAe,EACf,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,YAAY,CAQvC;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,EAC3D,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACR,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,YAAY,CAerC;AAED,wBAAgB,OAAO,CAAC,EACvB,MAAc,EACd,KAAK,EACL,cAAc,EACd,QAAQ,EACR,KAAW,EACX,MAAU,EACV,OAAO,EACP,MAAM,EACN,MAAM,GACN,EAAE,YAAY,GAAG,YAAY,CA+O7B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OneOf } from
|
|
2
|
-
export type VideoControl =
|
|
1
|
+
import { OneOf } from "../types";
|
|
2
|
+
export type VideoControl = "download" | "fullscreen" | "playbackrate" | "pause" | "remoteplayback" | "seeking" | "volume";
|
|
3
3
|
type Source = {
|
|
4
4
|
src: string;
|
|
5
|
-
type:
|
|
5
|
+
type: "video/avi" | "video/flv" | "video/mkv" | "video/mov" | "video/mp4" | "video/ogg" | "video/webm";
|
|
6
6
|
};
|
|
7
7
|
type SourceOrSourceGroup = OneOf<[
|
|
8
8
|
Source,
|
|
@@ -10,12 +10,12 @@ type SourceOrSourceGroup = OneOf<[
|
|
|
10
10
|
srcGroup: Source[];
|
|
11
11
|
}
|
|
12
12
|
]>;
|
|
13
|
-
export type VideoProps = Omit<ComponentPropsWithRef<
|
|
13
|
+
export type VideoProps = Omit<ComponentPropsWithRef<"video">, "controls" | "controlList" | "poster" | "src" | "title"> & {
|
|
14
14
|
controls?: boolean | VideoControl | VideoControl[];
|
|
15
15
|
poster?: {
|
|
16
16
|
primary?: boolean;
|
|
17
17
|
src: string;
|
|
18
|
-
type:
|
|
18
|
+
type: "image/apng" | "image/avif" | "image/gif" | "image/jpeg" | "image/png" | "image/svg+xml" | "image/webp";
|
|
19
19
|
width: number;
|
|
20
20
|
}[];
|
|
21
21
|
/** @deprecated Even if you only have on source file, please use srcSet. */
|
|
@@ -25,7 +25,7 @@ export type VideoProps = Omit<ComponentPropsWithRef<'video'>, 'controls' | 'cont
|
|
|
25
25
|
})[];
|
|
26
26
|
title: string;
|
|
27
27
|
};
|
|
28
|
-
import { ComponentPropsWithRef, ReactElement } from
|
|
28
|
+
import { ComponentPropsWithRef, ReactElement } from "react";
|
|
29
29
|
export declare function Video({ autoPlay, className, controls, poster, ref, srcSet, title, ...props }: VideoProps): ReactElement;
|
|
30
30
|
export {};
|
|
31
31
|
//# sourceMappingURL=video.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/components/video.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/components/video.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,YAAY,GACrB,UAAU,GACV,YAAY,GACZ,cAAc,GACd,OAAO,GACP,gBAAgB,GAChB,SAAS,GACT,QAAQ,CAAC;AAEZ,KAAK,MAAM,GAAG;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EACD,WAAW,GACX,WA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