@asgardeo/javascript 0.1.8 → 0.1.9
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/dist/cjs/index.js +124 -40
- package/dist/cjs/index.js.map +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +122 -40
- package/dist/index.js.map +3 -3
- package/dist/models/i18n.d.ts +2 -0
- package/dist/theme/types.d.ts +26 -0
- package/dist/utils/bem.d.ts +46 -0
- package/dist/utils/formatDate.d.ts +33 -0
- package/package.json +1 -1
package/dist/models/i18n.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ export interface I18nTranslations {
|
|
|
47
47
|
'username.password.submit.button': string;
|
|
48
48
|
'username.password.title': string;
|
|
49
49
|
'username.password.subtitle': string;
|
|
50
|
+
'user.profile.title': string;
|
|
51
|
+
'user.profile.update.generic.error': string;
|
|
50
52
|
'organization.switcher.select.organization': string;
|
|
51
53
|
'organization.switcher.switch.organization': string;
|
|
52
54
|
'organization.switcher.loading.organizations': string;
|
package/dist/theme/types.d.ts
CHANGED
|
@@ -55,34 +55,47 @@ export interface ThemeColors {
|
|
|
55
55
|
background: {
|
|
56
56
|
body: {
|
|
57
57
|
main: string;
|
|
58
|
+
dark?: string;
|
|
58
59
|
};
|
|
59
60
|
disabled: string;
|
|
60
61
|
surface: string;
|
|
62
|
+
dark?: string;
|
|
61
63
|
};
|
|
62
64
|
border: string;
|
|
63
65
|
error: {
|
|
64
66
|
contrastText: string;
|
|
65
67
|
main: string;
|
|
68
|
+
dark?: string;
|
|
69
|
+
};
|
|
70
|
+
info: {
|
|
71
|
+
contrastText: string;
|
|
72
|
+
main: string;
|
|
73
|
+
dark?: string;
|
|
66
74
|
};
|
|
67
75
|
primary: {
|
|
68
76
|
contrastText: string;
|
|
69
77
|
main: string;
|
|
78
|
+
dark?: string;
|
|
70
79
|
};
|
|
71
80
|
secondary: {
|
|
72
81
|
contrastText: string;
|
|
73
82
|
main: string;
|
|
83
|
+
dark?: string;
|
|
74
84
|
};
|
|
75
85
|
success: {
|
|
76
86
|
contrastText: string;
|
|
77
87
|
main: string;
|
|
88
|
+
dark?: string;
|
|
78
89
|
};
|
|
79
90
|
text: {
|
|
80
91
|
primary: string;
|
|
81
92
|
secondary: string;
|
|
93
|
+
dark?: string;
|
|
82
94
|
};
|
|
83
95
|
warning: {
|
|
84
96
|
contrastText: string;
|
|
85
97
|
main: string;
|
|
98
|
+
dark?: string;
|
|
86
99
|
};
|
|
87
100
|
}
|
|
88
101
|
export interface ThemeConfig {
|
|
@@ -151,33 +164,46 @@ export interface ThemeVars {
|
|
|
151
164
|
primary: {
|
|
152
165
|
main: string;
|
|
153
166
|
contrastText: string;
|
|
167
|
+
dark?: string;
|
|
154
168
|
};
|
|
155
169
|
secondary: {
|
|
156
170
|
main: string;
|
|
157
171
|
contrastText: string;
|
|
172
|
+
dark?: string;
|
|
158
173
|
};
|
|
159
174
|
background: {
|
|
160
175
|
surface: string;
|
|
161
176
|
disabled: string;
|
|
177
|
+
dark?: string;
|
|
162
178
|
body: {
|
|
163
179
|
main: string;
|
|
180
|
+
dark?: string;
|
|
164
181
|
};
|
|
165
182
|
};
|
|
166
183
|
error: {
|
|
167
184
|
main: string;
|
|
168
185
|
contrastText: string;
|
|
186
|
+
dark?: string;
|
|
187
|
+
};
|
|
188
|
+
info: {
|
|
189
|
+
contrastText: string;
|
|
190
|
+
main: string;
|
|
191
|
+
dark?: string;
|
|
169
192
|
};
|
|
170
193
|
success: {
|
|
171
194
|
main: string;
|
|
172
195
|
contrastText: string;
|
|
196
|
+
dark?: string;
|
|
173
197
|
};
|
|
174
198
|
warning: {
|
|
175
199
|
main: string;
|
|
176
200
|
contrastText: string;
|
|
201
|
+
dark?: string;
|
|
177
202
|
};
|
|
178
203
|
text: {
|
|
179
204
|
primary: string;
|
|
180
205
|
secondary: string;
|
|
206
|
+
dark?: string;
|
|
181
207
|
};
|
|
182
208
|
border: string;
|
|
183
209
|
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Creates a BEM-style class name by combining a base class with element and/or modifier
|
|
20
|
+
*
|
|
21
|
+
* @param baseClass - The base CSS class string (usually from emotion's css function)
|
|
22
|
+
* @param element - The BEM element name (optional)
|
|
23
|
+
* @param modifier - The BEM modifier name (optional)
|
|
24
|
+
* @returns The combined class name string
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* const baseClass = css`
|
|
29
|
+
* display: flex;
|
|
30
|
+
* &__element {
|
|
31
|
+
* color: red;
|
|
32
|
+
* }
|
|
33
|
+
* &--modifier {
|
|
34
|
+
* background: blue;
|
|
35
|
+
* }
|
|
36
|
+
* `;
|
|
37
|
+
*
|
|
38
|
+
* import bem from './utils/bem';
|
|
39
|
+
*
|
|
40
|
+
* const elementClass = bem(baseClass, 'element');
|
|
41
|
+
* const modifierClass = bem(baseClass, null, 'modifier');
|
|
42
|
+
* const elementWithModifierClass = bem(baseClass, 'element', 'modifier');
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare const bem: (baseClass: string, element?: string | null, modifier?: string | null) => string;
|
|
46
|
+
export default bem;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Formats a date string to a human-readable format.
|
|
20
|
+
*
|
|
21
|
+
* @param dateString - The date string to format (optional)
|
|
22
|
+
* @returns A formatted date string in 'Month Day, Year' format, or '-' if no date is provided, or the original string if parsing fails
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* formatDate('2025-07-09T10:30:00Z'); // Returns "July 9, 2025"
|
|
27
|
+
* formatDate(''); // Returns "-"
|
|
28
|
+
* formatDate(undefined); // Returns "-"
|
|
29
|
+
* formatDate('invalid-date'); // Returns "invalid-date"
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare const formatDate: (dateString?: string) => string;
|
|
33
|
+
export default formatDate;
|