allaw-ui 1.1.1 → 2.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 (222) hide show
  1. package/dist/assets/allaw-font.eot +0 -0
  2. package/dist/assets/allaw-font.svg +15 -0
  3. package/dist/assets/allaw-font.ttf +0 -0
  4. package/dist/assets/allaw-font.woff +0 -0
  5. package/dist/components/atoms/buttons/ActionCircleButton.stories.d.ts +35 -0
  6. package/dist/components/atoms/buttons/ActionCircleButton.stories.js +54 -0
  7. package/dist/components/atoms/buttons/AgendaSlot.stories.d.ts +41 -0
  8. package/dist/components/atoms/buttons/AgendaSlot.stories.js +77 -0
  9. package/dist/components/atoms/buttons/FavoriteToggle.stories.d.ts +23 -0
  10. package/dist/components/atoms/buttons/FavoriteToggle.stories.js +61 -0
  11. package/dist/components/atoms/buttons/FilterButton.stories.d.ts +36 -0
  12. package/dist/components/atoms/buttons/FilterButton.stories.js +56 -0
  13. package/dist/components/atoms/buttons/FilterButtonPrimary.stories.d.ts +7 -0
  14. package/dist/components/atoms/buttons/FilterButtonPrimary.stories.js +26 -0
  15. package/dist/components/atoms/buttons/GhostButton.stories.d.ts +79 -0
  16. package/dist/components/atoms/buttons/GhostButton.stories.js +95 -0
  17. package/dist/components/atoms/buttons/IconButton.js +2 -2
  18. package/dist/components/atoms/buttons/IconButton.stories.d.ts +48 -0
  19. package/dist/components/atoms/buttons/IconButton.stories.js +76 -0
  20. package/dist/components/atoms/buttons/OAuthProviderButton.css +25 -23
  21. package/dist/components/atoms/buttons/OAuthProviderButton.d.ts +2 -2
  22. package/dist/components/atoms/buttons/OAuthProviderButton.js +43 -10
  23. package/dist/components/atoms/buttons/OAuthProviderButton.stories.d.ts +56 -0
  24. package/dist/components/atoms/buttons/OAuthProviderButton.stories.js +130 -0
  25. package/dist/components/atoms/buttons/PendingDocuments.d.ts +0 -1
  26. package/dist/components/atoms/buttons/PendingDocuments.js +6 -4
  27. package/dist/components/atoms/buttons/PendingDocuments.stories.d.ts +52 -0
  28. package/dist/components/atoms/buttons/PendingDocuments.stories.js +67 -0
  29. package/dist/components/atoms/buttons/PrimaryButton.css +1 -0
  30. package/dist/components/atoms/buttons/PrimaryButton.stories.d.ts +86 -0
  31. package/dist/components/atoms/buttons/PrimaryButton.stories.js +147 -0
  32. package/dist/components/atoms/buttons/SecondaryButton.stories.d.ts +72 -0
  33. package/dist/components/atoms/buttons/SecondaryButton.stories.js +149 -0
  34. package/dist/components/atoms/buttons/TabNavigation.css +2 -0
  35. package/dist/components/atoms/buttons/TabNavigation.stories.d.ts +44 -0
  36. package/dist/components/atoms/buttons/TabNavigation.stories.js +66 -0
  37. package/dist/components/atoms/buttons/TertiaryButton.stories.d.ts +42 -0
  38. package/dist/components/atoms/buttons/TertiaryButton.stories.js +60 -0
  39. package/dist/components/atoms/buttons/{PendingDocuments.css → pendingDocuments.module.css} +9 -8
  40. package/dist/components/atoms/checkboxes/Checkbox.stories.d.ts +77 -0
  41. package/dist/components/atoms/checkboxes/Checkbox.stories.js +123 -0
  42. package/dist/components/atoms/datepickers/Datepicker.js +1 -0
  43. package/dist/components/atoms/datepickers/Datepicker.stories.d.ts +90 -0
  44. package/dist/components/atoms/datepickers/Datepicker.stories.js +67 -0
  45. package/dist/components/atoms/filter/Filter.stories.d.ts +9 -0
  46. package/dist/components/atoms/filter/Filter.stories.js +77 -0
  47. package/dist/components/atoms/filters/SingleFilter.stories.d.ts +7 -0
  48. package/dist/components/atoms/filters/SingleFilter.stories.js +34 -0
  49. package/dist/components/atoms/inputs/Input.stories.d.ts +62 -0
  50. package/dist/components/atoms/inputs/Input.stories.js +101 -0
  51. package/dist/components/atoms/inputs/SearchBar.stories.d.ts +54 -0
  52. package/dist/components/atoms/inputs/SearchBar.stories.js +67 -0
  53. package/dist/components/atoms/inputs/TextArea.stories.d.ts +70 -0
  54. package/dist/components/atoms/inputs/TextArea.stories.js +113 -0
  55. package/dist/components/atoms/progressBars/ProgressBar.css +2 -3
  56. package/dist/components/atoms/progressBars/ProgressBar.js +2 -3
  57. package/dist/components/atoms/progressBars/ProgressBar.stories.d.ts +83 -0
  58. package/dist/components/atoms/progressBars/ProgressBar.stories.js +88 -0
  59. package/dist/components/atoms/radios/RadioButton.stories.d.ts +36 -0
  60. package/dist/components/atoms/radios/RadioButton.stories.js +75 -0
  61. package/dist/components/atoms/selects/ComboBox.css +1 -1
  62. package/dist/components/atoms/selects/ComboBox.stories.d.ts +94 -0
  63. package/dist/components/atoms/selects/ComboBox.stories.js +122 -0
  64. package/dist/components/atoms/selects/Select.d.ts +0 -1
  65. package/dist/components/atoms/selects/Select.js +47 -20
  66. package/dist/components/atoms/selects/{Select.css → Select.module.css} +12 -13
  67. package/dist/components/atoms/selects/Select.stories.d.ts +86 -0
  68. package/dist/components/atoms/selects/Select.stories.js +154 -0
  69. package/dist/components/atoms/selects/SelectableListItem.d.ts +13 -0
  70. package/dist/components/atoms/selects/SelectableListItem.js +18 -0
  71. package/dist/components/atoms/selects/SelectableListItem.module.css +157 -0
  72. package/dist/components/atoms/selects/SelectableListItem.stories.d.ts +33 -0
  73. package/dist/components/atoms/selects/SelectableListItem.stories.js +53 -0
  74. package/dist/components/atoms/selects/index.d.ts +2 -0
  75. package/dist/components/atoms/selects/index.js +1 -0
  76. package/dist/components/atoms/tags/AppointementStatusTag.stories.d.ts +17 -0
  77. package/dist/components/atoms/tags/AppointementStatusTag.stories.js +70 -0
  78. package/dist/components/atoms/tags/FolderStatusTag.css +4 -4
  79. package/dist/components/atoms/tags/FolderStatusTag.stories.d.ts +28 -0
  80. package/dist/components/atoms/tags/FolderStatusTag.stories.js +51 -0
  81. package/dist/components/atoms/tags/OtherStatusTag.css +20 -1
  82. package/dist/components/atoms/tags/OtherStatusTag.d.ts +1 -0
  83. package/dist/components/atoms/tags/OtherStatusTag.js +2 -2
  84. package/dist/components/atoms/tags/OtherStatusTag.stories.d.ts +97 -0
  85. package/dist/components/atoms/tags/OtherStatusTag.stories.js +151 -0
  86. package/dist/components/atoms/typography/CardDate.stories.d.ts +119 -0
  87. package/dist/components/atoms/typography/CardDate.stories.js +103 -0
  88. package/dist/components/atoms/typography/Heading.js +1 -1
  89. package/dist/components/atoms/typography/Heading.stories.d.ts +45 -0
  90. package/dist/components/atoms/typography/Heading.stories.js +90 -0
  91. package/dist/components/atoms/typography/Link.d.ts +13 -0
  92. package/dist/components/atoms/typography/Link.js +35 -0
  93. package/dist/components/atoms/typography/Link.module.css +60 -0
  94. package/dist/components/atoms/typography/Link.stories.d.ts +57 -0
  95. package/dist/components/atoms/typography/Link.stories.js +105 -0
  96. package/dist/components/atoms/typography/Paragraph.d.ts +2 -0
  97. package/dist/components/atoms/typography/Paragraph.js +3 -3
  98. package/dist/components/atoms/typography/Paragraph.stories.d.ts +56 -0
  99. package/dist/components/atoms/typography/Paragraph.stories.js +97 -0
  100. package/dist/components/atoms/typography/SmallTitle.stories.d.ts +42 -0
  101. package/dist/components/atoms/typography/SmallTitle.stories.js +72 -0
  102. package/dist/components/atoms/typography/Subtitle.stories.d.ts +40 -0
  103. package/dist/components/atoms/typography/Subtitle.stories.js +60 -0
  104. package/dist/components/atoms/typography/TinyInfo.d.ts +1 -0
  105. package/dist/components/atoms/typography/TinyInfo.js +2 -2
  106. package/dist/components/atoms/typography/TinyInfo.stories.d.ts +52 -0
  107. package/dist/components/atoms/typography/TinyInfo.stories.js +97 -0
  108. package/dist/components/atoms/typography/index.d.ts +2 -0
  109. package/dist/components/atoms/typography/index.js +1 -0
  110. package/dist/components/atoms/uiVariables/AnimatedBorder.css +55 -0
  111. package/dist/components/atoms/uiVariables/AnimatedBorder.d.ts +4 -0
  112. package/dist/components/atoms/uiVariables/AnimatedBorder.js +11 -0
  113. package/dist/components/atoms/uiVariables/AnimatedBorder.stories.d.ts +17 -0
  114. package/dist/components/atoms/uiVariables/AnimatedBorder.stories.js +20 -0
  115. package/dist/components/atoms/uiVariables/BorderRadius.stories.d.ts +18 -0
  116. package/dist/components/atoms/uiVariables/BorderRadius.stories.js +34 -0
  117. package/dist/components/atoms/uiVariables/Shadows.stories.d.ts +18 -0
  118. package/dist/components/atoms/uiVariables/Shadows.stories.js +34 -0
  119. package/dist/components/atoms/uiVariables/Strokes.stories.d.ts +18 -0
  120. package/dist/components/atoms/uiVariables/Strokes.stories.js +34 -0
  121. package/dist/components/molecules/appointmentSlot/AppointmentSlot.stories.d.ts +70 -0
  122. package/dist/components/molecules/appointmentSlot/AppointmentSlot.stories.js +186 -0
  123. package/dist/components/molecules/billingCount/BillingCount.stories.d.ts +21 -0
  124. package/dist/components/molecules/billingCount/BillingCount.stories.js +44 -0
  125. package/dist/components/molecules/blogCard/BlogCard.d.ts +13 -0
  126. package/dist/components/molecules/blogCard/BlogCard.js +33 -0
  127. package/dist/components/molecules/blogCard/BlogCard.module.css +148 -0
  128. package/dist/components/molecules/blogCard/BlogCard.stories.d.ts +10 -0
  129. package/dist/components/molecules/blogCard/BlogCard.stories.js +33 -0
  130. package/dist/components/molecules/blogCard/index.d.ts +2 -0
  131. package/dist/components/molecules/blogCard/index.js +1 -0
  132. package/dist/components/molecules/blogFooter/BlogFooter.d.ts +12 -0
  133. package/dist/components/molecules/blogFooter/BlogFooter.js +14 -0
  134. package/dist/components/molecules/blogFooter/BlogFooter.module.css +48 -0
  135. package/dist/components/molecules/blogFooter/BlogFooter.stories.d.ts +60 -0
  136. package/dist/components/molecules/blogFooter/BlogFooter.stories.js +67 -0
  137. package/dist/components/molecules/blogFooter/index.d.ts +2 -0
  138. package/dist/components/molecules/blogFooter/index.js +1 -0
  139. package/dist/components/molecules/blogHeader/BlogHeader.d.ts +11 -0
  140. package/dist/components/molecules/blogHeader/BlogHeader.js +21 -0
  141. package/dist/components/molecules/blogHeader/BlogHeader.module.css +150 -0
  142. package/dist/components/molecules/blogHeader/BlogHeader.stories.d.ts +49 -0
  143. package/dist/components/molecules/blogHeader/BlogHeader.stories.js +63 -0
  144. package/dist/components/molecules/blogHeader/index.d.ts +2 -0
  145. package/dist/components/molecules/blogHeader/index.js +1 -0
  146. package/dist/components/molecules/blogText/BlogText.d.ts +7 -0
  147. package/dist/components/molecules/blogText/BlogText.js +11 -0
  148. package/dist/components/molecules/blogText/BlogText.module.css +59 -0
  149. package/dist/components/molecules/blogText/BlogText.stories.d.ts +31 -0
  150. package/dist/components/molecules/blogText/BlogText.stories.js +51 -0
  151. package/dist/components/molecules/blogText/index.d.ts +2 -0
  152. package/dist/components/molecules/blogText/index.js +1 -0
  153. package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.d.ts +8 -0
  154. package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.js +15 -0
  155. package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.module.css +108 -0
  156. package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.stories.d.ts +37 -0
  157. package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.stories.js +58 -0
  158. package/dist/components/molecules/blogTextImageBlock/index.d.ts +2 -0
  159. package/dist/components/molecules/blogTextImageBlock/index.js +1 -0
  160. package/dist/components/molecules/breadcrumb/Breadcrumb.stories.d.ts +24 -0
  161. package/dist/components/molecules/breadcrumb/Breadcrumb.stories.js +54 -0
  162. package/dist/components/molecules/caseCard/CaseCard.stories.d.ts +114 -0
  163. package/dist/components/molecules/caseCard/CaseCard.stories.js +200 -0
  164. package/dist/components/molecules/caseCardCompact/CaseCardCompact.js +2 -1
  165. package/dist/components/molecules/caseCardCompact/CaseCardCompact.stories.d.ts +11 -0
  166. package/dist/components/molecules/caseCardCompact/CaseCardCompact.stories.js +59 -0
  167. package/dist/components/molecules/caseCardCompact/caseCardCompact.css +5 -2
  168. package/dist/components/molecules/caseLinkCard/CaseCardLink.stories.d.ts +9 -0
  169. package/dist/components/molecules/caseLinkCard/CaseCardLink.stories.js +37 -0
  170. package/dist/components/molecules/caseLinkCard/CaseLinkCard.css +2 -4
  171. package/dist/components/molecules/checkboxForm/CheckboxForm.d.ts +1 -0
  172. package/dist/components/molecules/checkboxForm/CheckboxForm.js +2 -2
  173. package/dist/components/molecules/checkboxForm/CheckboxForm.stories.d.ts +90 -0
  174. package/dist/components/molecules/checkboxForm/CheckboxForm.stories.js +149 -0
  175. package/dist/components/molecules/clientLinkCard/ClientLinkCard.stories.d.ts +11 -0
  176. package/dist/components/molecules/clientLinkCard/ClientLinkCard.stories.js +59 -0
  177. package/dist/components/molecules/contactCard/ContactCard.d.ts +3 -2
  178. package/dist/components/molecules/contactCard/ContactCard.js +23 -24
  179. package/dist/components/molecules/contactCard/ContactCard.stories.d.ts +68 -0
  180. package/dist/components/molecules/contactCard/ContactCard.stories.js +80 -0
  181. package/dist/components/molecules/contactCard/DetailedContactCard.stories.d.ts +94 -0
  182. package/dist/components/molecules/contactCard/DetailedContactCard.stories.js +83 -0
  183. package/dist/components/molecules/contactCard/{ContactCard.css → contactCard.module.css} +34 -28
  184. package/dist/components/molecules/datepickerForm/DatepickerForm.stories.d.ts +164 -0
  185. package/dist/components/molecules/datepickerForm/DatepickerForm.stories.js +113 -0
  186. package/dist/components/molecules/documentCard/DocumentCard.css +4 -1
  187. package/dist/components/molecules/documentCard/DocumentCard.d.ts +3 -2
  188. package/dist/components/molecules/documentCard/DocumentCard.js +45 -7
  189. package/dist/components/molecules/documentCard/DocumentCard.stories.d.ts +71 -0
  190. package/dist/components/molecules/documentCard/DocumentCard.stories.js +100 -0
  191. package/dist/components/molecules/employeeCard/EmployeeCard.stories.d.ts +74 -0
  192. package/dist/components/molecules/employeeCard/EmployeeCard.stories.js +65 -0
  193. package/dist/components/molecules/loadingBox/LoadingBox.stories.d.ts +54 -0
  194. package/dist/components/molecules/loadingBox/LoadingBox.stories.js +128 -0
  195. package/dist/components/molecules/pagination/Pagination.stories.d.ts +44 -0
  196. package/dist/components/molecules/pagination/Pagination.stories.js +59 -0
  197. package/dist/components/molecules/proCard/ProCard.js +0 -4
  198. package/dist/components/molecules/proCard/ProCard.stories.d.ts +49 -0
  199. package/dist/components/molecules/proCard/ProCard.stories.js +69 -0
  200. package/dist/components/molecules/radioForm/RadioForm.stories.d.ts +27 -0
  201. package/dist/components/molecules/radioForm/RadioForm.stories.js +52 -0
  202. package/dist/components/molecules/selectForm/SelectForm.stories.d.ts +58 -0
  203. package/dist/components/molecules/selectForm/SelectForm.stories.js +96 -0
  204. package/dist/components/molecules/stepper/Stepper.css +17 -4
  205. package/dist/components/molecules/stepper/Stepper.stories.d.ts +42 -0
  206. package/dist/components/molecules/stepper/Stepper.stories.js +132 -0
  207. package/dist/index.d.ts +14 -1
  208. package/dist/index.js +8 -1
  209. package/dist/stories/Header.d.ts +13 -0
  210. package/dist/stories/Header.js +20 -0
  211. package/dist/stories/Header.stories.d.ts +18 -0
  212. package/dist/stories/Header.stories.js +26 -0
  213. package/dist/stories/Page.d.ts +3 -0
  214. package/dist/stories/Page.js +37 -0
  215. package/dist/stories/Page.stories.d.ts +12 -0
  216. package/dist/stories/Page.stories.js +76 -0
  217. package/dist/stories/header.css +32 -0
  218. package/dist/stories/page.css +69 -0
  219. package/dist/styles/colors.css +2 -0
  220. package/dist/styles/colors.module.css +107 -0
  221. package/dist/styles/icons.css +76 -107
  222. package/package.json +16 -14
