@basic-ui/material 0.1.12 → 0.1.15

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 (114) hide show
  1. package/build/cjs/index.js +38 -27
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/esm/Alert/Alert.d.ts +1 -1
  4. package/build/esm/AppBar/AppBar.d.ts +1 -1
  5. package/build/esm/AppBar/AppBarButton.d.ts +1 -1
  6. package/build/esm/Badge/Badge.d.ts +1 -1
  7. package/build/esm/BottomSheet/BottomSheet.d.ts +1 -1
  8. package/build/esm/BottomSheet/BottomSheetSurface.d.ts +1 -1
  9. package/build/esm/Button/BaseButton.d.ts +1 -1
  10. package/build/esm/Button/Button.d.ts +1 -1
  11. package/build/esm/Button/FilledButton.d.ts +1 -1
  12. package/build/esm/Button/OutlinedButton.d.ts +1 -1
  13. package/build/esm/Button/TransparentButton.d.ts +1 -1
  14. package/build/esm/CheckBox/CheckBox.d.ts +1 -1
  15. package/build/esm/CheckBox/CheckBoxIcon.d.ts +1 -1
  16. package/build/esm/Chip/ButtonChip.d.ts +1 -1
  17. package/build/esm/Chip/ButtonChip.js +4 -0
  18. package/build/esm/Chip/ButtonChip.js.map +1 -1
  19. package/build/esm/Chip/ChipBase.d.ts +1 -1
  20. package/build/esm/Chip/ChoiceChip.d.ts +1 -1
  21. package/build/esm/ColorMode/ColorModeProvider.js +10 -3
  22. package/build/esm/ColorMode/ColorModeProvider.js.map +1 -1
  23. package/build/esm/Combobox/Combobox.d.ts +7 -7
  24. package/build/esm/Dialog/Dialog.d.ts +1 -1
  25. package/build/esm/Dialog/DialogBackdrop.d.ts +1 -1
  26. package/build/esm/Dialog/DialogContainer.d.ts +1 -1
  27. package/build/esm/Dialog/DialogSurface.d.ts +1 -1
  28. package/build/esm/Dialog/Scrim.d.ts +1 -1
  29. package/build/esm/Dialog/useDialogAnimation.js +1 -1
  30. package/build/esm/Dialog/useDialogAnimation.js.map +1 -1
  31. package/build/esm/Divider/Divider.d.ts +1 -1
  32. package/build/esm/LineRipple/LineRipple.d.ts +1 -1
  33. package/build/esm/Link/Link.d.ts +1 -1
  34. package/build/esm/List/List.d.ts +1 -1
  35. package/build/esm/ListItem/ListItem.d.ts +1 -1
  36. package/build/esm/Menu/Menu.d.ts +4 -4
  37. package/build/esm/Paper/Paper.d.ts +1 -1
  38. package/build/esm/ProgressSpinner/ProgressSpinner.d.ts +1 -1
  39. package/build/esm/RadioButton/RadioGroup.d.ts +1 -1
  40. package/build/esm/Select/Select.js +2 -2
  41. package/build/esm/Select/Select.js.map +1 -1
  42. package/build/esm/Select/SelectIcon.d.ts +1 -1
  43. package/build/esm/SelectItem/SelectItem.d.ts +1 -1
  44. package/build/esm/SelectionControl/SelectionControlLabel.d.ts +1 -1
  45. package/build/esm/SelectionControl/SelectionControlText.d.ts +1 -1
  46. package/build/esm/Skeleton/DelayAppearance.d.ts +1 -1
  47. package/build/esm/Skeleton/Skeleton.d.ts +1 -1
  48. package/build/esm/Snackbar/Snackbar.d.ts +1 -1
  49. package/build/esm/Switch/Switch.d.ts +1 -1
  50. package/build/esm/Tab/Tab.d.ts +1 -1
  51. package/build/esm/Tab/TabList.d.ts +1 -1
  52. package/build/esm/Tab/TabPanel.d.ts +1 -1
  53. package/build/esm/TabIndicator/TabIndicator.d.ts +1 -1
  54. package/build/esm/Table/Table.d.ts +1 -1
  55. package/build/esm/Table/TableBody.d.ts +1 -1
  56. package/build/esm/Table/TableCell.d.ts +1 -1
  57. package/build/esm/Table/TableHead.d.ts +1 -1
  58. package/build/esm/Table/TableRow.d.ts +1 -1
  59. package/build/esm/Text/LoremIpsum.d.ts +4 -4
  60. package/build/esm/Text/LoremIpsum.js.map +1 -1
  61. package/build/esm/Text/Text.d.ts +1 -1
  62. package/build/esm/TextField/FilledContainer.d.ts +1 -1
  63. package/build/esm/TextField/HelperText.d.ts +1 -1
  64. package/build/esm/TextField/Input.d.ts +1 -1
  65. package/build/esm/TextField/OutlinedContainer.d.ts +1 -1
  66. package/build/esm/TextField/TextField.d.ts +1 -1
  67. package/build/esm/TextField/TextField.js +2 -2
  68. package/build/esm/TextField/TextField.js.map +1 -1
  69. package/build/esm/ThemeExplorer/TextFieldColorPicker.js +1 -1
  70. package/build/esm/ThemeExplorer/TextFieldColorPicker.js.map +1 -1
  71. package/build/esm/ThemeExplorer/makeColorScheme.js +2 -2
  72. package/build/esm/ThemeExplorer/makeColorScheme.js.map +1 -1
  73. package/build/esm/Tooltip/Tooltip.d.ts +1 -1
  74. package/build/esm/hooks/useAnimation.js +22 -21
  75. package/build/esm/hooks/useAnimation.js.map +1 -1
  76. package/build/esm/theme/useTheme.d.ts +1 -425
  77. package/build/tsconfig.tsbuildinfo +1 -4757
  78. package/package.json +13 -13
  79. package/src/Alert/Alert.story.tsx +5 -6
  80. package/src/AppBar/AppBar.story.tsx +11 -20
  81. package/src/BottomSheet/BottomSheet.story.tsx +5 -6
  82. package/src/Button/Button.story.tsx +14 -14
  83. package/src/Button/SpinnerButton.story.tsx +6 -6
  84. package/src/CheckBox/CheckBox.story.tsx +7 -6
  85. package/src/Chip/ButtonChip.tsx +3 -1
  86. package/src/Chip/Chip.story.tsx +56 -6
  87. package/src/ColorMode/ColorModeProvider.tsx +9 -3
  88. package/src/Combobox/Combobox.story.tsx +12 -13
  89. package/src/Dialog/Dialog.story.tsx +7 -8
  90. package/src/Dialog/useDialogAnimation.tsx +1 -1
  91. package/src/Divider/Divider.story.tsx +6 -5
  92. package/src/FloatingLabel/FloatingLabel.story.tsx +10 -9
  93. package/src/LineRipple/LineRipple.story.tsx +5 -4
  94. package/src/Link/Link.story.tsx +3 -4
  95. package/src/ListItem/ListItem.story.tsx +6 -5
  96. package/src/Menu/Menu.story.tsx +8 -7
  97. package/src/NotchedOutline/NotchedOutline.story.tsx +5 -4
  98. package/src/Paper/Paper.story.tsx +5 -4
  99. package/src/ProgressSpinner/ProgressSpinner.story.tsx +5 -4
  100. package/src/RadioButton/RadioButton.story.tsx +12 -10
  101. package/src/Ripple/Ripple.story.tsx +5 -4
  102. package/src/Select/Select.story.tsx +8 -7
  103. package/src/Select/Select.tsx +1 -1
  104. package/src/Skeleton/Skeleton.story.tsx +7 -6
  105. package/src/Snackbar/Snackbar.story.tsx +7 -6
  106. package/src/Switch/Switch.story.tsx +5 -4
  107. package/src/Tab/Tab.story.tsx +7 -5
  108. package/src/Table/Table.story.tsx +5 -4
  109. package/src/Text/LoremIpsum.tsx +3 -1
  110. package/src/Text/Text.story.tsx +5 -4
  111. package/src/TextField/TextField.story.tsx +7 -6
  112. package/src/TextField/TextField.tsx +2 -2
  113. package/src/Tooltip/Tooltip.story.tsx +5 -4
  114. package/src/hooks/useAnimation.ts +42 -32
@@ -7,4 +7,4 @@ export interface HelperTextProps extends TextProps {
7
7
  error?: boolean;
8
8
  disabled?: boolean;
9
9
  }
