@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/sortableList/SortableList.tsx"],
4
- "sourcesContent": ["'use client'\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport { DndContext, DragOverlay, KeyboardSensor, PointerSensor, TouchSensor, closestCenter, useSensor, useSensors, type DragEndEvent, type DragStartEvent } from '@dnd-kit/core'\nimport { SortableContext, arrayMove, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable'\nimport { CSS as TransformCSS } from '@dnd-kit/utilities'\n\nimport { Icon } from '../icon/Icon'\nimport { VisuallyHidden } from '../visuallyHidden/VisuallyHidden'\n\nimport type {\n SortableId,\n SortableListItemProps,\n SortableListRootProps,\n} from './sortableList.props'\n\nconst SortableContextValue = React.createContext<{ attributes?: ReturnType<typeof useSortable>['attributes']; listeners?: ReturnType<typeof useSortable>['listeners'] }>({})\nconst SortableListItem = React.forwardRef<HTMLDivElement, SortableListItemProps>(({ id, disabled, className, style, children, ...props }, ref) => {\n const sortable = useSortable({ id, disabled })\n const mergedRef = (node: HTMLDivElement | null) => { sortable.setNodeRef(node); if (typeof ref === 'function') ref(node); else if (ref) ref.current = node }\n return <SortableContextValue.Provider value={{ attributes: sortable.attributes, listeners: sortable.listeners }}><div {...props} ref={mergedRef} className={classNames('dsx-sortable-list__item', className)} data-disabled={disabled || undefined} data-dragging={sortable.isDragging || undefined} style={{ ...style, transform: TransformCSS.Transform.toString(sortable.transform), transition: sortable.transition }}>{children}</div></SortableContextValue.Provider>\n})\nSortableListItem.displayName = 'SortableListItem'\n\n// The six-dot grip is the drag affordance (token-aligned Icon, not a text\n// glyph: glyphs render inconsistently across fonts and sizes).\nconst SortableListHandle = React.forwardRef<HTMLButtonElement, React.ButtonHTMLAttributes<HTMLButtonElement>>(({ className, children = <Icon name=\"grip-vertical\" size=\"sm\" />, type = 'button', ...props }, ref) => {\n const context = React.useContext(SortableContextValue)\n // Compose dnd-kit activator listeners with consumer handlers (CheckboxGroup\n // pattern): the consumer handler runs first and preventDefault() vetoes the\n // drag activator. Spreading listeners last without composing silently dropped\n // consumer onPointerDown/onKeyDown.\n const composedListeners: Record<string, (event: { defaultPrevented?: boolean }) => void> = {}\n for (const [key, internalHandler] of Object.entries(context.listeners ?? {})) {\n const userHandler = (props as Record<string, unknown>)[key]\n composedListeners[key] = (event: { defaultPrevented?: boolean }) => {\n if (typeof userHandler === 'function') (userHandler as (event: unknown) => void)(event)\n if (!event.defaultPrevented) (internalHandler as (event: unknown) => void)(event)\n }\n }\n return <button {...context.attributes} {...props} {...composedListeners} ref={ref} type={type} className={classNames('dsx-sortable-list__handle', className)} aria-label={props['aria-label'] ?? 'Reorder item'}>{children}</button>\n})\nSortableListHandle.displayName = 'SortableListHandle'\nconst SortableListOverlay = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => <div {...props} ref={ref} className={classNames('dsx-sortable-list__overlay', className)} />)\nSortableListOverlay.displayName = 'SortableListOverlay'\n\nconst SortableListRoot = React.forwardRef<HTMLDivElement, SortableListRootProps>(({ ids, disabledIds = [], onReorder, announcements, className, children, ...props }, ref) => {\n const rootRef = React.useRef<HTMLDivElement | null>(null)\n const mergedRootRef = React.useCallback((node: HTMLDivElement | null) => {\n rootRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) ref.current = node\n }, [ref])\n const [activeId, setActiveId] = React.useState<SortableId | null>(null)\n const [message, setMessage] = React.useState('')\n const sensors = useSensors(useSensor(PointerSensor), useSensor(TouchSensor), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }))\n const handleStart = (event: DragStartEvent) => setActiveId(event.active.id)\n const activeChild = React.Children.toArray(children).find(\n (child) => React.isValidElement(child) && (child.props as SortableListItemProps).id === activeId,\n )\n const activeContent = React.isValidElement<{ children?: React.ReactNode }>(activeChild)\n ? activeChild.props.children\n : activeId == null ? null : String(activeId)\n const handleEnd = (event: DragEndEvent) => {\n setActiveId(null)\n if (!event.over || event.active.id === event.over.id) return\n const from = ids.indexOf(event.active.id); const to = ids.indexOf(event.over.id)\n if (from < 0 || to < 0 || disabledIds.includes(event.active.id) || disabledIds.includes(event.over.id)) return\n const next = arrayMove(ids, from, to)\n setMessage(announcements?.moved?.(event.active.id, from, to) ?? `Moved item ${String(event.active.id)} from position ${from + 1} to ${to + 1}`)\n onReorder?.({ ids: next, activeIndex: from, overIndex: to })\n const escapedId = globalThis.CSS?.escape?.(String(event.active.id)) ?? String(event.active.id).replace(/[\"\\\\]/g, '\\\\$&')\n requestAnimationFrame(() => rootRef.current?.querySelector<HTMLElement>(`[data-sortable-id=\"${escapedId}\"] .dsx-sortable-list__handle`)?.focus())\n }\n return <DndContext sensors={sensors} collisionDetection={closestCenter} onDragStart={handleStart} onDragCancel={() => setActiveId(null)} onDragEnd={handleEnd}><SortableContext items={ids} strategy={verticalListSortingStrategy}><div {...props} ref={mergedRootRef} className={classNames('dsx-sortable-list', className)} role={props.role ?? 'list'}>{React.Children.map(children, (child) => React.isValidElement(child) ? React.cloneElement(child as React.ReactElement<Record<string, unknown>>, { 'data-sortable-id': String((child.props as SortableListItemProps).id), disabled: (child.props as SortableListItemProps).disabled || disabledIds.includes((child.props as SortableListItemProps).id), role: (child.props as SortableListItemProps).role ?? 'listitem' }) : child)}</div></SortableContext><VisuallyHidden aria-live=\"assertive\">{message}</VisuallyHidden><DragOverlay>{activeId == null ? null : <SortableListOverlay>{activeContent}</SortableListOverlay>}</DragOverlay></DndContext>\n})\nSortableListRoot.displayName = 'SortableList'\n\nconst SortableList = Object.assign(SortableListRoot, { Root: SortableListRoot, Item: SortableListItem, Handle: SortableListHandle, Overlay: SortableListOverlay })\nexport { SortableList, SortableListHandle, SortableListItem, SortableListOverlay, SortableListRoot }\nexport type {\n S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AM,MAAM,QAAQ,QAAS,gBAAM,SAAS,IAAI,UAAU,CAAC,UAAU,MAAM,eAAe,KAAK,IAAI,MAAM,aAAa,OAAsD,EAAE,oBAAoB,OAAQ,MAAM,MAAgC,EAAE,GAAG,UAAW,MAAM,MAAgC,YAAY,YAAY,SAAU,MAAM,MAAgC,EAAE,GAAG,MAAO,MAAM,MAAgC,QAAQ,WAAW,CAAC,IAAI,KAAK,GAAE,GAAM;AAAA,IAAkB,oBAAC,kBAAe,aAAU,aAAa,mBAAQ;AAAA,IAAiB,oBAAC,eAAa,sBAAY,OAAO,OAAO,oBAAC,uBAAqB,yBAAc,GAAuB;AAAA,KAAc;AACx8B,CAAC;AACD,iBAAiB,cAAc;AAE/B,MAAM,eAAe,OAAO,OAAO,kBAAkB,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,QAAQ,oBAAoB,SAAS,oBAAoB,CAAC;",
4
+ "sourcesContent": ["'use client'\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport { DndContext, DragOverlay, KeyboardSensor, PointerSensor, TouchSensor, closestCenter, useSensor, useSensors, type DragEndEvent, type DragStartEvent } from '@dnd-kit/core'\nimport { SortableContext, arrayMove, horizontalListSortingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable'\nimport { CSS as TransformCSS } from '@dnd-kit/utilities'\n\nimport { Icon } from '../icon/Icon'\nimport { VisuallyHidden } from '../visuallyHidden/VisuallyHidden'\n\nimport type {\n SortableId,\n SortableListItemProps,\n SortableListRootProps,\n} from './sortableList.props'\n\nconst SortableContextValue = React.createContext<{ attributes?: ReturnType<typeof useSortable>['attributes']; listeners?: ReturnType<typeof useSortable>['listeners'] }>({})\nconst SortableListItem = React.forwardRef<HTMLDivElement, SortableListItemProps>(({ id, disabled, className, style, children, ...props }, ref) => {\n const sortable = useSortable({ id, disabled })\n const mergedRef = (node: HTMLDivElement | null) => { sortable.setNodeRef(node); if (typeof ref === 'function') ref(node); else if (ref) ref.current = node }\n return <SortableContextValue.Provider value={{ attributes: sortable.attributes, listeners: sortable.listeners }}><div {...props} ref={mergedRef} className={classNames('dsx-sortable-list__item', className)} data-disabled={disabled || undefined} data-dragging={sortable.isDragging || undefined} style={{ ...style, transform: TransformCSS.Transform.toString(sortable.transform), transition: sortable.transition }}>{children}</div></SortableContextValue.Provider>\n})\nSortableListItem.displayName = 'SortableListItem'\n\n// The six-dot grip is the drag affordance (token-aligned Icon, not a text\n// glyph: glyphs render inconsistently across fonts and sizes).\nconst SortableListHandle = React.forwardRef<HTMLButtonElement, React.ButtonHTMLAttributes<HTMLButtonElement>>(({ className, children = <Icon name=\"grip-vertical\" size=\"sm\" />, type = 'button', ...props }, ref) => {\n const context = React.useContext(SortableContextValue)\n // Compose dnd-kit activator listeners with consumer handlers (CheckboxGroup\n // pattern): the consumer handler runs first and preventDefault() vetoes the\n // drag activator. Spreading listeners last without composing silently dropped\n // consumer onPointerDown/onKeyDown.\n const composedListeners: Record<string, (event: { defaultPrevented?: boolean }) => void> = {}\n for (const [key, internalHandler] of Object.entries(context.listeners ?? {})) {\n const userHandler = (props as Record<string, unknown>)[key]\n composedListeners[key] = (event: { defaultPrevented?: boolean }) => {\n if (typeof userHandler === 'function') (userHandler as (event: unknown) => void)(event)\n if (!event.defaultPrevented) (internalHandler as (event: unknown) => void)(event)\n }\n }\n return <button {...context.attributes} {...props} {...composedListeners} ref={ref} type={type} className={classNames('dsx-sortable-list__handle', className)} aria-label={props['aria-label'] ?? 'Reorder item'}>{children}</button>\n})\nSortableListHandle.displayName = 'SortableListHandle'\nconst SortableListOverlay = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => <div {...props} ref={ref} className={classNames('dsx-sortable-list__overlay', className)} />)\nSortableListOverlay.displayName = 'SortableListOverlay'\n\nconst SortableListRoot = React.forwardRef<HTMLDivElement, SortableListRootProps>(({ ids, orientation = 'vertical', disabledIds = [], onReorder, announcements, className, children, ...props }, ref) => {\n const rootRef = React.useRef<HTMLDivElement | null>(null)\n const mergedRootRef = React.useCallback((node: HTMLDivElement | null) => {\n rootRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) ref.current = node\n }, [ref])\n const [activeId, setActiveId] = React.useState<SortableId | null>(null)\n const [message, setMessage] = React.useState('')\n const sensors = useSensors(useSensor(PointerSensor), useSensor(TouchSensor), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }))\n const handleStart = (event: DragStartEvent) => setActiveId(event.active.id)\n const activeChild = React.Children.toArray(children).find(\n (child) => React.isValidElement(child) && (child.props as SortableListItemProps).id === activeId,\n )\n const activeContent = React.isValidElement<{ children?: React.ReactNode }>(activeChild)\n ? activeChild.props.children\n : activeId == null ? null : String(activeId)\n const handleEnd = (event: DragEndEvent) => {\n setActiveId(null)\n if (!event.over || event.active.id === event.over.id) return\n const from = ids.indexOf(event.active.id); const to = ids.indexOf(event.over.id)\n if (from < 0 || to < 0 || disabledIds.includes(event.active.id) || disabledIds.includes(event.over.id)) return\n const next = arrayMove(ids, from, to)\n setMessage(announcements?.moved?.(event.active.id, from, to) ?? `Moved item ${String(event.active.id)} from position ${from + 1} to ${to + 1}`)\n onReorder?.({ ids: next, activeIndex: from, overIndex: to })\n const escapedId = globalThis.CSS?.escape?.(String(event.active.id)) ?? String(event.active.id).replace(/[\"\\\\]/g, '\\\\$&')\n requestAnimationFrame(() => rootRef.current?.querySelector<HTMLElement>(`[data-sortable-id=\"${escapedId}\"] .dsx-sortable-list__handle`)?.focus())\n }\n return <DndContext sensors={sensors} collisionDetection={closestCenter} onDragStart={handleStart} onDragCancel={() => setActiveId(null)} onDragEnd={handleEnd}><SortableContext items={ids} strategy={orientation === 'horizontal' ? horizontalListSortingStrategy : verticalListSortingStrategy}><div {...props} ref={mergedRootRef} className={classNames('dsx-sortable-list', className)} data-orientation={orientation} role={props.role ?? 'list'}>{React.Children.map(children, (child) => React.isValidElement(child) ? React.cloneElement(child as React.ReactElement<Record<string, unknown>>, { 'data-sortable-id': String((child.props as SortableListItemProps).id), disabled: (child.props as SortableListItemProps).disabled || disabledIds.includes((child.props as SortableListItemProps).id), role: (child.props as SortableListItemProps).role ?? 'listitem' }) : child)}</div></SortableContext><VisuallyHidden aria-live=\"assertive\">{message}</VisuallyHidden><DragOverlay>{activeId == null ? null : <SortableListOverlay>{activeContent}</SortableListOverlay>}</DragOverlay></DndContext>\n})\nSortableListRoot.displayName = 'SortableList'\n\nconst SortableList = Object.assign(SortableListRoot, { Root: SortableListRoot, Item: SortableListItem, Handle: SortableListHandle, Overlay: SortableListOverlay })\nexport { SortableList, SortableListHandle, SortableListItem, SortableListOverlay, SortableListRoot }\nexport type {\n SortableId,\n SortableListChange,\n SortableListItemProps,\n SortableListRootProps,\n} from './sortableList.props'\n"],
5
+ "mappings": ";AACA,YAAY,WAAW;AACvB,OAAO,gBAAgB;AACvB,SAAS,YAAY,aAAa,gBAAgB,eAAe,aAAa,eAAe,WAAW,kBAA0D;AAClK,SAAS,iBAAiB,WAAW,+BAA+B,6BAA6B,aAAa,mCAAmC;AACjJ,SAAS,OAAO,oBAAoB;AAEpC,SAAS,YAAY;AACrB,SAAS,sBAAsB;AAYoF,cAsD1G,YAtD0G;AAJnH,MAAM,uBAAuB,MAAM,cAAsI,CAAC,CAAC;AAC3K,MAAM,mBAAmB,MAAM,WAAkD,CAAC,EAAE,IAAI,UAAU,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,QAAQ;AAChJ,QAAM,WAAW,YAAY,EAAE,IAAI,SAAS,CAAC;AAC7C,QAAM,YAAY,CAAC,SAAgC;AAAE,aAAS,WAAW,IAAI;AAAG,QAAI,OAAO,QAAQ,WAAY,KAAI,IAAI;AAAA,aAAY,IAAK,KAAI,UAAU;AAAA,EAAK;AAC3J,SAAO,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,EAAE,YAAY,SAAS,YAAY,WAAW,SAAS,UAAU,GAAG,8BAAC,SAAK,GAAG,OAAO,KAAK,WAAW,W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,GAAG,CAAC;AAC3D,UAAM,YAAY,WAAW,KAAK,SAAS,OAAO,MAAM,OAAO,EAAE,CAAC,KAAK,OAAO,MAAM,OAAO,EAAE,EAAE,QAAQ,UAAU,MAAM;AACvH,0BAAsB,MAAM,QAAQ,SAAS,cAA2B,sBAAsB,SAAS,+BAA+B,GAAG,MAAM,CAAC;AAAA,EAClJ;AACA,SAAO,qBAAC,cAAW,SAAkB,oBAAoB,eAAe,aAAa,aAAa,cAAc,MAAM,YAAY,IAAI,GAAG,WAAW,WAAW;AAAA,wBAAC,mBAAgB,OAAO,KAAK,UAAU,gBAAgB,eAAe,gCAAgC,6BAA6B,8BAAC,SAAK,GAAG,OAAO,KAAK,eAAe,WAAW,WAAW,qBAAqB,SAAS,GAAG,oBAAkB,aAAa,MAAM,MAAM,QAAQ,QAAS,gBAAM,SAAS,IAAI,UAAU,CAAC,UAAU,MAAM,eAAe,KAAK,IAAI,MAAM,aAAa,OAAsD,EAAE,oBAAoB,OAAQ,MAAM,MAAgC,EAAE,GAAG,UAAW,MAAM,MAAgC,YAAY,YAAY,SAAU,MAAM,MAAgC,EAAE,GAAG,MAAO,MAAM,MAAgC,QAAQ,WAAW,CAAC,IAAI,KAAK,GAAE,GAAM;AAAA,IAAkB,oBAAC,kBAAe,aAAU,aAAa,mBAAQ;AAAA,IAAiB,oBAAC,eAAa,sBAAY,OAAO,OAAO,oBAAC,uBAAqB,yBAAc,GAAuB;AAAA,KAAc;AACtiC,CAAC;AACD,iBAAiB,cAAc;AAE/B,MAAM,eAAe,OAAO,OAAO,kBAAkB,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,QAAQ,oBAAoB,SAAS,oBAAoB,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/sortableList/sortableList.props.ts"],
4
- "sourcesContent": ["import type * as React from 'react'\n\ntype SortableId = string | number\n\ntype SortableListChange = {\n ids: SortableId[]\n activeIndex: number\n overIndex: number\n}\n\ninterface SortableListRootProps extends React.ComponentPropsWithoutRef<'div'> {\n ids: SortableId[]\n disabledIds?: SortableId[]\n onReorder?: (change: SortableListChange) => void\n announcements?: {\n moved?: (id: SortableId, from: number, to: number) => string\n }\n}\n\ninterface SortableListItemProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'id'> {\n id: SortableId\n disabled?: boolean\n}\n\nexport type { SortableId, SortableListChange, SortableListItemProps, SortableListRootProps }\n"],
4
+ "sourcesContent": ["import type * as React from 'react'\n\ntype SortableId = string | number\n\ntype SortableListChange = {\n ids: SortableId[]\n activeIndex: number\n overIndex: number\n}\n\ninterface SortableListRootProps extends React.ComponentPropsWithoutRef<'div'> {\n ids: SortableId[]\n /** Layout axis. `vertical` stacks rows; `horizontal` lays items out in a row. Defaults to `vertical`. */\n orientation?: 'vertical' | 'horizontal'\n disabledIds?: SortableId[]\n onReorder?: (change: SortableListChange) => void\n announcements?: {\n moved?: (id: SortableId, from: number, to: number) => string\n }\n}\n\ninterface SortableListItemProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'id'> {\n id: SortableId\n disabled?: boolean\n}\n\nexport type { SortableId, SortableListChange, SortableListItemProps, SortableListRootProps }\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -7,6 +7,8 @@ type SortableListChange = {
7
7
  };