@@ -0,0 +1,48 @@
1
+ export namespace ActionsData {
2
+ namespace onClick {
3
+ let action: string;
4
+ }
5
+ }
6
+ declare namespace _default {
7
+ export let title: string;
8
+ export { IconButton as component };
9
+ export let tags: string[];
10
+ export let excludeStories: RegExp;
11
+ export namespace args { }
12
+ export namespace argTypes {
13
+ export namespace style {
14
+ namespace control {
15
+ let type: string;
16
+ let options: string[];
17
+ }
18
+ }
19
+ export namespace iconName {
20
+ export namespace control_1 {
21
+ let type_1: string;
22
+ export { type_1 as type };
23
+ }
24
+ export { control_1 as control };
25
+ }
26
+ export namespace onClick_1 {
27
+ let action_1: string;
28
+ export { action_1 as action };
29
+ }
30
+ export { onClick_1 as onClick };
31
+ }
32
+ export namespace parameters {
33
+ namespace backgrounds {
34
+ let _default: string;
35
+ export { _default as default };
36
+ export let values: {
37
+ name: string;
38
+ value: string;
39
+ }[];
40
+ }
41
+ }
42
+ }
43
+ export default _default;
44
+ export const SmallFilled: any;
45
+ export const LargeFilled: any;
46
+ export const MediumOutline: any;
47
+ export const IconOnly: any;
48
+ import IconButton from "./IconButton";
@@ -0,0 +1,76 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from "react";
13
+ import IconButton from "./IconButton";
14
+ import "../../../styles/global.css";
15
+ export var ActionsData = {
16
+ onClick: { action: "clicked" },
17
+ };
18
+ export default {
19
+ title: "Components/Atoms/Buttons/IconButton",
20
+ component: IconButton,
21
+ tags: ["autodocs"],
22
+ excludeStories: /.*Data$/,
23
+ args: __assign({}, ActionsData),
24
+ argTypes: {
25
+ style: {
26
+ control: {
27
+ type: "select",
28
+ options: ["smallFilled", "largeFilled", "mediumOutline", "iconOnly"],
29
+ },
30
+ },
31
+ iconName: {
32
+ control: {
33
+ type: "text",
34
+ },
35
+ },
36
+ onClick: {
37
+ action: "clicked",
38
+ },
39
+ },
40
+ parameters: {
41
+ backgrounds: {
42
+ default: "light",
43
+ values: [
44
+ { name: "light", value: "#ffffff" },
45
+ { name: "grey", value: "#728ea7" },
46
+ { name: "figma", value: "#404040" },
47
+ { name: "dark", value: "#171e25" },
48
+ ],
49
+ },
50
+ },
51
+ };
52
+ var Template = function (args) { return React.createElement(IconButton, __assign({}, args)); };
53
+ export var SmallFilled = Template.bind({});
54
+ SmallFilled.args = {
55
+ style: "smallFilled",
56
+ iconName: "allaw-icon-document",
57
+ onClick: function () { return console.log("SmallFilled button clicked"); },
58
+ };
59
+ export var LargeFilled = Template.bind({});
60
+ LargeFilled.args = {
61
+ style: "largeFilled",
62
+ iconName: "allaw-icon-document",
63
+ onClick: function () { return console.log("LargeFilled button clicked"); },
64
+ };
65
+ export var MediumOutline = Template.bind({});
66
+ MediumOutline.args = {
67
+ style: "mediumOutline",
68
+ iconName: "allaw-icon-calendar",
69
+ onClick: function () { return console.log("MediumOutline button clicked"); },
70
+ };
71
+ export var IconOnly = Template.bind({});
72
+ IconOnly.args = {
73
+ style: "iconOnly",
74
+ iconName: "allaw-icon-user",
75
+ onClick: function () { return console.log("IconOnly button clicked"); },
76
+ };
@@ -22,9 +22,7 @@
22
22
  .oauth-provider-button.google {
23
23
  width: 100%;
24
24
  background: #ffffff;
25
- box-shadow:
26
- 0px 2px 3px 0px #0000002b,
27
- 0px 0px 3px 0px #00000015;
25
+ box-shadow: 0px 2px 3px 0px #0000002b, 0px 0px 3px 0px #00000015;
28
26
  }
