@dxc-technology/halstack-react 0.0.0-d5ae9d7 → 0.0.0-d618bea

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 (216) hide show
  1. package/BackgroundColorContext.d.ts +10 -0
  2. package/BackgroundColorContext.js +1 -3
  3. package/ThemeContext.d.ts +15 -0
  4. package/ThemeContext.js +5 -8
  5. package/V3Select/V3Select.js +2 -2
  6. package/V3Textarea/V3Textarea.js +2 -2
  7. package/accordion/Accordion.d.ts +2 -2
  8. package/accordion/Accordion.js +2 -2
  9. package/accordion/types.d.ts +1 -1
  10. package/accordion-group/AccordionGroup.d.ts +7 -0
  11. package/accordion-group/AccordionGroup.js +59 -73
  12. package/accordion-group/AccordionGroup.stories.tsx +225 -0
  13. package/accordion-group/types.d.ts +72 -0
  14. package/accordion-group/types.js +5 -0
  15. package/alert/Alert.js +2 -2
  16. package/alert/Alert.stories.tsx +170 -0
  17. package/alert/types.d.ts +1 -1
  18. package/badge/Badge.js +1 -1
  19. package/box/Box.d.ts +4 -0
  20. package/box/Box.js +6 -32
  21. package/box/Box.stories.tsx +132 -0
  22. package/box/types.d.ts +43 -0
  23. package/box/types.js +5 -0
  24. package/button/Button.d.ts +1 -1
  25. package/button/Button.js +9 -12
  26. package/button/Button.stories.tsx +217 -234
  27. package/button/types.d.ts +11 -11
  28. package/card/Card.d.ts +4 -0
  29. package/card/Card.js +17 -53
  30. package/card/Card.stories.tsx +201 -0
  31. package/card/ice-cream.jpg +0 -0
  32. package/card/types.d.ts +67 -0
  33. package/card/types.js +5 -0
  34. package/checkbox/Checkbox.js +2 -2
  35. package/checkbox/Checkbox.stories.tsx +192 -0
  36. package/checkbox/types.d.ts +3 -4
  37. package/chip/Chip.d.ts +4 -0
  38. package/chip/Chip.js +1 -23
  39. package/chip/Chip.stories.tsx +121 -0
  40. package/chip/types.d.ts +53 -0
  41. package/chip/types.js +5 -0
  42. package/common/variables.js +45 -38
  43. package/date/Date.js +1 -1
  44. package/date-input/DateInput.js +4 -7
  45. package/date-input/DateInput.stories.tsx +138 -0
  46. package/dialog/Dialog.d.ts +4 -0
  47. package/dialog/Dialog.js +6 -25
  48. package/dialog/Dialog.stories.tsx +212 -0
  49. package/dialog/types.d.ts +43 -0
  50. package/dialog/types.js +5 -0
  51. package/dropdown/Dropdown.d.ts +4 -0
  52. package/dropdown/Dropdown.js +8 -41
  53. package/dropdown/types.d.ts +89 -0
  54. package/dropdown/types.js +5 -0
  55. package/file-input/FileInput.d.ts +4 -0
  56. package/file-input/FileInput.js +65 -76
  57. package/file-input/FileItem.d.ts +14 -0
  58. package/file-input/FileItem.js +12 -21
  59. package/file-input/types.d.ts +112 -0
  60. package/file-input/types.js +5 -0
  61. package/footer/Footer.d.ts +4 -0
  62. package/footer/Footer.js +11 -42
  63. package/footer/Footer.stories.tsx +151 -0
  64. package/footer/types.d.ts +65 -0
  65. package/footer/types.js +5 -0
  66. package/header/Header.d.ts +7 -0
  67. package/header/Header.js +28 -30
  68. package/header/Header.stories.tsx +162 -0
  69. package/header/Icons.js +2 -27
  70. package/header/types.d.ts +47 -0
  71. package/header/types.js +5 -0
  72. package/heading/Heading.d.ts +4 -0
  73. package/heading/Heading.js +7 -24
  74. package/heading/Heading.stories.tsx +53 -0
  75. package/heading/types.d.ts +33 -0
  76. package/heading/types.js +5 -0
  77. package/input-text/InputText.js +2 -2
  78. package/layout/ApplicationLayout.d.ts +10 -0
  79. package/layout/ApplicationLayout.js +8 -18
  80. package/layout/ApplicationLayout.stories.tsx +171 -0
  81. package/layout/types.d.ts +57 -0
  82. package/layout/types.js +5 -0
  83. package/link/Link.d.ts +3 -0
  84. package/link/Link.js +4 -26
  85. package/link/Link.stories.tsx +146 -0
  86. package/link/types.d.ts +74 -0
  87. package/link/types.js +5 -0
  88. package/list/List.d.ts +7 -0
  89. package/list/List.js +37 -0
  90. package/list/List.stories.tsx +70 -0
  91. package/main.d.ts +7 -3
  92. package/main.js +34 -2
  93. package/number-input/NumberInput.d.ts +4 -0
  94. package/number-input/NumberInput.js +5 -50
  95. package/number-input/NumberInput.stories.tsx +115 -0
  96. package/number-input/NumberInputContext.d.ts +4 -0
  97. package/number-input/NumberInputContext.js +5 -2
  98. package/number-input/numberInputContextTypes.d.ts +19 -0
  99. package/number-input/numberInputContextTypes.js +5 -0
  100. package/number-input/types.d.ts +117 -0
  101. package/number-input/types.js +5 -0
  102. package/package.json +1 -1
  103. package/paginator/Paginator.js +2 -8
  104. package/paginator/Paginator.stories.tsx +63 -0
  105. package/password-input/PasswordInput.d.ts +4 -0
  106. package/password-input/PasswordInput.js +19 -55
  107. package/password-input/{PasswordInput.stories.jsx → PasswordInput.stories.tsx} +1 -1
  108. package/password-input/types.d.ts +107 -0
  109. package/password-input/types.js +5 -0
  110. package/progress-bar/ProgressBar.d.ts +4 -0
  111. package/progress-bar/ProgressBar.js +5 -23
  112. package/progress-bar/ProgressBar.stories.jsx +58 -0
  113. package/progress-bar/types.d.ts +37 -0
  114. package/progress-bar/types.js +5 -0
  115. package/radio/Radio.js +2 -2
  116. package/radio/Radio.stories.tsx +192 -0
  117. package/radio/types.d.ts +2 -2
  118. package/resultsetTable/ResultsetTable.d.ts +4 -0
  119. package/resultsetTable/ResultsetTable.js +4 -27
  120. package/resultsetTable/types.d.ts +67 -0
  121. package/resultsetTable/types.js +5 -0
  122. package/row/Row.d.ts +11 -0
  123. package/row/Row.js +124 -0
  124. package/row/Row.stories.tsx +223 -0
  125. package/select/Select.js +15 -17
  126. package/select/Select.stories.tsx +572 -0
  127. package/select/index.d.ts +4 -4
  128. package/sidenav/Sidenav.d.ts +9 -0
  129. package/sidenav/Sidenav.js +6 -15
  130. package/sidenav/Sidenav.stories.tsx +165 -0
  131. package/sidenav/types.d.ts +50 -0
  132. package/sidenav/types.js +5 -0
  133. package/slider/Slider.d.ts +4 -0
  134. package/slider/Slider.js +61 -84
  135. package/slider/Slider.stories.tsx +177 -0
  136. package/slider/types.d.ts +78 -0
  137. package/slider/types.js +5 -0
  138. package/spinner/Spinner.d.ts +4 -0
  139. package/spinner/Spinner.js +8 -25
  140. package/spinner/Spinner.stories.jsx +102 -0
  141. package/spinner/types.d.ts +32 -0
  142. package/spinner/types.js +5 -0
  143. package/stack/Stack.d.ts +10 -0
  144. package/stack/Stack.js +94 -0
  145. package/stack/Stack.stories.tsx +150 -0
  146. package/switch/Switch.js +4 -4
  147. package/switch/Switch.stories.tsx +160 -0
  148. package/table/Table.d.ts +4 -0
  149. package/table/Table.js +3 -3
  150. package/table/Table.stories.jsx +276 -0
  151. package/table/types.d.ts +21 -0
  152. package/table/types.js +5 -0
  153. package/tabs/Tabs.d.ts +4 -0
  154. package/tabs/Tabs.js +9 -55
  155. package/tabs/Tabs.stories.tsx +121 -0
  156. package/tabs/types.d.ts +70 -0
  157. package/tabs/types.js +5 -0
  158. package/tag/Tag.d.ts +4 -0
  159. package/tag/Tag.js +21 -36
  160. package/tag/Tag.stories.tsx +145 -0
  161. package/tag/types.d.ts +60 -0
  162. package/tag/types.js +5 -0
  163. package/text/Text.d.ts +7 -0
  164. package/text/Text.js +30 -0
  165. package/text/Text.stories.tsx +19 -0
  166. package/text-input/TextInput.d.ts +4 -0
  167. package/text-input/TextInput.js +42 -81
  168. package/text-input/TextInput.stories.tsx +456 -0
  169. package/text-input/types.d.ts +159 -0
  170. package/text-input/types.js +5 -0
  171. package/textarea/Textarea.js +29 -32
  172. package/textarea/Textarea.stories.jsx +135 -0
  173. package/textarea/index.d.ts +18 -8
  174. package/toggle/Toggle.js +1 -1
  175. package/toggle-group/ToggleGroup.d.ts +4 -0
  176. package/toggle-group/ToggleGroup.js +8 -34
  177. package/toggle-group/ToggleGroup.stories.tsx +178 -0
  178. package/toggle-group/types.d.ts +84 -0
  179. package/toggle-group/types.js +5 -0
  180. package/upload/buttons-upload/ButtonsUpload.js +2 -2
  181. package/upload/dragAndDropArea/DragAndDropArea.js +2 -2
  182. package/upload/file-upload/FileToUpload.js +1 -1
  183. package/upload/files-upload/FilesToUpload.js +1 -1
  184. package/upload/transaction/Transaction.js +2 -2
  185. package/upload/transactions/Transactions.js +1 -1
  186. package/useTheme.d.ts +2 -0
  187. package/useTheme.js +1 -1
  188. package/wizard/Wizard.d.ts +4 -0
  189. package/wizard/Wizard.js +13 -53
  190. package/wizard/Wizard.stories.jsx +224 -0
  191. package/wizard/types.d.ts +64 -0
  192. package/wizard/types.js +5 -0
  193. package/accordion-group/index.d.ts +0 -16
  194. package/box/index.d.ts +0 -25
  195. package/card/index.d.ts +0 -22
  196. package/chip/index.d.ts +0 -22
  197. package/dialog/index.d.ts +0 -18
  198. package/dropdown/index.d.ts +0 -26
  199. package/file-input/index.d.ts +0 -81
  200. package/footer/index.d.ts +0 -25
  201. package/header/index.d.ts +0 -25
  202. package/heading/index.d.ts +0 -17
  203. package/link/index.d.ts +0 -23
  204. package/number-input/index.d.ts +0 -113
  205. package/password-input/index.d.ts +0 -94
  206. package/progress-bar/index.d.ts +0 -18
  207. package/resultsetTable/index.d.ts +0 -19
  208. package/sidenav/index.d.ts +0 -13
  209. package/slider/index.d.ts +0 -29
  210. package/spinner/index.d.ts +0 -17
  211. package/table/index.d.ts +0 -13
  212. package/tabs/index.d.ts +0 -19
  213. package/tag/index.d.ts +0 -24
  214. package/text-input/index.d.ts +0 -135
  215. package/toggle-group/index.d.ts +0 -21
  216. package/wizard/index.d.ts +0 -18
