@councilbox/councilbox-ui 2.0.53 → 2.0.55

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 (311) hide show
  1. package/Accordion.js +3 -0
  2. package/Alert.js +3 -0
  3. package/Avatar.js +3 -0
  4. package/AvatarGroup.js +3 -0
  5. package/Block.js +3 -0
  6. package/Button.js +3 -0
  7. package/ButtonBasic.js +3 -0
  8. package/Checkbox.js +3 -0
  9. package/DatePicker.js +3 -0
  10. package/DateRangePicker.js +3 -0
  11. package/DateTimePicker.js +3 -0
  12. package/DragDrop.js +3 -0
  13. package/DrawerPanel.js +3 -0
  14. package/DropDown.js +3 -0
  15. package/EnhancedTable.js +3 -0
  16. package/FabButton.js +3 -0
  17. package/Grid.js +3 -0
  18. package/Header.js +3 -0
  19. package/IconButton.js +3 -0
  20. package/IconButtonSquare.js +3 -0
  21. package/IconFont.js +3 -0
  22. package/InputAutocomplete.js +3 -0
  23. package/InputPassword.js +3 -0
  24. package/InputText.js +3 -0
  25. package/InputTextArea.js +3 -0
  26. package/LoadingSection.js +3 -0
  27. package/MenuItem.js +3 -0
  28. package/MenuLateralLeft.js +3 -0
  29. package/MenuLateralRight.js +3 -0
  30. package/Modal.js +3 -0
  31. package/Radio.js +3 -0
  32. package/RichTextInput.js +3 -0
  33. package/Scrollbar.js +3 -0
  34. package/ScrollbarNew.js +3 -0
  35. package/SelectInput.js +3 -0
  36. package/Slider.js +3 -0
  37. package/Spacing.js +3 -0
  38. package/Stars.js +3 -0
  39. package/Stepper.js +3 -0
  40. package/Table.js +3 -0
  41. package/TableBody.js +3 -0
  42. package/TableCell.js +3 -0
  43. package/TableContainer.js +3 -0
  44. package/TableHead.js +3 -0
  45. package/TableRow.js +3 -0
  46. package/TableSortLabel.js +3 -0
  47. package/Tabs.js +3 -0
  48. package/Tag.js +3 -0
  49. package/TextInput.js +3 -0
  50. package/ThemeProvider.js +3 -0
  51. package/TimePicker.js +3 -0
  52. package/Timeline.js +3 -0
  53. package/ToastProvider.js +3 -0
  54. package/Toggle.js +3 -0
  55. package/Tooltip.js +3 -0
  56. package/Typography.js +3 -0
  57. package/dist/HOCs/overlayA11yStack.js +47 -0
  58. package/dist/HOCs/useA11yGuard.js +38 -0
  59. package/dist/HOCs/useDynamicStyles.js +41 -60
  60. package/dist/HOCs/useMenuNavigation.js +110 -0
  61. package/dist/HOCs/useOverlay.js +87 -0
  62. package/dist/HOCs/usePopoverPosition.js +228 -0
  63. package/dist/HOCs/useRipple.js +17 -35
  64. package/dist/HOCs/useWindowSize.js +24 -42
  65. package/dist/build-index.js +119 -99
  66. package/dist/components/1.Introduction.stories.mdx +4 -1
  67. package/dist/components/2.Changelog.stories.mdx +54 -0
  68. package/dist/components/3.Guide.stories.mdx +1 -1
  69. package/dist/components/Accordion/Accordion.css +7 -0
  70. package/dist/components/Accordion/Accordion.js +97 -102
  71. package/dist/components/Accordion/Accordion.stories.js +10 -12
  72. package/dist/components/Accordion/DesignAccordion.stories.js +10 -21
  73. package/dist/components/Alert/Alert.js +55 -55
  74. package/dist/components/Alert/Alert.stories.js +10 -11
  75. package/dist/components/Avatar/Avatar.js +82 -74
  76. package/dist/components/Avatar/Avatar.stories.js +19 -23
  77. package/dist/components/Avatar/DesignAvatar.stories.js +18 -26
  78. package/dist/components/Avatar/DesignAvatarText.stories.js +31 -40
  79. package/dist/components/AvatarGroup/AvatarGroup.js +7 -14
  80. package/dist/components/AvatarGroup/AvatarGroup.stories.js +6 -13
  81. package/dist/components/AvatarGroup/DesignAvatarGroup.stories.js +34 -45
  82. package/dist/components/Block/Block.css +3 -3
  83. package/dist/components/Block/Block.js +31 -45
  84. package/dist/components/Block/Block.stories.js +5 -12
  85. package/dist/components/Block/DesignBlock.stories.js +7 -13
  86. package/dist/components/Button/Button.js +44 -66
  87. package/dist/components/Button/Button.stories.js +8 -14
  88. package/dist/components/Button/button.css +1 -1
  89. package/dist/components/ButtonBasic/ButtonBasic.css +6 -1
  90. package/dist/components/ButtonBasic/ButtonBasic.js +96 -118
  91. package/dist/components/ButtonBasic/ButtonBasic.stories.js +14 -15
  92. package/dist/components/Checkbox/Checkbox.css +6 -0
  93. package/dist/components/Checkbox/Checkbox.js +81 -100
  94. package/dist/components/Checkbox/Checkbox.stories.js +10 -11
  95. package/dist/components/DatePicker/Calendar.js +243 -0
  96. package/dist/components/DatePicker/DatePicker.css +197 -0
  97. package/dist/components/DatePicker/DatePicker.js +384 -0
  98. package/dist/components/DatePicker/DatePicker.stories.js +180 -0
  99. package/dist/components/DatePicker/dateUtils.js +478 -0
  100. package/dist/components/DateRangePicker/DateRangePicker.css +41 -0
  101. package/dist/components/DateRangePicker/DateRangePicker.js +435 -0
  102. package/dist/components/DateRangePicker/DateRangePicker.stories.js +147 -0
  103. package/dist/components/DateRangePicker/RangeCalendar.js +188 -0
  104. package/dist/components/DateTimePicker/DateTimePicker.css +4 -0
  105. package/dist/components/DateTimePicker/DateTimePicker.js +481 -0
  106. package/dist/components/DateTimePicker/DateTimePicker.stories.js +144 -0
  107. package/dist/components/DateTimePicker/TimeColumns.css +46 -0
  108. package/dist/components/DateTimePicker/TimeColumns.js +175 -0
  109. package/dist/components/DragDrop/DragDrop.css +20 -9
  110. package/dist/components/DragDrop/DragDrop.js +83 -76
  111. package/dist/components/DragDrop/DragDrop.stories.js +9 -16
  112. package/dist/components/DrawerPanel/DesignDrawerPanel.js +35 -53
  113. package/dist/components/DrawerPanel/DrawerPanel.js +157 -146
  114. package/dist/components/DrawerPanel/DrawerPanel.stories.js +10 -12
  115. package/dist/components/DropDown/DesignDropDown.stories.js +87 -97
  116. package/dist/components/DropDown/DropDown.js +179 -343
  117. package/dist/components/DropDown/DropDown.stories.js +6 -12
  118. package/dist/components/DropDown/PopoverPlayground.js +68 -98
  119. package/dist/components/EnhancedTable/DesignEnhancedTable.stories.js +26 -36
  120. package/dist/components/EnhancedTable/EnhancedMyTable.js +16 -19
  121. package/dist/components/EnhancedTable/EnhancedTable.js +77 -136
  122. package/dist/components/EnhancedTable/EnhancedTable.stories.js +5 -12
  123. package/dist/components/EnhancedTable/EnhancedTableBody.js +11 -14
  124. package/dist/components/EnhancedTable/EnhancedTableCell.js +25 -34
  125. package/dist/components/EnhancedTable/EnhancedTableContainer.js +11 -14
  126. package/dist/components/EnhancedTable/EnhancedTableHead.js +11 -14
  127. package/dist/components/EnhancedTable/EnhancedTableRow.js +15 -18
  128. package/dist/components/EnhancedTable/EnhancedTableSortLabel.js +15 -18
  129. package/dist/components/FabButton/DesignFabButton.stories.js +9 -16
  130. package/dist/components/FabButton/FabButton.js +51 -54
  131. package/dist/components/FabButton/FabButton.stories.js +10 -12
  132. package/dist/components/Grid/DesignGrid.stories.js +7 -14
  133. package/dist/components/Grid/Grid.js +38 -46
  134. package/dist/components/Grid/Grid.stories.js +6 -13
  135. package/dist/components/Grid/GridItem.js +37 -39
  136. package/dist/components/Header/DesignHeader.stories.js +20 -24
  137. package/dist/components/Header/Header.js +227 -246
  138. package/dist/components/Header/Header.stories.js +9 -21
  139. package/dist/components/Header/header.css +10 -5
  140. package/dist/components/IconButton/DesignIconButton.stories.js +31 -36
  141. package/dist/components/IconButton/IconButton.css +6 -1
  142. package/dist/components/IconButton/IconButton.js +135 -140
  143. package/dist/components/IconButton/IconButton.stories.js +12 -13
  144. package/dist/components/IconButtonSquare/DesignIconButtonSquare.stories.js +5 -11
  145. package/dist/components/IconButtonSquare/IconButtonSquare.js +14 -28
  146. package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +7 -13
  147. package/dist/components/IconFont/IconFont.js +27 -48
  148. package/dist/components/IconFont/IconFont.stories.js +5 -11
  149. package/dist/components/InputAutocomplete/InputAutocomplete.css +6 -0
  150. package/dist/components/InputAutocomplete/InputAutocomplete.js +184 -260
  151. package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +5 -11
  152. package/dist/components/InputPassword/InputPassword.css +0 -6
  153. package/dist/components/InputPassword/InputPassword.js +58 -73
  154. package/dist/components/InputPassword/InputPassword.stories.js +5 -11
  155. package/dist/components/InputText/InputText.css +96 -83
  156. package/dist/components/InputText/InputText.js +211 -215
  157. package/dist/components/InputText/InputText.stories.js +11 -11
  158. package/dist/components/InputTextArea/DesignInputTextArea.stories.js +38 -51
  159. package/dist/components/InputTextArea/InputTextArea.js +84 -93
  160. package/dist/components/InputTextArea/InputTextArea.stories.js +5 -12
  161. package/dist/components/LoadingSection/LoadingSection.js +44 -51
  162. package/dist/components/LoadingSection/LoadingSection.stories.js +5 -11
  163. package/dist/components/MenuItem/DesignMenuItem.stories.js +20 -34
  164. package/dist/components/MenuItem/MenuItem.css +7 -2
  165. package/dist/components/MenuItem/MenuItem.js +131 -140
  166. package/dist/components/MenuItem/MenuItem.stories.js +6 -15
  167. package/dist/components/MenuLateralLeft/MenuLateralLeft.css +24 -0
  168. package/dist/components/MenuLateralLeft/MenuLateralLeft.js +120 -157
  169. package/dist/components/MenuLateralLeft/MenuLateralLeft.stories.js +5 -12
  170. package/dist/components/MenuLateralRight/MenuLateralRight.css +2 -2
  171. package/dist/components/MenuLateralRight/MenuLateralRight.js +91 -79
  172. package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +5 -12
  173. package/dist/components/Modal/DesignModal.stories.js +15 -30
  174. package/dist/components/Modal/Modal.css +35 -15
  175. package/dist/components/Modal/Modal.js +156 -145
  176. package/dist/components/Modal/Modal.stories.js +7 -16
  177. package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +4 -10
  178. package/dist/components/PaginationFooter/PaginationFooter.css +10 -0
  179. package/dist/components/PaginationFooter/PaginationFooter.js +99 -91
  180. package/dist/components/PaginationFooter/PaginationFooter.stories.js +5 -12
  181. package/dist/components/RadioButton/Radio.css +19 -18
  182. package/dist/components/RadioButton/Radio.js +65 -83
  183. package/dist/components/RadioButton/Radio.stories.js +27 -36
  184. package/dist/components/RichTextInput/DesignRichTextInput.stories.js +119 -0
  185. package/dist/components/RichTextInput/RichTextInput.css +309 -0
  186. package/dist/components/RichTextInput/RichTextInput.js +851 -0
  187. package/dist/components/RichTextInput/RichTextInput.stories.js +33 -0
  188. package/dist/components/Ripple/DesignRipple.js +42 -41
  189. package/dist/components/Ripple/Ripple.stories.js +5 -11
  190. package/dist/components/Scrollbar/DesignScrollbar.js +5 -10
  191. package/dist/components/Scrollbar/Scrollbar.js +37 -56
  192. package/dist/components/Scrollbar/Scrollbar.stories.js +5 -12
  193. package/dist/components/ScrollbarNew/DesignScrollbarNew.js +24 -0
  194. package/dist/components/ScrollbarNew/ScrollbarNew.css +79 -0
  195. package/dist/components/ScrollbarNew/ScrollbarNew.js +426 -0
  196. package/dist/components/ScrollbarNew/ScrollbarNew.stories.js +37 -0
  197. package/dist/components/SelectInput/DesignSelectInput.js +22 -45
  198. package/dist/components/SelectInput/SelectInput.js +171 -218
  199. package/dist/components/SelectInput/SelectInput.stories.js +6 -15
  200. package/dist/components/Slider/DesignSlider.js +8 -14
  201. package/dist/components/Slider/Slider.css +57 -37
  202. package/dist/components/Slider/Slider.js +85 -84
  203. package/dist/components/Slider/Slider.stories.js +5 -12
  204. package/dist/components/Spacing/Spacing.js +38 -45
  205. package/dist/components/Spacing/Spacing.stories.js +5 -11
  206. package/dist/components/Stars/DesignStars.js +17 -30
  207. package/dist/components/Stars/Stars.css +55 -104
  208. package/dist/components/Stars/Stars.js +89 -73
  209. package/dist/components/Stars/Stars.stories.js +5 -12
  210. package/dist/components/Stepper/DesignStepper.stories.js +16 -30
  211. package/dist/components/Stepper/Stepper.css +46 -10
  212. package/dist/components/Stepper/Stepper.js +118 -134
  213. package/dist/components/Stepper/Stepper.stories.js +5 -12
  214. package/dist/components/Table/DesignTable.stories.js +200 -211
  215. package/dist/components/Table/Table.css +33 -2
  216. package/dist/components/Table/Table.js +30 -38
  217. package/dist/components/Table/Table.stories.js +5 -12
  218. package/dist/components/Table/TableBody.js +22 -34
  219. package/dist/components/Table/TableCell.js +71 -61
  220. package/dist/components/Table/TableContainer.js +22 -34
  221. package/dist/components/Table/TableHead.js +22 -34
  222. package/dist/components/Table/TableRow.js +33 -37
  223. package/dist/components/Table/TableSortLabel.js +42 -52
  224. package/dist/components/Tabs/DesignTabs.js +14 -28
  225. package/dist/components/Tabs/Tabs.css +30 -11
  226. package/dist/components/Tabs/Tabs.js +151 -138
  227. package/dist/components/Tabs/Tabs.stories.js +5 -12
  228. package/dist/components/Tag/DesignTags.stories.js +24 -39
  229. package/dist/components/Tag/Tag.css +61 -42
  230. package/dist/components/Tag/Tag.js +93 -91
  231. package/dist/components/Tag/Tag.stories.js +5 -12
  232. package/dist/components/TextInput/TextInput.js +38 -54
  233. package/dist/components/TextInput/TextInput.stories.js +5 -11
  234. package/dist/components/ThemeProvider/Colors.js +2 -2
  235. package/dist/components/ThemeProvider/CouncilboxThemeContext.js +7 -10
  236. package/dist/components/ThemeProvider/ThemeProvider.js +34 -52
  237. package/dist/components/TimePicker/TimePicker.css +3 -0
  238. package/dist/components/TimePicker/TimePicker.js +359 -0
  239. package/dist/components/TimePicker/TimePicker.stories.js +132 -0
  240. package/dist/components/Timeline/DesignTimeline.stories.js +4 -10
  241. package/dist/components/Timeline/Timeline.js +66 -46
  242. package/dist/components/Timeline/Timeline.stories.js +5 -12
  243. package/dist/components/Toast/DesignToast.stories.js +174 -0
  244. package/dist/components/Toast/Toast.css +154 -0
  245. package/dist/components/Toast/Toast.js +165 -0
  246. package/dist/components/Toast/Toast.stories.js +33 -0
  247. package/dist/components/Toast/ToastProvider.js +33 -0
  248. package/dist/components/Toast/ToastRoot.js +89 -0
  249. package/dist/components/Toast/toastStore.js +127 -0
  250. package/dist/components/Toast/useToast.js +42 -0
  251. package/dist/components/Toggle/Toggle.css +10 -0
  252. package/dist/components/Toggle/Toggle.js +123 -100
  253. package/dist/components/Toggle/Toggle.stories.js +10 -11
  254. package/dist/components/Tooltip/DesignTooltip.stories.js +10 -16
  255. package/dist/components/Tooltip/Tooltip.css +17 -1
  256. package/dist/components/Tooltip/Tooltip.js +195 -366
  257. package/dist/components/Tooltip/Tooltip.stories.js +5 -12
  258. package/dist/components/Typography/Typography.css +57 -6
  259. package/dist/components/Typography/Typography.js +44 -97
  260. package/dist/components/Typography/Typography.stories.js +5 -11
  261. package/dist/index.js +2 -6
  262. package/dist/reportWebVitals.js +8 -14
  263. package/dist/storybook.test.js +2 -4
  264. package/dist/styles/colorConsts.css +4 -4
  265. package/dist/styles/main.css +16 -0
  266. package/dist/styles/styleFont.css +1 -1
  267. package/dist/styles/stylesheet.js +10 -22
  268. package/dist/styles/zIndexConsts.css +2 -0
  269. package/dist/testing/TestAutocomplete.js +74 -97
  270. package/dist/testing/TestComponents.js +5 -10
  271. package/dist/testing/TestDropdown.js +33 -41
  272. package/dist/utils/autoDetectScroll.js +12 -35
  273. package/dist/utils/index.js +37 -63
  274. package/dist/utils/useFallbackId.js +19 -0
  275. package/package.json +67 -4
  276. package/toast.js +7 -0
  277. package/useCouncilboxTheme.js +7 -0
  278. package/useToast.js +7 -0
  279. package/dist/components/Accordion/AccordionOld.css +0 -16
  280. package/dist/components/Accordion/AccordionOld.js +0 -115
  281. package/dist/components/Avatar/AvatarOld.js +0 -138
  282. package/dist/components/ButtonBasic/ButtonBasicOld.css +0 -41
  283. package/dist/components/ButtonBasic/ButtonBasicOld.js +0 -231
  284. package/dist/components/Checkbox/CheckboxOld.css +0 -31
  285. package/dist/components/Checkbox/CheckboxOld.js +0 -112
  286. package/dist/components/DrawerPanel/DrawerPanelOld.css +0 -56
  287. package/dist/components/DrawerPanel/DrawerPanelOld.js +0 -233
  288. package/dist/components/DropDown/DropDownOld.css +0 -3
  289. package/dist/components/DropDown/DropDownOld.js +0 -186
  290. package/dist/components/Grid/GridItemOld.js +0 -43
  291. package/dist/components/Grid/GridOld.css +0 -0
  292. package/dist/components/Grid/GridOld.js +0 -53
  293. package/dist/components/IconButton/IconButtonOld.css +0 -0
  294. package/dist/components/IconButton/IconButtonOld.js +0 -138
  295. package/dist/components/IconButtonSquare/IconButtonSquareOld.css +0 -43
  296. package/dist/components/IconButtonSquare/IconButtonSquareOld.js +0 -133
  297. package/dist/components/InputAutocomplete/InputAutocompleteOld.css +0 -5
  298. package/dist/components/InputAutocomplete/InputAutocompleteOld.js +0 -178
  299. package/dist/components/InputText/InputTextOld.css +0 -10
  300. package/dist/components/InputText/InputTextOld.js +0 -340
  301. package/dist/components/MenuItem/MenuItemOld.js +0 -139
  302. package/dist/components/Modal/ModalOld.css +0 -3
  303. package/dist/components/Modal/ModalOld.js +0 -230
  304. package/dist/components/RadioButton/RadioOld.css +0 -31
  305. package/dist/components/RadioButton/RadioOld.js +0 -142
  306. package/dist/components/SelectInput/SelectInputOld.css +0 -17
  307. package/dist/components/SelectInput/SelectInputOld.js +0 -325
  308. package/dist/components/Table/TableOld.css +0 -79
  309. package/dist/components/Table/TableOld.js +0 -165
  310. package/dist/components/Tabs/TabsOld.js +0 -92
  311. package/dist/components/Typography/TypographyOld.js +0 -132
