@netu-si/netu-react-dsf-components 0.0.9 → 0.0.12
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 +8 -2
- package/dist/cjs/components/DSFButton/DSFButton.d.ts +6 -2
- package/dist/cjs/components/DSFCookies/DSFCookies.d.ts +25 -0
- package/dist/cjs/components/DSFCookies/index.d.ts +1 -0
- package/dist/cjs/components/DSFDateInput/DSFDateInput.d.ts +28 -3
- package/dist/cjs/components/DSFErrorSummary/DSFErrorSummary.d.ts +10 -2
- package/dist/cjs/components/DSFFooter/DSFFooter.d.ts +4 -2
- package/dist/cjs/components/DSFHeader/DSFHeader.d.ts +3 -1
- package/dist/cjs/components/DSFInputField/DSFInputField.d.ts +12 -2
- package/dist/cjs/components/DSFLoadingBox/DSFLoadingBox.d.ts +8 -2
- package/dist/cjs/components/DSFPage/DSFPage.d.ts +23 -2
- package/dist/cjs/components/DSFPanel/DSFPanel.d.ts +16 -2
- package/dist/cjs/components/DSFSelect/DSFSelect.d.ts +10 -2
- package/dist/cjs/components/DSFTable/DSFTable.d.ts +12 -4
- package/dist/cjs/components/DSFTable/index.d.ts +1 -1
- package/dist/cjs/components/DSFUserSignOut/DSFUserSignOut.d.ts +7 -2
- package/dist/cjs/components/index.d.ts +2 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/DSFBackLink/DSFBackLink.d.ts +8 -2
- package/dist/esm/components/DSFButton/DSFButton.d.ts +6 -2
- package/dist/esm/components/DSFCookies/DSFCookies.d.ts +25 -0
- package/dist/esm/components/DSFCookies/index.d.ts +1 -0
- package/dist/esm/components/DSFDateInput/DSFDateInput.d.ts +28 -3
- package/dist/esm/components/DSFErrorSummary/DSFErrorSummary.d.ts +10 -2
- package/dist/esm/components/DSFFooter/DSFFooter.d.ts +4 -2
- package/dist/esm/components/DSFHeader/DSFHeader.d.ts +3 -1
- package/dist/esm/components/DSFInputField/DSFInputField.d.ts +12 -2
- package/dist/esm/components/DSFLoadingBox/DSFLoadingBox.d.ts +8 -2
- package/dist/esm/components/DSFPage/DSFPage.d.ts +23 -2
- package/dist/esm/components/DSFPanel/DSFPanel.d.ts +16 -2
- package/dist/esm/components/DSFSelect/DSFSelect.d.ts +10 -2
- package/dist/esm/components/DSFTable/DSFTable.d.ts +12 -4
- package/dist/esm/components/DSFTable/index.d.ts +1 -1
- package/dist/esm/components/DSFUserSignOut/DSFUserSignOut.d.ts +7 -2
- package/dist/esm/components/index.d.ts +2 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +156 -31
- package/package.json +1 -1
- package/dist/cjs/assets/index-b6796621.css +0 -16
- package/dist/cjs/components/DSFButton/DSFInputField.d.ts +0 -15
- package/dist/cjs/components/DSFDateInput/Input.d.ts +0 -49
- package/dist/cjs/components/DSFDateInput2/DSFDateInput2.d.ts +0 -56
- package/dist/cjs/components/DSFDateInput2/index.d.ts +0 -1
- package/dist/cjs/components/DSFTextInput/DSFTextInput.d.ts +0 -13
- package/dist/cjs/components/DSFTextInput/index.d.ts +0 -1
- package/dist/cjs/stories/Button.d.ts +0 -29
- package/dist/cjs/stories/Header.d.ts +0 -13
- package/dist/cjs/stories/Page.d.ts +0 -3
- package/dist/cjs/stories/Page.stories.d.ts +0 -13
- package/dist/esm/assets/index-b6796621.css +0 -16
- package/dist/esm/components/DSFButton/DSFInputField.d.ts +0 -15
- package/dist/esm/components/DSFDateInput/Input.d.ts +0 -49
- package/dist/esm/components/DSFDateInput2/DSFDateInput2.d.ts +0 -56
- package/dist/esm/components/DSFDateInput2/index.d.ts +0 -1
- package/dist/esm/components/DSFTextInput/DSFTextInput.d.ts +0 -13
- package/dist/esm/components/DSFTextInput/index.d.ts +0 -1
- package/dist/esm/stories/Button.d.ts +0 -29
- package/dist/esm/stories/Header.d.ts +0 -13
- package/dist/esm/stories/Page.d.ts +0 -3
- package/dist/esm/stories/Page.stories.d.ts +0 -13
- package/dist/types.d.ts +0 -16
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import "../../resources/css/dsf.main.min.css";
|
|
3
|
-
import { DSFInputProps } from "../DSFInput/DSFInput";
|
|
4
|
-
export interface DSFInputFieldProps {
|
|
5
|
-
label: string;
|
|
6
|
-
hint?: string;
|
|
7
|
-
id: string;
|
|
8
|
-
inputProps?: DSFInputProps;
|
|
9
|
-
meta: {
|
|
10
|
-
error?: string | string[];
|
|
11
|
-
touched?: boolean;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
declare const DSFInputField: FC<DSFInputFieldProps>;
|
|
15
|
-
export default DSFInputField;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import DSFInput, { DSFInputProps as BaseInputProps } from '../DSFInput/DSFInput';
|
|
3
|
-
type InputsType = {
|
|
4
|
-
[key: string]: BaseInputProps | undefined;
|
|
5
|
-
day?: BaseInputProps;
|
|
6
|
-
month?: BaseInputProps;
|
|
7
|
-
year?: BaseInputProps;
|
|
8
|
-
};
|
|
9
|
-
export interface DateInputProps {
|
|
10
|
-
id: string;
|
|
11
|
-
names?: {
|
|
12
|
-
day?: string;
|
|
13
|
-
month?: string;
|
|
14
|
-
year?: string;
|
|
15
|
-
};
|
|
16
|
-
defaultValues?: {
|
|
17
|
-
day?: string;
|
|
18
|
-
month?: string;
|
|
19
|
-
year?: string;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Custom props to pass down to the input fields
|
|
23
|
-
*/
|
|
24
|
-
inputs?: InputsType;
|
|
25
|
-
value?: {
|
|
26
|
-
day?: string;
|
|
27
|
-
month?: string;
|
|
28
|
-
year?: string;
|
|
29
|
-
};
|
|
30
|
-
labels?: {
|
|
31
|
-
day?: string;
|
|
32
|
-
month?: string;
|
|
33
|
-
year?: string;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* This comes from the multiInputInput HOC and is needed to track all 3 inputs
|
|
37
|
-
*/
|
|
38
|
-
refs?: (refs: {
|
|
39
|
-
day?: React.Ref<typeof DSFInput>;
|
|
40
|
-
month?: React.Ref<typeof DSFInput>;
|
|
41
|
-
year?: React.Ref<typeof DSFInput>;
|
|
42
|
-
}) => void;
|
|
43
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>, key: string) => void;
|
|
44
|
-
onBlur?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
45
|
-
onFocus?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
46
|
-
error?: boolean;
|
|
47
|
-
}
|
|
48
|
-
declare const _default: any;
|
|
49
|
-
export default _default;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import '../../resources/css/dsf.main.min.css';
|
|
2
|
-
import React, { RefObject } from 'react';
|
|
3
|
-
import { DSFInputProps } from '../DSFInput/DSFInput';
|
|
4
|
-
interface InputRefObject {
|
|
5
|
-
day: RefObject<HTMLInputElement>;
|
|
6
|
-
month: RefObject<HTMLInputElement>;
|
|
7
|
-
year: RefObject<HTMLInputElement>;
|
|
8
|
-
}
|
|
9
|
-
export interface DSFDateInput2Props {
|
|
10
|
-
id: string;
|
|
11
|
-
label: string;
|
|
12
|
-
hint?: string;
|
|
13
|
-
errorText?: string;
|
|
14
|
-
refs?: InputRefObject;
|
|
15
|
-
labels?: {
|
|
16
|
-
day: string;
|
|
17
|
-
month: string;
|
|
18
|
-
year: string;
|
|
19
|
-
};
|
|
20
|
-
inputs?: {
|
|
21
|
-
day?: DSFInputProps;
|
|
22
|
-
month?: DSFInputProps;
|
|
23
|
-
year?: DSFInputProps;
|
|
24
|
-
};
|
|
25
|
-
defaultValues?: {
|
|
26
|
-
day?: string;
|
|
27
|
-
month?: string;
|
|
28
|
-
year?: string;
|
|
29
|
-
};
|
|
30
|
-
inputProps?: {
|
|
31
|
-
/**
|
|
32
|
-
* Called when the day, month or year changes
|
|
33
|
-
*/
|
|
34
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>, key: string) => void;
|
|
35
|
-
/**
|
|
36
|
-
* Called when the day, month or year fields are blurred
|
|
37
|
-
* (does not get called when moving between inputs in the same datefield)
|
|
38
|
-
*/
|
|
39
|
-
onBlur?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Called when the day, month or year fields are focussed
|
|
42
|
-
* (does not get called when moving between inputs in the same datefield)
|
|
43
|
-
*/
|
|
44
|
-
onFocus?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
45
|
-
/**
|
|
46
|
-
* When the form field is controlled, this sets the value of the day, month and year inputs
|
|
47
|
-
*/
|
|
48
|
-
value?: {
|
|
49
|
-
day?: string;
|
|
50
|
-
month?: string;
|
|
51
|
-
year?: string;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
declare const DSFDateInput2: React.FC<DSFDateInput2Props>;
|
|
56
|
-
export default DSFDateInput2;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './DSFDateInput2';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import "../../resources/css/dsf.main.min.css";
|
|
3
|
-
export interface DSFTextInputProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
hint?: string;
|
|
6
|
-
id?: string;
|
|
7
|
-
error?: string;
|
|
8
|
-
visualSize?: number;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
required?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const DSFTextInput: FC<DSFTextInputProps>;
|
|
13
|
-
export default DSFTextInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./DSFTextInput";
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './button.css';
|
|
3
|
-
interface ButtonProps {
|
|
4
|
-
/**
|
|
5
|
-
* Is this the principal call to action on the page?
|
|
6
|
-
*/
|
|
7
|
-
primary?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* What background color to use
|
|
10
|
-
*/
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
-
/**
|
|
13
|
-
* How large should the button be?
|
|
14
|
-
*/
|
|
15
|
-
size?: 'small' | 'medium' | 'large';
|
|
16
|
-
/**
|
|
17
|
-
* Button contents
|
|
18
|
-
*/
|
|
19
|
-
label: string;
|
|
20
|
-
/**
|
|
21
|
-
* Optional click handler
|
|
22
|
-
*/
|
|
23
|
-
onClick?: () => void;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Primary UI component for user interaction
|
|
27
|
-
*/
|
|
28
|
-
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => React.JSX.Element;
|
|
29
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './header.css';
|
|
3
|
-
type User = {
|
|
4
|
-
name: string;
|
|
5
|
-
};
|
|
6
|
-
interface HeaderProps {
|
|
7
|
-
user?: User;
|
|
8
|
-
onLogin: () => void;
|
|
9
|
-
onLogout: () => void;
|
|
10
|
-
onCreateAccount: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => React.JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { StoryObj } from '@storybook/react';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: import("react").FC<{}>;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const LoggedOut: Story;
|
|
13
|
-
export declare const LoggedIn: Story;
|