@hellobetterdigitalnz/betterui 0.0.0 → 0.0.1

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 (243) hide show
  1. package/README.md +23 -30
  2. package/package.json +48 -45
  3. package/src/App.tsx +30 -30
  4. package/src/Components/DataDisplay/Accordion/Accordion.stories.tsx +57 -57
  5. package/src/Components/DataDisplay/Accordion/Accordion.tsx +14 -14
  6. package/src/Components/DataDisplay/Accordion/AccordionContext.tsx +11 -11
  7. package/src/Components/DataDisplay/Accordion/AccordionContextInterface.tsx +8 -8
  8. package/src/Components/DataDisplay/Accordion/AccordionItem.tsx +62 -62
  9. package/src/Components/DataDisplay/Accordion/AccordionItemProps.tsx +12 -12
  10. package/src/Components/DataDisplay/Accordion/AccordionProps.tsx +8 -8
  11. package/src/Components/DataDisplay/Accordion/AccordionProvider.tsx +65 -65
  12. package/src/Components/DataDisplay/Accordion/AccordionProviderInterface.tsx +8 -8
  13. package/src/Components/DataDisplay/Accordion/accordion.module.scss +56 -56
  14. package/src/Components/DataDisplay/Badge/Badge.stories.tsx +44 -44
  15. package/src/Components/DataDisplay/Badge/Badge.tsx +32 -32
  16. package/src/Components/DataDisplay/Badge/BadgeProps.tsx +6 -6
  17. package/src/Components/DataDisplay/Badge/badge.module.scss +42 -42
  18. package/src/Components/DataDisplay/Cards/BannerCard/BannerCard.stories.tsx +26 -26
  19. package/src/Components/DataDisplay/Cards/BannerCard/BannerCard.tsx +47 -47
  20. package/src/Components/DataDisplay/Cards/BannerCard/BannerCardInterface.tsx +15 -15
  21. package/src/Components/DataDisplay/Cards/BannerCard/banner-card.scss +54 -54
  22. package/src/Components/DataDisplay/Cards/PathwayCard/PathwayCard.stories.tsx +31 -31
  23. package/src/Components/DataDisplay/Cards/PathwayCard/PathwayCard.tsx +53 -53
  24. package/src/Components/DataDisplay/Cards/PathwayCard/PathwayCardInterface.tsx +17 -17
  25. package/src/Components/DataDisplay/Cards/PathwayCard/pathway-card-stories.scss +3 -3
  26. package/src/Components/DataDisplay/Cards/PathwayCard/pathway-card.scss +62 -62
  27. package/src/Components/DataDisplay/Media/Media.stories.tsx +30 -0
  28. package/src/Components/DataDisplay/Media/Media.tsx +28 -7
  29. package/src/Components/DataDisplay/Media/media.module.scss +8 -0
  30. package/src/Components/DataDisplay/Modal/Modal.stories.tsx +27 -0
  31. package/src/Components/DataDisplay/Modal/Modal.tsx +16 -5
  32. package/src/Components/DataDisplay/Modal/ModalActions.tsx +5 -5
  33. package/src/Components/DataDisplay/Modal/ModalActionsLeft.tsx +5 -5
  34. package/src/Components/DataDisplay/Modal/ModalActionsRight.tsx +5 -5
  35. package/src/Components/DataDisplay/Modal/ModalBody.tsx +15 -5
  36. package/src/Components/DataDisplay/Modal/ModalBodyProps.tsx +7 -0
  37. package/src/Components/DataDisplay/Modal/ModalCurtain.tsx +5 -5
  38. package/src/Components/DataDisplay/Modal/ModalHeader.tsx +32 -5
  39. package/src/Components/DataDisplay/Modal/ModalHeaderProps.tsx +8 -0
  40. package/src/Components/DataDisplay/Modal/ModalProps.tsx +8 -0
  41. package/src/Components/DataDisplay/Modal/modal.module.scss +58 -0
  42. package/src/Components/DataDisplay/NotificationsBell/NotificationBell.stories.tsx +27 -27
  43. package/src/Components/DataDisplay/NotificationsBell/NotificationsBell.tsx +51 -51
  44. package/src/Components/DataDisplay/NotificationsBell/notificationBell.module.scss +47 -47
  45. package/src/Components/DataDisplay/NotificationsPanel/Notification.stories.tsx +128 -128
  46. package/src/Components/DataDisplay/NotificationsPanel/Notification.tsx +59 -59
  47. package/src/Components/DataDisplay/NotificationsPanel/NotificationProps.tsx +11 -11
  48. package/src/Components/DataDisplay/NotificationsPanel/NotificationsGroup.tsx +17 -17
  49. package/src/Components/DataDisplay/NotificationsPanel/NotificationsGroupProps.tsx +8 -8
  50. package/src/Components/DataDisplay/NotificationsPanel/NotificationsGroups.tsx +42 -42
  51. package/src/Components/DataDisplay/NotificationsPanel/NotificationsGroupsProps.tsx +7 -7
  52. package/src/Components/DataDisplay/NotificationsPanel/NotificationsHeader.tsx +27 -27
  53. package/src/Components/DataDisplay/NotificationsPanel/NotificationsHeaderProps.tsx +7 -9
  54. package/src/Components/DataDisplay/NotificationsPanel/NotificationsNone.tsx +11 -11
  55. package/src/Components/DataDisplay/NotificationsPanel/NotificationsPanel.tsx +8 -8
  56. package/src/Components/DataDisplay/NotificationsPanel/NotificationsPanelProps.tsx +6 -6
  57. package/src/Components/DataDisplay/NotificationsPanel/notificationPanel.module.scss +196 -196
  58. package/src/Components/DataDisplay/Tab/Tab.stories.tsx +72 -72
  59. package/src/Components/DataDisplay/Tab/Tab.tsx +20 -20
  60. package/src/Components/DataDisplay/Tab/TabBody.tsx +6 -6
  61. package/src/Components/DataDisplay/Tab/TabBodyContent.tsx +15 -15
  62. package/src/Components/DataDisplay/Tab/TabBodyContentProps.tsx +9 -9
  63. package/src/Components/DataDisplay/Tab/TabBodyProps.tsx +8 -8
  64. package/src/Components/DataDisplay/Tab/TabContext.tsx +9 -9
  65. package/src/Components/DataDisplay/Tab/TabContextProps.tsx +6 -6
  66. package/src/Components/DataDisplay/Tab/TabNav.tsx +6 -6
  67. package/src/Components/DataDisplay/Tab/TabNavItem.tsx +49 -49
  68. package/src/Components/DataDisplay/Tab/TabNavItemProps.tsx +9 -9
  69. package/src/Components/DataDisplay/Tab/TabNavProps.tsx +8 -8
  70. package/src/Components/DataDisplay/Tab/TabProps.tsx +8 -8
  71. package/src/Components/DataDisplay/Tab/tab.module.scss +35 -35
  72. package/src/Components/DataDisplay/Tab/tab.stories.scss +3 -3
  73. package/src/Components/DataDisplay/Table/Table.stories.tsx +64 -64
  74. package/src/Components/DataDisplay/Table/Table.tsx +10 -10
  75. package/src/Components/DataDisplay/Table/TableBody.tsx +13 -13
  76. package/src/Components/DataDisplay/Table/TableBodyProps.tsx +8 -8
  77. package/src/Components/DataDisplay/Table/TableCell.tsx +30 -30
  78. package/src/Components/DataDisplay/Table/TableCellAction.tsx +27 -27
  79. package/src/Components/DataDisplay/Table/TableCellActionProps.tsx +11 -11
  80. package/src/Components/DataDisplay/Table/TableCellProps.tsx +11 -11
  81. package/src/Components/DataDisplay/Table/TableCellWithDesc.tsx +21 -21
  82. package/src/Components/DataDisplay/Table/TableCellWithDescProps.tsx +9 -9
  83. package/src/Components/DataDisplay/Table/TableCellWithImage.tsx +39 -39
  84. package/src/Components/DataDisplay/Table/TableCellWithImageProps.tsx +10 -10
  85. package/src/Components/DataDisplay/Table/TableFooter.tsx +5 -5
  86. package/src/Components/DataDisplay/Table/TableHead.tsx +11 -11
  87. package/src/Components/DataDisplay/Table/TableHeadProps.tsx +8 -8
  88. package/src/Components/DataDisplay/Table/TableHeaderCell.tsx +17 -17
  89. package/src/Components/DataDisplay/Table/TableHeaderCellProps.tsx +10 -10
  90. package/src/Components/DataDisplay/Table/TableProps.tsx +8 -8
  91. package/src/Components/DataDisplay/Table/TableRow.tsx +9 -9
  92. package/src/Components/DataDisplay/Table/TableRowProps.tsx +8 -8
  93. package/src/Components/DataDisplay/Table/table.module.scss +103 -103
  94. package/src/Components/Form/Button/Button.stories.tsx +63 -66
  95. package/src/Components/Form/Button/Button.tsx +64 -64
  96. package/src/Components/Form/Button/ButtonProps.tsx +18 -18
  97. package/src/Components/Form/Button/button.module.scss +142 -142
  98. package/src/Components/Form/Checkbox/Checkbox.stories.tsx +49 -49
  99. package/src/Components/Form/Checkbox/Checkbox.tsx +85 -85
  100. package/src/Components/Form/Checkbox/CheckboxProps.tsx +22 -22
  101. package/src/Components/Form/Checkbox/checkbox.module.scss +63 -63
  102. package/src/Components/Form/CheckboxSelect/CheckboxSelect.tsx +5 -5
  103. package/src/Components/Form/CheckboxSelect/CheckboxSelectItem.tsx +5 -5
  104. package/src/Components/Form/CheckboxSet/CheckboxSet.stories.tsx +93 -93
  105. package/src/Components/Form/CheckboxSet/CheckboxSet.tsx +14 -14
  106. package/src/Components/Form/CheckboxSet/CheckboxSetItem.tsx +88 -88
  107. package/src/Components/Form/CheckboxSet/CheckboxSetProps.tsx +9 -9
  108. package/src/Components/Form/CheckboxSet/checkboxSet.module.scss +13 -13
  109. package/src/Components/Form/CurrencyField/CurrenctField.stories.tsx +22 -22
  110. package/src/Components/Form/CurrencyField/CurrencyField.tsx +59 -59
  111. package/src/Components/Form/CurrencyField/CurrencyFieldProps.tsx +8 -8
  112. package/src/Components/Form/DateField/DateField.stories.tsx +22 -22
  113. package/src/Components/Form/DateField/DateField.tsx +58 -58
  114. package/src/Components/Form/DropdownBadge/DropdownBadge.stories.tsx +49 -49
  115. package/src/Components/Form/DropdownBadge/DropdownBadge.tsx +160 -160
  116. package/src/Components/Form/DropdownBadge/DropdownBadgeItem.tsx +40 -40
  117. package/src/Components/Form/DropdownBadge/DropdownBadgeItemProps.tsx +10 -10
  118. package/src/Components/Form/DropdownBadge/DropdownBadgeProps.tsx +31 -31
  119. package/src/Components/Form/DropdownBadge/DropdownBadgeSelector.tsx +11 -11
  120. package/src/Components/Form/DropdownBadge/DropdownBadgeSelectorProps.tsx +7 -7
  121. package/src/Components/Form/DropdownBadge/dropdownBadge.module.scss +105 -105
  122. package/src/Components/Form/DropdownField/DropdownField.stories.tsx +50 -50
  123. package/src/Components/Form/DropdownField/DropdownField.tsx +118 -118
  124. package/src/Components/Form/DropdownField/DropdownFieldItem.tsx +26 -26
  125. package/src/Components/Form/DropdownField/DropdownFieldItemProps.tsx +9 -9
  126. package/src/Components/Form/DropdownField/DropdownFieldProps.tsx +33 -33
  127. package/src/Components/Form/DropdownField/DropdownFieldSelector.tsx +15 -15
  128. package/src/Components/Form/DropdownField/DropdownFieldSelectorProps.tsx +7 -7
  129. package/src/Components/Form/DropdownField/dropdown.module.scss +79 -79
  130. package/src/Components/Form/EmailField/EmailField.stories.ts +23 -23
  131. package/src/Components/Form/EmailField/EmailField.tsx +51 -51
  132. package/src/Components/Form/ErrorMessage/ErrorMessage.tsx +5 -5
  133. package/src/Components/Form/FormFieldHolder/FormFieldHolder.tsx +5 -5
  134. package/src/Components/Form/IconButton/IconButton.stories.tsx +45 -45
  135. package/src/Components/Form/IconButton/IconButton.tsx +58 -58
  136. package/src/Components/Form/IconButton/IconButtonProps.tsx +15 -15
  137. package/src/Components/Form/IconButton/iconButton.module.scss +111 -111
  138. package/src/Components/Form/InputProps.tsx +25 -25
  139. package/src/Components/Form/MultiSelectField/MultiSelectField.tsx +5 -5
  140. package/src/Components/Form/MultiSelectField/MultiSelectFieldItem.tsx +5 -5
  141. package/src/Components/Form/MultiSelectField/MultiSelectFieldTag.tsx +5 -5
  142. package/src/Components/Form/PasswordField/PasswordField.stories.tsx +22 -22
  143. package/src/Components/Form/PasswordField/PasswordField.tsx +70 -70
  144. package/src/Components/Form/RadioButtons/RadioButton.tsx +70 -70
  145. package/src/Components/Form/RadioButtons/RadioButtonProps.tsx +22 -22
  146. package/src/Components/Form/RadioButtons/RadioButtons.stories.tsx +64 -64
  147. package/src/Components/Form/RadioButtons/RadioButtons.tsx +18 -18
  148. package/src/Components/Form/RadioButtons/RadioButtonsProps.tsx +10 -10
  149. package/src/Components/Form/RadioButtons/radioButton.stories.scss +3 -3
  150. package/src/Components/Form/RadioButtons/radiobutton.module.scss +63 -63
  151. package/src/Components/Form/TextField/TextField.stories.ts +22 -23
  152. package/src/Components/Form/TextField/TextField.tsx +56 -52
  153. package/src/Components/Form/TextField/TextFieldProps.tsx +8 -0
  154. package/src/Components/Form/Textarea/Textarea.stories.ts +31 -31
  155. package/src/Components/Form/Textarea/Textarea.tsx +71 -71
  156. package/src/Components/Form/Textarea/TextareaProps.tsx +27 -27
  157. package/src/Components/Form/Textarea/textarea.module.scss +49 -49
  158. package/src/Components/Form/TimeField/TimeField.stories.tsx +22 -22
  159. package/src/Components/Form/TimeField/TimeField.tsx +58 -58
  160. package/src/Components/Form/ToggleSwitch/ToggleSwitch.stories.tsx +49 -49
  161. package/src/Components/Form/ToggleSwitch/ToggleSwitch.tsx +87 -87
  162. package/src/Components/Form/ToggleSwitch/ToggleSwitchProps.tsx +22 -22
  163. package/src/Components/Form/ToggleSwitch/toggleSwitch.module.scss +82 -82
  164. package/src/Components/Form/inputs.module.scss +129 -121
  165. package/src/Components/Icons/Arrows/CaretDown/CaretDown.tsx +49 -49
  166. package/src/Components/Icons/Arrows/CaretLeft/CaretLeft.tsx +102 -0
  167. package/src/Components/Icons/Arrows/CaretRight/CaretRight.tsx +102 -0
  168. package/src/Components/Icons/Arrows/CaretUp/CaretUp.tsx +49 -49
  169. package/src/Components/Icons/Commerce/CurrencyDollarSimple/CurrencyDollarSimple.tsx +105 -105
  170. package/src/Components/Icons/Communication/AddressBook/AddressBook.stories.ts +28 -28
  171. package/src/Components/Icons/Communication/AddressBook/AddressBook.tsx +50 -50
  172. package/src/Components/Icons/Communication/Asterick/Asterisk.stories.ts +28 -28
  173. package/src/Components/Icons/Communication/Asterick/Asterisk.tsx +50 -50
  174. package/src/Components/Icons/Communication/AsterickSimple/AsteriskSimple.stories.ts +28 -28
  175. package/src/Components/Icons/Communication/AsterickSimple/AsteriskSimple.tsx +49 -49
  176. package/src/Components/Icons/Communication/At/At.stories.ts +28 -28
  177. package/src/Components/Icons/Communication/At/At.tsx +49 -49
  178. package/src/Components/Icons/Communication/Broadcast/Broadcast.stories.ts +27 -27
  179. package/src/Components/Icons/Communication/Broadcast/Broadcast.tsx +49 -49
  180. package/src/Components/Icons/Communication/Chat/Chat.stories.ts +28 -28
  181. package/src/Components/Icons/Communication/Chat/Chat.tsx +49 -49
  182. package/src/Components/Icons/Design/Eye/Eye.tsx +105 -105
  183. package/src/Components/Icons/Design/EyeSlash/EyeSlash.tsx +105 -105
  184. package/src/Components/Icons/IconProps.tsx +5 -5
  185. package/src/Components/Icons/SystemAndDevice/Bell/Bell.tsx +49 -49
  186. package/src/Components/Icons/SystemAndDevice/MagnifyingGlass/MagnifyingGlass.tsx +105 -0
  187. package/src/Components/Icons/Time/CalendarBank/CalendarBank.tsx +105 -105
  188. package/src/Components/Icons/Time/Clock/Clock.tsx +105 -105
  189. package/src/Components/Layout/CalloutPopup/CalloutPopup.tsx +5 -5
  190. package/src/Components/Layout/Header/Header.tsx +5 -5
  191. package/src/Components/Layout/Header/HeaderLeft.tsx +5 -5
  192. package/src/Components/Layout/Header/HeaderRight.tsx +5 -5
  193. package/src/Components/Layout/Pagination/Pagination.tsx +5 -5
  194. package/src/Components/Layout/Pagination/PaginationFirst.tsx +5 -5
  195. package/src/Components/Layout/Pagination/PaginationLast.tsx +5 -5
  196. package/src/Components/Layout/Pagination/PaginationNext.tsx +5 -5
  197. package/src/Components/Layout/Pagination/PaginationNumber.tsx +5 -5
  198. package/src/Components/Layout/Pagination/PaginationPrevious.tsx +5 -5
  199. package/src/Components/Layout/ProfileAvatar/ProfileAvatar.stories.tsx +22 -0
  200. package/src/Components/Layout/ProfileAvatar/ProfileAvatar.tsx +31 -5
  201. package/src/Components/Layout/ProfileAvatar/ProfileAvatarProps.tsx +10 -4
  202. package/src/Components/Layout/ProfileAvatar/profileAvatar.module.scss +35 -0
  203. package/src/Components/Layout/ProfileDropdown/ProfileDropdown.stories.tsx +67 -0
  204. package/src/Components/Layout/ProfileDropdown/ProfileDropdown.tsx +12 -5
  205. package/src/Components/Layout/ProfileDropdown/ProfileDropdownProps.tsx +8 -0
  206. package/src/Components/Layout/ProfileDropdown/ProfileHeader.tsx +24 -5
  207. package/src/Components/Layout/ProfileDropdown/ProfileHeaderProps.tsx +8 -0
  208. package/src/Components/Layout/ProfileDropdown/ProfileLink.tsx +10 -5
  209. package/src/Components/Layout/ProfileDropdown/ProfileLinkProps.tsx +7 -0
  210. package/src/Components/Layout/ProfileDropdown/ProfileLinks.tsx +14 -5
  211. package/src/Components/Layout/ProfileDropdown/ProfileLinksProps.tsx +7 -0
  212. package/src/Components/Layout/ProfileDropdown/ProfileNavigationItem.tsx +29 -5
  213. package/src/Components/Layout/ProfileDropdown/ProfileNavigationItemProps.tsx +10 -0
  214. package/src/Components/Layout/ProfileDropdown/ProfileSwitchPanel.tsx +79 -5
  215. package/src/Components/Layout/ProfileDropdown/ProfileSwitchPanelProps.tsx +10 -0
  216. package/src/Components/Layout/ProfileDropdown/ProfileSwitchUser.tsx +22 -5
  217. package/src/Components/Layout/ProfileDropdown/ProfileSwitchUserProps.tsx +7 -0
  218. package/src/Components/Layout/ProfileDropdown/profileDropdown.module.scss +207 -0
  219. package/src/Components/Layout/Sidebar/Sidebar.tsx +5 -5
  220. package/src/Components/Layout/Sidebar/SidebarChevron.tsx +5 -5
  221. package/src/Components/Layout/Sidebar/SidebarNavigation.tsx +5 -5
  222. package/src/Components/Layout/Sidebar/SidebarNavigationItem.tsx +5 -5
  223. package/src/Components/Layout/Sidebar/SidebarSubNavigation.tsx +5 -5
  224. package/src/Notification/Notification.tsx +83 -83
  225. package/src/Notification/NotificationList.tsx +47 -22
  226. package/src/global.scss +224 -231
  227. package/src/main.tsx +10 -9
  228. package/src/variables.scss +2 -2
  229. package/.editorconfig +0 -17
  230. package/.eslintrc.cjs +0 -14
  231. package/.storybook/main.ts +0 -23
  232. package/.storybook/preview.ts +0 -17
  233. package/index.html +0 -13
  234. package/public/image/table-image.png +0 -0
  235. package/public/vite.svg +0 -1
  236. package/src/Components/DataDisplay/Media/media.scss +0 -0
  237. package/tokens/color/color.mdx +0 -82
  238. package/tokens/shadow/shadow-panel.scss +0 -12
  239. package/tokens/shadow/shadow.mdx +0 -34
  240. package/tokens/typography/typography.mdx +0 -31
  241. package/tsconfig.json +0 -25
  242. package/tsconfig.node.json +0 -10
  243. package/vite.config.ts +0 -7
