@arkyn/components 3.0.1-beta.142 → 3.0.1-beta.144

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 (207) hide show
  1. package/dist/bundle.css +1 -1
  2. package/dist/components/alert/alertContainer/index.d.ts +27 -43
  3. package/dist/components/alert/alertContainer/index.d.ts.map +1 -1
  4. package/dist/components/alert/alertContainer/index.js +20 -40
  5. package/dist/components/alert/alertContent/index.d.ts +11 -36
  6. package/dist/components/alert/alertContent/index.d.ts.map +1 -1
  7. package/dist/components/alert/alertContent/index.js +11 -31
  8. package/dist/components/alert/alertDescription/index.d.ts +10 -38
  9. package/dist/components/alert/alertDescription/index.d.ts.map +1 -1
  10. package/dist/components/alert/alertDescription/index.js +10 -33
  11. package/dist/components/alert/alertIcon/index.d.ts +14 -38
  12. package/dist/components/alert/alertIcon/index.d.ts.map +1 -1
  13. package/dist/components/alert/alertIcon/index.js +14 -32
  14. package/dist/components/alert/alertTitle/index.d.ts +12 -35
  15. package/dist/components/alert/alertTitle/index.d.ts.map +1 -1
  16. package/dist/components/alert/alertTitle/index.js +12 -27
  17. package/dist/components/audioPlayer/index.d.ts +24 -32
  18. package/dist/components/audioPlayer/index.d.ts.map +1 -1
  19. package/dist/components/audioPlayer/index.js +15 -18
  20. package/dist/components/audioUpload/index.d.ts +37 -48
  21. package/dist/components/audioUpload/index.d.ts.map +1 -1
  22. package/dist/components/audioUpload/index.js +23 -48
  23. package/dist/components/badge/index.d.ts +31 -22
  24. package/dist/components/badge/index.d.ts.map +1 -1
  25. package/dist/components/badge/index.js +14 -22
  26. package/dist/components/button/index.d.ts +38 -28
  27. package/dist/components/button/index.d.ts.map +1 -1
  28. package/dist/components/button/index.js +18 -28
  29. package/dist/components/cardTab/cardTabButton/index.d.ts +14 -52
  30. package/dist/components/cardTab/cardTabButton/index.d.ts.map +1 -1
  31. package/dist/components/cardTab/cardTabButton/index.js +12 -52
  32. package/dist/components/cardTab/cardTabContainer/index.d.ts +16 -58
  33. package/dist/components/cardTab/cardTabContainer/index.d.ts.map +1 -1
  34. package/dist/components/cardTab/cardTabContainer/index.js +12 -58
  35. package/dist/components/checkbox/index.d.ts +38 -37
  36. package/dist/components/checkbox/index.d.ts.map +1 -1
  37. package/dist/components/checkbox/index.js +21 -37
  38. package/dist/components/clientOnly.d.ts +13 -66
  39. package/dist/components/clientOnly.d.ts.map +1 -1
  40. package/dist/components/clientOnly.js +11 -66
  41. package/dist/components/currencyInput/index.d.ts +67 -50
  42. package/dist/components/currencyInput/index.d.ts.map +1 -1
  43. package/dist/components/currencyInput/index.js +28 -50
  44. package/dist/components/divider/index.d.ts +12 -25
  45. package/dist/components/divider/index.d.ts.map +1 -1
  46. package/dist/components/divider/index.js +8 -25
  47. package/dist/components/drawer/drawerContainer/index.d.ts +16 -50
  48. package/dist/components/drawer/drawerContainer/index.d.ts.map +1 -1
  49. package/dist/components/drawer/drawerContainer/index.js +13 -50
  50. package/dist/components/drawer/drawerHeader/index.d.ts +9 -33
  51. package/dist/components/drawer/drawerHeader/index.d.ts.map +1 -1
  52. package/dist/components/drawer/drawerHeader/index.js +8 -33
  53. package/dist/components/facebookPixel/index.d.ts +47 -0
  54. package/dist/components/facebookPixel/index.d.ts.map +1 -1
  55. package/dist/components/facebookPixel/index.js +35 -0
  56. package/dist/components/fieldError/index.d.ts +4 -11
  57. package/dist/components/fieldError/index.d.ts.map +1 -1
  58. package/dist/components/fieldError/index.js +4 -11
  59. package/dist/components/fieldLabel/index.d.ts +6 -21
  60. package/dist/components/fieldLabel/index.d.ts.map +1 -1
  61. package/dist/components/fieldLabel/index.js +5 -21
  62. package/dist/components/fieldWrapper/index.d.ts +12 -22
  63. package/dist/components/fieldWrapper/index.d.ts.map +1 -1
  64. package/dist/components/fieldWrapper/index.js +7 -22
  65. package/dist/components/fileUpload/index.d.ts +36 -61
  66. package/dist/components/fileUpload/index.d.ts.map +1 -1
  67. package/dist/components/fileUpload/index.js +23 -61
  68. package/dist/components/googleAnalytics/index.d.ts +11 -7
  69. package/dist/components/googleAnalytics/index.d.ts.map +1 -1
  70. package/dist/components/googleAnalytics/index.js +9 -7
  71. package/dist/components/googleTagManager/index.d.ts +27 -21
  72. package/dist/components/googleTagManager/index.d.ts.map +1 -1
  73. package/dist/components/googleTagManager/index.js +20 -21
  74. package/dist/components/iconButton/index.d.ts +31 -15
  75. package/dist/components/iconButton/index.d.ts.map +1 -1
  76. package/dist/components/iconButton/index.js +12 -15
  77. package/dist/components/imageUpload/index.d.ts +47 -75
  78. package/dist/components/imageUpload/index.d.ts.map +1 -1
  79. package/dist/components/imageUpload/index.js +27 -75
  80. package/dist/components/input/index.d.ts +51 -44
  81. package/dist/components/input/index.d.ts.map +1 -1
  82. package/dist/components/input/index.js +24 -44
  83. package/dist/components/mapView/index.d.ts +44 -0
  84. package/dist/components/mapView/index.d.ts.map +1 -1
  85. package/dist/components/mapView/index.js +35 -0
  86. package/dist/components/maskedInput/index.d.ts +66 -51
  87. package/dist/components/maskedInput/index.d.ts.map +1 -1
  88. package/dist/components/maskedInput/index.js +28 -51
  89. package/dist/components/modal/modalContainer/index.d.ts +17 -57
  90. package/dist/components/modal/modalContainer/index.d.ts.map +1 -1
  91. package/dist/components/modal/modalContainer/index.js +15 -57
  92. package/dist/components/modal/modalFooter/index.d.ts +17 -50
  93. package/dist/components/modal/modalFooter/index.d.ts.map +1 -1
  94. package/dist/components/modal/modalFooter/index.js +10 -50
  95. package/dist/components/modal/modalHeader/index.d.ts +13 -47
  96. package/dist/components/modal/modalHeader/index.d.ts.map +1 -1
  97. package/dist/components/modal/modalHeader/index.js +12 -47
  98. package/dist/components/multiSelect/index.d.ts +67 -62
  99. package/dist/components/multiSelect/index.d.ts.map +1 -1
  100. package/dist/components/multiSelect/index.js +28 -62
  101. package/dist/components/pagination/index.d.ts +18 -9
  102. package/dist/components/pagination/index.d.ts.map +1 -1
  103. package/dist/components/pagination/index.js +18 -9
  104. package/dist/components/phoneInput/index.d.ts +65 -30
  105. package/dist/components/phoneInput/index.d.ts.map +1 -1
  106. package/dist/components/phoneInput/index.js +35 -30
  107. package/dist/components/popover/index.d.ts +34 -114
  108. package/dist/components/popover/index.d.ts.map +1 -1
  109. package/dist/components/popover/index.js +25 -114
  110. package/dist/components/radio/radioBox/index.d.ts +17 -65
  111. package/dist/components/radio/radioBox/index.d.ts.map +1 -1
  112. package/dist/components/radio/radioBox/index.js +14 -65
  113. package/dist/components/radio/radioGroup/index.d.ts +36 -67
  114. package/dist/components/radio/radioGroup/index.d.ts.map +1 -1
  115. package/dist/components/radio/radioGroup/index.js +25 -67
  116. package/dist/components/richText/index.d.ts +33 -47
  117. package/dist/components/richText/index.d.ts.map +1 -1
  118. package/dist/components/richText/index.js +30 -44
  119. package/dist/components/searchPlaces.d.ts +52 -50
  120. package/dist/components/searchPlaces.d.ts.map +1 -1
  121. package/dist/components/searchPlaces.js +23 -30
  122. package/dist/components/select/index.d.ts +68 -63
  123. package/dist/components/select/index.d.ts.map +1 -1
  124. package/dist/components/select/index.js +29 -63
  125. package/dist/components/slider/index.d.ts +20 -34
  126. package/dist/components/slider/index.d.ts.map +1 -1
  127. package/dist/components/slider/index.js +15 -33
  128. package/dist/components/switch/index.d.ts +42 -58
  129. package/dist/components/switch/index.d.ts.map +1 -1
  130. package/dist/components/switch/index.js +24 -58
  131. package/dist/components/tab/tabButton/index.d.ts +14 -52
  132. package/dist/components/tab/tabButton/index.d.ts.map +1 -1
  133. package/dist/components/tab/tabButton/index.js +12 -52
  134. package/dist/components/tab/tabContainer/index.d.ts +16 -58
  135. package/dist/components/tab/tabContainer/index.d.ts.map +1 -1
  136. package/dist/components/tab/tabContainer/index.js +12 -58
  137. package/dist/components/table/tableBody/index.d.ts +13 -47
  138. package/dist/components/table/tableBody/index.d.ts.map +1 -1
  139. package/dist/components/table/tableBody/index.js +12 -47
  140. package/dist/components/table/tableCaption/index.d.ts +6 -46
  141. package/dist/components/table/tableCaption/index.d.ts.map +1 -1
  142. package/dist/components/table/tableCaption/index.js +6 -46
  143. package/dist/components/table/tableContainer/index.d.ts +12 -41
  144. package/dist/components/table/tableContainer/index.d.ts.map +1 -1
  145. package/dist/components/table/tableContainer/index.js +12 -41
  146. package/dist/components/table/tableFooter/index.d.ts +5 -29
  147. package/dist/components/table/tableFooter/index.d.ts.map +1 -1
  148. package/dist/components/table/tableFooter/index.js +5 -29
  149. package/dist/components/table/tableHeader/index.d.ts +4 -25
  150. package/dist/components/table/tableHeader/index.d.ts.map +1 -1
  151. package/dist/components/table/tableHeader/index.js +4 -25
  152. package/dist/components/textarea/index.d.ts +32 -64
  153. package/dist/components/textarea/index.d.ts.map +1 -1
  154. package/dist/components/textarea/index.js +16 -64
  155. package/dist/components/tooltip/index.d.ts +27 -55
  156. package/dist/components/tooltip/index.d.ts.map +1 -1
  157. package/dist/components/tooltip/index.js +16 -55
  158. package/dist/hooks/useAutomation.d.ts +18 -26
  159. package/dist/hooks/useAutomation.d.ts.map +1 -1
  160. package/dist/hooks/useAutomation.js +18 -26
  161. package/dist/hooks/useDrawer.d.ts +19 -64
  162. package/dist/hooks/useDrawer.d.ts.map +1 -1
  163. package/dist/hooks/useForm.d.ts +12 -29
  164. package/dist/hooks/useForm.d.ts.map +1 -1
  165. package/dist/hooks/useForm.js +12 -29
  166. package/dist/hooks/useHydrated.d.ts +8 -63
  167. package/dist/hooks/useHydrated.d.ts.map +1 -1
  168. package/dist/hooks/useHydrated.js +8 -63
  169. package/dist/hooks/useModal.d.ts +19 -59
  170. package/dist/hooks/useModal.d.ts.map +1 -1
  171. package/dist/hooks/useScopedParams.d.ts +17 -69
  172. package/dist/hooks/useScopedParams.d.ts.map +1 -1
  173. package/dist/hooks/useScopedParams.js +17 -69
  174. package/dist/hooks/useScrollLock.d.ts +11 -27
  175. package/dist/hooks/useScrollLock.d.ts.map +1 -1
  176. package/dist/hooks/useScrollLock.js +11 -33
  177. package/dist/hooks/useSearchAutomation.d.ts +16 -34
  178. package/dist/hooks/useSearchAutomation.d.ts.map +1 -1
  179. package/dist/hooks/useSearchAutomation.js +16 -34
  180. package/dist/hooks/useSlider.d.ts +5 -19
  181. package/dist/hooks/useSlider.d.ts.map +1 -1
  182. package/dist/hooks/useSlider.js +5 -19
  183. package/dist/hooks/useToast.d.ts +8 -52
  184. package/dist/hooks/useToast.d.ts.map +1 -1
  185. package/dist/hooks/useToast.js +8 -52
  186. package/dist/providers/drawerProvider.d.ts +15 -81
  187. package/dist/providers/drawerProvider.d.ts.map +1 -1
  188. package/dist/providers/drawerProvider.js +15 -81
  189. package/dist/providers/formProvider.d.ts +17 -53
  190. package/dist/providers/formProvider.d.ts.map +1 -1
  191. package/dist/providers/formProvider.js +17 -53
  192. package/dist/providers/modalProvider.d.ts +16 -77
  193. package/dist/providers/modalProvider.d.ts.map +1 -1
  194. package/dist/providers/modalProvider.js +16 -77
  195. package/dist/providers/placesProvider.d.ts +16 -11
  196. package/dist/providers/placesProvider.d.ts.map +1 -1
  197. package/dist/providers/placesProvider.js +16 -11
  198. package/dist/providers/toastProvider.d.ts +10 -21
  199. package/dist/providers/toastProvider.d.ts.map +1 -1
  200. package/dist/providers/toastProvider.js +10 -21
  201. package/dist/services/toHtml.d.ts +11 -10
  202. package/dist/services/toHtml.d.ts.map +1 -1
  203. package/dist/services/toHtml.js +11 -10
  204. package/dist/services/toRichTextValue.d.ts +11 -17
  205. package/dist/services/toRichTextValue.d.ts.map +1 -1
  206. package/dist/services/toRichTextValue.js +11 -17
  207. package/package.json +1 -1
