@fluentui/react-input 9.4.4 → 9.4.6

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 (63) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +85 -1
  3. package/CHANGELOG.md +29 -2
  4. package/lib/Input.js.map +1 -1
  5. package/lib/InputField.js.map +1 -1
  6. package/lib/components/Input/Input.js.map +1 -1
  7. package/lib/components/Input/Input.types.js +1 -1
  8. package/lib/components/Input/Input.types.js.map +1 -1
  9. package/lib/components/Input/index.js.map +1 -1
  10. package/lib/components/Input/renderInput.js +1 -9
  11. package/lib/components/Input/renderInput.js.map +1 -1
  12. package/lib/components/Input/useInput.js +3 -2
  13. package/lib/components/Input/useInput.js.map +1 -1
  14. package/lib/components/Input/useInputStyles.js.map +1 -1
  15. package/lib/components/InputField/InputField.js +1 -2
  16. package/lib/components/InputField/InputField.js.map +1 -1
  17. package/lib/components/InputField/index.js.map +1 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib-commonjs/Input.js +5 -4
  20. package/lib-commonjs/Input.js.map +1 -1
  21. package/lib-commonjs/InputField.js +5 -4
  22. package/lib-commonjs/InputField.js.map +1 -1
  23. package/lib-commonjs/components/Input/Input.js +19 -20
  24. package/lib-commonjs/components/Input/Input.js.map +1 -1
  25. package/lib-commonjs/components/Input/Input.types.js +5 -2
  26. package/lib-commonjs/components/Input/Input.types.js.map +1 -1
  27. package/lib-commonjs/components/Input/index.js +9 -8
  28. package/lib-commonjs/components/Input/index.js.map +1 -1
  29. package/lib-commonjs/components/Input/renderInput.js +13 -24
  30. package/lib-commonjs/components/Input/renderInput.js.map +1 -1
  31. package/lib-commonjs/components/Input/useInput.js +66 -70
  32. package/lib-commonjs/components/Input/useInput.js.map +1 -1
  33. package/lib-commonjs/components/Input/useInputStyles.js +394 -178
  34. package/lib-commonjs/components/Input/useInputStyles.js.map +1 -1
  35. package/lib-commonjs/components/InputField/InputField.js +17 -11
  36. package/lib-commonjs/components/InputField/InputField.js.map +1 -1
  37. package/lib-commonjs/components/InputField/index.js +5 -4
  38. package/lib-commonjs/components/InputField/index.js.map +1 -1
  39. package/lib-commonjs/index.js +21 -49
  40. package/lib-commonjs/index.js.map +1 -1
  41. package/package.json +10 -9
  42. package/lib-amd/Input.js +0 -6
  43. package/lib-amd/Input.js.map +0 -1
  44. package/lib-amd/InputField.js +0 -6
  45. package/lib-amd/InputField.js.map +0 -1
  46. package/lib-amd/components/Input/Input.js +0 -17
  47. package/lib-amd/components/Input/Input.js.map +0 -1
  48. package/lib-amd/components/Input/Input.types.js +0 -5
  49. package/lib-amd/components/Input/Input.types.js.map +0 -1
  50. package/lib-amd/components/Input/index.js +0 -10
  51. package/lib-amd/components/Input/index.js.map +0 -1
  52. package/lib-amd/components/Input/renderInput.js +0 -17
  53. package/lib-amd/components/Input/renderInput.js.map +0 -1
  54. package/lib-amd/components/Input/useInput.js +0 -64
  55. package/lib-amd/components/Input/useInput.js.map +0 -1
  56. package/lib-amd/components/Input/useInputStyles.js +0 -214
  57. package/lib-amd/components/Input/useInputStyles.js.map +0 -1
  58. package/lib-amd/components/InputField/InputField.js +0 -10
  59. package/lib-amd/components/InputField/InputField.js.map +0 -1
  60. package/lib-amd/components/InputField/index.js +0 -6
  61. package/lib-amd/components/InputField/index.js.map +0 -1
  62. package/lib-amd/index.js +0 -13
  63. package/lib-amd/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["react_theme_1","require","react_1","exports","inputClassNames","root","input","contentBefore","contentAfter","fieldHeights","small","medium","large","useRootClassName","__resetStyles","useRootStyles","__styles","sshi5w","uwmqm3","z189sj","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","i8kkvl","Belr9w4","outline","outlineInteractive","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","Drbcw7","udz0bu","Be8ivqh","ofdepl","underline","De3pzq","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","icvyot","vrafjx","wvpqe5","Eqx8gd","B1piin3","underlineInteractive","B3778ie","d9w3h3","Bl18szs","B4j8arr","filled","g2u3we","h3c5rm","B9xav0g","zhjwy3","filledInteractive","q7v0qe","kmh5ft","nagaa4","B1yhkcb","invalid","tvckwq","gk2u95","hhx65j","Bxowmz0","E5pizo","disabled","Bceei9c","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","Bsft5z2","Bduesf4","d","h","a","m","w","useInputClassName","useInputElementStyles","sj55zd","yvdlaj","useContentClassName","useContentStyles","kwki1k","useInputStyles_unstable","state","size","appearance","startsWith","rootStyles","inputStyles","contentStyles","className","mergeClasses","contentClasses"],"sources":["../src/packages/react-components/react-input/src/components/Input/useInputStyles.ts"],"sourcesContent":["import { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { InputSlots, InputState } from './Input.types';\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) should these be shared somewhere?\nconst fieldHeights = {\n small: '24px',\n medium: '32px',\n large: '40px',\n};\n\nconst useRootClassName = makeResetStyles({\n display: 'inline-flex',\n alignItems: 'center',\n flexWrap: 'nowrap',\n gap: tokens.spacingHorizontalXXS,\n borderRadius: tokens.borderRadiusMedium, // used for all but underline\n position: 'relative',\n boxSizing: 'border-box',\n\n // size: medium (default)\n minHeight: fieldHeights.medium,\n padding: `0 ${tokens.spacingHorizontalMNudge}`,\n ...typographyStyles.body1,\n\n // appearance: outline (default)\n backgroundColor: tokens.colorNeutralBackground1,\n border: `1px solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n\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 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 '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\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 '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\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 outline: '2px solid transparent',\n },\n});\n\nconst useRootStyles = makeStyles({\n small: {\n minHeight: fieldHeights.small,\n paddingLeft: tokens.spacingHorizontalSNudge,\n paddingRight: tokens.spacingHorizontalSNudge,\n ...typographyStyles.caption1,\n },\n medium: {\n // included in rootBaseStyles\n },\n large: {\n minHeight: fieldHeights.large,\n paddingLeft: tokens.spacingHorizontalM,\n paddingRight: tokens.spacingHorizontalM,\n ...typographyStyles.body2,\n ...shorthands.gap(tokens.spacingHorizontalSNudge),\n },\n outline: {\n // included in rootBaseStyles\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 // border is specified in rootBaseStyles, but we only want a bottom border here\n borderTopStyle: 'none',\n borderRightStyle: 'none',\n borderLeftStyle: 'none',\n // Make the focus underline (::after) match the width of the bottom border\n '::after': {\n left: 0,\n right: 0,\n },\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 ...shorthands.borderColor(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 invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n },\n 'filled-darker-shadow': {\n backgroundColor: tokens.colorNeutralBackground3,\n boxShadow: tokens.shadow2,\n },\n 'filled-lighter-shadow': {\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow2,\n },\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n // remove the focus border\n '::after': {\n content: 'unset',\n },\n // remove the focus outline\n ':focus-within': {\n outlineStyle: 'none',\n },\n },\n});\n\nconst useInputClassName = makeResetStyles({\n boxSizing: 'border-box',\n flexGrow: 1,\n minWidth: 0, // required to make the input shrink to fit the wrapper\n borderStyle: 'none', // input itself never has a border (this is handled by inputWrapper)\n 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 // Inherit typography styles from root\n fontFamily: 'inherit',\n fontSize: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n});\n\nconst useInputElementStyles = makeStyles({\n large: {\n paddingLeft: tokens.spacingHorizontalSNudge,\n paddingRight: 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 useContentClassName = makeResetStyles({\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground3, // \"icon color\" in design spec\n display: 'flex',\n // special case styling for icons (most common case) to ensure they're centered vertically\n // size: medium (default)\n '> svg': { fontSize: '20px' },\n});\n\nconst useContentStyles = makeStyles({\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 // included in useContentClassName\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 invalid = `${state.input['aria-invalid']}` === 'true';\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 useRootClassName(),\n rootStyles[size],\n rootStyles[appearance],\n !disabled && appearance === 'outline' && rootStyles.outlineInteractive,\n !disabled && appearance === 'underline' && rootStyles.underlineInteractive,\n !disabled && filled && rootStyles.filledInteractive,\n filled && rootStyles.filled,\n !disabled && invalid && rootStyles.invalid,\n disabled && rootStyles.disabled,\n state.root.className,\n );\n\n state.input.className = mergeClasses(\n inputClassNames.input,\n useInputClassName(),\n size === 'large' && inputStyles.large,\n disabled && inputStyles.disabled,\n state.input.className,\n );\n\n const contentClasses = [useContentClassName(), 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"],"mappings":";;;;;;AAAA,MAAAA,aAAA,gBAAAC,OAAA;AAEA,MAAAC,OAAA,gBAAAD,OAAA;AAGaE,OAAA,CAAAC,eAAe,GAA+B;EACzDC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,kBAAkB;EACzBC,aAAa,EAAE,0BAA0B;EACzCC,YAAY,EAAE;CACf;AAED;AACA,MAAMC,YAAY,GAAG;EACnBC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE,MAAM;EACdC,KAAK,EAAE;CACR;AAED,MAAMC,gBAAgB,gBAAGX,OAAA,CAAAY,aAAe,0gIA0EtC;AAEF,MAAMC,aAAa,gBAAGb,OAAA,CAAAc,QAAU;EAAAN,KAAA;IAAAO,MAAA;IAAAC,MAAA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cAAc,EACjBT,KAAK,CAACjF,YAAY,CAACwF,SAAS,CAC7B;;EAGH,OAAOP,KAAK;AACd,CAAC;AAjDYtF,OAAA,CAAAqF,uBAAuB,GAAAA,uBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Input/useInputStyles.js"],"sourcesContent":["import { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nexport const inputClassNames = {\n root: 'fui-Input',\n input: 'fui-Input__input',\n contentBefore: 'fui-Input__contentBefore',\n contentAfter: 'fui-Input__contentAfter'\n};\n// TODO(sharing) should these be shared somewhere?\nconst fieldHeights = {\n small: '24px',\n medium: '32px',\n large: '40px'\n};\nconst useRootClassName = /*#__PURE__*/__resetStyles(\"r1jtohuq\", \"rl1z2p5\", [\".r1jtohuq{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;gap:var(--spacingHorizontalXXS);border-radius:var(--borderRadiusMedium);position:relative;box-sizing:border-box;min-height:32px;padding:0 var(--spacingHorizontalMNudge);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);background-color:var(--colorNeutralBackground1);border:1px solid var(--colorNeutralStroke1);border-bottom-color:var(--colorNeutralStrokeAccessible);}\", \".r1jtohuq::after{box-sizing:border-box;content:\\\"\\\";position:absolute;left:-1px;bottom:-1px;right:-1px;height:max(2px, var(--borderRadiusMedium));border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-bottom:2px solid var(--colorCompoundBrandStroke);-webkit-clip-path:inset(calc(100% - 2px) 0 0 0);clip-path:inset(calc(100% - 2px) 0 0 0);-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}\", \"@media screen and (prefers-reduced-motion: reduce){.r1jtohuq::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\", \".r1jtohuq:focus-within::after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}\", \"@media screen and (prefers-reduced-motion: reduce){.r1jtohuq:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\", \".r1jtohuq:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}\", \".r1jtohuq:focus-within{outline:2px solid transparent;}\", \".rl1z2p5{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;gap:var(--spacingHorizontalXXS);border-radius:var(--borderRadiusMedium);position:relative;box-sizing:border-box;min-height:32px;padding:0 var(--spacingHorizontalMNudge);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);background-color:var(--colorNeutralBackground1);border:1px solid var(--colorNeutralStroke1);border-bottom-color:var(--colorNeutralStrokeAccessible);}\", \".rl1z2p5::after{box-sizing:border-box;content:\\\"\\\";position:absolute;right:-1px;bottom:-1px;left:-1px;height:max(2px, var(--borderRadiusMedium));border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-bottom:2px solid var(--colorCompoundBrandStroke);-webkit-clip-path:inset(calc(100% - 2px) 0 0 0);clip-path:inset(calc(100% - 2px) 0 0 0);-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}\", \"@media screen and (prefers-reduced-motion: reduce){.rl1z2p5::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\", \".rl1z2p5:focus-within::after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}\", \"@media screen and (prefers-reduced-motion: reduce){.rl1z2p5:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}\", \".rl1z2p5:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}\", \".rl1z2p5:focus-within{outline:2px solid transparent;}\"]);\nconst useRootStyles = /*#__PURE__*/__styles({\n small: {\n sshi5w: \"f1pha7fy\",\n uwmqm3: [\"fk8j09s\", \"fdw0yi8\"],\n z189sj: [\"fdw0yi8\", \"fk8j09s\"],\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fy9rknc\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"fwrc4pm\"\n },\n medium: {},\n large: {\n sshi5w: \"f1w5jphr\",\n uwmqm3: [\"f1uw59to\", \"fw5db7e\"],\n z189sj: [\"fw5db7e\", \"f1uw59to\"],\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fod5ikn\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"faaz57k\",\n i8kkvl: \"f1rjii52\",\n Belr9w4: \"f1r7g2jn\"\n },\n outline: {},\n outlineInteractive: {\n Bgoe8wy: \"fvcxoqz\",\n Bwzppfd: [\"f1ub3y4t\", \"f1m52nbi\"],\n oetu4i: \"f1l4zc64\",\n gg5e9n: [\"f1m52nbi\", \"f1ub3y4t\"],\n Drbcw7: \"f8vnjqi\",\n udz0bu: [\"fz1etlk\", \"f1hc16gm\"],\n Be8ivqh: \"f1klwx88\",\n ofdepl: [\"f1hc16gm\", \"fz1etlk\"]\n },\n underline: {\n De3pzq: \"f1c21dwh\",\n Bbmb7ep: [\"f1krrbdw\", \"f1deotkl\"],\n Beyfa6y: [\"f1deotkl\", \"f1krrbdw\"],\n B7oj6ja: [\"f10ostut\", \"f1ozlkrg\"],\n Btl43ni: [\"f1ozlkrg\", \"f10ostut\"],\n icvyot: \"f1ern45e\",\n vrafjx: [\"f1n71otn\", \"f1deefiw\"],\n wvpqe5: [\"f1deefiw\", \"f1n71otn\"],\n Eqx8gd: [\"f1n6gb5g\", \"f15yvnhg\"],\n B1piin3: [\"f15yvnhg\", \"f1n6gb5g\"]\n },\n underlineInteractive: {\n oetu4i: \"f1l4zc64\",\n Be8ivqh: \"f1klwx88\",\n B3778ie: [\"f1nf3wye\", \"feulmo5\"],\n d9w3h3: [\"feulmo5\", \"f1nf3wye\"],\n Bl18szs: [\"f18vqdqu\", \"f53nyzz\"],\n B4j8arr: [\"f53nyzz\", \"f18vqdqu\"]\n },\n filled: {\n g2u3we: \"fghlq4f\",\n h3c5rm: [\"f1gn591s\", \"fjscplz\"],\n B9xav0g: \"fb073pr\",\n zhjwy3: [\"fjscplz\", \"f1gn591s\"]\n },\n filledInteractive: {\n q7v0qe: \"ftmjh5b\",\n kmh5ft: [\"f17blpuu\", \"fsrcdbj\"],\n nagaa4: \"f1tpwn32\",\n B1yhkcb: [\"fsrcdbj\", \"f17blpuu\"]\n },\n invalid: {\n tvckwq: \"fs4k3qj\",\n gk2u95: [\"fcee079\", \"fmyw78r\"],\n hhx65j: \"f1fgmyf4\",\n Bxowmz0: [\"fmyw78r\", \"fcee079\"]\n },\n \"filled-darker\": {\n De3pzq: \"f16xq7d1\"\n },\n \"filled-lighter\": {\n De3pzq: \"fxugw4r\"\n },\n \"filled-darker-shadow\": {\n De3pzq: \"f16xq7d1\",\n E5pizo: \"fyed02w\"\n },\n \"filled-lighter-shadow\": {\n De3pzq: \"fxugw4r\",\n E5pizo: \"fyed02w\"\n },\n disabled: {\n Bceei9c: \"fdrzuqr\",\n De3pzq: \"f1c21dwh\",\n g2u3we: \"f1jj8ep1\",\n h3c5rm: [\"f15xbau\", \"fy0fskl\"],\n B9xav0g: \"f4ikngz\",\n zhjwy3: [\"fy0fskl\", \"f15xbau\"],\n Bjwas2f: \"fg455y9\",\n Bn1d65q: [\"f1rvyvqg\", \"f14g86mu\"],\n Bxeuatn: \"f1cwzwz\",\n n51gp8: [\"f14g86mu\", \"f1rvyvqg\"],\n Bsft5z2: \"fhr9occ\",\n Bduesf4: \"f99w1ws\"\n }\n}, {\n d: [\".f1pha7fy{min-height:24px;}\", \".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}\", \".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".fwrc4pm{line-height:var(--lineHeightBase200);}\", \".f1w5jphr{min-height:40px;}\", \".f1uw59to{padding-left:var(--spacingHorizontalM);}\", \".fw5db7e{padding-right: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);}\", \".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;}\", \".f1ern45e{border-top-style:none;}\", \".f1n71otn{border-right-style:none;}\", \".f1deefiw{border-left-style:none;}\", \".f1n6gb5g::after{left:0;}\", \".f15yvnhg::after{right: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;}\", \".fghlq4f{border-top-color:var(--colorTransparentStroke);}\", \".f1gn591s{border-right-color:var(--colorTransparentStroke);}\", \".fjscplz{border-left-color:var(--colorTransparentStroke);}\", \".fb073pr{border-bottom-color:var(--colorTransparentStroke);}\", \".fs4k3qj:not(:focus-within),.fs4k3qj:hover:not(:focus-within){border-top-color:var(--colorPaletteRedBorder2);}\", \".fcee079:not(:focus-within),.fcee079:hover:not(:focus-within){border-right-color:var(--colorPaletteRedBorder2);}\", \".fmyw78r:not(:focus-within),.fmyw78r:hover:not(:focus-within){border-left-color:var(--colorPaletteRedBorder2);}\", \".f1fgmyf4:not(:focus-within),.f1fgmyf4:hover:not(:focus-within){border-bottom-color:var(--colorPaletteRedBorder2);}\", \".f16xq7d1{background-color:var(--colorNeutralBackground3);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".fyed02w{box-shadow:var(--shadow2);}\", \".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);}\", \".fhr9occ::after{content:unset;}\"],\n 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);}\"],\n 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);}\"],\n m: [[\"@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1rvyvqg{border-right-color:GrayText;}.f14g86mu{border-left-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]],\n w: [\".f99w1ws:focus-within{outline-style:none;}\"]\n});\nconst useInputClassName = /*#__PURE__*/__resetStyles(\"rvp2gzh\", null, [\".rvp2gzh{box-sizing:border-box;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;min-width:0;border-style:none;padding:0 var(--spacingHorizontalXXS);color:var(--colorNeutralForeground1);background-color:transparent;outline-style:none;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;}\", \".rvp2gzh::-webkit-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".rvp2gzh::-moz-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".rvp2gzh:-ms-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".rvp2gzh::placeholder{color:var(--colorNeutralForeground4);opacity:1;}\"]);\nconst useInputElementStyles = /*#__PURE__*/__styles({\n large: {\n uwmqm3: [\"fk8j09s\", \"fdw0yi8\"],\n z189sj: [\"fdw0yi8\", \"fk8j09s\"]\n },\n disabled: {\n sj55zd: \"f1s2aq7o\",\n De3pzq: \"f1c21dwh\",\n Bceei9c: \"fdrzuqr\",\n yvdlaj: \"fahhnxm\"\n }\n}, {\n d: [\".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}\", \".fdw0yi8{padding-right: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);}\"]\n});\nconst useContentClassName = /*#__PURE__*/__resetStyles(\"r1572tok\", null, [\".r1572tok{box-sizing:border-box;color:var(--colorNeutralForeground3);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}\", \".r1572tok>svg{font-size:20px;}\"]);\nconst useContentStyles = /*#__PURE__*/__styles({\n disabled: {\n sj55zd: \"f1s2aq7o\"\n },\n small: {\n kwki1k: \"f3u2cy0\"\n },\n medium: {},\n large: {\n kwki1k: \"fa420co\"\n }\n}, {\n d: [\".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".f3u2cy0>svg{font-size:16px;}\", \".fa420co>svg{font-size:24px;}\"]\n});\n/**\n * Apply styling to the Input slots based on the state\n */\nexport const useInputStyles_unstable = state => {\n const {\n size,\n appearance\n } = state;\n const disabled = state.input.disabled;\n const invalid = `${state.input['aria-invalid']}` === 'true';\n const filled = appearance.startsWith('filled');\n const rootStyles = useRootStyles();\n const inputStyles = useInputElementStyles();\n const contentStyles = useContentStyles();\n state.root.className = mergeClasses(inputClassNames.root, useRootClassName(), rootStyles[size], rootStyles[appearance], !disabled && appearance === 'outline' && rootStyles.outlineInteractive, !disabled && appearance === 'underline' && rootStyles.underlineInteractive, !disabled && filled && rootStyles.filledInteractive, filled && rootStyles.filled, !disabled && invalid && rootStyles.invalid, disabled && rootStyles.disabled, state.root.className);\n state.input.className = mergeClasses(inputClassNames.input, useInputClassName(), size === 'large' && inputStyles.large, disabled && inputStyles.disabled, state.input.className);\n const contentClasses = [useContentClassName(), disabled && contentStyles.disabled, contentStyles[size]];\n if (state.contentBefore) {\n state.contentBefore.className = mergeClasses(inputClassNames.contentBefore, ...contentClasses, state.contentBefore.className);\n }\n if (state.contentAfter) {\n state.contentAfter.className = mergeClasses(inputClassNames.contentAfter, ...contentClasses, state.contentAfter.className);\n }\n return state;\n};\n//# sourceMappingURL=useInputStyles.js.map"],"names":["inputClassNames","useInputStyles_unstable","root","input","contentBefore","contentAfter","fieldHeights","small","medium","large","useRootClassName","__resetStyles","useRootStyles","__styles","sshi5w","uwmqm3","z189sj","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","i8kkvl","Belr9w4","outline","outlineInteractive","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","Drbcw7","udz0bu","Be8ivqh","ofdepl","underline","De3pzq","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","icvyot","vrafjx","wvpqe5","Eqx8gd","B1piin3","underlineInteractive","B3778ie","d9w3h3","Bl18szs","B4j8arr","filled","g2u3we","h3c5rm","B9xav0g","zhjwy3","filledInteractive","q7v0qe","kmh5ft","nagaa4","B1yhkcb","invalid","tvckwq","gk2u95","hhx65j","Bxowmz0","E5pizo","disabled","Bceei9c","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","Bsft5z2","Bduesf4","d","h","a","m","w","useInputClassName","useInputElementStyles","sj55zd","yvdlaj","useContentClassName","useContentStyles","kwki1k","state","size","appearance","startsWith","rootStyles","inputStyles","contentStyles","className","mergeClasses","contentClasses"],"mappings":";;;;;;;;;;;IAEaA,eAAe,MAAfA;IAgKAC,uBAAuB,MAAvBA;;uBAjKqD;AAC3D,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,OAAO;IACPC,eAAe;IACfC,cAAc;AAChB;AACA,kDAAkD;AAClD,MAAMC,eAAe;IACnBC,OA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0C"}