@@ -1,111 +1,111 @@
1
- @import "../../../variables";
2
-
3
- .iconButton {
4
- display: inline-flex;
5
- align-items: center;
6
- justify-content: center;
7
- border-width: 1px;
8
- border-style: solid;
9
- border-radius: 4px;
10
- cursor: pointer;
11
- transition: linear all 300ms;
12
- font-family: var(--font);
13
-
14
- svg {
15
- width: 20px;
16
- height: 20px;
17
- }
18
-
19
- &:disabled {
20
- cursor: not-allowed;
21
- }
22
-
23
- &.disabled {
24
- opacity: 0.3;
25
- cursor: not-allowed;
26
- }
27
-
28
- .primaryIcon,
29
- .secondaryIcon {
30
- width: 20px;
31
- height: 20px;
32
- }
33
-
34
- &.solid {
35
- }
36
-
37
- &.hollow {
38
- }
39
-
40
- &.noBorder {
41
- border-color: transparent;
42
- }
43
-
44
- &.default {
45
- padding: calc(var(--space-unit) * 3);
46
- min-height: 40px;
47
- }
48
-
49
- &.large {
50
- padding: calc(var(--space-unit) * 4);
51
- min-height: 48px;
52
- }
53
-
54
- &.small {
55
- padding: calc(var(--space-unit) * 2);
56
- min-height: 32px;
57
- }
58
-
59
- @each $color in $colors {
60
- &.solid-#{$color} {
61
- color: var(--color-lite);
62
- background-color: var(--color-#{$color}-500);
63
- border-color: var(--color-#{$color}-500);
64
-
65
- &:hover:enabled {
66
- background-color: var(--color-#{$color}-300);
67
- border-color: var(--color-#{$color}-300);
68
- }
69
-
70
- &:active:enabled {
71
- background-color: var(--color-#{$color}-600);
72
- border-color: var(--color-#{$color}-600);
73
- }
74
- }
75
- }
76
-
77
- @each $color in $colors {
78
- &.hollow-#{$color} {
79
- background: transparent;
80
- color: var(--color-#{$color}-800);
81
- border-color: var(--color-#{$color}-600);
82
-
83
- &:hover:enabled {
84
- background: var(--color-#{$color}-100);
85
- }
86
-
87
- &:active:enabled {
88
- background: var(--color-#{$color}-100);
89
- border-width: 2px;
90
- }
91
- }
92
- }
93
-
94
- @each $color in $colors {
95
- &.no-border-#{$color} {
96
- background: transparent;
97
- color: var(--color-#{$color}-800);
98
- border-color: transparent;
99
-
100
- &:hover:enabled {
101
- background-color: var(--color-#{$color}-200);
102
- color: var(--color-#{$color}-800);
103
- }
104
-
105
- &:active:enabled {
106
- background-color: var(--color-#{$color}-100);
107
- color: var(--color-#{$color}-800);
108
- }
109
- }
110
- }
111
- }
1
+ @import "../../../variables";
2
+
3
+ .iconButton {
4
+ display: inline-flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ border-width: 1px;
8
+ border-style: solid;
9
+ border-radius: 4px;
10
+ cursor: pointer;
11
+ transition: linear all 300ms;
12
+ font-family: var(--font);
13
+
14
+ svg {
15
+ width: 20px;
16
+ height: 20px;
17
+ }
18
+
19
+ &:disabled {
20
+ cursor: not-allowed;
21
+ }
22
+
23
+ &.disabled {
24
+ opacity: 0.3;
25
+ cursor: not-allowed;
26
+ }
27
+
28
+ .primaryIcon,
29
+ .secondaryIcon {
30
+ width: 20px;
31
+ height: 20px;
32
+ }
33
+
34
+ &.solid {
35
+ }
36
+
37
+ &.hollow {
38
+ }
39
+
40
+ &.noBorder {
41
+ border-color: transparent;
42
+ }
43
+
44
+ &.default {
45
+ padding: calc(var(--space-unit) * 3);
46
+ min-height: 40px;
47
+ }
48
+
49
+ &.large {
50
+ padding: calc(var(--space-unit) * 4);
51
+ min-height: 48px;
52
+ }
53
+
54
+ &.small {
55
+ padding: calc(var(--space-unit) * 2);
56
+ min-height: 32px;
57
+ }
58
+
59
+ @each $color in $colors {
60
+ &.solid-#{$color} {
61
+ color: var(--color-lite);
62
+ background-color: var(--color-#{$color}-500);
63
+ border-color: var(--color-#{$color}-500);
64
+
65
+ &:hover:enabled {
66
+ background-color: var(--color-#{$color}-300);
67
+ border-color: var(--color-#{$color}-300);
68
+ }
69
+
70
+ &:active:enabled {
71
+ background-color: var(--color-#{$color}-600);
72
+ border-color: var(--color-#{$color}-600);
73
+ }
74
+ }
75
+ }
76
+
77
+ @each $color in $colors {
78
+ &.hollow-#{$color} {
79
+ background: transparent;
80
+ color: var(--color-#{$color}-800);
81
+ border-color: var(--color-#{$color}-600);
82
+
83
+ &:hover:enabled {
84
+ background: var(--color-#{$color}-100);
85
+ }
86
+
87
+ &:active:enabled {
88
+ background: var(--color-#{$color}-100);
89
+ border-width: 2px;
90
+ }
91
+ }
92
+ }
93
+
94
+ @each $color in $colors {
95
+ &.no-border-#{$color} {
96
+ background: transparent;
97
+ color: var(--color-#{$color}-800);
98
+ border-color: transparent;
99
+
100
+ &:hover:enabled {
101
+ background-color: var(--color-#{$color}-200);
102
+ color: var(--color-#{$color}-800);
103
+ }
104
+
105
+ &:active:enabled {
106
+ background-color: var(--color-#{$color}-100);
107
+ color: var(--color-#{$color}-800);
108
+ }
109
+ }
110
+ }
111
+ }
@@ -1,25 +1,25 @@
1
- import {FocusEvent, ChangeEvent, MouseEvent} from "react";
2
-
3
- interface InputProps {
4
- name?: string;
5
- id?: string;
6
- value?: string;
7
- extraClass?: string;
8
- placeholder?: string;
9
- error?: boolean;
10
- disabled?:boolean;
11
- readonly?: boolean;
12
- autoComplete?: boolean;
13
- required?: boolean;
14
- ariaLabel?: string;
15
- minLength?: number;
16
- maxLength?: number;
17
- ariaLabeledby?: string;
18
- ariaDescribedby?: string;
19
- onClick?: (e: MouseEvent) => void;
20
- onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
21
- onFocus?: (e: FocusEvent) => void;
22
- onBlur?: (e: FocusEvent) => void;
23
- }
24
-
25
- export default InputProps;
1
+ import {FocusEvent, ChangeEvent, MouseEvent} from "react";
2
+
3
+ interface InputProps {
4
+ name?: string;
5
+ id?: string;
6
+ value?: string;
7
+ extraClass?: string;
8
+ placeholder?: string;
9
+ error?: boolean;
10
+ disabled?:boolean;
11
+ readonly?: boolean;
12
+ autoComplete?: boolean;
13
+ required?: boolean;
14
+ ariaLabel?: string;
15
+ minLength?: number;
16
+ maxLength?: number;
17
+ ariaLabeledby?: string;
18
+ ariaDescribedby?: string;
19
+ onClick?: (e: MouseEvent) => void;
20
+ onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
21
+ onFocus?: (e: FocusEvent) => void;
22
+ onBlur?: (e: FocusEvent) => void;
23
+ }
24
+
25
+ export default InputProps;
@@ -1,5 +1,5 @@
1
- const MultiSelectField = () => {
2
-
3
- }
4
-
5
- export default MultiSelectField;
1
+ const MultiSelectField = () => {
2
+
3
+ }
4
+
5
+ export default MultiSelectField;
@@ -1,5 +1,5 @@
1
- const MultiSelectFieldItem = () => {
2
-
3
- }
4
-
5
- export default MultiSelectFieldItem;
1
+ const MultiSelectFieldItem = () => {
2
+
3
+ }
4
+
5
+ export default MultiSelectFieldItem;
@@ -1,5 +1,5 @@
1
- const MultiSelectFieldTag = () => {
2
-
3
- }
4
-
5
- export default MultiSelectFieldTag;
1
+ const MultiSelectFieldTag = () => {
2
+
3
+ }
4
+
5
+ export default MultiSelectFieldTag;
@@ -1,22 +1,22 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
-
3
- import PasswordField from "./PasswordField.tsx";
4
-
5
- // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6
- const meta = {
7
- title: "Form / PasswordField",
8
- component: PasswordField,
9
- parameters: {
10
- layout: "centered",
11
- },
12
- tags: ["autodocs"],
13
- } satisfies Meta<typeof PasswordField>;
14
-
15
- export default meta;
16
- type Story = StoryObj<typeof PasswordField>;
17
-
18
- export const Example: Story = {
19
- args: {
20
- placeholder: "Placeholder",
21
- },
22
- };
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import PasswordField from "./PasswordField.tsx";
4
+
5
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6
+ const meta = {
7
+ title: "Form / PasswordField",
8
+ component: PasswordField,
9
+ parameters: {
10
+ layout: "centered",
11
+ },
12
+ tags: ["autodocs"],
13
+ } satisfies Meta<typeof PasswordField>;
14
+
15
+ export default meta;
16
+ type Story = StoryObj<typeof PasswordField>;
17
+
18
+ export const Example: Story = {
19
+ args: {
20
+ placeholder: "Placeholder",
21
+ },
22
+ };
@@ -1,70 +1,70 @@
1
- import cx from "classnames";
2
- import InputProps from "../InputProps";
3
- import styles from "../inputs.module.scss";
4
- import Eye from "../../Icons/Design/Eye/Eye";
5
- import EyeSlash from "../../Icons/Design/EyeSlash/EyeSlash";
6
- import { useState } from "react";
7
-
8
- const PasswordField = (props: InputProps) => {
9
- const {
10
- name,
11
- id,
12
- value,
13
- placeholder,
14
- extraClass,
15
- disabled,
16
- error,
17
- ariaLabel,
18
- required,
19
- readonly,
20
- autoComplete,
21
- ...args
22
- } = props;
23
-
24
- const [fieldType, setFieldType] = useState("password");
25
-
26
- const onPasswordChange = () => {
27
- setFieldType(fieldType === "password" ? "text" : "password");
28
- };
29
-
30
- const classes = [styles.input];
31
- if (error) {
32
- classes.push(styles.error);
33
- }
34
- if (extraClass) {
35
- classes.push(extraClass);
36
- }
37
-
38
- return (
39
- <div className={styles.passwordCon}>
40
- <input
41
- className={cx(classes)}
42
- id={id}
43
- name={name}
44
- type={fieldType}
45
- value={value}
46
- placeholder={placeholder}
47
- disabled={disabled}
48
- readOnly={readonly}
49
- required={required}
50
- autoComplete={autoComplete ? "on" : "off"}
51
- aria-label={ariaLabel ? ariaLabel : name}
52
- aria-required={required ? "true" : "false"}
53
- aria-invalid={error ? "true" : "false"}
54
- aria-disabled={disabled ? "true" : "false"}
55
- aria-readonly={readonly ? "true" : "false"}
56
- aria-autocomplete={autoComplete ? "list" : "none"}
57
- {...args}
58
- />
59
- <span onClick={onPasswordChange} className={styles.eyeicon}>
60
- {fieldType == "password" ? (
61
- <Eye type="regular" />
62
- ) : (
63
- <EyeSlash type="regular" />
64
- )}
65
- </span>
66
- </div>
67
- );
68
- };
69
-
70
- export default PasswordField;
1
+ import cx from "classnames";
2
+ import InputProps from "../InputProps";
3
+ import styles from "../inputs.module.scss";
4
+ import Eye from "../../Icons/Design/Eye/Eye";
5
+ import EyeSlash from "../../Icons/Design/EyeSlash/EyeSlash";
6
+ import { useState } from "react";
7
+
8
+ const PasswordField = (props: InputProps) => {
9
+ const {
10
+ name,
11
+ id,
12
+ value,
13
+ placeholder,
14
+ extraClass,
15
+ disabled,
16
+ error,
17
+ ariaLabel,
18
+ required,
19
+ readonly,
20
+ autoComplete,
21
+ ...args
22
+ } = props;
23
+
24
+ const [fieldType, setFieldType] = useState("password");
25
+
26
+ const onPasswordChange = () => {
27
+ setFieldType(fieldType === "password" ? "text" : "password");
28
+ };
29
+
30
+ const classes = [styles.input];
31
+ if (error) {
32
+ classes.push(styles.error);
33
+ }
34
+ if (extraClass) {
35
+ classes.push(extraClass);
36
+ }
37
+
38
+ return (
39
+ <div className={styles.passwordCon}>
40
+ <input
41
+ className={cx(classes)}
42
+ id={id}
43
+ name={name}
44
+ type={fieldType}
45
+ value={value}
46
+ placeholder={placeholder}
47
+ disabled={disabled}
48
+ readOnly={readonly}
49
+ required={required}
50
+ autoComplete={autoComplete ? "on" : "off"}
51
+ aria-label={ariaLabel ? ariaLabel : name}
52
+ aria-required={required ? "true" : "false"}
53
+ aria-invalid={error ? "true" : "false"}
54
+ aria-disabled={disabled ? "true" : "false"}
55
+ aria-readonly={readonly ? "true" : "false"}
56
+ aria-autocomplete={autoComplete ? "list" : "none"}
57
+ {...args}
58
+ />
59
+ <span onClick={onPasswordChange} className={styles.eyeicon}>
60
+ {fieldType == "password" ? (
61
+ <Eye type="regular" />
62
+ ) : (
63
+ <EyeSlash type="regular" />
64
+ )}
65
+ </span>
66
+ </div>
67
+ );
68
+ };
69
+
70
+ export default PasswordField;
@@ -1,70 +1,70 @@
1
- import cx from "classnames";
2
- import RadioButtonProps from "./RadioButtonProps";
3
- import styles from "./radiobutton.module.scss";
4
- import { useEffect, useState, MouseEvent } from "react";
5
-
6
- const RadioButton = (props: RadioButtonProps) => {
7
- const {
8
- name,
9
- checked,
10
- id,
11
- value,
12
- placeholder,
13
- extraClass,
14
- disabled,
15
- error,
16
- ariaLabel,
17
- required,
18
- readonly,
19
- onChange,
20
- ...args
21
- } = props;
22
-
23
- const [isChecked, setIsChecked] = useState(false);
24
-
25
- const classes = ["radio", styles.radio];
26
-
27
- if (extraClass) {
28
- classes.push(extraClass);
29
- }
30
- if (error) {
31
- classes.push(styles.error);
32
- }
33
-
34
- useEffect(() => {
35
- setIsChecked(checked || false);
36
- }, [checked]);
37
-
38
- const handleClick = (e: MouseEvent) => {
39
- setIsChecked(true);
40
- if (onChange) {
41
- onChange(e, true);
42
- }
43
- };
44
-
45
- return (
46
- <div className={cx(classes)}>
47
- <input
48
- id={id}
49
- name={name}
50
- checked={isChecked}
51
- type={"radio"}
52
- value={value}
53
- placeholder={placeholder}
54
- disabled={disabled}
55
- readOnly={readonly}
56
- required={required}
57
- aria-label={ariaLabel ? ariaLabel : name}
58
- aria-required={required ? "true" : "false"}
59
- aria-invalid={error ? "true" : "false"}
60
- aria-disabled={disabled ? "true" : "false"}
61
- aria-readonly={readonly ? "true" : "false"}
62
- onClick={handleClick}
63
- {...args}
64
- />
65
- <div className={styles.circle}></div>
66
- </div>
67
- );
68
- };
69
-
70
- export default RadioButton;
1
+ import cx from "classnames";
2
+ import RadioButtonProps from "./RadioButtonProps";
3
+ import styles from "./radiobutton.module.scss";
4
+ import { useEffect, useState, MouseEvent } from "react";
5
+
6
+ const RadioButton = (props: RadioButtonProps) => {
7
+ const {
8
+ name,
9
+ checked,
10
+ id,
11
+ value,
12
+ placeholder,
13
+ extraClass,
14
+ disabled,
15
+ error,
16
+ ariaLabel,
17
+ required,
18
+ readonly,
19
+ onChange,
20
+ ...args
21
+ } = props;
22
+
23
+ const [isChecked, setIsChecked] = useState(false);
24
+
25
+ const classes = ["radio", styles.radio];
26
+
27
+ if (extraClass) {
28
+ classes.push(extraClass);
29
+ }
30
+ if (error) {
31
+ classes.push(styles.error);
32
+ }
33
+
34
+ useEffect(() => {
35
+ setIsChecked(checked || false);
36
+ }, [checked]);
37
+
38
+ const handleClick = (e: MouseEvent) => {
39
+ setIsChecked(true);
40
+ if (onChange) {
41
+ onChange(e, true);
42
+ }
43
+ };
44
+
45
+ return (
46
+ <div className={cx(classes)}>
47
+ <input
48
+ id={id}
49
+ name={name}
50
+ checked={isChecked}
51
+ type={"radio"}
52
+ value={value}
53
+ placeholder={placeholder}
54
+ disabled={disabled}
55
+ readOnly={readonly}
56
+ required={required}
57
+ aria-label={ariaLabel ? ariaLabel : name}
58
+ aria-required={required ? "true" : "false"}
59
+ aria-invalid={error ? "true" : "false"}
60
+ aria-disabled={disabled ? "true" : "false"}
61
+ aria-readonly={readonly ? "true" : "false"}
62
+ onClick={handleClick}
63
+ {...args}
64
+ />
65
+ <div className={styles.circle}></div>
66
+ </div>
67
+ );
68
+ };
69
+
70
+ export default RadioButton;
@@ -1,22 +1,22 @@
1
- import { FocusEvent, MouseEvent } from "react";
2
-
3
- interface RadioButtonProps {
4
- name?: string;
5
- id?: string;
6
- value?: string;
7
- extraClass?: string;
8
- placeholder?: string;
9
- error?: boolean;
10
- disabled?: boolean;
11
- readonly?: boolean;
12
- checked?: boolean;
13
- required?: boolean;
14
- ariaLabel?: string;
15
- ariaLabeledby?: string;
16
- ariaDescribedby?: string;
17
- onChange?: (e: MouseEvent, checked?: boolean) => void;
18
- onFocus?: (e: FocusEvent) => void;
19
- onBlur?: (e: FocusEvent) => void;
20
- }
21
-
22
- export default RadioButtonProps;
1
+ import { FocusEvent, MouseEvent } from "react";
2
+
3
+ interface RadioButtonProps {
4
+ name?: string;
5
+ id?: string;
6
+ value?: string;
7
+ extraClass?: string;
8
+ placeholder?: string;
9
+ error?: boolean;
10
+ disabled?: boolean;
11
+ readonly?: boolean;
12
+ checked?: boolean;
13
+ required?: boolean;
14
+ ariaLabel?: string;
15
+ ariaLabeledby?: string;
16
+ ariaDescribedby?: string;
17
+ onChange?: (e: MouseEvent, checked?: boolean) => void;
18
+ onFocus?: (e: FocusEvent) => void;
19
+ onBlur?: (e: FocusEvent) => void;
20
+ }
21
+
22
+ export default RadioButtonProps;