@react-fabric/core 1.0.0-beta.51 → 1.0.0-beta.53

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 (248) hide show
  1. package/css/components/_breadcrumbs.css +3 -3
  2. package/css/components/_menu.css +2 -0
  3. package/css/components/_modal.css +2 -2
  4. package/css/core/_aside.css +2 -2
  5. package/css/theme/_utilities.css +2 -2
  6. package/dist/cjs/components/actionLabel/ActionLabel.js +23 -5
  7. package/dist/cjs/components/animations/Animations.js +92 -9
  8. package/dist/cjs/components/avatar/Avatar.js +33 -3
  9. package/dist/cjs/components/avatar/AvatarGroup.js +19 -1
  10. package/dist/cjs/components/badge/Badge.js +31 -2
  11. package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +30 -1
  12. package/dist/cjs/components/button/Button.js +25 -2
  13. package/dist/cjs/components/button/ButtonGroup.js +26 -0
  14. package/dist/cjs/components/button/ConfirmButton.js +22 -1
  15. package/dist/cjs/components/button/ToggleButtonGroup.js +38 -12
  16. package/dist/cjs/components/callout/Callout.js +28 -0
  17. package/dist/cjs/components/card/Card.js +34 -0
  18. package/dist/cjs/components/card/CardCover.js +26 -0
  19. package/dist/cjs/components/card/FlipContent.js +21 -0
  20. package/dist/cjs/components/chip/Chip.js +22 -1
  21. package/dist/cjs/components/collapsable/Collapsable.js +26 -0
  22. package/dist/cjs/components/divider/Divider.js +19 -0
  23. package/dist/cjs/components/dropdown/Dropdown.js +42 -0
  24. package/dist/cjs/components/empty/EmptyContent.js +27 -0
  25. package/dist/cjs/components/icon/Icon.js +27 -1
  26. package/dist/cjs/components/media/Media.js +56 -0
  27. package/dist/cjs/components/menu/ContextMenu.js +19 -0
  28. package/dist/cjs/components/menu/Menu.js +30 -0
  29. package/dist/cjs/components/menu/MenuItem.js +22 -1
  30. package/dist/cjs/components/meter/Meter.js +24 -0
  31. package/dist/cjs/components/navigator/Navigator.js +22 -0
  32. package/dist/cjs/components/panel/Panel.js +37 -0
  33. package/dist/cjs/components/panel/PanelGroup.js +24 -0
  34. package/dist/cjs/components/panel/PanelStack.js +31 -0
  35. package/dist/cjs/components/progress/ProgressBar.js +21 -0
  36. package/dist/cjs/components/progress/ProgressCircle.js +20 -0
  37. package/dist/cjs/components/tabpanel/Tab.js +31 -0
  38. package/dist/cjs/components/tabpanel/TabPanel.js +33 -0
  39. package/dist/cjs/context/Global.js +25 -1
  40. package/dist/cjs/core/aside/Aside.js +39 -2
  41. package/dist/cjs/core/boundary/ErrorBoundary.js +17 -1
  42. package/dist/cjs/core/content/Content.js +6 -1
  43. package/dist/cjs/core/headfoot/HeadFoot.js +42 -0
  44. package/dist/cjs/core/page/Page.js +26 -1
  45. package/dist/cjs/core/responsive/Responsive.js +55 -2
  46. package/dist/cjs/core/section/Section.js +11 -27
  47. package/dist/cjs/core/theme/ThemeProvider.js +21 -1
  48. package/dist/cjs/core/viewport/Viewport.js +15 -1
  49. package/dist/cjs/hooks/useControlledValue.js +12 -0
  50. package/dist/cjs/hooks/useDebounce.js +13 -0
  51. package/dist/cjs/hooks/useEffectDebugger.js +52 -0
  52. package/dist/cjs/hooks/useIsDark.js +8 -0
  53. package/dist/cjs/hooks/useIsRtl.js +12 -0
  54. package/dist/cjs/hooks/useOverlayService.js +24 -0
  55. package/dist/cjs/hooks/usePropToggle.js +16 -5
  56. package/dist/cjs/hooks/useResize.js +18 -0
  57. package/dist/cjs/hooks/useResizeObserver.js +19 -0
  58. package/dist/cjs/hooks/useStorage.js +39 -0
  59. package/dist/cjs/types/icons.js +4 -0
  60. package/dist/cjs/typography/Abbr.js +28 -1
  61. package/dist/cjs/typography/Anchor.js +18 -1
  62. package/dist/cjs/typography/Mark.js +20 -1
  63. package/dist/cjs/typography/Text.js +27 -1
  64. package/dist/cjs/typography/Title.js +16 -1
  65. package/dist/esm/components/actionLabel/ActionLabel.js +23 -5
  66. package/dist/esm/components/animations/Animations.js +92 -9
  67. package/dist/esm/components/avatar/Avatar.js +33 -3
  68. package/dist/esm/components/avatar/AvatarGroup.js +19 -1
  69. package/dist/esm/components/badge/Badge.js +32 -3
  70. package/dist/esm/components/breadcrumbs/Breadcrumbs.js +30 -1
  71. package/dist/esm/components/button/Button.js +25 -2
  72. package/dist/esm/components/button/ButtonGroup.js +26 -0
  73. package/dist/esm/components/button/ConfirmButton.js +22 -1
  74. package/dist/esm/components/button/ToggleButtonGroup.js +39 -13
  75. package/dist/esm/components/callout/Callout.js +28 -0
  76. package/dist/esm/components/card/Card.js +34 -0
  77. package/dist/esm/components/card/CardCover.js +26 -0
  78. package/dist/esm/components/card/FlipContent.js +21 -0
  79. package/dist/esm/components/chip/Chip.js +22 -1
  80. package/dist/esm/components/collapsable/Collapsable.js +26 -0
  81. package/dist/esm/components/divider/Divider.js +19 -0
  82. package/dist/esm/components/dropdown/Dropdown.js +42 -0
  83. package/dist/esm/components/empty/EmptyContent.js +27 -0
  84. package/dist/esm/components/icon/Icon.js +27 -1
  85. package/dist/esm/components/media/Media.js +56 -0
  86. package/dist/esm/components/menu/ContextMenu.js +19 -0
  87. package/dist/esm/components/menu/Menu.js +30 -0
  88. package/dist/esm/components/menu/MenuItem.js +22 -1
  89. package/dist/esm/components/meter/Meter.js +24 -0
  90. package/dist/esm/components/navigator/Navigator.js +22 -0
  91. package/dist/esm/components/panel/Panel.js +37 -0
  92. package/dist/esm/components/panel/PanelGroup.js +24 -0
  93. package/dist/esm/components/panel/PanelStack.js +31 -0
  94. package/dist/esm/components/progress/ProgressBar.js +21 -0
  95. package/dist/esm/components/progress/ProgressCircle.js +20 -0
  96. package/dist/esm/components/tabpanel/Tab.js +31 -0
  97. package/dist/esm/components/tabpanel/TabPanel.js +33 -0
  98. package/dist/esm/context/Global.js +25 -1
  99. package/dist/esm/core/aside/Aside.js +39 -2
  100. package/dist/esm/core/boundary/ErrorBoundary.js +17 -1
  101. package/dist/esm/core/content/Content.js +6 -1
  102. package/dist/esm/core/headfoot/HeadFoot.js +42 -0
  103. package/dist/esm/core/page/Page.js +26 -1
  104. package/dist/esm/core/responsive/Responsive.js +55 -2
  105. package/dist/esm/core/section/Section.js +11 -27
  106. package/dist/esm/core/theme/ThemeProvider.js +21 -1
  107. package/dist/esm/core/viewport/Viewport.js +15 -1
  108. package/dist/esm/hooks/useControlledValue.js +12 -0
  109. package/dist/esm/hooks/useDebounce.js +13 -0
  110. package/dist/esm/hooks/useEffectDebugger.js +52 -0
  111. package/dist/esm/hooks/useIsDark.js +8 -0
  112. package/dist/esm/hooks/useIsRtl.js +12 -0
  113. package/dist/esm/hooks/useOverlayService.js +24 -0
  114. package/dist/esm/hooks/usePropToggle.js +16 -5
  115. package/dist/esm/hooks/useResize.js +18 -0
  116. package/dist/esm/hooks/useResizeObserver.js +19 -0
  117. package/dist/esm/hooks/useStorage.js +39 -0
  118. package/dist/esm/types/icons.js +4 -0
  119. package/dist/esm/typography/Abbr.js +28 -1
  120. package/dist/esm/typography/Anchor.js +18 -1
  121. package/dist/esm/typography/Mark.js +20 -1
  122. package/dist/esm/typography/Text.js +27 -1
  123. package/dist/esm/typography/Title.js +16 -1
  124. package/dist/types/components/actionLabel/ActionLabel.d.ts +21 -2
  125. package/dist/types/components/animations/Animations.d.ts +80 -1
  126. package/dist/types/components/avatar/Avatar.d.ts +26 -2
  127. package/dist/types/components/avatar/AvatarGroup.d.ts +19 -1
  128. package/dist/types/components/badge/Badge.d.ts +25 -0
  129. package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +29 -0
  130. package/dist/types/components/button/Button.d.ts +23 -2
  131. package/dist/types/components/button/ButtonGroup.d.ts +26 -1
  132. package/dist/types/components/button/ConfirmButton.d.ts +23 -3
  133. package/dist/types/components/button/ToggleButtonGroup.d.ts +39 -11
  134. package/dist/types/components/callout/Callout.d.ts +26 -1
  135. package/dist/types/components/card/Card.d.ts +34 -0
  136. package/dist/types/components/card/CardCover.d.ts +25 -0
  137. package/dist/types/components/card/FlipContent.d.ts +21 -0
  138. package/dist/types/components/chip/Chip.d.ts +21 -1
  139. package/dist/types/components/collapsable/Collapsable.d.ts +26 -0
  140. package/dist/types/components/divider/Divider.d.ts +19 -0
  141. package/dist/types/components/dropdown/Dropdown.d.ts +40 -1
  142. package/dist/types/components/dropdown/DropdownTool.d.ts +25 -0
  143. package/dist/types/components/empty/EmptyContent.d.ts +26 -1
  144. package/dist/types/components/icon/Icon.d.ts +27 -2
  145. package/dist/types/components/media/Media.d.ts +54 -0
  146. package/dist/types/components/menu/ContextMenu.d.ts +19 -1
  147. package/dist/types/components/menu/Menu.d.ts +29 -0
  148. package/dist/types/components/menu/MenuItem.d.ts +22 -2
  149. package/dist/types/components/meter/Meter.d.ts +24 -0
  150. package/dist/types/components/navigator/Navigator.d.ts +22 -0
  151. package/dist/types/components/panel/Panel.d.ts +37 -0
  152. package/dist/types/components/panel/PanelGroup.d.ts +24 -0
  153. package/dist/types/components/panel/PanelStack.d.ts +31 -0
  154. package/dist/types/components/progress/ProgressBar.d.ts +20 -0
  155. package/dist/types/components/progress/ProgressCircle.d.ts +19 -0
  156. package/dist/types/components/tabpanel/Tab.d.ts +32 -1
  157. package/dist/types/components/tabpanel/TabPanel.d.ts +33 -0
  158. package/dist/types/context/Global.d.ts +24 -1
  159. package/dist/types/core/aside/Aside.d.ts +38 -1
  160. package/dist/types/core/boundary/ErrorBoundary.d.ts +17 -1
  161. package/dist/types/core/content/Content.d.ts +6 -1
  162. package/dist/types/core/headfoot/HeadFoot.d.ts +40 -0
  163. package/dist/types/core/page/Page.d.ts +26 -1
  164. package/dist/types/core/responsive/Responsive.d.ts +52 -1
  165. package/dist/types/core/section/Section.d.ts +18 -3
  166. package/dist/types/core/theme/ThemeProvider.d.ts +21 -1
  167. package/dist/types/core/viewport/Viewport.d.ts +15 -1
  168. package/dist/types/hooks/useControlledValue.d.ts +13 -2
  169. package/dist/types/hooks/useDebounce.d.ts +12 -0
  170. package/dist/types/hooks/useEffectDebugger.d.ts +49 -0
  171. package/dist/types/hooks/useIsDark.d.ts +8 -0
  172. package/dist/types/hooks/useIsRtl.d.ts +12 -0
  173. package/dist/types/hooks/useNavigator.d.ts +18 -1
  174. package/dist/types/hooks/useOverlayService.d.ts +25 -4
  175. package/dist/types/hooks/usePropToggle.d.ts +16 -5
  176. package/dist/types/hooks/useResize.d.ts +18 -0
  177. package/dist/types/hooks/useResizeObserver.d.ts +19 -0
  178. package/dist/types/hooks/useStorage.d.ts +38 -0
  179. package/dist/types/types/icons.d.ts +4 -0
  180. package/dist/types/typography/Abbr.d.ts +28 -1
  181. package/dist/types/typography/Anchor.d.ts +19 -2
  182. package/dist/types/typography/Copy.d.ts +15 -0
  183. package/dist/types/typography/Mark.d.ts +20 -1
  184. package/dist/types/typography/Text.d.ts +27 -1
  185. package/dist/types/typography/Title.d.ts +16 -1
  186. package/package.json +3 -3
  187. package/src/components/actionLabel/ActionLabel.tsx +23 -5
  188. package/src/components/animations/Animations.tsx +93 -14
  189. package/src/components/avatar/Avatar.tsx +32 -3
  190. package/src/components/avatar/AvatarGroup.tsx +19 -1
  191. package/src/components/badge/Badge.tsx +33 -3
  192. package/src/components/breadcrumbs/Breadcrumbs.tsx +30 -1
  193. package/src/components/button/Button.tsx +24 -2
  194. package/src/components/button/ButtonGroup.tsx +26 -0
  195. package/src/components/button/ConfirmButton.tsx +22 -1
  196. package/src/components/button/ToggleButtonGroup.tsx +70 -43
  197. package/src/components/callout/Callout.tsx +27 -0
  198. package/src/components/card/Card.tsx +34 -0
  199. package/src/components/card/CardCover.tsx +25 -0
  200. package/src/components/card/FlipContent.tsx +21 -0
  201. package/src/components/chip/Chip.tsx +21 -1
  202. package/src/components/collapsable/Collapsable.tsx +26 -0
  203. package/src/components/divider/Divider.tsx +19 -0
  204. package/src/components/dropdown/Dropdown.tsx +40 -0
  205. package/src/components/dropdown/DropdownTool.tsx +25 -0
  206. package/src/components/empty/EmptyContent.tsx +26 -0
  207. package/src/components/icon/Icon.tsx +27 -1
  208. package/src/components/media/Media.tsx +54 -0
  209. package/src/components/menu/ContextMenu.tsx +19 -0
  210. package/src/components/menu/Menu.tsx +29 -0
  211. package/src/components/menu/MenuItem.tsx +22 -1
  212. package/src/components/meter/Meter.tsx +24 -0
  213. package/src/components/navigator/Navigator.tsx +22 -0
  214. package/src/components/panel/Panel.tsx +37 -0
  215. package/src/components/panel/PanelGroup.tsx +24 -0
  216. package/src/components/panel/PanelStack.tsx +31 -0
  217. package/src/components/progress/ProgressBar.tsx +20 -0
  218. package/src/components/progress/ProgressCircle.tsx +19 -0
  219. package/src/components/tabpanel/Tab.tsx +31 -0
  220. package/src/components/tabpanel/TabPanel.tsx +33 -0
  221. package/src/context/Global.tsx +24 -1
  222. package/src/core/aside/Aside.tsx +39 -2
  223. package/src/core/boundary/ErrorBoundary.tsx +17 -1
  224. package/src/core/content/Content.tsx +6 -1
  225. package/src/core/headfoot/HeadFoot.tsx +40 -0
  226. package/src/core/page/Page.tsx +26 -1
  227. package/src/core/responsive/Responsive.tsx +53 -2
  228. package/src/core/section/Section.tsx +25 -2
  229. package/src/core/theme/ThemeProvider.tsx +21 -1
  230. package/src/core/viewport/Viewport.tsx +15 -1
  231. package/src/hooks/useControlledValue.tsx +12 -0
  232. package/src/hooks/useDebounce.ts +12 -0
  233. package/src/hooks/useEffectDebugger.ts +49 -0
  234. package/src/hooks/useIsDark.ts +8 -0
  235. package/src/hooks/useIsRtl.ts +12 -0
  236. package/src/hooks/useNavigator.tsx +18 -0
  237. package/src/hooks/useOverlayService.tsx +24 -0
  238. package/src/hooks/usePropToggle.ts +16 -5
  239. package/src/hooks/useResize.ts +18 -0
  240. package/src/hooks/useResizeObserver.ts +19 -0
  241. package/src/hooks/useStorage.ts +38 -0
  242. package/src/types/icons.ts +5 -1
  243. package/src/typography/Abbr.tsx +28 -1
  244. package/src/typography/Anchor.tsx +18 -1
  245. package/src/typography/Copy.tsx +15 -0
  246. package/src/typography/Mark.tsx +20 -1
  247. package/src/typography/Text.tsx +27 -1
  248. package/src/typography/Title.tsx +16 -1