@@ -1,14 +1,20 @@
1
- "use strict";
2
-
1
+ /* eslint-disable deprecation/deprecation */ "use strict";
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ inputFieldClassNames: ()=>inputFieldClassNames,
13
+ InputField: ()=>InputField
5
14
  });
6
- exports.InputField = exports.inputFieldClassNames = void 0;
7
- /* eslint-disable deprecation/deprecation */
8
- const react_field_1 = /*#__PURE__*/require("@fluentui/react-field");
9
- const Input_1 = /*#__PURE__*/require("../../Input");
10
- /** @deprecated Use Field with Input: `<Field><Input /></Field>` */
11
- exports.inputFieldClassNames = /*#__PURE__*/react_field_1.getDeprecatedFieldClassNames(Input_1.inputClassNames.root);
12
- /** @deprecated Use Field with Input: `<Field><Input /></Field>` */
13
- exports.InputField = /*#__PURE__*/react_field_1.makeDeprecatedField(Input_1.Input);
15
+ const _reactField = require("@fluentui/react-field");
16
+ const _input = require("../../Input");
17
+ const inputFieldClassNames = /*#__PURE__*/ (0, _reactField.getDeprecatedFieldClassNames)(_input.inputClassNames.root);
18
+ const InputField = /*#__PURE__*/ (0, _reactField.makeDeprecatedField)(_input.Input); //# sourceMappingURL=InputField.js.map
19
+
14
20
  //# sourceMappingURL=InputField.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_field_1","require","Input_1","exports","inputFieldClassNames","getDeprecatedFieldClassNames","inputClassNames","root","InputField","makeDeprecatedField","Input"],"sources":["../src/packages/react-components/react-input/src/components/InputField/InputField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Input, inputClassNames, InputProps } from '../../Input';\n\n/** @deprecated Use Field with Input: `<Field><Input /></Field>` */\nexport type InputFieldProps = DeprecatedFieldProps<InputProps>;\n/** @deprecated Use Field with Input: `<Field><Input /></Field>` */\nexport const inputFieldClassNames = getDeprecatedFieldClassNames(inputClassNames.root);\n/** @deprecated Use Field with Input: `<Field><Input /></Field>` */\nexport const InputField: ForwardRefComponent<InputFieldProps> = makeDeprecatedField(Input);\n"],"mappings":";;;;;;AAAA;AACA,MAAAA,aAAA,gBAAAC,OAAA;AAEA,MAAAC,OAAA,gBAAAD,OAAA;AAIA;AACaE,OAAA,CAAAC,oBAAoB,gBAAGJ,aAAA,CAAAK,4BAA4B,CAACH,OAAA,CAAAI,eAAe,CAACC,IAAI,CAAC;AACtF;AACaJ,OAAA,CAAAK,UAAU,gBAAyCR,aAAA,CAAAS,mBAAmB,CAACP,OAAA,CAAAQ,KAAK,CAAC"}
