xtreme-ui 0.0.8 → 0.0.10

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,3 @@
1
+ /// <reference types="react" />
2
+ import { TButtonProps } from './types';
3
+ export declare const Button: import("react").ForwardRefExoticComponent<TButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,35 @@
1
+ import { HTMLAttributes, MouseEvent } from 'react';
2
+ import { EIconType } from '../Icon/types';
3
+ declare enum EButtonSize {
4
+ mini = "mini",
5
+ default = "default",
6
+ large = "large"
7
+ }
8
+ interface BaseButton extends HTMLAttributes<HTMLButtonElement> {
9
+ className?: string;
10
+ type?: keyof typeof EButtonTypes;
11
+ size?: keyof typeof EButtonSize;
12
+ loading?: boolean;
13
+ disabled?: boolean;
14
+ iconType?: keyof typeof EIconType;
15
+ iconPosition?: 'left' | 'right';
16
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
17
+ }
18
+ interface ButtonWithLabel extends BaseButton {
19
+ label: string;
20
+ icon?: string;
21
+ }
22
+ interface ButtonWithIconName extends BaseButton {
23
+ label?: string;
24
+ icon: string;
25
+ }
26
+ export type TButtonProps = ButtonWithLabel | ButtonWithIconName;
27
+ export declare enum EButtonTypes {
28
+ primary = "primary",
29
+ primaryDanger = "primaryDanger",
30
+ secondary = "secondary",
31
+ secondaryDanger = "secondaryDanger",
32
+ link = "link",
33
+ linkDanger = "linkDanger"
34
+ }
35
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { IIconProps } from './types';
3
+ export declare const Icon: import("react").ForwardRefExoticComponent<IIconProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,22 @@
1
+ export type IIconProps = {
2
+ className?: string;
3
+ code: string;
4
+ type?: keyof typeof EIconType;
5
+ size?: number | keyof typeof EIconSize;
6
+ };
7
+ export declare enum EIconType {
8
+ thin = "thin",
9
+ light = "light",
10
+ regular = "regular",
11
+ solid = "solid",
12
+ duotone = "duotone",
13
+ sharpSolid = "sharpSolid",
14
+ sharpRegular = "sharpRegular",
15
+ sharpLight = "sharpLight",
16
+ brand = "brand"
17
+ }
18
+ export declare enum EIconSize {
19
+ mini = 12,
20
+ default = 18,
21
+ large = 24
22
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { IProgressBarProps } from './types';
3
+ export declare const ProgressBar: import("react").ForwardRefExoticComponent<IProgressBarProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,6 @@
1
+ export type IProgressBarProps = {
2
+ className?: string;
3
+ progress?: number;
4
+ intermediate?: boolean;
5
+ };
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/ProgressBar/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB,CAAA"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { TTextfieldProps } from './types';
3
+ export declare const Textfield: import("react").ForwardRefExoticComponent<TTextfieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,68 @@
1
+ import { ChangeEvent } from 'react';
2
+ import { EIconType } from '../Icon/types';
3
+ export type TTextfieldProps = {
4
+ className?: string;
5
+ type?: keyof typeof ETextfieldType;
6
+ textarea?: boolean;
7
+ placeholder: string;
8
+ autoFocus?: boolean;
9
+ autoComplete?: keyof typeof ETextfieldAutoComplete;
10
+ icon?: string;
11
+ iconType?: keyof typeof EIconType;
12
+ value?: string;
13
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
14
+ };
15
+ declare enum ETextfieldType {
16
+ text = "text",
17
+ number = "number",
18
+ password = "password",
19
+ search = "search"
20
+ }
21
+ declare enum ETextfieldAutoComplete {
22
+ 'off' = "off",
23
+ 'on' = "on",
24
+ 'name' = "name",
25
+ 'honorific-prefix' = "honorific-prefix",
26
+ 'given-name' = "given-name",
27
+ 'additional-name' = "additional-name",
28
+ 'family-name' = "family-name",
29
+ 'honorific-suffix' = "honorific-suffix",
30
+ 'nickname' = "nickname",
31
+ 'email' = "email",
32
+ 'username' = "username",
33
+ 'new-password' = "new-password",
34
+ 'current-password' = "current-password",
35
+ 'one-time-code' = "one-time-code",
36
+ 'organization-title' = "organization-title",
37
+ 'organization' = "organization",
38
+ 'street-address' = "street-address",
39
+ 'address-line1' = "address-line1",
40
+ 'address-line2' = "address-line2",
41
+ 'address-line3' = "address-line3",
42
+ 'address-level4' = "address-level4",
43
+ 'address-level3' = "address-level3",
44
+ 'address-level2' = "address-level2",
45
+ 'address-level1' = "address-level1",
46
+ 'country' = "country",
47
+ 'country-name' = "country-name",
48
+ 'postal-code' = "postal-code",
49
+ 'cc-name' = "cc-name",
50
+ 'cc-given-name' = "cc-given-name",
51
+ 'cc-additional-name' = "cc-additional-name",
52
+ 'cc-family-name' = "cc-family-name",
53
+ 'cc-number' = "cc-number",
54
+ 'cc-exp' = "cc-exp",
55
+ 'cc-exp-month' = "cc-exp-month",
56
+ 'cc-exp-year' = "cc-exp-year",
57
+ 'cc-csc' = "cc-csc",
58
+ 'cc-type' = "cc-type",
59
+ 'transaction-currency' = "transaction-currency",
60
+ 'transaction-amount' = "transaction-amount",
61
+ 'language' = "language",
62
+ 'bday' = "bday",
63
+ 'bday-day' = "bday-day",
64
+ 'bday-month' = "bday-month",
65
+ 'bday-year' = "bday-year"
66
+ }
67
+ export {};
68
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/Textfield/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO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YAAY;IACrB,eAAe,kBAAkB;IACjC,oBAAoB,uBAAuB;IAC3C,gBAAgB,mBAAmB;IACnC,WAAW,cAAc;IACzB,QAAQ,WAAW;IACnB,cAAc,iBAAiB;IAC/B,aAAa,gBAAgB;IAC7B,QAAQ,WAAW;IACnB,SAAS,YAAY;IACrB,sBAAsB,yBAAyB;IAC/C,oBAAoB,uBAAuB;IAC3C,UAAU,aAAa;IACvB,MAAM,SAAS;IACf,UAAU,aAAa;IACvB,YAAY,eAAe;IAC3B,WAAW,cAAc;CACzB"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { TNavigationProps } from './types';
3
+ export declare const Navigation: import("react").ForwardRefExoticComponent<TNavigationProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ export type TNavigationProps = {
3
+ className?: string;
4
+ Routes?: FC<TNavigationRoute>;
5
+ };
6
+ export type TNavigationRoute = {
7
+ className: string;
8
+ activeClassName: string;
9
+ iconClassName: string;
10
+ labelClassName: string;
11
+ };
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,MAAM,MAAM,gBAAgB,GAAG;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC;CAC9B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACvB,CAAA"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { TSiderProps } from './types';
3
+ export declare const Sider: import("react").ForwardRefExoticComponent<TSiderProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ export type TSiderProps = {
3
+ className?: string;
4
+ children?: ReactNode;
5
+ leftSider?: ReactNode;
6
+ showMiniLeftSider?: boolean;
7
+ rightSider?: ReactNode;
8
+ showMiniRightSider?: boolean;
9
+ open?: keyof typeof EOpenModes;
10
+ setOpen?: (open: boolean) => void;
11
+ };
12
+ declare enum EOpenModes {
13
+ left = "left",
14
+ right = "right",
15
+ closed = "closed"
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Sider/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAC/B,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC,CAAA;AACD,aAAK,UAAU;IACd,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;CACjB"}
package/dist/index.d.ts CHANGED
@@ -1,221 +1,13 @@
1
- import { ChangeEvent } from 'react';
2
- import { FC } from 'react';
3
- import { ForwardRefExoticComponent } from 'react';
4
- import { HTMLAttributes } from 'react';
5
- import { LegacyRef } from 'react';
6
- import { MouseEvent as MouseEvent_2 } from 'react';
7
- import { MutableRefObject } from 'react';
8
- import { ReactNode } from 'react';
9
- import { RefAttributes } from 'react';
10
- import { RefCallback } from 'react';
11
- import { RefObject } from 'react';
12
-
13
- declare interface BaseButton extends HTMLAttributes<HTMLButtonElement> {
14
- className?: string;
15
- type?: keyof typeof EButtonTypes;
16
- size?: keyof typeof EButtonSize;
17
- loading?: boolean;
18
- disabled?: boolean;
19
- iconType?: keyof typeof EIconType;
20
- iconPosition?: 'left' | 'right';
21
- onClick?: (event: MouseEvent_2<HTMLButtonElement>) => void;
22
- }
23
-
24
- export declare const Button: ForwardRefExoticComponent<TButtonProps & RefAttributes<HTMLButtonElement>>;
25
-
26
- declare interface ButtonWithIconName extends BaseButton {
27
- label?: string;
28
- icon: string;
29
- }
30
-
31
- declare interface ButtonWithLabel extends BaseButton {
32
- label: string;
33
- icon?: string;
34
- }
35
-
36
- export declare const dom: (Window & typeof globalThis) | undefined;
37
-
38
- declare enum EButtonSize {
39
- mini = "mini",
40
- default = "default",
41
- large = "large"
42
- }
43
-
44
- export declare enum EButtonTypes {
45
- primary = "primary",
46
- primaryDanger = "primaryDanger",
47
- secondary = "secondary",
48
- secondaryDanger = "secondaryDanger",
49
- link = "link",
50
- linkDanger = "linkDanger"
51
- }
52
-
53
- declare enum EElementObserverEvent {
54
- added = "added",
55
- removed = "removed"
56
- }
57
-
58
- export declare enum EIconSize {
59
- mini = 12,
60
- default = 18,
61
- large = 24
62
- }
63
-
64
- export declare enum EIconType {
65
- thin = "thin",
66
- light = "light",
67
- regular = "regular",
68
- solid = "solid",
69
- duotone = "duotone",
70
- sharpSolid = "sharpSolid",
71
- sharpRegular = "sharpRegular",
72
- sharpLight = "sharpLight",
73
- brand = "brand"
74
- }
75
-
76
- export declare const elementObserver: (cb: ElementObserverCallback, selectors: string[]) => void;
77
-
78
- declare type ElementObserverCallback = (element: HTMLElement, event: keyof typeof EElementObserverEvent, record: MutationRecord) => void;
79
-
80
- declare enum EOpenModes {
81
- left = "left",
82
- right = "right",
83
- closed = "closed"
84
- }
85
-
86
- declare enum ETextfieldAutoComplete {
87
- 'off' = "off",
88
- 'on' = "on",
89
- 'name' = "name",
90
- 'honorific-prefix' = "honorific-prefix",
91
- 'given-name' = "given-name",
92
- 'additional-name' = "additional-name",
93
- 'family-name' = "family-name",
94
- 'honorific-suffix' = "honorific-suffix",
95
- 'nickname' = "nickname",
96
- 'email' = "email",
97
- 'username' = "username",
98
- 'new-password' = "new-password",
99
- 'current-password' = "current-password",
100
- 'one-time-code' = "one-time-code",
101
- 'organization-title' = "organization-title",
102
- 'organization' = "organization",
103
- 'street-address' = "street-address",
104
- 'address-line1' = "address-line1",
105
- 'address-line2' = "address-line2",
106
- 'address-line3' = "address-line3",
107
- 'address-level4' = "address-level4",
108
- 'address-level3' = "address-level3",
109
- 'address-level2' = "address-level2",
110
- 'address-level1' = "address-level1",
111
- 'country' = "country",
112
- 'country-name' = "country-name",
113
- 'postal-code' = "postal-code",
114
- 'cc-name' = "cc-name",
115
- 'cc-given-name' = "cc-given-name",
116
- 'cc-additional-name' = "cc-additional-name",
117
- 'cc-family-name' = "cc-family-name",
118
- 'cc-number' = "cc-number",
119
- 'cc-exp' = "cc-exp",
120
- 'cc-exp-month' = "cc-exp-month",
121
- 'cc-exp-year' = "cc-exp-year",
122
- 'cc-csc' = "cc-csc",
123
- 'cc-type' = "cc-type",
124
- 'transaction-currency' = "transaction-currency",
125
- 'transaction-amount' = "transaction-amount",
126
- 'language' = "language",
127
- 'bday' = "bday",
128
- 'bday-day' = "bday-day",
129
- 'bday-month' = "bday-month",
130
- 'bday-year' = "bday-year"
131
- }
132
-
133
- declare enum ETextfieldType {
134
- text = "text",
135
- number = "number",
136
- password = "password",
137
- search = "search"
138
- }
139
-
140
- export declare const getCssProperty: (property: string, element: RefObject<HTMLElement>) => string;
141
-
142
- export declare const getCssPropertyPx: (property: string, element: RefObject<HTMLElement>) => number;
143
-
144
- export declare const getCssPropertyVh: (property: string, element: RefObject<HTMLElement>) => number[];
145
-
146
- export declare const getCssPropertyVw: (property: string, element: RefObject<HTMLElement>) => number[];
147
-
148
- export declare const Icon: ForwardRefExoticComponent<IIconProps & RefAttributes<HTMLSpanElement>>;
149
-
150
- export declare type IIconProps = {
151
- className?: string;
152
- code: string;
153
- type?: keyof typeof EIconType;
154
- size?: number | keyof typeof EIconSize;
155
- };
156
-
157
- export declare type IProgressBarProps = {
158
- className?: string;
159
- progress?: number;
160
- intermediate?: boolean;
161
- };
162
-
163
- export declare const isClient: boolean;
164
-
165
- export declare const mergeRefs: <T>(refs: (MutableRefObject<T> | LegacyRef<T>)[]) => RefCallback<T>;
166
-
167
- export declare const Navigation: ForwardRefExoticComponent<TNavigationProps & RefAttributes<HTMLDivElement>>;
168
-
169
- export declare const ProgressBar: ForwardRefExoticComponent<IProgressBarProps & RefAttributes<HTMLDivElement>>;
170
-
171
- export declare const safeStringFromCodePoint: (codePoint: number) => string;
172
-
173
- export declare const setCssProperty: (property: string, value: string, element: RefObject<HTMLElement>) => void | "";
174
-
175
- export declare const Sider: ForwardRefExoticComponent<TSiderProps & RefAttributes<HTMLDivElement>>;
176
-
177
- export declare type TButtonProps = ButtonWithLabel | ButtonWithIconName;
178
-
179
- export declare const Textfield: ForwardRefExoticComponent<TTextfieldProps & RefAttributes<HTMLInputElement>>;
180
-
181
- export declare type TNavigationProps = {
182
- className?: string;
183
- Routes?: FC<TNavigationRoute>;
184
- };
185
-
186
- export declare type TNavigationRoute = {
187
- className: string;
188
- activeClassName: string;
189
- iconClassName: string;
190
- labelClassName: string;
191
- };
192
-
193
- export declare type TSiderProps = {
194
- className?: string;
195
- children?: ReactNode;
196
- leftSider?: ReactNode;
197
- showMiniLeftSider?: boolean;
198
- rightSider?: ReactNode;
199
- showMiniRightSider?: boolean;
200
- open?: keyof typeof EOpenModes;
201
- setOpen?: (open: boolean) => void;
202
- };
203
-
204
- export declare type TTextfieldProps = {
205
- className?: string;
206
- type?: keyof typeof ETextfieldType;
207
- textarea?: boolean;
208
- placeholder: string;
209
- autoFocus?: boolean;
210
- autoComplete?: keyof typeof ETextfieldAutoComplete;
211
- icon?: string;
212
- iconType?: keyof typeof EIconType;
213
- value?: string;
214
- onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
215
- };
216
-
217
- export declare const unicodeToString: (unicode: string) => string;
218
-
219
- export declare const waitForElement: (selector: string) => Promise<HTMLElement>;
220
-
221
- export { }
1
+ export * from './utils/index';
2
+ export { Button } from './components/base/Button/Button';
3
+ export type { TButtonProps, EButtonTypes } from './components/base/Button/types';
4
+ export { Icon } from './components/base/Icon/Icon';
5
+ export type { IIconProps, EIconType, EIconSize } from './components/base/Icon/types';
6
+ export { ProgressBar } from './components/base/ProgressBar/ProgressBar';
7
+ export type { IProgressBarProps } from './components/base/ProgressBar/types';
8
+ export { Textfield } from './components/base/Textfield/Textfield';
9
+ export type { TTextfieldProps } from './components/base/Textfield/types';
10
+ export { Sider } from './components/layout/Sider/Sider';
11
+ export type { TSiderProps } from './components/layout/Sider/types';
12
+ export { Navigation } from './components/layout/Navigation/Navigation';
13
+ export type { TNavigationProps, TNavigationRoute } from './components/layout/Navigation/types';