@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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- > @lets-events/react@12.11.5 build
3
+ > @lets-events/react@12.11.6 build
4
4
  > tsup src/index.tsx --format esm,cjs --dts --external react
5
5
 
6
6
  CLI Building entry: src/index.tsx
@@ -10,12 +10,12 @@
10
10
  CLI Target: es6
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.mjs 423.54 KB
14
- ESM ⚡️ Build success in -258293ms
15
- CJS dist/index.js 439.68 KB
16
- CJS ⚡️ Build success in -258292ms
13
+ CJS dist/index.js 439.74 KB
14
+ CJS ⚡️ Build success in 354ms
15
+ ESM dist/index.mjs 423.59 KB
16
+ ESM ⚡️ Build success in 355ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 7027ms
19
- DTS dist/index.d.mts 411.19 KB
20
- DTS dist/index.d.ts 411.19 KB
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
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.11.6
4
+
5
+ ### Patch Changes
6
+
7
+ - SelectFormField placeholder
8
+
3
9
  ## 12.11.5
4
10
 
5
11
  ### Patch Changes
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.label) || placeholder,
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.label) || placeholder,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "12.11.5",
3
+ "version": "12.11.6",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -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?.label || placeholder}
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) => (