1
+ {"version":3,"sources":["../../../lib/components/InputField/InputField.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport { Input, inputClassNames } from '../../Input';\n/** @deprecated Use Field with Input: `<Field><Input /></Field>` */\nexport const inputFieldClassNames = /*#__PURE__*/getDeprecatedFieldClassNames(inputClassNames.root);\n/** @deprecated Use Field with Input: `<Field><Input /></Field>` */\nexport const InputField = /*#__PURE__*/makeDeprecatedField(Input);\n//# sourceMappingURL=InputField.js.map"],"names":["inputFieldClassNames","InputField","getDeprecatedFieldClassNames","inputClassNames","root","makeDeprecatedField","Input"],"mappings":"AAAA,0CAA0C;;;;;;;;;;;IAG7BA,oBAAoB,MAApBA;IAEAC,UAAU,MAAVA;;4BALiG;uBACvE;AAEhC,MAAMD,uBAAuB,WAAW,GAAEE,IAAAA,wCAA4B,EAACC,sBAAe,CAACC,IAAI;AAE3F,MAAMH,aAAa,WAAW,GAAEI,IAAAA,+BAAmB,EAACC,YAAK,GAChE,sCAAsC"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./InputField"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./InputField"), exports);
7
+ //# sourceMappingURL=index.js.map
8
+
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-input/src/components/InputField/index.ts"],"sourcesContent":["export * from './InputField';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/InputField/index.js"],"sourcesContent":["export * from './InputField';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,iCAAiC"}
@@ -1,52 +1,24 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.inputFieldClassNames = exports.InputField_unstable = exports.useInput_unstable = exports.useInputStyles_unstable = exports.renderInput_unstable = exports.inputClassNames = exports.Input = void 0;
7
- var Input_1 = /*#__PURE__*/require("./Input");
8
- Object.defineProperty(exports, "Input", {
9
- enumerable: true,
10
- get: function () {
11
- return Input_1.Input;
12
- }
13
- });
14
- Object.defineProperty(exports, "inputClassNames", {
15
- enumerable: true,
16
- get: function () {
17
- return Input_1.inputClassNames;
18
- }
19
- });
20
- Object.defineProperty(exports, "renderInput_unstable", {
21
- enumerable: true,
22
- get: function () {
23
- return Input_1.renderInput_unstable;
24
- }
25
- });
26
- Object.defineProperty(exports, "useInputStyles_unstable", {
27
- enumerable: true,
28
- get: function () {
29
- return Input_1.useInputStyles_unstable;
30
- }
31
- });
32
- Object.defineProperty(exports, "useInput_unstable", {
33
- enumerable: true,
34
- get: function () {
35
- return Input_1.useInput_unstable;
36
- }
37
- });
38
- // eslint-disable-next-line deprecation/deprecation
39
- var InputField_1 = /*#__PURE__*/require("./InputField");
40
- Object.defineProperty(exports, "InputField_unstable", {
41
- enumerable: true,
42
- get: function () {
43
- return InputField_1.InputField;
44
- }
45
- });
46
- Object.defineProperty(exports, "inputFieldClassNames", {
47
- enumerable: true,
48
- get: function () {
49
- return InputField_1.inputFieldClassNames;
50
- }
51
- });
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ Input: ()=>_input.Input,
13
+ inputClassNames: ()=>_input.inputClassNames,
14
+ renderInput_unstable: ()=>_input.renderInput_unstable,
15
+ useInputStyles_unstable: ()=>_input.useInputStyles_unstable,
16
+ useInput_unstable: ()=>_input.useInput_unstable,
17
+ InputField_unstable: ()=>_inputField.InputField,
18
+ inputFieldClassNames: ()=>_inputField.inputFieldClassNames
19
+ });
20
+ const _input = require("./Input");
21
+ const _inputField = require("./InputField");
22
+ //# sourceMappingURL=index.js.map
23
+
52
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Input_1","require","Object","defineProperty","exports","enumerable","get","Input","inputClassNames","renderInput_unstable","useInputStyles_unstable","useInput_unstable","InputField_1","InputField","inputFieldClassNames"],"sources":["../src/packages/react-components/react-input/src/index.ts"],"sourcesContent":["export { Input, inputClassNames, renderInput_unstable, useInputStyles_unstable, useInput_unstable } from './Input';\nexport type { InputOnChangeData, InputProps, InputSlots, InputState } from './Input';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { InputField as InputField_unstable, inputFieldClassNames } from './InputField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { InputFieldProps as InputFieldProps_unstable } from './InputField';\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAO,KAAK;EAAA;AAAA;AAAEL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAQ,eAAe;EAAA;AAAA;AAAEN,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAS,oBAAoB;EAAA;AAAA;AAAEP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAU,uBAAuB;EAAA;AAAA;AAAER,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAW,iBAAiB;EAAA;AAAA;AAGjG;AACA,IAAAC,YAAA,gBAAAX,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,YAAA,CAAAC,UAAU;EAAA;AAAA;AAAyBX,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,YAAA,CAAAE,oBAAoB;EAAA;AAAA"}
1
+ {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Input, inputClassNames, renderInput_unstable, useInputStyles_unstable, useInput_unstable } from './Input';\n// eslint-disable-next-line deprecation/deprecation\nexport { InputField as InputField_unstable, inputFieldClassNames } from './InputField';\n//# sourceMappingURL=index.js.map"],"names":["Input","inputClassNames","renderInput_unstable","useInputStyles_unstable","useInput_unstable","InputField_unstable","InputField","inputFieldClassNames"],"mappings":";;;;;;;;;;;IAASA,KAAK,MAALA,YAAK;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,uBAAuB,MAAvBA,8BAAuB;IAAEC,iBAAiB,MAAjBA,wBAAiB;IAE1EC,mBAAmB,MAAjCC,sBAAU;IAAyBC,oBAAoB,MAApBA,gCAAoB;;uBAFyC;4BAEjC;CACxE,iCAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-input",
3
- "version": "9.4.4",
3
+ "version": "9.4.6",
4
4
  "description": "Fluent UI React Input component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -22,23 +22,23 @@
