@fluentui/react-input 0.0.0-nightlyf8be6a7c6520220106.1 → 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.json +561 -18
  2. package/CHANGELOG.md +213 -49
  3. package/README.md +32 -0
  4. package/Spec-styling.md +8 -8
  5. package/Spec-variants.md +2 -2
  6. package/dist/{react-input.d.ts → index.d.ts} +16 -22
  7. package/{lib → dist}/tsdoc-metadata.json +0 -0
  8. package/lib/Input.js.map +1 -1
  9. package/lib/components/Input/Input.js +6 -8
  10. package/lib/components/Input/Input.js.map +1 -1
  11. package/lib/components/Input/Input.types.js.map +1 -1
  12. package/lib/components/Input/index.js.map +1 -1
  13. package/lib/components/Input/renderInput.js +4 -4
  14. package/lib/components/Input/renderInput.js.map +1 -1
  15. package/lib/components/Input/useInput.js +3 -5
  16. package/lib/components/Input/useInput.js.map +1 -1
  17. package/lib/components/Input/useInputStyles.js +106 -93
  18. package/lib/components/Input/useInputStyles.js.map +1 -1
  19. package/lib/index.js +1 -1
  20. package/lib/index.js.map +1 -1
  21. package/lib-commonjs/Input.js.map +1 -1
  22. package/lib-commonjs/components/Input/Input.js +3 -5
  23. package/lib-commonjs/components/Input/Input.js.map +1 -1
  24. package/lib-commonjs/components/Input/Input.types.js.map +1 -1
  25. package/lib-commonjs/components/Input/index.js.map +1 -1
  26. package/lib-commonjs/components/Input/renderInput.js +6 -6
  27. package/lib-commonjs/components/Input/renderInput.js.map +1 -1
  28. package/lib-commonjs/components/Input/useInput.js +5 -7
  29. package/lib-commonjs/components/Input/useInput.js.map +1 -1
  30. package/lib-commonjs/components/Input/useInputStyles.js +112 -98
  31. package/lib-commonjs/components/Input/useInputStyles.js.map +1 -1
  32. package/lib-commonjs/index.js +32 -2
  33. package/lib-commonjs/index.js.map +1 -1
  34. package/package.json +18 -24
  35. package/lib/Input.d.ts +0 -1
  36. package/lib/components/Input/Input.d.ts +0 -8
  37. package/lib/components/Input/Input.types.d.ts +0 -84
  38. package/lib/components/Input/index.d.ts +0 -5
  39. package/lib/components/Input/renderInput.d.ts +0 -5
  40. package/lib/components/Input/useInput.d.ts +0 -12
  41. package/lib/components/Input/useInputStyles.d.ts +0 -6
  42. package/lib/index.d.ts +0 -1
  43. package/lib-commonjs/Input.d.ts +0 -1
  44. package/lib-commonjs/components/Input/Input.d.ts +0 -8
  45. package/lib-commonjs/components/Input/Input.types.d.ts +0 -84
  46. package/lib-commonjs/components/Input/index.d.ts +0 -5
  47. package/lib-commonjs/components/Input/renderInput.d.ts +0 -5
  48. package/lib-commonjs/components/Input/useInput.d.ts +0 -12
  49. package/lib-commonjs/components/Input/useInputStyles.d.ts +0 -6
  50. package/lib-commonjs/index.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Input/useInputStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,6BAArD;AAIA,OAAO,MAAM,cAAc,GAAG,WAAvB,C,CAEP;;AACA,MAAM,iBAAiB,GAAG;AACxB,EAAA,GAAG,EAAE,KADmB;AAExB,EAAA,EAAE,EAAE,KAFoB;AAGxB,EAAA,MAAM,EAAE,KAHgB;AAIxB,EAAA,CAAC,EAAE,KAJqB;AAKxB,EAAA,MAAM,EAAE,MALgB;AAMxB,EAAA,CAAC,EAAE;AANqB,CAA1B;AAQA,MAAM,eAAe,GAAG;AACtB,EAAA,SAAS,EAAE,OADW;AAEtB,EAAA,MAAM,EAAE;AAFc,CAAxB;AAIA,MAAM,YAAY,GAAG;AACnB,EAAA,aAAa,EAAE,2BADI;AAEnB,EAAA,aAAa,EAAE;AAFI,CAArB;AAIA,MAAM,YAAY,GAAG;AACnB;AACA,EAAA,KAAK,EAAG,KAAD,KAAmB;AACxB,IAAA,QAAQ,EAAE,KAAK,CAAC,eADQ;AAExB,IAAA,UAAU,EAAE,KAAK,CAAC;AAFM,GAAnB,CAFY;AAMnB,E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IAAyC,UAAU,CAAC,kBANnB,EAOjC,CAAC,QAAD,IAAa,UAAU,KAAK,WAA5B,IAA2C,UAAU,CAAC,oBAPrB,EAQjC,CAAC,QAAD,IAAa,MAAb,IAAuB,UAAU,CAAC,iBARD,EASjC,MAAM,IAAI,UAAU,CAAC,MATY,EAUjC,QAAQ,IAAI,UAAU,CAAC,QAVU,EAWjC,KAAK,CAAC,IAAN,CAAW,SAXsB,CAAnC;EAcA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAClC,eAAe,CAAC,KADkB,EAElC,WAAW,CAAC,IAFsB,EAGlC,WAAW,CAAC,IAAD,CAHuB,EAIlC,QAAQ,IAAI,WAAW,CAAC,QAJU,EAKlC,KAAK,CAAC,KAAN,CAAY,SALsB,CAApC;EAQA,MAAM,cAAc,GAAG,CAAC,aAAa,CAAC,IAAf,EAAqB,QAAQ,IAAI,aAAa,CAAC,QAA/C,EAAyD,aAAa,CAAC,IAAD,CAAtE,CAAvB;;EACA,IAAI,KAAK,CAAC,aAAV,EAAyB;IACvB,KAAK,CAAC,aAAN,CAAoB,SAApB,GAAgC,YAAY,CAC1C,eAAe,CAAC,aAD0B,EAE1C,GAAG,cAFuC,EAG1C,KAAK,CAAC,aAAN,CAAoB,SAHsB,CAA5C;EAKD;;EACD,IAAI,KAAK,CAAC,YAAV,EAAwB;IACtB,KAAK,CAAC,YAAN,CAAmB,SAAnB,GAA+B,YAAY,CACzC,eAAe,CAAC,YADyB,EAEzC,GAAG,cAFsC,EAGzC,KAAK,CAAC,YAAN,CAAmB,SAHsB,CAA3C;EAKD;;EAED,OAAO,KAAP;AACD,CAhDM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { InputSlots, InputState } from './Input.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const inputClassNames: SlotClassNames<InputSlots> = {\n root: 'fui-Input',\n input: 'fui-Input__input',\n contentBefore: 'fui-Input__contentBefore',\n contentAfter: 'fui-Input__contentAfter',\n};\n\n// TODO(sharing) use theme values once available\nconst contentSizes = {\n // TODO: This 400 style is not in the typography styles.\n // May need a design change\n 400: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n },\n};\n// TODO(sharing) should these be shared somewhere?\nconst fieldHeights = {\n small: '24px',\n medium: '32px',\n large: '40px',\n};\n\nconst useRootStyles = makeStyles({\n base: {\n display: 'inline-flex',\n alignItems: 'center',\n flexWrap: 'nowrap',\n ...shorthands.gap(tokens.spacingHorizontalXXS),\n fontFamily: tokens.fontFamilyBase,\n ...shorthands.borderRadius(tokens.borderRadiusMedium), // used for all but underline\n position: 'relative',\n boxSizing: 'border-box',\n },\n interactive: {\n // This is all for the bottom focus border.\n // It's supposed to be 2px flat all the way across and match the radius of the field's corners.\n '::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n left: '-1px',\n bottom: '-1px',\n right: '-1px',\n\n // Maintaining the correct corner radius:\n // Use the whole border-radius as the height and only put radii on the bottom corners.\n // (Otherwise the radius would be automatically reduced to fit available space.)\n // max() ensures the focus border still shows up even if someone sets tokens.borderRadiusMedium to 0.\n height: `max(2px, ${tokens.borderRadiusMedium})`,\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n\n // Flat 2px border:\n // By default borderBottom will cause little \"horns\" on the ends. The clipPath trims them off.\n // (This could be done without trimming using `background: linear-gradient(...)`, but using\n // borderBottom makes it easier for people to override the color if needed.)\n ...shorthands.borderBottom('2px', 'solid', tokens.colorCompoundBrandStroke),\n clipPath: 'inset(calc(100% - 2px) 0 0 0)',\n\n // Animation for focus OUT\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n },\n ':focus-within::after': {\n // Animation for focus IN\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n },\n ':focus-within:active::after': {\n // This is if the user clicks the field again while it's already focused\n borderBottomColor: tokens.colorCompoundBrandStrokePressed,\n },\n ':focus-within': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n },\n small: {\n minHeight: fieldHeights.small,\n ...shorthands.padding('0', tokens.spacingHorizontalSNudge),\n ...typographyStyles.caption1,\n },\n medium: {\n minHeight: fieldHeights.medium,\n ...shorthands.padding('0', tokens.spacingHorizontalMNudge),\n ...typographyStyles.body1,\n },\n large: {\n minHeight: fieldHeights.large,\n ...shorthands.padding('0', tokens.spacingHorizontalM),\n ...contentSizes[400],\n ...shorthands.gap(tokens.spacingHorizontalSNudge),\n },\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n ':hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n // DO NOT add a space between the selectors! It changes the behavior of make-styles.\n ':active,:focus-within': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderRadius(0), // corners look strange if rounded\n ...shorthands.borderBottom('1px', 'solid', tokens.colorNeutralStrokeAccessible),\n },\n underlineInteractive: {\n ':hover': {\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n // DO NOT add a space between the selectors! It changes the behavior of make-styles.\n ':active,:focus-within': {\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n '::after': shorthands.borderRadius(0), // remove rounded corners from focus underline\n },\n filled: {\n boxShadow: tokens.shadow2, // optional shadow for filled appearances\n ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n },\n filledInteractive: {\n // DO NOT add a space between the selectors! It changes the behavior of make-styles.\n ':hover,:focus-within': {\n // also handles pressed border color (:active)\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n },\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStrokeDisabled),\n ...shorthands.borderRadius(tokens.borderRadiusMedium), // because underline doesn't usually have a radius\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n});\n\nconst useInputElementStyles = makeStyles({\n base: {\n boxSizing: 'border-box',\n flexGrow: 1,\n minWidth: 0, // required to make the input shrink to fit the wrapper\n ...shorthands.borderStyle('none'), // input itself never has a border (this is handled by inputWrapper)\n ...shorthands.padding('0', tokens.spacingHorizontalXXS),\n color: tokens.colorNeutralForeground1,\n // Use literal \"transparent\" (not from the theme) to always let the color from the root show through\n backgroundColor: 'transparent',\n\n '::placeholder': {\n color: tokens.colorNeutralForeground4,\n opacity: 1, // browser style override\n },\n\n outlineStyle: 'none', // disable default browser outline\n },\n small: {\n // This is set on root but doesn't inherit\n ...typographyStyles.caption1,\n },\n medium: {\n ...typographyStyles.body1,\n },\n large: {\n ...contentSizes[400],\n ...shorthands.padding('0', tokens.spacingHorizontalSNudge),\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorTransparentBackground,\n cursor: 'not-allowed',\n '::placeholder': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nconst useContentStyles = makeStyles({\n base: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground3, // \"icon color\" in design spec\n // special case styling for icons (most common case) to ensure they're centered vertically\n '> svg': { display: 'block' },\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n // Ensure resizable icons show up with the proper font size\n small: {\n '> svg': { fontSize: '16px' },\n },\n medium: {\n '> svg': { fontSize: '20px' },\n },\n large: {\n '> svg': { fontSize: '24px' },\n },\n});\n\n/**\n * Apply styling to the Input slots based on the state\n */\nexport const useInputStyles_unstable = (state: InputState): InputState => {\n const { size, appearance } = state;\n const disabled = state.input.disabled;\n const filled = appearance.startsWith('filled');\n\n const rootStyles = useRootStyles();\n const inputStyles = useInputElementStyles();\n const contentStyles = useContentStyles();\n\n state.root.className = mergeClasses(\n inputClassNames.root,\n rootStyles.base,\n rootStyles[size],\n rootStyles[appearance],\n !disabled && rootStyles.interactive,\n !disabled && appearance === 'outline' && rootStyles.outlineInteractive,\n !disabled && appearance === 'underline' && rootStyles.underlineInteractive,\n !disabled && filled && rootStyles.filledInteractive,\n filled && rootStyles.filled,\n disabled && rootStyles.disabled,\n state.root.className,\n );\n\n state.input.className = mergeClasses(\n inputClassNames.input,\n inputStyles.base,\n inputStyles[size],\n disabled && inputStyles.disabled,\n state.input.className,\n );\n\n const contentClasses = [contentStyles.base, disabled && contentStyles.disabled, contentStyles[size]];\n if (state.contentBefore) {\n state.contentBefore.className = mergeClasses(\n inputClassNames.contentBefore,\n ...contentClasses,\n state.contentBefore.className,\n );\n }\n if (state.contentAfter) {\n state.contentAfter.className = mergeClasses(\n inputClassNames.contentAfter,\n ...contentClasses,\n state.contentAfter.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