@@ -1,81 +1,39 @@
1
1
  import { HTMLAttributes, ReactNode } from "react";
2
2
  import "./styles.css";
3
3
  type TabContainerProps = Omit<HTMLAttributes<HTMLElement>, "onChange" | "children" | "ref" | "onClick"> & {
4
+ /** `TabButton` components to render as tabs. Required. */
4
5
  children: ReactNode;
6
+ /** Disables all tab buttons at once. @default false */
5
7
  disabled?: boolean;
8
+ /** Initially selected tab value. */
6
9
  defaultValue?: string;
10
+ /** Callback fired when the active tab changes, receiving the new value. */
7
11
  onChange?: (index: string) => void;
8
12
  };
9
13
  /**
10
- * TabContainer component - used as a wrapper for TabButton components to create tabbed navigation
14
+ * TabContainer wrapper that manages active state for a group of `TabButton` components.
11
15
  *
12
- * @param props - TabContainer component properties
13
- * @param props.children - TabButton components and other content (required)
14
- * @param props.disabled - Whether all tab buttons are disabled. Default: false
15
- * @param props.defaultValue - Initial tab value to be selected
16
- * @param props.onChange - Callback function called when tab changes, receives the tab value
16
+ * Renders as a `<nav>` element. Provides context consumed by each `TabButton`.
17
17
  *
18
- * **...Other valid HTML nav properties except onClick, children, and ref**
18
+ * @param props.children - `TabButton` elements. Required.
19
+ * @param props.defaultValue - Initially selected tab value.
20
+ * @param props.disabled - Disables all buttons. Default: false
21
+ * @param props.onChange - Called with the new value whenever the active tab changes.
19
22
  *
20
- * @returns TabContainer JSX element
23
+ * **...Other valid HTML `<nav>` properties**
21
24
  *
22
- * @example
23
- * ```tsx
24
- * // Basic tab container
25
- * <TabContainer>
26
- * <TabButton value="home">Home</TabButton>
27
- * <TabButton value="about">About</TabButton>
28
- * <TabButton value="contact">Contact</TabButton>
29
- * </TabContainer>
30
- * ```
25
+ * @returns TabContainer JSX element.
31
26
  *
32
27
  * @example
33
28
  * ```tsx
34
- * // Tab container with default value and change handler
35
- * <TabContainer
36
- * defaultValue="dashboard"
37
- * onChange={(value) => console.log('Active tab:', value)}
38
- * >
39
- * <TabButton value="dashboard">Dashboard</TabButton>
29
+ * <TabContainer defaultValue="overview" onChange={setActiveTab}>
30
+ * <TabButton value="overview">Overview</TabButton>
40
31
  * <TabButton value="analytics">Analytics</TabButton>
41
32
  * <TabButton value="settings">Settings</TabButton>
42
33
  * </TabContainer>
43
- * ```
44
- *
45
- * @example
46
- * ```tsx
47
- * // Disabled all tabs
48
- * <TabContainer disabled>
49
- * <TabButton value="tab1">Tab 1</TabButton>
50
- * <TabButton value="tab2">Tab 2</TabButton>
51
- * </TabContainer>
52
- * ```
53
- *
54
- * @example
55
- * ```tsx
56
- * // Tab container with custom styling and state management
57
- * function MyTabs() {
58
- * const [activeTab, setActiveTab] = useState('profile');
59
- *
60
- * return (
61
- * <div>
62
- * <TabContainer
63
- * defaultValue={activeTab}
64
- * onChange={setActiveTab}
65
- * className="custom-tabs"
66
- * role="tablist"
67
- * >
68
- * <TabButton value="profile">Profile</TabButton>
69
- * <TabButton value="account">Account</TabButton>
70
- * <TabButton value="notifications">Notifications</TabButton>
71
- * </TabContainer>
72
34
  *
73
- * {activeTab === 'profile' && <ProfileContent />}
74
- * {activeTab === 'account' && <AccountContent />}
75
- * {activeTab === 'notifications' && <NotificationsContent />}
76
- * </div>
77
- * );
78
- * }
35
+ * {activeTab === 'overview' && <OverviewPanel />}
36
+ * {activeTab === 'analytics' && <AnalyticsPanel />}
79
37
  * ```
80
38
  */
