react-asc 25.8.2 → 25.10.0

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 (293) hide show
  1. package/apple-touch-icon.png +0 -0
  2. package/assets/index-5bb661b4.js +100 -0
  3. package/assets/index-b3809a2b.css +1 -0
  4. package/assets/workbox-window.prod.es5-a7b12eab.js +2 -0
  5. package/changelog.md +1510 -0
  6. package/favicon-16x16.png +0 -0
  7. package/favicon-32x32.png +0 -0
  8. package/favicon.ico +0 -0
  9. package/favicon.svg +23 -0
  10. package/index.html +24 -0
  11. package/manifest.webmanifest +1 -0
  12. package/package.json +7 -1
  13. package/pwa-192x192.png +0 -0
  14. package/pwa-512x512.png +0 -0
  15. package/robots.txt +3 -0
  16. package/showcase/alert.description.md +1 -0
  17. package/showcase/alert.md +14 -0
  18. package/showcase/appbar.description.md +1 -0
  19. package/showcase/appbar.md +8 -0
  20. package/showcase/autocomplete.description.md +1 -0
  21. package/showcase/autocomplete.md +49 -0
  22. package/showcase/backdrop.description.md +1 -0
  23. package/showcase/backdrop.md +11 -0
  24. package/showcase/badge.description.md +1 -0
  25. package/showcase/badge.md +8 -0
  26. package/showcase/breadcrumb.description.md +1 -0
  27. package/showcase/breadcrumb.md +5 -0
  28. package/showcase/button.description.md +1 -0
  29. package/showcase/button.md +44 -0
  30. package/showcase/buttongroup.description.md +1 -0
  31. package/showcase/buttongroup.md +5 -0
  32. package/showcase/card.description.md +1 -0
  33. package/showcase/card.md +9 -0
  34. package/showcase/checkbox.description.md +1 -0
  35. package/showcase/checkbox.md +1 -0
  36. package/showcase/chip.description.md +1 -0
  37. package/showcase/chip.md +3 -0
  38. package/showcase/csstransition.md +38 -0
  39. package/showcase/dateselect.md +8 -0
  40. package/showcase/drawer.md +13 -0
  41. package/showcase/expansionpanel.md +40 -0
  42. package/showcase/fileinput.md +1 -0
  43. package/showcase/floatingactionbutton.md +4 -0
  44. package/showcase/form.md +6 -0
  45. package/showcase/grid.md +5 -0
  46. package/showcase/hookuseconstructor.description.md +1 -0
  47. package/showcase/hookuseconstructor.md +5 -0
  48. package/showcase/hookusedebounce.description.md +3 -0
  49. package/showcase/hookusedebounce.md +17 -0
  50. package/showcase/hookusehover.md +11 -0
  51. package/showcase/hookusemobiledetect.description.md +2 -0
  52. package/showcase/hookusemobiledetect.md +11 -0
  53. package/showcase/hookuseondestroy.description.md +1 -0
  54. package/showcase/hookuseondestroy.md +5 -0
  55. package/showcase/hookuseprevious.description.md +1 -0
  56. package/showcase/hookuseprevious.md +14 -0
  57. package/showcase/hookusewindowsize.description.md +2 -0
  58. package/showcase/hookusewindowsize.md +11 -0
  59. package/showcase/icon.md +3 -0
  60. package/showcase/iconbutton.md +5 -0
  61. package/showcase/link.md +1 -0
  62. package/showcase/list.md +98 -0
  63. package/showcase/loadingindicator.md +38 -0
  64. package/showcase/menu.md +17 -0
  65. package/showcase/modal.md +46 -0
  66. package/showcase/numberselect.md +20 -0
  67. package/showcase/progressbar.description.md +1 -0
  68. package/showcase/progressbar.md +3 -0
  69. package/showcase/select.md +20 -0
  70. package/showcase/servicelogger.md +9 -0
  71. package/showcase/skeleton.description.md +5 -0
  72. package/showcase/skeleton.md +5 -0
  73. package/showcase/snackbar.md +22 -0
  74. package/showcase/speeddial.md +43 -0
  75. package/showcase/stepper.description.md +1 -0
  76. package/showcase/stepper.md +40 -0
  77. package/showcase/table.md +30 -0
  78. package/showcase/tabs.md +35 -0
  79. package/showcase/timeselect.md +1 -0
  80. package/showcase/tooltip.md +6 -0
  81. package/showcase/treeview.md +12 -0
  82. package/showcase/typography.md +6 -0
  83. package/sw.js +1 -0
  84. package/workbox-fa446783.js +1 -0
  85. package/index.d.ts +0 -1032
  86. package/index.es.js +0 -7069
  87. package/index.js +0 -7198
  88. package/lib/components/Alert/Alert.d.ts +0 -12
  89. package/lib/components/Alert/index.d.ts +0 -1
  90. package/lib/components/AppBar/AppBar.d.ts +0 -11
  91. package/lib/components/AppBar/AppBarTitle.d.ts +0 -6
  92. package/lib/components/AppBar/index.d.ts +0 -2
  93. package/lib/components/AutoComplete/AutoComplete.d.ts +0 -18
  94. package/lib/components/AutoComplete/index.d.ts +0 -1
  95. package/lib/components/Backdrop/Backdrop.d.ts +0 -6
  96. package/lib/components/Backdrop/index.d.ts +0 -1
  97. package/lib/components/Badge/Badge.d.ts +0 -9
  98. package/lib/components/Badge/index.d.ts +0 -1
  99. package/lib/components/Breadcrumb/Breadcrumb.d.ts +0 -6
  100. package/lib/components/Breadcrumb/BreadcrumbItem.d.ts +0 -6
  101. package/lib/components/Breadcrumb/index.d.ts +0 -2
  102. package/lib/components/Button/Button.d.ts +0 -14
  103. package/lib/components/Button/ButtonContext.d.ts +0 -7
  104. package/lib/components/Button/index.d.ts +0 -2
  105. package/lib/components/ButtonGroup/ButtonGroup.d.ts +0 -6
  106. package/lib/components/ButtonGroup/index.d.ts +0 -1
  107. package/lib/components/Card/Card.d.ts +0 -6
  108. package/lib/components/Card/CardBody.d.ts +0 -2
  109. package/lib/components/Card/CardFooter.d.ts +0 -2
  110. package/lib/components/Card/CardImage.d.ts +0 -2
  111. package/lib/components/Card/CardSubtitle.d.ts +0 -2
  112. package/lib/components/Card/CardText.d.ts +0 -2
  113. package/lib/components/Card/CardTitle.d.ts +0 -6
  114. package/lib/components/Card/index.d.ts +0 -7
  115. package/lib/components/Checkbox/Checkbox.d.ts +0 -7
  116. package/lib/components/Checkbox/index.d.ts +0 -1
  117. package/lib/components/Chip/Chip.d.ts +0 -11
  118. package/lib/components/Chip/index.d.ts +0 -1
  119. package/lib/components/ConditionalWrapper/ConditionalWrapper.d.ts +0 -8
  120. package/lib/components/ConditionalWrapper/index.d.ts +0 -1
  121. package/lib/components/CssTransition/CssTransition.d.ts +0 -8
  122. package/lib/components/CssTransition/index.d.ts +0 -1
  123. package/lib/components/DatePicker/DatePicker.d.ts +0 -10
  124. package/lib/components/DatePicker/index.d.ts +0 -1
  125. package/lib/components/DateSelect/DateSelect.d.ts +0 -17
  126. package/lib/components/DateSelect/DaySelect.d.ts +0 -12
  127. package/lib/components/DateSelect/MonthSelect.d.ts +0 -10
  128. package/lib/components/DateSelect/YearSelect.d.ts +0 -12
  129. package/lib/components/DateSelect/index.d.ts +0 -4
  130. package/lib/components/Drawer/Drawer.d.ts +0 -9
  131. package/lib/components/Drawer/index.d.ts +0 -1
  132. package/lib/components/ExpansionPanel/ExpansionPanel.d.ts +0 -10
  133. package/lib/components/ExpansionPanel/ExpansionPanelContent.d.ts +0 -5
  134. package/lib/components/ExpansionPanel/ExpansionPanelHeader.d.ts +0 -8
  135. package/lib/components/ExpansionPanel/index.d.ts +0 -3
  136. package/lib/components/FileInput/FileInput.d.ts +0 -5
  137. package/lib/components/FileInput/index.d.ts +0 -1
  138. package/lib/components/FloatingActionButton/FloatingActionButton.d.ts +0 -13
  139. package/lib/components/FloatingActionButton/index.d.ts +0 -1
  140. package/lib/components/Form/Form.d.ts +0 -40
  141. package/lib/components/Form/FormError.d.ts +0 -8
  142. package/lib/components/Form/FormGroup.d.ts +0 -7
  143. package/lib/components/Form/FormHint/FormHint.d.ts +0 -2
  144. package/lib/components/Form/FormHint/index.d.ts +0 -1
  145. package/lib/components/Form/FormInput/FormInput.d.ts +0 -29
  146. package/lib/components/Form/FormInput/index.d.ts +0 -1
  147. package/lib/components/Form/FormLabel/FormLabel.d.ts +0 -2
  148. package/lib/components/Form/FormLabel/index.d.ts +0 -1
  149. package/lib/components/Form/form.interfaces.d.ts +0 -40
  150. package/lib/components/Form/form.models.d.ts +0 -12
  151. package/lib/components/Form/form.types.d.ts +0 -2
  152. package/lib/components/Form/index.d.ts +0 -10
  153. package/lib/components/Form/validators/EmailValidtor.d.ts +0 -1
  154. package/lib/components/Form/validators/IsEmptyValidator.d.ts +0 -1
  155. package/lib/components/Form/validators/IsEqualValidator.d.ts +0 -1
  156. package/lib/components/Form/validators/MaxValidator.d.ts +0 -1
  157. package/lib/components/Form/validators/MinValidator.d.ts +0 -1
  158. package/lib/components/Form/validators/index.d.ts +0 -5
  159. package/lib/components/Grid/Column/Column.d.ts +0 -10
  160. package/lib/components/Grid/Column/index.d.ts +0 -1
  161. package/lib/components/Grid/Row/Row.d.ts +0 -5
  162. package/lib/components/Grid/Row/index.d.ts +0 -1
  163. package/lib/components/Grid/index.d.ts +0 -2
  164. package/lib/components/Icon/Icon.d.ts +0 -8
  165. package/lib/components/Icon/index.d.ts +0 -1
  166. package/lib/components/IconButton/IconButton.d.ts +0 -12
  167. package/lib/components/IconButton/index.d.ts +0 -1
  168. package/lib/components/Link/Link.d.ts +0 -2
  169. package/lib/components/Link/Link.test.d.ts +0 -1
  170. package/lib/components/Link/index.d.ts +0 -1
  171. package/lib/components/List/List.d.ts +0 -5
  172. package/lib/components/List/ListItem.d.ts +0 -9
  173. package/lib/components/List/ListItemAction.d.ts +0 -2
  174. package/lib/components/List/ListItemAvatar.d.ts +0 -6
  175. package/lib/components/List/ListItemIcon.d.ts +0 -6
  176. package/lib/components/List/ListItemText.d.ts +0 -8
  177. package/lib/components/List/index.d.ts +0 -6
  178. package/lib/components/List/list.models.d.ts +0 -8
  179. package/lib/components/LoadingIndicator/LoadingIndicator.d.ts +0 -2
  180. package/lib/components/LoadingIndicator/LoadingIndicatorContainer.d.ts +0 -6
  181. package/lib/components/LoadingIndicator/index.d.ts +0 -3
  182. package/lib/components/LoadingIndicator/loading-indicator.service.d.ts +0 -12
  183. package/lib/components/Menu/Menu.d.ts +0 -12
  184. package/lib/components/Menu/MenuBody.d.ts +0 -13
  185. package/lib/components/Menu/MenuContext.d.ts +0 -6
  186. package/lib/components/Menu/MenuDivider.d.ts +0 -2
  187. package/lib/components/Menu/MenuItem.d.ts +0 -3
  188. package/lib/components/Menu/MenuToggle.d.ts +0 -6
  189. package/lib/components/Menu/index.d.ts +0 -6
  190. package/lib/components/Menu/menu.types.d.ts +0 -1
  191. package/lib/components/Modal/GlobalModal.d.ts +0 -21
  192. package/lib/components/Modal/Modal.d.ts +0 -15
  193. package/lib/components/Modal/ModalBody.d.ts +0 -6
  194. package/lib/components/Modal/ModalFooter.d.ts +0 -6
  195. package/lib/components/Modal/ModalHeader.d.ts +0 -8
  196. package/lib/components/Modal/index.d.ts +0 -8
  197. package/lib/components/Modal/modal.enum.d.ts +0 -10
  198. package/lib/components/Modal/modal.interfaces.d.ts +0 -12
  199. package/lib/components/Modal/modal.service.d.ts +0 -22
  200. package/lib/components/NumberSelect/NumberSelect.d.ts +0 -12
  201. package/lib/components/NumberSelect/index.d.ts +0 -1
  202. package/lib/components/Portal/Portal.d.ts +0 -7
  203. package/lib/components/Portal/index.d.ts +0 -1
  204. package/lib/components/ProgressBar/ProgressBar.d.ts +0 -9
  205. package/lib/components/ProgressBar/index.d.ts +0 -1
  206. package/lib/components/Select/Select.d.ts +0 -16
  207. package/lib/components/Select/index.d.ts +0 -1
  208. package/lib/components/Sidebar/Sidebar.d.ts +0 -9
  209. package/lib/components/Sidebar/index.d.ts +0 -2
  210. package/lib/components/Sidebar/sidebar.interfaces.d.ts +0 -9
  211. package/lib/components/Sidebar/sidebar.models.d.ts +0 -11
  212. package/lib/components/Skeleton/SkeletonAvatar.d.ts +0 -5
  213. package/lib/components/Skeleton/SkeletonFooter.d.ts +0 -5
  214. package/lib/components/Skeleton/SkeletonImage.d.ts +0 -5
  215. package/lib/components/Skeleton/SkeletonText.d.ts +0 -5
  216. package/lib/components/Skeleton/index.d.ts +0 -4
  217. package/lib/components/Snackbar/Snackbar.d.ts +0 -9
  218. package/lib/components/Snackbar/index.d.ts +0 -2
  219. package/lib/components/Snackbar/snackbar.service.d.ts +0 -20
  220. package/lib/components/SpeedDial/SpeedDial.d.ts +0 -7
  221. package/lib/components/SpeedDial/SpeedDialAction.d.ts +0 -9
  222. package/lib/components/SpeedDial/SpeedDialActions.d.ts +0 -2
  223. package/lib/components/SpeedDial/SpeedDialIcon.d.ts +0 -6
  224. package/lib/components/SpeedDial/index.d.ts +0 -3
  225. package/lib/components/Stepper/Dot/Dot.d.ts +0 -7
  226. package/lib/components/Stepper/Dot/index.d.ts +0 -1
  227. package/lib/components/Stepper/Step/Step.d.ts +0 -20
  228. package/lib/components/Stepper/Step/index.d.ts +0 -1
  229. package/lib/components/Stepper/StepConnector/StepConnector.d.ts +0 -6
  230. package/lib/components/Stepper/StepPanel/StepPanel.d.ts +0 -5
  231. package/lib/components/Stepper/Stepper.d.ts +0 -20
  232. package/lib/components/Stepper/StepperActions/StepperActions.d.ts +0 -14
  233. package/lib/components/Stepper/StepperActions/index.d.ts +0 -1
  234. package/lib/components/Stepper/index.d.ts +0 -4
  235. package/lib/components/Table/Table.d.ts +0 -8
  236. package/lib/components/Table/TableBody.d.ts +0 -2
  237. package/lib/components/Table/TableCell.d.ts +0 -5
  238. package/lib/components/Table/TableContext.d.ts +0 -6
  239. package/lib/components/Table/TableHead.d.ts +0 -2
  240. package/lib/components/Table/TableRow.d.ts +0 -2
  241. package/lib/components/Table/index.d.ts +0 -5
  242. package/lib/components/Tabs/Tab.d.ts +0 -13
  243. package/lib/components/Tabs/TabContext.d.ts +0 -8
  244. package/lib/components/Tabs/TabIndicator.d.ts +0 -10
  245. package/lib/components/Tabs/TabPanel.d.ts +0 -6
  246. package/lib/components/Tabs/Tabs.d.ts +0 -13
  247. package/lib/components/Tabs/index.d.ts +0 -3
  248. package/lib/components/Textarea/Textarea.d.ts +0 -5
  249. package/lib/components/Textarea/index.d.ts +0 -1
  250. package/lib/components/TimeSelect/HourSelect.d.ts +0 -10
  251. package/lib/components/TimeSelect/MilliSecondSelect.d.ts +0 -11
  252. package/lib/components/TimeSelect/MinuteSelect.d.ts +0 -10
  253. package/lib/components/TimeSelect/SecondSelect.d.ts +0 -10
  254. package/lib/components/TimeSelect/TimeSelect.d.ts +0 -20
  255. package/lib/components/TimeSelect/index.d.ts +0 -5
  256. package/lib/components/Tooltip/Tooltip.d.ts +0 -10
  257. package/lib/components/Tooltip/index.d.ts +0 -2
  258. package/lib/components/Tooltip/tooltip.enums.d.ts +0 -6
  259. package/lib/components/TreeView/TreeItem.d.ts +0 -14
  260. package/lib/components/TreeView/TreeView.d.ts +0 -2
  261. package/lib/components/TreeView/index.d.ts +0 -2
  262. package/lib/components/Typography/Typography.d.ts +0 -12
  263. package/lib/components/Typography/index.d.ts +0 -1
  264. package/lib/components/component.enums.d.ts +0 -26
  265. package/lib/components/component.interfaces.d.ts +0 -18
  266. package/lib/components/index.d.ts +0 -46
  267. package/lib/hooks/index.d.ts +0 -7
  268. package/lib/hooks/useConstructor.d.ts +0 -1
  269. package/lib/hooks/useCssClasses.d.ts +0 -1
  270. package/lib/hooks/useDebounce.d.ts +0 -2
  271. package/lib/hooks/useHover.d.ts +0 -2
  272. package/lib/hooks/useMobileDetect.d.ts +0 -3
  273. package/lib/hooks/useOnDestroy.d.ts +0 -1
  274. package/lib/hooks/useWindowSize.d.ts +0 -5
  275. package/lib/icons/CaretDownSolidIcon.d.ts +0 -2
  276. package/lib/icons/CheckSolidIcon.d.ts +0 -2
  277. package/lib/icons/CheckSquareRegularIcon.d.ts +0 -2
  278. package/lib/icons/ChevronDownSolidIcon.d.ts +0 -2
  279. package/lib/icons/ChevronLeftSolidIcon.d.ts +0 -2
  280. package/lib/icons/ChevronRightSolidIcon.d.ts +0 -2
  281. package/lib/icons/ChevronUpSolidIcon.d.ts +0 -2
  282. package/lib/icons/CircleSolidIcon.d.ts +0 -2
  283. package/lib/icons/HomeSolidIcon.d.ts +0 -2
  284. package/lib/icons/PlusSolidIcon.d.ts +0 -2
  285. package/lib/icons/SpinnerSolidIcon.d.ts +0 -2
  286. package/lib/icons/SquareRegularIcon.d.ts +0 -2
  287. package/lib/icons/TimesCircleSolidIcon.d.ts +0 -2
  288. package/lib/icons/TimesSolidIcon.d.ts +0 -2
  289. package/lib/icons/index.d.ts +0 -14
  290. package/lib/index.d.ts +0 -4
  291. package/lib/interfaces/index.d.ts +0 -1
  292. package/lib/interfaces/interfaces.d.ts +0 -3
  293. package/vite.config.d.ts +0 -2