@@ -6,6 +6,30 @@ var react = require('react');
6
6
  var useEffectDebugger = require('../../hooks/useEffectDebugger.js');
7
7
  var jsxRuntime = require('react/jsx-runtime');
8
8
 
9
+ /**
10
+ * A component that groups multiple panels together, allowing for one panel to be expanded at a time.
11
+ * This component allows you to manage a group of panels where only one can be expanded at a time.
12
+ * It accepts an `activePanel` prop to control which panel is currently expanded,
13
+ * and an `onActiveChange` callback that is triggered when the active panel changes.
14
+ * It uses the `Panel` component to render each individual panel within the group.
15
+ *
16
+ * @param {PanelGroupProps} props - The properties for the PanelGroup component.
17
+ * @returns {JSX.Element} The rendered PanelGroup component.
18
+ *
19
+ * @example
20
+ * ```jsx
21
+ * <PanelGroup
22
+ * activePanel="panel1"
23
+ * onActiveChange={(panelId) => console.log(`Active panel changed to: ${panelId}`)}
24
+ * >
25
+ * <Panel panelId="panel1" title="Panel 1">Content for Panel 1</Panel>
26
+ * <Panel panelId="panel2" title="Panel 2">Content for Panel 2</Panel>
27
+ * <Panel panelId="panel3" title="Panel 3">Content for Panel 3</Panel>
28
+ * </PanelGroup>
29
+ * ```
30
+ *
31
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-panel--docs} for more details.
32
+ */
9
33
  var PanelGroup = function PanelGroup(_ref) {
10
34
  var children = _ref.children,
11
35
  activePanel = _ref.activePanel,
@@ -10,6 +10,37 @@ var jsxRuntime = require('react/jsx-runtime');
10
10
  var _excluded = ["active", "children", "className", "onPanelChange", "onBack"];
11
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
+ /**
14
+ * A component that manages a stack of panels, allowing navigation between them.
15
+ * This component allows you to manage a stack of panels where you can navigate between them.
16
+ * It accepts an `active` prop to control which panel is currently active,
17
+ * an `onPanelChange` callback that is triggered when the active panel changes,
18
+ * and an `onBack` callback to handle navigation to the previous panel in the history.
19
+ * It uses the `Panel` component to render each individual panel within the stack.
20
+ * The component maintains a history of panels to allow back navigation,
21
+ * and it updates the active panel based on user interactions.
22
+ *
23
+ * @param {PanelStackProps} props - The properties for the PanelStack component.
24
+ * @returns {JSX.Element} The rendered PanelStack component.
25
+ *
26
+ * @example
27
+ * ```jsx
28
+ * <PanelStack
29
+ * active="panel1"
30
+ * onPanelChange={(panelId) => console.log(`Active panel changed to: ${panelId}`)}
31
+ * onBack={(currentPanel, nextPanel) => {
32
+ * console.log(`Navigating back from ${currentPanel} to ${nextPanel}`);
33
+ * return true; // return false to prevent navigation
34
+ * }}
35
+ * >
36
+ * <Panel panelId="panel1" title="Panel 1">Content for Panel 1</Panel>
37
+ * <Panel panelId="panel2" title="Panel 2">Content for Panel 2</Panel>
38
+ * <Panel panelId="panel3" title="Panel 3">Content for Panel 3</Panel>
39
+ * </PanelStack>
40
+ * ```
41
+ *
42
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-panelstack--docs} for more details.
43
+ */
13
44
  var PanelStack = function PanelStack(_ref) {
14
45
  _ref.active;
15
46
  var children = _ref.children,
@@ -19,6 +19,27 @@ var SizeMap = {
19
19
  lg: "1.5rem",
20
20
  xl: "2rem"
21
21
  };
22
+
23
+ /**
24
+ * A component that displays a progress bar indicating the completion percentage of a task or operation.
25
+ * The progress bar is styled with a background color and a track that fills based on the value provided.
26
+ * It can also display a label showing the percentage value.
27
+ * The label can be customized or hidden based on the props provided.
28
+ *
29
+ * @param {ProgressProps} props - The properties for the ProgressBar component.
30
+ * @returns {JSX.Element} The rendered ProgressBar component.
31
+ *
32
+ * @example
33
+ * ```jsx
34
+ * <ProgressBar value={0.75} size="md" color="primary-500" label="Loading" animate />
35
+ * // Renders a progress bar with 75% completion, medium size, primary color, and a label "Loading"
36
+ *
37
+ * <ProgressBar value={0.5} size="lg" color="success-500" />
38
+ * // Renders a progress bar with 50% completion, large size, and success color without a label
39
+ * ```
40
+ *
41
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-progress--docs} for more details.
42
+ */
22
43
  var ProgressBar = function ProgressBar(_ref) {
23
44
  var _ref$value = _ref.value,
24
45
  value = _ref$value === void 0 ? 0 : _ref$value,
@@ -37,6 +37,26 @@ var SizeMap = {
37
37
  lg: "1.5rem",
38
38
  xl: "2rem"
39
39
  };
40
+
41
+ /**
42
+ * A circular progress indicator that visually represents a percentage of completion.
43
+ * It displays a circular track with a stroke that fills based on the `value` prop.
44
+ * The component is customizable with size and color props.
45
+ *
46
+ * @param {ProgressProps} props - The properties for the ProgressCircle component.
47
+ * @returns {JSX.Element} - A circular progress indicator.
48
+ *
49
+ * @example
50
+ * ```jsx
51
+ * <ProgressCircle value={0.75} size="md" color="primary-500" />
52
+ * // Renders a circular progress indicator with 75% completion, medium size, and primary color.
53
+ *
54
+ * <ProgressCircle value={0.5} size="lg" color="secondary-500" />
55
+ * // Renders a circular progress indicator with 50% completion, large size, and secondary color.
56
+ * ```
57
+ *
58
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-progress--docs} for more details.
59
+ */
40
60
  var ProgressCircle = function ProgressCircle(_ref) {
41
61
  var _ref$value = _ref.value,
42
62
  value = _ref$value === void 0 ? 0 : _ref$value,
@@ -20,6 +20,37 @@ var DropdownTool = require('../dropdown/DropdownTool.js');
20
20
  var _excluded = ["ref", "as", "id", "className", "label", "icon", "iconBg", "iconColor", "rtlFlip", "badge", "disabled", "onClose", "active", "onClick", "tabFlex", "color", "actions", "tooltip", "activeClassName"];
21
21
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
22
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
+ /**
24
+ * A component that represents a tab in a tabbed interface. It can display an icon, label, badge, and actions.
25
+ * It supports polymorphic rendering, allowing it to be rendered as different HTML elements.
26
+ * It also supports tooltips, active states, and click handling.
27
+ *
28
+ * @param {TabProps} props - The properties for the Tab component.
29
+ * @returns {JSX.Element} The rendered Tab component.
30
+ *
31
+ * @example
32
+ * ```jsx
33
+ * <Tab
34
+ * id="tab1"
35
+ * label="Tab 1"
36
+ * icon="home"
37
+ * iconBg="bg-blue-500"
38
+ * iconColor="text-white"
39
+ * badge="New"
40
+ * onClick={(id) => console.log(`Tab clicked: ${id}`)}
41
+ * onClose={() => console.log("Tab closed")}
42
+ * active={true}
43
+ * actions={<button>Action</button>}
44
+ * color="primary"
45
+ * tooltip="This is a tab"
46
+ * activeClassName="bg-blue-100"
47
+ * />
48
+ * // Renders a tab with label "Tab 1", home icon, blue background, white text, badge "New",
49
+ * // and an action button. The tab is active and has a tooltip.
50
+ * ```
51
+ *
52
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-tabpanel--docs} for more details.
53
+ */
23
54
  var Tab = function Tab(_ref) {
24
55
  var ref = _ref.ref,
25
56
  as = _ref.as,
@@ -10,6 +10,39 @@ var Tab = require('./Tab.js');
10
10
 
11
11
  // TODO: implement append/prepend tab-bar items
12
12
 
13
+ /**
14
+ * A component that provides a tabbed interface for displaying content.
15
+ * It allows users to switch between different tabs, each containing its own content.
16
+ * It supports various orientations, justify options, and variants for the tab header.
17
+ * It also provides hooks for handling tab changes before and after they occur.
18
+ * This component is useful for organizing content into separate sections that can be easily navigated by the user.
19
+ * It can be customized with different styles and behaviors to fit the needs of the application.
20
+ *
21
+ * @param {TabPanelProps} props - The properties for the TabPanel component.
22
+ * @returns {JSX.Element} The rendered TabPanel component.
23
+ *
24
+ * @example
25
+ * ```jsx
26
+ * <TabPanel
27
+ * orientation="top"
28
+ * activeTab="tab1"
29
+ * justify="start"
30
+ * variant="solid"
31
+ * tabFlex={true}
32
+ * onBeforeChange={(nextTab, currentTab) => {
33
+ * console.log(`Switching from ${currentTab} to ${nextTab}`);
34
+ * return true; // or false to prevent change
35
+ * }}
36
+ * onChange={(id) => console.log(`Active tab changed to: ${id}`)}
37
+ * >
38
+ * <Tab id="tab1" label="Tab 1">Content for Tab 1</Tab>
39
+ * <Tab id="tab2" label="Tab 2">Content for Tab 2</Tab>
40
+ * <Tab id="tab3" label="Tab 3">Content for Tab 3</Tab>
41
+ * </TabPanel>
42
+ * ```
43
+ *
44
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-tabpanel--docs} for more details.
45
+ */
13
46
  var TabPanel = function TabPanel(_ref) {
14
47
  var children = _ref.children,
15
48
  headerClassName = _ref.headerClassName,
@@ -151,7 +151,15 @@ var useGlobals = function useGlobals() {
151
151
  };
152
152
 
153
153
  /**
154
- * global application context
154
+ * Hook to access the global application context.
155
+ * This hook provides access to the global context values, including the current locale, calendar, and color scheme.
156
+ *
157
+ * @returns {GlobalContextType} The global context values excluding the error element.
158
+ *
159
+ * @example
160
+ * ```jsx
161
+ * const { changeLocale, currentLocale, toggleColorScheme } = useApplicationContext();
162
+ * ```
155
163
  */
156
164
  var useApplicationContext = function useApplicationContext() {
157
165
  var _useContext = react.useContext(GlobalContext);
@@ -159,6 +167,22 @@ var useApplicationContext = function useApplicationContext() {
159
167
  var rest = _objectWithoutProperties(_useContext, _excluded);
160
168
  return rest;
161
169
  };
170
+
171
+ /**
172
+ * Hook to access the notification manager from the global context.
173
+ * This hook provides methods to show alerts, errors, messages, and toasts.
174
+ * It returns a reference to the notification manager, which can be used to display notifications in the application.
175
+ *
176
+ * @returns {NotificationManagerRef} The notification manager reference.
177
+ *
178
+ * @example
179
+ * ```jsx
180
+ * const notificationService = useNotificationService();
181
+ * notificationService.showMessage("Hello World");
182
+ * ```
183
+ *
184
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-notifications--notifications} for more details on available methods.
185
+ */
162
186
  var useNotificationService = function useNotificationService() {
163
187
  var _useContext2 = react.useContext(GlobalContext),
164
188
  notificationManager = _useContext2.notificationManager;
@@ -16,7 +16,44 @@ var jsxRuntime = require('react/jsx-runtime');
16
16
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
18
  /**
19
- * Side panel
19
+ * A sidebar component that can be collapsed, resized, and has a flyout feature.
20
+ * It supports a title, icon, actions, and loading state.
21
+ * It can be aligned to the start or end of the page.
22
+ *
23
+ * @param {AsideProps} props - The properties for the Aside component.
24
+ * @returns {JSX.Element} The rendered Aside component.
25
+ *
26
+ * @example
27
+ * ```jsx
28
+ * <Aside
29
+ * title="Sidebar Title"
30
+ * icon={CoreIcons.menu}
31
+ * iconBg="bg-gray-200"
32
+ * iconColor="text-gray-800"
33
+ * rtlFlip={true}
34
+ * className="custom-aside"
35
+ * bodyClassName="custom-aside-body"
36
+ * headerClassName="custom-aside-header"
37
+ * resizeable={true}
38
+ * flyout={true}
39
+ * onFlyout={() => console.log("Flyout triggered")}
40
+ * collapsed={false}
41
+ * collapsable={true}
42
+ * onCollapse={() => console.log("Collapsed toggled")}
43
+ * actions={<button>Action</button>}
44
+ * loading={false}
45
+ * align="start"
46
+ * width="20rem"
47
+ * minWidth="2rem"
48
+ * maxWidth="30vw"
49
+ * data-testid="aside-test"
50
+ * data-test-value="aside-value"
51
+ * >
52
+ * <Content>This is the content of the aside.</Content>
53
+ * </Aside>
54
+ * ```
55
+ *
56
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--aside} for more details.
20
57
  */
21
58
  var Aside = function Aside(_ref) {
22
59
  var children = _ref.children,
@@ -147,7 +184,7 @@ var Aside = function Aside(_ref) {
147
184
  children: children
148
185
  })
149
186
  }), resizeable && /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, resizeHandleProps), {}, {
150
- className: classNames("fabric-asideResizer", "before:absolute before:inset-0 before:w-1 before:top-1/2 before:-translate-y-1/2 before:transition-all")
187
+ className: classNames("fabric-asideResizer", "before:absolute before:inset-0 before:w-1 before:top-1/2 before:-translate-y-1/2 before:transition-all before:delay-150")
151
188
  }))]
152
189
  });