8
8
  interface SortableListRootProps extends React.ComponentPropsWithoutRef<'div'> {
9
9
  ids: SortableId[];
10
+ /** Layout axis. `vertical` stacks rows; `horizontal` lays items out in a row. Defaults to `vertical`. */
11
+ orientation?: 'vertical' | 'horizontal';
10
12
  disabledIds?: SortableId[];
11
13
  onReorder?: (change: SortableListChange) => void;
12
14
  announcements?: {
@@ -1 +1 @@
1
- {"version":3,"file":"sortableList.props.d.cts","sourceRoot":"","sources":["../../../src/components/sortableList/sortableList.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;AAEjC,KAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC3E,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAChD,aAAa,CAAC,EAAE;QACd,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,CAAA;KAC7D,CAAA;CACF;AAED,UAAU,qBAAsB,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC;IACvF,EAAE,EAAE,UAAU,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAA"}
1
+ {"version":3,"file":"sortableList.props.d.cts","sourceRoot":"","sources":["../../../src/components/sortableList/sortableList.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;AAEjC,KAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC3E,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,yGAAyG;IACzG,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAA;IACvC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAChD,aAAa,CAAC,EAAE;QACd,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,CAAA;KAC7D,CAAA;CACF;AAED,UAAU,qBAAsB,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC;IACvF,EAAE,EAAE,UAAU,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAA"}
@@ -7,6 +7,8 @@ type SortableListChange = {
7
7
  };
8
8
  interface SortableListRootProps extends React.ComponentPropsWithoutRef<'div'> {
9
9
  ids: SortableId[];
10
+ /** Layout axis. `vertical` stacks rows; `horizontal` lays items out in a row. Defaults to `vertical`. */
11
+ orientation?: 'vertical' | 'horizontal';
10
12
  disabledIds?: SortableId[];
11
13
  onReorder?: (change: SortableListChange) => void;
12
14
  announcements?: {
@@ -1 +1 @@
1
- {"version":3,"file":"sortableList.props.d.mts","sourceRoot":"","sources":["../../../src/components/sortableList/sortableList.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;AAEjC,KAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC3E,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAChD,aAAa,CAAC,EAAE;QACd,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,CAAA;KAC7D,CAAA;CACF;AAED,UAAU,qBAAsB,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC;IACvF,EAAE,EAAE,UAAU,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAA"}
1
+ {"version":3,"file":"sortableList.props.d.mts","sourceRoot":"","sources":["../../../src/components/sortableList/sortableList.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;AAEjC,KAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC3E,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,yGAAyG;IACzG,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAA;IACvC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAChD,aAAa,CAAC,EAAE;QACd,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,CAAA;KAC7D,CAAA;CACF;AAED,UAAU,qBAAsB,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC;IACvF,EAAE,EAAE,UAAU,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAA"}
@@ -7,6 +7,8 @@ type SortableListChange = {
7
7
  };
8
8
  interface SortableListRootProps extends React.ComponentPropsWithoutRef<'div'> {
9
9
  ids: SortableId[];
10
+ /** Layout axis. `vertical` stacks rows; `horizontal` lays items out in a row. Defaults to `vertical`. */
11
+ orientation?: 'vertical' | 'horizontal';
10
12
  disabledIds?: SortableId[];
11
13
  onReorder?: (change: SortableListChange) => void;
12
14
  announcements?: {
@@ -1 +1 @@
1
- {"version":3,"file":"sortableList.props.d.ts","sourceRoot":"","sources":["../../../src/components/sortableList/sortableList.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;AAEjC,KAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC3E,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAChD,aAAa,CAAC,EAAE;QACd,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,CAAA;KAC7D,CAAA;CACF;AAED,UAAU,qBAAsB,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC;IACvF,EAAE,EAAE,UAAU,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAA"}
1
+ {"version":3,"file":"sortableList.props.d.ts","sourceRoot":"","sources":["../../../src/components/sortableList/sortableList.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;AAEjC,KAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC3E,GAAG,EAAE,UAAU,EAAE,CAAA;IACjB,yGAAyG;IACzG,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAA;IACvC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAChD,aAAa,CAAC,EAAE;QACd,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,CAAA;KAC7D,CAAA;CACF;AAED,UAAU,qBAAsB,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC;IACvF,EAAE,EAAE,UAAU,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAA"}
@@ -35,6 +35,7 @@
35
35
  @import 'components/separator.css';
36
36
  @import 'components/popover.css';
37
37
  @import 'components/rating.css';
38
+ @import 'components/reactions.css';
38
39
  @import 'components/slider.css';
39
40
  @import 'components/switch.css';
40
41
  @import 'components/strong.css';
@@ -75,6 +76,7 @@
75
76
  @import 'components/resizable.css';
76
77
  @import 'components/rich-text-editor.css';
77
78
  @import 'components/scroll-area.css';
79
+ @import 'components/share.css';
78
80
  @import 'components/search-bar.css';
79
81
  @import 'components/sidebar.css';
80
82
  @import 'components/sonner.css';
@@ -136,6 +136,7 @@ They describe public intent and contracts; TypeScript declarations remain the ex
136
136
  - [RadioCards](./components/radio-cards.md)
137
137
  - [RadioGroup](./components/radio-group.md)
138
138
  - [Rating](./components/rating.md)
139
+ - [Reactions](./components/reactions.md)
139
140
  - [Resizable](./components/resizable.md)
140
141
  - [Result](./components/result.md)
141
142
  - [RichTextEditor](./components/rich-text-editor.md)
@@ -143,6 +144,7 @@ They describe public intent and contracts; TypeScript declarations remain the ex
143
144
  - [SearchBar](./components/search-bar.md)
144
145
  - [SegmentedControl](./components/segmented-control.md)
145
146
  - [Select](./components/select.md)
147
+ - [Share](./components/share.md)
146
148
  - [Sidebar](./components/sidebar.md)
147
149
  - [Sonner](./components/sonner.md)
148
150
  - [SortableList](./components/sortable-list.md)
@@ -130,6 +130,7 @@ from the closest RT category (see legend).
130
130
  | RadioCards | RT RadioCards | ✓ | ✓ | ✓ | — | — | RT RadioCards: V+S+C, no R or H |
131
131
  | RadioGroup | RT RadioGroup | ✓ | ✓ | ✓ | — | ✓ | RT RadioGroup: V+S+C+H, no radius |
132
132
  | Rating | Custom → none | — | ✓ | ✓ | — | — | Size + accent color |
133
+ | Reactions | Custom → Toggle | — | ✓ | — | — | ✓ | Toggle-backed chips; size + high-contrast on Root |
133
134
  | Resizable | Primitive → none | — | — | — | — | — | Layout utility |
134
135
  | Result | Custom → none | — | — | — | — | — | State and tone use component-specific attributes only |
135
136
  | RichTextEditor | Custom → none | — | — | — | — | — | Complex editor; no data-* |
@@ -140,6 +141,7 @@ from the closest RT category (see legend).
140
141
  | SegmentedMeter | Custom → Progress | — | ✓ | ✓ | — | — | Discrete meter; size + accent color |
141
142
  | Select | RT Select | ✓ | ✓ | — | — | — | RT Select.Trigger: V+S, no C/R/H |
142
143
  | Separator | RT Separator | — | ✓ | ✓ | — | — | RT Separator: size+color, no V/R/H |
144
+ | Share | Custom → none | — | — | — | — | — | Dialog content, app-hosted; no data-* |
143
145
  | Sheet | Custom → Dialog | — | ✓ | — | — | — | Dialog side-panel variant; size only |
144
146
  | Sidebar | Custom → variant | ✓ | — | — | — | — | Layout shell; `Provider` and root emit `data-variant` (`default` \| `floating`); ring `MenuBadge` emits `data-variant="ring"` |
145
147
  | Skeleton | RT Skeleton | — | — | — | — | — | No styling props in RT |
@@ -194,13 +196,13 @@ from the closest RT category (see legend).
194
196
  | V only | PageHeader | 1 |
195
197
  | S+C+H | Heading, Link, Text | 3 |
196
198
  | S+C | SegmentedMeter, Separator, Status | 3 |
197
- | S+H | LikeToggle, SaveToggle | 2 |
199
+ | S+H | LikeToggle, SaveToggle, Reactions | 3 |
198
200
  | S+R | InputOtp, ScrollArea | 2 |
199
201
  | S only | Breadcrumb, ButtonGroup, Calendar (see above), Carousel, CodeInput,<br>ColorPicker, ColorSwatch, Command, Container, ContextMenu, CopyField, DataTable,<br>DatePicker, Dialog, Drawer, DropdownMenu, EmptyState, Field, FileUpload, FilterBar,<br>FloatingPanel, HoverCard, Icon, InputGroup, Kbd, Label, Menu, Menubar, Metric,<br>NavigationMenu, Pagination, Popover, QrCode, Section, Sheet, Spinner, Stepper,<br>Timeline, TimePicker, ToggleTip, Toolbar, TreeView | 42 |
200
202
  | V+S | AlertDialog | 1 |
201
- | None | AccessibleIcon, Accordion, ArticleNodes, AspectRatio, Banner, Blockquote, BottomDock, Box, Chart,<br>Collapsible, CommentThread, ConfigDrawer, DirectionProvider, Em, EnvironmentRibbon, Flex, FontProvider,<br>Form, Grid, Inset, Item, Marquee, NotificationCenter, PageContent, Prose, Quote,<br>Resizable, Result, RichTextEditor, Sidebar, Skeleton, Slot, Sonner, SortableList, Stack, Strong,<br>TableOfContents, Theme, ThemePanel, ThemeProvider, Tooltip, VisuallyHidden | 41 |
203
+ | None | AccessibleIcon, Accordion, ArticleNodes, AspectRatio, Banner, Blockquote, BottomDock, Box, Chart,<br>Collapsible, CommentThread, ConfigDrawer, DirectionProvider, Em, EnvironmentRibbon, Flex, FontProvider,<br>Form, Grid, Inset, Item, Marquee, NotificationCenter, PageContent, Prose, Quote,<br>Resizable, Result, RichTextEditor, Share, Sidebar, Skeleton, Slot, Sonner, SortableList, Stack, Strong,<br>TableOfContents, Theme, ThemePanel, ThemeProvider, Tooltip, VisuallyHidden | 42 |
202
204
 
203
- **Total components covered: 135**
205
+ **Total components covered: 137**
204
206
 
205
207
  ---
206
208
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "4.2.2",
3
+ "packageVersion": "4.2.3",
4
4
  "generatedFrom": "docs/design-system",
5
5
  "components": [
6
6
  {
@@ -907,6 +907,14 @@
907
907
  "status": "canonical",
908
908
  "documentation": "./components/rating.md"
909
909
  },
910
+ {
911
+ "name": "Reactions",
912
+ "slug": "reactions",
913
+ "category": "Components",
914
+ "archetype": "composite",
915
+ "status": "canonical",
916
+ "documentation": "./components/reactions.md"
917
+ },
910
918
  {
911
919
  "name": "Resizable",
912
920
  "slug": "resizable",
@@ -963,6 +971,14 @@
963
971
  "status": "canonical",
964
972
  "documentation": "./components/select.md"
965
973
  },
974
+ {
975
+ "name": "Share",
976
+ "slug": "share",
977
+ "category": "Components",
978
+ "archetype": "composite",
979
+ "status": "canonical",
980
+ "documentation": "./components/share.md"
981
+ },
966
982
  {
967
983
  "name": "Sidebar",
968
984
  "slug": "sidebar",
@@ -190,7 +190,8 @@ Rules:
190
190
  |---|---|
191
191
  | `Tab` | Moves focus through the indicator buttons (in DOM order) and the navigation buttons. |
192
192
  | `Enter`, `Space` | Activates the focused indicator or navigation button. |
193
- | `←`, `→` | The component does not implement arrow-key slide navigation. Consumers that need it should add a keyboard handler in their app. |
193
+ | `←` / `↑` | Previous slide (`prev`; loop-aware). Ignored inside text fields and editable content. |
194
+ | `→` / `↓` | Next slide (`next`; loop-aware). Same editable-content guard. |
194
195
 
195
196
  **Focus:**
196
197
 
@@ -270,7 +271,7 @@ The shared docs route at `demo_path` renders `/docs/carousel` from `apps/playgro
270
271
 
271
272
  **Boundary rules:**
272
273
 
273
- - App-owned data: the slide content, the persistence of `currentIndex` (no built-in URL sync), the per-slide analytics, and any keyboard navigation beyond the default focus order.
274
+ - App-owned data: the slide content, the persistence of `currentIndex` (no built-in URL sync), the per-slide analytics, and any keyboard behavior beyond arrows + default focus order (consumer `onKeyDown` still runs).
274
275
  - DS-owned visuals: token bindings, the `dsx-carousel` and slot classes, the `data-orientation` and `data-size` attributes, the nav and indicator `aria-label` templates, the grouped-button semantics on the picker row, and the autoplay timer interval.
275
276
  - When the canonical Embla adapter lands, the DS shell, the slot hierarchy, the class names, and the prop defs stay unchanged. The runtime will swap the in-source slide math for an Embla instance and forward Embla events through the existing `CarouselContext`.
276
277
 
@@ -35,7 +35,9 @@ This section supersedes narrower 2.5 notes below. Columns additionally accept fi
35
35
 
36
36
  The default toolbar is composed from the public `DataTable.Toolbar` slots. Inside the nearest DataTable, zero-prop Search, ColumnVisibility, Export, and RowCount slots bind to table state; their existing explicit props remain valid for standalone use. Query, faceted-filter, and tri-state sort changes reset page to 1 and clear selection by default; `resetPageOnViewChange={false}` and `clearSelectionOnViewChange={false}` opt out independently.
37
37
 
38
- `listState="loading" | "empty" | "no-results" | "error"` renders the canonical Result path, or `result` supplies custom content. Fixed columns retain width while the lone truncating fluid column absorbs overflow. Apps continue to own fetching and server query execution; the component emits state changes only.
38
+ `listState="loading" | "empty" | "no-results" | "error"` renders the canonical Result path, or `result` supplies custom content. Fixed columns retain width while the lone truncating fluid column absorbs overflow. A column without `width` is `auto` content-sized and never the absorber: explicit widths are the default authoring posture, not an opt-in. Truncating cells expose their full string content via `title` (rich cell content keeps its own affordances). Apps continue to own fetching and server query execution; the component emits state changes only.
39
+
40
+ Density is padding-only on the shell (`size` writes `data-size`, forwarded to inner `Table` cell padding; no row-height scale). Toolbar control heights do not step with `size` — when a `FilterBar` drives the toolbar, FilterBar's own density table governs its controls. Pager ownership: `showPagination` (default `false`) renders the pager inside the shell; `ListPage` renders a standalone `DataTable.Pagination` (with its threshold and `more` mode) outside it. One pager per view — never both.
39
41
 
40
42
  ## Anatomy & slots
41
43
 
@@ -0,0 +1,106 @@
1
+ ---
2
+ title: Reactions
3
+ status: canonical
4
+ category: Components
5
+ archetype: composite
6
+ depends_on:
7
+ - Toggle
8
+ - ToggleTip
9
+ - Popover
10
+ - Text
11
+ - Icon
12
+ ---
13
+
14
+ # reactions
15
+
16
+ ## Purpose
17
+
18
+ A grouped emoji-reaction surface for posts and comments: a cluster of
19
+ toggle chips with counts, an overflow cap, and a searchable picker for
20
+ adding reactions. The app owns the emoji set, counts, reactors, and
21
+ persistence; the component owns toggle semantics, grouping, and picker
22
+ behavior. Follows the LikeToggle pressed pattern at cluster scale.
23
+
24
+ ## Anatomy & slots
25
+
26
+ - `Reactions.Root` — layout host (`dsx-reactions`), flex-wrap row of chips
27
+ plus the add trigger. Carries `data-size`.
28
+ - `Reactions.Chip` — Toggle-backed toggle button per reaction: emoji +
29
+ count. Root carries `dsx-reactions__chip`, `aria-pressed`, and
30
+ `data-state="on"` when reacted. Count is visual-only; the accessible
31
+ name is `"<emoji> <label>, <count> reactions"` (or `"including you"`
32
+ when self-reacted).
33
+ - `Reactions.Picker` — Popover content: search input + emoji grid.
34
+ `open` / `onOpenChange` / `onSelect(emoji)`; `closeOnSelect` defaults
35
+ `true`; search filters the app-provided `emojis` list.
36
+ - `Reactions.AddTrigger` — the "+" button that opens the picker; omitted
37
+ when `onAddRequest` is undefined (read-only cluster).
38
+
39
+ For a single pressed-state affordance without grouping or picker, use
40
+ `LikeToggle` instead.
41
+
42
+ ## Props contract
43
+
44
+ | Prop | Type | Default | Required | Description |
45
+ |---|---|---|---|---|
46
+ | `reactions` (Root) | `{ id: string; emoji: string; label: string; count: number; reacted: boolean; reactors?: string[] }[]` | — | yes | Reaction rows in display order. |
47
+ | `onToggle` (Root) | `(id: string) => void` | — | no | Fires on chip press. Omit for a read-only cluster. |
48
+ | `onAddRequest` (Root) | `() => void` | — | no | Fires when the add trigger activates. Omit to hide the trigger. |
49
+ | `maxVisible` (Root) | `number` | — | no | Caps visible chips; the remainder collapse behind a `+N` chip that expands on press. |
50
+ | `size` (Root) | `'sm' \| 'md' \| 'lg'` | `'md'` | no | Chip density; written as `data-size`. |
51
+ | `disabled` (Root) | `boolean` | `false` | no | Disables every chip and the trigger. |
52
+ | `emojis` (Picker) | `{ emoji: string; label: string }[]` | — | yes | App-provided set; the component never ships a default set. |
53
+ | `onSelect` (Picker) | `(emoji: string) => void` | — | yes | Fires on emoji activation. |
54
+ | `closeOnSelect` (Picker) | `boolean` | `true` | no | Closes the popover after selection. |
55
+
56
+ ## States
57
+
58
+ - Unreacted chip: `aria-pressed="false"`, count in muted label-small.
59
+ - Reacted chip: `aria-pressed="true"`, `data-state="on"`, filled
60
+ treatment (fill + `aria-pressed`, never color alone).
61
+ - Overflow: `+N` chip expands the full cluster on press.
62
+ - Picker: Esc closes, search input labelled, arrow-key navigation,
63
+ empty query shows the full set, no match shows an empty row.
64
+ - Disabled: interaction blocked on chips, trigger, and picker.
65
+
66
+ ## Class & data-attribute contract
67
+
68
+ - `.dsx-reactions` — root flex-wrap row.
69
+ - `.dsx-reactions__chip` — Toggle-backed chip; pressed styling keys off
70
+ `data-state="on"` plus `aria-pressed`.
71
+ - `.dsx-reactions__count` — count text; `label-small` typography.
72
+ - `.dsx-reactions__add` — add trigger.
73
+ - `.dsx-reactions__picker` — popover panel; `.dsx-reactions__search`,
74
+ `.dsx-reactions__grid`, `.dsx-reactions__empty`.
75
+ - `data-size` on root mirrors `size`.
76
+
77
+ ## Token mapping
78
+
79
+ - Chips: surface/sunken backgrounds, outline-variant borders, gap
80
+ `--dsx-space-xs`; reacted fill `--dsx-color-accent-indicator` at rest
81
+ with `aria-pressed` as the semantic carrier.
82
+ - Count: `label-small` typography, `--dsx-color-on-surface-variant`.
83
+ - Picker panel: popover surface, `--dsx-radius-md`, `--dsx-space-sm`
84
+ padding; search input inherits field tokens.
85
+
86
+ ## Motion contract
87
+
88
+ - No component-owned motion. Chip press flips instantly; popover
89
+ open/close follows the Popover motion preset with the global
90
+ `prefers-reduced-motion` gate. No timers, no autoplay.
91
+
92
+ ## Playground demo spec
93
+
94
+ Empty cluster, populated cluster, reacted-self, overflow (`maxVisible`),
95
+ disabled, all sizes, dark/light × accent matrix; picker open, search
96
+ filter, select, Esc close. Interaction probes: toggle flips
97
+ `aria-pressed` + count; picker search narrows; reactor identity is not
98
+ hover-only (tap opens the same list via ToggleTip).
99
+
100
+ ## Wiring notes
101
+
102
+ - Composes `Toggle` (pressed semantics), `Popover` (picker),
103
+ `ToggleTip` (reactor list), `Text`, `Icon`. No new adapter.
104
+ - Reactor names stay app-owned strings; the component never fetches
105
+ identity, analytics, or persistence.
106
+ - Penpot family port ships with the batch: `Components / Reactions`.
@@ -15,7 +15,7 @@ depends_on:
15
15
 
16
16
  ## 2.6 article preset
17
17
 
18
- `preset="basic" | "article"` retains `basic` as the default. `extensions` remains a full replacement. `createRichTextEditorExtensions({ preset, extensions })` is the supported composition helper for app-owned editor instances. The article preset uses the official Image and Table extensions, CodeBlockLowlight with package-selected Lowlight common languages, plus stable embed, callout, comparison, and poll nodes.
18
+ `preset="basic" | "article"` retains `basic` as the default. `extensions` remains a full replacement. `createRichTextEditorExtensions({ preset, extensions })` is the supported composition helper for app-owned editor instances. The article preset uses the official Image and Table extensions, CodeBlockLowlight with package-selected Lowlight common languages, multicolor Highlight, TextAlign (headings + paragraphs), plus stable embed, callout, comparison, and poll nodes. Underline ships inside StarterKit. The toolbar style menu holds paragraph + headings only; quote, code block, table, divider, and image insert through the Insert group (table/image/quote/code insert UI included; embed, poll, callout, platform tabs, video, and material links remain consumer-composed via `insertItems`).
19
19
 
20
20
  Import the editor and its composition helper from `@d4gger/design-system/rich-text-editor`. Direct article extension exports live at `@d4gger/design-system/article-extensions`; neither Tiptap surface is re-exported by the root or `components` barrels, preserving the optional-peer boundary.
21
21
 
@@ -76,7 +76,7 @@ The `EditorContent` component from `@tiptap/react` renders inside `RichTextEdito
76
76
  | `className` | `string` | `undefined` | no | Extra classes appended to `dsx-rich-text-editor`. | no |
77
77
  | `tools` | `readonly EditorTool[]` | common formatting | no | Visible schema-supported controls. Does not validate document policy. | no |
78
78
  | `headingLevels` | `readonly (1..6)[]` | schema levels | no | Levels in the text style menu. | no |
79
- | `insertItems` | `readonly EditorInsertItem[]` | `[]` | no | Consumer-labelled insertion callbacks. | no |
79
+ | `insertItems` | `readonly EditorInsertItem[]` | `[]` (`preset="article"` + `undefined` defaults to quote/code/table/divider) | no | Consumer-labelled insertion callbacks. `EditorInsertItem.node` hides the item when the schema lacks that node. | no |
80
80
  | `variables` | `readonly EditorVariable[]` | `undefined` | no | Registry metadata; Root adds key-only atom unless extensions are replaced. | no |
81
81
  | `mentions` | `readonly EditorMention[]` | `undefined` | no | User IDs/labels; picker and @ suggestions. Custom schemas add the mention extension. | no |
82
82
  | `localeText` | `Partial<RichTextEditorLocaleText>` | English defaults | no | Overrides the shell's user-visible strings: status bar, toolbar groups and controls, token pickers, link popover, mention suggestions. `characterCount` is a `(count: number) => string` formatter. Merged over the English defaults, so partial overrides keep the rest. | no |
@@ -93,7 +93,7 @@ The `EditorContent` component from `@tiptap/react` renders inside `RichTextEdito
93
93
  | `className` | `string` | `undefined` | no | Extra classes. | no |
94
94
  | `tools` | `readonly EditorTool[]` | common formatting | no | Visible schema-supported controls. Does not validate document policy. | no |
95
95
  | `headingLevels` | `readonly (1..6)[]` | schema levels | no | Levels in the text style menu. | no |
96
- | `insertItems` | `readonly EditorInsertItem[]` | `[]` | no | Consumer-labelled insertion callbacks. | no |
96
+ | `insertItems` | `readonly EditorInsertItem[]` | `[]` (`preset="article"` + `undefined` defaults to quote/code/table/divider) | no | Consumer-labelled insertion callbacks. `EditorInsertItem.node` hides the item when the schema lacks that node. | no |
97
97
  | `variables` | `readonly EditorVariable[]` | `undefined` | no | Registry metadata; Root adds key-only atom unless extensions are replaced. | no |
98
98
  | `mentions` | `readonly EditorMention[]` | `undefined` | no | User IDs/labels; picker and @ suggestions. Custom schemas add the mention extension. | no |
99
99
  | `localeText` | `Partial<RichTextEditorLocaleText>` | English defaults | no | Same bundle as `Root`: status bar, toolbar, pickers, link popover, mention suggestions. | no |
@@ -107,7 +107,7 @@ The `EditorContent` component from `@tiptap/react` renders inside `RichTextEdito
107
107
  | `className` | `string` | `undefined` | no | Extra classes. | no |
108
108
  | `tools` | `readonly EditorTool[]` | common formatting | no | Visible schema-supported controls. Does not validate document policy. | no |
109
109
  | `headingLevels` | `readonly (1..6)[]` | schema levels | no | Levels in the text style menu. | no |
110
- | `insertItems` | `readonly EditorInsertItem[]` | `[]` | no | Consumer-labelled insertion callbacks. | no |
110
+ | `insertItems` | `readonly EditorInsertItem[]` | `[]` (`preset="article"` + `undefined` defaults to quote/code/table/divider) | no | Consumer-labelled insertion callbacks. `EditorInsertItem.node` hides the item when the schema lacks that node. | no |
111
111
  | `variables` | `readonly EditorVariable[]` | `undefined` | no | Registry metadata; Root adds key-only atom unless extensions are replaced. | no |
112
112
  | `mentions` | `readonly EditorMention[]` | `undefined` | no | User IDs/labels; picker and @ suggestions. Custom schemas add the mention extension. | no |
113
113
  | `localeText` | `Partial<RichTextEditorLocaleText>` | English defaults | no | Same bundle as `Root`, toolbar subset: group and control labels, style menu, pickers, link popover. | no |
@@ -235,8 +235,10 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
235
235
  **Roles:**
236
236
 
237
237
  - The toolbar has `role="toolbar"` and `aria-label="Formatting toolbar"`.
238
- - Each toolbar group has `role="group"` with `aria-label` ("Text style", "Block style", "Insert", "History").
238
+ - Each toolbar group has `role="group"` with `aria-label` ("Text style", "Insert", "History"). The text-style menu holds paragraph plus headings only; block converters (quote, code block) and inserts (table, divider, image) live under the Insert group.
239
239
  - Each toolbar button has `aria-pressed` for the active state and `aria-label` for the action name.
240
+ - The selection bar (bubble role) renders `role="toolbar"` with `aria-label="Selection formatting"` only while a non-collapsed text selection exists; it offers Bold, Italic and Underline gated by the same `tools` + schema check as the main toolbar.
241
+ - The slash menu renders `role="listbox"` with `aria-label="Insert block"` when `/` is typed at a block start (or after whitespace); options carry `role="option"` + `aria-selected`, filtered by the text after the slash and schema-gated by `EditorInsertItem.node` exactly like the Insert menu.
240
242
 
241
243
  **Keyboard:**
242
244
 
@@ -245,6 +247,8 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
245
247
  | `Tab` | Enters or leaves the toolbar's roving focus group, then reaches editor content. |
246
248
  | `Enter`, `Space` | Activates the focused toolbar button. |
247
249
  | Arrow keys / Home / End | Existing Toolbar supplies roving focus between enabled actions. ProseMirror keeps its own Mod-B / Mod-I shortcuts. |
250
+ | `Up` / `Down` then `Enter` in editor content | Moves through the open slash menu and applies the active block insert (the `/query` is deleted first). |
251
+ | `Escape` in editor content | Dismisses the open slash menu without changing the document. |
248
252
 
249
253
  **Focus:**
250
254
 
@@ -264,6 +268,7 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
264
268
  - Each toolbar button has an `aria-label` ("Bold", "Italic", "Strikethrough", "Heading 1", "Heading", "Subheading", "Bulleted list", "Numbered list", "Quote block", "Code block", "Link", "Clear formatting", "Undo", "Redo").
265
269
  - The toolbar is auto-labeled "Formatting toolbar".
266
270
  - The toolbar groups are auto-labeled "Text style", "Block style", "Insert", and "History".
271
+ - The selection bar is auto-labeled "Selection formatting"; the slash menu is auto-labeled "Insert block". Both strings are overridable through `localeText` (`selectionBar`, `slashMenu`).
267
272
 
268
273
  ## Playground demo spec
269
274
 
@@ -305,9 +310,10 @@ custom toolbar; app-owned Shell behavior is covered by the functional suite.
305
310
  **Composes from:**
306
311
 
307
312
  - `@tiptap/react`: the adapter engine. `useEditor` creates the editor instance. `EditorContent` renders the ProseMirror host.
308
- - `@tiptap/starter-kit`: the default extension set. Provides bold, italic, strike, headings, lists, blockquote, code block, and history.
313
+ - `@tiptap/starter-kit`: the default extension set. Provides bold, italic, strike, underline, headings, lists, blockquote, code block, and history.
314
+ - `@tiptap/extension-highlight` (multicolor), `@tiptap/extension-text-align` (headings + paragraphs): article-preset marks with toolbar controls.
309
315
  - `Button`: wraps each toolbar button with `variant="ghost"` and `size="sm"`.
310
- - `Icon`: renders the toolbar button glyphs (bold, italic, strikethrough, heading-1, heading-2, heading-3, list, list-ordered, quote, code, link, eraser, undo, redo).
316
+ - `Icon`: renders the toolbar button glyphs (bold, italic, strikethrough, underline, highlight, align-left/center/right/justify, heading-1, heading-2, heading-3, list, list-ordered, quote, code, link, eraser, undo, redo).
311
317
 
312
318
  **Used by:**
313
319
 
@@ -0,0 +1,103 @@
1
+ ---
2
+ title: Share
3
+ status: canonical
4
+ category: Components
5
+ archetype: composite
6
+ depends_on:
7
+ - Item
8
+ - CopyField
9
+ - CopyButton
10
+ - Icon
11
+ - Text
12
+ ---
13
+
14
+ # share
15
+
16
+ ## Purpose
17
+
18
+ A share-target panel for content surfaces: a list of share targets plus
19
+ a copy-link row. The composite is dialog content, not a dialog — the app
20
+ hosts it in `Dialog` on desktop or `Drawer` on mobile (the composite
21
+ no-portals rule). The app owns targets, URLs, analytics, and routing;
22
+ the component owns target rows, copy delegation, and the optional
23
+ system-share attempt.
24
+
25
+ ## Anatomy & slots
26
+
27
+ - `Share` — flat export, no subcomponents. Root is the layout host
28
+ (`dsx-share`); vertical list of target rows plus the copy-link row.
29
+ Rows are data-driven (`targets` array), so slots would never be
30
+ instantiated by consumers — same flat precedent as `CopyField`.
31
+ - Target rows are menu-item buttons (`Item`-composed, `asChild`) with
32
+ icon + label, activated by click/Enter.
33
+ - The copy row delegates to `CopyField` (`value=url`); copy confirmation
34
+ and polite announcement come from `CopyButton`, never reimplemented
35
+ here.
36
+ - The system row renders only when `systemShare` is set and
37
+ `navigator.canShare({ url })` passes; invokes `navigator.share()` from
38
+ the click handler (transient activation). A user cancel surfaces as
39
+ `AbortError` and is swallowed silently — cancel is never an error
40
+ toast.
41
+
42
+ When `navigator.share` is unavailable or `systemShare` is unset, the
43
+ panel is targets + copy-link only; there is never a dead button.
44
+
45
+ ## Props contract
46
+
47
+ | Prop | Type | Default | Required | Description |
48
+ |---|---|---|---|---|
49
+ | `url` (Root) | `string` | — | yes | Canonical URL; feeds `CopyField` and `canShare`. |
50
+ | `title` (Root) | `string` | — | yes | Share title for the system sheet. |
51
+ | `text` (Root) | `string` | — | no | Share text for the system sheet. |
52
+ | `targets` (Root) | `{ id: string; icon: string; label: string }[]` | — | yes | App-provided targets in display order. |
53
+ | `onShare` (Root) | `(id: string) => void` | — | yes | Fires on target activation. Analytics and routing stay app-side. |
54
+ | `showCopyLink` (Root) | `boolean` | `true` | no | Toggles the copy-link row. |
55
+ | `disabled` (Root) | `boolean` | `false` | no | Disables every target row. The copy row keeps CopyField's own states. |
56
+ | `systemShare` (Root) | `boolean` | `false` | no | Enables the system-sheet row when `canShare` passes. |
57
+
58
+ ## States
59
+
60
+ - Target rows: hover, focus-visible, pressed; keyboard operable as menu
61
+ items with accessible names.
62
+ - Copy: success confirms via `CopyButton`'s live region; failure
63
+ surfaces CopyField's existing error path.
64
+ - System row absent unless both `systemShare` and `canShare` hold.
65
+ - No system share in insecure contexts or tests: the component degrades
66
+ to targets + copy-link with no dead controls.
67
+
68
+ ## Class & data-attribute contract
69
+
70
+ - `.dsx-share` — root vertical list.
71
+ - `.dsx-share__targets` — row group; `.dsx-share__target` per row
72
+ (Item-composed, icon + label slots).
73
+ - `.dsx-share__copylink` — copy row hosting `CopyField`.
74
+ - `.dsx-share__system` — system-sheet row, present only when active.
75
+
76
+ ## Token mapping
77
+
78
+ - Rows: `Item` surface, gap `--dsx-space-sm`, label typography;
79
+ icon `sm`, muted-to-foreground on hover via Item states.
80
+ - Copy row: inherits `CopyField`/`Field` tokens; no local overrides.
81
+ - Dividers (if any): `--dsx-color-outline-variant`.
82
+
83
+ ## Motion contract
84
+
85
+ - No component-owned motion. Row presses follow Item states; hosting
86
+ Dialog/Drawer owns open/close motion with the reduced-motion gate.
87
+
88
+ ## Playground demo spec
89
+
90
+ Targets-only, copy-link success/failure, system row present (mocked
91
+ `canShare`/`share`) and absent (unmocked), no-targets edge (copy row
92
+ only), dark/light × accent matrix; hosted in Dialog and in a mobile
93
+ Drawer at 390px/320px with no overflow. Interaction probes: target
94
+ activates `onShare(id)`; copy writes clipboard + announces; cancel
95
+ (`AbortError`) shows nothing.
96
+
97
+ ## Wiring notes
98
+
99
+ - Composes `Item`, `CopyField`, `CopyButton`, `Icon`, `Text`. No new
100
+ adapter; Web Share is a guarded browser API call, not a dependency.
101
+ - Never fetches, never tracks, never routes. Hosting (Dialog/Drawer)
102
+ is app-owned per the composite no-portals rule.
103
+ - Penpot family port ships with the batch: `Components / Share`.
@@ -10,11 +10,11 @@ depends_on: ["@dnd-kit/core", "@dnd-kit/sortable", "@dnd-kit/utilities"]
10
10
 
11
11
  ## Purpose
12
12
 
13
- Optional dnd-kit-backed vertical reordering for pointer, touch, and keyboard sensors.
13
+ Optional dnd-kit-backed reordering for pointer, touch, and keyboard sensors. `orientation="vertical"` (default) stacks rows; `orientation="horizontal"` lays items out in a single row and switches the `SortableContext` strategy to `horizontalListSortingStrategy` (keyboard arrows move along the row via `sortableKeyboardCoordinates`).
14
14
 
15
15
  ## Anatomy & contract
16
16
 
17
- `SortableList.Root`, `Item`, `Handle`, and `Overlay`. Root receives ordered `ids`, optional `disabledIds`, localized announcements, and emits `{ ids, activeIndex, overIndex }`. Handles are visible named buttons. Cancellation does not emit, successful moves announce position, restore handle focus, and respect reduced motion. Persistence is consumer-owned.
17
+ `SortableList.Root`, `Item`, `Handle`, and `Overlay`. Root receives ordered `ids`, `orientation` (default `vertical`, written as `data-orientation` on the root), optional `disabledIds`, localized announcements, and emits `{ ids, activeIndex, overIndex }`. Handles are visible named buttons. Cancellation does not emit, successful moves announce position, restore handle focus, and respect reduced motion. Persistence is consumer-owned.
18
18
 
19
19
  Reorder announcements render through the package `VisuallyHidden` primitive so
20
20
  the assertive live region remains available to assistive technology without