@moneyforward/mfui-components 3.18.0 → 3.20.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 (75) hide show
  1. package/dist/src/CheckboxCard/CheckboxCard.js +1 -7
  2. package/dist/src/DateTimeSelection/DateRangePicker/DateRangePickerProvider/DateRangePickerProvider.js +11 -12
  3. package/dist/src/DateTimeSelection/DateRangePicker/DateRangePickerTrigger/hooks/useDateRangeTriggerValueController.js +4 -3
  4. package/dist/src/DateTimeSelection/FilterDateRangePicker/DateRangePickerContent/DateRangePickerContent.d.ts +6 -0
  5. package/dist/src/DateTimeSelection/FilterDateRangePicker/DateRangePickerContent/DateRangePickerContent.js +33 -0
  6. package/dist/src/DateTimeSelection/FilterDateRangePicker/DateRangePickerContent/DateRangePickerContent.types.d.ts +17 -0
  7. package/dist/src/DateTimeSelection/FilterDateRangePicker/FilterDateRangePicker.d.ts +14 -0
  8. package/dist/src/DateTimeSelection/FilterDateRangePicker/FilterDateRangePicker.js +42 -0
  9. package/dist/src/DateTimeSelection/FilterDateRangePicker/FilterDateRangePicker.types.d.ts +78 -0
  10. package/dist/src/DateTimeSelection/FilterDateRangePicker/FilterDateRangePicker.types.js +1 -0
  11. package/dist/src/DateTimeSelection/FilterDateRangePicker/index.d.ts +2 -0
  12. package/dist/src/DateTimeSelection/FilterDateRangePicker/index.js +1 -0
  13. package/dist/src/DateTimeSelection/FilterMonthPicker/FilterMonthPicker.d.ts +14 -0
  14. package/dist/src/DateTimeSelection/FilterMonthPicker/FilterMonthPicker.js +75 -0
  15. package/dist/src/DateTimeSelection/FilterMonthPicker/FilterMonthPicker.types.d.ts +83 -0
  16. package/dist/src/DateTimeSelection/FilterMonthPicker/FilterMonthPicker.types.js +1 -0
  17. package/dist/src/DateTimeSelection/FilterMonthPicker/MonthPickerPopover/MonthPickerPopover.d.ts +6 -0
  18. package/dist/src/DateTimeSelection/FilterMonthPicker/MonthPickerPopover/MonthPickerPopover.js +45 -0
  19. package/dist/src/DateTimeSelection/FilterMonthPicker/MonthPickerPopover/MonthPickerPopover.types.d.ts +24 -0
  20. package/dist/src/DateTimeSelection/FilterMonthPicker/MonthPickerPopover/MonthPickerPopover.types.js +1 -0
  21. package/dist/src/DateTimeSelection/FilterMonthPicker/index.d.ts +2 -0
  22. package/dist/src/DateTimeSelection/FilterMonthPicker/index.js +1 -0
  23. package/dist/src/DateTimeSelection/FilterMonthRangePicker/FilterMonthRangePicker.d.ts +15 -0
  24. package/dist/src/DateTimeSelection/FilterMonthRangePicker/FilterMonthRangePicker.js +89 -0
  25. package/dist/src/DateTimeSelection/FilterMonthRangePicker/FilterMonthRangePicker.types.d.ts +75 -0
  26. package/dist/src/DateTimeSelection/FilterMonthRangePicker/FilterMonthRangePicker.types.js +1 -0
  27. package/dist/src/DateTimeSelection/FilterMonthRangePicker/MonthRangePickerPopover/MonthRangePickerPopover.d.ts +5 -0
  28. package/dist/src/DateTimeSelection/FilterMonthRangePicker/MonthRangePickerPopover/MonthRangePickerPopover.js +54 -0
  29. package/dist/src/DateTimeSelection/FilterMonthRangePicker/MonthRangePickerPopover/MonthRangePickerPopover.types.d.ts +19 -0
  30. package/dist/src/DateTimeSelection/FilterMonthRangePicker/MonthRangePickerPopover/MonthRangePickerPopover.types.js +1 -0
  31. package/dist/src/DateTimeSelection/FilterMonthRangePicker/index.d.ts +2 -0
  32. package/dist/src/DateTimeSelection/FilterMonthRangePicker/index.js +1 -0
  33. package/dist/src/DateTimeSelection/MonthRangePicker/MonthRangePicker.js +1 -1
  34. package/dist/src/DateTimeSelection/index.d.ts +3 -0
  35. package/dist/src/DateTimeSelection/index.js +3 -0
  36. package/dist/src/DateTimeSelection/shared/BaseRangePicker/BaseRangePicker.d.ts +1 -1
  37. package/dist/src/DateTimeSelection/shared/BaseRangePicker/BaseRangePicker.js +26 -10
  38. package/dist/src/DateTimeSelection/shared/BaseRangePicker/BaseRangePicker.types.d.ts +9 -0
  39. package/dist/src/DateTimeSelection/shared/BaseRangePicker/BaseRangePickerProvider/BaseRangePickerProvider.js +32 -15
  40. package/dist/src/DateTimeSelection/shared/BaseRangePicker/BaseRangePickerProvider/BaseRangePickerProvider.types.d.ts +10 -0
  41. package/dist/src/DateTimeSelection/shared/BaseRangePicker/BaseRangePickerTrigger/BaseRangePickerTrigger.js +4 -6
  42. package/dist/src/DateTimeSelection/shared/BaseRangePicker/BaseRangePickerTrigger/hooks/useDateRangeTriggerValueController.js +4 -3
  43. package/dist/src/DateTimeSelection/shared/MonthGrid/MonthGrid.js +3 -3
  44. package/dist/src/DateTimeSelection/shared/utilities/dateParsing.js +11 -0
  45. package/dist/src/MultilineTextBox/index.d.ts +10 -2
  46. package/dist/src/MultilineTextBox/index.js +9 -1
  47. package/dist/src/MultipleSelectBox/MultipleSelectBoxTrigger/MultipleSelectBoxTrigger.js +1 -3
  48. package/dist/src/RadioButtonCard/RadioButtonCard.js +1 -7
  49. package/dist/src/TextBox/TextBox.js +2 -6
  50. package/dist/src/{MultilineTextBox/MultilineTextBox.d.ts → Textarea/Textarea.d.ts} +5 -2
  51. package/dist/src/{MultilineTextBox/MultilineTextBox.js → Textarea/Textarea.js} +9 -5
  52. package/dist/src/{MultilineTextBox/MultilineTextBox.types.d.ts → Textarea/Textarea.types.d.ts} +2 -2
  53. package/dist/src/Textarea/Textarea.types.js +1 -0
  54. package/dist/src/Textarea/index.d.ts +2 -0
  55. package/dist/src/Textarea/index.js +1 -0
  56. package/dist/src/Tooltip/Tooltip.js +12 -3
  57. package/dist/src/Typography/Typography.js +1 -3
  58. package/dist/src/index.d.ts +1 -0
  59. package/dist/src/index.js +1 -0
  60. package/dist/styled-system/recipes/filter-date-range-picker-slot-recipe.d.ts +33 -0
  61. package/dist/styled-system/recipes/filter-date-range-picker-slot-recipe.js +48 -0
  62. package/dist/styled-system/recipes/filter-month-picker-slot-recipe.d.ts +33 -0
  63. package/dist/styled-system/recipes/filter-month-picker-slot-recipe.js +44 -0
  64. package/dist/styled-system/recipes/filter-month-range-picker-slot-recipe.d.ts +33 -0
  65. package/dist/styled-system/recipes/filter-month-range-picker-slot-recipe.js +44 -0
  66. package/dist/styled-system/recipes/index.d.ts +4 -1
  67. package/dist/styled-system/recipes/index.js +4 -1
  68. package/dist/styled-system/recipes/textarea-slot-recipe.d.ts +52 -0
  69. package/dist/styled-system/recipes/textarea-slot-recipe.js +64 -0
  70. package/dist/styles.css +433 -24
  71. package/dist/tsconfig.build.tsbuildinfo +1 -1
  72. package/package.json +11 -9
  73. package/dist/styled-system/recipes/multiline-text-box-slot-recipe.d.ts +0 -52
  74. package/dist/styled-system/recipes/multiline-text-box-slot-recipe.js +0 -64
  75. /package/dist/src/{MultilineTextBox/MultilineTextBox.types.js → DateTimeSelection/FilterDateRangePicker/DateRangePickerContent/DateRangePickerContent.types.js} +0 -0