@@ -0,0 +1,98 @@
1
+ // Simple List
2
+
3
+ <List>
4
+ <ListItem>
5
+ <ListItemText primary="lorem ipsum" />
6
+ </ListItem>
7
+ <ListItem disabled>
8
+ <ListItemText primary="lorem ipsum" />
9
+ </ListItem>
10
+ </List>
11
+
12
+
13
+ // Two Lines
14
+
15
+ <List>
16
+ <ListItem onClick={handleClickItem}>
17
+ <ListItemText
18
+ primary="1st lorem ipsum"
19
+ secondary="2nd lorem ipsum"
20
+ />
21
+ </ListItem>
22
+ <ListItem onClick={handleClickItem}>
23
+ <ListItemText
24
+ primary="1st lorem ipsum"
25
+ secondary="2nd lorem ipsum"
26
+ />
27
+ </ListItem>
28
+ </List>
29
+
30
+
31
+ // Avatar
32
+
33
+ <List >
34
+ <ListItem>
35
+ <ListItemAvatar avatar={<UserCircleSolidIcon />} />
36
+ <ListItemText primary="lorem ipsum" />
37
+ </ListItem>
38
+ <ListItem>
39
+ <ListItemAvatar avatar={<span>2</span>} />
40
+ <ListItemText primary="lorem ipsum" />
41
+ </ListItem>
42
+ </List>
43
+
44
+
45
+ // Icon
46
+
47
+ <List>
48
+ <ListItem>
49
+ <ListItemIcon icon={<HomeSolidIcon />} />
50
+ <ListItemText primary="lorem ipsum" />
51
+ </ListItem>
52
+ </List>
53
+
54
+
55
+ // Action Item
56
+
57
+ <List>
58
+ <ListItem>
59
+ <ListItemText primary="lorem ipsum" />
60
+ <ListItemAction>
61
+ <IconButton
62
+ onClick={handleClickAction}
63
+ icon={<HomeSolidIcon />}
64
+ />
65
+ </ListItemAction>
66
+ </ListItem>
67
+ <ListItem>
68
+ <ListItemText primary="lorem ipsum" />
69
+ <ListItemAction>
70
+ <IconButton
71
+ color={COLOR.primary}
72
+ onClick={handleClickAction}
73
+ icon={<HomeSolidIcon />}
74
+ />
75
+ </ListItemAction>
76
+ </ListItem>
77
+ </List>
78
+
79
+
80
+ // Colors
81
+
82
+ <List>
83
+ <ListItem color={COLOR.primary}>
84
+ primary
85
+ </ListItem>
86
+ <ListItem color={COLOR.accent}>
87
+ accent
88
+ </ListItem>
89
+ <ListItem color={COLOR.secondary}>
90
+ secondary
91
+ </ListItem>
92
+ <ListItem color={COLOR.light}>
93
+ light
94
+ </ListItem>
95
+ <ListItem color={COLOR.dark}>
96
+ dark
97
+ </ListItem>
98
+ </List>
@@ -0,0 +1,38 @@
1
+ // default
2
+
3
+ const [isVisible, setIsVisible] = useState<boolean>(false);
4
+
5
+ return (
6
+ <>
7
+ {isVisible &&
8
+ <LoadingIndicatorContainer>
9
+ <LoadingIndicator />
10
+ </LoadingIndicatorContainer>
11
+ }
12
+
13
+ <Button onClick={() => setIsVisible(true)}>
14
+ show loading indicator
15
+ </Button>
16
+ </>
17
+ )
18
+
19
+
20
+ // by service
21
+ import { Button, loadingIndicatorService } from '..';
22
+
23
+ const LoadingIndicatorExample = () => {
24
+ const handleClick = () => {
25
+ loadingIndicatorService.show();
26
+ setTimeout(() => {
27
+ loadingIndicatorService.hide();
28
+ }, 1000);
29
+ };
30
+
31
+ return (
32
+ <div>
33
+ <Button onClick={handleClick}>
34
+ show loading indicator
35
+ </Button>
36
+ </div>
37
+ );
38
+ }
@@ -0,0 +1,17 @@
1
+ <Menu
2
+ toggle={<Button>Menu Button</Button>}
3
+ >
4
+ <MenuItem type="header">
5
+ This is a header
6
+ </MenuItem>
7
+ <MenuDivider />
8
+ <MenuItem onClick={() => handleClick('1')}>
9
+ Action 1
10
+ </MenuItem>
11
+ <MenuItem onClick={() => handleClick('2')}>
12
+ Action 2
13
+ </MenuItem>
14
+ <MenuItem onClick={() => handleClick('3')}>
15
+ Action 3
16
+ </MenuItem>
17
+ </Menu>
@@ -0,0 +1,46 @@
1
+ // default Modal
2
+
3
+ const MyModalPage = () => {
4
+
5
+ const [isVisible, setIsVisible] = useState(false);
6
+
7
+ return (
8
+ <Button onClick={() => setIsVisible(!isVisible)}>
9
+ show modal
10
+ </Button>
11
+
12
+ {isVisible &&
13
+ <Modal
14
+ header="Modal Header"
15
+ onHeaderCloseClick={() => setIsVisible(!isVisible)}
16
+ >
17
+ some modal content
18
+ </Modal>
19
+ }
20
+ );
21
+ }
22
+
23
+
24
+ // with modalService
25
+
26
+ import { Button, modalService } from 'react-asc';
27
+
28
+ const ModalExample = () => {
29
+
30
+ const handleClick = () => {
31
+ modalService.show('some title', 'some content')
32
+ .then(() =>
33
+ // ok clicked
34
+ )
35
+ .catch(() => {
36
+ // cancel clicked
37
+ });
38
+ };
39
+
40
+ return (
41
+ <Button onClick={handleClick}>
42
+ show modal
43
+ </Button>
44
+ );
45
+ }
46
+
@@ -0,0 +1,20 @@
1
+ import React, { useState } from 'react';
2
+ import { NumberSelect } from 'react-asc';
3
+
4
+ const NumberSelectExample = () => {
5
+
6
+ const [value, setValue] = useState<number>(10);
7
+
8
+ const handleOnChange = (e: number) => {
9
+ setValue(e);
10
+ }
11
+
12
+ return (
13
+ <NumberSelect
14
+ from={10}
15
+ to={20}
16
+ value={value}
17
+ onChange={handleOnChange}
18
+ />
19
+ );
20
+ }
@@ -0,0 +1 @@
1
+ The ProgressBar is a horizontal presentation for indicating progress and activity.
@@ -0,0 +1,3 @@
1
+ <ProgressBar
2
+ value={10}
3
+ />
@@ -0,0 +1,20 @@
1
+ <Select
2
+ options={[
3
+ { value: "1", label: 'one' },
4
+ { value: "2", label: 'two' },
5
+ { value: "3", label: 'three' },
6
+ { value: "4", label: 'four' },
7
+ { value: "5", label: 'five' },
8
+ { value: "6", label: 'six' },
9
+ { value: "7", label: 'seven' },
10
+ { value: "8", label: 'eight' },
11
+ { value: "9", label: 'nine' },
12
+ { value: "10", label: 'ten' },
13
+ { value: "11", label: 'eleven' },
14
+ { value: "12", label: 'twelve' },
15
+ { value: "13", label: 'thirteen' },
16
+ { value: "14", label: 'fourteen' },
17
+ { value: "15", label: 'fifteen' },
18
+ ]}
19
+ onChange={handleOnChange}
20
+ />
@@ -0,0 +1,9 @@
1
+ const MyComponet = () => {
2
+ const handleOnChange = (e: React.ChangeEvent<HTMLInputElement>) => {
3
+ loggerService.log(e);
4
+ }
5
+
6
+ return (
7
+ <input type="text" onChange={handleOnChange} />
8
+ );
9
+ }
@@ -0,0 +1,5 @@
1
+ A skeleton screen is an animated placeholder. <br />
2
+ It simulates the layout while data is being loaded. <br /><br />
3
+
4
+ Also known as: <br />
5
+ Content loaders, skeleton screens, ghost elements, and content placeholders
@@ -0,0 +1,5 @@
1
+ <SkeletonAvatar />
2
+ <SkeletonText className='mt-1' />
3
+ <SkeletonText />
4
+ <SkeletonImage />
5
+ <SkeletonFooter />
@@ -0,0 +1,22 @@
1
+ import { Button, COLOR, snackbarService } from 'react-asc';
2
+
3
+ const SnackbarExample = () => {
4
+
5
+ const handleClick = () => {
6
+ snackbarService
7
+ .show(settingValues.message, {
8
+ actionText: settingValues.actionText,
9
+ timeout: settingValues.timeout,
10
+ color: settingValues.color
11
+ })
12
+ .then(() => loggerService.debug('onOk clicked'));
13
+ };
14
+
15
+ return (
16
+ <div>
17
+ <Button onClick={handleClick}>
18
+ show snackbar
19
+ </Button>
20
+ </div>
21
+ );
22
+ }
@@ -0,0 +1,43 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { ISpeedDialProps, snackbarService, SpeedDial, SpeedDialAction } from 'react-asc';
3
+ import { InfoSolidIcon } from '../assets';
4
+ import { IShowcaseBaseProps, withOptions } from './components';
5
+
6
+ const SpeedDialExample = () => {
7
+
8
+ const [open, setOpen] = useState<boolean>(false);
9
+
10
+ const handleClick = (index: number) => {
11
+ snackbarService.show(`you clicked action: ${index}`);
12
+ handleClose();
13
+ }
14
+
15
+ const handleOpen = () => {
16
+ setOpen(true);
17
+ }
18
+
19
+ const handleClose = () => {
20
+ setOpen(false);
21
+ }
22
+
23
+ return (
24
+ <div style={{ height: '200px', position: 'relative' }}>
25
+ <SpeedDial
26
+ open={open}
27
+ onOpen={handleOpen}
28
+ onClose={handleClose}
29
+ style={{ position: 'absolute', bottom: 0, right: 0 }}>
30
+ <SpeedDialAction
31
+ icon={<InfoSolidIcon />}
32
+ tooltipTitle="some tooltip text"
33
+ onClick={() => handleClick(1)}
34
+ />
35
+ <SpeedDialAction
36
+ icon={<InfoSolidIcon />}
37
+ tooltipTitle="some tooltip text"
38
+ onClick={() => handleClick(2)}
39
+ />
40
+ </SpeedDial>
41
+ </div>
42
+ );
43
+ }
@@ -0,0 +1 @@
1
+ Stepper visualizes a progress through steps. It provides a wizard-like workflow.
@@ -0,0 +1,40 @@
1
+ const MyExample = () => {
2
+
3
+ const [value, setValue] = useState<number>(0);
4
+
5
+ const handleOnChange = (index: number): void => {
6
+ void snackbarService.show(`you selected step ${index + 1}`);
7
+ setValue(index);
8
+ };
9
+
10
+ const handleOnFinish = (): void => {
11
+ void snackbarService.show('you reached the end');
12
+ };
13
+
14
+ return (
15
+ <Stepper
16
+ value={value}
17
+ onChange={handleOnChange}
18
+ onFinish={handleOnFinish}
19
+ >
20
+ <Step value="1" label="Step 1">
21
+ Content 1 Content 1 Content 1
22
+ </Step>
23
+ <Step value="2" label="Step 2">
24
+ Content 2 Content 2 Content 2<br />
25
+ Content 2 Content 2 Content 2
26
+ </Step>
27
+ <Step value="3" label="Step 3">
28
+ Content 3 Content 3 Content 3<br />
29
+ Content 3 Content 3 Content 3<br />
30
+ Content 3 Content 3 Content 3
31
+ </Step>
32
+ <Step value="4" label="Step 4">
33
+ Content 4 Content 4 Content 4<br />
34
+ Content 4 Content 4 Content 4<br />
35
+ Content 4 Content 4 Content 4<br />
36
+ Content 4 Content 4 Content 4
37
+ </Step>
38
+ </Stepper>
39
+ );
40
+ }
@@ -0,0 +1,30 @@
1
+ <Table>
2
+ <TableHead>
3
+ <TableRow>
4
+ <TableCell>#</TableCell>
5
+ <TableCell>First</TableCell>
6
+ <TableCell>Last</TableCell>
7
+ <TableCell>Handle</TableCell>
8
+ </TableRow>
9
+ </TableHead>
10
+
11
+ <TableBody>
12
+ <TableRow>
13
+ <TableCell component='th' scope="row">1</TableCell>
14
+ <TableCell>Mark</TableCell>
15
+ <TableCell>Otto</TableCell>
16
+ <TableCell>@mdo</TableCell>
17
+ </TableRow>
18
+ <TableRow>
19
+ <TableCell component='th' scope="row">2</TableCell>
20
+ <TableCell>Jacob</TableCell>
21
+ <TableCell>Thornton</TableCell>
22
+ <TableCell>@fat</TableCell>
23
+ </TableRow>
24
+ <TableRow>
25
+ <TableCell component='th' scope="row">3</TableCell>
26
+ <TableCell colSpan={2}>Larry the Bird</TableCell>
27
+ <TableCell>@twitter</TableCell>
28
+ </TableRow>
29
+ </TableBody>
30
+ </Table>
@@ -0,0 +1,35 @@
1
+ export const TabsPage = () => {
2
+ const [value, setValue] = useState<string>('tab2');
3
+
4
+ const handleChange = (event: any, newValue: string) => {
5
+ setValue(newValue);
6
+ }
7
+
8
+ return (
9
+ <div>
10
+ <Tabs
11
+ value={value}
12
+ onChange={handleChange}
13
+ >
14
+ <Tab value="tab1" label="Tab 1" />
15
+ <Tab value="tab2" label="Tab 2" />
16
+ <Tab value="tab3" label={<div className="text-success">Tab 3 with css</div>} />
17
+ <Tab value="tab4" label="Tab 4" disabled />
18
+ </Tabs>
19
+
20
+ <TabPanel value={value} index="tab1">
21
+ Tab1 Content
22
+ </TabPanel>
23
+ <TabPanel value={value} index="tab2">
24
+ Tab2 Content
25
+ </TabPanel>
26
+ <TabPanel value={value} index="tab3">
27
+ Tab3 Content
28
+ </TabPanel>
29
+ <TabPanel value={value} index="tab4">
30
+ Tab4 Content should never be displayed
31
+ </TabPanel>
32
+ </div>
33
+ );
34
+ }
35
+
@@ -0,0 +1 @@
1
+ coming soon
@@ -0,0 +1,6 @@
1
+ <Tooltip
2
+ text="some tooltip text"
3
+ placement={settingValues.placement}
4
+ >
5
+ <Button>some button text</Button>
6
+ </Tooltip>
@@ -0,0 +1,12 @@
1
+ <TreeView>
2
+ <TreeItem nodeId="1" label="some text" onSelect={handleOnSelect}>
3
+ <TreeItem nodeId="11" label="some text" onSelect={handleOnSelect} />
4
+ <TreeItem nodeId="12" label="some text" onSelect={handleOnSelect} />
5
+ <TreeItem nodeId="13" label="some text" onSelect={handleOnSelect}>
6
+ <TreeItem nodeId="111" label="some text" onSelect={handleOnSelect} />
7
+ <TreeItem nodeId="112" label="some text" onSelect={handleOnSelect} />
8
+ </TreeItem>
9
+ </TreeItem>
10
+ <TreeItem nodeId="2" label="some text" onSelect={handleOnSelect} />
11
+ <TreeItem nodeId="3" label="some text" onSelect={handleOnSelect} />
12
+ </TreeView>
@@ -0,0 +1,6 @@
1
+ <Typography as="h1">Heading1</Typography>
2
+ <Typography as="h2">Heading1</Typography>
3
+ <Typography as="h3">Heading1</Typography>
4
+ <Typography as="h4">Heading1</Typography>
5
+ <Typography as="h5">Heading1</Typography>
6
+ <Typography as="h6">Heading1</Typography>
package/sw.js ADDED
@@ -0,0 +1 @@
1
+ if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()})).then((()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(s,r)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(i[o])return;let d={};const t=e=>n(e,o),c={module:{uri:o},exports:d,require:t};i[o]=Promise.all(s.map((e=>c[e]||t(e)))).then((e=>(r(...e),d)))}}define(["./workbox-fa446783"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-5bb661b4.js",revision:null},{url:"assets/index-b3809a2b.css",revision:null},{url:"assets/workbox-window.prod.es5-a7b12eab.js",revision:null},{url:"index.html",revision:"563fa35be0ec7d48bc411e5ed8f9e92f"},{url:"favicon.svg",revision:"121679f9ca69ae62a01bc4b4841001c7"},{url:"favicon.ico",revision:"db3a29ad0345f76b56ad392b8d3be00d"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"apple-touch-icon.png",revision:"e8531cbd74dacfd13a21b78deacd1c9e"},{url:"pwa-192x192.png",revision:"f3084d7b46dd6239958cad5e96122ab6"},{url:"pwa-512x512.png",revision:"79734f9cc64b06bed3b9b104514e709c"},{url:"manifest.webmanifest",revision:"d3ef9fc0812160c3a76bf3837e844948"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));
@@ -0,0 +1 @@
1
+ define(["exports"],(function(t){"use strict";try{self["workbox:core:7.0.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.0.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function h(t,e,n){let o;if("string"==typeof t){const s=new URL(t,location.href);o=new i((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)o=new r(t,e,n);else if("function"==typeof t)o=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return a().registerRoute(o),o}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter((t=>t&&t.length>0)).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.0.0"]&&_()}catch(t){}function p(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class y{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class g{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let R;async function m(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,c=function(){if(void 0===R){const t=new Response("");if("body"in t)try{new Response(t.body),R=!0}catch(t){R=!1}R=!1}return R}()?i.body:await i.blob();return new Response(c,o)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class q{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const U=new Set;try{self["workbox:strategies:7.0.0"]&&_()}catch(t){}function L(t){return"string"==typeof t?new Request(t):t}class b{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new q,this.g=[],this.R=[...t.plugins],this.m=new Map;for(const t of this.R)this.m.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=L(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=L(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=L(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const c=await this.v(e);if(!c)return!1;const{cacheName:a,matchOptions:h}=this.l,u=await self.caches.open(a),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of U)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:a,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=L(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.m.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.g.push(t),t}async doneWaiting(){let t;for(;t=this.g.shift();)await t}destroy(){this.p.resolve(null)}async v(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class C{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new b(this,{event:e,request:s,params:n}),r=this.q(i,s,e);return[r,this.U(r,i,s,e)]}async q(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this.L(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async U(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class E extends C{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this._=!1!==t.fallbackToNetwork,this.plugins.push(E.copyRedirectedCacheableResponsesPlugin)}async L(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.C(t,e):await this.O(t,e))}async O(t,e){let n;const i=e.params||{};if(!this._)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&o&&"no-cors"!==t.mode&&(this.N(),await e.cachePut(t,n.clone()))}return n}async C(t,e){this.N();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}N(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==E.copyRedirectedCacheableResponsesPlugin&&(n===E.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(E.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}E.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},E.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await m(t):t};class O{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.k=new Map,this.K=new Map,this.P=new Map,this.l=new E({cacheName:f(t),plugins:[...e,new g({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.T||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.T=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=p(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.k.has(i)&&this.k.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.k.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.P.has(t)&&this.P.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.P.set(t,n.integrity)}if(this.k.set(i,t),this.K.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return d(t,(async()=>{const e=new y;this.strategy.plugins.push(e);for(const[e,s]of this.k){const n=this.P.get(s),i=this.K.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return d(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.k.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.k}getCachedURLs(){return[...this.k.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.k.get(e.href)}getIntegrityForCacheKey(t){return this.P.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let x;const N=()=>(x||(x=new O),x);class k extends i{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.W(t)),t),this.j=e,this.M=s}W({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.M)if(t.test(s))return!1;return!!this.j.some((t=>t.test(s)))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.createHandlerBoundToURL=function(t){return N().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){N().precache(t)}(t),function(t){const e=N();h(new k(e,t))}(e)},t.registerRoute=h}));