@d4gger/design-system 4.2.2 → 4.2.3

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 (144) hide show
  1. package/dist/blocks/kits/runsPage/RunsPage.cjs +4 -2
  2. package/dist/blocks/kits/runsPage/RunsPage.cjs.map +2 -2
  3. package/dist/blocks/kits/runsPage/RunsPage.d.cts.map +1 -1
  4. package/dist/blocks/kits/runsPage/RunsPage.d.mts.map +1 -1
  5. package/dist/blocks/kits/runsPage/RunsPage.d.ts.map +1 -1
  6. package/dist/blocks/kits/runsPage/RunsPage.js +4 -2
  7. package/dist/blocks/kits/runsPage/RunsPage.js.map +2 -2
  8. package/dist/components/articleNodes/articleExtensions.cjs +7 -1
  9. package/dist/components/articleNodes/articleExtensions.cjs.map +3 -3
  10. package/dist/components/articleNodes/articleExtensions.d.cts.map +1 -1
  11. package/dist/components/articleNodes/articleExtensions.d.mts.map +1 -1
  12. package/dist/components/articleNodes/articleExtensions.d.ts.map +1 -1
  13. package/dist/components/articleNodes/articleExtensions.js +7 -1
  14. package/dist/components/articleNodes/articleExtensions.js.map +2 -2
  15. package/dist/components/carousel/Carousel.cjs +15 -0
  16. package/dist/components/carousel/Carousel.cjs.map +2 -2
  17. package/dist/components/carousel/Carousel.d.cts.map +1 -1
  18. package/dist/components/carousel/Carousel.d.mts.map +1 -1
  19. package/dist/components/carousel/Carousel.d.ts.map +1 -1
  20. package/dist/components/carousel/Carousel.js +15 -0
  21. package/dist/components/carousel/Carousel.js.map +2 -2
  22. package/dist/components/data-table.css +3 -1
  23. package/dist/components/dataTable/DataTable.cjs +4 -1
  24. package/dist/components/dataTable/DataTable.cjs.map +2 -2
  25. package/dist/components/dataTable/DataTable.d.cts.map +1 -1
  26. package/dist/components/dataTable/DataTable.d.mts.map +1 -1
  27. package/dist/components/dataTable/DataTable.d.ts.map +1 -1
  28. package/dist/components/dataTable/DataTable.js +4 -1
  29. package/dist/components/dataTable/DataTable.js.map +2 -2
  30. package/dist/components/icon/Icon.cjs +24 -0
  31. package/dist/components/icon/Icon.cjs.map +2 -2
  32. package/dist/components/icon/Icon.d.cts +33 -1
  33. package/dist/components/icon/Icon.d.cts.map +1 -1
  34. package/dist/components/icon/Icon.d.mts +33 -1
  35. package/dist/components/icon/Icon.d.mts.map +1 -1
  36. package/dist/components/icon/Icon.d.ts +33 -1
  37. package/dist/components/icon/Icon.d.ts.map +1 -1
  38. package/dist/components/icon/Icon.js +32 -0
  39. package/dist/components/icon/Icon.js.map +2 -2
  40. package/dist/components/icon/icons.cjs +16 -0
  41. package/dist/components/icon/icons.cjs.map +2 -2
  42. package/dist/components/icon/icons.d.cts +40 -0
  43. package/dist/components/icon/icons.d.cts.map +1 -1
  44. package/dist/components/icon/icons.d.mts +40 -0
  45. package/dist/components/icon/icons.d.mts.map +1 -1
  46. package/dist/components/icon/icons.d.ts +40 -0
  47. package/dist/components/icon/icons.d.ts.map +1 -1
  48. package/dist/components/icon/icons.js +16 -0
  49. package/dist/components/icon/icons.js.map +2 -2
  50. package/dist/components/index.cjs +2 -0
  51. package/dist/components/index.cjs.map +2 -2
  52. package/dist/components/index.d.cts +2 -0
  53. package/dist/components/index.d.cts.map +1 -1
  54. package/dist/components/index.d.mts +2 -0
  55. package/dist/components/index.d.mts.map +1 -1
  56. package/dist/components/index.d.ts +2 -0
  57. package/dist/components/index.d.ts.map +1 -1
  58. package/dist/components/index.js +2 -0
  59. package/dist/components/index.js.map +2 -2
  60. package/dist/components/reactions/Reactions.cjs +176 -0
  61. package/dist/components/reactions/Reactions.cjs.map +7 -0
  62. package/dist/components/reactions/Reactions.d.cts +55 -0
  63. package/dist/components/reactions/Reactions.d.cts.map +1 -0
  64. package/dist/components/reactions/Reactions.d.mts +55 -0
  65. package/dist/components/reactions/Reactions.d.mts.map +1 -0
  66. package/dist/components/reactions/Reactions.d.ts +55 -0
  67. package/dist/components/reactions/Reactions.d.ts.map +1 -0
  68. package/dist/components/reactions/Reactions.js +146 -0
  69. package/dist/components/reactions/Reactions.js.map +7 -0
  70. package/dist/components/reactions/reactions.props.cjs +38 -0
  71. package/dist/components/reactions/reactions.props.cjs.map +7 -0
  72. package/dist/components/reactions/reactions.props.d.cts +17 -0
  73. package/dist/components/reactions/reactions.props.d.cts.map +1 -0
  74. package/dist/components/reactions/reactions.props.d.mts +17 -0
  75. package/dist/components/reactions/reactions.props.d.mts.map +1 -0
  76. package/dist/components/reactions/reactions.props.d.ts +17 -0
  77. package/dist/components/reactions/reactions.props.d.ts.map +1 -0
  78. package/dist/components/reactions/reactions.props.js +18 -0
  79. package/dist/components/reactions/reactions.props.js.map +7 -0
  80. package/dist/components/reactions.css +106 -0
  81. package/dist/components/rich-text-editor.css +15 -0
  82. package/dist/components/richTextEditor/EditorTools.cjs +278 -21
  83. package/dist/components/richTextEditor/EditorTools.cjs.map +2 -2
  84. package/dist/components/richTextEditor/EditorTools.d.cts +29 -2
  85. package/dist/components/richTextEditor/EditorTools.d.cts.map +1 -1
  86. package/dist/components/richTextEditor/EditorTools.d.mts +29 -2
  87. package/dist/components/richTextEditor/EditorTools.d.mts.map +1 -1
  88. package/dist/components/richTextEditor/EditorTools.d.ts +29 -2
  89. package/dist/components/richTextEditor/EditorTools.d.ts.map +1 -1
  90. package/dist/components/richTextEditor/EditorTools.js +278 -21
  91. package/dist/components/richTextEditor/EditorTools.js.map +2 -2
  92. package/dist/components/richTextEditor/RichTextEditor.cjs +3 -1
  93. package/dist/components/richTextEditor/RichTextEditor.cjs.map +2 -2
  94. package/dist/components/richTextEditor/RichTextEditor.d.cts.map +1 -1
  95. package/dist/components/richTextEditor/RichTextEditor.d.mts.map +1 -1
  96. package/dist/components/richTextEditor/RichTextEditor.d.ts.map +1 -1
  97. package/dist/components/richTextEditor/RichTextEditor.js +4 -2
  98. package/dist/components/richTextEditor/RichTextEditor.js.map +2 -2
  99. package/dist/components/share/Share.cjs +108 -0
  100. package/dist/components/share/Share.cjs.map +7 -0
  101. package/dist/components/share/Share.d.cts +28 -0
  102. package/dist/components/share/Share.d.cts.map +1 -0
  103. package/dist/components/share/Share.d.mts +28 -0
  104. package/dist/components/share/Share.d.mts.map +1 -0
  105. package/dist/components/share/Share.d.ts +28 -0
  106. package/dist/components/share/Share.d.ts.map +1 -0
  107. package/dist/components/share/Share.js +78 -0
  108. package/dist/components/share/Share.js.map +7 -0
  109. package/dist/components/share/share.props.cjs +34 -0
  110. package/dist/components/share/share.props.cjs.map +7 -0
  111. package/dist/components/share/share.props.d.cts +12 -0
  112. package/dist/components/share/share.props.d.cts.map +1 -0
  113. package/dist/components/share/share.props.d.mts +12 -0
  114. package/dist/components/share/share.props.d.mts.map +1 -0
  115. package/dist/components/share/share.props.d.ts +12 -0
  116. package/dist/components/share/share.props.d.ts.map +1 -0
  117. package/dist/components/share/share.props.js +14 -0
  118. package/dist/components/share/share.props.js.map +7 -0
  119. package/dist/components/share.css +25 -0
  120. package/dist/components/sortable-list.css +1 -0
  121. package/dist/components/sortableList/SortableList.cjs +2 -2
  122. package/dist/components/sortableList/SortableList.cjs.map +2 -2
  123. package/dist/components/sortableList/SortableList.js +3 -3
  124. package/dist/components/sortableList/SortableList.js.map +2 -2
  125. package/dist/components/sortableList/sortableList.props.cjs.map +1 -1
  126. package/dist/components/sortableList/sortableList.props.d.cts +2 -0
  127. package/dist/components/sortableList/sortableList.props.d.cts.map +1 -1
  128. package/dist/components/sortableList/sortableList.props.d.mts +2 -0
  129. package/dist/components/sortableList/sortableList.props.d.mts.map +1 -1
  130. package/dist/components/sortableList/sortableList.props.d.ts +2 -0
  131. package/dist/components/sortableList/sortableList.props.d.ts.map +1 -1
  132. package/dist/components.css +2 -0
  133. package/dist/docs/README.md +2 -0
  134. package/dist/docs/component-contract.md +5 -3
  135. package/dist/docs/component-index.json +17 -1
  136. package/dist/docs/components/carousel.md +3 -2
  137. package/dist/docs/components/data-table.md +3 -1
  138. package/dist/docs/components/reactions.md +106 -0
  139. package/dist/docs/components/rich-text-editor.md +13 -7
  140. package/dist/docs/components/share.md +103 -0
  141. package/dist/docs/components/sortable-list.md +2 -2
  142. package/dist/styles.css +156 -1
  143. package/dist/tokens.dtcg.json +1 -1
  144. package/package.json +48 -10
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/articleNodes/articleExtensions.ts"],
4
- "sourcesContent": ["import { Node, mergeAttributes, type Extensions } from '@tiptap/core'\nimport Image from '@tiptap/extension-image'\nimport { Table, TableCell, TableHeader, TableRow } from '@tiptap/extension-table'\nimport CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'\nimport { common, createLowlight } from 'lowlight'\nimport { ReactNodeViewRenderer } from '@tiptap/react'\nimport { ArticleBlockView } from './articleNodeViews'\n\nconst lowlight = createLowlight(common)\nconst dataAttributes = (attributes: Record<string, unknown>) => Object.fromEntries(Object.entries(attributes).filter(([, value]) => value != null))\nconst attribute = (key: string, htmlName = key, defaultValue: unknown = null) => ({ default: defaultValue, parseHTML: (element: HTMLElement) => element.getAttribute(`data-dsx-${htmlName}`), renderHTML: (attributes: Record<string, unknown>) => attributes[key] == null ? {} : { [`data-dsx-${htmlName}`]: attributes[key] } })\nconst canonicalUrl = (value: unknown) => { try { const url = new URL(String(value)); return url.protocol === 'https:' || url.protocol === 'http:' ? url.href : null } catch { return null } }\n\nconst ArticleImageExtension = Image.extend({\n addAttributes() { return { ...this.parent?.(), mediaId: attribute('mediaId', 'media-id'), caption: { default: null, parseHTML: (element) => element.getAttribute('data-dsx-caption'), renderHTML: ({ caption }) => caption ? { 'data-dsx-caption': caption } : {} } } },\n})\nconst EmbedExtension = Node.create({ name: 'dsxEmbed', group: 'block', atom: true, addAttributes: () => ({ url: attribute('url') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"embed\"]' }], renderHTML: ({ HTMLAttributes }) => { const url = canonicalUrl(HTMLAttributes['data-dsx-url']); return ['div', { 'data-dsx-node': 'embed', ...(url ? { 'data-dsx-url': url } : { 'data-dsx-invalid': 'true' }) }] } })\nconst CalloutExtension = Node.create({ name: 'dsxCallout', group: 'block', content: 'block+', defining: true, addAttributes: () => ({ tone: attribute('tone', 'tone', 'info'), title: attribute('title') }), parseHTML: () => [{ tag: 'aside[data-dsx-node=\"callout\"]' }], renderHTML: ({ HTMLAttributes }) => ['aside', mergeAttributes({ 'data-dsx-node': 'callout' }, dataAttributes(HTMLAttributes)), 0] })\nconst ComparisonExtension = Node.create({ name: 'dsxComparison', group: 'block', atom: true, addAttributes: () => ({ beforeSrc: attribute('beforeSrc', 'before-src'), afterSrc: attribute('afterSrc', 'after-src'), beforeAlt: attribute('beforeAlt', 'before-alt', ''), afterAlt: attribute('afterAlt', 'after-alt', ''), beforeLabel: attribute('beforeLabel', 'before-label'), afterLabel: attribute('afterLabel', 'after-label') }), parseHTML: () => [{ tag: 'figure[data-dsx-node=\"comparison\"]' }], renderHTML: ({ HTMLAttributes }) => ['figure', mergeAttributes({ 'data-dsx-node': 'comparison' }, dataAttributes(HTMLAttributes))] })\nconst PollExtension = Node.create({ name: 'dsxPoll', group: 'block', atom: true, addAttributes: () => ({ pollId: attribute('pollId', 'poll-id'), question: attribute('question'), multiple: { default: false, parseHTML: element => element.getAttribute('data-dsx-multiple') === 'true', renderHTML: attrs => ({ 'data-dsx-multiple': String(attrs.multiple) }) }, options: { default: [], parseHTML: element => { try { return JSON.parse(element.getAttribute('data-dsx-options') ?? '[]') } catch { return [] } }, renderHTML: attrs => ({ 'data-dsx-options': JSON.stringify(attrs.options) }) } }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"poll\"]' }], renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes({ 'data-dsx-node': 'poll' }, dataAttributes(HTMLAttributes))] })\n\nconst VideoExtension = Node.create({ name: 'dsxVideo', group: 'block', atom: true, addAttributes: () => ({ src: attribute('src'), caption: attribute('caption'), mediaId: attribute('mediaId', 'media-id') }), parseHTML: () => [{ tag: 'figure[data-dsx-node=\"video\"]' }], renderHTML: ({ HTMLAttributes }) => ['figure', mergeAttributes({ 'data-dsx-node': 'video' }, dataAttributes(HTMLAttributes))] })\nconst MaterialLinkExtension = Node.create({ name: 'dsxMaterialLink', group: 'block', atom: true, addAttributes: () => ({ materialId: attribute('materialId', 'material-id'), label: attribute('label'), href: attribute('href') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"material-link\"]' }], renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes({ 'data-dsx-node': 'material-link' }, dataAttributes(HTMLAttributes))] })\nconst PlatformTabsExtension = Node.create({ name: 'dsxTabs', group: 'block', content: 'dsxTab+', defining: true, parseHTML: () => [{ tag: 'div[data-dsx-node=\"tabs\"]' }], renderHTML: () => ['div', { 'data-dsx-node': 'tabs' }, 0] })\nconst PlatformTabExtension = Node.create({ name: 'dsxTab', content: 'block+', defining: true, addAttributes: () => ({ platform: attribute('platform'), label: attribute('label') }), parseHTML: () => [{ tag: 'section[data-dsx-node=\"tab\"]' }], renderHTML: ({ HTMLAttributes }) => ['section', mergeAttributes({ 'data-dsx-node': 'tab' }, dataAttributes(HTMLAttributes)), 0] })\n\nfunction createArticleExtensions({ editable = true }: { editable?: boolean } = {}): Extensions {\n const blocks = [ArticleImageExtension, EmbedExtension, CalloutExtension, ComparisonExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension]\n return [...blocks.map(extension => editable ? extension.extend({ addNodeView: () => ReactNodeViewRenderer(ArticleBlockView) }) : extension), CodeBlockLowlight.configure({ lowlight }), Table.configure({ resizable: true }), TableRow, TableHeader, TableCell]\n}\n\nexport { ArticleImageExtension, CalloutExtension, ComparisonExtension, EmbedExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension, createArticleExtensions }\n"],
5
- "mappings": "AAAA,SAAS,MAAM,uBAAwC;AACvD,OAAO,WAAW;AAClB,SAAS,OAAO,WAAW,aAAa,gBAAgB;AACxD,OAAO,uBAAuB;AAC9B,SAAS,QAAQ,sBAAsB;AACvC,SAA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AAG,CAAC,EAAE,CAAC;AACrO,MAAM,uBAAuB,KAAK,OAAO,EAAE,MAAM,UAAU,SAAS,UAAU,UAAU,MAAM,eAAe,OAAO,EAAE,UAAU,UAAU,UAAU,GAAG,OAAO,UAAU,OAAO,EAAE,IAAI,WAAW,MAAM,CAAC,EAAE,KAAK,+BAA+B,CAAC,GAAG,YAAY,CAAC,EAAE,eAAe,MAAM,CAAC,WAAW,gBAAgB,EAAE,iBAAiB,MAAM,GAAG,eAAe,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;AAElX,SAAS,wBAAwB,EAAE,WAAW,KAAK,IAA4B,CAAC,GAAe;AAC7F,QAAM,SAAS,CAAC,uBAAuB,gBAAgB,kBAAkB,qBAAqB,eAAe,gBAAgB,uBAAuB,uBAAuB,oBAAoB;AAC/L,SAAO,CAAC,GAAG,OAAO,IAAI,eAAa,WAAW,UAAU,OAAO,EAAE,aAAa,MAAM,sBAAsB,gBAAgB,EAAE,CAAC,IAAI,SAAS,GAAG,kBAAkB,UAAU,EAAE,SAAS,CAAC,GAAG,MAAM,UAAU,EAAE,WAAW,KAAK,CAAC,GAAG,UAAU,aAAa,SAAS;AAChQ;",
4
+ "sourcesContent": ["import { Node, mergeAttributes, type Extensions } from '@tiptap/core'\nimport Image from '@tiptap/extension-image'\nimport { Table, TableCell, TableHeader, TableRow } from '@tiptap/extension-table'\nimport CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'\nimport Color from '@tiptap/extension-color'\nimport Highlight from '@tiptap/extension-highlight'\nimport { TextStyle } from '@tiptap/extension-text-style'\nimport TaskItem from '@tiptap/extension-task-item'\nimport TaskList from '@tiptap/extension-task-list'\nimport TextAlign from '@tiptap/extension-text-align'\nimport { common, createLowlight } from 'lowlight'\nimport { ReactNodeViewRenderer } from '@tiptap/react'\nimport { ArticleBlockView } from './articleNodeViews'\n\nconst lowlight = createLowlight(common)\nconst dataAttributes = (attributes: Record<string, unknown>) => Object.fromEntries(Object.entries(attributes).filter(([, value]) => value != null))\nconst attribute = (key: string, htmlName = key, defaultValue: unknown = null) => ({ default: defaultValue, parseHTML: (element: HTMLElement) => element.getAttribute(`data-dsx-${htmlName}`), renderHTML: (attributes: Record<string, unknown>) => attributes[key] == null ? {} : { [`data-dsx-${htmlName}`]: attributes[key] } })\nconst canonicalUrl = (value: unknown) => { try { const url = new URL(String(value)); return url.protocol === 'https:' || url.protocol === 'http:' ? url.href : null } catch { return null } }\n\nconst ArticleImageExtension = Image.extend({\n addAttributes() { return { ...this.parent?.(), mediaId: attribute('mediaId', 'media-id'), caption: { default: null, parseHTML: (element) => element.getAttribute('data-dsx-caption'), renderHTML: ({ caption }) => caption ? { 'data-dsx-caption': caption } : {} } } },\n})\nconst EmbedExtension = Node.create({ name: 'dsxEmbed', group: 'block', atom: true, addAttributes: () => ({ url: attribute('url') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"embed\"]' }], renderHTML: ({ HTMLAttributes }) => { const url = canonicalUrl(HTMLAttributes['data-dsx-url']); return ['div', { 'data-dsx-node': 'embed', ...(url ? { 'data-dsx-url': url } : { 'data-dsx-invalid': 'true' }) }] } })\nconst CalloutExtension = Node.create({ name: 'dsxCallout', group: 'block', content: 'block+', defining: true, addAttributes: () => ({ tone: attribute('tone', 'tone', 'info'), title: attribute('title') }), parseHTML: () => [{ tag: 'aside[data-dsx-node=\"callout\"]' }], renderHTML: ({ HTMLAttributes }) => ['aside', mergeAttributes({ 'data-dsx-node': 'callout' }, dataAttributes(HTMLAttributes)), 0] })\nconst ComparisonExtension = Node.create({ name: 'dsxComparison', group: 'block', atom: true, addAttributes: () => ({ beforeSrc: attribute('beforeSrc', 'before-src'), afterSrc: attribute('afterSrc', 'after-src'), beforeAlt: attribute('beforeAlt', 'before-alt', ''), afterAlt: attribute('afterAlt', 'after-alt', ''), beforeLabel: attribute('beforeLabel', 'before-label'), afterLabel: attribute('afterLabel', 'after-label') }), parseHTML: () => [{ tag: 'figure[data-dsx-node=\"comparison\"]' }], renderHTML: ({ HTMLAttributes }) => ['figure', mergeAttributes({ 'data-dsx-node': 'comparison' }, dataAttributes(HTMLAttributes))] })\nconst PollExtension = Node.create({ name: 'dsxPoll', group: 'block', atom: true, addAttributes: () => ({ pollId: attribute('pollId', 'poll-id'), question: attribute('question'), multiple: { default: false, parseHTML: element => element.getAttribute('data-dsx-multiple') === 'true', renderHTML: attrs => ({ 'data-dsx-multiple': String(attrs.multiple) }) }, options: { default: [], parseHTML: element => { try { return JSON.parse(element.getAttribute('data-dsx-options') ?? '[]') } catch { return [] } }, renderHTML: attrs => ({ 'data-dsx-options': JSON.stringify(attrs.options) }) } }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"poll\"]' }], renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes({ 'data-dsx-node': 'poll' }, dataAttributes(HTMLAttributes))] })\n\nconst VideoExtension = Node.create({ name: 'dsxVideo', group: 'block', atom: true, addAttributes: () => ({ src: attribute('src'), caption: attribute('caption'), mediaId: attribute('mediaId', 'media-id') }), parseHTML: () => [{ tag: 'figure[data-dsx-node=\"video\"]' }], renderHTML: ({ HTMLAttributes }) => ['figure', mergeAttributes({ 'data-dsx-node': 'video' }, dataAttributes(HTMLAttributes))] })\nconst MaterialLinkExtension = Node.create({ name: 'dsxMaterialLink', group: 'block', atom: true, addAttributes: () => ({ materialId: attribute('materialId', 'material-id'), label: attribute('label'), href: attribute('href') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"material-link\"]' }], renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes({ 'data-dsx-node': 'material-link' }, dataAttributes(HTMLAttributes))] })\nconst PlatformTabsExtension = Node.create({ name: 'dsxTabs', group: 'block', content: 'dsxTab+', defining: true, parseHTML: () => [{ tag: 'div[data-dsx-node=\"tabs\"]' }], renderHTML: () => ['div', { 'data-dsx-node': 'tabs' }, 0] })\nconst PlatformTabExtension = Node.create({ name: 'dsxTab', content: 'block+', defining: true, addAttributes: () => ({ platform: attribute('platform'), label: attribute('label') }), parseHTML: () => [{ tag: 'section[data-dsx-node=\"tab\"]' }], renderHTML: ({ HTMLAttributes }) => ['section', mergeAttributes({ 'data-dsx-node': 'tab' }, dataAttributes(HTMLAttributes)), 0] })\n\nfunction createArticleExtensions({ editable = true }: { editable?: boolean } = {}): Extensions {\n const blocks = [ArticleImageExtension, EmbedExtension, CalloutExtension, ComparisonExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension]\n return [...blocks.map(extension => editable ? extension.extend({ addNodeView: () => ReactNodeViewRenderer(ArticleBlockView) }) : extension), CodeBlockLowlight.configure({ lowlight }), Table.configure({ resizable: true }), TableRow, TableHeader, TableCell, TextStyle, Color, Highlight.configure({ multicolor: true }), TextAlign.configure({ types: ['heading', 'paragraph'] }), TaskList, TaskItem.configure({ nested: true })]\n}\n\nexport { ArticleImageExtension, CalloutExtension, ComparisonExtension, EmbedExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension, createArticleExtensions }\n"],
5
+ "mappings": "AAAA,SAAS,MAAM,uBAAwC;AACvD,OAAO,WAAW;AAClB,SAAS,OAAO,WAAW,aAAa,gBAAgB;AACxD,OAAO,uBAAuB;AAC9B,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,SAAS,iBAAiB;AAC1B,OAAO,cAAc;AACrB,OAAO,cAAc;AACrB,OAAO,eAAe;AACtB,SAAS,QAAQ,sBAAsB;AACvC,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AAEjC,MAAM,WAAW,eAAe,MAAM;AACtC,MAAM,iBAAiB,CAAC,eAAwC,OAAO,YAAY,OAAO,QAAQ,UAAU,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,SAAS,IAAI,CAAC;AAClJ,MAAM,YAAY,CAAC,KAAa,WAAW,KAAK,eAAwB,UAAU,EAAE,SAAS,cAAc,WAAW,CAAC,YAAyB,QAAQ,aAAa,YAAY,QAAQ,EAAE,GAAG,YAAY,CAAC,e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CAAC;AAElX,SAAS,wBAAwB,EAAE,WAAW,KAAK,IAA4B,CAAC,GAAe;AAC7F,QAAM,SAAS,CAAC,uBAAuB,gBAAgB,kBAAkB,qBAAqB,eAAe,gBAAgB,uBAAuB,uBAAuB,oBAAoB;AAC/L,SAAO,CAAC,GAAG,OAAO,IAAI,eAAa,WAAW,UAAU,OAAO,EAAE,aAAa,MAAM,sBAAsB,gBAAgB,EAAE,CAAC,IAAI,SAAS,GAAG,kBAAkB,UAAU,EAAE,SAAS,CAAC,GAAG,MAAM,UAAU,EAAE,WAAW,KAAK,CAAC,GAAG,UAAU,aAAa,WAAW,WAAW,OAAO,UAAU,UAAU,EAAE,YAAY,KAAK,CAAC,GAAG,UAAU,UAAU,EAAE,OAAO,CAAC,WAAW,WAAW,EAAE,CAAC,GAAG,UAAU,SAAS,UAAU,EAAE,QAAQ,KAAK,CAAC,CAAC;AACva;",
6
6
  "names": []
