nexaas-ui-components 1.0.95 → 1.0.97
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 +88 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +88 -47
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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,7 +832,7 @@ var DatePickerInput = React6.forwardRef(
|
|
|
828
832
|
];
|
|
829
833
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
830
834
|
const styles = {
|
|
831
|
-
input: `text-p-md text-paragraph bg-surface shadow-input border-[0.5px] rounded block pb-[10px] h-[46px] w-full disabled:bg-light-gray-100 disabled:shadow-none
|
|
835
|
+
input: `text-p-md text-paragraph bg-surface shadow-input border-[0.5px] rounded block pb-[10px] h-[46px] w-full disabled:bg-light-gray-100 disabled:shadow-none input-focus-ring ${hasError ? "border-dangerous-500 text-dangerous-500" : "border-stroke"}`,
|
|
832
836
|
icon: `absolute bg-light-gray-100 h-[44px] w-[38px] top-[1px] left-[1px] rounded-l-lg rounded-r-none ${hasError ? "text-dangerous-700" : "text-label"}`,
|
|
833
837
|
label: "absolute text-label text-sm",
|
|
834
838
|
clear: "absolute top-[8px] right-[8px] cursor-pointer text-label text-[22px]"
|
|
@@ -954,7 +958,7 @@ var DatePickerInput = React6.forwardRef(
|
|
|
954
958
|
"pointer-events-none ",
|
|
955
959
|
styles.label,
|
|
956
960
|
`
|
|
957
|
-
${field.value && field.value[0] !== null || invalidDate ? " scale-75 -translate-y-
|
|
961
|
+
${field.value && field.value[0] !== null || invalidDate ? " scale-75 -translate-y-[10px] " : ""}
|
|
958
962
|
${icon ? "left-[3rem]" : "left-2.5"}`
|
|
959
963
|
),
|
|
960
964
|
style: { top: "13px" },
|
|
@@ -1728,7 +1732,9 @@ function InputSmall({
|
|
|
1728
1732
|
// disabled fica no <input> interno, não neste wrapper — por isso o
|
|
1729
1733
|
// estado desabilitado é resolvido via ternário em vez de `disabled:`
|
|
1730
1734
|
// (pseudo-classe que nunca dispararia numa div).
|
|
1731
|
-
|
|
1735
|
+
// `input-focus-ring-within`: o foco cai no <input>, mas a borda esta neste wrapper — o
|
|
1736
|
+
// anel de 1.5px e desenhado sobre o contorno, sem mudar a altura do campo (h-9).
|
|
1737
|
+
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
1738
|
clear: "pr-[5px] cursor-pointer text-label text-[16px]"
|
|
1733
1739
|
};
|
|
1734
1740
|
const elem = inputRef == null ? void 0 : inputRef.current;
|
|
@@ -2591,10 +2597,10 @@ function InputMoney({
|
|
|
2591
2597
|
const fieldValidationMessages = [error == null ? void 0 : error.message];
|
|
2592
2598
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
2593
2599
|
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-
|
|
2600
|
+
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
2601
|
icon: `absolute bg-neutral-100 h-[44px] top-[1px] left-[1px] w-[38px] rounded-l-lg ${hasError ? "text-dangerous-500" : "text-label"}
|
|
2596
2602
|
`,
|
|
2597
|
-
label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-
|
|
2603
|
+
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
2604
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2599
2605
|
reactHookForm.Controller,
|
|
2600
2606
|
{
|
|
@@ -2713,10 +2719,10 @@ function InputNumber({
|
|
|
2713
2719
|
const fieldValidationMessages = [error == null ? void 0 : error.message];
|
|
2714
2720
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
2715
2721
|
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-
|
|
2722
|
+
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
2723
|
icon: `absolute bg-neutral-100 h-[44px] top-[2px] left-[1.5px] w-[38px] rounded-l-lg ${hasError ? "text-dangerous-500" : "text-label"}
|
|
2718
2724
|
`,
|
|
2719
|
-
label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-
|
|
2725
|
+
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
2726
|
buttonsWrapper: "absolute top-[7px] right-[10px] cursor-pointer text-label flex flex-col gap-[2px]",
|
|
2721
2727
|
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
2728
|
};
|
|
@@ -2926,10 +2932,10 @@ function InputPercentage({
|
|
|
2926
2932
|
const fieldValidationMessages = [error == null ? void 0 : error.message];
|
|
2927
2933
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
2928
2934
|
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-
|
|
2935
|
+
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
2936
|
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
2937
|
`,
|
|
2932
|
-
label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-
|
|
2938
|
+
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
2939
|
const input = name ? document == null ? void 0 : document.getElementById(name) : null;
|
|
2934
2940
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2935
2941
|
reactHookForm.Controller,
|
|
@@ -3253,17 +3259,17 @@ var customStyles = {
|
|
|
3253
3259
|
color: "var(--label)"
|
|
3254
3260
|
}
|
|
3255
3261
|
}),
|
|
3256
|
-
dropdownIndicator: (provided, state) => {
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
}
|
|
3266
|
-
},
|
|
3262
|
+
dropdownIndicator: (provided, state) => ({
|
|
3263
|
+
...provided,
|
|
3264
|
+
color: state.isDisabled ? "var(--input-icon-disabled)" : "var(--paragraph)",
|
|
3265
|
+
// -2px corrige o desalinhamento otico da seta com o texto do campo. Sem rotate: o estado
|
|
3266
|
+
// aberto troca o glifo pra `uil-angle-up` (ver DropdownIndicatorCustom em Select.tsx), assim
|
|
3267
|
+
// a seta fica na mesma posicao nos dois estados.
|
|
3268
|
+
transform: "translateY(-2px)",
|
|
3269
|
+
":hover": {
|
|
3270
|
+
color: state.isDisabled ? "var(--input-icon-disabled)" : "var(--paragraph)"
|
|
3271
|
+
}
|
|
3272
|
+
}),
|
|
3267
3273
|
placeholder: (provided, state) => ({
|
|
3268
3274
|
...provided,
|
|
3269
3275
|
color: state.isDisabled ? "var(--input-placeholder-disabled)" : "var(--label)"
|
|
@@ -3295,15 +3301,21 @@ var customStyles = {
|
|
|
3295
3301
|
display: "flex"
|
|
3296
3302
|
}),
|
|
3297
3303
|
control: (provided, state) => {
|
|
3298
|
-
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-700)" : state.
|
|
3304
|
+
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)";
|
|
3299
3305
|
return {
|
|
3300
3306
|
...provided,
|
|
3301
3307
|
cursor: "pointer",
|
|
3302
3308
|
border,
|
|
3303
|
-
|
|
3309
|
+
// Focus ring padrao (card 96332): 1.5px na cor secondary desenhados SOBRE o contorno do
|
|
3310
|
+
// campo — a borda fica azul e o inset box-shadow completa a espessura. O spread do
|
|
3311
|
+
// box-shadow e o unico jeito de chegar em 1.5px de fato: o Chromium arredonda
|
|
3312
|
+
// border-width/outline-width pra px inteiro, entao 1.5px pinta 1px, igual ao default de
|
|
3313
|
+
// 0.5px. Nada disso entra no box model, entao a altura do control nao muda — e o anel
|
|
3314
|
+
// fica por dentro do campo, sem o anel "extra" por fora que o box-shadow duplo criava.
|
|
3315
|
+
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)",
|
|
3304
3316
|
outline: "none",
|
|
3305
|
-
// Raio fixo: o anel de foco
|
|
3306
|
-
//
|
|
3317
|
+
// Raio fixo: o anel de foco segue o borderRadius do control — trocar pra 2px no foco
|
|
3318
|
+
// deixava o anel quadrado sobre um campo arredondado.
|
|
3307
3319
|
borderRadius: "0.5rem",
|
|
3308
3320
|
placeholder: " ",
|
|
3309
3321
|
height: state.selectProps.smallField ? "30px" : "46px",
|
|
@@ -3522,10 +3534,15 @@ var SelectField = ({
|
|
|
3522
3534
|
}
|
|
3523
3535
|
};
|
|
3524
3536
|
const DropdownIndicatorCustom = (props) => {
|
|
3537
|
+
var _a2;
|
|
3525
3538
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownIndicator, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3526
3539
|
"i",
|
|
3527
3540
|
{
|
|
3528
|
-
className:
|
|
3541
|
+
className: clsx9__default.default(
|
|
3542
|
+
"uil text-[20px]",
|
|
3543
|
+
((_a2 = props.selectProps) == null ? void 0 : _a2.menuIsOpen) ? "uil-angle-up" : "uil-angle-down",
|
|
3544
|
+
small ? "h-[20px] -mt-[7px]" : "h-full"
|
|
3545
|
+
)
|
|
3529
3546
|
}
|
|
3530
3547
|
) });
|
|
3531
3548
|
};
|
|
@@ -3625,7 +3642,7 @@ var SelectField = ({
|
|
|
3625
3642
|
className: clsx9__default.default(
|
|
3626
3643
|
"text-label text-sm left-2.5 cursor-pointer pointer-events-none absolute transition-all duration-200",
|
|
3627
3644
|
{
|
|
3628
|
-
"scale-75 -translate-y-
|
|
3645
|
+
"scale-75 -translate-y-[10px]": field.value || inputValue,
|
|
3629
3646
|
"ml-[35px]": hasIcon.hasIcon,
|
|
3630
3647
|
"ml-[2px]": !hasIcon.hasIcon,
|
|
3631
3648
|
"top-2.5": !(field.value || inputValue),
|
|
@@ -3718,15 +3735,21 @@ var customStyles2 = {
|
|
|
3718
3735
|
color: state.isDisabled ? "var(--input-placeholder-disabled)" : "var(--label)"
|
|
3719
3736
|
}),
|
|
3720
3737
|
control: (provided, state) => {
|
|
3721
|
-
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-700)" : state.
|
|
3738
|
+
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)";
|
|
3722
3739
|
return {
|
|
3723
3740
|
...provided,
|
|
3724
3741
|
cursor: "pointer",
|
|
3725
3742
|
border,
|
|
3726
|
-
|
|
3743
|
+
// Focus ring padrao (card 96332): 1.5px na cor secondary desenhados SOBRE o contorno do
|
|
3744
|
+
// campo — a borda fica azul e o inset box-shadow completa a espessura. O spread do
|
|
3745
|
+
// box-shadow e o unico jeito de chegar em 1.5px de fato: o Chromium arredonda
|
|
3746
|
+
// border-width/outline-width pra px inteiro, entao 1.5px pinta 1px, igual ao default de
|
|
3747
|
+
// 0.5px. Nada disso entra no box model, entao a altura do control nao muda — e o anel
|
|
3748
|
+
// fica por dentro do campo, sem o anel "extra" por fora que o box-shadow duplo criava.
|
|
3749
|
+
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)",
|
|
3727
3750
|
outline: "none",
|
|
3728
|
-
// Raio fixo: o anel de foco
|
|
3729
|
-
//
|
|
3751
|
+
// Raio fixo: o anel de foco segue o borderRadius do control — trocar pra 2px no foco
|
|
3752
|
+
// deixava o anel quadrado sobre um campo arredondado.
|
|
3730
3753
|
borderRadius: "0.5rem",
|
|
3731
3754
|
placeholder: " ",
|
|
3732
3755
|
height: "46px",
|
|
@@ -4082,7 +4105,7 @@ var SelectFieldBip = React6.forwardRef(
|
|
|
4082
4105
|
className: clsx9__default.default(
|
|
4083
4106
|
"text-label text-sm left-2.5 cursor-pointer pointer-events-none",
|
|
4084
4107
|
{
|
|
4085
|
-
[" scale-75 -translate-y-
|
|
4108
|
+
[" scale-75 -translate-y-[10px] "]: field.value,
|
|
4086
4109
|
["text-dangerous-700"]: hasError.hasError
|
|
4087
4110
|
}
|
|
4088
4111
|
),
|
|
@@ -6161,12 +6184,18 @@ var customStyles3 = {
|
|
|
6161
6184
|
display: "flex"
|
|
6162
6185
|
}),
|
|
6163
6186
|
control: (provided, state) => {
|
|
6164
|
-
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-500)" : state.
|
|
6187
|
+
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)";
|
|
6165
6188
|
return {
|
|
6166
6189
|
...provided,
|
|
6167
6190
|
cursor: "pointer",
|
|
6168
6191
|
border,
|
|
6169
|
-
|
|
6192
|
+
// Focus ring padrao (card 96332): 1.5px na cor secondary desenhados SOBRE o contorno do
|
|
6193
|
+
// campo — a borda fica azul e o inset box-shadow completa a espessura. O spread do
|
|
6194
|
+
// box-shadow e o unico jeito de chegar em 1.5px de fato: o Chromium arredonda
|
|
6195
|
+
// border-width/outline-width pra px inteiro, entao 1.5px pinta 1px, igual ao default de
|
|
6196
|
+
// 0.5px. Nada disso entra no box model, entao a altura do control nao muda — e o anel
|
|
6197
|
+
// fica por dentro do campo, sem o anel "extra" por fora que o box-shadow duplo criava.
|
|
6198
|
+
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)",
|
|
6170
6199
|
outline: "none",
|
|
6171
6200
|
borderRadius: "0.5rem",
|
|
6172
6201
|
paddingLeft: "0px",
|
|
@@ -6314,7 +6343,7 @@ var MultiSelect = ({
|
|
|
6314
6343
|
"span",
|
|
6315
6344
|
{
|
|
6316
6345
|
className: clsx9__default.default("text-label text-sm left-2.5", {
|
|
6317
|
-
[" scale-75 -translate-y-
|
|
6346
|
+
[" scale-75 -translate-y-[10px] "]: field.value && field.value.length > 0,
|
|
6318
6347
|
["text-dangerous-500"]: hasError.hasError
|
|
6319
6348
|
}),
|
|
6320
6349
|
children: [
|
|
@@ -6376,13 +6405,19 @@ var customStyles4 = {
|
|
|
6376
6405
|
background: "var(--surface)"
|
|
6377
6406
|
}),
|
|
6378
6407
|
control: (provided, state) => {
|
|
6379
|
-
const border = state.selectProps.hasError ? "0.5px solid var(--dangerous-500)" : state.isFocused ? "
|
|
6408
|
+
const border = state.selectProps.hasError ? "0.5px solid var(--dangerous-500)" : state.isFocused ? "0.5px solid var(--blue-500)" : "0.5px solid var(--stroke)";
|
|
6380
6409
|
return {
|
|
6381
6410
|
...provided,
|
|
6382
6411
|
cursor: "pointer",
|
|
6383
6412
|
paddingTop: state.selectProps.hasLabel ? "18px" : "0px",
|
|
6384
6413
|
border: state.isDisabled ? "0.5px solid var(--input-border-disabled, var(--stroke))" : border,
|
|
6385
|
-
|
|
6414
|
+
// Focus ring padrao (card 96332): 1.5px na cor secondary desenhados SOBRE o contorno do
|
|
6415
|
+
// campo — a borda fica azul e o inset box-shadow completa a espessura. O spread do
|
|
6416
|
+
// box-shadow e o unico jeito de chegar em 1.5px de fato: o Chromium arredonda
|
|
6417
|
+
// border-width/outline-width pra px inteiro, entao 1.5px pinta 1px, igual ao default de
|
|
6418
|
+
// 0.5px. Nada disso entra no box model, entao a altura do control nao muda — e o anel
|
|
6419
|
+
// fica por dentro do campo, sem o anel "extra" por fora que o box-shadow duplo criava.
|
|
6420
|
+
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)",
|
|
6386
6421
|
outline: "none",
|
|
6387
6422
|
borderRadius: "0.5rem",
|
|
6388
6423
|
backgroundColor: "var(--surface)",
|
|
@@ -6499,7 +6534,7 @@ var InputTag = ({
|
|
|
6499
6534
|
"span",
|
|
6500
6535
|
{
|
|
6501
6536
|
className: clsx9__default.default("text-label text-sm left-2.5", {
|
|
6502
|
-
[" scale-75 -translate-y-
|
|
6537
|
+
[" scale-75 -translate-y-[10px] "]: field.value && field.value.length > 0,
|
|
6503
6538
|
["text-dangerous-500"]: hasError.hasError
|
|
6504
6539
|
}),
|
|
6505
6540
|
children: [
|
|
@@ -6573,12 +6608,18 @@ var customStyles5 = {
|
|
|
6573
6608
|
display: "flex"
|
|
6574
6609
|
}),
|
|
6575
6610
|
control: (provided, state) => {
|
|
6576
|
-
const border = state.isDisabled ? "0.5px solid var(--input-border-disabled)" : state.selectProps.hasError ? "0.5px solid var(--dangerous-500)" : state.
|
|
6611
|
+
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)";
|
|
6577
6612
|
return {
|
|
6578
6613
|
...provided,
|
|
6579
6614
|
cursor: "pointer",
|
|
6580
6615
|
border,
|
|
6581
|
-
|
|
6616
|
+
// Focus ring padrao (card 96332): 1.5px na cor secondary desenhados SOBRE o contorno do
|
|
6617
|
+
// campo — a borda fica azul e o inset box-shadow completa a espessura. O spread do
|
|
6618
|
+
// box-shadow e o unico jeito de chegar em 1.5px de fato: o Chromium arredonda
|
|
6619
|
+
// border-width/outline-width pra px inteiro, entao 1.5px pinta 1px, igual ao default de
|
|
6620
|
+
// 0.5px. Nada disso entra no box model, entao a altura do control nao muda — e o anel
|
|
6621
|
+
// fica por dentro do campo, sem o anel "extra" por fora que o box-shadow duplo criava.
|
|
6622
|
+
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)",
|
|
6582
6623
|
outline: "none",
|
|
6583
6624
|
borderRadius: "0.5rem",
|
|
6584
6625
|
paddingLeft: "8px",
|
|
@@ -7315,8 +7356,8 @@ var TextArea = ({
|
|
|
7315
7356
|
const fieldValidationMessages = [error == null ? void 0 : error.message];
|
|
7316
7357
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
7317
7358
|
const styles = {
|
|
7318
|
-
input: `border-[0.5px] rounded-lg block pb-[10px] pt-[18px] w-full bg-surface disabled:bg-neutral-100 disabled:shadow-none
|
|
7319
|
-
label: `cursor-text absolute text-label top-[0.70rem] z-10 transform origin-[0] -translate-y-
|
|
7359
|
+
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"}`,
|
|
7360
|
+
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`
|
|
7320
7361
|
};
|
|
7321
7362
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7322
7363
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative outline-none", children: [
|
|
@@ -7462,11 +7503,11 @@ function ControlledInput({
|
|
|
7462
7503
|
const fieldValidationMessages = [error == null ? void 0 : error.message];
|
|
7463
7504
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
7464
7505
|
const styles = {
|
|
7465
|
-
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
|
|
7506
|
+
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]"}
|
|
7466
7507
|
${!hasError ? "border-stroke" : ""}`,
|
|
7467
7508
|
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"}`,
|
|
7468
7509
|
rightIcon: "absolute h-[44px] top-[1px] right-[1.5px] w-[38px] text-[22px]",
|
|
7469
|
-
label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-
|
|
7510
|
+
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",
|
|
7470
7511
|
clear: `absolute top-[7px] cursor-pointer text-label text-[22px] ${searchOnClick ? "right-[46px]" : "right-[8px]"}`,
|
|
7471
7512
|
error: "border-dangerous-500 text-dangerous-500"
|
|
7472
7513
|
};
|