@cimpress-ui/react 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/commonjs/components/app-header/side-nav.d.ts +4 -5
  2. package/dist/commonjs/components/app-header/side-nav.d.ts.map +1 -1
  3. package/dist/commonjs/components/app-header/side-nav.js +3 -2
  4. package/dist/commonjs/components/app-header/side-nav.js.map +1 -1
  5. package/dist/commonjs/components/combo-box/combo-box.d.ts +16 -4
  6. package/dist/commonjs/components/combo-box/combo-box.d.ts.map +1 -1
  7. package/dist/commonjs/components/combo-box/combo-box.js +9 -4
  8. package/dist/commonjs/components/combo-box/combo-box.js.map +1 -1
  9. package/dist/commonjs/components/copy/copy-button.d.ts +13 -0
  10. package/dist/commonjs/components/copy/copy-button.d.ts.map +1 -0
  11. package/dist/commonjs/components/copy/copy-button.js +33 -0
  12. package/dist/commonjs/components/copy/copy-button.js.map +1 -0
  13. package/dist/commonjs/components/copy/inline-copy.d.ts +12 -0
  14. package/dist/commonjs/components/copy/inline-copy.d.ts.map +1 -0
  15. package/dist/commonjs/components/copy/inline-copy.js +33 -0
  16. package/dist/commonjs/components/copy/inline-copy.js.map +1 -0
  17. package/dist/commonjs/components/copy/use-copy.d.ts +10 -0
  18. package/dist/commonjs/components/copy/use-copy.d.ts.map +1 -0
  19. package/dist/commonjs/components/copy/use-copy.js +30 -0
  20. package/dist/commonjs/components/copy/use-copy.js.map +1 -0
  21. package/dist/commonjs/components/date-picker/date-picker.d.ts +7 -2
  22. package/dist/commonjs/components/date-picker/date-picker.d.ts.map +1 -1
  23. package/dist/commonjs/components/date-picker/date-picker.js +6 -2
  24. package/dist/commonjs/components/date-picker/date-picker.js.map +1 -1
  25. package/dist/commonjs/components/disclosure/disclosure-group.d.ts +4 -2
  26. package/dist/commonjs/components/disclosure/disclosure-group.d.ts.map +1 -1
  27. package/dist/commonjs/components/disclosure/disclosure-group.js.map +1 -1
  28. package/dist/commonjs/components/disclosure/disclosure.d.ts +4 -2
  29. package/dist/commonjs/components/disclosure/disclosure.d.ts.map +1 -1
  30. package/dist/commonjs/components/disclosure/disclosure.js.map +1 -1
  31. package/dist/commonjs/components/link-tabs/link-tabs.d.ts.map +1 -1
  32. package/dist/commonjs/components/link-tabs/link-tabs.js +1 -1
  33. package/dist/commonjs/components/link-tabs/link-tabs.js.map +1 -1
  34. package/dist/commonjs/components/menu/menu.d.ts +5 -3
  35. package/dist/commonjs/components/menu/menu.d.ts.map +1 -1
  36. package/dist/commonjs/components/menu/menu.js.map +1 -1
  37. package/dist/commonjs/components/number-field/number-field.d.ts +9 -2
  38. package/dist/commonjs/components/number-field/number-field.d.ts.map +1 -1
  39. package/dist/commonjs/components/number-field/number-field.js +8 -2
  40. package/dist/commonjs/components/number-field/number-field.js.map +1 -1
  41. package/dist/commonjs/components/select/select.d.ts +14 -4
  42. package/dist/commonjs/components/select/select.d.ts.map +1 -1
  43. package/dist/commonjs/components/select/select.js +9 -3
  44. package/dist/commonjs/components/select/select.js.map +1 -1
  45. package/dist/commonjs/components/spacing/types.d.ts.map +1 -1
  46. package/dist/commonjs/components/spacing/types.js +6 -4
  47. package/dist/commonjs/components/spacing/types.js.map +1 -1
  48. package/dist/commonjs/components/stepper/context.d.ts +2 -0
  49. package/dist/commonjs/components/stepper/context.d.ts.map +1 -1
  50. package/dist/commonjs/components/stepper/context.js +2 -0
  51. package/dist/commonjs/components/stepper/context.js.map +1 -1
  52. package/dist/commonjs/components/stepper/stepper-item.d.ts.map +1 -1
  53. package/dist/commonjs/components/stepper/stepper-item.js +3 -2
  54. package/dist/commonjs/components/stepper/stepper-item.js.map +1 -1
  55. package/dist/commonjs/components/stepper/stepper.d.ts.map +1 -1
  56. package/dist/commonjs/components/stepper/stepper.js +14 -8
  57. package/dist/commonjs/components/stepper/stepper.js.map +1 -1
  58. package/dist/commonjs/components/tabs/tabs.d.ts +3 -1
  59. package/dist/commonjs/components/tabs/tabs.d.ts.map +1 -1
  60. package/dist/commonjs/components/tabs/tabs.js.map +1 -1
  61. package/dist/commonjs/components/tag-field/tag-field-input.js +2 -2
  62. package/dist/commonjs/components/tag-field/tag-field-input.js.map +1 -1
  63. package/dist/commonjs/components/tag-field/tag-field.d.ts +14 -4
  64. package/dist/commonjs/components/tag-field/tag-field.d.ts.map +1 -1
  65. package/dist/commonjs/components/tag-field/tag-field.js +6 -2
  66. package/dist/commonjs/components/tag-field/tag-field.js.map +1 -1
  67. package/dist/commonjs/components/text-inputs/search-field.d.ts +9 -2
  68. package/dist/commonjs/components/text-inputs/search-field.d.ts.map +1 -1
  69. package/dist/commonjs/components/text-inputs/search-field.js +5 -1
  70. package/dist/commonjs/components/text-inputs/search-field.js.map +1 -1
  71. package/dist/commonjs/components/text-inputs/text-area.d.ts +15 -5
  72. package/dist/commonjs/components/text-inputs/text-area.d.ts.map +1 -1
  73. package/dist/commonjs/components/text-inputs/text-area.js.map +1 -1
  74. package/dist/commonjs/components/text-inputs/text-field.d.ts +2 -5
  75. package/dist/commonjs/components/text-inputs/text-field.d.ts.map +1 -1
  76. package/dist/commonjs/components/text-inputs/text-field.js.map +1 -1
  77. package/dist/commonjs/components/top-nav/top-nav.d.ts +12 -0
  78. package/dist/commonjs/components/top-nav/top-nav.d.ts.map +1 -0
  79. package/dist/commonjs/components/top-nav/top-nav.js +18 -0
  80. package/dist/commonjs/components/top-nav/top-nav.js.map +1 -0
  81. package/dist/commonjs/components/types.d.ts +6 -1
  82. package/dist/commonjs/components/types.d.ts.map +1 -1
  83. package/dist/commonjs/components/types.js.map +1 -1
  84. package/dist/commonjs/index.d.ts +3 -0
  85. package/dist/commonjs/index.d.ts.map +1 -1
  86. package/dist/commonjs/index.js +3 -0
  87. package/dist/commonjs/index.js.map +1 -1
  88. package/dist/commonjs/utils/string-like-children-to-string.d.ts +3 -0
  89. package/dist/commonjs/utils/string-like-children-to-string.d.ts.map +1 -0
  90. package/dist/commonjs/utils/string-like-children-to-string.js +7 -0
  91. package/dist/commonjs/utils/string-like-children-to-string.js.map +1 -0
  92. package/dist/esm/components/app-header/side-nav.d.ts +4 -5
  93. package/dist/esm/components/app-header/side-nav.d.ts.map +1 -1
  94. package/dist/esm/components/app-header/side-nav.js +3 -2
  95. package/dist/esm/components/app-header/side-nav.js.map +1 -1
  96. package/dist/esm/components/combo-box/combo-box.d.ts +16 -4
  97. package/dist/esm/components/combo-box/combo-box.d.ts.map +1 -1
  98. package/dist/esm/components/combo-box/combo-box.js +10 -5
  99. package/dist/esm/components/combo-box/combo-box.js.map +1 -1
  100. package/dist/esm/components/copy/copy-button.d.ts +13 -0
  101. package/dist/esm/components/copy/copy-button.d.ts.map +1 -0
  102. package/dist/esm/components/copy/copy-button.js +30 -0
  103. package/dist/esm/components/copy/copy-button.js.map +1 -0
  104. package/dist/esm/components/copy/inline-copy.d.ts +12 -0
  105. package/dist/esm/components/copy/inline-copy.d.ts.map +1 -0
  106. package/dist/esm/components/copy/inline-copy.js +27 -0
  107. package/dist/esm/components/copy/inline-copy.js.map +1 -0
  108. package/dist/esm/components/copy/use-copy.d.ts +10 -0
  109. package/dist/esm/components/copy/use-copy.d.ts.map +1 -0
  110. package/dist/esm/components/copy/use-copy.js +27 -0
  111. package/dist/esm/components/copy/use-copy.js.map +1 -0
  112. package/dist/esm/components/date-picker/date-picker.d.ts +7 -2
  113. package/dist/esm/components/date-picker/date-picker.d.ts.map +1 -1
  114. package/dist/esm/components/date-picker/date-picker.js +7 -3
  115. package/dist/esm/components/date-picker/date-picker.js.map +1 -1
  116. package/dist/esm/components/disclosure/disclosure-group.d.ts +4 -2
  117. package/dist/esm/components/disclosure/disclosure-group.d.ts.map +1 -1
  118. package/dist/esm/components/disclosure/disclosure-group.js.map +1 -1
  119. package/dist/esm/components/disclosure/disclosure.d.ts +4 -2
  120. package/dist/esm/components/disclosure/disclosure.d.ts.map +1 -1
  121. package/dist/esm/components/disclosure/disclosure.js.map +1 -1
  122. package/dist/esm/components/link-tabs/link-tabs.d.ts.map +1 -1
  123. package/dist/esm/components/link-tabs/link-tabs.js +1 -1
  124. package/dist/esm/components/link-tabs/link-tabs.js.map +1 -1
  125. package/dist/esm/components/menu/menu.d.ts +5 -3
  126. package/dist/esm/components/menu/menu.d.ts.map +1 -1
  127. package/dist/esm/components/menu/menu.js.map +1 -1
  128. package/dist/esm/components/number-field/number-field.d.ts +9 -2
  129. package/dist/esm/components/number-field/number-field.d.ts.map +1 -1
  130. package/dist/esm/components/number-field/number-field.js +8 -2
  131. package/dist/esm/components/number-field/number-field.js.map +1 -1
  132. package/dist/esm/components/select/select.d.ts +14 -4
  133. package/dist/esm/components/select/select.d.ts.map +1 -1
  134. package/dist/esm/components/select/select.js +9 -3
  135. package/dist/esm/components/select/select.js.map +1 -1
  136. package/dist/esm/components/spacing/types.d.ts.map +1 -1
  137. package/dist/esm/components/spacing/types.js +6 -4
  138. package/dist/esm/components/spacing/types.js.map +1 -1
  139. package/dist/esm/components/stepper/context.d.ts +2 -0
  140. package/dist/esm/components/stepper/context.d.ts.map +1 -1
  141. package/dist/esm/components/stepper/context.js +2 -0
  142. package/dist/esm/components/stepper/context.js.map +1 -1
  143. package/dist/esm/components/stepper/stepper-item.d.ts.map +1 -1
  144. package/dist/esm/components/stepper/stepper-item.js +3 -2
  145. package/dist/esm/components/stepper/stepper-item.js.map +1 -1
  146. package/dist/esm/components/stepper/stepper.d.ts.map +1 -1
  147. package/dist/esm/components/stepper/stepper.js +15 -9
  148. package/dist/esm/components/stepper/stepper.js.map +1 -1
  149. package/dist/esm/components/tabs/tabs.d.ts +3 -1
  150. package/dist/esm/components/tabs/tabs.d.ts.map +1 -1
  151. package/dist/esm/components/tabs/tabs.js.map +1 -1
  152. package/dist/esm/components/tag-field/tag-field-input.js +2 -2
  153. package/dist/esm/components/tag-field/tag-field-input.js.map +1 -1
  154. package/dist/esm/components/tag-field/tag-field.d.ts +14 -4
  155. package/dist/esm/components/tag-field/tag-field.d.ts.map +1 -1
  156. package/dist/esm/components/tag-field/tag-field.js +7 -3
  157. package/dist/esm/components/tag-field/tag-field.js.map +1 -1
  158. package/dist/esm/components/text-inputs/search-field.d.ts +9 -2
  159. package/dist/esm/components/text-inputs/search-field.d.ts.map +1 -1
  160. package/dist/esm/components/text-inputs/search-field.js +6 -2
  161. package/dist/esm/components/text-inputs/search-field.js.map +1 -1
  162. package/dist/esm/components/text-inputs/text-area.d.ts +15 -5
  163. package/dist/esm/components/text-inputs/text-area.d.ts.map +1 -1
  164. package/dist/esm/components/text-inputs/text-area.js +1 -1
  165. package/dist/esm/components/text-inputs/text-area.js.map +1 -1
  166. package/dist/esm/components/text-inputs/text-field.d.ts +2 -5
  167. package/dist/esm/components/text-inputs/text-field.d.ts.map +1 -1
  168. package/dist/esm/components/text-inputs/text-field.js.map +1 -1
  169. package/dist/esm/components/top-nav/top-nav.d.ts +12 -0
  170. package/dist/esm/components/top-nav/top-nav.d.ts.map +1 -0
  171. package/dist/esm/components/top-nav/top-nav.js +11 -0
  172. package/dist/esm/components/top-nav/top-nav.js.map +1 -0
  173. package/dist/esm/components/types.d.ts +6 -1
  174. package/dist/esm/components/types.d.ts.map +1 -1
  175. package/dist/esm/components/types.js.map +1 -1
  176. package/dist/esm/index.d.ts +3 -0
  177. package/dist/esm/index.d.ts.map +1 -1
  178. package/dist/esm/index.js +3 -0
  179. package/dist/esm/index.js.map +1 -1
  180. package/dist/esm/utils/string-like-children-to-string.d.ts +3 -0
  181. package/dist/esm/utils/string-like-children-to-string.d.ts.map +1 -0
  182. package/dist/esm/utils/string-like-children-to-string.js +4 -0
  183. package/dist/esm/utils/string-like-children-to-string.js.map +1 -0
  184. package/dist-styles/core.css +1 -1
  185. package/dist-styles/styles.css +1 -1
  186. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"text-area.js","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-area.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAuF;AACvF,iEAM+B;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S,EACjB,uBAAC,6BAAQ,IAAC,SAAS,EAAC,2BAA2B,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,YACzF,uBAAC,gCAAW,IACV,GAAG,EAAE,WAAW,EAChB,SAAS,EAAE,IAAA,cAAI,EAAC,qBAAqB,EAAE,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EACtE,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,GACV,GACO,EACX,uBAAC,8BAAc,cAAE,YAAY,GAAkB,EAC/C,uBAAC,oCAAoB,cAAE,WAAW,GAAwB,IACzD,CACJ,GACY,CAChB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,SAAS,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;AAE7C,6BAAQ","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { type RefObject, useRef, type ForwardedRef, useImperativeHandle } from 'react';\nimport {\n TextArea as RACTextArea,\n TextField as RACTextField,\n type TextAreaProps as RACTextAreaProps,\n type TextFieldProps as RACTextFieldProps,\n Group as RACGroup,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport type { CommonProps, FieldWithPlaceholderProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface TextAreaProps\n extends CommonProps,\n FieldWithPlaceholderProps<string>,\n Pick<\n RACTextFieldProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'type'\n | 'autoFocus'\n | 'autoComplete'\n | 'inputMode'\n | 'minLength'\n | 'maxLength'\n | 'onFocus'\n | 'onBlur'\n | 'onKeyDown'\n >,\n Pick<RACTextAreaProps, 'autoCapitalize' | 'autoCorrect' | 'rows' | 'spellCheck' | 'wrap'> {\n /** A React ref that allows access to the imperative API of this component. */\n apiRef?: RefObject<TextAreaApi>;\n}\n\n/** The imperative API exposed by the `TextArea` component. */\nexport interface TextAreaApi {\n /** Focuses the text area. */\n focus: () => void;\n /** Selects the contents of the text area. */\n select: () => void;\n}\n\nfunction TextArea(\n {\n label,\n description,\n error: errorMessage,\n placeholder,\n autoCapitalize,\n autoCorrect,\n rows,\n spellCheck,\n wrap,\n UNSAFE_className,\n UNSAFE_style,\n apiRef,\n ...props\n }: TextAreaProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const textAreaRef = useRef<HTMLTextAreaElement>(null);\n\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useProductionWarning(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('TextArea requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n useImperativeHandle(\n apiRef,\n () => ({\n focus: () => textAreaRef.current?.focus(),\n select: () => textAreaRef.current?.select(),\n }),\n [],\n );\n\n return (\n <RACTextField {...props} ref={ref} className={clsx('cim-text-area', UNSAFE_className)} style={UNSAFE_style}>\n {({ isDisabled, isRequired }) => (\n <>\n <FormFieldLabel isRequired={isRequired} isDisabled={isDisabled}>\n {label}\n </FormFieldLabel>\n <RACGroup className=\"cim-text-area-input-group\" onClick={() => textAreaRef.current?.focus()}>\n <RACTextArea\n ref={textAreaRef}\n className={clsx('cim-text-area-input', textStyle({ variant: 'body' }))}\n placeholder={placeholder}\n autoCapitalize={autoCapitalize}\n autoCorrect={autoCorrect}\n rows={rows}\n spellCheck={spellCheck}\n wrap={wrap}\n />\n </RACGroup>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </>\n )}\n </RACTextField>\n );\n}\n\n/**\n * Allows users to enter multiple lines of text with a keyboard.\n *\n * See [text area usage guidelines](https://ui.cimpress.io/components/text-area/).\n */\nconst _TextArea = withStyleProps(forwardRef(TextArea), 'TextArea');\n\nexport { _TextArea as TextArea };\n"]}