153
190
  };
@@ -79,7 +79,23 @@ var ErrorStack = function ErrorStack(_ref4) {
79
79
  };
80
80
 
81
81
  /**
82
- * An error boundary wrapper higher-order component designed to provide consistent error display across the application will trap runtime errors
82
+ * ErrorBoundary component to catch JavaScript errors anywhere in the child component tree,
83
+ * log those errors, and display a fallback UI.
84
+ * It can also display a custom error element if provided.
85
+ * This component is useful for preventing the entire application from crashing
86
+ * when an error occurs in a part of the component tree.
87
+ * It can be used to wrap any part of the application.
88
+ * It supports custom error display components and provides a default error message.
89
+ * It also conditionally displays the error stack trace in development mode.
90
+ *
91
+ * @example
92
+ * ```jsx
93
+ * <ErrorBoundary errorElement={CustomErrorComponent}>
94
+ * <YourComponent />
95
+ * </ErrorBoundary>
96
+ * ```
97
+ *
98
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--error-boundary}
83
99
  */
84
100
  var ErrorBoundary = /*#__PURE__*/function (_Component) {
85
101
  function ErrorBoundary(props) {
@@ -31,7 +31,12 @@ var jsxRuntime = require('react/jsx-runtime');
31
31
  */
32
32
 
33
33
  /**
34
- * Scrollable content element
34
+ * Content component that wraps children in a section element.
35
+ * It uses a resize observer to handle resizing and a debounced scroll handler.
36
+ * It also includes an error boundary to catch any errors in the children.
37
+ *
38
+ * @param {ContentProps} props - The properties for the Content component.
39
+ * @returns A section element containing the children wrapped in an error boundary.
35
40
  */
36
41
  var Content = function Content(_ref) {
37
42
  var ref = _ref.ref,
@@ -27,12 +27,54 @@ var HeadFoot = function HeadFoot(_ref) {
27
27
  children: children
28
28
  }));
29
29
  };
