@mieweb/ui 0.8.0-dev.20 → 0.8.0-dev.21

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.d.cts CHANGED
@@ -4203,14 +4203,19 @@ type CountryDropdownProps = CountryCodeDropdownProps;
4203
4203
  * dial codes. The trigger shows the flag and country name; the dropdown
4204
4204
  * lists flag + name only.
4205
4205
  *
4206
+ * Unlike `CountryCodeDropdown`, nothing is selected by default: the trigger
4207
+ * shows `placeholder` until the user picks a country. Pass `defaultValue`
4208
+ * (uncontrolled) or `value` (controlled) to start with a country selected;
4209
+ * pass `value=""` for a controlled empty state.
4210
+ *
4206
4211
  * @example
4207
4212
  * ```tsx
4208
4213
  * const [country, setCountry] = useState<CountryData>();
4209
4214
  *
4210
- * <CountryDropdown value={country?.code} onChange={setCountry} />
4215
+ * <CountryDropdown value={country?.code ?? ''} onChange={setCountry} />
4211
4216
  * ```
4212
4217
  */
4213
- declare function CountryDropdown({ 'aria-label': ariaLabel, ...props }: CountryDropdownProps): react_jsx_runtime.JSX.Element;
4218
+ declare function CountryDropdown({ 'aria-label': ariaLabel, defaultValue, ...props }: CountryDropdownProps): react_jsx_runtime.JSX.Element;
4214
4219
  declare namespace CountryDropdown {
4215
4220
  var displayName: string;
4216
4221
  }
package/dist/index.d.ts CHANGED
@@ -4203,14 +4203,19 @@ type CountryDropdownProps = CountryCodeDropdownProps;
4203
4203
  * dial codes. The trigger shows the flag and country name; the dropdown
4204
4204
  * lists flag + name only.
4205
4205
  *
4206
+ * Unlike `CountryCodeDropdown`, nothing is selected by default: the trigger
4207
+ * shows `placeholder` until the user picks a country. Pass `defaultValue`
4208
+ * (uncontrolled) or `value` (controlled) to start with a country selected;
4209
+ * pass `value=""` for a controlled empty state.
4210
+ *
4206
4211
  * @example
4207
4212
  * ```tsx
4208
4213
  * const [country, setCountry] = useState<CountryData>();
4209
4214
  *
4210
- * <CountryDropdown value={country?.code} onChange={setCountry} />
4215
+ * <CountryDropdown value={country?.code ?? ''} onChange={setCountry} />
4211
4216
  * ```
4212
4217
  */
4213
- declare function CountryDropdown({ 'aria-label': ariaLabel, ...props }: CountryDropdownProps): react_jsx_runtime.JSX.Element;
4218
+ declare function CountryDropdown({ 'aria-label': ariaLabel, defaultValue, ...props }: CountryDropdownProps): react_jsx_runtime.JSX.Element;
4214
4219
  declare namespace CountryDropdown {
4215
4220
  var displayName: string;
4216
4221
  }
package/dist/index.js CHANGED
@@ -57,8 +57,8 @@ export { Slider, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants }
57
57
  import './chunk-RISZWWEQ.js';
58
58
  export { MediaPlayer, inferMediaKind, mediaPlayerVariants } from './chunk-5WOB4UBD.js';
59
59
  export { CopyButton } from './chunk-5QZ73PZC.js';
60
- import { CountryDropdownBase } from './chunk-CLRWVJOD.js';
61
- export { CountryCodeDropdown, formatE164, validatePhoneNumber } from './chunk-CLRWVJOD.js';
60
+ import { CountryDropdownBase } from './chunk-T5BBZQ66.js';
61
+ export { CountryCodeDropdown, formatE164, validatePhoneNumber } from './chunk-T5BBZQ66.js';
62
62
  export { CustomizableDashboard, DashboardCustomizePanel, consolidateColumns, mergeColumnOrder, moveAcrossColumns, reorderOnDrop, requiredColumns } from './chunk-KRYJJMYN.js';
63
63
  import { Switch, switchThumbVariants, switchTrackVariants } from './chunk-AQ564XO7.js';
64
64
  export { Switch, switchThumbVariants, switchTrackVariants } from './chunk-AQ564XO7.js';
@@ -16091,6 +16091,7 @@ var CountBadge = React13.forwardRef(
16091
16091
  CountBadge.displayName = "CountBadge";
16092
16092
  function CountryDropdown({
16093
16093
  "aria-label": ariaLabel = "Select country",
16094
+ defaultValue = "",
16094
16095
  ...props
16095
16096
  }) {
16096
16097
  return /* @__PURE__ */ jsx(
@@ -16098,6 +16099,7 @@ function CountryDropdown({
16098
16099
  {
16099
16100
  ...props,
16100
16101
  "aria-label": ariaLabel,
16102
+ defaultValue,
16101
16103
  showDialCode: false
16102
16104
  }
16103
16105
  );