@mantine-vue/core 2.4.0 → 3.0.0

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.
Files changed (48) hide show
  1. package/cjs/index.cjs +732 -165
  2. package/cjs/index.cjs.map +1 -1
  3. package/esm/index.mjs +732 -165
  4. package/esm/index.mjs.map +1 -1
  5. package/lib/components/AngleSlider/AngleSlider.d.ts +15 -2
  6. package/lib/components/Autocomplete/Autocomplete.d.ts +3 -1
  7. package/lib/components/Cascader/Cascader.d.ts +2 -1
  8. package/lib/components/Checkbox/Checkbox.d.ts +91 -9
  9. package/lib/components/Checkbox/CheckboxCard/CheckboxCard.d.ts +15 -2
  10. package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +14 -2
  11. package/lib/components/Chip/Chip.d.ts +46 -7
  12. package/lib/components/Chip/ChipGroup/ChipGroup.d.ts +14 -2
  13. package/lib/components/ColorInput/ColorInput.d.ts +2 -1
  14. package/lib/components/ColorPicker/AlphaSlider/AlphaSlider.d.ts +26 -4
  15. package/lib/components/ColorPicker/ColorPicker.d.ts +14 -2
  16. package/lib/components/ColorPicker/ColorSlider/ColorSlider.d.ts +26 -4
  17. package/lib/components/ColorPicker/HueSlider/HueSlider.d.ts +26 -4
  18. package/lib/components/Combobox/Combobox.d.ts +64 -4
  19. package/lib/components/ComboboxPopover/ComboboxPopover.d.ts +45 -7
  20. package/lib/components/FileButton/FileButton.d.ts +17 -4
  21. package/lib/components/FileInput/FileInput.d.ts +14 -2
  22. package/lib/components/Input/Input.d.ts +74 -5
  23. package/lib/components/InputBase/InputBase.d.ts +41 -2
  24. package/lib/components/JsonInput/JsonInput.d.ts +14 -2
  25. package/lib/components/MaskInput/MaskInput.d.ts +45 -2
  26. package/lib/components/Menu/Menu.d.ts +82 -4
  27. package/lib/components/MultiSelect/MultiSelect.d.ts +2 -1
  28. package/lib/components/NativeSelect/NativeSelect.d.ts +19 -6
  29. package/lib/components/NumberInput/NumberInput.d.ts +14 -2
  30. package/lib/components/PasswordInput/PasswordInput.d.ts +41 -2
  31. package/lib/components/PillsInput/PillsInput.d.ts +41 -2
  32. package/lib/components/PillsInput/PillsInputField/PillsInputField.d.ts +41 -2
  33. package/lib/components/PinInput/PinInput.d.ts +15 -2
  34. package/lib/components/Radio/Radio.d.ts +124 -9
  35. package/lib/components/Radio/RadioCard/RadioCard.d.ts +33 -2
  36. package/lib/components/Radio/RadioGroup/RadioGroup.d.ts +14 -2
  37. package/lib/components/Rating/Rating.d.ts +14 -2
  38. package/lib/components/SegmentedControl/SegmentedControl.d.ts +14 -2
  39. package/lib/components/Select/Select.d.ts +3 -2
  40. package/lib/components/Slider/RangeSlider/RangeSlider.d.ts +14 -2
  41. package/lib/components/Slider/Slider/Slider.d.ts +14 -2
  42. package/lib/components/Switch/Switch.d.ts +67 -13
  43. package/lib/components/Switch/SwitchGroup/SwitchGroup.d.ts +15 -3
  44. package/lib/components/TagsInput/TagsInput.d.ts +2 -1
  45. package/lib/components/TextInput/TextInput.d.ts +36 -2
  46. package/lib/components/Textarea/Textarea.d.ts +32 -2
  47. package/lib/components/TreeSelect/TreeSelect.d.ts +3 -2
  48. package/package.json +3 -3
