@d4gger/design-system 4.0.0 → 4.0.2

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 (257) hide show
  1. package/dist/_internal/props/propDef.cjs +2 -1
  2. package/dist/_internal/props/propDef.cjs.map +2 -2
  3. package/dist/_internal/props/propDef.d.cts.map +1 -1
  4. package/dist/_internal/props/propDef.d.mts.map +1 -1
  5. package/dist/_internal/props/propDef.d.ts.map +1 -1
  6. package/dist/_internal/props/propDef.js +2 -1
  7. package/dist/_internal/props/propDef.js.map +2 -2
  8. package/dist/brand-effects.css +5 -3
  9. package/dist/components/alert/Alert.cjs +17 -3
  10. package/dist/components/alert/Alert.cjs.map +2 -2
  11. package/dist/components/alert/Alert.d.cts +6 -0
  12. package/dist/components/alert/Alert.d.cts.map +1 -1
  13. package/dist/components/alert/Alert.d.mts +6 -0
  14. package/dist/components/alert/Alert.d.mts.map +1 -1
  15. package/dist/components/alert/Alert.d.ts +6 -0
  16. package/dist/components/alert/Alert.d.ts.map +1 -1
  17. package/dist/components/alert/Alert.js +17 -3
  18. package/dist/components/alert/Alert.js.map +2 -2
  19. package/dist/components/alert.css +74 -5
  20. package/dist/components/bottom-dock.css +8 -0
  21. package/dist/components/bottomDock/BottomDock.cjs +1 -1
  22. package/dist/components/bottomDock/BottomDock.cjs.map +2 -2
  23. package/dist/components/bottomDock/BottomDock.js +1 -1
  24. package/dist/components/bottomDock/BottomDock.js.map +2 -2
  25. package/dist/components/bottomDock/bottomDock.props.cjs +1 -1
  26. package/dist/components/bottomDock/bottomDock.props.cjs.map +2 -2
  27. package/dist/components/bottomDock/bottomDock.props.d.cts +2 -2
  28. package/dist/components/bottomDock/bottomDock.props.d.cts.map +1 -1
  29. package/dist/components/bottomDock/bottomDock.props.d.mts +2 -2
  30. package/dist/components/bottomDock/bottomDock.props.d.mts.map +1 -1
  31. package/dist/components/bottomDock/bottomDock.props.d.ts +2 -2
  32. package/dist/components/bottomDock/bottomDock.props.d.ts.map +1 -1
  33. package/dist/components/bottomDock/bottomDock.props.js +1 -1
  34. package/dist/components/bottomDock/bottomDock.props.js.map +2 -2
  35. package/dist/components/box.css +0 -12
  36. package/dist/components/card.css +1 -1
  37. package/dist/components/collapsible/Collapsible.cjs +10 -0
  38. package/dist/components/collapsible/Collapsible.cjs.map +2 -2
  39. package/dist/components/collapsible/Collapsible.d.cts.map +1 -1
  40. package/dist/components/collapsible/Collapsible.d.mts.map +1 -1
  41. package/dist/components/collapsible/Collapsible.d.ts.map +1 -1
  42. package/dist/components/collapsible/Collapsible.js +10 -0
  43. package/dist/components/collapsible/Collapsible.js.map +2 -2
  44. package/dist/components/config-drawer.css +9 -1
  45. package/dist/components/configDrawer/ConfigDrawer.cjs +1 -0
  46. package/dist/components/configDrawer/ConfigDrawer.cjs.map +2 -2
  47. package/dist/components/configDrawer/ConfigDrawer.d.cts.map +1 -1
  48. package/dist/components/configDrawer/ConfigDrawer.d.mts.map +1 -1
  49. package/dist/components/configDrawer/ConfigDrawer.d.ts.map +1 -1
  50. package/dist/components/configDrawer/ConfigDrawer.js +1 -0
  51. package/dist/components/configDrawer/ConfigDrawer.js.map +2 -2
  52. package/dist/components/dialog.css +1 -1
  53. package/dist/components/drawer.css +4 -2
  54. package/dist/components/environment-ribbon.css +73 -0
  55. package/dist/components/environmentRibbon/EnvironmentRibbon.cjs +69 -0
  56. package/dist/components/environmentRibbon/EnvironmentRibbon.cjs.map +7 -0
  57. package/dist/components/environmentRibbon/EnvironmentRibbon.d.cts +15 -0
  58. package/dist/components/environmentRibbon/EnvironmentRibbon.d.cts.map +1 -0
  59. package/dist/components/environmentRibbon/EnvironmentRibbon.d.mts +15 -0
  60. package/dist/components/environmentRibbon/EnvironmentRibbon.d.mts.map +1 -0
  61. package/dist/components/environmentRibbon/EnvironmentRibbon.d.ts +15 -0
  62. package/dist/components/environmentRibbon/EnvironmentRibbon.d.ts.map +1 -0
  63. package/dist/components/environmentRibbon/EnvironmentRibbon.js +39 -0
  64. package/dist/components/environmentRibbon/EnvironmentRibbon.js.map +7 -0
  65. package/dist/components/environmentRibbon/environmentRibbon.props.cjs +39 -0
  66. package/dist/components/environmentRibbon/environmentRibbon.props.cjs.map +7 -0
  67. package/dist/components/environmentRibbon/environmentRibbon.props.d.cts +18 -0
  68. package/dist/components/environmentRibbon/environmentRibbon.props.d.cts.map +1 -0
  69. package/dist/components/environmentRibbon/environmentRibbon.props.d.mts +18 -0
  70. package/dist/components/environmentRibbon/environmentRibbon.props.d.mts.map +1 -0
  71. package/dist/components/environmentRibbon/environmentRibbon.props.d.ts +18 -0
  72. package/dist/components/environmentRibbon/environmentRibbon.props.d.ts.map +1 -0
  73. package/dist/components/environmentRibbon/environmentRibbon.props.js +19 -0
  74. package/dist/components/environmentRibbon/environmentRibbon.props.js.map +7 -0
  75. package/dist/components/field.css +5 -0
  76. package/dist/components/flex/Flex.cjs +5 -4
  77. package/dist/components/flex/Flex.cjs.map +2 -2
  78. package/dist/components/flex/Flex.d.cts.map +1 -1
  79. package/dist/components/flex/Flex.d.mts.map +1 -1
  80. package/dist/components/flex/Flex.d.ts.map +1 -1
  81. package/dist/components/flex/Flex.js +5 -4
  82. package/dist/components/flex/Flex.js.map +2 -2
  83. package/dist/components/grid/Grid.cjs +5 -5
  84. package/dist/components/grid/Grid.cjs.map +2 -2
  85. package/dist/components/grid/Grid.d.cts.map +1 -1
  86. package/dist/components/grid/Grid.d.mts.map +1 -1
  87. package/dist/components/grid/Grid.d.ts.map +1 -1
  88. package/dist/components/grid/Grid.js +5 -5
  89. package/dist/components/grid/Grid.js.map +2 -2
  90. package/dist/components/icon/Icon.cjs +16 -0
  91. package/dist/components/icon/Icon.cjs.map +2 -2
  92. package/dist/components/icon/Icon.d.cts +25 -1
  93. package/dist/components/icon/Icon.d.cts.map +1 -1
  94. package/dist/components/icon/Icon.d.mts +25 -1
  95. package/dist/components/icon/Icon.d.mts.map +1 -1
  96. package/dist/components/icon/Icon.d.ts +25 -1
  97. package/dist/components/icon/Icon.d.ts.map +1 -1
  98. package/dist/components/icon/Icon.js +21 -0
  99. package/dist/components/icon/Icon.js.map +2 -2
  100. package/dist/components/icon/icons.cjs +12 -0
  101. package/dist/components/icon/icons.cjs.map +2 -2
  102. package/dist/components/icon/icons.d.cts +30 -0
  103. package/dist/components/icon/icons.d.cts.map +1 -1
  104. package/dist/components/icon/icons.d.mts +30 -0
  105. package/dist/components/icon/icons.d.mts.map +1 -1
  106. package/dist/components/icon/icons.d.ts +30 -0
  107. package/dist/components/icon/icons.d.ts.map +1 -1
  108. package/dist/components/icon/icons.js +12 -0
  109. package/dist/components/icon/icons.js.map +2 -2
  110. package/dist/components/index.cjs +1 -0
  111. package/dist/components/index.cjs.map +2 -2
  112. package/dist/components/index.d.cts +1 -0
  113. package/dist/components/index.d.cts.map +1 -1
  114. package/dist/components/index.d.mts +1 -0
  115. package/dist/components/index.d.mts.map +1 -1
  116. package/dist/components/index.d.ts +1 -0
  117. package/dist/components/index.d.ts.map +1 -1
  118. package/dist/components/index.js +1 -0
  119. package/dist/components/index.js.map +2 -2
  120. package/dist/components/input-otp.css +24 -0
  121. package/dist/components/inputOtp/InputOtp.cjs +2 -1
  122. package/dist/components/inputOtp/InputOtp.cjs.map +2 -2
  123. package/dist/components/inputOtp/InputOtp.d.cts +8 -0
  124. package/dist/components/inputOtp/InputOtp.d.cts.map +1 -1
  125. package/dist/components/inputOtp/InputOtp.d.mts +8 -0
  126. package/dist/components/inputOtp/InputOtp.d.mts.map +1 -1
  127. package/dist/components/inputOtp/InputOtp.d.ts +8 -0
  128. package/dist/components/inputOtp/InputOtp.d.ts.map +1 -1
  129. package/dist/components/inputOtp/InputOtp.js +2 -1
  130. package/dist/components/inputOtp/InputOtp.js.map +2 -2
  131. package/dist/components/inputOtp/inputOtp.props.cjs +4 -0
  132. package/dist/components/inputOtp/inputOtp.props.cjs.map +2 -2
  133. package/dist/components/inputOtp/inputOtp.props.d.cts +4 -0
  134. package/dist/components/inputOtp/inputOtp.props.d.cts.map +1 -1
  135. package/dist/components/inputOtp/inputOtp.props.d.mts +4 -0
  136. package/dist/components/inputOtp/inputOtp.props.d.mts.map +1 -1
  137. package/dist/components/inputOtp/inputOtp.props.d.ts +4 -0
  138. package/dist/components/inputOtp/inputOtp.props.d.ts.map +1 -1
  139. package/dist/components/inputOtp/inputOtp.props.js +4 -0
  140. package/dist/components/inputOtp/inputOtp.props.js.map +2 -2
  141. package/dist/components/link.css +21 -0
  142. package/dist/components/notification-center.css +17 -9
  143. package/dist/components/notificationCenter/NotificationCenter.cjs +7 -2
  144. package/dist/components/notificationCenter/NotificationCenter.cjs.map +2 -2
  145. package/dist/components/notificationCenter/NotificationCenter.d.cts +2 -0
  146. package/dist/components/notificationCenter/NotificationCenter.d.cts.map +1 -1
  147. package/dist/components/notificationCenter/NotificationCenter.d.mts +2 -0
  148. package/dist/components/notificationCenter/NotificationCenter.d.mts.map +1 -1
  149. package/dist/components/notificationCenter/NotificationCenter.d.ts +2 -0
  150. package/dist/components/notificationCenter/NotificationCenter.d.ts.map +1 -1
  151. package/dist/components/notificationCenter/NotificationCenter.js +7 -2
  152. package/dist/components/notificationCenter/NotificationCenter.js.map +2 -2
  153. package/dist/components/page-header.css +21 -0
  154. package/dist/components/pageHeader/PageHeader.cjs +10 -2
  155. package/dist/components/pageHeader/PageHeader.cjs.map +2 -2
  156. package/dist/components/pageHeader/PageHeader.d.cts.map +1 -1
  157. package/dist/components/pageHeader/PageHeader.d.mts.map +1 -1
  158. package/dist/components/pageHeader/PageHeader.d.ts.map +1 -1
  159. package/dist/components/pageHeader/PageHeader.js +10 -2
  160. package/dist/components/pageHeader/PageHeader.js.map +2 -2
  161. package/dist/components/pageHeader/pageHeader.props.cjs +7 -1
  162. package/dist/components/pageHeader/pageHeader.props.cjs.map +2 -2
  163. package/dist/components/pageHeader/pageHeader.props.d.cts +5 -0
  164. package/dist/components/pageHeader/pageHeader.props.d.cts.map +1 -1
  165. package/dist/components/pageHeader/pageHeader.props.d.mts +5 -0
  166. package/dist/components/pageHeader/pageHeader.props.d.mts.map +1 -1
  167. package/dist/components/pageHeader/pageHeader.props.d.ts +5 -0
  168. package/dist/components/pageHeader/pageHeader.props.d.ts.map +1 -1
  169. package/dist/components/pageHeader/pageHeader.props.js +7 -1
  170. package/dist/components/pageHeader/pageHeader.props.js.map +2 -2
  171. package/dist/components/rich-text-editor.css +2 -0
  172. package/dist/components/richTextEditor/EditorTools.cjs +98 -44
  173. package/dist/components/richTextEditor/EditorTools.cjs.map +2 -2
  174. package/dist/components/richTextEditor/EditorTools.d.cts +51 -1
  175. package/dist/components/richTextEditor/EditorTools.d.cts.map +1 -1
  176. package/dist/components/richTextEditor/EditorTools.d.mts +51 -1
  177. package/dist/components/richTextEditor/EditorTools.d.mts.map +1 -1
  178. package/dist/components/richTextEditor/EditorTools.d.ts +51 -1
  179. package/dist/components/richTextEditor/EditorTools.d.ts.map +1 -1
  180. package/dist/components/richTextEditor/EditorTools.js +98 -44
  181. package/dist/components/richTextEditor/EditorTools.js.map +2 -2
  182. package/dist/components/richTextEditor/MentionSuggestions.cjs +6 -7
  183. package/dist/components/richTextEditor/MentionSuggestions.cjs.map +2 -2
  184. package/dist/components/richTextEditor/MentionSuggestions.d.cts +3 -1
  185. package/dist/components/richTextEditor/MentionSuggestions.d.cts.map +1 -1
  186. package/dist/components/richTextEditor/MentionSuggestions.d.mts +3 -1
  187. package/dist/components/richTextEditor/MentionSuggestions.d.mts.map +1 -1
  188. package/dist/components/richTextEditor/MentionSuggestions.d.ts +3 -1
  189. package/dist/components/richTextEditor/MentionSuggestions.d.ts.map +1 -1
  190. package/dist/components/richTextEditor/MentionSuggestions.js +6 -7
  191. package/dist/components/richTextEditor/MentionSuggestions.js.map +2 -2
  192. package/dist/components/richTextEditor/RichTextEditor.cjs +17 -10
  193. package/dist/components/richTextEditor/RichTextEditor.cjs.map +3 -3
  194. package/dist/components/richTextEditor/RichTextEditor.d.cts +2 -1
  195. package/dist/components/richTextEditor/RichTextEditor.d.cts.map +1 -1
  196. package/dist/components/richTextEditor/RichTextEditor.d.mts +2 -1
  197. package/dist/components/richTextEditor/RichTextEditor.d.mts.map +1 -1
  198. package/dist/components/richTextEditor/RichTextEditor.d.ts +2 -1
  199. package/dist/components/richTextEditor/RichTextEditor.d.ts.map +1 -1
  200. package/dist/components/richTextEditor/RichTextEditor.js +17 -10
  201. package/dist/components/richTextEditor/RichTextEditor.js.map +3 -3
  202. package/dist/components/segmented-control.css +14 -5
  203. package/dist/components/sidebar/Sidebar.cjs +6 -2
  204. package/dist/components/sidebar/Sidebar.cjs.map +2 -2
  205. package/dist/components/sidebar/Sidebar.d.cts +8 -0
  206. package/dist/components/sidebar/Sidebar.d.cts.map +1 -1
  207. package/dist/components/sidebar/Sidebar.d.mts +8 -0
  208. package/dist/components/sidebar/Sidebar.d.mts.map +1 -1
  209. package/dist/components/sidebar/Sidebar.d.ts +8 -0
  210. package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
  211. package/dist/components/sidebar/Sidebar.js +6 -2
  212. package/dist/components/sidebar/Sidebar.js.map +2 -2
  213. package/dist/components/sidebar.css +58 -13
  214. package/dist/components.css +1 -0
  215. package/dist/docs/README.md +1 -0
  216. package/dist/docs/component-contract.md +5 -3
  217. package/dist/docs/component-index.json +9 -1
  218. package/dist/docs/components/alert.md +32 -8
  219. package/dist/docs/components/bottom-dock.md +4 -4
  220. package/dist/docs/components/box.md +3 -1
  221. package/dist/docs/components/card.md +1 -1
  222. package/dist/docs/components/collapsible.md +5 -0
  223. package/dist/docs/components/config-drawer.md +3 -1
  224. package/dist/docs/components/dialog.md +1 -1
  225. package/dist/docs/components/environment-ribbon.md +126 -0
  226. package/dist/docs/components/field.md +2 -0
  227. package/dist/docs/components/grid.md +2 -0
  228. package/dist/docs/components/icon.md +1 -0
  229. package/dist/docs/components/input-otp.md +10 -2
  230. package/dist/docs/components/layout-props.md +4 -1
  231. package/dist/docs/components/link.md +4 -0
  232. package/dist/docs/components/notification-center.md +14 -9
  233. package/dist/docs/components/page-header.md +18 -6
  234. package/dist/docs/components/rich-text-editor.md +6 -1
  235. package/dist/docs/components/segmented-control.md +3 -2
  236. package/dist/docs/components/sidebar.md +17 -6
  237. package/dist/docs/consumer-guide.md +11 -4
  238. package/dist/layout/Layout.cjs +13 -9
  239. package/dist/layout/Layout.cjs.map +2 -2
  240. package/dist/layout/Layout.d.cts.map +1 -1
  241. package/dist/layout/Layout.d.mts.map +1 -1
  242. package/dist/layout/Layout.d.ts.map +1 -1
  243. package/dist/layout/Layout.js +13 -9
  244. package/dist/layout/Layout.js.map +2 -2
  245. package/dist/layout/grid-area.cjs +32 -0
  246. package/dist/layout/grid-area.cjs.map +7 -0
  247. package/dist/layout/grid-area.d.cts +12 -0
  248. package/dist/layout/grid-area.d.cts.map +1 -0
  249. package/dist/layout/grid-area.d.mts +12 -0
  250. package/dist/layout/grid-area.d.mts.map +1 -0
  251. package/dist/layout/grid-area.d.ts +12 -0
  252. package/dist/layout/grid-area.d.ts.map +1 -0
  253. package/dist/layout/grid-area.js +12 -0
  254. package/dist/layout/grid-area.js.map +7 -0
  255. package/dist/styles.css +11636 -12164
  256. package/dist/tokens.css +2 -0
  257. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/inputOtp/InputOtp.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\nimport { OTPInput, OTPInputContext, type OTPInputProps as BaseOTPInputProps, type RenderProps } from 'input-otp'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport {\n inputOTPGroupPropDefs,\n inputOTPPropDefs,\n inputOTPSeparatorPropDefs,\n inputOTPSlotPropDefs,\n} from './inputOtp.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype InputOTPOwnProps = GetPropDefTypes<typeof inputOTPPropDefs>\ntype InputOTPGroupOwnProps = GetPropDefTypes<typeof inputOTPGroupPropDefs>\n\ntype InputOTPProps = Omit<BaseOTPInputProps, 'children' | 'maxLength' | 'render'> &\n InputOTPOwnProps & {\n children: React.ReactNode\n maxLength?: number\n }\n\ninterface InputOTPGroupProps extends React.ComponentPropsWithoutRef<'div'>, InputOTPGroupOwnProps {}\n\ntype InputOTPSlotProps = React.ComponentPropsWithoutRef<'div'> & { index: number }\ntype InputOTPSeparatorProps = React.ComponentPropsWithoutRef<'div'>\n\nconst InputOtp = React.forwardRef<React.ComponentRef<typeof OTPInput>, InputOTPProps>((props, forwardedRef) => {\n const { asChild, children, className: propClassName, containerClassName, maxLength = 6, ...inputProps } = props\n const { asChild: extractedAsChild, className, size = 'md', radius = 'md', ...resolvedInputProps } = extractProps(\n {\n ...inputProps,\n asChild,\n className: propClassName,\n },\n inputOTPPropDefs,\n )\n void extractedAsChild\n\n return (\n <OTPInput\n {...resolvedInputProps}\n ref={forwardedRef}\n maxLength={maxLength}\n containerClassName={classNames('dsx-input-otp', containerClassName)}\n className={classNames('dsx-input-otp__hidden-input', className)}\n data-size={size}\n data-radius={radius}\n data-slot=\"input-otp-input\"\n >\n {children}\n </OTPInput>\n )\n})\nInputOtp.displayName = 'InputOtp'\n\nconst InputOTPGroup = React.forwardRef<HTMLDivElement, InputOTPGroupProps>((props, forwardedRef) => {\n const { asChild, className, ...groupProps } = extractProps(props, inputOTPGroupPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return <Comp {...groupProps} ref={forwardedRef} className={classNames('dsx-input-otp__group', className)} data-slot=\"input-otp-group\" />\n})\nInputOTPGroup.displayName = 'InputOTPGroup'\n\nconst InputOTPSlot = React.forwardRef<HTMLDivElement, InputOTPSlotProps>((props, forwardedRef) => {\n const { className, index, ...slotProps } = extractProps(props, inputOTPSlotPropDefs)\n const inputOTPContext = React.useContext(OTPInputContext) as RenderProps\n const slot = inputOTPContext.slots[index]\n\n if (!slot) {\n return <div {...slotProps} ref={forwardedRef} className={classNames('dsx-input-otp__slot', className)} data-slot=\"input-otp-slot\" />\n }\n\n const { char, hasFakeCaret, isActive } = slot\n\n return (\n <div\n {...slotProps}\n ref={forwardedRef}\n className={classNames('dsx-input-otp__slot', className)}\n data-active={isActive ? 'true' : undefined}\n data-filled={char ? 'true' : undefined}\n data-slot=\"input-otp-slot\"\n >\n {char}\n {hasFakeCaret ? (\n <div className=\"dsx-input-otp__caret-wrapper\" data-slot=\"input-otp-caret-wrapper\">\n <div className=\"dsx-input-otp__caret\" data-slot=\"input-otp-caret\" />\n </div>\n ) : null}\n </div>\n )\n})\nInputOTPSlot.displayName = 'InputOTPSlot'\n\nconst InputOTPSeparator = React.forwardRef<HTMLDivElement, InputOTPSeparatorProps>((props, forwardedRef) => {\n const { className, ...separatorProps } = extractProps(props, inputOTPSeparatorPropDefs)\n\n return (\n <div\n {...separatorProps}\n ref={forwardedRef}\n role=\"separator\"\n className={classNames('dsx-input-otp__separator', className)}\n data-slot=\"input-otp-separator\"\n >\n <div className=\"dsx-input-otp__separator-dash\" data-slot=\"input-otp-separator-dash\" />\n </div>\n )\n})\nInputOTPSeparator.displayName = 'InputOTPSeparator'\n\nconst OTPField = Object.assign(InputOtp, {\n Group: InputOTPGroup,\n Slot: InputOTPSlot,\n Separator: InputOTPSeparator,\n})\n\nexport { InputOtp, InputOTPGroup, InputOTPSeparator, InputOTPSlot, OTPField }\nexport type { InputOTPGroupProps, InputOTPProps, InputOTPSeparatorProps, InputOTPSlotProps }\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AACvB,wBAAuB;AACvB,wBAAqB;AACrB,uBAAqG;AAErG,0BAA6B;AAC7B,sBAKO;AA+BH;AAbJ,MAAM,WAAW,MAAM,WAA+D,CAAC,OAAO,iBAAiB;AAC7G,QAAM,EAAE,SAAS,UAAU,WAAW,eAAe,oBAAoB,YAAY,GAAG,GAAG,WAAW,IAAI;AA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W,uBAAuB,SAAS;AAAA,MACtD,eAAa,WAAW,SAAS;AAAA,MACjC,eAAa,OAAO,SAAS;AAAA,MAC7B,aAAU;AAAA,MAET;AAAA;AAAA,QACA,eACC,4CAAC,SAAI,WAAU,gCAA+B,aAAU,2BACtD,sDAAC,SAAI,WAAU,wBAAuB,aAAU,mBAAkB,GACpE,IACE;AAAA;AAAA;AAAA,EACN;AAEJ,CAAC;AACD,aAAa,cAAc;AAE3B,MAAM,oBAAoB,MAAM,WAAmD,CAAC,OAAO,iBAAiB;AAC1G,QAAM,EAAE,WAAW,GAAG,eAAe,QAAI,kCAAa,OAAO,yCAAyB;AAEtF,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,MAAK;AAAA,MACL,eAAW,kBAAAA,SAAW,4BAA4B,SAAS;AAAA,MAC3D,aAAU;AAAA,MAEV,sDAAC,SAAI,WAAU,iCAAgC,aAAU,4BAA2B;AAAA;AAAA,EACtF;AAEJ,CAAC;AACD,kBAAkB,cAAc;AAEhC,MAAM,WAAW,OAAO,OAAO,UAAU;AAAA,EACvC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AACb,CAAC;",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\nimport { OTPInput, OTPInputContext, type OTPInputProps as BaseOTPInputProps, type RenderProps } from 'input-otp'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport {\n inputOTPGroupPropDefs,\n inputOTPPropDefs,\n inputOTPSeparatorPropDefs,\n inputOTPSlotPropDefs,\n} from './inputOtp.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype InputOTPOwnProps = GetPropDefTypes<typeof inputOTPPropDefs>\ntype InputOTPGroupOwnProps = GetPropDefTypes<typeof inputOTPGroupPropDefs>\n\ntype InputOTPProps = Omit<BaseOTPInputProps, 'children' | 'maxLength' | 'render'> &\n InputOTPOwnProps & {\n children: React.ReactNode\n maxLength?: number\n }\n\ninterface InputOTPGroupProps extends React.ComponentPropsWithoutRef<'div'>, InputOTPGroupOwnProps {}\n\ntype InputOTPSlotProps = React.ComponentPropsWithoutRef<'div'> & { index: number }\ntype InputOTPSeparatorProps = React.ComponentPropsWithoutRef<'div'>\n\nconst InputOtp = React.forwardRef<React.ComponentRef<typeof OTPInput>, InputOTPProps>((props, forwardedRef) => {\n const { asChild, children, className: propClassName, containerClassName, maxLength = 6, ...inputProps } = props\n const { asChild: extractedAsChild, className, size = 'md', radius = 'md', fill = false, ...resolvedInputProps } = extractProps(\n {\n ...inputProps,\n asChild,\n className: propClassName,\n },\n inputOTPPropDefs,\n )\n void extractedAsChild\n\n return (\n <OTPInput\n {...resolvedInputProps}\n ref={forwardedRef}\n maxLength={maxLength}\n containerClassName={classNames('dsx-input-otp', containerClassName)}\n className={classNames('dsx-input-otp__hidden-input', className)}\n data-size={size}\n data-radius={radius}\n data-fill={fill || undefined}\n data-slot=\"input-otp-input\"\n >\n {children}\n </OTPInput>\n )\n})\nInputOtp.displayName = 'InputOtp'\n\nconst InputOTPGroup = React.forwardRef<HTMLDivElement, InputOTPGroupProps>((props, forwardedRef) => {\n const { asChild, className, ...groupProps } = extractProps(props, inputOTPGroupPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return <Comp {...groupProps} ref={forwardedRef} className={classNames('dsx-input-otp__group', className)} data-slot=\"input-otp-group\" />\n})\nInputOTPGroup.displayName = 'InputOTPGroup'\n\nconst InputOTPSlot = React.forwardRef<HTMLDivElement, InputOTPSlotProps>((props, forwardedRef) => {\n const { className, index, ...slotProps } = extractProps(props, inputOTPSlotPropDefs)\n const inputOTPContext = React.useContext(OTPInputContext) as RenderProps\n const slot = inputOTPContext.slots[index]\n\n if (!slot) {\n return <div {...slotProps} ref={forwardedRef} className={classNames('dsx-input-otp__slot', className)} data-slot=\"input-otp-slot\" />\n }\n\n const { char, hasFakeCaret, isActive } = slot\n\n return (\n <div\n {...slotProps}\n ref={forwardedRef}\n className={classNames('dsx-input-otp__slot', className)}\n data-active={isActive ? 'true' : undefined}\n data-filled={char ? 'true' : undefined}\n data-slot=\"input-otp-slot\"\n >\n {char}\n {hasFakeCaret ? (\n <div className=\"dsx-input-otp__caret-wrapper\" data-slot=\"input-otp-caret-wrapper\">\n <div className=\"dsx-input-otp__caret\" data-slot=\"input-otp-caret\" />\n </div>\n ) : null}\n </div>\n )\n})\nInputOTPSlot.displayName = 'InputOTPSlot'\n\nconst InputOTPSeparator = React.forwardRef<HTMLDivElement, InputOTPSeparatorProps>((props, forwardedRef) => {\n const { className, ...separatorProps } = extractProps(props, inputOTPSeparatorPropDefs)\n\n return (\n <div\n {...separatorProps}\n ref={forwardedRef}\n role=\"separator\"\n className={classNames('dsx-input-otp__separator', className)}\n data-slot=\"input-otp-separator\"\n >\n <div className=\"dsx-input-otp__separator-dash\" data-slot=\"input-otp-separator-dash\" />\n </div>\n )\n})\nInputOTPSeparator.displayName = 'InputOTPSeparator'\n\nconst OTPField = Object.assign(InputOtp, {\n Group: InputOTPGroup,\n Slot: InputOTPSlot,\n Separator: InputOTPSeparator,\n})\n\nexport { InputOtp, InputOTPGroup, InputOTPSeparator, InputOTPSlot, OTPField }\nexport type { InputOTPGroupProps, InputOTPProps, InputOTPSeparatorProps, InputOTPSlotProps }\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AACvB,wBAAuB;AACvB,wBAAqB;AACrB,uBAAqG;AAErG,0BAA6B;AAC7B,sBAKO;AA+BH;AAbJ,MAAM,WAAW,MAAM,WAA+D,CAAC,OAAO,iBAAiB;AAC7G,QAAM,EAAE,SAAS,UAAU,WAAW,eAAe,oBAAoB,YAAY,GAAG,GAAG,WAAW,IAAI;AAC1G,QAAM,EAAE,SAAS,kBAAkB,WAAW,OAAO,MAAM,SAAS,MAA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,MACtD,eAAa,WAAW,SAAS;AAAA,MACjC,eAAa,OAAO,SAAS;AAAA,MAC7B,aAAU;AAAA,MAET;AAAA;AAAA,QACA,eACC,4CAAC,SAAI,WAAU,gCAA+B,aAAU,2BACtD,sDAAC,SAAI,WAAU,wBAAuB,aAAU,mBAAkB,GACpE,IACE;AAAA;AAAA;AAAA,EACN;AAEJ,CAAC;AACD,aAAa,cAAc;AAE3B,MAAM,oBAAoB,MAAM,WAAmD,CAAC,OAAO,iBAAiB;AAC1G,QAAM,EAAE,WAAW,GAAG,eAAe,QAAI,kCAAa,OAAO,yCAAyB;AAEtF,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,MAAK;AAAA,MACL,eAAW,kBAAAA,SAAW,4BAA4B,SAAS;AAAA,MAC3D,aAAU;AAAA,MAEV,sDAAC,SAAI,WAAU,iCAAgC,aAAU,4BAA2B;AAAA;AAAA,EACtF;AAEJ,CAAC;AACD,kBAAkB,cAAc;AAEhC,MAAM,WAAW,OAAO,OAAO,UAAU;AAAA,EACvC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AACb,CAAC;",
6
6
  "names": ["classNames"]
7
7
  }
@@ -25,6 +25,10 @@ declare const InputOtp: React.ForwardRefExoticComponent<Omit<BaseOTPInputProps,
25
25
  values: readonly ["none", "sm", "md", "lg", "full"];
26
26
  default: "md";
27
27
  };
28
+ fill: {
29
+ type: "boolean";
30
+ default: false;
31
+ };
28
32
  asChild: {
29
33
  type: "boolean";
30
34
  default: false;
@@ -49,6 +53,10 @@ declare const OTPField: React.ForwardRefExoticComponent<Omit<BaseOTPInputProps,
49
53
  values: readonly ["none", "sm", "md", "lg", "full"];
50
54
  default: "md";
51
55
  };
56
+ fill: {
57
+ type: "boolean";
58
+ default: false;
59
+ };
52
60
  asChild: {
53
61
  type: "boolean";
54
62
  default: false;
@@ -1 +1 @@
1
- {"version":3,"file":"InputOtp.d.cts","sourceRoot":"","sources":["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KjB,CAAA;AAGF,QAAA,MAAM,YAAY;WAzCwD,MAAM;wCAqE9E,CAAA;AAGF,QAAA,MAAM,iBAAiB,mKAcrB,CAAA;AAGF,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;cA/FA,KAAK,CAAC,SAAS;gBACb,MAAM;;;;eAKoD,MAAM;;;CA6F9E,CAAA;AAEF,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAA;AAC7E,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,CAAA"}
@@ -25,6 +25,10 @@ declare const InputOtp: React.ForwardRefExoticComponent<Omit<BaseOTPInputProps,
25
25
  values: readonly ["none", "sm", "md", "lg", "full"];
26
26
  default: "md";
27
27
  };
28
+ fill: {
29
+ type: "boolean";
30
+ default: false;
31
+ };
28
32
  asChild: {
29
33
  type: "boolean";
30
34
  default: false;
@@ -49,6 +53,10 @@ declare const OTPField: React.ForwardRefExoticComponent<Omit<BaseOTPInputProps,
49
53
  values: readonly ["none", "sm", "md", "lg", "full"];
50
54
  default: "md";
51
55
  };
56
+ fill: {
57
+ type: "boolean";
58
+ default: false;
59
+ };
52
60
  asChild: {
53
61
  type: "boolean";
54
62
  default: false;
@@ -1 +1 @@
1
- {"version":3,"file":"InputOtp.d.mts","sourceRoot":"","sources":["../../../src/components/inputOtp/InputOtp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAA6B,KAAK,aAAa,IAAI,iBAAiB,EAAoB,MAAM,WAAW,CAAA;AAGhH,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAGjB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,KAAK,gBAAgB,GAAG,eAAe,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAChE,KAA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,sBAAsB,EAAE,iBAAiB,EAAE,CAAA"}
@@ -25,6 +25,10 @@ declare const InputOtp: React.ForwardRefExoticComponent<Omit<BaseOTPInputProps,
25
25
  values: readonly ["none", "sm", "md", "lg", "full"];
26
26
  default: "md";
27
27
  };
28
+ fill: {
29
+ type: "boolean";
30
+ default: false;
31
+ };
28
32
  asChild: {
29
33
  type: "boolean";
30
34
  default: false;
@@ -49,6 +53,10 @@ declare const OTPField: React.ForwardRefExoticComponent<Omit<BaseOTPInputProps,
49
53
  values: readonly ["none", "sm", "md", "lg", "full"];
50
54
  default: "md";
51
55
  };
56
+ fill: {
57
+ type: "boolean";
58
+ default: false;
59
+ };
52
60
  asChild: {
53
61
  type: "boolean";
54
62
  default: false;
@@ -1 +1 @@
1
- {"version":3,"file":"InputOtp.d.ts","sourceRoot":"","sources":["../../../src/components/inputOtp/InputOtp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAA6B,KAAK,aAAa,IAAI,iBAAiB,EAAoB,MAAM,WAAW,CAAA;AAGhH,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAGjB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,KAAK,gBAAgB,GAAG,eAAe,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAChE,KAAK,qBAAqB,GAAG,eAAe,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE1E,KAAK,aAAa,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAC,GAC/E,gBAAgB,GAAG;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAEH,UAAU,kBAAmB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,qBAAqB;CAAG;AAEpG,KAAK,i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C,GAC/E,gBAAgB,GAAG;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAEH,UAAU,kBAAmB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,qBAAqB;CAAG;AAEpG,KAAK,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAClF,KAAK,sBAAsB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAEnE,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;cATA,KAAK,CAAC,SAAS;gBACb,MAAM;0CAmCpB,CAAA;AAGF,QAAA,MAAM,aAAa,2FAKjB,CAAA;AAGF,QAAA,MAAM,YAAY;WAzCwD,MAAM;wCAqE9E,CAAA;AAGF,QAAA,MAAM,iBAAiB,mKAcrB,CAAA;AAGF,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;cA/FA,KAAK,CAAC,SAAS;gBACb,MAAM;;;;eAKoD,MAAM;;;CA6F9E,CAAA;AAEF,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAA;AAC7E,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,CAAA"}
@@ -13,7 +13,7 @@ import {
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
14
  const InputOtp = React.forwardRef((props, forwardedRef) => {
15
15
  const { asChild, children, className: propClassName, containerClassName, maxLength = 6, ...inputProps } = props;
16
- const { asChild: extractedAsChild, className, size = "md", radius = "md", ...resolvedInputProps } = extractProps(
16
+ const { asChild: extractedAsChild, className, size = "md", radius = "md", fill = false, ...resolvedInputProps } = extractProps(
17
17
  {
18
18
  ...inputProps,
19
19
  asChild,
@@ -32,6 +32,7 @@ const InputOtp = React.forwardRef((props, forwardedRef) => {
32
32
  className: classNames("dsx-input-otp__hidden-input", className),
33
33
  "data-size": size,
34
34
  "data-radius": radius,
35
+ "data-fill": fill || void 0,
35
36
  "data-slot": "input-otp-input",
36
37
  children
37
38
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/inputOtp/InputOtp.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\nimport { OTPInput, OTPInputContext, type OTPInputProps as BaseOTPInputProps, type RenderProps } from 'input-otp'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport {\n inputOTPGroupPropDefs,\n inputOTPPropDefs,\n inputOTPSeparatorPropDefs,\n inputOTPSlotPropDefs,\n} from './inputOtp.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype InputOTPOwnProps = GetPropDefTypes<typeof inputOTPPropDefs>\ntype InputOTPGroupOwnProps = GetPropDefTypes<typeof inputOTPGroupPropDefs>\n\ntype InputOTPProps = Omit<BaseOTPInputProps, 'children' | 'maxLength' | 'render'> &\n InputOTPOwnProps & {\n children: React.ReactNode\n maxLength?: number\n }\n\ninterface InputOTPGroupProps extends React.ComponentPropsWithoutRef<'div'>, InputOTPGroupOwnProps {}\n\ntype InputOTPSlotProps = React.ComponentPropsWithoutRef<'div'> & { index: number }\ntype InputOTPSeparatorProps = React.ComponentPropsWithoutRef<'div'>\n\nconst InputOtp = React.forwardRef<React.ComponentRef<typeof OTPInput>, InputOTPProps>((props, forwardedRef) => {\n const { asChild, children, className: propClassName, containerClassName, maxLength = 6, ...inputProps } = props\n const { asChild: extractedAsChild, className, size = 'md', radius = 'md', ...resolvedInputProps } = extractProps(\n {\n ...inputProps,\n asChild,\n className: propClassName,\n },\n inputOTPPropDefs,\n )\n void extractedAsChild\n\n return (\n <OTPInput\n {...resolvedInputProps}\n ref={forwardedRef}\n maxLength={maxLength}\n containerClassName={classNames('dsx-input-otp', containerClassName)}\n className={classNames('dsx-input-otp__hidden-input', className)}\n data-size={size}\n data-radius={radius}\n data-slot=\"input-otp-input\"\n >\n {children}\n </OTPInput>\n )\n})\nInputOtp.displayName = 'InputOtp'\n\nconst InputOTPGroup = React.forwardRef<HTMLDivElement, InputOTPGroupProps>((props, forwardedRef) => {\n const { asChild, className, ...groupProps } = extractProps(props, inputOTPGroupPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return <Comp {...groupProps} ref={forwardedRef} className={classNames('dsx-input-otp__group', className)} data-slot=\"input-otp-group\" />\n})\nInputOTPGroup.displayName = 'InputOTPGroup'\n\nconst InputOTPSlot = React.forwardRef<HTMLDivElement, InputOTPSlotProps>((props, forwardedRef) => {\n const { className, index, ...slotProps } = extractProps(props, inputOTPSlotPropDefs)\n const inputOTPContext = React.useContext(OTPInputContext) as RenderProps\n const slot = inputOTPContext.slots[index]\n\n if (!slot) {\n return <div {...slotProps} ref={forwardedRef} className={classNames('dsx-input-otp__slot', className)} data-slot=\"input-otp-slot\" />\n }\n\n const { char, hasFakeCaret, isActive } = slot\n\n return (\n <div\n {...slotProps}\n ref={forwardedRef}\n className={classNames('dsx-input-otp__slot', className)}\n data-active={isActive ? 'true' : undefined}\n data-filled={char ? 'true' : undefined}\n data-slot=\"input-otp-slot\"\n >\n {char}\n {hasFakeCaret ? (\n <div className=\"dsx-input-otp__caret-wrapper\" data-slot=\"input-otp-caret-wrapper\">\n <div className=\"dsx-input-otp__caret\" data-slot=\"input-otp-caret\" />\n </div>\n ) : null}\n </div>\n )\n})\nInputOTPSlot.displayName = 'InputOTPSlot'\n\nconst InputOTPSeparator = React.forwardRef<HTMLDivElement, InputOTPSeparatorProps>((props, forwardedRef) => {\n const { className, ...separatorProps } = extractProps(props, inputOTPSeparatorPropDefs)\n\n return (\n <div\n {...separatorProps}\n ref={forwardedRef}\n role=\"separator\"\n className={classNames('dsx-input-otp__separator', className)}\n data-slot=\"input-otp-separator\"\n >\n <div className=\"dsx-input-otp__separator-dash\" data-slot=\"input-otp-separator-dash\" />\n </div>\n )\n})\nInputOTPSeparator.displayName = 'InputOTPSeparator'\n\nconst OTPField = Object.assign(InputOtp, {\n Group: InputOTPGroup,\n Slot: InputOTPSlot,\n Separator: InputOTPSeparator,\n})\n\nexport { InputOtp, InputOTPGroup, InputOTPSeparator, InputOTPSlot, OTPField }\nexport type { InputOTPGroupProps, InputOTPProps, InputOTPSeparatorProps, InputOTPSlotProps }\n"],
5
- "mappings": ";AAEA,YAAY,WAAW;AACvB,OAAO,gBAAgB;AACvB,SAAS,YAAY;AACrB,SAAS,UAAU,uBAAkF;AAErG,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA+BH,cAoCA,YApCA;AAbJ,MAAM,WAAW,MAAM,WAA+D,CAAC,OAAO,iBAAiB;AAC7G,QAAM,EAAE,SAAS,UAAU,WAAW,eAAe,oBAAoB,YAAY,GAAG,GAAG,WAAW,IAAI;AAC1G,QAAM,EAAE,SAAS,kBAAkB,WAAW,OAAO,MAAM,SAAS,MAAM,GAAG,mBAAmB,IAAI;AAAA,IAClG;AAAA,MACE,GAAG;AAAA,MACH;AAAA,MACA,WAAW;AAAA,IACb;AAAA,IACA;AAAA,EACF;AACA,OAAK;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA,oBAAoB,WAAW,iBAAiB,kBAAkB;AAAA,MAClE,WAAW,WAAW,+BAA+B,SAAS;AAAA,MAC9D,aAAW;AAAA,MACX,eAAa;AAAA,MACb,aAAU;AAAA,MAET;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,SAAS,cAAc;AAEvB,MAAM,gBAAgB,MAAM,WAA+C,CAAC,OAAO,iBAAiB;AAClG,QAAM,EAAE,SAAS,WAAW,GAAG,WAAW,IAAI,aAAa,OAAO,qBAAqB;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AACD,kBAAkB,cAAc;AAEhC,MAAM,WAAW,OAAO,OAAO,UAAU;AAAA,EACvC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AACb,CAAC;",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\nimport { OTPInput, OTPInputContext, type OTPInputProps as BaseOTPInputProps, type RenderProps } from 'input-otp'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport {\n inputOTPGroupPropDefs,\n inputOTPPropDefs,\n inputOTPSeparatorPropDefs,\n inputOTPSlotPropDefs,\n} from './inputOtp.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype InputOTPOwnProps = GetPropDefTypes<typeof inputOTPPropDefs>\ntype InputOTPGroupOwnProps = GetPropDefTypes<typeof inputOTPGroupPropDefs>\n\ntype InputOTPProps = Omit<BaseOTPInputProps, 'children' | 'maxLength' | 'render'> &\n InputOTPOwnProps & {\n children: React.ReactNode\n maxLength?: number\n }\n\ninterface InputOTPGroupProps extends React.ComponentPropsWithoutRef<'div'>, InputOTPGroupOwnProps {}\n\ntype InputOTPSlotProps = React.ComponentPropsWithoutRef<'div'> & { index: number }\ntype InputOTPSeparatorProps = React.ComponentPropsWithoutRef<'div'>\n\nconst InputOtp = React.forwardRef<React.ComponentRef<typeof OTPInput>, InputOTPProps>((props, forwardedRef) => {\n const { asChild, children, className: propClassName, containerClassName, maxLength = 6, ...inputProps } = props\n const { asChild: extractedAsChild, className, size = 'md', radius = 'md', fill = false, ...resolvedInputProps } = extractProps(\n {\n ...inputProps,\n asChild,\n className: propClassName,\n },\n inputOTPPropDefs,\n )\n void extractedAsChild\n\n return (\n <OTPInput\n {...resolvedInputProps}\n ref={forwardedRef}\n maxLength={maxLength}\n containerClassName={classNames('dsx-input-otp', containerClassName)}\n className={classNames('dsx-input-otp__hidden-input', className)}\n data-size={size}\n data-radius={radius}\n data-fill={fill || undefined}\n data-slot=\"input-otp-input\"\n >\n {children}\n </OTPInput>\n )\n})\nInputOtp.displayName = 'InputOtp'\n\nconst InputOTPGroup = React.forwardRef<HTMLDivElement, InputOTPGroupProps>((props, forwardedRef) => {\n const { asChild, className, ...groupProps } = extractProps(props, inputOTPGroupPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return <Comp {...groupProps} ref={forwardedRef} className={classNames('dsx-input-otp__group', className)} data-slot=\"input-otp-group\" />\n})\nInputOTPGroup.displayName = 'InputOTPGroup'\n\nconst InputOTPSlot = React.forwardRef<HTMLDivElement, InputOTPSlotProps>((props, forwardedRef) => {\n const { className, index, ...slotProps } = extractProps(props, inputOTPSlotPropDefs)\n const inputOTPContext = React.useContext(OTPInputContext) as RenderProps\n const slot = inputOTPContext.slots[index]\n\n if (!slot) {\n return <div {...slotProps} ref={forwardedRef} className={classNames('dsx-input-otp__slot', className)} data-slot=\"input-otp-slot\" />\n }\n\n const { char, hasFakeCaret, isActive } = slot\n\n return (\n <div\n {...slotProps}\n ref={forwardedRef}\n className={classNames('dsx-input-otp__slot', className)}\n data-active={isActive ? 'true' : undefined}\n data-filled={char ? 'true' : undefined}\n data-slot=\"input-otp-slot\"\n >\n {char}\n {hasFakeCaret ? (\n <div className=\"dsx-input-otp__caret-wrapper\" data-slot=\"input-otp-caret-wrapper\">\n <div className=\"dsx-input-otp__caret\" data-slot=\"input-otp-caret\" />\n </div>\n ) : null}\n </div>\n )\n})\nInputOTPSlot.displayName = 'InputOTPSlot'\n\nconst InputOTPSeparator = React.forwardRef<HTMLDivElement, InputOTPSeparatorProps>((props, forwardedRef) => {\n const { className, ...separatorProps } = extractProps(props, inputOTPSeparatorPropDefs)\n\n return (\n <div\n {...separatorProps}\n ref={forwardedRef}\n role=\"separator\"\n className={classNames('dsx-input-otp__separator', className)}\n data-slot=\"input-otp-separator\"\n >\n <div className=\"dsx-input-otp__separator-dash\" data-slot=\"input-otp-separator-dash\" />\n </div>\n )\n})\nInputOTPSeparator.displayName = 'InputOTPSeparator'\n\nconst OTPField = Object.assign(InputOtp, {\n Group: InputOTPGroup,\n Slot: InputOTPSlot,\n Separator: InputOTPSeparator,\n})\n\nexport { InputOtp, InputOTPGroup, InputOTPSeparator, InputOTPSlot, OTPField }\nexport type { InputOTPGroupProps, InputOTPProps, InputOTPSeparatorProps, InputOTPSlotProps }\n"],
5
+ "mappings": ";AAEA,YAAY,WAAW;AACvB,OAAO,gBAAgB;AACvB,SAAS,YAAY;AACrB,SAAS,UAAU,uBAAkF;AAErG,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA+BH,cAqCA,YArCA;AAbJ,MAAM,WAAW,MAAM,WAA+D,CAAC,OAAO,iBAAiB;AAC7G,QAAM,EAAE,SAAS,UAAU,WAAW,eAAe,oBAAoB,YAAY,GAAG,GAAG,WAAW,IAAI;AAC1G,QAAM,EAAE,SAAS,kBAAkB,WAAW,OAAO,MAAM,SAAS,MAAM,OAAO,OAAO,GAAG,mBAAmB,IAAI;AAAA,IAChH;AAAA,MACE,GAAG;AAAA,MACH;AAAA,MACA,WAAW;AAAA,IACb;AAAA,IACA;AAAA,EACF;AACA,OAAK;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA,oBAAoB,WAAW,iBAAiB,kBAAkB;AAAA,MAClE,WAAW,WAAW,+BAA+B,SAAS;AAAA,MAC9D,aAAW;AAAA,MACX,eAAa;AAAA,MACb,aAAW,QAAQ;AAAA,MACnB,aAAU;AAAA,MAET;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,SAAS,cAAc;AAEvB,MAAM,gBAAgB,MAAM,WAA+C,CAAC,OAAO,iBAAiB;AAClG,QAAM,EAAE,SAAS,WAAW,GAAG,WAAW,IAAI,aAAa,OAAO,qBAAqB;AACvF,QAAM,OAAO,UAAU,OAAO;AAE9B,SAAO,oBAAC,QAAM,GAAG,YAAY,KAAK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;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AACb,CAAC;",
6
6
  "names": []
7
7
  }
@@ -38,6 +38,10 @@ const inputOTPPropDefs = {
38
38
  type: "enum",
39
39
  values: inputOTPRadiusValues,
40
40
  default: "md"
41
+ },
42
+ fill: {
43
+ type: "boolean",
44
+ default: false
41
45
  }
42
46
  };
43
47
  const inputOTPGroupPropDefs = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/inputOtp/inputOtp.props.ts"],
4
- "sourcesContent": ["import { asChildPropDef } from '../../_internal/props/asChild.prop'\n\nimport type { PropDef } from '../../_internal/props/propDef'\n\nconst inputOTPSizes = ['sm', 'md', 'lg'] as const\nconst inputOTPRadiusValues = ['none', 'sm', 'md', 'lg', 'full'] as const\n\nconst inputOTPPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n values: inputOTPSizes,\n default: 'md',\n },\n radius: {\n type: 'enum',\n values: inputOTPRadiusValues,\n default: 'md',\n },\n} satisfies {\n asChild: PropDef\n size: PropDef<(typeof inputOTPSizes)[number]>\n radius: PropDef<(typeof inputOTPRadiusValues)[number]>\n}\n\nconst inputOTPGroupPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nconst inputOTPSlotPropDefs = {} satisfies Record<string, never>\n\nconst inputOTPSeparatorPropDefs = {} satisfies Record<string, never>\n\nexport {\n inputOTPGroupPropDefs,\n inputOTPPropDefs,\n inputOTPSeparatorPropDefs,\n inputOTPSlotPropDefs,\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA+B;AAI/B,MAAM,gBAAgB,CAAC,MAAM,MAAM,IAAI;AACvC,MAAM,uBAAuB,CAAC,QAAQ,MAAM,MAAM,MAAM,MAAM;AAE9D,MAAM,mBAAmB;AAAA,EACvB,GAAG;AAAA,EACH,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AACF;AAMA,MAAM,wBAAwB;AAAA,EAC5B,GAAG;AACL;AAIA,MAAM,uBAAuB,CAAC;AAE9B,MAAM,4BAA4B,CAAC;",
4
+ "sourcesContent": ["import { asChildPropDef } from '../../_internal/props/asChild.prop'\n\nimport type { PropDef } from '../../_internal/props/propDef'\n\nconst inputOTPSizes = ['sm', 'md', 'lg'] as const\nconst inputOTPRadiusValues = ['none', 'sm', 'md', 'lg', 'full'] as const\n\nconst inputOTPPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n values: inputOTPSizes,\n default: 'md',\n },\n radius: {\n type: 'enum',\n values: inputOTPRadiusValues,\n default: 'md',\n },\n fill: {\n type: 'boolean',\n default: false,\n },\n} satisfies {\n asChild: PropDef\n size: PropDef<(typeof inputOTPSizes)[number]>\n radius: PropDef<(typeof inputOTPRadiusValues)[number]>\n fill: PropDef\n}\n\nconst inputOTPGroupPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nconst inputOTPSlotPropDefs = {} satisfies Record<string, never>\n\nconst inputOTPSeparatorPropDefs = {} satisfies Record<string, never>\n\nexport {\n inputOTPGroupPropDefs,\n inputOTPPropDefs,\n inputOTPSeparatorPropDefs,\n inputOTPSlotPropDefs,\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA+B;AAI/B,MAAM,gBAAgB,CAAC,MAAM,MAAM,IAAI;AACvC,MAAM,uBAAuB,CAAC,QAAQ,MAAM,MAAM,MAAM,MAAM;AAE9D,MAAM,mBAAmB;AAAA,EACvB,GAAG;AAAA,EACH,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF;AAOA,MAAM,wBAAwB;AAAA,EAC5B,GAAG;AACL;AAIA,MAAM,uBAAuB,CAAC;AAE9B,MAAM,4BAA4B,CAAC;",
6
6
  "names": []
7
7
  }
@@ -9,6 +9,10 @@ declare const inputOTPPropDefs: {
9
9
  values: readonly ["none", "sm", "md", "lg", "full"];
10
10
  default: "md";
11
11
  };
12
+ fill: {
13
+ type: "boolean";
14
+ default: false;
15
+ };
12
16
  asChild: {
13
17
  type: "boolean";
14
18
  default: false;
@@ -1 +1 @@
1
- {"version":3,"file":"inputOtp.props.d.cts","sourceRoot":"","sources":["../../../src/components/inputOtp/inputOtp.props.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;CAgBrB,CAAA;AAED,QAAA,MAAM,qBAAqB;;;;;CAI1B,CAAA;AAED,QAAA,MAAM,oBAAoB,IAAqC,CAAA;AAE/D,QAAA,MAAM,yBAAyB,IAAqC,CAAA;AAEpE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,GACrB,CAAA"}
1
+ {"version":3,"file":"inputOtp.props.d.cts","sourceRoot":"","sources":["../../../src/components/inputOtp/inputOtp.props.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;CAqBrB,CAAA;AAED,QAAA,MAAM,qBAAqB;;;;;CAI1B,CAAA;AAED,QAAA,MAAM,oBAAoB,IAAqC,CAAA;AAE/D,QAAA,MAAM,yBAAyB,IAAqC,CAAA;AAEpE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,GACrB,CAAA"}
@@ -9,6 +9,10 @@ declare const inputOTPPropDefs: {
9
9
  values: readonly ["none", "sm", "md", "lg", "full"];
10
10
  default: "md";
11
11
  };
12
+ fill: {
13
+ type: "boolean";
14
+ default: false;
15
+ };
12
16
  asChild: {
13
17
  type: "boolean";
14
18
  default: false;
@@ -1 +1 @@
1
- {"version":3,"file":"inputOtp.props.d.mts","sourceRoot":"","sources":["../../../src/components/inputOtp/inputOtp.props.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;CAgBrB,CAAA;AAED,QAAA,MAAM,qBAAqB;;;;;CAI1B,CAAA;AAED,QAAA,MAAM,oBAAoB,IAAqC,CAAA;AAE/D,QAAA,MAAM,yBAAyB,IAAqC,CAAA;AAEpE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,GACrB,CAAA"}
1
+ {"version":3,"file":"inputOtp.props.d.mts","sourceRoot":"","sources":["../../../src/components/inputOtp/inputOtp.props.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;CAqBrB,CAAA;AAED,QAAA,MAAM,qBAAqB;;;;;CAI1B,CAAA;AAED,QAAA,MAAM,oBAAoB,IAAqC,CAAA;AAE/D,QAAA,MAAM,yBAAyB,IAAqC,CAAA;AAEpE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,GACrB,CAAA"}
@@ -9,6 +9,10 @@ declare const inputOTPPropDefs: {
9
9
  values: readonly ["none", "sm", "md", "lg", "full"];
10
10
  default: "md";
11
11
  };
12
+ fill: {
13
+ type: "boolean";
14
+ default: false;
15
+ };
12
16
  asChild: {
13
17
  type: "boolean";
14
18
  default: false;
@@ -1 +1 @@
1
- {"version":3,"file":"inputOtp.props.d.ts","sourceRoot":"","sources":["../../../src/components/inputOtp/inputOtp.props.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;CAgBrB,CAAA;AAED,QAAA,MAAM,qBAAqB;;;;;CAI1B,CAAA;AAED,QAAA,MAAM,oBAAoB,IAAqC,CAAA;AAE/D,QAAA,MAAM,yBAAyB,IAAqC,CAAA;AAEpE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,GACrB,CAAA"}
1
+ {"version":3,"file":"inputOtp.props.d.ts","sourceRoot":"","sources":["../../../src/components/inputOtp/inputOtp.props.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;CAqBrB,CAAA;AAED,QAAA,MAAM,qBAAqB;;;;;CAI1B,CAAA;AAED,QAAA,MAAM,oBAAoB,IAAqC,CAAA;AAE/D,QAAA,MAAM,yBAAyB,IAAqC,CAAA;AAEpE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,GACrB,CAAA"}
@@ -12,6 +12,10 @@ const inputOTPPropDefs = {
12
12
  type: "enum",
13
13
  values: inputOTPRadiusValues,
14
14
  default: "md"
15
+ },
16
+ fill: {
17
+ type: "boolean",
18
+ default: false
15
19
  }
16
20
  };
17
21
  const inputOTPGroupPropDefs = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/inputOtp/inputOtp.props.ts"],
4
- "sourcesContent": ["import { asChildPropDef } from '../../_internal/props/asChild.prop'\n\nimport type { PropDef } from '../../_internal/props/propDef'\n\nconst inputOTPSizes = ['sm', 'md', 'lg'] as const\nconst inputOTPRadiusValues = ['none', 'sm', 'md', 'lg', 'full'] as const\n\nconst inputOTPPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n values: inputOTPSizes,\n default: 'md',\n },\n radius: {\n type: 'enum',\n values: inputOTPRadiusValues,\n default: 'md',\n },\n} satisfies {\n asChild: PropDef\n size: PropDef<(typeof inputOTPSizes)[number]>\n radius: PropDef<(typeof inputOTPRadiusValues)[number]>\n}\n\nconst inputOTPGroupPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nconst inputOTPSlotPropDefs = {} satisfies Record<string, never>\n\nconst inputOTPSeparatorPropDefs = {} satisfies Record<string, never>\n\nexport {\n inputOTPGroupPropDefs,\n inputOTPPropDefs,\n inputOTPSeparatorPropDefs,\n inputOTPSlotPropDefs,\n}\n"],
5
- "mappings": "AAAA,SAAS,sBAAsB;AAI/B,MAAM,gBAAgB,CAAC,MAAM,MAAM,IAAI;AACvC,MAAM,uBAAuB,CAAC,QAAQ,MAAM,MAAM,MAAM,MAAM;AAE9D,MAAM,mBAAmB;AAAA,EACvB,GAAG;AAAA,EACH,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AACF;AAMA,MAAM,wBAAwB;AAAA,EAC5B,GAAG;AACL;AAIA,MAAM,uBAAuB,CAAC;AAE9B,MAAM,4BAA4B,CAAC;",
4
+ "sourcesContent": ["import { asChildPropDef } from '../../_internal/props/asChild.prop'\n\nimport type { PropDef } from '../../_internal/props/propDef'\n\nconst inputOTPSizes = ['sm', 'md', 'lg'] as const\nconst inputOTPRadiusValues = ['none', 'sm', 'md', 'lg', 'full'] as const\n\nconst inputOTPPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n values: inputOTPSizes,\n default: 'md',\n },\n radius: {\n type: 'enum',\n values: inputOTPRadiusValues,\n default: 'md',\n },\n fill: {\n type: 'boolean',\n default: false,\n },\n} satisfies {\n asChild: PropDef\n size: PropDef<(typeof inputOTPSizes)[number]>\n radius: PropDef<(typeof inputOTPRadiusValues)[number]>\n fill: PropDef\n}\n\nconst inputOTPGroupPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nconst inputOTPSlotPropDefs = {} satisfies Record<string, never>\n\nconst inputOTPSeparatorPropDefs = {} satisfies Record<string, never>\n\nexport {\n inputOTPGroupPropDefs,\n inputOTPPropDefs,\n inputOTPSeparatorPropDefs,\n inputOTPSlotPropDefs,\n}\n"],
5
+ "mappings": "AAAA,SAAS,sBAAsB;AAI/B,MAAM,gBAAgB,CAAC,MAAM,MAAM,IAAI;AACvC,MAAM,uBAAuB,CAAC,QAAQ,MAAM,MAAM,MAAM,MAAM;AAE9D,MAAM,mBAAmB;AAAA,EACvB,GAAG;AAAA,EACH,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF;AAOA,MAAM,wBAAwB;AAAA,EAC5B,GAAG;AACL;AAIA,MAAM,uBAAuB,CAAC;AAE9B,MAAM,4BAA4B,CAAC;",
6
6
  "names": []
7
7
  }
@@ -78,6 +78,27 @@
78
78
  color: var(--dsx-color-high-contrast);
79
79
  }
80
80
 
81
+ /* A `<button>` host (`asChild`) is a link-weight action, "Resend (0:42)" inside a sentence. The browser's button chrome (grey fill, 2px
82
+ outset border, 6px padding, its own font) is reset so it reads in the line like an anchor; the reset adds no specificity beyond the
83
+ class, so a size or a tone still wins over it. A disabled one drops to the muted ink and stops looking clickable. Both come after
84
+ the colour rules above so they win over them. */
85
+ .dsx-link:where(button) {
86
+ appearance: none;
87
+ margin: 0;
88
+ padding: 0;
89
+ border: 0;
90
+ background: none;
91
+ font: inherit;
92
+ letter-spacing: inherit;
93
+ text-align: inherit;
94
+ }
95
+
96
+ .dsx-link:where(button):disabled {
97
+ color: var(--dsx-color-on-surface-variant);
98
+ cursor: not-allowed;
99
+ text-decoration-line: none;
100
+ }
101
+
81
102
  @media (prefers-reduced-motion: reduce) {
82
103
  .dsx-link {
83
104
  transition: none;
@@ -118,15 +118,23 @@
118
118
  border-top: var(--dsx-border-width-sm) solid var(--dsx-color-outline-variant);
119
119
  }
120
120
 
121
+ /* G-20 (2026-10-05): the trigger is an ordinary icon button (size sm, 32px, like every other header icon) and the count hangs
122
+ on its corner, so the hover highlight covers the bell only. It used to be laid out inside the button, which made the
123
+ button a 59x44 pill that wrapped the count and was the one header control with a different shape (the maintainer: "I feel
124
+ like no one does it"). The count hangs about 17px past the trailing edge; the margin reserves that room whatever gap the
125
+ host uses, and it is always reserved so the controls after the bell do not move when a count appears. */
121
126
  .dsx-notification-center__trigger.dsx-icon-button {
122
127
  position: relative;
123
- display: inline-flex;
124
- align-items: center;
125
- gap: 0;
126
- width: auto;
127
- min-width: calc(var(--dsx-size-xl) + var(--dsx-space-xs));
128
- height: calc(var(--dsx-size-xl) + var(--dsx-space-xs));
129
- padding-inline: var(--dsx-space-sm);
128
+ margin-inline-end: var(--dsx-space-md);
129
+ }
130
+
131
+ /* The highlight is 32px but the hit area stays 44px (size-xl + space-xs, the floor the earlier bell contract set): this
132
+ pseudo-element is part of the button for pointer events, and its inset shrinks to nothing on a larger size. The selector
133
+ stays at (0,1,1): the policy allows (0,2,0) in this file and `.dsx-icon-button` has no pseudo-element rules to outrank. */
134
+ .dsx-notification-center__trigger::after {
135
+ content: '';
136
+ position: absolute;
137
+ inset: calc((100% - (var(--dsx-size-xl) + var(--dsx-space-xs))) / 2);
130
138
  }
131
139
 
132
140
  .dsx-notification-center__trigger .dsx-icon-button__content {
@@ -134,9 +142,9 @@
134
142
  }
135
143
 
136
144
  .dsx-notification-center__badge {
137
- position: relative;
145
+ position: absolute;
138
146
  top: calc(-1 * var(--dsx-space-sm));
139
- margin-inline-start: calc(-1 * var(--dsx-space-xs));
147
+ inset-inline-start: calc(50% + var(--dsx-space-xs));
140
148
  flex-shrink: 0;
141
149
  min-width: var(--dsx-size-sm);
142
150
  height: var(--dsx-size-sm);
@@ -45,6 +45,10 @@ var import_IconButton = require("../iconButton/IconButton");
45
45
  var import_Icon = require("../icon/Icon");
46
46
  var import_notificationCenter = require("./notificationCenter.props");
47
47
  var import_jsx_runtime = require("react/jsx-runtime");
48
+ const DEFAULT_BADGE_MAX = 99;
49
+ function resolveBadgeMax(max) {
50
+ return max !== void 0 && Number.isInteger(max) && max > 0 ? max : DEFAULT_BADGE_MAX;
51
+ }
48
52
  const NotificationCenter = React.forwardRef(
49
53
  ({ children, unreadCount, ...props }, forwardedRef) => {
50
54
  const { asChild, className, variant = "popover", ...notificationCenterProps } = (0, import_extractProps.extractProps)(
@@ -115,9 +119,10 @@ const NotificationCenterItem = React.forwardRef(
115
119
  );
116
120
  NotificationCenterItem.displayName = "NotificationCenterItem";
117
121
  const NotificationCenterTrigger = React.forwardRef(
118
- ({ children, unreadCount, className, ...props }, forwardedRef) => {
122
+ ({ children, unreadCount, max, className, ...props }, forwardedRef) => {
119
123
  const { asChild, ...triggerProps } = (0, import_extractProps.extractProps)(props, import_notificationCenter.notificationCenterTriggerPropDefs);
120
- const badge = unreadCount && unreadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Badge.Badge, { variant: "primary", size: "sm", className: "dsx-notification-center__badge", "aria-hidden": "true", children: unreadCount > 99 ? "99+" : unreadCount }) : null;
124
+ const cap = resolveBadgeMax(max);
125
+ const badge = unreadCount && unreadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Badge.Badge, { variant: "primary", size: "sm", className: "dsx-notification-center__badge", "aria-hidden": "true", children: unreadCount > cap ? `${cap}+` : unreadCount }) : null;
121
126
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
122
127
  import_IconButton.IconButton,
123
128
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/notificationCenter/NotificationCenter.tsx"],
4
- "sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot, Slottable } from '@radix-ui/react-slot'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { Badge } from '../badge/Badge'\nimport { IconButton } from '../iconButton/IconButton'\nimport { Icon } from '../icon/Icon'\nimport {\n notificationCenterPropDefs,\n notificationCenterHeaderPropDefs,\n notificationCenterListPropDefs,\n notificationCenterFooterPropDefs,\n notificationCenterItemPropDefs,\n notificationCenterTriggerPropDefs,\n} from './notificationCenter.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype NotificationCenterOwnProps = GetPropDefTypes<typeof notificationCenterPropDefs>\ntype NotificationCenterHeaderOwnProps = GetPropDefTypes<typeof notificationCenterHeaderPropDefs>\ntype NotificationCenterListOwnProps = GetPropDefTypes<typeof notificationCenterListPropDefs>\ntype NotificationCenterFooterOwnProps = GetPropDefTypes<typeof notificationCenterFooterPropDefs>\ntype NotificationCenterItemOwnProps = GetPropDefTypes<typeof notificationCenterItemPropDefs>\ntype NotificationCenterTriggerOwnProps = GetPropDefTypes<typeof notificationCenterTriggerPropDefs>\n\ninterface NotificationCenterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterOwnProps {\n unreadCount?: number\n}\ninterface NotificationCenterHeaderProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterHeaderOwnProps {}\ninterface NotificationCenterListProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterListOwnProps {}\ninterface NotificationCenterFooterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterFooterOwnProps {}\ninterface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterItemOwnProps {}\ninterface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {\n unreadCount?: number\n}\n\nconst NotificationCenter = React.forwardRef<HTMLDivElement, NotificationCenterProps>(\n ({ children, unreadCount, ...props }, forwardedRef) => {\n const { asChild, className, variant = 'popover', ...notificationCenterProps } = extractProps(\n props,\n notificationCenterPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...notificationCenterProps}\n ref={forwardedRef}\n className={classNames(\n 'dsx-notification-center',\n variant === 'popover' && 'dsx-notification-center--popover',\n variant === 'sidebar' && 'dsx-notification-center--sidebar',\n className,\n )}\n data-unread={unreadCount && unreadCount > 0 ? String(unreadCount) : undefined}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenter.displayName = 'NotificationCenter'\n\nconst NotificationCenterHeader = React.forwardRef<HTMLDivElement, NotificationCenterHeaderProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...headerProps } = extractProps(props, notificationCenterHeaderPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...headerProps} ref={forwardedRef} className={classNames('dsx-notification-center__header', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterHeader.displayName = 'NotificationCenterHeader'\n\nconst NotificationCenterList = React.forwardRef<HTMLDivElement, NotificationCenterListProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...listProps } = extractProps(props, notificationCenterListPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...listProps} ref={forwardedRef} className={classNames('dsx-notification-center__list', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterList.displayName = 'NotificationCenterList'\n\nconst NotificationCenterFooter = React.forwardRef<HTMLDivElement, NotificationCenterFooterProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...footerProps } = extractProps(props, notificationCenterFooterPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...footerProps} ref={forwardedRef} className={classNames('dsx-notification-center__footer', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterFooter.displayName = 'NotificationCenterFooter'\n\nconst NotificationCenterItem = React.forwardRef<HTMLDivElement, NotificationCenterItemProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, unread = false, ...itemProps } = extractProps(\n props,\n notificationCenterItemPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...itemProps}\n ref={forwardedRef}\n data-unread={unread ? 'true' : undefined}\n className={classNames('dsx-notification-center__item', unread && 'dsx-notification-center__item--unread', className)}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterItem.displayName = 'NotificationCenterItem'\n\nconst NotificationCenterTrigger = React.forwardRef<HTMLButtonElement, NotificationCenterTriggerProps>(\n ({ children, unreadCount, className, ...props }, forwardedRef) => {\n const { asChild, ...triggerProps } = extractProps(props, notificationCenterTriggerPropDefs)\n const badge = unreadCount && unreadCount > 0 ? (\n <Badge variant=\"primary\" size=\"sm\" className=\"dsx-notification-center__badge\" aria-hidden=\"true\">\n {unreadCount > 99 ? '99+' : unreadCount}\n </Badge>\n ) : null\n\n return (\n <IconButton\n {...triggerProps}\n ref={forwardedRef}\n asChild={asChild}\n variant=\"ghost\"\n size=\"sm\"\n className={classNames('dsx-notification-center__trigger', className)}\n aria-label={props['aria-label'] ?? (unreadCount && unreadCount > 0 ? `Notifications, ${unreadCount} unread` : 'Notifications')}\n >\n {asChild ? (\n <Slot><Slottable>{children}</Slottable>{badge}</Slot>\n ) : (\n <>{children ?? <Icon name=\"bell\" size=\"sm\" />}{badge}</>\n )}\n </IconButton>\n )\n },\n)\nNotificationCenterTrigger.displayName = 'NotificationCenterTrigger'\n\nconst NotificationCenterRoot: typeof NotificationCenter & {\n Header: typeof NotificationCenterHeader\n List: typeof NotificationCenterList\n Footer: typeof NotificationCenterFooter\n Item: typeof NotificationCenterItem\n Trigger: typeof NotificationCenterTrigger\n} = Object.assign(NotificationCenter, {\n Header: NotificationCenterHeader,\n List: NotificationCenterList,\n Footer: NotificationCenterFooter,\n Item: NotificationCenterItem,\n Trigger: NotificationCenterTrigger,\n})\n\nexport {\n NotificationCenterRoot as NotificationCenter,\n NotificationCenterHeader,\n NotificationCenterList,\n NotificationCenterFooter,\n NotificationCenterItem,\n NotificationCenterTrigger,\n}\nexport type {\n NotificationCenterProps,\n NotificationCenterHeaderProps,\n NotificationCenterListProps,\n NotificationCenterFooterProps,\n NotificationCenterItemProps,\n NotificationCenterTriggerProps,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ACE,GAAG;AAAA,QACJ,KAAK;AAAA,QACL;AAAA,QACA,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,eAAW,kBAAAA,SAAW,oCAAoC,SAAS;AAAA,QACnE,cAAY,MAAM,YAAY,MAAM,eAAe,cAAc,IAAI,kBAAkB,WAAW,YAAY;AAAA,QAE7G,oBACC,6CAAC,0BAAK;AAAA,sDAAC,+BAAW,UAAS;AAAA,UAAa;AAAA,WAAM,IAE9C,4EAAG;AAAA,sBAAY,4CAAC,oBAAK,MAAK,QAAO,MAAK,MAAK;AAAA,UAAI;AAAA,WAAM;AAAA;AAAA,IAEzD;AAAA,EAEN;AACF;AACA,0BAA0B,cAAc;AAExC,MAAM,yBAMF,OAAO,OAAO,oBAAoB;AAAA,EACpC,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AACX,CAAC;",
4
+ "sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot, Slottable } from '@radix-ui/react-slot'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { Badge } from '../badge/Badge'\nimport { IconButton } from '../iconButton/IconButton'\nimport { Icon } from '../icon/Icon'\nimport {\n notificationCenterPropDefs,\n notificationCenterHeaderPropDefs,\n notificationCenterListPropDefs,\n notificationCenterFooterPropDefs,\n notificationCenterItemPropDefs,\n notificationCenterTriggerPropDefs,\n} from './notificationCenter.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype NotificationCenterOwnProps = GetPropDefTypes<typeof notificationCenterPropDefs>\ntype NotificationCenterHeaderOwnProps = GetPropDefTypes<typeof notificationCenterHeaderPropDefs>\ntype NotificationCenterListOwnProps = GetPropDefTypes<typeof notificationCenterListPropDefs>\ntype NotificationCenterFooterOwnProps = GetPropDefTypes<typeof notificationCenterFooterPropDefs>\ntype NotificationCenterItemOwnProps = GetPropDefTypes<typeof notificationCenterItemPropDefs>\ntype NotificationCenterTriggerOwnProps = GetPropDefTypes<typeof notificationCenterTriggerPropDefs>\n\ninterface NotificationCenterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterOwnProps {\n unreadCount?: number\n}\ninterface NotificationCenterHeaderProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterHeaderOwnProps {}\ninterface NotificationCenterListProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterListOwnProps {}\ninterface NotificationCenterFooterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterFooterOwnProps {}\ninterface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterItemOwnProps {}\ninterface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {\n unreadCount?: number\n /** Largest count the badge draws; above it the badge reads `{max}+`. Default 99. The accessible name keeps the real count. */\n max?: number\n}\n\nconst DEFAULT_BADGE_MAX = 99\n\n// A cap that is not a positive whole number falls back to the default, so a bad prop never prints \"NaN+\" or \"0+\".\nfunction resolveBadgeMax(max: number | undefined): number {\n return max !== undefined && Number.isInteger(max) && max > 0 ? max : DEFAULT_BADGE_MAX\n}\n\nconst NotificationCenter = React.forwardRef<HTMLDivElement, NotificationCenterProps>(\n ({ children, unreadCount, ...props }, forwardedRef) => {\n const { asChild, className, variant = 'popover', ...notificationCenterProps } = extractProps(\n props,\n notificationCenterPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...notificationCenterProps}\n ref={forwardedRef}\n className={classNames(\n 'dsx-notification-center',\n variant === 'popover' && 'dsx-notification-center--popover',\n variant === 'sidebar' && 'dsx-notification-center--sidebar',\n className,\n )}\n data-unread={unreadCount && unreadCount > 0 ? String(unreadCount) : undefined}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenter.displayName = 'NotificationCenter'\n\nconst NotificationCenterHeader = React.forwardRef<HTMLDivElement, NotificationCenterHeaderProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...headerProps } = extractProps(props, notificationCenterHeaderPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...headerProps} ref={forwardedRef} className={classNames('dsx-notification-center__header', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterHeader.displayName = 'NotificationCenterHeader'\n\nconst NotificationCenterList = React.forwardRef<HTMLDivElement, NotificationCenterListProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...listProps } = extractProps(props, notificationCenterListPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...listProps} ref={forwardedRef} className={classNames('dsx-notification-center__list', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterList.displayName = 'NotificationCenterList'\n\nconst NotificationCenterFooter = React.forwardRef<HTMLDivElement, NotificationCenterFooterProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...footerProps } = extractProps(props, notificationCenterFooterPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...footerProps} ref={forwardedRef} className={classNames('dsx-notification-center__footer', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterFooter.displayName = 'NotificationCenterFooter'\n\nconst NotificationCenterItem = React.forwardRef<HTMLDivElement, NotificationCenterItemProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, unread = false, ...itemProps } = extractProps(\n props,\n notificationCenterItemPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...itemProps}\n ref={forwardedRef}\n data-unread={unread ? 'true' : undefined}\n className={classNames('dsx-notification-center__item', unread && 'dsx-notification-center__item--unread', className)}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterItem.displayName = 'NotificationCenterItem'\n\nconst NotificationCenterTrigger = React.forwardRef<HTMLButtonElement, NotificationCenterTriggerProps>(\n ({ children, unreadCount, max, className, ...props }, forwardedRef) => {\n const { asChild, ...triggerProps } = extractProps(props, notificationCenterTriggerPropDefs)\n const cap = resolveBadgeMax(max)\n const badge = unreadCount && unreadCount > 0 ? (\n <Badge variant=\"primary\" size=\"sm\" className=\"dsx-notification-center__badge\" aria-hidden=\"true\">\n {unreadCount > cap ? `${cap}+` : unreadCount}\n </Badge>\n ) : null\n\n return (\n <IconButton\n {...triggerProps}\n ref={forwardedRef}\n asChild={asChild}\n variant=\"ghost\"\n size=\"sm\"\n className={classNames('dsx-notification-center__trigger', className)}\n aria-label={props['aria-label'] ?? (unreadCount && unreadCount > 0 ? `Notifications, ${unreadCount} unread` : 'Notifications')}\n >\n {asChild ? (\n <Slot><Slottable>{children}</Slottable>{badge}</Slot>\n ) : (\n <>{children ?? <Icon name=\"bell\" size=\"sm\" />}{badge}</>\n )}\n </IconButton>\n )\n },\n)\nNotificationCenterTrigger.displayName = 'NotificationCenterTrigger'\n\nconst NotificationCenterRoot: typeof NotificationCenter & {\n Header: typeof NotificationCenterHeader\n List: typeof NotificationCenterList\n Footer: typeof NotificationCenterFooter\n Item: typeof NotificationCenterItem\n Trigger: typeof NotificationCenterTrigger\n} = Object.assign(NotificationCenter, {\n Header: NotificationCenterHeader,\n List: NotificationCenterList,\n Footer: NotificationCenterFooter,\n Item: NotificationCenterItem,\n Trigger: NotificationCenterTrigger,\n})\n\nexport {\n NotificationCenterRoot as NotificationCenter,\n NotificationCenterHeader,\n NotificationCenterList,\n NotificationCenterFooter,\n NotificationCenterItem,\n NotificationCenterTrigger,\n}\nexport type {\n NotificationCenterProps,\n NotificationCenterHeaderProps,\n NotificationCenterListProps,\n NotificationCenterFooterProps,\n NotificationCenterItemProps,\n NotificationCenterTriggerProps,\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,wBAAuB;AACvB,wBAAgC;AAEhC,0BAA6B;AAC7B,mBAAsB;AACtB,wBAA2B;AAC3B,kBAAqB;AACrB,gCAOO;AAwCD;AAhBN,MAAM,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A,QACL,eAAW,kBAAAA,SAAW,oCAAoC,SAAS;AAAA,QACnE,cAAY,MAAM,YAAY,MAAM,eAAe,cAAc,IAAI,kBAAkB,WAAW,YAAY;AAAA,QAE7G,oBACC,6CAAC,0BAAK;AAAA,sDAAC,+BAAW,UAAS;AAAA,UAAa;AAAA,WAAM,IAE9C,4EAAG;AAAA,sBAAY,4CAAC,oBAAK,MAAK,QAAO,MAAK,MAAK;AAAA,UAAI;AAAA,WAAM;AAAA;AAAA,IAEzD;AAAA,EAEN;AACF;AACA,0BAA0B,cAAc;AAExC,MAAM,yBAMF,OAAO,OAAO,oBAAoB;AAAA,EACpC,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AACX,CAAC;",
6
6
  "names": ["classNames"]
7
7
  }
@@ -20,6 +20,8 @@ interface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElemen
20
20
  }
21
21
  interface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {
22
22
  unreadCount?: number;
23
+ /** Largest count the badge draws; above it the badge reads `{max}+`. Default 99. The accessible name keeps the real count. */
24
+ max?: number;
23
25
  }
24
26
  declare const NotificationCenter: React.ForwardRefExoticComponent<NotificationCenterProps & React.RefAttributes<HTMLDivElement>>;
25
27
  declare const NotificationCenterHeader: React.ForwardRefExoticComponent<NotificationCenterHeaderProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCenter.d.cts","sourceRoot":"","sources":["../../../src/components/notificationCenter/NotificationCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,eAAe,E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,0GA2B9B,CAAA;AAGD,QAAA,MAAM,sBAAsB,EAAE,OAAO,kBAAkB,GAAG;IACxD,MAAM,EAAE,OAAO,wBAAwB,CAAA;IACvC,IAAI,EAAE,OAAO,sBAAsB,CAAA;IACnC,MAAM,EAAE,OAAO,wBAAwB,CAAA;IACvC,IAAI,EAAE,OAAO,sBAAsB,CAAA;IACnC,OAAO,EAAE,OAAO,yBAAyB,CAAA;CAOzC,CAAA;AAEF,OAAO,EACL,sBAAsB,IAAI,kBAAkB,EAC5C,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,GAC1B,CAAA;AACD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAA"}
1
+ {"version":3,"file":"NotificationCenter.d.cts","sourceRoot":"","sources":["../../../src/components/notificationCenter/NotificationCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,KAAK,0BAA0B,GAAG,eAAe,CAAC,OAAO,0BAA0B,CAAC,CAAA;AACpF,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,iCAAiC,GAAG,eAAe,CAAC,OAAO,iCAAiC,CAAC,CA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,sBAAsB,EACtB,yBAAyB,GAC1B,CAAA;AACD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAA"}
@@ -20,6 +20,8 @@ interface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElemen
20
20
  }
21
21
  interface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {
22
22
  unreadCount?: number;
23
+ /** Largest count the badge draws; above it the badge reads `{max}+`. Default 99. The accessible name keeps the real count. */
24
+ max?: number;
23
25
  }
24
26
  declare const NotificationCenter: React.ForwardRefExoticComponent<NotificationCenterProps & React.RefAttributes<HTMLDivElement>>;
25
27
  declare const NotificationCenterHeader: React.ForwardRefExoticComponent<NotificationCenterHeaderProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCenter.d.mts","sourceRoot":"","sources":["../../../src/components/notificationCenter/NotificationCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,KAAK,0BAA0B,GAAG,eAAe,CAAC,OAAO,0BAA0B,CAAC,CAAA;AACpF,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,K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ACxB,sBAAsB,EACtB,yBAAyB,GAC1B,CAAA;AACD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAA"}
1
+ {"version":3,"file":"NotificationCenter.d.mts","sourceRoot":"","sources":["../../../src/components/notificationCenter/NotificationCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,KAAK,0BAA0B,GAAG,eAAe,CAAC,OAAO,0BAA0B,CAAC,CAAA;AACpF,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,iCAAiC,GAAG,eAAe,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAElG,UAAU,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,0BAA0B;IACxG,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,UAAU,6BAA8B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,gCAAgC;CAAG;AACzH,UAAU,2BAA4B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,8BAA8B;CAAG;AACrH,UAAU,6BAA8B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,gCAAgC;CAAG;AACzH,UAAU,2BAA4B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,8BAA8B;CAAG;AACrH,UAAU,8BAA+B,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,iCAAiC;IAC/H,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8HAA8H;IAC9H,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AASD,QAAA,MAAM,kBAAkB,gGAwBvB,CAAA;AAGD,QAAA,MAAM,wBAAwB,sGAW7B,CAAA;AAGD,QAAA,MAAM,sBAAsB,oGAW3B,CAAA;AAGD,QAAA,MAAM,wBAAwB,sGAW7B,CAAA;AAGD,QAAA,MAAM,sBAAsB,oGAmB3B,CAAA;AAGD,QAAA,MAAM,yBAAyB,0GA4B9B,CAAA;AAGD,QAAA,MAAM,sBAAsB,EAAE,OAAO,kBAAkB,GAAG;IACxD,MAAM,EAAE,OAAO,wBAAwB,CAAA;IACvC,IAAI,EAAE,OAAO,sBAAsB,CAAA;IACnC,MAAM,EAAE,OAAO,wBAAwB,CAAA;IACvC,IAAI,EAAE,OAAO,sBAAsB,CAAA;IACnC,OAAO,EAAE,OAAO,yBAAyB,CAAA;CAOzC,CAAA;AAEF,OAAO,EACL,sBAAsB,IAAI,kBAAkB,EAC5C,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,GAC1B,CAAA;AACD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAA"}
@@ -20,6 +20,8 @@ interface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElemen
20
20
  }
21
21
  interface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {
22
22
  unreadCount?: number;
23
+ /** Largest count the badge draws; above it the badge reads `{max}+`. Default 99. The accessible name keeps the real count. */
24
+ max?: number;
23
25
  }
24
26
  declare const NotificationCenter: React.ForwardRefExoticComponent<NotificationCenterProps & React.RefAttributes<HTMLDivElement>>;
25
27
  declare const NotificationCenterHeader: React.ForwardRefExoticComponent<NotificationCenterHeaderProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCenter.d.ts","sourceRoot":"","sources":["../../../src/components/notificationCenter/NotificationCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,KAAK,0BAA0B,GAAG,eAAe,CAAC,OAAO,0BAA0B,CAAC,CAAA;AACpF,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,iCAAiC,GAAG,eAAe,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAElG,UAAU,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,0BAA0B;IACxG,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,UAAU,6BAA8B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,gCAAgC;CAAG;AACzH,UAAU,2BAA4B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,8BAA8B;CAAG;AACrH,UAAU,6BAA8B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,gCAAgC;CAAG;AACzH,UAAU,2BAA4B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,8BAA8B;CAAG;AACrH,UAAU,8BAA+B,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,iCAAiC;IAC/H,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,QAAA,MAAM,kBAAkB,gGAwBvB,CAAA;AAGD,QAAA,MAAM,wBAAwB,sGAW7B,CAAA;AAGD,QAAA,MAAM,sBAAsB,oGAW3B,CAAA;AAGD,QAAA,MAAM,wBAAwB,sGAW7B,CAAA;AAGD,QAAA,MAAM,sBAAsB,oGAmB3B,CAAA;AAGD,QAAA,MAAM,yBAAyB,0GA2B9B,CAAA;AAGD,QAAA,MAAM,sBAAsB,EAAE,OAAO,kBAAkB,GAAG;IACxD,MAAM,EAAE,OAAO,wBAAwB,CAAA;IACvC,IAAI,EAAE,OAAO,sBAAsB,CAAA;IACnC,MAAM,EAAE,OAAO,wBAAwB,CAAA;IACvC,IAAI,EAAE,OAAO,sBAAsB,CAAA;IACnC,OAAO,EAAE,OAAO,yBAAyB,CAAA;CAOzC,CAAA;AAEF,OAAO,EACL,sBAAsB,IAAI,kBAAkB,EAC5C,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,GAC1B,CAAA;AACD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAA"}
1
+ {"version":3,"file":"NotificationCenter.d.ts","sourceRoot":"","sources":["../../../src/components/notificationCenter/NotificationCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,gC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D,QAAA,MAAM,sBAAsB,oGAW3B,CAAA;AAGD,QAAA,MAAM,wBAAwB,sGAW7B,CAAA;AAGD,QAAA,MAAM,sBAAsB,oGAmB3B,CAAA;AAGD,QAAA,MAAM,yBAAyB,0GA4B9B,CAAA;AAGD,QAAA,MAAM,sBAAsB,EAAE,OAAO,kBAAkB,GAAG;IACxD,MAAM,EAAE,OAAO,wBAAwB,CAAA;IACvC,IAAI,EAAE,OAAO,sBAAsB,CAAA;IACnC,MAAM,EAAE,OAAO,wBAAwB,CAAA;IACvC,IAAI,EAAE,OAAO,sBAAsB,CAAA;IACnC,OAAO,EAAE,OAAO,yBAAyB,CAAA;CAOzC,CAAA;AAEF,OAAO,EACL,sBAAsB,IAAI,kBAAkB,EAC5C,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,GAC1B,CAAA;AACD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAA"}
@@ -14,6 +14,10 @@ import {
14
14
  notificationCenterTriggerPropDefs
15
15
  } from "./notificationCenter.props.js";
16
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
+ const DEFAULT_BADGE_MAX = 99;
18
+ function resolveBadgeMax(max) {
19
+ return max !== void 0 && Number.isInteger(max) && max > 0 ? max : DEFAULT_BADGE_MAX;
20
+ }
17
21
  const NotificationCenter = React.forwardRef(
18
22
  ({ children, unreadCount, ...props }, forwardedRef) => {
19
23
  const { asChild, className, variant = "popover", ...notificationCenterProps } = extractProps(
@@ -84,9 +88,10 @@ const NotificationCenterItem = React.forwardRef(
84
88
  );
85
89
  NotificationCenterItem.displayName = "NotificationCenterItem";
86
90
  const NotificationCenterTrigger = React.forwardRef(
87
- ({ children, unreadCount, className, ...props }, forwardedRef) => {
91
+ ({ children, unreadCount, max, className, ...props }, forwardedRef) => {
88
92
  const { asChild, ...triggerProps } = extractProps(props, notificationCenterTriggerPropDefs);
89
- const badge = unreadCount && unreadCount > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "dsx-notification-center__badge", "aria-hidden": "true", children: unreadCount > 99 ? "99+" : unreadCount }) : null;
93
+ const cap = resolveBadgeMax(max);
94
+ const badge = unreadCount && unreadCount > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "dsx-notification-center__badge", "aria-hidden": "true", children: unreadCount > cap ? `${cap}+` : unreadCount }) : null;
90
95
  return /* @__PURE__ */ jsx(
91
96
  IconButton,
92
97
  {