7
7
  }
@@ -155,6 +155,21 @@ const CarouselRoot = React.forwardRef((props, forwardedRef) => {
155
155
  "data-slot": "carousel",
156
156
  role: restProps.role ?? "group",
157
157
  "aria-roledescription": "carousel",
158
+ onKeyDown: (event) => {
159
+ const target = event.target;
160
+ const tag = target?.tagName;
161
+ const editable = target?.isContentEditable || tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT";
162
+ if (!editable && !event.defaultPrevented) {
163
+ if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
164
+ event.preventDefault();
165
+ prev();
166
+ } else if (event.key === "ArrowRight" || event.key === "ArrowDown") {
167
+ event.preventDefault();
168
+ next();
169
+ }
170
+ }
171
+ restProps.onKeyDown?.(event);
172
+ },
158
173
  onMouseEnter: (event) => {
159
174
  setHovered(true);
160
175
  restProps.onMouseEnter?.(event);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/carousel/Carousel.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\nimport { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from 'lucide-react'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { usePrefersReducedMotion } from '../../_internal/usePrefersReducedMotion'\nimport { Button } from '../button/Button'\nimport { carouselPropDefs } from './carousel.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype CarouselOwnProps = GetPropDefTypes<typeof carouselPropDefs> & {\n initialIndex?: number\n loop?: boolean\n autoPlay?: boolean\n autoPlayInterval?: number\n}\n\ninterface CarouselProps extends React.ComponentPropsWithoutRef<'div'>, CarouselOwnProps {}\n\ntype CarouselContextValue = {\n currentIndex: number\n slideCount: number\n setSlideCount: (count: number) => void\n goTo: (index: number) => void\n next: () => void\n prev: () => void\n loop: boolean\n rotating: boolean\n orientation: 'horizontal' | 'vertical'\n containerRef: React.RefObject<HTMLDivElement | null>\n}\n\nconst CarouselContext = React.createContext<CarouselContextValue | null>(null)\n\nfunction useCarouselContext() {\n const context = React.useContext(CarouselContext)\n if (!context) {\n throw new Error('Carousel compound components must be used within Carousel')\n }\n return context\n}\n\nconst CarouselRoot = React.forwardRef<HTMLDivElement, CarouselProps>((props, forwardedRef) => {\n const orientation = (props as { orientation?: 'horizontal' | 'vertical' }).orientation ?? 'horizontal'\n const autoPlay = (props as { autoPlay?: boolean }).autoPlay ?? false\n const autoPlayInterval = (props as { autoPlayInterval?: number }).autoPlayInterval ?? 3000\n const {\n autoPlay: _autoPlay,\n autoPlayInterval: _autoPlayInterval,\n asChild,\n children,\n className,\n initialIndex = 0,\n loop = false,\n size = 'md',\n ...restProps\n } = extractProps(props, carouselPropDefs)\n const Comp = asChild ? Slot : 'div'\n const containerRef = React.useRef<HTMLDivElement>(null)\n const [currentIndex, setCurrentIndex] = React.useState(() => Number.isFinite(initialIndex) ? Math.max(0, Math.trunc(initialIndex)) : 0)\n const [slideCount, setSlideCountState] = React.useState(0)\n const reducedMotion = usePrefersReducedMotion()\n const [paused, setPaused] = React.useState(false)\n const [hovered, setHovered] = React.useState(false)\n const rotationControlRef = React.useRef<HTMLButtonElement>(null)\n // Tracks whether the current pause came from the focus/pointer interaction\n // latch (as opposed to the rotation control's explicit stop): only a latched\n // pause is released when focus leaves the carousel. An explicit stop survives\n // blur until the control is activated again.\n const interactionLatchRef = React.useRef(false)\n const rotating = autoPlay && !paused && !hovered && !reducedMotion && slideCount > 1\n const index = slideCount > 0 ? Math.max(0, Math.min(currentIndex, slideCount - 1)) : 0\n\n const goTo = React.useCallback((index: number) => {\n setCurrentIndex(Number.isFinite(index) ? Math.max(0, Math.min(Math.trunc(index), Math.max(0, slideCount - 1))) : 0)\n }, [slideCount])\n\n const next = React.useCallback(() => {\n setCurrentIndex((prev) => {\n if (slideCount < 1) return 0\n if (loop) return (prev + 1) % slideCount\n return Math.min(prev + 1, slideCount - 1)\n })\n }, [loop, slideCount])\n\n const prev = React.useCallback(() => {\n setCurrentIndex((prev) => {\n if (slideCount < 1) return 0\n if (loop) return (prev - 1 + slideCount) % slideCount\n return Math.max(prev - 1, 0)\n })\n }, [loop, slideCount])\n\n const setSlideCount = React.useCallback((count: number) => {\n setSlideCountState(count)\n setCurrentIndex((current) => Number.isFinite(current) ? Math.max(0, Math.min(Math.trunc(current), Math.max(0, count - 1))) : 0)\n }, [])\n\n React.useEffect(() => {\n if (!rotating) return\n const id = setInterval(() => {\n setCurrentIndex((prev) => loop ? (prev + 1) % slideCount : Math.min(prev + 1, slideCount - 1))\n }, autoPlayInterval > 0 ? autoPlayInterval : 3000)\n return () => clearInterval(id)\n }, [rotating, autoPlayInterval, slideCount, loop])\n\n const contextValue = React.useMemo(\n () => ({ currentIndex: index, slideCount, setSlideCount, goTo, next, prev, loop, rotating, orientation, containerRef }),\n [index, slideCount, setSlideCount, goTo, next, prev, loop, rotating, orientation],\n )\n\n const isViewport = (child: React.ReactNode) =>\n React.isValidElement(child) && (child as React.ReactElement).type === CarouselViewport\n const isNavButton = (child: React.ReactNode) =>\n React.isValidElement(child) &&\n ((child as React.ReactElement).type === CarouselPrevious ||\n (child as React.ReactElement).type === CarouselNext)\n const isIndicators = (child: React.ReactNode) =>\n React.isValidElement(child) && (child as React.ReactElement).type === CarouselIndicators\n\n const slotHost = asChild ? React.Children.only(children) as React.ReactElement<{ children?: React.ReactNode }> : null\n const childArray = React.Children.toArray(slotHost ? slotHost.props.children : children)\n const viewportElements = childArray.filter(isViewport)\n const navElements = childArray.filter(isNavButton)\n const indicatorElements = childArray.filter(isIndicators)\n\n const content = (\n <>\n {autoPlay && slideCount > 1 ? (\n <Button ref={rotationControlRef} type=\"button\" size=\"sm\" variant=\"ghost\" disabled={reducedMotion}\n onClick={() => { interactionLatchRef.current = false; setPaused((current) => !current) }}>\n {reducedMotion ? 'Slide rotation paused' : paused ? 'Start slide rotation' : 'Stop slide rotation'}\n </Button>\n ) : null}\n {viewportElements.map((viewport) => {\n const vp = viewport as React.ReactElement<CarouselViewportProps>\n return React.cloneElement(vp, {\n children: [vp.props.children, ...navElements] as React.ReactNode,\n })\n })}\n {indicatorElements}\n </>\n )\n\n return (\n <CarouselContext.Provider value={contextValue}>\n <Comp\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel', className)}\n data-size={size}\n data-slot=\"carousel\"\n role={restProps.role ?? 'group'}\n aria-roledescription=\"carousel\"\n onMouseEnter={(event) => { setHovered(true); restProps.onMouseEnter?.(event) }}\n onMouseLeave={(event) => { setHovered(false); restProps.onMouseLeave?.(event) }}\n onFocusCapture={(event) => {\n if (!rotationControlRef.current?.contains(event.target as Node)) {\n interactionLatchRef.current = true\n setPaused(true)\n }\n restProps.onFocusCapture?.(event)\n }}\n onPointerDownCapture={(event) => {\n if (!rotationControlRef.current?.contains(event.target as Node)) {\n interactionLatchRef.current = true\n setPaused(true)\n }\n restProps.onPointerDownCapture?.(event)\n }}\n onBlurCapture={(event) => {\n // Release the interaction latch when focus leaves the carousel\n // entirely; the rotation then resumes without an explicit restart.\n // An explicit stop from the rotation control is not latched, so it\n // survives blur.\n if (\n interactionLatchRef.current &&\n !event.currentTarget.contains(event.relatedTarget as Node | null)\n ) {\n interactionLatchRef.current = false\n setPaused(false)\n }\n restProps.onBlurCapture?.(event)\n }}\n >\n {slotHost ? React.cloneElement(slotHost, undefined, content) : content}\n </Comp>\n </CarouselContext.Provider>\n )\n})\nCarouselRoot.displayName = 'Carousel'\n\ninterface CarouselViewportProps extends React.ComponentPropsWithoutRef<'div'> {\n onSlideCountChange?: (count: number) => void\n}\n\nconst CarouselViewport = React.forwardRef<HTMLDivElement, CarouselViewportProps>((props, forwardedRef) => {\n const { className, children, onSlideCountChange, ...restProps } = props\n const { currentIndex, orientation, containerRef, setSlideCount, rotating } = useCarouselContext()\n\n const childArray = React.Children.toArray(children)\n const isNavButton = (child: React.ReactNode) =>\n React.isValidElement(child) &&\n ((child as React.ReactElement).type === CarouselPrevious ||\n (child as React.ReactElement).type === CarouselNext)\n const trackChildren = childArray.filter((c) => !isNavButton(c))\n const navElements = childArray.filter(isNavButton)\n const childCount = trackChildren.length\n\n React.useEffect(() => {\n setSlideCount(childCount)\n onSlideCountChange?.(childCount)\n }, [childCount, onSlideCountChange, setSlideCount])\n\n return (\n <div\n {...restProps}\n ref={(node) => {\n containerRef.current = node\n if (typeof forwardedRef === 'function') {\n forwardedRef(node)\n } else if (forwardedRef) {\n forwardedRef.current = node\n }\n }}\n className={classNames('dsx-carousel__viewport', className)}\n data-slot=\"carousel-viewport\"\n data-orientation={orientation}\n >\n <div\n className={classNames(\n 'dsx-carousel__track',\n orientation === 'vertical' && 'dsx-carousel__track--vertical',\n )}\n style={{\n transform: orientation === 'horizontal'\n ? `translateX(-${currentIndex * 100}%)`\n : `translateY(-${currentIndex * 100}%)`,\n }}\n data-slot=\"carousel-track\"\n aria-live={rotating ? 'off' : 'polite'}\n aria-atomic=\"false\"\n >\n {trackChildren.map((child, index) => (\n <div key={React.isValidElement(child) ? child.key ?? index : index} className=\"dsx-carousel__slide\"\n role=\"group\" aria-roledescription=\"slide\" aria-label={`${index + 1} of ${childCount}`}\n aria-hidden={index !== currentIndex ? true : undefined} inert={index !== currentIndex}>\n {child}\n </div>\n ))}\n </div>\n {navElements}\n </div>\n )\n})\nCarouselViewport.displayName = 'CarouselViewport'\n\ninterface CarouselItemProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, CarouselItemProps>((props, forwardedRef) => {\n const { className, ...restProps } = props\n return (\n <div\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__item', className)}\n data-slot=\"carousel-item\"\n />\n )\n})\nCarouselItem.displayName = 'CarouselItem'\n\ninterface CarouselPreviousProps extends React.ComponentPropsWithoutRef<'button'> {}\n\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, CarouselPreviousProps>((props, forwardedRef) => {\n const { className, onClick, ...restProps } = props\n const { prev, orientation, loop, currentIndex, slideCount } = useCarouselContext()\n\n return (\n <button\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__nav dsx-carousel__nav--previous', className)}\n type={restProps.type ?? 'button'}\n disabled={restProps.disabled || slideCount < 2 || (!loop && currentIndex === 0)}\n onClick={(event) => { onClick?.(event); if (!event.defaultPrevented) prev() }}\n aria-label={restProps['aria-label'] ?? 'Previous slide'}\n data-slot=\"carousel-previous\"\n >\n {orientation === 'horizontal' ? <ChevronLeft aria-hidden=\"true\" size={20} /> : <ChevronUp aria-hidden=\"true\" size={20} />}\n </button>\n )\n})\nCarouselPrevious.displayName = 'CarouselPrevious'\n\ninterface CarouselNextProps extends React.ComponentPropsWithoutRef<'button'> {}\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, CarouselNextProps>((props, forwardedRef) => {\n const { className, onClick, ...restProps } = props\n const { next, orientation, loop, currentIndex, slideCount } = useCarouselContext()\n\n return (\n <button\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__nav dsx-carousel__nav--next', className)}\n type={restProps.type ?? 'button'}\n disabled={restProps.disabled || slideCount < 2 || (!loop && currentIndex >= slideCount - 1)}\n onClick={(event) => { onClick?.(event); if (!event.defaultPrevented) next() }}\n aria-label={restProps['aria-label'] ?? 'Next slide'}\n data-slot=\"carousel-next\"\n >\n {orientation === 'horizontal' ? <ChevronRight aria-hidden=\"true\" size={20} /> : <ChevronDown aria-hidden=\"true\" size={20} />}\n </button>\n )\n})\nCarouselNext.displayName = 'CarouselNext'\n\ninterface CarouselIndicatorsProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst CarouselIndicators = React.forwardRef<HTMLDivElement, CarouselIndicatorsProps>((props, forwardedRef) => {\n const { className, ...restProps } = props\n const { currentIndex, slideCount, goTo } = useCarouselContext()\n\n if (slideCount <= 1) return null\n\n return (\n <div\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__indicators', className)}\n role=\"group\"\n aria-label={restProps['aria-label'] ?? 'Slide indicators'}\n data-slot=\"carousel-indicators\"\n >\n {Array.from({ length: slideCount }).map((_, index) => (\n <button\n key={index}\n type=\"button\"\n className={classNames(\n 'dsx-carousel__indicator',\n index === currentIndex && 'dsx-carousel__indicator--active',\n )}\n onClick={() => goTo(index)}\n aria-label={`Go to slide ${index + 1}`}\n aria-disabled={index === currentIndex}\n aria-current={index === currentIndex ? 'true' : undefined}\n data-slot=\"carousel-indicator\"\n />\n ))}\n </div>\n )\n})\nCarouselIndicators.displayName = 'CarouselIndicators'\n\nconst Carousel: typeof CarouselRoot & {\n Viewport: typeof CarouselViewport\n Item: typeof CarouselItem\n Previous: typeof CarouselPrevious\n Next: typeof CarouselNext\n Indicators: typeof CarouselIndicators\n} = Object.assign(CarouselRoot, {\n Viewport: CarouselViewport,\n Item: CarouselItem,\n Previous: CarouselPrevious,\n Next: CarouselNext,\n Indicators: CarouselIndicators,\n})\n\nexport { Carousel, CarouselItem, CarouselIndicators, CarouselNext, CarouselPrevious, CarouselRoot, CarouselViewport }\nexport type { CarouselIndicatorsProps, CarouselItemProps, CarouselNextProps, C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C;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,eAAW,kBAAAA;AAAA,YACT;AAAA,YACA,UAAU,gBAAgB;AAAA,UAC5B;AAAA,UACA,SAAS,MAAM,KAAK,KAAK;AAAA,UACzB,cAAY,eAAe,QAAQ,CAAC;AAAA,UACpC,iBAAe,UAAU;AAAA,UACzB,gBAAc,UAAU,eAAe,SAAS;AAAA,UAChD,aAAU;AAAA;AAAA,QAVL;AAAA,MAWP,CACD;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,mBAAmB,cAAc;AAEjC,MAAM,WAMF,OAAO,OAAO,cAAc;AAAA,EAC9B,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AACd,CAAC;",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\nimport { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from 'lucide-react'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { usePrefersReducedMotion } from '../../_internal/usePrefersReducedMotion'\nimport { Button } from '../button/Button'\nimport { carouselPropDefs } from './carousel.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype CarouselOwnProps = GetPropDefTypes<typeof carouselPropDefs> & {\n initialIndex?: number\n loop?: boolean\n autoPlay?: boolean\n autoPlayInterval?: number\n}\n\ninterface CarouselProps extends React.ComponentPropsWithoutRef<'div'>, CarouselOwnProps {}\n\ntype CarouselContextValue = {\n currentIndex: number\n slideCount: number\n setSlideCount: (count: number) => void\n goTo: (index: number) => void\n next: () => void\n prev: () => void\n loop: boolean\n rotating: boolean\n orientation: 'horizontal' | 'vertical'\n containerRef: React.RefObject<HTMLDivElement | null>\n}\n\nconst CarouselContext = React.createContext<CarouselContextValue | null>(null)\n\nfunction useCarouselContext() {\n const context = React.useContext(CarouselContext)\n if (!context) {\n throw new Error('Carousel compound components must be used within Carousel')\n }\n return context\n}\n\nconst CarouselRoot = React.forwardRef<HTMLDivElement, CarouselProps>((props, forwardedRef) => {\n const orientation = (props as { orientation?: 'horizontal' | 'vertical' }).orientation ?? 'horizontal'\n const autoPlay = (props as { autoPlay?: boolean }).autoPlay ?? false\n const autoPlayInterval = (props as { autoPlayInterval?: number }).autoPlayInterval ?? 3000\n const {\n autoPlay: _autoPlay,\n autoPlayInterval: _autoPlayInterval,\n asChild,\n children,\n className,\n initialIndex = 0,\n loop = false,\n size = 'md',\n ...restProps\n } = extractProps(props, carouselPropDefs)\n const Comp = asChild ? Slot : 'div'\n const containerRef = React.useRef<HTMLDivElement>(null)\n const [currentIndex, setCurrentIndex] = React.useState(() => Number.isFinite(initialIndex) ? Math.max(0, Math.trunc(initialIndex)) : 0)\n const [slideCount, setSlideCountState] = React.useState(0)\n const reducedMotion = usePrefersReducedMotion()\n const [paused, setPaused] = React.useState(false)\n const [hovered, setHovered] = React.useState(false)\n const rotationControlRef = React.useRef<HTMLButtonElement>(null)\n // Tracks whether the current pause came from the focus/pointer interaction\n // latch (as opposed to the rotation control's explicit stop): only a latched\n // pause is released when focus leaves the carousel. An explicit stop survives\n // blur until the control is activated again.\n const interactionLatchRef = React.useRef(false)\n const rotating = autoPlay && !paused && !hovered && !reducedMotion && slideCount > 1\n const index = slideCount > 0 ? Math.max(0, Math.min(currentIndex, slideCount - 1)) : 0\n\n const goTo = React.useCallback((index: number) => {\n setCurrentIndex(Number.isFinite(index) ? Math.max(0, Math.min(Math.trunc(index), Math.max(0, slideCount - 1))) : 0)\n }, [slideCount])\n\n const next = React.useCallback(() => {\n setCurrentIndex((prev) => {\n if (slideCount < 1) return 0\n if (loop) return (prev + 1) % slideCount\n return Math.min(prev + 1, slideCount - 1)\n })\n }, [loop, slideCount])\n\n const prev = React.useCallback(() => {\n setCurrentIndex((prev) => {\n if (slideCount < 1) return 0\n if (loop) return (prev - 1 + slideCount) % slideCount\n return Math.max(prev - 1, 0)\n })\n }, [loop, slideCount])\n\n const setSlideCount = React.useCallback((count: number) => {\n setSlideCountState(count)\n setCurrentIndex((current) => Number.isFinite(current) ? Math.max(0, Math.min(Math.trunc(current), Math.max(0, count - 1))) : 0)\n }, [])\n\n React.useEffect(() => {\n if (!rotating) return\n const id = setInterval(() => {\n setCurrentIndex((prev) => loop ? (prev + 1) % slideCount : Math.min(prev + 1, slideCount - 1))\n }, autoPlayInterval > 0 ? autoPlayInterval : 3000)\n return () => clearInterval(id)\n }, [rotating, autoPlayInterval, slideCount, loop])\n\n const contextValue = React.useMemo(\n () => ({ currentIndex: index, slideCount, setSlideCount, goTo, next, prev, loop, rotating, orientation, containerRef }),\n [index, slideCount, setSlideCount, goTo, next, prev, loop, rotating, orientation],\n )\n\n const isViewport = (child: React.ReactNode) =>\n React.isValidElement(child) && (child as React.ReactElement).type === CarouselViewport\n const isNavButton = (child: React.ReactNode) =>\n React.isValidElement(child) &&\n ((child as React.ReactElement).type === CarouselPrevious ||\n (child as React.ReactElement).type === CarouselNext)\n const isIndicators = (child: React.ReactNode) =>\n React.isValidElement(child) && (child as React.ReactElement).type === CarouselIndicators\n\n const slotHost = asChild ? React.Children.only(children) as React.ReactElement<{ children?: React.ReactNode }> : null\n const childArray = React.Children.toArray(slotHost ? slotHost.props.children : children)\n const viewportElements = childArray.filter(isViewport)\n const navElements = childArray.filter(isNavButton)\n const indicatorElements = childArray.filter(isIndicators)\n\n const content = (\n <>\n {autoPlay && slideCount > 1 ? (\n <Button ref={rotationControlRef} type=\"button\" size=\"sm\" variant=\"ghost\" disabled={reducedMotion}\n onClick={() => { interactionLatchRef.current = false; setPaused((current) => !current) }}>\n {reducedMotion ? 'Slide rotation paused' : paused ? 'Start slide rotation' : 'Stop slide rotation'}\n </Button>\n ) : null}\n {viewportElements.map((viewport) => {\n const vp = viewport as React.ReactElement<CarouselViewportProps>\n return React.cloneElement(vp, {\n children: [vp.props.children, ...navElements] as React.ReactNode,\n })\n })}\n {indicatorElements}\n </>\n )\n\n return (\n <CarouselContext.Provider value={contextValue}>\n <Comp\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel', className)}\n data-size={size}\n data-slot=\"carousel\"\n role={restProps.role ?? 'group'}\n aria-roledescription=\"carousel\"\n onKeyDown={(event) => {\n const target = event.target as HTMLElement | null\n const tag = target?.tagName\n const editable = target?.isContentEditable || tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT'\n if (!editable && !event.defaultPrevented) {\n if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') { event.preventDefault(); prev() }\n else if (event.key === 'ArrowRight' || event.key === 'ArrowDown') { event.preventDefault(); next() }\n }\n restProps.onKeyDown?.(event)\n }}\n onMouseEnter={(event) => { setHovered(true); restProps.onMouseEnter?.(event) }}\n onMouseLeave={(event) => { setHovered(false); restProps.onMouseLeave?.(event) }}\n onFocusCapture={(event) => {\n if (!rotationControlRef.current?.contains(event.target as Node)) {\n interactionLatchRef.current = true\n setPaused(true)\n }\n restProps.onFocusCapture?.(event)\n }}\n onPointerDownCapture={(event) => {\n if (!rotationControlRef.current?.contains(event.target as Node)) {\n interactionLatchRef.current = true\n setPaused(true)\n }\n restProps.onPointerDownCapture?.(event)\n }}\n onBlurCapture={(event) => {\n // Release the interaction latch when focus leaves the carousel\n // entirely; the rotation then resumes without an explicit restart.\n // An explicit stop from the rotation control is not latched, so it\n // survives blur.\n if (\n interactionLatchRef.current &&\n !event.currentTarget.contains(event.relatedTarget as Node | null)\n ) {\n interactionLatchRef.current = false\n setPaused(false)\n }\n restProps.onBlurCapture?.(event)\n }}\n >\n {slotHost ? React.cloneElement(slotHost, undefined, content) : content}\n </Comp>\n </CarouselContext.Provider>\n )\n})\nCarouselRoot.displayName = 'Carousel'\n\ninterface CarouselViewportProps extends React.ComponentPropsWithoutRef<'div'> {\n onSlideCountChange?: (count: number) => void\n}\n\nconst CarouselViewport = React.forwardRef<HTMLDivElement, CarouselViewportProps>((props, forwardedRef) => {\n const { className, children, onSlideCountChange, ...restProps } = props\n const { currentIndex, orientation, containerRef, setSlideCount, rotating } = useCarouselContext()\n\n const childArray = React.Children.toArray(children)\n const isNavButton = (child: React.ReactNode) =>\n React.isValidElement(child) &&\n ((child as React.ReactElement).type === CarouselPrevious ||\n (child as React.ReactElement).type === CarouselNext)\n const trackChildren = childArray.filter((c) => !isNavButton(c))\n const navElements = childArray.filter(isNavButton)\n const childCount = trackChildren.length\n\n React.useEffect(() => {\n setSlideCount(childCount)\n onSlideCountChange?.(childCount)\n }, [childCount, onSlideCountChange, setSlideCount])\n\n return (\n <div\n {...restProps}\n ref={(node) => {\n containerRef.current = node\n if (typeof forwardedRef === 'function') {\n forwardedRef(node)\n } else if (forwardedRef) {\n forwardedRef.current = node\n }\n }}\n className={classNames('dsx-carousel__viewport', className)}\n data-slot=\"carousel-viewport\"\n data-orientation={orientation}\n >\n <div\n className={classNames(\n 'dsx-carousel__track',\n orientation === 'vertical' && 'dsx-carousel__track--vertical',\n )}\n style={{\n transform: orientation === 'horizontal'\n ? `translateX(-${currentIndex * 100}%)`\n : `translateY(-${currentIndex * 100}%)`,\n }}\n data-slot=\"carousel-track\"\n aria-live={rotating ? 'off' : 'polite'}\n aria-atomic=\"false\"\n >\n {trackChildren.map((child, index) => (\n <div key={React.isValidElement(child) ? child.key ?? index : index} className=\"dsx-carousel__slide\"\n role=\"group\" aria-roledescription=\"slide\" aria-label={`${index + 1} of ${childCount}`}\n aria-hidden={index !== currentIndex ? true : undefined} inert={index !== currentIndex}>\n {child}\n </div>\n ))}\n </div>\n {navElements}\n </div>\n )\n})\nCarouselViewport.displayName = 'CarouselViewport'\n\ninterface CarouselItemProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, CarouselItemProps>((props, forwardedRef) => {\n const { className, ...restProps } = props\n return (\n <div\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__item', className)}\n data-slot=\"carousel-item\"\n />\n )\n})\nCarouselItem.displayName = 'CarouselItem'\n\ninterface CarouselPreviousProps extends React.ComponentPropsWithoutRef<'button'> {}\n\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, CarouselPreviousProps>((props, forwardedRef) => {\n const { className, onClick, ...restProps } = props\n const { prev, orientation, loop, currentIndex, slideCount } = useCarouselContext()\n\n return (\n <button\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__nav dsx-carousel__nav--previous', className)}\n type={restProps.type ?? 'button'}\n disabled={restProps.disabled || slideCount < 2 || (!loop && currentIndex === 0)}\n onClick={(event) => { onClick?.(event); if (!event.defaultPrevented) prev() }}\n aria-label={restProps['aria-label'] ?? 'Previous slide'}\n data-slot=\"carousel-previous\"\n >\n {orientation === 'horizontal' ? <ChevronLeft aria-hidden=\"true\" size={20} /> : <ChevronUp aria-hidden=\"true\" size={20} />}\n </button>\n )\n})\nCarouselPrevious.displayName = 'CarouselPrevious'\n\ninterface CarouselNextProps extends React.ComponentPropsWithoutRef<'button'> {}\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, CarouselNextProps>((props, forwardedRef) => {\n const { className, onClick, ...restProps } = props\n const { next, orientation, loop, currentIndex, slideCount } = useCarouselContext()\n\n return (\n <button\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__nav dsx-carousel__nav--next', className)}\n type={restProps.type ?? 'button'}\n disabled={restProps.disabled || slideCount < 2 || (!loop && currentIndex >= slideCount - 1)}\n onClick={(event) => { onClick?.(event); if (!event.defaultPrevented) next() }}\n aria-label={restProps['aria-label'] ?? 'Next slide'}\n data-slot=\"carousel-next\"\n >\n {orientation === 'horizontal' ? <ChevronRight aria-hidden=\"true\" size={20} /> : <ChevronDown aria-hidden=\"true\" size={20} />}\n </button>\n )\n})\nCarouselNext.displayName = 'CarouselNext'\n\ninterface CarouselIndicatorsProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst CarouselIndicators = React.forwardRef<HTMLDivElement, CarouselIndicatorsProps>((props, forwardedRef) => {\n const { className, ...restProps } = props\n const { currentIndex, slideCount, goTo } = useCarouselContext()\n\n if (slideCount <= 1) return null\n\n return (\n <div\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__indicators', className)}\n role=\"group\"\n aria-label={restProps['aria-label'] ?? 'Slide indicators'}\n data-slot=\"carousel-indicators\"\n >\n {Array.from({ length: slideCount }).map((_, index) => (\n <button\n key={index}\n type=\"button\"\n className={classNames(\n 'dsx-carousel__indicator',\n index === currentIndex && 'dsx-carousel__indicator--active',\n )}\n onClick={() => goTo(index)}\n aria-label={`Go to slide ${index + 1}`}\n aria-disabled={index === currentIndex}\n aria-current={index === currentIndex ? 'true' : undefined}\n data-slot=\"carousel-indicator\"\n />\n ))}\n </div>\n )\n})\nCarouselIndicators.displayName = 'CarouselIndicators'\n\nconst Carousel: typeof CarouselRoot & {\n Viewport: typeof CarouselViewport\n Item: typeof CarouselItem\n Previous: typeof CarouselPrevious\n Next: typeof CarouselNext\n Indicators: typeof CarouselIndicators\n} = Object.assign(CarouselRoot, {\n Viewport: CarouselViewport,\n Item: CarouselItem,\n Previous: CarouselPrevious,\n Next: CarouselNext,\n Indicators: CarouselIndicators,\n})\n\nexport { Carousel, CarouselItem, CarouselIndicators, CarouselNext, CarouselPrevious, CarouselRoot, CarouselViewport }\nexport type { CarouselIndicatorsProps, CarouselItemProps, CarouselNextProps, CarouselOwnProps, CarouselPreviousProps, CarouselProps, CarouselViewportProps }\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AACvB,wBAAuB;AACvB,wBAAqB;AACrB,0BAAkE;AAElE,0BAA6B;AAC7B,qCAAwC;AACxC,oBAAuB;AACvB,sBAAiC;AAyH7B;AA/FJ,MAAM,kBAAkB,MAAM,cAA2C,IAAI;AAE7E,SAAS,qBAAqB;AAC5B,QAAM,UAAU,MAAM,WAAW,eAAe;AAChD,MAAI,CAA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,IAAI,CAAC,GAAG,UAC1C;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,eAAW,kBAAAA;AAAA,YACT;AAAA,YACA,UAAU,gBAAgB;AAAA,UAC5B;AAAA,UACA,SAAS,MAAM,KAAK,KAAK;AAAA,UACzB,cAAY,eAAe,QAAQ,CAAC;AAAA,UACpC,iBAAe,UAAU;AAAA,UACzB,gBAAc,UAAU,eAAe,SAAS;AAAA,UAChD,aAAU;AAAA;AAAA,QAVL;AAAA,MAWP,CACD;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,mBAAmB,cAAc;AAEjC,MAAM,WAMF,OAAO,OAAO,cAAc;AAAA,EAC9B,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AACd,CAAC;",
6
6
  "names": ["index", "prev", "classNames"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.d.cts","sourceRoot":"","sources":["../../../src/components/carousel/Carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,KAAK,gBAAgB,GAAG,eAAe,CAAC,OAAO,gBAAgB,CAAC,GAAG;IACjE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,UAAU,aAAc,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,gBAAgB;CAAG;AAyB1F,QAAA,MAAM,YAAY,sFAmJhB,CAAA;AAGF,UAAU,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC3E,kBAAkB,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,KAAK,CAAC;IAC3E,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7C;AAED,QAAA,MAAM,gBAAgB,8FA0DpB,CAAA;AAGF,UAAU,iBAAkB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAE5E,QAAA,MAAM,YAAY,0FAUhB,CAAA;AAGF,UAAU,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC;CAAG;AAEnF,QAAA,MAAM,gBAAgB,iGAkBpB,CAAA;AAGF,UAAU,iBAAkB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC;CAAG;AAE/E,QAAA,MAAM,YAAY,6FAkBhB,CAAA;AAGF,UAAU,uBAAwB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAElF,QAAA,MAAM,kBAAkB,gGAgCtB,CAAA;AAGF,QAAA,MAAM,QAAQ,EAAE,OAAO,YAAY,GAAG;IACpC,QAAQ,EAAE,OAAO,gBAAgB,CAAA;IACjC,IAAI,EAAE,OAAO,YAAY,CAAA;IACzB,QAAQ,EAAE,OAAO,gBAAgB,CAAA;IACjC,IAAI,EAAE,OAAO,YAAY,CAAA;IACzB,UAAU,EAAE,OAAO,kBAAkB,CAAA;CAOrC,CAAA;AAEF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAA;AACrH,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,aAAa,EAAE,qBAAqB,EAAE,CAAA"}
@@ -116,6 +116,21 @@ const CarouselRoot = React.forwardRef((props, forwardedRef) => {
116
116
  "data-slot": "carousel",
117
117
  role: restProps.role ?? "group",
118
118
  "aria-roledescription": "carousel",
119
+ onKeyDown: (event) => {
120
+ const target = event.target;
121
+ const tag = target?.tagName;
122
+ const editable = target?.isContentEditable || tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT";
123
+ if (!editable && !event.defaultPrevented) {
124
+ if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
125
+ event.preventDefault();
126
+ prev();
127
+ } else if (event.key === "ArrowRight" || event.key === "ArrowDown") {
128
+ event.preventDefault();
129
+ next();
130
+ }
131
+ }
132
+ restProps.onKeyDown?.(event);
133
+ },
119
134
  onMouseEnter: (event) => {
120
135
  setHovered(true);
121
136
  restProps.onMouseEnter?.(event);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/carousel/Carousel.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\nimport { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from 'lucide-react'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { usePrefersReducedMotion } from '../../_internal/usePrefersReducedMotion'\nimport { Button } from '../button/Button'\nimport { carouselPropDefs } from './carousel.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype CarouselOwnProps = GetPropDefTypes<typeof carouselPropDefs> & {\n initialIndex?: number\n loop?: boolean\n autoPlay?: boolean\n autoPlayInterval?: number\n}\n\ninterface CarouselProps extends React.ComponentPropsWithoutRef<'div'>, CarouselOwnProps {}\n\ntype CarouselContextValue = {\n currentIndex: number\n slideCount: number\n setSlideCount: (count: number) => void\n goTo: (index: number) => void\n next: () => void\n prev: () => void\n loop: boolean\n rotating: boolean\n orientation: 'horizontal' | 'vertical'\n containerRef: React.RefObject<HTMLDivElement | null>\n}\n\nconst CarouselContext = React.createContext<CarouselContextValue | null>(null)\n\nfunction useCarouselContext() {\n const context = React.useContext(CarouselContext)\n if (!context) {\n throw new Error('Carousel compound components must be used within Carousel')\n }\n return context\n}\n\nconst CarouselRoot = React.forwardRef<HTMLDivElement, CarouselProps>((props, forwardedRef) => {\n const orientation = (props as { orientation?: 'horizontal' | 'vertical' }).orientation ?? 'horizontal'\n const autoPlay = (props as { autoPlay?: boolean }).autoPlay ?? false\n const autoPlayInterval = (props as { autoPlayInterval?: number }).autoPlayInterval ?? 3000\n const {\n autoPlay: _autoPlay,\n autoPlayInterval: _autoPlayInterval,\n asChild,\n children,\n className,\n initialIndex = 0,\n loop = false,\n size = 'md',\n ...restProps\n } = extractProps(props, carouselPropDefs)\n const Comp = asChild ? Slot : 'div'\n const containerRef = React.useRef<HTMLDivElement>(null)\n const [currentIndex, setCurrentIndex] = React.useState(() => Number.isFinite(initialIndex) ? Math.max(0, Math.trunc(initialIndex)) : 0)\n const [slideCount, setSlideCountState] = React.useState(0)\n const reducedMotion = usePrefersReducedMotion()\n const [paused, setPaused] = React.useState(false)\n const [hovered, setHovered] = React.useState(false)\n const rotationControlRef = React.useRef<HTMLButtonElement>(null)\n // Tracks whether the current pause came from the focus/pointer interaction\n // latch (as opposed to the rotation control's explicit stop): only a latched\n // pause is released when focus leaves the carousel. An explicit stop survives\n // blur until the control is activated again.\n const interactionLatchRef = React.useRef(false)\n const rotating = autoPlay && !paused && !hovered && !reducedMotion && slideCount > 1\n const index = slideCount > 0 ? Math.max(0, Math.min(currentIndex, slideCount - 1)) : 0\n\n const goTo = React.useCallback((index: number) => {\n setCurrentIndex(Number.isFinite(index) ? Math.max(0, Math.min(Math.trunc(index), Math.max(0, slideCount - 1))) : 0)\n }, [slideCount])\n\n const next = React.useCallback(() => {\n setCurrentIndex((prev) => {\n if (slideCount < 1) return 0\n if (loop) return (prev + 1) % slideCount\n return Math.min(prev + 1, slideCount - 1)\n })\n }, [loop, slideCount])\n\n const prev = React.useCallback(() => {\n setCurrentIndex((prev) => {\n if (slideCount < 1) return 0\n if (loop) return (prev - 1 + slideCount) % slideCount\n return Math.max(prev - 1, 0)\n })\n }, [loop, slideCount])\n\n const setSlideCount = React.useCallback((count: number) => {\n setSlideCountState(count)\n setCurrentIndex((current) => Number.isFinite(current) ? Math.max(0, Math.min(Math.trunc(current), Math.max(0, count - 1))) : 0)\n }, [])\n\n React.useEffect(() => {\n if (!rotating) return\n const id = setInterval(() => {\n setCurrentIndex((prev) => loop ? (prev + 1) % slideCount : Math.min(prev + 1, slideCount - 1))\n }, autoPlayInterval > 0 ? autoPlayInterval : 3000)\n return () => clearInterval(id)\n }, [rotating, autoPlayInterval, slideCount, loop])\n\n const contextValue = React.useMemo(\n () => ({ currentIndex: index, slideCount, setSlideCount, goTo, next, prev, loop, rotating, orientation, containerRef }),\n [index, slideCount, setSlideCount, goTo, next, prev, loop, rotating, orientation],\n )\n\n const isViewport = (child: React.ReactNode) =>\n React.isValidElement(child) && (child as React.ReactElement).type === CarouselViewport\n const isNavButton = (child: React.ReactNode) =>\n React.isValidElement(child) &&\n ((child as React.ReactElement).type === CarouselPrevious ||\n (child as React.ReactElement).type === CarouselNext)\n const isIndicators = (child: React.ReactNode) =>\n React.isValidElement(child) && (child as React.ReactElement).type === CarouselIndicators\n\n const slotHost = asChild ? React.Children.only(children) as React.ReactElement<{ children?: React.ReactNode }> : null\n const childArray = React.Children.toArray(slotHost ? slotHost.props.children : children)\n const viewportElements = childArray.filter(isViewport)\n const navElements = childArray.filter(isNavButton)\n const indicatorElements = childArray.filter(isIndicators)\n\n const content = (\n <>\n {autoPlay && slideCount > 1 ? (\n <Button ref={rotationControlRef} type=\"button\" size=\"sm\" variant=\"ghost\" disabled={reducedMotion}\n onClick={() => { interactionLatchRef.current = false; setPaused((current) => !current) }}>\n {reducedMotion ? 'Slide rotation paused' : paused ? 'Start slide rotation' : 'Stop slide rotation'}\n </Button>\n ) : null}\n {viewportElements.map((viewport) => {\n const vp = viewport as React.ReactElement<CarouselViewportProps>\n return React.cloneElement(vp, {\n children: [vp.props.children, ...navElements] as React.ReactNode,\n })\n })}\n {indicatorElements}\n </>\n )\n\n return (\n <CarouselContext.Provider value={contextValue}>\n <Comp\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel', className)}\n data-size={size}\n data-slot=\"carousel\"\n role={restProps.role ?? 'group'}\n aria-roledescription=\"carousel\"\n onMouseEnter={(event) => { setHovered(true); restProps.onMouseEnter?.(event) }}\n onMouseLeave={(event) => { setHovered(false); restProps.onMouseLeave?.(event) }}\n onFocusCapture={(event) => {\n if (!rotationControlRef.current?.contains(event.target as Node)) {\n interactionLatchRef.current = true\n setPaused(true)\n }\n restProps.onFocusCapture?.(event)\n }}\n onPointerDownCapture={(event) => {\n if (!rotationControlRef.current?.contains(event.target as Node)) {\n interactionLatchRef.current = true\n setPaused(true)\n }\n restProps.onPointerDownCapture?.(event)\n }}\n onBlurCapture={(event) => {\n // Release the interaction latch when focus leaves the carousel\n // entirely; the rotation then resumes without an explicit restart.\n // An explicit stop from the rotation control is not latched, so it\n // survives blur.\n if (\n interactionLatchRef.current &&\n !event.currentTarget.contains(event.relatedTarget as Node | null)\n ) {\n interactionLatchRef.current = false\n setPaused(false)\n }\n restProps.onBlurCapture?.(event)\n }}\n >\n {slotHost ? React.cloneElement(slotHost, undefined, content) : content}\n </Comp>\n </CarouselContext.Provider>\n )\n})\nCarouselRoot.displayName = 'Carousel'\n\ninterface CarouselViewportProps extends React.ComponentPropsWithoutRef<'div'> {\n onSlideCountChange?: (count: number) => void\n}\n\nconst CarouselViewport = React.forwardRef<HTMLDivElement, CarouselViewportProps>((props, forwardedRef) => {\n const { className, children, onSlideCountChange, ...restProps } = props\n const { currentIndex, orientation, containerRef, setSlideCount, rotating } = useCarouselContext()\n\n const childArray = React.Children.toArray(children)\n const isNavButton = (child: React.ReactNode) =>\n React.isValidElement(child) &&\n ((child as React.ReactElement).type === CarouselPrevious ||\n (child as React.ReactElement).type === CarouselNext)\n const trackChildren = childArray.filter((c) => !isNavButton(c))\n const navElements = childArray.filter(isNavButton)\n const childCount = trackChildren.length\n\n React.useEffect(() => {\n setSlideCount(childCount)\n onSlideCountChange?.(childCount)\n }, [childCount, onSlideCountChange, setSlideCount])\n\n return (\n <div\n {...restProps}\n ref={(node) => {\n containerRef.current = node\n if (typeof forwardedRef === 'function') {\n forwardedRef(node)\n } else if (forwardedRef) {\n forwardedRef.current = node\n }\n }}\n className={classNames('dsx-carousel__viewport', className)}\n data-slot=\"carousel-viewport\"\n data-orientation={orientation}\n >\n <div\n className={classNames(\n 'dsx-carousel__track',\n orientation === 'vertical' && 'dsx-carousel__track--vertical',\n )}\n style={{\n transform: orientation === 'horizontal'\n ? `translateX(-${currentIndex * 100}%)`\n : `translateY(-${currentIndex * 100}%)`,\n }}\n data-slot=\"carousel-track\"\n aria-live={rotating ? 'off' : 'polite'}\n aria-atomic=\"false\"\n >\n {trackChildren.map((child, index) => (\n <div key={React.isValidElement(child) ? child.key ?? index : index} className=\"dsx-carousel__slide\"\n role=\"group\" aria-roledescription=\"slide\" aria-label={`${index + 1} of ${childCount}`}\n aria-hidden={index !== currentIndex ? true : undefined} inert={index !== currentIndex}>\n {child}\n </div>\n ))}\n </div>\n {navElements}\n </div>\n )\n})\nCarouselViewport.displayName = 'CarouselViewport'\n\ninterface CarouselItemProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, CarouselItemProps>((props, forwardedRef) => {\n const { className, ...restProps } = props\n return (\n <div\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__item', className)}\n data-slot=\"carousel-item\"\n />\n )\n})\nCarouselItem.displayName = 'CarouselItem'\n\ninterface CarouselPreviousProps extends React.ComponentPropsWithoutRef<'button'> {}\n\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, CarouselPreviousProps>((props, forwardedRef) => {\n const { className, onClick, ...restProps } = props\n const { prev, orientation, loop, currentIndex, slideCount } = useCarouselContext()\n\n return (\n <button\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__nav dsx-carousel__nav--previous', className)}\n type={restProps.type ?? 'button'}\n disabled={restProps.disabled || slideCount < 2 || (!loop && currentIndex === 0)}\n onClick={(event) => { onClick?.(event); if (!event.defaultPrevented) prev() }}\n aria-label={restProps['aria-label'] ?? 'Previous slide'}\n data-slot=\"carousel-previous\"\n >\n {orientation === 'horizontal' ? <ChevronLeft aria-hidden=\"true\" size={20} /> : <ChevronUp aria-hidden=\"true\" size={20} />}\n </button>\n )\n})\nCarouselPrevious.displayName = 'CarouselPrevious'\n\ninterface CarouselNextProps extends React.ComponentPropsWithoutRef<'button'> {}\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, CarouselNextProps>((props, forwardedRef) => {\n const { className, onClick, ...restProps } = props\n const { next, orientation, loop, currentIndex, slideCount } = useCarouselContext()\n\n return (\n <button\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__nav dsx-carousel__nav--next', className)}\n type={restProps.type ?? 'button'}\n disabled={restProps.disabled || slideCount < 2 || (!loop && currentIndex >= slideCount - 1)}\n onClick={(event) => { onClick?.(event); if (!event.defaultPrevented) next() }}\n aria-label={restProps['aria-label'] ?? 'Next slide'}\n data-slot=\"carousel-next\"\n >\n {orientation === 'horizontal' ? <ChevronRight aria-hidden=\"true\" size={20} /> : <ChevronDown aria-hidden=\"true\" size={20} />}\n </button>\n )\n})\nCarouselNext.displayName = 'CarouselNext'\n\ninterface CarouselIndicatorsProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst CarouselIndicators = React.forwardRef<HTMLDivElement, CarouselIndicatorsProps>((props, forwardedRef) => {\n const { className, ...restProps } = props\n const { currentIndex, slideCount, goTo } = useCarouselContext()\n\n if (slideCount <= 1) return null\n\n return (\n <div\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__indicators', className)}\n role=\"group\"\n aria-label={restProps['aria-label'] ?? 'Slide indicators'}\n data-slot=\"carousel-indicators\"\n >\n {Array.from({ length: slideCount }).map((_, index) => (\n <button\n key={index}\n type=\"button\"\n className={classNames(\n 'dsx-carousel__indicator',\n index === currentIndex && 'dsx-carousel__indicator--active',\n )}\n onClick={() => goTo(index)}\n aria-label={`Go to slide ${index + 1}`}\n aria-disabled={index === currentIndex}\n aria-current={index === currentIndex ? 'true' : undefined}\n data-slot=\"carousel-indicator\"\n />\n ))}\n </div>\n )\n})\nCarouselIndicators.displayName = 'CarouselIndicators'\n\nconst Carousel: typeof CarouselRoot & {\n Viewport: typeof CarouselViewport\n Item: typeof CarouselItem\n Previous: typeof CarouselPrevious\n Next: typeof CarouselNext\n Indicators: typeof CarouselIndicators\n} = Object.assign(CarouselRoot, {\n Viewport: CarouselViewport,\n Item: CarouselItem,\n Previous: CarouselPrevious,\n Next: CarouselNext,\n Indicators: CarouselIndicators,\n})\n\nexport { Carousel, CarouselItem, CarouselIndicators, CarouselNext, CarouselPrevious, CarouselRoot, CarouselViewport }\nexport type { CarouselIndicatorsProps, CarouselItemProps, CarouselNextProps, CarouselOwnProps, CarouselPreviousProps, CarouselProps, CarouselViewportProps }\n"],
5
- "mappings": ";AAEA,YAAY,WAAW;AACvB,OAAO,gBAAgB;AACvB,SAAS,YAAY;AACrB,SAAS,aAAa,aAAa,cAAc,iBAAiB;AAElE,SAAS,oBAAoB;AAC7B,SAAS,+BAA+B;AACxC,SAAS,cAAc;AACvB,SAAS,wBAAwB;AAyH7B,mBAEI,KAFJ;AA/FJ,MAAM,kBAAkB,MAAM,cAA2C,IAAI;AAE7E,SAAS,qBAAqB;AAC5B,QAAM,UAAU,MAAM,WAAW,eAAe;AAChD,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC7E;AACA,SAAO;AACT;AAEA,MAAM,eAAe,MAAM,WAA0C,CAAC,OAAO,iBAAiB;AAC5F,QAAM,cAAe,MAAsD,eAAe;AAC1F,QAAM,WAAY,MAAiC,YAAY;AAC/D,QAAM,mBAAoB,MAAwC,oBAAoB;AACtF,QAAM;AAAA,IACJ,UAAU;AAAA,IACV,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,OAAO;AAAA,IACP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B,MAAM,WAAoD,CAAC,OAAO,iBAAiB;AAC5G,QAAM,EAAE,WAAW,GAAG,UAAU,IAAI;AACpC,QAAM,EAAE,cAAc,YAAY,KAAK,IAAI,mBAAmB;AAE9D,MAAI,cAAc,EAAG,QAAO;AAE5B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,WAAW,WAAW,4BAA4B,SAAS;AAAA,MAC3D,MAAK;AAAA,MACL,cAAY,UAAU,YAAY,KAAK;AAAA,MACvC,aAAU;AAAA,MAET,gBAAM,KAAK,EAAE,QAAQ,WAAW,CAAC,EAAE,IAAI,CAAC,GAAG,UAC1C;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,WAAW;AAAA,YACT;AAAA,YACA,UAAU,gBAAgB;AAAA,UAC5B;AAAA,UACA,SAAS,MAAM,KAAK,KAAK;AAAA,UACzB,cAAY,eAAe,QAAQ,CAAC;AAAA,UACpC,iBAAe,UAAU;AAAA,UACzB,gBAAc,UAAU,eAAe,SAAS;AAAA,UAChD,aAAU;AAAA;AAAA,QAVL;AAAA,MAWP,CACD;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,mBAAmB,cAAc;AAEjC,MAAM,WAMF,OAAO,OAAO,cAAc;AAAA,EAC9B,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AACd,CAAC;",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\nimport { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from 'lucide-react'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { usePrefersReducedMotion } from '../../_internal/usePrefersReducedMotion'\nimport { Button } from '../button/Button'\nimport { carouselPropDefs } from './carousel.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype CarouselOwnProps = GetPropDefTypes<typeof carouselPropDefs> & {\n initialIndex?: number\n loop?: boolean\n autoPlay?: boolean\n autoPlayInterval?: number\n}\n\ninterface CarouselProps extends React.ComponentPropsWithoutRef<'div'>, CarouselOwnProps {}\n\ntype CarouselContextValue = {\n currentIndex: number\n slideCount: number\n setSlideCount: (count: number) => void\n goTo: (index: number) => void\n next: () => void\n prev: () => void\n loop: boolean\n rotating: boolean\n orientation: 'horizontal' | 'vertical'\n containerRef: React.RefObject<HTMLDivElement | null>\n}\n\nconst CarouselContext = React.createContext<CarouselContextValue | null>(null)\n\nfunction useCarouselContext() {\n const context = React.useContext(CarouselContext)\n if (!context) {\n throw new Error('Carousel compound components must be used within Carousel')\n }\n return context\n}\n\nconst CarouselRoot = React.forwardRef<HTMLDivElement, CarouselProps>((props, forwardedRef) => {\n const orientation = (props as { orientation?: 'horizontal' | 'vertical' }).orientation ?? 'horizontal'\n const autoPlay = (props as { autoPlay?: boolean }).autoPlay ?? false\n const autoPlayInterval = (props as { autoPlayInterval?: number }).autoPlayInterval ?? 3000\n const {\n autoPlay: _autoPlay,\n autoPlayInterval: _autoPlayInterval,\n asChild,\n children,\n className,\n initialIndex = 0,\n loop = false,\n size = 'md',\n ...restProps\n } = extractProps(props, carouselPropDefs)\n const Comp = asChild ? Slot : 'div'\n const containerRef = React.useRef<HTMLDivElement>(null)\n const [currentIndex, setCurrentIndex] = React.useState(() => Number.isFinite(initialIndex) ? Math.max(0, Math.trunc(initialIndex)) : 0)\n const [slideCount, setSlideCountState] = React.useState(0)\n const reducedMotion = usePrefersReducedMotion()\n const [paused, setPaused] = React.useState(false)\n const [hovered, setHovered] = React.useState(false)\n const rotationControlRef = React.useRef<HTMLButtonElement>(null)\n // Tracks whether the current pause came from the focus/pointer interaction\n // latch (as opposed to the rotation control's explicit stop): only a latched\n // pause is released when focus leaves the carousel. An explicit stop survives\n // blur until the control is activated again.\n const interactionLatchRef = React.useRef(false)\n const rotating = autoPlay && !paused && !hovered && !reducedMotion && slideCount > 1\n const index = slideCount > 0 ? Math.max(0, Math.min(currentIndex, slideCount - 1)) : 0\n\n const goTo = React.useCallback((index: number) => {\n setCurrentIndex(Number.isFinite(index) ? Math.max(0, Math.min(Math.trunc(index), Math.max(0, slideCount - 1))) : 0)\n }, [slideCount])\n\n const next = React.useCallback(() => {\n setCurrentIndex((prev) => {\n if (slideCount < 1) return 0\n if (loop) return (prev + 1) % slideCount\n return Math.min(prev + 1, slideCount - 1)\n })\n }, [loop, slideCount])\n\n const prev = React.useCallback(() => {\n setCurrentIndex((prev) => {\n if (slideCount < 1) return 0\n if (loop) return (prev - 1 + slideCount) % slideCount\n return Math.max(prev - 1, 0)\n })\n }, [loop, slideCount])\n\n const setSlideCount = React.useCallback((count: number) => {\n setSlideCountState(count)\n setCurrentIndex((current) => Number.isFinite(current) ? Math.max(0, Math.min(Math.trunc(current), Math.max(0, count - 1))) : 0)\n }, [])\n\n React.useEffect(() => {\n if (!rotating) return\n const id = setInterval(() => {\n setCurrentIndex((prev) => loop ? (prev + 1) % slideCount : Math.min(prev + 1, slideCount - 1))\n }, autoPlayInterval > 0 ? autoPlayInterval : 3000)\n return () => clearInterval(id)\n }, [rotating, autoPlayInterval, slideCount, loop])\n\n const contextValue = React.useMemo(\n () => ({ currentIndex: index, slideCount, setSlideCount, goTo, next, prev, loop, rotating, orientation, containerRef }),\n [index, slideCount, setSlideCount, goTo, next, prev, loop, rotating, orientation],\n )\n\n const isViewport = (child: React.ReactNode) =>\n React.isValidElement(child) && (child as React.ReactElement).type === CarouselViewport\n const isNavButton = (child: React.ReactNode) =>\n React.isValidElement(child) &&\n ((child as React.ReactElement).type === CarouselPrevious ||\n (child as React.ReactElement).type === CarouselNext)\n const isIndicators = (child: React.ReactNode) =>\n React.isValidElement(child) && (child as React.ReactElement).type === CarouselIndicators\n\n const slotHost = asChild ? React.Children.only(children) as React.ReactElement<{ children?: React.ReactNode }> : null\n const childArray = React.Children.toArray(slotHost ? slotHost.props.children : children)\n const viewportElements = childArray.filter(isViewport)\n const navElements = childArray.filter(isNavButton)\n const indicatorElements = childArray.filter(isIndicators)\n\n const content = (\n <>\n {autoPlay && slideCount > 1 ? (\n <Button ref={rotationControlRef} type=\"button\" size=\"sm\" variant=\"ghost\" disabled={reducedMotion}\n onClick={() => { interactionLatchRef.current = false; setPaused((current) => !current) }}>\n {reducedMotion ? 'Slide rotation paused' : paused ? 'Start slide rotation' : 'Stop slide rotation'}\n </Button>\n ) : null}\n {viewportElements.map((viewport) => {\n const vp = viewport as React.ReactElement<CarouselViewportProps>\n return React.cloneElement(vp, {\n children: [vp.props.children, ...navElements] as React.ReactNode,\n })\n })}\n {indicatorElements}\n </>\n )\n\n return (\n <CarouselContext.Provider value={contextValue}>\n <Comp\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel', className)}\n data-size={size}\n data-slot=\"carousel\"\n role={restProps.role ?? 'group'}\n aria-roledescription=\"carousel\"\n onKeyDown={(event) => {\n const target = event.target as HTMLElement | null\n const tag = target?.tagName\n const editable = target?.isContentEditable || tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT'\n if (!editable && !event.defaultPrevented) {\n if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') { event.preventDefault(); prev() }\n else if (event.key === 'ArrowRight' || event.key === 'ArrowDown') { event.preventDefault(); next() }\n }\n restProps.onKeyDown?.(event)\n }}\n onMouseEnter={(event) => { setHovered(true); restProps.onMouseEnter?.(event) }}\n onMouseLeave={(event) => { setHovered(false); restProps.onMouseLeave?.(event) }}\n onFocusCapture={(event) => {\n if (!rotationControlRef.current?.contains(event.target as Node)) {\n interactionLatchRef.current = true\n setPaused(true)\n }\n restProps.onFocusCapture?.(event)\n }}\n onPointerDownCapture={(event) => {\n if (!rotationControlRef.current?.contains(event.target as Node)) {\n interactionLatchRef.current = true\n setPaused(true)\n }\n restProps.onPointerDownCapture?.(event)\n }}\n onBlurCapture={(event) => {\n // Release the interaction latch when focus leaves the carousel\n // entirely; the rotation then resumes without an explicit restart.\n // An explicit stop from the rotation control is not latched, so it\n // survives blur.\n if (\n interactionLatchRef.current &&\n !event.currentTarget.contains(event.relatedTarget as Node | null)\n ) {\n interactionLatchRef.current = false\n setPaused(false)\n }\n restProps.onBlurCapture?.(event)\n }}\n >\n {slotHost ? React.cloneElement(slotHost, undefined, content) : content}\n </Comp>\n </CarouselContext.Provider>\n )\n})\nCarouselRoot.displayName = 'Carousel'\n\ninterface CarouselViewportProps extends React.ComponentPropsWithoutRef<'div'> {\n onSlideCountChange?: (count: number) => void\n}\n\nconst CarouselViewport = React.forwardRef<HTMLDivElement, CarouselViewportProps>((props, forwardedRef) => {\n const { className, children, onSlideCountChange, ...restProps } = props\n const { currentIndex, orientation, containerRef, setSlideCount, rotating } = useCarouselContext()\n\n const childArray = React.Children.toArray(children)\n const isNavButton = (child: React.ReactNode) =>\n React.isValidElement(child) &&\n ((child as React.ReactElement).type === CarouselPrevious ||\n (child as React.ReactElement).type === CarouselNext)\n const trackChildren = childArray.filter((c) => !isNavButton(c))\n const navElements = childArray.filter(isNavButton)\n const childCount = trackChildren.length\n\n React.useEffect(() => {\n setSlideCount(childCount)\n onSlideCountChange?.(childCount)\n }, [childCount, onSlideCountChange, setSlideCount])\n\n return (\n <div\n {...restProps}\n ref={(node) => {\n containerRef.current = node\n if (typeof forwardedRef === 'function') {\n forwardedRef(node)\n } else if (forwardedRef) {\n forwardedRef.current = node\n }\n }}\n className={classNames('dsx-carousel__viewport', className)}\n data-slot=\"carousel-viewport\"\n data-orientation={orientation}\n >\n <div\n className={classNames(\n 'dsx-carousel__track',\n orientation === 'vertical' && 'dsx-carousel__track--vertical',\n )}\n style={{\n transform: orientation === 'horizontal'\n ? `translateX(-${currentIndex * 100}%)`\n : `translateY(-${currentIndex * 100}%)`,\n }}\n data-slot=\"carousel-track\"\n aria-live={rotating ? 'off' : 'polite'}\n aria-atomic=\"false\"\n >\n {trackChildren.map((child, index) => (\n <div key={React.isValidElement(child) ? child.key ?? index : index} className=\"dsx-carousel__slide\"\n role=\"group\" aria-roledescription=\"slide\" aria-label={`${index + 1} of ${childCount}`}\n aria-hidden={index !== currentIndex ? true : undefined} inert={index !== currentIndex}>\n {child}\n </div>\n ))}\n </div>\n {navElements}\n </div>\n )\n})\nCarouselViewport.displayName = 'CarouselViewport'\n\ninterface CarouselItemProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, CarouselItemProps>((props, forwardedRef) => {\n const { className, ...restProps } = props\n return (\n <div\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__item', className)}\n data-slot=\"carousel-item\"\n />\n )\n})\nCarouselItem.displayName = 'CarouselItem'\n\ninterface CarouselPreviousProps extends React.ComponentPropsWithoutRef<'button'> {}\n\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, CarouselPreviousProps>((props, forwardedRef) => {\n const { className, onClick, ...restProps } = props\n const { prev, orientation, loop, currentIndex, slideCount } = useCarouselContext()\n\n return (\n <button\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__nav dsx-carousel__nav--previous', className)}\n type={restProps.type ?? 'button'}\n disabled={restProps.disabled || slideCount < 2 || (!loop && currentIndex === 0)}\n onClick={(event) => { onClick?.(event); if (!event.defaultPrevented) prev() }}\n aria-label={restProps['aria-label'] ?? 'Previous slide'}\n data-slot=\"carousel-previous\"\n >\n {orientation === 'horizontal' ? <ChevronLeft aria-hidden=\"true\" size={20} /> : <ChevronUp aria-hidden=\"true\" size={20} />}\n </button>\n )\n})\nCarouselPrevious.displayName = 'CarouselPrevious'\n\ninterface CarouselNextProps extends React.ComponentPropsWithoutRef<'button'> {}\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, CarouselNextProps>((props, forwardedRef) => {\n const { className, onClick, ...restProps } = props\n const { next, orientation, loop, currentIndex, slideCount } = useCarouselContext()\n\n return (\n <button\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__nav dsx-carousel__nav--next', className)}\n type={restProps.type ?? 'button'}\n disabled={restProps.disabled || slideCount < 2 || (!loop && currentIndex >= slideCount - 1)}\n onClick={(event) => { onClick?.(event); if (!event.defaultPrevented) next() }}\n aria-label={restProps['aria-label'] ?? 'Next slide'}\n data-slot=\"carousel-next\"\n >\n {orientation === 'horizontal' ? <ChevronRight aria-hidden=\"true\" size={20} /> : <ChevronDown aria-hidden=\"true\" size={20} />}\n </button>\n )\n})\nCarouselNext.displayName = 'CarouselNext'\n\ninterface CarouselIndicatorsProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst CarouselIndicators = React.forwardRef<HTMLDivElement, CarouselIndicatorsProps>((props, forwardedRef) => {\n const { className, ...restProps } = props\n const { currentIndex, slideCount, goTo } = useCarouselContext()\n\n if (slideCount <= 1) return null\n\n return (\n <div\n {...restProps}\n ref={forwardedRef}\n className={classNames('dsx-carousel__indicators', className)}\n role=\"group\"\n aria-label={restProps['aria-label'] ?? 'Slide indicators'}\n data-slot=\"carousel-indicators\"\n >\n {Array.from({ length: slideCount }).map((_, index) => (\n <button\n key={index}\n type=\"button\"\n className={classNames(\n 'dsx-carousel__indicator',\n index === currentIndex && 'dsx-carousel__indicator--active',\n )}\n onClick={() => goTo(index)}\n aria-label={`Go to slide ${index + 1}`}\n aria-disabled={index === currentIndex}\n aria-current={index === currentIndex ? 'true' : undefined}\n data-slot=\"carousel-indicator\"\n />\n ))}\n </div>\n )\n})\nCarouselIndicators.displayName = 'CarouselIndicators'\n\nconst Carousel: typeof CarouselRoot & {\n Viewport: typeof CarouselViewport\n Item: typeof CarouselItem\n Previous: typeof CarouselPrevious\n Next: typeof CarouselNext\n Indicators: typeof CarouselIndicators\n} = Object.assign(CarouselRoot, {\n Viewport: CarouselViewport,\n Item: CarouselItem,\n Previous: CarouselPrevious,\n Next: CarouselNext,\n Indicators: CarouselIndicators,\n})\n\nexport { Carousel, CarouselItem, CarouselIndicators, CarouselNext, CarouselPrevious, CarouselRoot, CarouselViewport }\nexport type { CarouselIndicatorsProps, CarouselItemProps, CarouselNextProps,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AAI;AACpC,QAAM,EAAE,cAAc,YAAY,KAAK,IAAI,mBAAmB;AAE9D,MAAI,cAAc,EAAG,QAAO;AAE5B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,WAAW,WAAW,4BAA4B,SAAS;AAAA,MAC3D,MAAK;AAAA,MACL,cAAY,UAAU,YAAY,KAAK;AAAA,MACvC,aAAU;AAAA,MAET,gBAAM,KAAK,EAAE,QAAQ,WAAW,CAAC,EAAE,IAAI,CAAC,GAAG,UAC1C;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,WAAW;AAAA,YACT;AAAA,YACA,UAAU,gBAAgB;AAAA,UAC5B;AAAA,UACA,SAAS,MAAM,KAAK,KAAK;AAAA,UACzB,cAAY,eAAe,QAAQ,CAAC;AAAA,UACpC,iBAAe,UAAU;AAAA,UACzB,gBAAc,UAAU,eAAe,SAAS;AAAA,UAChD,aAAU;AAAA;AAAA,QAVL;AAAA,MAWP,CACD;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,mBAAmB,cAAc;AAEjC,MAAM,WAMF,OAAO,OAAO,cAAc;AAAA,EAC9B,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AACd,CAAC;",
6
6
  "names": ["index", "prev"]
7
7
  }
@@ -168,7 +168,9 @@
168
168
  }
169
169
 
170
170
  .dsx-data-table-pagination__page-size {
171
- flex-wrap: wrap;
171
+ /* Spec: label and select wrap TOGETHER as one group to a new line;
172
+ they never split apart inside the group. */
173
+ flex-wrap: nowrap;
172
174
  min-width: 0;
173
175
  max-width: 100%;
174
176
  }
@@ -609,7 +609,10 @@ function DataTableInner(props, forwardedRef) {
609
609
  size: "md"
610
610
  }
611
611
  ) }) : null,