81
39
  declare function TabContainer(props: TabContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tab/tabContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAG5D,OAAO,cAAc,CAAC;AAEtB,KAAK,iBAAiB,GAAG,IAAI,CAC3B,cAAc,CAAC,WAAW,CAAC,EAC3B,UAAU,GAAG,UAAU,GAAG,KAAK,GAAG,SAAS,CAC5C,GAAG;IACF,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AAEH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CA8B7C;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tab/tabContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAG5D,OAAO,cAAc,CAAC;AAEtB,KAAK,iBAAiB,GAAG,IAAI,CAC3B,cAAc,CAAC,WAAW,CAAC,EAC3B,UAAU,GAAG,UAAU,GAAG,KAAK,GAAG,SAAS,CAC5C,GAAG;IACF,0DAA0D;IAC1D,QAAQ,EAAE,SAAS,CAAC;IACpB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CA8B7C;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -3,75 +3,29 @@ import { useState } from "react";
3
3
  import { TabProvider } from "../tabContext";
4
4
  import "./styles.css";
5
5
  /**
6
- * TabContainer component - used as a wrapper for TabButton components to create tabbed navigation
6
+ * TabContainer wrapper that manages active state for a group of `TabButton` components.
7
7
  *
8
- * @param props - TabContainer component properties
9
- * @param props.children - TabButton components and other content (required)
10
- * @param props.disabled - Whether all tab buttons are disabled. Default: false
11
- * @param props.defaultValue - Initial tab value to be selected
12
- * @param props.onChange - Callback function called when tab changes, receives the tab value
8
+ * Renders as a `<nav>` element. Provides context consumed by each `TabButton`.
13
9
  *
14
- * **...Other valid HTML nav properties except onClick, children, and ref**
10
+ * @param props.children - `TabButton` elements. Required.
11
+ * @param props.defaultValue - Initially selected tab value.
12
+ * @param props.disabled - Disables all buttons. Default: false
13
+ * @param props.onChange - Called with the new value whenever the active tab changes.
15
14
  *
16
- * @returns TabContainer JSX element
15
+ * **...Other valid HTML `<nav>` properties**
17
16
  *
18
- * @example
19
- * ```tsx
20
- * // Basic tab container
21
- * <TabContainer>
22
- * <TabButton value="home">Home</TabButton>
23
- * <TabButton value="about">About</TabButton>
24
- * <TabButton value="contact">Contact</TabButton>
25
- * </TabContainer>
26
- * ```
17
+ * @returns TabContainer JSX element.
27
18
  *
28
19
  * @example
29
20
  * ```tsx
30
- * // Tab container with default value and change handler
31
- * <TabContainer
32
- * defaultValue="dashboard"
33
- * onChange={(value) => console.log('Active tab:', value)}
34
- * >
35
- * <TabButton value="dashboard">Dashboard</TabButton>
21
+ * <TabContainer defaultValue="overview" onChange={setActiveTab}>
22
+ * <TabButton value="overview">Overview</TabButton>
36
23
  * <TabButton value="analytics">Analytics</TabButton>
37
24
  * <TabButton value="settings">Settings</TabButton>
38
25
  * </TabContainer>
39
- * ```
40
- *
41
- * @example
42
- * ```tsx
43
- * // Disabled all tabs
44
- * <TabContainer disabled>
45
- * <TabButton value="tab1">Tab 1</TabButton>
46
- * <TabButton value="tab2">Tab 2</TabButton>
47
- * </TabContainer>
48
- * ```
49
- *
50
- * @example
51
- * ```tsx
52
- * // Tab container with custom styling and state management
53
- * function MyTabs() {
54
- * const [activeTab, setActiveTab] = useState('profile');
55
- *
56
- * return (
57
- * <div>
58
- * <TabContainer
59
- * defaultValue={activeTab}
60
- * onChange={setActiveTab}
61
- * className="custom-tabs"
62
- * role="tablist"
63
- * >
64
- * <TabButton value="profile">Profile</TabButton>
65
- * <TabButton value="account">Account</TabButton>
66
- * <TabButton value="notifications">Notifications</TabButton>
67
- * </TabContainer>
68
26
  *
69
- * {activeTab === 'profile' && <ProfileContent />}
70
- * {activeTab === 'account' && <AccountContent />}
71
- * {activeTab === 'notifications' && <NotificationsContent />}
72
- * </div>
73
- * );
74
- * }
27
+ * {activeTab === 'overview' && <OverviewPanel />}
28
+ * {activeTab === 'analytics' && <AnalyticsPanel />}
75
29
  * ```
76
30
  */
77
31
  function TabContainer(props) {
@@ -1,65 +1,31 @@
1
1
  import { HTMLAttributes } from "react";
2
2
  import "./styles.css";
3
3
  type TableBodyProps = HTMLAttributes<HTMLTableSectionElement> & {
4
+ /** Text displayed in a full-width row when no children are present. @default "Nenhum dado adicionado." */
4
5
  emptyMessage?: string;
5
6
  };
6
7
  /**
7
- * TableBody component - used to render the main content section of a table with empty state handling
8
+ * TableBody `<tbody>` section with built-in empty state handling.
8
9
  *
9
- * @param props - TableBody component properties
10
- * @param props.emptyMessage - Message to display when no children are provided. Default: "Nenhum dado adicionado."
10
+ * When `children` is empty, renders a full-width row with `emptyMessage`.
11
+ * Accepts all standard HTML `<tbody>` attributes.
11
12
  *
12
- * **...All valid HTML properties for tbody element**
13
+ * @param props.emptyMessage - Empty state text. Default: `"Nenhum dado adicionado."`
13
14
  *
14
- * @returns TableBody JSX element
15
+ * **...Other valid HTML `<tbody>` properties**
16
+ *
17
+ * @returns TableBody JSX element.
15
18
  *
16
19
  * @example
17
20
  * ```tsx
18
- * // Basic table body with data
19
- * <TableBody>
20
- * <tr>
21
- * <td>John Doe</td>
22
- * <td>john@example.com</td>
23
- * </tr>
24
- * <tr>
25
- * <td>Jane Smith</td>
26
- * <td>jane@example.com</td>
27
- * </tr>
28
- * </TableBody>
29
- *
30
- * // Empty table body with custom message
31
- * <TableBody emptyMessage="No users found. Please add some users to get started." />
32
- *
33
- * // Table body with dynamic content and custom styling
34
- * <TableBody className="striped-rows" emptyMessage="No products available">
35
- * {products.map(product => (
36
- * <tr key={product.id}>
37
- * <td>{product.name}</td>
38
- * <td>{product.price}</td>
39
- * <td>{product.stock}</td>
21
+ * <TableBody emptyMessage="No orders found">
22
+ * {orders.map(o => (
23
+ * <tr key={o.id}>
24
+ * <td>{o.number}</td>
25
+ * <td>{o.status}</td>
40
26
  * </tr>
41
27
  * ))}
42
28
  * </TableBody>
43
- *
44
- * // Complete table usage
45
- * <TableContainer>
46
- * <TableHeader>
47
- * <th>Name</th>
48
- * <th>Status</th>
49
- * <th>Actions</th>
50
- * </TableHeader>
51
- * <TableBody emptyMessage="No data to display">
52
- * {data.map(item => (
53
- * <tr key={item.id}>
54
- * <td>{item.name}</td>
55
- * <td>{item.status}</td>
56
- * <td>
57
- * <Button>Edit</Button>
58
- * </td>
59
- * </tr>
60
- * ))}
61
- * </TableBody>
62
- * </TableContainer>
63
29
  * ```
64
30
  */
65
31
  declare function TableBody(props: TableBodyProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableBody/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,cAAc,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,cAAc,CAAC;AAEtB,KAAK,cAAc,GAAG,cAAc,CAAC,uBAAuB,CAAC,GAAG;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,2CAwBvC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableBody/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,cAAc,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,cAAc,CAAC;AAEtB,KAAK,cAAc,GAAG,cAAc,CAAC,uBAAuB,CAAC,GAAG;IAC9D,0GAA0G;IAC1G,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,2CAwBvC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -2,62 +2,27 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Children } from "react";
3
3
  import "./styles.css";
4
4
  /**
5
- * TableBody component - used to render the main content section of a table with empty state handling
5
+ * TableBody `<tbody>` section with built-in empty state handling.
6
6
  *
7
- * @param props - TableBody component properties
8
- * @param props.emptyMessage - Message to display when no children are provided. Default: "Nenhum dado adicionado."
7
+ * When `children` is empty, renders a full-width row with `emptyMessage`.
8
+ * Accepts all standard HTML `<tbody>` attributes.
9
9
  *
10
- * **...All valid HTML properties for tbody element**
10
+ * @param props.emptyMessage - Empty state text. Default: `"Nenhum dado adicionado."`
11
11
  *
12
- * @returns TableBody JSX element
12
+ * **...Other valid HTML `<tbody>` properties**
13
+ *
14
+ * @returns TableBody JSX element.
13
15
  *
14
16
  * @example
15
17
  * ```tsx
16
- * // Basic table body with data
17
- * <TableBody>
18
- * <tr>
19
- * <td>John Doe</td>
20
- * <td>john@example.com</td>
21
- * </tr>
22
- * <tr>
23
- * <td>Jane Smith</td>
24
- * <td>jane@example.com</td>
25
- * </tr>
26
- * </TableBody>
27
- *
28
- * // Empty table body with custom message
29
- * <TableBody emptyMessage="No users found. Please add some users to get started." />
30
- *
31
- * // Table body with dynamic content and custom styling
32
- * <TableBody className="striped-rows" emptyMessage="No products available">
33
- * {products.map(product => (
34
- * <tr key={product.id}>
35
- * <td>{product.name}</td>
36
- * <td>{product.price}</td>
37
- * <td>{product.stock}</td>
18
+ * <TableBody emptyMessage="No orders found">
19
+ * {orders.map(o => (
20
+ * <tr key={o.id}>
21
+ * <td>{o.number}</td>
22
+ * <td>{o.status}</td>
38
23
  * </tr>
39
24
  * ))}
40
25
  * </TableBody>
41
- *
42
- * // Complete table usage
43
- * <TableContainer>
44
- * <TableHeader>
45
- * <th>Name</th>
46
- * <th>Status</th>
47
- * <th>Actions</th>
48
- * </TableHeader>
49
- * <TableBody emptyMessage="No data to display">
50
- * {data.map(item => (
51
- * <tr key={item.id}>
52
- * <td>{item.name}</td>
53
- * <td>{item.status}</td>
54
- * <td>
55
- * <Button>Edit</Button>
56
- * </td>
57
- * </tr>
58
- * ))}
59
- * </TableBody>
60
- * </TableContainer>
61
26
  * ```
62
27
  */
63
28
  function TableBody(props) {
@@ -2,58 +2,18 @@ import { HTMLAttributes } from "react";
2
2
  import "./styles.css";
3
3
  type TableCaptionProps = HTMLAttributes<HTMLElement>;
4
4
  /**
5
- * TableCaption component - used to provide a title or description for a table with proper styling
5
+ * TableCaption title / description placed above a table. Renders as a `<caption>` element.
6
6
  *
7
- * @param props - TableCaption component properties
7
+ * Accepts all standard HTML element attributes.
8
8
  *
9
- * **...All valid HTML properties for caption element**
10
- *
11
- * @returns TableCaption JSX element
9
+ * @returns TableCaption JSX element.
12
10
  *
13
11
  * @example
14
12
  * ```tsx
15
- * // Basic table caption
16
- * <TableContainer>
17
- * <TableCaption>
18
- * User Management
19
- * </TableCaption>
20
- * <TableHeader>
21
- * <th>Name</th>
22
- * <th>Email</th>
23
- * </TableHeader>
24
- * <TableBody>
25
- * // table rows...
26
- * </TableBody>
27
- * </TableContainer>
28
- *
29
- * // Table caption with custom styling
30
- * <TableContainer>
31
- * <TableCaption className="highlighted-caption">
32
- * Sales Report - Q4 2024
33
- * </TableCaption>
34
- * <TableHeader>
35
- * <th>Product</th>
36
- * <th>Revenue</th>
37
- * </TableHeader>
38
- * <TableBody>
39
- * // table rows...
40
- * </TableBody>
41
- * </TableContainer>
42
- *
43
- * // Caption with rich content
44
13
  * <TableContainer>
45
- * <TableCaption>
46
- * <h3>Employee Directory</h3>
47
- * <p>Updated: {new Date().toLocaleDateString()}</p>
48
- * </TableCaption>
49
- * <TableHeader>
50
- * <th>Employee ID</th>
51
- * <th>Name</th>
52
- * <th>Department</th>
53
- * </TableHeader>
54
- * <TableBody>
55
- * // table rows...
56
- * </TableBody>
14
+ * <TableCaption>Orders — Q2 2025</TableCaption>
15
+ * <TableHeader>...</TableHeader>
16
+ * <TableBody>...</TableBody>
57
17
  * </TableContainer>
58
18
  * ```
59
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableCaption/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,iBAAiB,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAEH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAS7C;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableCaption/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,iBAAiB,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;GAeG;AAEH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAS7C;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,58 +1,18 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "./styles.css";
3
3
  /**
4
- * TableCaption component - used to provide a title or description for a table with proper styling
4
+ * TableCaption title / description placed above a table. Renders as a `<caption>` element.
5
5
  *
6
- * @param props - TableCaption component properties
6
+ * Accepts all standard HTML element attributes.
7
7
  *
8
- * **...All valid HTML properties for caption element**
9
- *
10
- * @returns TableCaption JSX element
8
+ * @returns TableCaption JSX element.
11
9
  *
12
10
  * @example
13
11
  * ```tsx
14
- * // Basic table caption
15
- * <TableContainer>
16
- * <TableCaption>
17
- * User Management
18
- * </TableCaption>
19
- * <TableHeader>
20
- * <th>Name</th>
21
- * <th>Email</th>
22
- * </TableHeader>
23
- * <TableBody>
24
- * // table rows...
25
- * </TableBody>
26
- * </TableContainer>
27
- *
28
- * // Table caption with custom styling
29
- * <TableContainer>
30
- * <TableCaption className="highlighted-caption">
31
- * Sales Report - Q4 2024
32
- * </TableCaption>
33
- * <TableHeader>
34
- * <th>Product</th>
35
- * <th>Revenue</th>
36
- * </TableHeader>
37
- * <TableBody>
38
- * // table rows...
39
- * </TableBody>
40
- * </TableContainer>
41
- *
42
- * // Caption with rich content
43
12
  * <TableContainer>
44
- * <TableCaption>
45
- * <h3>Employee Directory</h3>
46
- * <p>Updated: {new Date().toLocaleDateString()}</p>
47
- * </TableCaption>
48
- * <TableHeader>
49
- * <th>Employee ID</th>
50
- * <th>Name</th>
51
- * <th>Department</th>
52
- * </TableHeader>
53
- * <TableBody>
54
- * // table rows...
55
- * </TableBody>
13
+ * <TableCaption>Orders — Q2 2025</TableCaption>
14
+ * <TableHeader>...</TableHeader>
15
+ * <TableBody>...</TableBody>
56
16
  * </TableContainer>
57
17
  * ```
58
18
  */
@@ -2,60 +2,31 @@ import { TableHTMLAttributes } from "react";
2
2
  import "./styles.css";
3
3
  type TableContainerProps = TableHTMLAttributes<HTMLTableElement>;
4
4
  /**
5
- * TableContainer component - wraps table content in a styled container with responsive behavior
5
+ * TableContainer root wrapper for the Table component set. Renders a responsive scrollable container around a `<table>`.
6
6
  *
7
- * @param props - TableContainer component properties
7
+ * Accepts all standard HTML `<table>` attributes.
8
8
  *
9
- * **...All valid HTML properties for table element**
10
- *
11
- * @returns TableContainer JSX element
9
+ * @returns TableContainer JSX element.
12
10
  *
13
11
  * @example
14
12
  * ```tsx
15
- * // Basic table container
16
13
  * <TableContainer>
14
+ * <TableCaption>Users</TableCaption>
17
15
  * <TableHeader>
18
16
  * <th>Name</th>
19
17
  * <th>Email</th>
20
- * </TableHeader>
21
- * <TableBody>
22
- * <tr>
23
- * <td>John Doe</td>
24
- * <td>john@example.com</td>
25
- * </tr>
26
- * </TableBody>
27
- * </TableContainer>
28
- *
29
- * // Table container with custom styling
30
- * <TableContainer className="custom-table">
31
- * <TableCaption>
32
- * User Management Table
33
- * </TableCaption>
34
- * <TableHeader>
35
- * <th>ID</th>
36
- * <th>User</th>
37
18
  * <th>Status</th>
38
19
  * </TableHeader>
39
20
  * <TableBody emptyMessage="No users found">
40
- * // table rows...
41
- * </TableBody>
42
- * <TableFooter>
43
- * <Pagination />
44
- * </TableFooter>
45
- * </TableContainer>
46
- *
47
- * // Responsive table with overflow handling
48
- * <TableContainer style={{ maxWidth: '100%', overflowX: 'auto' }}>
49
- * <TableHeader>
50
- * <th>Product</th>
51
- * <th>Description</th>
52
- * <th>Price</th>
53
- * <th>Stock</th>
54
- * <th>Actions</th>
55
- * </TableHeader>
56
- * <TableBody>
57
- * // table rows...
21
+ * {users.map(u => (
22
+ * <tr key={u.id}>
23
+ * <td>{u.name}</td>
24
+ * <td>{u.email}</td>
25
+ * <td>{u.status}</td>
26
+ * </tr>
27
+ * ))}
58
28
  * </TableBody>
29
+ * <TableFooter><Pagination /></TableFooter>
59
30
  * </TableContainer>
60
31
  * ```
61
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,cAAc,CAAC;AAEtB,KAAK,mBAAmB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CASjD;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,cAAc,CAAC;AAEtB,KAAK,mBAAmB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CASjD;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1,60 +1,31 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "./styles.css";
3
3
  /**
4
- * TableContainer component - wraps table content in a styled container with responsive behavior
4
+ * TableContainer root wrapper for the Table component set. Renders a responsive scrollable container around a `<table>`.
5
5
  *
6
- * @param props - TableContainer component properties
6
+ * Accepts all standard HTML `<table>` attributes.
7
7
  *
8
- * **...All valid HTML properties for table element**
9
- *
10
- * @returns TableContainer JSX element
8
+ * @returns TableContainer JSX element.
11
9
  *
12
10
  * @example
13
11
  * ```tsx
14
- * // Basic table container
15
12
  * <TableContainer>
13
+ * <TableCaption>Users</TableCaption>
16
14
  * <TableHeader>
17
15
  * <th>Name</th>
18
16
  * <th>Email</th>
19
- * </TableHeader>
20
- * <TableBody>
21
- * <tr>
22
- * <td>John Doe</td>
23
- * <td>john@example.com</td>
24
- * </tr>
25
- * </TableBody>
26
- * </TableContainer>
27
- *
28
- * // Table container with custom styling
29
- * <TableContainer className="custom-table">
30
- * <TableCaption>
31
- * User Management Table
32
- * </TableCaption>
33
- * <TableHeader>
34
- * <th>ID</th>
35
- * <th>User</th>
36
17
  * <th>Status</th>
37
18
  * </TableHeader>
38
19
  * <TableBody emptyMessage="No users found">
39
- * // table rows...
40
- * </TableBody>
41
- * <TableFooter>
42
- * <Pagination />
43
- * </TableFooter>
44
- * </TableContainer>
45
- *
46
- * // Responsive table with overflow handling
47
- * <TableContainer style={{ maxWidth: '100%', overflowX: 'auto' }}>
48
- * <TableHeader>
49
- * <th>Product</th>
50
- * <th>Description</th>
51
- * <th>Price</th>
52
- * <th>Stock</th>
53
- * <th>Actions</th>
54
- * </TableHeader>
55
- * <TableBody>
56
- * // table rows...
20
+ * {users.map(u => (
21
+ * <tr key={u.id}>
22
+ * <td>{u.name}</td>
23
+ * <td>{u.email}</td>
24
+ * <td>{u.status}</td>
25
+ * </tr>
26
+ * ))}
57
27
  * </TableBody>
28
+ * <TableFooter><Pagination /></TableFooter>
58
29
  * </TableContainer>
59
30
  * ```
60
31
  */