@flikk/ui 1.0.0-beta.11 → 1.0.0-beta.13

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 (220) hide show
  1. package/dist/components/ai/ApprovalCard/ApprovalCard.js +1 -1
  2. package/dist/components/ai/MessageHistory/MessageHistory.js +1 -0
  3. package/dist/components/ai/PromptInput/PromptInput.js +7 -125
  4. package/dist/components/ai/PromptInput/VoiceRecorder.js +0 -77
  5. package/dist/components/ai/StreamingResponse/StreamingResponse.js +1 -0
  6. package/dist/components/ai/StreamingResponse/StreamingResponse.types.d.ts +7 -7
  7. package/dist/components/ai/index.js +1 -0
  8. package/dist/components/core/Accordion/Accordion.d.ts +1 -1
  9. package/dist/components/core/Accordion/Accordion.js +2 -2
  10. package/dist/components/core/Accordion/Accordion.theme.d.ts +2 -2
  11. package/dist/components/core/Accordion/Accordion.theme.js +4 -4
  12. package/dist/components/core/Accordion/Accordion.types.d.ts +19 -20
  13. package/dist/components/core/Accordion/AccordionBody.d.ts +3 -0
  14. package/dist/components/core/Accordion/{AccordionContent.js → AccordionBody.js} +4 -4
  15. package/dist/components/core/Accordion/AccordionItem.js +1 -1
  16. package/dist/components/core/Accordion/AccordionTrigger.js +14 -7
  17. package/dist/components/core/Accordion/index.d.ts +2 -2
  18. package/dist/components/core/Alert/Alert.js +5 -1
  19. package/dist/components/core/Alert/Alert.types.d.ts +4 -4
  20. package/dist/components/core/Avatar/Avatar.js +22 -18
  21. package/dist/components/core/Avatar/Avatar.theme.js +1 -1
  22. package/dist/components/core/Avatar/Avatar.types.d.ts +9 -8
  23. package/dist/components/core/AvatarGroup/AvatarGroup.js +2 -2
  24. package/dist/components/core/Badge/Badge.js +7 -5
  25. package/dist/components/core/Badge/Badge.theme.js +11 -4
  26. package/dist/components/core/Badge/Badge.types.d.ts +2 -2
  27. package/dist/components/core/Breadcrumbs/Breadcrumbs.js +7 -3
  28. package/dist/components/core/Breadcrumbs/Breadcrumbs.types.d.ts +1 -1
  29. package/dist/components/core/Button/Button.js +2 -8
  30. package/dist/components/core/Button/Button.theme.js +7 -7
  31. package/dist/components/core/Calendar/Calendar.js +3 -3
  32. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.types.d.ts +5 -6
  33. package/dist/components/core/Card/Card.d.ts +2 -2
  34. package/dist/components/core/Card/Card.js +3 -3
  35. package/dist/components/core/Card/Card.theme.js +3 -3
  36. package/dist/components/core/Card/Card.types.d.ts +4 -4
  37. package/dist/components/core/Card/CardBody.d.ts +3 -0
  38. package/dist/components/core/Card/CardBody.js +11 -0
  39. package/dist/components/core/Card/index.d.ts +2 -2
  40. package/dist/components/core/Carousel/Carousel.js +4 -4
  41. package/dist/components/core/Carousel/Carousel.types.d.ts +4 -4
  42. package/dist/components/core/Carousel/CarouselBody.d.ts +4 -0
  43. package/dist/components/core/Carousel/{CarouselContent.js → CarouselBody.js} +3 -3
  44. package/dist/components/core/Carousel/index.d.ts +2 -1
  45. package/dist/components/core/ContextMenu/ContextMenu.d.ts +2 -2
  46. package/dist/components/core/ContextMenu/ContextMenu.js +6 -6
  47. package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +2 -2
  48. package/dist/components/core/ContextMenu/ContextMenuBody.d.ts +6 -0
  49. package/dist/components/core/ContextMenu/{ContextMenuContent.js → ContextMenuBody.js} +4 -4
  50. package/dist/components/core/ContextMenu/ContextMenuSubBody.d.ts +6 -0
  51. package/dist/components/core/ContextMenu/{ContextMenuSubContent.js → ContextMenuSubBody.js} +4 -4
  52. package/dist/components/core/ContextMenu/index.d.ts +1 -1
  53. package/dist/components/core/Drawer/Drawer.d.ts +2 -2
  54. package/dist/components/core/Drawer/Drawer.js +28 -9
  55. package/dist/components/core/Drawer/Drawer.theme.js +1 -1
  56. package/dist/components/core/Drawer/Drawer.types.d.ts +8 -6
  57. package/dist/components/core/Drawer/DrawerBody.d.ts +5 -0
  58. package/dist/components/core/Drawer/DrawerBody.js +11 -0
  59. package/dist/components/core/Drawer/index.d.ts +2 -1
  60. package/dist/components/core/Dropdown/Dropdown.types.d.ts +3 -3
  61. package/dist/components/core/Dropdown/DropdownSection.js +3 -1
  62. package/dist/components/core/FileTypeIcon/FileTypeIcon.d.ts +3 -0
  63. package/dist/components/core/FileTypeIcon/FileTypeIcon.js +33 -0
  64. package/dist/components/core/FileTypeIcon/FileTypeIcon.theme.d.ts +2 -0
  65. package/dist/components/core/FileTypeIcon/FileTypeIcon.theme.js +12 -0
  66. package/dist/components/core/FileTypeIcon/FileTypeIcon.types.d.ts +19 -0
  67. package/dist/components/core/FileTypeIcon/fileTypes.d.ts +7 -0
  68. package/dist/components/core/FileTypeIcon/fileTypes.js +30 -0
  69. package/dist/components/core/FileTypeIcon/index.d.ts +2 -0
  70. package/dist/components/core/MenuItem/MenuItem.js +3 -1
  71. package/dist/components/core/MenuItem/MenuItem.theme.js +1 -1
  72. package/dist/components/core/MenuItem/MenuItem.types.d.ts +1 -1
  73. package/dist/components/core/Message/Message.d.ts +1 -1
  74. package/dist/components/core/Message/Message.js +3 -3
  75. package/dist/components/core/Message/Message.theme.js +2 -2
  76. package/dist/components/core/Message/Message.types.d.ts +7 -7
  77. package/dist/components/core/Message/MessageAvatar.d.ts +2 -2
  78. package/dist/components/core/Message/MessageAvatar.js +3 -3
  79. package/dist/components/core/Message/MessageBody.d.ts +8 -0
  80. package/dist/components/core/Message/{MessageContent.js → MessageBody.js} +3 -3
  81. package/dist/components/core/Message/index.d.ts +2 -0
  82. package/dist/components/core/Modal/Modal.js +5 -1
  83. package/dist/components/core/Modal/Modal.theme.js +1 -1
  84. package/dist/components/core/Modal/Modal.types.d.ts +5 -2
  85. package/dist/components/core/ModalStack/ModalStackModal.js +1 -0
  86. package/dist/components/core/PageHeading/PageHeading.types.d.ts +1 -1
  87. package/dist/components/core/PageHeading/PageHeadingBackButton.js +3 -1
  88. package/dist/components/core/Popover/Popover.d.ts +1 -1
  89. package/dist/components/core/Popover/Popover.js +4 -4
  90. package/dist/components/core/Popover/Popover.theme.d.ts +1 -1
  91. package/dist/components/core/Popover/Popover.theme.js +2 -2
  92. package/dist/components/core/Popover/Popover.types.d.ts +3 -3
  93. package/dist/components/core/Popover/PopoverBody.d.ts +7 -0
  94. package/dist/components/core/Popover/{PopoverContent.js → PopoverBody.js} +24 -13
  95. package/dist/components/core/Popover/index.d.ts +4 -3
  96. package/dist/components/core/Tabs/Tabs.animations.d.ts +2 -2
  97. package/dist/components/core/Tabs/Tabs.animations.js +3 -3
  98. package/dist/components/core/Tabs/Tabs.d.ts +1 -1
  99. package/dist/components/core/Tabs/Tabs.js +3 -3
  100. package/dist/components/core/Tabs/Tabs.theme.d.ts +1 -1
  101. package/dist/components/core/Tabs/Tabs.theme.js +2 -2
  102. package/dist/components/core/Tabs/Tabs.types.d.ts +9 -9
  103. package/dist/components/core/Tabs/TabsBody.d.ts +6 -0
  104. package/dist/components/core/Tabs/{TabsContent.js → TabsBody.js} +8 -8
  105. package/dist/components/core/Tabs/index.d.ts +2 -2
  106. package/dist/components/core/Tag/Tag.d.ts +1 -1
  107. package/dist/components/core/Tag/Tag.js +2 -2
  108. package/dist/components/core/Tag/Tag.types.d.ts +1 -1
  109. package/dist/components/core/Toast/Toast.js +5 -1
  110. package/dist/components/core/Toast/Toast.types.d.ts +9 -9
  111. package/dist/components/core/index.d.ts +1 -1
  112. package/dist/components/core/index.js +7 -3
  113. package/dist/components/data-display/Feed/Feed.animations.d.ts +40 -0
  114. package/dist/components/data-display/Feed/Feed.animations.js +26 -0
  115. package/dist/components/data-display/Feed/Feed.d.ts +5 -1
  116. package/dist/components/data-display/Feed/Feed.js +87 -52
  117. package/dist/components/data-display/Feed/Feed.theme.js +11 -13
  118. package/dist/components/data-display/Feed/Feed.types.d.ts +35 -34
  119. package/dist/components/data-display/Feed/index.d.ts +1 -1
  120. package/dist/components/data-display/GanttChart/GanttTaskBar.js +11 -9
  121. package/dist/components/data-display/GanttChart/GanttTaskContextMenu.js +1 -1
  122. package/dist/components/data-display/KPI/KPI.js +2 -2
  123. package/dist/components/data-display/KPI/KPI.types.d.ts +3 -3
  124. package/dist/components/data-display/Metric/Metric.js +2 -2
  125. package/dist/components/data-display/Metric/Metric.types.d.ts +3 -3
  126. package/dist/components/data-display/Table/TableColumnManager.js +2 -1
  127. package/dist/components/data-display/Table/TableFilter.js +2 -1
  128. package/dist/components/data-display/Timeline/TimelineMarker.js +2 -2
  129. package/dist/components/effects/3d/index.d.ts +1 -1
  130. package/dist/components/effects/AIOrb/AIOrb.d.ts +1 -0
  131. package/dist/components/effects/AIOrb/AIOrb.js +3 -2
  132. package/dist/components/effects/AIOrb/AIOrb.types.d.ts +1 -0
  133. package/dist/components/effects/AIOrb/hooks/index.d.ts +2 -0
  134. package/dist/components/effects/AIOrb/hooks/useOrbState.d.ts +20 -0
  135. package/dist/components/effects/AIOrb/hooks/useOrbState.js +27 -0
  136. package/dist/components/effects/AIOrb/index.d.ts +2 -2
  137. package/dist/components/effects/AIOrb/variants/Aura/Aura.d.ts +3 -0
  138. package/dist/components/effects/AIOrb/variants/Aura/Aura.js +75 -0
  139. package/dist/components/effects/AIOrb/variants/Aura/Aura.shaders.d.ts +28 -0
  140. package/dist/components/effects/AIOrb/variants/Aura/Aura.shaders.js +191 -0
  141. package/dist/components/effects/AIOrb/variants/Aura/Aura.types.d.ts +53 -0
  142. package/dist/components/effects/AIOrb/variants/Aura/ShaderCanvas.d.ts +17 -0
  143. package/dist/components/effects/AIOrb/variants/Aura/ShaderCanvas.js +149 -0
  144. package/dist/components/effects/AIOrb/variants/Aura/index.d.ts +2 -0
  145. package/dist/components/effects/AIOrb/variants/DotSphere/DotSphere.js +38 -7
  146. package/dist/components/effects/AIOrb/variants/DotSphere/DotSphere.types.d.ts +6 -0
  147. package/dist/components/effects/AIOrb/variants/Liquid/Liquid.js +34 -8
  148. package/dist/components/effects/AIOrb/variants/Liquid/Liquid.types.d.ts +6 -0
  149. package/dist/components/effects/AIOrb/variants/index.d.ts +2 -0
  150. package/dist/components/effects/CustomCursor/CustomCursor.d.ts +2 -2
  151. package/dist/components/effects/CustomCursor/CustomCursor.js +50 -47
  152. package/dist/components/effects/GlassSurface/GlassSurface.js +24 -12
  153. package/dist/components/effects/GlassSurface/GlassSurface.types.d.ts +8 -0
  154. package/dist/components/forms/Checkbox/Checkbox.js +1 -1
  155. package/dist/components/forms/Checkbox/Checkbox.types.d.ts +5 -5
  156. package/dist/components/forms/Checkbox/CheckboxGroup.js +2 -2
  157. package/dist/components/forms/ColorPicker/ColorPicker.d.ts +1 -1
  158. package/dist/components/forms/ColorPicker/ColorPicker.js +2 -2
  159. package/dist/components/forms/ColorPicker/ColorPicker.types.d.ts +2 -2
  160. package/dist/components/forms/ColorPicker/ColorPickerBody.d.ts +7 -0
  161. package/dist/components/forms/ColorPicker/{ColorPickerContent.js → ColorPickerBody.js} +5 -5
  162. package/dist/components/forms/ColorPicker/index.d.ts +2 -2
  163. package/dist/components/forms/DatePicker/DatePicker.d.ts +7 -3
  164. package/dist/components/forms/DatePicker/DatePicker.js +6 -5
  165. package/dist/components/forms/DatePicker/DatePicker.theme.js +3 -3
  166. package/dist/components/forms/DatePicker/DatePicker.types.d.ts +9 -4
  167. package/dist/components/forms/DatePicker/DatePickerBody.d.ts +7 -0
  168. package/dist/components/forms/DatePicker/{DatePickerContent.js → DatePickerBody.js} +10 -9
  169. package/dist/components/forms/DatePicker/index.d.ts +2 -2
  170. package/dist/components/forms/FileUpload/FileUpload.js +0 -78
  171. package/dist/components/forms/Input/Input.js +2 -2
  172. package/dist/components/forms/Input/Input.types.d.ts +4 -4
  173. package/dist/components/forms/Mention/Mention.js +2 -2
  174. package/dist/components/forms/Radio/Radio.js +1 -1
  175. package/dist/components/forms/Radio/Radio.types.d.ts +5 -5
  176. package/dist/components/forms/Radio/RadioGroup.js +1 -1
  177. package/dist/components/forms/Select/Select.js +2 -2
  178. package/dist/components/forms/Select/Select.types.d.ts +4 -4
  179. package/dist/components/forms/Switch/Switch.js +1 -1
  180. package/dist/components/forms/Switch/Switch.types.d.ts +4 -4
  181. package/dist/components/forms/Textarea/Textarea.js +2 -2
  182. package/dist/components/forms/Textarea/Textarea.types.d.ts +4 -4
  183. package/dist/components/forms/TimePicker/TimePickerContent.js +1 -78
  184. package/dist/components/forms/index.d.ts +2 -2
  185. package/dist/components/forms/index.js +2 -80
  186. package/dist/components/layout/FormLayout/FormLayout.d.ts +0 -2
  187. package/dist/components/layout/FormLayout/FormLayout.js +12 -6
  188. package/dist/components/layout/FormLayout/FormLayout.theme.js +2 -5
  189. package/dist/components/layout/FormLayout/FormLayout.types.d.ts +8 -26
  190. package/dist/components/layout/FormLayout/FormLayoutSection.js +3 -2
  191. package/dist/components/layout/FormLayout/index.d.ts +1 -1
  192. package/dist/index.js +197 -199
  193. package/dist/styles.css +1 -1
  194. package/dist/utils/index.d.ts +1 -0
  195. package/dist/utils/paletteGenerator.d.ts +46 -0
  196. package/package.json +1 -1
  197. package/src/styles/theme.css +2 -6
  198. package/dist/components/core/Accordion/AccordionContent.d.ts +0 -3
  199. package/dist/components/core/Card/CardContent.d.ts +0 -3
  200. package/dist/components/core/Card/CardContent.js +0 -11
  201. package/dist/components/core/Carousel/CarouselContent.d.ts +0 -4
  202. package/dist/components/core/ContextMenu/ContextMenuContent.d.ts +0 -6
  203. package/dist/components/core/ContextMenu/ContextMenuSubContent.d.ts +0 -6
  204. package/dist/components/core/Drawer/DrawerContent.d.ts +0 -5
  205. package/dist/components/core/Drawer/DrawerContent.js +0 -11
  206. package/dist/components/core/Loader/Loader.d.ts +0 -24
  207. package/dist/components/core/Loader/Loader.js +0 -57
  208. package/dist/components/core/Loader/Loader.theme.d.ts +0 -27
  209. package/dist/components/core/Loader/Loader.theme.js +0 -60
  210. package/dist/components/core/Loader/Loader.types.d.ts +0 -71
  211. package/dist/components/core/Loader/index.d.ts +0 -2
  212. package/dist/components/core/Message/MessageContent.d.ts +0 -8
  213. package/dist/components/core/Popover/PopoverContent.d.ts +0 -7
  214. package/dist/components/core/Tabs/TabsContent.d.ts +0 -6
  215. package/dist/components/forms/ColorPicker/ColorPickerContent.d.ts +0 -7
  216. package/dist/components/forms/DatePicker/DatePickerContent.d.ts +0 -7
  217. package/dist/components/layout/FormLayout/FormLayoutBody.d.ts +0 -3
  218. package/dist/components/layout/FormLayout/FormLayoutBody.js +0 -91
  219. package/dist/components/layout/FormLayout/FormLayoutHeader.d.ts +0 -3
  220. package/dist/components/layout/FormLayout/FormLayoutHeader.js +0 -12