package/lib/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from './Input';
1
+ export { Input, inputClassNames, renderInput_unstable, useInputStyles_unstable, useInput_unstable } from './Input';
2
2
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC","sourcesContent":["export { Input, inputClassNames, renderInput_unstable, useInputStyles_unstable, useInput_unstable } from './Input';\nexport type { InputOnChangeData, InputProps, InputSlots, InputState } from './Input';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Input.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["Input.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Input/index';\n"],"sourceRoot":"../src/"}
@@ -14,15 +14,13 @@ const renderInput_1 = /*#__PURE__*/require("./renderInput");
14
14
  const useInputStyles_1 = /*#__PURE__*/require("./useInputStyles");
15
15
  /**
16
16
  * The Input component allows people to enter and edit text.
17
- *
18
- * ⚠️ **This component is still in alpha (unstable) status. APIs may change before the final release.**
19
17
  */
20
18
 
21
19
 
22
20
  exports.Input = /*#__PURE__*/React.forwardRef((props, ref) => {
23
- const state = useInput_1.useInput(props, ref);
24
- useInputStyles_1.useInputStyles(state);
25
- return renderInput_1.renderInput(state);
21
+ const state = useInput_1.useInput_unstable(props, ref);
22
+ useInputStyles_1.useInputStyles_unstable(state);
23
+ return renderInput_1.renderInput_unstable(state);
26
24
  });
