@yakad/ui 1.3.164 → 1.3.166
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/ActiveOnVisible/ActiveOnVisible.d.ts +1 -1
- package/dist/ActiveOnVisible/ActiveOnVisible.js +2 -1
- package/dist/AppBar/AppBar.d.ts +1 -1
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/Avatar.js +2 -2
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +2 -2
- package/dist/Card/Card.d.ts +1 -1
- package/dist/CheckBox/CheckBox.d.ts +1 -1
- package/dist/CheckBox/CheckBox.js +2 -2
- package/dist/CodeBox/CodeBox.d.ts +1 -1
- package/dist/CodeBox/CodeBox.js +2 -2
- package/dist/CodeField/CodeField.d.ts +1 -1
- package/dist/Container/Container.d.ts +1 -1
- package/dist/Display/Display.d.ts +1 -1
- package/dist/Dropdown/Dropdown.d.ts +2 -1
- package/dist/Dropdown/Dropdown.js +17 -3
- package/dist/Footer/Footer.d.ts +1 -1
- package/dist/Form/Form.d.ts +1 -1
- package/dist/GridContainer/GridContainer.d.ts +1 -1
- package/dist/GridItem/GridItem.d.ts +1 -1
- package/dist/Hr/Hr.d.ts +1 -1
- package/dist/InputField/InputField.d.ts +13 -5
- package/dist/InputField/InputField.js +36 -6
- package/dist/InputField/cn.d.ts +2 -0
- package/dist/InputField/cn.js +5 -0
- package/dist/InputField/input.d.ts +7 -0
- package/dist/InputField/input.js +18 -0
- package/dist/List/List.d.ts +1 -1
- package/dist/ListItem/ListItem.d.ts +1 -1
- package/dist/Main/Main.d.ts +1 -1
- package/dist/Navigation/Navigation.d.ts +1 -1
- package/dist/Popup/Popup.d.ts +2 -1
- package/dist/Popup/Popup.js +19 -5
- package/dist/RadioButton/RadioButton.d.ts +1 -1
- package/dist/RadioButton/RadioButton.js +2 -2
- package/dist/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/RenderByScroll/RenderByScroll.d.ts +1 -1
- package/dist/RenderByScroll/RenderByScroll.js +2 -1
- package/dist/Row/Row.d.ts +1 -1
- package/dist/Screen/Screen.d.ts +1 -1
- package/dist/Select/Select.d.ts +1 -1
- package/dist/Spacer/Spacer.d.ts +1 -1
- package/dist/Stack/Stack.d.ts +1 -1
- package/dist/SvgIcon/SvgIcon.d.ts +1 -1
- package/dist/Table/Table.d.ts +7 -7
- package/dist/Text/Text.d.ts +9 -9
- package/dist/Theme/Theme.d.ts +1 -1
- package/dist/WithOverlay/WithOverlay.d.ts +1 -1
- package/dist/WithOverlay/WithOverlay.js +12 -23
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -11
- package/package.json +8 -4
- package/dist/InputField/InputField.module.css +0 -212
- package/dist/LoadingIcon/LoadingIcon.d.ts +0 -7
- package/dist/LoadingIcon/LoadingIcon.js +0 -19
- package/dist/LoadingIcon/LoadingIcon.module.css +0 -98
- package/dist/interactionHooks/useOnDoubleTap.d.ts +0 -2
- package/dist/interactionHooks/useOnDoubleTap.js +0 -23
- package/dist/interactionHooks/useOnHoverChange.d.ts +0 -2
- package/dist/interactionHooks/useOnHoverChange.js +0 -23
- package/dist/interactionHooks/useOnOutsideClick.d.ts +0 -2
- package/dist/interactionHooks/useOnOutsideClick.js +0 -21
- package/dist/interactionHooks/useOnPinch.d.ts +0 -2
- package/dist/interactionHooks/useOnPinch.js +0 -35
- package/dist/interactionHooks/useOnResizeChange.d.ts +0 -2
- package/dist/interactionHooks/useOnResizeChange.js +0 -23
- package/dist/interactionHooks/useOnRightClick.d.ts +0 -2
- package/dist/interactionHooks/useOnRightClick.js +0 -19
- package/dist/interactionHooks/useOnRotate.d.ts +0 -2
- package/dist/interactionHooks/useOnRotate.js +0 -36
- package/dist/interactionHooks/useOnScroll.d.ts +0 -2
- package/dist/interactionHooks/useOnScroll.js +0 -29
- package/dist/interactionHooks/useOnSwipe.d.ts +0 -2
- package/dist/interactionHooks/useOnSwipe.js +0 -53
- package/dist/interactionHooks/useOnVisibilityChange.d.ts +0 -2
- package/dist/interactionHooks/useOnVisibilityChange.js +0 -21
package/dist/Text/Text.d.ts
CHANGED
|
@@ -6,13 +6,13 @@ export interface TextProps<T> extends React.HTMLAttributes<T> {
|
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
ref?: React.Ref<T>;
|
|
8
8
|
}
|
|
9
|
-
export declare function H1({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react
|
|
10
|
-
export declare function H2({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react
|
|
11
|
-
export declare function H3({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react
|
|
12
|
-
export declare function H4({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react
|
|
13
|
-
export declare function H5({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react
|
|
14
|
-
export declare function H6({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react
|
|
15
|
-
export declare function P({ variant, palette, className, children, ...restProps }: TextProps<HTMLParagraphElement>): import("react
|
|
16
|
-
export declare function Span({ variant, palette, className, children, ...restProps }: TextProps<HTMLSpanElement>): import("react
|
|
17
|
-
export declare function Text({ variant, palette, className, children, ...restProps }: TextProps<HTMLDivElement>): import("react
|
|
9
|
+
export declare function H1({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react").JSX.Element;
|
|
10
|
+
export declare function H2({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react").JSX.Element;
|
|
11
|
+
export declare function H3({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react").JSX.Element;
|
|
12
|
+
export declare function H4({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react").JSX.Element;
|
|
13
|
+
export declare function H5({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react").JSX.Element;
|
|
14
|
+
export declare function H6({ variant, palette, className, children, ...restProps }: TextProps<HTMLHeadingElement>): import("react").JSX.Element;
|
|
15
|
+
export declare function P({ variant, palette, className, children, ...restProps }: TextProps<HTMLParagraphElement>): import("react").JSX.Element;
|
|
16
|
+
export declare function Span({ variant, palette, className, children, ...restProps }: TextProps<HTMLSpanElement>): import("react").JSX.Element;
|
|
17
|
+
export declare function Text({ variant, palette, className, children, ...restProps }: TextProps<HTMLDivElement>): import("react").JSX.Element;
|
|
18
18
|
export {};
|
package/dist/Theme/Theme.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export interface ThemeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
ref?: React.Ref<HTMLDivElement>;
|
|
12
12
|
}
|
|
13
|
-
export declare function Theme({ align, darkStyle, color, zoom, className, children, ...restProps }: ThemeProps): import("react
|
|
13
|
+
export declare function Theme({ align, darkStyle, color, zoom, className, children, ...restProps }: ThemeProps): import("react").JSX.Element;
|
|
@@ -11,5 +11,5 @@ export interface WithOverlayProps extends StackProps {
|
|
|
11
11
|
children?: React.ReactElement;
|
|
12
12
|
ref?: React.Ref<HTMLDivElement>;
|
|
13
13
|
}
|
|
14
|
-
export declare function WithOverlay({ trigger, overlay, children, onClick, ref, ...restProps }: WithOverlayProps): import("react
|
|
14
|
+
export declare function WithOverlay({ trigger, overlay, children, onClick, ref, ...restProps }: WithOverlayProps): import("react").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -11,9 +11,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
import { useState,
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { useState, useRef, useImperativeHandle, cloneElement, } from "react";
|
|
15
|
+
import { Stack, } from "..";
|
|
16
|
+
import { useOnRightClick } from "@yakad/use-interactions";
|
|
17
17
|
export function WithOverlay(_a) {
|
|
18
18
|
var { trigger = "onClick", overlay, children, onClick, ref } = _a, restProps = __rest(_a, ["trigger", "overlay", "children", "onClick", "ref"]);
|
|
19
19
|
// Get Triggers ref and send to Overlay
|
|
@@ -28,24 +28,13 @@ export function WithOverlay(_a) {
|
|
|
28
28
|
};
|
|
29
29
|
// Let the parent access our DOM node
|
|
30
30
|
useImperativeHandle(ref, () => localRef.current);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const teleport = overlay &&
|
|
41
|
-
portalRoot &&
|
|
42
|
-
createPortal(cloneElement(overlay, {
|
|
43
|
-
triggerref: localRef,
|
|
44
|
-
onClose: () => {
|
|
45
|
-
var _a, _b;
|
|
46
|
-
(_b = (_a = overlay.props).onClose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
47
|
-
setShowOverlay(false);
|
|
48
|
-
},
|
|
49
|
-
}), portalRoot);
|
|
50
|
-
return (_jsxs(_Fragment, { children: [_jsx(Stack, Object.assign({ ref: localRef }, restProps, { onClick: onClickHandler, children: children })), showOverlay && teleport] }));
|
|
31
|
+
const clonedOverlay = cloneElement(overlay, {
|
|
32
|
+
triggerref: localRef,
|
|
33
|
+
onClose: () => {
|
|
34
|
+
var _a, _b;
|
|
35
|
+
(_b = overlay === null || overlay === void 0 ? void 0 : (_a = overlay.props).onClose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
36
|
+
setShowOverlay(false);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
return (_jsxs(_Fragment, { children: [_jsx(Stack, Object.assign({ ref: localRef }, restProps, { onClick: onClickHandler, children: children })), showOverlay && clonedOverlay] }));
|
|
51
40
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export * from "./List/List";
|
|
|
16
16
|
export * from "./ListItem/ListItem";
|
|
17
17
|
export * from "./Table/Table";
|
|
18
18
|
export * from "./Button/Button";
|
|
19
|
-
export * from "./LoadingIcon/LoadingIcon";
|
|
20
19
|
export * from "./SvgIcon/SvgIcon";
|
|
21
20
|
export * from "./Text/Text";
|
|
22
21
|
export * from "./Form/Form";
|
|
@@ -34,13 +33,3 @@ export * from "./ActiveOnVisible/ActiveOnVisible";
|
|
|
34
33
|
export * from "./Dropdown/Dropdown";
|
|
35
34
|
export * from "./Popup/Popup";
|
|
36
35
|
export * from "./Avatar/Avatar";
|
|
37
|
-
export * from "./interactionHooks/useOnRightClick";
|
|
38
|
-
export * from "./interactionHooks/useOnOutsideClick";
|
|
39
|
-
export * from "./interactionHooks/useOnDoubleTap";
|
|
40
|
-
export * from "./interactionHooks/useOnSwipe";
|
|
41
|
-
export * from "./interactionHooks/useOnPinch";
|
|
42
|
-
export * from "./interactionHooks/useOnRotate";
|
|
43
|
-
export * from "./interactionHooks/useOnResizeChange";
|
|
44
|
-
export * from "./interactionHooks/useOnVisibilityChange";
|
|
45
|
-
export * from "./interactionHooks/useOnHoverChange";
|
|
46
|
-
export * from "./interactionHooks/useOnScroll";
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,6 @@ export * from "./List/List";
|
|
|
19
19
|
export * from "./ListItem/ListItem";
|
|
20
20
|
export * from "./Table/Table";
|
|
21
21
|
export * from "./Button/Button";
|
|
22
|
-
export * from "./LoadingIcon/LoadingIcon";
|
|
23
22
|
export * from "./SvgIcon/SvgIcon";
|
|
24
23
|
export * from "./Text/Text";
|
|
25
24
|
// Form Components
|
|
@@ -40,13 +39,3 @@ export * from "./ActiveOnVisible/ActiveOnVisible"; // Stack Based
|
|
|
40
39
|
export * from "./Dropdown/Dropdown"; // Card Based
|
|
41
40
|
export * from "./Popup/Popup"; // Card Based
|
|
42
41
|
export * from "./Avatar/Avatar";
|
|
43
|
-
export * from "./interactionHooks/useOnRightClick";
|
|
44
|
-
export * from "./interactionHooks/useOnOutsideClick";
|
|
45
|
-
export * from "./interactionHooks/useOnDoubleTap";
|
|
46
|
-
export * from "./interactionHooks/useOnSwipe";
|
|
47
|
-
export * from "./interactionHooks/useOnPinch";
|
|
48
|
-
export * from "./interactionHooks/useOnRotate";
|
|
49
|
-
export * from "./interactionHooks/useOnResizeChange";
|
|
50
|
-
export * from "./interactionHooks/useOnVisibilityChange";
|
|
51
|
-
export * from "./interactionHooks/useOnHoverChange";
|
|
52
|
-
export * from "./interactionHooks/useOnScroll";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yakad/ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.166",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Natiq",
|
|
6
6
|
"description": "UI components for NextJS/React",
|
|
@@ -33,8 +33,12 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@yakad/lib": "1.0.23",
|
|
36
|
-
"@yakad/symbols": "1.0.
|
|
37
|
-
"
|
|
36
|
+
"@yakad/symbols": "1.0.42",
|
|
37
|
+
"@yakad/use-interactions": "1.0.0",
|
|
38
|
+
"class-variance-authority": "^0.7.1",
|
|
39
|
+
"classnames": "2.5.1",
|
|
40
|
+
"clsx": "^2.1.1",
|
|
41
|
+
"tailwind-merge": "^3.6.0"
|
|
38
42
|
},
|
|
39
43
|
"peerDependencies": {
|
|
40
44
|
"react": "^19.2.0",
|
|
@@ -47,4 +51,4 @@
|
|
|
47
51
|
"react": "^19.0.0",
|
|
48
52
|
"react-dom": "^19.0.0"
|
|
49
53
|
}
|
|
50
|
-
}
|
|
54
|
+
}
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
.div {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-block;
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
padding-top: 0.6rem;
|
|
6
|
-
}
|
|
7
|
-
.input {
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
width: 100%;
|
|
10
|
-
margin: 0rem;
|
|
11
|
-
border-image: initial;
|
|
12
|
-
background-color: rgb(var(--surfaceContainerHighestColor, 230 224 233));
|
|
13
|
-
color: rgb(var(--onSurfaceColor, 28 27 31) / 0.87);
|
|
14
|
-
caret-color: rgb(var(--primaryColor, 11 87 208));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.input:focus {
|
|
18
|
-
outline: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.input ~ .label {
|
|
22
|
-
position: absolute;
|
|
23
|
-
top: 0;
|
|
24
|
-
left: 0;
|
|
25
|
-
display: block;
|
|
26
|
-
width: 100%;
|
|
27
|
-
height: 100%;
|
|
28
|
-
font-size: 1.5rem;
|
|
29
|
-
color: rgb(var(--onSurfaceColor, 28 27 31) / 0.6);
|
|
30
|
-
transition: 0.3s;
|
|
31
|
-
pointer-events: none;
|
|
32
|
-
}
|
|
33
|
-
@media (pointer: fine) {
|
|
34
|
-
.input:hover ~ .label {
|
|
35
|
-
color: rgb(var(--onSurfaceVariantColor, 73 69 78));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
.input:focus ~ .label {
|
|
39
|
-
color: rgb(var(--primaryColor, 11 87 208));
|
|
40
|
-
}
|
|
41
|
-
.input:disabled ~ .label {
|
|
42
|
-
color: rgb(var(--onSurfaceColor, 28 27 31) / 0.38);
|
|
43
|
-
}
|
|
44
|
-
.input:invalid ~ .label,
|
|
45
|
-
.input:invalid:focus ~ .label {
|
|
46
|
-
color: rgb(var(--errorColor, 11 87 208));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/********************************************* OutLined */
|
|
50
|
-
.input.outlined {
|
|
51
|
-
height: 5rem;
|
|
52
|
-
padding: 1.5rem 1.3rem;
|
|
53
|
-
border-width: 0.1rem;
|
|
54
|
-
border-style: solid;
|
|
55
|
-
border-color: rgb(var(--onSurfaceColor, 28 27 31) / 0.6);
|
|
56
|
-
border-radius: 0.4rem;
|
|
57
|
-
background-color: transparent;
|
|
58
|
-
}
|
|
59
|
-
.input.outlined.small {
|
|
60
|
-
padding: 0.75rem 1.3rem;
|
|
61
|
-
height: 3.5rem;
|
|
62
|
-
}
|
|
63
|
-
@media (pointer: fine) {
|
|
64
|
-
.input.outlined:hover {
|
|
65
|
-
border-color: rgb(var(--onSurfaceVariantColor, 73 69 78));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
.input.outlined:focus {
|
|
69
|
-
border-width: 0.2rem;
|
|
70
|
-
border-color: rgb(var(--primaryColor, 11 87 208));
|
|
71
|
-
}
|
|
72
|
-
.input.outlined:disabled {
|
|
73
|
-
border-color: rgb(var(--onSurfaceColor, 28 27 31) / 0.38);
|
|
74
|
-
}
|
|
75
|
-
.input.outlined:invalid {
|
|
76
|
-
border-color: rgb(var(--errorColor, 11 87 208));
|
|
77
|
-
}
|
|
78
|
-
.input.outlined:invalid:focus {
|
|
79
|
-
border-color: rgb(var(--errorColor, 11 87 208));
|
|
80
|
-
}
|
|
81
|
-
.input.outlined::placeholder {
|
|
82
|
-
color: transparent;
|
|
83
|
-
}
|
|
84
|
-
.input.outlined.havePlaceHolder:focus,
|
|
85
|
-
.input.outlined.havePlaceHolder:not(:placeholder-shown) {
|
|
86
|
-
border-top-color: transparent;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.input.outlined ~ .label {
|
|
90
|
-
display: flex;
|
|
91
|
-
border-color: rgb(var(--onSurfaceColor, 28 27 31) / 0.6);
|
|
92
|
-
width: 100%;
|
|
93
|
-
max-height: 100%;
|
|
94
|
-
line-height: 6rem;
|
|
95
|
-
}
|
|
96
|
-
.input.outlined.small ~ .label {
|
|
97
|
-
line-height: 4.5rem;
|
|
98
|
-
}
|
|
99
|
-
.input.outlined:focus ~ .label,
|
|
100
|
-
.input.outlined:not(:placeholder-shown) ~ .label {
|
|
101
|
-
font-size: 1.1rem;
|
|
102
|
-
line-height: 1.5rem;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.input.outlined ~ .label::before,
|
|
106
|
-
.input.outlined ~ .label::after {
|
|
107
|
-
margin-top: 0.6rem;
|
|
108
|
-
border-top-width: 0.1rem;
|
|
109
|
-
border-top-style: solid;
|
|
110
|
-
border-color: transparent;
|
|
111
|
-
content: "";
|
|
112
|
-
}
|
|
113
|
-
.input.outlined:not(:placeholder-shown) ~ .label::before,
|
|
114
|
-
.input.outlined:not(:placeholder-shown) ~ .label::after {
|
|
115
|
-
border-color: rgb(var(--onSurfaceColor, 28 27 31) / 0.6);
|
|
116
|
-
}
|
|
117
|
-
.input.outlined:invalid:not(:placeholder-shown) ~ .label::before,
|
|
118
|
-
.input.outlined:invalid:not(:placeholder-shown) ~ .label::after {
|
|
119
|
-
border-color: rgb(var(--errorColor, 11 87 208));
|
|
120
|
-
}
|
|
121
|
-
.input.outlined ~ .label::before {
|
|
122
|
-
width: 1rem;
|
|
123
|
-
margin-right: 1.2rem;
|
|
124
|
-
border-radius: 0.4rem 0rem;
|
|
125
|
-
}
|
|
126
|
-
.input.outlined ~ .label::after {
|
|
127
|
-
width: 100%;
|
|
128
|
-
margin-left: 1.2rem;
|
|
129
|
-
border-radius: 0rem 0.4rem;
|
|
130
|
-
}
|
|
131
|
-
.input.outlined:focus ~ .label::before,
|
|
132
|
-
.input.outlined:focus ~ .label::after {
|
|
133
|
-
border-width: 0.2rem;
|
|
134
|
-
border-top-color: rgb(var(--primaryColor, 11 87 208));
|
|
135
|
-
}
|
|
136
|
-
.input.outlined:invalid:focus ~ .label::before,
|
|
137
|
-
.input.outlined:invalid:focus ~ .label::after {
|
|
138
|
-
border-color: rgb(var(--errorColor, 11 87 208));
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/********************************************* Filled */
|
|
142
|
-
.input.filled {
|
|
143
|
-
height: 5rem;
|
|
144
|
-
padding: 0 1.2rem;
|
|
145
|
-
border: none;
|
|
146
|
-
border-bottom: solid 0.1rem rgb(var(--onSurfaceColor, 28 27 31) / 0.6);
|
|
147
|
-
border-radius: 0.4rem 0.4rem 0rem 0rem;
|
|
148
|
-
background-color: rgb(var(--onSurfaceColor, 28 27 31) / 0.04);
|
|
149
|
-
}
|
|
150
|
-
.input.filled.small {
|
|
151
|
-
height: 3.5rem;
|
|
152
|
-
}
|
|
153
|
-
@media (pointer: fine) {
|
|
154
|
-
.input.input.filled:hover {
|
|
155
|
-
border-color: rgb(var(--onSurfaceVariantColor, 73 69 78));
|
|
156
|
-
background-color: rgb(var(--onSurfaceVariantColor, 73 69 78) / 0.04);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
.input.filled:disabled {
|
|
160
|
-
border-bottom: solid 0.1rem rgb(var(--onSurfaceColor, 28 27 31) / 0.38);
|
|
161
|
-
}
|
|
162
|
-
.input.filled:invalid {
|
|
163
|
-
border-bottom-color: rgb(var(--errorColor, 11 87 208));
|
|
164
|
-
}
|
|
165
|
-
.input.filled.havePlaceHolder {
|
|
166
|
-
padding: 2rem 1.2rem 0.5rem;
|
|
167
|
-
}
|
|
168
|
-
.input.filled.small.havePlaceHolder {
|
|
169
|
-
padding: 1.5rem 1.2rem 0.5rem;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.input.filled::placeholder {
|
|
173
|
-
color: transparent;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.input.filled ~ .label {
|
|
177
|
-
display: block;
|
|
178
|
-
box-sizing: border-box;
|
|
179
|
-
line-height: 6rem;
|
|
180
|
-
padding: 0 1rem;
|
|
181
|
-
}
|
|
182
|
-
.input.filled.small ~ .label {
|
|
183
|
-
line-height: 4.5rem;
|
|
184
|
-
}
|
|
185
|
-
.input.filled:focus ~ .label,
|
|
186
|
-
.input.filled:not(:placeholder-shown) ~ .label {
|
|
187
|
-
font-size: 1.1rem;
|
|
188
|
-
line-height: 4rem;
|
|
189
|
-
}
|
|
190
|
-
.input.filled:focus.small ~ .label,
|
|
191
|
-
.input.filled.small:not(:placeholder-shown) ~ .label {
|
|
192
|
-
line-height: 3rem;
|
|
193
|
-
}
|
|
194
|
-
.input.filled ~ .label::after {
|
|
195
|
-
position: absolute;
|
|
196
|
-
left: 0rem;
|
|
197
|
-
content: "";
|
|
198
|
-
bottom: 0rem;
|
|
199
|
-
width: 100%;
|
|
200
|
-
height: 0.2rem;
|
|
201
|
-
display: inline-block;
|
|
202
|
-
background-color: rgb(var(--primaryColor, 11 87 208));
|
|
203
|
-
transform: scaleX(0);
|
|
204
|
-
transition: transform 0.3s ease 0s;
|
|
205
|
-
}
|
|
206
|
-
.input.filled:focus ~ .label::after {
|
|
207
|
-
transform: scale(1);
|
|
208
|
-
content: "";
|
|
209
|
-
}
|
|
210
|
-
.input.filled:invalid ~ .label::after {
|
|
211
|
-
background-color: rgb(var(--errorColor, 11 87 208));
|
|
212
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface LoadingIconProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
size?: "extraSmall" | "small" | "medium" | "large" | "extraLarge";
|
|
4
|
-
variant?: "scaleOut" | "dots" | "spinner";
|
|
5
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
6
|
-
}
|
|
7
|
-
export declare function LoadingIcon({ size, variant, className, ...restProps }: LoadingIconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import classNames from "classnames";
|
|
14
|
-
import styles from "./LoadingIcon.module.css";
|
|
15
|
-
export function LoadingIcon(_a) {
|
|
16
|
-
var { size = "medium", variant = "dots", className } = _a, restProps = __rest(_a, ["size", "variant", "className"]);
|
|
17
|
-
const joinedClassNames = classNames(styles.loadingIcon, styles[size], styles[variant], className);
|
|
18
|
-
return (_jsx("div", Object.assign({}, restProps, { className: joinedClassNames, children: _jsx("div", {}) })));
|
|
19
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
.extraSmall {
|
|
2
|
-
--size: 1.2rem;
|
|
3
|
-
}
|
|
4
|
-
.small {
|
|
5
|
-
--size: 2rem;
|
|
6
|
-
}
|
|
7
|
-
.medium {
|
|
8
|
-
--size: 2.4rem;
|
|
9
|
-
}
|
|
10
|
-
.large {
|
|
11
|
-
--size: 3rem;
|
|
12
|
-
}
|
|
13
|
-
.extraLarge {
|
|
14
|
-
--size: 5rem;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.loadingIcon {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
width: var(--size);
|
|
22
|
-
height: var(--size);
|
|
23
|
-
margin: auto;
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
--color: #7d7d7d;
|
|
26
|
-
}
|
|
27
|
-
.spinner div {
|
|
28
|
-
display: flex;
|
|
29
|
-
width: 75%;
|
|
30
|
-
height: 75%;
|
|
31
|
-
--spinner-border: calc(var(--size) / 8);
|
|
32
|
-
border-top: var(--spinner-border) solid var(--color);
|
|
33
|
-
border-right: var(--spinner-border) solid transparent;
|
|
34
|
-
border-bottom: none;
|
|
35
|
-
border-left: none;
|
|
36
|
-
border-radius: 50%;
|
|
37
|
-
animation: spinner 1000ms linear infinite;
|
|
38
|
-
}
|
|
39
|
-
@keyframes spinner {
|
|
40
|
-
to {
|
|
41
|
-
transform: rotate(360deg);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.dots div {
|
|
46
|
-
width: 20%;
|
|
47
|
-
height: 20%;
|
|
48
|
-
border-radius: 50%;
|
|
49
|
-
background-color: var(--color);
|
|
50
|
-
--dots-space: calc(var(--size) / 3);
|
|
51
|
-
--dots-space-negative: calc(0rem - (var(--size) / 3));
|
|
52
|
-
box-shadow: var(--dots-space) 0 var(--color),
|
|
53
|
-
var(--dots-space-negative) 0 var(--color);
|
|
54
|
-
position: relative;
|
|
55
|
-
animation: flash 0.6s ease-out infinite alternate;
|
|
56
|
-
}
|
|
57
|
-
@keyframes flash {
|
|
58
|
-
0% {
|
|
59
|
-
background-color: var(--color);
|
|
60
|
-
box-shadow: var(--dots-space) 0 var(--color),
|
|
61
|
-
var(--dots-space-negative) 0 transparent;
|
|
62
|
-
}
|
|
63
|
-
50% {
|
|
64
|
-
background-color: transparent;
|
|
65
|
-
box-shadow: var(--dots-space) 0 var(--color),
|
|
66
|
-
var(--dots-space-negative) 0 var(--color);
|
|
67
|
-
}
|
|
68
|
-
100% {
|
|
69
|
-
background-color: var(--color);
|
|
70
|
-
box-shadow: var(--dots-space) 0 transparent,
|
|
71
|
-
var(--dots-space-negative) 0 var(--color);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.scaleOut div {
|
|
76
|
-
width: 90%;
|
|
77
|
-
height: 90%;
|
|
78
|
-
border-radius: 50%;
|
|
79
|
-
background-color: var(--color);
|
|
80
|
-
animation: sk-scaleout 1s infinite ease-in-out;
|
|
81
|
-
}
|
|
82
|
-
@keyframes sk-scaleout {
|
|
83
|
-
0% {
|
|
84
|
-
transform: scale(0);
|
|
85
|
-
opacity: 1;
|
|
86
|
-
}
|
|
87
|
-
5% {
|
|
88
|
-
transform: scale(0);
|
|
89
|
-
opacity: 1;
|
|
90
|
-
}
|
|
91
|
-
50% {
|
|
92
|
-
opacity: 0.9;
|
|
93
|
-
}
|
|
94
|
-
100% {
|
|
95
|
-
transform: scale(1);
|
|
96
|
-
opacity: 0;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
-
export function useOnDoubleTap(callback, ref) {
|
|
3
|
-
const defaultRef = useRef(null);
|
|
4
|
-
const targetRef = ref !== null && ref !== void 0 ? ref : defaultRef;
|
|
5
|
-
const [lastTap, setLastTap] = useState(0);
|
|
6
|
-
const handleDoubleTap = useCallback((e) => {
|
|
7
|
-
const now = Date.now();
|
|
8
|
-
if (now - lastTap < 300) {
|
|
9
|
-
callback(e);
|
|
10
|
-
}
|
|
11
|
-
setLastTap(now);
|
|
12
|
-
}, [callback, lastTap]);
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
const element = targetRef.current;
|
|
15
|
-
if (!element)
|
|
16
|
-
return;
|
|
17
|
-
element.addEventListener("touchend", handleDoubleTap);
|
|
18
|
-
return () => {
|
|
19
|
-
element.removeEventListener("touchend", handleDoubleTap);
|
|
20
|
-
};
|
|
21
|
-
}, [handleDoubleTap, targetRef]);
|
|
22
|
-
return targetRef;
|
|
23
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useCallback, useEffect, useRef } from "react";
|
|
2
|
-
export function useOnHoverChange(callback, ref) {
|
|
3
|
-
const defaultRef = useRef(null);
|
|
4
|
-
const targetRef = ref !== null && ref !== void 0 ? ref : defaultRef;
|
|
5
|
-
const handleMouseEnter = useCallback((e) => {
|
|
6
|
-
window.matchMedia("(pointer: fine)").matches && callback(e, true);
|
|
7
|
-
}, [callback]);
|
|
8
|
-
const handleMouseLeave = useCallback((e) => {
|
|
9
|
-
window.matchMedia("(pointer: fine)").matches && callback(e, false);
|
|
10
|
-
}, [callback]);
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
const element = targetRef.current;
|
|
13
|
-
if (!element)
|
|
14
|
-
return;
|
|
15
|
-
element.addEventListener("mouseenter", handleMouseEnter);
|
|
16
|
-
element.addEventListener("mouseleave", handleMouseLeave);
|
|
17
|
-
return () => {
|
|
18
|
-
element.removeEventListener("mouseenter", handleMouseEnter);
|
|
19
|
-
element.removeEventListener("mouseleave", handleMouseLeave);
|
|
20
|
-
};
|
|
21
|
-
}, [handleMouseEnter, handleMouseLeave, targetRef]);
|
|
22
|
-
return targetRef;
|
|
23
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useCallback, useEffect, useRef } from "react";
|
|
2
|
-
export function useOnOutsideClick(callback, ref) {
|
|
3
|
-
const defaultRef = useRef(null);
|
|
4
|
-
const targetRef = ref !== null && ref !== void 0 ? ref : defaultRef;
|
|
5
|
-
const handleClick = useCallback((e) => {
|
|
6
|
-
e.preventDefault();
|
|
7
|
-
const element = targetRef.current;
|
|
8
|
-
if (!element)
|
|
9
|
-
return;
|
|
10
|
-
if (!element.contains(e.target)) {
|
|
11
|
-
callback(e);
|
|
12
|
-
}
|
|
13
|
-
}, [callback, targetRef]);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
document.addEventListener("click", handleClick);
|
|
16
|
-
return () => {
|
|
17
|
-
document.removeEventListener("click", handleClick);
|
|
18
|
-
};
|
|
19
|
-
}, [handleClick]);
|
|
20
|
-
return targetRef;
|
|
21
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
-
export function useOnPinch(callback, ref) {
|
|
3
|
-
const defaultRef = useRef(null);
|
|
4
|
-
const targetRef = ref !== null && ref !== void 0 ? ref : defaultRef;
|
|
5
|
-
const [startDistance, setStartDistance] = useState(0);
|
|
6
|
-
const getDistance = (t1, t2) => Math.hypot(t2.clientX - t1.clientX, t2.clientY - t1.clientY);
|
|
7
|
-
const handleStart = useCallback((e) => {
|
|
8
|
-
if (e.touches.length === 2) {
|
|
9
|
-
const [t1, t2] = e.touches;
|
|
10
|
-
setStartDistance(getDistance(t1, t2));
|
|
11
|
-
}
|
|
12
|
-
}, []);
|
|
13
|
-
const handleMove = useCallback((e) => {
|
|
14
|
-
if (e.touches.length === 2) {
|
|
15
|
-
const [t1, t2] = e.touches;
|
|
16
|
-
const dist = getDistance(t1, t2);
|
|
17
|
-
if (dist < startDistance - 20)
|
|
18
|
-
callback(e, "in");
|
|
19
|
-
if (dist > startDistance + 20)
|
|
20
|
-
callback(e, "out");
|
|
21
|
-
}
|
|
22
|
-
}, [callback, startDistance]);
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
const element = targetRef.current;
|
|
25
|
-
if (!element)
|
|
26
|
-
return;
|
|
27
|
-
element.addEventListener("touchstart", handleStart);
|
|
28
|
-
element.addEventListener("touchmove", handleMove);
|
|
29
|
-
return () => {
|
|
30
|
-
element.removeEventListener("touchstart", handleStart);
|
|
31
|
-
element.removeEventListener("touchmove", handleMove);
|
|
32
|
-
};
|
|
33
|
-
}, [handleMove, handleStart, targetRef]);
|
|
34
|
-
return targetRef;
|
|
35
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useCallback, useEffect, useRef } from "react";
|
|
2
|
-
export function useOnResizeChange(callback, ref) {
|
|
3
|
-
const defaultRef = useRef(null);
|
|
4
|
-
const targetRef = ref !== null && ref !== void 0 ? ref : defaultRef;
|
|
5
|
-
const handleResize = useCallback((e) => {
|
|
6
|
-
callback(e);
|
|
7
|
-
}, [callback]);
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
const element = targetRef.current;
|
|
10
|
-
if (!element)
|
|
11
|
-
return;
|
|
12
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
13
|
-
for (const entry of entries) {
|
|
14
|
-
handleResize(entry);
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
resizeObserver.observe(element);
|
|
18
|
-
return () => {
|
|
19
|
-
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
|
|
20
|
-
};
|
|
21
|
-
}, [handleResize, targetRef]);
|
|
22
|
-
return targetRef;
|
|
23
|
-
}
|