@servicetitan/anvil2 2.9.3 → 2.9.5

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 (178) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{AiMark-Dge6ktmW.js → AiMark-DINVII8-.js} +3 -3
  3. package/dist/{AiMark-Dge6ktmW.js.map → AiMark-DINVII8-.js.map} +1 -1
  4. package/dist/AiMark.js +1 -1
  5. package/dist/{Alert-B83r7r7T.js → Alert-Bcjw74vx.js} +2 -2
  6. package/dist/{Alert-B83r7r7T.js.map → Alert-Bcjw74vx.js.map} +1 -1
  7. package/dist/Alert.js +1 -1
  8. package/dist/{Breadcrumbs-c-0298cq.js → Breadcrumbs-CoOuSd2L.js} +2 -2
  9. package/dist/{Breadcrumbs-c-0298cq.js.map → Breadcrumbs-CoOuSd2L.js.map} +1 -1
  10. package/dist/Breadcrumbs.js +1 -1
  11. package/dist/{Calendar-BHH6BxIs.js → Calendar-C7QP11uk.js} +2 -2
  12. package/dist/{Calendar-BHH6BxIs.js.map → Calendar-C7QP11uk.js.map} +1 -1
  13. package/dist/{Calendar-Bl6ZSodE.js → Calendar-rjAph002.js} +2 -2
  14. package/dist/{Calendar-Bl6ZSodE.js.map → Calendar-rjAph002.js.map} +1 -1
  15. package/dist/Calendar.js +2 -2
  16. package/dist/{Checkbox-DuQLvvM8.js → Checkbox-BZ8k0uZb.js} +3 -3
  17. package/dist/{Checkbox-DuQLvvM8.js.map → Checkbox-BZ8k0uZb.js.map} +1 -1
  18. package/dist/{Checkbox-CmuW0fml.js → Checkbox-CsNIatRo.js} +2 -2
  19. package/dist/{Checkbox-CmuW0fml.js.map → Checkbox-CsNIatRo.js.map} +1 -1
  20. package/dist/Checkbox.js +1 -1
  21. package/dist/{Chip-DVzFbbgS.js → Chip-PvXSFpKl.js} +2 -2
  22. package/dist/{Chip-DVzFbbgS.js.map → Chip-PvXSFpKl.js.map} +1 -1
  23. package/dist/Chip.js +1 -1
  24. package/dist/{Combobox-BlFWPOin.js → Combobox-BgFH9P75.js} +4 -4
  25. package/dist/{Combobox-BlFWPOin.js.map → Combobox-BgFH9P75.js.map} +1 -1
  26. package/dist/Combobox.js +1 -1
  27. package/dist/{DataTable-BA-Kn63l.js → DataTable-CbHaFuj2.js} +49 -58
  28. package/dist/DataTable-CbHaFuj2.js.map +1 -0
  29. package/dist/{DateFieldRange-4axIJ9QU.js → DateFieldRange-DQ1cmyb5.js} +4 -4
  30. package/dist/{DateFieldRange-4axIJ9QU.js.map → DateFieldRange-DQ1cmyb5.js.map} +1 -1
  31. package/dist/DateFieldRange.js +1 -1
  32. package/dist/{DateFieldSingle-qGf_thDE.js → DateFieldSingle-BpTphoeG.js} +4 -4
  33. package/dist/{DateFieldSingle-qGf_thDE.js.map → DateFieldSingle-BpTphoeG.js.map} +1 -1
  34. package/dist/DateFieldSingle.js +1 -1
  35. package/dist/{DateFieldYearless-UTq-FBLX.js → DateFieldYearless-Ph5nlpyY.js} +4 -4
  36. package/dist/{DateFieldYearless-UTq-FBLX.js.map → DateFieldYearless-Ph5nlpyY.js.map} +1 -1
  37. package/dist/DateFieldYearless.js +1 -1
  38. package/dist/{DateFieldYearlessRange-Bdf7R_tb.js → DateFieldYearlessRange-iEOUw3Du.js} +3 -3
  39. package/dist/{DateFieldYearlessRange-Bdf7R_tb.js.map → DateFieldYearlessRange-iEOUw3Du.js.map} +1 -1
  40. package/dist/DateFieldYearlessRange.js +1 -1
  41. package/dist/{DaysOfTheWeek-DneS1Y3_.js → DaysOfTheWeek-CBsjDoih.js} +3 -3
  42. package/dist/{DaysOfTheWeek-DneS1Y3_.js.map → DaysOfTheWeek-CBsjDoih.js.map} +1 -1
  43. package/dist/DaysOfTheWeek.js +1 -1
  44. package/dist/{Dialog-C6tkX_v7.js → Dialog-n5kt_Ow5.js} +4 -4
  45. package/dist/{Dialog-C6tkX_v7.js.map → Dialog-n5kt_Ow5.js.map} +1 -1
  46. package/dist/Dialog.js +1 -1
  47. package/dist/{Drawer-5Hj96MyV.js → Drawer-AV26Rn1L.js} +4 -4
  48. package/dist/{Drawer-5Hj96MyV.js.map → Drawer-AV26Rn1L.js.map} +1 -1
  49. package/dist/Drawer.js +1 -1
  50. package/dist/DrillDown.js +1 -1
  51. package/dist/{EditCard-CJWjBx2_.js → EditCard-03B0-jHq.js} +2 -2
  52. package/dist/{EditCard-CJWjBx2_.js.map → EditCard-03B0-jHq.js.map} +1 -1
  53. package/dist/EditCard.js +1 -1
  54. package/dist/{FieldLabel-Qxe_2xNX.js → FieldLabel-1g9Y_K44.js} +3 -3
  55. package/dist/{FieldLabel-Qxe_2xNX.js.map → FieldLabel-1g9Y_K44.js.map} +1 -1
  56. package/dist/FieldLabel.js +1 -1
  57. package/dist/{InputMask-CcbJbNCy.js → InputMask-Bd4tw5-x.js} +3 -3
  58. package/dist/{InputMask-CcbJbNCy.js.map → InputMask-Bd4tw5-x.js.map} +1 -1
  59. package/dist/InputMask.js +1 -1
  60. package/dist/InteractiveCard-DqxbIX4f.js +102 -0
  61. package/dist/InteractiveCard-DqxbIX4f.js.map +1 -0
  62. package/dist/InteractiveCard.css +13 -21
  63. package/dist/InteractiveCard.js +1 -1
  64. package/dist/{ListView-D724tdzO.js → ListView-_ynU8UuV.js} +2 -2
  65. package/dist/{ListView-D724tdzO.js.map → ListView-_ynU8UuV.js.map} +1 -1
  66. package/dist/ListView.js +1 -1
  67. package/dist/{Listbox-C7IBAFy_.js → Listbox-DuYnCSLM.js} +2 -2
  68. package/dist/{Listbox-C7IBAFy_.js.map → Listbox-DuYnCSLM.js.map} +1 -1
  69. package/dist/Listbox.js +1 -1
  70. package/dist/MultiSelectField.js +1 -1
  71. package/dist/{MultiSelectFieldSync-BRXRCOvC.js → MultiSelectFieldSync-CA_OHWZ5.js} +5 -5
  72. package/dist/{MultiSelectFieldSync-BRXRCOvC.js.map → MultiSelectFieldSync-CA_OHWZ5.js.map} +1 -1
  73. package/dist/MultiSelectMenu.js +1 -1
  74. package/dist/{MultiSelectMenuSync-DRs3iDQN.js → MultiSelectMenuSync-BSz5_4Wu.js} +3 -3
  75. package/dist/{MultiSelectMenuSync-DRs3iDQN.js.map → MultiSelectMenuSync-BSz5_4Wu.js.map} +1 -1
  76. package/dist/{NumberField-Ca-B_7Q5.js → NumberField-CE_6UnsG.js} +3 -3
  77. package/dist/{NumberField-Ca-B_7Q5.js.map → NumberField-CE_6UnsG.js.map} +1 -1
  78. package/dist/NumberField.js +1 -1
  79. package/dist/Overflow.js +1 -1
  80. package/dist/{Page-DJIcjeg7.js → Page-D6iAbBGj.js} +9 -9
  81. package/dist/{Page-DJIcjeg7.js.map → Page-D6iAbBGj.js.map} +1 -1
  82. package/dist/Page.js +1 -1
  83. package/dist/{Pagination-C7O7o6tl.js → Pagination-YO69lIlZ.js} +169 -22
  84. package/dist/Pagination-YO69lIlZ.js.map +1 -0
  85. package/dist/Pagination.js +1 -1
  86. package/dist/{Popover-CfG1IJP6.js → Popover-BbqTZw-1.js} +2 -2
  87. package/dist/{Popover-CfG1IJP6.js.map → Popover-BbqTZw-1.js.map} +1 -1
  88. package/dist/Popover.js +1 -1
  89. package/dist/{ProgressBar-gMNOCMkq.js → ProgressBar-Cygv2ii1.js} +2 -2
  90. package/dist/{ProgressBar-gMNOCMkq.js.map → ProgressBar-Cygv2ii1.js.map} +1 -1
  91. package/dist/ProgressBar.js +1 -1
  92. package/dist/{Radio-Cm_MS-YF.js → Radio-BftTzQIc.js} +3 -3
  93. package/dist/{Radio-Cm_MS-YF.js.map → Radio-BftTzQIc.js.map} +1 -1
  94. package/dist/{Radio-B_TLtNDx.js → Radio-CGFmTxJ1.js} +2 -2
  95. package/dist/{Radio-B_TLtNDx.js.map → Radio-CGFmTxJ1.js.map} +1 -1
  96. package/dist/Radio.js +1 -1
  97. package/dist/{SelectCard-BbZcAhq1.js → SelectCard-CjDxc2q7.js} +3 -3
  98. package/dist/{SelectCard-BbZcAhq1.js.map → SelectCard-CjDxc2q7.js.map} +1 -1
  99. package/dist/SelectCard.js +1 -1
  100. package/dist/SelectField.js +1 -1
  101. package/dist/{SelectFieldLabel-CktsTa2n.js → SelectFieldLabel-DXgUk8cU.js} +2 -2
  102. package/dist/{SelectFieldLabel-CktsTa2n.js.map → SelectFieldLabel-DXgUk8cU.js.map} +1 -1
  103. package/dist/{SelectFieldSync-DFnRsT54.js → SelectFieldSync-D0aeALNV.js} +4 -4
  104. package/dist/{SelectFieldSync-DFnRsT54.js.map → SelectFieldSync-D0aeALNV.js.map} +1 -1
  105. package/dist/SelectMenu.js +1 -1
  106. package/dist/{SelectMenuSync-ghETSNCu.js → SelectMenuSync-Cf_yCjTR.js} +3 -3
  107. package/dist/{SelectMenuSync-ghETSNCu.js.map → SelectMenuSync-Cf_yCjTR.js.map} +1 -1
  108. package/dist/{SelectOptions-D4VTheY3.js → SelectOptions-DWBJXyzG.js} +2 -2
  109. package/dist/{SelectOptions-D4VTheY3.js.map → SelectOptions-DWBJXyzG.js.map} +1 -1
  110. package/dist/{SelectTrigger-BpqY5C5I.js → SelectTrigger-BERAM4ZL.js} +2 -2
  111. package/dist/{SelectTrigger-BpqY5C5I.js.map → SelectTrigger-BERAM4ZL.js.map} +1 -1
  112. package/dist/SelectTrigger.js +1 -1
  113. package/dist/{SelectTriggerBase-CuchBk53.js → SelectTriggerBase-B0hyyOl4.js} +3 -3
  114. package/dist/{SelectTriggerBase-CuchBk53.js.map → SelectTriggerBase-B0hyyOl4.js.map} +1 -1
  115. package/dist/{Switch-rvb_rYeS.js → Switch-BVVW9wp0.js} +2 -2
  116. package/dist/{Switch-rvb_rYeS.js.map → Switch-BVVW9wp0.js.map} +1 -1
  117. package/dist/Switch.js +1 -1
  118. package/dist/Table.js +1 -1
  119. package/dist/{Text-BRUESjpN.js → Text-3Tbp9SGi.js} +2 -2
  120. package/dist/{Text-BRUESjpN.js.map → Text-3Tbp9SGi.js.map} +1 -1
  121. package/dist/Text.js +1 -1
  122. package/dist/{TextField-Be-VJZPT.js → TextField-PMLHWUlx.js} +3 -3
  123. package/dist/{TextField-Be-VJZPT.js.map → TextField-PMLHWUlx.js.map} +1 -1
  124. package/dist/{TextField-CMkLsLLk.js → TextField-vDEUHRSI.js} +2 -2
  125. package/dist/{TextField-CMkLsLLk.js.map → TextField-vDEUHRSI.js.map} +1 -1
  126. package/dist/TextField.js +1 -1
  127. package/dist/{Textarea-DLUFxF7O.js → Textarea-CoHBVOM-.js} +3 -3
  128. package/dist/{Textarea-DLUFxF7O.js.map → Textarea-CoHBVOM-.js.map} +1 -1
  129. package/dist/Textarea.js +1 -1
  130. package/dist/{TimeField-D7pAP5pv.js → TimeField-_ojaBuXD.js} +4 -4
  131. package/dist/{TimeField-D7pAP5pv.js.map → TimeField-_ojaBuXD.js.map} +1 -1
  132. package/dist/TimeField.js +1 -1
  133. package/dist/Toast.js +2 -2
  134. package/dist/{Toaster-Da6LU4h-.js → Toaster-DRM8VdJw.js} +3 -3
  135. package/dist/{Toaster-Da6LU4h-.js.map → Toaster-DRM8VdJw.js.map} +1 -1
  136. package/dist/{Toaster-C7j9mOgX.js → Toaster-DeA4M9hh.js} +2 -2
  137. package/dist/{Toaster-C7j9mOgX.js.map → Toaster-DeA4M9hh.js.map} +1 -1
  138. package/dist/{Toolbar-CmiI43BR.js → Toolbar-V14Z3yMP.js} +14 -14
  139. package/dist/{Toolbar-CmiI43BR.js.map → Toolbar-V14Z3yMP.js.map} +1 -1
  140. package/dist/Toolbar.js +1 -1
  141. package/dist/{Tooltip-Drml7OMN.js → Tooltip-BboNo2-B.js} +2 -2
  142. package/dist/{Tooltip-Drml7OMN.js.map → Tooltip-BboNo2-B.js.map} +1 -1
  143. package/dist/Tooltip.js +1 -1
  144. package/dist/{YearlessDateInputWithPicker-BCUWcF_p.js → YearlessDateInputWithPicker-BGPlWZVx.js} +2 -2
  145. package/dist/{YearlessDateInputWithPicker-BCUWcF_p.js.map → YearlessDateInputWithPicker-BGPlWZVx.js.map} +1 -1
  146. package/dist/assets/icons/st/unsorted.svg +1 -1
  147. package/dist/beta/components/InteractiveCard/InteractiveCard.d.ts +3 -1
  148. package/dist/beta/components/Table/DataTable/DataTable.d.ts +4 -6
  149. package/dist/beta/components/Table/DataTable/internal/DataTableBodyRow.d.ts +6 -1
  150. package/dist/beta/components/Table/DataTable/internal/context/focus/DTFocusContext.d.ts +1 -11
  151. package/dist/beta/components/Table/DataTable/internal/context/focus/useDTFocusDispatchContext.d.ts +0 -2
  152. package/dist/beta/components/Table/DataTable/internal/useColumnOrder.d.ts +1 -0
  153. package/dist/beta.js +10 -10
  154. package/dist/components/Pagination/internal/Pagination.d.ts +1 -0
  155. package/dist/components/Pagination/internal/PaginationOverflowMenu.d.ts +12 -1
  156. package/dist/getKeyboardFocusableElements-CPUr9cdf.js +11 -0
  157. package/dist/getKeyboardFocusableElements-CPUr9cdf.js.map +1 -0
  158. package/dist/index.js +38 -38
  159. package/dist/internal/functions/getKeyboardFocusableElements.d.ts +9 -0
  160. package/dist/{stripInlineMarkdown-BvoVEz8b.js → stripInlineMarkdown-Dleqe05B.js} +2 -2
  161. package/dist/{stripInlineMarkdown-BvoVEz8b.js.map → stripInlineMarkdown-Dleqe05B.js.map} +1 -1
  162. package/dist/{syncFilterUtils-v2Mrjxg-.js → syncFilterUtils-CSfEaBwR.js} +4 -4
  163. package/dist/{syncFilterUtils-v2Mrjxg-.js.map → syncFilterUtils-CSfEaBwR.js.map} +1 -1
  164. package/dist/{useDrilldown-5Tl36ntS.js → useDrilldown-DdTNc90h.js} +3 -3
  165. package/dist/{useDrilldown-5Tl36ntS.js.map → useDrilldown-DdTNc90h.js.map} +1 -1
  166. package/dist/{useInitialFocus-BIvXK1Rp.js → useInitialFocus-BUxEDMEG.js} +2 -2
  167. package/dist/{useInitialFocus-BIvXK1Rp.js.map → useInitialFocus-BUxEDMEG.js.map} +1 -1
  168. package/dist/{usePopoverTransitionStates-B1opfxxn.js → usePopoverTransitionStates-CDXCdyKa.js} +2 -1
  169. package/dist/{usePopoverTransitionStates-B1opfxxn.js.map → usePopoverTransitionStates-CDXCdyKa.js.map} +1 -1
  170. package/dist/{useToggleSelection-CxDdyrDJ.js → useToggleSelection-OIOX5MHV.js} +2 -2
  171. package/dist/{useToggleSelection-CxDdyrDJ.js.map → useToggleSelection-OIOX5MHV.js.map} +1 -1
  172. package/package.json +1 -1
  173. package/dist/DataTable-BA-Kn63l.js.map +0 -1
  174. package/dist/InteractiveCard-GTYbR6Xy.js +0 -87
  175. package/dist/InteractiveCard-GTYbR6Xy.js.map +0 -1
  176. package/dist/Pagination-C7O7o6tl.js.map +0 -1
  177. package/dist/getKeyboardFocusableElements-QqcABz0D.js +0 -12
  178. package/dist/getKeyboardFocusableElements-QqcABz0D.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"EditCard-CJWjBx2_.js","sources":["../../hammer-icon/mdi/round/priority_high.svg","../src/components/EditCard/EditCard.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgPriorityHigh = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"circle\", { cx: 12, cy: 19, r: 2 }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2s2-.9 2-2V5c0-1.1-.9-2-2-2z\" }));\nexport default SvgPriorityHigh;\n","import cx from \"classnames\";\nimport styles from \"./EditCard.module.scss\";\nimport { ComponentPropsWithoutRef, forwardRef } from \"react\";\nimport { LayoutUtilProps } from \"../../types\";\nimport Check from \"@servicetitan/hammer-icon/mdi/round/check.svg\";\nimport PriorityHigh from \"@servicetitan/hammer-icon/mdi/round/priority_high.svg\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\nimport { Card } from \"../Card\";\nimport { Text } from \"../Text\";\nimport { Icon } from \"../Icon\";\nimport { Button } from \"../Button\";\n\n/**\n * Props for the EditCard component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends LayoutUtilProps\n */\nexport type EditCardProps = ComponentPropsWithoutRef<\"div\"> &\n LayoutUtilProps & {\n /**\n * The header text to display. Can be a string or an object mapping states to different text.\n */\n headerText:\n | string\n | {\n \"not started\": string;\n \"in progress\": string;\n error: string;\n complete: string;\n };\n /**\n * The current state of the edit card.\n */\n state: EditCardState;\n /**\n * Text to display on the save button.\n * @default \"Save\"\n */\n saveButtonText?: string;\n /**\n * Text to display on the edit button.\n * @default \"Edit\"\n */\n editButtonText?: string;\n /**\n * Whether to disable the edit button.\n * @default false\n */\n disableEdit?: boolean;\n /**\n * Whether to disable the save button.\n * @default false\n */\n disableSave?: boolean;\n /**\n * Callback function called when the state changes.\n */\n onStateChange?: (changeType: EditCardChange) => void;\n };\n\n/**\n * The type of state change that can occur.\n * @property {\"edit\"} edit - User clicked the edit button to start editing\n * @property {\"save\"} save - User clicked the save button to save changes\n * @property {\"cancel\"} cancel - User clicked the cancel button to discard changes\n */\nexport type EditCardChange = \"edit\" | \"save\" | \"cancel\";\n\n/**\n * The current state of the edit card.\n * @property {\"not started\"} not started - Initial state, content is not being edited\n * @property {\"in progress\"} in progress - User is currently editing the content\n * @property {\"error\"} error - An error occurred during the edit process\n * @property {\"complete\"} complete - Edit was successfully completed\n */\nexport type EditCardState =\n | \"not started\"\n | \"in progress\"\n | \"error\"\n | \"complete\";\n\n/**\n * EditCard component for managing editable content with different states and actions.\n *\n * Features:\n * - Four distinct states: not started, in progress, error, and complete\n * - Visual indicators for each state with appropriate icons\n * - Dynamic header text that can change based on state\n * - Edit and save buttons with customizable text\n * - Optional button disabling for different states\n * - State change callbacks for handling user interactions\n * - Built on Card component with consistent styling\n * - Supports layout utilities for positioning and spacing\n * - Accessible with proper ARIA attributes\n * - Visual state indicators with color-coded borders\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <EditCard\n * headerText=\"User Profile\"\n * state=\"not started\"\n * onStateChange={(change) => console.log(change)}\n * >\n * <Text>Profile information goes here</Text>\n * </EditCard>\n */\nexport const EditCard = forwardRef<HTMLDivElement, EditCardProps>(\n (props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n children,\n className,\n style,\n headerText,\n state,\n editButtonText = \"Edit\",\n saveButtonText = \"Save\",\n disableEdit = false,\n disableSave = false,\n onStateChange,\n ...rest\n } = componentProps;\n\n const kebabState = state?.replaceAll(\" \", \"-\");\n\n const editCardClassNames = cx(\n styles[\"edit-card\"],\n styles[`edit-card-${kebabState}`],\n className,\n );\n\n return (\n <Card\n padding=\"large\"\n className={editCardClassNames}\n data-anv=\"edit-card\"\n style={style}\n ref={ref}\n {...rest}\n >\n <div\n className={cx(styles.indicator, styles[`indicator-${kebabState}`])}\n >\n {state === \"complete\" && <Icon svg={Check} />}\n {state === \"error\" && <Icon svg={PriorityHigh} />}\n </div>\n <div className={styles.container}>\n <div className={styles.header}>\n <Text className={styles.heading} variant=\"headline\" el=\"h3\">\n {typeof headerText === \"string\" ? headerText : headerText[state]}\n </Text>\n {state !== \"in progress\" && (\n <Button\n disabled={disableEdit}\n onClick={() => onStateChange?.(\"edit\")}\n >\n {editButtonText}\n </Button>\n )}\n </div>\n {children && (\n <div className={styles.content} style={layoutStyles}>\n {children}\n </div>\n )}\n {state === \"in progress\" && (\n <div className={styles.footer}>\n <Button onClick={() => onStateChange?.(\"cancel\")}>Cancel</Button>\n <Button\n appearance=\"primary\"\n onClick={() => onStateChange?.(\"save\")}\n disabled={disableSave}\n >\n {saveButtonText}\n </Button>\n </div>\n )}\n </div>\n </Card>\n );\n },\n);\n\nEditCard.displayName = \"EditCard\";\n"],"names":["Check","PriorityHigh"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAM,eAAe,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,E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;AAAA,8BACxD,GAAA;AAAA,gBAAC,MAAA;AAAA,gBAAA;AAAA,kBACC,UAAA,EAAW,SAAA;AAAA,kBACX,OAAA,EAAS,MAAM,aAAA,GAAgB,MAAM,CAAA;AAAA,kBACrC,QAAA,EAAU,WAAA;AAAA,kBAET,QAAA,EAAA;AAAA;AAAA;AACH,aAAA,EACF;AAAA,WAAA,EAEJ;AAAA;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA;;;;"}
1
+ {"version":3,"file":"EditCard-03B0-jHq.js","sources":["../../hammer-icon/mdi/round/priority_high.svg","../src/components/EditCard/EditCard.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgPriorityHigh = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"circle\", { cx: 12, cy: 19, r: 2 }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2s2-.9 2-2V5c0-1.1-.9-2-2-2z\" }));\nexport default SvgPriorityHigh;\n","import cx from \"classnames\";\nimport styles from \"./EditCard.module.scss\";\nimport { ComponentPropsWithoutRef, forwardRef } from \"react\";\nimport { LayoutUtilProps } from \"../../types\";\nimport Check from \"@servicetitan/hammer-icon/mdi/round/check.svg\";\nimport PriorityHigh from \"@servicetitan/hammer-icon/mdi/round/priority_high.svg\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\nimport { Card } from \"../Card\";\nimport { Text } from \"../Text\";\nimport { Icon } from \"../Icon\";\nimport { Button } from \"../Button\";\n\n/**\n * Props for the EditCard component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends LayoutUtilProps\n */\nexport type EditCardProps = ComponentPropsWithoutRef<\"div\"> &\n LayoutUtilProps & {\n /**\n * The header text to display. Can be a string or an object mapping states to different text.\n */\n headerText:\n | string\n | {\n \"not started\": string;\n \"in progress\": string;\n error: string;\n complete: string;\n };\n /**\n * The current state of the edit card.\n */\n state: EditCardState;\n /**\n * Text to display on the save button.\n * @default \"Save\"\n */\n saveButtonText?: string;\n /**\n * Text to display on the edit button.\n * @default \"Edit\"\n */\n editButtonText?: string;\n /**\n * Whether to disable the edit button.\n * @default false\n */\n disableEdit?: boolean;\n /**\n * Whether to disable the save button.\n * @default false\n */\n disableSave?: boolean;\n /**\n * Callback function called when the state changes.\n */\n onStateChange?: (changeType: EditCardChange) => void;\n };\n\n/**\n * The type of state change that can occur.\n * @property {\"edit\"} edit - User clicked the edit button to start editing\n * @property {\"save\"} save - User clicked the save button to save changes\n * @property {\"cancel\"} cancel - User clicked the cancel button to discard changes\n */\nexport type EditCardChange = \"edit\" | \"save\" | \"cancel\";\n\n/**\n * The current state of the edit card.\n * @property {\"not started\"} not started - Initial state, content is not being edited\n * @property {\"in progress\"} in progress - User is currently editing the content\n * @property {\"error\"} error - An error occurred during the edit process\n * @property {\"complete\"} complete - Edit was successfully completed\n */\nexport type EditCardState =\n | \"not started\"\n | \"in progress\"\n | \"error\"\n | \"complete\";\n\n/**\n * EditCard component for managing editable content with different states and actions.\n *\n * Features:\n * - Four distinct states: not started, in progress, error, and complete\n * - Visual indicators for each state with appropriate icons\n * - Dynamic header text that can change based on state\n * - Edit and save buttons with customizable text\n * - Optional button disabling for different states\n * - State change callbacks for handling user interactions\n * - Built on Card component with consistent styling\n * - Supports layout utilities for positioning and spacing\n * - Accessible with proper ARIA attributes\n * - Visual state indicators with color-coded borders\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <EditCard\n * headerText=\"User Profile\"\n * state=\"not started\"\n * onStateChange={(change) => console.log(change)}\n * >\n * <Text>Profile information goes here</Text>\n * </EditCard>\n */\nexport const EditCard = forwardRef<HTMLDivElement, EditCardProps>(\n (props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n children,\n className,\n style,\n headerText,\n state,\n editButtonText = \"Edit\",\n saveButtonText = \"Save\",\n disableEdit = false,\n disableSave = false,\n onStateChange,\n ...rest\n } = componentProps;\n\n const kebabState = state?.replaceAll(\" \", \"-\");\n\n const editCardClassNames = cx(\n styles[\"edit-card\"],\n styles[`edit-card-${kebabState}`],\n className,\n );\n\n return (\n <Card\n padding=\"large\"\n className={editCardClassNames}\n data-anv=\"edit-card\"\n style={style}\n ref={ref}\n {...rest}\n >\n <div\n className={cx(styles.indicator, styles[`indicator-${kebabState}`])}\n >\n {state === \"complete\" && <Icon svg={Check} />}\n {state === \"error\" && <Icon svg={PriorityHigh} />}\n </div>\n <div className={styles.container}>\n <div className={styles.header}>\n <Text className={styles.heading} variant=\"headline\" el=\"h3\">\n {typeof headerText === \"string\" ? headerText : headerText[state]}\n </Text>\n {state !== \"in progress\" && (\n <Button\n disabled={disableEdit}\n onClick={() => onStateChange?.(\"edit\")}\n >\n {editButtonText}\n </Button>\n )}\n </div>\n {children && (\n <div className={styles.content} style={layoutStyles}>\n {children}\n </div>\n )}\n {state === \"in progress\" && (\n <div className={styles.footer}>\n <Button onClick={() => onStateChange?.(\"cancel\")}>Cancel</Button>\n <Button\n appearance=\"primary\"\n onClick={() => onStateChange?.(\"save\")}\n disabled={disableSave}\n >\n {saveButtonText}\n </Button>\n </div>\n )}\n </div>\n </Card>\n );\n },\n);\n\nEditCard.displayName = \"EditCard\";\n"],"names":["Check","PriorityHigh"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAM,eAAe,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE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AAA,kBACrC,QAAA,EAAU,WAAA;AAAA,kBAET,QAAA,EAAA;AAAA;AAAA;AACH,aAAA,EACF;AAAA,WAAA,EAEJ;AAAA;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA;;;;"}
package/dist/EditCard.js CHANGED
@@ -1,2 +1,2 @@
1
- export { E as EditCard, E as default } from './EditCard-CJWjBx2_.js';
1
+ export { E as EditCard, E as default } from './EditCard-03B0-jHq.js';
2
2
  //# sourceMappingURL=EditCard.js.map
@@ -2,8 +2,8 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useMemo, forwardRef } from 'react';
3
3
  import { c as cx } from './index-De1g9FRV.js';
4
4
  import { S as SrOnly } from './SrOnly-eUpYGpAT.js';
5
- import { T as Tooltip } from './Tooltip-Drml7OMN.js';
6
- import { F as FieldLabelButton, A as AiMark } from './AiMark-Dge6ktmW.js';
5
+ import { T as Tooltip } from './Tooltip-BboNo2-B.js';
6
+ import { F as FieldLabelButton, A as AiMark } from './AiMark-DINVII8-.js';
7
7
  import { I as Icon } from './Icon-DuIlne4x.js';
8
8
  import { S as SvgInfo } from './info-CYpG6tcI.js';
9
9
 
@@ -177,4 +177,4 @@ FieldLabelElement.displayName = "FieldLabel";
177
177
  const FieldLabel = FieldLabelElement;
178
178
 
179
179
  export { FieldLabel as F, INLINE_MARKDOWN_REGEX as I };
180
- //# sourceMappingURL=FieldLabel-Qxe_2xNX.js.map
180
+ //# sourceMappingURL=FieldLabel-1g9Y_K44.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldLabel-Qxe_2xNX.js","sources":["../src/internal/utils/inlineMarkdownRegex.ts","../src/internal/functions/inlineMarkdown.tsx","../src/components/FieldLabel/internal/FieldLabelMoreInfoIcon.tsx","../src/internal/components/InlineMarkdown/InlineMarkdown.tsx","../src/components/FieldLabel/FieldLabel.tsx"],"sourcesContent":["/**\n * Shared regex for parsing inline markdown constructs.\n * Matches (in order): bold-italic `***`, bold `**`, italic `*`, highlight `==`, code `` ` ``\n */\nexport const INLINE_MARKDOWN_REGEX =\n /\\*\\*\\*(.+?)\\*\\*\\*|\\*\\*(.+?)\\*\\*|\\*(.+?)\\*|==(.+?)==|`(.+?)`/g;\n","import { ReactNode } from \"react\";\nimport styles from \"../components/InlineMarkdown/InlineMarkdown.module.scss\";\nimport { INLINE_MARKDOWN_REGEX } from \"../utils/inlineMarkdownRegex\";\n\n/**\n * Parses a limited set of inline markdown constructs in a string and returns React nodes.\n * `lastIndex` is reset at the start of each call and saved/restored around recursive calls\n * so a single shared regex instance is safe for nested parsing.\n *\n * Supported constructs (matched in order):\n * - `***text***` → `<strong><em>text</em></strong>`\n * - `**text**` → `<strong>text</strong>`\n * - `*text*` → `<em>text</em>`\n * - `==text==` → `<mark>`\n * - `` `text` `` → `<code>` (no nested markdown inside code)\n *\n * For plain-text stripping (e.g. aria-label), use `stripInlineMarkdown` from\n * `./stripInlineMarkdown` — it has no style dependencies.\n *\n * @param text - The string to parse\n * @returns Array of React nodes representing the parsed content\n */\nexport const parseInlineMarkdown = (text: string): ReactNode[] => {\n const parts: ReactNode[] = [];\n let lastIndex = 0;\n\n INLINE_MARKDOWN_REGEX.lastIndex = 0;\n let match: RegExpExecArray | null;\n\n while ((match = INLINE_MARKDOWN_REGEX.exec(text)) !== null) {\n if (match.index > lastIndex) {\n parts.push(text.substring(lastIndex, match.index));\n }\n\n const key = match.index;\n const savedIndex = INLINE_MARKDOWN_REGEX.lastIndex;\n\n if (match[1]) {\n // ***bold italic***\n parts.push(\n <strong key={key}>\n <em>{parseInlineMarkdown(match[1])}</em>\n </strong>,\n );\n } else if (match[2]) {\n // **bold**\n parts.push(<strong key={key}>{parseInlineMarkdown(match[2])}</strong>);\n } else if (match[3]) {\n // *italic*\n parts.push(<em key={key}>{parseInlineMarkdown(match[3])}</em>);\n } else if (match[4]) {\n // ==highlight==\n parts.push(\n <mark key={key} className={styles.highlight}>\n {parseInlineMarkdown(match[4])}\n </mark>,\n );\n } else if (match[5]) {\n // `code` — no recursion inside code\n parts.push(\n <code key={key} className={styles.code}>\n {match[5]}\n </code>,\n );\n }\n\n INLINE_MARKDOWN_REGEX.lastIndex = savedIndex;\n lastIndex = savedIndex;\n }\n\n if (lastIndex < text.length) {\n parts.push(text.substring(lastIndex));\n }\n\n return parts;\n};\n","import { FieldLabelProps } from \"../FieldLabel\";\nimport { Tooltip } from \"../../Tooltip\";\nimport { FieldLabelButton } from \"./FieldLabelButton\";\nimport { Icon } from \"../../Icon\";\nimport Info from \"@servicetitan/hammer-icon/mdi/round/info.svg\";\nimport styles from \"../FieldLabel.module.scss\";\nimport { SrOnly } from \"../../SrOnly\";\n\n/**\n * Internal component for rendering the info icon button with tooltip.\n *\n * @param props - Component props\n * @param props.moreInfo - The content to display in the tooltip\n * @param props.moreInfoId - ID for the visually-hidden description span, used by aria-describedby on the associated input\n */\nexport const FieldLabelMoreInfoIcon = ({\n moreInfo,\n moreInfoId,\n}: {\n moreInfo: FieldLabelProps[\"moreInfo\"];\n moreInfoId?: string;\n}) => {\n return (\n <div className={styles[\"info-container\"]}>\n {moreInfoId && <SrOnly id={moreInfoId}>{moreInfo}</SrOnly>}\n <Tooltip\n placement=\"top\"\n offset={5}\n fallbackPlacements={[\"right\", \"bottom\", \"left\"]}\n >\n <Tooltip.Trigger className={styles[\"info-trigger\"]}>\n <FieldLabelButton aria-label=\"More information\">\n <Icon svg={Info} />\n </FieldLabelButton>\n </Tooltip.Trigger>\n <Tooltip.Content className={styles[\"info-content\"]}>\n {moreInfo}\n </Tooltip.Content>\n </Tooltip>\n </div>\n );\n};\n","import { useMemo } from \"react\";\nimport { parseInlineMarkdown } from \"../../functions/inlineMarkdown\";\n\n/**\n * Props for the InlineMarkdown component\n * @property {string} [value] - The markdown string to parse and render\n */\nexport interface InlineMarkdownProps {\n value?: string;\n}\n\n/**\n * Renders a string with limited inline markdown constructs as formatted React content.\n *\n * Features:\n * - Bold: `**text**`\n * - Italic: `*text*`\n * - Bold and italic: `***text***`\n * - Highlight: `==text==`\n * - Inline code: `` `text` ``\n * - Memoized rendering for performance\n * - Passes through plain strings with no overhead\n *\n * @example\n * <InlineMarkdown value=\"Save **now** or `discard`\" />\n */\nexport const InlineMarkdown = ({ value = \"\" }: InlineMarkdownProps) => {\n const content = useMemo(() => parseInlineMarkdown(value), [value]);\n return <>{content}</>;\n};\n","import {\n forwardRef,\n ComponentPropsWithoutRef,\n ReactNode,\n type Ref,\n type ElementType,\n type JSX,\n type JSXElementConstructor,\n} from \"react\";\nimport cx from \"classnames\";\n\nimport styles from \"./FieldLabel.module.scss\";\nimport { TooltipProps } from \"../Tooltip\";\nimport { SrOnly } from \"../SrOnly\";\nimport { FieldLabelMoreInfoIcon } from \"./internal/FieldLabelMoreInfoIcon\";\nimport { AiMarkWithTooltipOrPopoverProps } from \"../../types\";\nimport { AiMark } from \"../../components/AiMark\";\nimport { InlineMarkdown } from \"../../internal/components/InlineMarkdown\";\n\ntype IntrinsicAttributes<\n E extends keyof JSX.IntrinsicElements | JSXElementConstructor<unknown>,\n> = JSX.LibraryManagedAttributes<E, ComponentPropsWithoutRef<E>>;\n\ntype FieldLabelOwnProps<E extends ElementType = ElementType> =\n AiMarkWithTooltipOrPopoverProps & {\n /** The HTML element to render */\n el?: E;\n /** Unique identifier for the label element */\n id?: string;\n /**\n * Whether the field is required. Shows a red asterisk (*) when true.\n * @default false\n */\n required?: boolean;\n /** Additional information to display in a tooltip */\n moreInfo?: ReactNode;\n /** ID for the sr-only description span, referenced via aria-describedby on the associated input. @internal */\n moreInfoId?: string;\n /**\n * Controls the open state of the more info tooltip.\n * @default false\n * @deprecated The more info tooltip is now triggered by a keyboard-accessible button. This prop has no effect.\n */\n moreInfoOpen?: TooltipProps[\"open\"];\n };\n\n/**\n * Props for the FieldLabel component.\n */\nexport type FieldLabelProps<E extends ElementType = ElementType> =\n FieldLabelOwnProps<E> &\n Omit<IntrinsicAttributes<E>, keyof FieldLabelOwnProps>;\n\n/**\n * FieldLabel component for form field labels with optional required indicator and help tooltip.\n *\n * Features:\n * - Accessible form label with proper semantic HTML\n * - Optional required field indicator with red asterisk\n * - Help tooltip with info icon for additional context\n * - Screen reader support for required field announcement\n * - Keyboard-accessible info icon button for additional field context\n * - Flexible content support for label text and help information\n * - Proper ARIA attributes and semantic structure\n * - Responsive design with consistent typography\n * - Polymorphic element support for different HTML elements\n *\n * @example\n * <FieldLabel htmlFor=\"email\" required>\n * Email Address\n * </FieldLabel>\n * <input id=\"email\" type=\"email\" />\n *\n * @example\n * <FieldLabel\n * el=\"label\"\n * htmlFor=\"password\"\n * required\n * moreInfo=\"Password must be at least 8 characters long\"\n * >\n * Password\n * </FieldLabel>\n * <input id=\"password\" type=\"password\" />\n *\n * @example\n * <FieldLabel el=\"legend\" required>\n * Form Section\n * </FieldLabel>\n */\nconst FieldLabelElement = forwardRef(\n (\n {\n aiMark,\n el: Element = \"label\",\n children,\n className,\n moreInfo,\n moreInfoId,\n required,\n moreInfoOpen: _moreInfoOpen, // deprecated, ignored\n ...props\n }: FieldLabelProps,\n ref,\n ) => {\n const FieldLabelClassNames = cx([styles[\"label\"]], className);\n\n const labelText = (\n <span className={styles[\"label-text\"]}>\n {/* TODO(v4.0.0): remove typeof check — children will always be string */}\n {typeof children === \"string\" ? (\n <InlineMarkdown value={children} />\n ) : (\n children\n )}\n {required ? (\n <>\n <span aria-hidden className={styles[\"required\"]}>\n *\n </span>\n <SrOnly>Required</SrOnly>\n </>\n ) : null}\n </span>\n );\n\n const hasMoreInfoOrAiMark = moreInfo || aiMark;\n\n // When el=\"label\" with moreInfo, a <button> cannot be a descendant of <label> per HTML spec.\n // Restructure: outer div wrapper + inner <label display:contents> + button as siblings.\n if (Element === \"label\" && hasMoreInfoOrAiMark) {\n const { htmlFor, id, ...labelProps } =\n props as ComponentPropsWithoutRef<\"label\">;\n return (\n <div className={FieldLabelClassNames} ref={ref as Ref<HTMLDivElement>}>\n <div className={styles[\"top-container\"]}>\n <label\n htmlFor={htmlFor}\n id={id}\n data-anv=\"label\"\n {...(labelProps as ComponentPropsWithoutRef<\"label\">)}\n >\n {labelText}\n </label>\n {moreInfo && (\n <FieldLabelMoreInfoIcon\n moreInfo={moreInfo}\n moreInfoId={moreInfoId}\n />\n )}\n {aiMark && (\n <AiMark\n className={styles[\"ai-mark-icon\"]}\n type=\"gradient\"\n popoverOrTooltipConfig={\n typeof aiMark === \"object\" ? aiMark : undefined\n }\n />\n )}\n </div>\n </div>\n );\n }\n\n return (\n <Element\n className={FieldLabelClassNames}\n data-anv=\"label\"\n ref={ref}\n {...props}\n >\n {hasMoreInfoOrAiMark ? (\n <div className={styles[\"top-container\"]}>\n {labelText}\n {moreInfo && (\n <FieldLabelMoreInfoIcon\n moreInfo={moreInfo}\n moreInfoId={moreInfoId}\n />\n )}\n {aiMark && (\n <AiMark\n className={styles[\"ai-mark-icon\"]}\n type=\"gradient\"\n popoverOrTooltipConfig={\n typeof aiMark === \"object\" ? aiMark : undefined\n }\n />\n )}\n </div>\n ) : (\n labelText\n )}\n </Element>\n );\n },\n);\n\nFieldLabelElement.displayName = \"FieldLabel\";\n\nexport const FieldLabel = FieldLabelElement as <\n E extends ElementType = \"label\",\n>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: FieldLabelProps<E> & { ref?: React.Ref<any> },\n) => JSX.Element;\n"],"names":["styles","Info"],"mappings":";;;;;;;;;AAIO,MAAM,qBAAA,GACX;;;;;;;;;ACiBK,MAAM,mBAAA,GAAsB,CAAC,IAAA,KAA8B;AAChE,EAAA,MAAM,QAAqB,EAAC;AAC5B,EAAA,IAAI,SAAA,GAAY,CAAA;AAEhB,EAAA,qBAAA,CAAsB,SAAA,GAAY,CAAA;AAClC,EAAA,IAAI,KAAA;AAEJ,EAAA,OAAA,CAAQ,KAAA,GAAQ,qBAAA,CAAsB,IAAA,CAAK,IAAI,OAAO,IAAA,EAAM;AAC1D,IAAA,IAAI,KAAA,CAAM,QAAQ,SAAA,EA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EAAK,UAAA;AAAA,cACL,sBAAA,EACE,OAAO,MAAA,KAAW,QAAA,GAAW,MAAA,GAAS;AAAA;AAAA;AAE1C,SAAA,EAEJ,CAAA,GAEA;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF,CAAA;AAEA,iBAAA,CAAkB,WAAA,GAAc,YAAA;AAEzB,MAAM,UAAA,GAAa;;;;"}
1
+ {"version":3,"file":"FieldLabel-1g9Y_K44.js","sources":["../src/internal/utils/inlineMarkdownRegex.ts","../src/internal/functions/inlineMarkdown.tsx","../src/components/FieldLabel/internal/FieldLabelMoreInfoIcon.tsx","../src/internal/components/InlineMarkdown/InlineMarkdown.tsx","../src/components/FieldLabel/FieldLabel.tsx"],"sourcesContent":["/**\n * Shared regex for parsing inline markdown constructs.\n * Matches (in order): bold-italic `***`, bold `**`, italic `*`, highlight `==`, code `` ` ``\n */\nexport const INLINE_MARKDOWN_REGEX =\n /\\*\\*\\*(.+?)\\*\\*\\*|\\*\\*(.+?)\\*\\*|\\*(.+?)\\*|==(.+?)==|`(.+?)`/g;\n","import { ReactNode } from \"react\";\nimport styles from \"../components/InlineMarkdown/InlineMarkdown.module.scss\";\nimport { INLINE_MARKDOWN_REGEX } from \"../utils/inlineMarkdownRegex\";\n\n/**\n * Parses a limited set of inline markdown constructs in a string and returns React nodes.\n * `lastIndex` is reset at the start of each call and saved/restored around recursive calls\n * so a single shared regex instance is safe for nested parsing.\n *\n * Supported constructs (matched in order):\n * - `***text***` → `<strong><em>text</em></strong>`\n * - `**text**` → `<strong>text</strong>`\n * - `*text*` → `<em>text</em>`\n * - `==text==` → `<mark>`\n * - `` `text` `` → `<code>` (no nested markdown inside code)\n *\n * For plain-text stripping (e.g. aria-label), use `stripInlineMarkdown` from\n * `./stripInlineMarkdown` — it has no style dependencies.\n *\n * @param text - The string to parse\n * @returns Array of React nodes representing the parsed content\n */\nexport const parseInlineMarkdown = (text: string): ReactNode[] => {\n const parts: ReactNode[] = [];\n let lastIndex = 0;\n\n INLINE_MARKDOWN_REGEX.lastIndex = 0;\n let match: RegExpExecArray | null;\n\n while ((match = INLINE_MARKDOWN_REGEX.exec(text)) !== null) {\n if (match.index > lastIndex) {\n parts.push(text.substring(lastIndex, match.index));\n }\n\n const key = match.index;\n const savedIndex = INLINE_MARKDOWN_REGEX.lastIndex;\n\n if (match[1]) {\n // ***bold italic***\n parts.push(\n <strong key={key}>\n <em>{parseInlineMarkdown(match[1])}</em>\n </strong>,\n );\n } else if (match[2]) {\n // **bold**\n parts.push(<strong key={key}>{parseInlineMarkdown(match[2])}</strong>);\n } else if (match[3]) {\n // *italic*\n parts.push(<em key={key}>{parseInlineMarkdown(match[3])}</em>);\n } else if (match[4]) {\n // ==highlight==\n parts.push(\n <mark key={key} className={styles.highlight}>\n {parseInlineMarkdown(match[4])}\n </mark>,\n );\n } else if (match[5]) {\n // `code` — no recursion inside code\n parts.push(\n <code key={key} className={styles.code}>\n {match[5]}\n </code>,\n );\n }\n\n INLINE_MARKDOWN_REGEX.lastIndex = savedIndex;\n lastIndex = savedIndex;\n }\n\n if (lastIndex < text.length) {\n parts.push(text.substring(lastIndex));\n }\n\n return parts;\n};\n","import { FieldLabelProps } from \"../FieldLabel\";\nimport { Tooltip } from \"../../Tooltip\";\nimport { FieldLabelButton } from \"./FieldLabelButton\";\nimport { Icon } from \"../../Icon\";\nimport Info from \"@servicetitan/hammer-icon/mdi/round/info.svg\";\nimport styles from \"../FieldLabel.module.scss\";\nimport { SrOnly } from \"../../SrOnly\";\n\n/**\n * Internal component for rendering the info icon button with tooltip.\n *\n * @param props - Component props\n * @param props.moreInfo - The content to display in the tooltip\n * @param props.moreInfoId - ID for the visually-hidden description span, used by aria-describedby on the associated input\n */\nexport const FieldLabelMoreInfoIcon = ({\n moreInfo,\n moreInfoId,\n}: {\n moreInfo: FieldLabelProps[\"moreInfo\"];\n moreInfoId?: string;\n}) => {\n return (\n <div className={styles[\"info-container\"]}>\n {moreInfoId && <SrOnly id={moreInfoId}>{moreInfo}</SrOnly>}\n <Tooltip\n placement=\"top\"\n offset={5}\n fallbackPlacements={[\"right\", \"bottom\", \"left\"]}\n >\n <Tooltip.Trigger className={styles[\"info-trigger\"]}>\n <FieldLabelButton aria-label=\"More information\">\n <Icon svg={Info} />\n </FieldLabelButton>\n </Tooltip.Trigger>\n <Tooltip.Content className={styles[\"info-content\"]}>\n {moreInfo}\n </Tooltip.Content>\n </Tooltip>\n </div>\n );\n};\n","import { useMemo } from \"react\";\nimport { parseInlineMarkdown } from \"../../functions/inlineMarkdown\";\n\n/**\n * Props for the InlineMarkdown component\n * @property {string} [value] - The markdown string to parse and render\n */\nexport interface InlineMarkdownProps {\n value?: string;\n}\n\n/**\n * Renders a string with limited inline markdown constructs as formatted React content.\n *\n * Features:\n * - Bold: `**text**`\n * - Italic: `*text*`\n * - Bold and italic: `***text***`\n * - Highlight: `==text==`\n * - Inline code: `` `text` ``\n * - Memoized rendering for performance\n * - Passes through plain strings with no overhead\n *\n * @example\n * <InlineMarkdown value=\"Save **now** or `discard`\" />\n */\nexport const InlineMarkdown = ({ value = \"\" }: InlineMarkdownProps) => {\n const content = useMemo(() => parseInlineMarkdown(value), [value]);\n return <>{content}</>;\n};\n","import {\n forwardRef,\n ComponentPropsWithoutRef,\n ReactNode,\n type Ref,\n type ElementType,\n type JSX,\n type JSXElementConstructor,\n} from \"react\";\nimport cx from \"classnames\";\n\nimport styles from \"./FieldLabel.module.scss\";\nimport { TooltipProps } from \"../Tooltip\";\nimport { SrOnly } from \"../SrOnly\";\nimport { FieldLabelMoreInfoIcon } from \"./internal/FieldLabelMoreInfoIcon\";\nimport { AiMarkWithTooltipOrPopoverProps } from \"../../types\";\nimport { AiMark } from \"../../components/AiMark\";\nimport { InlineMarkdown } from \"../../internal/components/InlineMarkdown\";\n\ntype IntrinsicAttributes<\n E extends keyof JSX.IntrinsicElements | JSXElementConstructor<unknown>,\n> = JSX.LibraryManagedAttributes<E, ComponentPropsWithoutRef<E>>;\n\ntype FieldLabelOwnProps<E extends ElementType = ElementType> =\n AiMarkWithTooltipOrPopoverProps & {\n /** The HTML element to render */\n el?: E;\n /** Unique identifier for the label element */\n id?: string;\n /**\n * Whether the field is required. Shows a red asterisk (*) when true.\n * @default false\n */\n required?: boolean;\n /** Additional information to display in a tooltip */\n moreInfo?: ReactNode;\n /** ID for the sr-only description span, referenced via aria-describedby on the associated input. @internal */\n moreInfoId?: string;\n /**\n * Controls the open state of the more info tooltip.\n * @default false\n * @deprecated The more info tooltip is now triggered by a keyboard-accessible button. This prop has no effect.\n */\n moreInfoOpen?: TooltipProps[\"open\"];\n };\n\n/**\n * Props for the FieldLabel component.\n */\nexport type FieldLabelProps<E extends ElementType = ElementType> =\n FieldLabelOwnProps<E> &\n Omit<IntrinsicAttributes<E>, keyof FieldLabelOwnProps>;\n\n/**\n * FieldLabel component for form field labels with optional required indicator and help tooltip.\n *\n * Features:\n * - Accessible form label with proper semantic HTML\n * - Optional required field indicator with red asterisk\n * - Help tooltip with info icon for additional context\n * - Screen reader support for required field announcement\n * - Keyboard-accessible info icon button for additional field context\n * - Flexible content support for label text and help information\n * - Proper ARIA attributes and semantic structure\n * - Responsive design with consistent typography\n * - Polymorphic element support for different HTML elements\n *\n * @example\n * <FieldLabel htmlFor=\"email\" required>\n * Email Address\n * </FieldLabel>\n * <input id=\"email\" type=\"email\" />\n *\n * @example\n * <FieldLabel\n * el=\"label\"\n * htmlFor=\"password\"\n * required\n * moreInfo=\"Password must be at least 8 characters long\"\n * >\n * Password\n * </FieldLabel>\n * <input id=\"password\" type=\"password\" />\n *\n * @example\n * <FieldLabel el=\"legend\" required>\n * Form Section\n * </FieldLabel>\n */\nconst FieldLabelElement = forwardRef(\n (\n {\n aiMark,\n el: Element = \"label\",\n children,\n className,\n moreInfo,\n moreInfoId,\n required,\n moreInfoOpen: _moreInfoOpen, // deprecated, ignored\n ...props\n }: FieldLabelProps,\n ref,\n ) => {\n const FieldLabelClassNames = cx([styles[\"label\"]], className);\n\n const labelText = (\n <span className={styles[\"label-text\"]}>\n {/* TODO(v4.0.0): remove typeof check — children will always be string */}\n {typeof children === \"string\" ? (\n <InlineMarkdown value={children} />\n ) : (\n children\n )}\n {required ? (\n <>\n <span aria-hidden className={styles[\"required\"]}>\n *\n </span>\n <SrOnly>Required</SrOnly>\n </>\n ) : null}\n </span>\n );\n\n const hasMoreInfoOrAiMark = moreInfo || aiMark;\n\n // When el=\"label\" with moreInfo, a <button> cannot be a descendant of <label> per HTML spec.\n // Restructure: outer div wrapper + inner <label display:contents> + button as siblings.\n if (Element === \"label\" && hasMoreInfoOrAiMark) {\n const { htmlFor, id, ...labelProps } =\n props as ComponentPropsWithoutRef<\"label\">;\n return (\n <div className={FieldLabelClassNames} ref={ref as Ref<HTMLDivElement>}>\n <div className={styles[\"top-container\"]}>\n <label\n htmlFor={htmlFor}\n id={id}\n data-anv=\"label\"\n {...(labelProps as ComponentPropsWithoutRef<\"label\">)}\n >\n {labelText}\n </label>\n {moreInfo && (\n <FieldLabelMoreInfoIcon\n moreInfo={moreInfo}\n moreInfoId={moreInfoId}\n />\n )}\n {aiMark && (\n <AiMark\n className={styles[\"ai-mark-icon\"]}\n type=\"gradient\"\n popoverOrTooltipConfig={\n typeof aiMark === \"object\" ? aiMark : undefined\n }\n />\n )}\n </div>\n </div>\n );\n }\n\n return (\n <Element\n className={FieldLabelClassNames}\n data-anv=\"label\"\n ref={ref}\n {...props}\n >\n {hasMoreInfoOrAiMark ? (\n <div className={styles[\"top-container\"]}>\n {labelText}\n {moreInfo && (\n <FieldLabelMoreInfoIcon\n moreInfo={moreInfo}\n moreInfoId={moreInfoId}\n />\n )}\n {aiMark && (\n <AiMark\n className={styles[\"ai-mark-icon\"]}\n type=\"gradient\"\n popoverOrTooltipConfig={\n typeof aiMark === \"object\" ? aiMark : undefined\n }\n />\n )}\n </div>\n ) : (\n labelText\n )}\n </Element>\n );\n },\n);\n\nFieldLabelElement.displayName = \"FieldLabel\";\n\nexport const FieldLabel = FieldLabelElement as <\n E extends ElementType = \"label\",\n>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: FieldLabelProps<E> & { ref?: React.Ref<any> },\n) => JSX.Element;\n"],"names":["styles","Info"],"mappings":";;;;;;;;;AAIO,MAAM,qBAAA,GACX;;;;;;;;;ACiBK,MAAM,mBAAA,GAAsB,CAAC,IAAA,KAA8B;AAChE,EAAA,MAAM,QAAqB,EAAC;AAC5B,EAAA,IAAI,SAAA,GAAY,CAAA;AAEhB,EAAA,qBAAA,CAAsB,SAAA,GAAY,CAAA;AAClC,EAAA,IAAI,KAAA;AAEJ,EAAA,OAAA,CAAQ,KAAA,GAAQ,qBAAA,CAAsB,IAAA,CAAK,IAAI,OAAO,IAAA,EAAM;AAC1D,IAAA,IAAI,KAAA,CAAM,QAAQ,SAAA,EAAW;AAC3B,MAAA,KAAA,CAAM,KAAK,IAAA,CAAK,SAAA,CAAU,SAAA,EAAW,KAAA,CAAM,KAAK,CAAC,CAAA;AAAA,IACnD;AAEA,IAAA,MAAM,MAAM,KAAA,CAAM,KAAA;AAClB,IAAA,MAAM,aAAa,qBAAA,CAAsB,SAAA;AAEzC,IAAA,IAAI,KAAA,CAAM,CAAC,CAAA,EAAG;AAEZ,MAAA,KAAA,CAAM,IAAA;AAAA,wBACJ,GAAA,CAAC,QAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAI,QAAA,EAAA,mBAAA,CAAoB,MAAM,CAAC,CAAC,CAAA,EAAE,CAAA,EAAA,EADxB,GAEb;AAAA,OACF;AAAA,IACF,CAAA,MAAA,IAAW,KAAA,CAAM,CAAC,CAAA,EAAG;AAEnB,MAAA,KAAA,CAAM,IAAA,qBAAM,QAAA,EAAA,EAAkB,QAAA,EAAA,mBAAA,CAAoB,MAAM,CAAC,CAAC,CAAA,EAAA,EAAlC,GAAoC,CAAS,CAAA;AAAA,IACvE,CAAA,MAAA,IAAW,KAAA,CAAM,CAAC,CAAA,EAAG;AAEnB,MAAA,KAAA,CAAM,IAA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A,uBACE,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,oBAAA;AAAA,QACX,UAAA,EAAS,OAAA;AAAA,QACT,GAAA;AAAA,QACC,GAAG,KAAA;AAAA,QAEH,gDACC,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,eAAe,CAAA,EACnC,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,UACA,QAAA,oBACC,GAAA;AAAA,YAAC,sBAAA;AAAA,YAAA;AAAA,cACC,QAAA;AAAA,cACA;AAAA;AAAA,WACF;AAAA,UAED,MAAA,oBACC,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,OAAO,cAAc,CAAA;AAAA,cAChC,IAAA,EAAK,UAAA;AAAA,cACL,sBAAA,EACE,OAAO,MAAA,KAAW,QAAA,GAAW,MAAA,GAAS;AAAA;AAAA;AAE1C,SAAA,EAEJ,CAAA,GAEA;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF,CAAA;AAEA,iBAAA,CAAkB,WAAA,GAAc,YAAA;AAEzB,MAAM,UAAA,GAAa;;;;"}
@@ -1,2 +1,2 @@
1
- export { F as FieldLabel, F as default } from './FieldLabel-Qxe_2xNX.js';
1
+ export { F as FieldLabel, F as default } from './FieldLabel-1g9Y_K44.js';
2
2
  //# sourceMappingURL=FieldLabel.js.map
@@ -1,7 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef, useRef, useMemo, isValidElement, cloneElement } from 'react';
3
- import { u as useMergeRefs } from './AiMark-Dge6ktmW.js';
4
- import { T as TextField } from './TextField-Be-VJZPT.js';
3
+ import { u as useMergeRefs } from './AiMark-DINVII8-.js';
4
+ import { T as TextField } from './TextField-PMLHWUlx.js';
5
5
  import { u as useOptionallyControlledState } from './useOptionallyControlledState-DbDuos5L.js';
6
6
  import { c as childrenToString } from './childrenToString-Bz9MqbHb.js';
7
7
  import { useTrackingId } from './useTrackingId.js';
@@ -261,4 +261,4 @@ const InputMask = forwardRef(
261
261
  InputMask.displayName = "InputMask";
262
262
 
263
263
  export { InputMask as I };
264
- //# sourceMappingURL=InputMask-CcbJbNCy.js.map
264
+ //# sourceMappingURL=InputMask-Bd4tw5-x.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputMask-CcbJbNCy.js","sources":["../src/components/InputMask/internal/constants.ts","../src/components/InputMask/internal/utils.ts","../src/components/InputMask/InputMask.tsx"],"sourcesContent":["export const MASK_CHARS = [\"a\", \"9\", \"*\"];\n","import { MASK_CHARS } from \"./constants\";\n\n/**\n * This function applies the mask to the input value, returning a new string that matches the mask's format.\n * @param value - a string representing the raw input value (e.g., what the user typed)\n * @param mask - a string representing the desired input mask (e.g., \"99/99/9999\" for a date)\n * @param defaultMaskCharacter - a string representing the default mask character (e.g., \"_\")\n * @returns a string representing the masked value (e.g., \"12/31/2025\" for a date)\n *\n * @example\n * applyMask(\"1234567890\", \"99/99/9999\", \"_\") // \"12/31/2025\"\n * applyMask(\"1234567890\", \"999-999-9999\", \"-\") // \"123-456-7890\"\n * applyMask(\"123\", \"99/99\", \"_\") // \"12/3_\"\n */\nexport function applyMask(\n value: string,\n mask: string,\n defaultMaskCharacter: string,\n) {\n let maskedValue = \"\";\n let valueIndex = 0;\n for (let i = 0; i < mask.length; i++) {\n const maskChar = mask[i];\n if (MASK_CHARS.includes(maskChar)) {\n // Find next acceptable char in value\n while (\n valueIndex < value.length &&\n !isAcceptableChar(value[valueIndex], maskChar)\n ) {\n valueIndex++;\n }\n if (valueIndex < value.length) {\n maskedValue += value[valueIndex];\n valueIndex++;\n } else {\n maskedValue += defaultMaskCharacter;\n }\n } else {\n maskedValue += maskChar;\n }\n }\n return maskedValue;\n}\n/**\n * This function checks if a character is acceptable for a given mask character.\n * @param char - a string representing the character to check\n * @param maskChar - a string representing the mask character\n * @returns a boolean indicating if the character is acceptable\n */\nfunction isAcceptableChar(char: string, maskChar: string) {\n if (maskChar === \"9\") {\n return /\\d/.test(char);\n }\n if (maskChar === \"a\") {\n return /[a-zA-Z]/.test(char);\n }\n if (maskChar === \"*\") {\n return /[a-zA-Z0-9]/.test(char);\n }\n return false;\n}\n/**\n * This function finds the next open character in a given value.\n * @param value - a string representing the value to search\n * @param defaultMaskCharacter - a string representing the default mask character (e.g., \"_\")\n * @returns a number representing the index of the next open character\n */\nexport function getNextOpenCharacterIndex(\n value: string,\n defaultMaskCharacter: string,\n) {\n let idx = value.indexOf(defaultMaskCharacter);\n if (idx < 0) {\n idx = value.length;\n }\n return idx;\n}\n/**\n * This function finds the first non-fixed character in the value.\n * @param startingIndex - a number representing the index to start searching from\n * @param fixedCharacterIndices - an array of numbers representing the indices of the fixed characters\n * @returns a number representing the index of the first non-fixed character\n */\nexport function getFirstNonFixedCharacterIndex(\n startingIndex: number,\n fixedCharacterIndices: number[],\n) {\n let idx = startingIndex;\n while (fixedCharacterIndices.includes(idx)) {\n idx++;\n }\n return idx;\n}\n/**\n * This function finds the last filled character in a given value.\n * @param value - a string representing the value to search\n * @param mask - a string representing the mask\n * @returns a number representing the index of the last filled character\n */\nexport function getLastFilledCharacterIndex(value: string, mask: string) {\n let idx = value\n .split(\"\")\n .findLastIndex((char, i) => isAcceptableChar(char, mask[i]));\n if (idx < 0) {\n idx = 0;\n }\n return idx;\n}\n/**\n * This function finds the first filled character in a given value.\n * @param value - a string representing the value to search\n * @param mask - a string representing the mask\n * @returns a number representing the index of the first filled character\n */\nexport function getFirstFilledCharacterIndex(value: string, mask: string) {\n let idx = value\n .split(\"\")\n .findIndex((char, i) => isAcceptableChar(char, mask[i]));\n if (idx < 0) {\n idx = 0;\n }\n return idx;\n}\n","import {\n ChangeEvent,\n ChangeEventHandler,\n FocusEvent,\n KeyboardEvent,\n InputHTMLAttributes,\n ReactElement,\n cloneElement,\n forwardRef,\n isValidElement,\n useRef,\n useMemo,\n MouseEvent,\n} from \"react\";\nimport { useMergeRefs } from \"@floating-ui/react\";\nimport { useOptionallyControlledState } from \"../../internal/hooks\";\nimport { useTrackingId } from \"../../hooks\";\nimport { TextField, TextFieldProps } from \"../TextField/internal/TextField\";\nimport { childrenToString } from \"../../internal/functions\";\nimport {\n applyMask,\n getLastFilledCharacterIndex,\n getFirstFilledCharacterIndex,\n getFirstNonFixedCharacterIndex,\n getNextOpenCharacterIndex,\n} from \"./internal/utils\";\nimport { MASK_CHARS } from \"./internal/constants\";\nimport { DataTrackingId } from \"../../types\";\n\n/**\n * Props for InputMask when using with children\n */\ninterface InputMaskPropsWithChildren {\n /**\n * Custom input element to be wrapped with mask functionality.\n */\n children: ReactElement<InputHTMLAttributes<HTMLInputElement>>;\n /**\n * Additional props to pass to the input element.\n */\n inputProps?: InputHTMLAttributes<HTMLInputElement>;\n}\n\n/**\n * Props for InputMask when using without children\n */\ninterface InputMaskPropsWithoutChildren {\n /**\n * No children allowed when using default TextField.\n */\n children?: never;\n /**\n * Props to pass to the default TextField component.\n */\n inputProps?: TextFieldProps;\n}\n\n/**\n * Configuration for custom mask handler matching\n */\ninterface ICustomMaskHandlerMatch {\n /**\n * Regular expression pattern to match against input.\n */\n matchPattern: RegExp;\n /**\n * Starting position in the input string.\n */\n startPosition: number;\n /**\n * Ending position in the input string.\n */\n endPosition: number;\n}\n\n/**\n * Configuration for custom mask handler application\n */\ninterface ICustomMaskHandlerApply {\n /**\n * Pattern to apply when match is found.\n */\n applyPattern: string;\n /**\n * Offset to apply to cursor position after transformation.\n */\n caretOffset: number;\n}\n\n/**\n * Custom mask handler for advanced input transformations\n */\ninterface ICustomMaskHandler {\n /**\n * Matching configuration for the handler.\n */\n match: ICustomMaskHandlerMatch;\n /**\n * Application configuration for the handler.\n */\n apply: ICustomMaskHandlerApply;\n}\n\n/**\n * Shared props for InputMask component\n */\ninterface SharedInputMaskProps {\n /**\n * The mask pattern to apply to the input.\n * - \"9\" for digits only\n * - \"a\" for letters only\n * - \"*\" for alphanumeric\n * - Any other character is treated as a fixed character\n */\n mask: string;\n /**\n * Character to display for unfilled mask positions.\n * @default \"_\"\n */\n defaultMaskCharacter?: string;\n /**\n * Controlled value for the input.\n */\n value?: string;\n /**\n * Default value for uncontrolled input.\n */\n defaultValue?: string;\n /**\n * Callback function called when input value changes.\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Array of custom mask handlers for advanced transformations.\n */\n customMaskHandler?: ICustomMaskHandler[];\n}\n\ntype SpecialChange = {\n reason: \"Backspace\" | \"Delete\" | \"Edit\";\n start: number;\n end: number;\n};\n\n/**\n * Props for the InputMask component\n * @property {string} mask - The mask pattern to apply to the input (9 for digits, a for letters, * for alphanumeric)\n * @property {string} [defaultMaskCharacter] - Character to display for unfilled mask positions\n * @property {array} [customMaskHandler] - Array of custom mask handlers for advanced transformations\n * @property {object} [inputProps] - Props to pass to the input component\n * @property {ReactElement} [children] - Custom input element to be wrapped with mask functionality\n * @property {string} [data-tracking-id] - Custom tracking ID for analytics\n */\nexport type InputMaskProps = SharedInputMaskProps &\n (InputMaskPropsWithChildren | InputMaskPropsWithoutChildren) &\n DataTrackingId;\n\n/**\n * InputMask component for applying input masks and formatting to text inputs.\n *\n * @deprecated Use the TextField component with custom masking instead. Over time, we intend to release additional components with built-in masking.\n */\nexport const InputMask = forwardRef<HTMLInputElement, InputMaskProps>(\n (\n {\n children,\n mask,\n defaultMaskCharacter = \"_\",\n value,\n defaultValue,\n onChange,\n inputProps,\n \"data-tracking-id\": dataTrackingId,\n },\n ref,\n ) => {\n const [v, setV] = useOptionallyControlledState({\n controlledValue:\n value !== undefined\n ? applyMask(value, mask, defaultMaskCharacter)\n : undefined,\n defaultValue: applyMask(defaultValue || \"\", mask, defaultMaskCharacter),\n // Omitting the onChange handler here because we want to handle it ourselves (i.e. send an event instead of just the value)\n });\n const specialChange = useRef<SpecialChange | null>(null);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n const passInRef = useMergeRefs([inputRef, ref]);\n\n const currentOpenCharacterCount = useMemo(() => {\n return v.split(\"\").filter((char) => char === defaultMaskCharacter).length;\n }, [v, defaultMaskCharacter]);\n\n const fixedCharacterIndices = useMemo(() => {\n const fixedIndices: number[] = [];\n mask.split(\"\").forEach((char, i) => {\n if (!MASK_CHARS.includes(char)) {\n fixedIndices.push(i);\n }\n });\n return fixedIndices;\n }, [mask]);\n\n const moveCursorTo = (start: number, end: number = start) => {\n requestAnimationFrame(() => {\n inputRef.current?.setSelectionRange(start, end);\n });\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n let newVal = applyMask(e.target.value, mask, defaultMaskCharacter);\n if (\n // A single character was backspaced\n specialChange.current?.reason === \"Backspace\" &&\n specialChange.current.start === specialChange.current.end\n ) {\n // If the character before the backspace is a fixed character, we need to remove the filled character before the fixed character\n if (fixedCharacterIndices.includes(specialChange.current.start - 1)) {\n const removeIndex = getLastFilledCharacterIndex(\n newVal.slice(0, specialChange.current.start),\n mask,\n );\n newVal = applyMask(\n newVal.slice(0, removeIndex) + newVal.slice(removeIndex + 1),\n mask,\n defaultMaskCharacter,\n );\n moveCursorTo(removeIndex, removeIndex);\n } else {\n const idx = Math.min(\n getLastFilledCharacterIndex(newVal, mask) + 1,\n specialChange.current.start - 1,\n );\n moveCursorTo(idx, idx);\n }\n } else if (\n // A single character was deleted\n specialChange.current?.reason === \"Delete\" &&\n specialChange.current.start === specialChange.current.end\n ) {\n // If the character after the delete is a fixed character, we need to remove the filled character after the fixed character\n if (fixedCharacterIndices.includes(specialChange.current.start)) {\n const removeIndex = getFirstFilledCharacterIndex(\n newVal.slice(specialChange.current.start + 1),\n mask,\n );\n newVal = applyMask(\n newVal.slice(0, removeIndex) + newVal.slice(removeIndex + 1),\n mask,\n defaultMaskCharacter,\n );\n }\n const firstFilledIdx = getFirstFilledCharacterIndex(newVal, mask);\n const targetIdx = Math.max(firstFilledIdx, specialChange.current.start);\n moveCursorTo(targetIdx, targetIdx);\n } else if (\n specialChange.current?.reason === \"Edit\" &&\n specialChange.current.start === specialChange.current.end // A single character was edited\n ) {\n const firstNonFixedIdx = getFirstNonFixedCharacterIndex(\n specialChange.current.start + 1,\n fixedCharacterIndices,\n );\n moveCursorTo(firstNonFixedIdx, firstNonFixedIdx);\n } else {\n const newIndex = getNextOpenCharacterIndex(\n newVal,\n defaultMaskCharacter,\n );\n moveCursorTo(newIndex, newIndex);\n }\n\n setV(newVal);\n if (inputRef.current) {\n inputRef.current.value = newVal;\n }\n onChange?.({ ...e, target: { ...e.target, value: newVal } });\n };\n\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n requestAnimationFrame(() => {\n if (\n e.target.selectionStart === null ||\n e.target.selectionStart === undefined ||\n e.target.selectionStart >= v.length\n ) {\n const newIndex = getNextOpenCharacterIndex(v, defaultMaskCharacter);\n moveCursorTo(newIndex, newIndex);\n }\n });\n inputProps?.onFocus?.(e);\n };\n\n const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n const target = e.target as HTMLInputElement;\n if (target.selectionStart === null || target.selectionEnd === null) {\n return;\n }\n if (e.key === \"Backspace\") {\n specialChange.current = {\n reason: \"Backspace\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else if (e.key === \"Delete\") {\n specialChange.current = {\n reason: \"Delete\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else if (currentOpenCharacterCount === 0) {\n specialChange.current = {\n reason: \"Edit\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else {\n specialChange.current = null;\n }\n inputProps?.onKeyDown?.(e);\n };\n\n const handleClick = (e: MouseEvent<HTMLInputElement>) => {\n // For future use.\n e.preventDefault();\n e.stopPropagation();\n inputProps?.onClick?.(e);\n };\n\n const handleBlur = (e: FocusEvent<HTMLInputElement>) => {\n // For future use.\n e.preventDefault();\n e.stopPropagation();\n inputProps?.onBlur?.(e);\n };\n\n const mergedInputProps = {\n ...inputProps,\n ...(children && isValidElement(children) ? children.props : {}),\n value: v,\n onChange: handleChange,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onClick: handleClick,\n onBlur: handleBlur,\n ref: passInRef,\n };\n\n const isInputEmpty = useMemo(() => {\n if (v.length === 0) {\n return true;\n }\n return v === applyMask(\"\", mask, defaultMaskCharacter);\n }, [v, defaultMaskCharacter, mask]);\n\n const data = {\n label:\n \"label\" in mergedInputProps\n ? childrenToString(mergedInputProps.label)\n : null,\n labelProps:\n \"labelProps\" in mergedInputProps ? mergedInputProps.labelProps : null,\n prefix: childrenToString(mergedInputProps.prefix),\n hint:\n \"hint\" in mergedInputProps\n ? childrenToString(mergedInputProps.hint)\n : null,\n description:\n \"description\" in mergedInputProps\n ? childrenToString(mergedInputProps.description)\n : null,\n size: mergedInputProps.size,\n type: mergedInputProps.type,\n };\n\n const trackingId = useTrackingId({\n name: \"InputMask\",\n data,\n hasOverride: !!dataTrackingId,\n });\n\n return children && isValidElement(children) && children.type === \"input\" ? (\n cloneElement(children, {\n ...mergedInputProps,\n \"data-tracking-id\": trackingId,\n } as InputHTMLAttributes<HTMLInputElement> & {\n \"data-tracking-id\"?: string;\n })\n ) : (\n <TextField\n data-input-empty={isInputEmpty}\n data-tracking-id={trackingId}\n {...(mergedInputProps as TextFieldProps)}\n />\n );\n },\n);\n\nInputMask.displayName = \"InputMask\";\n"],"names":[],"mappings":";;;;;;;;AAAO,MAAM,UAAA,GAAa,CAAC,GAAA,EAAK,GAAA,EAAK,GAAG,CAAA;;ACcjC,SAAS,SAAA,CACd,KAAA,EACA,IAAA,EACA,oBAAA,EACA;AACA,EAAA,IAAI,WAAA,GAAc,EAAA;AAClB,EAAA,IAAI,UAAA,GAAa,CAAA;AACjB,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,IAAA,CAAK,QAAQ,CAAA,EAAA,EAAK;AACpC,IAAA,MAAM,QAAA,GAAW,KAAK,CAAC,CAAA;AACvB,IAAA,IAAI,UAAA,CAAW,QAAA,CAAS,QAAQ,CAAA,EAAG;AAEjC,MAAA,OACE,UAAA,GAAa,MAAM,MAAA,IACnB,CAA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,IAAA;AAAA,MACN,MAAM,gBAAA,CAAiB,IAAA;AAAA,MACvB,MAAM,gBAAA,CAAiB;AAAA,KACzB;AAEA,IAAA,MAAM,aAAa,aAAA,CAAc;AAAA,MAC/B,IAAA,EAAM,WAAA;AAAA,MACN,IAAA;AAAA,MACA,WAAA,EAAa,CAAC,CAAC;AAAA,KAChB,CAAA;AAED,IAAA,OAAO,QAAA,IAAY,eAAe,QAAQ,CAAA,IAAK,SAAS,IAAA,KAAS,OAAA,GAC/D,aAAa,QAAA,EAAU;AAAA,MACrB,GAAG,gBAAA;AAAA,MACH,kBAAA,EAAoB;AAAA,KAGrB,CAAA,mBAED,GAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,kBAAA,EAAkB,YAAA;AAAA,QAClB,kBAAA,EAAkB,UAAA;AAAA,QACjB,GAAI;AAAA;AAAA,KACP;AAAA,EAEJ;AACF;AAEA,SAAA,CAAU,WAAA,GAAc,WAAA;;;;"}
1
+ {"version":3,"file":"InputMask-Bd4tw5-x.js","sources":["../src/components/InputMask/internal/constants.ts","../src/components/InputMask/internal/utils.ts","../src/components/InputMask/InputMask.tsx"],"sourcesContent":["export const MASK_CHARS = [\"a\", \"9\", \"*\"];\n","import { MASK_CHARS } from \"./constants\";\n\n/**\n * This function applies the mask to the input value, returning a new string that matches the mask's format.\n * @param value - a string representing the raw input value (e.g., what the user typed)\n * @param mask - a string representing the desired input mask (e.g., \"99/99/9999\" for a date)\n * @param defaultMaskCharacter - a string representing the default mask character (e.g., \"_\")\n * @returns a string representing the masked value (e.g., \"12/31/2025\" for a date)\n *\n * @example\n * applyMask(\"1234567890\", \"99/99/9999\", \"_\") // \"12/31/2025\"\n * applyMask(\"1234567890\", \"999-999-9999\", \"-\") // \"123-456-7890\"\n * applyMask(\"123\", \"99/99\", \"_\") // \"12/3_\"\n */\nexport function applyMask(\n value: string,\n mask: string,\n defaultMaskCharacter: string,\n) {\n let maskedValue = \"\";\n let valueIndex = 0;\n for (let i = 0; i < mask.length; i++) {\n const maskChar = mask[i];\n if (MASK_CHARS.includes(maskChar)) {\n // Find next acceptable char in value\n while (\n valueIndex < value.length &&\n !isAcceptableChar(value[valueIndex], maskChar)\n ) {\n valueIndex++;\n }\n if (valueIndex < value.length) {\n maskedValue += value[valueIndex];\n valueIndex++;\n } else {\n maskedValue += defaultMaskCharacter;\n }\n } else {\n maskedValue += maskChar;\n }\n }\n return maskedValue;\n}\n/**\n * This function checks if a character is acceptable for a given mask character.\n * @param char - a string representing the character to check\n * @param maskChar - a string representing the mask character\n * @returns a boolean indicating if the character is acceptable\n */\nfunction isAcceptableChar(char: string, maskChar: string) {\n if (maskChar === \"9\") {\n return /\\d/.test(char);\n }\n if (maskChar === \"a\") {\n return /[a-zA-Z]/.test(char);\n }\n if (maskChar === \"*\") {\n return /[a-zA-Z0-9]/.test(char);\n }\n return false;\n}\n/**\n * This function finds the next open character in a given value.\n * @param value - a string representing the value to search\n * @param defaultMaskCharacter - a string representing the default mask character (e.g., \"_\")\n * @returns a number representing the index of the next open character\n */\nexport function getNextOpenCharacterIndex(\n value: string,\n defaultMaskCharacter: string,\n) {\n let idx = value.indexOf(defaultMaskCharacter);\n if (idx < 0) {\n idx = value.length;\n }\n return idx;\n}\n/**\n * This function finds the first non-fixed character in the value.\n * @param startingIndex - a number representing the index to start searching from\n * @param fixedCharacterIndices - an array of numbers representing the indices of the fixed characters\n * @returns a number representing the index of the first non-fixed character\n */\nexport function getFirstNonFixedCharacterIndex(\n startingIndex: number,\n fixedCharacterIndices: number[],\n) {\n let idx = startingIndex;\n while (fixedCharacterIndices.includes(idx)) {\n idx++;\n }\n return idx;\n}\n/**\n * This function finds the last filled character in a given value.\n * @param value - a string representing the value to search\n * @param mask - a string representing the mask\n * @returns a number representing the index of the last filled character\n */\nexport function getLastFilledCharacterIndex(value: string, mask: string) {\n let idx = value\n .split(\"\")\n .findLastIndex((char, i) => isAcceptableChar(char, mask[i]));\n if (idx < 0) {\n idx = 0;\n }\n return idx;\n}\n/**\n * This function finds the first filled character in a given value.\n * @param value - a string representing the value to search\n * @param mask - a string representing the mask\n * @returns a number representing the index of the first filled character\n */\nexport function getFirstFilledCharacterIndex(value: string, mask: string) {\n let idx = value\n .split(\"\")\n .findIndex((char, i) => isAcceptableChar(char, mask[i]));\n if (idx < 0) {\n idx = 0;\n }\n return idx;\n}\n","import {\n ChangeEvent,\n ChangeEventHandler,\n FocusEvent,\n KeyboardEvent,\n InputHTMLAttributes,\n ReactElement,\n cloneElement,\n forwardRef,\n isValidElement,\n useRef,\n useMemo,\n MouseEvent,\n} from \"react\";\nimport { useMergeRefs } from \"@floating-ui/react\";\nimport { useOptionallyControlledState } from \"../../internal/hooks\";\nimport { useTrackingId } from \"../../hooks\";\nimport { TextField, TextFieldProps } from \"../TextField/internal/TextField\";\nimport { childrenToString } from \"../../internal/functions\";\nimport {\n applyMask,\n getLastFilledCharacterIndex,\n getFirstFilledCharacterIndex,\n getFirstNonFixedCharacterIndex,\n getNextOpenCharacterIndex,\n} from \"./internal/utils\";\nimport { MASK_CHARS } from \"./internal/constants\";\nimport { DataTrackingId } from \"../../types\";\n\n/**\n * Props for InputMask when using with children\n */\ninterface InputMaskPropsWithChildren {\n /**\n * Custom input element to be wrapped with mask functionality.\n */\n children: ReactElement<InputHTMLAttributes<HTMLInputElement>>;\n /**\n * Additional props to pass to the input element.\n */\n inputProps?: InputHTMLAttributes<HTMLInputElement>;\n}\n\n/**\n * Props for InputMask when using without children\n */\ninterface InputMaskPropsWithoutChildren {\n /**\n * No children allowed when using default TextField.\n */\n children?: never;\n /**\n * Props to pass to the default TextField component.\n */\n inputProps?: TextFieldProps;\n}\n\n/**\n * Configuration for custom mask handler matching\n */\ninterface ICustomMaskHandlerMatch {\n /**\n * Regular expression pattern to match against input.\n */\n matchPattern: RegExp;\n /**\n * Starting position in the input string.\n */\n startPosition: number;\n /**\n * Ending position in the input string.\n */\n endPosition: number;\n}\n\n/**\n * Configuration for custom mask handler application\n */\ninterface ICustomMaskHandlerApply {\n /**\n * Pattern to apply when match is found.\n */\n applyPattern: string;\n /**\n * Offset to apply to cursor position after transformation.\n */\n caretOffset: number;\n}\n\n/**\n * Custom mask handler for advanced input transformations\n */\ninterface ICustomMaskHandler {\n /**\n * Matching configuration for the handler.\n */\n match: ICustomMaskHandlerMatch;\n /**\n * Application configuration for the handler.\n */\n apply: ICustomMaskHandlerApply;\n}\n\n/**\n * Shared props for InputMask component\n */\ninterface SharedInputMaskProps {\n /**\n * The mask pattern to apply to the input.\n * - \"9\" for digits only\n * - \"a\" for letters only\n * - \"*\" for alphanumeric\n * - Any other character is treated as a fixed character\n */\n mask: string;\n /**\n * Character to display for unfilled mask positions.\n * @default \"_\"\n */\n defaultMaskCharacter?: string;\n /**\n * Controlled value for the input.\n */\n value?: string;\n /**\n * Default value for uncontrolled input.\n */\n defaultValue?: string;\n /**\n * Callback function called when input value changes.\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Array of custom mask handlers for advanced transformations.\n */\n customMaskHandler?: ICustomMaskHandler[];\n}\n\ntype SpecialChange = {\n reason: \"Backspace\" | \"Delete\" | \"Edit\";\n start: number;\n end: number;\n};\n\n/**\n * Props for the InputMask component\n * @property {string} mask - The mask pattern to apply to the input (9 for digits, a for letters, * for alphanumeric)\n * @property {string} [defaultMaskCharacter] - Character to display for unfilled mask positions\n * @property {array} [customMaskHandler] - Array of custom mask handlers for advanced transformations\n * @property {object} [inputProps] - Props to pass to the input component\n * @property {ReactElement} [children] - Custom input element to be wrapped with mask functionality\n * @property {string} [data-tracking-id] - Custom tracking ID for analytics\n */\nexport type InputMaskProps = SharedInputMaskProps &\n (InputMaskPropsWithChildren | InputMaskPropsWithoutChildren) &\n DataTrackingId;\n\n/**\n * InputMask component for applying input masks and formatting to text inputs.\n *\n * @deprecated Use the TextField component with custom masking instead. Over time, we intend to release additional components with built-in masking.\n */\nexport const InputMask = forwardRef<HTMLInputElement, InputMaskProps>(\n (\n {\n children,\n mask,\n defaultMaskCharacter = \"_\",\n value,\n defaultValue,\n onChange,\n inputProps,\n \"data-tracking-id\": dataTrackingId,\n },\n ref,\n ) => {\n const [v, setV] = useOptionallyControlledState({\n controlledValue:\n value !== undefined\n ? applyMask(value, mask, defaultMaskCharacter)\n : undefined,\n defaultValue: applyMask(defaultValue || \"\", mask, defaultMaskCharacter),\n // Omitting the onChange handler here because we want to handle it ourselves (i.e. send an event instead of just the value)\n });\n const specialChange = useRef<SpecialChange | null>(null);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n const passInRef = useMergeRefs([inputRef, ref]);\n\n const currentOpenCharacterCount = useMemo(() => {\n return v.split(\"\").filter((char) => char === defaultMaskCharacter).length;\n }, [v, defaultMaskCharacter]);\n\n const fixedCharacterIndices = useMemo(() => {\n const fixedIndices: number[] = [];\n mask.split(\"\").forEach((char, i) => {\n if (!MASK_CHARS.includes(char)) {\n fixedIndices.push(i);\n }\n });\n return fixedIndices;\n }, [mask]);\n\n const moveCursorTo = (start: number, end: number = start) => {\n requestAnimationFrame(() => {\n inputRef.current?.setSelectionRange(start, end);\n });\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n let newVal = applyMask(e.target.value, mask, defaultMaskCharacter);\n if (\n // A single character was backspaced\n specialChange.current?.reason === \"Backspace\" &&\n specialChange.current.start === specialChange.current.end\n ) {\n // If the character before the backspace is a fixed character, we need to remove the filled character before the fixed character\n if (fixedCharacterIndices.includes(specialChange.current.start - 1)) {\n const removeIndex = getLastFilledCharacterIndex(\n newVal.slice(0, specialChange.current.start),\n mask,\n );\n newVal = applyMask(\n newVal.slice(0, removeIndex) + newVal.slice(removeIndex + 1),\n mask,\n defaultMaskCharacter,\n );\n moveCursorTo(removeIndex, removeIndex);\n } else {\n const idx = Math.min(\n getLastFilledCharacterIndex(newVal, mask) + 1,\n specialChange.current.start - 1,\n );\n moveCursorTo(idx, idx);\n }\n } else if (\n // A single character was deleted\n specialChange.current?.reason === \"Delete\" &&\n specialChange.current.start === specialChange.current.end\n ) {\n // If the character after the delete is a fixed character, we need to remove the filled character after the fixed character\n if (fixedCharacterIndices.includes(specialChange.current.start)) {\n const removeIndex = getFirstFilledCharacterIndex(\n newVal.slice(specialChange.current.start + 1),\n mask,\n );\n newVal = applyMask(\n newVal.slice(0, removeIndex) + newVal.slice(removeIndex + 1),\n mask,\n defaultMaskCharacter,\n );\n }\n const firstFilledIdx = getFirstFilledCharacterIndex(newVal, mask);\n const targetIdx = Math.max(firstFilledIdx, specialChange.current.start);\n moveCursorTo(targetIdx, targetIdx);\n } else if (\n specialChange.current?.reason === \"Edit\" &&\n specialChange.current.start === specialChange.current.end // A single character was edited\n ) {\n const firstNonFixedIdx = getFirstNonFixedCharacterIndex(\n specialChange.current.start + 1,\n fixedCharacterIndices,\n );\n moveCursorTo(firstNonFixedIdx, firstNonFixedIdx);\n } else {\n const newIndex = getNextOpenCharacterIndex(\n newVal,\n defaultMaskCharacter,\n );\n moveCursorTo(newIndex, newIndex);\n }\n\n setV(newVal);\n if (inputRef.current) {\n inputRef.current.value = newVal;\n }\n onChange?.({ ...e, target: { ...e.target, value: newVal } });\n };\n\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n requestAnimationFrame(() => {\n if (\n e.target.selectionStart === null ||\n e.target.selectionStart === undefined ||\n e.target.selectionStart >= v.length\n ) {\n const newIndex = getNextOpenCharacterIndex(v, defaultMaskCharacter);\n moveCursorTo(newIndex, newIndex);\n }\n });\n inputProps?.onFocus?.(e);\n };\n\n const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n const target = e.target as HTMLInputElement;\n if (target.selectionStart === null || target.selectionEnd === null) {\n return;\n }\n if (e.key === \"Backspace\") {\n specialChange.current = {\n reason: \"Backspace\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else if (e.key === \"Delete\") {\n specialChange.current = {\n reason: \"Delete\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else if (currentOpenCharacterCount === 0) {\n specialChange.current = {\n reason: \"Edit\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else {\n specialChange.current = null;\n }\n inputProps?.onKeyDown?.(e);\n };\n\n const handleClick = (e: MouseEvent<HTMLInputElement>) => {\n // For future use.\n e.preventDefault();\n e.stopPropagation();\n inputProps?.onClick?.(e);\n };\n\n const handleBlur = (e: FocusEvent<HTMLInputElement>) => {\n // For future use.\n e.preventDefault();\n e.stopPropagation();\n inputProps?.onBlur?.(e);\n };\n\n const mergedInputProps = {\n ...inputProps,\n ...(children && isValidElement(children) ? children.props : {}),\n value: v,\n onChange: handleChange,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onClick: handleClick,\n onBlur: handleBlur,\n ref: passInRef,\n };\n\n const isInputEmpty = useMemo(() => {\n if (v.length === 0) {\n return true;\n }\n return v === applyMask(\"\", mask, defaultMaskCharacter);\n }, [v, defaultMaskCharacter, mask]);\n\n const data = {\n label:\n \"label\" in mergedInputProps\n ? childrenToString(mergedInputProps.label)\n : null,\n labelProps:\n \"labelProps\" in mergedInputProps ? mergedInputProps.labelProps : null,\n prefix: childrenToString(mergedInputProps.prefix),\n hint:\n \"hint\" in mergedInputProps\n ? childrenToString(mergedInputProps.hint)\n : null,\n description:\n \"description\" in mergedInputProps\n ? childrenToString(mergedInputProps.description)\n : null,\n size: mergedInputProps.size,\n type: mergedInputProps.type,\n };\n\n const trackingId = useTrackingId({\n name: \"InputMask\",\n data,\n hasOverride: !!dataTrackingId,\n });\n\n return children && isValidElement(children) && children.type === \"input\" ? (\n cloneElement(children, {\n ...mergedInputProps,\n \"data-tracking-id\": trackingId,\n } as InputHTMLAttributes<HTMLInputElement> & {\n \"data-tracking-id\"?: string;\n })\n ) : (\n <TextField\n data-input-empty={isInputEmpty}\n data-tracking-id={trackingId}\n {...(mergedInputProps as TextFieldProps)}\n />\n );\n },\n);\n\nInputMask.displayName = \"InputMask\";\n"],"names":[],"mappings":";;;;;;;;AAAO,MAAM,UAAA,GAAa,CAAC,GAAA,EAAK,GA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ACE,OAAA,IAAW,gBAAA,GACP,gBAAA,CAAiB,gBAAA,CAAiB,KAAK,CAAA,GACvC,IAAA;AAAA,MACN,UAAA,EACE,YAAA,IAAgB,gBAAA,GAAmB,gBAAA,CAAiB,UAAA,GAAa,IAAA;AAAA,MACnE,MAAA,EAAQ,gBAAA,CAAiB,gBAAA,CAAiB,MAAM,CAAA;AAAA,MAChD,MACE,MAAA,IAAU,gBAAA,GACN,gBAAA,CAAiB,gBAAA,CAAiB,IAAI,CAAA,GACtC,IAAA;AAAA,MACN,aACE,aAAA,IAAiB,gBAAA,GACb,gBAAA,CAAiB,gBAAA,CAAiB,WAAW,CAAA,GAC7C,IAAA;AAAA,MACN,MAAM,gBAAA,CAAiB,IAAA;AAAA,MACvB,MAAM,gBAAA,CAAiB;AAAA,KACzB;AAEA,IAAA,MAAM,aAAa,aAAA,CAAc;AAAA,MAC/B,IAAA,EAAM,WAAA;AAAA,MACN,IAAA;AAAA,MACA,WAAA,EAAa,CAAC,CAAC;AAAA,KAChB,CAAA;AAED,IAAA,OAAO,QAAA,IAAY,eAAe,QAAQ,CAAA,IAAK,SAAS,IAAA,KAAS,OAAA,GAC/D,aAAa,QAAA,EAAU;AAAA,MACrB,GAAG,gBAAA;AAAA,MACH,kBAAA,EAAoB;AAAA,KAGrB,CAAA,mBAED,GAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,kBAAA,EAAkB,YAAA;AAAA,QAClB,kBAAA,EAAkB,UAAA;AAAA,QACjB,GAAI;AAAA;AAAA,KACP;AAAA,EAEJ;AACF;AAEA,SAAA,CAAU,WAAA,GAAc,WAAA;;;;"}
package/dist/InputMask.js CHANGED
@@ -1,2 +1,2 @@
1
- export { I as InputMask, I as default } from './InputMask-CcbJbNCy.js';
1
+ export { I as InputMask, I as default } from './InputMask-Bd4tw5-x.js';
2
2
  //# sourceMappingURL=InputMask.js.map
@@ -0,0 +1,102 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { forwardRef, useRef } from 'react';
3
+ import { C as Card } from './Card-wz71dEVA.js';
4
+ import { c as cx } from './index-De1g9FRV.js';
5
+ import { K as KEYBOARD_FOCUSABLE_SELECTOR } from './getKeyboardFocusableElements-CPUr9cdf.js';
6
+
7
+ import './InteractiveCard.css';const styles = {
8
+ "card-wrapper": "_card-wrapper_nqsx5_1",
9
+ "card-action": "_card-action_nqsx5_12",
10
+ "bg-stronger": "_bg-stronger_nqsx5_24",
11
+ "bg-strong": "_bg-strong_nqsx5_24",
12
+ "card-content": "_card-content_nqsx5_30"
13
+ };
14
+
15
+ const InteractiveCard = forwardRef(
16
+ (props, ref) => {
17
+ const {
18
+ wrapperProps,
19
+ actionProps,
20
+ contentProps = {},
21
+ children,
22
+ "data-interactive": dataInteractive
23
+ } = props;
24
+ const {
25
+ "aria-label": ariaLabel,
26
+ className: wrapperClassName,
27
+ style: wrapperStyle,
28
+ ...restWrapperProps
29
+ } = wrapperProps;
30
+ const { "aria-label": actionAriaLabel, ...restActionProps } = actionProps;
31
+ const {
32
+ padding = "medium",
33
+ background,
34
+ className: contentClassName,
35
+ ...restContentProps
36
+ } = contentProps;
37
+ const actionClassNames = cx(styles["card-action"], {
38
+ [styles[`bg-${background}`]]: !!background
39
+ });
40
+ const contentClassNames = cx(styles["card-content"], contentClassName);
41
+ const wrapperClassNames = cx(styles["card-wrapper"], wrapperClassName);
42
+ const isLink = "href" in restActionProps;
43
+ const actionRef = useRef(null);
44
+ const handleWrapperClick = (e) => {
45
+ const target = e.target;
46
+ if (target.closest(`label, ${KEYBOARD_FOCUSABLE_SELECTOR}`)) return;
47
+ actionRef.current?.click();
48
+ };
49
+ return (
50
+ // Mouse-only dead-space forwarder. Keyboard users tab to the inner <button>/<a> and activate it natively (Enter/Space);
51
+ // The wrapper itself is never focused. Adding a keyboard listener here would double-fire the action.
52
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
53
+ /* @__PURE__ */ jsxs(
54
+ "div",
55
+ {
56
+ ...restWrapperProps,
57
+ role: "group",
58
+ "aria-label": ariaLabel,
59
+ className: wrapperClassNames,
60
+ style: wrapperStyle,
61
+ ref,
62
+ onClick: handleWrapperClick,
63
+ children: [
64
+ isLink ? /* @__PURE__ */ jsx(
65
+ "a",
66
+ {
67
+ ...restActionProps,
68
+ "aria-label": actionAriaLabel,
69
+ className: actionClassNames,
70
+ "data-interactive": dataInteractive,
71
+ ref: actionRef
72
+ }
73
+ ) : /* @__PURE__ */ jsx(
74
+ "button",
75
+ {
76
+ ...restActionProps,
77
+ "aria-label": actionAriaLabel,
78
+ className: actionClassNames,
79
+ "data-interactive": dataInteractive,
80
+ type: "button",
81
+ ref: actionRef
82
+ }
83
+ ),
84
+ /* @__PURE__ */ jsx(
85
+ Card,
86
+ {
87
+ padding,
88
+ className: contentClassNames,
89
+ ...restContentProps,
90
+ children
91
+ }
92
+ )
93
+ ]
94
+ }
95
+ )
96
+ );
97
+ }
98
+ );
99
+ InteractiveCard.displayName = "InteractiveCard";
100
+
101
+ export { InteractiveCard as I };
102
+ //# sourceMappingURL=InteractiveCard-DqxbIX4f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InteractiveCard-DqxbIX4f.js","sources":["../src/beta/components/InteractiveCard/InteractiveCard.tsx"],"sourcesContent":["import { forwardRef, MouseEvent, Ref, useRef } from \"react\";\nimport {\n InteractiveCardProps,\n ActionLinkProps,\n ActionButtonProps,\n} from \"./types\";\nimport { Card } from \"../../../components/Card\";\nimport { KEYBOARD_FOCUSABLE_SELECTOR } from \"../../../internal/functions\";\n\nimport cx from \"classnames\";\nimport styles from \"./InteractiveCard.module.scss\";\n\n/**\n * InteractiveCard component for creating clickable cards with nested interactive elements.\n *\n * Features:\n * - Clickable card area that can be a button or link\n * - Supports nested interactive elements without accessibility violations\n * - Dead-space clicks are forwarded to the action element via event delegation,\n * so any focusable child (button, link, input, switch, etc.) handles its own\n * click without bubbling to the card action\n * - Box-shadow feedback on hover and focus of any interactive element\n * - Full keyboard accessibility with proper focus management\n * - Touch-friendly with mobile support\n * - Customizable padding and background variants via contentProps\n * - WCAG AA 2.2 compliant\n * - Required ARIA labels for screen reader support\n * - Supports all Card props for styling and layout via contentProps\n *\n * @example\n * // Button card with nested actions\n * <InteractiveCard\n * wrapperProps={{ \"aria-label\": \"Kitchen Measurement 2 card\" }}\n * actionProps={{\n * \"aria-label\": \"Expand Kitchen Measurement 2\",\n * onClick: handleExpand,\n * }}\n * contentProps={{ padding: \"large\" }}\n * >\n * <Text variant=\"headline\">Kitchen Measurement 2</Text>\n * <Button>Exact Size</Button>\n * <Button>Block Size</Button>\n * </InteractiveCard>\n *\n * @example\n * // Link card with nested actions\n * <InteractiveCard\n * wrapperProps={{ \"aria-label\": \"Tommy Lee's Project card\" }}\n * actionProps={{\n * \"aria-label\": \"Navigate to Tommy Lee's Project\",\n * href: \"/project/123\",\n * }}\n * contentProps={{ padding: \"large\" }}\n * >\n * <Text variant=\"headline\">Tommy Lee's Project</Text>\n * <IconButton icon={Edit} onClick={(e) => {\n * e.preventDefault();\n * handleEdit();\n * }} />\n * </InteractiveCard>\n */\nexport const InteractiveCard = forwardRef<HTMLDivElement, InteractiveCardProps>(\n (props, ref) => {\n const {\n wrapperProps,\n actionProps,\n contentProps = {},\n children,\n \"data-interactive\": dataInteractive,\n } = props as InteractiveCardProps & {\n \"data-interactive\"?: string;\n };\n\n // Destructure className and style from wrapperProps to merge with internal values\n const {\n \"aria-label\": ariaLabel,\n className: wrapperClassName,\n style: wrapperStyle,\n ...restWrapperProps\n } = wrapperProps;\n\n // Destructure aria-label from actionProps\n const { \"aria-label\": actionAriaLabel, ...restActionProps } = actionProps;\n\n // Destructure contentProps\n const {\n padding = \"medium\",\n background,\n className: contentClassName,\n ...restContentProps\n } = contentProps;\n\n const actionClassNames = cx(styles[\"card-action\"], {\n [styles[`bg-${background}`]]: !!background,\n });\n\n const contentClassNames = cx(styles[\"card-content\"], contentClassName);\n\n const wrapperClassNames = cx(styles[\"card-wrapper\"], wrapperClassName);\n\n // Determine the interactive element type based on href presence\n const isLink = \"href\" in restActionProps;\n\n const actionRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n\n // Forward dead-space clicks (anywhere not on a focusable child or its\n // label) to the action element so the entire card behaves as a single\n // interactive surface, while letting nested controls handle their own\n // clicks. `label` is included alongside focusables because clicking a\n // label routes activation to its associated form control.\n const handleWrapperClick = (e: MouseEvent<HTMLDivElement>) => {\n const target = e.target as HTMLElement;\n if (target.closest(`label, ${KEYBOARD_FOCUSABLE_SELECTOR}`)) return;\n actionRef.current?.click();\n };\n\n return (\n // Mouse-only dead-space forwarder. Keyboard users tab to the inner <button>/<a> and activate it natively (Enter/Space);\n // The wrapper itself is never focused. Adding a keyboard listener here would double-fire the action.\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions\n <div\n {...restWrapperProps}\n role=\"group\"\n aria-label={ariaLabel}\n className={wrapperClassNames}\n style={wrapperStyle}\n ref={ref}\n onClick={handleWrapperClick}\n >\n {/* Interactive layer (button or link) - provides background and hover effects */}\n {isLink ? (\n <a\n {...(restActionProps as ActionLinkProps)}\n aria-label={actionAriaLabel}\n className={actionClassNames}\n data-interactive={dataInteractive}\n ref={actionRef as Ref<HTMLAnchorElement>}\n />\n ) : (\n <button\n {...(restActionProps as ActionButtonProps)}\n aria-label={actionAriaLabel}\n className={actionClassNames}\n data-interactive={dataInteractive}\n type=\"button\"\n ref={actionRef as Ref<HTMLButtonElement>}\n />\n )}\n\n {/* Content layer - transparent card with padding */}\n <Card\n padding={padding}\n className={contentClassNames}\n {...restContentProps}\n >\n {children}\n </Card>\n </div>\n );\n },\n);\n\nInteractiveCard.displayName = \"InteractiveCard\";\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA6DO,MAAM,eAAA,GAAkB,UAAA;AAAA,EAC7B,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM;AAAA,MACJ,YAAA;AAAA,MAC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,gBAAA;AAAA,UACJ,IAAA,EAAK,OAAA;AAAA,UACL,YAAA,EAAY,SAAA;AAAA,UACZ,SAAA,EAAW,iBAAA;AAAA,UACX,KAAA,EAAO,YAAA;AAAA,UACP,GAAA;AAAA,UACA,OAAA,EAAS,kBAAA;AAAA,UAGR,QAAA,EAAA;AAAA,YAAA,MAAA,mBACC,GAAA;AAAA,cAAC,GAAA;AAAA,cAAA;AAAA,gBACE,GAAI,eAAA;AAAA,gBACL,YAAA,EAAY,eAAA;AAAA,gBACZ,SAAA,EAAW,gBAAA;AAAA,gBACX,kBAAA,EAAkB,eAAA;AAAA,gBAClB,GAAA,EAAK;AAAA;AAAA,aACP,mBAEA,GAAA;AAAA,cAAC,QAAA;AAAA,cAAA;AAAA,gBACE,GAAI,eAAA;AAAA,gBACL,YAAA,EAAY,eAAA;AAAA,gBACZ,SAAA,EAAW,gBAAA;AAAA,gBACX,kBAAA,EAAkB,eAAA;AAAA,gBAClB,IAAA,EAAK,QAAA;AAAA,gBACL,GAAA,EAAK;AAAA;AAAA,aACP;AAAA,4BAIF,GAAA;AAAA,cAAC,IAAA;AAAA,cAAA;AAAA,gBACC,OAAA;AAAA,gBACA,SAAA,EAAW,iBAAA;AAAA,gBACV,GAAG,gBAAA;AAAA,gBAEH;AAAA;AAAA;AACH;AAAA;AAAA;AACF;AAAA,EAEJ;AACF;AAEA,eAAA,CAAgB,WAAA,GAAc,iBAAA;;;;"}
@@ -1,15 +1,16 @@
1
1
  @layer starter, reset, base, state, application;
2
- ._card-wrapper_h7t6p_1 {
2
+ ._card-wrapper_nqsx5_1 {
3
3
  display: grid;
4
4
  grid-template: 1fr/1fr;
5
5
  border-radius: 0.75rem;
6
+ cursor: pointer;
6
7
  }
7
- ._card-wrapper_h7t6p_1 > * {
8
+ ._card-wrapper_nqsx5_1 > * {
8
9
  grid-area: 1/1;
9
10
  }
10
11
 
11
12
  @layer base {
12
- ._card-action_h7t6p_11 {
13
+ ._card-action_nqsx5_12 {
13
14
  border-radius: 0.75rem;
14
15
  z-index: 0;
15
16
  cursor: pointer;
@@ -21,42 +22,33 @@
21
22
  background-color: var(--background-color, #ffffff);
22
23
  border: 0.0625rem solid var(--border-color-subdued, #dfe0e1);
23
24
  }
24
- ._card-action_h7t6p_11._bg-stronger_h7t6p_23 {
25
+ ._card-action_nqsx5_12._bg-stronger_nqsx5_24 {
25
26
  background-color: var(--background-color-stronger, #eeeeee);
26
27
  }
27
- ._card-action_h7t6p_11._bg-strong_h7t6p_23 {
28
+ ._card-action_nqsx5_12._bg-strong_nqsx5_24 {
28
29
  background-color: var(--background-color-strong, #f7f7f7);
29
30
  }
30
- ._card-content_h7t6p_29 {
31
+ ._card-content_nqsx5_30 {
31
32
  z-index: 1;
32
- pointer-events: none;
33
33
  background: transparent !important;
34
34
  }
35
- ._card-content_h7t6p_29 button,
36
- ._card-content_h7t6p_29 a,
37
- ._card-content_h7t6p_29 input,
38
- ._card-content_h7t6p_29 select,
39
- ._card-content_h7t6p_29 textarea {
40
- pointer-events: auto;
41
- }
42
35
  }
43
36
  @layer state {
44
- ._card-wrapper_h7t6p_1:hover:has(._card-action_h7t6p_11:not(:disabled)), ._card-wrapper_h7t6p_1:has(._card-action_h7t6p_11[data-interactive=hover]:not(:disabled)), ._card-wrapper_h7t6p_1:has(._card-action_h7t6p_11:focus-visible), ._card-wrapper_h7t6p_1:has(._card-action_h7t6p_11[data-interactive=focus-visible]), ._card-wrapper_h7t6p_1:has(._card-content_h7t6p_29 *:hover), ._card-wrapper_h7t6p_1:has(._card-content_h7t6p_29 *:focus-visible), ._card-wrapper_h7t6p_1:has(._card-content_h7t6p_29 *[data-interactive=focus-visible]) {
37
+ ._card-wrapper_nqsx5_1:hover:has(._card-action_nqsx5_12:not(:disabled)), ._card-wrapper_nqsx5_1:has(._card-action_nqsx5_12[data-interactive=hover]:not(:disabled)), ._card-wrapper_nqsx5_1:has(._card-action_nqsx5_12:focus-visible), ._card-wrapper_nqsx5_1:has(._card-action_nqsx5_12[data-interactive=focus-visible]), ._card-wrapper_nqsx5_1:has(._card-content_nqsx5_30 *:hover), ._card-wrapper_nqsx5_1:has(._card-content_nqsx5_30 *:focus-visible), ._card-wrapper_nqsx5_1:has(._card-content_nqsx5_30 *[data-interactive=focus-visible]) {
45
38
  box-shadow: 0rem 0.125rem 0.5rem var(--shadow-color, rgba(20, 20, 20, 0.0784313725));
46
39
  }
47
- ._card-wrapper_h7t6p_1:has(._card-action_h7t6p_11:focus-visible), ._card-wrapper_h7t6p_1:has(._card-action_h7t6p_11[data-interactive=focus-visible]) {
40
+ ._card-wrapper_nqsx5_1:has(._card-action_nqsx5_12:focus-visible), ._card-wrapper_nqsx5_1:has(._card-action_nqsx5_12[data-interactive=focus-visible]) {
48
41
  outline-offset: 0.125rem;
49
42
  outline: 0.125rem solid var(--focus-ring-color, #0265DC);
50
43
  }
51
- ._card-wrapper_h7t6p_1:has(._card-action_h7t6p_11:active:not(:disabled)), ._card-wrapper_h7t6p_1:has(._card-action_h7t6p_11[data-interactive=active]:not(:disabled)) {
44
+ ._card-wrapper_nqsx5_1:has(._card-action_nqsx5_12:active:not(:disabled)), ._card-wrapper_nqsx5_1:has(._card-action_nqsx5_12[data-interactive=active]:not(:disabled)) {
52
45
  box-shadow: 0rem 0.5rem 1.5rem var(--shadow-color, rgba(20, 20, 20, 0.0784313725));
53
46
  }
54
- ._card-wrapper_h7t6p_1:has(._card-action_h7t6p_11:disabled) ._card-content_h7t6p_29 {
55
- pointer-events: auto;
47
+ ._card-wrapper_nqsx5_1:has(._card-action_nqsx5_12:disabled) {
56
48
  cursor: not-allowed;
57
49
  }
58
- a._card-action_h7t6p_11:focus,
59
- ._card-action_h7t6p_11:focus {
50
+ a._card-action_nqsx5_12:focus,
51
+ ._card-action_nqsx5_12:focus {
60
52
  outline: 0 !important;
61
53
  }
62
54
  }
@@ -1,2 +1,2 @@
1
- export { I as InteractiveCard } from './InteractiveCard-GTYbR6Xy.js';
1
+ export { I as InteractiveCard } from './InteractiveCard-DqxbIX4f.js';
2
2
  //# sourceMappingURL=InteractiveCard.js.map
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { createContext, useContext, forwardRef, useRef, useId, useEffect, useMemo, useState } from 'react';
3
- import { C as Checkbox } from './Checkbox-CmuW0fml.js';
3
+ import { C as Checkbox } from './Checkbox-CsNIatRo.js';
4
4
  import { c as cx } from './index-De1g9FRV.js';
5
5
  import { l as listViewStyles } from './ListView.module-BilDg12y.js';
6
6
  import { u as useMergeRefs } from './useMergeRefs-Dfmtq9cI.js';
@@ -536,4 +536,4 @@ const ListView = Object.assign(
536
536
  );
537
537
 
538
538
  export { ListView as L, ListViewOption as a, ListViewOptionCell as b };
539
- //# sourceMappingURL=ListView-D724tdzO.js.map
539
+ //# sourceMappingURL=ListView-_ynU8UuV.js.map