nexaas-ui-components 1.0.102 → 1.0.104
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/index.cjs +37 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +47 -46
- package/dist/index.d.ts +47 -46
- package/dist/index.js +38 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -126,11 +126,15 @@ var variants = {
|
|
|
126
126
|
primary: {
|
|
127
127
|
text: "relative isolate bg-rose-500 text-white shadow-[0_1px_4px_0_rgba(217,48,99,0.3)] before:content-[''] before:absolute before:inset-0 before:-z-10 before:rounded-lg before:pointer-events-none before:mix-blend-plus-lighter before:bg-gradient-to-b before:from-[rgba(218,48,99,0.2)] before:to-[rgba(218,48,99,0)] hover:bg-gradient-to-b hover:from-rose-start hover:to-rose-end hover:shadow-[0_2px_3px_0_rgba(56,61,77,0.12)] hover:before:opacity-0 active:bg-rose-600 active:shadow-none active:before:opacity-0 disabled:opacity-50 disabled:shadow-none"
|
|
128
128
|
},
|
|
129
|
+
// Borda button/secondary/border do Figma (#e8e8e9 = neutral-200); neutral-300 era escura demais.
|
|
129
130
|
secondary: {
|
|
130
|
-
text: "bg-surface border-[0.5px] border-neutral-
|
|
131
|
+
text: "bg-surface border-[0.5px] border-neutral-200 text-neutral-600 hover:bg-neutral-100 hover:text-neutral-600 active:text-neutral-600 active:bg-neutral-200 active:shadow-none disabled:opacity-50"
|
|
131
132
|
},
|
|
133
|
+
// Figma "Actions/Icon button" secundário: borda button/secondary/border (#e8e8e9 =
|
|
134
|
+
// neutral-200) e ícone #393c4d (neutral-600). Antes neutral-300/500 deixavam a
|
|
135
|
+
// borda marcada demais e o ícone mais claro que o design.
|
|
132
136
|
icon: {
|
|
133
|
-
text: "shadow-[0_1px_1px_0_rgba(56,61,77,0.1)] gap-1 bg-surface border-[0.5px] border-neutral-
|
|
137
|
+
text: "shadow-[0_1px_1px_0_rgba(56,61,77,0.1)] gap-1 bg-surface border-[0.5px] border-neutral-200 text-neutral-600 hover:bg-neutral-100 hover:text-neutral-600 active:bg-neutral-200 active:text-neutral-600 disabled:text-neutral-400 disabled:border-[0.5px] disabled:border-disabled disabled:bg-surface disabled:opacity-50 active:shadow-none"
|
|
134
138
|
},
|
|
135
139
|
// Figma: borda rose-400 (mais clara que o texto rose-500), sem escurecer o
|
|
136
140
|
// texto em hover/active. Active vira preenchimento sólido rose-500 com
|
|
@@ -576,19 +580,30 @@ var Input = ({
|
|
|
576
580
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
577
581
|
const [showPassword, setShowPassword] = React6__namespace.default.useState(false);
|
|
578
582
|
const styles = {
|
|
579
|
-
//
|
|
580
|
-
//
|
|
581
|
-
//
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
583
|
+
// Borda/fundo/anel de foco ficam neste wrapper (nao no <input>): o div do icone e
|
|
584
|
+
// renderizado depois do <input> no DOM e fica por cima dele na pilha de empilhamento,
|
|
585
|
+
// entao uma borda desenhada no proprio <input> ficava encoberta pelo fundo opaco do
|
|
586
|
+
// icone no lado esquerdo (visivel sobretudo no anel azul de foco). `input-focus-ring-within`
|
|
587
|
+
// (src/styles/index.css) desenha esse mesmo anel de 1.5px quando o <input> interno ganha
|
|
588
|
+
// foco, via `:focus-within`.
|
|
589
|
+
wrapper: `relative outline-none rounded-lg border-[0.5px] h-[46px] input-focus-ring-within ${disabled ? "bg-[var(--input-bg-disabled)] border-[var(--input-border-disabled)] shadow-none" : `bg-surface shadow-input ${hasError ? "border-dangerous-500" : "border-stroke"}`}`,
|
|
590
|
+
input: `text-p-md pl-2 peer text-paragraph bg-transparent outline-none block pb-[10px] h-full w-full disabled:text-disabled disabled:cursor-not-allowed ${label ? "pt-[22px]" : "pt-[10px]"}`,
|
|
591
|
+
// `top-0 left-0 h-full`: para um filho absolute, o offset e medido a partir do
|
|
592
|
+
// padding-box do ancestral relative (a borda do wrapper ja fica de fora sozinha, o
|
|
593
|
+
// browser nao soma nada por isso). `top-[0.5px]` + `h-[45px]` (usado antes) somava um
|
|
594
|
+
// inset manual de 0.5px SEM encolher a altura pra compensar, entao o icone ultrapassava
|
|
595
|
+
// o padding-box por baixo em 0.5px e estourava a borda inferior. `h-full` ja cobre
|
|
596
|
+
// exatamente o padding-box (46px do wrapper - 2x0.5px de borda = 45px), sem contas.
|
|
597
|
+
// O raio `7.5px` (8px do wrapper - 0.5px de borda) acompanha a curva INTERNA da borda,
|
|
598
|
+
// que e menor que o raio externo pela espessura da borda.
|
|
599
|
+
icon: `absolute bg-neutral-100 top-0 left-0 h-full w-[38px] rounded-l-[7.5px] text-[20px] ${hasError ? "text-dangerous-500" : "text-label peer-focus:text-blue-500"} peer-focus:border-blue-500`,
|
|
585
600
|
rightIcon: "absolute h-[44px] top-[1px] right-[1.5px] w-[38px] text-[22px]",
|
|
586
601
|
// `-translate-y-[10px]` (e nao `-translate-y-3`/12px): o label flutuante ficava colado
|
|
587
602
|
// demais no topo do campo. Os 2px a menos de deslocamento aproximam o espaco acima do
|
|
588
603
|
// label do espaco abaixo do conteudo (pb-[10px]). Mesmo valor nos demais inputs.
|
|
589
604
|
label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-[10px] scale-75 duration-300 text-sm peer-focus:text-blue-500 peer-focus:scale-75 peer-focus:-translate-y-[10px] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0",
|
|
590
605
|
clear: "absolute top-[8.3px] cursor-pointer text-label text-[22px]",
|
|
591
|
-
error: "
|
|
606
|
+
error: "text-dangerous-500"
|
|
592
607
|
};
|
|
593
608
|
const inlineStyles = {
|
|
594
609
|
inputWithIcon: { paddingLeft: "48px" },
|
|
@@ -596,7 +611,7 @@ var Input = ({
|
|
|
596
611
|
};
|
|
597
612
|
const input = name ? document == null ? void 0 : document.getElementById(name) : null;
|
|
598
613
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
599
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
614
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx9__default.default(styles.wrapper), children: [
|
|
600
615
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
601
616
|
"input",
|
|
602
617
|
{
|
|
@@ -1342,7 +1357,7 @@ var Popover = ({
|
|
|
1342
1357
|
reactTooltip.Tooltip,
|
|
1343
1358
|
{
|
|
1344
1359
|
id,
|
|
1345
|
-
className: "absolute bg-neutral-700 text-p-md text-neutral-0 rounded-lg shadow-dropdown py-[6px] px-3 max-w-[430px] break-words whitespace-normal",
|
|
1360
|
+
className: "absolute bg-neutral-700 text-p-md text-neutral-0 rounded-lg shadow-dropdown py-[6px] px-3 max-w-[430px] break-words whitespace-normal [&_.react-tooltip-content-wrapper]:p-0",
|
|
1346
1361
|
classNameArrow: !displayArrow ? style.noArrow : "",
|
|
1347
1362
|
openOnClick,
|
|
1348
1363
|
delayHide: 0,
|
|
@@ -3725,16 +3740,16 @@ var customStyles2 = {
|
|
|
3725
3740
|
}),
|
|
3726
3741
|
menu: (provided) => ({
|
|
3727
3742
|
...provided,
|
|
3728
|
-
marginTop: "
|
|
3729
|
-
border: "
|
|
3730
|
-
boxShadow: "
|
|
3743
|
+
marginTop: "8px",
|
|
3744
|
+
border: "0.5px solid var(--stroke)",
|
|
3745
|
+
boxShadow: "2px 4px 8px 0px rgba(57,60,77,0.1)",
|
|
3731
3746
|
borderRadius: "8px",
|
|
3732
3747
|
background: "var(--surface)",
|
|
3733
3748
|
zIndex: 60
|
|
3734
3749
|
}),
|
|
3735
3750
|
menuList: (provided) => ({
|
|
3736
3751
|
...provided,
|
|
3737
|
-
padding: "
|
|
3752
|
+
padding: "8px"
|
|
3738
3753
|
}),
|
|
3739
3754
|
singleValue: (base, state) => ({
|
|
3740
3755
|
...base,
|
|
@@ -3797,13 +3812,17 @@ var customStyles2 = {
|
|
|
3797
3812
|
cursor: state.isDisabled ? "auto" : "pointer",
|
|
3798
3813
|
pointerEvents: state.isDisabled ? "none" : "",
|
|
3799
3814
|
borderRadius: "8px",
|
|
3800
|
-
|
|
3801
|
-
|
|
3815
|
+
// 4px entre opções; a última encosta no padding de 8px da lista.
|
|
3816
|
+
margin: "0px 0px 4px",
|
|
3817
|
+
padding: "12px",
|
|
3818
|
+
"&:last-child": {
|
|
3819
|
+
marginBottom: "0px"
|
|
3820
|
+
},
|
|
3802
3821
|
backgroundColor: state.isSelected ? "var(--blue-700)" : "var(--surface)",
|
|
3803
3822
|
color,
|
|
3804
3823
|
fontWeight: state.isSelected ? 700 : 400,
|
|
3805
3824
|
"&:hover": {
|
|
3806
|
-
backgroundColor: state.isSelected ? "var(--blue-700)" : "var(--light-
|
|
3825
|
+
backgroundColor: state.isSelected ? "var(--blue-700)" : "var(--light-100)"
|
|
3807
3826
|
},
|
|
3808
3827
|
"&:active": {
|
|
3809
3828
|
backgroundColor: "var(--blue-700)",
|