@fluentui/react-field 9.0.0-alpha.1 → 9.0.0-alpha.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. package/CHANGELOG.json +671 -1
  2. package/CHANGELOG.md +176 -2
  3. package/dist/index.d.ts +30 -95
  4. package/lib/Field.js.map +1 -1
  5. package/lib/components/Field/Field.types.js.map +1 -1
  6. package/lib/components/Field/SlotComponent.types.js.map +1 -1
  7. package/lib/components/Field/index.js.map +1 -1
  8. package/lib/components/Field/renderField.js.map +1 -1
  9. package/lib/components/Field/useField.js +30 -25
  10. package/lib/components/Field/useField.js.map +1 -1
  11. package/lib/components/Field/useFieldStyles.js +3 -3
  12. package/lib/components/Field/useFieldStyles.js.map +1 -1
  13. package/lib/index.js +0 -9
  14. package/lib/index.js.map +1 -1
  15. package/lib-amd/Field.js +6 -0
  16. package/lib-amd/Field.js.map +1 -0
  17. package/lib-amd/components/Field/Field.types.js +5 -0
  18. package/lib-amd/components/Field/Field.types.js.map +1 -0
  19. package/lib-amd/components/Field/SlotComponent.types.js +5 -0
  20. package/lib-amd/components/Field/SlotComponent.types.js.map +1 -0
  21. package/lib-amd/components/Field/index.js +9 -0
  22. package/lib-amd/components/Field/index.js.map +1 -0
  23. package/lib-amd/components/Field/renderField.js +20 -0
  24. package/lib-amd/components/Field/renderField.js.map +1 -0
  25. package/lib-amd/components/Field/useField.js +119 -0
  26. package/lib-amd/components/Field/useField.js.map +1 -0
  27. package/lib-amd/components/Field/useFieldStyles.js +97 -0
  28. package/lib-amd/components/Field/useFieldStyles.js.map +1 -0
  29. package/lib-amd/index.js +10 -0
  30. package/lib-amd/index.js.map +1 -0
  31. package/lib-commonjs/Field.js.map +1 -1
  32. package/lib-commonjs/components/Field/index.js.map +1 -1
  33. package/lib-commonjs/components/Field/renderField.js.map +1 -1
  34. package/lib-commonjs/components/Field/useField.js +30 -25
  35. package/lib-commonjs/components/Field/useField.js.map +1 -1
  36. package/lib-commonjs/components/Field/useFieldStyles.js +4 -4
  37. package/lib-commonjs/components/Field/useFieldStyles.js.map +1 -1
  38. package/lib-commonjs/index.js +1 -136
  39. package/lib-commonjs/index.js.map +1 -1
  40. package/package.json +22 -24
  41. package/Spec.md +0 -354
  42. package/lib/CheckboxField.js +0 -2
  43. package/lib/CheckboxField.js.map +0 -1
  44. package/lib/ComboboxField.js +0 -2
  45. package/lib/ComboboxField.js.map +0 -1
  46. package/lib/InputField.js +0 -2
  47. package/lib/InputField.js.map +0 -1
  48. package/lib/RadioGroupField.js +0 -2
  49. package/lib/RadioGroupField.js.map +0 -1
  50. package/lib/SelectField.js +0 -2
  51. package/lib/SelectField.js.map +0 -1
  52. package/lib/SliderField.js +0 -2
  53. package/lib/SliderField.js.map +0 -1
  54. package/lib/SpinButtonField.js +0 -2
  55. package/lib/SpinButtonField.js.map +0 -1
  56. package/lib/SwitchField.js +0 -2
  57. package/lib/SwitchField.js.map +0 -1
  58. package/lib/TextareaField.js +0 -2
  59. package/lib/TextareaField.js.map +0 -1
  60. package/lib/components/CheckboxField/CheckboxField.js +0 -32
  61. package/lib/components/CheckboxField/CheckboxField.js.map +0 -1
  62. package/lib/components/CheckboxField/index.js +0 -2
  63. package/lib/components/CheckboxField/index.js.map +0 -1
  64. package/lib/components/ComboboxField/ComboboxField.js +0 -14
  65. package/lib/components/ComboboxField/ComboboxField.js.map +0 -1
  66. package/lib/components/ComboboxField/index.js +0 -2
  67. package/lib/components/ComboboxField/index.js.map +0 -1
  68. package/lib/components/InputField/InputField.js +0 -14
  69. package/lib/components/InputField/InputField.js.map +0 -1
  70. package/lib/components/InputField/index.js +0 -2
  71. package/lib/components/InputField/index.js.map +0 -1
  72. package/lib/components/RadioGroupField/RadioGroupField.js +0 -15
  73. package/lib/components/RadioGroupField/RadioGroupField.js.map +0 -1
  74. package/lib/components/RadioGroupField/index.js +0 -2
  75. package/lib/components/RadioGroupField/index.js.map +0 -1
  76. package/lib/components/SelectField/SelectField.js +0 -14
  77. package/lib/components/SelectField/SelectField.js.map +0 -1
  78. package/lib/components/SelectField/index.js +0 -2
  79. package/lib/components/SelectField/index.js.map +0 -1
  80. package/lib/components/SliderField/SliderField.js +0 -14
  81. package/lib/components/SliderField/SliderField.js.map +0 -1
  82. package/lib/components/SliderField/index.js +0 -2
  83. package/lib/components/SliderField/index.js.map +0 -1
  84. package/lib/components/SpinButtonField/SpinButtonField.js +0 -14
  85. package/lib/components/SpinButtonField/SpinButtonField.js.map +0 -1
  86. package/lib/components/SpinButtonField/index.js +0 -2
  87. package/lib/components/SpinButtonField/index.js.map +0 -1
  88. package/lib/components/SwitchField/SwitchField.js +0 -14
  89. package/lib/components/SwitchField/SwitchField.js.map +0 -1
  90. package/lib/components/SwitchField/index.js +0 -2
  91. package/lib/components/SwitchField/index.js.map +0 -1
  92. package/lib/components/TextareaField/TextareaField.js +0 -14
  93. package/lib/components/TextareaField/TextareaField.js.map +0 -1
  94. package/lib/components/TextareaField/index.js +0 -2
  95. package/lib/components/TextareaField/index.js.map +0 -1
  96. package/lib-commonjs/CheckboxField.js +0 -10
  97. package/lib-commonjs/CheckboxField.js.map +0 -1
  98. package/lib-commonjs/ComboboxField.js +0 -10
  99. package/lib-commonjs/ComboboxField.js.map +0 -1
  100. package/lib-commonjs/InputField.js +0 -10
  101. package/lib-commonjs/InputField.js.map +0 -1
  102. package/lib-commonjs/RadioGroupField.js +0 -10
  103. package/lib-commonjs/RadioGroupField.js.map +0 -1
  104. package/lib-commonjs/SelectField.js +0 -10
  105. package/lib-commonjs/SelectField.js.map +0 -1
  106. package/lib-commonjs/SliderField.js +0 -10
  107. package/lib-commonjs/SliderField.js.map +0 -1
  108. package/lib-commonjs/SpinButtonField.js +0 -10
  109. package/lib-commonjs/SpinButtonField.js.map +0 -1
  110. package/lib-commonjs/SwitchField.js +0 -10
  111. package/lib-commonjs/SwitchField.js.map +0 -1
  112. package/lib-commonjs/TextareaField.js +0 -10
  113. package/lib-commonjs/TextareaField.js.map +0 -1
  114. package/lib-commonjs/components/CheckboxField/CheckboxField.js +0 -42
  115. package/lib-commonjs/components/CheckboxField/CheckboxField.js.map +0 -1
  116. package/lib-commonjs/components/CheckboxField/index.js +0 -10
  117. package/lib-commonjs/components/CheckboxField/index.js.map +0 -1
  118. package/lib-commonjs/components/ComboboxField/ComboboxField.js +0 -24
  119. package/lib-commonjs/components/ComboboxField/ComboboxField.js.map +0 -1
  120. package/lib-commonjs/components/ComboboxField/index.js +0 -10
  121. package/lib-commonjs/components/ComboboxField/index.js.map +0 -1
  122. package/lib-commonjs/components/InputField/InputField.js +0 -24
  123. package/lib-commonjs/components/InputField/InputField.js.map +0 -1
  124. package/lib-commonjs/components/InputField/index.js +0 -10
  125. package/lib-commonjs/components/InputField/index.js.map +0 -1
  126. package/lib-commonjs/components/RadioGroupField/RadioGroupField.js +0 -25
  127. package/lib-commonjs/components/RadioGroupField/RadioGroupField.js.map +0 -1
  128. package/lib-commonjs/components/RadioGroupField/index.js +0 -10
  129. package/lib-commonjs/components/RadioGroupField/index.js.map +0 -1
  130. package/lib-commonjs/components/SelectField/SelectField.js +0 -24
  131. package/lib-commonjs/components/SelectField/SelectField.js.map +0 -1
  132. package/lib-commonjs/components/SelectField/index.js +0 -10
  133. package/lib-commonjs/components/SelectField/index.js.map +0 -1
  134. package/lib-commonjs/components/SliderField/SliderField.js +0 -24
  135. package/lib-commonjs/components/SliderField/SliderField.js.map +0 -1
  136. package/lib-commonjs/components/SliderField/index.js +0 -10
  137. package/lib-commonjs/components/SliderField/index.js.map +0 -1
  138. package/lib-commonjs/components/SpinButtonField/SpinButtonField.js +0 -24
  139. package/lib-commonjs/components/SpinButtonField/SpinButtonField.js.map +0 -1
  140. package/lib-commonjs/components/SpinButtonField/index.js +0 -10
  141. package/lib-commonjs/components/SpinButtonField/index.js.map +0 -1
  142. package/lib-commonjs/components/SwitchField/SwitchField.js +0 -24
  143. package/lib-commonjs/components/SwitchField/SwitchField.js.map +0 -1
  144. package/lib-commonjs/components/SwitchField/index.js +0 -10
  145. package/lib-commonjs/components/SwitchField/index.js.map +0 -1
  146. package/lib-commonjs/components/TextareaField/TextareaField.js +0 -24
  147. package/lib-commonjs/components/TextareaField/TextareaField.js.map +0 -1
  148. package/lib-commonjs/components/TextareaField/index.js +0 -10
  149. package/lib-commonjs/components/TextareaField/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Field/useField.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AASA,MAAM,sBAAsB,GAAG;EAC7B,KAAK,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,mBAAD,EAAoB,IAApB,CADsB;EAE7B,OAAO,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,eAAD,EAAgB,IAAhB,CAFoB;EAG7B,OAAO,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,uBAAD,EAAwB,IAAxB;AAHoB,CAA/B;AAMA;;;AAGG;;AACH,MAAM,oBAAoB,GAAG,CAAC,CAAD,EAAa,CAAb,KAA6B,CAAC,IAAI,CAAL,GAAS,GAAG,CAAC,IAAI,CAAC,EAAlB,GAAuB,CAAC,IAAI,CAAtF;AAEA;;AAEG;;;AACI,MAAM,wBAAwB,GAA8C,KAA3C,IAA2D;EACjG,MAAM;IACJ,SADI;IAEJ,OAFI;IAGJ,IAHI;IAIJ,KAJI;IAKJ,WALI;IAMJ,IANI;IAOJ,KAPI;IAQJ,iBARI;IASJ,qBATI;IAUJ,eAVI;IAWJ,GAAG;EAXC,IAYF,KAZJ;EAcA,MAAM,UAAU,GAAG;IACjB,SADiB;IAEjB,OAFiB;IAGjB,IAHiB;IAIjB,KAJiB;IAKjB,WALiB;IAMjB,IANiB;IAOjB,KAPiB;IAQjB,iBARiB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B,QAAQ,GAAG,IAAH,GAAU,SARtB;MASZ,GAAG;IATS;EAFqC,CAArC,CAAhB;;EAeA,IAAI,eAAe,KAAK,SAApB,IAAiC,KAAjC,IAA0C,CAAC,KAAK,CAAC,OAArD,EAA8D;IAC5D,KAAK,CAAC,OAAN,GAAgB,OAAO,CAAC,EAAxB;EACD;;EAED,MAAM,KAAK,GAA+B;IACxC,WADwC;IAExC,eAFwC;IAGxC,UAAU,EAAE,MAAM,CAAC,UAHqB;IAIxC,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,OAAO,EAAE,MAAM,CAAC,SAFN;MAGV,KAAK,EAAE,aAAA,CAAA,KAHG;MAIV,iBAAiB,EAAE,MAJT;MAKV,qBAAqB,EAAE,MALb;MAMV,IAAI,EAAE;IANI,CAJ4B;IAYxC,IAZwC;IAaxC,OAbwC;IAcxC,KAdwC;IAexC,qBAfwC;IAgBxC,iBAhBwC;IAiBxC;EAjBwC,CAA1C;EAoBA,OAAO,KAAP;AACD,CAvFM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourcesContent":["import * as React from 'react';\nimport { CheckmarkCircle12Filled, ErrorCircle12Filled, Warning12Filled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport type {\n FieldComponent,\n FieldConfig,\n FieldProps,\n FieldPropsWithOptionalComponentProps,\n FieldState,\n} from './Field.types';\n\nconst validationMessageIcons = {\n error: <ErrorCircle12Filled />,\n warning: <Warning12Filled />,\n success: <CheckmarkCircle12Filled />,\n} as const;\n\n/**\n * Merge two possibly-undefined IDs for aria-describedby. If both IDs are defined, combines\n * them into a string separated by a space. Otherwise, returns just the defined ID (if any).\n */\nconst mergeAriaDescribedBy = (a?: string, b?: string) => (a && b ? `${a} ${b}` : a || b);\n\n/**\n * Partition the props used by the Field itself, from the props that are passed to the underlying field component.\n */\nexport const getPartitionedFieldProps = <Props extends FieldProps<FieldComponent>>(props: Props) => {\n const {\n className,\n control,\n hint,\n label,\n orientation,\n root,\n style,\n validationMessage,\n validationMessageIcon,\n validationState,\n ...restOfProps\n } = props;\n\n const fieldProps = {\n className,\n control,\n hint,\n label,\n orientation,\n root,\n style,\n validationMessage,\n validationMessageIcon,\n validationState,\n };\n\n return [fieldProps, restOfProps] as const;\n};\n\n/**\n * Create the state required to render Field.\n *\n * The returned state can be modified with hooks such as useFieldStyles_unstable,\n * before being passed to renderField_unstable.\n *\n * @param props - Props passed to this field\n * @param ref - Ref to the control slot (primary slot)\n * @param params - Configuration parameters for this Field\n */\nexport const useField_unstable = <T extends FieldComponent>(\n props: FieldPropsWithOptionalComponentProps<T>,\n ref: React.Ref<HTMLElement>,\n params: FieldConfig<T>,\n): FieldState<T> => {\n const [fieldProps, controlProps] = getPartitionedFieldProps(props);\n\n const baseId = useId('field-');\n\n const { orientation = 'vertical', validationState } = fieldProps;\n\n const root = resolveShorthand(fieldProps.root, {\n required: true,\n defaultProps: getNativeElementProps('div', fieldProps),\n });\n\n const label = resolveShorthand(fieldProps.label, {\n defaultProps: {\n id: baseId + '__label',\n required: controlProps.required,\n size: typeof controlProps.size === 'string' ? controlProps.size : undefined,\n // htmlFor is set below\n },\n });\n\n const validationMessage = resolveShorthand(fieldProps.validationMessage, {\n defaultProps: {\n id: baseId + '__validationMessage',\n },\n });\n\n const hint = resolveShorthand(fieldProps.hint, {\n defaultProps: {\n id: baseId + '__hint',\n },\n });\n\n const validationMessageIcon = resolveShorthand(fieldProps.validationMessageIcon, {\n required: !!validationState,\n defaultProps: {\n children: validationState ? validationMessageIcons[validationState] : undefined,\n },\n });\n\n const { labelConnection = 'htmlFor' } = params;\n const hasError = validationState === 'error';\n\n const control = resolveShorthand(fieldProps.control, {\n required: true,\n defaultProps: {\n ref,\n // Add a default ID only if required for label's htmlFor prop\n id: label && labelConnection === 'htmlFor' ? baseId + '__control' : undefined,\n // Add aria-labelledby only if not using the label's htmlFor\n 'aria-labelledby': labelConnection !== 'htmlFor' ? label?.id : undefined,\n 'aria-describedby': hasError ? hint?.id : mergeAriaDescribedBy(validationMessage?.id, hint?.id),\n 'aria-errormessage': hasError ? validationMessage?.id : undefined,\n 'aria-invalid': hasError ? true : undefined,\n ...controlProps,\n },\n });\n\n if (labelConnection === 'htmlFor' && label && !label.htmlFor) {\n label.htmlFor = control.id;\n }\n\n const state: FieldState<FieldComponent> = {\n orientation,\n validationState,\n classNames: params.classNames,\n components: {\n root: 'div',\n control: params.component,\n label: Label,\n validationMessage: 'span',\n validationMessageIcon: 'span',\n hint: 'span',\n },\n root,\n control,\n label,\n validationMessageIcon,\n validationMessage,\n hint,\n };\n\n return state as FieldState<T>;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-field/src/components/Field/useField.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGA,MAAM,sBAAsB,GAAG;EAC7B,KAAK,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,mBAAD,EAAoB,IAApB,CADsB;EAE7B,OAAO,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,eAAD,EAAgB,IAAhB,CAFoB;EAG7B,OAAO,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,uBAAD,EAAwB,IAAxB;AAHoB,CAA/B;AAMA;;AAEG;;AACI,MAAM,wBAAwB,GAAI,KAAD,IAA8D;EACpG,MAAM;IACJ,SADI;IAEJ,OAFI;IAGJ,IAHI;IAIJ,KAJI;IAKJ,WALI;IAMJ,IANI;IAOJ,KAPI;IAQJ,iBARI;IASJ,qBATI;IAUJ,eAVI;IAWJ,GAAG;EAXC,IAYF,KAZ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2B,EAAA,KAAA,KAAA,CAA3B,GAA2B,EAA3B,GAAA,YAAY,CAAC,cAAD,CAAZ,GAAiC,IAAjC;EACD;;EAED,MAAM,OAAO,GAAG,iBAAA,CAAA,gBAAA,CAAiB,UAAU,CAAC,OAA5B,EAAqC;IACnD,QAAQ,EAAE,IADyC;IAEnD,YAAY,EAAE;MACZ,GADY;MAEZ,EAAE,EAAE,MAAM,GAAG,WAFD;MAGZ,GAAG;IAHS;EAFqC,CAArC,CAAhB;;EASA,IAAI,KAAK,IAAI,eAAe,KAAK,SAAjC,EAA4C;IAC1C,CAAA,EAAA,GAAA,KAAK,CAAC,OAAN,MAAa,IAAb,IAAa,EAAA,KAAA,KAAA,CAAb,GAAa,EAAb,GAAA,KAAK,CAAC,OAAN,GAAkB,OAAO,CAAC,EAA1B;EACD;;EAED,MAAM,KAAK,GAA6B;IACtC,WADsC;IAEtC,eAFsC;IAGtC,UAAU,EAAE,MAAM,CAAC,UAHmB;IAItC,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,OAAO,EAAE,MAAM,CAAC,SAFN;MAGV,KAAK,EAAE,aAAA,CAAA,KAHG;MAIV,iBAAiB,EAAE,KAJT;MAKV,qBAAqB,EAAE,MALb;MAMV,IAAI,EAAE;IANI,CAJ0B;IAYtC,IAZsC;IAatC,OAbsC;IActC,KAdsC;IAetC,qBAfsC;IAgBtC,iBAhBsC;IAiBtC;EAjBsC,CAAxC;EAoBA,OAAO,KAAP;AACD,CAhGM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourcesContent":["import * as React from 'react';\nimport { CheckmarkCircle12Filled, ErrorCircle12Filled, Warning12Filled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport type { FieldConfig, FieldControl, FieldPropsWithOptionalComponentProps, FieldState } from './Field.types';\n\nconst validationMessageIcons = {\n error: <ErrorCircle12Filled />,\n warning: <Warning12Filled />,\n success: <CheckmarkCircle12Filled />,\n} as const;\n\n/**\n * Partition the props used by the Field itself, from the props that are passed to the underlying field component.\n */\nexport const getPartitionedFieldProps = (props: FieldPropsWithOptionalComponentProps<FieldControl>) => {\n const {\n className,\n control,\n hint,\n label,\n orientation,\n root,\n style,\n validationMessage,\n validationMessageIcon,\n validationState,\n ...restOfProps\n } = props;\n\n const fieldProps = {\n className,\n control,\n hint,\n label,\n orientation,\n root,\n style,\n validationMessage,\n validationMessageIcon,\n validationState,\n };\n\n return [fieldProps, restOfProps] as const;\n};\n\n/**\n * Create the state required to render Field.\n *\n * The returned state can be modified with hooks such as useFieldStyles_unstable,\n * before being passed to renderField_unstable.\n *\n * @param props - Props passed to this field\n * @param ref - Ref to the control slot (primary slot)\n * @param params - Configuration parameters for this Field\n */\nexport const useField_unstable = <T extends FieldControl>(\n props: FieldPropsWithOptionalComponentProps<T>,\n ref: React.Ref<HTMLElement>,\n params: FieldConfig<T>,\n): FieldState<T> => {\n const [fieldProps, controlProps] = getPartitionedFieldProps(props);\n const { orientation = 'vertical', validationState } = fieldProps;\n const { labelConnection = 'htmlFor', ariaInvalidOnError = true } = params;\n\n const baseId = useId('field-');\n\n const root = resolveShorthand(fieldProps.root, {\n required: true,\n defaultProps: getNativeElementProps('div', fieldProps),\n });\n\n const label = resolveShorthand(fieldProps.label, {\n defaultProps: {\n id: baseId + '__label',\n required: controlProps.required,\n size: typeof controlProps.size === 'string' ? controlProps.size : undefined,\n // htmlFor is handled below\n },\n });\n\n const validationMessage = resolveShorthand(fieldProps.validationMessage, {\n defaultProps: {\n id: baseId + '__validationMessage',\n },\n });\n\n const hint = resolveShorthand(fieldProps.hint, {\n defaultProps: {\n id: baseId + '__hint',\n },\n });\n\n const validationMessageIcon = resolveShorthand(fieldProps.validationMessageIcon, {\n required: !!validationState,\n defaultProps: {\n children: validationState ? validationMessageIcons[validationState] : undefined,\n },\n });\n\n // Hook up aria props on the control\n if (label && labelConnection === 'aria-labelledby') {\n controlProps['aria-labelledby'] ??= label.id;\n }\n\n if (validationMessage || hint) {\n // The control is described by the validation message, or hint, or both\n // We also preserve and append any aria-describedby supplied by the user\n // For reference: https://github.com/microsoft/fluentui/pull/25580#discussion_r1017259933\n controlProps['aria-describedby'] = [validationMessage?.id, hint?.id, controlProps['aria-describedby']]\n .filter(Boolean)\n .join(' ');\n }\n\n if (validationState === 'error' && ariaInvalidOnError) {\n controlProps['aria-invalid'] ??= true;\n }\n\n const control = resolveShorthand(fieldProps.control, {\n required: true,\n defaultProps: {\n ref,\n id: baseId + '__control',\n ...controlProps,\n },\n });\n\n if (label && labelConnection === 'htmlFor') {\n label.htmlFor ??= control.id;\n }\n\n const state: FieldState<FieldControl> = {\n orientation,\n validationState,\n classNames: params.classNames,\n components: {\n root: 'div',\n control: params.component,\n label: Label,\n validationMessage: 'div',\n validationMessageIcon: 'span',\n hint: 'div',\n },\n root,\n control,\n label,\n validationMessageIcon,\n validationMessage,\n hint,\n };\n\n return state as FieldState<T>;\n};\n"],"sourceRoot":"../src/"}
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useFieldStyles_unstable = exports.getFieldClassNames = void 0;
7
7
 
8
- const react_1 = /*#__PURE__*/require("@griffel/react");
9
-
10
8
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
9
 
10
+ const react_1 = /*#__PURE__*/require("@griffel/react");
11
+
12
12
  const getFieldClassNames = name => ({
13
13
  root: `fui-${name}`,
14
14
  control: `fui-${name}__control`,
@@ -25,7 +25,7 @@ exports.getFieldClassNames = getFieldClassNames;
25
25
 
26
26
  const useRootStyles = /*#__PURE__*/react_1.__styles({
27
27
  "base": {
28
- "mc9l5x": "fwk3njj",
28
+ "mc9l5x": "f13qh94s",
29
29
  "Bxotwcr": "f14np9u9",
30
30
  "B7hvi0a": "f1m2n5bn"
31
31
  },
@@ -37,7 +37,7 @@ const useRootStyles = /*#__PURE__*/react_1.__styles({
37
37
  "Br312pm": "fd46tj4"
38
38
  }
39
39
  }, {
40
- "d": [".fwk3njj{display:inline-grid;}", ".f14np9u9{grid-auto-flow:row;}", ".f1m2n5bn{justify-items:start;}", ".fai812u{grid-template-rows:auto auto auto auto;}", ".fckz59x{grid-template-columns:1fr 2fr;}", ".fd46tj4{grid-column-start:2;}"]
40
+ "d": [".f13qh94s{display:grid;}", ".f14np9u9{grid-auto-flow:row;}", ".f1m2n5bn{justify-items:start;}", ".fai812u{grid-template-rows:auto auto auto auto;}", ".fckz59x{grid-template-columns:1fr 2fr;}", ".fd46tj4{grid-column-start:2;}"]
41
41
  });
42
42
 
43
43
  const useLabelStyles = /*#__PURE__*/react_1.__styles({
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Field/useFieldStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAEO,MAAM,kBAAkB,GAAI,IAAD,KAA+D;EAC/F,IAAI,EAAE,OAAO,IAAI,EAD8E;EAE/F,OAAO,EAAE,OAAO,IAAI,WAF2E;EAG/F,KAAK,EAAE,OAAO,IAAI,SAH6E;EAI/F,iBAAiB,EAAE,OAAO,IAAI,qBAJiE;EAK/F,qBAAqB,EAAE,OAAO,IAAI,yBAL6D;EAM/F,IAAI,EAAE,OAAO,IAAI;AAN8E,CAA/D,CAA3B;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB;AASb;;AAEG;;AACH,MAAM,aAAa,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB;;AAiBA,MAAM,cAAc,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAvB;;AAeA,MAAM,sBAAsB,gB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,CAAC,qBAAV,EAAiC;IAC/B,KAAK,CAAC,qBAAN,CAA4B,SAA5B,GAAwC,OAAA,CAAA,YAAA,CACtC,UAAU,CAAC,qBAD2B,EAEtC,2BAA2B,CAAC,IAFU,EAGtC,CAAC,CAAC,eAAF,IAAqB,2BAA2B,CAAC,eAAD,CAHV,EAItC,KAAK,CAAC,qBAAN,CAA4B,SAJU,CAAxC;EAMD;;EAED,MAAM,mBAAmB,GAAG,sBAAsB,EAAlD;;EACA,IAAI,KAAK,CAAC,iBAAV,EAA6B;IAC3B,KAAK,CAAC,iBAAN,CAAwB,SAAxB,GAAoC,OAAA,CAAA,YAAA,CAClC,UAAU,CAAC,iBADuB,EAElC,mBAAmB,CAAC,IAFc,EAGlC,UAAU,IAAI,UAAU,CAAC,YAHS,EAIlC,eAAe,KAAK,OAApB,IAA+B,mBAAmB,CAAC,KAJjB,EAKlC,KAAK,CAAC,iBAAN,CAAwB,SALU,CAApC;EAOD;;EAED,IAAI,KAAK,CAAC,IAAV,EAAgB;IACd,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,UAAU,CAAC,IADU,EAErB,mBAAmB,CAAC,IAFC,EAGrB,UAAU,IAAI,UAAU,CAAC,YAHJ,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;EAMD;AACF,CA5DM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { FieldComponent, FieldProps, FieldSlots, FieldState } from './Field.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n\nexport const getFieldClassNames = (name: string): SlotClassNames<FieldSlots<FieldComponent>> => ({\n root: `fui-${name}`,\n control: `fui-${name}__control`,\n label: `fui-${name}__label`,\n validationMessage: `fui-${name}__validationMessage`,\n validationMessageIcon: `fui-${name}__validationMessageIcon`,\n hint: `fui-${name}__hint`,\n});\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n display: 'inline-grid',\n gridAutoFlow: 'row',\n justifyItems: 'start',\n },\n\n horizontal: {\n gridTemplateRows: 'auto auto auto auto',\n gridTemplateColumns: '1fr 2fr',\n },\n\n secondColumn: {\n gridColumnStart: '2',\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n marginTop: tokens.spacingVerticalXXS,\n marginBottom: tokens.spacingVerticalXXS,\n },\n\n horizontal: {\n gridRowStart: '1',\n gridRowEnd: '-1',\n marginRight: tokens.spacingHorizontalM,\n alignSelf: 'start',\n justifySelf: 'stretch',\n },\n});\n\nconst useSecondaryTextStyles = makeStyles({\n base: {\n marginTop: tokens.spacingVerticalXXS,\n color: tokens.colorNeutralForeground3,\n ...typographyStyles.caption1,\n },\n\n error: {\n color: tokens.colorPaletteRedForeground1,\n },\n});\n\nconst useValidationMessageIconStyles = makeStyles({\n base: {\n fontSize: '12px',\n lineHeight: '12px',\n verticalAlign: 'middle',\n marginRight: tokens.spacingHorizontalXS,\n },\n\n error: {\n color: tokens.colorPaletteRedForeground1,\n },\n warning: {\n color: tokens.colorPaletteDarkOrangeForeground1,\n },\n success: {\n color: tokens.colorPaletteGreenForeground1,\n },\n});\n\n/**\n * Apply styling to the Field slots based on the state\n */\nexport const useFieldStyles_unstable = <T extends FieldComponent>(state: FieldState<T>) => {\n const classNames = state.classNames;\n const validationState: FieldProps<FieldComponent>['validationState'] = state.validationState;\n const horizontal = state.orientation === 'horizontal';\n\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n classNames.root,\n rootStyles.base,\n horizontal && rootStyles.horizontal,\n state.root.className,\n );\n\n if (state.control) {\n state.control.className = mergeClasses(\n classNames.control,\n horizontal && rootStyles.secondColumn,\n state.control.className,\n );\n }\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(\n classNames.label,\n labelStyles.base,\n horizontal && labelStyles.horizontal,\n state.label.className,\n );\n }\n\n const validationMessageIconStyles = useValidationMessageIconStyles();\n if (state.validationMessageIcon) {\n state.validationMessageIcon.className = mergeClasses(\n classNames.validationMessageIcon,\n validationMessageIconStyles.base,\n !!validationState && validationMessageIconStyles[validationState],\n state.validationMessageIcon.className,\n );\n }\n\n const secondaryTextStyles = useSecondaryTextStyles();\n if (state.validationMessage) {\n state.validationMessage.className = mergeClasses(\n classNames.validationMessage,\n secondaryTextStyles.base,\n horizontal && rootStyles.secondColumn,\n validationState === 'error' && secondaryTextStyles.error,\n state.validationMessage.className,\n );\n }\n\n if (state.hint) {\n state.hint.className = mergeClasses(\n classNames.hint,\n secondaryTextStyles.base,\n horizontal && rootStyles.secondColumn,\n state.hint.className,\n );\n }\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-field/src/components/Field/useFieldStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAEA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGO,MAAM,kBAAkB,GAAI,IAAD,KAA6D;EAC7F,IAAI,EAAE,OAAO,IAAI,EAD4E;EAE7F,OAAO,EAAE,OAAO,IAAI,WAFyE;EAG7F,KAAK,EAAE,OAAO,IAAI,SAH2E;EAI7F,iBAAiB,EAAE,OAAO,IAAI,qBAJ+D;EAK7F,qBAAqB,EAAE,OAAO,IAAI,yBAL2D;EAM7F,IAAI,EAAE,OAAO,IAAI;AAN4E,CAA7D,CAA3B;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB;AASb;;AAEG;;AACH,MAAM,aAAa,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB;;AAiBA,MAAM,cAAc,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA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AM,2BAA2B,GAAG,8BAA8B,EAAlE;;EACA,IAAI,KAAK,CAAC,qBAAV,EAAiC;IAC/B,KAAK,CAAC,qBAAN,CAA4B,SAA5B,GAAwC,OAAA,CAAA,YAAA,CACtC,UAAU,CAAC,qBAD2B,EAEtC,2BAA2B,CAAC,IAFU,EAGtC,CAAC,CAAC,eAAF,IAAqB,2BAA2B,CAAC,eAAD,CAHV,EAItC,KAAK,CAAC,qBAAN,CAA4B,SAJU,CAAxC;EAMD;;EAED,MAAM,mBAAmB,GAAG,sBAAsB,EAAlD;;EACA,IAAI,KAAK,CAAC,iBAAV,EAA6B;IAC3B,KAAK,CAAC,iBAAN,CAAwB,SAAxB,GAAoC,OAAA,CAAA,YAAA,CAClC,UAAU,CAAC,iBADuB,EAElC,mBAAmB,CAAC,IAFc,EAGlC,UAAU,IAAI,UAAU,CAAC,YAHS,EAIlC,eAAe,KAAK,OAApB,IAA+B,mBAAmB,CAAC,KAJjB,EAKlC,KAAK,CAAC,iBAAN,CAAwB,SALU,CAApC;EAOD;;EAED,IAAI,KAAK,CAAC,IAAV,EAAgB;IACd,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,UAAU,CAAC,IADU,EAErB,mBAAmB,CAAC,IAFC,EAGrB,UAAU,IAAI,UAAU,CAAC,YAHJ,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;EAMD;AACF,CA5DM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { FieldControl, FieldProps, FieldSlots, FieldState } from './Field.types';\n\nexport const getFieldClassNames = (name: string): SlotClassNames<FieldSlots<FieldControl>> => ({\n root: `fui-${name}`,\n control: `fui-${name}__control`,\n label: `fui-${name}__label`,\n validationMessage: `fui-${name}__validationMessage`,\n validationMessageIcon: `fui-${name}__validationMessageIcon`,\n hint: `fui-${name}__hint`,\n});\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n display: 'grid',\n gridAutoFlow: 'row',\n justifyItems: 'start',\n },\n\n horizontal: {\n gridTemplateRows: 'auto auto auto auto',\n gridTemplateColumns: '1fr 2fr',\n },\n\n secondColumn: {\n gridColumnStart: '2',\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n marginTop: tokens.spacingVerticalXXS,\n marginBottom: tokens.spacingVerticalXXS,\n },\n\n horizontal: {\n gridRowStart: '1',\n gridRowEnd: '-1',\n marginRight: tokens.spacingHorizontalM,\n alignSelf: 'start',\n justifySelf: 'stretch',\n },\n});\n\nconst useSecondaryTextStyles = makeStyles({\n base: {\n marginTop: tokens.spacingVerticalXXS,\n color: tokens.colorNeutralForeground3,\n ...typographyStyles.caption1,\n },\n\n error: {\n color: tokens.colorPaletteRedForeground1,\n },\n});\n\nconst useValidationMessageIconStyles = makeStyles({\n base: {\n fontSize: '12px',\n lineHeight: '12px',\n verticalAlign: 'middle',\n marginRight: tokens.spacingHorizontalXS,\n },\n\n error: {\n color: tokens.colorPaletteRedForeground1,\n },\n warning: {\n color: tokens.colorPaletteDarkOrangeForeground1,\n },\n success: {\n color: tokens.colorPaletteGreenForeground1,\n },\n});\n\n/**\n * Apply styling to the Field slots based on the state\n */\nexport const useFieldStyles_unstable = <T extends FieldControl>(state: FieldState<T>) => {\n const classNames = state.classNames;\n const validationState: FieldProps<FieldControl>['validationState'] = state.validationState;\n const horizontal = state.orientation === 'horizontal';\n\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n classNames.root,\n rootStyles.base,\n horizontal && rootStyles.horizontal,\n state.root.className,\n );\n\n if (state.control) {\n state.control.className = mergeClasses(\n classNames.control,\n horizontal && rootStyles.secondColumn,\n state.control.className,\n );\n }\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(\n classNames.label,\n labelStyles.base,\n horizontal && labelStyles.horizontal,\n state.label.className,\n );\n }\n\n const validationMessageIconStyles = useValidationMessageIconStyles();\n if (state.validationMessageIcon) {\n state.validationMessageIcon.className = mergeClasses(\n classNames.validationMessageIcon,\n validationMessageIconStyles.base,\n !!validationState && validationMessageIconStyles[validationState],\n state.validationMessageIcon.className,\n );\n }\n\n const secondaryTextStyles = useSecondaryTextStyles();\n if (state.validationMessage) {\n state.validationMessage.className = mergeClasses(\n classNames.validationMessage,\n secondaryTextStyles.base,\n horizontal && rootStyles.secondColumn,\n validationState === 'error' && secondaryTextStyles.error,\n state.validationMessage.className,\n );\n }\n\n if (state.hint) {\n state.hint.className = mergeClasses(\n classNames.hint,\n secondaryTextStyles.base,\n horizontal && rootStyles.secondColumn,\n state.hint.className,\n );\n }\n};\n"],"sourceRoot":"../src/"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.textareaFieldClassNames = exports.TextareaField = exports.switchFieldClassNames = exports.SwitchField = exports.spinButtonFieldClassNames = exports.SpinButtonField = exports.sliderFieldClassNames = exports.SliderField = exports.selectFieldClassNames = exports.SelectField = exports.radioGroupFieldClassNames = exports.RadioGroupField = exports.inputFieldClassNames = exports.InputField = exports.comboboxFieldClassNames = exports.ComboboxField = exports.checkboxFieldClassNames = exports.CheckboxField = exports.useField_unstable = exports.useFieldStyles_unstable = exports.renderField_unstable = exports.getFieldClassNames = void 0;
6
+ exports.useField_unstable = exports.useFieldStyles_unstable = exports.renderField_unstable = exports.getFieldClassNames = void 0;
7
7
 
8
8
  var Field_1 = /*#__PURE__*/require("./Field");
9
9
 
@@ -31,139 +31,4 @@ Object.defineProperty(exports, "useField_unstable", {
31
31
  return Field_1.useField_unstable;
32
32
  }
33
33
  });
34
-
35
- var CheckboxField_1 = /*#__PURE__*/require("./CheckboxField");
36
-
37
- Object.defineProperty(exports, "CheckboxField", {
38
- enumerable: true,
39
- get: function () {
40
- return CheckboxField_1.CheckboxField;
41
- }
42
- });
43
- Object.defineProperty(exports, "checkboxFieldClassNames", {
44
- enumerable: true,
45
- get: function () {
46
- return CheckboxField_1.checkboxFieldClassNames;
47
- }
48
- });
49
-
50
- var ComboboxField_1 = /*#__PURE__*/require("./ComboboxField");
51
-
52
- Object.defineProperty(exports, "ComboboxField", {
53
- enumerable: true,
54
- get: function () {
55
- return ComboboxField_1.ComboboxField;
56
- }
57
- });
58
- Object.defineProperty(exports, "comboboxFieldClassNames", {
59
- enumerable: true,
60
- get: function () {
61
- return ComboboxField_1.comboboxFieldClassNames;
62
- }
63
- });
64
-
65
- var InputField_1 = /*#__PURE__*/require("./InputField");
66
-
67
- Object.defineProperty(exports, "InputField", {
68
- enumerable: true,
69
- get: function () {
70
- return InputField_1.InputField;
71
- }
72
- });
73
- Object.defineProperty(exports, "inputFieldClassNames", {
74
- enumerable: true,
75
- get: function () {
76
- return InputField_1.inputFieldClassNames;
77
- }
78
- });
79
-
80
- var RadioGroupField_1 = /*#__PURE__*/require("./RadioGroupField");
81
-
82
- Object.defineProperty(exports, "RadioGroupField", {
83
- enumerable: true,
84
- get: function () {
85
- return RadioGroupField_1.RadioGroupField;
86
- }
87
- });
88
- Object.defineProperty(exports, "radioGroupFieldClassNames", {
89
- enumerable: true,
90
- get: function () {
91
- return RadioGroupField_1.radioGroupFieldClassNames;
92
- }
93
- });
94
-
95
- var SelectField_1 = /*#__PURE__*/require("./SelectField");
96
-
97
- Object.defineProperty(exports, "SelectField", {
98
- enumerable: true,
99
- get: function () {
100
- return SelectField_1.SelectField;
101
- }
102
- });
103
- Object.defineProperty(exports, "selectFieldClassNames", {
104
- enumerable: true,
105
- get: function () {
106
- return SelectField_1.selectFieldClassNames;
107
- }
108
- });
109
-
110
- var SliderField_1 = /*#__PURE__*/require("./SliderField");
111
-
112
- Object.defineProperty(exports, "SliderField", {
113
- enumerable: true,
114
- get: function () {
115
- return SliderField_1.SliderField;
116
- }
117
- });
118
- Object.defineProperty(exports, "sliderFieldClassNames", {
119
- enumerable: true,
120
- get: function () {
121
- return SliderField_1.sliderFieldClassNames;
122
- }
123
- });
124
-
125
- var SpinButtonField_1 = /*#__PURE__*/require("./SpinButtonField");
126
-
127
- Object.defineProperty(exports, "SpinButtonField", {
128
- enumerable: true,
129
- get: function () {
130
- return SpinButtonField_1.SpinButtonField;
131
- }
132
- });
133
- Object.defineProperty(exports, "spinButtonFieldClassNames", {
134
- enumerable: true,
135
- get: function () {
136
- return SpinButtonField_1.spinButtonFieldClassNames;
137
- }
138
- });
139
-
140
- var SwitchField_1 = /*#__PURE__*/require("./SwitchField");
141
-
142
- Object.defineProperty(exports, "SwitchField", {
143
- enumerable: true,
144
- get: function () {
145
- return SwitchField_1.SwitchField;
146
- }
147
- });
148
- Object.defineProperty(exports, "switchFieldClassNames", {
149
- enumerable: true,
150
- get: function () {
151
- return SwitchField_1.switchFieldClassNames;
152
- }
153
- });
154
-
155
- var TextareaField_1 = /*#__PURE__*/require("./TextareaField");
156
-
157
- Object.defineProperty(exports, "TextareaField", {
158
- enumerable: true,
159
- get: function () {
160
- return TextareaField_1.TextareaField;
161
- }
162
- });
163
- Object.defineProperty(exports, "textareaFieldClassNames", {
164
- enumerable: true,
165
- get: function () {
166
- return TextareaField_1.textareaFieldClassNames;
167
- }
168
- });
169
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,OAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,kBAAA;EAAkB;AAAlB,CAAA;AAAoB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,sBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,oBAAA;EAAoB;AAAp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B;AAArB,CAAA;;AAGtB,IAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,iBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,iBAAA,CAAA,eAAA;EAAe;AAAf,CAAA;AAAiB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,2BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,iBAAA,CAAA,yBAAA;EAAyB;AAAzB,CAAA;;AAG1B,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,aAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,aAAA,CAAA,WAAA;EAAW;AAAX,CAAA;AAAa,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,aAAA,CAAA,qBAAA;EAAqB;AAArB,CAAA;;AAGtB,IAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,eAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,eAAA,CAAA,aAAA;EAAa;AAAb,CAAA;AAAe,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,eAAA,CAAA,uBAAA;EAAuB;AAAvB,CAAA","sourcesContent":["export { getFieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from './Field';\nexport type { FieldProps, FieldSlots, FieldState, FieldConfig } from './Field';\n\nexport { CheckboxField, checkboxFieldClassNames } from './CheckboxField';\nexport type { CheckboxFieldProps } from './CheckboxField';\n\nexport { ComboboxField, comboboxFieldClassNames } from './ComboboxField';\nexport type { ComboboxFieldProps } from './ComboboxField';\n\nexport { InputField, inputFieldClassNames } from './InputField';\nexport type { InputFieldProps } from './InputField';\n\nexport { RadioGroupField, radioGroupFieldClassNames } from './RadioGroupField';\nexport type { RadioGroupFieldProps } from './RadioGroupField';\n\nexport { SelectField, selectFieldClassNames } from './SelectField';\nexport type { SelectFieldProps } from './SelectField';\n\nexport { SliderField, sliderFieldClassNames } from './SliderField';\nexport type { SliderFieldProps } from './SliderField';\n\nexport { SpinButtonField, spinButtonFieldClassNames } from './SpinButtonField';\nexport type { SpinButtonFieldProps } from './SpinButtonField';\n\nexport { SwitchField, switchFieldClassNames } from './SwitchField';\nexport type { SwitchFieldProps } from './SwitchField';\n\nexport { TextareaField, textareaFieldClassNames } from './TextareaField';\nexport type { TextareaFieldProps } from './TextareaField';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-field/src/index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,OAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,kBAAA;EAAkB;AAAlB,CAAA;AAAoB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,sBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,oBAAA;EAAoB;AAApB,CAAA;AAAsB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,uBAAA;EAAuB;AAAvB,CAAA;AAAyB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,mBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,iBAAA;EAAiB;AAAjB,CAAA","sourcesContent":["export { getFieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from './Field';\nexport type { FieldConfig, FieldControl, FieldProps, FieldSlots, FieldState } from './Field';\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@fluentui/react-field",
3
- "version": "9.0.0-alpha.1",
3
+ "version": "9.0.0-alpha.11",
4
4
  "description": "Fluent UI Field components",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
7
- "typings": "dist/index.d.ts",
7
+ "typings": "./dist/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
@@ -20,39 +20,29 @@
20
20
  "start": "yarn storybook",
21
21
  "storybook": "start-storybook",
22
22
  "test": "jest --passWithNoTests",
23
- "docs": "api-extractor run --config=config/api-extractor.local.json --local",
24
- "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/react-field/src && yarn docs",
25
- "type-check": "tsc -b tsconfig.json"
23
+ "type-check": "tsc -b tsconfig.json",
24
+ "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
26
25
  },
27
26
  "devDependencies": {
28
27
  "@fluentui/eslint-plugin": "*",
29
28
  "@fluentui/react-conformance": "*",
30
- "@fluentui/react-conformance-griffel": "9.0.0-beta.13",
29
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.18",
31
30
  "@fluentui/scripts": "^1.0.0"
32
31
  },
33
32
  "dependencies": {
34
- "@fluentui/react-checkbox": "^9.0.5",
35
- "@fluentui/react-combobox": "^9.0.0-beta.9",
36
- "@fluentui/react-context-selector": "^9.0.3",
33
+ "@fluentui/react-context-selector": "^9.1.3",
37
34
  "@fluentui/react-icons": "^2.0.175",
38
- "@fluentui/react-input": "^9.1.0",
39
- "@fluentui/react-label": "^9.0.5",
40
- "@fluentui/react-radio": "^9.0.5",
41
- "@fluentui/react-select": "9.0.0-beta.9",
42
- "@fluentui/react-slider": "^9.0.4",
43
- "@fluentui/react-spinbutton": "^9.0.1",
44
- "@fluentui/react-switch": "^9.0.5",
45
- "@fluentui/react-textarea": "^9.0.5",
46
- "@fluentui/react-theme": "^9.1.0",
47
- "@fluentui/react-utilities": "^9.1.0",
48
- "@griffel/react": "^1.3.0",
35
+ "@fluentui/react-label": "^9.0.13",
36
+ "@fluentui/react-theme": "^9.1.4",
37
+ "@fluentui/react-utilities": "^9.3.0",
38
+ "@griffel/react": "^1.4.2",
49
39
  "tslib": "^2.1.0"
50
40
  },
51
41
  "peerDependencies": {
52
- "@types/react": ">=16.8.0 <18.0.0",
53
- "@types/react-dom": ">=16.8.0 <18.0.0",
54
- "react": ">=16.8.0 <18.0.0",
55
- "react-dom": ">=16.8.0 <18.0.0"
42
+ "@types/react": ">=16.8.0 <19.0.0",
43
+ "@types/react-dom": ">=16.8.0 <19.0.0",
44
+ "react": ">=16.8.0 <19.0.0",
45
+ "react-dom": ">=16.8.0 <19.0.0"
56
46
  },
57
47
  "beachball": {
58
48
  "disallowedChangeTypes": [
@@ -60,5 +50,13 @@
60
50
  "minor",
61
51
  "patch"
62
52
  ]
53
+ },
54
+ "exports": {
55
+ ".": {
56
+ "types": "./dist/index.d.ts",
57
+ "import": "./lib/index.js",
58
+ "require": "./lib-commonjs/index.js"
59
+ },
60
+ "./package.json": "./package.json"
63
61
  }
64
62
  }