@@ -48,8 +48,6 @@ placeholder, renderDisplayValue, updateSelectedValues, clearButtonProps, disable
48
48
  .map((option) => option.value)
49
49
  .filter((v) => v != null)
50
50
  .map(String);
51
- return (
52
- // use div element instead of button element to prevent the nested button element when the selected options are rendered as tag list
53
- _jsx(FocusIndicator, { children: _jsxs("div", { ref: wrapperRef, className: cx(classes.wrapper, 'mfui-MultipleSelectBoxTrigger__wrapper', triggerWrapperProps?.className), children: [_jsx("button", { ref: mergeRefs(ref, triggerRef), type: "button", role: "combobox", "aria-controls": listBoxId, "aria-expanded": isOptionPanelOpen, "aria-haspopup": "listbox", "aria-invalid": invalid, value: selectedValues, disabled: disabled, onKeyDown: onKeyDown, onBlur: onBlur, ...rest, ...triggerProps, className: cx(classes.trigger, 'mfui-MultipleSelectBoxTrigger__trigger', triggerProps?.className) }), _jsx("input", { type: "hidden", name: name, value: selectedValues }), _jsx("div", { className: cx(classes.displayValues, 'mfui-MultipleSelectBoxTrigger__displayValues'), "data-mfui-content": "multiple-select-box-trigger-display-values", children: renderer() }), selectedOptions.length > 0 && !disabled && !disableClearButton ? (_jsx("div", { className: cx(classes.clearButtonContainer, 'mfui-MultipleSelectBoxTrigger__clearButtonContainer'), children: _jsx(ClearButton, { size: size === 'small' ? 'small' : 'default', className: cx(classes.clearButton, 'mfui-MultipleSelectBoxTrigger__clearButton'), "aria-label": clearButtonProps?.['aria-label'] ?? '値をクリアする', "data-mfui-content": "multiple-select-box-clear-button", onClick: handleClearValue }) })) : null, _jsx("div", { className: cx(classes.dropdownIconContainer, 'mfui-MultipleSelectBoxTrigger__dropdownIconContainer'), children: _jsx(DropdownIcon, { className: cx(classes.dropdownIcon, 'mfui-MultipleSelectBoxTrigger__dropdownIcon') }) })] }) }));
51
+ return (_jsx(FocusIndicator, { children: _jsxs("div", { ref: wrapperRef, className: cx(classes.wrapper, 'mfui-MultipleSelectBoxTrigger__wrapper', triggerWrapperProps?.className), children: [_jsx("button", { ref: mergeRefs(ref, triggerRef), type: "button", role: "combobox", "aria-controls": listBoxId, "aria-expanded": isOptionPanelOpen, "aria-haspopup": "listbox", "aria-invalid": invalid, value: selectedValues, disabled: disabled, onKeyDown: onKeyDown, onBlur: onBlur, ...rest, ...triggerProps, className: cx(classes.trigger, 'mfui-MultipleSelectBoxTrigger__trigger', triggerProps?.className) }), _jsx("input", { type: "hidden", name: name, value: selectedValues }), _jsx("div", { className: cx(classes.displayValues, 'mfui-MultipleSelectBoxTrigger__displayValues'), "data-mfui-content": "multiple-select-box-trigger-display-values", children: renderer() }), selectedOptions.length > 0 && !disabled && !disableClearButton ? (_jsx("div", { className: cx(classes.clearButtonContainer, 'mfui-MultipleSelectBoxTrigger__clearButtonContainer'), children: _jsx(ClearButton, { size: size === 'small' ? 'small' : 'default', className: cx(classes.clearButton, 'mfui-MultipleSelectBoxTrigger__clearButton'), "aria-label": clearButtonProps?.['aria-label'] ?? '値をクリアする', "data-mfui-content": "multiple-select-box-clear-button", onClick: handleClearValue }) })) : null, _jsx("div", { className: cx(classes.dropdownIconContainer, 'mfui-MultipleSelectBoxTrigger__dropdownIconContainer'), children: _jsx(DropdownIcon, { className: cx(classes.dropdownIcon, 'mfui-MultipleSelectBoxTrigger__dropdownIcon') }) })] }) }));
54
52
  }
55
53
  export const MultipleSelectBoxTrigger = forwardRef(MultipleSelectBoxTriggerInner);