27
25
  exports.Input.displayName = 'Input';
28
26
  //# sourceMappingURL=Input.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;AAIA;;;;AAIG;;;AACU,OAAA,CAAA,KAAA,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpF,QAAM,KAAK,GAAG,UAAA,CAAA,QAAA,CAAS,KAAT,EAAgB,GAAhB,CAAd;AAEA,EAAA,gBAAA,CAAA,cAAA,CAAe,KAAf;AACA,SAAO,aAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CALqD,CAAzC;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourceRoot":""}
1
+ {"version":3,"sources":["components/Input/Input.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpF,MAAM,KAAK,GAAG,UAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;EAEA,gBAAA,CAAA,uBAAA,CAAwB,KAAxB;EACA,OAAO,aAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CALqD,CAAzC;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourcesContent":["import * as React from 'react';\nimport { useInput_unstable } from './useInput';\nimport { renderInput_unstable } from './renderInput';\nimport { useInputStyles_unstable } from './useInputStyles';\nimport type { InputProps } from './Input.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * The Input component allows people to enter and edit text.\n */\nexport const Input: ForwardRefComponent<InputProps> = React.forwardRef((props, ref) => {\n const state = useInput_unstable(props, ref);\n\n useInputStyles_unstable(state);\n return renderInput_unstable(state);\n});\n\nInput.displayName = 'Input';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/Input/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Input';\nexport * from './Input.types';\nexport * from './renderInput';\nexport * from './useInput';\nexport * from './useInputStyles';\n"],"sourceRoot":"../src/"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.renderInput = void 0;
6
+ exports.renderInput_unstable = void 0;
7
7
 
8
8
  const React = /*#__PURE__*/require("react");
9
9
 
@@ -13,17 +13,17 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
13
13
  */
14
14
 
15
15
 
16
- const renderInput = state => {
16
+ const renderInput_unstable = state => {
17
17
  const {
18
18
  slots,
19
19
  slotProps
20
- } = react_utilities_1.getSlots(state, ['input', 'contentBefore', 'contentAfter', 'root']);
20
+ } = react_utilities_1.getSlots(state);
21
21
  return React.createElement(slots.root, { ...slotProps.root
22
- }, React.createElement(slots.contentBefore, { ...slotProps.contentBefore
22
+ }, slots.contentBefore && React.createElement(slots.contentBefore, { ...slotProps.contentBefore
23
23
  }), React.createElement(slots.input, { ...slotProps.input
24
- }), React.createElement(slots.contentAfter, { ...slotProps.contentAfter
24
+ }), slots.contentAfter && React.createElement(slots.contentAfter, { ...slotProps.contentAfter
25
25
  }));
26
26
  };
27
27
 
28
- exports.renderInput = renderInput;
28
+ exports.renderInput_unstable = renderInput_unstable;
29
29
  //# sourceMappingURL=renderInput.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Input/renderInput.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,EAA4B,CAAC,OAAD,EAAU,eAAV,EAA2B,cAA3B,EAA2C,MAA3C,CAA5B,CAA7B;AACA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,aAAP,EAAoB,EAAA,GAAK,SAAS,CAAC;AAAf,GAApB,CADF,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAFF,EAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,YAAP,EAAmB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAnB,CAHF,CADF;AAOD,CATM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX","sourceRoot":""}
1
+ {"version":3,"sources":["components/Input/renderInput.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,oBAAoB,GAAI,KAAD,IAAsB;EACxD,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,CAA7B;EACA,OACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,aAAN,IAAuB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,aAAP,EAAoB,EAAA,GAAK,SAAS,CAAC;EAAf,CAApB,CAD1B,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CAFF,EAGG,KAAK,CAAC,YAAN,IAAsB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,YAAP,EAAmB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAnB,CAHzB,CADF;AAOD,CATM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { InputSlots, InputState } from './Input.types';\n\n/**\n * Render the final JSX of Input\n */\nexport const renderInput_unstable = (state: InputState) => {\n const { slots, slotProps } = getSlots<InputSlots>(state);\n return (\n <slots.root {...slotProps.root}>\n {slots.contentBefore && <slots.contentBefore {...slotProps.contentBefore} />}\n <slots.input {...slotProps.input} />\n {slots.contentAfter && <slots.contentAfter {...slotProps.contentAfter} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -3,25 +3,24 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useInput = void 0;
6
+ exports.useInput_unstable = void 0;
7
7
 
8
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
9
  /**
10
10
  * Create the state required to render Input.
11
11
  *
12
- * The returned state can be modified with hooks such as useInputStyles,
13
- * before being passed to renderInput.
12
+ * The returned state can be modified with hooks such as useInputStyles_unstable,
13
+ * before being passed to renderInput_unstable.
14
14
  *
15
15
  * @param props - props from this instance of Input
16
16
  * @param ref - reference to `<input>` element of Input
17
17
  */
18
18
 
19
19
 
20
- const useInput = (props, ref) => {
20
+ const useInput_unstable = (props, ref) => {
21
21
  const {
22
22
  size = 'medium',
23
23
  appearance = 'outline',
24
- inline = false,
25
24
  onChange
26
25
  } = props;
27
26
  const [value, setValue] = react_utilities_1.useControllableState({
@@ -37,7 +36,6 @@ const useInput = (props, ref) => {
37
36
  const state = {
38
37
  size,
39
38
  appearance,
40
- inline,
41
39
  components: {
42
40
  root: 'span',
43
41
  input: 'input',
@@ -70,5 +68,5 @@ const useInput = (props, ref) => {
70
68
  return state;
71
69
  };
72
70
 
73
- exports.useInput = useInput;
71
+ exports.useInput_unstable = useInput_unstable;
74
72
  //# sourceMappingURL=useInput.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Input/useInput.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAQA;;;;;;;;AAQG;;;AACI,MAAM,QAAQ,GAAG,CAAC,KAAD,EAAoB,GAApB,KAAoE;AAC1F,QAAM;AAAE,IAAA,IAAI,GAAG,QAAT;AAAmB,IAAA,UAAU,GAAG,SAAhC;AAA2C,IAAA,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FwB;IAGxB,UAAU,EAAE;MACV,IAAI,EAAE,MADI;MAEV,KAAK,EAAE,OAFG;MAGV,aAAa,EAAE,MAHL;MAIV,YAAY,EAAE;IAJJ,CAHY;IASxB,KAAK,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,KAAvB,EAA8B;MACnC,QAAQ,EAAE,IADyB;MAEnC,YAAY,EAAE;QACZ,IAAI,EAAE,MADM;QAEZ,GAFY;QAGZ,GAAG,WAAW,CAAC;MAHH;IAFqB,CAA9B,CATiB;IAiBxB,YAAY,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,YAAvB,CAjBU;IAkBxB,aAAa,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,aAAvB,CAlBS;IAmBxB,IAAI,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,IAAvB,EAA6B;MACjC,QAAQ,EAAE,IADuB;MAEjC,YAAY,EAAE,WAAW,CAAC;IAFO,CAA7B;EAnBkB,CAA1B;EAyBA,KAAK,CAAC,KAAN,CAAY,KAAZ,GAAoB,KAApB;EACA,KAAK,CAAC,KAAN,CAAY,QAAZ,GAAuB,iBAAA,CAAA,gBAAA,CAAiB,EAAE,IAAG;IAC3C,MAAM,QAAQ,GAAG,EAAE,CAAC,MAAH,CAAU,KAA3B;IACA,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,EAAH,EAAO;MAAE,KAAK,EAAE;IAAT,CAAP,CAAR;IACA,QAAQ,CAAC,QAAD,CAAR;EACD,CAJsB,CAAvB;EAMA,OAAO,KAAP;AACD,CAhDM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourcesContent":["import * as React from 'react';\nimport {\n getPartitionedNativeProps,\n resolveShorthand,\n useControllableState,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport type { InputProps, InputState } from './Input.types';\n\n/**\n * Create the state required to render Input.\n *\n * The returned state can be modified with hooks such as useInputStyles_unstable,\n * before being passed to renderInput_unstable.\n *\n * @param props - props from this instance of Input\n * @param ref - reference to `<input>` element of Input\n */\nexport const useInput_unstable = (props: InputProps, ref: React.Ref<HTMLInputElement>): InputState => {\n const { size = 'medium', appearance = 'outline', onChange } = props;\n\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: undefined,\n });\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['size', 'onChange', 'value', 'defaultValue'],\n });\n\n const state: InputState = {\n size,\n appearance,\n components: {\n root: 'span',\n input: 'input',\n contentBefore: 'span',\n contentAfter: 'span',\n },\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'text',\n ref,\n ...nativeProps.primary,\n },\n }),\n contentAfter: resolveShorthand(props.contentAfter),\n contentBefore: resolveShorthand(props.contentBefore),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root,\n }),\n };\n\n state.input.value = value;\n state.input.onChange = useEventCallback(ev => {\n const newValue = ev.target.value;\n onChange?.(ev, { value: newValue });\n setValue(newValue);\n });\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -3,43 +3,26 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useInputStyles = exports.inputClassName = void 0;
6
+ exports.useInputStyles_unstable = exports.inputClassNames = void 0;
7
7
 
8
- const react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
- exports.inputClassName = 'fui-Input'; // TODO(sharing) use theme values once available
10
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
+
12
+ exports.inputClassNames = {
13
+ root: 'fui-Input',
14
+ input: 'fui-Input__input',
15
+ contentBefore: 'fui-Input__contentBefore',
16
+ contentAfter: 'fui-Input__contentAfter'
17
+ }; // TODO(sharing) use theme values once available
11
18
 
12
- const horizontalSpacing = {
13
- xxs: '2px',
14
- xs: '4px',
15
- sNudge: '6px',
16
- s: '8px',
17
- mNudge: '10px',
18
- m: '12px'
19
- };
20
- const motionDurations = {
21
- ultraFast: '0.05s',
22
- normal: '0.2s'
23
- };
24
- const motionCurves = {
25
- accelerateMid: 'cubic-bezier(0.7,0,1,0.5)',
26
- decelerateMid: 'cubic-bezier(0.1,0.9,0.2,1)'
27
- };
28
19
  const contentSizes = {
29
- // TODO(sharing) shouldn't these be in the theme?
30
- body1: theme => ({
31
- fontSize: theme.fontSizeBase300,
32
- lineHeight: theme.lineHeightBase300
33
- }),
34
- caption1: theme => ({
35
- fontSize: theme.fontSizeBase200,
36
- lineHeight: theme.lineHeightBase200
37
- }),
38
- // eslint-disable-next-line @typescript-eslint/naming-convention
39
- 400: theme => ({
40
- fontSize: theme.fontSizeBase400,
41
- lineHeight: theme.lineHeightBase400
42
- })
20
+ // TODO: This 400 style is not in the typography styles.
21
+ // May need a design change
22
+ 400: {
23
+ fontSize: react_theme_1.tokens.fontSizeBase400,
24
+ lineHeight: react_theme_1.tokens.lineHeightBase400
25
+ }
43
26
  }; // TODO(sharing) should these be shared somewhere?
44
27
 
45
28
  const fieldHeights = {
@@ -48,13 +31,13 @@ const fieldHeights = {
48
31
  large: '40px'
49
32
  };
50
33
 
51
- const useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
34
+ const useRootStyles = /*#__PURE__*/react_1.__styles({
52
35
  "base": {
53
- "mc9l5x": "f22iagw",
36
+ "mc9l5x": "ftuwxu6",
54
37
  "Bt984gj": "f122n59",
55
38
  "Eh141a": "flvyvdh",
56
- "i8kkvl": "f16mnhsx",
57
- "Belr9w4": "fbi42co",
39
+ "i8kkvl": "f14mj54c",
40
+ "Belr9w4": "fiut8dr",
58
41
  "Bahqtrf": "fk6fouc",
59
42
  "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
60
43
  "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
@@ -64,60 +47,64 @@ const useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
64
47
  "B7ck84d": "f1ewtqcl"
65
48
  },
66
49
  "interactive": {
67
- "oqd9ik": "ffdc0f3",
68
- "Bs6t6z0": "fqc6z8f",
69
- "Hdbjpj": "f11ef69",
70
- "jc51t6": ["f383sj6", "fpmdmpy"],
71
- "Bj55yzk": "fqmzrrm",
72
- "cnmfks": ["fpmdmpy", "f383sj6"],
73
- "mpb1vu": "f1iv82i4",
74
- "B9nohqn": ["f1j2a01o", "fvxed1z"],
75
- "frdscb": ["fvxed1z", "f1j2a01o"],
76
- "B3zxwmv": "f1gw3il9",
77
- "J4s2b0": "fd0py6g",
78
- "Bk8j60v": "f1ta67ae",
79
- "B5pt6m4": "fabrkco",
80
- "xn0juu": "f1lmmjng",
81
- "wbfbqe": "fopw4to",
82
- "mafdb0": "f1dw3w9y",
83
- "s1xtto": "f1n2ytmg",
84
- "Hbcoss": "fnqdfvx",
85
- "lq1u8j": "fbqc2tv",
86
- "B37x0ls": "fvvig05",
87
- "H8rp7s": "f1nwpqpa",
88
- "uvoyur": "f1e6xsgv"
50
+ "li1rpt": "f1gw3sf2",
51
+ "Bsft5z2": "f13zj6fq",
52
+ "E3zdtr": "f1mdlcz9",
53
+ "Eqx8gd": ["f1a7op3", "f1cjjd47"],
54
+ "By385i5": "f1gboi2j",
55
+ "B1piin3": ["f1cjjd47", "f1a7op3"],
56
+ "Dlnsje": "f145g4dw",
57
+ "d9w3h3": ["f1kp91vd", "f1ibwz09"],
58
+ "B3778ie": ["f1ibwz09", "f1kp91vd"],
59
+ "Bcgy8vk": "f1cb6c3",
60
+ "Bw17bha": "f1lh990p",
61
+ "B1q35kw": "f1jc6hxc",
62
+ "Gjdm7m": "f13evtba",
63
+ "b1kco5": "f1yk9hq",
64
+ "Ba2ppi3": "fhwpy7i",
65
+ "F2fol1": "f14ee0xe",
66
+ "lck23g": "f1xhbsuh",
67
+ "umuwi5": "fjw5xc1",
68
+ "Blcqepd": "f1xdyd5c",
69
+ "nplu4u": "fatpbeo",
70
+ "Bioka5o": "fb7uyps",
71
+ "Bercvud": "f1ibeo51",
72
+ "Bbr2w1p": "f14a1fxs",
73
+ "Bduesf4": "f3e99gv",
74
+ "Bpq79vn": "fhljsf7"
89
75
  },
90
76
  "small": {
91
77
  "sshi5w": "f1pha7fy",
92
78
  "z8tnut": "f1g0x7ka",
93
- "z189sj": ["f1sgzk6v", "f1bg5zqg"],
79
+ "z189sj": ["fdw0yi8", "fk8j09s"],
94
80
  "Byoj8tv": "f1qch9an",
95
- "uwmqm3": ["f1bg5zqg", "f1sgzk6v"],
81
+ "uwmqm3": ["fk8j09s", "fdw0yi8"],
82
+ "Bahqtrf": "fk6fouc",
96
83
  "Be2twd7": "fy9rknc",
84
+ "Bhrd7zp": "figsok6",
97
85
  "Bg96gwp": "fwrc4pm"
98
86
  },
99
87
  "medium": {
100
88
  "sshi5w": "f1nxs5xn",
101
89
  "z8tnut": "f1g0x7ka",
102
- "z189sj": ["f81rol6", "frdkuqy"],
90
+ "z189sj": ["f11gcy0p", "f1ng84yb"],
103
91
  "Byoj8tv": "f1qch9an",
104
- "uwmqm3": ["frdkuqy", "f81rol6"],
92
+ "uwmqm3": ["f1ng84yb", "f11gcy0p"],
93
+ "Bahqtrf": "fk6fouc",
105
94
  "Be2twd7": "fkhj508",
95
+ "Bhrd7zp": "figsok6",
106
96
  "Bg96gwp": "f1i3iumi"
107
97
  },
108
98
  "large": {
109
99
  "sshi5w": "f1w5jphr",
110
100
  "z8tnut": "f1g0x7ka",
111
- "z189sj": ["f11qrl6u", "fjlbh76"],
101
+ "z189sj": ["fw5db7e", "f1uw59to"],
112
102
  "Byoj8tv": "f1qch9an",
113
- "uwmqm3": ["fjlbh76", "f11qrl6u"],
103
+ "uwmqm3": ["f1uw59to", "fw5db7e"],
114
104
  "Be2twd7": "fod5ikn",
115
105
  "Bg96gwp": "faaz57k",
116
- "i8kkvl": "fgfbwa2",
117
- "Belr9w4": "f1y3hx6l"
118
- },
119
- "inline": {
120
- "mc9l5x": "ftuwxu6"
106
+ "i8kkvl": "f1rjii52",
107
+ "Belr9w4": "f1r7g2jn"
121
108
  },
122
109
  "outline": {
123
110
  "De3pzq": "fxugw4r",
@@ -157,10 +144,10 @@ const useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
157
144
  "underlineInteractive": {
158
145
  "oetu4i": "f1l4zc64",
159
146
  "Be8ivqh": "f1klwx88",
160
- "frdscb": ["fqvcdsd", "f9cg6ix"],
161
- "B9nohqn": ["f9cg6ix", "fqvcdsd"],
162
- "B1dhsta": ["f1pvm60u", "f179ivkp"],
163
- "Bjdmjzx": ["f179ivkp", "f1pvm60u"]
147
+ "B3778ie": ["f1nf3wye", "feulmo5"],
148
+ "d9w3h3": ["feulmo5", "f1nf3wye"],
149
+ "Bl18szs": ["f18vqdqu", "f53nyzz"],
150
+ "B4j8arr": ["f53nyzz", "f18vqdqu"]
164
151
  },
165
152
  "filled": {
166
153
  "E5pizo": "fyed02w",
@@ -183,14 +170,15 @@ const useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
183
170
  "nagaa4": "f1tpwn32",
184
171
  "B1yhkcb": ["fsrcdbj", "f17blpuu"]
185
172
  },
186
- "filledDarker": {
173
+ "filled-darker": {
187
174
  "De3pzq": "f16xq7d1"
188
175
  },
189
- "filledLighter": {
176
+ "filled-lighter": {
190
177
  "De3pzq": "fxugw4r"
191
178
  },
192
179
  "disabled": {
193
180
  "Bceei9c": "fdrzuqr",
181
+ "De3pzq": "f1c21dwh",
194
182
  "B4j52fo": "f5ogflp",
195
183
  "Bekrc4i": ["f1hqa2wf", "finvdd3"],
196
184
  "Bn0qgzm": "f1f09k3d",
@@ -206,48 +194,66 @@ const useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
206
194
  "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
207
195
  "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
208
196
  "B7oj6ja": ["f1jar5jt", "fyu767a"],
209
- "Btl43ni": ["fyu767a", "f1jar5jt"]
197
+ "Btl43ni": ["fyu767a", "f1jar5jt"],
198
+ "Bjwas2f": "fg455y9",
199
+ "Bn1d65q": ["f1rvyvqg", "f14g86mu"],
200
+ "Bxeuatn": "f1cwzwz",
201
+ "n51gp8": ["f14g86mu", "f1rvyvqg"]
210
202
  }
211
203
  }, {
212
- "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".flvyvdh{-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}", ".f16mnhsx{-webkit-column-gap:2px;column-gap:2px;}", ".fbi42co{row-gap:2px;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f10pi13n{position:relative;}", ".f1ewtqcl{box-sizing:border-box;}", ".ffdc0f3:after{box-sizing:border-box;}", ".fqc6z8f:after{content:\"\";}", ".f11ef69:after{position:absolute;}", ".f383sj6:after{left:-1px;}", ".fpmdmpy:after{right:-1px;}", ".fqmzrrm:after{bottom:-1px;}", ".f1iv82i4:after{height:-webkit-max(2px, var(--borderRadiusMedium));height:-moz-max(2px, var(--borderRadiusMedium));height:max(2px, var(--borderRadiusMedium));}", ".f1j2a01o:after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fvxed1z:after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1gw3il9:after{border-bottom-width:2px;}", ".fd0py6g:after{border-bottom-style:solid;}", ".f1ta67ae:after{border-bottom-color:var(--colorCompoundBrandStroke);}", ".fabrkco:after{-webkit-clip-path:inset(calc(100% - 2px) 0 0 0);clip-path:inset(calc(100% - 2px) 0 0 0);}", ".f1lmmjng:after{-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);}", ".fopw4to:after{transition-property:transform;}", ".f1dw3w9y:after{transition-duration:0.05s;}", ".f1n2ytmg:after{transition-delay:cubic-bezier(0.7,0,1,0.5);}", ".f1pha7fy{min-height:24px;}", ".f1g0x7ka{padding-top:0;}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1qch9an{padding-bottom:0;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1nxs5xn{min-height:32px;}", ".f81rol6{padding-right:10px;}", ".frdkuqy{padding-left:10px;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1w5jphr{min-height:40px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fgfbwa2{-webkit-column-gap:6px;column-gap:6px;}", ".f1y3hx6l{row-gap:6px;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1krrbdw{border-bottom-right-radius:0;}", ".f1deotkl{border-bottom-left-radius:0;}", ".f10ostut{border-top-right-radius:0;}", ".f1ozlkrg{border-top-left-radius:0;}", ".fqvcdsd:after{border-bottom-right-radius:0;}", ".f9cg6ix:after{border-bottom-left-radius:0;}", ".f1pvm60u:after{border-top-right-radius:0;}", ".f179ivkp:after{border-top-left-radius:0;}", ".fyed02w{box-shadow:var(--shadow2);}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f16xq7d1{background-color:var(--colorNeutralBackground3);}", ".fdrzuqr{cursor:not-allowed;}", ".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}"],
213
- "w": [".fnqdfvx:focus-within:after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);}", ".fbqc2tv:focus-within:after{transition-property:transform;}", ".fvvig05:focus-within:after{transition-duration:0.2s;}", ".f1nwpqpa:focus-within:after{transition-delay:cubic-bezier(0.1,0.9,0.2,1);}", ".f1e6xsgv:focus-within:active:after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}"],
214
- "h": [".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1l4zc64:hover{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".ftmjh5b:hover,.ftmjh5b:focus-within{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f17blpuu:hover,.f17blpuu:focus-within{border-right-color:var(--colorTransparentStrokeInteractive);}", ".fsrcdbj:hover,:focus-within{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f1tpwn32:hover,.f1tpwn32:focus-within{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".fsrcdbj:hover,.fsrcdbj:focus-within{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f17blpuu:hover,:focus-within{border-right-color:var(--colorTransparentStrokeInteractive);}"],
215
- "a": [".f8vnjqi:active,.f8vnjqi:focus-within{border-top-color:var(--colorNeutralStroke1Pressed);}", ".fz1etlk:active,.fz1etlk:focus-within{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f1hc16gm:active,:focus-within{border-left-color:var(--colorNeutralStroke1Pressed);}", ".f1klwx88:active,.f1klwx88:focus-within{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1hc16gm:active,.f1hc16gm:focus-within{border-left-color:var(--colorNeutralStroke1Pressed);}", ".fz1etlk:active,:focus-within{border-right-color:var(--colorNeutralStroke1Pressed);}"]
204
+ "d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".flvyvdh{-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}", ".f14mj54c{-webkit-column-gap:var(--spacingHorizontalXXS);column-gap:var(--spacingHorizontalXXS);}", ".fiut8dr{row-gap:var(--spacingHorizontalXXS);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f10pi13n{position:relative;}", ".f1ewtqcl{box-sizing:border-box;}", ".f1gw3sf2::after{box-sizing:border-box;}", ".f13zj6fq::after{content:\"\";}", ".f1mdlcz9::after{position:absolute;}", ".f1a7op3::after{left:-1px;}", ".f1cjjd47::after{right:-1px;}", ".f1gboi2j::after{bottom:-1px;}", ".f145g4dw::after{height:max(2px, var(--borderRadiusMedium));}", ".f1kp91vd::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1ibwz09::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1cb6c3::after{border-bottom-width:2px;}", ".f1lh990p::after{border-bottom-style:solid;}", ".f1jc6hxc::after{border-bottom-color:var(--colorCompoundBrandStroke);}", ".f13evtba::after{-webkit-clip-path:inset(calc(100% - 2px) 0 0 0);clip-path:inset(calc(100% - 2px) 0 0 0);}", ".f1yk9hq::after{-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);}", ".fhwpy7i::after{transition-property:transform;}", ".f14ee0xe::after{transition-duration:var(--durationUltraFast);}", ".f1xhbsuh::after{transition-delay:var(--curveAccelerateMid);}", ".f1pha7fy{min-height:24px;}", ".f1g0x7ka{padding-top:0;}", ".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}", ".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}", ".f1qch9an{padding-bottom:0;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1nxs5xn{min-height:32px;}", ".f11gcy0p{padding-right:var(--spacingHorizontalMNudge);}", ".f1ng84yb{padding-left:var(--spacingHorizontalMNudge);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1w5jphr{min-height:40px;}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1rjii52{-webkit-column-gap:var(--spacingHorizontalSNudge);column-gap:var(--spacingHorizontalSNudge);}", ".f1r7g2jn{row-gap:var(--spacingHorizontalSNudge);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1krrbdw{border-bottom-right-radius:0;}", ".f1deotkl{border-bottom-left-radius:0;}", ".f10ostut{border-top-right-radius:0;}", ".f1ozlkrg{border-top-left-radius:0;}", ".f1nf3wye::after{border-bottom-right-radius:0;}", ".feulmo5::after{border-bottom-left-radius:0;}", ".f18vqdqu::after{border-top-right-radius:0;}", ".f53nyzz::after{border-top-left-radius:0;}", ".fyed02w{box-shadow:var(--shadow2);}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f16xq7d1{background-color:var(--colorNeutralBackground3);}", ".fdrzuqr{cursor:not-allowed;}", ".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}"],
205
+ "w": [".fjw5xc1:focus-within::after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);}", ".f1xdyd5c:focus-within::after{transition-property:transform;}", ".fatpbeo:focus-within::after{transition-duration:var(--durationNormal);}", ".fb7uyps:focus-within::after{transition-delay:var(--curveDecelerateMid);}", ".f1ibeo51:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}", ".f14a1fxs:focus-within{outline-width:2px;}", ".f3e99gv:focus-within{outline-style:solid;}", ".fhljsf7:focus-within{outline-color:transparent;}"],
206
+ "h": [".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1l4zc64:hover{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".ftmjh5b:hover,.ftmjh5b:focus-within{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f17blpuu:hover,.f17blpuu:focus-within{border-right-color:var(--colorTransparentStrokeInteractive);}", ".fsrcdbj:hover,.fsrcdbj:focus-within{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f1tpwn32:hover,.f1tpwn32:focus-within{border-bottom-color:var(--colorTransparentStrokeInteractive);}"],
207
+ "a": [".f8vnjqi:active,.f8vnjqi:focus-within{border-top-color:var(--colorNeutralStroke1Pressed);}", ".fz1etlk:active,.fz1etlk:focus-within{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f1hc16gm:active,.f1hc16gm:focus-within{border-left-color:var(--colorNeutralStroke1Pressed);}", ".f1klwx88:active,.f1klwx88:focus-within{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}"],
208
+ "m": [["@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}", {
209
+ "m": "(forced-colors: active)"
210
+ }], ["@media (forced-colors: active){.f1rvyvqg{border-right-color:GrayText;}.f14g86mu{border-left-color:GrayText;}}", {
211
+ "m": "(forced-colors: active)"
212
+ }], ["@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}", {
213
+ "m": "(forced-colors: active)"
214
+ }], ["@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}", {
215
+ "m": "(forced-colors: active)"
216
+ }]]
216
217
  });
217
218
 
218
- const useInputElementStyles = /*#__PURE__*/react_make_styles_1.__styles({
219
+ const useInputElementStyles = /*#__PURE__*/react_1.__styles({
219
220
  "base": {
220
221
  "B7ck84d": "f1ewtqcl",
221
222
  "Bh6795r": "fqerorx",
223
+ "Bf4jedk": "fy77jfu",
222
224
  "icvyot": "f1ern45e",
223
225
  "vrafjx": ["f1n71otn", "f1deefiw"],
224
226
  "oivjwe": "f1h8hb77",
225
227
  "wvpqe5": ["f1deefiw", "f1n71otn"],
226
228
  "z8tnut": "f1g0x7ka",
227
- "z189sj": ["f12huiiw", "f161knb0"],
229
+ "z189sj": ["ffczdla", "fgiv446"],
228
230
  "Byoj8tv": "f1qch9an",
229
- "uwmqm3": ["f161knb0", "f12huiiw"],
231
+ "uwmqm3": ["fgiv446", "ffczdla"],
230
232
  "sj55zd": "f19n0e5",
231
233
  "De3pzq": "f3rmtva",
232
234
  "yvdlaj": "fwyc1cq",
233
235
  "B3o7kgh": "f13ta7ih",
234
- "B486eqv": "f2hkw1w"
236
+ "oeaueh": "f1s6fcnf"
235
237
  },
236
238
  "small": {
239
+ "Bahqtrf": "fk6fouc",
237
240
  "Be2twd7": "fy9rknc",
241
+ "Bhrd7zp": "figsok6",
238
242
  "Bg96gwp": "fwrc4pm"
239
243
  },
240
244
  "medium": {
245
+ "Bahqtrf": "fk6fouc",
241
246
  "Be2twd7": "fkhj508",
247
+ "Bhrd7zp": "figsok6",
242
248
  "Bg96gwp": "f1i3iumi"
243
249
  },
244
250
  "large": {
245
251
  "Be2twd7": "fod5ikn",
246
252
  "Bg96gwp": "faaz57k",
247
253
  "z8tnut": "f1g0x7ka",
248
- "z189sj": ["f1sgzk6v", "f1bg5zqg"],
254
+ "z189sj": ["fdw0yi8", "fk8j09s"],
249
255
  "Byoj8tv": "f1qch9an",
250
- "uwmqm3": ["f1bg5zqg", "f1sgzk6v"]
256
+ "uwmqm3": ["fk8j09s", "fdw0yi8"]
251
257
  },
252
258
  "disabled": {
253
259
  "sj55zd": "f1s2aq7o",
@@ -256,11 +262,10 @@ const useInputElementStyles = /*#__PURE__*/react_make_styles_1.__styles({
256
262
  "yvdlaj": "fahhnxm"
257
263
  }
258
264
  }, {
259
- "d": [".f1ewtqcl{box-sizing:border-box;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f1g0x7ka{padding-top:0;}", ".f12huiiw{padding-right:2px;}", ".f161knb0{padding-left:2px;}", ".f1qch9an{padding-bottom:0;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f3rmtva{background-color:transparent;}", ".fwyc1cq::-webkit-input-placeholder{color:var(--colorNeutralForeground4);}", ".fwyc1cq::-moz-placeholder{color:var(--colorNeutralForeground4);}", ".f13ta7ih::-webkit-input-placeholder{opacity:1;}", ".f13ta7ih::-moz-placeholder{opacity:1;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".fdrzuqr{cursor:not-allowed;}", ".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}", ".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}"],
260
- "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
265
+ "d": [".f1ewtqcl{box-sizing:border-box;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".fy77jfu{min-width:0;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f1g0x7ka{padding-top:0;}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".f1qch9an{padding-bottom:0;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f3rmtva{background-color:transparent;}", ".fwyc1cq::-webkit-input-placeholder{color:var(--colorNeutralForeground4);}", ".fwyc1cq::-moz-placeholder{color:var(--colorNeutralForeground4);}", ".f13ta7ih::-webkit-input-placeholder{opacity:1;}", ".f13ta7ih::-moz-placeholder{opacity:1;}", ".f1s6fcnf{outline-style:none;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}", ".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".fdrzuqr{cursor:not-allowed;}", ".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}", ".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}"]
261
266
  });
262
267
 
263
- const useContentStyles = /*#__PURE__*/react_make_styles_1.__styles({
268
+ const useContentStyles = /*#__PURE__*/react_1.__styles({
264
269
  "base": {
265
270
  "B7ck84d": "f1ewtqcl",
266
271
  "sj55zd": "f11d4kpn",
@@ -268,16 +273,25 @@ const useContentStyles = /*#__PURE__*/react_make_styles_1.__styles({
268
273
  },
269
274
  "disabled": {
270
275
  "sj55zd": "f1s2aq7o"
276
+ },
277
+ "small": {
278
+ "kwki1k": "f3u2cy0"
279
+ },
280
+ "medium": {
281
+ "kwki1k": "f1oqplr0"
282
+ },
283
+ "large": {
284
+ "kwki1k": "fa420co"
271
285
  }
272
286
  }, {
273
- "d": [".f1ewtqcl{box-sizing:border-box;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fyuhxbn>svg{display:block;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}"]
287
+ "d": [".f1ewtqcl{box-sizing:border-box;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fyuhxbn>svg{display:block;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f3u2cy0>svg{font-size:16px;}", ".f1oqplr0>svg{font-size:20px;}", ".fa420co>svg{font-size:24px;}"]
274
288
  });
275
289
  /**
276
290
  * Apply styling to the Input slots based on the state
277
291
  */
278
292
 
279
293
 
280
- const useInputStyles = state => {
294
+ const useInputStyles_unstable = state => {
281
295
  const {
282
296
  size,
283
297
  appearance
@@ -287,20 +301,20 @@ const useInputStyles = state => {
287
301
  const rootStyles = useRootStyles();
288
302
  const inputStyles = useInputElementStyles();
289
303
  const contentStyles = useContentStyles();
290
- state.root.className = react_make_styles_1.mergeClasses(exports.inputClassName, rootStyles.base, rootStyles[size], rootStyles[appearance], !disabled && rootStyles.interactive, !disabled && appearance === 'outline' && rootStyles.outlineInteractive, !disabled && appearance === 'underline' && rootStyles.underlineInteractive, !disabled && filled && rootStyles.filledInteractive, state.inline && rootStyles.inline, filled && rootStyles.filled, disabled && rootStyles.disabled, state.root.className);
291
- state.input.className = react_make_styles_1.mergeClasses(inputStyles.base, inputStyles[size], disabled && inputStyles.disabled, state.input.className);
292
- const contentClasses = [contentStyles.base, disabled && contentStyles.disabled];
304
+ state.root.className = react_1.mergeClasses(exports.inputClassNames.root, rootStyles.base, rootStyles[size], rootStyles[appearance], !disabled && rootStyles.interactive, !disabled && appearance === 'outline' && rootStyles.outlineInteractive, !disabled && appearance === 'underline' && rootStyles.underlineInteractive, !disabled && filled && rootStyles.filledInteractive, filled && rootStyles.filled, disabled && rootStyles.disabled, state.root.className);
305
+ state.input.className = react_1.mergeClasses(exports.inputClassNames.input, inputStyles.base, inputStyles[size], disabled && inputStyles.disabled, state.input.className);
306
+ const contentClasses = [contentStyles.base, disabled && contentStyles.disabled, contentStyles[size]];
293
307
 
294
308
  if (state.contentBefore) {
295
- state.contentBefore.className = react_make_styles_1.mergeClasses(...contentClasses, state.contentBefore.className);
309
+ state.contentBefore.className = react_1.mergeClasses(exports.inputClassNames.contentBefore, ...contentClasses, state.contentBefore.className);
296
310
  }
297
311
 
298
312
  if (state.contentAfter) {
299
- state.contentAfter.className = react_make_styles_1.mergeClasses(...contentClasses, state.contentAfter.className);
313
+ state.contentAfter.className = react_1.mergeClasses(exports.inputClassNames.contentAfter, ...contentClasses, state.contentAfter.className);
300
314
  }
301
315
 
302
316
  return state;
303
317
  };
304
318
 
305
- exports.useInputStyles = useInputStyles;
319
+ exports.useInputStyles_unstable = useInputStyles_unstable;
306
320
  //# sourceMappingURL=useInputStyles.js.map