22
22
  "test": "jest --passWithNoTests",
23
23
  "storybook": "start-storybook",
24
24
  "type-check": "tsc -b tsconfig.json",
25
- "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
25
+ "generate-api": "just-scripts generate-api"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@fluentui/eslint-plugin": "*",
29
29
  "@fluentui/react-conformance": "*",
30
- "@fluentui/react-conformance-griffel": "9.0.0-beta.19",
31
- "@fluentui/react-text": "^9.3.1",
30
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.20",
31
+ "@fluentui/react-text": "^9.3.3",
32
32
  "@fluentui/scripts-api-extractor": "*",
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-field": "9.0.0-alpha.26",
37
- "@fluentui/react-shared-contexts": "^9.3.1",
38
- "@fluentui/react-theme": "^9.1.6",
39
- "@fluentui/react-utilities": "^9.7.1",
36
+ "@fluentui/react-field": "9.0.0-alpha.28",
37
+ "@fluentui/react-shared-contexts": "^9.3.3",
38
+ "@fluentui/react-theme": "^9.1.7",
39
+ "@fluentui/react-utilities": "^9.7.2",
40
40
  "@griffel/react": "^1.5.2",
41
- "tslib": "^2.1.0"
41
+ "@swc/helpers": "^0.4.14"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@types/react": ">=16.8.0 <19.0.0",
@@ -55,6 +55,7 @@
55
55
  "exports": {
56
56
  ".": {
57
57
  "types": "./dist/index.d.ts",
58
+ "node": "./lib-commonjs/index.js",
58
59
  "import": "./lib/index.js",
59
60
  "require": "./lib-commonjs/index.js"
60
61
  },
package/lib-amd/Input.js DELETED
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/Input/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=Input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-input/src/Input.ts"],"names":[],"mappings":";;;IAAA,uCAAyC","sourcesContent":["export * from './components/Input/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/InputField/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=InputField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InputField.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-input/src/InputField.ts"],"names":[],"mappings":";;;IAAA,uCAA8C","sourcesContent":["export * from './components/InputField/index';\n"]}
@@ -1,17 +0,0 @@
1
- define(["require", "exports", "react", "./useInput", "./renderInput", "./useInputStyles", "@fluentui/react-shared-contexts"], function (require, exports, React, useInput_1, renderInput_1, useInputStyles_1, react_shared_contexts_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Input = void 0;
5
- /**
6
- * The Input component allows people to enter and edit text.
7
- */
8
- exports.Input = React.forwardRef(function (props, ref) {
9
- var state = useInput_1.useInput_unstable(props, ref);
10
- useInputStyles_1.useInputStyles_unstable(state);
11
- var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useInputStyles_unstable;
12
- useCustomStyles(state);
13
- return renderInput_1.renderInput_unstable(state);
14
- });
15
- exports.Input.displayName = 'Input';
16
- });
17
- //# sourceMappingURL=Input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-input/src/components/Input/Input.tsx"],"names":[],"mappings":";;;;IAQA;;OAEG;IACU,QAAA,KAAK,GAAoC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAChF,IAAM,KAAK,GAAG,4BAAiB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAE5C,wCAAuB,CAAC,KAAK,CAAC,CAAC;QAEvB,IAAyB,eAAe,GAAK,oDAA4B,EAAE,wBAAnC,CAAoC;QACpF,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,kCAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,aAAK,CAAC,WAAW,GAAG,OAAO,CAAC","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';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\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\n const { useInputStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderInput_unstable(state);\n});\n\nInput.displayName = 'Input';\n"]}
@@ -1,5 +0,0 @@
1
- define(["require", "exports"], function (require, exports) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- });
5
- //# sourceMappingURL=Input.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-input/src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type InputSlots = {\n /**\n * Wrapper element which visually appears to be the input and is used for borders, focus styling, etc.\n * (A wrapper is needed to properly position `contentBefore` and `contentAfter` relative to `input`.)\n *\n * The root slot receives the `className` and `style` specified directly on the `<Input>`.\n * All other top-level native props will be applied to the primary slot, `input`.\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The actual `<input>` element. `type=\"text\"` will be automatically applied unless overridden.\n *\n * This is the \"primary\" slot, so native props specified directly on the `<Input>` will go here\n * (except `className` and `style`, which go to the `root` slot). The top-level `ref` will\n * also go here.\n */\n input: NonNullable<Slot<'input'>>;\n\n /** Element before the input text, within the input border */\n contentBefore?: Slot<'span'>;\n\n /** Element after the input text, within the input border */\n contentAfter?: Slot<'span'>;\n};\n\nexport type InputProps = Omit<\n ComponentProps<Partial<InputSlots>, 'input'>,\n // `children` is unsupported. The rest of these native props have customized definitions.\n 'children' | 'defaultValue' | 'onChange' | 'size' | 'type' | 'value'\n> & {\n /** Input can't have children. */\n children?: never;\n\n /**\n * Size of the input (changes the font size and spacing).\n * @default 'medium'\n */\n // This name overlaps with the native `size` prop, but that prop isn't very useful in practice\n // (we could add `htmlSize` for the native functionality if someone needs it)\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Controls the colors and borders of the input.\n * @default 'outline'\n *\n * Note: 'filled-darker-shadow' and 'filled-lighter-shadow' are deprecated and will be removed in the future.\n */\n appearance?:\n | 'outline'\n | 'underline'\n | 'filled-darker'\n | 'filled-lighter'\n | 'filled-darker-shadow'\n | 'filled-lighter-shadow';\n\n /**\n * Default value of the input. Provide this if the input should be an uncontrolled component\n * which tracks its current state internally; otherwise, use `value`.\n *\n * (This prop is mutually exclusive with `value`.)\n */\n defaultValue?: string;\n\n /**\n * Current value of the input. Provide this if the input is a controlled component where you\n * are maintaining its current state; otherwise, use `defaultValue`.\n *\n * (This prop is mutually exclusive with `defaultValue`.)\n */\n value?: string;\n\n /**\n * Called when the user changes the input's value.\n */\n onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: InputOnChangeData) => void;\n\n /**\n * An input can have different text-based [types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#input_types)\n * based on the type of value the user will enter.\n *\n * Note that no custom styling is currently applied for alternative types, and some types may\n * activate browser-default styling which does not match the Fluent design language.\n *\n * (For non-text-based types such as `button` or `checkbox`, use the appropriate component or an\n * `<input>` element instead.)\n * @default 'text'\n */\n type?:\n | 'text'\n | 'email'\n | 'password'\n | 'search'\n | 'tel'\n | 'url'\n | 'date'\n | 'datetime-local'\n | 'month'\n | 'number'\n | 'time'\n | 'week';\n};\n\n/**\n * State used in rendering Input.\n */\nexport type InputState = Required<Pick<InputProps, 'appearance' | 'size'>> & ComponentState<InputSlots>;\n\n/**\n * Data passed to the `onChange` callback when a user changes the input's value.\n */\nexport type InputOnChangeData = {\n /** Updated input value from the user */\n value: string;\n};\n"]}
@@ -1,10 +0,0 @@
1
- define(["require", "exports", "tslib", "./Input", "./Input.types", "./renderInput", "./useInput", "./useInputStyles"], function (require, exports, tslib_1, Input_1, Input_types_1, renderInput_1, useInput_1, useInputStyles_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(Input_1, exports);
5
- tslib_1.__exportStar(Input_types_1, exports);
6
- tslib_1.__exportStar(renderInput_1, exports);
7
- tslib_1.__exportStar(useInput_1, exports);
8
- tslib_1.__exportStar(useInputStyles_1, exports);
9
- });
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-input/src/components/Input/index.ts"],"names":[],"mappings":";;;IAAA,uCAAwB;IACxB,6CAA8B;IAC9B,6CAA8B;IAC9B,0CAA2B;IAC3B,gDAAiC","sourcesContent":["export * from './Input';\nexport * from './Input.types';\nexport * from './renderInput';\nexport * from './useInput';\nexport * from './useInputStyles';\n"]}
@@ -1,17 +0,0 @@
1
- define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.renderInput_unstable = void 0;
5
- /**
6
- * Render the final JSX of Input
7
- */
8
- var renderInput_unstable = function (state) {
9
- var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
10
- return (React.createElement(slots.root, tslib_1.__assign({}, slotProps.root),
11
- slots.contentBefore && React.createElement(slots.contentBefore, tslib_1.__assign({}, slotProps.contentBefore)),
12
- React.createElement(slots.input, tslib_1.__assign({}, slotProps.input)),
13
- slots.contentAfter && React.createElement(slots.contentAfter, tslib_1.__assign({}, slotProps.contentAfter))));
14
- };
15
- exports.renderInput_unstable = renderInput_unstable;
16
- });
17
- //# sourceMappingURL=renderInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderInput.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-input/src/components/Input/renderInput.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,oBAAoB,GAAG,UAAC,KAAiB;QAC9C,IAAA,KAAuB,0BAAQ,CAAa,KAAK,CAAC,EAAhD,KAAK,WAAA,EAAE,SAAS,eAAgC,CAAC;QACzD,OAAO,CACL,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI;YAC3B,KAAK,CAAC,aAAa,IAAI,oBAAC,KAAK,CAAC,aAAa,uBAAK,SAAS,CAAC,aAAa,EAAI;YAC5E,oBAAC,KAAK,CAAC,KAAK,uBAAK,SAAS,CAAC,KAAK,EAAI;YACnC,KAAK,CAAC,YAAY,IAAI,oBAAC,KAAK,CAAC,YAAY,uBAAK,SAAS,CAAC,YAAY,EAAI,CAC9D,CACd,CAAC;IACJ,CAAC,CAAC;IATW,QAAA,oBAAoB,wBAS/B","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"]}
@@ -1,64 +0,0 @@
1
- define(["require", "exports", "tslib", "@fluentui/react-utilities", "@fluentui/react-shared-contexts"], function (require, exports, tslib_1, react_utilities_1, react_shared_contexts_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useInput_unstable = void 0;
5
- /**
6
- * Create the state required to render Input.
7
- *
8
- * The returned state can be modified with hooks such as useInputStyles_unstable,
9
- * before being passed to renderInput_unstable.
10
- *
11
- * @param props - props from this instance of Input
12
- * @param ref - reference to `<input>` element of Input
13
- */
14
- var useInput_unstable = function (props, ref) {
15
- var _a;
16
- var overrides = react_shared_contexts_1.useOverrides_unstable();
17
- var _b = props.size, size = _b === void 0 ? 'medium' : _b, _c = props.appearance, appearance = _c === void 0 ? (_a = overrides.inputDefaultAppearance) !== null && _a !== void 0 ? _a : 'outline' : _c, onChange = props.onChange;
18
- if (process.env.NODE_ENV !== 'production' &&
19
- (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')) {
20
- // eslint-disable-next-line no-console
21
- console.error("The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the" +
22
- ' future.');
23
- }
24
- var _d = react_utilities_1.useControllableState({
25
- state: props.value,
26
- defaultState: props.defaultValue,
27
- initialState: '',
28
- }), value = _d[0], setValue = _d[1];
29
- var nativeProps = react_utilities_1.getPartitionedNativeProps({
30
- props: props,
31
- primarySlotTagName: 'input',
32
- excludedPropNames: ['size', 'onChange', 'value', 'defaultValue'],
33
- });
34
- var state = {
35
- size: size,
36
- appearance: appearance,
37
- components: {
38
- root: 'span',
39
- input: 'input',
40
- contentBefore: 'span',
41
- contentAfter: 'span',
42
- },
43
- input: react_utilities_1.resolveShorthand(props.input, {
44
- required: true,
45
- defaultProps: tslib_1.__assign({ type: 'text', ref: ref }, nativeProps.primary),
46
- }),
47
- contentAfter: react_utilities_1.resolveShorthand(props.contentAfter),
48
- contentBefore: react_utilities_1.resolveShorthand(props.contentBefore),
49
- root: react_utilities_1.resolveShorthand(props.root, {
50
- required: true,
51
- defaultProps: nativeProps.root,
52
- }),
53
- };
54
- state.input.value = value;
55
- state.input.onChange = react_utilities_1.useEventCallback(function (ev) {
56
- var newValue = ev.target.value;
57
- onChange === null || onChange === void 0 ? void 0 : onChange(ev, { value: newValue });
58
- setValue(newValue);
59
- });
60
- return state;
61
- };
62
- exports.useInput_unstable = useInput_unstable;
63
- });
64
- //# sourceMappingURL=useInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useInput.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-input/src/components/Input/useInput.ts"],"names":[],"mappings":";;;;IAUA;;;;;;;;OAQG;IACI,IAAM,iBAAiB,GAAG,UAAC,KAAiB,EAAE,GAAgC;;QACnF,IAAM,SAAS,GAAG,6CAAY,EAAE,CAAC;QAEzB,IAAA,KAA0F,KAAK,KAAhF,EAAf,IAAI,mBAAG,QAAQ,KAAA,EAAE,KAAyE,KAAK,WAApB,EAA1D,UAAU,mBAAG,MAAA,SAAS,CAAC,sBAAsB,mCAAI,SAAS,KAAA,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;QAExG,IACE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;YACrC,CAAC,UAAU,KAAK,sBAAsB,IAAI,UAAU,KAAK,uBAAuB,CAAC,EACjF;YACA,sCAAsC;YACtC,OAAO,CAAC,KAAK,CACX,8GAA8G;gBAC5G,UAAU,CACb,CAAC;SACH;QAEK,IAAA,KAAoB,sCAAoB,CAAC;YAC7C,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AAQ,CAAC,QAAQ,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IA7DW,QAAA,iBAAiB,qBA6D5B","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';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\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 overrides = useOverrides();\n\n const { size = 'medium', appearance = overrides.inputDefaultAppearance ?? 'outline', onChange } = props;\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')\n ) {\n // eslint-disable-next-line no-console\n console.error(\n \"The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the\" +\n ' future.',\n );\n }\n\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: '',\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"]}