@occmundial/occ-atomic 3.0.0-beta.6 → 3.0.0-beta.60
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +476 -0
- package/build/Avatar/Avatar.js +69 -21
- package/build/Avatar/Avatar.test.js +15 -8
- package/build/Avatar/AvatarContent/AvatarContent.js +61 -21
- package/build/Avatar/AvatarContent/AvatarContent.test.js +4 -18
- package/build/Avatar/AvatarContent/__snapshots__/AvatarContent.test.js.snap +75 -15
- package/build/Avatar/AvatarContent/styles.js +88 -21
- package/build/Avatar/__snapshots__/Avatar.test.js.snap +11 -2
- package/build/Avatar/styles.js +18 -7
- package/build/Banner/Banner.js +30 -40
- package/build/Banner/Banner.test.js +64 -17
- package/build/Banner/__snapshots__/Banner.test.js.snap +0 -28
- package/build/Banner/index.js +1 -6
- package/build/Button/Button.js +1 -1
- package/build/Button/Button.test.js +0 -11
- package/build/Button/__snapshots__/Button.test.js.snap +54 -58
- package/build/Button/styles.js +42 -75
- package/build/Checkbox/Checkbox.js +48 -3
- package/build/Checkbox/__snapshots__/Checkbox.test.js.snap +81 -49
- package/build/Checkbox/styles.js +91 -48
- package/build/Fab/__snapshots__/Fab.test.js.snap +2 -2
- package/build/Footer/Footer.js +81 -87
- package/build/Footer/List/List.js +89 -124
- package/build/Footer/List/styles.js +85 -31
- package/build/Footer/__snapshots__/Footer.test.js.snap +109 -59
- package/build/Footer/styles.js +116 -51
- package/build/Grid/Col/__snapshots__/Col.test.js.snap +16 -2
- package/build/Grid/Col/styles.js +12 -6
- package/build/Grid/Row/__snapshots__/Row.test.js.snap +18 -2
- package/build/Grid/Row/styles.js +15 -5
- package/build/Grid/styles.js +26 -9
- package/build/Menu/Menu.js +111 -0
- package/build/Menu/index.js +34 -0
- package/build/Menu/styles.js +28 -0
- package/build/Modal/Modal.js +94 -66
- package/build/Modal/Modal.test.js +14 -7
- package/build/Modal/__snapshots__/Modal.test.js.snap +155 -100
- package/build/Modal/styles.js +165 -143
- package/build/OrderBy/OrderBy.js +2 -1
- package/build/Pager/Page/Page.js +11 -6
- package/build/Pager/Page/Page.test.js +13 -9
- package/build/Pager/Page/__snapshots__/Page.test.js.snap +34 -10
- package/build/Pager/Page/styles.js +48 -14
- package/build/Pager/Pager.js +144 -235
- package/build/Pager/Pager.test.js +81 -36
- package/build/Pager/__snapshots__/Pager.test.js.snap +3 -36
- package/build/Pager/styles.js +5 -40
- package/build/Pill/Choice/Choice.js +6 -4
- package/build/Pill/Choice/styles.js +13 -10
- package/build/Pill/Group/styles.js +5 -5
- package/build/Pill/Stack/Stack.js +2 -2
- package/build/Pill/Stack/styles.js +5 -8
- package/build/Placeholder/Placeholder.js +29 -12
- package/build/Placeholder/Placeholder.test.js +4 -4
- package/build/Placeholder/__snapshots__/Placeholder.test.js.snap +81 -38
- package/build/Placeholder/styles.js +86 -42
- package/build/Provider/usePrevious.js +1 -1
- package/build/Radio/Radio.js +42 -6
- package/build/Radio/__snapshots__/Radio.test.js.snap +81 -80
- package/build/Radio/styles.js +93 -85
- package/build/SlideDown/SlideDown.js +162 -169
- package/build/SlideDown/SlideDown.test.js +49 -44
- package/build/SlideDown/__snapshots__/SlideDown.test.js.snap +44 -15
- package/build/SlideDown/styles.js +51 -20
- package/build/SlideToggle/SlideToggle.js +38 -6
- package/build/SlideToggle/SlideToggle.test.js +2 -2
- package/build/SlideToggle/__snapshots__/SlideToggle.test.js.snap +52 -37
- package/build/SlideToggle/styles.js +64 -45
- package/build/Tabs/Tab/Tab.js +73 -0
- package/build/Tabs/Tab/index.js +34 -0
- package/build/Tabs/Tab/index.test.js +132 -0
- package/build/Tabs/Tab/styles.js +74 -0
- package/build/Tabs/TabContent/TabContent.js +76 -0
- package/build/Tabs/TabContent/index.js +34 -0
- package/build/Tabs/TabContent/index.test.js +68 -0
- package/build/Tabs/TabContent/styles.js +23 -0
- package/build/Tabs/TabIndicator/TabIndicator.js +158 -0
- package/build/Tabs/TabIndicator/index.js +34 -0
- package/build/Tabs/TabIndicator/styles.js +24 -0
- package/build/Tabs/TabList/TabList.js +108 -0
- package/build/Tabs/TabList/index.js +34 -0
- package/build/{Pager/Break → Tabs/TabList}/styles.js +3 -2
- package/build/Tabs/Tabs.js +74 -0
- package/build/Tabs/context.js +94 -0
- package/build/Tabs/index.js +34 -0
- package/build/Tabs/index.test.js +157 -0
- package/build/Tabs/styles.js +19 -0
- package/build/Tag/Tag.js +2 -2
- package/build/Tag/__snapshots__/Tag.test.js.snap +40 -43
- package/build/Tag/styles.js +76 -82
- package/build/Text/Text.js +2 -1
- package/build/TextField/TextField.js +7 -6
- package/build/TextField/__snapshots__/TextField.test.js.snap +3 -0
- package/build/TextField/styles.js +3 -0
- package/build/Tip/Tip.js +62 -95
- package/build/Tip/Tip.test.js +29 -6
- package/build/Tip/TipText/index.js +32 -0
- package/build/Tip/__snapshots__/Tip.test.js.snap +127 -15
- package/build/Tip/styles.js +125 -31
- package/build/Toaster/Toast/Toast.js +76 -64
- package/build/Toaster/Toast/styles.js +118 -46
- package/build/Toaster/Toaster.js +3 -2
- package/build/Toaster/Toaster.test.js +5 -2
- package/build/Toaster/__snapshots__/Toaster.test.js.snap +1 -1
- package/build/Toaster/functions.js +4 -0
- package/build/Toaster/styles.js +3 -3
- package/build/Tooltip/Tooltip.js +73 -22
- package/build/Tooltip/__snapshots__/Tooltip.test.js.snap +22 -6
- package/build/Tooltip/styles.js +32 -10
- package/build/index.js +18 -16
- package/build/plugin/babel.js +0 -2
- package/build/subatomic/grid.js +5 -5
- package/build/tokens/colors.json +35 -3
- package/package.json +5 -2
- package/build/Banner/styles.js +0 -41
- package/build/Header/Header.js +0 -163
- package/build/Header/Header.test.js +0 -118
- package/build/Header/Menu/Menu.js +0 -135
- package/build/Header/Menu/Menu.test.js +0 -107
- package/build/Header/Menu/__snapshots__/Menu.test.js.snap +0 -113
- package/build/Header/Menu/index.js +0 -18
- package/build/Header/Menu/styles.js +0 -123
- package/build/Header/Nav/Nav.js +0 -95
- package/build/Header/Nav/Nav.test.js +0 -81
- package/build/Header/Nav/__snapshots__/Nav.test.js.snap +0 -101
- package/build/Header/Nav/index.js +0 -18
- package/build/Header/Nav/styles.js +0 -110
- package/build/Header/__snapshots__/Header.test.js.snap +0 -79
- package/build/Header/index.js +0 -18
- package/build/Header/styles.js +0 -94
- package/build/Pager/Break/Break.js +0 -27
- package/build/Pager/Break/Break.test.js +0 -53
- package/build/Pager/Break/__snapshots__/Break.test.js.snap +0 -13
- package/build/Pager/Break/index.js +0 -18
- /package/build/Button/{Loading.js → Loading/index.js} +0 -0
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,479 @@
|
|
1
|
+
# [3.0.0-beta.60](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.59...v3.0.0-beta.60) (2024-09-23)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* Add menu componente and delete deprecated header comps ([572334c](https://github.com/occmundial/occ-atomic/commit/572334ce94949fbcbf7dfaa165cfb349d6c4f762))
|
7
|
+
|
8
|
+
# [3.0.0-beta.59](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.58...v3.0.0-beta.59) (2024-09-10)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* Remove margin bottom from slidedown wrapper ([7b90312](https://github.com/occmundial/occ-atomic/commit/7b90312aa7246e0e66f2f25a278f0bfa2e211106))
|
14
|
+
* Remove margin bottom from slidedown wrapper ([44e67ca](https://github.com/occmundial/occ-atomic/commit/44e67ca6b2e85f5d61cec6807e7edb0d55d7be2e))
|
15
|
+
* Remove margin bottom from slidedown wrapper ([47e3233](https://github.com/occmundial/occ-atomic/commit/47e323333ad15d01d629adc1dccbd2c79892411e))
|
16
|
+
* Remove margin bottom from slidedown wrapper ([b6ce89b](https://github.com/occmundial/occ-atomic/commit/b6ce89bcbd383dd038d2abe2635c4fd86adb396b))
|
17
|
+
|
18
|
+
# [3.0.0-beta.58](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.57...v3.0.0-beta.58) (2024-09-06)
|
19
|
+
|
20
|
+
|
21
|
+
### Bug Fixes
|
22
|
+
|
23
|
+
* Change id prev button ([540ee04](https://github.com/occmundial/occ-atomic/commit/540ee0452f6ee114325ed236d922b3c1b1869f19))
|
24
|
+
* Replace id value with id option ([f3348d8](https://github.com/occmundial/occ-atomic/commit/f3348d88c0565fbaee12562aea0a7346ff78bd7b))
|
25
|
+
* Replace id value with id option ([ba79747](https://github.com/occmundial/occ-atomic/commit/ba79747235d73ddb48228fc403d0b58ddea93a7d))
|
26
|
+
|
27
|
+
# [3.0.0-beta.57](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.56...v3.0.0-beta.57) (2024-09-04)
|
28
|
+
|
29
|
+
|
30
|
+
### Bug Fixes
|
31
|
+
|
32
|
+
* Set only padding vertical for footer container ([5a593ab](https://github.com/occmundial/occ-atomic/commit/5a593ab8f785ef3f5c04c5718d925227d17df39d))
|
33
|
+
|
34
|
+
# [3.0.0-beta.56](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.55...v3.0.0-beta.56) (2024-09-04)
|
35
|
+
|
36
|
+
|
37
|
+
### Bug Fixes
|
38
|
+
|
39
|
+
* Add default value for new props ([2841eae](https://github.com/occmundial/occ-atomic/commit/2841eaec4e570934f6b02f21f9e262892f3a33fd))
|
40
|
+
* Add new props to set bg transparent and borders ([dd0a333](https://github.com/occmundial/occ-atomic/commit/dd0a3334ebc1b4edfa75d9a0d2520b2cccd14309))
|
41
|
+
|
42
|
+
# [3.0.0-beta.55](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.54...v3.0.0-beta.55) (2024-09-04)
|
43
|
+
|
44
|
+
|
45
|
+
### Bug Fixes
|
46
|
+
|
47
|
+
* Change display flex for grid in columns links ([cfd1291](https://github.com/occmundial/occ-atomic/commit/cfd12917a84d009d8d6176861592533ffc491d1f))
|
48
|
+
|
49
|
+
# [3.0.0-beta.54](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.53...v3.0.0-beta.54) (2024-09-04)
|
50
|
+
|
51
|
+
|
52
|
+
### Bug Fixes
|
53
|
+
|
54
|
+
* Change font size of bottom links and copyright ([6706894](https://github.com/occmundial/occ-atomic/commit/6706894747f3cd2497f6c3eae290564948134a9d))
|
55
|
+
|
56
|
+
# [3.0.0-beta.53](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.52...v3.0.0-beta.53) (2024-09-04)
|
57
|
+
|
58
|
+
|
59
|
+
### Bug Fixes
|
60
|
+
|
61
|
+
* Add tabindex zero to bottom links ([18de40b](https://github.com/occmundial/occ-atomic/commit/18de40b3e5182dc2c7f2dca8bcf9c2a5eef82ffb))
|
62
|
+
|
63
|
+
# [3.0.0-beta.52](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.51...v3.0.0-beta.52) (2024-09-03)
|
64
|
+
|
65
|
+
|
66
|
+
### Bug Fixes
|
67
|
+
|
68
|
+
* Add cursor pointer to bottom links ([93eb978](https://github.com/occmundial/occ-atomic/commit/93eb9787735c7846c35ae797f71a3b515cc0913e))
|
69
|
+
|
70
|
+
# [3.0.0-beta.51](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.50...v3.0.0-beta.51) (2024-09-03)
|
71
|
+
|
72
|
+
|
73
|
+
### Bug Fixes
|
74
|
+
|
75
|
+
* Add margin zero to grid and add padding top for modal when img top ([cd5416c](https://github.com/occmundial/occ-atomic/commit/cd5416c2ce4fbf1000afd51938c2a24f56999eee))
|
76
|
+
|
77
|
+
# [3.0.0-beta.50](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.49...v3.0.0-beta.50) (2024-09-03)
|
78
|
+
|
79
|
+
|
80
|
+
### Features
|
81
|
+
|
82
|
+
* Update footer design and use design tokens ([2e83d4f](https://github.com/occmundial/occ-atomic/commit/2e83d4f7f135570a6c4a375c28bedab578f1a8f4))
|
83
|
+
|
84
|
+
# [3.0.0-beta.49](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.48...v3.0.0-beta.49) (2024-08-27)
|
85
|
+
|
86
|
+
|
87
|
+
### Bug Fixes
|
88
|
+
|
89
|
+
* Tip banner align ([f1b3ad2](https://github.com/occmundial/occ-atomic/commit/f1b3ad2143c360978d9e067b8298b3c90a306ddc))
|
90
|
+
|
91
|
+
# [3.0.0-beta.48](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.47...v3.0.0-beta.48) (2024-08-26)
|
92
|
+
|
93
|
+
|
94
|
+
### Bug Fixes
|
95
|
+
|
96
|
+
* Validate tab status to set correct styles ([1261415](https://github.com/occmundial/occ-atomic/commit/1261415e7ae4cc06336cd62fc6122c5a3152b0f5))
|
97
|
+
* Validate tab status to set correct styles ([c125026](https://github.com/occmundial/occ-atomic/commit/c125026d0af8504be3188e1f04a2a83c48ce0c46))
|
98
|
+
|
99
|
+
# [3.0.0-beta.47](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.46...v3.0.0-beta.47) (2024-08-26)
|
100
|
+
|
101
|
+
|
102
|
+
### Bug Fixes
|
103
|
+
|
104
|
+
* Adjust icon size and align button items ([41702cc](https://github.com/occmundial/occ-atomic/commit/41702cc20135eb298d730a41e51d87e04bc86051))
|
105
|
+
|
106
|
+
# [3.0.0-beta.46](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.45...v3.0.0-beta.46) (2024-08-26)
|
107
|
+
|
108
|
+
|
109
|
+
### Features
|
110
|
+
|
111
|
+
* Create tabs component ([bf5af21](https://github.com/occmundial/occ-atomic/commit/bf5af2136a5c78716ba4aeca66406532ec3451cc))
|
112
|
+
|
113
|
+
# [3.0.0-beta.45](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.44...v3.0.0-beta.45) (2024-08-15)
|
114
|
+
|
115
|
+
|
116
|
+
### Bug Fixes
|
117
|
+
|
118
|
+
* Resolve conflicts ([c52608d](https://github.com/occmundial/occ-atomic/commit/c52608d63b00072280a8731515276bd477ca41fd))
|
119
|
+
|
120
|
+
|
121
|
+
### Features
|
122
|
+
|
123
|
+
* Add disabled state ([717d1cc](https://github.com/occmundial/occ-atomic/commit/717d1cc4c9a2fd3becb2d03b7663729778c59ec2))
|
124
|
+
|
125
|
+
# [3.0.0-beta.44](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.43...v3.0.0-beta.44) (2024-08-09)
|
126
|
+
|
127
|
+
|
128
|
+
### Features
|
129
|
+
|
130
|
+
* Placeholder styles and documentation revamp ([1b66e82](https://github.com/occmundial/occ-atomic/commit/1b66e82cab64d8a23bd7dd336c9bb4666242846c))
|
131
|
+
|
132
|
+
# [3.0.0-beta.43](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.42...v3.0.0-beta.43) (2024-08-08)
|
133
|
+
|
134
|
+
|
135
|
+
### Bug Fixes
|
136
|
+
|
137
|
+
* Remove tag margin top ([1ded38b](https://github.com/occmundial/occ-atomic/commit/1ded38b41d781d9d15ba210d8b879a316cda0dd7))
|
138
|
+
|
139
|
+
# [3.0.0-beta.42](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.41...v3.0.0-beta.42) (2024-08-08)
|
140
|
+
|
141
|
+
|
142
|
+
### Bug Fixes
|
143
|
+
|
144
|
+
* Change div divider for box shadow ([a2f1f8d](https://github.com/occmundial/occ-atomic/commit/a2f1f8d1af7b122b7546c6b405c93344a1aa9391))
|
145
|
+
|
146
|
+
# [3.0.0-beta.41](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.40...v3.0.0-beta.41) (2024-08-07)
|
147
|
+
|
148
|
+
|
149
|
+
### Bug Fixes
|
150
|
+
|
151
|
+
* Add no padding prop to slide down navigation menu ([bda81dc](https://github.com/occmundial/occ-atomic/commit/bda81dc102efb4c2bba25a83638baeb00cad2f60))
|
152
|
+
* Remove component data file ([6e58558](https://github.com/occmundial/occ-atomic/commit/6e58558cba4627e3e6ee3aea7ac2d55f21ffd5c0))
|
153
|
+
|
154
|
+
|
155
|
+
### Features
|
156
|
+
|
157
|
+
* Add custom title prop ([fd14212](https://github.com/occmundial/occ-atomic/commit/fd142127a26207e28c3ab57fa32486066fb03f75))
|
158
|
+
* Update slidedown with new design tokens ([930da58](https://github.com/occmundial/occ-atomic/commit/930da58f04c7b87b5687784dc67fcb7eb2e200e7))
|
159
|
+
|
160
|
+
# [3.0.0-beta.40](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.39...v3.0.0-beta.40) (2024-08-05)
|
161
|
+
|
162
|
+
|
163
|
+
### Features
|
164
|
+
|
165
|
+
* Update the Modal component ([b10976b](https://github.com/occmundial/occ-atomic/commit/b10976b0a7e2020d714f2097b3fb6b4f12aadb6e))
|
166
|
+
|
167
|
+
# [3.0.0-beta.39](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.38...v3.0.0-beta.39) (2024-07-31)
|
168
|
+
|
169
|
+
|
170
|
+
### Bug Fixes
|
171
|
+
|
172
|
+
* Render initials only if there's no photo prop ([b643eab](https://github.com/occmundial/occ-atomic/commit/b643eab76f676c126962b9935eaeba7f563d2ac9))
|
173
|
+
|
174
|
+
# [3.0.0-beta.38](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.37...v3.0.0-beta.38) (2024-07-25)
|
175
|
+
|
176
|
+
|
177
|
+
### Bug Fixes
|
178
|
+
|
179
|
+
* Icon disabled styles ([d8bc738](https://github.com/occmundial/occ-atomic/commit/d8bc73881275ec1537e5a06bd37f9a869a5fe210))
|
180
|
+
|
181
|
+
# [3.0.0-beta.37](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.36...v3.0.0-beta.37) (2024-07-24)
|
182
|
+
|
183
|
+
|
184
|
+
### Bug Fixes
|
185
|
+
|
186
|
+
* Add placement to use memo dependencies ([3a14e00](https://github.com/occmundial/occ-atomic/commit/3a14e00b5fe72d55043f1be4b1fb57f1c860d584))
|
187
|
+
|
188
|
+
# [3.0.0-beta.36](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.35...v3.0.0-beta.36) (2024-07-24)
|
189
|
+
|
190
|
+
|
191
|
+
### Bug Fixes
|
192
|
+
|
193
|
+
* Pass props directly ([39fc2c4](https://github.com/occmundial/occ-atomic/commit/39fc2c455fead75aec07995b3f99123774b28100))
|
194
|
+
* Remove unnecesary arrow padding ([fcbf53b](https://github.com/occmundial/occ-atomic/commit/fcbf53bbf2f750dab61d82021be54f5eb95f3e7b))
|
195
|
+
* Remove unnused variable ([613405c](https://github.com/occmundial/occ-atomic/commit/613405c2466d79a0694f33aa0b19c2d55160ca8b))
|
196
|
+
|
197
|
+
# [3.0.0-beta.35](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.34...v3.0.0-beta.35) (2024-07-24)
|
198
|
+
|
199
|
+
|
200
|
+
### Bug Fixes
|
201
|
+
|
202
|
+
* Change end start tooltip behaviour ([220bcb8](https://github.com/occmundial/occ-atomic/commit/220bcb8c071735ab33eb20817afb5cfcc83106b8))
|
203
|
+
* Change svg to floating arrow ([09b1d67](https://github.com/occmundial/occ-atomic/commit/09b1d67810e5b354b3656efc92b623e3e55abc9c))
|
204
|
+
* Set min width for end or start and update examples ([65a9f31](https://github.com/occmundial/occ-atomic/commit/65a9f315dc38c011a4563b7726e5bbd4fd2c2725))
|
205
|
+
|
206
|
+
|
207
|
+
### Features
|
208
|
+
|
209
|
+
* Update tooltip with new design tokens ([1843c88](https://github.com/occmundial/occ-atomic/commit/1843c887fc232adc0b4877b8348777448394395f))
|
210
|
+
|
211
|
+
# [3.0.0-beta.34](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.33...v3.0.0-beta.34) (2024-07-22)
|
212
|
+
|
213
|
+
|
214
|
+
### Bug Fixes
|
215
|
+
|
216
|
+
* Reuse col breakpoints ([0da7c54](https://github.com/occmundial/occ-atomic/commit/0da7c541bbf6ceb5df8a2c0011cc0e18068ad5fb))
|
217
|
+
* Revert some changes, remove unnecesary bp and add padding to grid ([6eb2e99](https://github.com/occmundial/occ-atomic/commit/6eb2e9960029d94c5fcd7eb23efc31366135a7ea))
|
218
|
+
|
219
|
+
# [3.0.0-beta.33](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.32...v3.0.0-beta.33) (2024-07-17)
|
220
|
+
|
221
|
+
|
222
|
+
### Bug Fixes
|
223
|
+
|
224
|
+
* Remove unnecesary div ([ab699f9](https://github.com/occmundial/occ-atomic/commit/ab699f9370b51dfdb7e57d21840ce452702aecf2))
|
225
|
+
* Resolve conflicts with beta ([e046e67](https://github.com/occmundial/occ-atomic/commit/e046e6717789a3d2ef8fd055d752a933eab18e33))
|
226
|
+
* Revert footer changes and remove row ([3345402](https://github.com/occmundial/occ-atomic/commit/33454022daeb247db464b297ba0596cdd5956cc1))
|
227
|
+
* Revert footer changes and remove row ([6345b4e](https://github.com/occmundial/occ-atomic/commit/6345b4ef24107127e0d1654ac32e7c3625c52442))
|
228
|
+
|
229
|
+
# [3.0.0-beta.32](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.31...v3.0.0-beta.32) (2024-07-16)
|
230
|
+
|
231
|
+
|
232
|
+
### Bug Fixes
|
233
|
+
|
234
|
+
* Fix icon for the previous button of Pager ([c86e51a](https://github.com/occmundial/occ-atomic/commit/c86e51afd8362bb45cf43b4e7f9c357b0e6a7f13))
|
235
|
+
* Replace ul for div in the Pager component ([9484174](https://github.com/occmundial/occ-atomic/commit/9484174789bcb4c7d32c0544b26d2e0ac88334c0))
|
236
|
+
|
237
|
+
# [3.0.0-beta.31](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.30...v3.0.0-beta.31) (2024-07-16)
|
238
|
+
|
239
|
+
|
240
|
+
### Bug Fixes
|
241
|
+
|
242
|
+
* Change styles and behavior of the Pager component ([5e65e50](https://github.com/occmundial/occ-atomic/commit/5e65e505f31f77425d5de127ae4c83b007a88d5a))
|
243
|
+
* Fix styles of button with only an icon on the right ([f77f44e](https://github.com/occmundial/occ-atomic/commit/f77f44e7d0b7c40ec0bd388712acfdcde1a45489))
|
244
|
+
|
245
|
+
|
246
|
+
### BREAKING CHANGES
|
247
|
+
|
248
|
+
* Rename Pager's prop names.
|
249
|
+
The logic and behavior of the Pager has changed too, now is the parent component the responsible for handling the page number, the Pager is only a modifier and no longer has an internal state and management of the current page.
|
250
|
+
|
251
|
+
# [3.0.0-beta.30](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.29...v3.0.0-beta.30) (2024-07-16)
|
252
|
+
|
253
|
+
|
254
|
+
### Bug Fixes
|
255
|
+
|
256
|
+
* Remove unnecesary bp props in grid col ([97e839a](https://github.com/occmundial/occ-atomic/commit/97e839aa4621fcbb964615167165132628b646c3))
|
257
|
+
* Remove unnecesary margins and set auto ([96d016a](https://github.com/occmundial/occ-atomic/commit/96d016a6f3f461f5b44cbd299d8c135dc846561c))
|
258
|
+
|
259
|
+
|
260
|
+
### Features
|
261
|
+
|
262
|
+
* Update grid with new design tokens ([0fd904d](https://github.com/occmundial/occ-atomic/commit/0fd904d044323108a1e573a93e7e1a6dea99d0ef))
|
263
|
+
|
264
|
+
# [3.0.0-beta.29](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.28...v3.0.0-beta.29) (2024-07-09)
|
265
|
+
|
266
|
+
|
267
|
+
### Bug Fixes
|
268
|
+
|
269
|
+
* Remove extra padding in label ([efda99e](https://github.com/occmundial/occ-atomic/commit/efda99e0fca815e6f60c7277da52b41dfcd21e72))
|
270
|
+
|
271
|
+
# [3.0.0-beta.28](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.27...v3.0.0-beta.28) (2024-07-08)
|
272
|
+
|
273
|
+
|
274
|
+
### Bug Fixes
|
275
|
+
|
276
|
+
* Add hover transition styles to link toaster ([dcb67ab](https://github.com/occmundial/occ-atomic/commit/dcb67aba17e6f669d5554f397c516aca687ebc53))
|
277
|
+
* Move css to flexbox props ([cedb764](https://github.com/occmundial/occ-atomic/commit/cedb7644bdc88a19ca385e4a0d8902f19900eaf0))
|
278
|
+
|
279
|
+
# [3.0.0-beta.27](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.26...v3.0.0-beta.27) (2024-07-08)
|
280
|
+
|
281
|
+
|
282
|
+
### Bug Fixes
|
283
|
+
|
284
|
+
* CHanged outlines with shadows ([bba0c01](https://github.com/occmundial/occ-atomic/commit/bba0c01a54a13b1b405c2405eb1ab764cc1ab367))
|
285
|
+
|
286
|
+
|
287
|
+
### Features
|
288
|
+
|
289
|
+
* Changed tag border to outline ([89ccbaf](https://github.com/occmundial/occ-atomic/commit/89ccbaf7f1d0c183940cfb3ef2fb8f270928aedf))
|
290
|
+
|
291
|
+
# [3.0.0-beta.26](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.25...v3.0.0-beta.26) (2024-07-05)
|
292
|
+
|
293
|
+
|
294
|
+
### Bug Fixes
|
295
|
+
|
296
|
+
* Align title if not description ([ef6a12a](https://github.com/occmundial/occ-atomic/commit/ef6a12a1dba3d5440220cfe2798801d7d08c441c))
|
297
|
+
|
298
|
+
# [3.0.0-beta.25](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.24...v3.0.0-beta.25) (2024-07-03)
|
299
|
+
|
300
|
+
|
301
|
+
### Bug Fixes
|
302
|
+
|
303
|
+
* Add hover styles to alert link action ([1e7efde](https://github.com/occmundial/occ-atomic/commit/1e7efde311085677f43c5057769d406c88d13c33))
|
304
|
+
* Move hover styles to cta classname ([b457e9b](https://github.com/occmundial/occ-atomic/commit/b457e9b639627361ee4b272dc64663457d67a60f))
|
305
|
+
|
306
|
+
# [3.0.0-beta.24](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.23...v3.0.0-beta.24) (2024-06-28)
|
307
|
+
|
308
|
+
|
309
|
+
### Bug Fixes
|
310
|
+
|
311
|
+
* Handle key press on Avatar ([5821f9a](https://github.com/occmundial/occ-atomic/commit/5821f9ab94ee67af5a6ceebfe587dfa23656a9be))
|
312
|
+
* Update structure and styles of Avatar ([ed5ad44](https://github.com/occmundial/occ-atomic/commit/ed5ad44f42e8e2665f6b1e59db149fc27b8842f4))
|
313
|
+
|
314
|
+
# [3.0.0-beta.23](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.22...v3.0.0-beta.23) (2024-06-27)
|
315
|
+
|
316
|
+
|
317
|
+
### Bug Fixes
|
318
|
+
|
319
|
+
* Align vertical centered tip and banner text ([032a704](https://github.com/occmundial/occ-atomic/commit/032a704707562dab93707a3c31aa1b26dc6be0dd))
|
320
|
+
|
321
|
+
# [3.0.0-beta.22](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.21...v3.0.0-beta.22) (2024-06-26)
|
322
|
+
|
323
|
+
|
324
|
+
### Features
|
325
|
+
|
326
|
+
* Tag compnent and documentation updated ([718378f](https://github.com/occmundial/occ-atomic/commit/718378ffd916c98673a3b10f7b9ba827d806aa1c))
|
327
|
+
|
328
|
+
# [3.0.0-beta.21](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.20...v3.0.0-beta.21) (2024-06-25)
|
329
|
+
|
330
|
+
|
331
|
+
### Bug Fixes
|
332
|
+
|
333
|
+
* Add outline border and merge with beta ([a212aa3](https://github.com/occmundial/occ-atomic/commit/a212aa3f87471092a246925e79a9d787535b13ba))
|
334
|
+
* Resolve conflicts ([99b08cb](https://github.com/occmundial/occ-atomic/commit/99b08cb290979fa7f1aad3dd2c04f65b1b494559))
|
335
|
+
* Resolve conflicts ([81776b7](https://github.com/occmundial/occ-atomic/commit/81776b701b168e66a1f1dfa7b785227b40a76dc9))
|
336
|
+
* Set md size for tip close icon ([759e6d1](https://github.com/occmundial/occ-atomic/commit/759e6d10842e2c55cf81d2aff57f60479e3a3395))
|
337
|
+
* Set min width for desktop and conditionated on mouse events ([98857fd](https://github.com/occmundial/occ-atomic/commit/98857fd313d247e618c64dbbaacea93c6ab084ae))
|
338
|
+
|
339
|
+
|
340
|
+
### Features
|
341
|
+
|
342
|
+
* Add close icon prop and conditionated onclose func ([e456d38](https://github.com/occmundial/occ-atomic/commit/e456d384a82d4b6105e27bb36d693b43d5608c1c))
|
343
|
+
* Update toaster with new design tokens ([88edaa8](https://github.com/occmundial/occ-atomic/commit/88edaa8fe5c3c04bc9f634f6a287c1614c893d15))
|
344
|
+
|
345
|
+
# [3.0.0-beta.20](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.19...v3.0.0-beta.20) (2024-06-25)
|
346
|
+
|
347
|
+
|
348
|
+
### Bug Fixes
|
349
|
+
|
350
|
+
* Add condition to set test id prop ([4e90cea](https://github.com/occmundial/occ-atomic/commit/4e90cea0a6f5c627c8b2a398a9aef449fa3e1b7c))
|
351
|
+
* Adjust tip styles and add banner prop ([04d17ff](https://github.com/occmundial/occ-atomic/commit/04d17ff0fe74186da32d15f91001406344867bb4))
|
352
|
+
* Merge beta changes ([218b68a](https://github.com/occmundial/occ-atomic/commit/218b68a7347b025dc2cdd8171f7d4c22bbd383f1))
|
353
|
+
* Resolve component data conflicts ([c390f1f](https://github.com/occmundial/occ-atomic/commit/c390f1f485415dc15251386527c0caaa70e9814f))
|
354
|
+
|
355
|
+
|
356
|
+
### Features
|
357
|
+
|
358
|
+
* Add test id prop and add new tests ([aba7d32](https://github.com/occmundial/occ-atomic/commit/aba7d3215e0b19e635b53546f66accd327ebed42))
|
359
|
+
|
360
|
+
# [3.0.0-beta.19](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.18...v3.0.0-beta.19) (2024-06-21)
|
361
|
+
|
362
|
+
|
363
|
+
### Bug Fixes
|
364
|
+
|
365
|
+
* Prevent default to avoid scroll on key down ([9ee17d2](https://github.com/occmundial/occ-atomic/commit/9ee17d2a247a02a7be7e1c743669c8833d3f5748))
|
366
|
+
|
367
|
+
# [3.0.0-beta.18](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.17...v3.0.0-beta.18) (2024-06-21)
|
368
|
+
|
369
|
+
|
370
|
+
### Bug Fixes
|
371
|
+
|
372
|
+
* Replace onKeyDown for onKeyUp ([e574e9c](https://github.com/occmundial/occ-atomic/commit/e574e9c42f7a55723794269ede7a4f58dd899e58))
|
373
|
+
|
374
|
+
# [3.0.0-beta.17](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.16...v3.0.0-beta.17) (2024-06-19)
|
375
|
+
|
376
|
+
|
377
|
+
### Bug Fixes
|
378
|
+
|
379
|
+
* Change icon size and adjust margin ([0411455](https://github.com/occmundial/occ-atomic/commit/041145590cd765e5b81937f07ef676d2fc5e8826))
|
380
|
+
* Remove selector not active for focus visible ([dbec333](https://github.com/occmundial/occ-atomic/commit/dbec33316a94826d2007a044b634f944ffe01715))
|
381
|
+
|
382
|
+
# [3.0.0-beta.16](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.15...v3.0.0-beta.16) (2024-06-19)
|
383
|
+
|
384
|
+
|
385
|
+
### Bug Fixes
|
386
|
+
|
387
|
+
* Change focus behavior in form components ([a3b6c9b](https://github.com/occmundial/occ-atomic/commit/a3b6c9b5194b1d8302a6f73bb5522df9e6a756fc))
|
388
|
+
* Changes to structure and styles of Checkbox ([6ed54c0](https://github.com/occmundial/occ-atomic/commit/6ed54c0a5ebae0542431b8305d0da8a052c2d3fb))
|
389
|
+
* Changes to structure and styles of Radio ([694c995](https://github.com/occmundial/occ-atomic/commit/694c9950a4c6c43a5bd7987536a293835860421e))
|
390
|
+
* Changes to structure and styles of SlideToggle ([5ec340f](https://github.com/occmundial/occ-atomic/commit/5ec340f0cc09b04d032ebb888034a92cf71f2f8a))
|
391
|
+
* Fix focus styles in form components ([e69d45b](https://github.com/occmundial/occ-atomic/commit/e69d45b84c3e35a433f37feb7c9b0012137bc2bb))
|
392
|
+
* Fix spacing and sizing of radio, checkbox and toggle ([b3a71c2](https://github.com/occmundial/occ-atomic/commit/b3a71c2e30e2b810036104a4ee57b6b805d2780c))
|
393
|
+
* Fix styles and icon color on Checkbox ([1c4e360](https://github.com/occmundial/occ-atomic/commit/1c4e360ec0d3291048d14f4ccd3859d0bdbc2817))
|
394
|
+
* Fix transition value in SlideToggle ([8423fc6](https://github.com/occmundial/occ-atomic/commit/8423fc6b9eea3219ed052add95f27ef4d181f5b5))
|
395
|
+
* Update componentData ([ff7c0bd](https://github.com/occmundial/occ-atomic/commit/ff7c0bd47ed55d652b01ace7526867d751a6e1c7))
|
396
|
+
|
397
|
+
# [3.0.0-beta.15](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.14...v3.0.0-beta.15) (2024-06-18)
|
398
|
+
|
399
|
+
|
400
|
+
### Bug Fixes
|
401
|
+
|
402
|
+
* Centered select icon and set cursor pointer for select box ([05fa3f1](https://github.com/occmundial/occ-atomic/commit/05fa3f1ca0efdf7e2b75c468eb23279aafbc58ce))
|
403
|
+
* Remove class condition ([59ef135](https://github.com/occmundial/occ-atomic/commit/59ef1353213a9df3737d59c13385254767c41372))
|
404
|
+
|
405
|
+
# [3.0.0-beta.14](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.13...v3.0.0-beta.14) (2024-06-13)
|
406
|
+
|
407
|
+
|
408
|
+
### Bug Fixes
|
409
|
+
|
410
|
+
* Fix toggle background on focus when hovered ([8c35f96](https://github.com/occmundial/occ-atomic/commit/8c35f96b77fdb3d1692d864159561842a3213bba))
|
411
|
+
|
412
|
+
# [3.0.0-beta.13](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.12...v3.0.0-beta.13) (2024-06-13)
|
413
|
+
|
414
|
+
|
415
|
+
### Bug Fixes
|
416
|
+
|
417
|
+
* Add form nav behavior to SwitchToggle ([e1e74ed](https://github.com/occmundial/occ-atomic/commit/e1e74edf8306250d0ae7a723b758c9426593c295))
|
418
|
+
|
419
|
+
# [3.0.0-beta.12](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.11...v3.0.0-beta.12) (2024-06-07)
|
420
|
+
|
421
|
+
|
422
|
+
### Bug Fixes
|
423
|
+
|
424
|
+
* Add form nav behavior to checkbox ([6b2c664](https://github.com/occmundial/occ-atomic/commit/6b2c664e165bb4617dc53874be69bb9d8c8e6bc3))
|
425
|
+
|
426
|
+
# [3.0.0-beta.11](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.10...v3.0.0-beta.11) (2024-06-07)
|
427
|
+
|
428
|
+
|
429
|
+
### Bug Fixes
|
430
|
+
|
431
|
+
* Call hoc window size and improve tip text use memo ([840e108](https://github.com/occmundial/occ-atomic/commit/840e1089cb3e80c6b2d2686c56b577166f6bc66f))
|
432
|
+
* Resolve conflicts ([23e9ba8](https://github.com/occmundial/occ-atomic/commit/23e9ba8008ffe55e8af6910394580123032aee0e))
|
433
|
+
|
434
|
+
# [3.0.0-beta.10](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.9...v3.0.0-beta.10) (2024-06-06)
|
435
|
+
|
436
|
+
|
437
|
+
### Features
|
438
|
+
|
439
|
+
* Checkbox redesigned and documentation created ([48fbc8d](https://github.com/occmundial/occ-atomic/commit/48fbc8d0a912c300324fe244e9692a49f3a152b5))
|
440
|
+
* Remove updates to component ([ab71716](https://github.com/occmundial/occ-atomic/commit/ab71716991a7700134dbafe0d8eda63e18ff8eab))
|
441
|
+
|
442
|
+
# [3.0.0-beta.9](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.8...v3.0.0-beta.9) (2024-06-06)
|
443
|
+
|
444
|
+
|
445
|
+
### Bug Fixes
|
446
|
+
|
447
|
+
* Move use memo before early return ([3d290c9](https://github.com/occmundial/occ-atomic/commit/3d290c9675fb24e20d131fdbaeef023920f3e439))
|
448
|
+
|
449
|
+
# [3.0.0-beta.8](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.7...v3.0.0-beta.8) (2024-06-06)
|
450
|
+
|
451
|
+
|
452
|
+
### Bug Fixes
|
453
|
+
|
454
|
+
* Add border for promote alert ([5050f18](https://github.com/occmundial/occ-atomic/commit/5050f187b60f98118654ecbbe3e2cba7b29790ab))
|
455
|
+
* Add min height to tip container ([579d263](https://github.com/occmundial/occ-atomic/commit/579d26306d59ce73b5084f9cd632dd12ed162fc5))
|
456
|
+
* Resolve conflicts ([0a15dfa](https://github.com/occmundial/occ-atomic/commit/0a15dfa8d8da38a724d71622809f0e02c5bed0e9))
|
457
|
+
|
458
|
+
|
459
|
+
### Features
|
460
|
+
|
461
|
+
* Render tip in banner component ([239e2c8](https://github.com/occmundial/occ-atomic/commit/239e2c82c23d79698bd912931b314ceddf252fb4))
|
462
|
+
* Update tip component with new design tokens ([b2367fc](https://github.com/occmundial/occ-atomic/commit/b2367fcaade288609df4c841c91fb308841ae4b0))
|
463
|
+
|
464
|
+
|
465
|
+
### Performance Improvements
|
466
|
+
|
467
|
+
* Memoize text replace in tip text component ([69180ce](https://github.com/occmundial/occ-atomic/commit/69180ce9cb1e812769e31a837257d8c8e6f24199))
|
468
|
+
|
469
|
+
# [3.0.0-beta.7](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2024-06-06)
|
470
|
+
|
471
|
+
|
472
|
+
### Bug Fixes
|
473
|
+
|
474
|
+
* Fix radio styles and add a form nav behavior ([59f0320](https://github.com/occmundial/occ-atomic/commit/59f03207a45b1ec27e02970668cffe2cfd5931a9))
|
475
|
+
* Ignore tab index if radio element is disabled ([e479098](https://github.com/occmundial/occ-atomic/commit/e4790982a127408a474f688a4647612ef8fbb446))
|
476
|
+
|
1
477
|
# [3.0.0-beta.6](https://github.com/occmundial/occ-atomic/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2024-06-05)
|
2
478
|
|
3
479
|
|
package/build/Avatar/Avatar.js
CHANGED
@@ -15,6 +15,12 @@ var _AvatarContent = _interopRequireDefault(require("./AvatarContent"));
|
|
15
15
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
17
17
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
19
|
+
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
21
|
+
|
22
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
23
|
+
|
18
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
19
25
|
|
20
26
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
@@ -44,33 +50,72 @@ var Avatar = /*#__PURE__*/function (_React$Component) {
|
|
44
50
|
|
45
51
|
var _super = _createSuper(Avatar);
|
46
52
|
|
47
|
-
function Avatar() {
|
53
|
+
function Avatar(props) {
|
54
|
+
var _this;
|
55
|
+
|
48
56
|
_classCallCheck(this, Avatar);
|
49
57
|
|
50
|
-
|
58
|
+
_this = _super.call(this, props);
|
59
|
+
_this.handleKeyUp = _this.handleKeyUp.bind(_assertThisInitialized(_this));
|
60
|
+
return _this;
|
51
61
|
}
|
52
62
|
|
53
63
|
_createClass(Avatar, [{
|
64
|
+
key: "handleKeyDown",
|
65
|
+
value: function handleKeyDown(e) {
|
66
|
+
if (e.keyCode == 13 || e.keyCode == 32) {
|
67
|
+
e.preventDefault();
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}, {
|
71
|
+
key: "handleKeyUp",
|
72
|
+
value: function handleKeyUp(e) {
|
73
|
+
if (e.keyCode == 13 || e.keyCode == 32) {
|
74
|
+
var _this$props = this.props,
|
75
|
+
onEdit = _this$props.onEdit,
|
76
|
+
onClick = _this$props.onClick;
|
77
|
+
var isEditable = onEdit || onClick;
|
78
|
+
var handleClick = isEditable ? onClick || onEdit : undefined;
|
79
|
+
if (handleClick) handleClick();
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}, {
|
54
83
|
key: "render",
|
55
84
|
value: function render() {
|
56
|
-
var _this$
|
57
|
-
classes = _this$
|
58
|
-
photo = _this$
|
59
|
-
|
60
|
-
|
61
|
-
size = _this$
|
62
|
-
id = _this$
|
63
|
-
className = _this$
|
64
|
-
style = _this$
|
85
|
+
var _this$props2 = this.props,
|
86
|
+
classes = _this$props2.classes,
|
87
|
+
photo = _this$props2.photo,
|
88
|
+
name = _this$props2.name,
|
89
|
+
_this$props2$size = _this$props2.size,
|
90
|
+
size = _this$props2$size === void 0 ? 40 : _this$props2$size,
|
91
|
+
id = _this$props2.id,
|
92
|
+
className = _this$props2.className,
|
93
|
+
style = _this$props2.style,
|
94
|
+
onEdit = _this$props2.onEdit,
|
95
|
+
onClick = _this$props2.onClick,
|
96
|
+
disabled = _this$props2.disabled;
|
97
|
+
var isEditable = onEdit || onClick;
|
98
|
+
var handleClick = isEditable ? onClick || onEdit : undefined;
|
99
|
+
var tabIndexValue = isEditable && !disabled ? 0 : undefined;
|
100
|
+
var combinedClasses = "".concat(classes.circle).concat(isEditable ? " ".concat(classes.editable) : '').concat(disabled ? " ".concat(classes.disabled) : '').concat(className ? " ".concat(className) : '');
|
65
101
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
66
102
|
id: id,
|
67
|
-
className:
|
68
|
-
|
103
|
+
className: combinedClasses,
|
104
|
+
onClick: handleClick,
|
105
|
+
onKeyDown: this.handleKeyDown,
|
106
|
+
onKeyUp: this.handleKeyUp,
|
107
|
+
tabIndex: tabIndexValue,
|
108
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
109
|
+
width: size,
|
110
|
+
height: size
|
111
|
+
})
|
69
112
|
}, /*#__PURE__*/_react["default"].createElement(_AvatarContent["default"], {
|
70
113
|
photo: photo,
|
71
|
-
gender: gender,
|
72
114
|
name: name,
|
73
|
-
size: size
|
115
|
+
size: size,
|
116
|
+
onEdit: onEdit,
|
117
|
+
onClick: onClick,
|
118
|
+
disabled: disabled
|
74
119
|
}));
|
75
120
|
}
|
76
121
|
}]);
|
@@ -78,23 +123,26 @@ var Avatar = /*#__PURE__*/function (_React$Component) {
|
|
78
123
|
return Avatar;
|
79
124
|
}(_react["default"].Component);
|
80
125
|
|
81
|
-
Avatar.defaultProps = {
|
82
|
-
size: 70
|
83
|
-
};
|
84
126
|
Avatar.propTypes = {
|
85
127
|
classes: _propTypes["default"].object.isRequired,
|
86
128
|
|
87
129
|
/** A url to show a photo as the avatar. */
|
88
130
|
photo: _propTypes["default"].string,
|
89
131
|
|
90
|
-
/** Use the values 'm' or 'f' to show a default avatar with an icon representing the gender. */
|
91
|
-
gender: _propTypes["default"].oneOf(['f', 'm']),
|
92
|
-
|
93
132
|
/** Pass a name to show two initials. */
|
94
133
|
name: _propTypes["default"].string,
|
95
134
|
|
96
135
|
/** The size of the avatar. */
|
97
136
|
size: _propTypes["default"].number,
|
137
|
+
|
138
|
+
/** A function to handle the click action for editing. */
|
139
|
+
onEdit: _propTypes["default"].func,
|
140
|
+
|
141
|
+
/** A function to handle the click. */
|
142
|
+
onClick: _propTypes["default"].func,
|
143
|
+
|
144
|
+
/** Determines if the avatar is disabled. */
|
145
|
+
disabled: _propTypes["default"].bool,
|
98
146
|
id: _propTypes["default"].string,
|
99
147
|
className: _propTypes["default"].string,
|
100
148
|
style: _propTypes["default"].object
|
@@ -35,17 +35,24 @@ describe("AvatarJSS", function () {
|
|
35
35
|
}));
|
36
36
|
expect(wrapper).toMatchSnapshot();
|
37
37
|
});
|
38
|
+
it('returns the right width and height', function () {
|
39
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"], {
|
40
|
+
name: "John Doe",
|
41
|
+
size: 50
|
42
|
+
}));
|
43
|
+
var styles = wrapper.dive().props().style;
|
44
|
+
expect(styles.width).toBe(50);
|
45
|
+
expect(styles.height).toBe(50);
|
46
|
+
wrapper.setProps({
|
47
|
+
size: 70
|
48
|
+
});
|
49
|
+
var styles2 = wrapper.dive().props().style;
|
50
|
+
expect(styles2.width).toBe(70);
|
51
|
+
expect(styles2.height).toBe(70);
|
52
|
+
});
|
38
53
|
});
|
39
54
|
describe("Avatar styles", function () {
|
40
55
|
it('matches the snapshot', function () {
|
41
56
|
expect(_styles["default"]).toMatchSnapshot();
|
42
57
|
});
|
43
|
-
it('returns the right width and height', function () {
|
44
|
-
var props = {};
|
45
|
-
expect(_styles["default"].circle.width(props)).toBe(70);
|
46
|
-
expect(_styles["default"].circle.height(props)).toBe(70);
|
47
|
-
props.size = 50;
|
48
|
-
expect(_styles["default"].circle.width(props)).toBe(50);
|
49
|
-
expect(_styles["default"].circle.height(props)).toBe(50);
|
50
|
-
});
|
51
58
|
});
|