package/Accordion.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Accordion/Accordion');
package/Alert.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Alert/Alert');
package/Avatar.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Avatar/Avatar');
package/AvatarGroup.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/AvatarGroup/AvatarGroup');
package/Block.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Block/Block');
package/Button.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Button/Button');
package/ButtonBasic.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/ButtonBasic/ButtonBasic');
package/Checkbox.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Checkbox/Checkbox');
package/DatePicker.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/DatePicker/DatePicker');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/DateRangePicker/DateRangePicker');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/DateTimePicker/DateTimePicker');
package/DragDrop.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/DragDrop/DragDrop');
package/DrawerPanel.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/DrawerPanel/DrawerPanel');
package/DropDown.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/DropDown/DropDown');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/EnhancedTable/EnhancedTable');
package/FabButton.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/FabButton/FabButton');
package/Grid.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Grid/Grid');
package/Header.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Header/Header');
package/IconButton.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/IconButton/IconButton');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/IconButtonSquare/IconButtonSquare');
package/IconFont.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/IconFont/IconFont');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/InputAutocomplete/InputAutocomplete');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/InputPassword/InputPassword');
package/InputText.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/InputText/InputText');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/InputTextArea/InputTextArea');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/LoadingSection/LoadingSection');
package/MenuItem.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/MenuItem/MenuItem');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/MenuLateralLeft/MenuLateralLeft');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/MenuLateralRight/MenuLateralRight');
package/Modal.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Modal/Modal');
package/Radio.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/RadioButton/Radio');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/RichTextInput/RichTextInput');
package/Scrollbar.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Scrollbar/Scrollbar');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/ScrollbarNew/ScrollbarNew');
package/SelectInput.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/SelectInput/SelectInput');
package/Slider.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Slider/Slider');
package/Spacing.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Spacing/Spacing');
package/Stars.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Stars/Stars');
package/Stepper.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Stepper/Stepper');
package/Table.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Table/Table');
package/TableBody.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Table/TableBody');
package/TableCell.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Table/TableCell');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Table/TableContainer');
package/TableHead.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Table/TableHead');
package/TableRow.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Table/TableRow');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Table/TableSortLabel');
package/Tabs.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Tabs/Tabs');
package/Tag.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Tag/Tag');
package/TextInput.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/TextInput/TextInput');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/ThemeProvider/ThemeProvider');
package/TimePicker.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/TimePicker/TimePicker');
package/Timeline.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Timeline/Timeline');
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Toast/ToastProvider');
package/Toggle.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Toggle/Toggle');
package/Tooltip.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Tooltip/Tooltip');
package/Typography.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('./dist/components/Typography/Typography');
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.unregisterOverlay = exports.registerOverlay = void 0;
7
+ var overlayStack = [];
8
+ var originalAriaHidden = new WeakMap();
9
+ var currentlyModified = new Set();
10
+ var applyInertState = function applyInertState() {
11
+ var topOverlay = overlayStack[overlayStack.length - 1];
12
+ var children = Array.from(document.body.children);
13
+ children.forEach(function (child) {
14
+ var shouldBeInert = topOverlay ? child !== topOverlay : false;
15
+ if (shouldBeInert) {
16
+ if (!currentlyModified.has(child)) {
17
+ originalAriaHidden.set(child, child.getAttribute('aria-hidden'));
18
+ currentlyModified.add(child);
19
+ }
20
+ child.setAttribute('aria-hidden', 'true');
21
+ child.inert = true;
22
+ } else if (currentlyModified.has(child)) {
23
+ var prev = originalAriaHidden.get(child);
24
+ if (prev) {
25
+ child.setAttribute('aria-hidden', prev);
26
+ } else {
27
+ child.removeAttribute('aria-hidden');
28
+ }
29
+ child.inert = false;
30
+ currentlyModified["delete"](child);
31
+ originalAriaHidden["delete"](child);
32
+ }
33
+ });
34
+ };
35
+ var registerOverlay = function registerOverlay(node) {
36
+ if (!node || overlayStack.includes(node)) return;
37
+ overlayStack.push(node);
38
+ applyInertState();
39
+ };
40
+ exports.registerOverlay = registerOverlay;
41
+ var unregisterOverlay = function unregisterOverlay(node) {
42
+ var idx = overlayStack.indexOf(node);
43
+ if (idx === -1) return;
44
+ overlayStack.splice(idx, 1);
45
+ applyInertState();
46
+ };
47
+ exports.unregisterOverlay = unregisterOverlay;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useA11yGuard = void 0;
7
+ var _CouncilboxThemeContext = require("../components/ThemeProvider/CouncilboxThemeContext");
8
+ /**
9
+ * Hook para forzar textos accesibles en componentes de la librería.
10
+ *
11
+ * - accesibilityStrict = false (default) -> no-op, nunca hace nada.
12
+ * - accesibilityStrict = true -> si falta el texto, lanza un Error con el máximo
13
+ * contexto posible para localizar el componente exacto en el árbol.
14
+ *
15
+ */
16
+ var useA11yGuard = function useA11yGuard() {
17
+ var _useCouncilboxTheme = (0, _CouncilboxThemeContext.useCouncilboxTheme)(),
18
+ options = _useCouncilboxTheme.options;
19
+ var strict = options === null || options === void 0 ? void 0 : options.accesibilityStrict;
20
+ var requireAccessibleText = function requireAccessibleText(value) {
21
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
22
+ component = _ref.component,
23
+ prop = _ref.prop,
24
+ hint = _ref.hint,
25
+ receivedProps = _ref.receivedProps;
26
+ if (!strict) return;
27
+ var isMissing = value === undefined || value === null || value === '';
28
+ if (!isMissing) return;
29
+ var propsDump = receivedProps ? "\nReceived props: ".concat(JSON.stringify(receivedProps, null, 2)) : '';
30
+ var message = ["[@councilbox/councilbox-ui] Accessibility violation in <".concat(component, ">"), "Missing: ".concat(prop), hint ? "Reason: ".concat(hint) : null, "Received value: ".concat(JSON.stringify(value)), propsDump].filter(Boolean).join('\n');
31
+ throw new Error(message);
32
+ };
33
+ return {
34
+ requireAccessibleText: requireAccessibleText,
35
+ strict: strict
36
+ };
37
+ };
38
+ exports.useA11yGuard = useA11yGuard;
@@ -3,33 +3,22 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
7
-
6
+ exports["default"] = void 0;
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
-
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
14
10
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
-
16
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
-
18
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
19
-
20
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
21
-
22
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
-
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }
13
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
14
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
24
15
  var useDynamicStyles = function useDynamicStyles() {
25
16
  var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
26
-
27
- var _React$useState = _react.default.useState({}),
28
- _React$useState2 = _slicedToArray(_React$useState, 2),
29
- stylesInLine = _React$useState2[0],
30
- setStylesInline = _React$useState2[1];
31
-
32
- var uniqueIdentifier = _react.default.useMemo(function () {
17
+ var _React$useState = _react["default"].useState({}),
18
+ _React$useState2 = _slicedToArray(_React$useState, 2),
19
+ stylesInLine = _React$useState2[0],
20
+ setStylesInline = _React$useState2[1];
21
+ var uniqueIdentifier = _react["default"].useMemo(function () {
33
22
  var alphabet = 'abcdefghijklmnopqrstuvwxyz';
34
23
  return Array.from({
35
24
  length: 4
@@ -37,63 +26,55 @@ var useDynamicStyles = function useDynamicStyles() {
37
26
  return alphabet[Math.floor(Math.random() * alphabet.length)];
38
27
  }).join('');
39
28
  }, []);
40
-
41
- var unifyCss = _react.default.useCallback(function (str) {
29
+ var unifyCss = _react["default"].useCallback(function (str) {
42
30
  return str.replace(/[A-Z]/g, function (match) {
43
31
  return "-".concat(match.toLowerCase());
44
32
  });
45
33
  }, []);
46
-
47
- _react.default.useEffect(function () {
48
- var styleElement = document.createElement('style');
49
- styleElement.type = 'text/css';
50
- var css = '';
51
- var inlineStyles = {};
52
- Object.keys(styles).forEach(function (selector) {
53
- var rules = styles[selector];
54
- var uniqueSelector = selector.startsWith('.') ? ".".concat(uniqueIdentifier, "-").concat(selector.slice(1)) : selector;
55
-
56
- if (selector.startsWith('.')) {
57
- css += "".concat(uniqueSelector, " { ").concat(Object.entries(rules).map(function (_ref) {
58
- var _ref2 = _slicedToArray(_ref, 2),
59
- property = _ref2[0],
60
- value = _ref2[1];
61
-
62
- return "".concat(unifyCss(property), ": ").concat(value, ";");
63
- }).join(' '), " }\n");
64
- } else {
65
- inlineStyles[uniqueSelector] = rules;
66
- }
67
- });
34
+ var css = '';
35
+ var inlineStyles = {};
36
+ Object.keys(styles).forEach(function (selector) {
37
+ var rules = styles[selector];
38
+ var uniqueSelector = selector.startsWith('.') ? ".".concat(uniqueIdentifier, "-").concat(selector.slice(1)) : selector;
39
+ if (selector.startsWith('.')) {
40
+ css += "".concat(uniqueSelector, " { ").concat(Object.entries(rules).map(function (_ref) {
41
+ var _ref2 = _slicedToArray(_ref, 2),
42
+ property = _ref2[0],
43
+ value = _ref2[1];
44
+ return "".concat(unifyCss(property), ": ").concat(value, ";");
45
+ }).join(' '), " }\n");
46
+ } else {
47
+ inlineStyles[uniqueSelector] = rules;
48
+ }
49
+ });
50
+ _react["default"].useEffect(function () {
68
51
  setStylesInline(function (prev) {
69
52
  var isSame = JSON.stringify(prev) === JSON.stringify(inlineStyles);
70
53
  return isSame ? prev : inlineStyles;
71
54
  });
72
-
73
- if (css) {
74
- styleElement.innerHTML = css;
75
- document.head.appendChild(styleElement);
76
- }
77
-
55
+ }, [inlineStyles]);
56
+ _react["default"].useEffect(function () {
57
+ if (!css) return undefined;
58
+ var styleElement = document.createElement('style');
59
+ styleElement.type = 'text/css';
60
+ styleElement.innerHTML = css;
61
+ document.head.appendChild(styleElement);
78
62
  return function () {
79
- if (css) document.head.removeChild(styleElement);
63
+ document.head.removeChild(styleElement);
80
64
  };
81
- }, [styles, uniqueIdentifier, unifyCss]);
82
-
83
- var prefixClass = _react.default.useCallback(function (className) {
65
+ }, [css, uniqueIdentifier]);
66
+ var prefixClass = _react["default"].useCallback(function (className) {
84
67
  return className.split(' ').filter(function (cls) {
85
68
  return cls.trim();
86
69
  }).map(function (cls) {
87
70
  return "".concat(cls, " ").concat(uniqueIdentifier, "-").concat(cls);
88
71
  }).join(' ');
89
72
  }, [uniqueIdentifier]);
90
-
91
73
  return {
92
74
  stylesInLine: stylesInLine,
93
75
  uniqueIdentifier: uniqueIdentifier,
94
76
  prefixClass: prefixClass
95
77
  };
96
78
  };
97
-
98
79
  var _default = useDynamicStyles;
99
- exports.default = _default;
80
+ exports["default"] = _default;
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
10
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }
13
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
14
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
15
+ var MENU_ITEM_SELECTOR = '[role="menuitem"]:not([aria-disabled="true"])';
16
+ var useMenuNavigation = function useMenuNavigation(_ref) {
17
+ var open = _ref.open,
18
+ menuRef = _ref.menuRef,
19
+ triggerRef = _ref.triggerRef,
20
+ onClose = _ref.onClose;
21
+ var _React$useState = _react["default"].useState(0),
22
+ _React$useState2 = _slicedToArray(_React$useState, 2),
23
+ activeIndex = _React$useState2[0],
24
+ setActiveIndex = _React$useState2[1];
25
+ var getMenuItems = _react["default"].useCallback(function () {
26
+ if (!menuRef.current) return [];
27
+ return Array.from(menuRef.current.querySelectorAll(MENU_ITEM_SELECTOR));
28
+ }, [menuRef]);
29
+ _react["default"].useEffect(function () {
30
+ if (!open) {
31
+ setActiveIndex(0);
32
+ return;
33
+ }
34
+ var timeout = setTimeout(function () {
35
+ var items = getMenuItems();
36
+ if (items.length) {
37
+ items[0].focus();
38
+ setActiveIndex(0);
39
+ }
40
+ }, 20);
41
+ return function () {
42
+ return clearTimeout(timeout);
43
+ };
44
+ }, [open, getMenuItems]);
45
+ var closeMenu = _react["default"].useCallback(function (event) {
46
+ onClose === null || onClose === void 0 ? void 0 : onClose(event);
47
+ setTimeout(function () {
48
+ var _triggerRef$current;
49
+ (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.focus();
50
+ }, 0);
51
+ }, [onClose, triggerRef]);
52
+ var handleKeyDown = _react["default"].useCallback(function (event) {
53
+ var items = getMenuItems();
54
+ if (!items.length) return;
55
+ var currentIndex = items.indexOf(document.activeElement);
56
+ switch (event.key) {
57
+ case 'ArrowDown':
58
+ {
59
+ event.preventDefault();
60
+ var next = currentIndex < items.length - 1 ? currentIndex + 1 : 0;
61
+ items[next].focus();
62
+ setActiveIndex(next);
63
+ break;
64
+ }
65
+ case 'ArrowUp':
66
+ {
67
+ event.preventDefault();
68
+ var previous = currentIndex > 0 ? currentIndex - 1 : items.length - 1;
69
+ items[previous].focus();
70
+ setActiveIndex(previous);
71
+ break;
72
+ }
73
+ case 'Home':
74
+ {
75
+ event.preventDefault();
76
+ items[0].focus();
77
+ setActiveIndex(0);
78
+ break;
79
+ }
80
+ case 'End':
81
+ {
82
+ event.preventDefault();
83
+ var last = items.length - 1;
84
+ items[last].focus();
85
+ setActiveIndex(last);
86
+ break;
87
+ }
88
+ case 'Escape':
89
+ {
90
+ event.preventDefault();
91
+ closeMenu(event);
92
+ break;
93
+ }
94
+ case 'Tab':
95
+ {
96
+ closeMenu(event);
97
+ break;
98
+ }
99
+ default:
100
+ break;
101
+ }
102
+ }, [getMenuItems, closeMenu]);
103
+ return {
104
+ handleKeyDown: handleKeyDown,
105
+ closeMenu: closeMenu,
106
+ activeIndex: activeIndex
107
+ };
108
+ };
109
+ var _default = useMenuNavigation;
110
+ exports["default"] = _default;