10
- export declare const HelperText: React.ForwardRefExoticComponent<Pick<HelperTextProps, "bottom" | "top" | "hidden" | "left" | "right" | "as" | "sx" | "__css" | "variant" | "tx" | "theme" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "p" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "size" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "color" | "bg" | "backgroundColor" | "opacity" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flex" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "order" | "border" | "borderX" | "borderY" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderColor" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "gridGap" | "gridColumnGap" | "gridRowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "background" | "backgroundImage" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat" | "position" | "zIndex" | "boxShadow" | "textShadow" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "disabled" | "error" | "leftSide" | "rightSide"> & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const HelperText: React.ForwardRefExoticComponent<Pick<HelperTextProps, "children" | "p" | "slot" | "style" | "title" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "backgroundImage" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "boxShadow" | "color" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textShadow" | "top" | "translate" | "verticalAlign" | "width" | "zIndex" | "background" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "gridColumnGap" | "gridGap" | "gridRowGap" | "bg" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "variant" | "size" | "hidden" | "as" | "sx" | "__css" | "tx" | "theme" | "borderX" | "borderY" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "error" | "disabled" | "leftSide" | "rightSide"> & React.RefAttributes<HTMLDivElement>>;
@@ -8,4 +8,4 @@ export interface InputProps extends BoxProps<HTMLInputElement, InputHTMLAttribut
8
8
  leadingIcon?: React.ReactNode;
9
9
  trailingIcon?: React.ReactNode;
10
10
  }
11
- export declare const Input: import("react").ForwardRefExoticComponent<Pick<InputProps, "bottom" | "top" | "hidden" | "left" | "right" | "as" | "sx" | "__css" | "variant" | "tx" | "theme" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "p" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "size" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "color" | "bg" | "backgroundColor" | "opacity" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flex" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "order" | "border" | "borderX" | "borderY" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderColor" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "gridGap" | "gridColumnGap" | "gridRowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "background" | "backgroundImage" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat" | "position" | "zIndex" | "boxShadow" | "textShadow" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "form" | "pattern" | "list" | "step" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "required" | "src" | "type" | "value" | "multiline" | "hasLabel" | "leadingIcon" | "trailingIcon"> & import("react").RefAttributes<HTMLDivElement>>;
11
+ export declare const Input: import("react").ForwardRefExoticComponent<Pick<InputProps, "value" | "children" | "form" | "p" | "slot" | "style" | "title" | "pattern" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "backgroundImage" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "boxShadow" | "color" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textShadow" | "top" | "translate" | "verticalAlign" | "width" | "zIndex" | "background" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "gridColumnGap" | "gridGap" | "gridRowGap" | "bg" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "variant" | "size" | "hidden" | "as" | "sx" | "__css" | "tx" | "theme" | "borderX" | "borderY" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "multiple" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "required" | "src" | "multiline" | "hasLabel" | "leadingIcon" | "trailingIcon"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -14,4 +14,4 @@ export interface OutlinedContainerProps extends BoxProps {
14
14
  forceActive?: boolean;
15
15
  leadingIcon?: boolean;
16
16
  }
17
- export declare const OutlinedContainer: React.ForwardRefExoticComponent<Pick<OutlinedContainerProps, "bottom" | "top" | "hidden" | "left" | "right" | "as" | "sx" | "__css" | "variant" | "tx" | "theme" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "p" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "size" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "color" | "bg" | "backgroundColor" | "opacity" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flex" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "order" | "border" | "borderX" | "borderY" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderColor" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "gridGap" | "gridColumnGap" | "gridRowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "background" | "backgroundImage" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat" | "position" | "zIndex" | "boxShadow" | "textShadow" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "label" | "disabled" | "leadingIcon" | "hasFocus" | "labelIsFloating" | "inputId" | "error" | "forceActive"> & React.RefAttributes<HTMLDivElement>>;
17
+ export declare const OutlinedContainer: React.ForwardRefExoticComponent<Pick<OutlinedContainerProps, "children" | "label" | "p" | "slot" | "style" | "title" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "backgroundImage" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "boxShadow" | "color" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textShadow" | "top" | "translate" | "verticalAlign" | "width" | "zIndex" | "background" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "gridColumnGap" | "gridGap" | "gridRowGap" | "bg" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "variant" | "size" | "hidden" | "as" | "sx" | "__css" | "tx" | "theme" | "borderX" | "borderY" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "error" | "disabled" | "leadingIcon" | "hasFocus" | "labelIsFloating" | "inputId" | "forceActive"> & React.RefAttributes<HTMLDivElement>>;
@@ -16,4 +16,4 @@ export declare type TextFieldProps = Omit<InputProps, 'value' | 'defaultValue'>
16
16
  leadingIcon?: React.ReactNode;
17
17
  trailingIcon?: React.ReactNode;
18
18
  };
19
- export declare const TextField: React.ForwardRefExoticComponent<Pick<TextFieldProps, "bottom" | "top" | "hidden" | "left" | "right" | "as" | "sx" | "__css" | "variant" | "tx" | "theme" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "p" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "size" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "color" | "bg" | "backgroundColor" | "opacity" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flex" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "order" | "border" | "borderX" | "borderY" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderColor" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "gridGap" | "gridColumnGap" | "gridRowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "background" | "backgroundImage" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat" | "position" | "zIndex" | "boxShadow" | "textShadow" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "form" | "label" | "pattern" | "list" | "step" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "required" | "src" | "type" | "value" | "multiline" | "hasLabel" | "leadingIcon" | "trailingIcon" | "error" | "containerProps" | "helperText" | "hideCharacterCounter"> & React.RefAttributes<HTMLInputElement>>;
19
+ export declare const TextField: React.ForwardRefExoticComponent<Pick<TextFieldProps, "value" | "children" | "form" | "label" | "p" | "slot" | "style" | "title" | "pattern" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "backgroundImage" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "boxShadow" | "color" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textShadow" | "top" | "translate" | "verticalAlign" | "width" | "zIndex" | "background" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "gridColumnGap" | "gridGap" | "gridRowGap" | "bg" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "variant" | "size" | "hidden" | "as" | "sx" | "__css" | "tx" | "theme" | "borderX" | "borderY" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "list" | "error" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "multiple" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "required" | "src" | "multiline" | "hasLabel" | "leadingIcon" | "trailingIcon" | "containerProps" | "helperText" | "hideCharacterCounter"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- import { forwardRef, useState } from 'react';
4
- import { wrapEvent, useId, useControlledState } from '@basic-ui/core';
3
+ import { forwardRef, useState, useId } from 'react';
4
+ import { wrapEvent, useControlledState } from '@basic-ui/core';
5
5
  import { Input } from './Input';
6
6
  import { useTheme } from '../theme';