30
+
31
+ /**
32
+ * Header component that wraps children in a header element.
33
+ * It uses the HeadFoot component to handle layout and styling.
34
+ * It accepts properties for direction, alignment, and justification,
35
+ * allowing for flexible layout configurations.
36
+ * The `as` prop is set to "header" to render the element as a header.
37
+ * The `area` prop is set to "head" to indicate that this is a header area.
38
+ * It can be used to create a consistent header layout across an application.
39
+ *
40
+ * @param {HeadFootProps} props - The properties for the Header component.
41
+ * @returns A header element containing the children wrapped in the HeadFoot component.
42
+ *
43
+ * @example
44
+ * ```jsx
45
+ * <Header className="custom-header" dir="ltr">
46
+ * <h1>Header content goes here</h1>
47
+ * </Header>
48
+ * ```
49
+ */
30
50
  var Header = function Header(props) {
31
51
  return /*#__PURE__*/jsxRuntime.jsx(HeadFoot, _objectSpread({
32
52
  as: "header",
33
53
  area: "head"
34
54
  }, props));
35
55
  };
56
+
57
+ /**
58
+ * Footer component that wraps children in a footer element.
59
+ * It uses the HeadFoot component to handle layout and styling.
60
+ * It accepts properties for direction, alignment, and justification,
61
+ * allowing for flexible layout configurations.
62
+ * The `as` prop is set to "footer" to render the element as a footer.
63
+ * The `area` prop is set to "foot" to indicate that this is a footer area.
64
+ * It can be used to create a consistent footer layout across an application.
65
+ * * The Footer component is designed to be flexible and can be styled with custom classes.
66
+ * It supports both default and flex layouts, allowing for alignment and justification of its children.
67
+ *
68
+ * @param {HeadFootProps} props - The properties for the Footer component.
69
+ * @returns A footer element containing the children wrapped in the HeadFoot component.
70
+ *
71
+ * @example
72
+ * ```jsx
73
+ * <Footer className="custom-footer" dir="ltr">
74
+ * <p>Footer content goes here</p>
75
+ * </Footer>
76
+ * ```
77
+ */
36
78
  var Footer = function Footer(props) {
37
79
  return /*#__PURE__*/jsxRuntime.jsx(HeadFoot, _objectSpread({
38
80
  as: "footer",
@@ -11,7 +11,32 @@ var _excluded = ["ref", "children", "paper", "title", "titleClassName", "icon",
11
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
13
  /**
14
- * The page component used typically for routes, is a structured layout used within an application to organize and display content in a sectioned format, ensuring a consistent and intuitive user experience.
14
+ * Page component that wraps children in a div element.
15
+ * It includes a title section with an optional icon and a loading indicator.
16
+ * The component can be styled with a paper effect, page icon and title.
17
+ * It also accepts a loading prop to display a loading indicator.
18
+ *
19
+ * @param {PageProps} props - The properties for the Page component.
20
+ * @returns A div element containing the title and children, with optional loading indicator.
21
+ *
22
+ * @example
23
+ * ```jsx
24
+ * <Page
25
+ * title="My Page"
26
+ * icon="home"
27
+ * iconBg="bg-blue-500"
28
+ * iconColor="text-white"
29
+ * loading={false}
30
+ * paper={true}
31
+ * data-testid="my-page"
32
+ * data-test-value="page-value"
33
+ * >
34
+ * <p>This is the content of the page.</p>
35
+ * </Page>
36
+ * // Renders a page with a title, icon, and content.
37
+ * ```
38
+ *
39
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--page} for more details.
15
40
  */
16
41
  var Page = function Page(_ref) {
17
42
  var ref = _ref.ref,
@@ -11,7 +11,20 @@ var _excluded = ["children", "fullWidth", "className", "gutter"],
11
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
13
  /**
14
- * Responsive layout container
14
+ * Container component that wraps children in a div element.
15
+ * It supports full width, gutter size, and additional CSS classes.
16
+ * It can be used to create a responsive layout with optional gutters for spacing.
17
+ * It accepts properties for full width, gutter size, and additional CSS classes.
18
+ *
19
+ * @param {ContainerProps} props - The properties for the Container component.
20
+ * @returns A div element containing the children with optional full width and gutter size.
21
+ *
22
+ * @example
23
+ * ```jsx
24
+ * <Container fullWidth={true} gutter="16px" className="custom-container">
25
+ * <p>This is a container with full width and gutter.</p>
26
+ * </Container>
27
+ * ```
15
28
  */
16
29
  var Container = function Container(_ref) {
17
30
  var children = _ref.children,
@@ -26,6 +39,27 @@ var Container = function Container(_ref) {
26
39
  children: children
27
40
  }));
28
41
  };
42
+
43
+ /**
44
+ * Row component that allows for flexible layout of columns.
45
+ * It supports various flex properties, alignment, and wrapping.
46
+ * It can be used to create a responsive layout with optional gutters for spacing.
47
+ * It accepts properties for gutter size, orientation, alignment, justification, and additional CSS classes.
48
+ *
49
+ * @param {RowProps} props - The properties for the Row component.
50
+ * @returns A div element representing a row with the specified flex and alignment properties.
51
+ *
52
+ * @example
53
+ * ```jsx
54
+ * <Row gutter="16px" orient="row" align="center" justify="between">
55
+ * <Col flex="fill">Column 1</Col>
56
+ * <Col flex="fill">Column 2</Col>
57
+ * </Row>
58
+ * // Renders a row with two columns, each taking equal space, centered vertically and spaced evenly.
59
+ * ```
60
+ *
61
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--responsive} for more details.
62
+ */
29
63
  var Row = function Row(_ref2) {
30
64
  var children = _ref2.children,
31
65
  gutter = _ref2.gutter,
@@ -44,6 +78,25 @@ var Row = function Row(_ref2) {
44
78
  children: children
45
79
  }));
46
80
  };
81
+
82
+ /**
83
+ * Column component that allows for flexible layout within a row.
84
+ * It supports various flex properties, alignment, and truncation.
85
+ * It can be used to create a responsive layout with optional stretching of inner content.
86
+ * It accepts properties for flex size, alignment, truncation, and additional CSS classes.
87
+ *
88
+ * @param {ColProps} props - The properties for the Col component.
89
+ * @returns A div element representing a column with the specified flex and alignment properties.
90
+ *
91
+ * @example
92
+ * ```jsx
93
+ * <Col flex="fill" align="center" truncate className="custom-col">
94
+ * <p>This is a column with flexible layout.</p>
95
+ * </Col>
96
+ * ```
97
+ *
98
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--responsive} for more details.
99
+ */
47
100
  var Col = function Col(_ref3) {
48
101
  var children = _ref3.children,
49
102
  flex = _ref3.flex,
@@ -53,7 +106,7 @@ var Col = function Col(_ref3) {
53
106
  stretchContent = _ref3.stretchContent,
54
107
  aria = _objectWithoutProperties(_ref3, _excluded3);
55
108
  return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
56
- className: classNames("fabric-col", className, stretchContent && "stretchContent", flex === "fill" && "flex-1", flex === "full" && "flex-full", flex === "auto" && "flex-auto", flex === "initial" && "flex-initial", flex === "content" && "flex-none", align && "self-".concat(align), truncate && "truncate")
109
+ className: classNames("fabric-col", className, stretchContent && "stretchContent", flex === "fill" && "flex-1", flex === "full" && "flex-full", flex === "auto" && "flex-auto", flex === "initial" && "flex-initial", flex === "content" && "flex-content", align && "self-".concat(align), truncate && "truncate")
57
110
  }, aria), {}, {
58
111
  children: children
59
112
  }));
