@hellobetterdigitalnz/betterui 0.0.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 (230) hide show
  1. package/.editorconfig +17 -0
  2. package/.eslintrc.cjs +14 -0
  3. package/.storybook/main.ts +23 -0
  4. package/.storybook/preview.ts +17 -0
  5. package/README.md +30 -0
  6. package/index.html +13 -0
  7. package/package.json +45 -0
  8. package/public/image/table-image.png +0 -0
  9. package/public/vite.svg +1 -0
  10. package/src/App.tsx +30 -0
  11. package/src/Components/DataDisplay/Accordion/Accordion.stories.tsx +57 -0
  12. package/src/Components/DataDisplay/Accordion/Accordion.tsx +14 -0
  13. package/src/Components/DataDisplay/Accordion/AccordionContext.tsx +11 -0
  14. package/src/Components/DataDisplay/Accordion/AccordionContextInterface.tsx +8 -0
  15. package/src/Components/DataDisplay/Accordion/AccordionItem.tsx +62 -0
  16. package/src/Components/DataDisplay/Accordion/AccordionItemProps.tsx +12 -0
  17. package/src/Components/DataDisplay/Accordion/AccordionProps.tsx +8 -0
  18. package/src/Components/DataDisplay/Accordion/AccordionProvider.tsx +65 -0
  19. package/src/Components/DataDisplay/Accordion/AccordionProviderInterface.tsx +8 -0
  20. package/src/Components/DataDisplay/Accordion/accordion.module.scss +56 -0
  21. package/src/Components/DataDisplay/Badge/Badge.stories.tsx +44 -0
  22. package/src/Components/DataDisplay/Badge/Badge.tsx +32 -0
  23. package/src/Components/DataDisplay/Badge/BadgeProps.tsx +6 -0
  24. package/src/Components/DataDisplay/Badge/badge.module.scss +42 -0
  25. package/src/Components/DataDisplay/Cards/BannerCard/BannerCard.stories.tsx +26 -0
  26. package/src/Components/DataDisplay/Cards/BannerCard/BannerCard.tsx +47 -0
  27. package/src/Components/DataDisplay/Cards/BannerCard/BannerCardInterface.tsx +15 -0
  28. package/src/Components/DataDisplay/Cards/BannerCard/banner-card.scss +54 -0
  29. package/src/Components/DataDisplay/Cards/PathwayCard/PathwayCard.stories.tsx +31 -0
  30. package/src/Components/DataDisplay/Cards/PathwayCard/PathwayCard.tsx +53 -0
  31. package/src/Components/DataDisplay/Cards/PathwayCard/PathwayCardInterface.tsx +17 -0
  32. package/src/Components/DataDisplay/Cards/PathwayCard/pathway-card-stories.scss +3 -0
  33. package/src/Components/DataDisplay/Cards/PathwayCard/pathway-card.scss +62 -0
  34. package/src/Components/DataDisplay/Media/Media.tsx +26 -0
  35. package/src/Components/DataDisplay/Media/MediaProps.tsx +9 -0
  36. package/src/Components/DataDisplay/Media/media.scss +0 -0
  37. package/src/Components/DataDisplay/Modal/Modal.tsx +5 -0
  38. package/src/Components/DataDisplay/Modal/ModalActions.tsx +5 -0
  39. package/src/Components/DataDisplay/Modal/ModalActionsLeft.tsx +5 -0
  40. package/src/Components/DataDisplay/Modal/ModalActionsRight.tsx +5 -0
  41. package/src/Components/DataDisplay/Modal/ModalBody.tsx +5 -0
  42. package/src/Components/DataDisplay/Modal/ModalCurtain.tsx +5 -0
  43. package/src/Components/DataDisplay/Modal/ModalHeader.tsx +5 -0
  44. package/src/Components/DataDisplay/NotificationsBell/NotificationBell.stories.tsx +27 -0
  45. package/src/Components/DataDisplay/NotificationsBell/NotificationsBell.tsx +51 -0
  46. package/src/Components/DataDisplay/NotificationsBell/NotificationsBellProps.tsx +9 -0
  47. package/src/Components/DataDisplay/NotificationsBell/notificationBell.module.scss +48 -0
  48. package/src/Components/DataDisplay/NotificationsPanel/Notification.stories.tsx +128 -0
  49. package/src/Components/DataDisplay/NotificationsPanel/Notification.tsx +59 -0
  50. package/src/Components/DataDisplay/NotificationsPanel/NotificationProps.tsx +11 -0
  51. package/src/Components/DataDisplay/NotificationsPanel/NotificationsGroup.tsx +17 -0
  52. package/src/Components/DataDisplay/NotificationsPanel/NotificationsGroupProps.tsx +8 -0
  53. package/src/Components/DataDisplay/NotificationsPanel/NotificationsGroups.tsx +42 -0
  54. package/src/Components/DataDisplay/NotificationsPanel/NotificationsGroupsProps.tsx +7 -0
  55. package/src/Components/DataDisplay/NotificationsPanel/NotificationsHeader.tsx +27 -0
  56. package/src/Components/DataDisplay/NotificationsPanel/NotificationsHeaderProps.tsx +9 -0
  57. package/src/Components/DataDisplay/NotificationsPanel/NotificationsNone.tsx +11 -0
  58. package/src/Components/DataDisplay/NotificationsPanel/NotificationsPanel.tsx +8 -0
  59. package/src/Components/DataDisplay/NotificationsPanel/NotificationsPanelProps.tsx +7 -0
  60. package/src/Components/DataDisplay/NotificationsPanel/notificationPanel.module.scss +196 -0
  61. package/src/Components/DataDisplay/Tab/Tab.stories.tsx +72 -0
  62. package/src/Components/DataDisplay/Tab/Tab.tsx +20 -0
  63. package/src/Components/DataDisplay/Tab/TabBody.tsx +6 -0
  64. package/src/Components/DataDisplay/Tab/TabBodyContent.tsx +15 -0
  65. package/src/Components/DataDisplay/Tab/TabBodyContentProps.tsx +9 -0
  66. package/src/Components/DataDisplay/Tab/TabBodyProps.tsx +8 -0
  67. package/src/Components/DataDisplay/Tab/TabContext.tsx +9 -0
  68. package/src/Components/DataDisplay/Tab/TabContextProps.tsx +6 -0
  69. package/src/Components/DataDisplay/Tab/TabNav.tsx +6 -0
  70. package/src/Components/DataDisplay/Tab/TabNavItem.tsx +49 -0
  71. package/src/Components/DataDisplay/Tab/TabNavItemProps.tsx +9 -0
  72. package/src/Components/DataDisplay/Tab/TabNavProps.tsx +8 -0
  73. package/src/Components/DataDisplay/Tab/TabProps.tsx +8 -0
  74. package/src/Components/DataDisplay/Tab/tab.module.scss +35 -0
  75. package/src/Components/DataDisplay/Tab/tab.stories.scss +3 -0
  76. package/src/Components/DataDisplay/Table/Table.stories.tsx +64 -0
  77. package/src/Components/DataDisplay/Table/Table.tsx +10 -0
  78. package/src/Components/DataDisplay/Table/TableBody.tsx +13 -0
  79. package/src/Components/DataDisplay/Table/TableBodyProps.tsx +8 -0
  80. package/src/Components/DataDisplay/Table/TableCell.tsx +30 -0
  81. package/src/Components/DataDisplay/Table/TableCellAction.tsx +27 -0
  82. package/src/Components/DataDisplay/Table/TableCellActionProps.tsx +11 -0
  83. package/src/Components/DataDisplay/Table/TableCellProps.tsx +11 -0
  84. package/src/Components/DataDisplay/Table/TableCellWithDesc.tsx +21 -0
  85. package/src/Components/DataDisplay/Table/TableCellWithDescProps.tsx +9 -0
  86. package/src/Components/DataDisplay/Table/TableCellWithImage.tsx +39 -0
  87. package/src/Components/DataDisplay/Table/TableCellWithImageProps.tsx +10 -0
  88. package/src/Components/DataDisplay/Table/TableFooter.tsx +5 -0
  89. package/src/Components/DataDisplay/Table/TableHead.tsx +11 -0
  90. package/src/Components/DataDisplay/Table/TableHeadProps.tsx +8 -0
  91. package/src/Components/DataDisplay/Table/TableHeaderCell.tsx +17 -0
  92. package/src/Components/DataDisplay/Table/TableHeaderCellProps.tsx +10 -0
  93. package/src/Components/DataDisplay/Table/TableProps.tsx +8 -0
  94. package/src/Components/DataDisplay/Table/TableRow.tsx +9 -0
  95. package/src/Components/DataDisplay/Table/TableRowProps.tsx +8 -0
  96. package/src/Components/DataDisplay/Table/table.module.scss +103 -0
  97. package/src/Components/Form/Button/Button.stories.tsx +66 -0
  98. package/src/Components/Form/Button/Button.tsx +64 -0
  99. package/src/Components/Form/Button/ButtonProps.tsx +18 -0
  100. package/src/Components/Form/Button/button.module.scss +142 -0
  101. package/src/Components/Form/Checkbox/Checkbox.stories.tsx +49 -0
  102. package/src/Components/Form/Checkbox/Checkbox.tsx +85 -0
  103. package/src/Components/Form/Checkbox/CheckboxProps.tsx +22 -0
  104. package/src/Components/Form/Checkbox/checkbox.module.scss +63 -0
  105. package/src/Components/Form/CheckboxSelect/CheckboxSelect.tsx +5 -0
  106. package/src/Components/Form/CheckboxSelect/CheckboxSelectItem.tsx +5 -0
  107. package/src/Components/Form/CheckboxSet/CheckboxSet.stories.tsx +93 -0
  108. package/src/Components/Form/CheckboxSet/CheckboxSet.tsx +14 -0
  109. package/src/Components/Form/CheckboxSet/CheckboxSetItem.tsx +88 -0
  110. package/src/Components/Form/CheckboxSet/CheckboxSetProps.tsx +9 -0
  111. package/src/Components/Form/CheckboxSet/checkboxSet.module.scss +13 -0
  112. package/src/Components/Form/CurrencyField/CurrenctField.stories.tsx +22 -0
  113. package/src/Components/Form/CurrencyField/CurrencyField.tsx +59 -0
  114. package/src/Components/Form/CurrencyField/CurrencyFieldProps.tsx +8 -0
  115. package/src/Components/Form/DateField/DateField.stories.tsx +22 -0
  116. package/src/Components/Form/DateField/DateField.tsx +58 -0
  117. package/src/Components/Form/DropdownBadge/DropdownBadge.stories.tsx +49 -0
  118. package/src/Components/Form/DropdownBadge/DropdownBadge.tsx +160 -0
  119. package/src/Components/Form/DropdownBadge/DropdownBadgeItem.tsx +40 -0
  120. package/src/Components/Form/DropdownBadge/DropdownBadgeItemProps.tsx +10 -0
  121. package/src/Components/Form/DropdownBadge/DropdownBadgeProps.tsx +31 -0
  122. package/src/Components/Form/DropdownBadge/DropdownBadgeSelector.tsx +11 -0
  123. package/src/Components/Form/DropdownBadge/DropdownBadgeSelectorProps.tsx +7 -0
  124. package/src/Components/Form/DropdownBadge/dropdownBadge.module.scss +105 -0
  125. package/src/Components/Form/DropdownField/DropdownField.stories.tsx +50 -0
  126. package/src/Components/Form/DropdownField/DropdownField.tsx +118 -0
  127. package/src/Components/Form/DropdownField/DropdownFieldItem.tsx +26 -0
  128. package/src/Components/Form/DropdownField/DropdownFieldItemProps.tsx +9 -0
  129. package/src/Components/Form/DropdownField/DropdownFieldProps.tsx +33 -0
  130. package/src/Components/Form/DropdownField/DropdownFieldSelector.tsx +15 -0
  131. package/src/Components/Form/DropdownField/DropdownFieldSelectorProps.tsx +7 -0
  132. package/src/Components/Form/DropdownField/dropdown.module.scss +79 -0
  133. package/src/Components/Form/EmailField/EmailField.stories.ts +23 -0
  134. package/src/Components/Form/EmailField/EmailField.tsx +51 -0
  135. package/src/Components/Form/ErrorMessage/ErrorMessage.tsx +5 -0
  136. package/src/Components/Form/FormFieldHolder/FormFieldHolder.tsx +5 -0
  137. package/src/Components/Form/IconButton/IconButton.stories.tsx +45 -0
  138. package/src/Components/Form/IconButton/IconButton.tsx +58 -0
  139. package/src/Components/Form/IconButton/IconButtonProps.tsx +15 -0
  140. package/src/Components/Form/IconButton/iconButton.module.scss +111 -0
  141. package/src/Components/Form/InputProps.tsx +25 -0
  142. package/src/Components/Form/MultiSelectField/MultiSelectField.tsx +5 -0
  143. package/src/Components/Form/MultiSelectField/MultiSelectFieldItem.tsx +5 -0
  144. package/src/Components/Form/MultiSelectField/MultiSelectFieldTag.tsx +5 -0
  145. package/src/Components/Form/PasswordField/PasswordField.stories.tsx +22 -0
  146. package/src/Components/Form/PasswordField/PasswordField.tsx +70 -0
  147. package/src/Components/Form/RadioButtons/RadioButton.tsx +70 -0
  148. package/src/Components/Form/RadioButtons/RadioButtonProps.tsx +22 -0
  149. package/src/Components/Form/RadioButtons/RadioButtons.stories.tsx +64 -0
  150. package/src/Components/Form/RadioButtons/RadioButtons.tsx +18 -0
  151. package/src/Components/Form/RadioButtons/RadioButtonsProps.tsx +10 -0
  152. package/src/Components/Form/RadioButtons/radioButton.stories.scss +3 -0
  153. package/src/Components/Form/RadioButtons/radiobutton.module.scss +63 -0
  154. package/src/Components/Form/TextField/TextField.stories.ts +23 -0
  155. package/src/Components/Form/TextField/TextField.tsx +52 -0
  156. package/src/Components/Form/Textarea/Textarea.stories.ts +31 -0
  157. package/src/Components/Form/Textarea/Textarea.tsx +71 -0
  158. package/src/Components/Form/Textarea/TextareaProps.tsx +27 -0
  159. package/src/Components/Form/Textarea/textarea.module.scss +49 -0
  160. package/src/Components/Form/TimeField/TimeField.stories.tsx +22 -0
  161. package/src/Components/Form/TimeField/TimeField.tsx +58 -0
  162. package/src/Components/Form/ToggleSwitch/ToggleSwitch.stories.tsx +49 -0
  163. package/src/Components/Form/ToggleSwitch/ToggleSwitch.tsx +87 -0
  164. package/src/Components/Form/ToggleSwitch/ToggleSwitchProps.tsx +22 -0
  165. package/src/Components/Form/ToggleSwitch/toggleSwitch.module.scss +82 -0
  166. package/src/Components/Form/inputs.module.scss +121 -0
  167. package/src/Components/Icons/Arrows/CaretDown/CaretDown.tsx +49 -0
  168. package/src/Components/Icons/Arrows/CaretUp/CaretUp.tsx +49 -0
  169. package/src/Components/Icons/Commerce/CurrencyDollarSimple/CurrencyDollarSimple.tsx +105 -0
  170. package/src/Components/Icons/Communication/AddressBook/AddressBook.stories.ts +28 -0
  171. package/src/Components/Icons/Communication/AddressBook/AddressBook.tsx +50 -0
  172. package/src/Components/Icons/Communication/Asterick/Asterisk.stories.ts +28 -0
  173. package/src/Components/Icons/Communication/Asterick/Asterisk.tsx +50 -0
  174. package/src/Components/Icons/Communication/AsterickSimple/AsteriskSimple.stories.ts +28 -0
  175. package/src/Components/Icons/Communication/AsterickSimple/AsteriskSimple.tsx +49 -0
  176. package/src/Components/Icons/Communication/At/At.stories.ts +28 -0
  177. package/src/Components/Icons/Communication/At/At.tsx +49 -0
  178. package/src/Components/Icons/Communication/Broadcast/Broadcast.stories.ts +27 -0
  179. package/src/Components/Icons/Communication/Broadcast/Broadcast.tsx +49 -0
  180. package/src/Components/Icons/Communication/Chat/Chat.stories.ts +28 -0
  181. package/src/Components/Icons/Communication/Chat/Chat.tsx +49 -0
  182. package/src/Components/Icons/Design/Eye/Eye.tsx +105 -0
  183. package/src/Components/Icons/Design/EyeSlash/EyeSlash.tsx +105 -0
  184. package/src/Components/Icons/IconProps.tsx +5 -0
  185. package/src/Components/Icons/MathAndFinance/XIcon/XIcon.tsx +107 -0
  186. package/src/Components/Icons/SystemAndDevice/Bell/Bell.tsx +49 -0
  187. package/src/Components/Icons/Time/CalendarBank/CalendarBank.tsx +105 -0
  188. package/src/Components/Icons/Time/Clock/Clock.tsx +105 -0
  189. package/src/Components/Layout/CalloutPopup/CalloutPopup.tsx +5 -0
  190. package/src/Components/Layout/Header/Header.tsx +5 -0
  191. package/src/Components/Layout/Header/HeaderLeft.tsx +5 -0
  192. package/src/Components/Layout/Header/HeaderRight.tsx +5 -0
  193. package/src/Components/Layout/Pagination/Pagination.tsx +5 -0
  194. package/src/Components/Layout/Pagination/PaginationFirst.tsx +5 -0
  195. package/src/Components/Layout/Pagination/PaginationLast.tsx +5 -0
  196. package/src/Components/Layout/Pagination/PaginationNext.tsx +5 -0
  197. package/src/Components/Layout/Pagination/PaginationNumber.tsx +5 -0
  198. package/src/Components/Layout/Pagination/PaginationPrevious.tsx +5 -0
  199. package/src/Components/Layout/ProfileAvatar/ProfileAvatar.tsx +5 -0
  200. package/src/Components/Layout/ProfileAvatar/ProfileAvatarProps.tsx +4 -0
  201. package/src/Components/Layout/ProfileDropdown/ProfileDropdown.tsx +5 -0
  202. package/src/Components/Layout/ProfileDropdown/ProfileHeader.tsx +5 -0
  203. package/src/Components/Layout/ProfileDropdown/ProfileLink.tsx +5 -0
  204. package/src/Components/Layout/ProfileDropdown/ProfileLinks.tsx +5 -0
  205. package/src/Components/Layout/ProfileDropdown/ProfileNavigationItem.tsx +5 -0
  206. package/src/Components/Layout/ProfileDropdown/ProfileSwitchPanel.tsx +5 -0
  207. package/src/Components/Layout/ProfileDropdown/ProfileSwitchUser.tsx +5 -0
  208. package/src/Components/Layout/Sidebar/Sidebar.tsx +5 -0
  209. package/src/Components/Layout/Sidebar/SidebarChevron.tsx +5 -0
  210. package/src/Components/Layout/Sidebar/SidebarNavigation.tsx +5 -0
  211. package/src/Components/Layout/Sidebar/SidebarNavigationItem.tsx +5 -0
  212. package/src/Components/Layout/Sidebar/SidebarSubNavigation.tsx +5 -0
  213. package/src/Notification/Notification.tsx +83 -0
  214. package/src/Notification/NotificationInterface.tsx +9 -0
  215. package/src/Notification/NotificationList.tsx +29 -0
  216. package/src/Notification/NotificationListHolder.tsx +14 -0
  217. package/src/Notification/NotificationListHolderInterface.tsx +8 -0
  218. package/src/Notification/NotificationListInterface.tsx +11 -0
  219. package/src/Notification/notification.scss +225 -0
  220. package/src/global.scss +231 -0
  221. package/src/main.tsx +9 -0
  222. package/src/variables.scss +2 -0
  223. package/src/vite-env.d.ts +1 -0
  224. package/tokens/color/color.mdx +82 -0
  225. package/tokens/shadow/shadow-panel.scss +12 -0
  226. package/tokens/shadow/shadow.mdx +34 -0
  227. package/tokens/typography/typography.mdx +31 -0
  228. package/tsconfig.json +25 -0
  229. package/tsconfig.node.json +10 -0
  230. package/vite.config.ts +7 -0