7
7
  import { FilledContainer } from './FilledContainer';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/TextField/TextField.tsx"],"names":["forwardRef","useState","wrapEvent","useId","useControlledState","Input","useTheme","FilledContainer","OutlinedContainer","HelperText","Box","IconContainer","componentMap","outlined","filled","characterCounter","value","maxLength","undefined","length","TextField","props","forwardedRef","type","id","idProp","variant","color","valueProp","defaultValue","error","disabled","hideCharacterCounter","label","placeholder","helperText","helperTextProp","multiline","onChange","onChangeProp","onFocus","onBlur","leadingIcon","trailingIcon","containerProps","otherProps","setState","e","target","hasFocus","setHasFocus","Container","fallbackId","theme","handleFocus","handleBlur","hasError","Boolean","inputId","helperTextId","labelIsFloating"],"mappings":";;AAAA,SAASA,UAAT,EAAqBC,QAArB,QAAqC,OAArC;AAEA,SAASC,SAAT,EAAoBC,KAApB,EAA2BC,kBAA3B,QAAqD,gBAArD;AACA,SAASC,KAAT,QAAkC,SAAlC;AACA,SAASC,QAAT,QAAyB,UAAzB;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,GAAT,QAA8B,QAA9B;AACA,SAASC,aAAT,QAA8B,iBAA9B;;;AAEA,MAAMC,YAAY,GAAG;AACnBC,EAAAA,QAAQ,EAAEL,iBADS;AAEnBM,EAAAA,MAAM,EAAEP;AAFW,CAArB;;AAKA,SAASQ,gBAAT,CACEC,KADF,EAEEC,SAFF,EAGE;AACA,MAAIA,SAAS,KAAKC,SAAlB,EAA6B;AAC3B,WAAO,IAAP;AACD;;AAED,mBAAU,OAAOF,KAAP,KAAiB,QAAjB,GAA4BA,KAAK,CAACG,MAAlC,GAA2C,CAArD,gBAA4DF,SAA5D;AACD;;AAkBD,OAAO,MAAMG,SAAS,gBAAGpB,UAAU,CACjC,SAASoB,SAAT,CAAmBC,KAAnB,EAA0BC,YAA1B,EAAwC;AACtC,QAAM;AACJC,IAAAA,IAAI,GAAG,MADH;AAEJC,IAAAA,EAAE,EAAEC,MAFA;AAGJC,IAAAA,OAAO,GAAG,UAHN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jB,QARZ;AASE,QAAA,KAAK,EAAEtB,KATT;AAUE,QAAA,KAAK,EAAEqC,KAVT;AAWE,QAAA,WAAW,EAAEnB,WAXf;AAYE,QAAA,QAAQ,EAAEH,QAZZ;AAaE,yBAAeA,QAAQ,GAAG,MAAH,GAAYb,SAbrC;AAcE,QAAA,SAAS,EAAED,SAdb;AAeE,QAAA,SAAS,EAAEoB,SAfb;AAgBE,4BAAkBsB,YAhBpB;AAiBE,QAAA,QAAQ,EAAE,CAAC,CAAC1B,KAjBd;AAkBE,QAAA,WAAW,EAAEwB,OAAO,CAACf,WAAD,CAlBtB;AAmBE,QAAA,YAAY,EAAEe,OAAO,CAACd,YAAD;AAnBvB,SAoBME,UApBN,EAfF,EAqCGF,YAAY,iBACX,KAAC,aAAD;AAAe,QAAA,QAAQ,EAAC,KAAxB;AAAA,kBAA+BA;AAA/B,QAtCJ;AAAA,OADF,eA2CE,KAAC,UAAD;AACE,MAAA,KAAK,EAAEa,QADT;AAEE,MAAA,QAAQ,EAAEzB,QAFZ;AAGE,MAAA,QAAQ,EAAEI,UAAU,iBAAI;AAAM,QAAA,EAAE,EAAEwB,YAAV;AAAA,kBAAyBxB;AAAzB,QAH1B;AAIE,MAAA,SAAS,EACP,CAACH,oBAAD,IACAjB,gBAAgB,CAACC,KAAD,EAAkBC,SAAlB;AANpB,MA3CF;AAAA,IADF;AAuDD,CAlHgC,CAA5B","sourcesContent":["import { forwardRef, useState } from 'react';\nimport type * as React from 'react';\nimport { wrapEvent, useId, useControlledState } from '@basic-ui/core';\nimport { Input, InputProps } from './Input';\nimport { useTheme } from '../theme';\nimport { FilledContainer } from './FilledContainer';\nimport { OutlinedContainer } from './OutlinedContainer';\nimport { HelperText } from './HelperText';\nimport { Box, BoxProps } from '../Box';\nimport { IconContainer } from './IconContainer';\n\nconst componentMap = {\n outlined: OutlinedContainer,\n filled: FilledContainer,\n};\n\nfunction characterCounter(\n value: string | number | string[],\n maxLength?: number\n) {\n if (maxLength === undefined) {\n return null;\n }\n\n return `${typeof value === 'string' ? value.length : 0} / ${maxLength}`;\n}\n\nexport type TextFieldProps = Omit<InputProps, 'value' | 'defaultValue'> & {\n variant?: 'outlined' | 'filled';\n containerProps?: Omit<BoxProps, 'color'>;\n color?: 'primary' | 'secondary';\n label?: React.ReactNode;\n helperText?: string;\n maxLength?: number;\n hideCharacterCounter?: boolean;\n defaultValue?: string;\n value?: string;\n multiline?: boolean;\n error?: boolean | string;\n leadingIcon?: React.ReactNode;\n trailingIcon?: React.ReactNode;\n};\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, forwardedRef) {\n const {\n type = 'text',\n id: idProp,\n variant = 'outlined',\n color = 'primary',\n value: valueProp,\n defaultValue = '',\n error,\n disabled,\n maxLength,\n hideCharacterCounter = false,\n label = null,\n placeholder,\n helperText: helperTextProp,\n multiline,\n onChange: onChangeProp,\n onFocus,\n onBlur,\n leadingIcon = null,\n trailingIcon = null,\n containerProps,\n ...otherProps\n } = props;\n const [value, onChange] = useControlledState(\n valueProp,\n onChangeProp,\n defaultValue,\n (setState) => (e) => {\n setState(e.target.value);\n }\n );\n const [hasFocus, setHasFocus] = useState(false);\n\n const Container = componentMap[variant] || OutlinedContainer;\n\n const fallbackId = useId();\n\n const theme = useTheme();\n\n const handleFocus = () => {\n setHasFocus(true);\n };\n\n const handleBlur = () => {\n setHasFocus(false);\n };\n\n const hasError = Boolean(error);\n const helperText = typeof error === 'string' ? error : helperTextProp;\n\n const id = idProp || fallbackId;\n const inputId = `${id}-text-field`;\n const helperTextId = helperText ? `${id}-helper-text` : undefined;\n\n const labelIsFloating =\n hasFocus || (typeof value === 'string' && value.length > 0);\n\n return (\n <Box display=\"inline-flex\" flexDirection=\"column\" width=\"100%\">\n <Container\n theme={theme}\n label={label}\n color={color}\n error={hasError}\n labelIsFloating={labelIsFloating}\n inputId={inputId}\n hasFocus={hasFocus}\n disabled={disabled}\n leadingIcon={Boolean(leadingIcon)}\n {...containerProps}\n >\n {leadingIcon && (\n <IconContainer position=\"start\">{leadingIcon}</IconContainer>\n )}\n <Input\n ref={forwardedRef}\n as={multiline ? 'textarea' : 'input'}\n variant={variant}\n type={type}\n id={inputId}\n onFocus={wrapEvent(onFocus, handleFocus)}\n onBlur={wrapEvent(onBlur, handleBlur)}\n onChange={onChange}\n value={value}\n theme={theme}\n placeholder={placeholder}\n disabled={disabled}\n aria-disabled={disabled ? 'true' : undefined}\n maxLength={maxLength}\n multiline={multiline}\n aria-describedby={helperTextId}\n hasLabel={!!label}\n leadingIcon={Boolean(leadingIcon)}\n trailingIcon={Boolean(trailingIcon)}\n {...otherProps}\n />\n {trailingIcon && (\n <IconContainer position=\"end\">{trailingIcon}</IconContainer>\n )}\n </Container>\n\n <HelperText\n error={hasError}\n disabled={disabled}\n leftSide={helperText && <span id={helperTextId}>{helperText}</span>}\n rightSide={\n !hideCharacterCounter &&\n characterCounter(value as string, maxLength)\n }\n />\n </Box>\n );\n }\n);\n"],"file":"TextField.js"}