@@ -28,11 +28,5 @@ export const RadioButtonCard = forwardRef(({ label, layout = 'vertical', renderD
28
28
  disableResponsive,
29
29
  isResponsive: Boolean(responsiveSlot.narrowViewport),
30
30
  });
31
- return (_jsxs("div", { className: cx(classes.root, 'mfui-RadioButtonCard__root', className), children: [_jsx(FocusIndicator, { disableNestedFocus: true, children: _jsxs(Typography, { variant: "label", className: cx(classes.inputWrapper, 'mfui-RadioButtonCard__inputWrapper'), as: "label", htmlFor: props.id, children: [_jsx(RadioButton, { ref: ref, ...props, className: cx(classes.input, 'mfui-RadioButtonCard__input') }), _jsx("span", { className: cx(classes.label, 'mfui-RadioButtonCard__label'), children: label })] }) }), responsiveSlot.narrowViewport && disableResponsive ? (
32
- /* When responsive is disabled, render single element but with both contents using CSS for switching */
33
- _jsxs(_Fragment, { children: [_jsx("div", { "data-mfui-content": "details", className: cx(classes.details, classes.detailsWide, 'mfui-RadioButtonCard__details'), children: responsiveSlot.base(radioButtonState) }), _jsx("div", { "data-mfui-content": "details", className: cx(classes.details, classes.detailsNarrow, 'mfui-RadioButtonCard__details'), children: responsiveSlot.narrowViewport(radioButtonState) })] })) : responsiveSlot.narrowViewport ? (
34
- /* When responsive is enabled, render separate wide/narrow elements */
35
- _jsxs(_Fragment, { children: [_jsx("div", { "data-mfui-content": "details", className: cx(classes.details, classes.detailsWide, 'mfui-RadioButtonCard__details'), children: responsiveSlot.base(radioButtonState) }), _jsx("div", { "data-mfui-content": "details", className: cx(classes.details, classes.detailsNarrow, 'mfui-RadioButtonCard__details'), children: responsiveSlot.narrowViewport(radioButtonState) })] })) : responsiveSlot.base ? (
36
- /* For function-based renderDetailsSlot or ResponsiveSlot with only base, use single details element */
37
- _jsx("div", { "data-mfui-content": "details", className: cx(classes.details, 'mfui-RadioButtonCard__details'), children: responsiveSlot.base(radioButtonState) })) : null] }));
31
+ return (_jsxs("div", { className: cx(classes.root, 'mfui-RadioButtonCard__root', className), children: [_jsx(FocusIndicator, { disableNestedFocus: true, children: _jsxs(Typography, { variant: "label", className: cx(classes.inputWrapper, 'mfui-RadioButtonCard__inputWrapper'), as: "label", htmlFor: props.id, children: [_jsx(RadioButton, { ref: ref, ...props, className: cx(classes.input, 'mfui-RadioButtonCard__input') }), _jsx("span", { className: cx(classes.label, 'mfui-RadioButtonCard__label'), children: label })] }) }), responsiveSlot.narrowViewport && disableResponsive ? (_jsxs(_Fragment, { children: [_jsx("div", { "data-mfui-content": "details", className: cx(classes.details, classes.detailsWide, 'mfui-RadioButtonCard__details'), children: responsiveSlot.base(radioButtonState) }), _jsx("div", { "data-mfui-content": "details", className: cx(classes.details, classes.detailsNarrow, 'mfui-RadioButtonCard__details'), children: responsiveSlot.narrowViewport(radioButtonState) })] })) : responsiveSlot.narrowViewport ? (_jsxs(_Fragment, { children: [_jsx("div", { "data-mfui-content": "details", className: cx(classes.details, classes.detailsWide, 'mfui-RadioButtonCard__details'), children: responsiveSlot.base(radioButtonState) }), _jsx("div", { "data-mfui-content": "details", className: cx(classes.details, classes.detailsNarrow, 'mfui-RadioButtonCard__details'), children: responsiveSlot.narrowViewport(radioButtonState) })] })) : responsiveSlot.base ? (_jsx("div", { "data-mfui-content": "details", className: cx(classes.details, 'mfui-RadioButtonCard__details'), children: responsiveSlot.base(radioButtonState) })) : null] }));
38
32
  });
