@lets-events/react 12.11.5 → 12.11.6
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
- package/src/components/FormFields/SelectFormField.tsx +6 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @lets-events/react@12.11.
|
|
3
|
+
> @lets-events/react@12.11.6 build
|
|
4
4
|
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
5
5
|
|
|
6
6
|
[1G[0K[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
[34mCLI[39m Target: es6
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m439.74 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 354ms
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m423.59 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 355ms
|
|
17
17
|
DTS Build start
|
|
18
|
-
DTS ⚡️ Build success in
|
|
19
|
-
DTS dist/index.d.mts 411.
|
|
20
|
-
DTS dist/index.d.ts 411.
|
|
18
|
+
DTS ⚡️ Build success in 7026ms
|
|
19
|
+
DTS dist/index.d.mts 411.35 KB
|
|
20
|
+
DTS dist/index.d.ts 411.35 KB
|
|
21
21
|
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -15468,8 +15468,9 @@ type CountryFormFieldProps = {
|
|
|
15468
15468
|
declare function CountryFormField({ name, label, required, language, }: CountryFormFieldProps): react_jsx_runtime.JSX.Element;
|
|
15469
15469
|
|
|
15470
15470
|
type Option = {
|
|
15471
|
-
label: string;
|
|
15471
|
+
label: string | React.ReactNode;
|
|
15472
15472
|
value: string;
|
|
15473
|
+
selectedLabel?: string;
|
|
15473
15474
|
};
|
|
15474
15475
|
type SelectFormFieldProps = {
|
|
15475
15476
|
name: string;
|
|
@@ -15485,8 +15486,9 @@ type SelectFormFieldProps = {
|
|
|
15485
15486
|
};
|
|
15486
15487
|
validationErrorMessage?: string;
|
|
15487
15488
|
defaultValue?: string;
|
|
15489
|
+
placeholderTypography?: "labelExtraSmall" | "labelSmall" | "labelMedium" | "labelLarge";
|
|
15488
15490
|
};
|
|
15489
|
-
declare const SelectFormField: ({ name, label, required, placeholder, options, showMoreButton, showMoreButtonLabel, showMoreButtonOnClick, validation, validationErrorMessage, defaultValue, }: SelectFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15491
|
+
declare const SelectFormField: ({ name, label, required, placeholder, options, showMoreButton, showMoreButtonLabel, showMoreButtonOnClick, validation, validationErrorMessage, defaultValue, placeholderTypography, }: SelectFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15490
15492
|
|
|
15491
15493
|
type SwitchFormFieldProps = {
|
|
15492
15494
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -15468,8 +15468,9 @@ type CountryFormFieldProps = {
|
|
|
15468
15468
|
declare function CountryFormField({ name, label, required, language, }: CountryFormFieldProps): react_jsx_runtime.JSX.Element;
|
|
15469
15469
|
|
|
15470
15470
|
type Option = {
|
|
15471
|
-
label: string;
|
|
15471
|
+
label: string | React.ReactNode;
|
|
15472
15472
|
value: string;
|
|
15473
|
+
selectedLabel?: string;
|
|
15473
15474
|
};
|
|
15474
15475
|
type SelectFormFieldProps = {
|
|
15475
15476
|
name: string;
|
|
@@ -15485,8 +15486,9 @@ type SelectFormFieldProps = {
|
|
|
15485
15486
|
};
|
|
15486
15487
|
validationErrorMessage?: string;
|
|
15487
15488
|
defaultValue?: string;
|
|
15489
|
+
placeholderTypography?: "labelExtraSmall" | "labelSmall" | "labelMedium" | "labelLarge";
|
|
15488
15490
|
};
|
|
15489
|
-
declare const SelectFormField: ({ name, label, required, placeholder, options, showMoreButton, showMoreButtonLabel, showMoreButtonOnClick, validation, validationErrorMessage, defaultValue, }: SelectFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15491
|
+
declare const SelectFormField: ({ name, label, required, placeholder, options, showMoreButton, showMoreButtonLabel, showMoreButtonOnClick, validation, validationErrorMessage, defaultValue, placeholderTypography, }: SelectFormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
15490
15492
|
|
|
15491
15493
|
type SwitchFormFieldProps = {
|
|
15492
15494
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -11508,7 +11508,8 @@ var SelectFormField = ({
|
|
|
11508
11508
|
showMoreButtonOnClick,
|
|
11509
11509
|
validation,
|
|
11510
11510
|
validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
|
|
11511
|
-
defaultValue
|
|
11511
|
+
defaultValue,
|
|
11512
|
+
placeholderTypography = "labelLarge"
|
|
11512
11513
|
}) => {
|
|
11513
11514
|
const {
|
|
11514
11515
|
control,
|
|
@@ -11542,9 +11543,9 @@ var SelectFormField = ({
|
|
|
11542
11543
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
11543
11544
|
DropdownMenu2,
|
|
11544
11545
|
{
|
|
11545
|
-
placeholder: (selectedOption == null ? void 0 : selectedOption.
|
|
11546
|
+
placeholder: (selectedOption == null ? void 0 : selectedOption.selectedLabel) || placeholder,
|
|
11547
|
+
typography: placeholderTypography,
|
|
11546
11548
|
fontWeight: "regular",
|
|
11547
|
-
typography: "labelLarge",
|
|
11548
11549
|
color: haveError ? "error" : "default",
|
|
11549
11550
|
children: [
|
|
11550
11551
|
options.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
package/dist/index.mjs
CHANGED
|
@@ -11400,7 +11400,8 @@ var SelectFormField = ({
|
|
|
11400
11400
|
showMoreButtonOnClick,
|
|
11401
11401
|
validation,
|
|
11402
11402
|
validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
|
|
11403
|
-
defaultValue
|
|
11403
|
+
defaultValue,
|
|
11404
|
+
placeholderTypography = "labelLarge"
|
|
11404
11405
|
}) => {
|
|
11405
11406
|
const {
|
|
11406
11407
|
control,
|
|
@@ -11434,9 +11435,9 @@ var SelectFormField = ({
|
|
|
11434
11435
|
return /* @__PURE__ */ jsxs24(
|
|
11435
11436
|
DropdownMenu2,
|
|
11436
11437
|
{
|
|
11437
|
-
placeholder: (selectedOption == null ? void 0 : selectedOption.
|
|
11438
|
+
placeholder: (selectedOption == null ? void 0 : selectedOption.selectedLabel) || placeholder,
|
|
11439
|
+
typography: placeholderTypography,
|
|
11438
11440
|
fontWeight: "regular",
|
|
11439
|
-
typography: "labelLarge",
|
|
11440
11441
|
color: haveError ? "error" : "default",
|
|
11441
11442
|
children: [
|
|
11442
11443
|
options.map((option, index) => /* @__PURE__ */ jsx43(
|
package/package.json
CHANGED
|
@@ -7,8 +7,9 @@ import { getNestedValue } from "../../utils/getNestedValue";
|
|
|
7
7
|
import { Button } from "../Button";
|
|
8
8
|
|
|
9
9
|
type Option = {
|
|
10
|
-
label: string;
|
|
10
|
+
label: string | React.ReactNode;
|
|
11
11
|
value: string;
|
|
12
|
+
selectedLabel?: string;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
export type SelectFormFieldProps = {
|
|
@@ -25,6 +26,7 @@ export type SelectFormFieldProps = {
|
|
|
25
26
|
};
|
|
26
27
|
validationErrorMessage?: string;
|
|
27
28
|
defaultValue?: string;
|
|
29
|
+
placeholderTypography?: "labelExtraSmall" | "labelSmall" | "labelMedium" | "labelLarge";
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
export const SelectFormField = ({
|
|
@@ -39,6 +41,7 @@ export const SelectFormField = ({
|
|
|
39
41
|
validation,
|
|
40
42
|
validationErrorMessage = "Este campo é obrigatório.",
|
|
41
43
|
defaultValue,
|
|
44
|
+
placeholderTypography = "labelLarge",
|
|
42
45
|
}: SelectFormFieldProps) => {
|
|
43
46
|
const {
|
|
44
47
|
control,
|
|
@@ -70,12 +73,11 @@ export const SelectFormField = ({
|
|
|
70
73
|
defaultValue={defaultValue || ""}
|
|
71
74
|
render={({ field: { value, onChange } }) => {
|
|
72
75
|
const selectedOption = options.find((opt) => opt.value === value);
|
|
73
|
-
|
|
74
76
|
return (
|
|
75
77
|
<DropdownMenu
|
|
76
|
-
placeholder={selectedOption?.
|
|
78
|
+
placeholder={selectedOption?.selectedLabel || placeholder}
|
|
79
|
+
typography={placeholderTypography}
|
|
77
80
|
fontWeight="regular"
|
|
78
|
-
typography="labelLarge"
|
|
79
81
|
color={haveError ? "error" : "default"}
|
|
80
82
|
>
|
|
81
83
|
{options.map((option, index) => (
|