@netu-si/netu-react-dsf-components 0.0.14 → 1.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/dist/cjs/components/DSFBackLink/DSFBackLink.d.ts +4 -6
- package/dist/cjs/components/DSFBeforeMainContainer/DSFBeforeMainContainer.d.ts +4 -10
- package/dist/cjs/components/DSFBodyEndContainer/DSFBodyEndContainer.d.ts +0 -3
- package/dist/cjs/components/DSFBodyStartContainer/DSFBodyStartContainer.d.ts +0 -3
- package/dist/cjs/components/DSFButton/DSFButton.d.ts +0 -1
- package/dist/cjs/components/DSFCookies/DSFCookies.d.ts +2 -9
- package/dist/cjs/components/DSFCookiesV3/DSFCookies.d.ts +15 -0
- package/dist/cjs/components/DSFCookiesV3/index.d.ts +1 -0
- package/dist/cjs/components/DSFDateInput/DSFDateInput.d.ts +28 -49
- package/dist/cjs/components/DSFErrorSummary/DSFErrorSummary.d.ts +2 -9
- package/dist/cjs/components/DSFErrorSummary/index.d.ts +1 -1
- package/dist/cjs/components/DSFFooter/DSFFooter.d.ts +3 -8
- package/dist/cjs/components/DSFHeader/DSFHeader.d.ts +18 -8
- package/dist/cjs/components/DSFHeader/DSFHeaderOld.d.ts +29 -0
- package/dist/cjs/components/DSFInput/index.d.ts +1 -1
- package/dist/cjs/components/DSFInputField/DSFInputField.d.ts +5 -13
- package/dist/cjs/components/DSFLoadingBox/DSFLoadingBox.d.ts +0 -3
- package/dist/cjs/components/DSFMain/DSFMain.d.ts +0 -4
- package/dist/cjs/components/DSFPage/DSFPage.d.ts +7 -12
- package/dist/cjs/components/DSFPanel/DSFPanel.d.ts +1 -5
- package/dist/cjs/components/DSFPanel/index.d.ts +1 -1
- package/dist/cjs/components/DSFRadio/DSFRadio.d.ts +2 -0
- package/dist/cjs/components/DSFSelect/DSFSelect.d.ts +1 -8
- package/dist/cjs/components/DSFSkipLink/DSFSkipLink.d.ts +0 -4
- package/dist/cjs/components/DSFSummaryList/DSFSummaryList.d.ts +12 -0
- package/dist/cjs/components/DSFSummaryList/index.d.ts +1 -0
- package/dist/cjs/components/DSFTable/DSFTable.d.ts +0 -5
- package/dist/cjs/components/DSFTextArea/DSFTextArea.d.ts +11 -0
- package/dist/cjs/components/DSFTextArea/index.d.ts +1 -0
- package/dist/cjs/components/DSFUserSignOut/DSFUserSignOut.d.ts +1 -6
- package/dist/cjs/components/DSFWarningText/DSFWarningText.d.ts +7 -0
- package/dist/cjs/components/DSFWarningText/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts +7 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/WebComponentProvider.d.ts +5 -0
- package/dist/cjs/lib/customComponents.d.ts +9 -0
- package/dist/esm/components/DSFBackLink/DSFBackLink.d.ts +4 -6
- package/dist/esm/components/DSFBeforeMainContainer/DSFBeforeMainContainer.d.ts +4 -10
- package/dist/esm/components/DSFBodyEndContainer/DSFBodyEndContainer.d.ts +0 -3
- package/dist/esm/components/DSFBodyStartContainer/DSFBodyStartContainer.d.ts +0 -3
- package/dist/esm/components/DSFButton/DSFButton.d.ts +0 -1
- package/dist/esm/components/DSFCookies/DSFCookies.d.ts +2 -9
- package/dist/esm/components/DSFCookiesV3/DSFCookies.d.ts +15 -0
- package/dist/esm/components/DSFCookiesV3/index.d.ts +1 -0
- package/dist/esm/components/DSFDateInput/DSFDateInput.d.ts +28 -49
- package/dist/esm/components/DSFErrorSummary/DSFErrorSummary.d.ts +2 -9
- package/dist/esm/components/DSFErrorSummary/index.d.ts +1 -1
- package/dist/esm/components/DSFFooter/DSFFooter.d.ts +3 -8
- package/dist/esm/components/DSFHeader/DSFHeader.d.ts +18 -8
- package/dist/esm/components/DSFHeader/DSFHeaderOld.d.ts +29 -0
- package/dist/esm/components/DSFInput/index.d.ts +1 -1
- package/dist/esm/components/DSFInputField/DSFInputField.d.ts +5 -13
- package/dist/esm/components/DSFLoadingBox/DSFLoadingBox.d.ts +0 -3
- package/dist/esm/components/DSFMain/DSFMain.d.ts +0 -4
- package/dist/esm/components/DSFPage/DSFPage.d.ts +7 -12
- package/dist/esm/components/DSFPanel/DSFPanel.d.ts +1 -5
- package/dist/esm/components/DSFPanel/index.d.ts +1 -1
- package/dist/esm/components/DSFRadio/DSFRadio.d.ts +2 -0
- package/dist/esm/components/DSFSelect/DSFSelect.d.ts +1 -8
- package/dist/esm/components/DSFSkipLink/DSFSkipLink.d.ts +0 -4
- package/dist/esm/components/DSFSummaryList/DSFSummaryList.d.ts +12 -0
- package/dist/esm/components/DSFSummaryList/index.d.ts +1 -0
- package/dist/esm/components/DSFTable/DSFTable.d.ts +0 -5
- package/dist/esm/components/DSFTextArea/DSFTextArea.d.ts +11 -0
- package/dist/esm/components/DSFTextArea/index.d.ts +1 -0
- package/dist/esm/components/DSFUserSignOut/DSFUserSignOut.d.ts +1 -6
- package/dist/esm/components/DSFWarningText/DSFWarningText.d.ts +7 -0
- package/dist/esm/components/DSFWarningText/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts +7 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/WebComponentProvider.d.ts +5 -0
- package/dist/esm/lib/customComponents.d.ts +9 -0
- package/dist/index.d.ts +127 -171
- package/package.json +14 -15
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React, { RefObject, FC,
|
|
2
|
-
import { LinkProps } from 'react-router-dom';
|
|
1
|
+
import React, { RefObject, FC, MouseEventHandler, ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
2
|
import { UseFormRegisterReturn } from 'react-hook-form';
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -8,9 +7,11 @@ import { UseFormRegisterReturn } from 'react-hook-form';
|
|
|
8
7
|
* - https://github.com/netu-si/netu-react-dsf-components/tree/main/src/components/DSFBackLink
|
|
9
8
|
*/
|
|
10
9
|
|
|
11
|
-
interface DSFBackLinkProps
|
|
10
|
+
interface DSFBackLinkProps {
|
|
11
|
+
linkComponent: any;
|
|
12
12
|
onBackClick?: () => void;
|
|
13
13
|
label?: string;
|
|
14
|
+
href?: string;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Use the back link component to help users go back to the previous page in a multi-page transaction.
|
|
@@ -19,10 +20,7 @@ interface DSFBackLinkProps extends LinkProps {
|
|
|
19
20
|
* - https://gov-cy.github.io/govcy-design-system-docs/components/back_link
|
|
20
21
|
*/
|
|
21
22
|
declare const DSFBackLink: {
|
|
22
|
-
({ label, onBackClick,
|
|
23
|
-
defaultProps: {
|
|
24
|
-
to: string;
|
|
25
|
-
};
|
|
23
|
+
({ label, href, onBackClick, linkComponent: Link }: DSFBackLinkProps): React.JSX.Element;
|
|
26
24
|
displayName: string;
|
|
27
25
|
};
|
|
28
26
|
|
|
@@ -38,7 +36,6 @@ interface DSFButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttribu
|
|
|
38
36
|
}
|
|
39
37
|
declare const DSFButton: {
|
|
40
38
|
({ children, id, type, className, ...props }: DSFButtonProps): React.JSX.Element;
|
|
41
|
-
defaultProps: {};
|
|
42
39
|
displayName: string;
|
|
43
40
|
};
|
|
44
41
|
|
|
@@ -72,9 +69,33 @@ interface DSFInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
|
72
69
|
declare const DSFInput: React.ForwardRefExoticComponent<DSFInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
73
70
|
|
|
74
71
|
interface InputRefObject {
|
|
75
|
-
day: RefObject<HTMLInputElement>;
|
|
76
|
-
month: RefObject<HTMLInputElement>;
|
|
77
|
-
year: RefObject<HTMLInputElement>;
|
|
72
|
+
day: RefObject<HTMLInputElement | HTMLSelectElement>;
|
|
73
|
+
month: RefObject<HTMLInputElement | HTMLSelectElement>;
|
|
74
|
+
year: RefObject<HTMLInputElement | HTMLSelectElement>;
|
|
75
|
+
}
|
|
76
|
+
interface DSFDateInputInputProps {
|
|
77
|
+
/**
|
|
78
|
+
* Called when the day, month or year changes
|
|
79
|
+
*/
|
|
80
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>, key: string) => void;
|
|
81
|
+
/**
|
|
82
|
+
* Called when the day, month or year fields are blurred
|
|
83
|
+
* (does not get called when moving between inputs in the same datefield)
|
|
84
|
+
*/
|
|
85
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement | HTMLSelectElement>, key: string) => void;
|
|
86
|
+
/**
|
|
87
|
+
* Called when the day, month or year fields are focussed
|
|
88
|
+
* (does not get called when moving between inputs in the same datefield)
|
|
89
|
+
*/
|
|
90
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement | HTMLSelectElement>, key: string) => void;
|
|
91
|
+
/**
|
|
92
|
+
* When the form field is controlled, this sets the value of the day, month and year inputs
|
|
93
|
+
*/
|
|
94
|
+
value?: {
|
|
95
|
+
day?: string;
|
|
96
|
+
month?: string;
|
|
97
|
+
year?: string;
|
|
98
|
+
};
|
|
78
99
|
}
|
|
79
100
|
interface DSFDateInputProps {
|
|
80
101
|
register: UseFormRegisterReturn;
|
|
@@ -125,56 +146,11 @@ interface DSFDateInputProps {
|
|
|
125
146
|
/**
|
|
126
147
|
* General input props including event handlers and value for all inputs
|
|
127
148
|
*/
|
|
128
|
-
inputProps?:
|
|
129
|
-
/**
|
|
130
|
-
* Called when the day, month or year changes
|
|
131
|
-
*/
|
|
132
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>, key: string) => void;
|
|
133
|
-
/**
|
|
134
|
-
* Called when the day, month or year fields are blurred
|
|
135
|
-
* (does not get called when moving between inputs in the same datefield)
|
|
136
|
-
*/
|
|
137
|
-
onBlur?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
138
|
-
/**
|
|
139
|
-
* Called when the day, month or year fields are focussed
|
|
140
|
-
* (does not get called when moving between inputs in the same datefield)
|
|
141
|
-
*/
|
|
142
|
-
onFocus?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
143
|
-
/**
|
|
144
|
-
* When the form field is controlled, this sets the value of the day, month and year inputs
|
|
145
|
-
*/
|
|
146
|
-
value?: {
|
|
147
|
-
day?: string;
|
|
148
|
-
month?: string;
|
|
149
|
-
year?: string;
|
|
150
|
-
};
|
|
151
|
-
};
|
|
149
|
+
inputProps?: DSFDateInputInputProps;
|
|
152
150
|
}
|
|
153
151
|
declare const DSFDateInput: {
|
|
154
152
|
({ register, id, label, hint, errorText, labels, refs, inputProps, inputs, defaultValues, }: DSFDateInputProps): React.JSX.Element;
|
|
155
153
|
displayName: string;
|
|
156
|
-
defaultProps: {
|
|
157
|
-
inputProps: {};
|
|
158
|
-
hint: undefined;
|
|
159
|
-
errorText: undefined;
|
|
160
|
-
labels: {
|
|
161
|
-
day: string;
|
|
162
|
-
month: string;
|
|
163
|
-
year: string;
|
|
164
|
-
};
|
|
165
|
-
defaultValues: {
|
|
166
|
-
day: undefined;
|
|
167
|
-
month: undefined;
|
|
168
|
-
year: undefined;
|
|
169
|
-
};
|
|
170
|
-
inputs: {
|
|
171
|
-
day: undefined;
|
|
172
|
-
month: undefined;
|
|
173
|
-
year: undefined;
|
|
174
|
-
};
|
|
175
|
-
refs: undefined;
|
|
176
|
-
register: undefined;
|
|
177
|
-
};
|
|
178
154
|
};
|
|
179
155
|
|
|
180
156
|
interface DSFErrorSummaryProps {
|
|
@@ -184,32 +160,39 @@ interface DSFErrorSummaryProps {
|
|
|
184
160
|
heading?: string;
|
|
185
161
|
/** Array of errors with text and target element name to scroll into view when clicked */
|
|
186
162
|
errors?: {
|
|
163
|
+
href?: string;
|
|
187
164
|
targetName?: string;
|
|
188
165
|
text?: string;
|
|
189
166
|
}[];
|
|
190
167
|
isInfo?: boolean;
|
|
191
168
|
}
|
|
192
|
-
declare const DSFErrorSummary: {
|
|
193
|
-
({ onHandleErrorClick, heading, errors, isInfo, }: DSFErrorSummaryProps): React.JSX.Element;
|
|
194
|
-
defaultProps: {
|
|
195
|
-
errors: never[];
|
|
196
|
-
heading: string;
|
|
197
|
-
onHandleErrorClick: undefined;
|
|
198
|
-
isInfo: undefined;
|
|
199
|
-
};
|
|
200
|
-
};
|
|
169
|
+
declare const DSFErrorSummary: ({ onHandleErrorClick, heading, errors, isInfo, }: DSFErrorSummaryProps) => React.JSX.Element;
|
|
201
170
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
171
|
+
interface DSFTextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
172
|
+
id?: string;
|
|
173
|
+
error?: boolean;
|
|
174
|
+
errorId?: string;
|
|
175
|
+
register?: UseFormRegisterReturn;
|
|
176
|
+
}
|
|
177
|
+
declare const DSFTextArea: React.ForwardRefExoticComponent<DSFTextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
178
|
+
|
|
179
|
+
interface DSFInputFieldProps {
|
|
180
|
+
label: string;
|
|
181
|
+
hint?: React.ReactNode;
|
|
182
|
+
underRadio?: boolean;
|
|
183
|
+
id: string;
|
|
184
|
+
inputProps?: DSFInputProps | DSFTextAreaProps;
|
|
185
|
+
meta: {
|
|
186
|
+
error?: string | string[];
|
|
187
|
+
touched?: boolean;
|
|
211
188
|
};
|
|
212
|
-
|
|
189
|
+
type?: 'text' | 'textarea';
|
|
190
|
+
rows?: number | undefined;
|
|
191
|
+
visualSize?: number;
|
|
192
|
+
errorId?: string;
|
|
193
|
+
register?: UseFormRegisterReturn;
|
|
194
|
+
}
|
|
195
|
+
declare const DSFInputField: React.FC<DSFInputFieldProps>;
|
|
213
196
|
|
|
214
197
|
interface DSFSelectProps {
|
|
215
198
|
label: string;
|
|
@@ -225,14 +208,7 @@ interface DSFSelectProps {
|
|
|
225
208
|
defaultLabel?: string;
|
|
226
209
|
visualSize?: number;
|
|
227
210
|
}
|
|
228
|
-
declare const DSFSelect: {
|
|
229
|
-
({ children, inputProps, label, hint, id, meta, defaultValue, defaultLabel, visualSize, }: DSFSelectProps): React.JSX.Element;
|
|
230
|
-
defaultProps: {
|
|
231
|
-
inputProps: {};
|
|
232
|
-
meta: {};
|
|
233
|
-
hint: undefined;
|
|
234
|
-
};
|
|
235
|
-
};
|
|
211
|
+
declare const DSFSelect: ({ children, inputProps, label, hint, id, meta, defaultValue, defaultLabel, visualSize, }: DSFSelectProps) => React.JSX.Element;
|
|
236
212
|
|
|
237
213
|
declare enum PanelEnum {
|
|
238
214
|
SUCCESS = "success",
|
|
@@ -248,11 +224,7 @@ interface DSFPanelProps {
|
|
|
248
224
|
children?: React.ReactNode;
|
|
249
225
|
}
|
|
250
226
|
declare const DSFPanel: {
|
|
251
|
-
({ title, type, children
|
|
252
|
-
defaultProps: {
|
|
253
|
-
children: undefined;
|
|
254
|
-
type: PanelEnum;
|
|
255
|
-
};
|
|
227
|
+
({ title, type, children }: DSFPanelProps): React.JSX.Element;
|
|
256
228
|
displayName: string;
|
|
257
229
|
};
|
|
258
230
|
|
|
@@ -276,32 +248,50 @@ interface DSFHintTextProps {
|
|
|
276
248
|
}
|
|
277
249
|
declare const DSFHintText: FC<DSFHintTextProps>;
|
|
278
250
|
|
|
251
|
+
interface DSFUserSignOutProps {
|
|
252
|
+
label?: string;
|
|
253
|
+
fullName: string;
|
|
254
|
+
onClick?: () => void;
|
|
255
|
+
href: string;
|
|
256
|
+
}
|
|
257
|
+
declare const DSFUserSignOut: ({ label, fullName, onClick, href }: DSFUserSignOutProps) => React.JSX.Element;
|
|
258
|
+
|
|
279
259
|
type NavMenuItem = {
|
|
280
260
|
label: string;
|
|
281
261
|
href: string;
|
|
282
262
|
onClick?: () => void;
|
|
263
|
+
subItems?: NavMenuItem[];
|
|
283
264
|
};
|
|
284
265
|
interface DSFHeaderProps {
|
|
266
|
+
linkComponent: any;
|
|
285
267
|
headerTitle: string;
|
|
286
268
|
showLang?: boolean;
|
|
287
269
|
menu?: NavMenuItem[];
|
|
288
270
|
logoUrl?: string;
|
|
289
|
-
languageHandler?: (
|
|
271
|
+
languageHandler?: (locale: string) => void;
|
|
290
272
|
onLogoClickHandler?: MouseEventHandler<HTMLAnchorElement>;
|
|
273
|
+
langOptions?: LanguageItem[];
|
|
291
274
|
defaultValue?: string | null;
|
|
275
|
+
currentLang?: string;
|
|
292
276
|
showLogo?: boolean;
|
|
277
|
+
showSignin?: boolean;
|
|
278
|
+
showSignout?: boolean;
|
|
279
|
+
signoutParams?: DSFUserSignOutProps;
|
|
280
|
+
user?: any;
|
|
281
|
+
showSearch?: boolean;
|
|
282
|
+
showMenu?: boolean;
|
|
293
283
|
}
|
|
284
|
+
type LanguageItem = {
|
|
285
|
+
label: string;
|
|
286
|
+
value: string;
|
|
287
|
+
};
|
|
294
288
|
declare const DSFHeader: {
|
|
295
|
-
({ headerTitle, menu, logoUrl, onLogoClickHandler, showLang, languageHandler, defaultValue, showLogo, }: DSFHeaderProps): React.JSX.Element;
|
|
296
|
-
defaultProps: {
|
|
297
|
-
showLang: boolean;
|
|
298
|
-
menu: undefined;
|
|
299
|
-
headerTitle: string;
|
|
300
|
-
};
|
|
289
|
+
({ linkComponent: NavLink, headerTitle, menu, logoUrl, onLogoClickHandler, showLang, languageHandler, langOptions, defaultValue, currentLang, showLogo, showSignin, showSignout, signoutParams, showSearch, showMenu, }: DSFHeaderProps): React.JSX.Element;
|
|
301
290
|
displayName: string;
|
|
302
291
|
};
|
|
303
292
|
|
|
304
293
|
interface DSFFooterProps {
|
|
294
|
+
linkComponent: any;
|
|
305
295
|
privacyStatementUrl?: string;
|
|
306
296
|
cookiePolicyUrl?: string;
|
|
307
297
|
accessibilityStatementUrl?: string;
|
|
@@ -311,16 +301,10 @@ interface DSFFooterProps {
|
|
|
311
301
|
cyprusRepublicText?: string;
|
|
312
302
|
hasScroll?: boolean;
|
|
313
303
|
newTab?: boolean;
|
|
304
|
+
version?: string;
|
|
314
305
|
}
|
|
315
306
|
declare const DSFFooter: {
|
|
316
|
-
({ privacyStatementUrl, cookiePolicyUrl, accessibilityStatementUrl, privacyStatementText, cookiePolicyText, accessibilityStatementText, cyprusRepublicText, hasScroll, newTab, }: DSFFooterProps): React.JSX.Element;
|
|
317
|
-
defaultProps: {
|
|
318
|
-
privacyStatementUrl: undefined;
|
|
319
|
-
cookiePolicyUrl: undefined;
|
|
320
|
-
accessibilityStatementUrl: undefined;
|
|
321
|
-
hasScroll: boolean;
|
|
322
|
-
newTab: boolean;
|
|
323
|
-
};
|
|
307
|
+
({ linkComponent: Link, privacyStatementUrl, cookiePolicyUrl, accessibilityStatementUrl, privacyStatementText, cookiePolicyText, accessibilityStatementText, cyprusRepublicText, version, hasScroll, newTab, }: DSFFooterProps): React.JSX.Element;
|
|
324
308
|
displayName: string;
|
|
325
309
|
};
|
|
326
310
|
|
|
@@ -330,32 +314,19 @@ interface DSFMainProps {
|
|
|
330
314
|
}
|
|
331
315
|
declare const DSFMain: {
|
|
332
316
|
({ id, children }: DSFMainProps): React.JSX.Element;
|
|
333
|
-
defaultProps: {
|
|
334
|
-
id: string;
|
|
335
|
-
children: undefined;
|
|
336
|
-
};
|
|
337
317
|
displayName: string;
|
|
338
318
|
};
|
|
339
319
|
|
|
340
|
-
interface
|
|
341
|
-
children:
|
|
320
|
+
interface Props {
|
|
321
|
+
children: ReactNode;
|
|
342
322
|
}
|
|
343
|
-
declare const DSFBeforeMainContainer:
|
|
344
|
-
({ children }: DSFBeforeMainContainerProps): React.JSX.Element;
|
|
345
|
-
defaultProps: {
|
|
346
|
-
children: undefined;
|
|
347
|
-
};
|
|
348
|
-
displayName: string;
|
|
349
|
-
};
|
|
323
|
+
declare const DSFBeforeMainContainer: React.FC<Props>;
|
|
350
324
|
|
|
351
325
|
interface DSFBodyStartContainerProps {
|
|
352
326
|
children: React.ReactNode;
|
|
353
327
|
}
|
|
354
328
|
declare const DSFBodyStartContainer: {
|
|
355
329
|
({ children }: DSFBodyStartContainerProps): React.JSX.Element;
|
|
356
|
-
defaultProps: {
|
|
357
|
-
children: undefined;
|
|
358
|
-
};
|
|
359
330
|
displayName: string;
|
|
360
331
|
};
|
|
361
332
|
|
|
@@ -364,9 +335,6 @@ interface DSFBodyEndContainerProps {
|
|
|
364
335
|
}
|
|
365
336
|
declare const DSFBodyEndContainer: {
|
|
366
337
|
({ children }: DSFBodyEndContainerProps): React.JSX.Element;
|
|
367
|
-
defaultProps: {
|
|
368
|
-
children: undefined;
|
|
369
|
-
};
|
|
370
338
|
displayName: string;
|
|
371
339
|
};
|
|
372
340
|
|
|
@@ -376,10 +344,6 @@ interface DSFSkipLinkProps {
|
|
|
376
344
|
}
|
|
377
345
|
declare const DSFSkipLink: {
|
|
378
346
|
({ href, children }: DSFSkipLinkProps): React.JSX.Element;
|
|
379
|
-
defaultProps: {
|
|
380
|
-
children: string;
|
|
381
|
-
href: string;
|
|
382
|
-
};
|
|
383
347
|
displayName: string;
|
|
384
348
|
};
|
|
385
349
|
|
|
@@ -391,9 +355,6 @@ interface DSFLoadingBoxProps {
|
|
|
391
355
|
}
|
|
392
356
|
declare const DSFLoadingBox: {
|
|
393
357
|
({ loading, withinBox, loadingText, children }: DSFLoadingBoxProps): React.JSX.Element;
|
|
394
|
-
defaultProps: {
|
|
395
|
-
children: undefined;
|
|
396
|
-
};
|
|
397
358
|
displayName: string;
|
|
398
359
|
};
|
|
399
360
|
|
|
@@ -417,8 +378,10 @@ interface DSFRadioProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
|
417
378
|
hint?: React.ReactNode;
|
|
418
379
|
children: React.ReactNode;
|
|
419
380
|
collapsed?: {
|
|
381
|
+
hasError: boolean;
|
|
420
382
|
node?: React.ReactNode;
|
|
421
383
|
className: string;
|
|
384
|
+
visible?: boolean;
|
|
422
385
|
};
|
|
423
386
|
className?: string;
|
|
424
387
|
inline?: boolean;
|
|
@@ -434,11 +397,6 @@ interface DSFTableProps {
|
|
|
434
397
|
}
|
|
435
398
|
declare const DSFTable: {
|
|
436
399
|
({ columns, rowData, hideNumberingColumn, id, inputProps }: DSFTableProps): React.JSX.Element;
|
|
437
|
-
defaultProps: {
|
|
438
|
-
columns: never[];
|
|
439
|
-
rowData: never[];
|
|
440
|
-
hideNumberingColumn: boolean;
|
|
441
|
-
};
|
|
442
400
|
displayName: string;
|
|
443
401
|
};
|
|
444
402
|
interface DSFTableColumn {
|
|
@@ -446,19 +404,6 @@ interface DSFTableColumn {
|
|
|
446
404
|
align?: 'left' | 'right';
|
|
447
405
|
}
|
|
448
406
|
|
|
449
|
-
interface DSFUserSignOutProps {
|
|
450
|
-
label?: string;
|
|
451
|
-
fullName: string;
|
|
452
|
-
onClick?: () => void;
|
|
453
|
-
href: string;
|
|
454
|
-
}
|
|
455
|
-
declare const DSFUserSignOut: {
|
|
456
|
-
({ label, fullName, onClick, href }: DSFUserSignOutProps): React.JSX.Element;
|
|
457
|
-
defaultProps: {
|
|
458
|
-
href: string;
|
|
459
|
-
};
|
|
460
|
-
};
|
|
461
|
-
|
|
462
407
|
/**
|
|
463
408
|
* ### References:
|
|
464
409
|
*
|
|
@@ -469,7 +414,7 @@ interface DSFPageProps {
|
|
|
469
414
|
/**
|
|
470
415
|
* Page contents
|
|
471
416
|
*/
|
|
472
|
-
children
|
|
417
|
+
children: React.ReactNode;
|
|
473
418
|
/**
|
|
474
419
|
* ID for page content
|
|
475
420
|
*/
|
|
@@ -503,6 +448,7 @@ interface DSFPageProps {
|
|
|
503
448
|
* Override the default page cookies component.
|
|
504
449
|
*/
|
|
505
450
|
cookies?: React.ReactNode;
|
|
451
|
+
lang?: string;
|
|
506
452
|
}
|
|
507
453
|
/**
|
|
508
454
|
* Use the back link component to help users go back to the previous page in a multi-page transaction.
|
|
@@ -511,17 +457,7 @@ interface DSFPageProps {
|
|
|
511
457
|
* - https://design-system.service.gov.uk/components/back-link/
|
|
512
458
|
*/
|
|
513
459
|
declare const DSFPage: {
|
|
514
|
-
({ id, children, header, footer, bodyStartContainer: bodyStartContainerContent, bodyEndContainer: bodyEndContainerContent, beforeMainContainer: beforeChildren, sideBar: sideBar, cookies: cookies, }: DSFPageProps): React.JSX.Element;
|
|
515
|
-
defaultProps: {
|
|
516
|
-
children: undefined;
|
|
517
|
-
id: string;
|
|
518
|
-
header: React.JSX.Element;
|
|
519
|
-
footer: undefined;
|
|
520
|
-
cookies: undefined;
|
|
521
|
-
beforeMainContainer: undefined;
|
|
522
|
-
bodyStartContainer: undefined;
|
|
523
|
-
bodyEndContainer: undefined;
|
|
524
|
-
};
|
|
460
|
+
({ id, children, header, footer, bodyStartContainer: bodyStartContainerContent, bodyEndContainer: bodyEndContainerContent, beforeMainContainer: beforeChildren, sideBar: sideBar, cookies: cookies, lang, }: DSFPageProps): React.JSX.Element;
|
|
525
461
|
displayName: string;
|
|
526
462
|
};
|
|
527
463
|
|
|
@@ -540,7 +476,8 @@ interface DSFFileUploadProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
540
476
|
}
|
|
541
477
|
declare const DSFFileUpload: ForwardRefExoticComponent<DSFFileUploadProps & RefAttributes<HTMLInputElement>>;
|
|
542
478
|
|
|
543
|
-
interface DSFCookiesProps {
|
|
479
|
+
interface DSFCookiesProps$1 {
|
|
480
|
+
linkComponent: React.ComponentType<any>;
|
|
544
481
|
cookiesDescription: string;
|
|
545
482
|
cookiesMoreUrl: string;
|
|
546
483
|
cookiesMoreText: string;
|
|
@@ -549,17 +486,36 @@ interface DSFCookiesProps {
|
|
|
549
486
|
hasScroll?: boolean;
|
|
550
487
|
newTab?: boolean;
|
|
551
488
|
}
|
|
489
|
+
declare const DSFCookies$1: {
|
|
490
|
+
({ linkComponent: Link, cookiesDescription, cookiesMoreUrl, cookiesMoreText, cookiesAcceptText, cookiesAcceptHandler, hasScroll, newTab, }: DSFCookiesProps$1): React.JSX.Element;
|
|
491
|
+
displayName: string;
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
interface DSFCookiesProps {
|
|
495
|
+
cookiesDescription: React.ReactNode;
|
|
496
|
+
cookiesTitle: string;
|
|
497
|
+
cookiesAcceptText: string;
|
|
498
|
+
cookiesRejectText: string;
|
|
499
|
+
cookiesAcceptRejectHandler: (accepted: boolean) => void;
|
|
500
|
+
}
|
|
552
501
|
declare const DSFCookies: {
|
|
553
|
-
({ cookiesDescription,
|
|
554
|
-
defaultProps: {
|
|
555
|
-
cookiesDescription: undefined;
|
|
556
|
-
cookiesMoreUrl: undefined;
|
|
557
|
-
cookiesMoreText: undefined;
|
|
558
|
-
cookiesAcceptText: undefined;
|
|
559
|
-
hasScroll: boolean;
|
|
560
|
-
newTab: boolean;
|
|
561
|
-
};
|
|
502
|
+
({ cookiesDescription, cookiesTitle, cookiesAcceptText, cookiesRejectText, cookiesAcceptRejectHandler, }: DSFCookiesProps): React.JSX.Element;
|
|
562
503
|
displayName: string;
|
|
563
504
|
};
|
|
564
505
|
|
|
565
|
-
|
|
506
|
+
interface DSFSummaryListItem {
|
|
507
|
+
key: String;
|
|
508
|
+
value: React.ReactNode;
|
|
509
|
+
actions?: React.ReactNode;
|
|
510
|
+
}
|
|
511
|
+
interface DSFSummaryListProps {
|
|
512
|
+
data: DSFSummaryListItem[];
|
|
513
|
+
}
|
|
514
|
+
declare const DSFSummaryList: FC<DSFSummaryListProps>;
|
|
515
|
+
|
|
516
|
+
interface DSFWarningTextProps {
|
|
517
|
+
text: React.ReactNode;
|
|
518
|
+
}
|
|
519
|
+
declare const DSFWarningText: FC<DSFWarningTextProps>;
|
|
520
|
+
|
|
521
|
+
export { DSFBackLink, DSFBeforeMainContainer, DSFBodyEndContainer, DSFBodyStartContainer, DSFButton, DSFCheckbox, DSFCookies$1 as DSFCookies, DSFCookies as DSFCookiesV3, DSFDateInput, DSFDateInputProps, DSFErrorSummary, DSFErrorSummaryProps, DSFErrorText, DSFFieldSet, DSFFileUpload, DSFFooter, DSFFormGroup, DSFHeader, DSFHintText, DSFInput, DSFInputField, DSFInputProps, DSFLabel, DSFLoadingBox, DSFMain, DSFPage, DSFPanel, PanelEnum as DSFPanelEnum, DSFRadio, DSFSelect, DSFSkipLink, DSFSummaryList, DSFSummaryListItem, DSFSummaryListProps, DSFTable, DSFTableColumn, DSFTextArea, DSFTextAreaProps, DSFUserSignOut, DSFWarningText };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netu-si/netu-react-dsf-components",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "React Component Library Using the GOV-CY DSF Design System",
|
|
5
5
|
"repository": "https://github.com/netu-si/netu-react-dsf-components.git",
|
|
6
6
|
"homepage": "https://github.com/netu-si/netu-react-dsf-components#readme",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"docs": "yarn docs:components && node scripts/concat-readme.js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"
|
|
29
|
+
"@types/jquery": "^3.5.30",
|
|
30
|
+
"help": "^3.0.2",
|
|
31
|
+
"jquery": "^3.7.1"
|
|
30
32
|
},
|
|
31
33
|
"peerDependencies": {
|
|
32
|
-
"react": "^18.2.0"
|
|
33
|
-
"react-dom": "^18.2.0",
|
|
34
|
-
"react-router-dom": "^6.14.2"
|
|
34
|
+
"react": "^18.2.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@babel/preset-env": "^7.22.9",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"@netu-si/api-docs": "file:local-packages/api-docs",
|
|
41
41
|
"@rollup/plugin-commonjs": "^25.0.2",
|
|
42
42
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
43
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
43
44
|
"@rollup/plugin-typescript": "^11.1.2",
|
|
44
45
|
"@storybook/addon-essentials": "7.0.27",
|
|
45
46
|
"@storybook/addon-interactions": "7.0.27",
|
|
@@ -48,8 +49,8 @@
|
|
|
48
49
|
"@storybook/react": "7.0.27",
|
|
49
50
|
"@storybook/react-webpack5": "7.0.27",
|
|
50
51
|
"@storybook/testing-library": "0.2.0",
|
|
51
|
-
"@types/react": "
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
52
|
+
"@types/react": "18.2.20",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
53
54
|
"@typescript-eslint/parser": "^6.0.0",
|
|
54
55
|
"can-npm-publish": "^1.3.6",
|
|
55
56
|
"concat": "^1.0.3",
|
|
@@ -57,7 +58,6 @@
|
|
|
57
58
|
"eslint-config-airbnb": "^19.0.4",
|
|
58
59
|
"eslint-config-airbnb-typescript": "^17.1.0",
|
|
59
60
|
"eslint-config-prettier": "^8.8.0",
|
|
60
|
-
"eslint-config-react-app": "^7.0.1",
|
|
61
61
|
"eslint-plugin-cypress": "^2.13.3",
|
|
62
62
|
"eslint-plugin-flowtype": "^8.0.3",
|
|
63
63
|
"eslint-plugin-import": "^2.27.5",
|
|
@@ -69,20 +69,19 @@
|
|
|
69
69
|
"eslint-plugin-storybook": "^0.6.12",
|
|
70
70
|
"gh-pages": "^5.0.0",
|
|
71
71
|
"hex-rgb": "^5.0.0",
|
|
72
|
-
"
|
|
72
|
+
"next": "13.0.4",
|
|
73
|
+
"postcss-import": "^16.1.0",
|
|
73
74
|
"prop-types": "15.8.1",
|
|
74
|
-
"react": "^18.
|
|
75
|
-
"react-dom": "^18.
|
|
76
|
-
"react-hook-form": "^7.
|
|
77
|
-
"react-router-dom": "^6.14.2",
|
|
75
|
+
"react": "^18.3.1",
|
|
76
|
+
"react-dom": "^18.3.1",
|
|
77
|
+
"react-hook-form": "^7.52.1",
|
|
78
78
|
"react-transition-group": "^4.4.5",
|
|
79
79
|
"remark-gfm": "^3.0.1",
|
|
80
80
|
"rimraf": "^5.0.1",
|
|
81
|
-
"rollup": "^3.
|
|
81
|
+
"rollup": "^3.29.4",
|
|
82
82
|
"rollup-plugin-dts": "^5.3.0",
|
|
83
83
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
84
84
|
"rollup-plugin-postcss": "^4.0.2",
|
|
85
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
86
85
|
"storybook": "7.0.27",
|
|
87
86
|
"storybook-addon-react-router-v6": "^1.0.2",
|
|
88
87
|
"styled-components": "^6.0.4",
|