@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/main.css CHANGED
@@ -100,6 +100,9 @@
100
100
  left: auto;
101
101
  right: 1px;
102
102
  }
103
+ .date-input.ui.icon.input > input {
104
+ padding-right: calc(22px + 1.1em) !important;
105
+ }
103
106
 
104
107
  .fuzzy-date-modal .accuracy-container .ui.radio.checkbox {
105
108
  padding-right: 10px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@performant-software/semantic-components",
3
- "version": "1.0.21",
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.21",
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",
@@ -3,4 +3,7 @@
3
3
  pointer-events: inherit;
4
4
  left: auto;
5
5
  right: 1px;
6
- }
6
+ }
7
+ .date-input.ui.icon.input > input {
8
+ padding-right: calc(22px + 1.1em) !important;
9
+ }
@@ -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
- formatOptions?: any,
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
- size?: string,
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
- formatOptions?: any,
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
- size?: string,
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'