@sb1/ffe-form-react 22.1.7 → 23.1.0
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/es/Checkbox.js +1 -2
- package/es/InputGroup.js +5 -7
- package/es/Label.js +1 -2
- package/es/RadioButton.js +1 -2
- package/es/RadioButtonInputGroup.js +5 -9
- package/es/ToggleSwitch.js +1 -1
- package/es/Tooltip.js +1 -2
- package/es/documentation/RadioButton-example.js +31 -0
- package/es/documentation/RadioSwitch-example.js +18 -0
- package/es/message/BaseFieldMessage.js +2 -2
- package/es/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/Checkbox.js +1 -2
- package/lib/InputGroup.js +5 -7
- package/lib/Label.js +1 -2
- package/lib/RadioButton.js +1 -2
- package/lib/RadioButtonInputGroup.js +5 -9
- package/lib/ToggleSwitch.js +1 -1
- package/lib/Tooltip.js +1 -2
- package/lib/documentation/RadioButton-example.js +66 -0
- package/lib/documentation/RadioSwitch-example.js +53 -0
- package/lib/message/BaseFieldMessage.js +2 -2
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/types/Checkbox.d.ts +5 -2
- package/types/InputGroup.d.ts +15 -4
- package/types/Label.d.ts +5 -2
- package/types/RadioButton.d.ts +5 -2
- package/types/RadioButtonInputGroup.d.ts +15 -4
- package/types/Tooltip.d.ts +5 -2
- package/types/documentation/RadioButton-example.d.ts +3 -0
- package/types/documentation/RadioSwitch-example.d.ts +3 -0
- package/types/message/BaseFieldMessage.d.ts +5 -2
- package/types/tsconfig.types.tsbuildinfo +1 -1
package/es/Checkbox.js
CHANGED
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import React, { useId } from 'react';
|
|
24
24
|
import classNames from 'classnames';
|
|
25
25
|
export var Checkbox = React.forwardRef(function (_a, ref) {
|
|
26
|
-
var children = _a.children, hiddenLabel = _a.hiddenLabel, _b = _a.inline, inline = _b === void 0 ? true : _b, noMargins = _a.noMargins, id = _a.id,
|
|
26
|
+
var children = _a.children, hiddenLabel = _a.hiddenLabel, _b = _a.inline, inline = _b === void 0 ? true : _b, noMargins = _a.noMargins, id = _a.id, checked = _a.checked, rest = __rest(_a, ["children", "hiddenLabel", "inline", "noMargins", "id", "checked"]);
|
|
27
27
|
var generatedId = useId();
|
|
28
28
|
var inputId = id !== null && id !== void 0 ? id : generatedId;
|
|
29
29
|
var labelProps = {
|
|
@@ -32,7 +32,6 @@ export var Checkbox = React.forwardRef(function (_a, ref) {
|
|
|
32
32
|
'ffe-checkbox--inline': inline,
|
|
33
33
|
'ffe-checkbox--no-margin': noMargins,
|
|
34
34
|
'ffe-checkbox--hidden-label': hiddenLabel,
|
|
35
|
-
'ffe-checkbox--on-colored-bg': onColoredBg,
|
|
36
35
|
}),
|
|
37
36
|
htmlFor: inputId,
|
|
38
37
|
};
|
package/es/InputGroup.js
CHANGED
|
@@ -35,7 +35,7 @@ var getChildrenWithExtraProps = function (children, extraProps) {
|
|
|
35
35
|
return children;
|
|
36
36
|
};
|
|
37
37
|
export var InputGroup = function (_a) {
|
|
38
|
-
var inputId = _a.inputId, children = _a.children, className = _a.className, _b = _a.extraMargin, extraMargin = _b === void 0 ? true : _b, description = _a.description, label = _a.label, fieldMessage = _a.fieldMessage, tooltip = _a.tooltip, onTooltipToggle = _a.onTooltipToggle, labelId = _a.labelId,
|
|
38
|
+
var inputId = _a.inputId, children = _a.children, className = _a.className, _b = _a.extraMargin, extraMargin = _b === void 0 ? true : _b, description = _a.description, label = _a.label, fieldMessage = _a.fieldMessage, tooltip = _a.tooltip, onTooltipToggle = _a.onTooltipToggle, labelId = _a.labelId, rest = __rest(_a, ["inputId", "children", "className", "extraMargin", "description", "label", "fieldMessage", "tooltip", "onTooltipToggle", "labelId"]);
|
|
39
39
|
var generatedInputId = useId();
|
|
40
40
|
var id = inputId !== null && inputId !== void 0 ? inputId : generatedInputId;
|
|
41
41
|
var descriptionId = description ? "".concat(id, "-description") : undefined;
|
|
@@ -77,22 +77,20 @@ export var InputGroup = function (_a) {
|
|
|
77
77
|
};
|
|
78
78
|
var modifiedChildren = getChildrenWithExtraProps(children, extraProps);
|
|
79
79
|
return (React.createElement("div", __assign({ className: classNames('ffe-input-group', {
|
|
80
|
-
'ffe-input-group--on-colored-bg': onColoredBg,
|
|
81
80
|
'ffe-input-group--no-extra-margin': !extraMargin,
|
|
82
81
|
'ffe-input-group--message': hasMessage,
|
|
83
82
|
}, className) }, rest),
|
|
84
|
-
typeof label === 'string' ? (React.createElement(Label, { htmlFor: id, id: labelId
|
|
83
|
+
typeof label === 'string' ? (React.createElement(Label, { htmlFor: id, id: labelId }, label)) : (React.isValidElement(label) &&
|
|
85
84
|
React.cloneElement(label, {
|
|
86
85
|
htmlFor: id,
|
|
87
86
|
id: labelId,
|
|
88
|
-
onColoredBg: onColoredBg,
|
|
89
87
|
})),
|
|
90
|
-
typeof tooltip === 'string' && (React.createElement(Tooltip, { onClick: onTooltipToggle
|
|
91
|
-
tooltip === true &&
|
|
88
|
+
typeof tooltip === 'string' && (React.createElement(Tooltip, { onClick: onTooltipToggle }, tooltip)),
|
|
89
|
+
tooltip === true && React.createElement(Tooltip, { onClick: onTooltipToggle }),
|
|
92
90
|
React.isValidElement(tooltip) && tooltip,
|
|
93
91
|
description && (React.createElement("div", { className: "ffe-small-text ffe-input-group__description", id: descriptionId }, description)),
|
|
94
92
|
modifiedChildren,
|
|
95
|
-
typeof fieldMessage === 'string' && (React.createElement(ErrorFieldMessage, { as: "p", id: fieldMessageId
|
|
93
|
+
typeof fieldMessage === 'string' && (React.createElement(ErrorFieldMessage, { as: "p", id: fieldMessageId }, fieldMessage)),
|
|
96
94
|
React.isValidElement(fieldMessage) &&
|
|
97
95
|
React.cloneElement(fieldMessage, {
|
|
98
96
|
id: fieldMessageId,
|
package/es/Label.js
CHANGED
|
@@ -23,9 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import React from 'react';
|
|
24
24
|
import classNames from 'classnames';
|
|
25
25
|
export var Label = function (_a) {
|
|
26
|
-
var block = _a.block, children = _a.children, className = _a.className, htmlFor = _a.htmlFor,
|
|
26
|
+
var block = _a.block, children = _a.children, className = _a.className, htmlFor = _a.htmlFor, rest = __rest(_a, ["block", "children", "className", "htmlFor"]);
|
|
27
27
|
return (React.createElement("label", __assign({ className: classNames('ffe-form-label', className, {
|
|
28
28
|
'ffe-form-label--block': block,
|
|
29
|
-
'ffe-form-label--on-colored-bg': onColoredBg,
|
|
30
29
|
}), htmlFor: htmlFor }, rest), children));
|
|
31
30
|
};
|
package/es/RadioButton.js
CHANGED
|
@@ -24,9 +24,8 @@ import React from 'react';
|
|
|
24
24
|
import classNames from 'classnames';
|
|
25
25
|
import { BaseRadioButton } from './BaseRadioButton';
|
|
26
26
|
export var RadioButton = function (_a) {
|
|
27
|
-
var className = _a.className, inline = _a.inline,
|
|
27
|
+
var className = _a.className, inline = _a.inline, rest = __rest(_a, ["className", "inline"]);
|
|
28
28
|
return (React.createElement(BaseRadioButton, __assign({ className: classNames('ffe-radio-button', {
|
|
29
29
|
'ffe-radio-button--inline': inline,
|
|
30
|
-
'ffe-radio-button--on-colored-bg': onColoredBg,
|
|
31
30
|
}, className) }, rest)));
|
|
32
31
|
};
|
|
@@ -25,15 +25,15 @@ import classNames from 'classnames';
|
|
|
25
25
|
import { ErrorFieldMessage } from './message';
|
|
26
26
|
import { Tooltip } from './Tooltip';
|
|
27
27
|
export var RadioButtonInputGroup = function (_a) {
|
|
28
|
-
var children = _a.children, className = _a.className, _b = _a.extraMargin, extraMargin = _b === void 0 ? true : _b, description = _a.description, fieldMessage = _a.fieldMessage, inline = _a.inline, label = _a.label, name = _a.name, selectedValue = _a.selectedValue, tooltip = _a.tooltip, onChange = _a.onChange,
|
|
28
|
+
var children = _a.children, className = _a.className, _b = _a.extraMargin, extraMargin = _b === void 0 ? true : _b, description = _a.description, fieldMessage = _a.fieldMessage, inline = _a.inline, label = _a.label, name = _a.name, selectedValue = _a.selectedValue, tooltip = _a.tooltip, onChange = _a.onChange, rest = __rest(_a, ["children", "className", "extraMargin", "description", "fieldMessage", "inline", "label", "name", "selectedValue", "tooltip", "onChange"]);
|
|
29
29
|
if (tooltip && description) {
|
|
30
30
|
throw new Error('Don\'t use both "tooltip" and "description" on an <RadioButtonInputGroup />, pick one of them');
|
|
31
31
|
}
|
|
32
32
|
var id = useId();
|
|
33
|
-
return (React.createElement("fieldset", __assign({ "aria-labelledby": id, className: classNames('ffe-input-group', { 'ffe-input-group--
|
|
34
|
-
label && (React.createElement("div", { id: id, className: classNames('ffe-form-label', 'ffe-form-label--block'
|
|
33
|
+
return (React.createElement("fieldset", __assign({ "aria-labelledby": id, className: classNames('ffe-input-group', { 'ffe-input-group--no-extra-margin': !extraMargin }, { 'ffe-input-group--message': !!fieldMessage }, className) }, rest),
|
|
34
|
+
label && (React.createElement("div", { id: id, className: classNames('ffe-form-label', 'ffe-form-label--block') },
|
|
35
35
|
label,
|
|
36
|
-
typeof tooltip === 'string' && (React.createElement(Tooltip,
|
|
36
|
+
typeof tooltip === 'string' && (React.createElement(Tooltip, null, tooltip)),
|
|
37
37
|
React.isValidElement(tooltip) && tooltip)),
|
|
38
38
|
description && (React.createElement("div", { className: "ffe-input-group__description ffe-small-text" }, description)),
|
|
39
39
|
children({
|
|
@@ -43,10 +43,6 @@ export var RadioButtonInputGroup = function (_a) {
|
|
|
43
43
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
44
44
|
},
|
|
45
45
|
selectedValue: selectedValue,
|
|
46
|
-
onColoredBg: onColoredBg,
|
|
47
46
|
}),
|
|
48
|
-
typeof fieldMessage === 'string' ? (React.createElement(ErrorFieldMessage, { as: "p"
|
|
49
|
-
React.cloneElement(fieldMessage, {
|
|
50
|
-
onColoredBg: onColoredBg,
|
|
51
|
-
}))));
|
|
47
|
+
typeof fieldMessage === 'string' ? (React.createElement(ErrorFieldMessage, { as: "p" }, fieldMessage)) : (fieldMessage)));
|
|
52
48
|
};
|
package/es/ToggleSwitch.js
CHANGED
|
@@ -29,7 +29,7 @@ export var ToggleSwitch = function (_a) {
|
|
|
29
29
|
var id = providedId !== null && providedId !== void 0 ? providedId : generatedId;
|
|
30
30
|
var text = i18n[locale];
|
|
31
31
|
return (React.createElement("div", { className: classNames('ffe-toggle-switch', { 'ffe-toggle-switch--hide-on-off': hideOnOff }, className) },
|
|
32
|
-
React.createElement("input", __assign({ className: "ffe-toggle-switch__input", type: "checkbox", id: id, value: value, checked: !!checked }, rest)),
|
|
32
|
+
React.createElement("input", __assign({ className: "ffe-toggle-switch__input", type: "checkbox", role: "switch", id: id, value: value, checked: !!checked }, rest)),
|
|
33
33
|
React.createElement("label", { className: "ffe-toggle-switch__label", htmlFor: id },
|
|
34
34
|
React.createElement("span", { className: "ffe-toggle-switch__label-text" },
|
|
35
35
|
children,
|
package/es/Tooltip.js
CHANGED
|
@@ -13,7 +13,7 @@ import React, { useState, useId } from 'react';
|
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { Collapse } from '@sb1/ffe-collapse-react';
|
|
15
15
|
export var Tooltip = React.forwardRef(function (_a, ref) {
|
|
16
|
-
var initialIsOpen = _a.isOpen, ariaControls = _a["aria-controls"], _b = _a["aria-label"], ariaLabel = _b === void 0 ? 'Vis hjelpetekst' : _b, children = _a.children, className = _a.className, onClick = _a.onClick, tabIndex = _a.tabIndex, containerProps = _a.containerProps
|
|
16
|
+
var initialIsOpen = _a.isOpen, ariaControls = _a["aria-controls"], _b = _a["aria-label"], ariaLabel = _b === void 0 ? 'Vis hjelpetekst' : _b, children = _a.children, className = _a.className, onClick = _a.onClick, tabIndex = _a.tabIndex, containerProps = _a.containerProps;
|
|
17
17
|
var tooltipButtonId = useId();
|
|
18
18
|
var tooltipId = useId();
|
|
19
19
|
var _c = useState(!!initialIsOpen), isOpen = _c[0], setIsOpen = _c[1];
|
|
@@ -25,7 +25,6 @@ export var Tooltip = React.forwardRef(function (_a, ref) {
|
|
|
25
25
|
};
|
|
26
26
|
return (React.createElement("div", __assign({}, containerProps, { className: classNames('ffe-tooltip', {
|
|
27
27
|
'ffe-tooltip--open': isOpen,
|
|
28
|
-
'ffe-tooltip--on-colored-bg': onColoredBg,
|
|
29
28
|
}) }),
|
|
30
29
|
React.createElement("button", { ref: ref, "aria-expanded": isOpen, "aria-controls": children ? tooltipId : ariaControls, "aria-label": ariaLabel, className: "ffe-tooltip__icon", onClick: handleClick, type: "button", tabIndex: tabIndex, id: tooltipButtonId },
|
|
31
30
|
React.createElement("span", { "aria-hidden": true }, "?")),
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React, { useState } from 'react';
|
|
13
|
+
import { RadioButton } from '../RadioButton';
|
|
14
|
+
import { RadioButtonInputGroup } from '../RadioButtonInputGroup';
|
|
15
|
+
export default (function () {
|
|
16
|
+
var _a = useState('savings'), accountType = _a[0], setAccountType = _a[1];
|
|
17
|
+
var _b = useState('monthly'), paymentFreq = _b[0], setPaymentFreq = _b[1];
|
|
18
|
+
return (React.createElement("div", { className: "ffe-grid" },
|
|
19
|
+
React.createElement("div", { className: "ffe-grid__row" },
|
|
20
|
+
React.createElement("div", { className: "ffe-grid__col--md-12 ffe-grid__col--sm-12" },
|
|
21
|
+
React.createElement(RadioButtonInputGroup, { label: "Choose your account type", description: "Select the type of account that best suits your needs", name: "account-type", onChange: function (e) { return setAccountType(e.target.value); }, selectedValue: accountType }, function (inputProps) { return (React.createElement(React.Fragment, null,
|
|
22
|
+
React.createElement(RadioButton, __assign({ value: "savings", tooltip: "Best for long-term savings with higher interest rates" }, inputProps), "Savings Account"),
|
|
23
|
+
React.createElement(RadioButton, __assign({ value: "checking", tooltip: "Perfect for daily transactions and bill payments" }, inputProps), "Checking Account"),
|
|
24
|
+
React.createElement(RadioButton, __assign({ value: "investment", tooltip: "Ideal for growing your wealth through various investment options" }, inputProps), "Investment Account"))); }))),
|
|
25
|
+
React.createElement("div", { className: "ffe-grid__row", style: { marginTop: '2rem' } },
|
|
26
|
+
React.createElement("div", { className: "ffe-grid__col--md-12 ffe-grid__col--sm-12" },
|
|
27
|
+
React.createElement(RadioButtonInputGroup, { label: "Payment frequency", name: "payment-frequency", onChange: function (e) { return setPaymentFreq(e.target.value); }, selectedValue: paymentFreq, inline: true }, function (inputProps) { return (React.createElement(React.Fragment, null,
|
|
28
|
+
React.createElement(RadioButton, __assign({ value: "monthly" }, inputProps), "Monthly"),
|
|
29
|
+
React.createElement(RadioButton, __assign({ value: "quarterly" }, inputProps), "Quarterly"),
|
|
30
|
+
React.createElement(RadioButton, __assign({ value: "yearly" }, inputProps), "Yearly"))); })))));
|
|
31
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React, { useState } from 'react';
|
|
13
|
+
import { RadioButtonInputGroup } from '../RadioButtonInputGroup';
|
|
14
|
+
import { RadioSwitch } from '../RadioSwitch';
|
|
15
|
+
export default (function () {
|
|
16
|
+
var _a = useState('yes'), selected = _a[0], setSelected = _a[1]; // Initialize with a default value
|
|
17
|
+
return (React.createElement(RadioButtonInputGroup, { label: "Do you want email notifications?", description: "Choose whether to receive email notifications for important updates", name: "email-notifications", onChange: function (e) { return setSelected(e.target.value); }, selectedValue: selected }, function (inputProps) { return (React.createElement(RadioSwitch, __assign({ leftLabel: "Yes", leftValue: "yes", rightLabel: "No", rightValue: "no" }, inputProps))); }));
|
|
18
|
+
});
|
|
@@ -28,11 +28,11 @@ import classNames from 'classnames';
|
|
|
28
28
|
* @ignore
|
|
29
29
|
*/
|
|
30
30
|
export var BaseFieldMessage = function (props) {
|
|
31
|
-
var children = props.children, className = props.className, _a = props.as, Comp = _a === void 0 ? 'div' : _a, type = props.type, _b = props.role, role = _b === void 0 ? 'status' : _b,
|
|
31
|
+
var children = props.children, className = props.className, _a = props.as, Comp = _a === void 0 ? 'div' : _a, type = props.type, _b = props.role, role = _b === void 0 ? 'status' : _b, rest = __rest(props, ["children", "className", "as", "type", "role"]);
|
|
32
32
|
var priorityHighIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00NzkuNzg4LTE4Ny4wOHEtMjEuNTM3IDAtMzYuNjYyLTE1LjMzN3QtMTUuMTI1LTM2Ljg3NHEwLTIxLjUzNyAxNS4zMzctMzYuNjYyIDE1LjMzNy0xNS4xMjQgMzYuODc0LTE1LjEyNCAyMS41MzcgMCAzNi42NjIgMTUuMzM3dDE1LjEyNSAzNi44NzRxMCAyMS41MzctMTUuMzM3IDM2LjY2MS0xNS4zMzcgMTUuMTI1LTM2Ljg3NCAxNS4xMjVabS0uMDYyLTE5Ni4xNTFxLTE5LjM0MSAwLTMyLjg0LTEzLjcwOS0xMy41LTEzLjcwOS0xMy41LTMyLjk2di0zMTYuNjg1cTAtMTkuMjUxIDEzLjc3NC0zMi43OTQgMTMuNzczLTEzLjU0MiAzMy4xMTQtMTMuNTQyIDE5LjM0MSAwIDMyLjg0IDEzLjcwOSAxMy41IDEzLjcwOSAxMy41IDMyLjk2djMxNi42ODVxMCAxOS4yNTEtMTMuNzc0IDMyLjc5NC0xMy43NzMgMTMuNTQyLTMzLjExNCAxMy41NDJaIi8+PC9zdmc+';
|
|
33
33
|
var checkIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Im0zOTUtMzcyLjM4NCAyNzAuNTM5LTI2OS41MzhxNy45MjMtNy45MjMgMTcuNjkyLTcuNjE2IDkuNzY5LjMwOCAxOC4wNzYgOC42MTYgOC4zMDggOC4zMDcgOC4zMDggMTcuODg0IDAgOS41NzYtOC4zMDggMTcuODg0bC0yODMgMjgyLjk5OXEtOS44NDYgOS44NDYtMjIuODA3IDkuODQ2LTEyLjk2MSAwLTIyLjgwNy05Ljg0NmwtMTE0LTExMy45OTlxLTcuOTIzLTcuOTIzLTguMzA4LTE3LjY5Mi0uMzg0LTkuNzY5IDcuOTIzLTE4LjA3NiA4LjMwOC04LjMwOCAxNy44ODQtOC4zMDggOS41NzcgMCAxNy44ODQgOC4zMDhMMzk1LTM3Mi4zODRaIi8+PC9zdmc+';
|
|
34
34
|
var infoIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00NzkuNzg4LTY3MnEtMjUuOTQyIDAtNDMuODY0LTE4LjEzNS0xNy45MjMtMTguMTM2LTE3LjkyMy00NC4wNzd0MTguMTM1LTQzLjg2NHExOC4xMzUtMTcuOTIzIDQ0LjA3Ni0xNy45MjMgMjUuOTQyIDAgNDMuODY0IDE4LjEzNiAxNy45MjMgMTguMTM1IDE3LjkyMyA0NC4wNzZ0LTE4LjEzNSA0My44NjRRNTA1LjcyOS02NzIgNDc5Ljc4OC02NzJabS4yNTcgNTA3Ljk5OXEtMjAuODE0IDAtMzUuNDI5LTE0LjU4NC0xNC42MTUtMTQuNTgzLTE0LjYxNS0zNS40MTZ2LTI5Ni42MTRxMC0yMC44MzMgMTQuNTctMzUuNDE2IDE0LjU3LTE0LjU4MyAzNS4zODQtMTQuNTgzdDM1LjQyOSAxNC41ODNxMTQuNjE1IDE0LjU4MyAxNC42MTUgMzUuNDE2djI5Ni42MTRxMCAyMC44MzMtMTQuNTcgMzUuNDE2LTE0LjU3IDE0LjU4NC0zNS4zODQgMTQuNTg0WiIvPjwvc3ZnPg==';
|
|
35
|
-
return (React.createElement(Comp, __assign({ className: classNames("ffe-field-message",
|
|
35
|
+
return (React.createElement(Comp, __assign({ className: classNames("ffe-field-message", "ffe-field-message--".concat(type), className), role: role }, rest),
|
|
36
36
|
React.createElement("span", { className: classNames("ffe-field-message__icon", "ffe-field-message__icon--".concat(type, "'")) }, (function () {
|
|
37
37
|
switch (type) {
|
|
38
38
|
case 'error':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/BaseRadioButton.tsx","../src/Checkbox.tsx","../src/Input.tsx","../src/InputGroup.tsx","../src/InputTextLike.tsx","../src/Label.tsx","../src/PhoneNumber.tsx","../src/RadioBlock.tsx","../src/RadioButton.tsx","../src/RadioButtonInputGroup.tsx","../src/RadioSwitch.tsx","../src/TextArea.tsx","../src/ToggleSwitch.tsx","../src/Tooltip.tsx","../src/index.ts","../src/types.ts","../src/i18n/en.ts","../src/i18n/i18n.ts","../src/i18n/nb.ts","../src/i18n/nn.ts","../src/message/BaseFieldMessage.tsx","../src/message/ErrorFieldMessage.tsx","../src/message/InfoFieldMessage.tsx","../src/message/SuccessFieldMessage.tsx","../src/message/index.tsx"],"version":"5.7.3"}
|
|
1
|
+
{"root":["../src/BaseRadioButton.tsx","../src/Checkbox.tsx","../src/Input.tsx","../src/InputGroup.tsx","../src/InputTextLike.tsx","../src/Label.tsx","../src/PhoneNumber.tsx","../src/RadioBlock.tsx","../src/RadioButton.tsx","../src/RadioButtonInputGroup.tsx","../src/RadioSwitch.tsx","../src/TextArea.tsx","../src/ToggleSwitch.tsx","../src/Tooltip.tsx","../src/index.ts","../src/types.ts","../src/documentation/RadioButton-example.tsx","../src/documentation/RadioSwitch-example.tsx","../src/i18n/en.ts","../src/i18n/i18n.ts","../src/i18n/nb.ts","../src/i18n/nn.ts","../src/message/BaseFieldMessage.tsx","../src/message/ErrorFieldMessage.tsx","../src/message/InfoFieldMessage.tsx","../src/message/SuccessFieldMessage.tsx","../src/message/index.tsx"],"version":"5.7.3"}
|
package/lib/Checkbox.js
CHANGED
|
@@ -62,7 +62,7 @@ exports.Checkbox = void 0;
|
|
|
62
62
|
var react_1 = __importStar(require("react"));
|
|
63
63
|
var classnames_1 = __importDefault(require("classnames"));
|
|
64
64
|
exports.Checkbox = react_1.default.forwardRef(function (_a, ref) {
|
|
65
|
-
var children = _a.children, hiddenLabel = _a.hiddenLabel, _b = _a.inline, inline = _b === void 0 ? true : _b, noMargins = _a.noMargins, id = _a.id,
|
|
65
|
+
var children = _a.children, hiddenLabel = _a.hiddenLabel, _b = _a.inline, inline = _b === void 0 ? true : _b, noMargins = _a.noMargins, id = _a.id, checked = _a.checked, rest = __rest(_a, ["children", "hiddenLabel", "inline", "noMargins", "id", "checked"]);
|
|
66
66
|
var generatedId = (0, react_1.useId)();
|
|
67
67
|
var inputId = id !== null && id !== void 0 ? id : generatedId;
|
|
68
68
|
var labelProps = {
|
|
@@ -71,7 +71,6 @@ exports.Checkbox = react_1.default.forwardRef(function (_a, ref) {
|
|
|
71
71
|
'ffe-checkbox--inline': inline,
|
|
72
72
|
'ffe-checkbox--no-margin': noMargins,
|
|
73
73
|
'ffe-checkbox--hidden-label': hiddenLabel,
|
|
74
|
-
'ffe-checkbox--on-colored-bg': onColoredBg,
|
|
75
74
|
}),
|
|
76
75
|
htmlFor: inputId,
|
|
77
76
|
};
|
package/lib/InputGroup.js
CHANGED
|
@@ -74,7 +74,7 @@ var getChildrenWithExtraProps = function (children, extraProps) {
|
|
|
74
74
|
return children;
|
|
75
75
|
};
|
|
76
76
|
var InputGroup = function (_a) {
|
|
77
|
-
var inputId = _a.inputId, children = _a.children, className = _a.className, _b = _a.extraMargin, extraMargin = _b === void 0 ? true : _b, description = _a.description, label = _a.label, fieldMessage = _a.fieldMessage, tooltip = _a.tooltip, onTooltipToggle = _a.onTooltipToggle, labelId = _a.labelId,
|
|
77
|
+
var inputId = _a.inputId, children = _a.children, className = _a.className, _b = _a.extraMargin, extraMargin = _b === void 0 ? true : _b, description = _a.description, label = _a.label, fieldMessage = _a.fieldMessage, tooltip = _a.tooltip, onTooltipToggle = _a.onTooltipToggle, labelId = _a.labelId, rest = __rest(_a, ["inputId", "children", "className", "extraMargin", "description", "label", "fieldMessage", "tooltip", "onTooltipToggle", "labelId"]);
|
|
78
78
|
var generatedInputId = (0, react_1.useId)();
|
|
79
79
|
var id = inputId !== null && inputId !== void 0 ? inputId : generatedInputId;
|
|
80
80
|
var descriptionId = description ? "".concat(id, "-description") : undefined;
|
|
@@ -116,22 +116,20 @@ var InputGroup = function (_a) {
|
|
|
116
116
|
};
|
|
117
117
|
var modifiedChildren = getChildrenWithExtraProps(children, extraProps);
|
|
118
118
|
return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('ffe-input-group', {
|
|
119
|
-
'ffe-input-group--on-colored-bg': onColoredBg,
|
|
120
119
|
'ffe-input-group--no-extra-margin': !extraMargin,
|
|
121
120
|
'ffe-input-group--message': hasMessage,
|
|
122
121
|
}, className) }, rest),
|
|
123
|
-
typeof label === 'string' ? (react_1.default.createElement(Label_1.Label, { htmlFor: id, id: labelId
|
|
122
|
+
typeof label === 'string' ? (react_1.default.createElement(Label_1.Label, { htmlFor: id, id: labelId }, label)) : (react_1.default.isValidElement(label) &&
|
|
124
123
|
react_1.default.cloneElement(label, {
|
|
125
124
|
htmlFor: id,
|
|
126
125
|
id: labelId,
|
|
127
|
-
onColoredBg: onColoredBg,
|
|
128
126
|
})),
|
|
129
|
-
typeof tooltip === 'string' && (react_1.default.createElement(Tooltip_1.Tooltip, { onClick: onTooltipToggle
|
|
130
|
-
tooltip === true &&
|
|
127
|
+
typeof tooltip === 'string' && (react_1.default.createElement(Tooltip_1.Tooltip, { onClick: onTooltipToggle }, tooltip)),
|
|
128
|
+
tooltip === true && react_1.default.createElement(Tooltip_1.Tooltip, { onClick: onTooltipToggle }),
|
|
131
129
|
react_1.default.isValidElement(tooltip) && tooltip,
|
|
132
130
|
description && (react_1.default.createElement("div", { className: "ffe-small-text ffe-input-group__description", id: descriptionId }, description)),
|
|
133
131
|
modifiedChildren,
|
|
134
|
-
typeof fieldMessage === 'string' && (react_1.default.createElement(message_1.ErrorFieldMessage, { as: "p", id: fieldMessageId
|
|
132
|
+
typeof fieldMessage === 'string' && (react_1.default.createElement(message_1.ErrorFieldMessage, { as: "p", id: fieldMessageId }, fieldMessage)),
|
|
135
133
|
react_1.default.isValidElement(fieldMessage) &&
|
|
136
134
|
react_1.default.cloneElement(fieldMessage, {
|
|
137
135
|
id: fieldMessageId,
|
package/lib/Label.js
CHANGED
|
@@ -29,10 +29,9 @@ exports.Label = void 0;
|
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
var Label = function (_a) {
|
|
32
|
-
var block = _a.block, children = _a.children, className = _a.className, htmlFor = _a.htmlFor,
|
|
32
|
+
var block = _a.block, children = _a.children, className = _a.className, htmlFor = _a.htmlFor, rest = __rest(_a, ["block", "children", "className", "htmlFor"]);
|
|
33
33
|
return (react_1.default.createElement("label", __assign({ className: (0, classnames_1.default)('ffe-form-label', className, {
|
|
34
34
|
'ffe-form-label--block': block,
|
|
35
|
-
'ffe-form-label--on-colored-bg': onColoredBg,
|
|
36
35
|
}), htmlFor: htmlFor }, rest), children));
|
|
37
36
|
};
|
|
38
37
|
exports.Label = Label;
|
package/lib/RadioButton.js
CHANGED
|
@@ -30,10 +30,9 @@ var react_1 = __importDefault(require("react"));
|
|
|
30
30
|
var classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
var BaseRadioButton_1 = require("./BaseRadioButton");
|
|
32
32
|
var RadioButton = function (_a) {
|
|
33
|
-
var className = _a.className, inline = _a.inline,
|
|
33
|
+
var className = _a.className, inline = _a.inline, rest = __rest(_a, ["className", "inline"]);
|
|
34
34
|
return (react_1.default.createElement(BaseRadioButton_1.BaseRadioButton, __assign({ className: (0, classnames_1.default)('ffe-radio-button', {
|
|
35
35
|
'ffe-radio-button--inline': inline,
|
|
36
|
-
'ffe-radio-button--on-colored-bg': onColoredBg,
|
|
37
36
|
}, className) }, rest)));
|
|
38
37
|
};
|
|
39
38
|
exports.RadioButton = RadioButton;
|
|
@@ -64,15 +64,15 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
64
64
|
var message_1 = require("./message");
|
|
65
65
|
var Tooltip_1 = require("./Tooltip");
|
|
66
66
|
var RadioButtonInputGroup = function (_a) {
|
|
67
|
-
var children = _a.children, className = _a.className, _b = _a.extraMargin, extraMargin = _b === void 0 ? true : _b, description = _a.description, fieldMessage = _a.fieldMessage, inline = _a.inline, label = _a.label, name = _a.name, selectedValue = _a.selectedValue, tooltip = _a.tooltip, onChange = _a.onChange,
|
|
67
|
+
var children = _a.children, className = _a.className, _b = _a.extraMargin, extraMargin = _b === void 0 ? true : _b, description = _a.description, fieldMessage = _a.fieldMessage, inline = _a.inline, label = _a.label, name = _a.name, selectedValue = _a.selectedValue, tooltip = _a.tooltip, onChange = _a.onChange, rest = __rest(_a, ["children", "className", "extraMargin", "description", "fieldMessage", "inline", "label", "name", "selectedValue", "tooltip", "onChange"]);
|
|
68
68
|
if (tooltip && description) {
|
|
69
69
|
throw new Error('Don\'t use both "tooltip" and "description" on an <RadioButtonInputGroup />, pick one of them');
|
|
70
70
|
}
|
|
71
71
|
var id = (0, react_1.useId)();
|
|
72
|
-
return (react_1.default.createElement("fieldset", __assign({ "aria-labelledby": id, className: (0, classnames_1.default)('ffe-input-group', { 'ffe-input-group--
|
|
73
|
-
label && (react_1.default.createElement("div", { id: id, className: (0, classnames_1.default)('ffe-form-label', 'ffe-form-label--block'
|
|
72
|
+
return (react_1.default.createElement("fieldset", __assign({ "aria-labelledby": id, className: (0, classnames_1.default)('ffe-input-group', { 'ffe-input-group--no-extra-margin': !extraMargin }, { 'ffe-input-group--message': !!fieldMessage }, className) }, rest),
|
|
73
|
+
label && (react_1.default.createElement("div", { id: id, className: (0, classnames_1.default)('ffe-form-label', 'ffe-form-label--block') },
|
|
74
74
|
label,
|
|
75
|
-
typeof tooltip === 'string' && (react_1.default.createElement(Tooltip_1.Tooltip,
|
|
75
|
+
typeof tooltip === 'string' && (react_1.default.createElement(Tooltip_1.Tooltip, null, tooltip)),
|
|
76
76
|
react_1.default.isValidElement(tooltip) && tooltip)),
|
|
77
77
|
description && (react_1.default.createElement("div", { className: "ffe-input-group__description ffe-small-text" }, description)),
|
|
78
78
|
children({
|
|
@@ -82,11 +82,7 @@ var RadioButtonInputGroup = function (_a) {
|
|
|
82
82
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
83
83
|
},
|
|
84
84
|
selectedValue: selectedValue,
|
|
85
|
-
onColoredBg: onColoredBg,
|
|
86
85
|
}),
|
|
87
|
-
typeof fieldMessage === 'string' ? (react_1.default.createElement(message_1.ErrorFieldMessage, { as: "p"
|
|
88
|
-
react_1.default.cloneElement(fieldMessage, {
|
|
89
|
-
onColoredBg: onColoredBg,
|
|
90
|
-
}))));
|
|
86
|
+
typeof fieldMessage === 'string' ? (react_1.default.createElement(message_1.ErrorFieldMessage, { as: "p" }, fieldMessage)) : (fieldMessage)));
|
|
91
87
|
};
|
|
92
88
|
exports.RadioButtonInputGroup = RadioButtonInputGroup;
|
package/lib/ToggleSwitch.js
CHANGED
|
@@ -68,7 +68,7 @@ var ToggleSwitch = function (_a) {
|
|
|
68
68
|
var id = providedId !== null && providedId !== void 0 ? providedId : generatedId;
|
|
69
69
|
var text = i18n_1.default[locale];
|
|
70
70
|
return (react_1.default.createElement("div", { className: (0, classnames_1.default)('ffe-toggle-switch', { 'ffe-toggle-switch--hide-on-off': hideOnOff }, className) },
|
|
71
|
-
react_1.default.createElement("input", __assign({ className: "ffe-toggle-switch__input", type: "checkbox", id: id, value: value, checked: !!checked }, rest)),
|
|
71
|
+
react_1.default.createElement("input", __assign({ className: "ffe-toggle-switch__input", type: "checkbox", role: "switch", id: id, value: value, checked: !!checked }, rest)),
|
|
72
72
|
react_1.default.createElement("label", { className: "ffe-toggle-switch__label", htmlFor: id },
|
|
73
73
|
react_1.default.createElement("span", { className: "ffe-toggle-switch__label-text" },
|
|
74
74
|
children,
|
package/lib/Tooltip.js
CHANGED
|
@@ -52,7 +52,7 @@ var react_1 = __importStar(require("react"));
|
|
|
52
52
|
var classnames_1 = __importDefault(require("classnames"));
|
|
53
53
|
var ffe_collapse_react_1 = require("@sb1/ffe-collapse-react");
|
|
54
54
|
exports.Tooltip = react_1.default.forwardRef(function (_a, ref) {
|
|
55
|
-
var initialIsOpen = _a.isOpen, ariaControls = _a["aria-controls"], _b = _a["aria-label"], ariaLabel = _b === void 0 ? 'Vis hjelpetekst' : _b, children = _a.children, className = _a.className, onClick = _a.onClick, tabIndex = _a.tabIndex, containerProps = _a.containerProps
|
|
55
|
+
var initialIsOpen = _a.isOpen, ariaControls = _a["aria-controls"], _b = _a["aria-label"], ariaLabel = _b === void 0 ? 'Vis hjelpetekst' : _b, children = _a.children, className = _a.className, onClick = _a.onClick, tabIndex = _a.tabIndex, containerProps = _a.containerProps;
|
|
56
56
|
var tooltipButtonId = (0, react_1.useId)();
|
|
57
57
|
var tooltipId = (0, react_1.useId)();
|
|
58
58
|
var _c = (0, react_1.useState)(!!initialIsOpen), isOpen = _c[0], setIsOpen = _c[1];
|
|
@@ -64,7 +64,6 @@ exports.Tooltip = react_1.default.forwardRef(function (_a, ref) {
|
|
|
64
64
|
};
|
|
65
65
|
return (react_1.default.createElement("div", __assign({}, containerProps, { className: (0, classnames_1.default)('ffe-tooltip', {
|
|
66
66
|
'ffe-tooltip--open': isOpen,
|
|
67
|
-
'ffe-tooltip--on-colored-bg': onColoredBg,
|
|
68
67
|
}) }),
|
|
69
68
|
react_1.default.createElement("button", { ref: ref, "aria-expanded": isOpen, "aria-controls": children ? tooltipId : ariaControls, "aria-label": ariaLabel, className: "ffe-tooltip__icon", onClick: handleClick, type: "button", tabIndex: tabIndex, id: tooltipButtonId },
|
|
70
69
|
react_1.default.createElement("span", { "aria-hidden": true }, "?")),
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
var react_1 = __importStar(require("react"));
|
|
48
|
+
var RadioButton_1 = require("../RadioButton");
|
|
49
|
+
var RadioButtonInputGroup_1 = require("../RadioButtonInputGroup");
|
|
50
|
+
exports.default = (function () {
|
|
51
|
+
var _a = (0, react_1.useState)('savings'), accountType = _a[0], setAccountType = _a[1];
|
|
52
|
+
var _b = (0, react_1.useState)('monthly'), paymentFreq = _b[0], setPaymentFreq = _b[1];
|
|
53
|
+
return (react_1.default.createElement("div", { className: "ffe-grid" },
|
|
54
|
+
react_1.default.createElement("div", { className: "ffe-grid__row" },
|
|
55
|
+
react_1.default.createElement("div", { className: "ffe-grid__col--md-12 ffe-grid__col--sm-12" },
|
|
56
|
+
react_1.default.createElement(RadioButtonInputGroup_1.RadioButtonInputGroup, { label: "Choose your account type", description: "Select the type of account that best suits your needs", name: "account-type", onChange: function (e) { return setAccountType(e.target.value); }, selectedValue: accountType }, function (inputProps) { return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
57
|
+
react_1.default.createElement(RadioButton_1.RadioButton, __assign({ value: "savings", tooltip: "Best for long-term savings with higher interest rates" }, inputProps), "Savings Account"),
|
|
58
|
+
react_1.default.createElement(RadioButton_1.RadioButton, __assign({ value: "checking", tooltip: "Perfect for daily transactions and bill payments" }, inputProps), "Checking Account"),
|
|
59
|
+
react_1.default.createElement(RadioButton_1.RadioButton, __assign({ value: "investment", tooltip: "Ideal for growing your wealth through various investment options" }, inputProps), "Investment Account"))); }))),
|
|
60
|
+
react_1.default.createElement("div", { className: "ffe-grid__row", style: { marginTop: '2rem' } },
|
|
61
|
+
react_1.default.createElement("div", { className: "ffe-grid__col--md-12 ffe-grid__col--sm-12" },
|
|
62
|
+
react_1.default.createElement(RadioButtonInputGroup_1.RadioButtonInputGroup, { label: "Payment frequency", name: "payment-frequency", onChange: function (e) { return setPaymentFreq(e.target.value); }, selectedValue: paymentFreq, inline: true }, function (inputProps) { return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
63
|
+
react_1.default.createElement(RadioButton_1.RadioButton, __assign({ value: "monthly" }, inputProps), "Monthly"),
|
|
64
|
+
react_1.default.createElement(RadioButton_1.RadioButton, __assign({ value: "quarterly" }, inputProps), "Quarterly"),
|
|
65
|
+
react_1.default.createElement(RadioButton_1.RadioButton, __assign({ value: "yearly" }, inputProps), "Yearly"))); })))));
|
|
66
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
var react_1 = __importStar(require("react"));
|
|
48
|
+
var RadioButtonInputGroup_1 = require("../RadioButtonInputGroup");
|
|
49
|
+
var RadioSwitch_1 = require("../RadioSwitch");
|
|
50
|
+
exports.default = (function () {
|
|
51
|
+
var _a = (0, react_1.useState)('yes'), selected = _a[0], setSelected = _a[1]; // Initialize with a default value
|
|
52
|
+
return (react_1.default.createElement(RadioButtonInputGroup_1.RadioButtonInputGroup, { label: "Do you want email notifications?", description: "Choose whether to receive email notifications for important updates", name: "email-notifications", onChange: function (e) { return setSelected(e.target.value); }, selectedValue: selected }, function (inputProps) { return (react_1.default.createElement(RadioSwitch_1.RadioSwitch, __assign({ leftLabel: "Yes", leftValue: "yes", rightLabel: "No", rightValue: "no" }, inputProps))); }));
|
|
53
|
+
});
|
|
@@ -34,11 +34,11 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
34
34
|
* @ignore
|
|
35
35
|
*/
|
|
36
36
|
var BaseFieldMessage = function (props) {
|
|
37
|
-
var children = props.children, className = props.className, _a = props.as, Comp = _a === void 0 ? 'div' : _a, type = props.type, _b = props.role, role = _b === void 0 ? 'status' : _b,
|
|
37
|
+
var children = props.children, className = props.className, _a = props.as, Comp = _a === void 0 ? 'div' : _a, type = props.type, _b = props.role, role = _b === void 0 ? 'status' : _b, rest = __rest(props, ["children", "className", "as", "type", "role"]);
|
|
38
38
|
var priorityHighIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00NzkuNzg4LTE4Ny4wOHEtMjEuNTM3IDAtMzYuNjYyLTE1LjMzN3QtMTUuMTI1LTM2Ljg3NHEwLTIxLjUzNyAxNS4zMzctMzYuNjYyIDE1LjMzNy0xNS4xMjQgMzYuODc0LTE1LjEyNCAyMS41MzcgMCAzNi42NjIgMTUuMzM3dDE1LjEyNSAzNi44NzRxMCAyMS41MzctMTUuMzM3IDM2LjY2MS0xNS4zMzcgMTUuMTI1LTM2Ljg3NCAxNS4xMjVabS0uMDYyLTE5Ni4xNTFxLTE5LjM0MSAwLTMyLjg0LTEzLjcwOS0xMy41LTEzLjcwOS0xMy41LTMyLjk2di0zMTYuNjg1cTAtMTkuMjUxIDEzLjc3NC0zMi43OTQgMTMuNzczLTEzLjU0MiAzMy4xMTQtMTMuNTQyIDE5LjM0MSAwIDMyLjg0IDEzLjcwOSAxMy41IDEzLjcwOSAxMy41IDMyLjk2djMxNi42ODVxMCAxOS4yNTEtMTMuNzc0IDMyLjc5NC0xMy43NzMgMTMuNTQyLTMzLjExNCAxMy41NDJaIi8+PC9zdmc+';
|
|
39
39
|
var checkIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Im0zOTUtMzcyLjM4NCAyNzAuNTM5LTI2OS41MzhxNy45MjMtNy45MjMgMTcuNjkyLTcuNjE2IDkuNzY5LjMwOCAxOC4wNzYgOC42MTYgOC4zMDggOC4zMDcgOC4zMDggMTcuODg0IDAgOS41NzYtOC4zMDggMTcuODg0bC0yODMgMjgyLjk5OXEtOS44NDYgOS44NDYtMjIuODA3IDkuODQ2LTEyLjk2MSAwLTIyLjgwNy05Ljg0NmwtMTE0LTExMy45OTlxLTcuOTIzLTcuOTIzLTguMzA4LTE3LjY5Mi0uMzg0LTkuNzY5IDcuOTIzLTE4LjA3NiA4LjMwOC04LjMwOCAxNy44ODQtOC4zMDggOS41NzcgMCAxNy44ODQgOC4zMDhMMzk1LTM3Mi4zODRaIi8+PC9zdmc+';
|
|
40
40
|
var infoIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00NzkuNzg4LTY3MnEtMjUuOTQyIDAtNDMuODY0LTE4LjEzNS0xNy45MjMtMTguMTM2LTE3LjkyMy00NC4wNzd0MTguMTM1LTQzLjg2NHExOC4xMzUtMTcuOTIzIDQ0LjA3Ni0xNy45MjMgMjUuOTQyIDAgNDMuODY0IDE4LjEzNiAxNy45MjMgMTguMTM1IDE3LjkyMyA0NC4wNzZ0LTE4LjEzNSA0My44NjRRNTA1LjcyOS02NzIgNDc5Ljc4OC02NzJabS4yNTcgNTA3Ljk5OXEtMjAuODE0IDAtMzUuNDI5LTE0LjU4NC0xNC42MTUtMTQuNTgzLTE0LjYxNS0zNS40MTZ2LTI5Ni42MTRxMC0yMC44MzMgMTQuNTctMzUuNDE2IDE0LjU3LTE0LjU4MyAzNS4zODQtMTQuNTgzdDM1LjQyOSAxNC41ODNxMTQuNjE1IDE0LjU4MyAxNC42MTUgMzUuNDE2djI5Ni42MTRxMCAyMC44MzMtMTQuNTcgMzUuNDE2LTE0LjU3IDE0LjU4NC0zNS4zODQgMTQuNTg0WiIvPjwvc3ZnPg==';
|
|
41
|
-
return (react_1.default.createElement(Comp, __assign({ className: (0, classnames_1.default)("ffe-field-message",
|
|
41
|
+
return (react_1.default.createElement(Comp, __assign({ className: (0, classnames_1.default)("ffe-field-message", "ffe-field-message--".concat(type), className), role: role }, rest),
|
|
42
42
|
react_1.default.createElement("span", { className: (0, classnames_1.default)("ffe-field-message__icon", "ffe-field-message__icon--".concat(type, "'")) }, (function () {
|
|
43
43
|
switch (type) {
|
|
44
44
|
case 'error':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/BaseRadioButton.tsx","../src/Checkbox.tsx","../src/Input.tsx","../src/InputGroup.tsx","../src/InputTextLike.tsx","../src/Label.tsx","../src/PhoneNumber.tsx","../src/RadioBlock.tsx","../src/RadioButton.tsx","../src/RadioButtonInputGroup.tsx","../src/RadioSwitch.tsx","../src/TextArea.tsx","../src/ToggleSwitch.tsx","../src/Tooltip.tsx","../src/index.ts","../src/types.ts","../src/i18n/en.ts","../src/i18n/i18n.ts","../src/i18n/nb.ts","../src/i18n/nn.ts","../src/message/BaseFieldMessage.tsx","../src/message/ErrorFieldMessage.tsx","../src/message/InfoFieldMessage.tsx","../src/message/SuccessFieldMessage.tsx","../src/message/index.tsx"],"version":"5.7.3"}
|
|
1
|
+
{"root":["../src/BaseRadioButton.tsx","../src/Checkbox.tsx","../src/Input.tsx","../src/InputGroup.tsx","../src/InputTextLike.tsx","../src/Label.tsx","../src/PhoneNumber.tsx","../src/RadioBlock.tsx","../src/RadioButton.tsx","../src/RadioButtonInputGroup.tsx","../src/RadioSwitch.tsx","../src/TextArea.tsx","../src/ToggleSwitch.tsx","../src/Tooltip.tsx","../src/index.ts","../src/types.ts","../src/documentation/RadioButton-example.tsx","../src/documentation/RadioSwitch-example.tsx","../src/i18n/en.ts","../src/i18n/i18n.ts","../src/i18n/nb.ts","../src/i18n/nn.ts","../src/message/BaseFieldMessage.tsx","../src/message/ErrorFieldMessage.tsx","../src/message/InfoFieldMessage.tsx","../src/message/SuccessFieldMessage.tsx","../src/message/index.tsx"],"version":"5.7.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-form-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.1.0",
|
|
4
4
|
"description": "React component for form elements in ffe",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"test:watch": "ffe-buildtool jest --watch"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sb1/ffe-collapse-react": "^5.1.
|
|
30
|
-
"@sb1/ffe-form": "^
|
|
29
|
+
"@sb1/ffe-collapse-react": "^5.1.6",
|
|
30
|
+
"@sb1/ffe-form": "^31.0.0",
|
|
31
31
|
"classnames": "^2.3.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@sb1/ffe-buildtool": "^0.
|
|
35
|
-
"@sb1/ffe-icons-react": "^11.0.
|
|
34
|
+
"@sb1/ffe-buildtool": "^0.10.0",
|
|
35
|
+
"@sb1/ffe-icons-react": "^11.0.19",
|
|
36
36
|
"eslint": "^8.57.0",
|
|
37
37
|
"react": "^18.2.0",
|
|
38
38
|
"react-dom": "^18.2.0"
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "5f7d8733a09b1fff738887c805237b958dfb5eca"
|
|
47
47
|
}
|
package/types/Checkbox.d.ts
CHANGED
|
@@ -10,7 +10,10 @@ export interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<'inpu
|
|
|
10
10
|
className: string;
|
|
11
11
|
htmlFor: string;
|
|
12
12
|
}) => React.ReactNode);
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/** @deprecated as part of update to Semantic Colors
|
|
14
|
+
*
|
|
15
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
16
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
17
|
+
onColoredBg?: never;
|
|
15
18
|
}
|
|
16
19
|
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
package/types/InputGroup.d.ts
CHANGED
|
@@ -20,7 +20,11 @@ export interface InputGroupProps extends Omit<React.ComponentPropsWithoutRef<'di
|
|
|
20
20
|
/** Use the ErrorFieldMessage component if you need more flexibility in how the content is rendered. */
|
|
21
21
|
fieldMessage?: string | React.ReactElement<{
|
|
22
22
|
id: string;
|
|
23
|
-
|
|
23
|
+
/** @deprecated as part of update to Semantic Colors
|
|
24
|
+
*
|
|
25
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
26
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
27
|
+
onColoredBg?: never;
|
|
24
28
|
}> | null;
|
|
25
29
|
/** To just render a static, always visible tooltip, use this. */
|
|
26
30
|
description?: string;
|
|
@@ -28,13 +32,20 @@ export interface InputGroupProps extends Omit<React.ComponentPropsWithoutRef<'di
|
|
|
28
32
|
label?: string | React.ReactElement<{
|
|
29
33
|
id: string;
|
|
30
34
|
htmlFor: string;
|
|
31
|
-
|
|
35
|
+
/** @deprecated as part of update to Semantic Colors
|
|
36
|
+
*
|
|
37
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
38
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
39
|
+
onColoredBg?: never;
|
|
32
40
|
}>;
|
|
33
41
|
onTooltipToggle?: TooltipProps['onClick'];
|
|
34
42
|
/** Use the Tooltip component if you need more flexibility in how the content is rendered. */
|
|
35
43
|
tooltip?: React.ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
|
|
44
|
+
/** @deprecated as part of update to Semantic Colors
|
|
45
|
+
*
|
|
46
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
47
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
48
|
+
onColoredBg?: never;
|
|
38
49
|
}
|
|
39
50
|
export declare const InputGroup: React.FC<InputGroupProps>;
|
|
40
51
|
export {};
|
package/types/Label.d.ts
CHANGED
|
@@ -5,7 +5,10 @@ export interface LabelProps extends React.ComponentPropsWithoutRef<'label'> {
|
|
|
5
5
|
* Set this to `true` if you don't use tooltips and need the label to be `display: block;`.
|
|
6
6
|
*/
|
|
7
7
|
block?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** @deprecated as part of update to Semantic Colors
|
|
9
|
+
*
|
|
10
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
11
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
12
|
+
onColoredBg?: never;
|
|
10
13
|
}
|
|
11
14
|
export declare const Label: React.FC<LabelProps>;
|
package/types/RadioButton.d.ts
CHANGED
|
@@ -3,7 +3,10 @@ import { BaseRadioButtonProps } from './BaseRadioButton';
|
|
|
3
3
|
export interface RadioButtonProps extends BaseRadioButtonProps {
|
|
4
4
|
/** Indicates whether the radio button is rendered inline or as a block */
|
|
5
5
|
inline?: boolean;
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/** @deprecated as part of update to Semantic Colors
|
|
7
|
+
*
|
|
8
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
9
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
10
|
+
onColoredBg?: never;
|
|
8
11
|
}
|
|
9
12
|
export declare const RadioButton: React.FC<RadioButtonProps>;
|
|
@@ -11,7 +11,11 @@ export interface RadioButtonInputGroupProps extends Omit<React.ComponentPropsWit
|
|
|
11
11
|
name: string;
|
|
12
12
|
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
13
13
|
selectedValue?: SelectedRadioValue;
|
|
14
|
-
|
|
14
|
+
/** @deprecated as part of update to Semantic Colors
|
|
15
|
+
*
|
|
16
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
17
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
18
|
+
onColoredBg?: never;
|
|
15
19
|
}) => React.ReactNode;
|
|
16
20
|
/** Additional class names applied to the fieldset */
|
|
17
21
|
className?: string;
|
|
@@ -24,7 +28,11 @@ export interface RadioButtonInputGroupProps extends Omit<React.ComponentPropsWit
|
|
|
24
28
|
extraMargin?: boolean;
|
|
25
29
|
/** String or ErrorFieldMessage component with message */
|
|
26
30
|
fieldMessage?: string | React.ReactElement<{
|
|
27
|
-
|
|
31
|
+
/** @deprecated as part of update to Semantic Colors
|
|
32
|
+
*
|
|
33
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
34
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
35
|
+
onColoredBg?: never;
|
|
28
36
|
}> | null;
|
|
29
37
|
/**
|
|
30
38
|
* Indicates whether the radio buttons inside this radio button group is
|
|
@@ -48,7 +56,10 @@ export interface RadioButtonInputGroupProps extends Omit<React.ComponentPropsWit
|
|
|
48
56
|
* set
|
|
49
57
|
* */
|
|
50
58
|
tooltip?: React.ReactNode;
|
|
51
|
-
/**
|
|
52
|
-
|
|
59
|
+
/** @deprecated as part of update to Semantic Colors
|
|
60
|
+
*
|
|
61
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
62
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
63
|
+
onColoredBg?: never;
|
|
53
64
|
}
|
|
54
65
|
export declare const RadioButtonInputGroup: React.FC<RadioButtonInputGroupProps>;
|
package/types/Tooltip.d.ts
CHANGED
|
@@ -2,7 +2,10 @@ import React from 'react';
|
|
|
2
2
|
export interface TooltipProps extends Pick<React.ComponentProps<'button'>, 'aria-controls' | 'aria-label' | 'children' | 'className' | 'onClick' | 'tabIndex'> {
|
|
3
3
|
containerProps?: React.ComponentPropsWithoutRef<'div'>;
|
|
4
4
|
isOpen?: boolean;
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/** @deprecated as part of update to Semantic Colors
|
|
6
|
+
*
|
|
7
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
8
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
9
|
+
onColoredBg?: never;
|
|
7
10
|
}
|
|
8
11
|
export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -3,8 +3,11 @@ import { ComponentWithoutRefAsPropParams } from '../types';
|
|
|
3
3
|
export type BaseFieldMessageProps<As extends ElementType = any> = ComponentWithoutRefAsPropParams<As> & {
|
|
4
4
|
type: 'success' | 'info' | 'error';
|
|
5
5
|
role: 'status' | 'alert' | 'none';
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/** @deprecated as part of update to Semantic Colors
|
|
7
|
+
*
|
|
8
|
+
* Use the `ffe-accent-color` class on the component or on the container of the component instead
|
|
9
|
+
* [Read more in the upgrade guide](https://sparebank1.github.io/designsystem/?path=/docs/introduksjon-changelog--docs#2025---februar---semantiske-farger) */
|
|
10
|
+
onColoredBg?: never;
|
|
8
11
|
};
|
|
9
12
|
/**
|
|
10
13
|
* Internal factory component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/BaseRadioButton.tsx","../src/Checkbox.tsx","../src/Input.tsx","../src/InputGroup.tsx","../src/InputTextLike.tsx","../src/Label.tsx","../src/PhoneNumber.tsx","../src/RadioBlock.tsx","../src/RadioButton.tsx","../src/RadioButtonInputGroup.tsx","../src/RadioSwitch.tsx","../src/TextArea.tsx","../src/ToggleSwitch.tsx","../src/Tooltip.tsx","../src/index.ts","../src/types.ts","../src/i18n/en.ts","../src/i18n/i18n.ts","../src/i18n/nb.ts","../src/i18n/nn.ts","../src/message/BaseFieldMessage.tsx","../src/message/ErrorFieldMessage.tsx","../src/message/InfoFieldMessage.tsx","../src/message/SuccessFieldMessage.tsx","../src/message/index.tsx"],"version":"5.7.3"}
|
|
1
|
+
{"root":["../src/BaseRadioButton.tsx","../src/Checkbox.tsx","../src/Input.tsx","../src/InputGroup.tsx","../src/InputTextLike.tsx","../src/Label.tsx","../src/PhoneNumber.tsx","../src/RadioBlock.tsx","../src/RadioButton.tsx","../src/RadioButtonInputGroup.tsx","../src/RadioSwitch.tsx","../src/TextArea.tsx","../src/ToggleSwitch.tsx","../src/Tooltip.tsx","../src/index.ts","../src/types.ts","../src/documentation/RadioButton-example.tsx","../src/documentation/RadioSwitch-example.tsx","../src/i18n/en.ts","../src/i18n/i18n.ts","../src/i18n/nb.ts","../src/i18n/nn.ts","../src/message/BaseFieldMessage.tsx","../src/message/ErrorFieldMessage.tsx","../src/message/InfoFieldMessage.tsx","../src/message/SuccessFieldMessage.tsx","../src/message/index.tsx"],"version":"5.7.3"}
|