29
27
 
30
28
  .oauth-provider-button.google .label {
@@ -86,26 +84,6 @@
86
84
  padding-bottom: 0px;
87
85
  }
88
86
 
89
- .allaw-icon-google .path1:before {
90
- content: "\e94a";
91
- color: rgb(66, 133, 244);
92
- }
93
- .allaw-icon-google .path2:before {
94
- content: "\e94b";
95
- margin-left: -1em;
96
- color: rgb(52, 168, 83);
97
- }
98
- .allaw-icon-google .path3:before {
99
- content: "\e94c";
100
- margin-left: -1em;
101
- color: rgb(251, 188, 5);
102
- }
103
- .allaw-icon-google .path4:before {
104
- content: "\e94d";
105
- margin-left: -1em;
106
- color: rgb(235, 67, 53);
107
- }
108
-
109
87
  .linkedin-icon-container {
110
88
  display: flex;
111
89
  align-items: center;
@@ -115,3 +93,27 @@
115
93
  border-radius: 4px;
116
94
  background: #ffffff;
117
95
  }
96
+
97
+ .oauth-provider-button.microsoft {
98
+ width: 100%;
99
+ background: #ffffff;
100
+ box-shadow: 0px 2px 3px 0px #0000002b, 0px 0px 3px 0px #00000015;
101
+ font-family: Roboto;
102
+ font-size: 20px;
103
+ font-weight: 500;
104
+ color: #0000008a;
105
+ display: flex;
106
+ align-items: center;
107
+ justify-content: center;
108
+ gap: 12px;
109
+ border-radius: 10px;
110
+ padding: 6px;
111
+ cursor: pointer;
112
+ }
113
+
114
+ .oauth-provider-button.microsoft .label {
115
+ text-align: left;
116
+ white-space: nowrap;
117
+ overflow: hidden;
118
+ text-overflow: ellipsis;
119
+ }
@@ -2,8 +2,8 @@ import React from "react";
2
2
  import "./OAuthProviderButton.css";