@@ -41,11 +41,7 @@ export const TextBox = forwardRef(({ enableClearButton = false, onClear, invalid
41
41
  }, [onClear, shouldUseTouchDeviceMode]);
42
42
  // Get the display value for touch device mode
43
43
  const displayValue = (inputProps.value ?? inputProps.defaultValue ?? '');
44
- return shouldUseTouchDeviceMode ? (
45
- // Touch device: wrapper + hidden input + display div
46
- _jsxs("div", { ...wrapperProps, className: cx(classes.root, 'mfui-TextBox__root', wrapperProps.className), children: [_jsx("input", { type: "hidden", value: displayValue, name: inputProps.name }), prefixSlot ? _jsx("div", { className: cx(classes.prefix, 'mfui-TextBox__prefix'), children: prefixSlot }) : null, _jsx("div", { className: cx(classes.input, 'mfui-TextBox__input'), children: displayValue || inputProps.placeholder }), shouldShowClearButton ? (_jsx(ClearButton, { size: textBoxSize === 'small' ? 'small' : textBoxSize === 'large' ? 'large' : 'default', "aria-label": clearButtonProps?.['aria-label'] ?? '値をクリアする', className: cx(classes.clearButton, 'mfui-TextBox__clearButton'), disabled: disabled, onClick: (event) => {
44
+ return shouldUseTouchDeviceMode ? (_jsxs("div", { ...wrapperProps, className: cx(classes.root, 'mfui-TextBox__root', wrapperProps.className), children: [_jsx("input", { type: "hidden", value: displayValue, name: inputProps.name }), prefixSlot ? _jsx("div", { className: cx(classes.prefix, 'mfui-TextBox__prefix'), children: prefixSlot }) : null, _jsx("div", { className: cx(classes.input, 'mfui-TextBox__input'), children: displayValue || inputProps.placeholder }), shouldShowClearButton ? (_jsx(ClearButton, { size: textBoxSize === 'small' ? 'small' : textBoxSize === 'large' ? 'large' : 'default', "aria-label": clearButtonProps?.['aria-label'] ?? '値をクリアする', className: cx(classes.clearButton, 'mfui-TextBox__clearButton'), disabled: disabled, onClick: (event) => {
47
45
  onClear?.(event);
48
- } })) : null, suffixSlot ? _jsx("div", { className: cx(classes.suffix, 'mfui-TextBox__suffix'), children: suffixSlot }) : null] })) : (
49
- // Desktop: Standard input with FocusIndicator
50
- _jsx(FocusIndicator, { children: _jsxs("div", { ...wrapperProps, className: cx(classes.root, 'mfui-TextBox__root', wrapperProps.className), children: [prefixSlot ? _jsx("div", { className: cx(classes.prefix, 'mfui-TextBox__prefix'), children: prefixSlot }) : null, _jsx("input", { ref: mergedInputRef, disabled: disabled, ...inputProps, className: cx(classes.input, 'mfui-TextBox__input', inputProps.className), onChange: handleChange, onInput: handleInput }), shouldShowClearButton ? (_jsx(ClearButton, { size: textBoxSize === 'small' ? 'small' : textBoxSize === 'large' ? 'large' : 'default', "aria-label": clearButtonProps?.['aria-label'] ?? '値をクリアする', className: cx(classes.clearButton, 'mfui-TextBox__clearButton'), disabled: disabled, onClick: onClickClear })) : null, suffixSlot ? _jsx("div", { className: cx(classes.suffix, 'mfui-TextBox__suffix'), children: suffixSlot }) : null] }) }));
46
+ } })) : null, suffixSlot ? _jsx("div", { className: cx(classes.suffix, 'mfui-TextBox__suffix'), children: suffixSlot }) : null] })) : (_jsx(FocusIndicator, { children: _jsxs("div", { ...wrapperProps, className: cx(classes.root, 'mfui-TextBox__root', wrapperProps.className), children: [prefixSlot ? _jsx("div", { className: cx(classes.prefix, 'mfui-TextBox__prefix'), children: prefixSlot }) : null, _jsx("input", { ref: mergedInputRef, disabled: disabled, ...inputProps, className: cx(classes.input, 'mfui-TextBox__input', inputProps.className), onChange: handleChange, onInput: handleInput }), shouldShowClearButton ? (_jsx(ClearButton, { size: textBoxSize === 'small' ? 'small' : textBoxSize === 'large' ? 'large' : 'default', "aria-label": clearButtonProps?.['aria-label'] ?? '値をクリアする', className: cx(classes.clearButton, 'mfui-TextBox__clearButton'), disabled: disabled, onClick: onClickClear })) : null, suffixSlot ? _jsx("div", { className: cx(classes.suffix, 'mfui-TextBox__suffix'), children: suffixSlot }) : null] }) }));
51
47
  });
@@ -1,12 +1,15 @@
1
1
  /**
2
- * The general-purpose TextBox component.
2
+ * The general-purpose Textarea component.
3
3
  * This component switches the variants of looks and behaviors depends on the props: size, invalid, disabled.
4
4
  *
5
5
  * Also extends the props of `<textarea>` element
6
6
  *
7
+ * > **Migration note**: `MultilineTextBox` has been renamed to `Textarea`.
8
+ * > Please migrate to `Textarea`. `MultilineTextBox` will be removed in a future major version (v5.0.0).
9
+ *
7
10
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
8
11
  */
