@rolster/react-components 1.5.7 → 18.9.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/dist/cjs/assets/{lib.cjs-c052832f.css → index-Fy0sGm5F.css} +159 -106
- package/dist/cjs/index.js +2036 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/es/assets/{lib-c052832f.css → index-Fy0sGm5F.css} +159 -106
- package/dist/es/index.js +1970 -0
- package/dist/es/index.js.map +1 -0
- package/dist/esm/components/atoms/Amount/Amount.css +3 -2
- package/dist/esm/components/atoms/Amount/Amount.d.ts +3 -1
- package/dist/esm/components/atoms/Amount/Amount.js +2 -2
- package/dist/esm/components/atoms/Amount/Amount.js.map +1 -1
- package/dist/esm/components/atoms/Button/Button.css +1 -1
- package/dist/esm/components/atoms/CheckBox/CheckBox.d.ts +8 -1
- package/dist/esm/components/atoms/CheckBox/CheckBox.js +7 -2
- package/dist/esm/components/atoms/CheckBox/CheckBox.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Icon.css +1 -1
- package/dist/esm/components/atoms/Input/Input.css +1 -1
- package/dist/esm/components/atoms/Input/Input.d.ts +3 -3
- package/dist/esm/components/atoms/Input/Input.js +12 -10
- package/dist/esm/components/atoms/Input/Input.js.map +1 -1
- package/dist/esm/components/atoms/InputMoney/InputMoney.d.ts +3 -3
- package/dist/esm/components/atoms/InputMoney/InputMoney.js +5 -10
- package/dist/esm/components/atoms/InputMoney/InputMoney.js.map +1 -1
- package/dist/esm/components/atoms/InputNumber/InputNumber.d.ts +3 -3
- package/dist/esm/components/atoms/InputNumber/InputNumber.js +5 -10
- package/dist/esm/components/atoms/InputNumber/InputNumber.js.map +1 -1
- package/dist/esm/components/atoms/InputPassword/InputPassword.d.ts +1 -1
- package/dist/esm/components/atoms/InputPassword/InputPassword.js +9 -7
- package/dist/esm/components/atoms/InputPassword/InputPassword.js.map +1 -1
- package/dist/esm/components/atoms/InputText/InputText.d.ts +3 -3
- package/dist/esm/components/atoms/InputText/InputText.js +5 -10
- package/dist/esm/components/atoms/InputText/InputText.js.map +1 -1
- package/dist/esm/components/atoms/Label/Label.css +3 -0
- package/dist/esm/components/atoms/Label/Label.d.ts +2 -0
- package/dist/esm/components/atoms/Label/Label.js +5 -0
- package/dist/esm/components/atoms/Label/Label.js.map +1 -0
- package/dist/esm/components/atoms/MessageIcon/MessageIcon.css +12 -0
- package/dist/esm/components/atoms/MessageIcon/MessageIcon.d.ts +7 -0
- package/dist/esm/components/atoms/MessageIcon/MessageIcon.js +7 -0
- package/dist/esm/components/atoms/MessageIcon/MessageIcon.js.map +1 -0
- package/dist/esm/components/atoms/RadioButton/RadioButton.d.ts +2 -1
- package/dist/esm/components/atoms/RadioButton/RadioButton.js +2 -2
- package/dist/esm/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/dist/esm/components/atoms/SearchInput/SearchInput.d.ts +2 -2
- package/dist/esm/components/atoms/Switch/Switch.css +40 -21
- package/dist/esm/components/atoms/Switch/Switch.d.ts +7 -1
- package/dist/esm/components/atoms/Switch/Switch.js +8 -3
- package/dist/esm/components/atoms/Switch/Switch.js.map +1 -1
- package/dist/esm/components/atoms/index.d.ts +2 -0
- package/dist/esm/components/atoms/index.js +2 -0
- package/dist/esm/components/atoms/index.js.map +1 -1
- package/dist/esm/components/molecules/ButtonToggle/ButtonToggle.js.map +1 -1
- package/dist/esm/components/molecules/CheckBoxLabel/CheckBoxLabel.css +1 -5
- package/dist/esm/components/molecules/CheckBoxLabel/CheckBoxLabel.d.ts +1 -1
- package/dist/esm/components/molecules/CheckBoxLabel/CheckBoxLabel.js.map +1 -1
- package/dist/esm/components/molecules/DayPicker/DayPicker.d.ts +1 -1
- package/dist/esm/components/molecules/DayPicker/DayPicker.js +1 -1
- package/dist/esm/components/molecules/DayPicker/DayPicker.js.map +1 -1
- package/dist/esm/components/molecules/DayRangePicker/DayRangePicker.d.ts +1 -1
- package/dist/esm/components/molecules/DayRangePicker/DayRangePicker.js +1 -1
- package/dist/esm/components/molecules/DayRangePicker/DayRangePicker.js.map +1 -1
- package/dist/esm/components/molecules/MoneyField/MoneyField.d.ts +4 -2
- package/dist/esm/components/molecules/MoneyField/MoneyField.js +7 -8
- package/dist/esm/components/molecules/MoneyField/MoneyField.js.map +1 -1
- package/dist/esm/components/molecules/MonthPicker/MonthPicker.d.ts +1 -1
- package/dist/esm/components/molecules/MonthPicker/MonthPicker.js.map +1 -1
- package/dist/esm/components/molecules/MonthTitlePicker/MonthTitlePicker.d.ts +1 -1
- package/dist/esm/components/molecules/MonthTitlePicker/MonthTitlePicker.js +1 -1
- package/dist/esm/components/molecules/MonthTitlePicker/MonthTitlePicker.js.map +1 -1
- package/dist/esm/components/molecules/NumberField/NumberField.d.ts +4 -2
- package/dist/esm/components/molecules/NumberField/NumberField.js +7 -8
- package/dist/esm/components/molecules/NumberField/NumberField.js.map +1 -1
- package/dist/esm/components/molecules/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/molecules/PasswordField/PasswordField.d.ts +1 -1
- package/dist/esm/components/molecules/PasswordField/PasswordField.js +6 -7
- package/dist/esm/components/molecules/PasswordField/PasswordField.js.map +1 -1
- package/dist/esm/components/molecules/RadioButtonLabel/RadioButtonLabel.d.ts +1 -1
- package/dist/esm/components/molecules/RadioButtonLabel/RadioButtonLabel.js.map +1 -1
- package/dist/esm/components/molecules/SwitchLabel/SwitchLabel.css +2 -5
- package/dist/esm/components/molecules/SwitchLabel/SwitchLabel.d.ts +1 -1
- package/dist/esm/components/molecules/SwitchLabel/SwitchLabel.js.map +1 -1
- package/dist/esm/components/molecules/TextField/TextField.d.ts +4 -2
- package/dist/esm/components/molecules/TextField/TextField.js +7 -8
- package/dist/esm/components/molecules/TextField/TextField.js.map +1 -1
- package/dist/esm/components/molecules/YearPicker/YearPicker.d.ts +2 -2
- package/dist/esm/components/molecules/YearPicker/YearPicker.js +2 -2
- package/dist/esm/components/molecules/YearPicker/YearPicker.js.map +1 -1
- package/dist/esm/components/organisms/AutocompleteField/AutocompleteField.css +21 -19
- package/dist/esm/components/organisms/AutocompleteField/AutocompleteField.d.ts +5 -3
- package/dist/esm/components/organisms/AutocompleteField/AutocompleteField.js +32 -29
- package/dist/esm/components/organisms/AutocompleteField/AutocompleteField.js.map +1 -1
- package/dist/esm/components/organisms/Card/Card.css +1 -1
- package/dist/esm/components/organisms/Confirmation/Confirmation.css +58 -34
- package/dist/esm/components/organisms/Confirmation/Confirmation.js.map +1 -1
- package/dist/esm/components/organisms/Datatable/Datatable.d.ts +2 -1
- package/dist/esm/components/organisms/Datatable/Datatable.js +3 -2
- package/dist/esm/components/organisms/Datatable/Datatable.js.map +1 -1
- package/dist/esm/components/organisms/DateField/DateField.css +3 -0
- package/dist/esm/components/organisms/DateField/DateField.d.ts +1 -1
- package/dist/esm/components/organisms/DateField/DateField.js +10 -3
- package/dist/esm/components/organisms/DateField/DateField.js.map +1 -1
- package/dist/esm/components/organisms/DatePicker/DatePicker.d.ts +1 -1
- package/dist/esm/components/organisms/DatePicker/DatePicker.js +2 -2
- package/dist/esm/components/organisms/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/organisms/DateRangeField/DateRangeField.d.ts +1 -1
- package/dist/esm/components/organisms/DateRangeField/DateRangeField.js.map +1 -1
- package/dist/esm/components/organisms/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/esm/components/organisms/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/esm/components/organisms/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/esm/components/organisms/SelectField/SelectField.d.ts +4 -3
- package/dist/esm/components/organisms/SelectField/SelectField.js +16 -9
- package/dist/esm/components/organisms/SelectField/SelectField.js.map +1 -1
- package/dist/esm/components/organisms/Snackbar/Snackbar.css +14 -16
- package/dist/esm/components/organisms/Snackbar/Snackbar.d.ts +1 -1
- package/dist/esm/components/organisms/Snackbar/Snackbar.js +1 -1
- package/dist/esm/components/organisms/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/hooks/index.d.ts +0 -2
- package/dist/esm/hooks/index.js +0 -2
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/list-control.hook.d.ts +13 -7
- package/dist/esm/hooks/list-control.hook.js +16 -9
- package/dist/esm/hooks/list-control.hook.js.map +1 -1
- package/dist/esm/models.d.ts +4 -4
- package/dist/esm/models.js +6 -7
- package/dist/esm/models.js.map +1 -1
- package/dist/esm/utils/css.d.ts +1 -1
- package/dist/esm/utils/css.js +4 -1
- package/dist/esm/utils/css.js.map +1 -1
- package/dist/esm/utils/date-range-picker.js.map +1 -1
- package/dist/esm/utils/day-picker.js.map +1 -1
- package/dist/esm/utils/month-picker.js +1 -1
- package/dist/esm/utils/month-picker.js.map +1 -1
- package/dist/esm/utils/year-picker.js.map +1 -1
- package/package.json +25 -11
- package/dist/cjs/lib.cjs.js +0 -3366
- package/dist/cjs/lib.cjs.js.map +0 -1
- package/dist/es/lib.js +0 -3300
- package/dist/es/lib.js.map +0 -1
- package/dist/esm/hooks/form-control.hook.d.ts +0 -15
- package/dist/esm/hooks/form-control.hook.js +0 -77
- package/dist/esm/hooks/form-control.hook.js.map +0 -1
- package/dist/esm/hooks/form-group.hook.d.ts +0 -2
- package/dist/esm/hooks/form-group.hook.js +0 -22
- package/dist/esm/hooks/form-group.hook.js.map +0 -1
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { renderClassStatus } from '../../../utils/css';
|
|
3
3
|
import './CheckBox.css';
|
|
4
|
-
export function RlsCheckBox({ checked, disabled, rlsTheme }) {
|
|
5
|
-
return (_jsx("div", { className: renderClassStatus('rls-checkbox', { checked, disabled }), "rls-theme": rlsTheme, children: _jsx("div", { className: "rls-checkbox__component" }) }));
|
|
4
|
+
export function RlsCheckBox({ checked, disabled, onClick, rlsTheme }) {
|
|
5
|
+
return (_jsx("div", { className: renderClassStatus('rls-checkbox', { checked, disabled }), onClick: onClick, "rls-theme": rlsTheme, children: _jsx("div", { className: "rls-checkbox__component" }) }));
|
|
6
|
+
}
|
|
7
|
+
export function RlsCheckBoxControl({ formControl, disabled, rlsTheme }) {
|
|
8
|
+
return (_jsx(RlsCheckBox, { checked: formControl.state || false, disabled: disabled, onClick: () => {
|
|
9
|
+
formControl.setState(!formControl.state);
|
|
10
|
+
}, rlsTheme: rlsTheme }));
|
|
6
11
|
}
|
|
7
12
|
//# sourceMappingURL=CheckBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBox.js","sourceRoot":"","sources":["../../../../../src/components/atoms/CheckBox/CheckBox.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CheckBox.js","sourceRoot":"","sources":["../../../../../src/components/atoms/CheckBox/CheckBox.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,gBAAgB,CAAC;AAaxB,MAAM,UAAU,WAAW,CAAC,EAC1B,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACC;IACT,OAAO,CACL,cACE,SAAS,EAAE,iBAAiB,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EACnE,OAAO,EAAE,OAAO,eACL,QAAQ,YAEnB,cAAK,SAAS,EAAC,yBAAyB,GAAO,GAC3C,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EACjC,WAAW,EACX,QAAQ,EACR,QAAQ,EACQ;IAChB,OAAO,CACL,KAAC,WAAW,IACV,OAAO,EAAE,WAAW,CAAC,KAAK,IAAI,KAAK,EACnC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE;YACZ,WAAW,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC,EACD,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { ReactControl } from '@rolster/react-forms';
|
|
1
2
|
import { HTMLInputTypeAttribute } from 'react';
|
|
2
|
-
import { ReactControl } from '../../../hooks';
|
|
3
3
|
import { RlsComponent } from '../../definitions';
|
|
4
4
|
import './Input.css';
|
|
5
5
|
interface Input extends RlsComponent {
|
|
6
|
-
defaultValue?: any;
|
|
7
6
|
disabled?: boolean;
|
|
8
7
|
formControl?: ReactControl<HTMLInputElement>;
|
|
9
8
|
onValue?: (value: any) => void;
|
|
10
9
|
placeholder?: string;
|
|
11
10
|
type?: HTMLInputTypeAttribute;
|
|
11
|
+
value?: any;
|
|
12
12
|
}
|
|
13
|
-
export declare function RlsInput({ children,
|
|
13
|
+
export declare function RlsInput({ children, disabled, formControl, onValue, placeholder, type, value }: Input): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { renderClassStatus } from '../../../utils/css';
|
|
4
4
|
import './Input.css';
|
|
5
|
-
export function RlsInput({ children,
|
|
6
|
-
const [
|
|
5
|
+
export function RlsInput({ children, disabled, formControl, onValue, placeholder, type, value }) {
|
|
6
|
+
const [focused, setFocused] = useState(false);
|
|
7
7
|
function onChange(event) {
|
|
8
8
|
switch (type) {
|
|
9
9
|
case 'number':
|
|
@@ -21,17 +21,19 @@ export function RlsInput({ children, defaultValue, disabled, formControl, onValu
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
function onFocus() {
|
|
24
|
-
formControl?.
|
|
25
|
-
|
|
24
|
+
formControl?.focus();
|
|
25
|
+
setFocused(true);
|
|
26
26
|
}
|
|
27
27
|
function onBlur() {
|
|
28
|
-
formControl
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
if (formControl && !formControl.touched) {
|
|
29
|
+
formControl.touch();
|
|
30
|
+
}
|
|
31
|
+
formControl?.blur();
|
|
32
|
+
setFocused(false);
|
|
31
33
|
}
|
|
32
34
|
return (_jsxs("div", { className: renderClassStatus('rls-input', {
|
|
33
|
-
|
|
34
|
-
disabled
|
|
35
|
-
}), children: [_jsx("input", { ref: formControl?.elementRef, className: "rls-input__component", autoComplete: "off", type: type || 'text', placeholder: placeholder, disabled: disabled, onFocus: onFocus, onBlur: onBlur, onChange: onChange, value: formControl?.state ||
|
|
35
|
+
focused: formControl?.focused || focused,
|
|
36
|
+
disabled: formControl?.disabled || disabled
|
|
37
|
+
}), children: [_jsx("input", { ref: formControl?.elementRef, className: "rls-input__component", autoComplete: "off", type: type || 'text', placeholder: placeholder, disabled: formControl?.disabled || disabled, onFocus: onFocus, onBlur: onBlur, onChange: onChange, value: formControl?.state || value || '' }), _jsx("span", { className: "rls-input__value", children: children })] }));
|
|
36
38
|
}
|
|
37
39
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Input/Input.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Input/Input.tsx"],"names":[],"mappings":";AACA,OAAO,EAA0B,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,aAAa,CAAC;AAWrB,MAAM,UAAU,QAAQ,CAAC,EACvB,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,OAAO,EACP,WAAW,EACX,IAAI,EACJ,KAAK,EACC;IACN,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,SAAS,QAAQ,CAAC,KAAU;QAC1B,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,QAAQ;gBACX,QAAQ,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC9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ReactControl } from '
|
|
1
|
+
import { ReactControl } from '@rolster/react-forms';
|
|
2
2
|
import './InputMoney.css';
|
|
3
3
|
interface InputMoney {
|
|
4
4
|
decimals?: boolean;
|
|
5
|
-
defaultValue?: number;
|
|
6
5
|
disabled?: boolean;
|
|
7
6
|
formControl?: ReactControl<HTMLInputElement, number>;
|
|
8
7
|
onValue?: (value: number) => void;
|
|
9
8
|
placeholder?: string;
|
|
10
9
|
symbol?: string;
|
|
10
|
+
value?: number;
|
|
11
11
|
}
|
|
12
|
-
export declare function RlsInputMoney({ decimals,
|
|
12
|
+
export declare function RlsInputMoney({ decimals, disabled, formControl, onValue, placeholder, symbol, value }: InputMoney): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
3
|
import { RlsAmount } from '../Amount/Amount';
|
|
4
4
|
import { RlsInput } from '../Input/Input';
|
|
5
5
|
import './InputMoney.css';
|
|
6
|
-
export function RlsInputMoney({ decimals,
|
|
7
|
-
const [
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
formControl?.subscribe((value) => {
|
|
10
|
-
setValue(value || 0);
|
|
11
|
-
});
|
|
12
|
-
}, []);
|
|
6
|
+
export function RlsInputMoney({ decimals, disabled, formControl, onValue, placeholder, symbol, value }) {
|
|
7
|
+
const [valueInput, setValueInput] = useState(value || 0);
|
|
13
8
|
function onMoney(value) {
|
|
14
9
|
if (!formControl) {
|
|
15
|
-
|
|
10
|
+
setValueInput(value);
|
|
16
11
|
}
|
|
17
12
|
if (onValue) {
|
|
18
13
|
onValue(value);
|
|
19
14
|
}
|
|
20
15
|
}
|
|
21
|
-
return (_jsx("div", { className: "rls-input-money", children: _jsx(RlsInput, { formControl: formControl, type: "number", disabled: disabled, placeholder: placeholder,
|
|
16
|
+
return (_jsx("div", { className: "rls-input-money", children: _jsx(RlsInput, { formControl: formControl, type: "number", value: value, disabled: disabled, placeholder: placeholder, onValue: onMoney, children: _jsx(RlsAmount, { value: formControl?.state || value || valueInput, symbol: symbol, decimals: decimals }) }) }));
|
|
22
17
|
}
|
|
23
18
|
//# sourceMappingURL=InputMoney.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputMoney.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputMoney/InputMoney.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"InputMoney.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputMoney/InputMoney.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,kBAAkB,CAAC;AAY1B,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,OAAO,EACP,WAAW,EACX,MAAM,EACN,KAAK,EACM;IACX,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAEzD,SAAS,OAAO,CAAC,KAAa;QAC5B,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,iBAAiB,YAC9B,KAAC,QAAQ,IACP,WAAW,EAAE,WAAW,EACxB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,YAEhB,KAAC,SAAS,IACR,KAAK,EAAE,WAAW,EAAE,KAAK,IAAI,KAAK,IAAI,UAAU,EAChD,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GAClB,GACO,GACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ReactControl } from '
|
|
1
|
+
import { ReactControl } from '@rolster/react-forms';
|
|
2
2
|
import './InputNumber.css';
|
|
3
3
|
interface InputNumber {
|
|
4
4
|
disabled?: boolean;
|
|
5
|
-
defaultValue?: number;
|
|
6
5
|
formControl?: ReactControl<HTMLInputElement, number>;
|
|
7
6
|
onValue?: (value: number) => void;
|
|
8
7
|
placeholder?: string;
|
|
8
|
+
value?: number;
|
|
9
9
|
}
|
|
10
|
-
export declare function RlsInputNumber({ disabled,
|
|
10
|
+
export declare function RlsInputNumber({ disabled, formControl, onValue, placeholder, value }: InputNumber): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
3
|
import { RlsInput } from '../Input/Input';
|
|
4
4
|
import './InputNumber.css';
|
|
5
|
-
export function RlsInputNumber({ disabled,
|
|
6
|
-
const [
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
formControl?.subscribe((value) => {
|
|
9
|
-
setValue(value || 0);
|
|
10
|
-
});
|
|
11
|
-
}, []);
|
|
5
|
+
export function RlsInputNumber({ disabled, formControl, onValue, placeholder, value }) {
|
|
6
|
+
const [valueInput, setValueInput] = useState(value || 0);
|
|
12
7
|
function onNumber(value) {
|
|
13
8
|
if (!formControl) {
|
|
14
|
-
|
|
9
|
+
setValueInput(value);
|
|
15
10
|
}
|
|
16
11
|
if (onValue) {
|
|
17
12
|
onValue(value);
|
|
18
13
|
}
|
|
19
14
|
}
|
|
20
|
-
return (_jsx("div", { className: "rls-input-number", children: _jsx(RlsInput, { formControl: formControl, type: "number", disabled: disabled, placeholder: placeholder, onValue: onNumber, children: formControl?.state || value }) }));
|
|
15
|
+
return (_jsx("div", { className: "rls-input-number", children: _jsx(RlsInput, { formControl: formControl, type: "number", value: value, disabled: disabled, placeholder: placeholder, onValue: onNumber, children: formControl?.state || value || valueInput }) }));
|
|
21
16
|
}
|
|
22
17
|
//# sourceMappingURL=InputNumber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputNumber.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputNumber/InputNumber.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"InputNumber.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputNumber/InputNumber.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,mBAAmB,CAAC;AAU3B,MAAM,UAAU,cAAc,CAAC,EAC7B,QAAQ,EACR,WAAW,EACX,OAAO,EACP,WAAW,EACX,KAAK,EACO;IACZ,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAEzD,SAAS,QAAQ,CAAC,KAAa;QAC7B,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,kBAAkB,YAC/B,KAAC,QAAQ,IACP,WAAW,EAAE,WAAW,EACxB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,QAAQ,YAEhB,WAAW,EAAE,KAAK,IAAI,KAAK,IAAI,UAAU,GACjC,GACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { useState } from 'react';
|
|
|
3
3
|
import { renderClassStatus } from '../../../utils/css';
|
|
4
4
|
import './InputPassword.css';
|
|
5
5
|
export function RlsInputPassword({ disabled, formControl, onValue, placeholder, type }) {
|
|
6
|
-
const [
|
|
6
|
+
const [focused, setFocused] = useState(false);
|
|
7
7
|
function onChange(event) {
|
|
8
8
|
formControl?.setState(event.target.value);
|
|
9
9
|
if (onValue) {
|
|
@@ -11,16 +11,18 @@ export function RlsInputPassword({ disabled, formControl, onValue, placeholder,
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
function onFocus() {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
formControl?.focus();
|
|
15
|
+
setFocused(true);
|
|
16
16
|
}
|
|
17
17
|
function onBlur() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
if (formControl && !formControl.touched) {
|
|
19
|
+
formControl.touch();
|
|
20
|
+
}
|
|
21
|
+
formControl?.blur();
|
|
22
|
+
setFocused(false);
|
|
21
23
|
}
|
|
22
24
|
return (_jsx("div", { className: renderClassStatus('rls-input-password', {
|
|
23
|
-
|
|
25
|
+
focused: formControl?.focused || focused,
|
|
24
26
|
disabled
|
|
25
27
|
}), children: _jsx("input", { className: "rls-input-password__component", autoComplete: "off", type: type || 'password', placeholder: placeholder, disabled: disabled, onFocus: onFocus, onBlur: onBlur, onChange: onChange }) }));
|
|
26
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPassword.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputPassword/InputPassword.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"InputPassword.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputPassword/InputPassword.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,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2
2
|
import './InputText.css';
|
|
3
3
|
interface InputText {
|
|
4
|
-
defaultValue?: string;
|
|
5
4
|
disabled?: boolean;
|
|
6
5
|
formControl?: ReactControl<HTMLInputElement, string>;
|
|
7
6
|
onValue?: (value: string) => void;
|
|
8
7
|
placeholder?: string;
|
|
8
|
+
value?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function RlsInputText({
|
|
10
|
+
export declare function RlsInputText({ disabled, formControl, onValue, placeholder, value }: InputText): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
3
|
import { RlsInput } from '../Input/Input';
|
|
4
4
|
import './InputText.css';
|
|
5
|
-
export function RlsInputText({
|
|
6
|
-
const [
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
formControl?.subscribe((value) => {
|
|
9
|
-
setValue(value || '');
|
|
10
|
-
});
|
|
11
|
-
}, []);
|
|
5
|
+
export function RlsInputText({ disabled, formControl, onValue, placeholder, value }) {
|
|
6
|
+
const [valueInput, setValueInput] = useState(value || '');
|
|
12
7
|
function onText(value) {
|
|
13
8
|
if (!formControl) {
|
|
14
|
-
|
|
9
|
+
setValueInput(value);
|
|
15
10
|
}
|
|
16
11
|
if (onValue) {
|
|
17
12
|
onValue(value);
|
|
18
13
|
}
|
|
19
14
|
}
|
|
20
|
-
return (_jsx("div", { className: "rls-input-text", children: _jsx(RlsInput, { formControl: formControl, type: "text", disabled: disabled, placeholder: placeholder, onValue: onText, children: formControl?.state || value }) }));
|
|
15
|
+
return (_jsx("div", { className: "rls-input-text", children: _jsx(RlsInput, { formControl: formControl, type: "text", value: value, disabled: disabled, placeholder: placeholder, onValue: onText, children: formControl?.state || value || valueInput }) }));
|
|
21
16
|
}
|
|
22
17
|
//# sourceMappingURL=InputText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputText.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputText/InputText.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"InputText.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputText/InputText.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,iBAAiB,CAAC;AAUzB,MAAM,UAAU,YAAY,CAAC,EAC3B,QAAQ,EACR,WAAW,EACX,OAAO,EACP,WAAW,EACX,KAAK,EACK;IACV,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAE1D,SAAS,MAAM,CAAC,KAAa;QAC3B,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,gBAAgB,YAC7B,KAAC,QAAQ,IACP,WAAW,EAAE,WAAW,EACxB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,YAEd,WAAW,EAAE,KAAK,IAAI,KAAK,IAAI,UAAU,GACjC,GACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Label/Label.tsx"],"names":[],"mappings":";AAEA,MAAM,UAAU,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAgB;IAC3D,OAAO,CACL,gBAAO,SAAS,EAAC,WAAW,eAAY,QAAQ,YAC7C,QAAQ,GACH,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.rls-message-icon {
|
|
2
|
+
--rls-icon-color: var(--color-rolster-500);
|
|
3
|
+
--rls-icon-width: var(--sizing-16);
|
|
4
|
+
--rls-icon-height: var(--sizing-16);
|
|
5
|
+
--rls-icon-font-size: var(--sizing-16);
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
column-gap: var(--sizing-4);
|
|
9
|
+
}
|
|
10
|
+
.rls-message-icon span {
|
|
11
|
+
color: var(--color-theme-300);
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RlsComponent } from '../../definitions';
|
|
2
|
+
import './MessageIcon.css';
|
|
3
|
+
interface IconMessage extends RlsComponent {
|
|
4
|
+
icon?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function RlsMessageIcon({ icon, children, rlsTheme }: IconMessage): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { RlsIcon } from '../Icon/Icon';
|
|
3
|
+
import './MessageIcon.css';
|
|
4
|
+
export function RlsMessageIcon({ icon, children, rlsTheme }) {
|
|
5
|
+
return (_jsxs("div", { className: "rls-message-icon", "rls-theme": rlsTheme, children: [icon && _jsx(RlsIcon, { value: icon }), _jsx("span", { className: "caption-regular truncate", children: children })] }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=MessageIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageIcon.js","sourceRoot":"","sources":["../../../../../src/components/atoms/MessageIcon/MessageIcon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,mBAAmB,CAAC;AAM3B,MAAM,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAe;IACtE,OAAO,CACL,eAAK,SAAS,EAAC,kBAAkB,eAAY,QAAQ,aAClD,IAAI,IAAI,KAAC,OAAO,IAAC,KAAK,EAAE,IAAI,GAAI,EACjC,eAAM,SAAS,EAAC,0BAA0B,YAAE,QAAQ,GAAQ,IACxD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ import './RadioButton.css';
|
|
|
3
3
|
interface RadioButton extends RlsComponent {
|
|
4
4
|
checked: boolean;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
+
onClick?: () => void;
|
|
6
7
|
}
|
|
7
|
-
export declare function RlsRadioButton({ checked, disabled, rlsTheme }: RadioButton): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function RlsRadioButton({ checked, disabled, onClick, rlsTheme }: RadioButton): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { renderClassStatus } from '../../../utils/css';
|
|
3
3
|
import './RadioButton.css';
|
|
4
|
-
export function RlsRadioButton({ checked, disabled, rlsTheme }) {
|
|
5
|
-
return (_jsx("div", { className: renderClassStatus('rls-radiobutton', { checked, disabled }), "rls-theme": rlsTheme, children: _jsx("div", { className: "rls-radiobutton__component" }) }));
|
|
4
|
+
export function RlsRadioButton({ checked, disabled, onClick, rlsTheme }) {
|
|
5
|
+
return (_jsx("div", { className: renderClassStatus('rls-radiobutton', { checked, disabled }), onClick: onClick, "rls-theme": rlsTheme, children: _jsx("div", { className: "rls-radiobutton__component" }) }));
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=RadioButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.js","sourceRoot":"","sources":["../../../../../src/components/atoms/RadioButton/RadioButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioButton.js","sourceRoot":"","sources":["../../../../../src/components/atoms/RadioButton/RadioButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,mBAAmB,CAAC;AAQ3B,MAAM,UAAU,cAAc,CAAC,EAC7B,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACI;IACZ,OAAO,CACL,cACE,SAAS,EAAE,iBAAiB,CAAC,iBAAiB,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EACtE,OAAO,EAAE,OAAO,eACL,QAAQ,YAEnB,cAAK,SAAS,EAAC,4BAA4B,GAAO,GAC9C,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactInputControl } from '@rolster/react-forms';
|
|
2
2
|
import './SearchInput.css';
|
|
3
3
|
interface SearchInput {
|
|
4
|
-
formControl?:
|
|
4
|
+
formControl?: ReactInputControl<string>;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
onSearch?: () => void;
|
|
7
7
|
}
|
|
@@ -1,35 +1,54 @@
|
|
|
1
1
|
.rls-switch {
|
|
2
|
-
--pvt-
|
|
3
|
-
--pvt-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
outline: none;
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
width: var(--sizing-40);
|
|
9
|
-
height: var(--sizing-24);
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
border-radius: var(--sizing-12);
|
|
12
|
-
border: var(--border-1-theme-300);
|
|
2
|
+
--pvt-element-left: var(--sizing-2);
|
|
3
|
+
--pvt-element-background: var(--background-theme-500);
|
|
4
|
+
--pvt-bar-background: var(--background-theme-100);
|
|
5
|
+
max-width: var(--sizing-40);
|
|
13
6
|
}
|
|
14
7
|
.rls-switch:hover {
|
|
15
8
|
cursor: pointer;
|
|
16
9
|
}
|
|
17
10
|
.rls-switch--checked {
|
|
18
|
-
--pvt-
|
|
19
|
-
--pvt-
|
|
20
|
-
|
|
11
|
+
--pvt-element-background: var(--gradient-rolster-500);
|
|
12
|
+
--pvt-element-left: calc(
|
|
13
|
+
100% - var(--rls-switch-element-size) - var(--sizing-2)
|
|
14
|
+
);
|
|
15
|
+
--pvt-bar-background: var(--color-rolster-300);
|
|
21
16
|
}
|
|
22
17
|
.rls-switch--disabled {
|
|
23
18
|
opacity: 0.5;
|
|
24
19
|
pointer-events: none;
|
|
25
20
|
}
|
|
26
21
|
.rls-switch__component {
|
|
22
|
+
position: relative;
|
|
23
|
+
width: 100%;
|
|
24
|
+
padding: var(--sizing-6) var(--sizing-2);
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
}
|
|
27
|
+
.rls-switch__component__element {
|
|
27
28
|
position: absolute;
|
|
28
|
-
top:
|
|
29
|
-
left: var(--pvt-
|
|
30
|
-
width: var(--
|
|
31
|
-
height: var(--
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
top: 0rem;
|
|
30
|
+
left: var(--pvt-element-left);
|
|
31
|
+
width: var(--rls-switch-element-size);
|
|
32
|
+
height: var(--rls-switch-element-size);
|
|
33
|
+
z-index: var(--z-index-2);
|
|
34
|
+
padding: var(--sizing-4);
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
background: var(--background-theme-500);
|
|
38
|
+
box-shadow: 0 0 0.25rem 0 rgba(37, 38, 65, 0.38);
|
|
39
|
+
transition: left 240ms var(--standard-curve);
|
|
40
|
+
}
|
|
41
|
+
.rls-switch__component__element::before {
|
|
42
|
+
display: block;
|
|
43
|
+
content: '';
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
border-radius: 50%;
|
|
47
|
+
background: var(--pvt-element-background);
|
|
48
|
+
}
|
|
49
|
+
.rls-switch__component__bar {
|
|
50
|
+
background: var(--pvt-bar-background);
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: var(--rls-switch-bar-height);
|
|
53
|
+
border-radius: var(--rls-switch-bar-radius);
|
|
35
54
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactControl } from '@rolster/react-forms';
|
|
1
2
|
import { RlsComponent } from '../../definitions';
|
|
2
3
|
import './Switch.css';
|
|
3
4
|
interface Switch extends RlsComponent {
|
|
@@ -5,5 +6,10 @@ interface Switch extends RlsComponent {
|
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
onClick?: () => void;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
interface SwitchControl extends RlsComponent {
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
formControl: ReactControl<HTMLElement, boolean>;
|
|
12
|
+
}
|
|
13
|
+
export declare function RlsSwitch({ checked, disabled, onClick, rlsTheme }: Switch): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function RlsSwitchControl({ formControl, disabled, rlsTheme }: SwitchControl): import("react/jsx-runtime").JSX.Element;
|
|
9
15
|
export {};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { renderClassStatus } from '../../../utils/css';
|
|
3
3
|
import './Switch.css';
|
|
4
|
-
export function RlsSwitch({ checked, disabled,
|
|
5
|
-
return (_jsx("div", { className: renderClassStatus('rls-switch', { checked, disabled }), onClick: onClick, "rls-theme": rlsTheme, children:
|
|
4
|
+
export function RlsSwitch({ checked, disabled, onClick, rlsTheme }) {
|
|
5
|
+
return (_jsx("div", { className: renderClassStatus('rls-switch', { checked, disabled }), onClick: onClick, "rls-theme": rlsTheme, children: _jsxs("div", { className: "rls-switch__component", children: [_jsx("div", { className: "rls-switch__component__element" }), _jsx("div", { className: "rls-switch__component__bar" })] }) }));
|
|
6
|
+
}
|
|
7
|
+
export function RlsSwitchControl({ formControl, disabled, rlsTheme }) {
|
|
8
|
+
return (_jsx(RlsSwitch, { checked: formControl.state || false, disabled: disabled, onClick: () => {
|
|
9
|
+
formControl.setState(!formControl.state);
|
|
10
|
+
}, rlsTheme: rlsTheme }));
|
|
6
11
|
}
|
|
7
12
|
//# sourceMappingURL=Switch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Switch/Switch.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Switch/Switch.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,cAAc,CAAC;AAatB,MAAM,UAAU,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAU;IACxE,OAAO,CACL,cACE,SAAS,EAAE,iBAAiB,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EACjE,OAAO,EAAE,OAAO,eACL,QAAQ,YAEnB,eAAK,SAAS,EAAC,uBAAuB,aACpC,cAAK,SAAS,EAAC,gCAAgC,GAAO,EACtD,cAAK,SAAS,EAAC,4BAA4B,GAAO,IAC9C,GACF,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,EAC/B,WAAW,EACX,QAAQ,EACR,QAAQ,EACM;IACd,OAAO,CACL,KAAC,SAAS,IACR,OAAO,EAAE,WAAW,CAAC,KAAK,IAAI,KAAK,EACnC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE;YACZ,WAAW,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC,EACD,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -10,6 +10,8 @@ export * from './InputMoney/InputMoney';
|
|
|
10
10
|
export * from './InputNumber/InputNumber';
|
|
11
11
|
export * from './InputPassword/InputPassword';
|
|
12
12
|
export * from './InputText/InputText';
|
|
13
|
+
export * from './Label/Label';
|
|
14
|
+
export * from './MessageIcon/MessageIcon';
|
|
13
15
|
export * from './Poster/Poster';
|
|
14
16
|
export * from './ProgressBar/ProgressBar';
|
|
15
17
|
export * from './RadioButton/RadioButton';
|
|
@@ -10,6 +10,8 @@ export * from './InputMoney/InputMoney';
|
|
|
10
10
|
export * from './InputNumber/InputNumber';
|
|
11
11
|
export * from './InputPassword/InputPassword';
|
|
12
12
|
export * from './InputText/InputText';
|
|
13
|
+
export * from './Label/Label';
|
|
14
|
+
export * from './MessageIcon/MessageIcon';
|
|
13
15
|
export * from './Poster/Poster';
|
|
14
16
|
export * from './ProgressBar/ProgressBar';
|
|
15
17
|
export * from './RadioButton/RadioButton';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/atoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/atoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonToggle.js","sourceRoot":"","sources":["../../../../../src/components/molecules/ButtonToggle/ButtonToggle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAc,SAAS,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,oBAAoB,CAAC;AAc5B,MAAM,UAAU,eAAe,CAAC,EAC9B,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACK;IACb,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEhD,MAAM,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC;IAE9B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QA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,CACN,CAAC,GACC,GACD,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
--pvt-text-overflow: hidden;
|
|
5
5
|
--pvt-text-white-space: nowrap;
|
|
6
6
|
--pvt-text-text-overflow: ellipsis;
|
|
7
|
-
position: relative;
|
|
8
|
-
float: left;
|
|
9
|
-
width: 100%;
|
|
10
7
|
display: flex;
|
|
8
|
+
column-gap: var(--sizing-8);
|
|
11
9
|
}
|
|
12
10
|
.rls-checkbox-label--disabled {
|
|
13
11
|
--pvt-text-opacity: 0.5;
|
|
@@ -20,11 +18,9 @@
|
|
|
20
18
|
--pvt-text-height: auto;
|
|
21
19
|
}
|
|
22
20
|
.rls-checkbox-label__component {
|
|
23
|
-
margin-right: var(--sizing-8);
|
|
24
21
|
width: auto;
|
|
25
22
|
}
|
|
26
23
|
.rls-checkbox-label__text {
|
|
27
|
-
float: left;
|
|
28
24
|
max-width: calc(100% - var(--sizing-32));
|
|
29
25
|
height: var(--pvt-text-height);
|
|
30
26
|
line-height: var(--sizing-24);
|