3
3
  import "../../../styles/global.css";
4
4
  export interface OAuthProviderButtonProps {
5
- provider: "google" | "apple" | "linkedin";
6
- type: "login" | "signup";
5
+ provider: "google" | "apple" | "linkedin" | "microsoft";
6
+ type: "login" | "signup" | "calendar";
7
7
  url: string;
8
8
  size: 14 | 16 | 18 | 20 | 22 | 24;
9
9
  onClick?: () => void;
@@ -10,20 +10,29 @@ var OAuthProviderButton = function (_a) {
10
10
  google: {
11
11
  login: "Continuer avec Google",
12
12
  signup: "S'inscrire avec Google",
13
+ calendar: "Google Calendar",
13
14
  },
14
15
  apple: {
15
16
  login: "Continuer avec Apple",
16
17
  signup: "S'inscrire avec Apple",
18
+ calendar: "Apple Calendar",
17
19
  },
18
20
  linkedin: {
19
21
  login: "Continuer avec LinkedIn",
20
22
  signup: "S'inscrire avec LinkedIn",
23
+ calendar: "Ajouter à l'Agenda",
24
+ },
25
+ microsoft: {
26
+ login: "Continuer avec Microsoft",
27
+ signup: "S'inscrire avec Microsoft",
28
+ calendar: "Microsoft Outlook",
21
29
  },
22
30
  };
23
31
  var shortLabels = {
24
32
  google: "Google",
25
33
  apple: "Apple",
26
34
  linkedin: "LinkedIn",
35
+ microsoft: "Microsoft",
27
36
  };
28
37
  return { labels: labels, shortLabels: shortLabels };
29
38
  };