612
- isRowEditing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Table.TableCell, { className: "dsx-data-table__row-editor", colSpan: visibleColumns.length, children: renderRowEditor(row, rowIndex) }) : visibleColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Table.TableCell, { "data-align": column.numeric ? "end" : column.align, "data-numeric": column.numeric ? "true" : void 0, "data-truncate": column.truncate ? "true" : void 0, "data-hide-below": column.hideBelow, style: { width: typeof column.width === "object" ? void 0 : column.width, minWidth: typeof column.width === "object" ? column.width.min : void 0, maxWidth: typeof column.width === "object" ? column.width.max : void 0 }, children: column.cell?.(row, rowIndex) ?? (column.accessorKey ? String(row[column.accessorKey] ?? "") : null) }, column.id))
612
+ isRowEditing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Table.TableCell, { className: "dsx-data-table__row-editor", colSpan: visibleColumns.length, children: renderRowEditor(row, rowIndex) }) : visibleColumns.map((column) => {
613
+ const content = column.cell?.(row, rowIndex) ?? (column.accessorKey ? String(row[column.accessorKey] ?? "") : null);
614
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Table.TableCell, { "data-align": column.numeric ? "end" : column.align, "data-numeric": column.numeric ? "true" : void 0, "data-truncate": column.truncate ? "true" : void 0, "data-hide-below": column.hideBelow, style: { width: typeof column.width === "object" ? void 0 : column.width, minWidth: typeof column.width === "object" ? column.width.min : void 0, maxWidth: typeof column.width === "object" ? column.width.max : void 0 }, title: column.truncate && typeof content === "string" && content !== "" ? content : void 0, children: content }, column.id);
615
+ })
613
616
  ] }),
614
617
  isRowExpanded ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Table.TableRow, { "data-expanded-detail": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Table.TableCell, { className: "dsx-data-table__expanded-detail", colSpan: detailColSpan, children: expandedRowRender(row, rowIndex) }) }) : null
615
618
  ] }, rowId);