@aarhus-university/au-lib-react-components 10.22.0 → 11.0.0
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.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sideEffects": false,
|
|
3
3
|
"name": "@aarhus-university/au-lib-react-components",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "11.0.0",
|
|
5
5
|
"description": "Library for shared React components for various applications on au.dk",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "jest",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@aarhus-university/au-designsystem-delphinus": "0.34.2",
|
|
76
76
|
"@aarhus-university/au-designsystem-delphinus-dev": "0.2.0",
|
|
77
|
-
"@aarhus-university/types": "^0.
|
|
77
|
+
"@aarhus-university/types": "^0.16.1",
|
|
78
78
|
"@reduxjs/toolkit": "^1.8.3",
|
|
79
79
|
"@types/google.analytics": "^0.0.42",
|
|
80
80
|
"@types/history": "^5.0.0",
|
|
@@ -21,7 +21,7 @@ const AUButtonComponent: FC<AUButtonComponentProps> = ({
|
|
|
21
21
|
const typeClass = type === 'default' ? '' : `button--${type}`;
|
|
22
22
|
let iconClass = '';
|
|
23
23
|
if (icon) {
|
|
24
|
-
iconClass =
|
|
24
|
+
iconClass = `button--icon icon-${icon}`;
|
|
25
25
|
if (iconPosition) {
|
|
26
26
|
iconClass = `${iconClass} button--icon--${iconPosition}`;
|
|
27
27
|
}
|
|
@@ -48,7 +48,6 @@ const AUButtonComponent: FC<AUButtonComponentProps> = ({
|
|
|
48
48
|
modeClass,
|
|
49
49
|
disabled && mode !== 'processing' ? 'visually-disabled' : '',
|
|
50
50
|
].concat(classNames || []).join(' ').replace(/\s+/g, ' ').trim()}
|
|
51
|
-
data-icon={icon === '' ? null : icon}
|
|
52
51
|
title={icon && hideLabel ? label : undefined}
|
|
53
52
|
aria-expanded={ariaExpanded}
|
|
54
53
|
onClick={(event: MouseEvent<HTMLButtonElement>) => {
|
|
@@ -27,6 +27,12 @@ export default {
|
|
|
27
27
|
'large',
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
|
+
icon: {
|
|
31
|
+
control: {
|
|
32
|
+
type: 'select',
|
|
33
|
+
},
|
|
34
|
+
options: ['add', 'attachment', 'award', 'bike', 'bookmark', 'brand-linkedin', 'brand-mendeley', 'brand-orcid', 'brand-researchgate', 'brand-twitter', 'calendar', 'camera', 'car', 'class', 'close', 'collapse', 'confirm', 'confirm-circle', 'context-menu', 'copy', 'current-semester', 'dark-mode', 'delphinus', 'delete', 'design', 'download', 'edit', 'email', 'exam', 'expand', 'failed', 'failed-circle', 'file', 'filter', 'finish', 'heart', 'hide', 'infinity', 'info', 'info-circle', 'instructor', 'instructor-with-class', 'language', 'location', 'link-chain', 'link-internal', 'link-external', 'link-external-square', 'lms-course-common', 'lms-course-sections', 'lms-course-additional', 'lms-course-merge-with', 'lms-course-merged', 'mailbox', 'menu', 'news', 'next', 'note', 'notifications', 'passed-exemption', 'phone', 'phone-landline', 'previous', 'print', 'public-transport', 'receipt', 'refresh', 'reorder', 'replay', 'route', 'search', 'season-autumn', 'season-christmas', 'season-easter', 'season-halloween', 'season-spring', 'season-summer', 'season-winter', 'send', 'settings', 'source-system', 'student-place-accepted', 'student-place-not-offered', 'student-place-offered', 'student-place-rejected', 'student-place-standby', 'sign-in', 'sign-out', 'spock', 'sync', 'theme-chooser', 'tip', 'tools', 'tooltip', 'upload', 'user-profile', 'user-impersonation', 'view', 'viewport-default', 'viewport-medium', 'viewport-wide', 'walking', 'warning', 'warning-triangle'],
|
|
35
|
+
},
|
|
30
36
|
iconPosition: {
|
|
31
37
|
control: {
|
|
32
38
|
type: 'select',
|
|
@@ -78,7 +84,7 @@ With_Icon.args = {
|
|
|
78
84
|
type: 'default',
|
|
79
85
|
size: 'default',
|
|
80
86
|
mode: 'none',
|
|
81
|
-
icon: '
|
|
87
|
+
icon: 'delphinus',
|
|
82
88
|
iconPosition: 'left',
|
|
83
89
|
hideLabel: false,
|
|
84
90
|
};
|
|
@@ -89,7 +95,7 @@ Icon_Only.args = {
|
|
|
89
95
|
type: 'default',
|
|
90
96
|
size: 'default',
|
|
91
97
|
mode: 'none',
|
|
92
|
-
icon: '
|
|
98
|
+
icon: 'delphinus',
|
|
93
99
|
iconPosition: 'left',
|
|
94
100
|
hideLabel: true,
|
|
95
101
|
};
|
|
@@ -100,7 +106,7 @@ Irreversible_Action.args = {
|
|
|
100
106
|
type: 'default',
|
|
101
107
|
size: 'default',
|
|
102
108
|
mode: 'ireversable-action',
|
|
103
|
-
icon: '
|
|
109
|
+
icon: 'delphinus',
|
|
104
110
|
};
|
|
105
111
|
|
|
106
112
|
export const Confirmable_Action = Template.bind({});
|
|
@@ -109,7 +115,7 @@ Confirmable_Action.args = {
|
|
|
109
115
|
type: 'default',
|
|
110
116
|
size: 'default',
|
|
111
117
|
mode: 'confirmable-action',
|
|
112
|
-
icon: '
|
|
118
|
+
icon: 'delphinus',
|
|
113
119
|
};
|
|
114
120
|
|
|
115
121
|
export const Processing = Template.bind({});
|