@dxc-technology/halstack-react 0.0.0-7ef55ea → 0.0.0-7f5cfb5

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 (277) hide show
  1. package/README.md +46 -0
  2. package/dist/index.d.mts +4197 -0
  3. package/dist/index.d.ts +4197 -0
  4. package/dist/index.js +16846 -0
  5. package/dist/index.mjs +16755 -0
  6. package/package.json +87 -71
  7. package/BackgroundColorContext.d.ts +0 -10
  8. package/BackgroundColorContext.js +0 -47
  9. package/ThemeContext.d.ts +0 -15
  10. package/ThemeContext.js +0 -243
  11. package/V3Select/V3Select.js +0 -455
  12. package/V3Select/index.d.ts +0 -27
  13. package/V3Textarea/V3Textarea.js +0 -260
  14. package/V3Textarea/index.d.ts +0 -27
  15. package/accordion/Accordion.d.ts +0 -4
  16. package/accordion/Accordion.js +0 -247
  17. package/accordion/Accordion.stories.tsx +0 -307
  18. package/accordion/types.d.ts +0 -64
  19. package/accordion/types.js +0 -5
  20. package/accordion-group/AccordionGroup.d.ts +0 -7
  21. package/accordion-group/AccordionGroup.js +0 -170
  22. package/accordion-group/AccordionGroup.stories.tsx +0 -225
  23. package/accordion-group/types.d.ts +0 -68
  24. package/accordion-group/types.js +0 -5
  25. package/alert/Alert.d.ts +0 -4
  26. package/alert/Alert.js +0 -290
  27. package/alert/Alert.stories.tsx +0 -170
  28. package/alert/types.d.ts +0 -49
  29. package/alert/types.js +0 -5
  30. package/badge/Badge.d.ts +0 -4
  31. package/badge/Badge.js +0 -59
  32. package/badge/types.d.ts +0 -4
  33. package/badge/types.js +0 -5
  34. package/bleed/Bleed.d.ts +0 -3
  35. package/bleed/Bleed.js +0 -84
  36. package/bleed/Bleed.stories.tsx +0 -342
  37. package/bleed/types.d.ts +0 -13
  38. package/bleed/types.js +0 -5
  39. package/box/Box.d.ts +0 -4
  40. package/box/Box.js +0 -126
  41. package/box/Box.stories.tsx +0 -132
  42. package/box/types.d.ts +0 -43
  43. package/box/types.js +0 -5
  44. package/button/Button.d.ts +0 -4
  45. package/button/Button.js +0 -171
  46. package/button/Button.stories.tsx +0 -274
  47. package/button/types.d.ts +0 -53
  48. package/button/types.js +0 -5
  49. package/card/Card.d.ts +0 -4
  50. package/card/Card.js +0 -164
  51. package/card/Card.stories.tsx +0 -201
  52. package/card/ice-cream.jpg +0 -0
  53. package/card/types.d.ts +0 -67
  54. package/card/types.js +0 -5
  55. package/checkbox/Checkbox.d.ts +0 -4
  56. package/checkbox/Checkbox.js +0 -253
  57. package/checkbox/Checkbox.stories.tsx +0 -192
  58. package/checkbox/types.d.ts +0 -60
  59. package/checkbox/types.js +0 -5
  60. package/chip/Chip.d.ts +0 -4
  61. package/chip/Chip.js +0 -161
  62. package/chip/Chip.stories.tsx +0 -119
  63. package/chip/types.d.ts +0 -45
  64. package/chip/types.js +0 -5
  65. package/common/OpenSans.css +0 -81
  66. package/common/RequiredComponent.js +0 -32
  67. package/common/fonts/OpenSans-Bold.ttf +0 -0
  68. package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  69. package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  70. package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  71. package/common/fonts/OpenSans-Italic.ttf +0 -0
  72. package/common/fonts/OpenSans-Light.ttf +0 -0
  73. package/common/fonts/OpenSans-LightItalic.ttf +0 -0
  74. package/common/fonts/OpenSans-Regular.ttf +0 -0
  75. package/common/fonts/OpenSans-SemiBold.ttf +0 -0
  76. package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  77. package/common/utils.js +0 -22
  78. package/common/variables.js +0 -1611
  79. package/date/Date.js +0 -373
  80. package/date/index.d.ts +0 -27
  81. package/date-input/DateInput.d.ts +0 -4
  82. package/date-input/DateInput.js +0 -358
  83. package/date-input/DateInput.stories.tsx +0 -138
  84. package/date-input/types.d.ts +0 -100
  85. package/date-input/types.js +0 -5
  86. package/dialog/Dialog.d.ts +0 -4
  87. package/dialog/Dialog.js +0 -166
  88. package/dialog/Dialog.stories.tsx +0 -212
  89. package/dialog/types.d.ts +0 -43
  90. package/dialog/types.js +0 -5
  91. package/dropdown/Dropdown.d.ts +0 -4
  92. package/dropdown/Dropdown.js +0 -395
  93. package/dropdown/Dropdown.stories.tsx +0 -249
  94. package/dropdown/types.d.ts +0 -80
  95. package/dropdown/types.js +0 -5
  96. package/file-input/FileInput.d.ts +0 -4
  97. package/file-input/FileInput.js +0 -590
  98. package/file-input/FileInput.stories.tsx +0 -507
  99. package/file-input/FileItem.d.ts +0 -14
  100. package/file-input/FileItem.js +0 -184
  101. package/file-input/types.d.ts +0 -112
  102. package/file-input/types.js +0 -5
  103. package/footer/Footer.d.ts +0 -4
  104. package/footer/Footer.js +0 -258
  105. package/footer/Footer.stories.tsx +0 -130
  106. package/footer/Icons.d.ts +0 -2
  107. package/footer/Icons.js +0 -77
  108. package/footer/types.d.ts +0 -65
  109. package/footer/types.js +0 -5
  110. package/header/Header.d.ts +0 -7
  111. package/header/Header.js +0 -324
  112. package/header/Header.stories.tsx +0 -162
  113. package/header/Icons.d.ts +0 -2
  114. package/header/Icons.js +0 -34
  115. package/header/types.d.ts +0 -47
  116. package/header/types.js +0 -5
  117. package/heading/Heading.d.ts +0 -4
  118. package/heading/Heading.js +0 -159
  119. package/heading/Heading.stories.tsx +0 -54
  120. package/heading/types.d.ts +0 -33
  121. package/heading/types.js +0 -5
  122. package/input-text/Icons.js +0 -22
  123. package/input-text/InputText.js +0 -611
  124. package/input-text/index.d.ts +0 -36
  125. package/inset/Inset.d.ts +0 -3
  126. package/inset/Inset.js +0 -84
  127. package/inset/Inset.stories.tsx +0 -229
  128. package/inset/types.d.ts +0 -13
  129. package/inset/types.js +0 -5
  130. package/layout/ApplicationLayout.d.ts +0 -10
  131. package/layout/ApplicationLayout.js +0 -231
  132. package/layout/ApplicationLayout.stories.tsx +0 -171
  133. package/layout/Icons.js +0 -55
  134. package/layout/types.d.ts +0 -57
  135. package/layout/types.js +0 -5
  136. package/link/Link.d.ts +0 -3
  137. package/link/Link.js +0 -153
  138. package/link/Link.stories.tsx +0 -151
  139. package/link/types.d.ts +0 -70
  140. package/link/types.js +0 -5
  141. package/list/List.d.ts +0 -4
  142. package/list/List.js +0 -47
  143. package/list/List.stories.tsx +0 -95
  144. package/list/types.d.ts +0 -7
  145. package/list/types.js +0 -5
  146. package/main.d.ts +0 -51
  147. package/main.js +0 -419
  148. package/number-input/NumberInput.d.ts +0 -4
  149. package/number-input/NumberInput.js +0 -83
  150. package/number-input/NumberInput.stories.tsx +0 -115
  151. package/number-input/NumberInputContext.d.ts +0 -4
  152. package/number-input/NumberInputContext.js +0 -19
  153. package/number-input/numberInputContextTypes.d.ts +0 -19
  154. package/number-input/numberInputContextTypes.js +0 -5
  155. package/number-input/types.d.ts +0 -117
  156. package/number-input/types.js +0 -5
  157. package/paginator/Icons.js +0 -66
  158. package/paginator/Paginator.d.ts +0 -4
  159. package/paginator/Paginator.js +0 -192
  160. package/paginator/Paginator.stories.tsx +0 -63
  161. package/paginator/types.d.ts +0 -38
  162. package/paginator/types.js +0 -5
  163. package/password-input/PasswordInput.d.ts +0 -4
  164. package/password-input/PasswordInput.js +0 -163
  165. package/password-input/PasswordInput.stories.tsx +0 -131
  166. package/password-input/types.d.ts +0 -107
  167. package/password-input/types.js +0 -5
  168. package/progress-bar/ProgressBar.d.ts +0 -4
  169. package/progress-bar/ProgressBar.js +0 -170
  170. package/progress-bar/ProgressBar.stories.jsx +0 -58
  171. package/progress-bar/types.d.ts +0 -37
  172. package/progress-bar/types.js +0 -5
  173. package/radio/Radio.d.ts +0 -4
  174. package/radio/Radio.js +0 -174
  175. package/radio/Radio.stories.tsx +0 -192
  176. package/radio/types.d.ts +0 -54
  177. package/radio/types.js +0 -5
  178. package/radio-group/Radio.d.ts +0 -4
  179. package/radio-group/Radio.js +0 -140
  180. package/radio-group/RadioGroup.d.ts +0 -4
  181. package/radio-group/RadioGroup.js +0 -273
  182. package/radio-group/RadioGroup.stories.tsx +0 -79
  183. package/radio-group/RadioGroup.test.js +0 -248
  184. package/radio-group/types.d.ts +0 -36
  185. package/radio-group/types.js +0 -5
  186. package/resultsetTable/ResultsetTable.d.ts +0 -4
  187. package/resultsetTable/ResultsetTable.js +0 -254
  188. package/resultsetTable/ResultsetTable.stories.tsx +0 -275
  189. package/resultsetTable/types.d.ts +0 -67
  190. package/resultsetTable/types.js +0 -5
  191. package/row/Row.d.ts +0 -3
  192. package/row/Row.js +0 -127
  193. package/row/Row.stories.tsx +0 -237
  194. package/row/types.d.ts +0 -10
  195. package/row/types.js +0 -5
  196. package/select/Select.d.ts +0 -4
  197. package/select/Select.js +0 -869
  198. package/select/Select.stories.tsx +0 -572
  199. package/select/types.d.ts +0 -170
  200. package/select/types.js +0 -5
  201. package/sidenav/Sidenav.d.ts +0 -9
  202. package/sidenav/Sidenav.js +0 -136
  203. package/sidenav/Sidenav.stories.tsx +0 -182
  204. package/sidenav/types.d.ts +0 -50
  205. package/sidenav/types.js +0 -5
  206. package/slider/Slider.d.ts +0 -4
  207. package/slider/Slider.js +0 -317
  208. package/slider/Slider.stories.tsx +0 -177
  209. package/slider/types.d.ts +0 -78
  210. package/slider/types.js +0 -5
  211. package/spinner/Spinner.d.ts +0 -4
  212. package/spinner/Spinner.js +0 -250
  213. package/spinner/Spinner.stories.jsx +0 -103
  214. package/spinner/types.d.ts +0 -32
  215. package/spinner/types.js +0 -5
  216. package/stack/Stack.d.ts +0 -3
  217. package/stack/Stack.js +0 -97
  218. package/stack/Stack.stories.tsx +0 -164
  219. package/stack/types.d.ts +0 -9
  220. package/stack/types.js +0 -5
  221. package/switch/Switch.d.ts +0 -4
  222. package/switch/Switch.js +0 -179
  223. package/switch/Switch.stories.tsx +0 -160
  224. package/switch/types.d.ts +0 -58
  225. package/switch/types.js +0 -5
  226. package/table/Table.d.ts +0 -4
  227. package/table/Table.js +0 -118
  228. package/table/Table.stories.jsx +0 -277
  229. package/table/types.d.ts +0 -21
  230. package/table/types.js +0 -5
  231. package/tabs/Tabs.d.ts +0 -4
  232. package/tabs/Tabs.js +0 -213
  233. package/tabs/Tabs.stories.tsx +0 -120
  234. package/tabs/types.d.ts +0 -78
  235. package/tabs/types.js +0 -5
  236. package/tag/Tag.d.ts +0 -4
  237. package/tag/Tag.js +0 -188
  238. package/tag/Tag.stories.tsx +0 -138
  239. package/tag/types.d.ts +0 -69
  240. package/tag/types.js +0 -5
  241. package/text/Text.d.ts +0 -7
  242. package/text/Text.js +0 -30
  243. package/text/Text.stories.tsx +0 -19
  244. package/text-input/TextInput.d.ts +0 -4
  245. package/text-input/TextInput.js +0 -796
  246. package/text-input/TextInput.stories.tsx +0 -456
  247. package/text-input/types.d.ts +0 -159
  248. package/text-input/types.js +0 -5
  249. package/textarea/Textarea.d.ts +0 -4
  250. package/textarea/Textarea.js +0 -286
  251. package/textarea/Textarea.stories.jsx +0 -136
  252. package/textarea/types.d.ts +0 -130
  253. package/textarea/types.js +0 -5
  254. package/toggle-group/ToggleGroup.d.ts +0 -4
  255. package/toggle-group/ToggleGroup.js +0 -214
  256. package/toggle-group/ToggleGroup.stories.tsx +0 -173
  257. package/toggle-group/types.d.ts +0 -97
  258. package/toggle-group/types.js +0 -5
  259. package/upload/Upload.js +0 -201
  260. package/upload/buttons-upload/ButtonsUpload.js +0 -111
  261. package/upload/buttons-upload/Icons.js +0 -40
  262. package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
  263. package/upload/dragAndDropArea/Icons.js +0 -39
  264. package/upload/file-upload/FileToUpload.js +0 -115
  265. package/upload/file-upload/Icons.js +0 -66
  266. package/upload/files-upload/FilesToUpload.js +0 -109
  267. package/upload/index.d.ts +0 -15
  268. package/upload/transaction/Icons.js +0 -160
  269. package/upload/transaction/Transaction.js +0 -104
  270. package/upload/transactions/Transactions.js +0 -94
  271. package/useTheme.d.ts +0 -2
  272. package/useTheme.js +0 -22
  273. package/wizard/Wizard.d.ts +0 -4
  274. package/wizard/Wizard.js +0 -281
  275. package/wizard/Wizard.stories.tsx +0 -224
  276. package/wizard/types.d.ts +0 -60
  277. package/wizard/types.js +0 -5
