nexaas-ui-components 1.0.96 → 1.0.98
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 +94 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +94 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -576,13 +576,17 @@ var Input = ({
|
|
|
576
576
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
577
577
|
const [showPassword, setShowPassword] = React6__namespace.default.useState(false);
|
|
578
578
|
const styles = {
|
|
579
|
-
//
|
|
580
|
-
//
|
|
581
|
-
|
|
579
|
+
// Focus ring padrao: classe `input-focus-ring` (src/styles/index.css) desenha o anel de
|
|
580
|
+
// 1.5px sobre o proprio contorno do campo. Nao usar `ring-*`/`ring-offset-*` do Tailwind
|
|
581
|
+
// aqui: eles criam um anel por fora do input, fora do padrao do design system.
|
|
582
|
+
input: `text-p-md pl-2 peer text-paragraph bg-surface shadow-input border-[0.5px] rounded-lg outline-none block pb-[10px] h-[46px] w-full disabled:bg-[var(--input-bg-disabled)] disabled:border-[var(--input-border-disabled)] disabled:text-disabled disabled:cursor-not-allowed disabled:shadow-none input-focus-ring ${label ? "pt-[22px]" : "pt-[10px]"}
|
|
582
583
|
${!hasError ? "border-stroke" : ""}`,
|
|
583
584
|
icon: `absolute bg-neutral-100 h-[44px] top-[1px] left-[1.5px] w-[38px] rounded-l-lg text-[20px] ${hasError ? "text-dangerous-500" : "text-label peer-focus:text-blue-500"} peer-focus:border-blue-500`,
|
|
584
585
|
rightIcon: "absolute h-[44px] top-[1px] right-[1.5px] w-[38px] text-[22px]",
|
|
585
|
-
|
|
586
|
+
// `-translate-y-[10px]` (e nao `-translate-y-3`/12px): o label flutuante ficava colado
|
|
587
|
+
// demais no topo do campo. Os 2px a menos de deslocamento aproximam o espaco acima do
|
|
588
|
+
// label do espaco abaixo do conteudo (pb-[10px]). Mesmo valor nos demais inputs.
|
|
589
|
+
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",
|
|
586
590
|
clear: "absolute top-[8.3px] cursor-pointer text-label text-[22px]",
|
|
587
591
|
error: "border-dangerous-500 text-dangerous-500"
|
|
588
592
|
};
|
|
@@ -828,8 +832,13 @@ var DatePickerInput = React6.forwardRef(
|
|
|
828
832
|
];
|
|
829
833
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
830
834
|
const styles = {
|
|
831
|
-
|
|
832
|
-
|
|
835
|
+
// Borda e sombra iguais as do Input: `rounded-lg` (era `rounded`, 4px contra os 8px do
|
|
836
|
+
// Input) e o mesmo bloco de disabled, com os tokens `--input-bg-disabled` /
|
|
837
|
+
// `--input-border-disabled` em vez de `bg-light-gray-100` — os tokens trocam de valor no
|
|
838
|
+
// tema escuro, a cor fixa nao.
|
|
839
|
+
input: `text-p-md text-paragraph bg-surface shadow-input border-[0.5px] rounded-lg block pb-[10px] h-[46px] w-full disabled:bg-[var(--input-bg-disabled)] disabled:border-[var(--input-border-disabled)] disabled:text-disabled disabled:cursor-not-allowed disabled:shadow-none input-focus-ring ${hasError ? "border-dangerous-500 text-dangerous-500" : "border-stroke"}`,
|
|
840
|
+
// left-[1.5px] como no Input: cobre a borda de 0.5px sem deixar fiapo aparecendo.
|
|
841
|
+
icon: `absolute bg-neutral-100 h-[44px] w-[38px] top-[1px] left-[1.5px] rounded-l-lg rounded-r-none ${hasError ? "text-dangerous-700" : "text-label"}`,
|
|
833
842
|
label: "absolute text-label text-sm",
|
|
834
843
|
clear: "absolute top-[8px] right-[8px] cursor-pointer text-label text-[22px]"
|
|
835
844
|
};
|
|
@@ -954,7 +963,7 @@ var DatePickerInput = React6.forwardRef(
|
|
|
954
963
|
"pointer-events-none ",
|
|
955
964
|
styles.label,
|
|
956
965
|
`
|
|
957
|
-
${field.value && field.value[0] !== null || invalidDate ? " scale-75 -translate-y-
|
|
966
|
+
${field.value && field.value[0] !== null || invalidDate ? " scale-75 -translate-y-[10px] " : ""}
|
|
958
967
|
${icon ? "left-[3rem]" : "left-2.5"}`
|
|
959
968
|
),
|
|
960
969
|
style: { top: "13px" },
|
|
@@ -1728,7 +1737,9 @@ function InputSmall({
|
|
|
1728
1737
|
// disabled fica no <input> interno, não neste wrapper — por isso o
|
|
1729
1738
|
// estado desabilitado é resolvido via ternário em vez de `disabled:`
|
|
1730
1739
|
// (pseudo-classe que nunca dispararia numa div).
|
|
1731
|
-
|
|
1740
|
+
// `input-focus-ring-within`: o foco cai no <input>, mas a borda esta neste wrapper — o
|
|
1741
|
+
// anel de 1.5px e desenhado sobre o contorno, sem mudar a altura do campo (h-9).
|
|
1742
|
+
wrapper: `border-[0.5px] border-stroke input-focus-ring-within group rounded-lg h-9 w-full text-paragraph flex items-center justify-between ${disabled ? "bg-neutral-100 shadow-none" : "bg-surface shadow-input"} ${className}`,
|
|
1732
1743
|
clear: "pr-[5px] cursor-pointer text-label text-[16px]"
|
|
1733
1744
|
};
|
|
1734
1745
|
const elem = inputRef == null ? void 0 : inputRef.current;
|
|
@@ -2591,10 +2602,10 @@ function InputMoney({
|
|
|
2591
2602
|
const fieldValidationMessages = [error == null ? void 0 : error.message];
|
|
2592
2603
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
2593
2604
|
const styles = {
|
|
2594
|
-
input: `text-p-md pl-2 peer text-paragraph bg-surface shadow-input border-[0.5px] rounded-lg outline-none block pb-[10px] h-[46px] w-full disabled:bg-neutral-100 disabled:shadow-none focus-
|
|
2605
|
+
input: `text-p-md pl-2 peer text-paragraph bg-surface shadow-input border-[0.5px] rounded-lg outline-none block pb-[10px] h-[46px] w-full disabled:bg-neutral-100 disabled:shadow-none input-focus-ring ${label ? "pt-[22px]" : "pt-[10px]"} ${hasError ? "border-dangerous-500 text-dangerous-500" : "border-stroke focus-visible:border-blue-500"}`,
|
|
2595
2606
|
icon: `absolute bg-neutral-100 h-[44px] top-[1px] left-[1px] w-[38px] rounded-l-lg ${hasError ? "text-dangerous-500" : "text-label"}
|
|
2596
2607
|
`,
|
|
2597
|
-
label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-
|
|
2608
|
+
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"};
|
|
2598
2609
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2599
2610
|
reactHookForm.Controller,
|
|
2600
2611
|
{
|
|
@@ -2713,10 +2724,10 @@ function InputNumber({
|
|
|
2713
2724
|
const fieldValidationMessages = [error == null ? void 0 : error.message];
|
|
2714
2725
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
2715
2726
|
const styles = {
|
|
2716
|
-
input: `text-p-md pl-3 peer text-paragraph bg-surface border-[0.5px] rounded-lg outline-none block pb-[10px] h-[44px] w-full disabled:bg-neutral-100 disabled:shadow-none focus-
|
|
2727
|
+
input: `text-p-md pl-3 peer text-paragraph bg-surface border-[0.5px] rounded-lg outline-none block pb-[10px] h-[44px] w-full disabled:bg-neutral-100 disabled:shadow-none input-focus-ring ${label ? "pt-[22px]" : "pt-[10px]"} ${hasError ? "border-dangerous-500 text-dangerous-500 shadow-none" : "border-stroke focus-visible:border-blue-500 shadow-input"}`,
|
|
2717
2728
|
icon: `absolute bg-neutral-100 h-[44px] top-[2px] left-[1.5px] w-[38px] rounded-l-lg ${hasError ? "text-dangerous-500" : "text-label"}
|
|
2718
2729
|
`,
|
|
2719
|
-
label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-
|
|
2730
|
+
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",
|
|
2720
2731
|
buttonsWrapper: "absolute top-[7px] right-[10px] cursor-pointer text-label flex flex-col gap-[2px]",
|
|
2721
2732
|
button: `border-[0.5px] border-neutral-300 rounded shadow-[0px_1px_1px_rgba(56,61,77,0.1)] h-4 w-4 flex items-center justify-center ${disabled ? "bg-neutral-100" : "bg-surface"}`
|
|
2722
2733
|
};
|
|
@@ -2926,10 +2937,10 @@ function InputPercentage({
|
|
|
2926
2937
|
const fieldValidationMessages = [error == null ? void 0 : error.message];
|
|
2927
2938
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
2928
2939
|
const styles = {
|
|
2929
|
-
input: `text-p-md pl-2 peer text-paragraph bg-surface shadow-input border-[0.5px] rounded-lg outline-none block pb-[10px] h-[46px] w-full disabled:bg-neutral-100 disabled:shadow-none focus-
|
|
2940
|
+
input: `text-p-md pl-2 peer text-paragraph bg-surface shadow-input border-[0.5px] rounded-lg outline-none block pb-[10px] h-[46px] w-full disabled:bg-neutral-100 disabled:shadow-none input-focus-ring ${label ? "pt-[22px]" : "pt-[10px]"} ${hasError ? "border-dangerous-500 text-dangerous-500" : "border-stroke focus-visible:border-blue-500"}`,
|
|
2930
2941
|
icon: `absolute bg-neutral-100 h-[44px] top-[1px] left-[1.5px] w-[38px] text-[22px] rounded-lg ${hasError ? "text-dangerous-500" : "text-label"}
|
|
2931
2942
|
`,
|
|
2932
|
-
label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-
|
|
2943
|
+
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"};
|
|
2933
2944
|
const input = name ? document == null ? void 0 : document.getElementById(name) : null;
|
|
2934
2945
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2935
2946
|
reactHookForm.Controller,
|
|
@@ -3253,20 +3264,17 @@ var customStyles = {
|
|
|
3253
3264
|
color: "var(--label)"
|
|
3254
3265
|
}
|
|
3255
3266
|
}),
|
|
3256
|
-
dropdownIndicator: (provided, state) => {
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
}
|
|
3268
|
-
};
|
|
3269
|
-
},
|
|
3267
|
+
dropdownIndicator: (provided, state) => ({
|
|
3268
|
+
...provided,
|
|
3269
|
+
color: state.isDisabled ? "var(--input-icon-disabled)" : "var(--paragraph)",
|
|
3270
|
+
// -2px corrige o desalinhamento otico da seta com o texto do campo. Sem rotate: o estado
|
|
3271
|
+
// aberto troca o glifo pra `uil-angle-up` (ver DropdownIndicatorCustom em Select.tsx), assim
|
|
3272
|
+
// a seta fica na mesma posicao nos dois estados.
|
|
3273
|
+
transform: "translateY(-2px)",
|
|
3274
|
+
":hover": {
|
|
3275
|
+
color: state.isDisabled ? "var(--input-icon-disabled)" : "var(--paragraph)"
|
|
3276
|
+
}
|
|
3277
|
+
}),
|
|
3270
3278
|
placeholder: (provided, state) => ({
|
|
3271
3279
|
...provided,
|
|
3272
3280
|
color: state.isDisabled ? "var(--input-placeholder-disabled)" : "var(--label)"
|
|
@@ -3298,15 +3306,21 @@ var customStyles = {
|
|
|
3298
3306
|
display: "flex"
|
|
3299
3307
|
}),
|
|
3300
3308
|
control: (provided, state) => {
|
|
3301
|
-
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-700)" : state.
|
|
3309
|
+
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-700)" : state.isFocused ? "0.5px solid var(--blue-500)" : "0.5px solid var(--stroke)";
|
|
3302
3310
|
return {
|
|
3303
3311
|
...provided,
|
|
3304
3312
|
cursor: "pointer",
|
|
3305
3313
|
border,
|
|
3306
|
-
|
|
3314
|
+
// Focus ring padrao (card 96332): 1.5px na cor secondary desenhados SOBRE o contorno do
|
|
3315
|
+
// campo — a borda fica azul e o inset box-shadow completa a espessura. O spread do
|
|
3316
|
+
// box-shadow e o unico jeito de chegar em 1.5px de fato: o Chromium arredonda
|
|
3317
|
+
// border-width/outline-width pra px inteiro, entao 1.5px pinta 1px, igual ao default de
|
|
3318
|
+
// 0.5px. Nada disso entra no box model, entao a altura do control nao muda — e o anel
|
|
3319
|
+
// fica por dentro do campo, sem o anel "extra" por fora que o box-shadow duplo criava.
|
|
3320
|
+
boxShadow: state.isDisabled ? "none" : state.isFocused ? "inset 0 0 0 0.5px var(--blue-500), 0px 1px 1.5px 0px rgba(56,61,77,0.12)" : "0px 1px 1.5px 0px rgba(56,61,77,0.12)",
|
|
3307
3321
|
outline: "none",
|
|
3308
|
-
// Raio fixo: o anel de foco
|
|
3309
|
-
//
|
|
3322
|
+
// Raio fixo: o anel de foco segue o borderRadius do control — trocar pra 2px no foco
|
|
3323
|
+
// deixava o anel quadrado sobre um campo arredondado.
|
|
3310
3324
|
borderRadius: "0.5rem",
|
|
3311
3325
|
placeholder: " ",
|
|
3312
3326
|
height: state.selectProps.smallField ? "30px" : "46px",
|
|
@@ -3525,10 +3539,15 @@ var SelectField = ({
|
|
|
3525
3539
|
}
|
|
3526
3540
|
};
|
|
3527
3541
|
const DropdownIndicatorCustom = (props) => {
|
|
3542
|
+
var _a2;
|
|
3528
3543
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownIndicator, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3529
3544
|
"i",
|
|
3530
3545
|
{
|
|
3531
|
-
className:
|
|
3546
|
+
className: clsx9__default.default(
|
|
3547
|
+
"uil text-[20px]",
|
|
3548
|
+
((_a2 = props.selectProps) == null ? void 0 : _a2.menuIsOpen) ? "uil-angle-up" : "uil-angle-down",
|
|
3549
|
+
small ? "h-[20px] -mt-[7px]" : "h-full"
|
|
3550
|
+
)
|
|
3532
3551
|
}
|
|
3533
3552
|
) });
|
|
3534
3553
|
};
|
|
@@ -3628,7 +3647,7 @@ var SelectField = ({
|
|
|
3628
3647
|
className: clsx9__default.default(
|
|
3629
3648
|
"text-label text-sm left-2.5 cursor-pointer pointer-events-none absolute transition-all duration-200",
|
|
3630
3649
|
{
|
|
3631
|
-
"scale-75 -translate-y-
|
|
3650
|
+
"scale-75 -translate-y-[10px]": field.value || inputValue,
|
|
3632
3651
|
"ml-[35px]": hasIcon.hasIcon,
|
|
3633
3652
|
"ml-[2px]": !hasIcon.hasIcon,
|
|
3634
3653
|
"top-2.5": !(field.value || inputValue),
|
|
@@ -3721,15 +3740,21 @@ var customStyles2 = {
|
|
|
3721
3740
|
color: state.isDisabled ? "var(--input-placeholder-disabled)" : "var(--label)"
|
|
3722
3741
|
}),
|
|
3723
3742
|
control: (provided, state) => {
|
|
3724
|
-
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-700)" : state.
|
|
3743
|
+
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-700)" : state.isFocused ? "0.5px solid var(--blue-500)" : "0.5px solid var(--stroke)";
|
|
3725
3744
|
return {
|
|
3726
3745
|
...provided,
|
|
3727
3746
|
cursor: "pointer",
|
|
3728
3747
|
border,
|
|
3729
|
-
|
|
3748
|
+
// Focus ring padrao (card 96332): 1.5px na cor secondary desenhados SOBRE o contorno do
|
|
3749
|
+
// campo — a borda fica azul e o inset box-shadow completa a espessura. O spread do
|
|
3750
|
+
// box-shadow e o unico jeito de chegar em 1.5px de fato: o Chromium arredonda
|
|
3751
|
+
// border-width/outline-width pra px inteiro, entao 1.5px pinta 1px, igual ao default de
|
|
3752
|
+
// 0.5px. Nada disso entra no box model, entao a altura do control nao muda — e o anel
|
|
3753
|
+
// fica por dentro do campo, sem o anel "extra" por fora que o box-shadow duplo criava.
|
|
3754
|
+
boxShadow: state.isDisabled ? "none" : state.isFocused ? "inset 0 0 0 0.5px var(--blue-500), 0px 1px 1.5px 0px rgba(56,61,77,0.12)" : "0px 1px 1.5px 0px rgba(56,61,77,0.12)",
|
|
3730
3755
|
outline: "none",
|
|
3731
|
-
// Raio fixo: o anel de foco
|
|
3732
|
-
//
|
|
3756
|
+
// Raio fixo: o anel de foco segue o borderRadius do control — trocar pra 2px no foco
|
|
3757
|
+
// deixava o anel quadrado sobre um campo arredondado.
|
|
3733
3758
|
borderRadius: "0.5rem",
|
|
3734
3759
|
placeholder: " ",
|
|
3735
3760
|
height: "46px",
|
|
@@ -4085,7 +4110,7 @@ var SelectFieldBip = React6.forwardRef(
|
|
|
4085
4110
|
className: clsx9__default.default(
|
|
4086
4111
|
"text-label text-sm left-2.5 cursor-pointer pointer-events-none",
|
|
4087
4112
|
{
|
|
4088
|
-
[" scale-75 -translate-y-
|
|
4113
|
+
[" scale-75 -translate-y-[10px] "]: field.value,
|
|
4089
4114
|
["text-dangerous-700"]: hasError.hasError
|
|
4090
4115
|
}
|
|
4091
4116
|
),
|
|
@@ -6164,12 +6189,18 @@ var customStyles3 = {
|
|
|
6164
6189
|
display: "flex"
|
|
6165
6190
|
}),
|
|
6166
6191
|
control: (provided, state) => {
|
|
6167
|
-
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-500)" : state.
|
|
6192
|
+
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-500)" : state.isFocused ? "0.5px solid var(--blue-500)" : "0.5px solid var(--stroke)";
|
|
6168
6193
|
return {
|
|
6169
6194
|
...provided,
|
|
6170
6195
|
cursor: "pointer",
|
|
6171
6196
|
border,
|
|
6172
|
-
|
|
6197
|
+
// Focus ring padrao (card 96332): 1.5px na cor secondary desenhados SOBRE o contorno do
|
|
6198
|
+
// campo — a borda fica azul e o inset box-shadow completa a espessura. O spread do
|
|
6199
|
+
// box-shadow e o unico jeito de chegar em 1.5px de fato: o Chromium arredonda
|
|
6200
|
+
// border-width/outline-width pra px inteiro, entao 1.5px pinta 1px, igual ao default de
|
|
6201
|
+
// 0.5px. Nada disso entra no box model, entao a altura do control nao muda — e o anel
|
|
6202
|
+
// fica por dentro do campo, sem o anel "extra" por fora que o box-shadow duplo criava.
|
|
6203
|
+
boxShadow: state.isDisabled ? "none" : state.isFocused ? "inset 0 0 0 0.5px var(--blue-500), 0px 1px 1.5px 0px rgba(56,61,77,0.12)" : "0px 1px 1.5px 0px rgba(56,61,77,0.12)",
|
|
6173
6204
|
outline: "none",
|
|
6174
6205
|
borderRadius: "0.5rem",
|
|
6175
6206
|
paddingLeft: "0px",
|
|
@@ -6317,7 +6348,7 @@ var MultiSelect = ({
|
|
|
6317
6348
|
"span",
|
|
6318
6349
|
{
|
|
6319
6350
|
className: clsx9__default.default("text-label text-sm left-2.5", {
|
|
6320
|
-
[" scale-75 -translate-y-
|
|
6351
|
+
[" scale-75 -translate-y-[10px] "]: field.value && field.value.length > 0,
|
|
6321
6352
|
["text-dangerous-500"]: hasError.hasError
|
|
6322
6353
|
}),
|
|
6323
6354
|
children: [
|
|
@@ -6379,13 +6410,19 @@ var customStyles4 = {
|
|
|
6379
6410
|
background: "var(--surface)"
|
|
6380
6411
|
}),
|
|
6381
6412
|
control: (provided, state) => {
|
|
6382
|
-
const border = state.selectProps.hasError ? "0.5px solid var(--dangerous-500)" : state.isFocused ? "
|
|
6413
|
+
const border = state.selectProps.hasError ? "0.5px solid var(--dangerous-500)" : state.isFocused ? "0.5px solid var(--blue-500)" : "0.5px solid var(--stroke)";
|
|
6383
6414
|
return {
|
|
6384
6415
|
...provided,
|
|
6385
6416
|
cursor: "pointer",
|
|
6386
6417
|
paddingTop: state.selectProps.hasLabel ? "18px" : "0px",
|
|
6387
6418
|
border: state.isDisabled ? "0.5px solid var(--input-border-disabled, var(--stroke))" : border,
|
|
6388
|
-
|
|
6419
|
+
// Focus ring padrao (card 96332): 1.5px na cor secondary desenhados SOBRE o contorno do
|
|
6420
|
+
// campo — a borda fica azul e o inset box-shadow completa a espessura. O spread do
|
|
6421
|
+
// box-shadow e o unico jeito de chegar em 1.5px de fato: o Chromium arredonda
|
|
6422
|
+
// border-width/outline-width pra px inteiro, entao 1.5px pinta 1px, igual ao default de
|
|
6423
|
+
// 0.5px. Nada disso entra no box model, entao a altura do control nao muda — e o anel
|
|
6424
|
+
// fica por dentro do campo, sem o anel "extra" por fora que o box-shadow duplo criava.
|
|
6425
|
+
boxShadow: state.isDisabled ? "none" : state.isFocused ? "inset 0 0 0 0.5px var(--blue-500), 0px 1px 1.5px 0px rgba(56,61,77,0.12)" : "0px 1px 1.5px 0px rgba(56,61,77,0.12)",
|
|
6389
6426
|
outline: "none",
|
|
6390
6427
|
borderRadius: "0.5rem",
|
|
6391
6428
|
backgroundColor: "var(--surface)",
|
|
@@ -6502,7 +6539,7 @@ var InputTag = ({
|
|
|
6502
6539
|
"span",
|
|
6503
6540
|
{
|
|
6504
6541
|
className: clsx9__default.default("text-label text-sm left-2.5", {
|
|
6505
|
-
[" scale-75 -translate-y-
|
|
6542
|
+
[" scale-75 -translate-y-[10px] "]: field.value && field.value.length > 0,
|
|
6506
6543
|
["text-dangerous-500"]: hasError.hasError
|
|
6507
6544
|
}),
|
|
6508
6545
|
children: [
|
|
@@ -6576,12 +6613,18 @@ var customStyles5 = {
|
|
|
6576
6613
|
display: "flex"
|
|
6577
6614
|
}),
|
|
6578
6615
|
control: (provided, state) => {
|
|
6579
|
-
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-500)" : state.
|
|
6616
|
+
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-500)" : state.isFocused ? "0.5px solid var(--blue-500)" : "0.5px solid var(--stroke)";
|
|
6580
6617
|
return {
|
|
6581
6618
|
...provided,
|
|
6582
6619
|
cursor: "pointer",
|
|
6583
6620
|
border,
|
|
6584
|
-
|
|
6621
|
+
// Focus ring padrao (card 96332): 1.5px na cor secondary desenhados SOBRE o contorno do
|
|
6622
|
+
// campo — a borda fica azul e o inset box-shadow completa a espessura. O spread do
|
|
6623
|
+
// box-shadow e o unico jeito de chegar em 1.5px de fato: o Chromium arredonda
|
|
6624
|
+
// border-width/outline-width pra px inteiro, entao 1.5px pinta 1px, igual ao default de
|
|
6625
|
+
// 0.5px. Nada disso entra no box model, entao a altura do control nao muda — e o anel
|
|
6626
|
+
// fica por dentro do campo, sem o anel "extra" por fora que o box-shadow duplo criava.
|
|
6627
|
+
boxShadow: state.isDisabled ? "none" : state.isFocused ? "inset 0 0 0 0.5px var(--blue-500), 0px 1px 1.5px 0px rgba(56,61,77,0.12)" : "0px 1px 1.5px 0px rgba(56,61,77,0.12)",
|
|
6585
6628
|
outline: "none",
|
|
6586
6629
|
borderRadius: "0.5rem",
|
|
6587
6630
|
paddingLeft: "8px",
|
|
@@ -7318,8 +7361,8 @@ var TextArea = ({
|
|
|
7318
7361
|
const fieldValidationMessages = [error == null ? void 0 : error.message];
|
|
7319
7362
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
7320
7363
|
const styles = {
|
|
7321
|
-
input: `border-[0.5px] rounded-lg block pb-[10px] pt-[18px] w-full bg-surface disabled:bg-neutral-100 disabled:shadow-none
|
|
7322
|
-
label: `cursor-text absolute text-label top-[0.70rem] z-10 transform origin-[0] -translate-y-
|
|
7364
|
+
input: `border-[0.5px] rounded-lg block pb-[10px] pt-[18px] w-full bg-surface disabled:bg-neutral-100 disabled:shadow-none input-focus-ring text-p-md peer shadow-input pl-2 outline-none ${hasError ? "border-dangerous-500 text-dangerous-500" : "border-stroke text-paragraph"}`,
|
|
7365
|
+
label: `cursor-text absolute text-label top-[0.70rem] z-10 transform origin-[0] -translate-y-[10px] scale-75 duration-300 text-sm peer-focus:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-[10px] left-2.5`
|
|
7323
7366
|
};
|
|
7324
7367
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7325
7368
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative outline-none", children: [
|
|
@@ -7465,11 +7508,11 @@ function ControlledInput({
|
|
|
7465
7508
|
const fieldValidationMessages = [error == null ? void 0 : error.message];
|
|
7466
7509
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
7467
7510
|
const styles = {
|
|
7468
|
-
input: `text-p-md pl-2 peer text-paragraph bg-surface shadow-input border-[0.5px] rounded-lg outline-none block pb-[10px] h-[46px] w-full disabled:bg-neutral-100 disabled:shadow-none
|
|
7511
|
+
input: `text-p-md pl-2 peer text-paragraph bg-surface shadow-input border-[0.5px] rounded-lg outline-none block pb-[10px] h-[46px] w-full disabled:bg-neutral-100 disabled:shadow-none input-focus-ring ${label ? "pt-[22px]" : "pt-[10px]"}
|
|
7469
7512
|
${!hasError ? "border-stroke" : ""}`,
|
|
7470
7513
|
icon: `absolute bg-neutral-100 h-[44px] top-[1px] left-[1.5px] w-[38px] rounded-l-lg text-[20px] ${hasError ? "text-dangerous-500" : "text-label"}`,
|
|
7471
7514
|
rightIcon: "absolute h-[44px] top-[1px] right-[1.5px] w-[38px] text-[22px]",
|
|
7472
|
-
label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-
|
|
7515
|
+
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",
|
|
7473
7516
|
clear: `absolute top-[7px] cursor-pointer text-label text-[22px] ${searchOnClick ? "right-[46px]" : "right-[8px]"}`,
|
|
7474
7517
|
error: "border-dangerous-500 text-dangerous-500"
|
|
7475
7518
|
};
|