@synerise/ds-format-picker 1.0.16 → 1.0.18

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/README.md CHANGED
@@ -6,6 +6,7 @@ title: FormatPicker
6
6
  FormatPicker UI Component
7
7
 
8
8
  ## Installation
9
+
9
10
  ```
10
11
  npm i @synerise/ds-format-picker
11
12
  or
@@ -13,6 +14,7 @@ yarn add @synerise/ds-format-picker
13
14
  ```
14
15
 
15
16
  ## Usage
17
+
16
18
  ```
17
19
  import FormatPicker from '@synerise/ds-format-picker'
18
20
 
@@ -36,7 +38,7 @@ import FormatPicker from '@synerise/ds-format-picker'
36
38
  ## API
37
39
 
38
40
  | Property | Description | Type | Default |
39
- | --- | --- | --- | --- |
41
+ | ---------------------- | ------------------------------ | ---------------------------------- | ------- |
40
42
  | format | Format configuration | FormattingValue | - |
41
43
  | value | Example value | number | - |
42
44
  | onDataFormatChange | Data format change handler | (format) => void} | - |
@@ -48,11 +50,10 @@ import FormatPicker from '@synerise/ds-format-picker'
48
50
  | text | Set of custom labels | Texts | - |
49
51
  | buttonType | type of button | string | - |
50
52
 
51
-
52
53
  ### Texts
53
54
 
54
55
  | Property | Description | Type | Default |
55
- | --- | --- | --- | --- |
56
+ | -------------- | --------------------------------- | ------------------------ | -------------------- |
56
57
  | header | Header of format settings | string \ React.ReactNode | `Number format` |
57
58
  | format | Format label | string \ React.ReactNode | `Format` |
58
59
  | numeric | Numeric type of format tooltip | string \ React.ReactNode | `Numeric` |
@@ -62,21 +63,20 @@ import FormatPicker from '@synerise/ds-format-picker'
62
63
  | useSeparator | Use 1000 separator checkbox label | string \ React.ReactNode | `Use 1000 separator` |
63
64
  | compactNumbers | Compact number checkbox label | string \ React.ReactNode | `Compact humbers` |
64
65
 
65
-
66
66
  ### FormattingValue
67
67
 
68
68
  | Property | Description | Type | Default |
69
- | --- | --- | --- | --- |
69
+ | -------------- | ------------------------ | -------------------- | ------- |
70
70
  | dataFormat | Format of data | FormattingDataFormat | - |
71
71
  | currency | Selected currency | CurrencyType | - |
72
72
  | useSeparator | Use 1000 separator | boolean | - |
73
73
  | compactNumbers | Use compact numbers | boolean | - |
74
74
  | fixedLength | Number of decimal places | number | - |
75
75
 
76
-
77
76
  ### CurrencyType
77
+
78
78
  Available values: `USD` | `EUR` | `PLN` | `JPY`
79
79
 
80
80
  ### FormattingDataFormat
81
- Available values: `numeric` | `percent` | `cash`
82
81
 
82
+ Available values: `numeric` | `percent` | `cash`
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { FormatPickerProps } from './FomartPicker.types';
2
+ import { type FormatPickerProps } from './FomartPicker.types';
3
3
  declare const FormatPicker: ({ onUseSeparatorChange, onFixedLengthChange, onDataFormatChange, onCurrencyChange, onCompactNumbersChange, onSetDefault, onFormattedValueChange, value, format, text, currenciesConfig, buttonType, disabled, maxFixedLength, }: FormatPickerProps) => React.JSX.Element;
4
4
  export default FormatPicker;
@@ -2,9 +2,9 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
2
2
  import React, { useCallback, useEffect, useMemo } from 'react';
3
3
  import { useIntl } from 'react-intl';
4
4
  import Button from '@synerise/ds-button';
5
+ import { useDataFormat } from '@synerise/ds-data-format';
5
6
  import Dropdown from '@synerise/ds-dropdown';
6
7
  import Icon, { HashM } from '@synerise/ds-icon';
7
- import { useDataFormat } from '@synerise/ds-data-format';
8
8
  import FormatSettings from './FormatSettings/FormatSettings';
9
9
  var FormatPicker = function FormatPicker(_ref) {
10
10
  var onUseSeparatorChange = _ref.onUseSeparatorChange,
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { FormatSettingsProps } from './FormatSettings.types';
2
+ import { type FormatSettingsProps } from './FormatSettings.types';
3
3
  declare const FormatSettings: ({ onCompactNumbersChange, onCurrencyChange, onDataFormatChange, onFixedLengthChange, onUseSeparatorChange, onSetDefault, getFormattedValue, format, text, currenciesConfig, disabled, maxFixedLength, }: FormatSettingsProps) => React.JSX.Element;
4
4
  export default FormatSettings;
@@ -1,13 +1,13 @@
1
1
  import React, { useCallback, useMemo } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import Icon, { AngleDownS, Coin2M, CommaDecM, CommaIncM, HashM, PercentM } from '@synerise/ds-icon';
4
- import { Title } from '@synerise/ds-typography';
5
- import Tooltip from '@synerise/ds-tooltip';
6
- import Radio from '@synerise/ds-radio';
7
- import ButtonGroup from '@synerise/ds-button-group';
8
3
  import Button from '@synerise/ds-button';
4
+ import ButtonGroup from '@synerise/ds-button-group';
9
5
  import Checkbox from '@synerise/ds-checkbox';
10
6
  import Dropdown from '@synerise/ds-dropdown';
7
+ import Icon, { AngleDownS, Coin2M, CommaDecM, CommaIncM, HashM, PercentM } from '@synerise/ds-icon';
8
+ import Radio from '@synerise/ds-radio';
9
+ import Tooltip from '@synerise/ds-tooltip';
10
+ import { Title } from '@synerise/ds-typography';
11
11
  import * as S from './FormatSettings.styles';
12
12
  var DEFAULT_CURRENCIES_CONFIG = [{
13
13
  currency: 'USD',
@@ -1,8 +1,8 @@
1
1
  import styled from 'styled-components';
2
- import DSListItem from '@synerise/ds-list-item';
3
- import { SuffixWrapper } from '@synerise/ds-list-item/dist/components/Text/Text.styles';
4
2
  import Button from '@synerise/ds-button';
5
3
  import ButtonGroup from '@synerise/ds-button-group';
4
+ import DSListItem from '@synerise/ds-list-item';
5
+ import { SuffixWrapper } from '@synerise/ds-list-item/dist/components/Text/Text.styles';
6
6
  export var FormatSettingsContainer = styled.div.withConfig({
7
7
  displayName: "FormatSettingsstyles__FormatSettingsContainer",
8
8
  componentId: "sc-ipk0xd-0"
@@ -1,4 +1,4 @@
1
- import { NumberToFormatOptions } from '@synerise/ds-data-format';
1
+ import { type NumberToFormatOptions } from '@synerise/ds-data-format';
2
2
  import type { FormatPickerProps, FormatPickerTexts } from '../FomartPicker.types';
3
3
  export type FormatSettingsProps = Omit<FormatPickerProps, 'text' | 'value'> & {
4
4
  getFormattedValue: (options: NumberToFormatOptions) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-format-picker",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "FormatPicker UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,17 +34,17 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-button": "^1.4.1",
38
- "@synerise/ds-button-group": "^1.1.5",
39
- "@synerise/ds-checkbox": "^1.0.12",
40
- "@synerise/ds-data-format": "^1.0.0",
41
- "@synerise/ds-dropdown": "^1.0.14",
42
- "@synerise/ds-icon": "^1.5.3",
43
- "@synerise/ds-list-item": "^1.0.12",
44
- "@synerise/ds-radio": "^1.0.12",
45
- "@synerise/ds-tooltip": "^1.1.11",
46
- "@synerise/ds-typography": "^1.0.12",
47
- "@synerise/ds-utils": "^1.3.0"
37
+ "@synerise/ds-button": "^1.4.2",
38
+ "@synerise/ds-button-group": "^1.1.6",
39
+ "@synerise/ds-checkbox": "^1.1.0",
40
+ "@synerise/ds-data-format": "^1.0.1",
41
+ "@synerise/ds-dropdown": "^1.0.15",
42
+ "@synerise/ds-icon": "^1.5.4",
43
+ "@synerise/ds-list-item": "^1.0.13",
44
+ "@synerise/ds-radio": "^1.0.14",
45
+ "@synerise/ds-tooltip": "^1.1.12",
46
+ "@synerise/ds-typography": "^1.0.13",
47
+ "@synerise/ds-utils": "^1.3.1"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@synerise/ds-core": "*",
@@ -52,5 +52,5 @@
52
52
  "react-intl": ">=3.12.0 <= 6.8",
53
53
  "styled-components": "^5.3.3"
54
54
  },
55
- "gitHead": "11fe1d29b2ac23e70c3d5e6ce8ae20201a619a34"
55
+ "gitHead": "2161bdb04f3db0f79b7d0465ce6b41121f1543ef"
56
56
  }