1
+ {"version":3,"sources":["../../../src/TextField/TextField.tsx"],"names":["forwardRef","useState","useId","wrapEvent","useControlledState","Input","useTheme","FilledContainer","OutlinedContainer","HelperText","Box","IconContainer","componentMap","outlined","filled","characterCounter","value","maxLength","undefined","length","TextField","props","forwardedRef","type","id","idProp","variant","color","valueProp","defaultValue","error","disabled","hideCharacterCounter","label","placeholder","helperText","helperTextProp","multiline","onChange","onChangeProp","onFocus","onBlur","leadingIcon","trailingIcon","containerProps","otherProps","setState","e","target","hasFocus","setHasFocus","Container","fallbackId","theme","handleFocus","handleBlur","hasError","Boolean","inputId","helperTextId","labelIsFloating"],"mappings":";;AAAA,SAASA,UAAT,EAAqBC,QAArB,EAA+BC,KAA/B,QAA4C,OAA5C;AAEA,SAASC,SAAT,EAAoBC,kBAApB,QAA8C,gBAA9C;AACA,SAASC,KAAT,QAAkC,SAAlC;AACA,SAASC,QAAT,QAAyB,UAAzB;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,i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AA,KAAK,EAAEa,QADT;AAEE,MAAA,QAAQ,EAAEzB,QAFZ;AAGE,MAAA,QAAQ,EAAEI,UAAU,iBAAI;AAAM,QAAA,EAAE,EAAEwB,YAAV;AAAA,kBAAyBxB;AAAzB,QAH1B;AAIE,MAAA,SAAS,EACP,CAACH,oBAAD,IACAjB,gBAAgB,CAACC,KAAD,EAAkBC,SAAlB;AANpB,MA3CF;AAAA,IADF;AAuDD,CAlHgC,CAA5B","sourcesContent":["import { forwardRef, useState, useId } from 'react';\nimport type * as React from 'react';\nimport { wrapEvent, useControlledState } from '@basic-ui/core';\nimport { Input, InputProps } from './Input';\nimport { useTheme } from '../theme';\nimport { FilledContainer } from './FilledContainer';\nimport { OutlinedContainer } from './OutlinedContainer';\nimport { HelperText } from './HelperText';\nimport { Box, BoxProps } from '../Box';\nimport { IconContainer } from './IconContainer';\n\nconst componentMap = {\n outlined: OutlinedContainer,\n filled: FilledContainer,\n};\n\nfunction characterCounter(\n value: string | number | string[],\n maxLength?: number\n) {\n if (maxLength === undefined) {\n return null;\n }\n\n return `${typeof value === 'string' ? value.length : 0} / ${maxLength}`;\n}\n\nexport type TextFieldProps = Omit<InputProps, 'value' | 'defaultValue'> & {\n variant?: 'outlined' | 'filled';\n containerProps?: Omit<BoxProps, 'color'>;\n color?: 'primary' | 'secondary';\n label?: React.ReactNode;\n helperText?: string;\n maxLength?: number;\n hideCharacterCounter?: boolean;\n defaultValue?: string;\n value?: string;\n multiline?: boolean;\n error?: boolean | string;\n leadingIcon?: React.ReactNode;\n trailingIcon?: React.ReactNode;\n};\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, forwardedRef) {\n const {\n type = 'text',\n id: idProp,\n variant = 'outlined',\n color = 'primary',\n value: valueProp,\n defaultValue = '',\n error,\n disabled,\n maxLength,\n hideCharacterCounter = false,\n label = null,\n placeholder,\n helperText: helperTextProp,\n multiline,\n onChange: onChangeProp,\n onFocus,\n onBlur,\n leadingIcon = null,\n trailingIcon = null,\n containerProps,\n ...otherProps\n } = props;\n const [value, onChange] = useControlledState(\n valueProp,\n onChangeProp,\n defaultValue,\n (setState) => (e) => {\n setState(e.target.value);\n }\n );\n const [hasFocus, setHasFocus] = useState(false);\n\n const Container = componentMap[variant] || OutlinedContainer;\n\n const fallbackId = useId();\n\n const theme = useTheme();\n\n const handleFocus = () => {\n setHasFocus(true);\n };\n\n const handleBlur = () => {\n setHasFocus(false);\n };\n\n const hasError = Boolean(error);\n const helperText = typeof error === 'string' ? error : helperTextProp;\n\n const id = idProp || fallbackId;\n const inputId = `${id}-text-field`;\n const helperTextId = helperText ? `${id}-helper-text` : undefined;\n\n const labelIsFloating =\n hasFocus || (typeof value === 'string' && value.length > 0);\n\n return (\n <Box display=\"inline-flex\" flexDirection=\"column\" width=\"100%\">\n <Container\n theme={theme}\n label={label}\n color={color}\n error={hasError}\n labelIsFloating={labelIsFloating}\n inputId={inputId}\n hasFocus={hasFocus}\n disabled={disabled}\n leadingIcon={Boolean(leadingIcon)}\n {...containerProps}\n >\n {leadingIcon && (\n <IconContainer position=\"start\">{leadingIcon}</IconContainer>\n )}\n <Input\n ref={forwardedRef}\n as={multiline ? 'textarea' : 'input'}\n variant={variant}\n type={type}\n id={inputId}\n onFocus={wrapEvent(onFocus, handleFocus)}\n onBlur={wrapEvent(onBlur, handleBlur)}\n onChange={onChange}\n value={value}\n theme={theme}\n placeholder={placeholder}\n disabled={disabled}\n aria-disabled={disabled ? 'true' : undefined}\n maxLength={maxLength}\n multiline={multiline}\n aria-describedby={helperTextId}\n hasLabel={!!label}\n leadingIcon={Boolean(leadingIcon)}\n trailingIcon={Boolean(trailingIcon)}\n {...otherProps}\n />\n {trailingIcon && (\n <IconContainer position=\"end\">{trailingIcon}</IconContainer>\n )}\n </Container>\n\n <HelperText\n error={hasError}\n disabled={disabled}\n leftSide={helperText && <span id={helperTextId}>{helperText}</span>}\n rightSide={\n !hideCharacterCounter &&\n characterCounter(value as string, maxLength)\n }\n />\n </Box>\n );\n }\n);\n"],"file":"TextField.js"}
@@ -84,7 +84,7 @@ export const TextFieldColorPicker = /*#__PURE__*/memo(props => {
84
84
  ref: popoverRef,
85
85
  py: 2,
86
86
  children: [/*#__PURE__*/_jsx(Box, {
87
- boxShadow: 12,
87
+ boxShadow: 4,
88
88
  children: /*#__PURE__*/_jsx(ColorPicker, {
89
89
  color: value // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
90
90
  ,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/ThemeExplorer/TextFieldColorPicker.tsx"],"names":["toColor","Popper","useControlledState","useOnClickOutside","alpha","Box","TextField","Button","useRef","useState","memo","useCallback","ColorPicker","TextFieldColorPicker","props","value","valueProp","defaultValue","onChange","onChangeProp","disabled","otherProps","popoverOpen","setPopoverOpen","text","setText","hex","_onChange","setState","v","color","replace","popoverRef","buttonRef","e","target","current","backgroundColor","open","pointerEvents","cursor","width","height","borderRadius","borderWidth","borderColor","borderStyle","outlineColor","match","zIndex"],"mappings":";;AAAA,SAAgBA,OAAhB,QAA+B,wBAA/B;AACA,SAASC,MAAT,EAAiBC,kBAAjB,EAAqCC,iBAArC,QAA8D,gBAA9D;AACA,SAASC,KAAT,EAAgBC,GAAhB,EAAqBC,SAArB,EAAgCC,MAAhC,QAA8D,KAA9D;AACA,SAASC,MAAT,EAAiBC,QAAjB,EAA2BC,IAA3B,EAAiCC,WAAjC,QAAoD,OAApD;AACA,SAASC,WAAT,QAA4B,eAA5B;;;;AASA,OAAO,MAAMC,oBAAoB,gBAAGH,IAAI,CAA6BI,KAAD,IAAW;AAC7E,QAAM;AACJC,IAAAA,KAAK,EAAEC,SADH;AAEJC,IAAAA,YAAY,GAAGjB,OAAO,CAAC,KAAD,EAAQ,SAAR,CAFlB;AAGJkB,IAAAA,QAAQ,EAAEC,YAHN;AAIJC,IAAAA;AAJI,MAMFN,KANJ;AAAA,QAKKO,UALL,iCAMIP,KANJ;;AAQA,QAAM,CAACQ,WAAD,EAAcC,cAAd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ACE,KAAC,GAAD;AAAK,UAAA,SAAS,EAAE,EAAhB;AAAA,iCACE,KAAC,WAAD;AACE,YAAA,KAAK,EAAEjB,KADT,CAEE;AAFF;AAGE,YAAA,QAAQ,EAAEG,QAHZ;AAIE,YAAA,KAAK,EAAE,GAJT;AAKE,YAAA,MAAM,EAAE;AALV;AADF,UADF,eAUE,KAAC,GAAD,KAVF;AAAA;AALF,MAtCJ;AAAA,IADF;AA4DD,CAnGuC,CAAjC","sourcesContent":["import { Color, toColor } from '@basic-ui/color-picker';\nimport { Popper, useControlledState, useOnClickOutside } from '@basic-ui/core';\nimport { alpha, Box, TextField, Button, TextFieldProps } from '../';\nimport { useRef, useState, memo, useCallback } from 'react';\nimport { ColorPicker } from './ColorPicker';\n\nexport interface TextFieldColorPickerProps\n extends Omit<TextFieldProps, 'value' | 'defaultValue' | 'onChange'> {\n value?: Color;\n defaultValue?: Color;\n onChange?: (color: Color) => void;\n}\n\nexport const TextFieldColorPicker = memo<TextFieldColorPickerProps>((props) => {\n const {\n value: valueProp,\n defaultValue = toColor('hex', '#33ff33'),\n onChange: onChangeProp,\n disabled,\n ...otherProps\n } = props;\n\n const [popoverOpen, setPopoverOpen] = useState(false);\n const [text, setText] = useState(valueProp?.hex || defaultValue.hex);\n const [value, _onChange] = useControlledState<Color, any, []>(\n valueProp,\n onChangeProp as any,\n defaultValue,\n (setState) => (v: any) => {\n setState(v);\n setText(v.hex);\n }\n );\n\n const onChange = useCallback(\n (color: Color) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _onChange!(color);\n setText(color.hex.replace('#', ''));\n },\n [_onChange]\n );\n\n const popoverRef = useRef<HTMLDivElement>(null);\n const buttonRef = useRef<HTMLButtonElement>(null);\n useOnClickOutside(popoverRef, (e) => {\n if (e.target === buttonRef?.current) {\n return;\n }\n setPopoverOpen(false);\n });\n\n return (\n <>\n <TextField\n disabled={disabled}\n value={text.replace('#', '')}\n leadingIcon={'#'}\n trailingIcon={\n <Button\n style={{ backgroundColor: value.hex }}\n color=\"on.surface\"\n ref={buttonRef}\n onClick={() => setPopoverOpen((open) => !open)}\n disabled={disabled}\n sx={{\n pointerEvents: 'all',\n cursor: 'pointer',\n width: 32,\n height: 32,\n borderRadius: '4px',\n borderWidth: '1px',\n borderColor: alpha('on.surface', 0.38),\n borderStyle: 'solid',\n outlineColor: 'transparent',\n }}\n />\n }\n maxLength={6}\n hideCharacterCounter\n onChange={(e) => {\n if (e.target.value.match(/^[a-fA-F0-9]{6}$/)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n onChange!(toColor('hex', '#' + e.target.value));\n return;\n }\n setText(e.target.value);\n }}\n {...otherProps}\n />\n {popoverOpen && (\n <Popper\n anchorEl={buttonRef}\n placement=\"bottom-end\"\n style={{ zIndex: 2 }}\n >\n <Box ref={popoverRef} py={2}>\n <Box boxShadow={12}>\n <ColorPicker\n color={value}\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n onChange={onChange!}\n width={220}\n height={220}\n />\n </Box>\n <Box></Box>\n </Box>\n </Popper>\n )}\n </>\n );\n});\n"],"file":"TextFieldColorPicker.js"}
1
+ {"version":3,"sources":["../../../src/ThemeExplorer/TextFieldColorPicker.tsx"],"names":["toColor","Popper","useControlledState","useOnClickOutside","alpha","Box","TextField","Button","useRef","useState","memo","useCallback","ColorPicker","TextFieldColorPicker","props","value","valueProp","defaultValue","onChange","onChangeProp","disabled","otherProps","popoverOpen","setPopoverOpen","text","setText","hex","_onChange","setState","v","color","replace","popoverRef","buttonRef","e","target","current","backgroundColor","open","pointerEvents","cursor","width","height","borderRadius","borderWidth","borderColor","borderStyle","outlineColor","match","zIndex"],"mappings":";;AAAA,SAAgBA,OAAhB,QAA+B,wBAA/B;AACA,SAASC,MAAT,EAAiBC,kBAAjB,EAAqCC,iBAArC,QAA8D,gBAA9D;AACA,SAASC,KAAT,EAAgBC,GAAhB,EAAqBC,SAArB,EAAgCC,MAAhC,QAA8D,KAA9D;AACA,SAASC,MA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MkC,CAAC,CAACC,MAAF,CAASpB,KAAvB,CAAT,CAAR;AACA;AACD;;AACDU,QAAAA,OAAO,CAACS,CAAC,CAACC,MAAF,CAASpB,KAAV,CAAP;AACD;AAjCH,OAkCMM,UAlCN,EADF,EAqCGC,WAAW,iBACV,KAAC,MAAD;AACE,MAAA,QAAQ,EAAEW,SADZ;AAEE,MAAA,SAAS,EAAC,YAFZ;AAGE,MAAA,KAAK,EAAE;AAAEgB,QAAAA,MAAM,EAAE;AAAV,OAHT;AAAA,6BAKE,MAAC,GAAD;AAAK,QAAA,GAAG,EAAEjB,UAAV;AAAsB,QAAA,EAAE,EAAE,CAA1B;AAAA,gCACE,KAAC,GAAD;AAAK,UAAA,SAAS,EAAE,CAAhB;AAAA,iCACE,KAAC,WAAD;AACE,YAAA,KAAK,EAAEjB,KADT,CAEE;AAFF;AAGE,YAAA,QAAQ,EAAEG,QAHZ;AAIE,YAAA,KAAK,EAAE,GAJT;AAKE,YAAA,MAAM,EAAE;AALV;AADF,UADF,eAUE,KAAC,GAAD,KAVF;AAAA;AALF,MAtCJ;AAAA,IADF;AA4DD,CAnGuC,CAAjC","sourcesContent":["import { Color, toColor } from '@basic-ui/color-picker';\nimport { Popper, useControlledState, useOnClickOutside } from '@basic-ui/core';\nimport { alpha, Box, TextField, Button, TextFieldProps } from '../';\nimport { useRef, useState, memo, useCallback } from 'react';\nimport { ColorPicker } from './ColorPicker';\n\nexport interface TextFieldColorPickerProps\n extends Omit<TextFieldProps, 'value' | 'defaultValue' | 'onChange'> {\n value?: Color;\n defaultValue?: Color;\n onChange?: (color: Color) => void;\n}\n\nexport const TextFieldColorPicker = memo<TextFieldColorPickerProps>((props) => {\n const {\n value: valueProp,\n defaultValue = toColor('hex', '#33ff33'),\n onChange: onChangeProp,\n disabled,\n ...otherProps\n } = props;\n\n const [popoverOpen, setPopoverOpen] = useState(false);\n const [text, setText] = useState(valueProp?.hex || defaultValue.hex);\n const [value, _onChange] = useControlledState<Color, any, []>(\n valueProp,\n onChangeProp as any,\n defaultValue,\n (setState) => (v: any) => {\n setState(v);\n setText(v.hex);\n }\n );\n\n const onChange = useCallback(\n (color: Color) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _onChange!(color);\n setText(color.hex.replace('#', ''));\n },\n [_onChange]\n );\n\n const popoverRef = useRef<HTMLDivElement>(null);\n const buttonRef = useRef<HTMLButtonElement>(null);\n useOnClickOutside(popoverRef, (e) => {\n if (e.target === buttonRef?.current) {\n return;\n }\n setPopoverOpen(false);\n });\n\n return (\n <>\n <TextField\n disabled={disabled}\n value={text.replace('#', '')}\n leadingIcon={'#'}\n trailingIcon={\n <Button\n style={{ backgroundColor: value.hex }}\n color=\"on.surface\"\n ref={buttonRef}\n onClick={() => setPopoverOpen((open) => !open)}\n disabled={disabled}\n sx={{\n pointerEvents: 'all',\n cursor: 'pointer',\n width: 32,\n height: 32,\n borderRadius: '4px',\n borderWidth: '1px',\n borderColor: alpha('on.surface', 0.38),\n borderStyle: 'solid',\n outlineColor: 'transparent',\n }}\n />\n }\n maxLength={6}\n hideCharacterCounter\n onChange={(e) => {\n if (e.target.value.match(/^[a-fA-F0-9]{6}$/)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n onChange!(toColor('hex', '#' + e.target.value));\n return;\n }\n setText(e.target.value);\n }}\n {...otherProps}\n />\n {popoverOpen && (\n <Popper\n anchorEl={buttonRef}\n placement=\"bottom-end\"\n style={{ zIndex: 2 }}\n >\n <Box ref={popoverRef} py={2}>\n <Box boxShadow={4}>\n <ColorPicker\n color={value}\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n onChange={onChange!}\n width={220}\n height={220}\n />\n </Box>\n <Box></Box>\n </Box>\n </Popper>\n )}\n </>\n );\n});\n"],"file":"TextFieldColorPicker.js"}
@@ -15,7 +15,7 @@ export function makeColorScheme(opts) {
15
15
  'error-container': c(opts.error, 90),
16
16
  background: c(opts.neutral, 99),
17
17
  surface: c(opts.neutral, 99),
18
- 'surface-variant': c(opts.neutralVariant, 99),
18
+ 'surface-variant': c(opts.neutralVariant, 90),
19
19
  outline: c(opts.neutralVariant, 50),
20
20
  on: {
21
21
  primary: c(opts.primary, 100),
@@ -28,7 +28,7 @@ export function makeColorScheme(opts) {
28
28
  'error-container': c(opts.error, 10),
29
29
  background: c(opts.neutral, 10),
30
30
  surface: c(opts.neutral, 10),
31
- 'surface-variant': c(opts.neutralVariant, 10),
31
+ 'surface-variant': c(opts.neutralVariant, 30),
32
32
  outline: c(opts.neutralVariant, 95)
33
33
  },
34
34
  modes: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/ThemeExplorer/makeColorScheme.tsx"],"names":["hexFromArgb","makeColorScheme","opts","c","palette","tone","primary","secondary","tertiary","error","background","neutral","surface","neutralVariant","outline","on","modes","dark"],"mappings":"AAAA,SAAuBA,WAAvB,QAA0C,oCAA1C;AAEA,OAAO,SAASC,eAAT,CAAyBC,IAAzB,EAOJ;AACD,WAASC,CAAT,CAAWC,OAAX,EAAkCC,IAAlC,EAAgD;AAC9C,WAAOL,WAAW,CAACI,OAAO,CAACC,IAAR,CAAaA,IAAb,CAAD,CAAlB;AACD;;AAED,SAAO;AACLC,IAAAA,OAAO,EAAEH,CAAC,CAACD,IAAI,CAACI,OAAN,EAAe,EAAf,CADL;AAELC,IAAAA,SAAS,EAAEJ,CAAC,CAACD,IAAI,CAACK,SAAN,EAAiB,EAAjB,CAFP;AAGLC,IAAAA,QAAQ,EAAEL,CAAC,CAACD,IAAI,CAACM,QAAN,EAAgB,EAAhB,CAHN;AAILC,IAAAA,KAAK,EAAEN,CAAC,CAACD,IAAI,CAACO,KAAN,EAAa,EAAb,CAJH;AAKL,yBAAqBN,CAAC,CAACD,IAAI,CAACI,OAAN,EAAe,EAAf,CALjB;AAML,2BAAuBH,CAAC,CAACD,IAAI,CAACK,SAAN,EAAiB,EAAjB,CANnB;AAOL,0BAAsBJ,CAAC,CAACD,IAAI,CAACM,QAAN,EAAgB,EAAhB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AEN,CAAC,CAACD,IAAI,CAACO,KAAN,EAAa,EAAb,CAJN;AAKF,+BAAqBN,CAAC,CAACD,IAAI,CAACI,OAAN,EAAe,EAAf,CALpB;AAMF,iCAAuBH,CAAC,CAACD,IAAI,CAACK,SAAN,EAAiB,EAAjB,CANtB;AAOF,gCAAsBJ,CAAC,CAACD,IAAI,CAACM,QAAN,EAAgB,EAAhB,CAPrB;AAQF,6BAAmBL,CAAC,CAACD,IAAI,CAACO,KAAN,EAAa,EAAb,CARlB;AASFC,UAAAA,UAAU,EAAEP,CAAC,CAACD,IAAI,CAACS,OAAN,EAAe,EAAf,CATX;AAUFC,UAAAA,OAAO,EAAET,CAAC,CAACD,IAAI,CAACS,OAAN,EAAe,EAAf,CAVR;AAWF,6BAAmBR,CAAC,CAACD,IAAI,CAACW,cAAN,EAAsB,EAAtB,CAXlB;AAYFC,UAAAA,OAAO,EAAEX,CAAC,CAACD,IAAI,CAACW,cAAN,EAAsB,EAAtB;AAZR;AAbA;AADD;AA3BF,GAAP;AA0DD","sourcesContent":["import { TonalPalette, hexFromArgb } from '@material/material-color-utilities';\n\nexport function makeColorScheme(opts: {\n primary: TonalPalette;\n secondary: TonalPalette;\n tertiary: TonalPalette;\n error: TonalPalette;\n neutral: TonalPalette;\n neutralVariant: TonalPalette;\n}) {\n function c(palette: TonalPalette, tone: number) {\n return hexFromArgb(palette.tone(tone));\n }\n\n return {\n primary: c(opts.primary, 40),\n secondary: c(opts.secondary, 40),\n tertiary: c(opts.tertiary, 40),\n error: c(opts.error, 40),\n 'primary-container': c(opts.primary, 90),\n 'secondary-container': c(opts.secondary, 90),\n 'tertiary-container': c(opts.tertiary, 90),\n 'error-container': c(opts.error, 90),\n background: c(opts.neutral, 99),\n surface: c(opts.neutral, 99),\n 'surface-variant': c(opts.neutralVariant, 99),\n outline: c(opts.neutralVariant, 50),\n on: {\n primary: c(opts.primary, 100),\n secondary: c(opts.secondary, 100),\n tertiary: c(opts.tertiary, 100),\n error: c(opts.error, 100),\n 'primary-container': c(opts.primary, 10),\n 'secondary-container': c(opts.secondary, 10),\n 'tertiary-container': c(opts.tertiary, 10),\n 'error-container': c(opts.error, 10),\n background: c(opts.neutral, 10),\n surface: c(opts.neutral, 10),\n 'surface-variant': c(opts.neutralVariant, 10),\n outline: c(opts.neutralVariant, 95),\n },\n modes: {\n dark: {\n primary: c(opts.primary, 80),\n secondary: c(opts.secondary, 80),\n tertiary: c(opts.tertiary, 80),\n error: c(opts.error, 80),\n 'primary-container': c(opts.primary, 30),\n 'secondary-container': c(opts.secondary, 30),\n 'tertiary-container': c(opts.tertiary, 30),\n 'error-container': c(opts.error, 30),\n background: c(opts.neutral, 10),\n surface: c(opts.neutral, 10),\n 'surface-variant': c(opts.neutralVariant, 30),\n outline: c(opts.neutralVariant, 60),\n on: {\n primary: c(opts.primary, 20),\n secondary: c(opts.secondary, 20),\n tertiary: c(opts.tertiary, 20),\n error: c(opts.error, 20),\n 'primary-container': c(opts.primary, 90),\n 'secondary-container': c(opts.secondary, 90),\n 'tertiary-container': c(opts.tertiary, 90),\n 'error-container': c(opts.error, 90),\n background: c(opts.neutral, 90),\n surface: c(opts.neutral, 90),\n 'surface-variant': c(opts.neutralVariant, 80),\n outline: c(opts.neutralVariant, 10),\n },\n },\n },\n };\n}\n"],"file":"makeColorScheme.js"}
1
+ {"version":3,"sources":["../../../src/ThemeExplorer/makeColorScheme.tsx"],"names":["hexFromArgb","makeColorScheme","opts","c","palette","tone","primary","secondary","tertiary","error","background","neutral","surface","neutralVariant","outline","on","modes","dark"],"mappings":"AAAA,SAAuBA,WAAvB,QAA0C,oCAA1C;AAEA,OAAO,SAASC,eAAT,CAAyBC,IAAzB,EAOJ;AACD,WAASC,CAAT,CAAWC,OAAX,EAAkCC,IAAlC,EAAgD;AAC9C,WAAOL,WAAW,CAACI,OAAO,CAACC,IAAR,CAAaA,IAAb,CAAD,CAAlB;AACD;;AAED,SAAO;AACLC,IAAAA,OAAO,EAAEH,CAAC,CAACD,IAAI,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AN,EAAe,EAAf,CAVN;AAWJ,2BAAmBR,CAAC,CAACD,IAAI,CAACW,cAAN,EAAsB,EAAtB,CAXhB;AAYJC,QAAAA,OAAO,EAAEX,CAAC,CAACD,IAAI,CAACW,cAAN,EAAsB,EAAtB,CAZN;AAaJE,QAAAA,EAAE,EAAE;AACFT,UAAAA,OAAO,EAAEH,CAAC,CAACD,IAAI,CAACI,OAAN,EAAe,EAAf,CADR;AAEFC,UAAAA,SAAS,EAAEJ,CAAC,CAACD,IAAI,CAACK,SAAN,EAAiB,EAAjB,CAFV;AAGFC,UAAAA,QAAQ,EAAEL,CAAC,CAACD,IAAI,CAACM,QAAN,EAAgB,EAAhB,CAHT;AAIFC,UAAAA,KAAK,EAAEN,CAAC,CAACD,IAAI,CAACO,KAAN,EAAa,EAAb,CAJN;AAKF,+BAAqBN,CAAC,CAACD,IAAI,CAACI,OAAN,EAAe,EAAf,CALpB;AAMF,iCAAuBH,CAAC,CAACD,IAAI,CAACK,SAAN,EAAiB,EAAjB,CANtB;AAOF,gCAAsBJ,CAAC,CAACD,IAAI,CAACM,QAAN,EAAgB,EAAhB,CAPrB;AAQF,6BAAmBL,CAAC,CAACD,IAAI,CAACO,KAAN,EAAa,EAAb,CARlB;AASFC,UAAAA,UAAU,EAAEP,CAAC,CAACD,IAAI,CAACS,OAAN,EAAe,EAAf,CATX;AAUFC,UAAAA,OAAO,EAAET,CAAC,CAACD,IAAI,CAACS,OAAN,EAAe,EAAf,CAVR;AAWF,6BAAmBR,CAAC,CAACD,IAAI,CAACW,cAAN,EAAsB,EAAtB,CAXlB;AAYFC,UAAAA,OAAO,EAAEX,CAAC,CAACD,IAAI,CAACW,cAAN,EAAsB,EAAtB;AAZR;AAbA;AADD;AA3BF,GAAP;AA0DD","sourcesContent":["import { TonalPalette, hexFromArgb } from '@material/material-color-utilities';\n\nexport function makeColorScheme(opts: {\n primary: TonalPalette;\n secondary: TonalPalette;\n tertiary: TonalPalette;\n error: TonalPalette;\n neutral: TonalPalette;\n neutralVariant: TonalPalette;\n}) {\n function c(palette: TonalPalette, tone: number) {\n return hexFromArgb(palette.tone(tone));\n }\n\n return {\n primary: c(opts.primary, 40),\n secondary: c(opts.secondary, 40),\n tertiary: c(opts.tertiary, 40),\n error: c(opts.error, 40),\n 'primary-container': c(opts.primary, 90),\n 'secondary-container': c(opts.secondary, 90),\n 'tertiary-container': c(opts.tertiary, 90),\n 'error-container': c(opts.error, 90),\n background: c(opts.neutral, 99),\n surface: c(opts.neutral, 99),\n 'surface-variant': c(opts.neutralVariant, 90),\n outline: c(opts.neutralVariant, 50),\n on: {\n primary: c(opts.primary, 100),\n secondary: c(opts.secondary, 100),\n tertiary: c(opts.tertiary, 100),\n error: c(opts.error, 100),\n 'primary-container': c(opts.primary, 10),\n 'secondary-container': c(opts.secondary, 10),\n 'tertiary-container': c(opts.tertiary, 10),\n 'error-container': c(opts.error, 10),\n background: c(opts.neutral, 10),\n surface: c(opts.neutral, 10),\n 'surface-variant': c(opts.neutralVariant, 30),\n outline: c(opts.neutralVariant, 95),\n },\n modes: {\n dark: {\n primary: c(opts.primary, 80),\n secondary: c(opts.secondary, 80),\n tertiary: c(opts.tertiary, 80),\n error: c(opts.error, 80),\n 'primary-container': c(opts.primary, 30),\n 'secondary-container': c(opts.secondary, 30),\n 'tertiary-container': c(opts.tertiary, 30),\n 'error-container': c(opts.error, 30),\n background: c(opts.neutral, 10),\n surface: c(opts.neutral, 10),\n 'surface-variant': c(opts.neutralVariant, 30),\n outline: c(opts.neutralVariant, 60),\n on: {\n primary: c(opts.primary, 20),\n secondary: c(opts.secondary, 20),\n tertiary: c(opts.tertiary, 20),\n error: c(opts.error, 20),\n 'primary-container': c(opts.primary, 90),\n 'secondary-container': c(opts.secondary, 90),\n 'tertiary-container': c(opts.tertiary, 90),\n 'error-container': c(opts.error, 90),\n background: c(opts.neutral, 90),\n surface: c(opts.neutral, 90),\n 'surface-variant': c(opts.neutralVariant, 80),\n outline: c(opts.neutralVariant, 10),\n },\n },\n },\n };\n}\n"],"file":"makeColorScheme.js"}
@@ -5,4 +5,4 @@ export interface TooltipProps extends BoxProps, Omit<PopperProps, 'color' | 'anc
5
5
  label: React.ReactNode;
6
6
  disabled?: boolean;
7
7
  }
8
- export declare const Tooltip: React.ForwardRefExoticComponent<Pick<TooltipProps, "bottom" | "top" | "hidden" | "left" | "right" | "as" | "sx" | "__css" | "variant" | "tx" | "theme" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "p" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "size" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "color" | "bg" | "backgroundColor" | "opacity" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flex" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "order" | "border" | "borderX" | "borderY" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderColor" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "gridGap" | "gridColumnGap" | "gridRowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "background" | "backgroundImage" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat" | "position" | "zIndex" | "boxShadow" | "textShadow" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "label" | "disabled" | "innerAs" | "placement" | "strategy" | "modifiers" | "usePortal" | "portalSelector" | "skidding" | "distance" | "offsetFn" | "arrowPadding"> & React.RefAttributes<HTMLDivElement>>;
8
+ export declare const Tooltip: React.ForwardRefExoticComponent<Pick<TooltipProps, "children" | "label" | "p" | "slot" | "style" | "title" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "backgroundImage" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "boxShadow" | "color" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textShadow" | "top" | "translate" | "verticalAlign" | "width" | "zIndex" | "background" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "gridColumnGap" | "gridGap" | "gridRowGap" | "bg" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "variant" | "size" | "hidden" | "as" | "sx" | "__css" | "tx" | "theme" | "borderX" | "borderY" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "disabled" | "placement" | "innerAs" | "strategy" | "modifiers" | "usePortal" | "portalSelector" | "skidding" | "distance" | "offsetFn" | "arrowPadding"> & React.RefAttributes<HTMLDivElement>>;
@@ -21,45 +21,46 @@ export function useAnimation(opts) {
21
21
  open: openProp
22
22
  });
23
23
  const handleClose = useCallback(() => {
24
- setAnimation(animation => _extends({}, animation, {
24
+ setAnimation(animation => animation.state === 'closed' ? animation : _extends({}, animation, {
25
25
  state: 'close',
26
26
  style: animationStyle.close || animationStyle.closed,
27
27
  timing: closeTimeoutInMilliseconds
28
28
  }));
29
- return setTimeout(() => {
30
- setAnimation({
31
- state: 'closed',
32
- style: animationStyle.closed,
33
- open: false,
34
- timing: closeTimeoutInMilliseconds
35
- });
36
- }, closeTimeoutInMilliseconds);
37
29
  }, [animationStyle, closeTimeoutInMilliseconds]);
38
30
  const handleOpen = useCallback(() => {
39
- setAnimation(animation => _extends({}, animation, {
31
+ setAnimation(animation => animation.state === 'open' ? animation : _extends({}, animation, {
40
32
  open: true,
41
33
  state: 'opening',
42
34
  style: animationStyle.opening || animationStyle.closed
43
35
  }));
44
- return requestAnimationFrame(() => {
36
+ }, [animationStyle]);
37
+ useEffect(() => {
38
+ if (state === 'opening') {
45
39
  setAnimation(animation => _extends({}, animation, {
46
40
  state: 'open',
47
41
  style: animationStyle.open,
48
42
  timing: openTimeoutInMilliseconds
49
43
  }));
50
- });
51
- }, [animationStyle, openTimeoutInMilliseconds]);
44
+ }
45
+ }, [animationStyle.open, openTimeoutInMilliseconds, state]);
46
+ useEffect(() => {
47
+ if (state === 'close') {
48
+ const timeout = setTimeout(() => {
49
+ setAnimation({
50
+ state: 'closed',
51
+ style: animationStyle.closed,
52
+ open: false,
53
+ timing: closeTimeoutInMilliseconds
54
+ });
55
+ }, closeTimeoutInMilliseconds);
56
+ return () => clearTimeout(timeout);
57
+ }
58
+ }, [animationStyle.closed, closeTimeoutInMilliseconds, state]);
52
59
  useEffect(() => {
53
60
  if (openProp) {
54
- const frameHandler = handleOpen();
55
- return () => {
56
- cancelAnimationFrame(frameHandler);
57
- };
61
+ handleOpen();
58
62
  } else {
59
- const timeoutHandler = handleClose();
60
- return () => {
61
- clearTimeout(timeoutHandler);
62
- };
63
+ handleClose();
63
64
  }
64
65
  }, [handleClose, handleOpen, openProp]);
65
66
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/useAnimation.ts"],"names":["useState","useEffect","useCallback","useAnimation","opts","styles","mode","open","openProp","openTimeoutInMilliseconds","closeTimeoutInMilliseconds","animationStyle","timing","state","style","setAnimation","closed","handleClose","animation","close","setTimeout","handleOpen","opening","requestAnimationFrame","frameH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,CAA/B;AAkBA,QAAMW,UAAU,GAAGnB,WAAW,CAAC,MAAM;AACnCa,IAAAA,YAAY,CAAEG,SAAD,iBACRA,SADQ;AAEXX,MAAAA,IAAI,EAAE,IAFK;AAGXM,MAAAA,KAAK,EAAE,SAHI;AAIXC,MAAAA,KAAK,EAAEH,cAAc,CAACW,OAAf,IAA0BX,cAAc,CAACK;AAJrC,MAAD,CAAZ;AAMA,WAAOO,qBAAqB,CAAC,MAAM;AACjCR,MAAAA,YAAY,CAAEG,SAAD,iBACRA,SADQ;AAEXL,QAAAA,KAAK,EAAE,MAFI;AAGXC,QAAAA,KAAK,EAAEH,cAAc,CAACJ,IAHX;AAIXK,QAAAA,MAAM,EAAEH;AAJG,QAAD,CAAZ;AAMD,KAP2B,CAA5B;AAQD,GAf6B,EAe3B,CAACE,cAAD,EAAiBF,yBAAjB,CAf2B,CAA9B;AAiBAR,EAAAA,SAAS,CAAC,MAAM;AACd,QAAIO,QAAJ,EAAc;AACZ,YAAMgB,YAAY,GAAGH,UAAU,EAA/B;AACA,aAAO,MAAM;AACXI,QAAAA,oBAAoB,CAACD,YAAD,CAApB;AACD,OAFD;AAGD,KALD,MAKO;AACL,YAAME,cAAc,GAAGT,WAAW,EAAlC;AACA,aAAO,MAAM;AACXU,QAAAA,YAAY,CAACD,cAAD,CAAZ;AACD,OAFD;AAGD;AACF,GAZQ,EAYN,CAACT,WAAD,EAAcI,UAAd,EAA0Bb,QAA1B,CAZM,CAAT;AAcA,SAAO;AACLK,IAAAA,KADK;AAELC,IAAAA,KAFK;AAGLF,IAAAA,MAHK;AAILL,IAAAA;AAJK,GAAP;AAMD","sourcesContent":["import { useState, useEffect, useCallback, CSSProperties } from 'react';\n\nexport type AnimationStateStyles<TStyleProps extends CSSProperties> = {\n closed: TStyleProps;\n opening?: TStyleProps;\n open: TStyleProps;\n close?: TStyleProps;\n};\n\nexport type AnimationStyles<TStyleProps extends CSSProperties> = Record<\n string,\n AnimationStateStyles<TStyleProps>\n>;\n\nexport function useAnimation<\n TStyles extends AnimationStyles<TStyleProps>,\n TStyleProps extends CSSProperties\n>(opts: {\n open: boolean;\n styles: TStyles;\n mode: keyof TStyles;\n openTimeoutInMilliseconds?: number;\n closeTimeoutInMilliseconds?: number;\n}) {\n const {\n styles,\n mode,\n open: openProp,\n openTimeoutInMilliseconds = 225,\n closeTimeoutInMilliseconds = 110,\n } = opts;\n const animationStyle = styles[mode];\n const [{ timing, open, state, style }, setAnimation] = useState<{\n state: keyof AnimationStateStyles<TStyleProps>;\n timing: number;\n open: boolean;\n style: CSSProperties;\n }>({\n state: 'closed',\n style: animationStyle.closed,\n timing: closeTimeoutInMilliseconds,\n open: openProp,\n });\n\n const handleClose = useCallback(() => {\n setAnimation((animation) => ({\n ...animation,\n state: 'close',\n style: animationStyle.close || animationStyle.closed,\n timing: closeTimeoutInMilliseconds,\n }));\n\n return setTimeout(() => {\n setAnimation({\n state: 'closed',\n style: animationStyle.closed,\n open: false,\n timing: closeTimeoutInMilliseconds,\n });\n }, closeTimeoutInMilliseconds);\n }, [animationStyle, closeTimeoutInMilliseconds]);\n\n const handleOpen = useCallback(() => {\n setAnimation((animation) => ({\n ...animation,\n open: true,\n state: 'opening',\n style: animationStyle.opening || animationStyle.closed,\n }));\n return requestAnimationFrame(() => {\n setAnimation((animation) => ({\n ...animation,\n state: 'open',\n style: animationStyle.open,\n timing: openTimeoutInMilliseconds,\n }));\n });\n }, [animationStyle, openTimeoutInMilliseconds]);\n\n useEffect(() => {\n if (openProp) {\n const frameHandler = handleOpen();\n return () => {\n cancelAnimationFrame(frameHandler);\n };\n } else {\n const timeoutHandler = handleClose();\n return () => {\n clearTimeout(timeoutHandler);\n };\n }\n }, [handleClose, handleOpen, openProp]);\n\n return {\n state,\n style,\n timing,\n open,\n };\n}\n"],"file":"useAnimation.js"}
1
+ {"version":3,"sources":["../../../src/hooks/useAnimation.ts"],"names":["useState","useEffect","useCallback","useAnimation","opts","styles","mode","open","openProp","openTimeoutInMilliseconds","closeTimeoutInMilliseconds","animationStyle","timing","state","style","setAnimation","closed","handleClose","animation","close","handleOpen","opening","timeout","setTimeout","clearTimeout"],"mappings":";AAAA,SAASA,QAAT,EAAmBC,SAAnB,EAA8BC,WAA9B,QAAgE,OAAhE;AAcA,OAAO,SAASC,YAAT,CAGLC,IAHK,EASJ;AACD,QAAM;AACJC,IAAAA,MADI;AAEJC,IAAAA,IAFI;AAGJC,IAAAA,IAAI,EAAEC,QAHF;AAIJC,IAAAA,yBAAyB,GAAG,GAJxB;AAKJC,IAAAA,0BAA0B,GAAG;AALzB,MAMFN,IANJ;AAOA,QAAMO,cAAc,GAAGN,MAAM,CAACC,IAAD,CAA7B;AACA,QAAM,CAAC;AAAEM,IAAAA,MAAF;AAAUL,IAAAA,IAAV;AAAgBM,IAAAA,KAAhB;AAAuBC,IAAAA;AAAvB,GAAD,EAAiCC,YAAjC,IAAiDf,QAAQ,CAK5D;AACDa,IAAAA,KAAK,EAAE,QADN;AAEDC,IAAAA,KAAK,EAAEH,cAAc,CAACK,MAFrB;AAGDJ,IAAAA,MAAM,EAAEF,0BAHP;AAIDH,IAAAA,IAAI,EAAEC;AAJL,GAL4D,CAA/D;AAYA,QAAMS,WAAW,GAAGf,WAAW,CAAC,MAAM;AACpCa,IAAAA,YAAY,CAAEG,SAAD,IACXA,SAAS,CAACL,KAAV,KAAoB,QAApB,GACIK,SADJ,gBAGSA,SAHT;AAIML,MAAAA,KAAK,EAAE,OAJb;AAKMC,MAAAA,KAAK,EAAEH,cAAc,CAACQ,KAAf,IAAwBR,cAAc,CAACK,MALpD;AAMMJ,MAAAA,MAAM,EAAEF;AANd,MADU,CAAZ;AAUD,GAX8B,EAW5B,CAACC,cAAD,EAAiBD,0BAAjB,CAX4B,CAA/B;AAaA,QAAMU,UAAU,GAAGlB,WAAW,CAAC,MAAM;AACnCa,IAAAA,YAAY,CAAEG,SAAD,IACXA,SAAS,CAACL,KAAV,KAAoB,MAApB,GACIK,SADJ,gBAGSA,SAHT;AAI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KAFK;AAGLF,IAAAA,MAHK;AAILL,IAAAA;AAJK,GAAP;AAMD","sourcesContent":["import { useState, useEffect, useCallback, CSSProperties } from 'react';\n\nexport type AnimationStateStyles<TStyleProps extends CSSProperties> = {\n closed: TStyleProps;\n opening?: TStyleProps;\n open: TStyleProps;\n close?: TStyleProps;\n};\n\nexport type AnimationStyles<TStyleProps extends CSSProperties> = Record<\n string,\n AnimationStateStyles<TStyleProps>\n>;\n\nexport function useAnimation<\n TStyles extends AnimationStyles<TStyleProps>,\n TStyleProps extends CSSProperties\n>(opts: {\n open: boolean;\n styles: TStyles;\n mode: keyof TStyles;\n openTimeoutInMilliseconds?: number;\n closeTimeoutInMilliseconds?: number;\n}) {\n const {\n styles,\n mode,\n open: openProp,\n openTimeoutInMilliseconds = 225,\n closeTimeoutInMilliseconds = 110,\n } = opts;\n const animationStyle = styles[mode];\n const [{ timing, open, state, style }, setAnimation] = useState<{\n state: keyof AnimationStateStyles<TStyleProps>;\n timing: number;\n open: boolean;\n style: CSSProperties;\n }>({\n state: 'closed',\n style: animationStyle.closed,\n timing: closeTimeoutInMilliseconds,\n open: openProp,\n });\n\n const handleClose = useCallback(() => {\n setAnimation((animation) =>\n animation.state === 'closed'\n ? animation\n : {\n ...animation,\n state: 'close',\n style: animationStyle.close || animationStyle.closed,\n timing: closeTimeoutInMilliseconds,\n }\n );\n }, [animationStyle, closeTimeoutInMilliseconds]);\n\n const handleOpen = useCallback(() => {\n setAnimation((animation) =>\n animation.state === 'open'\n ? animation\n : {\n ...animation,\n open: true,\n state: 'opening',\n style: animationStyle.opening || animationStyle.closed,\n }\n );\n }, [animationStyle]);\n\n useEffect(() => {\n if (state === 'opening') {\n setAnimation((animation) => ({\n ...animation,\n state: 'open',\n style: animationStyle.open,\n timing: openTimeoutInMilliseconds,\n }));\n }\n }, [animationStyle.open, openTimeoutInMilliseconds, state]);\n\n useEffect(() => {\n if (state === 'close') {\n const timeout = setTimeout(() => {\n setAnimation({\n state: 'closed',\n style: animationStyle.closed,\n open: false,\n timing: closeTimeoutInMilliseconds,\n });\n }, closeTimeoutInMilliseconds);\n return () => clearTimeout(timeout);\n }\n }, [animationStyle.closed, closeTimeoutInMilliseconds, state]);\n\n useEffect(() => {\n if (openProp) {\n handleOpen();\n } else {\n handleClose();\n }\n }, [handleClose, handleOpen, openProp]);\n\n return {\n state,\n style,\n timing,\n open,\n };\n}\n"],"file":"useAnimation.js"}