@@ -27,10 +27,10 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
27
27
  * supports masked input types: 'creditCard', 'expiryDate', 'phone', 'ssn', 'currency'
28
28
  */
29
29
  type?: InputType;
30
- /** Optional label text for the input */
31
- label?: string;
32
- /** Optional helper text displayed below the input */
33
- helperText?: string;
30
+ /** Optional label for the input — pass a string for default styling, or a ReactNode for full control */
31
+ label?: React.ReactNode;
32
+ /** Optional helper text below the input — pass a string for default styling, or a ReactNode for full control */
33
+ helperText?: React.ReactNode;
34
34
  /** Icon to display before the input (small decorative) */
35
35
  iconStart?: React.ReactNode;
36
36
  /** Icon to display after the input (small decorative) */
@@ -551,7 +551,7 @@ const Mention = React__default.forwardRef(({ triggers: triggersProp, suggestions
551
551
  return (jsx("span", { "data-segment": "text", children: seg.text || (i === 0 ? "" : "") }, `text-${i}`));
552
552
  }
553
553
  return (jsx(Tag, { size: mentionTagSize, removable: false, avatar: seg.data.avatar
554
- ? { src: seg.data.avatar, alt: seg.data.label }
554
+ ? { src: seg.data.avatar, name: seg.data.label }
555
555
  : undefined, contentEditable: false, className: cn(theme.mentionTagStyle, i === selectedMentionIndex &&
556
556
  "ring-2 ring-[var(--color-primary)] ring-offset-1", mentionTagClassName), [MENTION_ATTR]: seg.data.id,
557
557
  "data-mention-label": seg.data.label,
@@ -579,7 +579,7 @@ const Mention = React__default.forwardRef(({ triggers: triggersProp, suggestions
579
579
  return (jsxs("div", { role: "option", "aria-selected": isHighlighted, "data-suggestion-index": index, className: cn(theme.suggestionStyle, isHighlighted && theme.suggestionHighlightedStyle), onMouseEnter: () => setHighlightedIndex(index), onMouseDown: (e) => {
580
580
  e.preventDefault();
581
581
  insertMention(suggestion);
582
- }, children: [jsx(Avatar, { src: suggestion.avatar, alt: suggestion.label, size: "xs", className: "ring-0 border-0" }), jsxs("div", { className: "flex flex-col min-w-0", children: [jsx("span", { className: theme.suggestionLabelStyle, children: suggestion.label }), suggestion.description && (jsx("span", { className: theme.suggestionDescriptionStyle, children: suggestion.description }))] })] }, suggestion.id));
582
+ }, children: [jsx(Avatar, { src: suggestion.avatar, name: suggestion.label, size: "xs", className: "ring-0 border-0" }), jsxs("div", { className: "flex flex-col min-w-0", children: [jsx("span", { className: theme.suggestionLabelStyle, children: suggestion.label }), suggestion.description && (jsx("span", { className: theme.suggestionDescriptionStyle, children: suggestion.description }))] })] }, suggestion.id));
583
583
  };
584
584
  // -----------------------------------------------------------------------
585
585
  // Dropdown portal content
@@ -34,7 +34,7 @@ const RadioComponent = React__default.forwardRef(({ id: idProp, name: nameProp,
34
34
  const inputProps = isControlled
35
35
  ? { checked }
36
36
  : { defaultChecked };
37
- return (jsxs("div", { className: cn(radioTheme.baseStyle, className), ...restProps, children: [jsxs("div", { className: cn(radioTheme.inputContainerStyle, radioTheme.sizes[size]), children: [jsx("input", { ref: ref, type: "radio", id: id, name: name, value: value, ...inputProps, onChange: handleChange, disabled: isDisabled, "aria-describedby": description ? `${id}-description` : undefined, "data-state": isDisabled ? "disabled" : "default", className: cn("peer", radioTheme.inputStyle, radioTheme.sizes[size]) }), jsx("div", { className: cn(radioTheme.dotStyle, size === "sm" ? "size-2.5 top-0.25" : "size-3") })] }), (label || description) && (jsxs("label", { htmlFor: id, className: cn("cursor-pointer", isDisabled && "cursor-not-allowed"), children: [label && (jsx("span", { className: cn(formLabelTheme.baseStyle, formLabelTheme.stateStyles[state], "mb-0"), children: label })), description && (jsx("div", { id: `${id}-description`, className: radioTheme.descriptionStyle, children: description }))] }))] }));
37
+ return (jsxs("div", { className: cn(radioTheme.baseStyle, className), ...restProps, children: [jsxs("div", { className: cn(radioTheme.inputContainerStyle, radioTheme.sizes[size]), children: [jsx("input", { ref: ref, type: "radio", id: id, name: name, value: value, ...inputProps, onChange: handleChange, disabled: isDisabled, "aria-describedby": description ? `${id}-description` : undefined, "data-state": isDisabled ? "disabled" : "default", className: cn("peer", radioTheme.inputStyle, radioTheme.sizes[size]) }), jsx("div", { className: cn(radioTheme.dotStyle, size === "sm" ? "size-2.5 top-0.25" : "size-3") })] }), (label || description) && (jsxs("label", { htmlFor: id, className: cn("cursor-pointer", isDisabled && "cursor-not-allowed"), children: [label && (typeof label === 'string' ? (jsx("span", { className: cn(formLabelTheme.baseStyle, formLabelTheme.stateStyles[state], "mb-0"), children: label })) : label), description && (typeof description === 'string' ? (jsx("div", { id: `${id}-description`, className: radioTheme.descriptionStyle, children: description })) : description)] }))] }));
38
38
  });
39
39
  RadioComponent.displayName = "Radio";
40
40
  const Radio = Object.assign(RadioComponent, { Group: RadioGroup });
@@ -20,8 +20,8 @@ export interface RadioProps extends Omit<React.HTMLAttributes<HTMLInputElement>,
20
20
  value: string | number;
21
21
  checked?: boolean;
22
22
  onChange?: (checked: boolean, value: string | number) => void;
23
- label?: string;
24
- description?: string;
23
+ label?: React.ReactNode;
24
+ description?: React.ReactNode;
25
25
  state?: RadioState;
26
26
  size?: RadioSize;
27
27
  className?: string;
@@ -37,9 +37,9 @@ export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLFieldSetE
37
37
  size?: RadioSize;
38
38
  state?: RadioState;
39
39
  orientation?: RadioGroupOrientation;
40
- label?: string;
41
- description?: string;
42
- error?: string;
40
+ label?: React.ReactNode;
41
+ description?: React.ReactNode;
42
+ error?: React.ReactNode;
43
43
  required?: boolean;
44
44
  className?: string;
45
45
  }
@@ -29,7 +29,7 @@ const RadioGroup = React__default.forwardRef(({ value: controlledValue, defaultV
29
29
  state,
30
30
  }), [groupName, currentValue, size, state]);
31
31
  const labelState = error ? "invalid" : state === "disabled" ? "disabled" : "default";
32
- return (jsx(RadioGroupContext.Provider, { value: contextValue, children: jsxs("fieldset", { ref: ref, role: "radiogroup", "aria-labelledby": label ? labelId : undefined, "aria-describedby": description ? descriptionId : undefined, "aria-required": required || undefined, "aria-invalid": error ? true : undefined, "aria-errormessage": error ? errorId : undefined, className: cn("border-0 p-0 m-0", radioTheme.groupStyle, className), ...props, children: [label && (jsxs("legend", { id: labelId, className: cn(formLabelTheme.baseStyle, formLabelTheme.stateStyles[labelState]), children: [label, required && (jsx("span", { className: formLabelTheme.requiredIndicatorStyle, children: "*" }))] })), description && (jsx("p", { id: descriptionId, className: radioTheme.groupDescriptionStyle, children: description })), jsx("div", { className: cn(radioTheme.groupItemsStyle, orientation === "horizontal" && radioTheme.groupHorizontalStyle), children: children }), error && (jsx("p", { id: errorId, role: "alert", className: radioTheme.groupErrorStyle, children: error }))] }) }));
32
+ return (jsx(RadioGroupContext.Provider, { value: contextValue, children: jsxs("fieldset", { ref: ref, role: "radiogroup", "aria-labelledby": label ? labelId : undefined, "aria-describedby": description ? descriptionId : undefined, "aria-required": required || undefined, "aria-invalid": error ? true : undefined, "aria-errormessage": error ? errorId : undefined, className: cn("border-0 p-0 m-0", radioTheme.groupStyle, className), ...props, children: [label && (typeof label === 'string' ? (jsxs("legend", { id: labelId, className: cn(formLabelTheme.baseStyle, formLabelTheme.stateStyles[labelState]), children: [label, required && (jsx("span", { className: formLabelTheme.requiredIndicatorStyle, children: "*" }))] })) : label), description && (typeof description === 'string' ? (jsx("p", { id: descriptionId, className: radioTheme.groupDescriptionStyle, children: description })) : description), jsx("div", { className: cn(radioTheme.groupItemsStyle, orientation === "horizontal" && radioTheme.groupHorizontalStyle), children: children }), error && (typeof error === 'string' ? (jsx("p", { id: errorId, role: "alert", className: radioTheme.groupErrorStyle, children: error })) : error)] }) }));
33
33
  });
34
34
  RadioGroup.displayName = "Radio.Group";
35
35
 
@@ -439,7 +439,7 @@ const SelectInner = ({ id, name, size = "md", state = "default", value, displayV
439
439
  // Generate a unique ID if not provided
440
440
  const generatedId = React__default.useId();
441
441
  const selectId = id || generatedId;
442
- return (jsx(SelectProvider, { selectState: selectState, size: size, componentState: state, theme: themeOverrides, searchable: searchable, enableTypeahead: enableTypeahead, children: jsxs("div", { ref: ref, className: cn("relative", containerStyle, wrapperClassName), children: [label && (jsx(FormLabel, { htmlFor: selectId, required: required, children: label })), jsx(SelectButton, { id: selectId, disabled: disabled, isOpen: isOpen, state: state, size: size, iconStart: iconStart, iconEnd: iconEnd || defaultChevronIcon, onClick: handleButtonClick, onFocus: onFocus, onBlur: onBlur, className: className, children: jsx("span", { className: cn(multiple && selectedValues.length > 0
442
+ return (jsx(SelectProvider, { selectState: selectState, size: size, componentState: state, theme: themeOverrides, searchable: searchable, enableTypeahead: enableTypeahead, children: jsxs("div", { ref: ref, className: cn("relative", containerStyle, wrapperClassName), children: [label && (typeof label === 'string' ? (jsx(FormLabel, { htmlFor: selectId, required: required, children: label })) : (label)), jsx(SelectButton, { id: selectId, disabled: disabled, isOpen: isOpen, state: state, size: size, iconStart: iconStart, iconEnd: iconEnd || defaultChevronIcon, onClick: handleButtonClick, onFocus: onFocus, onBlur: onBlur, className: className, children: jsx("span", { className: cn(multiple && selectedValues.length > 0
443
443
  ? "flex min-w-0"
444
444
  : "block truncate", (multiple ? selectedValues.length > 0 : selectedOption)
445
445
  ? theme.valueTextStyle
@@ -450,7 +450,7 @@ const SelectInner = ({ id, name, size = "md", state = "default", value, displayV
450
450
  ? isValueSelected(option.value)
451
451
  : option.value === selectedValue;
452
452
  return (jsx(SelectOption, { value: option.value, isSelected: isSelected, disabled: option.disabled || false, children: isCreateOption ? (jsxs("span", { className: "flex items-center gap-2", children: [jsx(PlusIcon, { className: "size-4 shrink-0" }), jsx("span", { className: "block truncate", children: option.label })] })) : multiple ? (jsxs(Fragment, { children: [jsx("span", { className: "block truncate", children: option.label }), isSelected && (jsx("span", { className: theme.checkIconStyle, children: jsx(CheckIcon, { className: "size-4", strokeWidth: 2 }) }))] })) : (jsx("span", { className: "block truncate", children: option.label })) }, option.id));
453
- }) }), helperText && (jsx("p", { className: cn(helperTextStyle, helperTextStateStyle), children: helperText })), name && (jsx("input", { type: "hidden", name: name, value: selectedValue !== undefined ? String(selectedValue) : "" }))] }) }));
453
+ }) }), helperText && (typeof helperText === 'string' ? (jsx("p", { className: cn(helperTextStyle, helperTextStateStyle), children: helperText })) : (helperText)), name && (jsx("input", { type: "hidden", name: name, value: selectedValue !== undefined ? String(selectedValue) : "" }))] }) }));
454
454
  };
455
455
  const Select = React__default.forwardRef(SelectInner);
456
456
  Select.displayName = "Select";
@@ -46,10 +46,10 @@ export interface SelectProps<T = any> extends SelectBaseProps {
46
46
  required?: boolean;
47
47
  /** Array of options to display */
48
48
  options: SelectOption<T>[];
49
- /** Label text for the select */
50
- label?: string;
51
- /** Helper text displayed below the select */
52
- helperText?: string;
49
+ /** Label for the select — pass a string for default styling, or a ReactNode for full control */
50
+ label?: React.ReactNode;
51
+ /** Helper text below the select — pass a string for default styling, or a ReactNode for full control */
52
+ helperText?: React.ReactNode;
53
53
  /** Enable multi-select mode — value becomes T[] and chips are rendered in trigger */
54
54
  multiple?: boolean;
55
55
  /** Maximum number of chips to display before showing "+N more" (default: 3) */
@@ -34,7 +34,7 @@ const Switch = React__default.forwardRef(({ id, checked: controlledChecked, onCh
34
34
  }
35
35
  };
36
36
  // Label and description content
37
- const labelContent = label || description ? (jsxs("div", { className: "flex grow flex-col", children: [label && (jsx(FormLabel, { htmlFor: id, state: state, children: label })), description && (jsx("div", { className: cn(switchTheme.description, theme === null || theme === void 0 ? void 0 : theme.description), children: description }))] })) : null;
37
+ const labelContent = label || description ? (jsxs("div", { className: "flex grow flex-col", children: [label && (typeof label === 'string' ? (jsx(FormLabel, { htmlFor: id, state: state, children: label })) : (label)), description && (typeof description === 'string' ? (jsx("div", { className: cn(switchTheme.description, theme === null || theme === void 0 ? void 0 : theme.description), children: description })) : (description))] })) : null;
38
38
  // Build data attributes for state-based styling
39
39
  const trackDataState = isDisabled
40
40
  ? "disabled"
@@ -16,10 +16,10 @@ export interface SwitchProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
16
16
  checked?: boolean;
17
17
  /** Function called when the switch state changes */
18
18
  onChange?: (checked: boolean) => void;
19
- /** Label text for the switch */
20
- label?: string;
21
- /** Optional description text */
22
- description?: string;
19
+ /** Label for the switch — pass a string for default styling, or a ReactNode for full control */
20
+ label?: React.ReactNode;
21
+ /** Optional description pass a string for default styling, or a ReactNode for full control */
22
+ description?: React.ReactNode;
23
23
  /** The state of the switch (default, disabled, invalid) */
24
24
  state?: SwitchState;
25
25
  /** Position of the label relative to the switch */
@@ -37,7 +37,7 @@ const Textarea = React__default.forwardRef(({ size = "md", state = "default", cl
37
37
  const sizeClasses = ((_a = theme.sizes) === null || _a === void 0 ? void 0 : _a[size]) || ((_b = textareaTheme.sizes) === null || _b === void 0 ? void 0 : _b[size]) || "";
38
38
  const stateClasses = ((_c = theme.states) === null || _c === void 0 ? void 0 : _c[state]) || ((_d = textareaTheme.states) === null || _d === void 0 ? void 0 : _d[state]) || "";
39
39
  const helperTextClasses = theme.helperText || textareaTheme.helperText || "";
40
- return (jsxs("div", { className: cn(wrapperClasses, stateClass, wrapperClassName), children: [label && (jsx("div", { className: "mb-1", children: jsx(FormLabel, { htmlFor: inputId, className: labelClassName, state: state, required: required, children: label }) })), jsx("div", { children: jsx("div", { className: cn(inputGroupClasses, stateClasses, inputGroupClassName), children: jsx("div", { className: "relative flex-1", children: jsx("textarea", { ref: ref, id: inputId, className: cn(baseClasses, sizeClasses, className), disabled: isDisabled, "aria-invalid": isInvalid, required: required, rows: rows, cols: cols, onFocus: (e) => {
40
+ return (jsxs("div", { className: cn(wrapperClasses, stateClass, wrapperClassName), children: [label && (typeof label === 'string' ? (jsx("div", { className: "mb-1", children: jsx(FormLabel, { htmlFor: inputId, className: labelClassName, state: state, required: required, children: label }) })) : (label)), jsx("div", { children: jsx("div", { className: cn(inputGroupClasses, stateClasses, inputGroupClassName), children: jsx("div", { className: "relative flex-1", children: jsx("textarea", { ref: ref, id: inputId, className: cn(baseClasses, sizeClasses, className), disabled: isDisabled, "aria-invalid": isInvalid, required: required, rows: rows, cols: cols, onFocus: (e) => {
41
41
  var _a;
42
42
  setIsFocused(true);
43
43
  (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);
@@ -45,7 +45,7 @@ const Textarea = React__default.forwardRef(({ size = "md", state = "default", cl
45
45
  var _a;
46
46
  setIsFocused(false);
47
47
  (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e);
48
- }, ...props }) }) }) }), helperText && (jsx("div", { className: cn(helperTextClasses, helperTextClassName), children: helperText }))] }));
48
+ }, ...props }) }) }) }), helperText && (typeof helperText === 'string' ? (jsx("div", { className: cn(helperTextClasses, helperTextClassName), children: helperText })) : (helperText))] }));
49
49
  });
50
50
  Textarea.displayName = "Textarea";
51
51
 
@@ -11,10 +11,10 @@ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextArea
11
11
  size?: TextareaSize;
12
12
  /** The state of the textarea (default, disabled, invalid) */
13
13
  state?: TextareaState;
14
- /** Optional label text for the textarea */
15
- label?: string;
16
- /** Optional helper text displayed below the textarea */
17
- helperText?: string;
14
+ /** Optional label for the textarea — pass a string for default styling, or a ReactNode for full control */
15
+ label?: React.ReactNode;
16
+ /** Optional helper text below the textarea — pass a string for default styling, or a ReactNode for full control */
17
+ helperText?: React.ReactNode;
18
18
  /** Additional class name for the textarea */
19
19
  className?: string;
20
20
  /** Additional class name for the label */
@@ -6,85 +6,8 @@ import { cn } from '../../../utils/cn.js';
6
6
  import { TimePickerContext } from './TimePicker.js';
7
7
  import { useSelectPortal } from '../../../hooks/useSelectPortal.js';
8
8
  import { createDropdownAnimations } from '../Select/Select.animations.js';
9
- import '../../core/Accordion/Accordion.js';
10
- import '../../core/AlertDialog/AlertDialog.js';
11
- import '../../core/AspectRatio/AspectRatio.js';
12
- import '../../core/Avatar/Avatar.js';
13
- import '../../core/AvatarGroup/AvatarGroup.js';
14
- import '../../core/Badge/Badge.js';
15
- import '../../core/Breadcrumbs/Breadcrumbs.js';
16
- import '../../core/Breadcrumbs/Breadcrumbs.theme.js';
17
- import { Button } from '../../core/Button/Button.js';
18
- import '../../core/ButtonGroup/ButtonGroup.js';
19
- import '../../core/ButtonGroup/ButtonGroupSeparator.js';
20
- import '../../core/ButtonGroup/ButtonGroupText.js';
21
- import '../../core/Calendar/Calendar.js';
22
- import '../../core/Calendar/CalendarMini/CalendarMini.js';
23
- import '../../core/Card/Card.js';
24
- import '../../core/CardStack/CardStack.js';
25
- import '../../core/Carousel/Carousel.js';
26
- import '../../core/CommandPalette/CommandPalette.js';
27
- import '../../core/Separator/Separator.js';
28
- import '../../core/Drawer/Drawer.js';
29
- import '../../core/Dropdown/Dropdown.js';
30
- import '../../core/Dropdown/DropdownTrigger.js';
31
- import '../../core/Dropdown/DropdownMenu.js';
32
- import '../../core/Dropdown/DropdownItem.js';
33
- import '../../core/Dropdown/DropdownSection.js';
34
- import '../../core/Dropdown/DropdownSeparator.js';
35
- import '../../core/Dropdown/Dropdown.theme.js';
36
- import '../../core/Kbd/Kbd.js';
37
- import '../../core/MenuItem/MenuItem.js';
38
- import '../../core/Link/Link.js';
39
- import '../../core/Loader/Loader.js';
40
- import '../../core/Modal/Modal.js';
41
- import '../../core/ModalStack/ModalStack.js';
42
- import '../../core/PageHeading/PageHeading.js';
43
- import '../../core/Pagination/Pagination.js';
44
- import '../../core/Popover/Popover.js';
45
- import '../../core/Popover/PopoverContext.js';
46
- import '../../core/Progress/Progress.js';
47
- import '../../core/Rating/Rating.js';
48
- import '../../core/ScrollArea/ScrollArea.js';
49
- import '../../core/ScrollArea/smooth/SmoothScrollEngine.js';
50
- import '../../core/Segmented/Segmented.js';
51
- import '../../core/Skeleton/Skeleton.js';
52
- import '../../core/SlidingNumber/SlidingNumber.js';
53
- import '../../core/Tabs/Tabs.js';
54
- import '../../core/Tabs/TabsList.js';
55
- import '../../core/Tabs/TabsTrigger.js';
56
- import '../../core/Tabs/TabsContent.js';
57
- import '../../core/Tabs/TabsContext.js';
58
- import '../../core/Tooltip/Tooltip.js';
59
- import '../../core/Tooltip/Tooltip.animations.js';
60
- import '../../core/Tree/Tree.js';
61
- import '../../core/Tag/Tag.js';
62
- import '../../core/Alert/Alert.js';
63
- import '../../core/Toast/Toast.js';
64
- import '../../core/Toast/ToastProvider.js';
65
- import '@heroicons/react/24/solid';
66
- import '../../core/Spinner/Spinner.js';
67
- import '../../core/Message/Message.js';
68
- import '../../core/Message/TypeWriter.js';
69
- import '../../core/Empty/Empty.js';
70
- import '../../core/Masonry/Masonry.js';
71
- import '../../core/DragDrop/DragDrop.js';
72
- import '../../core/Sortable/Sortable.js';
73
- import '../../core/NavItem/NavItem.js';
74
- import '../../core/Sidebar/Sidebar.js';
75
- import '../../core/Sidebar/SidebarHeader.js';
76
- import '../../core/Sidebar/SidebarContent.js';
77
- import '../../core/Sidebar/SidebarFooter.js';
78
- import '../../core/Sidebar/SidebarNav.js';
79
- import '../../core/Sidebar/SidebarNavGroup.js';
80
- import '../../core/Sidebar/SidebarToggle.js';
81
- import '../../core/Sidebar/SidebarContext.js';
82
- import '../../core/OfflineIndicator/OfflineIndicator.js';
83
- import '../../core/ContextMenu/ContextMenu.js';
84
- import '../../core/ContextMenu/ContextMenu.theme.js';
85
- import '../../core/Pill/Pill.js';
86
- import '../../core/SocialIcon/SocialIcon.js';
87
9
  import { useIsClient } from '../../../hooks/useIsClient.js';
10
+ import { Button } from '../../core/Button/Button.js';
88
11
 
89
12
  /**
90
13
  * Hook to detect dark mode state from document
@@ -19,8 +19,8 @@ export { checkboxTheme } from "./Checkbox";
19
19
  export { Switch } from "./Switch";
20
20
  export type { SwitchProps, SwitchThemeOverrides } from "./Switch";
21
21
  export { switchTheme } from "./Switch";
22
- export { DatePicker, DatePickerTrigger, DatePickerContent, DatePickerPresets, } from "./DatePicker";
23
- export type { DatePickerProps, DatePickerTriggerProps, DatePickerContentProps, DatePickerSize, DatePickerState, DatePickerPlacement, DatePickerMode, DatePickerTheme, DateRange, DateRangePreset, } from "./DatePicker";
22
+ export { DatePicker, DatePickerTrigger, DatePickerBody, DatePickerPresets, } from "./DatePicker";
23
+ export type { DatePickerProps, DatePickerTriggerProps, DatePickerBodyProps, DatePickerSize, DatePickerState, DatePickerPlacement, DatePickerMode, DatePickerTheme, DateRange, DateRangePreset, } from "./DatePicker";
24
24
  export { datePickerTheme } from "./DatePicker";
25
25
  export { FileUpload } from "./FileUpload";
26
26
  export type { FileUploadProps, FileUploadThemeOverrides, UploadedFile, } from "./FileUpload";
@@ -24,84 +24,6 @@ import 'clsx';
24
24
  import 'tailwind-merge';
25
25
  import 'motion/react';
26
26
  import 'react-dom';
27
- import '../core/Accordion/Accordion.js';
28
- import '../core/AlertDialog/AlertDialog.js';
29
- import '../core/AspectRatio/AspectRatio.js';
30
- import '../core/Avatar/Avatar.js';
31
- import '../core/AvatarGroup/AvatarGroup.js';
32
- import '../core/Badge/Badge.js';
33
- import '../core/Breadcrumbs/Breadcrumbs.js';
34
- import '../core/Breadcrumbs/Breadcrumbs.theme.js';
35
- import '../core/Button/Button.js';
36
- import '../core/ButtonGroup/ButtonGroup.js';
37
- import '../core/ButtonGroup/ButtonGroupSeparator.js';
38
- import '../core/ButtonGroup/ButtonGroupText.js';
39
- import '../core/Calendar/Calendar.js';
40
- import '../core/Calendar/CalendarMini/CalendarMini.js';
41
- import '../core/Card/Card.js';
42
- import '../core/CardStack/CardStack.js';
43
- import '../core/Carousel/Carousel.js';
44
- import '../core/CommandPalette/CommandPalette.js';
45
- import '../core/Separator/Separator.js';
46
- import '../core/Drawer/Drawer.js';
47
- import '../core/Dropdown/Dropdown.js';
48
- import '../core/Dropdown/DropdownTrigger.js';
49
- import '../core/Dropdown/DropdownMenu.js';
50
- import '../core/Dropdown/DropdownItem.js';
51
- import '../core/Dropdown/DropdownSection.js';
52
- import '../core/Dropdown/DropdownSeparator.js';
53
- import '../core/Dropdown/Dropdown.theme.js';
54
- import '../core/Kbd/Kbd.js';
55
- import '../core/MenuItem/MenuItem.js';
56
- import '../core/Link/Link.js';
57
- import '../core/Loader/Loader.js';
58
- import '../core/Modal/Modal.js';
59
- import '../core/ModalStack/ModalStack.js';
60
- import '../core/PageHeading/PageHeading.js';
61
- import '../core/Pagination/Pagination.js';
62
- import '../core/Popover/Popover.js';
63
- import '../core/Popover/PopoverContext.js';
64
- import '../core/Progress/Progress.js';
65
- import '../core/Rating/Rating.js';
66
- import '../core/ScrollArea/ScrollArea.js';
67
- import '../core/ScrollArea/smooth/SmoothScrollEngine.js';
68
- import '../core/Segmented/Segmented.js';
69
- import '../core/Skeleton/Skeleton.js';
70
- import '../core/SlidingNumber/SlidingNumber.js';
71
- import '../core/Tabs/Tabs.js';
72
- import '../core/Tabs/TabsList.js';
73
- import '../core/Tabs/TabsTrigger.js';
74
- import '../core/Tabs/TabsContent.js';
75
- import '../core/Tabs/TabsContext.js';
76
- import '../core/Tooltip/Tooltip.js';
77
- import '../core/Tooltip/Tooltip.animations.js';
78
- import '../core/Tree/Tree.js';
79
- import '../core/Tag/Tag.js';
80
- import '../core/Alert/Alert.js';
81
- import '../core/Toast/Toast.js';
82
- import '../core/Toast/ToastProvider.js';
83
- import '@heroicons/react/24/solid';
84
- import '../core/Spinner/Spinner.js';
85
- import '../core/Message/Message.js';
86
- import '../core/Message/TypeWriter.js';
87
- import '../core/Empty/Empty.js';
88
- import '../core/Masonry/Masonry.js';
89
- import '../core/DragDrop/DragDrop.js';
90
- import '../core/Sortable/Sortable.js';
91
- import '../core/NavItem/NavItem.js';
92
- import '../core/Sidebar/Sidebar.js';
93
- import '../core/Sidebar/SidebarHeader.js';
94
- import '../core/Sidebar/SidebarContent.js';
95
- import '../core/Sidebar/SidebarFooter.js';
96
- import '../core/Sidebar/SidebarNav.js';
97
- import '../core/Sidebar/SidebarNavGroup.js';
98
- import '../core/Sidebar/SidebarToggle.js';
99
- import '../core/Sidebar/SidebarContext.js';
100
- import '../core/OfflineIndicator/OfflineIndicator.js';
101
- import '../core/ContextMenu/ContextMenu.js';
102
- import '../core/ContextMenu/ContextMenu.theme.js';
103
- import '../core/Pill/Pill.js';
104
- import '../core/SocialIcon/SocialIcon.js';
105
27
  import './TimePicker/WheelColumn.js';
106
28
  export { timePickerTheme } from './TimePicker/TimePicker.theme.js';
107
29
  export { Slider } from './Slider/Slider.js';
@@ -127,7 +49,7 @@ export { Combobox } from './Combobox/Combobox.js';
127
49
  export { comboboxTheme } from './Combobox/Combobox.theme.js';
128
50
  export { ColorPicker, ColorPickerContext, useColorPicker } from './ColorPicker/ColorPicker.js';
129
51
  export { ColorPickerTrigger } from './ColorPicker/ColorPickerTrigger.js';
130
- export { ColorPickerContent } from './ColorPicker/ColorPickerContent.js';
52
+ export { ColorPickerBody } from './ColorPicker/ColorPickerBody.js';
131
53
  export { ColorPicker2DCanvas } from './ColorPicker/ColorPicker2DCanvas.js';
132
54
  export { ColorPickerSwatch } from './ColorPicker/ColorPickerSwatch.js';
133
55
  export { ColorPickerSliders } from './ColorPicker/ColorPickerSliders.js';
@@ -145,6 +67,6 @@ export { mentionTheme } from './Mention/Mention.theme.js';
145
67
  export { CronInput } from './CronInput/CronInput.js';
146
68
  export { cronInputTheme } from './CronInput/CronInput.theme.js';
147
69
  export { CRON_PRESETS, cronToDescription, fieldsToCron, formatNextRun, getNextRuns, parseCron, validateCron } from './CronInput/CronInput.utils.js';
148
- export { DatePickerContent } from './DatePicker/DatePickerContent.js';
70
+ export { DatePickerBody } from './DatePicker/DatePickerBody.js';
149
71
  export { DatePickerPresets } from './DatePicker/DatePickerPresets.js';
150
72
  export { DatePickerTrigger } from './DatePicker/DatePickerTrigger.js';
@@ -1,8 +1,6 @@
1
1
  import React from "react";
2
2
  import type { FormLayoutProps } from "./FormLayout.types";
3
3
  export declare const FormLayout: React.ForwardRefExoticComponent<FormLayoutProps & React.RefAttributes<HTMLDivElement>> & {
4
- Header: React.ForwardRefExoticComponent<import("./FormLayout.types").FormLayoutHeaderProps & React.RefAttributes<HTMLDivElement>>;
5
- Body: React.ForwardRefExoticComponent<import("./FormLayout.types").FormLayoutBodyProps & React.RefAttributes<HTMLDivElement>>;
6
4
  Section: React.ForwardRefExoticComponent<import("./FormLayout.types").FormLayoutSectionProps & React.RefAttributes<HTMLElement>>;
7
5
  Footer: React.ForwardRefExoticComponent<import("./FormLayout.types").FormLayoutFooterProps & React.RefAttributes<HTMLDivElement>>;
8
6
  };
@@ -1,20 +1,26 @@
1
- import { jsx } from 'react/jsx-runtime';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import React__default from 'react';
3
3
  import { cn } from '../../../utils/cn.js';
4
4
  import { formLayoutTheme } from './FormLayout.theme.js';
5
- import { FormLayoutHeader } from './FormLayoutHeader.js';
6
- import { FormLayoutBody } from './FormLayoutBody.js';
7
5
  import { FormLayoutSection } from './FormLayoutSection.js';
8
6
  import { FormLayoutFooter } from './FormLayoutFooter.js';
7
+ import { Separator } from '../../core/Separator/Separator.js';
9
8
 
9
+ const isFooter = (child) => React__default.isValidElement(child) && child.type === FormLayoutFooter;
10
10
  const FormLayoutRoot = React__default.forwardRef(({ className, theme: customTheme, children, ...props }, ref) => {
11
11
  const theme = { ...formLayoutTheme, ...customTheme };
12
- return (jsx("div", { ref: ref, className: cn(theme.root, className), ...props, children: children }));
12
+ // Inject <Separator /> between any adjacent children, unless one of them is Footer
13
+ // (Footer already has border-t, so no separator needed before it)
14
+ const childArray = React__default.Children.toArray(children).filter(Boolean);
15
+ const rendered = childArray.map((child, index) => {
16
+ const prev = childArray[index - 1];
17
+ const needsSeparator = index > 0 && !isFooter(child) && !isFooter(prev);
18
+ return (jsxs(React__default.Fragment, { children: [needsSeparator && jsx(Separator, {}), child] }, index));
19
+ });
20
+ return (jsx("div", { ref: ref, className: cn(theme.root, className), ...props, children: rendered }));
13
21
  });
14
22
  FormLayoutRoot.displayName = "FormLayout";
15
23
  const FormLayout = Object.assign(FormLayoutRoot, {
16
- Header: FormLayoutHeader,
17
- Body: FormLayoutBody,
18
24
  Section: FormLayoutSection,
19
25
  Footer: FormLayoutFooter,
20
26
  });
@@ -1,15 +1,12 @@
1
1
  const formLayoutTheme = {
2
2
  root: "flex flex-col gap-6",
3
- header: "border-b border-[var(--color-border)] pb-6",
4
- headerTitle: "text-lg font-semibold text-[var(--color-text-primary)]",
5
- headerSubtitle: "text-lg text-[var(--color-text-muted)]",
6
- body: "flex flex-col gap-6",
7
3
  section: "grid grid-cols-1 md:grid-cols-6 gap-6 md:gap-10",
8
4
  sectionSidebar: "col-span-full md:col-span-2",
9
5
  sectionTitle: "text-lg font-semibold text-[var(--color-text-primary)]",
10
- sectionDescription: "text-base text-[var(--color-text-muted)] mt-1",
6
+ sectionSubtitle: "text-base text-[var(--color-text-muted)] mt-1",
11
7
  sectionAction: "mt-4",
12
8
  sectionContent: "col-span-full md:col-span-4 grid grid-cols-1 sm:grid-cols-2 gap-4",
9
+ sectionContentFull: "col-span-full grid grid-cols-1 sm:grid-cols-2 gap-4",
13
10
  footer: "flex flex-col-reverse sm:flex-row sm:justify-between items-center gap-3 border-t border-[var(--color-border)] pt-3",
14
11
  };
15
12
 
@@ -1,54 +1,36 @@
1
1
  import React from "react";
2
2
  export interface FormLayoutTheme {
3
3
  root: string;
4
- header: string;
5
- headerTitle: string;
6
- headerSubtitle: string;
7
- body: string;
8
4
  section: string;
9
5
  sectionSidebar: string;
10
6
  sectionTitle: string;
11
- sectionDescription: string;
7
+ sectionSubtitle: string;
12
8
  sectionAction: string;
13
9
  sectionContent: string;
10
+ sectionContentFull: string;
14
11
  footer: string;
15
12
  }
16
13
  export interface FormLayoutThemeOverrides {
17
14
  root?: string;
18
- header?: string;
19
- headerTitle?: string;
20
- headerSubtitle?: string;
21
- body?: string;
22
15
  section?: string;
23
16
  sectionSidebar?: string;
24
17
  sectionTitle?: string;
25
- sectionDescription?: string;
18
+ sectionSubtitle?: string;
26
19
  sectionAction?: string;
27
20
  sectionContent?: string;
21
+ sectionContentFull?: string;
28
22
  footer?: string;
29
23
  }
30
24
  export interface FormLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
31
25
  /** Theme overrides for the root container. */
32
26
  theme?: FormLayoutThemeOverrides;
33
27
  }
34
- export interface FormLayoutHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
35
- /** Header title text. */
36
- title: string;
28
+ export interface FormLayoutSectionProps extends React.HTMLAttributes<HTMLElement> {
29
+ /** Optional section title. If omitted along with subtitle and action, the sidebar column is hidden. */
30
+ title?: string;
37
31
  /** Optional subtitle displayed below the title. */
38
32
  subtitle?: string;
39
- /** Optional action element rendered on the right side of the header. */
40
- action?: React.ReactNode;
41
- /** Theme overrides for the header. */
42
- theme?: FormLayoutThemeOverrides;
43
- }
44
- export interface FormLayoutBodyProps extends React.HTMLAttributes<HTMLDivElement> {
45
- }
46
- export interface FormLayoutSectionProps extends React.HTMLAttributes<HTMLElement> {
47
- /** Section title text. */
48
- title: string;
49
- /** Optional description displayed below the title. */
50
- description?: string;
51
- /** Optional action element rendered below the description. */
33
+ /** Optional action element rendered below the subtitle. */
52
34
  action?: React.ReactNode;
53
35
  /** Additional className applied to the content area. */
54
36
  contentClassName?: string;
@@ -3,9 +3,10 @@ import React__default from 'react';
3
3
  import { cn } from '../../../utils/cn.js';
4
4
  import { formLayoutTheme } from './FormLayout.theme.js';
5
5
 
6
- const FormLayoutSection = React__default.forwardRef(({ title, description, action, className, contentClassName, theme: customTheme, children, ...props }, ref) => {
6
+ const FormLayoutSection = React__default.forwardRef(({ title, subtitle, action, className, contentClassName, theme: customTheme, children, ...props }, ref) => {
7
7
  const theme = { ...formLayoutTheme, ...customTheme };
8
- return (jsxs("section", { ref: ref, className: cn(theme.section, className), ...props, children: [jsxs("div", { className: theme.sectionSidebar, children: [jsx("div", { className: theme.sectionTitle, children: title }), description && (jsx("div", { className: theme.sectionDescription, children: description })), action && jsx("div", { className: theme.sectionAction, children: action })] }), jsx("div", { className: cn(theme.sectionContent, contentClassName), children: children })] }));
8
+ const hasSidebar = !!(title || subtitle || action);
9
+ return (jsxs("section", { ref: ref, className: cn(theme.section, className), ...props, children: [hasSidebar && (jsxs("div", { className: theme.sectionSidebar, children: [title && jsx("div", { className: theme.sectionTitle, children: title }), subtitle && (jsx("div", { className: theme.sectionSubtitle, children: subtitle })), action && jsx("div", { className: theme.sectionAction, children: action })] })), jsx("div", { className: cn(hasSidebar ? theme.sectionContent : theme.sectionContentFull, contentClassName), children: children })] }));
9
10
  });
10
11
  FormLayoutSection.displayName = "FormLayout.Section";
11
12
 
@@ -1,3 +1,3 @@
1
1
  export { FormLayout } from "./FormLayout";
2
- export type { FormLayoutProps, FormLayoutHeaderProps, FormLayoutBodyProps, FormLayoutSectionProps, FormLayoutFooterProps, FormLayoutTheme, FormLayoutThemeOverrides, } from "./FormLayout.types";
2
+ export type { FormLayoutProps, FormLayoutSectionProps, FormLayoutFooterProps, FormLayoutTheme, FormLayoutThemeOverrides, } from "./FormLayout.types";
3
3
  export { formLayoutTheme } from "./FormLayout.theme";