9
- export declare const MultilineTextBox: import("react").ForwardRefExoticComponent<{
12
+ export declare const Textarea: import("react").ForwardRefExoticComponent<{
10
13
  invalid?: import("../../styled-system/recipes").TextBoxSlotRecipeVariant["invalid"];
11
14
  size?: import("../../styled-system/recipes").TextBoxSlotRecipeVariant["size"];
12
15
  disabled?: import("../../styled-system/recipes").TextBoxSlotRecipeVariant["disabled"];
@@ -1,22 +1,25 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useRef, useCallback, useEffect } from 'react';
3
3
  import { cx } from '../../styled-system/css';
4
- import { multilineTextBoxSlotRecipe } from '../../styled-system/recipes';
4
+ import { textareaSlotRecipe } from '../../styled-system/recipes';
5
5
  import { FocusIndicator } from '../FocusIndicator';
6
6
  import { mergeRefs } from '../utilities/dom/mergeRefs';
7
7
  /**
8
- * The general-purpose TextBox component.
8
+ * The general-purpose Textarea component.
9
9
  * This component switches the variants of looks and behaviors depends on the props: size, invalid, disabled.
10
10
  *
11
11
  * Also extends the props of `<textarea>` element
12
12
  *
13
+ * > **Migration note**: `MultilineTextBox` has been renamed to `Textarea`.
14
+ * > Please migrate to `Textarea`. `MultilineTextBox` will be removed in a future major version (v5.0.0).
15
+ *
13
16
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
14
17
  */
15
- export const MultilineTextBox = forwardRef(({ invalid = false, size = 'medium', disabled = false, rows = 1, enableAutoResize = false, resize = 'both', onChange, ...props }, ref) => {
18
+ export const Textarea = forwardRef(({ invalid = false, size = 'medium', disabled = false, rows = 1, enableAutoResize = false, resize = 'both', onChange, ...props }, ref) => {
16
19
  const localRef = useRef(null);
17
20
  // When enableAutoResize is true, force resize to 'none' to prevent conflicts
18
21
  const effectiveResize = enableAutoResize ? 'none' : resize;
19
- const classes = multilineTextBoxSlotRecipe({ size, disabled, invalid, enableAutoResize, resize: effectiveResize });
22
+ const classes = textareaSlotRecipe({ size, disabled, invalid, enableAutoResize, resize: effectiveResize });
20
23
  const adjustHeight = useCallback(() => {
21
24
  if (!enableAutoResize || !localRef.current)
22
25
  return;
@@ -47,5 +50,6 @@ export const MultilineTextBox = forwardRef(({ invalid = false, size = 'medium',
47
50
  adjustHeight();
48
51
  }
49
52
  }, [enableAutoResize, adjustHeight]);
50
- return (_jsx(FocusIndicator, { children: _jsx("textarea", { ref: mergeRefs(ref, localRef), ...props, rows: rows, className: cx(classes.root, 'mfui-MultilineTextBox__root', props.className), disabled: disabled, onChange: handleChange }) }));
53
+ return (_jsx(FocusIndicator, { children: _jsx("textarea", { ref: mergeRefs(ref, localRef), ...props, rows: rows, className: cx(classes.root, 'mfui-Textarea__root',
54
+ /* TODO: Remove in v5.0.0 */ 'mfui-MultilineTextBox__root', props.className), disabled: disabled, onChange: handleChange }) }));
51
55
  });
@@ -1,9 +1,9 @@
1
1
  import { type ComponentPropsWithoutRef } from 'react';
2
2
  import { type TextBoxSlotRecipeVariant } from '../../styled-system/recipes';
3
3
  /**
4
- * The props for the MultilineTextBox component.
4
+ * The props for the Textarea component.
5
5
  */
6
- export type MultilineTextBoxProps = {
6
+ export type TextareaProps = {
7
7
  /**
8
8
  * Whether the textarea is invalid or not.
9
9
  * This will change the style of the text box.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Textarea } from './Textarea';
2
+ export type { TextareaProps } from './Textarea.types';
@@ -0,0 +1 @@
1
+ export { Textarea } from './Textarea';
@@ -79,7 +79,16 @@ export const Tooltip = forwardRef(({ children, open, onOpenStateChanged, content
79
79
  }, [calculatedOpen, closeImmediate]);
80
80
  const triggerRef = mergeRefs(setTriggerReference, rootRef, ref);
81
81
  const classes = tooltipSlotRecipe();
82
- return (_jsxs(_Fragment, { children: [_jsx("div", { ref: triggerRef, ...wrapperProps, className: cx(classes.root, 'mfui-Tooltip__root', className), ...rootAttributes, children: isValidElement(children) ? (cloneElement(children, calculatedOpen && !hideFromScreenReader
83
- ? { 'aria-describedby': tooltipId }
84
- : undefined)) : (_jsx("span", { ...(calculatedOpen && !hideFromScreenReader ? { 'aria-describedby': tooltipId } : undefined), children: children })) }), calculatedOpen ? (_jsx(Portal, { targetDOMNode: targetElement, children: _jsxs("div", { ref: setTooltipReference, className: cx(classes.tooltip, 'mfui-Tooltip__tooltip', contentProps?.className), role: "tooltip", id: tooltipId, "aria-hidden": hideFromScreenReader ? true : undefined, style: { maxWidth, ...tooltipStyles }, ...tooltipAttributes, children: [typeof content === 'string' ? _jsx(Typography, { variant: "helpMessage", children: content }) : content, _jsx(ArrowIcon, { ref: arrowRef, "aria-hidden": true, placement: calculatedPlacement, className: cx(classes.arrow, 'mfui-Tooltip__arrow'), style: arrowStyles })] }) })) : null] }));
82
+ const ariaDescribedBy = !hideFromScreenReader && content != null ? tooltipId : undefined;
83
+ return (_jsxs(_Fragment, { children: [_jsx("div", { ref: triggerRef, ...wrapperProps, className: cx(classes.root, 'mfui-Tooltip__root', className), ...rootAttributes, children: isValidElement(children) ? (cloneElement(children, ariaDescribedBy ? { 'aria-describedby': ariaDescribedBy } : undefined)) : (_jsx("span", { ...(ariaDescribedBy ? { 'aria-describedby': ariaDescribedBy } : undefined), children: children })) }), !calculatedOpen && !hideFromScreenReader && content != null && (_jsx(Portal, { targetDOMNode: targetElement, children: _jsx("div", { "data-mfui-tooltip-hidden": true, id: tooltipId, style: {
84
+ position: 'absolute',
85
+ width: '1px',
86
+ height: '1px',
87
+ padding: 0,
88
+ margin: '-1px',
89
+ overflow: 'hidden',
90
+ clip: 'rect(0, 0, 0, 0)',
91
+ whiteSpace: 'nowrap',
92
+ borderWidth: 0,
93
+ }, children: content }) })), calculatedOpen ? (_jsx(Portal, { targetDOMNode: targetElement, children: _jsxs("div", { ref: setTooltipReference, className: cx(classes.tooltip, 'mfui-Tooltip__tooltip', contentProps?.className), role: "tooltip", id: tooltipId, "aria-hidden": hideFromScreenReader ? true : undefined, style: { maxWidth, ...tooltipStyles }, ...tooltipAttributes, children: [typeof content === 'string' ? _jsx(Typography, { variant: "helpMessage", children: content }) : content, _jsx(ArrowIcon, { ref: arrowRef, "aria-hidden": true, placement: calculatedPlacement, className: cx(classes.arrow, 'mfui-Tooltip__arrow'), style: arrowStyles })] }) })) : null] }));
85
94
  });
@@ -21,9 +21,7 @@ function InternalTypography(props, ref) {
21
21
  return variant.startsWith('strong') ? 'strong' : 'span';
22
22
  }, [variant, tag, rest.href]);
23
23
  const classes = typographySlotRecipe({ variant });
24
- return (
25
- // @ts-expect-error Ignore the error for ref due to the complexion.
26
- _jsx(Tag, { ref: ref, ...rest, className: cx(classes.root, 'mfui-Typography__root', className), children: children }));
24
+ return (_jsx(Tag, { ref: ref, ...rest, className: cx(classes.root, 'mfui-Typography__root', className), children: children }));
27
25
  }
28
26
  /**
29
27
  *
@@ -50,6 +50,7 @@ export * from './StatusLabel';
50
50
  export * from './SubNavigation';
51
51
  export * from './Tabs';
52
52
  export * from './Tag';
53
+ export * from './Textarea';
53
54
  export * from './TextBox';
54
55
  export * from './TextLink';
55
56
  export * from './Toast';
package/dist/src/index.js CHANGED
@@ -50,6 +50,7 @@ export * from './StatusLabel';
50
50
  export * from './SubNavigation';
51
51
  export * from './Tabs';
52
52
  export * from './Tag';
53
+ export * from './Textarea';
53
54
  export * from './TextBox';
54
55
  export * from './TextLink';
55
56
  export * from './Toast';
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface FilterDateRangePickerSlotRecipeVariant {
6
+
7
+ }
8
+
9
+ type FilterDateRangePickerSlotRecipeVariantMap = {
10
+ [key in keyof FilterDateRangePickerSlotRecipeVariant]: Array<FilterDateRangePickerSlotRecipeVariant[key]>
11
+ }
12
+
13
+ type FilterDateRangePickerSlotRecipeSlot = "wrapper" | "trigger" | "content" | "calendarIcon" | "clearButtonWrapper" | "popoverWrapper"
14
+
15
+ export type FilterDateRangePickerSlotRecipeVariantProps = {
16
+ [key in keyof FilterDateRangePickerSlotRecipeVariant]?: ConditionalValue<FilterDateRangePickerSlotRecipeVariant[key]> | undefined
17
+ }
18
+
19
+ export interface FilterDateRangePickerSlotRecipeRecipe {
20
+ __slot: FilterDateRangePickerSlotRecipeSlot
21
+ __type: FilterDateRangePickerSlotRecipeVariantProps
22
+ (props?: FilterDateRangePickerSlotRecipeVariantProps): Pretty<Record<FilterDateRangePickerSlotRecipeSlot, string>>
23
+ raw: (props?: FilterDateRangePickerSlotRecipeVariantProps) => FilterDateRangePickerSlotRecipeVariantProps
24
+ variantMap: FilterDateRangePickerSlotRecipeVariantMap
25
+ variantKeys: Array<keyof FilterDateRangePickerSlotRecipeVariant>
26
+ splitVariantProps<Props extends FilterDateRangePickerSlotRecipeVariantProps>(props: Props): [FilterDateRangePickerSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof FilterDateRangePickerSlotRecipeVariantProps>>]
27
+ getVariantProps: (props?: FilterDateRangePickerSlotRecipeVariantProps) => FilterDateRangePickerSlotRecipeVariantProps
28
+ }
29
+
30
+ /**
31
+ * Slot class created for the MFUI FilterDateRangePicker component.
32
+ */
33
+ export declare const filterDateRangePickerSlotRecipe: FilterDateRangePickerSlotRecipeRecipe
@@ -0,0 +1,48 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
+ import { createRecipe } from './create-recipe.js';
3
+ const filterDateRangePickerSlotRecipeDefaultVariants = {};
4
+ const filterDateRangePickerSlotRecipeCompoundVariants = [];
5
+ const filterDateRangePickerSlotRecipeSlotNames = [
6
+ [
7
+ "wrapper",
8
+ "FilterDateRangePicker__wrapper"
9
+ ],
10
+ [
11
+ "trigger",
12
+ "FilterDateRangePicker__trigger"
13
+ ],
14
+ [
15
+ "content",
16
+ "FilterDateRangePicker__content"
17
+ ],
18
+ [
19
+ "calendarIcon",
20
+ "FilterDateRangePicker__calendarIcon"
21
+ ],
22
+ [
23
+ "clearButtonWrapper",
24
+ "FilterDateRangePicker__clearButtonWrapper"
25
+ ],
26
+ [
27
+ "popoverWrapper",
28
+ "FilterDateRangePicker__popoverWrapper"
29
+ ]
30
+ ];
31
+ const filterDateRangePickerSlotRecipeSlotFns = /* @__PURE__ */ filterDateRangePickerSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, filterDateRangePickerSlotRecipeDefaultVariants, getSlotCompoundVariant(filterDateRangePickerSlotRecipeCompoundVariants, slotName))]);
32
+ const filterDateRangePickerSlotRecipeFn = memo((props = {}) => {
33
+ return Object.fromEntries(filterDateRangePickerSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
34
+ });
35
+ const filterDateRangePickerSlotRecipeVariantKeys = [];
36
+ const getVariantProps = (variants) => ({ ...filterDateRangePickerSlotRecipeDefaultVariants, ...compact(variants) });
37
+ export const filterDateRangePickerSlotRecipe = /* @__PURE__ */ Object.assign(filterDateRangePickerSlotRecipeFn, {
38
+ __recipe__: false,
39
+ __name__: 'filterDateRangePickerSlotRecipe',
40
+ raw: (props) => props,
41
+ classNameMap: {},
42
+ variantKeys: filterDateRangePickerSlotRecipeVariantKeys,
43
+ variantMap: {},
44
+ splitVariantProps(props) {
45
+ return splitProps(props, filterDateRangePickerSlotRecipeVariantKeys);
46
+ },
47
+ getVariantProps
48
+ });
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface FilterMonthPickerSlotRecipeVariant {
6
+
7
+ }
8
+
9
+ type FilterMonthPickerSlotRecipeVariantMap = {
10
+ [key in keyof FilterMonthPickerSlotRecipeVariant]: Array<FilterMonthPickerSlotRecipeVariant[key]>
11
+ }
12
+
13
+ type FilterMonthPickerSlotRecipeSlot = "wrapper" | "trigger" | "content" | "calendarIcon" | "clearButtonWrapper"
14
+
15
+ export type FilterMonthPickerSlotRecipeVariantProps = {
16
+ [key in keyof FilterMonthPickerSlotRecipeVariant]?: ConditionalValue<FilterMonthPickerSlotRecipeVariant[key]> | undefined
17
+ }
18
+
19
+ export interface FilterMonthPickerSlotRecipeRecipe {
20
+ __slot: FilterMonthPickerSlotRecipeSlot
21
+ __type: FilterMonthPickerSlotRecipeVariantProps
22
+ (props?: FilterMonthPickerSlotRecipeVariantProps): Pretty<Record<FilterMonthPickerSlotRecipeSlot, string>>
23
+ raw: (props?: FilterMonthPickerSlotRecipeVariantProps) => FilterMonthPickerSlotRecipeVariantProps
24
+ variantMap: FilterMonthPickerSlotRecipeVariantMap
25
+ variantKeys: Array<keyof FilterMonthPickerSlotRecipeVariant>
26
+ splitVariantProps<Props extends FilterMonthPickerSlotRecipeVariantProps>(props: Props): [FilterMonthPickerSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof FilterMonthPickerSlotRecipeVariantProps>>]
27
+ getVariantProps: (props?: FilterMonthPickerSlotRecipeVariantProps) => FilterMonthPickerSlotRecipeVariantProps
28
+ }
29
+
30
+ /**
31
+ * Slot class created for the MFUI FilterMonthPicker component.
32
+ */
33
+ export declare const filterMonthPickerSlotRecipe: FilterMonthPickerSlotRecipeRecipe
@@ -0,0 +1,44 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
+ import { createRecipe } from './create-recipe.js';
3
+ const filterMonthPickerSlotRecipeDefaultVariants = {};
4
+ const filterMonthPickerSlotRecipeCompoundVariants = [];
5
+ const filterMonthPickerSlotRecipeSlotNames = [
6
+ [
7
+ "wrapper",
8
+ "FilterMonthPicker__wrapper"
9
+ ],
10
+ [
11
+ "trigger",
12
+ "FilterMonthPicker__trigger"
13
+ ],
14
+ [
15
+ "content",
16
+ "FilterMonthPicker__content"
17
+ ],
18
+ [
19
+ "calendarIcon",
20
+ "FilterMonthPicker__calendarIcon"
21
+ ],
22
+ [
23
+ "clearButtonWrapper",
24
+ "FilterMonthPicker__clearButtonWrapper"
25
+ ]
26
+ ];
27
+ const filterMonthPickerSlotRecipeSlotFns = /* @__PURE__ */ filterMonthPickerSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, filterMonthPickerSlotRecipeDefaultVariants, getSlotCompoundVariant(filterMonthPickerSlotRecipeCompoundVariants, slotName))]);
28
+ const filterMonthPickerSlotRecipeFn = memo((props = {}) => {
29
+ return Object.fromEntries(filterMonthPickerSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
30
+ });
31
+ const filterMonthPickerSlotRecipeVariantKeys = [];
32
+ const getVariantProps = (variants) => ({ ...filterMonthPickerSlotRecipeDefaultVariants, ...compact(variants) });
33
+ export const filterMonthPickerSlotRecipe = /* @__PURE__ */ Object.assign(filterMonthPickerSlotRecipeFn, {
34
+ __recipe__: false,
35
+ __name__: 'filterMonthPickerSlotRecipe',
36
+ raw: (props) => props,
37
+ classNameMap: {},
38
+ variantKeys: filterMonthPickerSlotRecipeVariantKeys,
39
+ variantMap: {},
40
+ splitVariantProps(props) {
41
+ return splitProps(props, filterMonthPickerSlotRecipeVariantKeys);
42
+ },
43
+ getVariantProps
44
+ });
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface FilterMonthRangePickerSlotRecipeVariant {
6
+
7
+ }
8
+
9
+ type FilterMonthRangePickerSlotRecipeVariantMap = {
10
+ [key in keyof FilterMonthRangePickerSlotRecipeVariant]: Array<FilterMonthRangePickerSlotRecipeVariant[key]>
11
+ }
12
+
13
+ type FilterMonthRangePickerSlotRecipeSlot = "wrapper" | "trigger" | "content" | "calendarIcon" | "clearButtonWrapper"
14
+
15
+ export type FilterMonthRangePickerSlotRecipeVariantProps = {
16
+ [key in keyof FilterMonthRangePickerSlotRecipeVariant]?: ConditionalValue<FilterMonthRangePickerSlotRecipeVariant[key]> | undefined
17
+ }
18
+
19
+ export interface FilterMonthRangePickerSlotRecipeRecipe {
20
+ __slot: FilterMonthRangePickerSlotRecipeSlot
21
+ __type: FilterMonthRangePickerSlotRecipeVariantProps
22
+ (props?: FilterMonthRangePickerSlotRecipeVariantProps): Pretty<Record<FilterMonthRangePickerSlotRecipeSlot, string>>
23
+ raw: (props?: FilterMonthRangePickerSlotRecipeVariantProps) => FilterMonthRangePickerSlotRecipeVariantProps
24
+ variantMap: FilterMonthRangePickerSlotRecipeVariantMap
25
+ variantKeys: Array<keyof FilterMonthRangePickerSlotRecipeVariant>
26
+ splitVariantProps<Props extends FilterMonthRangePickerSlotRecipeVariantProps>(props: Props): [FilterMonthRangePickerSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof FilterMonthRangePickerSlotRecipeVariantProps>>]
27
+ getVariantProps: (props?: FilterMonthRangePickerSlotRecipeVariantProps) => FilterMonthRangePickerSlotRecipeVariantProps
28
+ }
29
+
30
+ /**
31
+ * Slot class created for the MFUI FilterMonthRangePicker component.
32
+ */
33
+ export declare const filterMonthRangePickerSlotRecipe: FilterMonthRangePickerSlotRecipeRecipe
@@ -0,0 +1,44 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
+ import { createRecipe } from './create-recipe.js';
3
+ const filterMonthRangePickerSlotRecipeDefaultVariants = {};
4
+ const filterMonthRangePickerSlotRecipeCompoundVariants = [];
5
+ const filterMonthRangePickerSlotRecipeSlotNames = [
6
+ [
7
+ "wrapper",
8
+ "FilterMonthRangePicker__wrapper"
9
+ ],
10
+ [
11
+ "trigger",
12
+ "FilterMonthRangePicker__trigger"
13
+ ],
14
+ [
15
+ "content",
16
+ "FilterMonthRangePicker__content"
17
+ ],
18
+ [
19
+ "calendarIcon",
20
+ "FilterMonthRangePicker__calendarIcon"
21
+ ],
22
+ [
23
+ "clearButtonWrapper",
24
+ "FilterMonthRangePicker__clearButtonWrapper"
25
+ ]
26
+ ];
27
+ const filterMonthRangePickerSlotRecipeSlotFns = /* @__PURE__ */ filterMonthRangePickerSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, filterMonthRangePickerSlotRecipeDefaultVariants, getSlotCompoundVariant(filterMonthRangePickerSlotRecipeCompoundVariants, slotName))]);
28
+ const filterMonthRangePickerSlotRecipeFn = memo((props = {}) => {
29
+ return Object.fromEntries(filterMonthRangePickerSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
30
+ });
31
+ const filterMonthRangePickerSlotRecipeVariantKeys = [];
32
+ const getVariantProps = (variants) => ({ ...filterMonthRangePickerSlotRecipeDefaultVariants, ...compact(variants) });
33
+ export const filterMonthRangePickerSlotRecipe = /* @__PURE__ */ Object.assign(filterMonthRangePickerSlotRecipeFn, {
34
+ __recipe__: false,
35
+ __name__: 'filterMonthRangePickerSlotRecipe',
36
+ raw: (props) => props,
37
+ classNameMap: {},
38
+ variantKeys: filterMonthRangePickerSlotRecipeVariantKeys,
39
+ variantMap: {},
40
+ splitVariantProps(props) {
41
+ return splitProps(props, filterMonthRangePickerSlotRecipeVariantKeys);
42
+ },
43
+ getVariantProps
44
+ });
@@ -5,7 +5,7 @@ export * from './focus-indicator-slot-recipe';
5
5
  export * from './typography-slot-recipe';
6
6
  export * from './button-slot-recipe';
7
7
  export * from './text-link-slot-recipe';
8
- export * from './multiline-text-box-slot-recipe';
8
+ export * from './textarea-slot-recipe';
9
9
  export * from './section-message-slot-recipe';
10
10
  export * from './dropdown-menu-slot-recipe';
11
11
  export * from './dropdown-menu-container-slot-recipe';
@@ -78,6 +78,9 @@ export * from './file-drop-zone-slot-recipe';
78
78
  export * from './embedded-side-pane-slot-recipe';
79
79
  export * from './filter-trigger-slot-recipe';
80
80
  export * from './filter-date-picker-slot-recipe';
81
+ export * from './filter-date-range-picker-slot-recipe';
82
+ export * from './filter-month-picker-slot-recipe';
83
+ export * from './filter-month-range-picker-slot-recipe';
81
84
  export * from './display-table-body-slot-recipe';
82
85
  export * from './display-table-cell-slot-recipe';
83
86
  export * from './display-table-slot-recipe';
@@ -4,7 +4,7 @@ export * from './focus-indicator-slot-recipe.js';
4
4
  export * from './typography-slot-recipe.js';
5
5
  export * from './button-slot-recipe.js';
6
6
  export * from './text-link-slot-recipe.js';
7
- export * from './multiline-text-box-slot-recipe.js';
7
+ export * from './textarea-slot-recipe.js';
8
8
  export * from './section-message-slot-recipe.js';
9
9
  export * from './dropdown-menu-slot-recipe.js';
10
10
  export * from './dropdown-menu-container-slot-recipe.js';
@@ -77,6 +77,9 @@ export * from './file-drop-zone-slot-recipe.js';
77
77
  export * from './embedded-side-pane-slot-recipe.js';
78
78
  export * from './filter-trigger-slot-recipe.js';
79
79
  export * from './filter-date-picker-slot-recipe.js';
80
+ export * from './filter-date-range-picker-slot-recipe.js';
81
+ export * from './filter-month-picker-slot-recipe.js';
82
+ export * from './filter-month-range-picker-slot-recipe.js';
80
83
  export * from './display-table-body-slot-recipe.js';
81
84
  export * from './display-table-cell-slot-recipe.js';
82
85
  export * from './display-table-slot-recipe.js';
@@ -0,0 +1,52 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface TextareaSlotRecipeVariant {
6
+ /**
7
+ * @default "medium"
8
+ */
9
+ size: "small" | "medium" | "large"
10
+ /**
11
+ * @default false
12
+ */
13
+ disabled: boolean
14
+ /**
15
+ * @default false
16
+ */
17
+ invalid: boolean
18
+ /**
19
+ * @default false
20
+ */
21
+ enableAutoResize: boolean
22
+ /**
23
+ * @default "both"
24
+ */
25
+ resize: "none" | "vertical" | "horizontal" | "both"
26
+ }
27
+
28
+ type TextareaSlotRecipeVariantMap = {
29
+ [key in keyof TextareaSlotRecipeVariant]: Array<TextareaSlotRecipeVariant[key]>
30
+ }
31
+
32
+ type TextareaSlotRecipeSlot = "root"
33
+
34
+ export type TextareaSlotRecipeVariantProps = {
35
+ [key in keyof TextareaSlotRecipeVariant]?: ConditionalValue<TextareaSlotRecipeVariant[key]> | undefined
36
+ }
37
+
38
+ export interface TextareaSlotRecipeRecipe {
39
+ __slot: TextareaSlotRecipeSlot
40
+ __type: TextareaSlotRecipeVariantProps
41
+ (props?: TextareaSlotRecipeVariantProps): Pretty<Record<TextareaSlotRecipeSlot, string>>
42
+ raw: (props?: TextareaSlotRecipeVariantProps) => TextareaSlotRecipeVariantProps
43
+ variantMap: TextareaSlotRecipeVariantMap
44
+ variantKeys: Array<keyof TextareaSlotRecipeVariant>
45
+ splitVariantProps<Props extends TextareaSlotRecipeVariantProps>(props: Props): [TextareaSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof TextareaSlotRecipeVariantProps>>]
46
+ getVariantProps: (props?: TextareaSlotRecipeVariantProps) => TextareaSlotRecipeVariantProps
47
+ }
48
+
49
+ /**
50
+ * Slot class created for the MFUI Textarea component.
51
+ */
52
+ export declare const textareaSlotRecipe: TextareaSlotRecipeRecipe
@@ -0,0 +1,64 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
+ import { createRecipe } from './create-recipe.js';
3
+ const textareaSlotRecipeDefaultVariants = {
4
+ "size": "medium",
5
+ "disabled": false,
6
+ "invalid": false,
7
+ "enableAutoResize": false,
8
+ "resize": "both"
9
+ };
10
+ const textareaSlotRecipeCompoundVariants = [];
11
+ const textareaSlotRecipeSlotNames = [
12
+ [
13
+ "root",
14
+ "Textarea__root"
15
+ ]
16
+ ];
17
+ const textareaSlotRecipeSlotFns = /* @__PURE__ */ textareaSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, textareaSlotRecipeDefaultVariants, getSlotCompoundVariant(textareaSlotRecipeCompoundVariants, slotName))]);
18
+ const textareaSlotRecipeFn = memo((props = {}) => {
19
+ return Object.fromEntries(textareaSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
20
+ });
21
+ const textareaSlotRecipeVariantKeys = [
22
+ "size",
23
+ "disabled",
24
+ "invalid",
25
+ "enableAutoResize",
26
+ "resize"
27
+ ];
28
+ const getVariantProps = (variants) => ({ ...textareaSlotRecipeDefaultVariants, ...compact(variants) });
29
+ export const textareaSlotRecipe = /* @__PURE__ */ Object.assign(textareaSlotRecipeFn, {
30
+ __recipe__: false,
31
+ __name__: 'textareaSlotRecipe',
32
+ raw: (props) => props,
33
+ classNameMap: {},
34
+ variantKeys: textareaSlotRecipeVariantKeys,
35
+ variantMap: {
36
+ "size": [
37
+ "small",
38
+ "medium",
39
+ "large"
40
+ ],
41
+ "disabled": [
42
+ "true",
43
+ "false"
44
+ ],
45
+ "invalid": [
46
+ "true",
47
+ "false"
48
+ ],
49
+ "enableAutoResize": [
50
+ "true",
51
+ "false"
52
+ ],
53
+ "resize": [
54
+ "none",
55
+ "vertical",
56
+ "horizontal",
57
+ "both"
58
+ ]
59
+ },
60
+ splitVariantProps(props) {
61
+ return splitProps(props, textareaSlotRecipeVariantKeys);
62
+ },
63
+ getVariantProps
64
+ });