@@ -1,46 +1,30 @@
1
1
  'use strict';
2
2
 
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
3
5
  var classNames = require('classnames');
4
6
  var ErrorBoundary = require('../boundary/ErrorBoundary.js');
5
7
  var jsxRuntime = require('react/jsx-runtime');
6
8
 
7
- /*
8
- * React Fabric
9
- * @version: 1.0.0
10
- *
11
- *
12
- * The MIT License (MIT)
13
- * Copyright (c) 2024 Adarsh Pastakia
14
- *
15
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
16
- * and associated documentation files (the "Software"), to deal in the Software without restriction,
17
- * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
18
- * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
19
- * subject to the following conditions:
20
- *
21
- * The above copyright notice and this permission notice shall be included in all copies or substantial
22
- * portions of the Software.
23
- *
24
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
25
- * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
27
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
- */
29
-
9
+ var _excluded = ["children", "className", "dir", "ref"];
10
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
30
12
  var Section = function Section(_ref) {
31
13
  var children = _ref.children,
32
14
  className = _ref.className,
33
15
  dir = _ref.dir,
34
- ref = _ref.ref;
35
- return /*#__PURE__*/jsxRuntime.jsx("div", {
16
+ ref = _ref.ref,
17
+ rest = _objectWithoutProperties(_ref, _excluded);
18
+ return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
36
19
  "data-ref": "section",
37
20
  dir: dir,
38
- ref: ref,
21
+ ref: ref
22
+ }, rest), {}, {
39
23
  className: classNames("fabric-section", className, "grid area-content overflow-hidden"),
40
24
  children: /*#__PURE__*/jsxRuntime.jsx(ErrorBoundary.ErrorBoundary, {
41
25
  children: children
42
26
  })
43
- });
27
+ }));
44
28
  };
