@dtcode/ui 0.2.0 → 0.4.0
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/README.md +38 -1
- package/dist/animated-symbol.d.ts +3 -0
- package/dist/animated-symbol.js +81 -0
- package/dist/avatar.d.ts +15 -0
- package/dist/avatar.js +16 -0
- package/dist/brand.d.ts +11 -0
- package/dist/brand.js +13 -0
- package/dist/checkbox.d.ts +8 -0
- package/dist/checkbox.js +12 -0
- package/dist/dialog.d.ts +24 -0
- package/dist/dialog.js +21 -0
- package/dist/dropdown-menu.d.ts +12 -0
- package/dist/dropdown-menu.js +21 -0
- package/dist/empty-state.d.ts +13 -0
- package/dist/empty-state.js +8 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +17 -0
- package/dist/initials.d.ts +2 -0
- package/dist/initials.js +10 -0
- package/dist/input.d.ts +5 -0
- package/dist/input.js +5 -1
- package/dist/login-template.d.ts +44 -0
- package/dist/login-template.js +67 -0
- package/dist/material-symbols-LICENSE.txt +202 -0
- package/dist/material-symbols-rounded.woff2 +0 -0
- package/dist/select.d.ts +7 -0
- package/dist/select.js +8 -0
- package/dist/sheet.d.ts +26 -0
- package/dist/sheet.js +21 -0
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.js +9 -0
- package/dist/styles.css +304 -1
- package/dist/table.d.ts +7 -0
- package/dist/table.js +21 -0
- package/dist/textarea.d.ts +5 -0
- package/dist/textarea.js +7 -0
- package/dist/theme-script.d.ts +11 -0
- package/dist/theme-script.js +10 -0
- package/dist/theme.d.ts +24 -0
- package/dist/theme.js +91 -0
- package/dist/toast.d.ts +24 -0
- package/dist/toast.js +49 -0
- package/package.json +5 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
Binary file
|
package/dist/select.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type SelectProps = React.ComponentProps<"select"> & {
|
|
2
|
+
invalid?: boolean;
|
|
3
|
+
/** Primeira opção vazia, mostrada enquanto nada foi escolhido (ex.: "Selecione"). */
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
};
|
|
6
|
+
/** Campo de seleção nativo, com o visual do Input. Use dentro de <Field> para rótulo, dica e erro. */
|
|
7
|
+
export declare function Select({ invalid, placeholder, className, children, ...props }: SelectProps): import("react").JSX.Element;
|
package/dist/select.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "./cn.js";
|
|
3
|
+
import { Icon } from "./icon.js";
|
|
4
|
+
import { controlClasses } from "./input.js";
|
|
5
|
+
/** Campo de seleção nativo, com o visual do Input. Use dentro de <Field> para rótulo, dica e erro. */
|
|
6
|
+
export function Select({ invalid, placeholder, className, children, ...props }) {
|
|
7
|
+
return (_jsxs("div", { className: "relative", children: [_jsxs("select", { "aria-invalid": invalid || undefined, className: controlClasses({ invalid, className: cn("peer h-10 cursor-pointer appearance-none pr-10", className) }), ...props, children: [placeholder !== undefined && (_jsx("option", { value: "", disabled: props.required, children: placeholder })), children] }), _jsx(Icon, { name: "expand_more", size: 20, className: "pointer-events-none absolute top-1/2 right-2.5 -translate-y-1/2 text-muted transition-colors peer-focus:text-accent" })] }));
|
|
8
|
+
}
|
package/dist/sheet.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as RadixDialog from "@radix-ui/react-dialog";
|
|
2
|
+
export declare const Sheet: import("react").FC<RadixDialog.DialogProps>;
|
|
3
|
+
export declare const SheetTrigger: import("react").ForwardRefExoticComponent<RadixDialog.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export declare const SheetClose: import("react").ForwardRefExoticComponent<RadixDialog.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export type SheetContentProps = Omit<React.ComponentProps<typeof RadixDialog.Content>, "title"> & {
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
/** Ações fixas no rodapé do painel (ex.: botões Salvar e Cancelar). */
|
|
9
|
+
footer?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/** Painel lateral à direita (até 520px) para ver ou editar um item sem sair da lista. */
|
|
12
|
+
export declare function SheetContent({ title, description, footer, className, children, ...props }: SheetContentProps): import("react").JSX.Element;
|
|
13
|
+
/** Bloco com título dentro do painel. */
|
|
14
|
+
export declare function SheetSection({ title, className, children }: {
|
|
15
|
+
title: React.ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
/** Lista de rótulo e valor (ex.: dados de um registro). */
|
|
20
|
+
export declare function DefinitionList({ items, className }: {
|
|
21
|
+
items: {
|
|
22
|
+
label: React.ReactNode;
|
|
23
|
+
value: React.ReactNode;
|
|
24
|
+
}[];
|
|
25
|
+
className?: string;
|
|
26
|
+
}): import("react").JSX.Element;
|
package/dist/sheet.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as RadixDialog from "@radix-ui/react-dialog";
|
|
4
|
+
import { cn } from "./cn.js";
|
|
5
|
+
import { overlayClasses } from "./dialog.js";
|
|
6
|
+
import { Icon } from "./icon.js";
|
|
7
|
+
export const Sheet = RadixDialog.Root;
|
|
8
|
+
export const SheetTrigger = RadixDialog.Trigger;
|
|
9
|
+
export const SheetClose = RadixDialog.Close;
|
|
10
|
+
/** Painel lateral à direita (até 520px) para ver ou editar um item sem sair da lista. */
|
|
11
|
+
export function SheetContent({ title, description, footer, className, children, ...props }) {
|
|
12
|
+
return (_jsxs(RadixDialog.Portal, { children: [_jsx(RadixDialog.Overlay, { className: overlayClasses }), _jsxs(RadixDialog.Content, { ...(description ? {} : { "aria-describedby": undefined }), className: cn("fixed inset-y-0 right-0 z-50 flex w-full max-w-[520px] animate-slide-in-right flex-col border-l border-border bg-surface text-fg shadow-4 focus:outline-none", className), ...props, children: [_jsxs("div", { className: "flex items-start gap-3 border-b border-border px-6 py-5", children: [_jsxs("div", { className: "grid min-w-0 flex-1 gap-1", children: [_jsx(RadixDialog.Title, { className: "font-display text-lg leading-snug font-semibold", children: title }), description && _jsx(RadixDialog.Description, { className: "text-sm text-fg-2", children: description })] }), _jsx(RadixDialog.Close, { "aria-label": "Fechar", className: "-mt-1 -mr-2 grid size-9 flex-none place-items-center rounded-md text-muted transition-colors hover:bg-surface-subtle hover:text-fg", children: _jsx(Icon, { name: "close", size: 20 }) })] }), _jsx("div", { className: "grid flex-1 content-start gap-7 overflow-y-auto px-6 py-6", children: children }), footer && _jsx("div", { className: "flex flex-wrap justify-end gap-2 border-t border-border px-6 py-4", children: footer })] })] }));
|
|
13
|
+
}
|
|
14
|
+
/** Bloco com título dentro do painel. */
|
|
15
|
+
export function SheetSection({ title, className, children }) {
|
|
16
|
+
return (_jsxs("section", { className: cn("grid gap-3", className), children: [_jsx("h3", { className: "font-display text-xs font-semibold tracking-[.1em] text-fg-2 uppercase", children: title }), children] }));
|
|
17
|
+
}
|
|
18
|
+
/** Lista de rótulo e valor (ex.: dados de um registro). */
|
|
19
|
+
export function DefinitionList({ items, className }) {
|
|
20
|
+
return (_jsx("dl", { className: cn("grid grid-cols-[minmax(0,140px)_minmax(0,1fr)] gap-x-4 gap-y-2.5 text-sm", className), children: items.map((item, i) => (_jsxs("div", { className: "contents", children: [_jsx("dt", { className: "text-fg-2", children: item.label }), _jsx("dd", { className: "min-w-0 break-words text-fg", children: item.value })] }, i))) }));
|
|
21
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bloco de carregamento no formato do conteúdo (listas, tabelas, números).
|
|
3
|
+
* Use quando a estrutura da tela já é conhecida; para uma ação em andamento, use o Loader.
|
|
4
|
+
*/
|
|
5
|
+
export declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
package/dist/skeleton.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "./cn.js";
|
|
3
|
+
/**
|
|
4
|
+
* Bloco de carregamento no formato do conteúdo (listas, tabelas, números).
|
|
5
|
+
* Use quando a estrutura da tela já é conhecida; para uma ação em andamento, use o Loader.
|
|
6
|
+
*/
|
|
7
|
+
export function Skeleton({ className, ...props }) {
|
|
8
|
+
return _jsx("div", { "aria-hidden": true, className: cn("h-4 animate-pulse rounded-md bg-border", className), ...props });
|
|
9
|
+
}
|
package/dist/styles.css
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
/* @dtcode/ui: tokens (claro e escuro), base, movimento e ícones. Importe depois do Tailwind. */
|
|
2
2
|
@source "./";
|
|
3
3
|
|
|
4
|
+
/* Material Symbols Rounded (Apache-2.0, ver material-symbols-LICENSE.txt): todos os ícones, peso 500, com o eixo FILL. */
|
|
5
|
+
@font-face {
|
|
6
|
+
font-family: "Material Symbols Rounded";
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
font-display: block;
|
|
10
|
+
src: url("./material-symbols-rounded.woff2") format("woff2");
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
/* Arquivo gerado por scripts/build-tokens.mjs. Não edite à mão: altere src/tokens/tokens.json. */
|
|
5
14
|
|
|
6
15
|
:root {
|
|
@@ -254,7 +263,7 @@
|
|
|
254
263
|
|
|
255
264
|
/* Base do Design System dtcode: tema escuro, fontes, movimento, estilos de base e ícones.
|
|
256
265
|
Vai no dist/styles.css do pacote @dtcode/ui, no globals.css do site e no ds.css do kit para copiar (scripts/build-templates.mjs).
|
|
257
|
-
Só entra aqui o que os componentes do pacote precisam; estilos do app ficam em globals.css. */
|
|
266
|
+
Só entra aqui o que os componentes e as classes utilitárias do pacote precisam; estilos do app ficam em globals.css. */
|
|
258
267
|
|
|
259
268
|
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
|
|
260
269
|
|
|
@@ -269,6 +278,7 @@
|
|
|
269
278
|
--animate-fade-up: fade-up 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
|
|
270
279
|
--animate-scale-in: scale-in 0.18s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
|
|
271
280
|
--animate-slide-in-left: slide-in-left 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
|
|
281
|
+
--animate-slide-in-right: slide-in-right 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
|
|
272
282
|
--animate-pop: pop 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
|
|
273
283
|
--animate-spin-in: spin-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
|
|
274
284
|
--animate-shake: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) backwards;
|
|
@@ -287,6 +297,9 @@
|
|
|
287
297
|
@keyframes slide-in-left {
|
|
288
298
|
from { translate: -100% 0; }
|
|
289
299
|
}
|
|
300
|
+
@keyframes slide-in-right {
|
|
301
|
+
from { translate: 100% 0; }
|
|
302
|
+
}
|
|
290
303
|
@keyframes pop {
|
|
291
304
|
0% { scale: 0.92; opacity: 0.6; }
|
|
292
305
|
60% { scale: 1.03; opacity: 1; }
|
|
@@ -344,6 +357,71 @@
|
|
|
344
357
|
user-select: none;
|
|
345
358
|
flex: none;
|
|
346
359
|
}
|
|
360
|
+
|
|
361
|
+
/* Rótulo de seção — padrão das páginas do MIV: RÓTULO ——— */
|
|
362
|
+
.eyebrow {
|
|
363
|
+
display: flex;
|
|
364
|
+
align-items: center;
|
|
365
|
+
gap: 0.875rem;
|
|
366
|
+
font: 600 0.75rem/1 var(--font-display);
|
|
367
|
+
letter-spacing: 0.12em;
|
|
368
|
+
text-transform: uppercase;
|
|
369
|
+
color: var(--fg-2);
|
|
370
|
+
}
|
|
371
|
+
.eyebrow::after {
|
|
372
|
+
content: "";
|
|
373
|
+
flex: 1;
|
|
374
|
+
height: 1px;
|
|
375
|
+
background: var(--border-strong);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.text-gradient {
|
|
379
|
+
background: var(--grad-marca);
|
|
380
|
+
-webkit-background-clip: text;
|
|
381
|
+
background-clip: text;
|
|
382
|
+
color: transparent;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/* Rolagem sobre fundo escuro (sidebar): quase invisível, aparece ao passar o mouse */
|
|
386
|
+
.scrollbar-dark {
|
|
387
|
+
scrollbar-width: thin;
|
|
388
|
+
scrollbar-color: transparent transparent;
|
|
389
|
+
transition: scrollbar-color 0.2s;
|
|
390
|
+
}
|
|
391
|
+
.scrollbar-dark:hover,
|
|
392
|
+
.scrollbar-dark:focus-within {
|
|
393
|
+
scrollbar-color: rgb(255 255 255 / 0.22) transparent;
|
|
394
|
+
}
|
|
395
|
+
.scrollbar-dark::-webkit-scrollbar-thumb {
|
|
396
|
+
background-color: transparent;
|
|
397
|
+
}
|
|
398
|
+
.scrollbar-dark:hover::-webkit-scrollbar-thumb {
|
|
399
|
+
background-color: rgb(255 255 255 / 0.22);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* Entrada em cascata dos filhos diretos */
|
|
403
|
+
.stagger > * {
|
|
404
|
+
animation: var(--animate-fade-up);
|
|
405
|
+
}
|
|
406
|
+
.stagger > :nth-child(2) { animation-delay: 25ms; }
|
|
407
|
+
.stagger > :nth-child(3) { animation-delay: 50ms; }
|
|
408
|
+
.stagger > :nth-child(4) { animation-delay: 75ms; }
|
|
409
|
+
.stagger > :nth-child(5) { animation-delay: 100ms; }
|
|
410
|
+
.stagger > :nth-child(6) { animation-delay: 125ms; }
|
|
411
|
+
.stagger > :nth-child(n + 7) { animation-delay: 150ms; }
|
|
412
|
+
|
|
413
|
+
.bg-hero {
|
|
414
|
+
background: var(--grad-hero);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.bg-dots {
|
|
418
|
+
background-image: radial-gradient(var(--canvas-dot) 1px, transparent 1.2px);
|
|
419
|
+
background-size: 16px 16px;
|
|
420
|
+
}
|
|
421
|
+
.bg-dots-light {
|
|
422
|
+
background-image: radial-gradient(rgb(255 255 255 / 0.14) 1px, transparent 1.2px);
|
|
423
|
+
background-size: 18px 18px;
|
|
424
|
+
}
|
|
347
425
|
}
|
|
348
426
|
|
|
349
427
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -353,3 +431,228 @@
|
|
|
353
431
|
transition-duration: 0.01ms !important;
|
|
354
432
|
}
|
|
355
433
|
}
|
|
434
|
+
|
|
435
|
+
/* Símbolo animado (AnimatedSymbol): montagem, brilho, partículas e parallax. Vai no dist/styles.css. */
|
|
436
|
+
|
|
437
|
+
@layer components {
|
|
438
|
+
/*
|
|
439
|
+
* Símbolo animado (tela de login) — componente AnimatedSymbol do pacote.
|
|
440
|
+
* Ordem dos <path> no SVG oficial: losango de cima, do meio, de baixo e o chevron.
|
|
441
|
+
* Linha do tempo: 0–1,3 s peças voam de longe (desfocadas, girando) e se encaixam · ~1,3 s impacto
|
|
442
|
+
* (ondas em losango + aura + halo) · 2 s chevron pisca como cursor de terminal · 2 s+ flutuação, brilho
|
|
443
|
+
* pulsando, reflexo de luz, balanço de cada peça e partículas em losango subindo.
|
|
444
|
+
* Hover: visão explodida (as peças se afastam um pouco; --spread anima de 0 a 1).
|
|
445
|
+
* Parallax: o JS do componente define --px/--py (-1..1) conforme o ponteiro; a inclinação 3D usa
|
|
446
|
+
* `transform` no palco e o deslocamento por peça usa `transform` nos <path>, que se soma às
|
|
447
|
+
* propriedades `translate`/`rotate`/`scale` usadas pelas animações.
|
|
448
|
+
*/
|
|
449
|
+
.symbol-stage {
|
|
450
|
+
--px: 0;
|
|
451
|
+
--py: 0;
|
|
452
|
+
transition: --spread 0.6s cubic-bezier(0.22, 1.3, 0.36, 1);
|
|
453
|
+
}
|
|
454
|
+
.symbol-stage:hover {
|
|
455
|
+
--spread: 1;
|
|
456
|
+
}
|
|
457
|
+
.symbol-tilt {
|
|
458
|
+
transform: perspective(800px) rotateX(calc(var(--py) * -14deg)) rotateY(calc(var(--px) * 16deg));
|
|
459
|
+
transform-style: preserve-3d;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.symbol-live {
|
|
463
|
+
overflow: visible;
|
|
464
|
+
animation:
|
|
465
|
+
symbol-float 5s ease-in-out 2s infinite,
|
|
466
|
+
symbol-glow 5s ease-in-out 1.3s infinite;
|
|
467
|
+
}
|
|
468
|
+
.symbol-live path {
|
|
469
|
+
transform-box: fill-box;
|
|
470
|
+
transform-origin: center;
|
|
471
|
+
}
|
|
472
|
+
/* unidades em px aqui são do viewBox do SVG (350 de largura) */
|
|
473
|
+
.symbol-live path:nth-of-type(1) {
|
|
474
|
+
--from: -210% -300%;
|
|
475
|
+
--spin: -150deg;
|
|
476
|
+
transform: translate(calc(var(--px) * -18px), calc(var(--py) * -14px - var(--spread) * 22px));
|
|
477
|
+
animation:
|
|
478
|
+
piece-assemble 1.25s cubic-bezier(0.22, 1.25, 0.36, 1) backwards,
|
|
479
|
+
piece-bob 3.4s ease-in-out 2s infinite;
|
|
480
|
+
}
|
|
481
|
+
.symbol-live path:nth-of-type(2) {
|
|
482
|
+
--from: 360% -80%;
|
|
483
|
+
--spin: 170deg;
|
|
484
|
+
transform: translate(calc(var(--px) * 26px + var(--spread) * 24px), calc(var(--py) * 10px));
|
|
485
|
+
animation:
|
|
486
|
+
piece-assemble 1.25s cubic-bezier(0.22, 1.25, 0.36, 1) 0.15s backwards,
|
|
487
|
+
piece-bob 3.9s ease-in-out 2.3s infinite;
|
|
488
|
+
}
|
|
489
|
+
.symbol-live path:nth-of-type(3) {
|
|
490
|
+
--from: -190% 320%;
|
|
491
|
+
--spin: 130deg;
|
|
492
|
+
transform: translate(calc(var(--px) * -10px), calc(var(--py) * 18px + var(--spread) * 22px));
|
|
493
|
+
animation:
|
|
494
|
+
piece-assemble 1.25s cubic-bezier(0.22, 1.25, 0.36, 1) 0.3s backwards,
|
|
495
|
+
piece-bob 3.6s ease-in-out 2.6s infinite;
|
|
496
|
+
}
|
|
497
|
+
.symbol-live path:nth-of-type(4) {
|
|
498
|
+
--from: -700% 0;
|
|
499
|
+
--spin: 0deg;
|
|
500
|
+
transform: translate(calc(var(--px) * 34px - var(--spread) * 30px), 0);
|
|
501
|
+
animation:
|
|
502
|
+
piece-assemble 0.85s cubic-bezier(0.22, 1.5, 0.36, 1) 0.85s backwards,
|
|
503
|
+
chevron-blink 0.9s steps(1) 1.9s 2,
|
|
504
|
+
chevron-nudge 4s ease-in-out 3.8s infinite;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/* Reflexo de luz: cópia branca do símbolo, revelada por uma faixa de máscara que atravessa as peças */
|
|
508
|
+
.symbol-live.symbol-shine {
|
|
509
|
+
mix-blend-mode: overlay;
|
|
510
|
+
-webkit-mask-image: linear-gradient(115deg, transparent 42%, #000 50%, transparent 58%);
|
|
511
|
+
mask-image: linear-gradient(115deg, transparent 42%, #000 50%, transparent 58%);
|
|
512
|
+
-webkit-mask-size: 300% 100%;
|
|
513
|
+
mask-size: 300% 100%;
|
|
514
|
+
-webkit-mask-repeat: no-repeat;
|
|
515
|
+
mask-repeat: no-repeat;
|
|
516
|
+
-webkit-mask-position: 130% 0;
|
|
517
|
+
mask-position: 130% 0;
|
|
518
|
+
animation:
|
|
519
|
+
symbol-float 5s ease-in-out 2s infinite,
|
|
520
|
+
shine-sweep 5.5s ease-in-out 2.2s infinite;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/* Ondas em losango no momento do encaixe */
|
|
524
|
+
.symbol-ring {
|
|
525
|
+
position: absolute;
|
|
526
|
+
width: 58%;
|
|
527
|
+
aspect-ratio: 1;
|
|
528
|
+
border: 2px solid rgb(255 145 153 / 0.75);
|
|
529
|
+
border-radius: 26%;
|
|
530
|
+
rotate: 45deg;
|
|
531
|
+
opacity: 0;
|
|
532
|
+
pointer-events: none;
|
|
533
|
+
animation: ring-burst 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 1.2s both;
|
|
534
|
+
}
|
|
535
|
+
.symbol-ring--late {
|
|
536
|
+
border-color: rgb(239 47 177 / 0.55);
|
|
537
|
+
animation-delay: 1.42s;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/* Halo de luz atrás do símbolo: dá contraste ao chevron roxo sobre o fundo escuro */
|
|
541
|
+
.symbol-halo {
|
|
542
|
+
position: absolute;
|
|
543
|
+
width: 78%;
|
|
544
|
+
aspect-ratio: 1;
|
|
545
|
+
border-radius: 50%;
|
|
546
|
+
background: radial-gradient(circle, rgb(255 236 246 / 0.55), rgb(255 145 153 / 0.18) 45%, transparent 70%);
|
|
547
|
+
filter: blur(18px);
|
|
548
|
+
opacity: 0;
|
|
549
|
+
pointer-events: none;
|
|
550
|
+
animation:
|
|
551
|
+
aurora-in 1.4s ease-out 1.15s both,
|
|
552
|
+
halo-breathe 5s ease-in-out 2.6s infinite;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/* Partículas em losango (motivo da marca) subindo devagar em volta do símbolo */
|
|
556
|
+
.symbol-particles {
|
|
557
|
+
position: absolute;
|
|
558
|
+
inset: -35% -45%;
|
|
559
|
+
pointer-events: none;
|
|
560
|
+
}
|
|
561
|
+
.symbol-particles span {
|
|
562
|
+
position: absolute;
|
|
563
|
+
left: var(--x);
|
|
564
|
+
bottom: 18%;
|
|
565
|
+
width: var(--s);
|
|
566
|
+
aspect-ratio: 1;
|
|
567
|
+
border-radius: 28%;
|
|
568
|
+
rotate: 45deg;
|
|
569
|
+
background: linear-gradient(135deg, #ff9199, #ef2fb1);
|
|
570
|
+
box-shadow: 0 0 12px rgb(239 47 177 / 0.6);
|
|
571
|
+
opacity: 0;
|
|
572
|
+
animation: particle-rise var(--d) ease-in-out var(--delay) infinite;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/* Aura colorida atrás do símbolo: acende no impacto e gira devagar */
|
|
576
|
+
.symbol-aurora {
|
|
577
|
+
position: absolute;
|
|
578
|
+
width: 150%;
|
|
579
|
+
aspect-ratio: 1;
|
|
580
|
+
border-radius: 50%;
|
|
581
|
+
background: conic-gradient(from 0deg, #ef2fb1, #6a3dba, #ff9199, #3d1883, #ef2fb1);
|
|
582
|
+
filter: blur(70px);
|
|
583
|
+
opacity: 0;
|
|
584
|
+
pointer-events: none;
|
|
585
|
+
animation:
|
|
586
|
+
aurora-in 1.6s ease-out 1.1s both,
|
|
587
|
+
aurora-spin 16s linear infinite;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
@keyframes piece-assemble {
|
|
591
|
+
from {
|
|
592
|
+
translate: var(--from);
|
|
593
|
+
rotate: var(--spin);
|
|
594
|
+
scale: 0.3;
|
|
595
|
+
opacity: 0;
|
|
596
|
+
filter: blur(14px);
|
|
597
|
+
}
|
|
598
|
+
30% {
|
|
599
|
+
opacity: 1;
|
|
600
|
+
}
|
|
601
|
+
70% {
|
|
602
|
+
filter: blur(0);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
@keyframes piece-bob {
|
|
606
|
+
0%, 100% { translate: 0 0; }
|
|
607
|
+
50% { translate: 0 -7%; }
|
|
608
|
+
}
|
|
609
|
+
@keyframes chevron-blink {
|
|
610
|
+
0% { opacity: 0.15; }
|
|
611
|
+
50% { opacity: 1; }
|
|
612
|
+
}
|
|
613
|
+
@keyframes halo-breathe {
|
|
614
|
+
0%, 100% { opacity: 0.5; scale: 1; }
|
|
615
|
+
50% { opacity: 0.8; scale: 1.08; }
|
|
616
|
+
}
|
|
617
|
+
@keyframes particle-rise {
|
|
618
|
+
0% { translate: 0 0; opacity: 0; scale: 0.4; }
|
|
619
|
+
15% { opacity: var(--o, 0.85); scale: 1; }
|
|
620
|
+
75% { opacity: calc(var(--o, 0.85) * 0.6); }
|
|
621
|
+
100% { translate: var(--drift) -240px; opacity: 0; scale: 0.6; }
|
|
622
|
+
}
|
|
623
|
+
@keyframes chevron-nudge {
|
|
624
|
+
0%, 55%, 100% { translate: 0 0; }
|
|
625
|
+
25% { translate: 30% 0; }
|
|
626
|
+
}
|
|
627
|
+
@keyframes symbol-float {
|
|
628
|
+
0%, 100% { translate: 0 0; }
|
|
629
|
+
50% { translate: 0 -16px; }
|
|
630
|
+
}
|
|
631
|
+
@keyframes symbol-glow {
|
|
632
|
+
0%, 100% { filter: drop-shadow(0 18px 36px rgb(239 47 177 / 0.35)); }
|
|
633
|
+
50% { filter: drop-shadow(0 26px 60px rgb(239 47 177 / 0.65)); }
|
|
634
|
+
}
|
|
635
|
+
@keyframes shine-sweep {
|
|
636
|
+
0% { -webkit-mask-position: 130% 0; mask-position: 130% 0; }
|
|
637
|
+
40%, 100% { -webkit-mask-position: -30% 0; mask-position: -30% 0; }
|
|
638
|
+
}
|
|
639
|
+
@keyframes ring-burst {
|
|
640
|
+
0% { opacity: 0; scale: 0.45; }
|
|
641
|
+
8% { opacity: 1; }
|
|
642
|
+
100% { opacity: 0; scale: 2.6; }
|
|
643
|
+
}
|
|
644
|
+
@keyframes aurora-in {
|
|
645
|
+
from { opacity: 0; scale: 0.3; }
|
|
646
|
+
to { opacity: 0.5; scale: 1; }
|
|
647
|
+
}
|
|
648
|
+
@keyframes aurora-spin {
|
|
649
|
+
to { rotate: 360deg; }
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/* Permite animar --spread (visão explodida do símbolo do login) com transição */
|
|
654
|
+
@property --spread {
|
|
655
|
+
syntax: "<number>";
|
|
656
|
+
inherits: true;
|
|
657
|
+
initial-value: 0;
|
|
658
|
+
}
|
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Tabela de dados. A moldura rola na horizontal quando falta espaço. */
|
|
2
|
+
export declare function Table({ className, ...props }: React.ComponentProps<"table">): import("react").JSX.Element;
|
|
3
|
+
export declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): import("react").JSX.Element;
|
|
4
|
+
export declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): import("react").JSX.Element;
|
|
5
|
+
export declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): import("react").JSX.Element;
|
|
6
|
+
export declare function TableHead({ className, ...props }: React.ComponentProps<"th">): import("react").JSX.Element;
|
|
7
|
+
export declare function TableCell({ className, ...props }: React.ComponentProps<"td">): import("react").JSX.Element;
|
package/dist/table.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "./cn.js";
|
|
3
|
+
/** Tabela de dados. A moldura rola na horizontal quando falta espaço. */
|
|
4
|
+
export function Table({ className, ...props }) {
|
|
5
|
+
return (_jsx("div", { className: "w-full overflow-x-auto rounded-lg border border-border bg-surface", children: _jsx("table", { className: cn("w-full border-collapse text-left text-sm", className), ...props }) }));
|
|
6
|
+
}
|
|
7
|
+
export function TableHeader({ className, ...props }) {
|
|
8
|
+
return _jsx("thead", { className: cn("border-b border-border bg-surface-subtle", className), ...props });
|
|
9
|
+
}
|
|
10
|
+
export function TableBody({ className, ...props }) {
|
|
11
|
+
return _jsx("tbody", { className: cn("[&>tr:not(:last-child)]:border-b [&>tr:not(:last-child)]:border-border", className), ...props });
|
|
12
|
+
}
|
|
13
|
+
export function TableRow({ className, ...props }) {
|
|
14
|
+
return _jsx("tr", { className: cn("transition-colors [tbody>&]:hover:bg-surface-subtle", className), ...props });
|
|
15
|
+
}
|
|
16
|
+
export function TableHead({ className, ...props }) {
|
|
17
|
+
return _jsx("th", { scope: "col", className: cn("px-4 py-3 font-display text-xs font-semibold tracking-[.06em] whitespace-nowrap text-fg-2 uppercase", className), ...props });
|
|
18
|
+
}
|
|
19
|
+
export function TableCell({ className, ...props }) {
|
|
20
|
+
return _jsx("td", { className: cn("px-4 py-3 align-middle text-fg", className), ...props });
|
|
21
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type TextareaProps = React.ComponentProps<"textarea"> & {
|
|
2
|
+
invalid?: boolean;
|
|
3
|
+
};
|
|
4
|
+
/** Campo de texto longo, com o visual do Input. Use dentro de <Field> para rótulo, dica e erro. */
|
|
5
|
+
export declare function Textarea({ invalid, className, rows, ...props }: TextareaProps): import("react").JSX.Element;
|