@dfds-ui/forms 2.2.0-alpha.9bb1ab0f → 2.2.0-alpha.9edc847c
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/package.json +7 -7
- package/assistive-text/AssistiveText.d.ts +0 -9
- package/assistive-text/AssistiveText.js +0 -18
- package/asterisk/Asterisk.d.ts +0 -11
- package/asterisk/Asterisk.js +0 -13
- package/checkbox/Checkbox.d.ts +0 -65
- package/checkbox/Checkbox.js +0 -107
- package/checkbox/CheckboxContext.d.ts +0 -14
- package/checkbox/CheckboxContext.js +0 -19
- package/checkbox/CheckboxGroup.d.ts +0 -20
- package/checkbox/CheckboxGroup.js +0 -76
- package/checkbox/index.d.ts +0 -2
- package/checkbox/index.js +0 -2
- package/cjs/assistive-text/AssistiveText.d.ts +0 -9
- package/cjs/assistive-text/AssistiveText.js +0 -26
- package/cjs/asterisk/Asterisk.d.ts +0 -11
- package/cjs/asterisk/Asterisk.js +0 -21
- package/cjs/checkbox/Checkbox.d.ts +0 -65
- package/cjs/checkbox/Checkbox.js +0 -102
- package/cjs/checkbox/CheckboxContext.d.ts +0 -14
- package/cjs/checkbox/CheckboxContext.js +0 -29
- package/cjs/checkbox/CheckboxGroup.d.ts +0 -20
- package/cjs/checkbox/CheckboxGroup.js +0 -78
- package/cjs/checkbox/index.d.ts +0 -2
- package/cjs/checkbox/index.js +0 -27
- package/cjs/counter/Counter.d.ts +0 -66
- package/cjs/counter/Counter.js +0 -157
- package/cjs/counter/index.d.ts +0 -1
- package/cjs/counter/index.js +0 -12
- package/cjs/enhanced/EnhancedField.d.ts +0 -20
- package/cjs/enhanced/EnhancedField.js +0 -85
- package/cjs/enhanced/index.d.ts +0 -1
- package/cjs/enhanced/index.js +0 -16
- package/cjs/error-text/ErrorText.d.ts +0 -8
- package/cjs/error-text/ErrorText.js +0 -26
- package/cjs/field-wrap/FieldWrap.d.ts +0 -10
- package/cjs/field-wrap/FieldWrap.js +0 -79
- package/cjs/field-wrap/index.d.ts +0 -1
- package/cjs/field-wrap/index.js +0 -16
- package/cjs/help-icon/HelpIcon.d.ts +0 -8
- package/cjs/help-icon/HelpIcon.js +0 -27
- package/cjs/index.d.ts +0 -19
- package/cjs/index.js +0 -214
- package/cjs/label/Label.d.ts +0 -11
- package/cjs/label/Label.js +0 -28
- package/cjs/password-field/PasswordField.d.ts +0 -4
- package/cjs/password-field/PasswordField.js +0 -30
- package/cjs/radio/Radio.d.ts +0 -51
- package/cjs/radio/Radio.js +0 -93
- package/cjs/radio/RadioContext.d.ts +0 -14
- package/cjs/radio/RadioContext.js +0 -29
- package/cjs/radio/RadioGroup.d.ts +0 -12
- package/cjs/radio/RadioGroup.js +0 -78
- package/cjs/radio/index.d.ts +0 -2
- package/cjs/radio/index.js +0 -27
- package/cjs/rating/Rating.d.ts +0 -55
- package/cjs/rating/Rating.js +0 -193
- package/cjs/rating/index.d.ts +0 -1
- package/cjs/rating/index.js +0 -16
- package/cjs/select-field/AsyncSelectField.d.ts +0 -15
- package/cjs/select-field/AsyncSelectField.js +0 -107
- package/cjs/select-field/CreatableSelectField.d.ts +0 -48
- package/cjs/select-field/CreatableSelectField.js +0 -185
- package/cjs/select-field/NativeSelectField.d.ts +0 -8
- package/cjs/select-field/NativeSelectField.js +0 -71
- package/cjs/select-field/SelectField.d.ts +0 -58
- package/cjs/select-field/SelectField.js +0 -203
- package/cjs/switch/Switch.d.ts +0 -32
- package/cjs/switch/Switch.js +0 -137
- package/cjs/switch/SwitchContext.d.ts +0 -12
- package/cjs/switch/SwitchContext.js +0 -29
- package/cjs/switch/SwitchGroup.d.ts +0 -10
- package/cjs/switch/SwitchGroup.js +0 -49
- package/cjs/switch/index.d.ts +0 -2
- package/cjs/switch/index.js +0 -27
- package/cjs/tel-field/TelField.d.ts +0 -67
- package/cjs/tel-field/TelField.js +0 -235
- package/cjs/text-field/TextField.d.ts +0 -57
- package/cjs/text-field/TextField.js +0 -135
- package/cjs/textarea-field/TextareaField.d.ts +0 -44
- package/cjs/textarea-field/TextareaField.js +0 -81
- package/cjs/types/field.d.ts +0 -52
- package/cjs/types/field.js +0 -5
- package/cjs/types/index.d.ts +0 -2
- package/cjs/types/index.js +0 -27
- package/cjs/types/size.d.ts +0 -1
- package/cjs/types/size.js +0 -5
- package/counter/Counter.d.ts +0 -66
- package/counter/Counter.js +0 -168
- package/counter/index.d.ts +0 -1
- package/counter/index.js +0 -1
- package/enhanced/EnhancedField.d.ts +0 -20
- package/enhanced/EnhancedField.js +0 -79
- package/enhanced/index.d.ts +0 -1
- package/enhanced/index.js +0 -1
- package/error-text/ErrorText.d.ts +0 -8
- package/error-text/ErrorText.js +0 -17
- package/field-wrap/FieldWrap.d.ts +0 -10
- package/field-wrap/FieldWrap.js +0 -71
- package/field-wrap/index.d.ts +0 -1
- package/field-wrap/index.js +0 -1
- package/help-icon/HelpIcon.d.ts +0 -8
- package/help-icon/HelpIcon.js +0 -18
- package/index.d.ts +0 -19
- package/index.js +0 -19
- package/label/Label.d.ts +0 -11
- package/label/Label.js +0 -27
- package/password-field/PasswordField.d.ts +0 -4
- package/password-field/PasswordField.js +0 -33
- package/radio/Radio.d.ts +0 -51
- package/radio/Radio.js +0 -100
- package/radio/RadioContext.d.ts +0 -14
- package/radio/RadioContext.js +0 -19
- package/radio/RadioGroup.d.ts +0 -12
- package/radio/RadioGroup.js +0 -72
- package/radio/index.d.ts +0 -2
- package/radio/index.js +0 -2
- package/rating/Rating.d.ts +0 -55
- package/rating/Rating.js +0 -212
- package/rating/index.d.ts +0 -1
- package/rating/index.js +0 -1
- package/select-field/AsyncSelectField.d.ts +0 -15
- package/select-field/AsyncSelectField.js +0 -124
- package/select-field/CreatableSelectField.d.ts +0 -48
- package/select-field/CreatableSelectField.js +0 -211
- package/select-field/NativeSelectField.d.ts +0 -8
- package/select-field/NativeSelectField.js +0 -67
- package/select-field/SelectField.d.ts +0 -58
- package/select-field/SelectField.js +0 -227
- package/switch/Switch.d.ts +0 -32
- package/switch/Switch.js +0 -145
- package/switch/SwitchContext.d.ts +0 -12
- package/switch/SwitchContext.js +0 -19
- package/switch/SwitchGroup.d.ts +0 -10
- package/switch/SwitchGroup.js +0 -43
- package/switch/index.d.ts +0 -2
- package/switch/index.js +0 -2
- package/tel-field/TelField.d.ts +0 -67
- package/tel-field/TelField.js +0 -252
- package/text-field/TextField.d.ts +0 -57
- package/text-field/TextField.js +0 -135
- package/textarea-field/TextareaField.d.ts +0 -44
- package/textarea-field/TextareaField.js +0 -92
- package/types/field.d.ts +0 -52
- package/types/field.js +0 -1
- package/types/index.d.ts +0 -2
- package/types/index.js +0 -2
- package/types/size.d.ts +0 -1
- package/types/size.js +0 -1
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SwitchGroup = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _react2 = require("@emotion/react");
|
|
9
|
-
var _Label = require("../label/Label");
|
|
10
|
-
var _SwitchContext = require("./SwitchContext");
|
|
11
|
-
var _flexbox = require("@dfds-ui/react-components/flexbox");
|
|
12
|
-
var _ErrorText = _interopRequireDefault(require("../error-text/ErrorText"));
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
15
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
16
|
-
name: "1qz4298",
|
|
17
|
-
styles: "display:flex;flex-direction:column;border:none;padding:0;margin:0"
|
|
18
|
-
} : {
|
|
19
|
-
name: "7bcvef-SwitchGroupContainer",
|
|
20
|
-
styles: "display:flex;flex-direction:column;border:none;padding:0;margin:0;label:SwitchGroupContainer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-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
22
|
-
};
|
|
23
|
-
const SwitchGroupContainer = ({
|
|
24
|
-
children
|
|
25
|
-
}) => (0, _react2.jsx)("fieldset", {
|
|
26
|
-
css: _ref
|
|
27
|
-
}, children);
|
|
28
|
-
const SwitchGroup = ({
|
|
29
|
-
size = 'medium',
|
|
30
|
-
label,
|
|
31
|
-
errorMessage,
|
|
32
|
-
required,
|
|
33
|
-
hideAsterisk,
|
|
34
|
-
children
|
|
35
|
-
}) => {
|
|
36
|
-
return (0, _react2.jsx)(SwitchGroupContainer, null, (0, _react2.jsx)(_SwitchContext.SwitchContextProvider, {
|
|
37
|
-
value: {
|
|
38
|
-
size,
|
|
39
|
-
error: !!errorMessage
|
|
40
|
-
}
|
|
41
|
-
}, (0, _react2.jsx)(_Label.Label, {
|
|
42
|
-
required: required,
|
|
43
|
-
hideAsterisk: hideAsterisk,
|
|
44
|
-
visualSize: size
|
|
45
|
-
}, label), (0, _react2.jsx)(_flexbox.FlexBox, {
|
|
46
|
-
directionColumn: true
|
|
47
|
-
}, children)), errorMessage && (0, _react2.jsx)(_ErrorText.default, null, errorMessage));
|
|
48
|
-
};
|
|
49
|
-
exports.SwitchGroup = SwitchGroup;
|
package/cjs/switch/index.d.ts
DELETED
package/cjs/switch/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _Switch = require("./Switch");
|
|
7
|
-
Object.keys(_Switch).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Switch[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _Switch[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _SwitchGroup = require("./SwitchGroup");
|
|
18
|
-
Object.keys(_SwitchGroup).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _SwitchGroup[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _SwitchGroup[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Locale } from '@dfds-ui/react-components';
|
|
3
|
-
import { BaseFieldProps } from '../types';
|
|
4
|
-
export type TelFieldProps = BaseFieldProps & {
|
|
5
|
-
/**
|
|
6
|
-
* Class name to be added to the TelField.
|
|
7
|
-
*/
|
|
8
|
-
className?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Default value for the phone number
|
|
11
|
-
*/
|
|
12
|
-
defaultValue?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Default locale. Will set the matching country in the dropdown
|
|
15
|
-
*/
|
|
16
|
-
defaultLocale?: Locale;
|
|
17
|
-
/**
|
|
18
|
-
* Show trunk values (the local area code shown in parenthesis)
|
|
19
|
-
*/
|
|
20
|
-
showTrunkValues?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Makes value splitted so easier to convert to object
|
|
23
|
-
*/
|
|
24
|
-
splitValues?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Callback when value changes
|
|
27
|
-
*/
|
|
28
|
-
onChange?: (newValue: string) => void;
|
|
29
|
-
/**
|
|
30
|
-
* Callback when blur
|
|
31
|
-
*/
|
|
32
|
-
onBlur?: () => void;
|
|
33
|
-
};
|
|
34
|
-
export type TelFieldElement = {
|
|
35
|
-
focus?: () => void;
|
|
36
|
-
};
|
|
37
|
-
export declare const TelField: React.ForwardRefExoticComponent<BaseFieldProps & {
|
|
38
|
-
/**
|
|
39
|
-
* Class name to be added to the TelField.
|
|
40
|
-
*/
|
|
41
|
-
className?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Default value for the phone number
|
|
44
|
-
*/
|
|
45
|
-
defaultValue?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Default locale. Will set the matching country in the dropdown
|
|
48
|
-
*/
|
|
49
|
-
defaultLocale?: Locale;
|
|
50
|
-
/**
|
|
51
|
-
* Show trunk values (the local area code shown in parenthesis)
|
|
52
|
-
*/
|
|
53
|
-
showTrunkValues?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Makes value splitted so easier to convert to object
|
|
56
|
-
*/
|
|
57
|
-
splitValues?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Callback when value changes
|
|
60
|
-
*/
|
|
61
|
-
onChange?: (newValue: string) => void;
|
|
62
|
-
/**
|
|
63
|
-
* Callback when blur
|
|
64
|
-
*/
|
|
65
|
-
onBlur?: () => void;
|
|
66
|
-
} & React.RefAttributes<TelFieldElement>>;
|
|
67
|
-
export default TelField;
|