package/esm/index.mjs CHANGED
@@ -3748,6 +3748,10 @@ var AngleSlider = withBoxProps(defineComponent({
3748
3748
  type: Number,
3749
3749
  default: void 0
3750
3750
  },
3751
+ modelValue: {
3752
+ type: Number,
3753
+ default: void 0
3754
+ },
3751
3755
  value: {
3752
3756
  type: Number,
3753
3757
  default: void 0
@@ -3825,14 +3829,18 @@ var AngleSlider = withBoxProps(defineComponent({
3825
3829
  default: false
3826
3830
  }
3827
3831
  },
3828
- setup(rawProps, { attrs }) {
3832
+ emits: ["update:modelValue", "change"],
3833
+ setup(rawProps, { attrs, emit }) {
3829
3834
  const props = useProps("AngleSlider", defaultProps$52, rawProps);
3830
3835
  const rootRef = ref(null);
3831
3836
  const [value, setValue] = useUncontrolled({
3832
- value: () => props.value,
3837
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
3833
3838
  defaultValue: props.defaultValue,
3834
3839
  finalValue: 0,
3835
- onChange: props.onChange
3840
+ onChange: (value) => {
3841
+ emit("update:modelValue", value);
3842
+ emit("change", value);
3843
+ }
3836
3844
  });
3837
3845
  const update = (nextValue) => {
3838
3846
  if (!rootRef.value || props.disabled) return;
@@ -11122,9 +11130,17 @@ var FileButton = defineComponent({
11122
11130
  name: "FileButton",
11123
11131
  inheritAttrs: false,
11124
11132
  props: {
11133
+ modelValue: {
11134
+ type: [
11135
+ Object,
11136
+ Array,
11137
+ null
11138
+ ],
11139
+ default: void 0
11140
+ },
11125
11141
  onChange: {
11126
11142
  type: Function,
11127
- required: true
11143
+ default: void 0
11128
11144
  },
11129
11145
  multiple: {
11130
11146
  type: Boolean,
@@ -11163,7 +11179,8 @@ var FileButton = defineComponent({
11163
11179
  default: void 0
11164
11180
  }
11165
11181
  },
11166
- setup(props, { attrs, slots }) {
11182
+ emits: ["update:modelValue", "change"],
11183
+ setup(props, { attrs, slots, emit }) {
11167
11184
  const inputRef = ref(null);
11168
11185
  const reset = () => {
11169
11186
  if (inputRef.value) inputRef.value.value = "";
@@ -11188,10 +11205,14 @@ var FileButton = defineComponent({
11188
11205
  onChange: (event) => {
11189
11206
  const files = event.currentTarget.files;
11190
11207
  if (files === null) {
11191
- props.onChange(props.multiple ? [] : null);
11208
+ const nextValue = props.multiple ? [] : null;
11209
+ emit("update:modelValue", nextValue);
11210
+ emit("change", nextValue);
11192
11211
  return;
11193
11212
  }
11194
- props.onChange(props.multiple ? Array.from(files) : files[0] || null);
11213
+ const nextValue = props.multiple ? Array.from(files) : files[0] || null;
11214
+ emit("update:modelValue", nextValue);
11215
+ emit("change", nextValue);
11195
11216
  }
11196
11217
  }), slots.default?.({
11197
11218
  onClick,
@@ -11832,6 +11853,22 @@ var InputBase$1 = defineComponent({
11832
11853
  ],
11833
11854
  default: "input"
11834
11855
  },
11856
+ modelValue: {
11857
+ type: null,
11858
+ default: void 0
11859
+ },
11860
+ value: {
11861
+ type: null,
11862
+ default: void 0
11863
+ },
11864
+ defaultValue: {
11865
+ type: null,
11866
+ default: void 0
11867
+ },
11868
+ onChange: {
11869
+ type: Function,
11870
+ default: void 0
11871
+ },
11835
11872
  __staticSelector: {
11836
11873
  type: String,
11837
11874
  default: void 0
@@ -12001,7 +12038,21 @@ var InputBase$1 = defineComponent({
12001
12038
  default: false
12002
12039
  }
12003
12040
  },
12004
- setup(props, { attrs, slots }) {
12041
+ emits: ["update:modelValue", "change"],
12042
+ setup(props, { attrs, slots, emit }) {
12043
+ const [value, setValue] = useUncontrolled({
12044
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
12045
+ defaultValue: props.defaultValue,
12046
+ finalValue: void 0,
12047
+ onChange: (nextValue) => {
12048
+ emit("update:modelValue", nextValue);
12049
+ emit("change", nextValue);
12050
+ }
12051
+ });
12052
+ const callHandler = (handler, event) => {
12053
+ if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
12054
+ else if (typeof handler === "function") handler(event);
12055
+ };
12005
12056
  const wrapperCtx = useInputWrapperContext();
12006
12057
  const stylesCtx = reactive({
12007
12058
  offsetBottom: false,
@@ -12071,6 +12122,14 @@ var InputBase$1 = defineComponent({
12071
12122
  h(Box, {
12072
12123
  ...attrs,
12073
12124
  ...ariaAttributes,
12125
+ value: props.component === "button" || props.component === "div" ? void 0 : value.value,
12126
+ onInput: (event) => {
12127
+ callHandler(attrs.onInput, event);
12128
+ if (props.component !== "select") setValue(event.currentTarget.value);
12129
+ },
12130
+ onChange: (event) => {
12131
+ if (props.component === "select") setValue(event.currentTarget.value);
12132
+ },
12074
12133
  component: props.component,
12075
12134
  required: props.required,
12076
12135
  disabled: props.disabled,
@@ -12126,6 +12185,22 @@ var InputBase = withBoxProps(defineComponent({
12126
12185
  ],
12127
12186
  default: "input"
12128
12187
  },
12188
+ modelValue: {
12189
+ type: null,
12190
+ default: void 0
12191
+ },
12192
+ value: {
12193
+ type: null,
12194
+ default: void 0
12195
+ },
12196
+ defaultValue: {
12197
+ type: null,
12198
+ default: void 0
12199
+ },
12200
+ onChange: {
12201
+ type: Function,
12202
+ default: void 0
12203
+ },
12129
12204
  __staticSelector: {
12130
12205
  type: String,
12131
12206
  default: "InputBase"
@@ -12331,7 +12406,17 @@ var InputBase = withBoxProps(defineComponent({
12331
12406
  default: void 0
12332
12407
  }
12333
12408
  },
12334
- setup(props, { attrs, slots }) {
12409
+ emits: ["update:modelValue", "change"],
12410
+ setup(props, { attrs, slots, emit }) {
12411
+ const [value, setValue] = useUncontrolled({
12412
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
12413
+ defaultValue: props.defaultValue,
12414
+ finalValue: void 0,
12415
+ onChange: (nextValue) => {
12416
+ emit("update:modelValue", nextValue);
12417
+ emit("change", nextValue);
12418
+ }
12419
+ });
12335
12420
  return () => h(Input.Wrapper, {
12336
12421
  ...props.wrapperProps,
12337
12422
  id: props.id,
@@ -12359,6 +12444,8 @@ var InputBase = withBoxProps(defineComponent({
12359
12444
  error: slots.error,
12360
12445
  default: () => h(Input, {
12361
12446
  ...attrs,
12447
+ modelValue: value.value,
12448
+ "onUpdate:modelValue": setValue,
12362
12449
  component: props.component,
12363
12450
  __staticSelector: props.__staticSelector,
12364
12451
  __stylesApiProps: props.__stylesApiProps ?? props,
@@ -12422,6 +12509,14 @@ var FileInput = defineComponent({
12422
12509
  type: String,
12423
12510
  default: "button"
12424
12511
  },
12512
+ modelValue: {
12513
+ type: [
12514
+ Object,
12515
+ Array,
12516
+ null
12517
+ ],
12518
+ default: void 0
12519
+ },
12425
12520
  onChange: {
12426
12521
  type: Function,
12427
12522
  default: void 0
@@ -12543,13 +12638,17 @@ var FileInput = defineComponent({
12543
12638
  default: false
12544
12639
  }
12545
12640
  },
12546
- setup(props, { attrs, slots }) {
12641
+ emits: ["update:modelValue", "change"],
12642
+ setup(props, { attrs, slots, emit }) {
12547
12643
  const resetRef = ref(null);
12548
12644
  const [value, setValue] = useUncontrolled({
12549
- value: () => props.value,
12645
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
12550
12646
  defaultValue: props.defaultValue,
12551
12647
  finalValue: props.multiple ? [] : null,
12552
- onChange: (nextValue) => props.onChange?.(nextValue)
12648
+ onChange: (nextValue) => {
12649
+ emit("update:modelValue", nextValue);
12650
+ emit("change", nextValue);
12651
+ }
12553
12652
  });
12554
12653
  const hasValue = computed(() => Array.isArray(value.value) ? value.value.length !== 0 : value.value !== null);
12555
12654
  const reset = () => {
@@ -13009,6 +13108,14 @@ var NumberInput = defineComponent({
13009
13108
  inheritAttrs: false,
13010
13109
  slots: Object,
13011
13110
  props: {
13111
+ modelValue: {
13112
+ type: [
13113
+ String,
13114
+ Number,
13115
+ BigInt
13116
+ ],
13117
+ default: void 0
13118
+ },
13012
13119
  value: {
13013
13120
  type: [
13014
13121
  String,
@@ -13198,15 +13305,19 @@ var NumberInput = defineComponent({
13198
13305
  default: false
13199
13306
  }
13200
13307
  },
13201
- setup(props, { attrs, slots }) {
13308
+ emits: ["update:modelValue", "change"],
13309
+ setup(props, { attrs, slots, emit }) {
13202
13310
  const inputRef = ref(null);
13203
13311
  const isEditing = ref(false);
13204
- const isBigIntMode = computed(() => typeof props.value === "bigint" || typeof props.defaultValue === "bigint");
13312
+ const isBigIntMode = computed(() => typeof props.modelValue === "bigint" || typeof props.value === "bigint" || typeof props.defaultValue === "bigint");
13205
13313
  const [value, setValue] = useUncontrolled({
13206
- value: () => props.value,
13314
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
13207
13315
  defaultValue: props.defaultValue,
13208
13316
  finalValue: "",
13209
- onChange: (nextValue) => props.onChange?.(nextValue)
13317
+ onChange: (nextValue) => {
13318
+ emit("update:modelValue", nextValue);
13319
+ emit("change", nextValue);
13320
+ }
13210
13321
  });
13211
13322
  const getStyles = useStyles({
13212
13323
  name: "NumberInput",
@@ -13603,6 +13714,10 @@ var PinInput = withBoxProps(defineComponent({
13603
13714
  type: Boolean,
13604
13715
  default: false
13605
13716
  },
13717
+ modelValue: {
13718
+ type: String,
13719
+ default: void 0
13720
+ },
13606
13721
  value: {
13607
13722
  type: String,
13608
13723
  default: void 0
@@ -13708,7 +13823,8 @@ var PinInput = withBoxProps(defineComponent({
13708
13823
  default: false
13709
13824
  }
13710
13825
  },
13711
- setup(rawProps, { attrs }) {
13826
+ emits: ["update:modelValue", "change"],
13827
+ setup(rawProps, { attrs, emit }) {
13712
13828
  const props = useProps("PinInput", defaultProps$21, rawProps);
13713
13829
  const uuid = useId(props.id);
13714
13830
  const focusedIndex = ref(-1);
@@ -13728,12 +13844,13 @@ var PinInput = withBoxProps(defineComponent({
13728
13844
  varsResolver: varsResolver$38
13729
13845
  });
13730
13846
  const [value, setValue] = useUncontrolled({
13731
- value: () => props.value !== void 0 ? createPinArray(currentLength.value, props.value) : void 0,
13847
+ value: () => props.modelValue !== void 0 || props.value !== void 0 ? createPinArray(currentLength.value, props.modelValue ?? props.value ?? "") : void 0,
13732
13848
  defaultValue: props.defaultValue?.split("").slice(0, currentLength.value),
13733
13849
  finalValue: createPinArray(currentLength.value, ""),
13734
13850
  onChange: (nextValue) => {
13735
13851
  const stringValue = nextValue.join("").trim();
13736
- props.onChange?.(stringValue);
13852
+ emit("update:modelValue", stringValue);
13853
+ emit("change", stringValue);
13737
13854
  if (stringValue.length === currentLength.value && !completed.value) {
13738
13855
  completed.value = true;
13739
13856
  props.onComplete?.(stringValue);
@@ -13867,7 +13984,6 @@ var PinInput = withBoxProps(defineComponent({
13867
13984
  id: `${uuid.value}-${index + 1}`,
13868
13985
  inputMode: props.inputMode || (props.type === "number" ? "numeric" : "text"),
13869
13986
  onInput: (event) => handleInput(event, index),
13870
- onChange: (event) => handleInput(event, index),
13871
13987
  onKeydown: (event) => handleKeyDown(event, index),
13872
13988
  onFocus: (event) => {
13873
13989
  event.target.select();
@@ -14033,6 +14149,10 @@ var NativeSelect = defineComponent({
14033
14149
  type: String,
14034
14150
  default: void 0
14035
14151
  },
14152
+ modelValue: {
14153
+ type: String,
14154
+ default: void 0
14155
+ },
14036
14156
  value: {
14037
14157
  type: String,
14038
14158
  default: void 0
@@ -14070,7 +14190,8 @@ var NativeSelect = defineComponent({
14070
14190
  default: false
14071
14191
  }
14072
14192
  },
14073
- setup(rawProps, { attrs, slots }) {
14193
+ emits: ["update:modelValue", "change"],
14194
+ setup(rawProps, { attrs, slots, emit }) {
14074
14195
  const props = useProps("NativeSelect", defaultProps$20, rawProps);
14075
14196
  return () => {
14076
14197
  const parsedOptions = getParsedNativeSelectData(props.data).map((item, index) => h(NativeSelectOption, {
@@ -14094,9 +14215,11 @@ var NativeSelect = defineComponent({
14094
14215
  id: props.id,
14095
14216
  name: props.name,
14096
14217
  form: props.form,
14097
- ...props.value !== void 0 ? { value: props.value } : null,
14098
- ...props.defaultValue !== void 0 ? { value: props.defaultValue } : null,
14099
- onChange: props.onChange,
14218
+ modelValue: props.modelValue,
14219
+ value: props.value,
14220
+ defaultValue: props.defaultValue,
14221
+ "onUpdate:modelValue": (value) => emit("update:modelValue", value),
14222
+ onChange: (value) => emit("change", value),
14100
14223
  variant: props.variant,
14101
14224
  radius: props.radius,
14102
14225
  classNames: props.classNames,
@@ -14144,7 +14267,7 @@ var varsResolver$37 = createVarsResolver((theme, { variant, color, childrenOffse
14144
14267
  function renderContent(content) {
14145
14268
  return typeof content === "function" ? content() : content;
14146
14269
  }
14147
- function callHandler$8(handler, event) {
14270
+ function callHandler$5(handler, event) {
14148
14271
  if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
14149
14272
  else handler?.(event);
14150
14273
  }
@@ -14297,11 +14420,11 @@ var NavLink = withBoxProps(defineComponent({
14297
14420
  expanded: opened.value
14298
14421
  }, props.mod],
14299
14422
  onClick: (event) => {
14300
- callHandler$8(attrs.onClick, event);
14423
+ callHandler$5(attrs.onClick, event);
14301
14424
  toggle(event);
14302
14425
  },
14303
14426
  onKeydown: (event) => {
14304
- callHandler$8(attrs.onKeydown ?? attrs.onKeyDown, event);
14427
+ callHandler$5(attrs.onKeydown ?? attrs.onKeyDown, event);
14305
14428
  if (event.code === "Space" && withChildren) toggle(event);
14306
14429
  }
14307
14430
  }, () => [
@@ -14866,6 +14989,10 @@ var Rating = withBoxProps(defineComponent({
14866
14989
  inheritAttrs: false,
14867
14990
  slots: Object,
14868
14991
  props: {
14992
+ modelValue: {
14993
+ type: Number,
14994
+ default: void 0
14995
+ },
14869
14996
  defaultValue: {
14870
14997
  type: Number,
14871
14998
  default: void 0
@@ -14947,7 +15074,8 @@ var Rating = withBoxProps(defineComponent({
14947
15074
  default: false
14948
15075
  }
14949
15076
  },
14950
- setup(rawProps, { attrs, slots }) {
15077
+ emits: ["update:modelValue", "change"],
15078
+ setup(rawProps, { attrs, slots, emit }) {
14951
15079
  const props = useProps("Rating", defaultProps$16, rawProps);
14952
15080
  const rootRef = ref(null);
14953
15081
  const hovered = ref(-1);
@@ -14956,10 +15084,13 @@ var Rating = withBoxProps(defineComponent({
14956
15084
  const name = useId(props.name);
14957
15085
  const id = useId(props.id);
14958
15086
  const [currentValue, setCurrentValue] = useUncontrolled({
14959
- value: () => props.value,
15087
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
14960
15088
  defaultValue: props.defaultValue,
14961
15089
  finalValue: 0,
14962
- onChange: (value) => props.onChange?.(value)
15090
+ onChange: (value) => {
15091
+ emit("update:modelValue", value);
15092
+ emit("change", value);
15093
+ }
14963
15094
  });
14964
15095
  const getStyles = useStyles({
14965
15096
  name: "Rating",
@@ -15296,6 +15427,14 @@ var SegmentedControl = defineComponent({
15296
15427
  type: Array,
15297
15428
  required: true
15298
15429
  },
15430
+ modelValue: {
15431
+ type: [
15432
+ String,
15433
+ Number,
15434
+ Boolean
15435
+ ],
15436
+ default: void 0
15437
+ },
15299
15438
  value: {
15300
15439
  type: [
15301
15440
  String,
@@ -15389,7 +15528,8 @@ var SegmentedControl = defineComponent({
15389
15528
  default: false
15390
15529
  }
15391
15530
  },
15392
- setup(props, { attrs }) {
15531
+ emits: ["update:modelValue", "change"],
15532
+ setup(props, { attrs, emit }) {
15393
15533
  const theme = useMantineTheme();
15394
15534
  const uuid = useId(props.name);
15395
15535
  const mounted = useMounted();
@@ -15397,10 +15537,13 @@ var SegmentedControl = defineComponent({
15397
15537
  const itemRefs = reactive({});
15398
15538
  const normalizedData = computed(() => normalizeData(props.data));
15399
15539
  const [value, setValue] = useUncontrolled({
15400
- value: () => props.value,
15540
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
15401
15541
  defaultValue: props.defaultValue,
15402
15542
  finalValue: normalizedData.value.find((item) => !item.disabled)?.value ?? normalizedData.value[0]?.value,
15403
- onChange: (nextValue) => props.onChange?.(nextValue)
15543
+ onChange: (nextValue) => {
15544
+ emit("update:modelValue", nextValue);
15545
+ emit("change", nextValue);
15546
+ }
15404
15547
  });
15405
15548
  const getStyles = useStyles({
15406
15549
  name: "SegmentedControl",
@@ -16670,6 +16813,18 @@ var Textarea = defineComponent({
16670
16813
  inheritAttrs: false,
16671
16814
  slots: Object,
16672
16815
  props: {
16816
+ modelValue: {
16817
+ type: String,
16818
+ default: void 0
16819
+ },
16820
+ value: {
16821
+ type: String,
16822
+ default: void 0
16823
+ },
16824
+ defaultValue: {
16825
+ type: String,
16826
+ default: void 0
16827
+ },
16673
16828
  autosize: {
16674
16829
  type: Boolean,
16675
16830
  default: false
@@ -16704,7 +16859,8 @@ var Textarea = defineComponent({
16704
16859
  default: void 0
16705
16860
  }
16706
16861
  },
16707
- setup(props, { attrs, slots }) {
16862
+ emits: ["update:modelValue", "change"],
16863
+ setup(props, { attrs, slots, emit }) {
16708
16864
  return () => {
16709
16865
  const shouldAutosize = props.autosize;
16710
16866
  const autosizeProps = shouldAutosize ? {
@@ -16713,6 +16869,11 @@ var Textarea = defineComponent({
16713
16869
  } : { rows: props.minRows };
16714
16870
  return h(InputBase, {
16715
16871
  ...attrs,
16872
+ modelValue: props.modelValue,
16873
+ value: props.value,
16874
+ defaultValue: props.defaultValue,
16875
+ "onUpdate:modelValue": (value) => emit("update:modelValue", value),
16876
+ onChange: (value) => emit("change", value),
16716
16877
  component: shouldAutosize ? TextareaAutosize : "textarea",
16717
16878
  __staticSelector: props.__staticSelector || "Textarea",
16718
16879
  multiline: true,
@@ -16739,7 +16900,7 @@ function validateJson(value, deserialize) {
16739
16900
  }
16740
16901
  //#endregion
16741
16902
  //#region src/components/JsonInput/JsonInput.ts
16742
- function callHandler$7(handler, event) {
16903
+ function callHandler$4(handler, event) {
16743
16904
  if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
16744
16905
  else handler?.(event);
16745
16906
  }
@@ -16747,6 +16908,10 @@ var JsonInput = defineComponent({
16747
16908
  name: "JsonInput",
16748
16909
  inheritAttrs: false,
16749
16910
  props: {
16911
+ modelValue: {
16912
+ type: String,
16913
+ default: void 0
16914
+ },
16750
16915
  value: {
16751
16916
  type: String,
16752
16917
  default: void 0
@@ -16800,12 +16965,16 @@ var JsonInput = defineComponent({
16800
16965
  default: void 0
16801
16966
  }
16802
16967
  },
16803
- setup(props, { attrs, slots }) {
16968
+ emits: ["update:modelValue", "change"],
16969
+ setup(props, { attrs, slots, emit }) {
16804
16970
  const [value, setValue] = useUncontrolled({
16805
- value: () => props.value,
16971
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
16806
16972
  defaultValue: props.defaultValue,
16807
16973
  finalValue: "",
16808
- onChange: (nextValue) => props.onChange?.(nextValue)
16974
+ onChange: (nextValue) => {
16975
+ emit("update:modelValue", nextValue);
16976
+ emit("change", nextValue);
16977
+ }
16809
16978
  });
16810
16979
  const valid = ref(validateJson(value.value, props.deserialize));
16811
16980
  return () => h(Textarea, {
@@ -16817,15 +16986,15 @@ var JsonInput = defineComponent({
16817
16986
  error: valid.value ? props.error : props.validationError || true,
16818
16987
  "data-monospace": true,
16819
16988
  onInput: (event) => {
16820
- callHandler$7(attrs.onInput, event);
16989
+ callHandler$4(attrs.onInput, event);
16821
16990
  setValue(event.currentTarget.value);
16822
16991
  },
16823
16992
  onFocus: (event) => {
16824
- callHandler$7(attrs.onFocus, event);
16993
+ callHandler$4(attrs.onFocus, event);
16825
16994
  valid.value = true;
16826
16995
  },
16827
16996
  onBlur: (event) => {
16828
- callHandler$7(attrs.onBlur, event);
16997
+ callHandler$4(attrs.onBlur, event);
16829
16998
  const target = event.currentTarget;
16830
16999
  const isValid = validateJson(target.value, props.deserialize);
16831
17000
  if (props.formatOnBlur && !props.readOnly && isValid && target.value.trim() !== "") setValue(props.serialize(props.deserialize(target.value), null, props.indentSpaces));
@@ -16840,9 +17009,29 @@ Object.assign(JsonInput, { classes: InputBase.classes });
16840
17009
  var TextInput = defineComponent({
16841
17010
  name: "TextInput",
16842
17011
  inheritAttrs: false,
16843
- setup(_, { attrs, slots }) {
17012
+ props: {
17013
+ modelValue: {
17014
+ type: [String, Number],
17015
+ default: void 0
17016
+ },
17017
+ value: {
17018
+ type: [String, Number],
17019
+ default: void 0
17020
+ },
17021
+ defaultValue: {
17022
+ type: [String, Number],
17023
+ default: void 0
17024
+ }
17025
+ },
17026
+ emits: ["update:modelValue", "change"],
17027
+ setup(props, { attrs, slots, emit }) {
16844
17028
  return () => h(InputBase, {
16845
17029
  ...attrs,
17030
+ modelValue: props.modelValue,
17031
+ value: props.value,
17032
+ defaultValue: props.defaultValue,
17033
+ "onUpdate:modelValue": (value) => emit("update:modelValue", value),
17034
+ onChange: (value) => emit("change", value),
16846
17035
  component: "input",
16847
17036
  __staticSelector: "TextInput",
16848
17037
  __stylesApiProps: attrs
@@ -16934,6 +17123,22 @@ var PasswordInput = defineComponent({
16934
17123
  inheritAttrs: false,
16935
17124
  slots: Object,
16936
17125
  props: {
17126
+ modelValue: {
17127
+ type: String,
17128
+ default: void 0
17129
+ },
17130
+ value: {
17131
+ type: String,
17132
+ default: void 0
17133
+ },
17134
+ defaultValue: {
17135
+ type: String,
17136
+ default: void 0
17137
+ },
17138
+ onChange: {
17139
+ type: Function,
17140
+ default: void 0
17141
+ },
16937
17142
  visibilityToggleIcon: {
16938
17143
  type: [Object, Function],
16939
17144
  default: void 0
@@ -17071,7 +17276,8 @@ var PasswordInput = defineComponent({
17071
17276
  default: false
17072
17277
  }
17073
17278
  },
17074
- setup(props, { attrs, slots }) {
17279
+ emits: ["update:modelValue", "change"],
17280
+ setup(props, { attrs, slots, emit }) {
17075
17281
  const uuid = useId(props.id);
17076
17282
  const fallbackId = ref(`password-input-${Math.random().toString(36).slice(2)}`);
17077
17283
  const [visible, setVisible] = useUncontrolled({
@@ -17080,6 +17286,15 @@ var PasswordInput = defineComponent({
17080
17286
  finalValue: false,
17081
17287
  onChange: (value) => props.onVisibilityChange?.(value)
17082
17288
  });
17289
+ const [value, setValue] = useUncontrolled({
17290
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
17291
+ defaultValue: props.defaultValue,
17292
+ finalValue: "",
17293
+ onChange: (nextValue) => {
17294
+ emit("update:modelValue", nextValue);
17295
+ emit("change", nextValue);
17296
+ }
17297
+ });
17083
17298
  const getStyles = useStyles({
17084
17299
  name: "PasswordInput",
17085
17300
  props,
@@ -17200,6 +17415,7 @@ var PasswordInput = defineComponent({
17200
17415
  default: () => h("input", {
17201
17416
  ...attrs,
17202
17417
  ...getStyles("innerInput"),
17418
+ value: value.value,
17203
17419
  required: props.required,
17204
17420
  "data-invalid": props.error || slots.error ? true : void 0,
17205
17421
  "data-with-left-section": props.leftSection !== void 0 || slots.leftSection ? true : void 0,
@@ -17207,7 +17423,12 @@ var PasswordInput = defineComponent({
17207
17423
  id,
17208
17424
  "aria-describedby": describedBy,
17209
17425
  autocomplete: attrs.autocomplete || "off",
17210
- type: visible.value ? "text" : "password"
17426
+ type: visible.value ? "text" : "password",
17427
+ onInput: (event) => {
17428
+ const handler = attrs.onInput;
17429
+ handler?.(event);
17430
+ setValue(event.currentTarget.value);
17431
+ }
17211
17432
  }),
17212
17433
  leftSection: slots.leftSection,
17213
17434
  rightSection: slots.rightSection
@@ -17453,6 +17674,10 @@ var CheckboxGroup = defineComponent({
17453
17674
  inheritAttrs: false,
17454
17675
  slots: Object,
17455
17676
  props: {
17677
+ modelValue: {
17678
+ type: Array,
17679
+ default: void 0
17680
+ },
17456
17681
  value: {
17457
17682
  type: Array,
17458
17683
  default: void 0
@@ -17526,12 +17751,16 @@ var CheckboxGroup = defineComponent({
17526
17751
  default: false
17527
17752
  }
17528
17753
  },
17529
- setup(props, { attrs, slots }) {
17754
+ emits: ["update:modelValue", "change"],
17755
+ setup(props, { attrs, slots, emit }) {
17530
17756
  const [value, setValue] = useUncontrolled({
17531
- value: () => props.value,
17757
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
17532
17758
  defaultValue: props.defaultValue,
17533
17759
  finalValue: [],
17534
- onChange: (nextValue) => props.onChange?.(nextValue)
17760
+ onChange: (nextValue) => {
17761
+ emit("update:modelValue", nextValue);
17762
+ emit("change", nextValue);
17763
+ }
17535
17764
  });
17536
17765
  const handleChange = (eventOrValue) => {
17537
17766
  if (props.readOnly) return;
@@ -17594,6 +17823,10 @@ var CheckboxCard = withBoxProps(defineComponent({
17594
17823
  name: "CheckboxCard",
17595
17824
  inheritAttrs: false,
17596
17825
  props: {
17826
+ modelValue: {
17827
+ type: Boolean,
17828
+ default: void 0
17829
+ },
17597
17830
  checked: {
17598
17831
  type: Boolean,
17599
17832
  default: void 0
@@ -17639,13 +17872,22 @@ var CheckboxCard = withBoxProps(defineComponent({
17639
17872
  default: false
17640
17873
  }
17641
17874
  },
17642
- setup(props, { attrs, slots }) {
17875
+ emits: [
17876
+ "update:modelValue",
17877
+ "update:checked",
17878
+ "change"
17879
+ ],
17880
+ setup(props, { attrs, slots, emit }) {
17643
17881
  const groupContext = useCheckboxGroupContext();
17644
17882
  const [checked, setChecked] = useUncontrolled({
17645
- value: () => typeof props.checked === "boolean" ? props.checked : groupContext ? groupContext.value.includes(props.value || "") : void 0,
17883
+ value: () => typeof props.modelValue === "boolean" ? props.modelValue : typeof props.checked === "boolean" ? props.checked : groupContext ? groupContext.value.includes(props.value || "") : void 0,
17646
17884
  defaultValue: props.defaultChecked,
17647
17885
  finalValue: false,
17648
- onChange: (nextValue) => props.onChange?.(nextValue)
17886
+ onChange: (nextValue) => {
17887
+ emit("update:modelValue", nextValue);
17888
+ emit("update:checked", nextValue);
17889
+ emit("change", nextValue);
17890
+ }
17649
17891
  });
17650
17892
  const getStyles = useStyles({
17651
17893
  name: "CheckboxCard",
@@ -17836,7 +18078,7 @@ var varsResolver$25 = createVarsResolver((theme, { radius, color, size, iconColo
17836
18078
  autoContrast
17837
18079
  }) : void 0
17838
18080
  } }));
17839
- function callHandler$6(handler, event) {
18081
+ function callHandler$3(handler, event) {
17840
18082
  if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
17841
18083
  else handler?.(event);
17842
18084
  }
@@ -17905,10 +18147,22 @@ var CheckboxBase = defineComponent({
17905
18147
  type: Boolean,
17906
18148
  default: true
17907
18149
  },
18150
+ modelValue: {
18151
+ type: Boolean,
18152
+ default: void 0
18153
+ },
17908
18154
  checked: {
17909
18155
  type: Boolean,
17910
18156
  default: void 0
17911
18157
  },
18158
+ defaultChecked: {
18159
+ type: Boolean,
18160
+ default: void 0
18161
+ },
18162
+ onChange: {
18163
+ type: Function,
18164
+ default: void 0
18165
+ },
17912
18166
  disabled: {
17913
18167
  type: Boolean,
17914
18168
  default: false
@@ -17942,9 +18196,24 @@ var CheckboxBase = defineComponent({
17942
18196
  default: false
17943
18197
  }
17944
18198
  },
17945
- setup(props, { attrs, slots }) {
18199
+ emits: [
18200
+ "update:modelValue",
18201
+ "update:checked",
18202
+ "change"
18203
+ ],
18204
+ setup(props, { attrs, slots, emit }) {
17946
18205
  const uuid = useId(props.id);
17947
18206
  const groupContext = useCheckboxGroupContext();
18207
+ const [localChecked, setLocalChecked] = useUncontrolled({
18208
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.checked,
18209
+ defaultValue: props.defaultChecked,
18210
+ finalValue: false,
18211
+ onChange: (checked) => {
18212
+ emit("update:modelValue", checked);
18213
+ emit("update:checked", checked);
18214
+ emit("change", checked);
18215
+ }
18216
+ });
17948
18217
  const getStyles = useStyles({
17949
18218
  name: "Checkbox",
17950
18219
  props,
@@ -17974,7 +18243,7 @@ var CheckboxBase = defineComponent({
17974
18243
  };
17975
18244
  const Icon = props.icon || CheckboxIcon;
17976
18245
  const value = String(attrs.value ?? "");
17977
- const checked = groupContext ? groupContext.value.includes(value) : props.checked;
18246
+ const checked = groupContext ? groupContext.value.includes(value) : localChecked.value;
17978
18247
  const disabled = groupContext?.isDisabled?.(value) || props.disabled;
17979
18248
  const size = groupContext?.size ?? props.size;
17980
18249
  return h(InlineInput, {
@@ -18019,13 +18288,14 @@ var CheckboxBase = defineComponent({
18019
18288
  },
18020
18289
  variant: props.variant,
18021
18290
  onClick: (event) => {
18022
- callHandler$6(attrs.onClick, event);
18023
- if (props.readOnly && checked === void 0) event.preventDefault();
18291
+ callHandler$3(attrs.onClick, event);
18292
+ if (props.readOnly) event.preventDefault();
18024
18293
  },
18025
18294
  onChange: (event) => {
18026
18295
  if (props.readOnly) return;
18027
- callHandler$6(attrs.onChange, event);
18296
+ const nextChecked = event.currentTarget.checked;
18028
18297
  groupContext?.onChange(event);
18298
+ setLocalChecked(nextChecked);
18029
18299
  }
18030
18300
  }), slots.icon ? slots.icon(iconSlotProps) : h(Icon, {
18031
18301
  indeterminate: props.indeterminate,
@@ -18054,6 +18324,10 @@ var ChipGroup = defineComponent({
18054
18324
  type: Boolean,
18055
18325
  default: false
18056
18326
  },
18327
+ modelValue: {
18328
+ type: [String, Array],
18329
+ default: void 0
18330
+ },
18057
18331
  value: {
18058
18332
  type: [String, Array],
18059
18333
  default: void 0
@@ -18067,12 +18341,16 @@ var ChipGroup = defineComponent({
18067
18341
  default: void 0
18068
18342
  }
18069
18343
  },
18070
- setup(props, { slots }) {
18344
+ emits: ["update:modelValue", "change"],
18345
+ setup(props, { slots, emit }) {
18071
18346
  const [value, setValue] = useUncontrolled({
18072
- value: () => props.value,
18347
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
18073
18348
  defaultValue: props.defaultValue,
18074
18349
  finalValue: props.multiple ? [] : null,
18075
- onChange: (nextValue) => props.onChange?.(nextValue)
18350
+ onChange: (nextValue) => {
18351
+ emit("update:modelValue", nextValue);
18352
+ emit("change", nextValue);
18353
+ }
18076
18354
  });
18077
18355
  const isChipSelected = (chipValue) => Array.isArray(value.value) ? value.value.includes(chipValue) : value.value === chipValue;
18078
18356
  const handleChange = (event) => {
@@ -18120,10 +18398,6 @@ var varsResolver$24 = createVarsResolver((theme, { size, radius, variant, color,
18120
18398
  "--chip-spacing": getSize(size, "chip-spacing")
18121
18399
  } };
18122
18400
  });
18123
- function callHandler$5(handler, event) {
18124
- if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
18125
- else handler?.(event);
18126
- }
18127
18401
  var ChipBase = defineComponent({
18128
18402
  name: "Chip",
18129
18403
  inheritAttrs: false,
@@ -18144,6 +18418,10 @@ var ChipBase = defineComponent({
18144
18418
  type: String,
18145
18419
  default: "checkbox"
18146
18420
  },
18421
+ modelValue: {
18422
+ type: Boolean,
18423
+ default: void 0
18424
+ },
18147
18425
  checked: {
18148
18426
  type: Boolean,
18149
18427
  default: void 0
@@ -18215,15 +18493,24 @@ var ChipBase = defineComponent({
18215
18493
  default: false
18216
18494
  }
18217
18495
  },
18218
- setup(rawProps, { attrs, slots }) {
18496
+ emits: [
18497
+ "update:modelValue",
18498
+ "update:checked",
18499
+ "change"
18500
+ ],
18501
+ setup(rawProps, { attrs, slots, emit }) {
18219
18502
  const props = useProps("Chip", null, rawProps);
18220
18503
  const groupContext = useChipGroupContext();
18221
18504
  const uuid = useId(props.id);
18222
18505
  const [value, setValue] = useUncontrolled({
18223
- value: () => props.checked,
18506
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.checked,
18224
18507
  defaultValue: props.defaultChecked,
18225
18508
  finalValue: false,
18226
- onChange: (nextValue) => props.onChange?.(nextValue)
18509
+ onChange: (nextValue) => {
18510
+ emit("update:modelValue", nextValue);
18511
+ emit("update:checked", nextValue);
18512
+ emit("change", nextValue);
18513
+ }
18227
18514
  });
18228
18515
  const getStyles = useStyles({
18229
18516
  name: "Chip",
@@ -18244,7 +18531,7 @@ var ChipBase = defineComponent({
18244
18531
  const inputType = groupContext ? groupContext.multiple ? "checkbox" : "radio" : props.type;
18245
18532
  const icon = props.icon ?? slots.icon;
18246
18533
  const showIcon = checked && icon !== null && icon !== false;
18247
- const { class: _class, style: _style, onChange: attrsOnChange, value: _attrsValue, ...inputAttrs } = attrs;
18534
+ const { class: _class, style: _style, value: _attrsValue, ...inputAttrs } = attrs;
18248
18535
  const renderIcon = () => {
18249
18536
  const iconProps = getStyles("checkIcon");
18250
18537
  if (icon === void 0) return h(CheckIcon, iconProps);
@@ -18269,11 +18556,9 @@ var ChipBase = defineComponent({
18269
18556
  disabled: props.disabled,
18270
18557
  value: chipValue,
18271
18558
  onChange: (event) => {
18272
- callHandler$5(attrsOnChange, event);
18273
- if (groupContext) {
18274
- groupContext.onChange(event);
18275
- props.onChange?.(event.currentTarget.checked);
18276
- } else setValue(event.currentTarget.checked);
18559
+ const nextChecked = event.currentTarget.checked;
18560
+ if (groupContext) groupContext.onChange(event);
18561
+ setValue(nextChecked);
18277
18562
  }
18278
18563
  }), h(Box, {
18279
18564
  component: "label",
@@ -18397,7 +18682,7 @@ var varsResolver$22 = createVarsResolver((_, { radius }, ctx) => ({ root: {
18397
18682
  "--pill-height": getSize(ctx.size, "pill-height"),
18398
18683
  "--pill-radius": radius === void 0 ? void 0 : getRadius(radius)
18399
18684
  } }));
18400
- function callHandler$4(handler, event) {
18685
+ function callHandler$2(handler, event) {
18401
18686
  if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
18402
18687
  else handler?.(event);
18403
18688
  }
@@ -18506,12 +18791,12 @@ var PillBase = defineComponent({
18506
18791
  onMousedown: (event) => {
18507
18792
  event.preventDefault();
18508
18793
  event.stopPropagation();
18509
- callHandler$4(removeButtonProps.onMousedown ?? removeButtonProps.onMousedown ?? removeButtonProps.onMouseDown, event);
18794
+ callHandler$2(removeButtonProps.onMousedown ?? removeButtonProps.onMousedown ?? removeButtonProps.onMouseDown, event);
18510
18795
  },
18511
18796
  onClick: (event) => {
18512
18797
  event.stopPropagation();
18513
18798
  props.onRemove?.();
18514
- callHandler$4(removeButtonProps.onClick, event);
18799
+ callHandler$2(removeButtonProps.onClick, event);
18515
18800
  }
18516
18801
  }) : null]);
18517
18802
  };
@@ -18529,6 +18814,22 @@ var PillsInputField = withBoxProps(defineComponent({
18529
18814
  name: "PillsInputField",
18530
18815
  inheritAttrs: false,
18531
18816
  props: {
18817
+ modelValue: {
18818
+ type: String,
18819
+ default: void 0
18820
+ },
18821
+ value: {
18822
+ type: String,
18823
+ default: void 0
18824
+ },
18825
+ defaultValue: {
18826
+ type: String,
18827
+ default: void 0
18828
+ },
18829
+ onChange: {
18830
+ type: Function,
18831
+ default: void 0
18832
+ },
18532
18833
  type: {
18533
18834
  type: String,
18534
18835
  default: "visible"
@@ -18570,8 +18871,18 @@ var PillsInputField = withBoxProps(defineComponent({
18570
18871
  default: false
18571
18872
  }
18572
18873
  },
18573
- setup(rawProps, { attrs }) {
18874
+ emits: ["update:modelValue", "change"],
18875
+ setup(rawProps, { attrs, emit }) {
18574
18876
  const props = useProps("PillsInputField", null, rawProps);
18877
+ const [value, setValue] = useUncontrolled({
18878
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
18879
+ defaultValue: props.defaultValue,
18880
+ finalValue: "",
18881
+ onChange: (nextValue) => {
18882
+ emit("update:modelValue", nextValue);
18883
+ emit("change", nextValue);
18884
+ }
18885
+ });
18575
18886
  const context = usePillsInputContext();
18576
18887
  const inputWrapperContext = useInputWrapperContext();
18577
18888
  const getStyles = useStyles({
@@ -18593,6 +18904,7 @@ var PillsInputField = withBoxProps(defineComponent({
18593
18904
  style: attrs.style
18594
18905
  }),
18595
18906
  component: "input",
18907
+ value: value.value,
18596
18908
  ref: (node) => {
18597
18909
  const input = node?.$el ?? node ?? null;
18598
18910
  if (context) context.fieldRef.value = input;
@@ -18608,6 +18920,11 @@ var PillsInputField = withBoxProps(defineComponent({
18608
18920
  "aria-invalid": context?.hasError || void 0,
18609
18921
  "aria-describedby": inputWrapperContext.describedBy,
18610
18922
  type: "text",
18923
+ onInput: (event) => {
18924
+ const handler = attrs.onInput;
18925
+ handler?.(event);
18926
+ setValue(event.currentTarget.value);
18927
+ },
18611
18928
  onMousedown: (event) => {
18612
18929
  if (!props.pointer) event.stopPropagation();
18613
18930
  }
@@ -18774,6 +19091,10 @@ var RadioGroup = defineComponent({
18774
19091
  inheritAttrs: false,
18775
19092
  slots: Object,
18776
19093
  props: {
19094
+ modelValue: {
19095
+ type: String,
19096
+ default: void 0
19097
+ },
18777
19098
  value: {
18778
19099
  type: String,
18779
19100
  default: void 0
@@ -18835,13 +19156,17 @@ var RadioGroup = defineComponent({
18835
19156
  default: false
18836
19157
  }
18837
19158
  },
18838
- setup(props, { attrs, slots }) {
19159
+ emits: ["update:modelValue", "change"],
19160
+ setup(props, { attrs, slots, emit }) {
18839
19161
  const name = useId(props.name);
18840
19162
  const [value, setValue] = useUncontrolled({
18841
- value: () => props.value,
19163
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
18842
19164
  defaultValue: props.defaultValue,
18843
19165
  finalValue: "",
18844
- onChange: (nextValue) => props.onChange?.(String(nextValue ?? ""))
19166
+ onChange: (nextValue) => {
19167
+ emit("update:modelValue", nextValue);
19168
+ emit("change", nextValue);
19169
+ }
18845
19170
  });
18846
19171
  const handleChange = (eventOrValue) => {
18847
19172
  if (props.readOnly) return;
@@ -18887,7 +19212,7 @@ function useRadioCardContext() {
18887
19212
  return inject(RadioCardContextKey, null);
18888
19213
  }
18889
19214
  var varsResolver$21 = createVarsResolver((_, { radius }) => ({ card: { "--card-radius": getRadius(radius) } }));
18890
- function callHandler$3(handler, event) {
19215
+ function callHandler$1(handler, event) {
18891
19216
  if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
18892
19217
  else handler?.(event);
18893
19218
  }
@@ -18895,10 +19220,22 @@ var RadioCard = withBoxProps(defineComponent({
18895
19220
  name: "RadioCard",
18896
19221
  inheritAttrs: false,
18897
19222
  props: {
19223
+ modelValue: {
19224
+ type: Boolean,
19225
+ default: void 0
19226
+ },
18898
19227
  checked: {
18899
19228
  type: Boolean,
18900
19229
  default: void 0
18901
19230
  },
19231
+ defaultChecked: {
19232
+ type: Boolean,
19233
+ default: void 0
19234
+ },
19235
+ onChange: {
19236
+ type: Function,
19237
+ default: void 0
19238
+ },
18902
19239
  withBorder: {
18903
19240
  type: Boolean,
18904
19241
  default: true
@@ -18936,8 +19273,23 @@ var RadioCard = withBoxProps(defineComponent({
18936
19273
  default: false
18937
19274
  }
18938
19275
  },
18939
- setup(props, { attrs, slots }) {
19276
+ emits: [
19277
+ "update:modelValue",
19278
+ "update:checked",
19279
+ "change"
19280
+ ],
19281
+ setup(props, { attrs, slots, emit }) {
18940
19282
  const groupContext = useRadioGroupContext();
19283
+ const [localChecked, setLocalChecked] = useUncontrolled({
19284
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.checked,
19285
+ defaultValue: props.defaultChecked,
19286
+ finalValue: false,
19287
+ onChange: (checked) => {
19288
+ emit("update:modelValue", checked);
19289
+ emit("update:checked", checked);
19290
+ emit("change", checked);
19291
+ }
19292
+ });
18941
19293
  const getStyles = useStyles({
18942
19294
  name: "RadioCard",
18943
19295
  props,
@@ -18950,7 +19302,7 @@ var RadioCard = withBoxProps(defineComponent({
18950
19302
  vars: props.vars,
18951
19303
  varsResolver: varsResolver$21
18952
19304
  });
18953
- const isChecked = () => typeof props.checked === "boolean" ? props.checked : groupContext?.value === props.value || false;
19305
+ const isChecked = () => groupContext ? groupContext.value === props.value : localChecked.value;
18954
19306
  provide(RadioCardContextKey, { get checked() {
18955
19307
  return isChecked();
18956
19308
  } });
@@ -18972,8 +19324,9 @@ var RadioCard = withBoxProps(defineComponent({
18972
19324
  name,
18973
19325
  "aria-checked": checked,
18974
19326
  onClick: (event) => {
18975
- callHandler$3(attrs.onClick, event);
19327
+ callHandler$1(attrs.onClick, event);
18976
19328
  groupContext?.onChange(props.value || "");
19329
+ setLocalChecked(true);
18977
19330
  }
18978
19331
  }, () => slots.default?.());
18979
19332
  };
@@ -19143,10 +19496,6 @@ var varsResolver$19 = createVarsResolver((theme, { size, radius, color, iconColo
19143
19496
  }) : void 0,
19144
19497
  "--radio-icon-size": getSize(size, "radio-icon-size")
19145
19498
  } }));
19146
- function callHandler$2(handler, event) {
19147
- if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
19148
- else handler?.(event);
19149
- }
19150
19499
  var RadioBase = defineComponent({
19151
19500
  name: "Radio",
19152
19501
  inheritAttrs: false,
@@ -19208,14 +19557,30 @@ var RadioBase = defineComponent({
19208
19557
  type: Boolean,
19209
19558
  default: true
19210
19559
  },
19560
+ modelValue: {
19561
+ type: Boolean,
19562
+ default: void 0
19563
+ },
19211
19564
  checked: {
19212
19565
  type: Boolean,
19213
19566
  default: void 0
19214
19567
  },
19568
+ defaultChecked: {
19569
+ type: Boolean,
19570
+ default: void 0
19571
+ },
19572
+ onChange: {
19573
+ type: Function,
19574
+ default: void 0
19575
+ },
19215
19576
  disabled: {
19216
19577
  type: Boolean,
19217
19578
  default: false
19218
19579
  },
19580
+ readOnly: {
19581
+ type: Boolean,
19582
+ default: false
19583
+ },
19219
19584
  variant: {
19220
19585
  type: String,
19221
19586
  default: "filled"
@@ -19241,9 +19606,24 @@ var RadioBase = defineComponent({
19241
19606
  default: false
19242
19607
  }
19243
19608
  },
19244
- setup(props, { attrs, slots }) {
19609
+ emits: [
19610
+ "update:modelValue",
19611
+ "update:checked",
19612
+ "change"
19613
+ ],
19614
+ setup(props, { attrs, slots, emit }) {
19245
19615
  const uuid = useId(props.id);
19246
19616
  const groupContext = useRadioGroupContext();
19617
+ const [localChecked, setLocalChecked] = useUncontrolled({
19618
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.checked,
19619
+ defaultValue: props.defaultChecked,
19620
+ finalValue: false,
19621
+ onChange: (checked) => {
19622
+ emit("update:modelValue", checked);
19623
+ emit("update:checked", checked);
19624
+ emit("change", checked);
19625
+ }
19626
+ });
19247
19627
  const getStyles = useStyles({
19248
19628
  name: "Radio",
19249
19629
  props,
@@ -19269,7 +19649,7 @@ var RadioBase = defineComponent({
19269
19649
  const iconStyles = getStyles("icon");
19270
19650
  const Icon = props.icon || RadioIcon;
19271
19651
  const value = String(attrs.value ?? "");
19272
- const checked = groupContext ? groupContext.value === value : props.checked;
19652
+ const checked = groupContext ? groupContext.value === value : localChecked.value;
19273
19653
  const disabled = groupContext?.disabled || props.disabled;
19274
19654
  const size = groupContext?.size ?? props.size;
19275
19655
  const name = groupContext?.name ?? attrs.name;
@@ -19305,6 +19685,7 @@ var RadioBase = defineComponent({
19305
19685
  id,
19306
19686
  checked,
19307
19687
  disabled,
19688
+ readonly: props.readOnly,
19308
19689
  name,
19309
19690
  type: "radio",
19310
19691
  "aria-describedby": describedBy,
@@ -19314,8 +19695,12 @@ var RadioBase = defineComponent({
19314
19695
  },
19315
19696
  variant: props.variant,
19316
19697
  onChange: (event) => {
19317
- callHandler$2(attrs.onChange, event);
19698
+ if (props.readOnly) {
19699
+ event.currentTarget.checked = Boolean(checked);
19700
+ return;
19701
+ }
19318
19702
  groupContext?.onChange(event);
19703
+ setLocalChecked(event.currentTarget.checked);
19319
19704
  }
19320
19705
  }), slots.icon ? slots.icon(iconStyles) : h(Icon, iconStyles)]));
19321
19706
  };
@@ -19339,6 +19724,10 @@ var SwitchGroup = defineComponent({
19339
19724
  inheritAttrs: false,
19340
19725
  slots: Object,
19341
19726
  props: {
19727
+ modelValue: {
19728
+ type: Array,
19729
+ default: void 0
19730
+ },
19342
19731
  value: {
19343
19732
  type: Array,
19344
19733
  default: void 0
@@ -19412,16 +19801,20 @@ var SwitchGroup = defineComponent({
19412
19801
  default: false
19413
19802
  }
19414
19803
  },
19415
- setup(props, { attrs, slots }) {
19804
+ emits: ["update:modelValue", "change"],
19805
+ setup(props, { attrs, slots, emit }) {
19416
19806
  const [value, setValue] = useUncontrolled({
19417
- value: () => props.value,
19807
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
19418
19808
  defaultValue: props.defaultValue,
19419
19809
  finalValue: [],
19420
- onChange: (nextValue) => props.onChange?.(nextValue)
19810
+ onChange: (nextValue) => {
19811
+ emit("update:modelValue", nextValue);
19812
+ emit("change", nextValue);
19813
+ }
19421
19814
  });
19422
- const handleChange = (event) => {
19815
+ const handleChange = (eventOrValue) => {
19423
19816
  if (props.readOnly) return;
19424
- const itemValue = String(event.currentTarget?.value ?? "");
19817
+ const itemValue = typeof eventOrValue === "string" ? eventOrValue : String(eventOrValue.currentTarget?.value ?? "");
19425
19818
  const isCurrentlySelected = value.value.includes(itemValue);
19426
19819
  if (!isCurrentlySelected && props.maxSelectedValues && value.value.length >= props.maxSelectedValues) return;
19427
19820
  setValue(isCurrentlySelected ? value.value.filter((item) => item !== itemValue) : [...value.value, itemValue]);
@@ -19487,10 +19880,6 @@ var varsResolver$18 = createVarsResolver((theme, { radius, color, size }) => ({
19487
19880
  "--switch-track-label-padding": getSize(size, "switch-track-label-padding"),
19488
19881
  "--switch-color": color ? getThemeColor(color, theme) : void 0
19489
19882
  } }));
19490
- function callHandler$1(handler, event) {
19491
- if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
19492
- else handler?.(event);
19493
- }
19494
19883
  var SwitchBase = defineComponent({
19495
19884
  name: "Switch",
19496
19885
  inheritAttrs: false,
@@ -19552,6 +19941,10 @@ var SwitchBase = defineComponent({
19552
19941
  type: Boolean,
19553
19942
  default: true
19554
19943
  },
19944
+ modelValue: {
19945
+ type: Boolean,
19946
+ default: void 0
19947
+ },
19555
19948
  checked: {
19556
19949
  type: Boolean,
19557
19950
  default: void 0
@@ -19568,6 +19961,10 @@ var SwitchBase = defineComponent({
19568
19961
  type: Boolean,
19569
19962
  default: false
19570
19963
  },
19964
+ readOnly: {
19965
+ type: Boolean,
19966
+ default: false
19967
+ },
19571
19968
  variant: {
19572
19969
  type: String,
19573
19970
  default: void 0
@@ -19593,16 +19990,22 @@ var SwitchBase = defineComponent({
19593
19990
  default: false
19594
19991
  }
19595
19992
  },
19596
- setup(props, { attrs, slots }) {
19993
+ emits: [
19994
+ "update:modelValue",
19995
+ "update:checked",
19996
+ "change"
19997
+ ],
19998
+ setup(props, { attrs, slots, emit }) {
19597
19999
  const uuid = useId(props.id);
19598
20000
  const groupContext = useSwitchGroupContext();
19599
- const internalChecked = ref(false);
19600
20001
  const [checked, setChecked] = useUncontrolled({
19601
- value: () => props.checked,
20002
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.checked,
19602
20003
  defaultValue: props.defaultChecked,
19603
20004
  finalValue: false,
19604
20005
  onChange: (value) => {
19605
- internalChecked.value = value;
20006
+ emit("update:modelValue", value);
20007
+ emit("update:checked", value);
20008
+ emit("change", value);
19606
20009
  }
19607
20010
  });
19608
20011
  const getStyles = useStyles({
@@ -19663,15 +20066,19 @@ var SwitchBase = defineComponent({
19663
20066
  ...getStyles("input"),
19664
20067
  disabled,
19665
20068
  checked: currentChecked,
20069
+ readonly: props.readOnly,
19666
20070
  id,
19667
20071
  type: "checkbox",
19668
20072
  role: "switch",
19669
20073
  "aria-describedby": describedBy,
19670
20074
  onChange: (event) => {
19671
- callHandler$1(attrs.onChange, event);
19672
- props.onChange?.(event);
20075
+ if (props.readOnly) {
20076
+ event.currentTarget.checked = currentChecked;
20077
+ return;
20078
+ }
20079
+ const nextChecked = event.currentTarget.checked;
19673
20080
  if (groupContext) groupContext.onChange(event);
19674
- else setChecked(event.currentTarget.checked);
20081
+ setChecked(nextChecked);
19675
20082
  }
19676
20083
  }), h(Box, {
19677
20084
  component: "span",
@@ -21518,6 +21925,10 @@ var Slider = withBoxProps(defineComponent({
21518
21925
  type: Number,
21519
21926
  default: void 0
21520
21927
  },
21928
+ modelValue: {
21929
+ type: Number,
21930
+ default: void 0
21931
+ },
21521
21932
  value: {
21522
21933
  type: Number,
21523
21934
  default: void 0
@@ -21633,16 +22044,23 @@ var Slider = withBoxProps(defineComponent({
21633
22044
  default: false
21634
22045
  }
21635
22046
  },
21636
- setup(rawProps, { attrs, slots }) {
22047
+ emits: ["update:modelValue", "change"],
22048
+ setup(rawProps, { attrs, slots, emit }) {
21637
22049
  const props = useProps("Slider", defaultProps$6, rawProps);
21638
22050
  const direction = useDirection();
21639
22051
  const hovered = ref(false);
21640
22052
  const thumb = ref(null);
21641
22053
  const [current, setCurrent] = useUncontrolled({
21642
- value: () => props.value === void 0 ? void 0 : clamp$1(props.value, props.min, props.max),
22054
+ value: () => {
22055
+ const controlledValue = props.modelValue !== void 0 ? props.modelValue : props.value;
22056
+ return controlledValue === void 0 ? void 0 : clamp$1(controlledValue, props.min, props.max);
22057
+ },
21643
22058
  defaultValue: props.defaultValue === void 0 ? void 0 : clamp$1(props.defaultValue, props.min, props.max),
21644
22059
  finalValue: clamp$1(0, props.min, props.max),
21645
- onChange: (value) => props.onChange?.(value)
22060
+ onChange: (value) => {
22061
+ emit("update:modelValue", value);
22062
+ emit("change", value);
22063
+ }
21646
22064
  });
21647
22065
  const valueRef = ref(current.value);
21648
22066
  watch(current, (value) => {
@@ -21780,6 +22198,10 @@ var RangeSlider = defineComponent({
21780
22198
  inheritAttrs: false,
21781
22199
  slots: Object,
21782
22200
  props: {
22201
+ modelValue: {
22202
+ type: Array,
22203
+ default: void 0
22204
+ },
21783
22205
  value: {
21784
22206
  type: Array,
21785
22207
  default: void 0
@@ -21926,17 +22348,21 @@ var RangeSlider = defineComponent({
21926
22348
  default: false
21927
22349
  }
21928
22350
  },
21929
- setup(rawProps, { attrs, slots }) {
22351
+ emits: ["update:modelValue", "change"],
22352
+ setup(rawProps, { attrs, slots, emit }) {
21930
22353
  const props = useProps("RangeSlider", defaults$5, rawProps);
21931
22354
  const direction = useDirection();
21932
22355
  const activeThumb = ref(0);
21933
22356
  const focused = ref(0);
21934
22357
  const hovered = ref(false);
21935
22358
  const [current, setCurrent] = useUncontrolled({
21936
- value: () => props.value,
22359
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
21937
22360
  defaultValue: props.defaultValue,
21938
22361
  finalValue: [props.min, props.max],
21939
- onChange: (value) => props.onChange?.(value)
22362
+ onChange: (value) => {
22363
+ emit("update:modelValue", value);
22364
+ emit("change", value);
22365
+ }
21940
22366
  });
21941
22367
  const valueRef = ref([...current.value]);
21942
22368
  watch(current, (value) => valueRef.value = [...value]);
@@ -22103,9 +22529,17 @@ var ColorSlider = defineComponent({
22103
22529
  name: "ColorSlider",
22104
22530
  inheritAttrs: false,
22105
22531
  props: {
22532
+ modelValue: {
22533
+ type: Number,
22534
+ default: void 0
22535
+ },
22106
22536
  value: {
22107
22537
  type: Number,
22108
- required: true
22538
+ default: void 0
22539
+ },
22540
+ defaultValue: {
22541
+ type: Number,
22542
+ default: void 0
22109
22543
  },
22110
22544
  onChange: {
22111
22545
  type: Function,
@@ -22164,11 +22598,21 @@ var ColorSlider = defineComponent({
22164
22598
  default: false
22165
22599
  }
22166
22600
  },
22167
- setup(props, { attrs }) {
22601
+ emits: ["update:modelValue", "change"],
22602
+ setup(props, { attrs, emit }) {
22168
22603
  const ctx = useColorPickerContext();
22169
22604
  const theme = useMantineTheme();
22605
+ const [value, setValue] = useUncontrolled({
22606
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
22607
+ defaultValue: props.defaultValue,
22608
+ finalValue: 0,
22609
+ onChange: (nextValue) => {
22610
+ emit("update:modelValue", nextValue);
22611
+ emit("change", nextValue);
22612
+ }
22613
+ });
22170
22614
  const position = ref({
22171
- x: props.value / props.maxValue,
22615
+ x: value.value / props.maxValue,
22172
22616
  y: 0
22173
22617
  });
22174
22618
  const positionRef = ref(position.value);
@@ -22193,7 +22637,7 @@ var ColorSlider = defineComponent({
22193
22637
  x,
22194
22638
  y: 0
22195
22639
  };
22196
- props.onChange?.(changeValue(x));
22640
+ setValue(changeValue(x));
22197
22641
  }, {
22198
22642
  onScrubStart: props.onScrubStart,
22199
22643
  onScrubEnd: () => {
@@ -22201,7 +22645,7 @@ var ColorSlider = defineComponent({
22201
22645
  props.onScrubEnd?.();
22202
22646
  }
22203
22647
  });
22204
- watch(() => props.value, (value) => position.value = {
22648
+ watch(value, (value) => position.value = {
22205
22649
  x: value / props.maxValue,
22206
22650
  y: 0
22207
22651
  });
@@ -22212,7 +22656,7 @@ var ColorSlider = defineComponent({
22212
22656
  x: position.value.x + (event.key === "ArrowRight" ? .05 : -.05),
22213
22657
  y: 0
22214
22658
  }).x);
22215
- props.onChange?.(value);
22659
+ setValue(value);
22216
22660
  props.onChangeEnd?.(value);
22217
22661
  };
22218
22662
  return () => h(Box, {
@@ -22223,7 +22667,7 @@ var ColorSlider = defineComponent({
22223
22667
  style: attrs.style
22224
22668
  }),
22225
22669
  role: "slider",
22226
- "aria-valuenow": props.value,
22670
+ "aria-valuenow": value.value,
22227
22671
  "aria-valuemax": props.maxValue,
22228
22672
  "aria-valuemin": 0,
22229
22673
  tabindex: props.focusable ? 0 : -1,
@@ -22458,9 +22902,17 @@ var AlphaSlider = defineComponent({
22458
22902
  name: "AlphaSlider",
22459
22903
  inheritAttrs: false,
22460
22904
  props: {
22905
+ modelValue: {
22906
+ type: Number,
22907
+ default: void 0
22908
+ },
22461
22909
  value: {
22462
22910
  type: Number,
22463
- required: true
22911
+ default: void 0
22912
+ },
22913
+ defaultValue: {
22914
+ type: Number,
22915
+ default: void 0
22464
22916
  },
22465
22917
  color: {
22466
22918
  type: String,
@@ -22491,7 +22943,8 @@ var AlphaSlider = defineComponent({
22491
22943
  default: true
22492
22944
  }
22493
22945
  },
22494
- setup(props, { attrs }) {
22946
+ emits: ["update:modelValue", "change"],
22947
+ setup(props, { attrs, emit }) {
22495
22948
  return () => h(ColorSlider, {
22496
22949
  ...attrs,
22497
22950
  ...props,
@@ -22499,7 +22952,8 @@ var AlphaSlider = defineComponent({
22499
22952
  maxValue: 1,
22500
22953
  round: false,
22501
22954
  "data-alpha": "",
22502
- onChange: (value) => props.onChange?.(round(value, 2)),
22955
+ "onUpdate:modelValue": (value) => emit("update:modelValue", round(value, 2)),
22956
+ onChange: (value) => emit("change", round(value, 2)),
22503
22957
  onChangeEnd: (value) => props.onChangeEnd?.(round(value, 2)),
22504
22958
  overlays: [
22505
22959
  {
@@ -22519,9 +22973,17 @@ var HueSlider = defineComponent({
22519
22973
  name: "HueSlider",
22520
22974
  inheritAttrs: false,
22521
22975
  props: {
22976
+ modelValue: {
22977
+ type: Number,
22978
+ default: void 0
22979
+ },
22522
22980
  value: {
22523
22981
  type: Number,
22524
- required: true
22982
+ default: void 0
22983
+ },
22984
+ defaultValue: {
22985
+ type: Number,
22986
+ default: void 0
22525
22987
  },
22526
22988
  onChange: {
22527
22989
  type: Function,
@@ -22548,13 +23010,16 @@ var HueSlider = defineComponent({
22548
23010
  default: true
22549
23011
  }
22550
23012
  },
22551
- setup(props, { attrs }) {
23013
+ emits: ["update:modelValue", "change"],
23014
+ setup(props, { attrs, emit }) {
22552
23015
  return () => h(ColorSlider, {
22553
23016
  ...attrs,
22554
23017
  ...props,
23018
+ "onUpdate:modelValue": (value) => emit("update:modelValue", value),
23019
+ onChange: (value) => emit("change", value),
22555
23020
  __staticSelector: "HueSlider",
22556
23021
  maxValue: 360,
22557
- thumbColor: `hsl(${props.value}, 100%, 50%)`,
23022
+ thumbColor: `hsl(${props.modelValue ?? props.value ?? props.defaultValue ?? 0}, 100%, 50%)`,
22558
23023
  round: true,
22559
23024
  "data-hue": "",
22560
23025
  overlays: [{ backgroundImage: "linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))" }, { boxShadow: `rgba(0,0,0,.1) 0 0 0 ${rem(1)} inset, rgba(0,0,0,.15) 0 0 ${rem(4)} inset` }]
@@ -22752,6 +23217,10 @@ var ColorPicker = defineComponent({
22752
23217
  name: "ColorPicker",
22753
23218
  inheritAttrs: false,
22754
23219
  props: {
23220
+ modelValue: {
23221
+ type: String,
23222
+ default: void 0
23223
+ },
22755
23224
  value: {
22756
23225
  type: String,
22757
23226
  default: void 0
@@ -22845,13 +23314,17 @@ var ColorPicker = defineComponent({
22845
23314
  default: false
22846
23315
  }
22847
23316
  },
22848
- setup(rawProps, { attrs }) {
23317
+ emits: ["update:modelValue", "change"],
23318
+ setup(rawProps, { attrs, emit }) {
22849
23319
  const props = useProps("ColorPicker", defaults$4, rawProps);
22850
23320
  const [current, setCurrent, controlled] = useUncontrolled({
22851
- value: () => props.value,
23321
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
22852
23322
  defaultValue: props.defaultValue,
22853
23323
  finalValue: "#FFFFFF",
22854
- onChange: (value) => props.onChange?.(value)
23324
+ onChange: (value) => {
23325
+ emit("update:modelValue", value);
23326
+ emit("change", value);
23327
+ }
22855
23328
  });
22856
23329
  const parsed = ref(parseColor(current.value));
22857
23330
  let scrubbing = false;
@@ -23615,6 +24088,22 @@ var MaskInput = defineComponent({
23615
24088
  type: [String, Array],
23616
24089
  required: true
23617
24090
  },
24091
+ modelValue: {
24092
+ type: String,
24093
+ default: void 0
24094
+ },
24095
+ value: {
24096
+ type: String,
24097
+ default: void 0
24098
+ },
24099
+ defaultValue: {
24100
+ type: String,
24101
+ default: void 0
24102
+ },
24103
+ onChange: {
24104
+ type: Function,
24105
+ default: void 0
24106
+ },
23618
24107
  tokens: {
23619
24108
  type: Object,
23620
24109
  default: void 0
@@ -23664,7 +24153,8 @@ var MaskInput = defineComponent({
23664
24153
  default: void 0
23665
24154
  }
23666
24155
  },
23667
- setup(props, { attrs, slots }) {
24156
+ emits: ["update:modelValue", "change"],
24157
+ setup(props, { attrs, slots, emit }) {
23668
24158
  const input = ref(null);
23669
24159
  const processed = ref("");
23670
24160
  const rawValue = ref("");
@@ -23725,6 +24215,8 @@ var MaskInput = defineComponent({
23725
24215
  }
23726
24216
  const complete = isComplete(reprocessed, resolved.slots);
23727
24217
  if (notify) {
24218
+ emit("update:modelValue", nextDisplay);
24219
+ emit("change", nextDisplay);
23728
24220
  props.onChangeRaw?.(resolvedRaw, nextDisplay);
23729
24221
  if (complete && !wasComplete.value) props.onComplete?.(nextDisplay, resolvedRaw);
23730
24222
  }
@@ -23737,11 +24229,13 @@ var MaskInput = defineComponent({
23737
24229
  const resolved = resolveMaskOptions(options(), "");
23738
24230
  displayValue.value = props.alwaysShowMask ? buildDisplayValue("", resolved.slots, resolved.slotChar, true) : "";
23739
24231
  if (input.value) input.value.value = displayValue.value;
24232
+ emit("update:modelValue", "");
24233
+ emit("change", "");
23740
24234
  props.onChangeRaw?.("", "");
23741
24235
  };
23742
24236
  assignRef(props.resetRef, reset);
23743
24237
  watch(() => props.resetRef, (value) => assignRef(value, reset));
23744
- watch(() => attrs.value, (value) => {
24238
+ watch(() => props.modelValue !== void 0 ? props.modelValue : props.value, (value) => {
23745
24239
  if (input.value && value !== void 0 && String(value) !== displayValue.value) commit(String(value), void 0, false, String(value));
23746
24240
  });
23747
24241
  onBeforeUnmount(() => assignRef(props.resetRef, null));
@@ -23750,7 +24244,7 @@ var MaskInput = defineComponent({
23750
24244
  input.value = element instanceof HTMLInputElement ? element : null;
23751
24245
  assignRef(attrs.rootRef, root?.$el ?? root ?? null);
23752
24246
  if (!input.value) return;
23753
- const initial = attrs.value ?? attrs.defaultValue ?? input.value.value;
24247
+ const initial = props.modelValue ?? props.value ?? props.defaultValue ?? input.value.value;
23754
24248
  if (initial) commit(String(initial), void 0, false, String(initial));
23755
24249
  else if (props.alwaysShowMask) {
23756
24250
  const resolved = resolveMaskOptions(options(), "");
@@ -23861,6 +24355,7 @@ var MaskInput = defineComponent({
23861
24355
  type: forwarded.type ?? "text",
23862
24356
  __staticSelector: "MaskInput",
23863
24357
  __stylesApiProps: attrs,
24358
+ value: displayValue.value,
23864
24359
  rootRef: attach,
23865
24360
  onInput: handleInput,
23866
24361
  onFocus: handleFocus,
@@ -28350,19 +28845,44 @@ var MenuDivider = defineComponent({
28350
28845
  var MenuSearch = defineComponent({
28351
28846
  name: "MenuSearch",
28352
28847
  inheritAttrs: false,
28353
- props: { clearSearchOnClose: {
28354
- type: Boolean,
28355
- default: true
28356
- } },
28357
- setup(props, { attrs }) {
28848
+ props: {
28849
+ modelValue: {
28850
+ type: String,
28851
+ default: void 0
28852
+ },
28853
+ value: {
28854
+ type: String,
28855
+ default: void 0
28856
+ },
28857
+ defaultValue: {
28858
+ type: String,
28859
+ default: void 0
28860
+ },
28861
+ onChange: {
28862
+ type: Function,
28863
+ default: void 0
28864
+ },
28865
+ clearSearchOnClose: {
28866
+ type: Boolean,
28867
+ default: true
28868
+ }
28869
+ },
28870
+ emits: ["update:modelValue", "change"],
28871
+ setup(props, { attrs, emit }) {
28358
28872
  const ctx = useMenuContext();
28873
+ const [value, setValue] = useUncontrolled({
28874
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
28875
+ defaultValue: props.defaultValue,
28876
+ finalValue: "",
28877
+ onChange: (nextValue) => {
28878
+ emit("update:modelValue", nextValue);
28879
+ emit("change", nextValue);
28880
+ }
28881
+ });
28359
28882
  const unregister = ctx.registerSearch();
28360
28883
  ctx.setSearchExitClear(props.clearSearchOnClose ? () => {
28361
28884
  clearActive(document.querySelector("[data-menu-dropdown]"));
28362
- attrs.onChange?.({
28363
- currentTarget: { value: "" },
28364
- target: { value: "" }
28365
- });
28885
+ setValue("");
28366
28886
  } : null);
28367
28887
  onUnmounted(() => {
28368
28888
  unregister();
@@ -28386,6 +28906,7 @@ var MenuSearch = defineComponent({
28386
28906
  const inputStyles = attrs.styles;
28387
28907
  return h(Input, {
28388
28908
  ...forwarded,
28909
+ value: value.value,
28389
28910
  type: "search",
28390
28911
  "data-autofocus": "",
28391
28912
  "data-mantine-stop-propagation": "",
@@ -28403,11 +28924,7 @@ var MenuSearch = defineComponent({
28403
28924
  },
28404
28925
  onInput: (event) => {
28405
28926
  call$1(attrs.onInput, event);
28406
- call$1(attrs.onChange, event);
28407
- clearActive(event.currentTarget.closest("[data-menu-dropdown]"));
28408
- },
28409
- onChange: (event) => {
28410
- call$1(attrs.onChange, event);
28927
+ setValue(event.currentTarget.value);
28411
28928
  clearActive(event.currentTarget.closest("[data-menu-dropdown]"));
28412
28929
  },
28413
28930
  onKeydown: (event) => {
@@ -29808,6 +30325,18 @@ var ComboboxSearch = defineComponent({
29808
30325
  name: "ComboboxSearch",
29809
30326
  inheritAttrs: false,
29810
30327
  props: {
30328
+ modelValue: {
30329
+ type: String,
30330
+ default: void 0
30331
+ },
30332
+ value: {
30333
+ type: String,
30334
+ default: void 0
30335
+ },
30336
+ defaultValue: {
30337
+ type: String,
30338
+ default: void 0
30339
+ },
29811
30340
  withAriaAttributes: {
29812
30341
  type: Boolean,
29813
30342
  default: true
@@ -29818,7 +30347,8 @@ var ComboboxSearch = defineComponent({
29818
30347
  },
29819
30348
  size: String
29820
30349
  },
29821
- setup(props, { attrs }) {
30350
+ emits: ["update:modelValue", "change"],
30351
+ setup(props, { attrs, emit }) {
29822
30352
  const ctx = useComboboxContext();
29823
30353
  const targetProps = useComboboxTargetProps({
29824
30354
  targetType: "input",
@@ -29831,6 +30361,11 @@ var ComboboxSearch = defineComponent({
29831
30361
  });
29832
30362
  return () => h(Input, {
29833
30363
  ...attrs,
30364
+ modelValue: props.modelValue,
30365
+ value: props.value,
30366
+ defaultValue: props.defaultValue,
30367
+ "onUpdate:modelValue": (value) => emit("update:modelValue", value),
30368
+ onChange: (value) => emit("change", value),
29834
30369
  ...targetProps,
29835
30370
  ref: (node) => {
29836
30371
  const element = node?.$el?.querySelector?.("input") ?? node?.$el ?? node;
@@ -30369,6 +30904,10 @@ var ComboboxPopoverBase = defineComponent({
30369
30904
  type: Boolean,
30370
30905
  default: void 0
30371
30906
  },
30907
+ modelValue: {
30908
+ type: null,
30909
+ default: void 0
30910
+ },
30372
30911
  value: {
30373
30912
  type: null,
30374
30913
  default: void 0
@@ -30506,7 +31045,8 @@ var ComboboxPopoverBase = defineComponent({
30506
31045
  default: false
30507
31046
  }
30508
31047
  },
30509
- setup(rawProps, { attrs, slots }) {
31048
+ emits: ["update:modelValue", "change"],
31049
+ setup(rawProps, { attrs, slots, emit }) {
30510
31050
  const props = new Proxy(rawProps, { get(target, key) {
30511
31051
  const value = target[key];
30512
31052
  return value === void 0 && key in defaultProps$2 ? defaultProps$2[key] : value;
@@ -30514,10 +31054,13 @@ var ComboboxPopoverBase = defineComponent({
30514
31054
  const parsedData = computed(() => getParsedComboboxData(props.data));
30515
31055
  const optionsLockup = computed(() => getOptionsLockup(parsedData.value));
30516
31056
  const [_value, setValue] = useUncontrolled({
30517
- value: () => props.value,
31057
+ value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
30518
31058
  defaultValue: props.defaultValue,
30519
31059
  finalValue: props.multiple ? [] : null,
30520
- onChange: (val) => props.onChange?.(val)
31060
+ onChange: (value) => {
31061
+ emit("update:modelValue", value);
31062
+ emit("change", value);
31063
+ }
30521
31064
  });
30522
31065
  const [_searchValue, setSearchValue] = useUncontrolled({
30523
31066
  value: () => props.searchValue,
@@ -31268,7 +31811,11 @@ var Select = defineComponent({
31268
31811
  default: void 0
31269
31812
  }
31270
31813
  },
31271
- emits: ["update:modelValue", "update:searchValue"],
31814
+ emits: [
31815
+ "update:modelValue",
31816
+ "update:searchValue",
31817
+ "change"
31818
+ ],
31272
31819
  setup(props, { attrs, emit, slots }) {
31273
31820
  const parsed = computed(() => getParsedComboboxData(props.data));
31274
31821
  const lockup = computed(() => getOptionsLockup(parsed.value));
@@ -31288,8 +31835,8 @@ var Select = defineComponent({
31288
31835
  };
31289
31836
  const changeValue = (value, option) => {
31290
31837
  if (!controlled()) internal.value = value;
31291
- props.onChange?.(value, option);
31292
31838
  emit("update:modelValue", value);
31839
+ emit("change", value, option);
31293
31840
  };
31294
31841
  const combobox = useCombobox({
31295
31842
  opened: () => props.dropdownOpened,
@@ -31477,15 +32024,18 @@ var Autocomplete = defineComponent({
31477
32024
  default: true
31478
32025
  }
31479
32026
  },
31480
- emits: { "update:modelValue": (value) => typeof value === "string" },
32027
+ emits: {
32028
+ "update:modelValue": (value) => typeof value === "string",
32029
+ change: (value) => typeof value === "string"
32030
+ },
31481
32031
  setup(props, { attrs, emit, slots }) {
31482
32032
  const internal = ref(props.defaultValue);
31483
32033
  const current = () => props.modelValue ?? props.value ?? internal.value;
31484
32034
  const controlled = () => props.modelValue !== void 0 || props.value !== void 0;
31485
32035
  const change = (value) => {
31486
32036
  if (!controlled()) internal.value = value;
31487
- props.onChange?.(value);
31488
32037
  emit("update:modelValue", value);
32038
+ emit("change", value);
31489
32039
  combobox.resetSelectedOption();
31490
32040
  };
31491
32041
  const parsed = computed(() => getParsedComboboxData(props.data));
@@ -31672,7 +32222,11 @@ var MultiSelect = defineComponent({
31672
32222
  },
31673
32223
  selectFirstOptionOnDropdownOpen: Boolean
31674
32224
  },
31675
- emits: ["update:modelValue", "update:searchValue"],
32225
+ emits: [
32226
+ "update:modelValue",
32227
+ "update:searchValue",
32228
+ "change"
32229
+ ],
31676
32230
  setup(props, { attrs, emit, slots }) {
31677
32231
  const parsed = computed(() => getParsedComboboxData(props.data));
31678
32232
  const lockup = computed(() => getOptionsLockup(parsed.value));
@@ -31690,8 +32244,8 @@ var MultiSelect = defineComponent({
31690
32244
  };
31691
32245
  const setValue = (value) => {
31692
32246
  if (!controlled()) internal.value = value;
31693
- props.onChange?.(value);
31694
32247
  emit("update:modelValue", value);
32248
+ emit("change", value);
31695
32249
  };
31696
32250
  const combobox = useCombobox({
31697
32251
  opened: () => props.dropdownOpened,
@@ -31931,7 +32485,11 @@ var TagsInput = defineComponent({
31931
32485
  },
31932
32486
  selectFirstOptionOnDropdownOpen: Boolean
31933
32487
  },
31934
- emits: ["update:modelValue", "update:searchValue"],
32488
+ emits: [
32489
+ "update:modelValue",
32490
+ "update:searchValue",
32491
+ "change"
32492
+ ],
31935
32493
  setup(props, { attrs, emit, slots }) {
31936
32494
  const parsed = computed(() => getParsedComboboxData(props.data));
31937
32495
  const lockup = computed(() => getOptionsLockup(parsed.value));
@@ -31948,8 +32506,8 @@ var TagsInput = defineComponent({
31948
32506
  };
31949
32507
  const setValue = (value) => {
31950
32508
  if (!controlled()) internal.value = value;
31951
- props.onChange?.(value);
31952
32509
  emit("update:modelValue", value);
32510
+ emit("change", value);
31953
32511
  };
31954
32512
  const combobox = useCombobox({
31955
32513
  opened: () => props.dropdownOpened,
@@ -32223,7 +32781,7 @@ var ColorInput = defineComponent({
32223
32781
  default: 7
32224
32782
  }
32225
32783
  },
32226
- emits: ["update:modelValue"],
32784
+ emits: ["update:modelValue", "change"],
32227
32785
  setup(props, { attrs, emit, slots }) {
32228
32786
  const internal = ref(props.defaultValue);
32229
32787
  const current = () => props.modelValue ?? props.value ?? internal.value;
@@ -32232,8 +32790,8 @@ var ColorInput = defineComponent({
32232
32790
  const lastValid = ref(isColorValid(current()) ? current() : "");
32233
32791
  const setValue = (value, end = false) => {
32234
32792
  if (!controlled()) internal.value = value;
32235
- props.onChange?.(value);
32236
32793
  emit("update:modelValue", value);
32794
+ emit("change", value);
32237
32795
  if (isColorValid(value)) {
32238
32796
  lastValid.value = value;
32239
32797
  if (end) props.onChangeEnd?.(convertHsvaTo(props.format, parseColor(value)));
@@ -32641,15 +33199,19 @@ var TreeSelect = defineComponent({
32641
33199
  },
32642
33200
  chevronAriaLabels: Object
32643
33201
  },
32644
- emits: ["update:modelValue", "update:searchValue"],
33202
+ emits: [
33203
+ "update:modelValue",
33204
+ "update:searchValue",
33205
+ "change"
33206
+ ],
32645
33207
  setup(props, { attrs, emit, slots }) {
32646
33208
  const isMulti = () => props.mode !== "single";
32647
33209
  const internal = ref(props.defaultValue !== void 0 ? props.defaultValue : isMulti() ? [] : null);
32648
- const current = () => props.modelValue ?? props.value ?? internal.value;
33210
+ const current = () => props.modelValue !== void 0 ? props.modelValue : props.value !== void 0 ? props.value : internal.value;
32649
33211
  const setValue = (value) => {
32650
33212
  if (props.modelValue === void 0 && props.value === void 0) internal.value = value;
32651
- props.onChange?.(value);
32652
33213
  emit("update:modelValue", value);
33214
+ emit("change", value);
32653
33215
  };
32654
33216
  const expandedInternal = ref(props.defaultExpandAll ? allValues(props.data) : props.defaultExpandedValues ?? []);
32655
33217
  const expanded = () => props.expandedValues ?? expandedInternal.value;
@@ -33068,11 +33630,15 @@ var Cascader = defineComponent({
33068
33630
  styles: [Object, Function],
33069
33631
  unstyled: Boolean
33070
33632
  },
33071
- emits: ["update:modelValue", "update:searchValue"],
33633
+ emits: [
33634
+ "update:modelValue",
33635
+ "update:searchValue",
33636
+ "change"
33637
+ ],
33072
33638
  setup(props, { attrs, emit, slots }) {
33073
33639
  const id = useId(attrs.id);
33074
33640
  const internalValue = ref(props.defaultValue ?? null);
33075
- const currentValue = computed(() => props.modelValue ?? props.value ?? internalValue.value);
33641
+ const currentValue = computed(() => props.modelValue !== void 0 ? props.modelValue : props.value !== void 0 ? props.value : internalValue.value);
33076
33642
  const pathOptions = computed(() => getCascaderPathOptions(props.data, currentValue.value));
33077
33643
  const separatorString = computed(() => typeof props.separator === "string" || typeof props.separator === "number" ? String(props.separator) : "/");
33078
33644
  const separatorContent = () => resolveNode(props.separator, slots.separator) ?? "/";
@@ -33100,8 +33666,9 @@ var Cascader = defineComponent({
33100
33666
  };
33101
33667
  const setValue = (value) => {
33102
33668
  if (props.modelValue === void 0 && props.value === void 0) internalValue.value = value;
33103
- props.onChange?.(value, getCascaderPathOptions(props.data, value));
33669
+ const selectedOptions = getCascaderPathOptions(props.data, value);
33104
33670
  emit("update:modelValue", value);
33671
+ emit("change", value, selectedOptions);
33105
33672
  };
33106
33673
  const resetActivePath = () => {
33107
33674
  activePath.value = currentValue.value ? [...currentValue.value] : [];