@@ -6,7 +6,7 @@ import ExampleContainer from "../../.storybook/components/ExampleContainer";
6
6
  import DarkContainer from "../../.storybook/components/DarkSection";
7
7
 
8
8
  export default {
9
- title: "Button ",
9
+ title: "Button",
10
10
  component: DxcButton,
11
11
  };
12
12
 
@@ -20,274 +20,257 @@ const iconSVG = () => {
20
20
  };
21
21
  export const Chromatic = () => (
22
22
  <>
23
- <>
24
- <Title title="Primary" theme="light" level={2}/>
25
- <ExampleContainer>
26
- <Title title="Enabled" theme="light" level={4}/>
27
- <DxcButton label="Primary enabled" />
28
- </ExampleContainer>
29
- <ExampleContainer pseudoState="pseudo-hover">
30
- <Title title="Hovered" theme="light" level={4}/>
31
- <DxcButton label="Primary hovered" />
32
- </ExampleContainer>
33
- <ExampleContainer pseudoState="pseudo-focus">
34
- <Title title="Focused" theme="light" level={4}/>
35
- <DxcButton label="Primary focused" />
36
- </ExampleContainer>
37
- <ExampleContainer pseudoState="pseudo-active">
38
- <Title title="Actived" theme="light" level={4}/>
39
- <DxcButton label="Primary actived" />
40
- </ExampleContainer>
41
- <ExampleContainer>
42
- <Title title="Disabled" theme="light" level={4}/>
43
- <DxcButton label="Primary disabled" disabled />
44
- </ExampleContainer>
45
- <ExampleContainer>
46
- <Title title="With left icon" theme="light" level={4}/>
47
- <DxcButton label="Primary" icon={iconSVG} />
48
- </ExampleContainer>
49
- <ExampleContainer>
50
- <Title title="With right icon" theme="light" level={4}/>
51
- <DxcButton label="Primary" icon={iconSVG} iconPosition="after" />
52
- </ExampleContainer>
53
- <ExampleContainer>
54
- <Title title="Only icon" theme="light" level={4}/>
55
- <DxcButton icon={iconSVG} />
56
- </ExampleContainer>
57
- </>
58
- <>
59
- <>
60
- <Title title="Secondary" theme="light" level={2}/>
23
+ <Title title="Primary" theme="light" level={2} />
24
+ <ExampleContainer>
25
+ <Title title="Enabled" theme="light" level={4} />
26
+ <DxcButton label="Primary enabled" />
27
+ </ExampleContainer>
28
+ <ExampleContainer pseudoState="pseudo-hover">
29
+ <Title title="Hovered" theme="light" level={4} />
30
+ <DxcButton label="Primary hovered" />
31
+ </ExampleContainer>
32
+ <ExampleContainer pseudoState="pseudo-focus">
33
+ <Title title="Focused" theme="light" level={4} />
34
+ <DxcButton label="Primary focused" />
35
+ </ExampleContainer>
36
+ <ExampleContainer pseudoState="pseudo-active">
37
+ <Title title="Actived" theme="light" level={4} />
38
+ <DxcButton label="Primary actived" />
39
+ </ExampleContainer>
40
+ <ExampleContainer>
41
+ <Title title="Disabled" theme="light" level={4} />
42
+ <DxcButton label="Primary disabled" disabled />
43
+ </ExampleContainer>
44
+ <ExampleContainer>
45
+ <Title title="With left icon" theme="light" level={4} />
46
+ <DxcButton label="Primary" icon={iconSVG} />
47
+ </ExampleContainer>
48
+ <ExampleContainer>
49
+ <Title title="With right icon" theme="light" level={4} />
50
+ <DxcButton label="Primary" icon={iconSVG} iconPosition="after" />
51
+ </ExampleContainer>
52
+ <ExampleContainer>
53
+ <Title title="Only icon" theme="light" level={4} />
54
+ <DxcButton icon={iconSVG} />
55
+ </ExampleContainer>
56
+ <Title title="Secondary" theme="light" level={2} />
57
+ <ExampleContainer>
58
+ <Title title="Enabled" theme="light" level={4} />
59
+ <DxcButton mode="secondary" label="Secondary enabled" />
60
+ </ExampleContainer>
61
+ <ExampleContainer pseudoState="pseudo-hover">
62
+ <Title title="Hovered" theme="light" level={4} />
63
+ <DxcButton mode="secondary" label="Secondary hovered" />
64
+ </ExampleContainer>
65
+ <ExampleContainer pseudoState="pseudo-focus">
66
+ <Title title="Focused" theme="light" level={4} />
67
+ <DxcButton mode="secondary" label="Secondary focused" />
68
+ </ExampleContainer>
69
+ <ExampleContainer pseudoState="pseudo-active">
70
+ <Title title="Actived" theme="light" level={4} />
71
+ <DxcButton mode="secondary" label="Secondary actived" />
72
+ </ExampleContainer>
73
+ <ExampleContainer>
74
+ <Title title="Disabled" theme="light" level={4} />
75
+ <DxcButton mode="secondary" disabled label="Secondary disabled" />
76
+ </ExampleContainer>
77
+ <ExampleContainer>
78
+ <Title title="With icon" theme="light" level={4} />
79
+ <DxcButton mode="secondary" label="Secondary" icon={iconSVG} />
80
+ </ExampleContainer>
81
+ <Title title="Text" theme="light" level={2} />
82
+ <ExampleContainer>
83
+ <Title title="Enabled" theme="light" level={4} />
84
+ <DxcButton mode="text" label="Text enabled" />
85
+ </ExampleContainer>
86
+ <ExampleContainer pseudoState="pseudo-hover">
87
+ <Title title="Hovered" theme="light" level={4} />
88
+ <DxcButton mode="text" label="Text hovered" />
89
+ </ExampleContainer>
90
+ <ExampleContainer pseudoState="pseudo-focus">
91
+ <Title title="Focused" theme="light" level={4} />
92
+ <DxcButton mode="text" label="Text focused" />
93
+ </ExampleContainer>
94
+ <ExampleContainer pseudoState="pseudo-active">
95
+ <Title title="Actived" theme="light" level={4} />
96
+ <DxcButton mode="text" label="Text actived" />
97
+ </ExampleContainer>
98
+ <ExampleContainer>
99
+ <Title title="Disabled" theme="light" level={4} />
100
+ <DxcButton mode="text" label="Text disabled" disabled />
101
+ </ExampleContainer>
102
+ <ExampleContainer>
103
+ <Title title="With icon" theme="light" level={4} />
104
+ <DxcButton label="Text" mode="text" icon={iconSVG} />
105
+ </ExampleContainer>
106
+ <BackgroundColorProvider color="#333333">
107
+ <DarkContainer>
108
+ <Title title="Primary" theme="dark" level={2} />
61
109
  <ExampleContainer>
62
- <Title title="Enabled" theme="light" level={4}/>
110
+ <Title title="Enabled" theme="dark" level={4} />
111
+ <DxcButton label="Primary enabled" />
112
+ </ExampleContainer>
113
+ <ExampleContainer pseudoState="pseudo-hover">
114
+ <Title title="Hovered" theme="dark" level={4} />
115
+ <DxcButton label="Primary hovered" />
116
+ </ExampleContainer>
117
+ <ExampleContainer pseudoState="pseudo-focus">
118
+ <Title title="Focused" theme="dark" level={4} />
119
+ <DxcButton label="Primary focused" />
120
+ </ExampleContainer>
121
+ <ExampleContainer pseudoState="pseudo-active">
122
+ <Title title="Actived" theme="dark" level={4} />
123
+ <DxcButton label="Primary actived" />
124
+ </ExampleContainer>
125
+ <ExampleContainer>
126
+ <Title title="Disabled" theme="dark" level={4} />
127
+ <DxcButton label="Primary disabled" disabled />
128
+ </ExampleContainer>
129
+ <ExampleContainer>
130
+ <Title title="With icon" theme="dark" level={4} />
131
+ <DxcButton label="Primary" icon={iconSVG} />
132
+ </ExampleContainer>
133
+ <Title title="Secondary" theme="dark" level={2} />
134
+ <ExampleContainer>
135
+ <Title title="Enabled" theme="dark" level={4} />
63
136
  <DxcButton mode="secondary" label="Secondary enabled" />
64
137
  </ExampleContainer>
65
138
  <ExampleContainer pseudoState="pseudo-hover">
66
- <Title title="Hovered" theme="light" level={4}/>
139
+ <Title title="Hovered" theme="dark" level={4} />
67
140
  <DxcButton mode="secondary" label="Secondary hovered" />
68
141
  </ExampleContainer>
69
142
  <ExampleContainer pseudoState="pseudo-focus">
70
- <Title title="Focused" theme="light" level={4}/>
143
+ <Title title="Focused" theme="dark" level={4} />
71
144
  <DxcButton mode="secondary" label="Secondary focused" />
72
145
  </ExampleContainer>
73
146
  <ExampleContainer pseudoState="pseudo-active">
74
- <Title title="Actived" theme="light" level={4}/>
147
+ <Title title="Actived" theme="dark" level={4} />
75
148
  <DxcButton mode="secondary" label="Secondary actived" />
76
149
  </ExampleContainer>
77
150
  <ExampleContainer>
78
- <Title title="Disabled" theme="light" level={4}/>
151
+ <Title title="Disabled" theme="dark" level={4} />
79
152
  <DxcButton mode="secondary" disabled label="Secondary disabled" />
80
153
  </ExampleContainer>
81
154
  <ExampleContainer>
82
- <Title title="With icon" theme="light" level={4}/>
83
- <DxcButton mode="secondary" label="Secondary" icon={iconSVG} />
155
+ <Title title="With icon" theme="dark" level={4} />
156
+ <DxcButton mode="secondary" label="Primary" icon={iconSVG} />
84
157
  </ExampleContainer>
85
- </>
86
- <>
87
- <Title title="Text" theme="light" level={2}/>
158
+ <Title title="Text" theme="dark" level={2} />
88
159
  <ExampleContainer>
89
- <Title title="Enabled" theme="light" level={4}/>
160
+ <Title title="Enabled" theme="dark" level={4} />
90
161
  <DxcButton mode="text" label="Text enabled" />
91
162
  </ExampleContainer>
92
163
  <ExampleContainer pseudoState="pseudo-hover">
93
- <Title title="Hovered" theme="light" level={4}/>
164
+ <Title title="Hovered" theme="dark" level={4} />
94
165
  <DxcButton mode="text" label="Text hovered" />
95
166
  </ExampleContainer>
96
167
  <ExampleContainer pseudoState="pseudo-focus">
97
- <Title title="Focused" theme="light" level={4}/>
168
+ <Title title="Focused" theme="dark" level={4} />
98
169
  <DxcButton mode="text" label="Text focused" />
99
170
  </ExampleContainer>
100
171
  <ExampleContainer pseudoState="pseudo-active">
101
- <Title title="Actived" theme="light" level={4}/>
172
+ <Title title="Actived" theme="dark" level={4} />
102
173
  <DxcButton mode="text" label="Text actived" />
103
174
  </ExampleContainer>
104
175
  <ExampleContainer>
105
- <Title title="Disabled" theme="light" level={4}/>
176
+ <Title title="Disabled" theme="dark" level={4} />
106
177
  <DxcButton mode="text" label="Text disabled" disabled />
107
178
  </ExampleContainer>
108
179
  <ExampleContainer>
109
- <Title title="With icon" theme="light" level={4}/>
110
- <DxcButton label="Text" mode="text" icon={iconSVG} />
180
+ <Title title="With icon" theme="dark" level={4} />
181
+ <DxcButton mode="text" label="Primary" icon={iconSVG} />
111
182
  </ExampleContainer>
112
- </>
113
- </>
114
- <BackgroundColorProvider color="#333333">
115
- <DarkContainer>
116
- <>
117
- <Title title="Primary" theme="dark" level={2}/>
118
- <ExampleContainer>
119
- <Title title="Enabled" theme="dark" level={4}/>
120
- <DxcButton label="Primary enabled" />
121
- </ExampleContainer>
122
- <ExampleContainer pseudoState="pseudo-hover">
123
- <Title title="Hovered" theme="dark" level={4}/>
124
- <DxcButton label="Primary hovered" />
125
- </ExampleContainer>
126
- <ExampleContainer pseudoState="pseudo-focus">
127
- <Title title="Focused" theme="dark" level={4}/>
128
- <DxcButton label="Primary focused" />
129
- </ExampleContainer>
130
- <ExampleContainer pseudoState="pseudo-active">
131
- <Title title="Actived" theme="dark" level={4}/>
132
- <DxcButton label="Primary actived" />
133
- </ExampleContainer>
134
- <ExampleContainer>
135
- <Title title="Disabled" theme="dark" level={4}/>
136
- <DxcButton label="Primary disabled" disabled />
137
- </ExampleContainer>
138
- <ExampleContainer>
139
- <Title title="With icon" theme="dark" level={4}/>
140
- <DxcButton label="Primary" icon={iconSVG} />
141
- </ExampleContainer>
142
- </>
143
- <>
144
- <Title title="Secondary" theme="dark" level={2}/>
145
- <ExampleContainer>
146
- <Title title="Enabled" theme="dark" level={4}/>
147
- <DxcButton mode="secondary" label="Secondary enabled" />
148
- </ExampleContainer>
149
- <ExampleContainer pseudoState="pseudo-hover">
150
- <Title title="Hovered" theme="dark" level={4}/>
151
- <DxcButton mode="secondary" label="Secondary hovered" />
152
- </ExampleContainer>
153
- <ExampleContainer pseudoState="pseudo-focus">
154
- <Title title="Focused" theme="dark" level={4}/>
155
- <DxcButton mode="secondary" label="Secondary focused" />
156
- </ExampleContainer>
157
- <ExampleContainer pseudoState="pseudo-active">
158
- <Title title="Actived" theme="dark" level={4}/>
159
- <DxcButton mode="secondary" label="Secondary actived" />
160
- </ExampleContainer>
161
- <ExampleContainer>
162
- <Title title="Disabled" theme="dark" level={4}/>
163
- <DxcButton mode="secondary" disabled label="Secondary disabled" />
164
- </ExampleContainer>
165
- <ExampleContainer>
166
- <Title title="With icon" theme="dark" level={4}/>
167
- <DxcButton mode="secondary" label="Primary" icon={iconSVG} />
168
- </ExampleContainer>
169
- </>
170
- <>
171
- <Title title="Text" theme="dark" level={2}/>
172
- <ExampleContainer>
173
- <Title title="Enabled" theme="dark" level={4}/>
174
- <DxcButton mode="text" label="Text enabled" />
175
- </ExampleContainer>
176
- <ExampleContainer pseudoState="pseudo-hover">
177
- <Title title="Hovered" theme="dark" level={4}/>
178
- <DxcButton mode="text" label="Text hovered" />
179
- </ExampleContainer>
180
- <ExampleContainer pseudoState="pseudo-focus">
181
- <Title title="Focused" theme="dark" level={4}/>
182
- <DxcButton mode="text" label="Text focused" />
183
- </ExampleContainer>
184
- <ExampleContainer pseudoState="pseudo-active">
185
- <Title title="Actived" theme="dark" level={4}/>
186
- <DxcButton mode="text" label="Text actived" />
187
- </ExampleContainer>
188
- <ExampleContainer>
189
- <Title title="Disabled" theme="dark" level={4}/>
190
- <DxcButton mode="text" label="Text disabled" disabled />
191
- </ExampleContainer>
192
- <ExampleContainer>
193
- <Title title="With icon" theme="dark" level={4}/>
194
- <DxcButton mode="text" label="Primary" icon={iconSVG} />
195
- </ExampleContainer>
196
- </>
197
183
  </DarkContainer>
198
184
  </BackgroundColorProvider>
199
- <>
200
- <Title title="Sizes" theme="light" level={2}/>
201
- <ExampleContainer>
202
- <Title title="Small size" theme="light" level={4}/>
203
- <DxcButton label="Small" size="small" />
204
- </ExampleContainer>
205
- <ExampleContainer>
206
- <Title title="Medium size" theme="light" level={4}/>
207
- <DxcButton label="MediumSiz" size="medium" />
208
- </ExampleContainer>
209
- <ExampleContainer>
210
- <Title title="Medium size with ellipsis" theme="light" level={4}/>
211
- <DxcButton label="MediumSize" size="medium" />
212
- </ExampleContainer>
213
- <ExampleContainer>
214
- <Title title="Medium size icon after" theme="light" level={4}/>
215
- <DxcButton label="Mediu" iconPosition="after" icon={iconSVG} size="medium" />
216
- </ExampleContainer>
217
- <ExampleContainer>
218
- <Title title="Medium size icon before" theme="light" level={4}/>
219
- <DxcButton label="Mediu" iconPosition="before" icon={iconSVG} size="medium" />
220
- </ExampleContainer>
221
- <ExampleContainer>
222
- <Title title="Medium size icon after with ellipsis" theme="light" level={4}/>
223
- <DxcButton label="Medium" iconPosition="after" icon={iconSVG} size="medium" />
224
- </ExampleContainer>
225
- <ExampleContainer>
226
- <Title title="Medium size icon before with ellipsis" theme="light" level={4}/>
227
- <DxcButton label="Medium" iconPosition="before" icon={iconSVG} size="medium" />
228
- </ExampleContainer>
229
- <ExampleContainer>
230
- <Title title="Large size" theme="light" level={4}/>
231
- <DxcButton label="LargeSizePrimaryButtonEx" size="large" />
232
- </ExampleContainer>
233
- <ExampleContainer>
234
- <Title title="Large size with ellipsis" theme="light" level={4}/>
235
- <DxcButton label="LargeSizePrimaryButtonExa" size="large" />
236
- </ExampleContainer>
237
- <ExampleContainer>
238
- <Title title="Large size icon after" theme="light" level={4}/>
239
- <DxcButton label="LargeSizePrimaryButto" iconPosition="after" icon={iconSVG} size="large" />
240
- </ExampleContainer>
241
- <ExampleContainer>
242
- <Title title="Large size icon before" theme="light" level={4}/>
243
- <DxcButton label="LargeSizePrimaryButto" iconPosition="before" icon={iconSVG} size="large" />
244
- </ExampleContainer>
245
- <ExampleContainer>
246
- <Title title="Large size icon after with ellipsis" theme="light" level={4}/>
247
- <DxcButton label="LargeSizePrimaryButton" iconPosition="after" icon={iconSVG} size="large" />
248
- </ExampleContainer>
249
- <ExampleContainer>
250
- <Title title="Large size icon before with ellipsis" theme="light" level={4}/>
251
- <DxcButton label="LargeSizePrimaryButton" iconPosition="before" icon={iconSVG} size="large" />
252
- </ExampleContainer>
253
- <ExampleContainer>
254
- <Title title="Fit content size" theme="light" level={4}/>
255
- <DxcButton label="FillParent" size="fillParent" />
256
- </ExampleContainer>
257
- <ExampleContainer>
258
- <Title title="Medium size" theme="light" level={4}/>
259
- <DxcButton label="FitContent" size="fitContent" />
260
- </ExampleContainer>
261
- <Title title="Margins" theme="light" level={2}/>
262
- <ExampleContainer>
263
- <Title title="Xxsmall margin" theme="light" level={4}/>
264
- <DxcButton label="Xxsmall margin" margin="xxsmall" />
265
- </ExampleContainer>
266
- <ExampleContainer>
267
- <Title title="Xsmall margin" theme="light" level={4}/>
268
- <DxcButton label="Xsmall margin" margin="xsmall" />
269
- </ExampleContainer>
270
- <ExampleContainer>
271
- <Title title="Small margin" theme="light" level={4}/>
272
- <DxcButton label="Small margin" margin="small" />
273
- </ExampleContainer>
274
- <ExampleContainer>
275
- <Title title="Medium margin" theme="light" level={4}/>
276
- <DxcButton label="Medium margin" margin="medium" />
277
- </ExampleContainer>
278
- <ExampleContainer>
279
- <Title title="Large margin" theme="light" level={4}/>
280
- <DxcButton label="Large margin" margin="large" />
281
- </ExampleContainer>
282
- <ExampleContainer>
283
- <Title title="Xlarge margin" theme="light" level={4}/>
284
- <DxcButton label="Xlarge margin" margin="xlarge" />
285
- </ExampleContainer>
286
- <ExampleContainer>
287
- <Title title="Xxlarge margin" theme="light" level={4}/>
288
- <DxcButton label="Xxlarge margin" margin="xxlarge" />
289
- </ExampleContainer>
290
- </>
185
+ <Title title="Sizes" theme="light" level={2} />
186
+ <ExampleContainer>
187
+ <Title title="Small size" theme="light" level={4} />
188
+ <DxcButton label="Small" size="small" />
189
+ </ExampleContainer>
190
+ <ExampleContainer>
191
+ <Title title="Medium size" theme="light" level={4} />
192
+ <DxcButton label="MediumSiz" size="medium" />
193
+ </ExampleContainer>
194
+ <ExampleContainer>
195
+ <Title title="Medium size with ellipsis" theme="light" level={4} />
196
+ <DxcButton label="MediumSize" size="medium" />
197
+ </ExampleContainer>
198
+ <ExampleContainer>
199
+ <Title title="Medium size icon after" theme="light" level={4} />
200
+ <DxcButton label="Mediu" iconPosition="after" icon={iconSVG} size="medium" />
201
+ </ExampleContainer>
202
+ <ExampleContainer>
203
+ <Title title="Medium size icon before" theme="light" level={4} />
204
+ <DxcButton label="Mediu" iconPosition="before" icon={iconSVG} size="medium" />
205
+ </ExampleContainer>
206
+ <ExampleContainer>
207
+ <Title title="Medium size icon after with ellipsis" theme="light" level={4} />
208
+ <DxcButton label="Medium" iconPosition="after" icon={iconSVG} size="medium" />
209
+ </ExampleContainer>
210
+ <ExampleContainer>
211
+ <Title title="Medium size icon before with ellipsis" theme="light" level={4} />
212
+ <DxcButton label="Medium" iconPosition="before" icon={iconSVG} size="medium" />
213
+ </ExampleContainer>
214
+ <ExampleContainer>
215
+ <Title title="Large size" theme="light" level={4} />
216
+ <DxcButton label="LargeSizePrimaryButtonEx" size="large" />
217
+ </ExampleContainer>
218
+ <ExampleContainer>
219
+ <Title title="Large size with ellipsis" theme="light" level={4} />
220
+ <DxcButton label="LargeSizePrimaryButtonExa" size="large" />
221
+ </ExampleContainer>
222
+ <ExampleContainer>
223
+ <Title title="Large size icon after" theme="light" level={4} />
224
+ <DxcButton label="LargeSizePrimaryButto" iconPosition="after" icon={iconSVG} size="large" />
225
+ </ExampleContainer>
226
+ <ExampleContainer>
227
+ <Title title="Large size icon before" theme="light" level={4} />
228
+ <DxcButton label="LargeSizePrimaryButto" iconPosition="before" icon={iconSVG} size="large" />
229
+ </ExampleContainer>
230
+ <ExampleContainer>
231
+ <Title title="Large size icon after with ellipsis" theme="light" level={4} />
232
+ <DxcButton label="LargeSizePrimaryButton" iconPosition="after" icon={iconSVG} size="large" />
233
+ </ExampleContainer>
234
+ <ExampleContainer>
235
+ <Title title="Large size icon before with ellipsis" theme="light" level={4} />
236
+ <DxcButton label="LargeSizePrimaryButton" iconPosition="before" icon={iconSVG} size="large" />
237
+ </ExampleContainer>
238
+ <ExampleContainer>
239
+ <Title title="FillParent size" theme="light" level={4} />
240
+ <DxcButton label="FillParent" size="fillParent" />
241
+ </ExampleContainer>
242
+ <ExampleContainer>
243
+ <Title title="FitContent size" theme="light" level={4} />
244
+ <DxcButton label="FitContent" size="fitContent" />
245
+ </ExampleContainer>
246
+ <Title title="Margins" theme="light" level={2} />
247
+ <ExampleContainer>
248
+ <Title title="Xxsmall margin" theme="light" level={4} />
249
+ <DxcButton label="Xxsmall margin" margin="xxsmall" />
250
+ </ExampleContainer>
251
+ <ExampleContainer>
252
+ <Title title="Xsmall margin" theme="light" level={4} />
253
+ <DxcButton label="Xsmall margin" margin="xsmall" />
254
+ </ExampleContainer>
255
+ <ExampleContainer>
256
+ <Title title="Small margin" theme="light" level={4} />
257
+ <DxcButton label="Small margin" margin="small" />
258
+ </ExampleContainer>
259
+ <ExampleContainer>
260
+ <Title title="Medium margin" theme="light" level={4} />
261
+ <DxcButton label="Medium margin" margin="medium" />
262
+ </ExampleContainer>
263
+ <ExampleContainer>
264
+ <Title title="Large margin" theme="light" level={4} />
265
+ <DxcButton label="Large margin" margin="large" />
266
+ </ExampleContainer>
267
+ <ExampleContainer>
268
+ <Title title="Xlarge margin" theme="light" level={4} />
269
+ <DxcButton label="Xlarge margin" margin="xlarge" />
270
+ </ExampleContainer>
271
+ <ExampleContainer>
272
+ <Title title="Xxlarge margin" theme="light" level={4} />
273
+ <DxcButton label="Xxlarge margin" margin="xxlarge" />
274
+ </ExampleContainer>
291
275
  </>
292
276
  );