@@ -1,170 +0,0 @@
1
- import React from "react";
2
- import DxcAlert from "./Alert";
3
- import Title from "../../.storybook/components/Title";
4
- import ExampleContainer from "../../.storybook/components/ExampleContainer";
5
-
6
- export default {
7
- title: "Alert",
8
- component: DxcAlert,
9
- };
10
-
11
- export const Chromatic = () => (
12
- <>
13
- <ExampleContainer>
14
- <Title title="Info" theme="light" level={4} />
15
- <DxcAlert inlineText="Info type alert with inline text." />
16
- </ExampleContainer>
17
- <ExampleContainer>
18
- <Title title="Confirm" theme="light" level={4} />
19
- <DxcAlert type="confirm" inlineText="Confirm type alert with inline text." />
20
- </ExampleContainer>
21
- <ExampleContainer>
22
- <Title title="Warning" theme="light" level={4} />
23
- <DxcAlert type="warning" inlineText="Warning type alert with inline text." />
24
- </ExampleContainer>
25
- <ExampleContainer>
26
- <Title title="Error" theme="light" level={4} />
27
- <DxcAlert type="error" inlineText="Error type alert with inline text." />
28
- </ExampleContainer>
29
- <ExampleContainer>
30
- <Title title="With close button" theme="light" level={4} />
31
- <DxcAlert inlineText="Info type alert with inline text and close button." onClose={() => {}} />
32
- </ExampleContainer>
33
- <ExampleContainer pseudoState="pseudo-hover">
34
- <Title title="With hovered close button" theme="light" level={4} />
35
- <DxcAlert inlineText="Info type alert with inline text and close button." onClose={() => {}} />
36
- </ExampleContainer>
37
- <ExampleContainer pseudoState="pseudo-focus">
38
- <Title title="With focused close button" theme="light" level={4} />
39
- <DxcAlert inlineText="Info type alert with inline text and close button." onClose={() => {}} />
40
- </ExampleContainer>
41
- <ExampleContainer pseudoState="pseudo-active">
42
- <Title title="With actived close button" theme="light" level={4} />
43
- <DxcAlert inlineText="Info type alert with inline text and close button." onClose={() => {}} />
44
- </ExampleContainer>
45
- <ExampleContainer>
46
- <Title title="With children" theme="light" level={4} />
47
- <DxcAlert>
48
- <div>
49
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
50
- lobortis eget.
51
- </div>
52
- </DxcAlert>
53
- </ExampleContainer>
54
- <ExampleContainer>
55
- <Title title="With inline text and children" theme="light" level={4} />
56
- <DxcAlert inlineText="Info type alert with inline text.">
57
- <div>
58
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
59
- lobortis eget.
60
- </div>
61
- </DxcAlert>
62
- </ExampleContainer>
63
- <Title title="Margins" theme="light" level={2} />
64
- <ExampleContainer>
65
- <Title title="Xxsmall" theme="light" level={4} />
66
- <DxcAlert margin="xxsmall" inlineText="Info type alert with inline text and xxsmall margin." />
67
- </ExampleContainer>
68
- <ExampleContainer>
69
- <Title title="Xsmall" theme="light" level={4} />
70
- <DxcAlert margin="xsmall" inlineText="Info type alert with inline text and xsmall margin." />
71
- </ExampleContainer>
72
- <ExampleContainer>
73
- <Title title="Small" theme="light" level={4} />
74
- <DxcAlert margin="small" inlineText="Info type alert with inline text and small margin." />
75
- </ExampleContainer>
76
- <ExampleContainer>
77
- <Title title="Medium" theme="light" level={4} />
78
- <DxcAlert margin="medium" inlineText="Info type alert with inline text and medium margin." />
79
- </ExampleContainer>
80
- <ExampleContainer>
81
- <Title title="Large" theme="light" level={4} />
82
- <DxcAlert margin="large" inlineText="Info type alert with inline text and large margin." />
83
- </ExampleContainer>
84
- <ExampleContainer>
85
- <Title title="Xlarge" theme="light" level={4} />
86
- <DxcAlert margin="xlarge" inlineText="Info type alert with inline text and xlarge margin." />
87
- </ExampleContainer>
88
- <ExampleContainer>
89
- <Title title="Xxlarge" theme="light" level={4} />
90
- <DxcAlert margin="xxlarge" inlineText="Info type alert with inline text and xxlarge margin." />
91
- </ExampleContainer>
92
- <Title title="Sizes" theme="light" level={2} />
93
- <ExampleContainer>
94
- <Title title="FitContent" theme="light" level={4} />
95
- <DxcAlert
96
- size="fitContent"
97
- inlineText="Info type alert with inline text, children, close button and fitContent size."
98
- onClose={() => {}}
99
- >
100
- <div>
101
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
102
- lobortis eget.
103
- </div>
104
- </DxcAlert>
105
- </ExampleContainer>
106
- <ExampleContainer>
107
- <Title title="Small" theme="light" level={4} />
108
- <DxcAlert
109
- size="small"
110
- inlineText="Info type alert with inline text, children, close button and small size."
111
- onClose={() => {}}
112
- >
113
- <div>
114
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
115
- lobortis eget.
116
- </div>
117
- </DxcAlert>
118
- </ExampleContainer>
119
- <ExampleContainer>
120
- <Title title="Medium" theme="light" level={4} />
121
- <DxcAlert
122
- size="medium"
123
- inlineText="Info type alert with inline text, children, close button and medium size."
124
- onClose={() => {}}
125
- >
126
- <div>
127
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
128
- lobortis eget.
129
- </div>
130
- </DxcAlert>
131
- </ExampleContainer>
132
- <ExampleContainer>
133
- <Title title="Large" theme="light" level={4} />
134
- <DxcAlert
135
- size="large"
136
- inlineText="Info type alert with inline text, children, close button and large size."
137
- onClose={() => {}}
138
- >
139
- <div>
140
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
141
- lobortis eget.
142
- </div>
143
- </DxcAlert>
144
- </ExampleContainer>
145
- <ExampleContainer>
146
- <Title title="FillParent" theme="light" level={4} />
147
- <DxcAlert
148
- size="fillParent"
149
- inlineText="Info type alert with inline text, children, close button and fillParent size."
150
- onClose={() => {}}
151
- >
152
- <div>
153
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
154
- lobortis eget.
155
- </div>
156
- </DxcAlert>
157
- </ExampleContainer>
158
- </>
159
- );
160
-
161
- export const ModalAlert = () => (
162
- <ExampleContainer>
163
- <DxcAlert inlineText="Modal alert." mode="modal" onClose={() => {}}>
164
- <div>
165
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
166
- lobortis eget.
167
- </div>
168
- </DxcAlert>
169
- </ExampleContainer>
170
- );
package/alert/types.d.ts DELETED
@@ -1,49 +0,0 @@
1
- /// <reference types="react" />
2
- declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
- declare type Margin = {
4
- top?: Space;
5
- bottom?: Space;
6
- left?: Space;
7
- right?: Space;
8
- };
9
- declare type Props = {
10
- /**
11
- * Uses on of the available alert types.
12
- */
13
- type?: "info" | "confirm" | "warning" | "error";
14
- /**
15
- * Uses on of the available alert modes:
16
- * 'inline': If onClose function is received, close button will be visible and the function will be executed when it's clicked.
17
- * There is no overlay layer. Position should be decided by the user.
18
- * 'modal': The alert will be displayed in the middle of the screen with an overlay layer behind.
19
- * The onClose function will be executed when the X button or the overlay is clicked. d
20
- * The user has the responsibility of hidding the modal in the onClose function, otherwise the modal will remain visible.
21
- */
22
- mode?: "inline" | "modal";
23
- /**
24
- * Text to display after icon and alert type and before content.
25
- */
26
- inlineText?: string;
27
- /**
28
- * This function will be called when the user clicks the close button. If there is no function we should close the alert by default.
29
- */
30
- onClose?: () => void;
31
- /**
32
- * The details section of the alert. Can be used to render custom content in this area.
33
- */
34
- children?: React.ReactNode;
35
- /**
36
- * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
37
- * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
38
- */
39
- margin?: Space | Margin;
40
- /**
41
- * Size of the component.
42
- */
43
- size?: "small" | "medium" | "large" | "fillParent" | "fitContent";
44
- /**
45
- * Tabindex value given to the close button.
46
- */
47
- tabIndex?: number;
48
- };
49
- export default Props;
package/alert/types.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
package/badge/Badge.d.ts DELETED
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import BadgePropsType from "./types";
3
- declare const DxcBadge: ({ notificationText }: BadgePropsType) => JSX.Element;
4
- export default DxcBadge;
package/badge/Badge.js DELETED
@@ -1,59 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports["default"] = void 0;
11
-
12
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
-
14
- var _react = _interopRequireDefault(require("react"));
15
-
16
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
17
-
18
- var _useTheme = _interopRequireDefault(require("../useTheme"));
19
-
20
- var _templateObject;
21
-
22
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
-
24
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
- var DxcBadge = function DxcBadge(_ref) {
27
- var notificationText = _ref.notificationText;
28
- var colorsTheme = (0, _useTheme["default"])();
29
- return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
30
- theme: colorsTheme.tabs
31
- }, /*#__PURE__*/_react["default"].createElement(StyledDxcBadge, {
32
- notificationText: notificationText
33
- }, /*#__PURE__*/_react["default"].createElement("span", null, notificationText)));
34
- };
35
-
36
- var StyledDxcBadge = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n width: ", ";\n height: ", ";\n border-radius: ", ";\n display: flex;\n padding-bottom: 1px;\n padding-right: 1px;\n flex-wrap: wrap;\n box-sizing: border-box;\n align-items: center;\n line-height: 1;\n align-content: center;\n flex-direction: row;\n justify-content: center;\n"])), function (props) {
37
- return props.theme.badgeBackgroundColor;
38
- }, function (props) {
39
- return props.theme.badgeFontFamily;
40
- }, function (props) {
41
- return props.theme.badgeFontSize;
42
- }, function (props) {
43
- return props.theme.badgeFontStyle;
44
- }, function (props) {
45
- return props.theme.badgeFontWeight;
46
- }, function (props) {
47
- return props.theme.badgeFontColor;
48
- }, function (props) {
49
- return props.theme.badgeLetterSpacing;
50
- }, function (props) {
51
- return props.notificationText === true ? props.theme.badgeWidth : props.theme.badgeWidthWithNotificationNumber;
52
- }, function (props) {
53
- return props.notificationText === true ? props.theme.badgeHeight : props.theme.badgeHeightWithNotificationNumber;
54
- }, function (props) {
55
- return props.notificationText === true ? props.theme.badgeRadius : props.theme.badgeRadiusWithNotificationNumber;
56
- });
57
-
58
- var _default = DxcBadge;
59
- exports["default"] = _default;
package/badge/types.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare type Props = {
2
- notificationText: boolean | number | string;
3
- };
4
- export default Props;
package/badge/types.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
package/bleed/Bleed.d.ts DELETED
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import BleedPropsType from "./types";
3
- export default function Bleed({ space, horizontal, vertical, top, right, bottom, left, children, }: BleedPropsType): JSX.Element;
package/bleed/Bleed.js DELETED
@@ -1,84 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = Bleed;
9
-
10
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
-
12
- var _react = _interopRequireDefault(require("react"));
13
-
14
- var _styledComponents = _interopRequireDefault(require("styled-components"));
15
-
16
- var _templateObject;
17
-
18
- function Bleed(_ref) {
19
- var space = _ref.space,
20
- horizontal = _ref.horizontal,
21
- vertical = _ref.vertical,
22
- top = _ref.top,
23
- right = _ref.right,
24
- bottom = _ref.bottom,
25
- left = _ref.left,
26
- children = _ref.children;
27
- return /*#__PURE__*/_react["default"].createElement(StyledBleed, {
28
- space: space,
29
- horizontal: horizontal,
30
- vertical: vertical,
31
- top: top,
32
- right: right,
33
- bottom: bottom,
34
- left: left
35
- }, children);
36
- }
37
-
38
- function getSpacingValue(spacingName) {
39
- switch (spacingName) {
40
- case "none":
41
- return "0rem";
42
-
43
- case "xxxsmall":
44
- return "0.125rem";
45
-
46
- case "xxsmall":
47
- return "0.25rem";
48
-
49
- case "xsmall":
50
- return "0.5rem";
51
-
52
- case "small":
53
- return "1rem";
54
-
55
- case "medium":
56
- return "1.5rem";
57
-
58
- case "large":
59
- return "2rem";
60
-
61
- case "xlarge":
62
- return "3rem";
63
-
64
- case "xxlarge":
65
- return "4rem";
66
-
67
- case "xxxlarge":
68
- return "5rem";
69
-
70
- default:
71
- return "0rem";
72
- }
73
- }
74
-
75
- var StyledBleed = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), function (_ref2) {
76
- var space = _ref2.space,
77
- horizontal = _ref2.horizontal,
78
- vertical = _ref2.vertical,
79
- top = _ref2.top,
80
- right = _ref2.right,
81
- bottom = _ref2.bottom,
82
- left = _ref2.left;
83
- return "\n margin: -".concat(getSpacingValue(top || vertical || space), " -").concat(getSpacingValue(right || horizontal || space), " -").concat(getSpacingValue(bottom || vertical || space), " -").concat(getSpacingValue(left || horizontal || space), ";\n");
84
- });