@performant-software/semantic-components 1.0.21 → 1.0.22-beta.1
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/build/index.js.map +1 -1
- package/build/main.css +3 -0
- package/package.json +2 -2
- package/src/components/DateInput.css +4 -1
- package/src/components/DateInput.js +24 -1
- package/src/components/ListLoader.js +6 -0
- package/src/components/PlayButton.js +13 -1
- package/types/components/DateInput.js.flow +24 -1
- package/types/components/ListLoader.js.flow +6 -0
- package/types/components/PlayButton.js.flow +13 -1
package/build/main.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@performant-software/semantic-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22-beta.1",
|
|
4
4
|
"description": "A package of shared components based on the Semantic UI Framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./build/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build": "webpack --mode production && flow-copy-source -v src types"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@performant-software/shared-components": "^1.0.
|
|
15
|
+
"@performant-software/shared-components": "^1.0.22-beta.1",
|
|
16
16
|
"@react-google-maps/api": "^2.8.1",
|
|
17
17
|
"axios": "^0.26.1",
|
|
18
18
|
"i18next": "^19.4.4",
|
|
@@ -5,14 +5,37 @@ import { Icon, Input } from 'semantic-ui-react';
|
|
|
5
5
|
import './DateInput.css';
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
8
|
+
/**
|
|
9
|
+
* Display date, which will override the default date formatting.
|
|
10
|
+
*/
|
|
8
11
|
display?: string,
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* An object containing date-time formatting options used by JavaScript Date objects.
|
|
14
|
+
*/
|
|
15
|
+
formatOptions?: DateTimeFormatOptions,
|
|
16
|
+
/**
|
|
17
|
+
* Locale identifier (Unicode CLDR) for formatting dates and times.
|
|
18
|
+
*/
|
|
10
19
|
locale?: string,
|
|
20
|
+
/**
|
|
21
|
+
* Callback fired when the date in the input field is changed.
|
|
22
|
+
*/
|
|
11
23
|
onChange: (date: ?Date) => void,
|
|
24
|
+
/**
|
|
25
|
+
* Callback fired when the date input field is clicked, typically opening the actual method of
|
|
26
|
+
* input (such as the <code>DatePicker</code> component).
|
|
27
|
+
*/
|
|
12
28
|
onClick: () => void,
|
|
29
|
+
/**
|
|
30
|
+
* Current value of the date input form field, as a JavaScript Date object, or null.
|
|
31
|
+
*/
|
|
13
32
|
value?: ?Date
|
|
14
33
|
}
|
|
15
34
|
|
|
35
|
+
/**
|
|
36
|
+
* This input component is used to display and clear a date. It must be used with an additional
|
|
37
|
+
* component, such as `DatePicker`, to actually input the date.
|
|
38
|
+
*/
|
|
16
39
|
const DateInput = (props: Props) => {
|
|
17
40
|
const formatDate = () => {
|
|
18
41
|
let date = '';
|
|
@@ -6,9 +6,15 @@ import i18n from '../i18n/i18n';
|
|
|
6
6
|
import './ListLoader.css';
|
|
7
7
|
|
|
8
8
|
type Props = {
|
|
9
|
+
/**
|
|
10
|
+
* If present, the list loader spinner will display.
|
|
11
|
+
*/
|
|
9
12
|
active: boolean
|
|
10
13
|
};
|
|
11
14
|
|
|
15
|
+
/**
|
|
16
|
+
* A loader displays a spinner when active.
|
|
17
|
+
*/
|
|
12
18
|
const ListLoader = (props: Props) => (
|
|
13
19
|
<Dimmer.Dimmable
|
|
14
20
|
as={Segment}
|
|
@@ -5,11 +5,23 @@ import { Button } from 'semantic-ui-react';
|
|
|
5
5
|
import './PlayButton.css';
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
8
|
+
/**
|
|
9
|
+
* What to do when the button is clicked.
|
|
10
|
+
*/
|
|
8
11
|
onClick?: () => void,
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Size of the button.
|
|
14
|
+
*/
|
|
15
|
+
size?: 'mini' | 'tiny' | 'small' | 'medium' | 'large' | 'big' | 'huge' | 'massive',
|
|
16
|
+
/**
|
|
17
|
+
* Custom styling object.
|
|
18
|
+
*/
|
|
10
19
|
style?: any
|
|
11
20
|
};
|
|
12
21
|
|
|
22
|
+
/**
|
|
23
|
+
* This component can be used as a toggle for playing media.
|
|
24
|
+
*/
|
|
13
25
|
const PlayButton = (props: Props) => (
|
|
14
26
|
<Button
|
|
15
27
|
className='play-button'
|
|
@@ -5,14 +5,37 @@ import { Icon, Input } from 'semantic-ui-react';
|
|
|
5
5
|
import './DateInput.css';
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
8
|
+
/**
|
|
9
|
+
* Display date, which will override the default date formatting.
|
|
10
|
+
*/
|
|
8
11
|
display?: string,
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* An object containing date-time formatting options used by JavaScript Date objects.
|
|
14
|
+
*/
|
|
15
|
+
formatOptions?: DateTimeFormatOptions,
|
|
16
|
+
/**
|
|
17
|
+
* Locale identifier (Unicode CLDR) for formatting dates and times.
|
|
18
|
+
*/
|
|
10
19
|
locale?: string,
|
|
20
|
+
/**
|
|
21
|
+
* Callback fired when the date in the input field is changed.
|
|
22
|
+
*/
|
|
11
23
|
onChange: (date: ?Date) => void,
|
|
24
|
+
/**
|
|
25
|
+
* Callback fired when the date input field is clicked, typically opening the actual method of
|
|
26
|
+
* input (such as the <code>DatePicker</code> component).
|
|
27
|
+
*/
|
|
12
28
|
onClick: () => void,
|
|
29
|
+
/**
|
|
30
|
+
* Current value of the date input form field, as a JavaScript Date object, or null.
|
|
31
|
+
*/
|
|
13
32
|
value?: ?Date
|
|
14
33
|
}
|
|
15
34
|
|
|
35
|
+
/**
|
|
36
|
+
* This input component is used to display and clear a date. It must be used with an additional
|
|
37
|
+
* component, such as `DatePicker`, to actually input the date.
|
|
38
|
+
*/
|
|
16
39
|
const DateInput = (props: Props) => {
|
|
17
40
|
const formatDate = () => {
|
|
18
41
|
let date = '';
|
|
@@ -6,9 +6,15 @@ import i18n from '../i18n/i18n';
|
|
|
6
6
|
import './ListLoader.css';
|
|
7
7
|
|
|
8
8
|
type Props = {
|
|
9
|
+
/**
|
|
10
|
+
* If present, the list loader spinner will display.
|
|
11
|
+
*/
|
|
9
12
|
active: boolean
|
|
10
13
|
};
|
|
11
14
|
|
|
15
|
+
/**
|
|
16
|
+
* A loader displays a spinner when active.
|
|
17
|
+
*/
|
|
12
18
|
const ListLoader = (props: Props) => (
|
|
13
19
|
<Dimmer.Dimmable
|
|
14
20
|
as={Segment}
|
|
@@ -5,11 +5,23 @@ import { Button } from 'semantic-ui-react';
|
|
|
5
5
|
import './PlayButton.css';
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
8
|
+
/**
|
|
9
|
+
* What to do when the button is clicked.
|
|
10
|
+
*/
|
|
8
11
|
onClick?: () => void,
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Size of the button.
|
|
14
|
+
*/
|
|
15
|
+
size?: 'mini' | 'tiny' | 'small' | 'medium' | 'large' | 'big' | 'huge' | 'massive',
|
|
16
|
+
/**
|
|
17
|
+
* Custom styling object.
|
|
18
|
+
*/
|
|
10
19
|
style?: any
|
|
11
20
|
};
|
|
12
21
|
|
|
22
|
+
/**
|
|
23
|
+
* This component can be used as a toggle for playing media.
|
|
24
|
+
*/
|
|
13
25
|
const PlayButton = (props: Props) => (
|
|
14
26
|
<Button
|
|
15
27
|
className='play-button'
|