1
+ {"version":3,"file":"text-area.js","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-area.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAuE;AACvE,iEAM+B;AAC/B,yDAAkD;AAClD,qFAA6E;AAC7E,mEAA2D;AAC3D,wEAA4G;AAE5G,qDAAmD;AAgDnD,SAAS,QAAQ,CACf,EACE,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,WAAW,EACX,cAAc,EACd,WAAW,EACX,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,GAAG,KAAK,EACM,EAChB,GAAiC;IAEjC,MAAM,WAAW,GAAG,IAAA,cAAM,EAAsB,IAAI,CAAC,CAAC;IAEtD,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,IAAA,gDAAoB,EAAC,GAAG,EAAE;QACxB,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC5C,OAAO,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAC;QAClG,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAEvC,IAAA,2BAAmB,EACjB,MAAM,EACN,GAAG,EAAE,CAAC,CAAC;QACL,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE;QACzC,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE;KAC5C,CAAC,EACF,EAAE,CACH,CAAC;IAEF,OAAO,CACL,uBAAC,iCAAY,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,eAAe,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,YACvG,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAC/B,6DACE,uBAAC,8BAAc,IAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,YAC3D,KAAK,GACS,EACjB,uBAAC,6BAAQ,IAAC,SAAS,EAAC,2BAA2B,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,YACzF,uBAAC,gCAAW,IACV,GAAG,EAAE,WAAW,EAChB,SAAS,EAAE,IAAA,cAAI,EAAC,qBAAqB,EAAE,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EACtE,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,GACV,GACO,EACX,uBAAC,8BAAc,cAAE,YAAY,GAAkB,EAC/C,uBAAC,oCAAoB,cAAE,WAAW,GAAwB,IACzD,CACJ,GACY,CAChB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,SAAS,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;AAE7C,6BAAQ","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { type ForwardedRef, useImperativeHandle, useRef } from 'react';\nimport {\n TextArea as RACTextArea,\n TextField as RACTextField,\n type TextAreaProps as RACTextAreaProps,\n type TextFieldProps as RACTextFieldProps,\n Group as RACGroup,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport type { ApiProps, CommonProps, FieldWithPlaceholderProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface TextAreaProps\n extends CommonProps,\n FieldWithPlaceholderProps<string>,\n ApiProps<TextAreaApi>,\n Pick<\n RACTextFieldProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'type'\n | 'autoFocus'\n | 'autoComplete'\n | 'inputMode'\n | 'minLength'\n | 'maxLength'\n | 'onFocus'\n | 'onBlur'\n | 'onKeyDown'\n > {\n /** Controls whether inputted text is automatically capitalized. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocapitalize). */\n autoCapitalize?: RACTextAreaProps['autoCapitalize'];\n /** Controls whether inputted text can be autocorrected by the browser. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocorrect). */\n autoCorrect?: 'on' | 'off';\n /** Controls how many lines of text are visible by default. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/rows). */\n rows?: number;\n /** Controls whether the inputted text may be checked for spelling errors. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/spellcheck). */\n spellCheck?: boolean;\n /**\n * Controls how the inputted text will be wrapped for form submission. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/wrap).\n * @default 'soft'\n */\n wrap?: 'soft' | 'hard';\n}\n\n/** The imperative API exposed by the `TextArea` component. */\nexport interface TextAreaApi {\n /** Focuses the text area. */\n focus: () => void;\n /** Selects the contents of the text area. */\n select: () => void;\n}\n\nfunction TextArea(\n {\n label,\n description,\n error: errorMessage,\n placeholder,\n autoCapitalize,\n autoCorrect,\n rows,\n spellCheck,\n wrap,\n UNSAFE_className,\n UNSAFE_style,\n apiRef,\n ...props\n }: TextAreaProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const textAreaRef = useRef<HTMLTextAreaElement>(null);\n\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useProductionWarning(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('TextArea requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n useImperativeHandle(\n apiRef,\n () => ({\n focus: () => textAreaRef.current?.focus(),\n select: () => textAreaRef.current?.select(),\n }),\n [],\n );\n\n return (\n <RACTextField {...props} ref={ref} className={clsx('cim-text-area', UNSAFE_className)} style={UNSAFE_style}>\n {({ isDisabled, isRequired }) => (\n <>\n <FormFieldLabel isRequired={isRequired} isDisabled={isDisabled}>\n {label}\n </FormFieldLabel>\n <RACGroup className=\"cim-text-area-input-group\" onClick={() => textAreaRef.current?.focus()}>\n <RACTextArea\n ref={textAreaRef}\n className={clsx('cim-text-area-input', textStyle({ variant: 'body' }))}\n placeholder={placeholder}\n autoCapitalize={autoCapitalize}\n autoCorrect={autoCorrect}\n rows={rows}\n spellCheck={spellCheck}\n wrap={wrap}\n />\n </RACGroup>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </>\n )}\n </RACTextField>\n );\n}\n\n/**\n * Allows users to enter multiple lines of text with a keyboard.\n *\n * See [text area usage guidelines](https://ui.cimpress.io/components/text-area/).\n */\nconst _TextArea = withStyleProps(forwardRef(TextArea), 'TextArea');\n\nexport { _TextArea as TextArea };\n"]}
@@ -1,14 +1,11 @@
1
- import { type RefObject } from 'react';
2
1
  import { type TextFieldProps as RACTextFieldProps } from 'react-aria-components';