45
29
 
46
30
  exports.Section = Section;
@@ -30,7 +30,27 @@ var jsxRuntime = require('react/jsx-runtime');
30
30
  */
31
31
 
32
32
  /**
33
- * Theme override
33
+ * This component provides a way to set the theme for the application.
34
+ * It allows you to set the primary, accent, and tint colors, as well as the color scheme and rounding.
35
+ * It uses CSS variables to apply the colors and styles.
36
+ * It also applies the branding className to the root element.
37
+ * The component uses the `useApplicationContext` hook to get the current color scheme from the application context.
38
+ *
39
+ * @example
40
+ * ```jsx
41
+ * <ThemeProvider
42
+ * branding="my-branding"
43
+ * primaryColor="#ff0000"
44
+ * accentColor="#00ff00"
45
+ * tintColor="#0000ff"
46
+ * colorScheme="dark"
47
+ * rounding="md"
48
+ * >
49
+ * <div>Your content here</div>
50
+ * </ThemeProvider>
51
+ * ```
52
+ *
53
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--theme-provider} for more details.
34
54
  */
35
55
  var ThemeProvider = function ThemeProvider(_ref) {
36
56
  var children = _ref.children,
@@ -27,7 +27,21 @@ var jsxRuntime = require('react/jsx-runtime');
27
27
  */
28
28
 
29
29
  /**
30
- * The application viewport is the main container that defines the visible area where content is displayed and interacted with.
30
+ * This component is used to create a full-screen viewport
31
+ * that can be used to display content in a grid layout.
32
+ * It is typically used as a container for the main content of the application.
33
+ * It is styled to take up the full width and height of the viewport,
34
+ * and it uses absolute positioning to ensure it covers the entire screen.
35
+ * The component accepts children as props, allowing you to nest other components inside it.
36
+ *
37
+ * @example
38
+ * ```jsx
39
+ * <Viewport>
40
+ * <YourContentComponent />
41
+ * </Viewport>
42
+ * ```
43
+ *
44
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-application--viewport} for more details.
31
45
  */
32
46
  var Viewport = function Viewport(_ref) {
33
47
  var children = _ref.children;
@@ -4,6 +4,18 @@ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
4
4
  var react = require('react');
5
5
  var useEffectDebugger = require('./useEffectDebugger.js');
6
6
 
7
+ /**
8
+ * Custom hook to manage a controlled value with a default fallback for inputs.
9
+ * It updates the current value whenever the deferred value changes.
10
+ * This is useful for scenarios where you want to control the value of a component
11
+ * while also providing a default value if the controlled value is not set.
12
+ * This hook is particularly useful for form inputs or components that require a controlled value
13
+ * but also need to handle cases where the value might not be immediately available.
14
+ *
15
+ * @param value - The controlled value that may change.
16
+ * @param defaultValue - The default value to use if the controlled value is not set.
17
+ * @returns An object containing the current value and a function to update it.
18
+ */
7
19
  var useControlledValue = function useControlledValue(value, defaultValue) {
8
20
  var _useState = react.useState(defaultValue),
9
21
  _useState2 = _slicedToArray(_useState, 2),