293
-
package/button/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare type Size = "small" | "medium" | "large" | "fillParent" | "fitContent";
1
+ /// <reference types="react" />
2
2
  declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
3
  declare type Margin = {
4
4
  top?: Space;
@@ -6,7 +6,7 @@ declare type Margin = {
6
6
  left?: Space;
7
7
  right?: Space;
8
8
  };
9
- declare type SVG = string | (HTMLElement & SVGElement);
9
+ declare type SVG = React.SVGProps<SVGSVGElement> | React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
10
10
  declare type Props = {
11
11
  /**
12
12
  * Text to be placed next to the button.
@@ -28,29 +28,29 @@ declare type Props = {
28
28
  * This prop corresponds to the 'type' prop of the button in html.
29
29
  */
30
30
  type?: "button" | "reset" | "submit";
31
- /**
32
- * DEPRECATED. URL of the icon that will be placed next to the button label.
33
- */
34
- iconSrc?: string;
35
31
  /**
36
32
  * Element used as the icon that will be placed next to the button label.
37
33
  */
38
34
  icon?: SVG;
39
35
  /**
40
- * This function will be called when the user clicks the button. The event object will be passed as a parameter.
36
+ * @deprecated URL of the icon that will be placed next to the button label.
37
+ */
38
+ iconSrc?: string;
39
+ /**
40
+ * This function will be called when the user clicks the button.
41
41
  */
42
- onClick?: any;
42
+ onClick?: () => void;
43
43
  /**
44
44
  * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
45
45
  * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
46
46
  */
47
47
  margin?: Space | Margin;
48
48
  /**
49
- * Size of the component ('small' | 'medium' | 'large' | 'fillParent' | 'fitContent').
49
+ * Size of the component.
50
50
  */
51
- size?: Size;
51
+ size?: "small" | "medium" | "large" | "fillParent" | "fitContent";
52
52
  /**
53
- * Value of the tabindex.
53
+ * Value of the tabindex attribute.
54
54
  */
55
55
  tabIndex?: number;
56
56
  };
package/card/Card.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import CardPropsType from "./types";
3
+ declare const DxcCard: ({ imageSrc, imageBgColor, imagePadding, imagePosition, linkHref, onClick, imageCover, margin, contentPadding, tabIndex, outlined, children, }: CardPropsType) => JSX.Element;
4
+ export default DxcCard;