@@ -0,0 +1,47 @@
1
+ import BannerCardInterface from "./BannerCardInterface.tsx";
2
+ import './banner-card.scss'
3
+ import Button from "../../../Form/Button/Button";
4
+
5
+ export const BannerCard = (props: BannerCardInterface) => {
6
+ const {
7
+ title,
8
+ btnTitle,
9
+ description,
10
+ image,
11
+ btnType,
12
+ btnScheme,
13
+ btnSize,
14
+ btnStyle,
15
+ extraClass='',
16
+ btnOnClick
17
+ } = props;
18
+
19
+ const imageType = typeof image;
20
+
21
+ return (
22
+ <div
23
+ className={`banner-card ${extraClass}`}>
24
+ <div className={'banner-card__wrapper'}>
25
+ {imageType === "string" && (
26
+ <div
27
+ className={'banner-card__picture'}
28
+ style={{backgroundImage: image ? `url(${image})` : ""}}></div>
29
+ )}
30
+ {imageType !== "string" && <div className={'banner-card__picture'}>{image}</div>}
31
+ <div className={'banner-card__inner'}>
32
+ <div className={'banner-card__content'}>
33
+ {!!title && <h2 className={'banner-card__title'}>{title}</h2>}
34
+ {!!description && <p className={'banner-card__desc'}>{description}</p>}
35
+ </div>
36
+ <Button
37
+ label={btnTitle}
38
+ type={btnType}
39
+ style={btnStyle}
40
+ size={btnSize}
41
+ scheme={btnScheme}
42
+ onClick={btnOnClick}/>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ );
47
+ };
@@ -0,0 +1,15 @@
1
+
2
+ interface BannerCardInterface {
3
+ title: string;
4
+ btnTitle: string;
5
+ description: string;
6
+ image: string;
7
+ btnType?: "button" | "submit" | "reset" | undefined;
8
+ btnSize?: "default" | "large" | "small";
9
+ btnStyle?: "solid" | "hollow" | "no-border";
10
+ btnScheme?: "primary" | "secondary" | "gray";
11
+ extraClass?:string;
12
+ btnOnClick?: () => void;
13
+ }
14
+
15
+ export default BannerCardInterface
@@ -0,0 +1,54 @@
1
+ .banner-card {
2
+ display: flex;
3
+ min-height: 600px;
4
+ height: 100%;
5
+ position: relative;
6
+
7
+ &__wrapper {
8
+ width: 100%;
9
+ }
10
+
11
+ &__picture {
12
+ background-color: var(--color-gray-300);
13
+ min-height: 200px;
14
+ background-position: center;
15
+ background-size: cover;
16
+ background-repeat: no-repeat;
17
+ position: absolute;
18
+ top: 0;
19
+ right: 0;
20
+ left: 0;
21
+ height: 100%;
22
+ width: 100%;
23
+ overflow: hidden;
24
+ }
25
+
26
+ &__inner {
27
+ position: relative;
28
+ z-index: 1;
29
+ height: 100%;
30
+ display: flex;
31
+ flex-direction: column;
32
+ justify-content: center;
33
+ align-items: center;
34
+ padding:var(--spacing-1-1\/4) ;
35
+ }
36
+
37
+ &__content {
38
+ text-align: center;
39
+ max-width: 960px;
40
+ margin: 0 auto;
41
+ }
42
+
43
+ &__title {
44
+ font-size: var(--font-size-h2);
45
+ font-weight: var(--font-weight-h2);
46
+ line-height: var(--line-height-h2);
47
+ margin-bottom: var(--spacing-1-1\/2);
48
+ }
49
+
50
+ &__desc {
51
+ margin-bottom: var(--spacing-1-1\/2);
52
+ }
53
+
54
+ }
@@ -0,0 +1,31 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import './pathway-card-stories.scss'
3
+
4
+ import { PathwayCard } from './PathwayCard.tsx';
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
7
+ const meta = {
8
+ title: 'Data Display / PathwayCard',
9
+ component: PathwayCard,
10
+ parameters: {
11
+ layout: 'centered',
12
+ },
13
+ tags: ['autodocs'],
14
+ } satisfies Meta<typeof PathwayCard>;
15
+
16
+ export default meta;
17
+ type Story = StoryObj<typeof PathwayCard>;
18
+
19
+ export const Example: Story = {
20
+ args: {
21
+ title:'Lorem ipsum',
22
+ description:'Sed fringilla magna facilisis auctor venenatis. Duis ut vestibulum risus. Nunc a finibus dui. Donec hendrerit tristique odio, ac porta dui maximus et. ',
23
+ image:'https://www.w3schools.com/html/pic_trulli.jpg',
24
+ btnTitle:'Button text',
25
+ btnScheme:'primary',
26
+ btnSize:'default',
27
+ btnStyle:'solid',
28
+ extraClass:'showcase-width'
29
+ },
30
+ };
31
+
@@ -0,0 +1,53 @@
1
+ import PathwayCardInterface from "./PathwayCardInterface.tsx";
2
+ import './pathway-card.scss'
3
+ import Button from "../../../Form/Button/Button";
4
+
5
+ export const PathwayCard = (props: PathwayCardInterface) => {
6
+ const {
7
+ title,
8
+ btnTitle,
9
+ description,
10
+ image,
11
+ btnType,
12
+ btnScheme,
13
+ btnSize,
14
+ btnStyle,
15
+ extraClass='',
16
+ cardOnClick,
17
+ btnOnClick
18
+ } = props;
19
+
20
+ const imageType = typeof image;
21
+
22
+ return (
23
+ <div
24
+ className={`pathway-card ${extraClass}`}
25
+ onClick={(e) => {
26
+ if (cardOnClick) {
27
+ cardOnClick(e);
28
+ }
29
+ }}>
30
+ <div className={'pathway-card__wrapper'}>
31
+ {imageType === "string" && (
32
+ <div
33
+ className={'pathway-card__picture'}
34
+ style={{backgroundImage: image ? `url(${image})` : ""}}></div>
35
+ )}
36
+ {imageType !== "string" && <div className={'pathway-card__picture'}>{image}</div>}
37
+ <div className={'pathway-card__inner'}>
38
+ <div className={'pathway-card__content'}>
39
+ {!!title && <h3 className={'pathway-card__title'}>{title}</h3>}
40
+ {!!description && <p className={'pathway-card__desc'}>{description}</p>}
41
+ </div>
42
+ <Button
43
+ label={btnTitle}
44
+ type={btnType}
45
+ style={btnStyle}
46
+ size={btnSize}
47
+ scheme={btnScheme}
48
+ onClick={btnOnClick}/>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ );
53
+ };
@@ -0,0 +1,17 @@
1
+ import React, {ReactNode} from "react";
2
+
3
+ interface PathwayCardInterface {
4
+ title: string;
5
+ btnTitle: string;
6
+ description: string;
7
+ image: string | ReactNode;
8
+ btnType?: "button" | "submit" | "reset" | undefined;
9
+ btnSize?: "default" | "large" | "small";
10
+ btnStyle?: "solid" | "hollow" | "no-border";
11
+ btnScheme?: "primary" | "secondary" | "gray";
12
+ extraClass?:string;
13
+ cardOnClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
14
+ btnOnClick?: () => void;
15
+ }
16
+
17
+ export default PathwayCardInterface
@@ -0,0 +1,3 @@
1
+ .showcase-width{
2
+ width: 409px;
3
+ }
@@ -0,0 +1,62 @@
1
+ .pathway-card {
2
+ display: flex;
3
+ flex-direction: column;
4
+ border-radius: 4px;
5
+ border: 1px solid var(--color-gray-300);
6
+ min-height: 468px;
7
+ height: 100%;
8
+ cursor: pointer;
9
+
10
+ &__wrapper {
11
+ flex: 1;
12
+ height: 100%;
13
+ padding: var(--spacing-1-1\/2);
14
+ display: flex;
15
+ flex-direction: column;
16
+ }
17
+
18
+ &__picture {
19
+ background-color: var(--color-gray-300);
20
+ min-height: 200px;
21
+ background-position: center;
22
+ background-size: cover;
23
+ background-repeat: no-repeat;
24
+ position: relative;
25
+ overflow: hidden;
26
+ margin-bottom: var(--spacing-1-1\/2);
27
+
28
+ img {
29
+ width: 100%;
30
+ height: 100%;
31
+ object-fit: cover;
32
+ object-position: center;
33
+ }
34
+
35
+ }
36
+
37
+ &__inner {
38
+ flex: 1;
39
+ display: flex;
40
+ flex-direction: column;
41
+ align-items: flex-start;
42
+ height: 100%;
43
+ }
44
+
45
+ &__content {
46
+ flex: 1;
47
+ }
48
+
49
+ &__title {
50
+ padding-bottom: var(--spacing-1\/2);
51
+ border-bottom: 1px solid var(--color-gray-300);
52
+ margin-bottom: var(--spacing-1-1\/2);
53
+ font-size: var(--font-size-h3);
54
+ font-weight: var(--font-weight-h3);
55
+ line-height: var(--line-height-h3);
56
+ }
57
+
58
+ &__desc {
59
+ margin-bottom: var(--spacing-1-1\/2);
60
+ }
61
+
62
+ }
@@ -0,0 +1,26 @@
1
+ import MediaProps from "./MediaProps.tsx";
2
+ import "./media.scss";
3
+ export const Media = ({ type, videoSrc, imageSrc }: MediaProps) => {
4
+ const imageType = typeof imageSrc;
5
+
6
+ return (
7
+ <>
8
+ {type === "image" && (
9
+ <>
10
+ {imageType === "string" && <img src={imageSrc} alt={"media image"} />}
11
+ {imageType !== "string" && (
12
+ <div className={"media-image"}>{imageSrc}</div>
13
+ )}
14
+ </>
15
+ )}
16
+ {type === "video" && (
17
+ <div className="video-container">
18
+ <video controls>
19
+ <source src={videoSrc} type="video/mp4" />
20
+ Your browser does not support the video tag.
21
+ </video>
22
+ </div>
23
+ )}
24
+ </>
25
+ );
26
+ };
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from "react";
2
+
3
+ interface MediaProps {
4
+ type?: "image" | "video";
5
+ videoSrc?: string;
6
+ imageSrc: string | ReactNode;
7
+ }
8
+
9
+ export default MediaProps;
File without changes
@@ -0,0 +1,5 @@
1
+ const Modal = () => {
2
+
3
+ }
4
+
5
+ export default Modal;
@@ -0,0 +1,5 @@
1
+ const ModalActions = () => {
2
+
3
+ }
4
+
5
+ export default ModalActions;
@@ -0,0 +1,5 @@
1
+ const ModalActionsLeft = () => {
2
+
3
+ }
4
+
5
+ export default ModalActionsLeft;
@@ -0,0 +1,5 @@
1
+ const ModalActionsRight = () => {
2
+
3
+ }
4
+
5
+ export default ModalActionsRight;
@@ -0,0 +1,5 @@
1
+ const ModalBody = () => {
2
+
3
+ }
4
+
5
+ export default ModalBody;
@@ -0,0 +1,5 @@
1
+ const ModalCurtain = () => {
2
+
3
+ }
4
+
5
+ export default ModalCurtain;
@@ -0,0 +1,5 @@
1
+ const ModalHeader = () => {
2
+
3
+ }
4
+
5
+ export default ModalHeader;
@@ -0,0 +1,27 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import NotificationsBell from "./NotificationsBell";
4
+
5
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6
+ const meta = {
7
+ title: "Data Display/Notification/NotificationsBell",
8
+ component: NotificationsBell,
9
+ parameters: {
10
+ layout: "centered",
11
+ },
12
+ tags: ["autodocs"],
13
+ } satisfies Meta<typeof NotificationsBell>;
14
+
15
+ export default meta;
16
+ type Story = StoryObj<typeof NotificationsBell>;
17
+
18
+ // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
19
+ export const Default: Story = {
20
+ args: {},
21
+ };
22
+
23
+ export const ActiveState: Story = {
24
+ args: {
25
+ active: true,
26
+ },
27
+ };
@@ -0,0 +1,51 @@
1
+ import { useState, useEffect, useRef } from "react";
2
+ import styles from "./notificationBell.module.scss";
3
+ import NotificationsBellProps from "./NotificationsBellProps.tsx";
4
+ import Bell from "../../Icons/SystemAndDevice/Bell/Bell.tsx";
5
+
6
+ const NotificationsBell = (props: NotificationsBellProps) => {
7
+ const { children, extraClass, active } = props;
8
+
9
+ const [dropdown, setDropdown] = useState(false);
10
+ const notificationRef = useRef(null);
11
+
12
+ const handleOutsideClick = (event:any) => {
13
+ // @ts-ignore
14
+ if (notificationRef.current && !notificationRef.current.contains(event.target)) {
15
+ setDropdown(false);
16
+ }
17
+ };
18
+
19
+ useEffect(() => {
20
+ if (dropdown) {
21
+ document.addEventListener("mousedown", handleOutsideClick);
22
+ } else {
23
+ document.removeEventListener("mousedown", handleOutsideClick);
24
+ }
25
+
26
+ return () => {
27
+ document.removeEventListener("mousedown", handleOutsideClick);
28
+ };
29
+ }, [dropdown]);
30
+
31
+ return (
32
+ <div
33
+ className={`${styles.notification} ${extraClass}`}
34
+ onClick={() => setDropdown(!dropdown)}
35
+ ref={notificationRef}
36
+ >
37
+ <div className={`${styles.notificationIcon} ${dropdown ? styles.notiActive : ""}`}>
38
+ {active && (<span className={styles.pip}></span>)}
39
+ <Bell />
40
+ </div>
41
+
42
+ {children && dropdown && (
43
+ <div className={styles.notificationDropdown}>
44
+ {children}
45
+ </div>
46
+ )}
47
+ </div>
48
+ );
49
+ };
50
+
51
+ export default NotificationsBell;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from "react";
2
+
3
+ interface NotificationsBellProps {
4
+ children?: ReactNode;
5
+ extraClass?: string;
6
+ active?:boolean;
7
+ }
8
+
9
+ export default NotificationsBellProps;
@@ -0,0 +1,48 @@
1
+ .notification {
2
+ position: relative;
3
+ padding-right: var(--spacing-2);
4
+
5
+ .notificationIcon {
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ width: 40px;
10
+ height: 40px;
11
+ cursor: pointer;
12
+ border-radius: 100%;
13
+ position: relative;
14
+
15
+ .pip{
16
+ position: absolute;
17
+ top: 8px;
18
+ right: 8px;
19
+ width: 8px;
20
+ height: 8px;
21
+ background: var(--color-primary-500);
22
+ border-radius: 100%;
23
+ }
24
+
25
+ svg {
26
+ width: 24px;
27
+ height: 24px;
28
+ }
29
+
30
+ &:hover {
31
+ background: var(--color-gray-100);
32
+ }
33
+
34
+ &.notiActive {
35
+ background: var(--color-gray-200);
36
+ }
37
+
38
+ }
39
+
40
+ .notificationDropdown{
41
+ position: absolute;
42
+ top: 100%;
43
+ right: 0;
44
+ min-width: 100%;
45
+ padding-top: 8px;
46
+ }
47
+
48
+ }
@@ -0,0 +1,128 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import NotificationBell from "../NotificationsBell/NotificationsBell";
3
+ import NotificationsPanel from "./NotificationsPanel";
4
+ import NotificationsHeader from "./NotificationsHeader";
5
+ import NotificationsGroups from "./NotificationsGroups";
6
+ import NotificationsGroup from "./NotificationsGroup";
7
+ import NotificationsNone from "./NotificationsNone";
8
+ import Notification from "./Notification";
9
+
10
+ const meta: Meta = {
11
+ title: "Data Display/Notification/NotificationPanel",
12
+ component: NotificationBell,
13
+ parameters: {
14
+ layout: "centered",
15
+ },
16
+ tags: ["autodocs"],
17
+ };
18
+
19
+ export default meta;
20
+
21
+ type Story = StoryObj<typeof meta>;
22
+
23
+ const NotificationTemplate: Story = {
24
+ render: ({ items, ...args }) => {
25
+ return (
26
+ <NotificationBell active={true}>
27
+ <NotificationsPanel>
28
+ <NotificationsHeader showMarkAllAsRead={true} />
29
+ <NotificationsGroups>
30
+ <NotificationsGroup title={"New"}>
31
+ <Notification
32
+ notificationInitials={"CC"}
33
+ boldText={"Lorem ipsum"}
34
+ regularText={"dolor sit amet "}
35
+ summaryText={"consectetur adipiscing."}
36
+ />
37
+ <Notification
38
+ notificationInitials={"CC"}
39
+ boldText={"Lorem ipsum"}
40
+ regularText={"dolor sit amet "}
41
+ summaryText={"consectetur adipiscing."}
42
+ />
43
+ <Notification
44
+ notificationInitials={"CC"}
45
+ boldText={"Lorem ipsum"}
46
+ regularText={"dolor sit amet "}
47
+ summaryText={"consectetur adipiscing."}
48
+ />
49
+ <Notification
50
+ notificationInitials={"CC"}
51
+ boldText={"Lorem ipsum"}
52
+ regularText={"dolor sit amet "}
53
+ summaryText={"consectetur adipiscing."}
54
+ />
55
+ <Notification
56
+ notificationInitials={"CC"}
57
+ boldText={"Lorem ipsum"}
58
+ regularText={"dolor sit amet "}
59
+ summaryText={"consectetur adipiscing."}
60
+ />
61
+ </NotificationsGroup>
62
+ <NotificationsGroup title={"Last 7 days"}>
63
+ <Notification
64
+ notificationInitials={"CC"}
65
+ boldText={"Lorem ipsum"}
66
+ regularText={"dolor sit amet "}
67
+ summaryText={"consectetur adipiscing."}
68
+ />
69
+ <Notification
70
+ notificationInitials={"CC"}
71
+ boldText={"Lorem ipsum"}
72
+ regularText={"dolor sit amet "}
73
+ summaryText={"consectetur adipiscing."}
74
+ />
75
+ <Notification
76
+ notificationInitials={"CC"}
77
+ boldText={"Lorem ipsum"}
78
+ regularText={"dolor sit amet "}
79
+ summaryText={"consectetur adipiscing."}
80
+ />
81
+ <Notification
82
+ notificationInitials={"CC"}
83
+ boldText={"Lorem ipsum"}
84
+ regularText={"dolor sit amet "}
85
+ summaryText={"consectetur adipiscing."}
86
+ />
87
+ <Notification
88
+ notificationInitials={"CC"}
89
+ boldText={"Lorem ipsum"}
90
+ regularText={"dolor sit amet "}
91
+ summaryText={"consectetur adipiscing."}
92
+ />
93
+ <Notification
94
+ notificationInitials={"CC"}
95
+ boldText={"Lorem ipsum"}
96
+ regularText={"dolor sit amet "}
97
+ summaryText={"consectetur adipiscing."}
98
+ />
99
+ </NotificationsGroup>
100
+ </NotificationsGroups>
101
+ </NotificationsPanel>
102
+ </NotificationBell>
103
+ );
104
+ },
105
+ };
106
+
107
+ const NoNotificationTemplate: Story = {
108
+ render: ({ items, ...args }) => {
109
+ return (
110
+ <NotificationBell>
111
+ <NotificationsPanel>
112
+ <NotificationsHeader showMarkAllAsRead={true} />
113
+ <NotificationsGroups>
114
+ <NotificationsNone />
115
+ </NotificationsGroups>
116
+ </NotificationsPanel>
117
+ </NotificationBell>
118
+ );
119
+ },
120
+ };
121
+
122
+ export const Notifications = {
123
+ ...NotificationTemplate,
124
+ };
125
+
126
+ export const NoNotification = {
127
+ ...NoNotificationTemplate,
128
+ };