@@ -48,6 +57,11 @@ var OAuthProviderButton = function (_a) {
48
57
  var updateLabel = function () {
49
58
  var _a, _b;
50
59
  var _c = getLabels(), labels = _c.labels, shortLabels = _c.shortLabels;
60
+ if (!labels[provider][type]) {
61
+ console.warn("Type \"".concat(type, "\" non pris en charge pour le provider \"").concat(provider, "\"."));
62
+ setLabel("Type inconnu");
63
+ return;
64
+ }
51
65
  var maxWidth = (_b = (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) !== null && _b !== void 0 ? _b : 0;
52
66
  var thresholdWidth = getThresholdWidth(size);
53
67
  var newLabel = maxWidth < thresholdWidth
@@ -68,7 +82,6 @@ var OAuthProviderButton = function (_a) {
68
82
  }
69
83
  };
70
84
  }, [provider, type, size]);
71
- // Force an update after the first render to ensure the correct label is set
72
85
  useEffect(function () {
73
86
  if (buttonRef.current) {
74
87
  updateLabel();
@@ -76,37 +89,57 @@ var OAuthProviderButton = function (_a) {
76
89
  }, []);
77
90
  var renderIcon = function () {
78
91
  var iconSizes = {
79
- google: size * 0.8,
92
+ google: type === "calendar" ? size * 1.1 : size * 0.8,
80
93
  apple: size * 1.2,
81
94
  linkedin: size * 0.8,
95
+ microsoft: size * 1,
82
96
  };
83
- var iconClasses = {
97
+ var baseIconClass = {
84
98
  google: "allaw-icon-google",
85
99
  apple: "allaw-icon-apple",
86
100
  linkedin: "allaw-icon-linkedin",
101
+ microsoft: "allaw-icon-microsoft",
102
+ };
103
+ var calendarIconClass = {
104
+ google: "allaw-icon-google-calendar",
105
+ microsoft: "allaw-icon-microsoft-outlook",
87
106
  };
88
- var iconSize = iconSizes[provider];
89
- var iconClass = iconClasses[provider];
107
+ var iconClass = type === "calendar" && (provider === "google" || provider === "microsoft")
108
+ ? calendarIconClass[provider]
109
+ : baseIconClass[provider];
90
110
  if (provider === "google") {
91
- return (React.createElement("span", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } },
111
+ var isCalendar = type === "calendar";
112
+ return (React.createElement("span", { className: iconClass, style: { fontSize: "".concat(iconSizes[provider], "px") } },
92
113
  React.createElement("span", { className: "path1" }),
93
114
  React.createElement("span", { className: "path2" }),
94
115
  React.createElement("span", { className: "path3" }),
95
- React.createElement("span", { className: "path4" })));
116
+ React.createElement("span", { className: "path4" }),
117
+ isCalendar && (React.createElement(React.Fragment, null,
118
+ React.createElement("span", { className: "path5" }),
119
+ React.createElement("span", { className: "path6" }),
120
+ React.createElement("span", { className: "path7" }),
121
+ React.createElement("span", { className: "path8" })))));
96
122
  }
97
123
  else if (provider === "linkedin") {
98
124
  var containerSize = size * 1.4;
99
125
  return (React.createElement("div", { className: "linkedin-icon-container", style: {
100
- fontSize: "".concat(iconSize, "px"),
126
+ fontSize: "".concat(iconSizes[provider], "px"),
101
127
  width: "".concat(containerSize, "px"),
102
128
  height: "".concat(containerSize, "px"),
103
129
  minWidth: "".concat(containerSize, "px"),
104
130
  minHeight: "".concat(containerSize, "px"),
105
131
  } },
106
- React.createElement("i", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } })));
132
+ React.createElement("i", { className: iconClass, style: { fontSize: "".concat(iconSizes[provider], "px") } })));
133
+ }
134
+ else if (provider === "microsoft") {
135
+ return (React.createElement("span", { className: iconClass, style: { fontSize: "".concat(iconSizes[provider], "px") } },
136
+ React.createElement("span", { className: "path1" }),
137
+ React.createElement("span", { className: "path2" }),
138
+ React.createElement("span", { className: "path3" }),
139
+ React.createElement("span", { className: "path4" })));
107
140
  }
