@1doc/1ds-react 0.0.1 → 2.7.1
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/CHANGELOG.md +667 -0
- package/README.md +138 -6
- package/package.json +43 -10
- package/src/index.ts +161 -16
- package/src/teste/AttachmentCard.test.tsx +161 -0
- package/src/teste/Chart.test.tsx +233 -0
- package/src/teste/Combobox.test.tsx +251 -0
- package/src/teste/DataTable.test.tsx +70 -0
- package/src/teste/DatePicker.test.tsx +86 -0
- package/src/teste/Drawer.test.tsx +265 -0
- package/src/teste/Dropdown.test.tsx +217 -0
- package/src/teste/Input.test.tsx +64 -0
- package/src/teste/Kanban.test.tsx +333 -0
- package/src/teste/MultiSelect.test.tsx +73 -0
- package/src/teste/Podium.test.tsx +107 -0
- package/src/teste/Popover.test.tsx +221 -0
- package/src/teste/SegmentedControl.test.tsx +183 -0
- package/src/teste/Timeline.test.tsx +100 -0
- package/src/teste/Tree.test.tsx +74 -0
- package/src/teste/setup.ts +7 -0
- package/src/utils/bandeiras.ts +22 -0
- package/src/utils/chart.ts +682 -0
- package/src/utils/density.ts +27 -0
- package/src/utils/overlay-stack.ts +26 -0
- package/src/utils/theme.ts +63 -47
- package/src/utils/toast.ts +89 -0
- package/vitest.config.ts +28 -0
- package/dist/components/Alert/Alert.css +0 -188
- package/dist/components/Alert/Alert.d.ts +0 -65
- package/dist/components/Alert/Alert.js +0 -56
- package/dist/components/Avatar/Avatar.css +0 -88
- package/dist/components/Avatar/Avatar.d.ts +0 -34
- package/dist/components/Avatar/Avatar.js +0 -16
- package/dist/components/Avatar/AvatarGroup.d.ts +0 -12
- package/dist/components/Avatar/AvatarGroup.js +0 -8
- package/dist/components/Badge/Badge.css +0 -155
- package/dist/components/Badge/Badge.d.ts +0 -46
- package/dist/components/Badge/Badge.js +0 -17
- package/dist/components/Button/Button.css +0 -199
- package/dist/components/Button/Button.d.ts +0 -23
- package/dist/components/Button/Button.js +0 -62
- package/dist/components/Checkbox/Checkbox.css +0 -122
- package/dist/components/Checkbox/Checkbox.d.ts +0 -21
- package/dist/components/Checkbox/Checkbox.js +0 -49
- package/dist/components/Divider/Divider.css +0 -81
- package/dist/components/Divider/Divider.d.ts +0 -18
- package/dist/components/Divider/Divider.js +0 -26
- package/dist/components/Grid/Grid.css +0 -154
- package/dist/components/Grid/Grid.d.ts +0 -21
- package/dist/components/Grid/Grid.js +0 -53
- package/dist/components/Icon/Icon.css +0 -41
- package/dist/components/Icon/Icon.d.ts +0 -12
- package/dist/components/Icon/Icon.js +0 -29
- package/dist/components/Input/Input.css +0 -190
- package/dist/components/Input/Input.d.ts +0 -32
- package/dist/components/Input/Input.js +0 -58
- package/dist/components/Link/Link.css +0 -76
- package/dist/components/Link/Link.d.ts +0 -15
- package/dist/components/Link/Link.js +0 -19
- package/dist/components/Logo/Logo.css +0 -32
- package/dist/components/Logo/Logo.d.ts +0 -10
- package/dist/components/Logo/Logo.js +0 -16
- package/dist/components/Modal/Modal.css +0 -155
- package/dist/components/Modal/Modal.d.ts +0 -36
- package/dist/components/Modal/Modal.js +0 -55
- package/dist/components/Radio/Radio.css +0 -114
- package/dist/components/Radio/Radio.d.ts +0 -19
- package/dist/components/Radio/Radio.js +0 -39
- package/dist/components/Select/Select.css +0 -291
- package/dist/components/Select/Select.d.ts +0 -38
- package/dist/components/Select/Select.js +0 -246
- package/dist/components/Spinner/Spinner.css +0 -60
- package/dist/components/Spinner/Spinner.d.ts +0 -16
- package/dist/components/Spinner/Spinner.js +0 -16
- package/dist/components/Switch/Switch.css +0 -127
- package/dist/components/Switch/Switch.d.ts +0 -18
- package/dist/components/Switch/Switch.js +0 -57
- package/dist/components/Tabs/Tab.d.ts +0 -19
- package/dist/components/Tabs/Tab.js +0 -76
- package/dist/components/Tabs/TabContent.d.ts +0 -15
- package/dist/components/Tabs/TabContent.js +0 -11
- package/dist/components/Tabs/Tabs.css +0 -124
- package/dist/components/Tabs/Tabs.d.ts +0 -20
- package/dist/components/Tabs/Tabs.js +0 -14
- package/dist/components/Tabs/TabsContent.d.ts +0 -16
- package/dist/components/Tabs/TabsContent.js +0 -12
- package/dist/components/Tabs/tabs.context.d.ts +0 -2
- package/dist/components/Tabs/tabs.context.js +0 -2
- package/dist/components/Tag/Tag.css +0 -140
- package/dist/components/Tag/Tag.d.ts +0 -63
- package/dist/components/Tag/Tag.js +0 -48
- package/dist/components/Text/Text.css +0 -1213
- package/dist/components/Text/Text.d.ts +0 -70
- package/dist/components/Text/Text.js +0 -89
- package/dist/components/Textarea/Textarea.css +0 -133
- package/dist/components/Textarea/Textarea.d.ts +0 -28
- package/dist/components/Textarea/Textarea.js +0 -72
- package/dist/index.d.ts +0 -25
- package/dist/index.js +0 -27
- package/dist/utils/theme.d.ts +0 -30
- package/dist/utils/theme.js +0 -106
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
/* Base Wrapper */
|
|
2
|
-
.umds-input {
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
gap: var(--umds-primitive-spacing-nano);
|
|
6
|
-
/* 1.5 spacing unit fallback */
|
|
7
|
-
font-family: var(--umds-semantic-font-family-base);
|
|
8
|
-
width: 320px;
|
|
9
|
-
/* Default width */
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.umds-input--full-width {
|
|
13
|
-
width: 100%;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* Label */
|
|
17
|
-
.umds-input__label {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
gap: 2px;
|
|
21
|
-
/* Font styles handled by Text component */
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.umds-input__required {
|
|
25
|
-
color: var(--umds-semantic-color-feedback-negative-pure);
|
|
26
|
-
font-weight: bold;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* Input Container (Box) */
|
|
30
|
-
.umds-input__container {
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
position: relative;
|
|
34
|
-
background-color: var(--umds-semantic-color-background-white);
|
|
35
|
-
border: 1px solid var(--umds-semantic-color-neutral-dark-up);
|
|
36
|
-
border-radius: var(--umds-primitive-border-radius-sm);
|
|
37
|
-
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* Sizes */
|
|
41
|
-
.umds-input--md .umds-input__container {
|
|
42
|
-
height: var(--umds-primitive-spacing-sm);
|
|
43
|
-
padding: 0 var(--umds-primitive-spacing-xxxs);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.umds-input--lg .umds-input__container {
|
|
47
|
-
height: var(--umds-primitive-spacing-md);
|
|
48
|
-
padding: 0 var(--umds-primitive-spacing-xxs);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.umds-input--sm .umds-input__container {
|
|
52
|
-
height: var(--umds-primitive-spacing-xs);
|
|
53
|
-
padding: 0 var(--umds-primitive-spacing-nano);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.umds-input--xs .umds-input__container {
|
|
57
|
-
height: var(--umds-primitive-spacing-xxs);
|
|
58
|
-
padding: 0 var(--umds-primitive-spacing-nano);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* Control (Input element) */
|
|
62
|
-
.umds-input__control {
|
|
63
|
-
flex: 1;
|
|
64
|
-
border: none;
|
|
65
|
-
background: transparent;
|
|
66
|
-
outline: none;
|
|
67
|
-
color: var(--umds-semantic-color-neutral-pure);
|
|
68
|
-
font-size: var(--umds-primitive-font-size-xs);
|
|
69
|
-
width: 100%;
|
|
70
|
-
padding: 0;
|
|
71
|
-
margin: 0;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.umds-input__control::placeholder {
|
|
75
|
-
color: var(--umds-semantic-color-neutral-light-down);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.umds-input--lg .umds-input__control {
|
|
79
|
-
font-size: var(--umds-primitive-font-size-sm);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.umds-input--sm .umds-input__control {
|
|
83
|
-
font-size: var(--umds-primitive-font-size-xxs);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.umds-input--xs .umds-input__control {
|
|
87
|
-
font-size: var(--umds-primitive-font-size-xxxs);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* States */
|
|
91
|
-
.umds-input__container:hover {
|
|
92
|
-
border-color: var(--umds-semantic-color-neutral-dark-up);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.umds-input__container:focus-within {
|
|
96
|
-
/* Match Button Focus Style */
|
|
97
|
-
outline: 2px solid var(--umds-semantic-color-neutral-dark-down);
|
|
98
|
-
outline-offset: 2px;
|
|
99
|
-
border-color: var(--umds-semantic-color-neutral-light-medium);
|
|
100
|
-
/* Keep original border */
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/* Error State */
|
|
104
|
-
.umds-input--error .umds-input__container {
|
|
105
|
-
border-color: var(--umds-semantic-color-feedback-negative-pure);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.umds-input--error .umds-input__container:focus-within {
|
|
109
|
-
outline: 2px solid var(--umds-semantic-color-feedback-negative-pure);
|
|
110
|
-
border-color: var(--umds-semantic-color-feedback-negative-pure);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* Disabled State */
|
|
114
|
-
.umds-input--disabled .umds-input__label,
|
|
115
|
-
.umds-input--disabled .umds-input__message {
|
|
116
|
-
color: var(--umds-semantic-color-neutral-light-down);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.umds-input--disabled .umds-input__container {
|
|
120
|
-
background-color: var(--umds-semantic-color-neutral-light-medium);
|
|
121
|
-
border-color: var(--umds-semantic-color-neutral-light-down);
|
|
122
|
-
pointer-events: none;
|
|
123
|
-
/* Prevent interaction */
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.umds-input--disabled .umds-input__control {
|
|
127
|
-
color: var(--umds-semantic-color-neutral-light-down);
|
|
128
|
-
-webkit-text-fill-color: var(--umds-semantic-color-neutral-light-down);
|
|
129
|
-
/* Fix for Safari/Chrome disabled text color */
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.umds-input--disabled .umds-input__icon-left,
|
|
133
|
-
.umds-input--disabled .umds-input__actions-right {
|
|
134
|
-
color: var(--umds-semantic-color-neutral-light-down);
|
|
135
|
-
opacity: 1;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.umds-input--disabled .umds-input__required {
|
|
139
|
-
opacity: 0.3;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/* Ensure cursor is applied effectively */
|
|
143
|
-
.umds-input--disabled,
|
|
144
|
-
.umds-input--disabled input,
|
|
145
|
-
.umds-input--disabled button {
|
|
146
|
-
cursor: not-allowed;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/* Read Only State */
|
|
150
|
-
.umds-input--readonly .umds-input__container {
|
|
151
|
-
background-color: var(--umds-semantic-color-background-light);
|
|
152
|
-
border-color: var(--umds-semantic-color-neutral-light-medium);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* Icons */
|
|
156
|
-
.umds-input__icon-left {
|
|
157
|
-
display: flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
justify-content: center;
|
|
160
|
-
margin-right: var(--umds-primitive-spacing-nano);
|
|
161
|
-
color: var(--umds-semantic-color-neutral-dark-up);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.umds-input__actions-right {
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
gap: var(--umds-primitive-spacing-nano);
|
|
168
|
-
margin-left: var(--umds-primitive-spacing-nano);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.umds-input__action-btn {
|
|
172
|
-
display: flex;
|
|
173
|
-
align-items: center;
|
|
174
|
-
justify-content: center;
|
|
175
|
-
background: none;
|
|
176
|
-
border: none;
|
|
177
|
-
cursor: pointer;
|
|
178
|
-
padding: 0;
|
|
179
|
-
color: var(--umds-semantic-color-neutral-dark-up);
|
|
180
|
-
transition: color 0.15s ease;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.umds-input__action-btn:hover {
|
|
184
|
-
color: var(--umds-semantic-color-primary-pure);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.umds-input__action-btn:focus {
|
|
188
|
-
outline: none;
|
|
189
|
-
color: var(--umds-semantic-color-primary-dark);
|
|
190
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import './Input.css';
|
|
2
|
-
export interface InputAction {
|
|
3
|
-
icon: any;
|
|
4
|
-
onClick?: (event: any) => void;
|
|
5
|
-
label?: string;
|
|
6
|
-
tooltip?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface InputProps {
|
|
9
|
-
label?: any;
|
|
10
|
-
type?: "text" | "password" | "email" | "number" | "tel" | "url" | "search";
|
|
11
|
-
name?: string;
|
|
12
|
-
value?: string;
|
|
13
|
-
defaultValue?: string;
|
|
14
|
-
placeholder?: string;
|
|
15
|
-
helperText?: any;
|
|
16
|
-
errorMessage?: any;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
readOnly?: boolean;
|
|
19
|
-
required?: boolean;
|
|
20
|
-
size?: "xs" | "sm" | "md" | "lg";
|
|
21
|
-
fullWidth?: boolean;
|
|
22
|
-
className?: string;
|
|
23
|
-
iconLeft?: any;
|
|
24
|
-
iconsRight?: InputAction[];
|
|
25
|
-
onChange?: (event: any) => void;
|
|
26
|
-
onFocus?: (event: any) => void;
|
|
27
|
-
onBlur?: (event: any) => void;
|
|
28
|
-
mask?: string;
|
|
29
|
-
[key: string]: any;
|
|
30
|
-
}
|
|
31
|
-
declare function Input(props: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
export default Input;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import './Input.css';
|
|
3
|
-
"use client";
|
|
4
|
-
import { useState } from "react";
|
|
5
|
-
import Icon from "../Icon/Icon";
|
|
6
|
-
import Text from "../Text/Text";
|
|
7
|
-
function Input(props) {
|
|
8
|
-
const [isPasswordVisible, setIsPasswordVisible] = useState(() => false);
|
|
9
|
-
function togglePassword() {
|
|
10
|
-
setIsPasswordVisible(!isPasswordVisible);
|
|
11
|
-
}
|
|
12
|
-
const [internalValue, setInternalValue] = useState(() => props.defaultValue);
|
|
13
|
-
function inputType() {
|
|
14
|
-
if (props.type === "password" && isPasswordVisible) {
|
|
15
|
-
return "text";
|
|
16
|
-
}
|
|
17
|
-
return props.type || "text";
|
|
18
|
-
}
|
|
19
|
-
function wrapperClasses() {
|
|
20
|
-
const hasError = props.errorMessage && props.errorMessage.length > 0;
|
|
21
|
-
return [
|
|
22
|
-
"umds-input",
|
|
23
|
-
props.fullWidth ? "umds-input--full-width" : "",
|
|
24
|
-
hasError ? "umds-input--error" : "",
|
|
25
|
-
props.disabled ? "umds-input--disabled" : "",
|
|
26
|
-
props.readOnly ? "umds-input--readonly" : "",
|
|
27
|
-
`umds-input--${props.size || "md"}`,
|
|
28
|
-
props.className,
|
|
29
|
-
]
|
|
30
|
-
.filter(Boolean)
|
|
31
|
-
.join(" ");
|
|
32
|
-
}
|
|
33
|
-
function inputContainerClasses() {
|
|
34
|
-
const hasError = props.errorMessage && props.errorMessage.length > 0;
|
|
35
|
-
return [
|
|
36
|
-
"umds-input__container",
|
|
37
|
-
hasError ? "umds-input__container--error" : "",
|
|
38
|
-
props.disabled ? "umds-input__container--disabled" : "",
|
|
39
|
-
props.readOnly ? "umds-input__container--readonly" : "",
|
|
40
|
-
]
|
|
41
|
-
.filter(Boolean)
|
|
42
|
-
.join(" ");
|
|
43
|
-
}
|
|
44
|
-
function iconSize() {
|
|
45
|
-
return props.size === "sm" || props.size === "xs" ? "sm" : "md";
|
|
46
|
-
}
|
|
47
|
-
function handleChange(event) {
|
|
48
|
-
setInternalValue(event.target.value);
|
|
49
|
-
if (props.onChange) {
|
|
50
|
-
props.onChange(event);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return (_jsxs("div", { className: wrapperClasses(), children: [props.label ? (_jsxs(Text, { as: "label", variant: "label", className: "umds-input__label", children: [_jsx(_Fragment, { children: props.label || "{props.label}" }), props.required ? (_jsx("span", { className: "umds-input__required", children: "*" })) : null] })) : null, _jsxs("div", { className: inputContainerClasses(), children: [props.iconLeft ? (_jsx("div", { className: "umds-input__icon-left", children: typeof props.iconLeft === "string" ? (_jsx(Icon, { name: props.iconLeft, size: iconSize() })) : (_jsx(_Fragment, { children: props.iconLeft || "{props.iconLeft}" })) })) : null, _jsx("input", { className: "umds-input__control", type: inputType(), name: props.name, disabled: props.disabled, readOnly: props.readOnly, placeholder: props.placeholder, value: props.value !== undefined ? props.value : internalValue, defaultValue: props.defaultValue, onChange: (event) => handleChange(event), onFocus: (event) => props.onFocus?.(event), onBlur: (event) => props.onBlur?.(event), "aria-invalid": !!(props.errorMessage && props.errorMessage.length > 0), required: props.required }), _jsxs("div", { className: "umds-input__actions-right", children: [props.type === "password" ? (_jsx("button", { type: "button", className: "umds-input__action-btn", onClick: (event) => togglePassword(), "aria-label": isPasswordVisible ? "Ocultar senha" : "Mostrar senha", children: _jsx(Icon, { name: isPasswordVisible ? "eye-closed" : "eye-solid", size: iconSize() }) })) : null, props.iconsRight?.length ? (_jsx(_Fragment, { children: props.iconsRight?.map((action, index) => (_jsxs("button", { type: "button", className: "umds-input__action-btn", onClick: (e) => {
|
|
54
|
-
e.stopPropagation();
|
|
55
|
-
action.onClick?.(e);
|
|
56
|
-
}, title: action.tooltip, "aria-label": action.label || action.tooltip, children: [typeof action.icon === "string" ? (_jsx(Icon, { name: action.icon, size: iconSize() })) : null, typeof action.icon !== "string" ? _jsx(_Fragment, { children: action.icon }) : null] }))) })) : null] })] }), props.errorMessage ? (_jsx(Text, { as: "span", variant: "caption", color: "error", children: props.errorMessage })) : null, props.helperText ? (_jsx(Text, { as: "span", variant: "caption", color: "secondary", children: _jsx(_Fragment, { children: props.helperText || "{props.helperText}" }) })) : null] }));
|
|
57
|
-
}
|
|
58
|
-
export default Input;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
.umds-link {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: 4px;
|
|
5
|
-
/* Espaçamento entre texto e ícone */
|
|
6
|
-
text-decoration: none;
|
|
7
|
-
font-family: var(--umds-semantic-font-family-base, inherit);
|
|
8
|
-
font-weight: 600;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
background: transparent;
|
|
11
|
-
border: none;
|
|
12
|
-
border-bottom: 1px solid transparent;
|
|
13
|
-
/* Base para outlined */
|
|
14
|
-
padding: 0;
|
|
15
|
-
transition: color 0.2s ease, border-bottom-color 0.2s ease;
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* Sizes */
|
|
20
|
-
.umds-link--default {
|
|
21
|
-
font-size: 14px;
|
|
22
|
-
line-height: 16px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.umds-link--small {
|
|
26
|
-
font-size: 12px;
|
|
27
|
-
line-height: 14px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* Variants - Neutral */
|
|
31
|
-
.umds-link--neutral {
|
|
32
|
-
color: var(--umds-semantic-color-neutral-dark-down);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.umds-link--neutral:hover:not(.umds-link--disabled) {
|
|
36
|
-
color: var(--umds-semantic-color-neutral-pure);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.umds-link--neutral.umds-link--outlined {
|
|
40
|
-
border-bottom-color: var(--umds-semantic-color-neutral-dark-down);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.umds-link--neutral.umds-link--outlined:hover:not(.umds-link--disabled) {
|
|
44
|
-
border-bottom-color: var(--umds-semantic-color-neutral-pure);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* Variants - Primary */
|
|
48
|
-
.umds-link--primary {
|
|
49
|
-
color: var(--umds-semantic-color-primary-pure);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.umds-link--primary:hover:not(.umds-link--disabled) {
|
|
53
|
-
color: var(--umds-semantic-color-primary-dark);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.umds-link--primary.umds-link--outlined {
|
|
57
|
-
border-bottom-color: var(--umds-semantic-color-primary-pure);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.umds-link--primary.umds-link--outlined:hover:not(.umds-link--disabled) {
|
|
61
|
-
border-bottom-color: var(--umds-semantic-color-primary-dark);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* Disabled */
|
|
65
|
-
.umds-link--disabled {
|
|
66
|
-
cursor: not-allowed;
|
|
67
|
-
opacity: 0.5;
|
|
68
|
-
pointer-events: none;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/* Focus */
|
|
72
|
-
.umds-link:focus-visible {
|
|
73
|
-
outline: 2px solid var(--umds-semantic-color-primary-pure);
|
|
74
|
-
outline-offset: 2px;
|
|
75
|
-
border-radius: 2px;
|
|
76
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import './Link.css';
|
|
2
|
-
export interface LinkProps {
|
|
3
|
-
href?: string;
|
|
4
|
-
target?: string;
|
|
5
|
-
size?: "default" | "small";
|
|
6
|
-
variant?: "neutral" | "primary";
|
|
7
|
-
outlined?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
children?: any;
|
|
11
|
-
onClick?: (event: any) => void;
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
}
|
|
14
|
-
declare function Link(props: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export default Link;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import './Link.css';
|
|
3
|
-
"use client";
|
|
4
|
-
function Link(props) {
|
|
5
|
-
function classes() {
|
|
6
|
-
return [
|
|
7
|
-
"umds-link",
|
|
8
|
-
`umds-link--${props.size || "default"}`,
|
|
9
|
-
`umds-link--${props.variant || "neutral"}`,
|
|
10
|
-
props.outlined ? "umds-link--outlined" : "",
|
|
11
|
-
props.disabled ? "umds-link--disabled" : "",
|
|
12
|
-
props.className,
|
|
13
|
-
]
|
|
14
|
-
.filter(Boolean)
|
|
15
|
-
.join(" ");
|
|
16
|
-
}
|
|
17
|
-
return props.href && !props.disabled ? (_jsxs("a", { href: props.href, target: props.target, onClick: (event) => props.onClick?.(event), ...props, className: classes(), children: [_jsx(_Fragment, { children: props.iconLeft }), _jsx(_Fragment, { children: props.children || "{props.children}" }), _jsx(_Fragment, { children: props.iconRight })] })) : (_jsx(_Fragment, { children: _jsxs("button", { type: "button", disabled: props.disabled, onClick: (event) => props.onClick?.(event), ...props, className: classes(), children: [_jsx(_Fragment, { children: props.iconLeft }), _jsx(_Fragment, { children: props.children || "{props.children}" }), _jsx(_Fragment, { children: props.iconRight })] }) }));
|
|
18
|
-
}
|
|
19
|
-
export default Link;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
.umds-logo {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
line-height: 0;
|
|
4
|
-
vertical-align: middle;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/* Sizes (Baseado nas dimensões intrínsecas dos SVGs extraídos) */
|
|
8
|
-
/* Regular SVG: 40x13.6 */
|
|
9
|
-
.umds-logo--regular {
|
|
10
|
-
width: 58px;
|
|
11
|
-
/* Ajustado para visualmente agradável se necessário, ou usar 40px base. User pediu Regular e Small. Vou usar rem relativos ou px fixos. O SVG tem viewbox 0 0 40 13.6. */
|
|
12
|
-
/* Se eu definir width, height é auto. */
|
|
13
|
-
width: 40px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* Small SVG: 15x13.4 */
|
|
17
|
-
.umds-logo--small {
|
|
18
|
-
width: 15px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* Variants */
|
|
22
|
-
.umds-logo--default {
|
|
23
|
-
color: var(--umds-semantic-color-primary-pure);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.umds-logo--dark {
|
|
27
|
-
color: var(--umds-semantic-color-neutral-pure);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.umds-logo--light {
|
|
31
|
-
color: var(--umds-semantic-color-neutral-light-pure);
|
|
32
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import './Logo.css';
|
|
2
|
-
export interface LogoProps {
|
|
3
|
-
size?: "regular" | "small";
|
|
4
|
-
variant?: "default" | "dark" | "light";
|
|
5
|
-
className?: string;
|
|
6
|
-
style?: any;
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}
|
|
9
|
-
declare function Logo(props: LogoProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default Logo;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import './Logo.css';
|
|
3
|
-
function Logo(props) {
|
|
4
|
-
function classes() {
|
|
5
|
-
return [
|
|
6
|
-
"umds-logo",
|
|
7
|
-
`umds-logo--${props.size || "regular"}`,
|
|
8
|
-
`umds-logo--${props.variant || "default"}`,
|
|
9
|
-
props.className,
|
|
10
|
-
]
|
|
11
|
-
.filter(Boolean)
|
|
12
|
-
.join(" ");
|
|
13
|
-
}
|
|
14
|
-
return (_jsx("span", { role: "img", "aria-label": "1Doc Logo", ...props, className: classes(), children: props.size === "small" ? (_jsx("svg", { viewBox: "0 0 15 13.4473", fill: "none", xmlns: "http://www.w3.org/2000/svg", width: "100%", height: "100%", preserveAspectRatio: "xMidYMid meet", children: _jsx("path", { d: "M5.0791 13.4473H5.06738C4.08896 13.0445 3.20078 12.4671 2.44043 11.7539V3.56641H0C0.748609 1.48759 2.73898 6.32788e-05 5.0791 0V13.4473ZM8.52344 0C10.5432 0 12.1269 0.601294 13.2744 1.81934H13.2705C14.4179 3.01981 14.9999 4.69588 15 6.75098C15 8.80618 14.4181 10.445 13.2354 11.6455C12.0722 12.846 10.4692 13.4472 8.41406 13.4473H5.95801V10.8643H8.54102C9.7062 10.8643 10.5987 10.4627 11.2354 9.68066C11.8718 8.89867 12.2002 7.87902 12.2002 6.69629C12.2002 5.51345 11.872 4.54861 11.2354 3.7666C10.5987 2.98458 9.70619 2.58398 8.54102 2.58398H5.95801V0H8.52344Z", fill: "currentColor" }) })) : (_jsx("svg", { viewBox: "0 0 40 13.6035", fill: "none", width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid meet", children: _jsx("path", { d: "M24.373 3.2334C25.9082 3.23349 27.1729 3.73988 28.166 4.75098C29.1592 5.7454 29.6475 6.95544 29.6475 8.41895C29.6474 9.88232 29.1592 11.1113 28.166 12.1045C27.1729 13.0976 25.9081 13.6034 24.373 13.6035C22.8377 13.6035 21.5723 13.0977 20.5791 12.1045C19.5859 11.1101 19.0977 9.86438 19.0977 8.41895C19.0977 6.97343 19.586 5.74419 20.5791 4.75098C21.5723 3.73979 22.8377 3.2334 24.373 3.2334ZM35.5986 3.28613C37.4642 3.28613 39.1248 4.14657 40.002 5.67578L38.1455 7.15234C37.5496 6.15918 36.6997 5.65339 35.6348 5.65332C34.821 5.65332 34.153 5.92471 33.6289 6.4668C33.1048 6.99086 32.8331 7.64174 32.833 8.4541C32.833 9.26647 33.0855 9.93573 33.6094 10.4766C34.1334 11.0006 34.8026 11.2724 35.5791 11.2725L35.5811 11.2715C36.6113 11.2713 37.6584 10.6575 38.0928 9.79004L39.9805 11.293C39.0817 12.7145 37.423 13.6025 35.5264 13.6025C33.9902 13.6024 32.7437 13.1142 31.7686 12.1572C30.7933 11.1999 30.3047 9.95256 30.3047 8.45312C30.3047 6.95385 30.793 5.70728 31.7861 4.75C32.7794 3.77471 34.0442 3.28613 35.5986 3.28613ZM5.04297 13.3516H5.03125C4.05955 12.9507 3.17578 12.3784 2.42188 11.6699V3.54102H0C0.743134 1.47675 2.72045 0 5.04199 0H5.04297V13.3516ZM12.0107 0C14.0164 0 15.5883 0.595607 16.7275 1.80664C17.8655 2.99844 18.4433 4.66084 18.4434 6.70215C18.4434 8.74367 17.8653 10.3706 16.6914 11.5625C15.5342 12.7556 13.9448 13.3516 11.9033 13.3516H6.79004V0H12.0107ZM24.373 5.61816C23.5953 5.61816 22.945 5.88867 22.4209 6.43066C21.8968 6.97276 21.6445 7.6423 21.6445 8.41895C21.6446 9.19535 21.897 9.86391 22.4209 10.4238C22.945 10.9659 23.5964 11.2363 24.373 11.2363C25.1495 11.2362 25.7816 10.9658 26.3057 10.4238C26.8295 9.86395 27.0995 9.19525 27.0996 8.41895C27.0996 7.64233 26.8298 6.97275 26.3057 6.43066C25.7828 5.88866 25.1507 5.61826 24.373 5.61816ZM9.46484 10.7852H12.0303C13.1862 10.7851 14.0713 10.3879 14.7031 9.61133C15.335 8.83469 15.6611 7.82356 15.6611 6.64844C15.6611 5.47343 15.3349 4.51584 14.7031 3.73926C14.0713 2.96291 13.186 2.56546 12.0303 2.56543H9.46484V10.7852Z", fill: "currentColor" }) })) }));
|
|
15
|
-
}
|
|
16
|
-
export default Logo;
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
.umds-modal-root {
|
|
2
|
-
position: fixed;
|
|
3
|
-
inset: 0;
|
|
4
|
-
display: none;
|
|
5
|
-
align-items: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
z-index: 1000;
|
|
8
|
-
padding: var(--umds-primitive-spacing-xxs);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.umds-modal-root--open {
|
|
12
|
-
display: flex !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.umds-modal-root--inline {
|
|
16
|
-
position: relative;
|
|
17
|
-
width: 100%;
|
|
18
|
-
min-height: 450px;
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
z-index: 1;
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.umds-modal-overlay {
|
|
27
|
-
position: absolute;
|
|
28
|
-
top: 0;
|
|
29
|
-
left: 0;
|
|
30
|
-
right: 0;
|
|
31
|
-
bottom: 0;
|
|
32
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
33
|
-
backdrop-filter: blur(4px);
|
|
34
|
-
animation: umds-fade-in 0.2s ease-out;
|
|
35
|
-
z-index: 1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.umds-modal {
|
|
39
|
-
position: relative;
|
|
40
|
-
z-index: 2;
|
|
41
|
-
background-color: var(--umds-semantic-color-background-white);
|
|
42
|
-
border-radius: var(--umds-primitive-border-radius-sm);
|
|
43
|
-
box-shadow: var(--umds-primitive-shadow-level-3);
|
|
44
|
-
padding: var(--umds-primitive-spacing-xxs);
|
|
45
|
-
width: clamp(320px, 90%, 498px);
|
|
46
|
-
max-width: 498px;
|
|
47
|
-
height: fit-content;
|
|
48
|
-
max-height: calc(100% - 40px);
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
align-items: center;
|
|
52
|
-
overflow: clip;
|
|
53
|
-
animation: umds-modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
54
|
-
box-sizing: border-box;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@media (max-width: 400px) {
|
|
58
|
-
.umds-modal {
|
|
59
|
-
width: 95%;
|
|
60
|
-
min-width: 280px;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.umds-modal__close-wrapper {
|
|
65
|
-
width: 100%;
|
|
66
|
-
display: flex;
|
|
67
|
-
justify-content: flex-end;
|
|
68
|
-
margin-bottom: var(--umds-primitive-spacing-nano);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.umds-modal__close-button {
|
|
72
|
-
cursor: pointer;
|
|
73
|
-
background: transparent;
|
|
74
|
-
border: none;
|
|
75
|
-
padding: 4px;
|
|
76
|
-
border-radius: 4px;
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
justify-content: center;
|
|
80
|
-
transition: background-color 0.2s;
|
|
81
|
-
color: var(--umds-semantic-color-neutral-dark-up);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.umds-modal__close-button:hover {
|
|
85
|
-
background-color: var(--umds-semantic-color-neutral-light-medium);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.umds-modal__content {
|
|
89
|
-
width: 100%;
|
|
90
|
-
display: flex;
|
|
91
|
-
flex-direction: column;
|
|
92
|
-
align-items: center;
|
|
93
|
-
gap: var(--umds-primitive-spacing-xs);
|
|
94
|
-
text-align: center;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.umds-modal__header {
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
align-items: center;
|
|
101
|
-
gap: var(--umds-primitive-spacing-xxs);
|
|
102
|
-
width: 100%;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.umds-modal__icon {
|
|
106
|
-
width: 80px;
|
|
107
|
-
height: 80px;
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
justify-content: center;
|
|
111
|
-
border-radius: 50%;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.umds-modal__icon--success {
|
|
115
|
-
color: var(--umds-semantic-color-feedback-positive-pure);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.umds-modal__icon--error {
|
|
119
|
-
color: var(--umds-semantic-color-feedback-negative-pure);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.umds-modal__icon--warning {
|
|
123
|
-
color: var(--umds-semantic-color-feedback-info-pure);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.umds-modal__text-group {
|
|
127
|
-
display: flex;
|
|
128
|
-
flex-direction: column;
|
|
129
|
-
gap: var(--umds-primitive-spacing-xxxs);
|
|
130
|
-
width: 100%;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.umds-modal__footer {
|
|
134
|
-
display: flex;
|
|
135
|
-
gap: var(--umds-primitive-spacing-xxxs);
|
|
136
|
-
margin-top: var(--umds-primitive-spacing-xs);
|
|
137
|
-
justify-content: center;
|
|
138
|
-
width: 100%;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
@keyframes umds-fade-in {
|
|
142
|
-
from { opacity: 0; }
|
|
143
|
-
to { opacity: 1; }
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
@keyframes umds-modal-in {
|
|
147
|
-
from {
|
|
148
|
-
opacity: 0;
|
|
149
|
-
transform: scale(0.95) translateY(10px);
|
|
150
|
-
}
|
|
151
|
-
to {
|
|
152
|
-
opacity: 1;
|
|
153
|
-
transform: scale(1) translateY(0);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import './Modal.css';
|
|
2
|
-
export interface ModalProps {
|
|
3
|
-
/** Controla se o modal está visível */
|
|
4
|
-
open?: boolean;
|
|
5
|
-
/** Tipo do modal, altera o ícone e o esquema de cores */
|
|
6
|
-
variant?: "default" | "success" | "error" | "warning";
|
|
7
|
-
/** Título em destaque */
|
|
8
|
-
title?: string;
|
|
9
|
-
/** Texto de descrição/apoio */
|
|
10
|
-
description?: string;
|
|
11
|
-
/** Texto do botão de confirmação/ação primária */
|
|
12
|
-
confirmLabel?: string;
|
|
13
|
-
/** Texto do botão de cancelamento/ação secundária */
|
|
14
|
-
cancelLabel?: string;
|
|
15
|
-
/** Callback disparado ao clicar no botão primário */
|
|
16
|
-
onConfirm?: (event: any) => void;
|
|
17
|
-
/** Callback disparado ao clicar no botão de cancelar ou no X */
|
|
18
|
-
onCancel?: (event: any) => void;
|
|
19
|
-
/** Callback disparado para fechar o modal */
|
|
20
|
-
onClose?: (event: any) => void;
|
|
21
|
-
/** Oculta o botão de fechar (X) no topo direito */
|
|
22
|
-
hideCloseButton?: boolean;
|
|
23
|
-
/** Permite fechar ao clicar no overlay escuro */
|
|
24
|
-
closeOnOverlayClick?: boolean;
|
|
25
|
-
/** Classes CSS adicionais para o container do modal */
|
|
26
|
-
className?: string;
|
|
27
|
-
/** Se verdadeiro, renderiza o modal inline (sem fixed/overlay), útil para documentação */
|
|
28
|
-
inline?: boolean;
|
|
29
|
-
/** Conteúdo customizado no rodapé */
|
|
30
|
-
footerSlot?: any;
|
|
31
|
-
/** Conteúdo customizado no corpo */
|
|
32
|
-
children?: any;
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
}
|
|
35
|
-
declare function Modal(props: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
export default Modal;
|