3
- import type { AffixProps, CommonProps, FieldWithPlaceholderProps } from '../types.js';
4
- export interface TextFieldProps extends CommonProps, FieldWithPlaceholderProps<string>, AffixProps, Pick<RACTextFieldProps, 'value' | 'defaultValue' | 'onChange' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'type' | 'autoFocus' | 'autoComplete' | 'inputMode' | 'minLength' | 'maxLength' | 'pattern' | 'onFocus' | 'onBlur' | 'onKeyDown'> {
2
+ import type { AffixProps, ApiProps, CommonProps, FieldWithPlaceholderProps } from '../types.js';
3
+ export interface TextFieldProps extends CommonProps, FieldWithPlaceholderProps<string>, AffixProps, ApiProps<TextFieldApi>, Pick<RACTextFieldProps, 'value' | 'defaultValue' | 'onChange' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'type' | 'autoFocus' | 'autoComplete' | 'inputMode' | 'minLength' | 'maxLength' | 'pattern' | 'onFocus' | 'onBlur' | 'onKeyDown'> {
5
4
  /**
6
5
  * Whether to render a button that can be used to clear the text field.
7
6
  * @default false
8
7
  */
9
8
  isClearable?: boolean;
10
- /** A React ref that allows access to the imperative API of this component. */
11
- apiRef?: RefObject<TextFieldApi>;
12
9
  }
13
10
  /** The imperative API exposed by the `TextField` component. */
14
11
  export interface TextFieldApi {
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-field.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAyC,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AAC3G,OAAO,EACL,KAAK,cAAc,IAAI,iBAAiB,EAIzC,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGtF,MAAM,WAAW,cACf,SAAQ,WAAW,EACjB,yBAAyB,CAAC,MAAM,CAAC,EACjC,UAAU,EACV,IAAI,CACF,iBAAiB,EACf,OAAO,GACP,cAAc,GACd,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,MAAM,GACN,WAAW,GACX,cAAc,GACd,WAAW,GACX,WAAW,GACX,WAAW,GACX,SAAS,GACT,SAAS,GACT,QAAQ,GACR,WAAW,CACd;IACH;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;CAClC;AAED,+DAA+D;AAC/D,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAmID;;;;GAIG;AACH,QAAA,MAAM,UAAU,gKAAqD,CAAC;AAEtE,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-field.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,cAAc,IAAI,iBAAiB,EAIzC,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGhG,MAAM,WAAW,cACf,SAAQ,WAAW,EACjB,yBAAyB,CAAC,MAAM,CAAC,EACjC,UAAU,EACV,QAAQ,CAAC,YAAY,CAAC,EACtB,IAAI,CACF,iBAAiB,EACf,OAAO,GACP,cAAc,GACd,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,MAAM,GACN,WAAW,GACX,cAAc,GACd,WAAW,GACX,WAAW,GACX,WAAW,GACX,SAAS,GACT,SAAS,GACT,QAAQ,GACR,WAAW,CACd;IACH;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,+DAA+D;AAC/D,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAmID;;;;GAIG;AACH,QAAA,MAAM,UAAU,gKAAqD,CAAC;AAEtE,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-field.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,6CAA0C;AAC1C,gDAA0D;AAC1D,gDAAwB;AACxB,iCAA2G;AAC3G,iEAK+B;AAC/B,yDAAkD;AAClD,kFAA2E;AAC3E,qFAA6E;AAC7E,mEAA2D;AAC3D,wEAA4G;AAC5G,kEAA2D;AAE3D,qDAAmD;AA2CnD,SAAS,SAAS,CAChB,EACE,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,WAAW,EACX,MAAM,EACN,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,WAAW,GAAG,KAAK,EACnB,KAAK,EAAE,aAAa,EACpB,YAAY,EAAE,oBAAoB,EAClC,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACO,EACjB,GAAiC;IAEjC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IACzC,MAAM,QAAQ,GAAG,IAAA,cAAM,EAAmB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,0BAAkB,EAAC,aAAa,EAAE,oBAAoB,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;IAClG,MAAM,QAAQ,GAAG,IAAA,+CAAoB,EAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,kBAAkB,GAAG,IAAA,aAAK,GAAE,CAAC;IAEnC,IAAA,2BAAmB,EACjB,MAAM,EACN,GAAG,EAAE,CAAC,CAAC;QACL,KAAK,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE;QAC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AG,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAC,kCAAkC,EAAC,MAAM,kBAC3E,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,GACvC,CACL,IACA,CACJ,GACY,CAChB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC;AAE/C,+BAAS","sourcesContent":["'use client';\n\nimport { useId } from '@react-aria/utils';\nimport { useControlledState } from '@react-stately/utils';\nimport clsx from 'clsx';\nimport { type ForwardedRef, type KeyboardEvent, type RefObject, useImperativeHandle, useRef } from 'react';\nimport {\n type TextFieldProps as RACTextFieldProps,\n Group as RACGroup,\n Input as RACInput,\n TextField as RACTextField,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { useLocalizedMessages } from '../../i18n/localization-provider.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport { XButton } from '../internal/x-button/x-button.js';\nimport type { AffixProps, CommonProps, FieldWithPlaceholderProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface TextFieldProps\n extends CommonProps,\n FieldWithPlaceholderProps<string>,\n AffixProps,\n Pick<\n RACTextFieldProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'type'\n | 'autoFocus'\n | 'autoComplete'\n | 'inputMode'\n | 'minLength'\n | 'maxLength'\n | 'pattern'\n | 'onFocus'\n | 'onBlur'\n | 'onKeyDown'\n > {\n /**\n * Whether to render a button that can be used to clear the text field.\n * @default false\n */\n isClearable?: boolean;\n /** A React ref that allows access to the imperative API of this component. */\n apiRef?: RefObject<TextFieldApi>;\n}\n\n/** The imperative API exposed by the `TextField` component. */\nexport interface TextFieldApi {\n /** Focuses the input field. */\n focus: () => void;\n /** Selects the contents of the input field. */\n select: () => void;\n}\n\nfunction TextField(\n {\n label,\n description,\n error: errorMessage,\n placeholder,\n prefix,\n suffix,\n UNSAFE_className,\n UNSAFE_style,\n isClearable = false,\n value: consumerValue,\n defaultValue: consumerDefaultValue,\n onChange,\n apiRef,\n ...props\n }: TextFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const { isDisabled, isReadOnly } = props;\n const inputRef = useRef<HTMLInputElement>(null);\n const [value, setValue] = useControlledState(consumerValue, consumerDefaultValue ?? '', onChange);\n const messages = useLocalizedMessages('common');\n const clearDescriptionId = useId();\n\n useImperativeHandle(\n apiRef,\n () => ({\n focus: () => inputRef.current?.focus(),\n select: () => inputRef.current?.select(),\n }),\n [],\n );\n\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n const isFieldClearable = isClearable && !isDisabled && !isReadOnly;\n\n function onKeyDown(e: KeyboardEvent) {\n if (!isFieldClearable) {\n return;\n }\n\n if (e.key === 'Escape') {\n e.preventDefault();\n\n setValue('');\n }\n }\n\n useProductionWarning(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('TextField requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACTextField\n {...props}\n ref={ref}\n className={clsx('cim-text-field', UNSAFE_className)}\n style={UNSAFE_style}\n value={value}\n onChange={setValue}\n aria-describedby={[props['aria-describedby'], isFieldClearable ? clearDescriptionId : undefined]\n .filter(Boolean)\n .join(' ')}\n >\n {({ isDisabled, isRequired }) => (\n <>\n <FormFieldLabel isRequired={isRequired} isDisabled={isDisabled}>\n {label}\n </FormFieldLabel>\n <RACGroup className=\"cim-text-field-input-group\" onClick={() => inputRef.current?.focus()}>\n {prefix && (\n <div\n className={clsx(\n 'cim-text-field-affix',\n textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'subtle' }),\n )}\n aria-hidden\n >\n {prefix}\n </div>\n )}\n\n <RACInput\n ref={inputRef}\n className={clsx('cim-text-field-input', textStyle({ variant: 'body' }))}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n />\n\n {isFieldClearable && value !== '' && (\n <XButton\n slot={null}\n UNSAFE_className=\"cim-text-field-clear\"\n aria-label={messages.format('clearValue')}\n onPress={() => setValue('')}\n iconType=\"circled\"\n excludeFromTabOrder\n />\n )}\n\n {suffix && (\n <div\n className={clsx(\n 'cim-text-field-affix',\n textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'subtle' }),\n )}\n aria-hidden\n >\n {suffix}\n </div>\n )}\n </RACGroup>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n {isFieldClearable && (\n <p id={clearDescriptionId} className=\"cim-text-field-clear-description\" hidden>\n {messages.format('clearValueDescription')}\n </p>\n )}\n </>\n )}\n </RACTextField>\n );\n}\n\n/**\n * Allows users to enter a single line of text with a keyboard.\n *\n * See [text field usage guidelines](https://ui.cimpress.io/components/text-field/).\n */\nconst _TextField = withStyleProps(forwardRef(TextField), 'TextField');\n\nexport { _TextField as TextField };\n"]}
1
+ {"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-field.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,6CAA0C;AAC1C,gDAA0D;AAC1D,gDAAwB;AACxB,iCAA2F;AAC3F,iEAK+B;AAC/B,yDAAkD;AAClD,kFAA2E;AAC3E,qFAA6E;AAC7E,mEAA2D;AAC3D,wEAA4G;AAC5G,kEAA2D;AAE3D,qDAAmD;AA0CnD,SAAS,SAAS,CAChB,EACE,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,WAAW,EACX,MAAM,EACN,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,WAAW,GAAG,KAAK,EACnB,KAAK,EAAE,aAAa,EACpB,YAAY,EA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ACnC,uBAAC,qBAAO,IACN,IAAI,EAAE,IAAI,EACV,gBAAgB,EAAC,sBAAsB,gBAC3B,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,EACzC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAC3B,QAAQ,EAAC,SAAS,EAClB,mBAAmB,SACnB,CACH,EAEA,MAAM,IAAI,CACT,gCACE,SAAS,EAAE,IAAA,cAAI,EACb,sBAAsB,EACtB,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CACtE,iCAGA,MAAM,GACH,CACP,IACQ,EACX,uBAAC,8BAAc,cAAE,YAAY,GAAkB,EAC/C,uBAAC,oCAAoB,cAAE,WAAW,GAAwB,EACzD,gBAAgB,IAAI,CACnB,8BAAG,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAC,kCAAkC,EAAC,MAAM,kBAC3E,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,GACvC,CACL,IACA,CACJ,GACY,CAChB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC;AAE/C,+BAAS","sourcesContent":["'use client';\n\nimport { useId } from '@react-aria/utils';\nimport { useControlledState } from '@react-stately/utils';\nimport clsx from 'clsx';\nimport { type ForwardedRef, type KeyboardEvent, useImperativeHandle, useRef } from 'react';\nimport {\n type TextFieldProps as RACTextFieldProps,\n Group as RACGroup,\n Input as RACInput,\n TextField as RACTextField,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { useLocalizedMessages } from '../../i18n/localization-provider.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport { XButton } from '../internal/x-button/x-button.js';\nimport type { AffixProps, ApiProps, CommonProps, FieldWithPlaceholderProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface TextFieldProps\n extends CommonProps,\n FieldWithPlaceholderProps<string>,\n AffixProps,\n ApiProps<TextFieldApi>,\n Pick<\n RACTextFieldProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'type'\n | 'autoFocus'\n | 'autoComplete'\n | 'inputMode'\n | 'minLength'\n | 'maxLength'\n | 'pattern'\n | 'onFocus'\n | 'onBlur'\n | 'onKeyDown'\n > {\n /**\n * Whether to render a button that can be used to clear the text field.\n * @default false\n */\n isClearable?: boolean;\n}\n\n/** The imperative API exposed by the `TextField` component. */\nexport interface TextFieldApi {\n /** Focuses the input field. */\n focus: () => void;\n /** Selects the contents of the input field. */\n select: () => void;\n}\n\nfunction TextField(\n {\n label,\n description,\n error: errorMessage,\n placeholder,\n prefix,\n suffix,\n UNSAFE_className,\n UNSAFE_style,\n isClearable = false,\n value: consumerValue,\n defaultValue: consumerDefaultValue,\n onChange,\n apiRef,\n ...props\n }: TextFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const { isDisabled, isReadOnly } = props;\n const inputRef = useRef<HTMLInputElement>(null);\n const [value, setValue] = useControlledState(consumerValue, consumerDefaultValue ?? '', onChange);\n const messages = useLocalizedMessages('common');\n const clearDescriptionId = useId();\n\n useImperativeHandle(\n apiRef,\n () => ({\n focus: () => inputRef.current?.focus(),\n select: () => inputRef.current?.select(),\n }),\n [],\n );\n\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n const isFieldClearable = isClearable && !isDisabled && !isReadOnly;\n\n function onKeyDown(e: KeyboardEvent) {\n if (!isFieldClearable) {\n return;\n }\n\n if (e.key === 'Escape') {\n e.preventDefault();\n\n setValue('');\n }\n }\n\n useProductionWarning(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('TextField requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACTextField\n {...props}\n ref={ref}\n className={clsx('cim-text-field', UNSAFE_className)}\n style={UNSAFE_style}\n value={value}\n onChange={setValue}\n aria-describedby={[props['aria-describedby'], isFieldClearable ? clearDescriptionId : undefined]\n .filter(Boolean)\n .join(' ')}\n >\n {({ isDisabled, isRequired }) => (\n <>\n <FormFieldLabel isRequired={isRequired} isDisabled={isDisabled}>\n {label}\n </FormFieldLabel>\n <RACGroup className=\"cim-text-field-input-group\" onClick={() => inputRef.current?.focus()}>\n {prefix && (\n <div\n className={clsx(\n 'cim-text-field-affix',\n textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'subtle' }),\n )}\n aria-hidden\n >\n {prefix}\n </div>\n )}\n\n <RACInput\n ref={inputRef}\n className={clsx('cim-text-field-input', textStyle({ variant: 'body' }))}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n />\n\n {isFieldClearable && value !== '' && (\n <XButton\n slot={null}\n UNSAFE_className=\"cim-text-field-clear\"\n aria-label={messages.format('clearValue')}\n onPress={() => setValue('')}\n iconType=\"circled\"\n excludeFromTabOrder\n />\n )}\n\n {suffix && (\n <div\n className={clsx(\n 'cim-text-field-affix',\n textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'subtle' }),\n )}\n aria-hidden\n >\n {suffix}\n </div>\n )}\n </RACGroup>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n {isFieldClearable && (\n <p id={clearDescriptionId} className=\"cim-text-field-clear-description\" hidden>\n {messages.format('clearValueDescription')}\n </p>\n )}\n </>\n )}\n </RACTextField>\n );\n}\n\n/**\n * Allows users to enter a single line of text with a keyboard.\n *\n * See [text field usage guidelines](https://ui.cimpress.io/components/text-field/).\n */\nconst _TextField = withStyleProps(forwardRef(TextField), 'TextField');\n\nexport { _TextField as TextField };\n"]}
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { NavigationProps, StringLikeChildren, WithRequired } from '../types.js';
3
+ export interface UNSTABLE_TopNavProps {
4
+ children: ReactNode;
5
+ }
6
+ export declare function UNSTABLE_TopNav({ children }: UNSTABLE_TopNavProps): import("react/jsx-runtime").JSX.Element;
7
+ export interface UNSTABLE_TopNavItemProps extends WithRequired<NavigationProps, 'href'> {
8
+ children: StringLikeChildren;
9
+ isActive?: boolean;
10
+ }
11
+ export declare function UNSTABLE_TopNavItem({ children, href, isActive, ...props }: UNSTABLE_TopNavItemProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=top-nav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-nav.d.ts","sourceRoot":"","sources":["../../../../src/components/top-nav/top-nav.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGrF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAMjE;AAED,MAAM,WAAW,wBAAyB,SAAQ,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC;IACrF,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,2CAgBnG"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UNSTABLE_TopNav = UNSTABLE_TopNav;
7
+ exports.UNSTABLE_TopNavItem = UNSTABLE_TopNavItem;
8
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
+ const clsx_1 = __importDefault(require("clsx"));
10
+ const react_aria_components_1 = require("react-aria-components");
11
+ const text_js_1 = require("../typography/text.js");
12
+ function UNSTABLE_TopNav({ children }) {
13
+ return ((0, jsx_runtime_1.jsx)("nav", { className: (0, clsx_1.default)('cim-top-nav', 'cim-link-tabs'), children: (0, jsx_runtime_1.jsx)("ul", { className: "cim-tab-list", children: children }) }));
14
+ }
15
+ function UNSTABLE_TopNavItem({ children, href, isActive, ...props }) {
16
+ return ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(react_aria_components_1.Link, { ...props, className: (0, clsx_1.default)('cim-tab-item', 'cim-link-tab-item'), href: href, "aria-current": isActive ? 'page' : undefined, "data-selected": isActive || undefined, children: (0, jsx_runtime_1.jsx)(text_js_1.Text, { as: "span", variant: "medium-semibold", alignment: "center", children: children }) }) }));
17
+ }
18
+ //# sourceMappingURL=top-nav.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-nav.js","sourceRoot":"","sources":["../../../../src/components/top-nav/top-nav.tsx"],"names":[],"mappings":";;;;;AAUA,0CAMC;AAOD,kDAgBC;;AAvCD,gDAAwB;AAExB,iEAAwD;AAExD,mDAA6C;AAM7C,SAAgB,eAAe,CAAC,EAAE,QAAQ,EAAwB;IAChE,OAAO,CACL,gCAAK,SAAS,EAAE,IAAA,cAAI,EAAC,aAAa,EAAE,eAAe,CAAC,YAClD,+BAAI,SAAS,EAAC,cAAc,YAAE,QAAQ,GAAM,GACxC,CACP,CAAC;AACJ,CAAC;AAOD,SAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAA4B;IAClG,OAAO,CACL,yCACE,uBAAC,4BAAO,OACF,KAAK,EACT,SAAS,EAAE,IAAA,cAAI,EAAC,cAAc,EAAE,mBAAmB,CAAC,EACpD,IAAI,EAAE,IAAI,kBACI,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,mBAC5B,QAAQ,IAAI,SAAS,YAEpC,uBAAC,cAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,iBAAiB,EAAC,SAAS,EAAC,QAAQ,YACzD,QAAQ,GACJ,GACC,GACP,CACN,CAAC;AACJ,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { ReactNode } from 'react';\nimport { Link as RACLink } from 'react-aria-components';\nimport type { NavigationProps, StringLikeChildren, WithRequired } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface UNSTABLE_TopNavProps {\n children: ReactNode;\n}\n\nexport function UNSTABLE_TopNav({ children }: UNSTABLE_TopNavProps) {\n return (\n <nav className={clsx('cim-top-nav', 'cim-link-tabs')}>\n <ul className=\"cim-tab-list\">{children}</ul>\n </nav>\n );\n}\n\nexport interface UNSTABLE_TopNavItemProps extends WithRequired<NavigationProps, 'href'> {\n children: StringLikeChildren;\n isActive?: boolean;\n}\n\nexport function UNSTABLE_TopNavItem({ children, href, isActive, ...props }: UNSTABLE_TopNavItemProps) {\n return (\n <li>\n <RACLink\n {...props}\n className={clsx('cim-tab-item', 'cim-link-tab-item')}\n href={href}\n aria-current={isActive ? 'page' : undefined}\n data-selected={isActive || undefined}\n >\n <Text as=\"span\" variant=\"medium-semibold\" alignment=\"center\">\n {children}\n </Text>\n </RACLink>\n </li>\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { focusSafely } from '@react-aria/focus';
2
- import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';
2
+ import type { CSSProperties, HTMLAttributes, ReactNode, RefObject } from 'react';
3
3
  import type { ButtonProps as RACButtonProps, LinkProps as RACLinkProps, PressEvent as RACPressEvent, ValidationResult as RACValidationResult } from 'react-aria-components';
4
4
  import type { ForegroundTone } from '../utils/style/types.js';
5
5
  /** Represents an identifier for a collection item. */
@@ -184,4 +184,9 @@ export interface AffixProps {
184
184
  /** The content displayed at the end of the component. Can be either an icon or a piece of text. */
185
185
  suffix?: ReactNode;
186
186
  }
187
+ /** Props available on components that expose an imperative API. */
188
+ export interface ApiProps<T extends object> {
189
+ /** A React ref that allows access to the imperative API of this component. */
190
+ apiRef?: RefObject<T | null>;
191
+ }
187
192
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EACV,WAAW,IAAI,cAAc,EAC7B,SAAS,IAAI,YAAY,EACzB,UAAU,IAAI,aAAa,EAC3B,gBAAgB,IAAI,mBAAmB,EACxC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,sDAAsD;AACtD,MAAM,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;AAElC,uDAAuD;AACvD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;AAEzC,uDAAuD;AACvD,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAGvE,mEAAmE;AACnE,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAA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C,CAAC;IAClF,CAAC,QAAQ,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACrE;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,qGAAqG;IACrG,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,mGAAmG;IACnG,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,mEAAmE;AACnE,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,MAAM;IACxC,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { focusSafely } from '@react-aria/focus';\nimport type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\nimport type {\n ButtonProps as RACButtonProps,\n LinkProps as RACLinkProps,\n PressEvent as RACPressEvent,\n ValidationResult as RACValidationResult,\n} from 'react-aria-components';\nimport type { ForegroundTone } from '../utils/style/types.js';\n\n/** Represents an identifier for a collection item. */\nexport type Key = string | number;\n\n/** Represents a selection of items in a collection. */\nexport type Selection = 'all' | Set<Key>;\n\n/** Represents a direction (vertical or horizontal). */\nexport type Direction = 'vertical' | 'horizontal';\n\n/**\n * Use this type when you want to restrict `children` to a string,\n * but also want to allow expressions that resolve to strings.\n */\nexport type StringLikeChildren = string | number | (string | number)[];\n\n// `FocusableElement` is not exported from any React Aria package\n/** Any focusable element, including both HTML and SVG elements. */\nexport type FocusableElement = Parameters<typeof focusSafely>[0];\n\n/**\n * A set of common props that are allowed on every component\n */\nexport interface CommonProps {\n /**\n * The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).\n */\n id?: string;\n /**\n * Use this attribute to \"claim\" the component tree for exclusive Cimpress UI usage.\n */\n 'data-cim-style-root'?: boolean;\n /**\n * Sets the CSS className for the element. Only use as a **last resort**. Use style props instead.\n *\n * See [styling guide](https://ui.cimpress.io/dev-guides/styling/).\n */\n UNSAFE_className?: string;\n /**\n * Sets the CSS style for the element. Only use as a **last resort**. Use style props instead.\n *\n * See [styling guide](https://ui.cimpress.io/dev-guides/styling/).\n */\n UNSAFE_style?: CSSProperties;\n}\n\n/**\n * An event fired when a component is pressed.\n *\n * By default, press events stop propagation to parent elements.\n * In cases where a handler decides not to handle a specific event,\n * it can call `continuePropagation()` to allow a parent to handle it.\n */\nexport type PressEvent = RACPressEvent;\n\n// HoverEvent is not exported from react-aria-components\n/** An event fired when a component is hovered. */\nexport type HoverEvent = Parameters<NonNullable<RACButtonProps['onHoverStart']>>[0];\n\n/**\n * Props for components that require a label, which can be hidden if necessary.\n */\nexport interface LabellableProps extends AriaLabelingProps {\n /** The content to display as the label. */\n label?: string;\n}\n\n// Copied from AriaLabelingProps from @react-types/shared\nexport interface AriaLabelingProps {\n /**\n * Defines a string value that labels the current element.\n */\n 'aria-label'?: string;\n\n /**\n * Identifies the element (or elements) that labels the current element.\n */\n 'aria-labelledby'?: string;\n\n /**\n * Identifies the element (or elements) that describes the object.\n */\n 'aria-describedby'?: string;\n\n /**\n * Identifies the element (or elements) that provide a detailed, extended description for the object.\n */\n 'aria-details'?: string;\n}\n\n/** Provides details about the validation state of a form field. */\nexport type ValidationResult = RACValidationResult;\n\n/** Represents the error message(s) for a form field. */\nexport type FieldError =\n | string\n | string[]\n | undefined\n | ((validation: ValidationResult) => string | string[] | undefined);\n\n/** Props available on form field components. */\nexport interface FieldProps<T> extends LabellableProps {\n /**\n * The `<form>` element to associate the input with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form).\n */\n form?: string;\n /**\n * The name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name).\n */\n name?: string;\n /** A description for the field. Provides a hint such as specific requirements for what to choose. */\n description?: string;\n /** An error message for the field. */\n error?: FieldError;\n /**\n * A function that returns an error message (or `true`) if a given value is invalid.\n * Validation errors are displayed to the user when the form is submitted.\n * For real-time validation, use the `error` prop instead.\n */\n validate?: (value: T) => string | string[] | true | undefined;\n}\n\n/** Props available on form field components with text inputs. */\nexport interface FieldWithPlaceholderProps<T> extends FieldProps<T> {\n /** The placeholder text displayed in the input field. */\n placeholder?: string;\n}\n\n/** Changes specified optional properties within the provided type to be required. */\nexport type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };\n\n/**\n * This interface allows configuring navigation props with router options and type-safe URLs via TypeScript module augmentation.\n * By default, this is an empty interface. Extend with `href` and `routerOptions` properties to configure your router.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface RouterConfig {}\n\n/**\n * Represents a URL for navigation components.\n * This type can be configured by augmenting `RouterConfig` with an `href` property.\n */\nexport type Href = RouterConfig extends { href: infer H } ? H : string;\n\n/**\n * Represents router options for navigation components.\n * This type can be configured by augmenting `RouterConfig` with a `routerOptions` property.\n */\nexport type RouterOptions = RouterConfig extends { routerOptions: infer O } ? O : never;\n\n/**\n * Props available on components that perform navigation.\n */\nexport interface NavigationProps\n extends Pick<RACLinkProps, 'hrefLang' | 'target' | 'rel' | 'download' | 'ping' | 'referrerPolicy'> {\n /** A URL to link to. */\n href?: Href;\n /** Options for the configured client side router. */\n routerOptions?: RouterOptions;\n}\n\n/** Represents a minimal data shape of a dynamic item in collection components. */\nexport interface CollectionItem {\n /** Unique identifier for the item or group. */\n id: Key;\n}\n\n/** Props available on components that render collections. */\nexport interface CollectionProps<T extends CollectionItem> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode);\n /** The items to display in the collection. */\n items?: Iterable<T>;\n}\n\n/** Props available on components that support asynchronous loading of items. */\nexport interface AsyncItemLoadingProps {\n /** Whether items are currently being loaded. */\n UNSTABLE_isLoading?: boolean;\n /** A callback function that is called when more items should be loaded. */\n UNSTABLE_onLoadMore?: () => void;\n}\n\n/** Props available on icons. */\nexport interface IconProps extends CommonProps, Pick<AriaLabelingProps, 'aria-label' | 'aria-labelledby'> {\n /**\n * Whether the icon is hidden from assistive technologies.\n * @default true\n */\n 'aria-hidden'?: boolean;\n /** The size of the icon in pixels. */\n size?: 16 | 24 | 32;\n /** The tone of the icon. */\n tone?: ForegroundTone;\n}\n\n/** Props available on native HTML elements. */\nexport interface NativeElementProps<T extends HTMLElement> extends HTMLAttributes<T> {\n [dataProp: `data-${string}`]: string | number | boolean | undefined;\n}\n\n/**\n * Props available on components that support affixes.\n */\nexport interface AffixProps {\n /** The content displayed at the start of the component. Can be either an icon or a piece of text. */\n prefix?: ReactNode;\n /** The content displayed at the end of the component. Can be either an icon or a piece of text. */\n suffix?: ReactNode;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { focusSafely } from '@react-aria/focus';\nimport type { CSSProperties, HTMLAttributes, ReactNode, RefObject } from 'react';\nimport type {\n ButtonProps as RACButtonProps,\n LinkProps as RACLinkProps,\n PressEvent as RACPressEvent,\n ValidationResult as RACValidationResult,\n} from 'react-aria-components';\nimport type { ForegroundTone } from '../utils/style/types.js';\n\n/** Represents an identifier for a collection item. */\nexport type Key = string | number;\n\n/** Represents a selection of items in a collection. */\nexport type Selection = 'all' | Set<Key>;\n\n/** Represents a direction (vertical or horizontal). */\nexport type Direction = 'vertical' | 'horizontal';\n\n/**\n * Use this type when you want to restrict `children` to a string,\n * but also want to allow expressions that resolve to strings.\n */\nexport type StringLikeChildren = string | number | (string | number)[];\n\n// `FocusableElement` is not exported from any React Aria package\n/** Any focusable element, including both HTML and SVG elements. */\nexport type FocusableElement = Parameters<typeof focusSafely>[0];\n\n/**\n * A set of common props that are allowed on every component\n */\nexport interface CommonProps {\n /**\n * The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).\n */\n id?: string;\n /**\n * Use this attribute to \"claim\" the component tree for exclusive Cimpress UI usage.\n */\n 'data-cim-style-root'?: boolean;\n /**\n * Sets the CSS className for the element. Only use as a **last resort**. Use style props instead.\n *\n * See [styling guide](https://ui.cimpress.io/dev-guides/styling/).\n */\n UNSAFE_className?: string;\n /**\n * Sets the CSS style for the element. Only use as a **last resort**. Use style props instead.\n *\n * See [styling guide](https://ui.cimpress.io/dev-guides/styling/).\n */\n UNSAFE_style?: CSSProperties;\n}\n\n/**\n * An event fired when a component is pressed.\n *\n * By default, press events stop propagation to parent elements.\n * In cases where a handler decides not to handle a specific event,\n * it can call `continuePropagation()` to allow a parent to handle it.\n */\nexport type PressEvent = RACPressEvent;\n\n// HoverEvent is not exported from react-aria-components\n/** An event fired when a component is hovered. */\nexport type HoverEvent = Parameters<NonNullable<RACButtonProps['onHoverStart']>>[0];\n\n/**\n * Props for components that require a label, which can be hidden if necessary.\n */\nexport interface LabellableProps extends AriaLabelingProps {\n /** The content to display as the label. */\n label?: string;\n}\n\n// Copied from AriaLabelingProps from @react-types/shared\nexport interface AriaLabelingProps {\n /**\n * Defines a string value that labels the current element.\n */\n 'aria-label'?: string;\n\n /**\n * Identifies the element (or elements) that labels the current element.\n */\n 'aria-labelledby'?: string;\n\n /**\n * Identifies the element (or elements) that describes the object.\n */\n 'aria-describedby'?: string;\n\n /**\n * Identifies the element (or elements) that provide a detailed, extended description for the object.\n */\n 'aria-details'?: string;\n}\n\n/** Provides details about the validation state of a form field. */\nexport type ValidationResult = RACValidationResult;\n\n/** Represents the error message(s) for a form field. */\nexport type FieldError =\n | string\n | string[]\n | undefined\n | ((validation: ValidationResult) => string | string[] | undefined);\n\n/** Props available on form field components. */\nexport interface FieldProps<T> extends LabellableProps {\n /**\n * The `<form>` element to associate the input with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form).\n */\n form?: string;\n /**\n * The name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name).\n */\n name?: string;\n /** A description for the field. Provides a hint such as specific requirements for what to choose. */\n description?: string;\n /** An error message for the field. */\n error?: FieldError;\n /**\n * A function that returns an error message (or `true`) if a given value is invalid.\n * Validation errors are displayed to the user when the form is submitted.\n * For real-time validation, use the `error` prop instead.\n */\n validate?: (value: T) => string | string[] | true | undefined;\n}\n\n/** Props available on form field components with text inputs. */\nexport interface FieldWithPlaceholderProps<T> extends FieldProps<T> {\n /** The placeholder text displayed in the input field. */\n placeholder?: string;\n}\n\n/** Changes specified optional properties within the provided type to be required. */\nexport type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };\n\n/**\n * This interface allows configuring navigation props with router options and type-safe URLs via TypeScript module augmentation.\n * By default, this is an empty interface. Extend with `href` and `routerOptions` properties to configure your router.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface RouterConfig {}\n\n/**\n * Represents a URL for navigation components.\n * This type can be configured by augmenting `RouterConfig` with an `href` property.\n */\nexport type Href = RouterConfig extends { href: infer H } ? H : string;\n\n/**\n * Represents router options for navigation components.\n * This type can be configured by augmenting `RouterConfig` with a `routerOptions` property.\n */\nexport type RouterOptions = RouterConfig extends { routerOptions: infer O } ? O : never;\n\n/**\n * Props available on components that perform navigation.\n */\nexport interface NavigationProps\n extends Pick<RACLinkProps, 'hrefLang' | 'target' | 'rel' | 'download' | 'ping' | 'referrerPolicy'> {\n /** A URL to link to. */\n href?: Href;\n /** Options for the configured client side router. */\n routerOptions?: RouterOptions;\n}\n\n/** Represents a minimal data shape of a dynamic item in collection components. */\nexport interface CollectionItem {\n /** Unique identifier for the item or group. */\n id: Key;\n}\n\n/** Props available on components that render collections. */\nexport interface CollectionProps<T extends CollectionItem> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode);\n /** The items to display in the collection. */\n items?: Iterable<T>;\n}\n\n/** Props available on components that support asynchronous loading of items. */\nexport interface AsyncItemLoadingProps {\n /** Whether items are currently being loaded. */\n UNSTABLE_isLoading?: boolean;\n /** A callback function that is called when more items should be loaded. */\n UNSTABLE_onLoadMore?: () => void;\n}\n\n/** Props available on icons. */\nexport interface IconProps extends CommonProps, Pick<AriaLabelingProps, 'aria-label' | 'aria-labelledby'> {\n /**\n * Whether the icon is hidden from assistive technologies.\n * @default true\n */\n 'aria-hidden'?: boolean;\n /** The size of the icon in pixels. */\n size?: 16 | 24 | 32;\n /** The tone of the icon. */\n tone?: ForegroundTone;\n}\n\n/** Props available on native HTML elements. */\nexport interface NativeElementProps<T extends HTMLElement> extends HTMLAttributes<T> {\n [dataProp: `data-${string}`]: string | number | boolean | undefined;\n}\n\n/**\n * Props available on components that support affixes.\n */\nexport interface AffixProps {\n /** The content displayed at the start of the component. Can be either an icon or a piece of text. */\n prefix?: ReactNode;\n /** The content displayed at the end of the component. Can be either an icon or a piece of text. */\n suffix?: ReactNode;\n}\n\n/** Props available on components that expose an imperative API. */\nexport interface ApiProps<T extends object> {\n /** A React ref that allows access to the imperative API of this component. */\n apiRef?: RefObject<T | null>;\n}\n"]}
@@ -81,4 +81,7 @@ export * from './components/app-shell/app-shell.js';
81
81
  export * from './components/app-header/side-nav.js';
82
82
  export * from './components/hidden/hidden.js';
83
83
  export * from './components/app-header/nav-button.js';
84
+ export * from './components/copy/copy-button.js';
85
+ export * from './components/copy/inline-copy.js';
86
+ export * from './components/top-nav/top-nav.js';
84
87
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;A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B,EAAE,MAAM,6BAA6B,CAAC;AACzE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC"}
@@ -91,4 +91,7 @@ __exportStar(require("./components/app-shell/app-shell.js"), exports);
91
91
  __exportStar(require("./components/app-header/side-nav.js"), exports);
92
92
  __exportStar(require("./components/hidden/hidden.js"), exports);
93
93
  __exportStar(require("./components/app-header/nav-button.js"), exports);
94
+ __exportStar(require("./components/copy/copy-button.js"), exports);
95
+ __exportStar(require("./components/copy/inline-copy.js"), exports);
96
+ __exportStar(require("./components/top-nav/top-nav.js"), exports);
94
97
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,wEAAsD;AACtD,8EAA4D;AAC5D,8DAA4C;AAC5C,gEAA8C;AAC9C,qEAAmD;AACnD,qEAAmD;AACnD,0EAAwD;AACxD,kEAAgD;AAChD,4DAA0C;AAC1C,oEAAkD;AAClD,0EAAwD;AACxD,sEAAoD;AACpD,0EAAwD;AACxD,0EAAwD;AACxD,wEAAsD;AACtD,8EAA4D;AAE5D,kEAAgD;AAChD,gEAA8C;AAC9C,4DAA0C;AAC1C,sEAAoD;AACpD,4DAA0C;AAC1C,4EAA0D;AAC1D,4EAA0D;AAC1D,wEAAsD;AACtD,8DAA4C;AAC5C,oEAAkD;AAClD,gEAA8C;AAC9C,kEAAgD;AAChD,2EAAyD;AACzD,yEAAuD;AACvD,wEAAsD;AACtD,0EAAwD;AACxD,kEAAgD;AAChD,kEAAgD;AAChD,wEAAsD;AACtD,8DAA4C;AAC5C,qEAAmD;AACnD,yEAAuD;AACvD,0EAAwD;AACxD,mEAAiD;AACjD,uEAAqD;AACrD,wEAAsD;AACtD,2EAAyD;AACzD,gFAA8D;AAC9D,0EAAwD;AAGxD,4DAA0C;AAC1C,0DAAwC;AACxC,gEAA8C;AAC9C,sEAAoD;AACpD,8EAA4D;AAC5D,mFAAiE;AACjE,oFAAkE;AAClE,+DAA6C;AAE7C,kEAAgD;AAChD,sEAAoD;AAEpD,kEAAgD;AAChD,kEAAgD;AAoBhD,kEAAgD;AAChD,wEAAsD;AAEtD,6EAA2D;AAE3D,2BAA2B;AAC3B,kFAAgE;AAChE,0EAAwD;AACxD,sEAAoD;AACpD,gEAA8C;AAC9C,qEAAmD;AACnD,oEAAkG;AAAzF,qHAAA,mBAAmB,OAAA;AAE5B,4EAA0D;AAC1D,kEAAgD;AAChD,uEAAqD;AAErD,sEAAoD;AACpD,sEAAoD;AACpD,gEAA8C;AAC9C,wEAAsD","sourcesContent":["export * from './components/alert/alert.js';\nexport * from './components/app-header/app-header.js';\nexport * from './components/app-header/simple-auth-tool.js';\nexport * from './components/badge/badge.js';\nexport * from './components/button/button.js';\nexport * from './components/button/link-button.js';\nexport * from './components/button/icon-button.js';\nexport * from './components/button/icon-link-button.js';\nexport * from './components/callout/callout.js';\nexport * from './components/card/card.js';\nexport * from './components/checkbox/checkbox.js';\nexport * from './components/checkbox/checkbox-group.js';\nexport * from './components/combo-box/combo-box.js';\nexport * from './components/date-picker/date-picker.js';\nexport * from './components/dialog-root/dialog-root.js';\nexport * from './components/disclosure/disclosure.js';\nexport * from './components/disclosure/disclosure-group.js';\nexport type { DisclosureSize, DisclosureVariant } from './components/disclosure/context.js';\nexport * from './components/divider/divider.js';\nexport * from './components/drawer/drawer.js';\nexport * from './components/form/form.js';\nexport * from './components/link-tabs/link-tabs.js';\nexport * from './components/menu/menu.js';\nexport * from './components/modal-dialog/modal-dialog.js';\nexport * from './components/number-field/number-field.js';\nexport * from './components/pagination/pagination.js';\nexport * from './components/radio/radio.js';\nexport * from './components/radio/radio-group.js';\nexport * from './components/select/select.js';\nexport * from './components/spinner/spinner.js';\nexport * from './components/text-inputs/search-field.js';\nexport * from './components/text-inputs/text-field.js';\nexport * from './components/text-inputs/text-area.js';\nexport * from './components/breadcrumbs/breadcrumbs.js';\nexport * from './components/tooltip/tooltip.js';\nexport * from './components/popover/popover.js';\nexport * from './components/table/table-container.js';\nexport * from './components/table/table.js';\nexport * from './components/table/table-header.js';\nexport * from './components/table/table-header-row.js';\nexport * from './components/table/table-header-cell.js';\nexport * from './components/table/table-body.js';\nexport * from './components/table/table-body-row.js';\nexport * from './components/table/table-body-cell.js';\nexport * from './components/table/table-row-selector.js';\nexport * from './components/table/table-all-rows-selector.js';\nexport * from './components/table/table-empty-state.js';\nexport type { RowSelectionMode as TableRowSelectionMode } from './components/table/contexts/table-state.js';\nexport type { ColumnContentAlignment as TableColumnContentAlignment } from './components/table/contexts/column-collection.js';\nexport * from './components/tabs/tabs.js';\nexport * from './components/tag/tag.js';\nexport * from './components/tag/tag-group.js';\nexport * from './components/tag-field/tag-field.js';\nexport * from './components/toggle-button/toggle-button.js';\nexport * from './components/toggle-button/toggle-icon-button.js';\nexport * from './components/toggle-button/toggle-button-group.js';\nexport * from './components/file-trigger.js';\n\nexport * from './components/spacing/box/box.js';\nexport * from './components/spacing/stack/stack.js';\n\nexport * from './components/typography/text.js';\nexport * from './components/typography/link.js';\n\nexport type { ForegroundTone } from './utils/style/types.js';\n\nexport type {\n CollectionItem,\n Direction,\n FieldError,\n HoverEvent,\n Key,\n Selection,\n PressEvent,\n RouterConfig,\n Href,\n RouterOptions,\n ValidationResult,\n} from './components/types.js';\nexport type { Spacing, Responsive } from './components/spacing/types.js';\nexport type { StyleProps } from './with-style-props.js';\n\nexport * from './providers/ssr/ssr-provider.js';\nexport * from './providers/router/router-provider.js';\n\nexport * from './components/internal/x-button/x-button.js';\n\n// Unfinished exports below\nexport * from './components/visually-hidden/visually-hidden.js';\nexport * from './components/file-picker/file-picker.js';\nexport * from './components/container/container.js';\nexport * from './components/toggle/toggle.js';\nexport * from './components/toast/toast-region.js';\nexport { UNSTABLE_toastQueue, type UNSTABLE_ToastQueue } from './components/toast/toast-queue.js';\nexport type { UNSTABLE_ToastOptions } from './components/toast/types.js';\nexport * from './components/alert-dialog/alert-dialog.js';\nexport * from './components/stepper/stepper.js';\nexport * from './components/stepper/stepper-item.js';\nexport type { StepperStatus } from './components/stepper/types.js';\nexport * from './components/app-shell/app-shell.js';\nexport * from './components/app-header/side-nav.js';\nexport * from './components/hidden/hidden.js';\nexport * from './components/app-header/nav-button.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,wEAAsD;AACtD,8EAA4D;AAC5D,8DAA4C;AAC5C,gEAA8C;AAC9C,qEAAmD;AACnD,qEAAmD;AACnD,0EAAwD;AACxD,kEAAgD;AAChD,4DAA0C;AAC1C,oEAAkD;AAClD,0EAAwD;AACxD,sEAAoD;AACpD,0EAAwD;AACxD,0EAAwD;AACxD,wEAAsD;AACtD,8EAA4D;AAE5D,kEAAgD;AAChD,gEAA8C;AAC9C,4DAA0C;AAC1C,sEAAoD;AACpD,4DAA0C;AAC1C,4EAA0D;AAC1D,4EAA0D;AAC1D,wEAAsD;AACtD,8DAA4C;AAC5C,oEAAkD;AAClD,gEAA8C;AAC9C,kEAAgD;AAChD,2EAAyD;AACzD,yEAAuD;AACvD,wEAAsD;AACtD,0EAAwD;AACxD,kEAAgD;AAChD,kEAAgD;AAChD,wEAAsD;AACtD,8DAA4C;AAC5C,qEAAmD;AACnD,yEAAuD;AACvD,0EAAwD;AACxD,mEAAiD;AACjD,uEAAqD;AACrD,wEAAsD;AACtD,2EAAyD;AACzD,gFAA8D;AAC9D,0EAAwD;AAGxD,4DAA0C;AAC1C,0DAAwC;AACxC,gEAA8C;AAC9C,sEAAoD;AACpD,8EAA4D;AAC5D,mFAAiE;AACjE,oFAAkE;AAClE,+DAA6C;AAE7C,kEAAgD;AAChD,sEAAoD;AAEpD,kEAAgD;AAChD,kEAAgD;AAoBhD,kEAAgD;AAChD,wEAAsD;AAEtD,6EAA2D;AAE3D,2BAA2B;AAC3B,kFAAgE;AAChE,0EAAwD;AACxD,sEAAoD;AACpD,gEAA8C;AAC9C,qEAAmD;AACnD,oEAAkG;AAAzF,qHAAA,mBAAmB,OAAA;AAE5B,4EAA0D;AAC1D,kEAAgD;AAChD,uEAAqD;AAErD,sEAAoD;AACpD,sEAAoD;AACpD,gEAA8C;AAC9C,wEAAsD;AACtD,mEAAiD;AACjD,mEAAiD;AACjD,kEAAgD","sourcesContent":["export * from './components/alert/alert.js';\nexport * from './components/app-header/app-header.js';\nexport * from './components/app-header/simple-auth-tool.js';\nexport * from './components/badge/badge.js';\nexport * from './components/button/button.js';\nexport * from './components/button/link-button.js';\nexport * from './components/button/icon-button.js';\nexport * from './components/button/icon-link-button.js';\nexport * from './components/callout/callout.js';\nexport * from './components/card/card.js';\nexport * from './components/checkbox/checkbox.js';\nexport * from './components/checkbox/checkbox-group.js';\nexport * from './components/combo-box/combo-box.js';\nexport * from './components/date-picker/date-picker.js';\nexport * from './components/dialog-root/dialog-root.js';\nexport * from './components/disclosure/disclosure.js';\nexport * from './components/disclosure/disclosure-group.js';\nexport type { DisclosureSize, DisclosureVariant } from './components/disclosure/context.js';\nexport * from './components/divider/divider.js';\nexport * from './components/drawer/drawer.js';\nexport * from './components/form/form.js';\nexport * from './components/link-tabs/link-tabs.js';\nexport * from './components/menu/menu.js';\nexport * from './components/modal-dialog/modal-dialog.js';\nexport * from './components/number-field/number-field.js';\nexport * from './components/pagination/pagination.js';\nexport * from './components/radio/radio.js';\nexport * from './components/radio/radio-group.js';\nexport * from './components/select/select.js';\nexport * from './components/spinner/spinner.js';\nexport * from './components/text-inputs/search-field.js';\nexport * from './components/text-inputs/text-field.js';\nexport * from './components/text-inputs/text-area.js';\nexport * from './components/breadcrumbs/breadcrumbs.js';\nexport * from './components/tooltip/tooltip.js';\nexport * from './components/popover/popover.js';\nexport * from './components/table/table-container.js';\nexport * from './components/table/table.js';\nexport * from './components/table/table-header.js';\nexport * from './components/table/table-header-row.js';\nexport * from './components/table/table-header-cell.js';\nexport * from './components/table/table-body.js';\nexport * from './components/table/table-body-row.js';\nexport * from './components/table/table-body-cell.js';\nexport * from './components/table/table-row-selector.js';\nexport * from './components/table/table-all-rows-selector.js';\nexport * from './components/table/table-empty-state.js';\nexport type { RowSelectionMode as TableRowSelectionMode } from './components/table/contexts/table-state.js';\nexport type { ColumnContentAlignment as TableColumnContentAlignment } from './components/table/contexts/column-collection.js';\nexport * from './components/tabs/tabs.js';\nexport * from './components/tag/tag.js';\nexport * from './components/tag/tag-group.js';\nexport * from './components/tag-field/tag-field.js';\nexport * from './components/toggle-button/toggle-button.js';\nexport * from './components/toggle-button/toggle-icon-button.js';\nexport * from './components/toggle-button/toggle-button-group.js';\nexport * from './components/file-trigger.js';\n\nexport * from './components/spacing/box/box.js';\nexport * from './components/spacing/stack/stack.js';\n\nexport * from './components/typography/text.js';\nexport * from './components/typography/link.js';\n\nexport type { ForegroundTone } from './utils/style/types.js';\n\nexport type {\n CollectionItem,\n Direction,\n FieldError,\n HoverEvent,\n Key,\n Selection,\n PressEvent,\n RouterConfig,\n Href,\n RouterOptions,\n ValidationResult,\n} from './components/types.js';\nexport type { Spacing, Responsive } from './components/spacing/types.js';\nexport type { StyleProps } from './with-style-props.js';\n\nexport * from './providers/ssr/ssr-provider.js';\nexport * from './providers/router/router-provider.js';\n\nexport * from './components/internal/x-button/x-button.js';\n\n// Unfinished exports below\nexport * from './components/visually-hidden/visually-hidden.js';\nexport * from './components/file-picker/file-picker.js';\nexport * from './components/container/container.js';\nexport * from './components/toggle/toggle.js';\nexport * from './components/toast/toast-region.js';\nexport { UNSTABLE_toastQueue, type UNSTABLE_ToastQueue } from './components/toast/toast-queue.js';\nexport type { UNSTABLE_ToastOptions } from './components/toast/types.js';\nexport * from './components/alert-dialog/alert-dialog.js';\nexport * from './components/stepper/stepper.js';\nexport * from './components/stepper/stepper-item.js';\nexport type { StepperStatus } from './components/stepper/types.js';\nexport * from './components/app-shell/app-shell.js';\nexport * from './components/app-header/side-nav.js';\nexport * from './components/hidden/hidden.js';\nexport * from './components/app-header/nav-button.js';\nexport * from './components/copy/copy-button.js';\nexport * from './components/copy/inline-copy.js';\nexport * from './components/top-nav/top-nav.js';\n"]}
@@ -0,0 +1,3 @@
1
+ import type { StringLikeChildren } from '../components/types.js';
2
+ export declare function stringLikeChildrenToString(children: StringLikeChildren): string;
3
+ //# sourceMappingURL=string-like-children-to-string.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-like-children-to-string.d.ts","sourceRoot":"","sources":["../../../src/utils/string-like-children-to-string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAE/E"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stringLikeChildrenToString = stringLikeChildrenToString;
4
+ function stringLikeChildrenToString(children) {
5
+ return typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');
6
+ }
7
+ //# sourceMappingURL=string-like-children-to-string.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-like-children-to-string.js","sourceRoot":"","sources":["../../../src/utils/string-like-children-to-string.ts"],"names":[],"mappings":";;AAEA,gEAEC;AAFD,SAAgB,0BAA0B,CAAC,QAA4B;IACrE,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvH,CAAC","sourcesContent":["import type { StringLikeChildren } from '../components/types.js';\n\nexport function stringLikeChildrenToString(children: StringLikeChildren): string {\n return typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { Href } from '../types.js';
2
+ import type { Href, StringLikeChildren } from '../types.js';
3
3
  export interface UNSTABLE_SideNavProps {
4
4
  children: ReactNode;
5
5
  isOpen?: boolean;
@@ -18,17 +18,16 @@ export interface UNSTABLE_SideNavListProps {
18
18
  children: ReactNode;
19
19
  }
20
20
  export declare function UNSTABLE_SideNavList({ children }: UNSTABLE_SideNavListProps): import("react/jsx-runtime").JSX.Element;
21
- interface UNSTABLE_SideNavListItem {
22
- label: string;
21
+ export interface UNSTABLE_SideNavListItemProps {
22
+ children: StringLikeChildren;
23
23
  href: Href;
24
24
  isActive?: boolean;
25
25
  icon?: ReactNode;
26
26
  }
27
- export declare function UNSTABLE_SideNavListItem({ label, href, isActive, icon }: UNSTABLE_SideNavListItem): import("react/jsx-runtime").JSX.Element;
27
+ export declare function UNSTABLE_SideNavListItem({ children, href, isActive, icon }: UNSTABLE_SideNavListItemProps): import("react/jsx-runtime").JSX.Element;
28
28
  export interface UNSTABLE_SideNavListSectionProps {
29
29
  children: ReactNode;
30
30
  label?: string;
31
31
  }
32
32
  export declare function UNSTABLE_SideNavListSection({ children, label }: UNSTABLE_SideNavListSectionProps): import("react/jsx-runtime").JSX.Element;
33
- export {};
34
33
  //# sourceMappingURL=side-nav.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"side-nav.d.ts","sourceRoot":"","sources":["../../../../src/components/app-header/side-nav.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQlE,OAAO,KAAK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M,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC/B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,OAAiB,EAAE,EAAE,qBAAqB,2CA6B5G;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,EAAE,yBAAyB,2CAE3E;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,6BAA6B,2CAazG;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,gCAAgC,2CAehG"}
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { createContext, useContext } from 'react';
4
4
  import { Link as RACLink } from 'react-aria-components';
5
5
  import { UNSTABLE_IconExpand } from '../../icons/index.js';
6
+ import { stringLikeChildrenToString } from '../../utils/string-like-children-to-string.js';
6
7
  import { useIsMobile } from '../../utils/use-is-mobile.js';
7
8
  import { IconButton } from '../button/icon-button.js';
8
9
  import { Drawer, DrawerBody } from '../drawer/drawer.js';
@@ -18,9 +19,9 @@ export function UNSTABLE_SideNav({ children, isOpen, onOpenChange, variant = 'fi
18
19
  export function UNSTABLE_SideNavList({ children }) {
19
20
  return _jsx("div", { className: "cim-side-nav-list", children: children });
20
21
  }
21
- export function UNSTABLE_SideNavListItem({ label, href, isActive, icon }) {
22
+ export function UNSTABLE_SideNavListItem({ children, href, isActive, icon }) {
22
23
  const { isOpen } = useContext(SideNavContext);
23
- return (_jsx(Tooltip, { label: label, placement: "right", isDisabled: isOpen, children: _jsxs(RACLink, { href: href, className: "cim-side-nav-list-item", "data-active": isActive, "data-expanded": isOpen, children: [icon, _jsx(Text, { as: "span", variant: "medium", UNSAFE_className: "cim-side-nav-list-item-label", children: label })] }) }));
24
+ return (_jsx(Tooltip, { label: stringLikeChildrenToString(children), placement: "right", isDisabled: isOpen, children: _jsxs(RACLink, { href: href, className: "cim-side-nav-list-item", "data-active": isActive, "data-expanded": isOpen, children: [icon, _jsx(Text, { as: "span", variant: "medium", UNSAFE_className: "cim-side-nav-list-item-label", children: children })] }) }));
24
25
  }
25
26
  export function UNSTABLE_SideNavListSection({ children, label }) {
26
27
  const { isOpen } = useContext(SideNavContext);
@@ -1 +1 @@
1
- {"version":3,"file":"side-nav.js","sourceRoot":"","sources":["../../../../src/components/app-header/side-nav.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OA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AAE,QAAQ,EAA6B;IAC1E,OAAO,cAAK,SAAS,EAAC,mBAAmB,YAAE,QAAQ,GAAO,CAAC;AAC7D,CAAC;AASD,MAAM,UAAU,wBAAwB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAA4B;IAChG,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE9C,OAAO,CACL,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAC,OAAO,EAAC,UAAU,EAAE,MAAM,YACzD,MAAC,OAAO,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,wBAAwB,iBAAc,QAAQ,mBAAiB,MAAM,aACjG,IAAI,EACL,KAAC,IAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,EAAC,gBAAgB,EAAC,8BAA8B,YAC7E,KAAK,GACD,IACC,GACF,CACX,CAAC;AACJ,CAAC;AAOD,MAAM,UAAU,2BAA2B,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAoC;IAC/F,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE9C,OAAO,CACL,eAAK,SAAS,EAAC,2BAA2B,mBAAgB,MAAM,aAC7D,KAAK,IAAI,CACR,cAAK,SAAS,EAAC,kCAAkC,YAC/C,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,EAAC,OAAO,EAAC,gBAAgB,EAAC,IAAI,EAAC,QAAQ,EAAC,gBAAgB,EAAC,wCAAwC,YAC1G,KAAK,GACD,GACH,CACP,EACA,QAAQ,IACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport { createContext, useContext, type ReactNode } from 'react';\nimport { Link as RACLink } from 'react-aria-components';\nimport { UNSTABLE_IconExpand } from '../../icons/index.js';\nimport { useIsMobile } from '../../utils/use-is-mobile.js';\nimport { IconButton } from '../button/icon-button.js';\nimport { Drawer, DrawerBody } from '../drawer/drawer.js';\nimport { UNSTABLE_Hidden } from '../hidden/hidden.js';\nimport { Tooltip } from '../tooltip/tooltip.js';\nimport type { Href } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nconst SideNavContext = createContext<{ isOpen: boolean }>({ isOpen: false });\n\nexport interface UNSTABLE_SideNavProps {\n children: ReactNode;\n isOpen?: boolean;\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * Determines how the side nav is displayed and behaves.\n * - `overlay`: The side nav slides in as an overlay on top of the main content. This is used when all available screen space is needed for the main content.\n * - `fixed`: The side nav is fixed to the side and includes an expand button to toggle between a compact icon-only view and an expanded view showing labels. On smaller screens, it slides in as an overlay.\n *\n * @default 'fixed'\n */\n variant?: 'overlay' | 'fixed';\n}\n\nexport function UNSTABLE_SideNav({ children, isOpen, onOpenChange, variant = 'fixed' }: UNSTABLE_SideNavProps) {\n const isMobile = useIsMobile();\n\n const drawer = (isMobile || variant === 'overlay') && (\n <Drawer UNSTABLE_placement=\"start\" isOpen={isOpen} onOpenChange={onOpenChange} aria-label=\"Side navigation\">\n <DrawerBody>{children}</DrawerBody>\n </Drawer>\n );\n\n return (\n <SideNavContext.Provider value={{ isOpen: isOpen ?? false }}>\n {drawer}\n {variant === 'fixed' && (\n <UNSTABLE_Hidden hide={{ sm: true, md: false }}>\n <div className=\"cim-side-nav\" data-expanded={isOpen}>\n <div className=\"cim-side-nav-header\">\n <IconButton\n variant=\"tertiary\"\n icon={<UNSTABLE_IconExpand UNSAFE_style={isOpen ? { transform: 'rotate(180deg)' } : {}} />}\n aria-label=\"Expand sidebar\"\n onPress={() => onOpenChange?.(!isOpen)}\n />\n </div>\n <div className=\"cim-side-nav-list-container\">{children}</div>\n </div>\n </UNSTABLE_Hidden>\n )}\n </SideNavContext.Provider>\n );\n}\n\nexport interface UNSTABLE_SideNavListProps {\n children: ReactNode;\n}\n\nexport function UNSTABLE_SideNavList({ children }: UNSTABLE_SideNavListProps) {\n return <div className=\"cim-side-nav-list\">{children}</div>;\n}\n\ninterface UNSTABLE_SideNavListItem {\n label: string;\n href: Href;\n isActive?: boolean;\n icon?: ReactNode;\n}\n\nexport function UNSTABLE_SideNavListItem({ label, href, isActive, icon }: UNSTABLE_SideNavListItem) {\n const { isOpen } = useContext(SideNavContext);\n\n return (\n <Tooltip label={label} placement=\"right\" isDisabled={isOpen}>\n <RACLink href={href} className=\"cim-side-nav-list-item\" data-active={isActive} data-expanded={isOpen}>\n {icon}\n <Text as=\"span\" variant=\"medium\" UNSAFE_className=\"cim-side-nav-list-item-label\">\n {label}\n </Text>\n </RACLink>\n </Tooltip>\n );\n}\n\nexport interface UNSTABLE_SideNavListSectionProps {\n children: ReactNode;\n label?: string;\n}\n\nexport function UNSTABLE_SideNavListSection({ children, label }: UNSTABLE_SideNavListSectionProps) {\n const { isOpen } = useContext(SideNavContext);\n\n return (\n <div className=\"cim-side-nav-list-section\" data-expanded={isOpen}>\n {label && (\n <div className=\"cim-side-nav-list-section-header\">\n <Text as=\"p\" variant=\"small-semibold\" tone=\"subtle\" UNSAFE_className=\"cim-side-nav-list-section-header-label\">\n {label}\n </Text>\n </div>\n )}\n {children}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"side-nav.js","sourceRoot":"","sources":["../../../../src/components/app-header/side-nav.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,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ink } from 'react-aria-components';\nimport { UNSTABLE_IconExpand } from '../../icons/index.js';\nimport { stringLikeChildrenToString } from '../../utils/string-like-children-to-string.js';\nimport { useIsMobile } from '../../utils/use-is-mobile.js';\nimport { IconButton } from '../button/icon-button.js';\nimport { Drawer, DrawerBody } from '../drawer/drawer.js';\nimport { UNSTABLE_Hidden } from '../hidden/hidden.js';\nimport { Tooltip } from '../tooltip/tooltip.js';\nimport type { Href, StringLikeChildren } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nconst SideNavContext = createContext<{ isOpen: boolean }>({ isOpen: false });\n\nexport interface UNSTABLE_SideNavProps {\n children: ReactNode;\n isOpen?: boolean;\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * Determines how the side nav is displayed and behaves.\n * - `overlay`: The side nav slides in as an overlay on top of the main content. This is used when all available screen space is needed for the main content.\n * - `fixed`: The side nav is fixed to the side and includes an expand button to toggle between a compact icon-only view and an expanded view showing labels. On smaller screens, it slides in as an overlay.\n *\n * @default 'fixed'\n */\n variant?: 'overlay' | 'fixed';\n}\n\nexport function UNSTABLE_SideNav({ children, isOpen, onOpenChange, variant = 'fixed' }: UNSTABLE_SideNavProps) {\n const isMobile = useIsMobile();\n\n const drawer = (isMobile || variant === 'overlay') && (\n <Drawer UNSTABLE_placement=\"start\" isOpen={isOpen} onOpenChange={onOpenChange} aria-label=\"Side navigation\">\n <DrawerBody>{children}</DrawerBody>\n </Drawer>\n );\n\n return (\n <SideNavContext.Provider value={{ isOpen: isOpen ?? false }}>\n {drawer}\n {variant === 'fixed' && (\n <UNSTABLE_Hidden hide={{ sm: true, md: false }}>\n <div className=\"cim-side-nav\" data-expanded={isOpen}>\n <div className=\"cim-side-nav-header\">\n <IconButton\n variant=\"tertiary\"\n icon={<UNSTABLE_IconExpand UNSAFE_style={isOpen ? { transform: 'rotate(180deg)' } : {}} />}\n aria-label=\"Expand sidebar\"\n onPress={() => onOpenChange?.(!isOpen)}\n />\n </div>\n <div className=\"cim-side-nav-list-container\">{children}</div>\n </div>\n </UNSTABLE_Hidden>\n )}\n </SideNavContext.Provider>\n );\n}\n\nexport interface UNSTABLE_SideNavListProps {\n children: ReactNode;\n}\n\nexport function UNSTABLE_SideNavList({ children }: UNSTABLE_SideNavListProps) {\n return <div className=\"cim-side-nav-list\">{children}</div>;\n}\n\nexport interface UNSTABLE_SideNavListItemProps {\n children: StringLikeChildren;\n href: Href;\n isActive?: boolean;\n icon?: ReactNode;\n}\n\nexport function UNSTABLE_SideNavListItem({ children, href, isActive, icon }: UNSTABLE_SideNavListItemProps) {\n const { isOpen } = useContext(SideNavContext);\n\n return (\n <Tooltip label={stringLikeChildrenToString(children)} placement=\"right\" isDisabled={isOpen}>\n <RACLink href={href} className=\"cim-side-nav-list-item\" data-active={isActive} data-expanded={isOpen}>\n {icon}\n <Text as=\"span\" variant=\"medium\" UNSAFE_className=\"cim-side-nav-list-item-label\">\n {children}\n </Text>\n </RACLink>\n </Tooltip>\n );\n}\n\nexport interface UNSTABLE_SideNavListSectionProps {\n children: ReactNode;\n label?: string;\n}\n\nexport function UNSTABLE_SideNavListSection({ children, label }: UNSTABLE_SideNavListSectionProps) {\n const { isOpen } = useContext(SideNavContext);\n\n return (\n <div className=\"cim-side-nav-list-section\" data-expanded={isOpen}>\n {label && (\n <div className=\"cim-side-nav-list-section-header\">\n <Text as=\"p\" variant=\"small-semibold\" tone=\"subtle\" UNSAFE_className=\"cim-side-nav-list-section-header-label\">\n {label}\n </Text>\n </div>\n )}\n {children}\n </div>\n );\n}\n"]}
@@ -1,5 +1,6 @@
1
- import { type ListBoxProps as RACListBoxProps, type ComboBoxProps as RACComboBoxProps, type ListBoxItemProps as RACListBoxItemProps } from 'react-aria-components';
2
- import type { AsyncItemLoadingProps, CollectionItem, CollectionProps, CommonProps, FieldWithPlaceholderProps, Key, StringLikeChildren } from '../types.js';
1
+ import { type UIEventHandler } from 'react';
2
+ import { type ComboBoxProps as RACComboBoxProps, type ListBoxItemProps as RACListBoxItemProps } from 'react-aria-components';
3
+ import type { ApiProps, AsyncItemLoadingProps, CollectionItem, CollectionProps, CommonProps, FieldWithPlaceholderProps, Key, StringLikeChildren } from '../types.js';
3
4
  /** Represents the state of the `ComboBox` component for validation purposes. */
4
5
  export interface ComboBoxValidationValue {
5
6
  /** The selected key in the ComboBox. */
@@ -7,12 +8,21 @@ export interface ComboBoxValidationValue {
7
8
  /** The value of the ComboBox input. */
8
9
  inputValue: string;
9
10
  }
10
- export interface ComboBoxProps<T extends CollectionItem = CollectionItem> extends CommonProps, FieldWithPlaceholderProps<ComboBoxValidationValue>, CollectionProps<T>, AsyncItemLoadingProps, Pick<RACComboBoxProps<T>, 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'selectedKey' | 'defaultSelectedKey' | 'inputValue' | 'defaultInputValue' | 'autoFocus' | 'onSelectionChange' | 'onInputChange' | 'onFocus' | 'onBlur' | 'onOpenChange'>, Pick<RACListBoxProps<T>, 'onScroll'> {
11
+ export interface ComboBoxProps<T extends CollectionItem = CollectionItem> extends CommonProps, FieldWithPlaceholderProps<ComboBoxValidationValue>, CollectionProps<T>, AsyncItemLoadingProps, ApiProps<ComboBoxApi>, Pick<RACComboBoxProps<T>, 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'selectedKey' | 'defaultSelectedKey' | 'inputValue' | 'defaultInputValue' | 'autoFocus' | 'onSelectionChange' | 'onInputChange' | 'onFocus' | 'onBlur' | 'onOpenChange'> {
11
12
  /**
12
13
  * Whether the list of options should be virtualized. Use this as a performance optimization for large lists.
13
14
  * @default false
14
15
  */
15
16
  isVirtualized?: boolean;
17
+ /** Handler that is called when the list of items is scrolled. */
18
+ onScroll?: UIEventHandler<HTMLDivElement>;
19
+ }
20
+ /** The imperative API exposed by the `ComboBox` component. */
21
+ export interface ComboBoxApi {
22
+ /** Focuses the input field and opens the list of items. */
23
+ focus: () => void;
24
+ /** Selects the contents of the input field. */
25
+ select: () => void;
16
26
  }
17
27
  /**
18
28
  * Allows users to filter a collapsible list and select one item from it.
@@ -21,7 +31,9 @@ export interface ComboBoxProps<T extends CollectionItem = CollectionItem> extend
21
31
  */
22
32
  declare const _ComboBox: <T extends CollectionItem>(props: ComboBoxProps<T> & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
23
33
  export { _ComboBox as ComboBox };
24
- export interface ComboBoxItemProps<T extends CollectionItem> extends Pick<RACListBoxItemProps<T>, 'id' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
34
+ export interface ComboBoxItemProps<T extends CollectionItem> extends Pick<RACListBoxItemProps<T>, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
35
+ /** The ID of the item. Has to be unique across all sections and items. */
36
+ id?: Key;
25
37
  /** The content to display as the label. */
26
38
  children: StringLikeChildren;
27
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"combo-box.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box/combo-box.tsx"],"names":[],"mappings":"AAKA,OAAO,EASL,KAAK,YAAY,IAAI,eAAe,EAOpC,KAAK,aAAa,IAAI,gBAAgB,EACtC,KAAK,gBAAgB,IAAI,mBAAmB,EAE7C,MAAM,uBAAuB,CAAC;AAU/B,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,WAAW,EACX,yBAAyB,EACzB,GAAG,EACH,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAWrB,gFAAgF;AAChF,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,WAAW,EAAE,GAAG,GAAG,IAAI,CAAC;IACxB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,CACtE,SAAQ,WAAW,EACjB,yBAAyB,CAAC,uBAAuB,CAAC,EAClD,eAAe,CAAC,CAAC,CAAC,EAClB,qBAAqB,EACrB,IAAI,CACF,gBAAgB,CAAC,CAAC,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CAAC;AAEnE,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,CAAC;AAwDjC,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,cAAc,CACzD,SAAQ,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,YAAY,GAAG,cAAc,GAAG,YAAY,CAAC;IAClF,0EAA0E;IAC1E,EAAE,CAAC,EAAE,GAAG,CAAC;IACT,2CAA2C;IAC3C,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;AAED,oDAAoD;AACpD,wBAAgB,YAAY,CAAC,CAAC,SAAS,cAAc,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC,2CAiBlG;yBAjBe,YAAY;;;AAqB5B,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,cAAc,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACxF,6EAA6E;IAC7E,EAAE,CAAC,EAAE,GAAG,CAAC;IACT,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,0DAA0D;AAC1D,wBAAgB,eAAe,CAAC,CAAC,SAAS,cAAc,EAAE,EACxD,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,CAAC,2CAezB;yBApBe,eAAe"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import clsx from 'clsx';
4
- import { useContext } from 'react';
4
+ import { useContext, useImperativeHandle, useRef, } from 'react';
5
5
  import { usePreventScroll } from 'react-aria';
6
6
  import { Button as RACButton, Collection as RACCollection, ComboBox as RACComboBox, ComboBoxStateContext as RACComboBoxStateContext, Group as RACGroup, Header as RACHeader, Input as RACInput, ListBox as RACListBox, ListBoxLoadMoreItem as RACListBoxLoadMoreItem, ListBoxItem as RACListBoxItem, ListBoxSection as RACListBoxSection, ListLayout as RACListLayout, Text as RACText, Virtualizer as RACVirtualizer, } from 'react-aria-components';
7
7
  import { forwardRef } from '../../forward-ref.js';
@@ -21,7 +21,8 @@ const VIRTUAL_LAYOUT_OPTIONS = {
21
21
  padding: 0,
22
22
  gap: 0,
23
23
  };
24
- function ComboBox({ label, description, error, items, children, placeholder, UNSAFE_className, UNSAFE_style, isReadOnly, onScroll, isVirtualized = false, UNSTABLE_isLoading: isLoading, UNSTABLE_onLoadMore: onLoadMore, ...props }, ref) {
24
+ function ComboBox({ label, description, error, items, children, placeholder, UNSAFE_className, UNSAFE_style, isReadOnly, onScroll, isVirtualized = false, UNSTABLE_isLoading: isLoading, UNSTABLE_onLoadMore: onLoadMore, apiRef, ...props }, ref) {
25
+ const inputRef = useRef(null);
25
26
  const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
26
27
  useProductionWarning(() => {
27
28
  if (!label && !ariaLabel && !ariaLabelledBy) {
@@ -31,8 +32,12 @@ function ComboBox({ label, description, error, items, children, placeholder, UNS
31
32
  if (!isProduction() && items != null && typeof children !== 'function') {
32
33
  console.warn('`ComboBox` requires `children` to be a function when using `items` prop');
33
34
  }
35
+ useImperativeHandle(apiRef, () => ({
36
+ focus: () => inputRef.current?.focus(),
37
+ select: () => inputRef.current?.select(),
38
+ }), []);
34
39
  const listBox = (_jsx(ComboBoxList, { items: items, isLoading: isLoading, onLoadMore: onLoadMore, onScroll: onScroll, children: children }));
35
- return (_jsxs(RACComboBox, { ...props, ref: ref, className: clsx('cim-combo-box', UNSAFE_className), style: UNSAFE_style, menuTrigger: "focus", isReadOnly: isReadOnly, "data-readonly": isReadOnly ? true : undefined, children: [_jsx(FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), _jsxs(RACGroup, { className: "cim-combo-box-input-group", children: [_jsx(ComboBoxInput, { isReadOnly: isReadOnly, placeholder: placeholder }), _jsx(RACButton, { className: "cim-combo-box-button", children: _jsx(IconChevronDown, {}) })] }), _jsx(FormFieldError, { children: error }), _jsx(FormFieldDescription, { children: description }), _jsx(CollapsibleList, { offset: 5, maxHeight: 315, children: isVirtualized ? (_jsx(RACVirtualizer, { layout: RACListLayout, layoutOptions: VIRTUAL_LAYOUT_OPTIONS, children: listBox })) : (listBox) })] }));
40
+ return (_jsxs(RACComboBox, { ...props, ref: ref, className: clsx('cim-combo-box', UNSAFE_className), style: UNSAFE_style, menuTrigger: "focus", isReadOnly: isReadOnly, "data-readonly": isReadOnly ? true : undefined, children: [_jsx(FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), _jsxs(RACGroup, { className: "cim-combo-box-input-group", children: [_jsx(ComboBoxInput, { inputRef: inputRef, isReadOnly: isReadOnly, placeholder: placeholder }), _jsx(RACButton, { className: "cim-combo-box-button", children: _jsx(IconChevronDown, {}) })] }), _jsx(FormFieldError, { children: error }), _jsx(FormFieldDescription, { children: description }), _jsx(CollapsibleList, { offset: 5, maxHeight: 315, children: isVirtualized ? (_jsx(RACVirtualizer, { layout: RACListLayout, layoutOptions: VIRTUAL_LAYOUT_OPTIONS, children: listBox })) : (listBox) })] }));
36
41
  }
37
42
  /**
38
43
  * Allows users to filter a collapsible list and select one item from it.
@@ -41,9 +46,9 @@ function ComboBox({ label, description, error, items, children, placeholder, UNS
41
46
  */
42
47
  const _ComboBox = withStyleProps(forwardRef(ComboBox), 'ComboBox');
43
48
  export { _ComboBox as ComboBox };
44
- function ComboBoxInput({ isReadOnly, placeholder, }) {
49
+ function ComboBoxInput({ inputRef, isReadOnly, placeholder, }) {
45
50
  const comboBoxState = useContext(RACComboBoxStateContext);
46
- return (_jsx(RACInput, { className: clsx('cim-combo-box-input', textStyle({ variant: 'body' })),
51
+ return (_jsx(RACInput, { ref: inputRef, className: clsx('cim-combo-box-input', textStyle({ variant: 'body' })),
47
52
  // Ensure the popover opens when the input is clicked.
48
53
  // By default, React Aria only opens the popover when the input is focused.
49
54
  onClick: () => !isReadOnly && comboBoxState.open(), placeholder: placeholder }));