108
141
  else {
109
- return (React.createElement("i", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } }));
142
+ return (React.createElement("i", { className: iconClass, style: { fontSize: "".concat(iconSizes[provider], "px") } }));
110
143
  }
111
144
  };
112
145
  var handleClick = function () {
@@ -0,0 +1,56 @@
1
+ declare namespace _default {
2
+ export let title: string;
3
+ export { OAuthProviderButton as component };
4
+ export let tags: string[];
5
+ export namespace argTypes {
6
+ export namespace provider {
7
+ namespace control {
8
+ let type: string;
9
+ let options: string[];
10
+ }
11
+ }
12
+ export namespace type_1 {
13
+ export namespace control_1 {
14
+ let type_2: string;
15
+ export { type_2 as type };
16
+ let options_1: string[];
17
+ export { options_1 as options };
18
+ }
19
+ export { control_1 as control };
20
+ }
21
+ export { type_1 as type };
22
+ export namespace url {
23
+ export namespace control_2 {
24
+ let type_3: string;
25
+ export { type_3 as type };
26
+ }
27
+ export { control_2 as control };
28
+ }
29
+ export namespace size {
30
+ export namespace control_3 {
31
+ let type_4: string;
32
+ export { type_4 as type };
33
+ let options_2: number[];
34
+ export { options_2 as options };
35
+ }
36
+ export { control_3 as control };
37
+ }
38
+ export namespace onClick {
39
+ let action: string;
40
+ }
41
+ }
42
+ }
43
+ export default _default;
44
+ export const GoogleLogin: any;
45
+ export const GoogleSignup: any;
46
+ export const AppleLogin: any;
47
+ export const AppleSignup: any;
48
+ export const LinkedinLogin: any;
49
+ export const LinkedinSignup: any;
50
+ export const MicrosoftLogin: any;
51
+ export const MicrosoftSignup: any;
52
+ export const GoogleCalendar: any;
53
+ export const AppleCalendar: any;
54
+ export const LinkedinCalendar: any;
55
+ export const MicrosoftCalendar: any;
56
+ import OAuthProviderButton from "./OAuthProviderButton";
@@ -0,0 +1,130 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from "react";
13
+ import OAuthProviderButton from "./OAuthProviderButton";
14
+ import "../../../styles/global.css";
15
+ export default {
16
+ title: "Components/Atoms/Buttons/OAuthProviderButton",
17
+ component: OAuthProviderButton,
18
+ tags: ["autodocs"],
19
+ argTypes: {
20
+ provider: {
21
+ control: {
22
+ type: "select",
23
+ options: ["google", "apple", "linkedin", "microsoft"],
24
+ },
25
+ },
26
+ type: {
27
+ control: {
28
+ type: "select",
29
+ options: ["login", "signup"],
30
+ },
31
+ },
32
+ url: {
33
+ control: {
34
+ type: "text",
35
+ },
36
+ },
37
+ size: {
38
+ control: {
39
+ type: "select",
40
+ options: [14, 16, 18, 20, 22, 24],
41
+ },
42
+ },
43
+ onClick: { action: "clicked" },
44
+ },
45
+ };
46
+ var Template = function (args) { return React.createElement(OAuthProviderButton, __assign({}, args)); };
47
+ export var GoogleLogin = Template.bind({});
48
+ GoogleLogin.args = {
49
+ provider: "google",
50
+ type: "login",
51
+ url: "https://google.com",
52
+ size: 20,
53
+ };
54
+ export var GoogleSignup = Template.bind({});
55
+ GoogleSignup.args = {
56
+ provider: "google",
57
+ type: "signup",
58
+ url: "https://google.com/signup",
59
+ size: 20,
60
+ };
61
+ export var AppleLogin = Template.bind({});
62
+ AppleLogin.args = {
63
+ provider: "apple",
64
+ type: "login",
65
+ url: "https://apple.com",
66
+ size: 20,
67
+ };
68
+ export var AppleSignup = Template.bind({});
69
+ AppleSignup.args = {
70
+ provider: "apple",
71
+ type: "signup",
72
+ url: "https://apple.com/signup",
73
+ size: 20,
74
+ };
75
+ export var LinkedinLogin = Template.bind({});
76
+ LinkedinLogin.args = {
77
+ provider: "linkedin",
78
+ type: "login",
79
+ url: "https://linkedin.com",
80
+ size: 20,
81
+ };
82
+ export var LinkedinSignup = Template.bind({});
83
+ LinkedinSignup.args = {
84
+ provider: "linkedin",
85
+ type: "signup",
86
+ url: "https://linkedin.com/signup",
87
+ size: 20,
88
+ };
89
+ export var MicrosoftLogin = Template.bind({});
90
+ MicrosoftLogin.args = {
91
+ provider: "microsoft",
92
+ type: "login",
93
+ url: "https://microsoft.com",
94
+ size: 20,
95
+ };
96
+ export var MicrosoftSignup = Template.bind({});
97
+ MicrosoftSignup.args = {
98
+ provider: "microsoft",
99
+ type: "signup",
100
+ url: "https://microsoft.com/signup",
101
+ size: 20,
102
+ };
103
+ export var GoogleCalendar = Template.bind({});
104
+ GoogleCalendar.args = {
105
+ provider: "google",
106
+ type: "calendar",
107
+ url: "https://calendar.google.com/calendar/u/0/r/eventedit",
108
+ size: 20,
109
+ };
110
+ export var AppleCalendar = Template.bind({});
111
+ AppleCalendar.args = {
112
+ provider: "apple",
113
+ type: "calendar",
114
+ url: "https://www.icloud.com/calendar",
115
+ size: 20,
116
+ };
117
+ export var LinkedinCalendar = Template.bind({});
118
+ LinkedinCalendar.args = {
119
+ provider: "linkedin",
120
+ type: "calendar",
121
+ url: "#",
122
+ size: 20,
123
+ };
124
+ export var MicrosoftCalendar = Template.bind({});
125
+ MicrosoftCalendar.args = {
126
+ provider: "microsoft",
127
+ type: "calendar",
128
+ url: "https://outlook.office.com/calendar",
129
+ size: 20,
130
+ };
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import "./PendingDocuments.css";
3
2
  import "../../../styles/global.css";
4
3
  export interface PendingDocumentsProps {
5
4
  icon?: React.ReactNode;
@@ -1,12 +1,14 @@
1
1
  import React from "react";
2
- import "./PendingDocuments.css";
2
+ import styles from "./pendingDocuments.module.css";
3
3
  import "../../../styles/global.css";
4
4
  var PendingDocuments = function (_a) {
5
5
  var icon = _a.icon, pendingCount = _a.pendingCount, onClick = _a.onClick;
6
6
  var isPending = pendingCount > 0;
7
- return (React.createElement("div", { className: "pending-documents ".concat(isPending ? "pending-documents-pending" : "pending-documents-none"), onClick: isPending ? onClick : undefined },
8
- icon && React.createElement("span", { className: "pending-documents-icon" }, icon),
9
- React.createElement("span", { className: "pending-documents-label" }, isPending
7
+ return (React.createElement("div", { className: "".concat(styles.pending_documents, " ").concat(isPending
8
+ ? styles.pending_documents_pending
9
+ : styles.pending_documents_none), onClick: isPending ? onClick : undefined },
10
+ icon && React.createElement("span", { className: styles.pending_documents_icon }, icon),
11
+ React.createElement("span", { className: styles.pending_documents_label }, isPending
10
12
  ? "".concat(pendingCount, " demandes en attente")
11
13
  : "Aucune demande en attente")));
12
14
  };
@@ -0,0 +1,52 @@
1
+ export namespace ActionsData {
2
+ namespace onClick {
3
+ let action: string;
4
+ }
5
+ }
6
+ declare namespace _default {
7
+ export let title: string;
8
+ export { PendingDocuments as component };
9
+ export let tags: string[];
10
+ export let excludeStories: RegExp;
11
+ export namespace args { }
12
+ export namespace argTypes {
13
+ export namespace icon {
14
+ namespace control {
15
+ let type: string;
16
+ }
17
+ namespace mapping {
18
+ let _true: React.JSX.Element;
19
+ export { _true as true };
20
+ let _false: null;
21
+ export { _false as false };
22
+ }
23
+ }
24
+ export namespace pendingCount {
25
+ export namespace control_1 {
26
+ let type_1: string;
27
+ export { type_1 as type };
28
+ }
29
+ export { control_1 as control };
30
+ }
31
+ export namespace onClick_1 {
32
+ let action_1: string;
33
+ export { action_1 as action };
34
+ }
35
+ export { onClick_1 as onClick };
36
+ }
37
+ export namespace parameters {
38
+ namespace backgrounds {
39
+ let _default: string;
40
+ export { _default as default };
41
+ export let values: {
42
+ name: string;
43
+ value: string;
44
+ }[];
45
+ }
46
+ }
47
+ }
48
+ export default _default;
49
+ export const Default: any;
50
+ export const NoPending: any;
51
+ import PendingDocuments from "./PendingDocuments";
52
+ import React from "react";
@@ -0,0 +1,67 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from "react";
13
+ import PendingDocuments from "./PendingDocuments";
14
+ import "../../../styles/global.css";
15
+ export var ActionsData = {
16
+ onClick: { action: "clicked" },
17
+ };
18
+ export default {
19
+ title: "Components/Atoms/Buttons/PendingDocuments",
20
+ component: PendingDocuments,
21
+ tags: ["autodocs"],
22
+ excludeStories: /.*Data$/,
23
+ args: __assign({}, ActionsData),
24
+ argTypes: {
25
+ icon: {
26
+ control: {
27
+ type: "boolean",
28
+ },
29
+ mapping: {
30
+ true: React.createElement("span", { className: "allaw-icon-inbox" }),
31
+ false: null,
32
+ },
33
+ },
34
+ pendingCount: {
35
+ control: {
36
+ type: "number",
37
+ },
38
+ },
39
+ onClick: {
40
+ action: "clicked",
41
+ },
42
+ },
43
+ parameters: {
44
+ backgrounds: {
45
+ default: "light",
46
+ values: [
47
+ { name: "light", value: "#ffffff" },
48
+ { name: "grey", value: "#728ea7" },
49
+ { name: "figma", value: "#404040" },
50
+ { name: "dark", value: "#171e25" },
51
+ ],
52
+ },
53
+ },
54
+ };
55
+ var Template = function (args) { return React.createElement(PendingDocuments, __assign({}, args)); };
56
+ export var Default = Template.bind({});
57
+ Default.args = {
58
+ icon: React.createElement("span", { className: "allaw-icon-inbox" }),
59
+ pendingCount: 5,
60
+ onClick: function () { return console.log("Button clicked!"); },
61
+ };
62
+ export var NoPending = Template.bind({});
63
+ NoPending.args = {
64
+ icon: React.createElement("span", { className: "allaw-icon-inbox" }),
65
+ pendingCount: 0,
66
+ onClick: function () { return console.log("Button clicked!"); },
67
+ };
@@ -12,6 +12,7 @@
12
12
  opacity 0.2s;
13
13
  border: 0px;
14
14
  cursor: pointer;
15
+ text-wrap: nowrap;
15
16
  }
16
17
 
17
18
  .primary-button-enabled {