@rolster/react-components 18.25.7 → 18.25.10
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/{index-BR6Z9tba.css → index-DG6-q1c1.css} +11 -8
- package/dist/cjs/index.js +13 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-BR6Z9tba.css → index-DG6-q1c1.css} +11 -8
- package/dist/es/index.js +13 -13
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/CheckBox/CheckBox.css +1 -1
- package/dist/esm/components/atoms/CheckBox/CheckBox.css.map +1 -1
- package/dist/esm/components/atoms/{InputDouble/InputDouble.css → InputDecimal/InputDecimal.css} +3 -3
- package/dist/esm/components/atoms/InputDecimal/InputDecimal.css.map +1 -0
- package/dist/esm/components/atoms/InputDecimal/InputDecimal.d.ts +9 -0
- package/dist/esm/components/atoms/InputDecimal/InputDecimal.js +21 -0
- package/dist/esm/components/atoms/InputDecimal/InputDecimal.js.map +1 -0
- package/dist/esm/components/atoms/RadioButton/RadioButton.css +1 -1
- package/dist/esm/components/atoms/RadioButton/RadioButton.css.map +1 -1
- package/dist/esm/components/atoms/Switch/Switch.css +1 -1
- package/dist/esm/components/atoms/Switch/Switch.css.map +1 -1
- package/dist/esm/components/molecules/{FieldDouble/FieldDouble.css → FieldDecimal/FieldDecimal.css} +2 -2
- package/dist/esm/components/molecules/FieldDecimal/FieldDecimal.css.map +1 -0
- package/dist/esm/components/molecules/FieldDecimal/FieldDecimal.d.ts +9 -0
- package/dist/esm/components/molecules/{FieldDouble/FieldDouble.js → FieldDecimal/FieldDecimal.js} +6 -6
- package/dist/esm/components/molecules/FieldDecimal/FieldDecimal.js.map +1 -0
- package/dist/esm/components/molecules/LabelCheckBox/LabelCheckBox.css +1 -0
- package/dist/esm/components/molecules/LabelCheckBox/LabelCheckBox.css.map +1 -1
- package/dist/esm/components/molecules/LabelRadioButton/LabelRadioButton.css +1 -0
- package/dist/esm/components/molecules/LabelRadioButton/LabelRadioButton.css.map +1 -1
- package/dist/esm/components/molecules/LabelSwitch/LabelSwitch.css +1 -0
- package/dist/esm/components/molecules/LabelSwitch/LabelSwitch.css.map +1 -1
- package/dist/esm/components/organisms/Confirmation/Confirmation.d.ts +2 -2
- package/dist/esm/components/organisms/Confirmation/Confirmation.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/esm/components/atoms/InputDouble/InputDouble.css.map +0 -1
- package/dist/esm/components/atoms/InputDouble/InputDouble.d.ts +0 -9
- package/dist/esm/components/atoms/InputDouble/InputDouble.js +0 -21
- package/dist/esm/components/atoms/InputDouble/InputDouble.js.map +0 -1
- package/dist/esm/components/molecules/FieldDouble/FieldDouble.css.map +0 -1
- package/dist/esm/components/molecules/FieldDouble/FieldDouble.d.ts +0 -9
- package/dist/esm/components/molecules/FieldDouble/FieldDouble.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/atoms/CheckBox/CheckBox.scss"],"names":[],"mappings":"AAOA,cACE,sEAEA,0FAKA,qDAEA,kBACA,aACA,2BACA,4BACA,uBACA,mBACA,sBACA,aACA,mCACA,oCACA,mDAEA,oBACE,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/atoms/CheckBox/CheckBox.scss"],"names":[],"mappings":"AAOA,cACE,sEAEA,0FAKA,qDAEA,kBACA,aACA,2BACA,4BACA,uBACA,mBACA,sBACA,aACA,mCACA,oCACA,mDAEA,oBACE,2CAGF,uBACE,uDAEA,sCAGF,wBACE,WACA,oBAGF,yBACE,qCACA,sCACA,mCACA,2CACA","file":"CheckBox.css"}
|
package/dist/esm/components/atoms/{InputDouble/InputDouble.css → InputDecimal/InputDecimal.css}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.rls-input-
|
|
1
|
+
.rls-input-decimal {
|
|
2
2
|
--rlc-tabular-text-font-size: var(--rls-input-font-size);
|
|
3
3
|
--rlc-tabular-text-char-width: 5.25rem;
|
|
4
4
|
position: relative;
|
|
5
5
|
width: 100%;
|
|
6
6
|
box-sizing: border-box;
|
|
7
7
|
}
|
|
8
|
-
.rls-input-
|
|
8
|
+
.rls-input-decimal .rls-amount {
|
|
9
9
|
height: inherit;
|
|
10
10
|
align-items: center;
|
|
11
|
-
} /*# sourceMappingURL=
|
|
11
|
+
} /*# sourceMappingURL=InputDecimal.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/atoms/InputDecimal/InputDecimal.scss"],"names":[],"mappings":"AAOA,mBACE,yDACA,uCAEA,kBACA,WACA,sBAEA,+BACE,eACA","file":"InputDecimal.css"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BigDecimal } from '@rolster/commons';
|
|
2
|
+
import { InputProps } from '../../types';
|
|
3
|
+
import './InputDecimal.css';
|
|
4
|
+
interface InputDecimalProps extends InputProps<BigDecimal> {
|
|
5
|
+
decimals?: number;
|
|
6
|
+
symbol?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function RlsInputDecimal(props: InputDecimalProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { BigDecimal } from '@rolster/commons';
|
|
3
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
4
|
+
import { RlsAmount } from '../Amount/Amount';
|
|
5
|
+
import { RlsInput } from '../Input/Input';
|
|
6
|
+
import './InputDecimal.css';
|
|
7
|
+
export function RlsInputDecimal(props) {
|
|
8
|
+
const { decimals, formControl, identifier, onValue, symbol, value } = props;
|
|
9
|
+
const [valueInput, setValueInput] = useState((formControl?.value ?? value ?? BigDecimal.zero()).rounded);
|
|
10
|
+
const amount = useMemo(() => {
|
|
11
|
+
return formControl?.value?.rounded ?? valueInput;
|
|
12
|
+
}, [formControl?.value, valueInput]);
|
|
13
|
+
const onValueInput = useCallback((value) => {
|
|
14
|
+
const valueDecimal = BigDecimal.create(value);
|
|
15
|
+
formControl ? formControl.setValue(valueDecimal) : setValueInput(value);
|
|
16
|
+
onValue && onValue(valueDecimal);
|
|
17
|
+
}, [formControl, onValue]);
|
|
18
|
+
const doubleProps = { ...props, formControl: undefined };
|
|
19
|
+
return (_jsx("div", { id: identifier, className: "rls-input-decimal", children: _jsx(RlsInput, { ...doubleProps, type: "number", value: valueInput, onValue: onValueInput, children: _jsx(RlsAmount, { value: amount, symbol: symbol, decimals: decimals }) }) }));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=InputDecimal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputDecimal.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputDecimal/InputDecimal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,oBAAoB,CAAC;AAO5B,MAAM,UAAU,eAAe,CAAC,KAAwB;IACtD,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAE5E,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAC1C,CAAC,WAAW,EAAE,KAAK,IAAI,KAAK,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAC3D,CAAC;IAEF,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,OAAO,WAAW,EAAE,KAAK,EAAE,OAAO,IAAI,UAAU,CAAC;IACnD,CAAC,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IAErC,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAa,EAAE,EAAE;QAChB,MAAM,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAE9C,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAExE,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC,EACD,CAAC,WAAW,EAAE,OAAO,CAAC,CACvB,CAAC;IAEF,MAAM,WAAW,GAAG,EAAE,GAAG,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;IAEzD,OAAO,CACL,cAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAC,mBAAmB,YAChD,KAAC,QAAQ,OACH,WAAW,EACf,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,YAAY,YAErB,KAAC,SAAS,IAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAI,GACvD,GACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/atoms/RadioButton/RadioButton.scss"],"names":[],"mappings":"AAOA,iBACE,yEAEA,6FAKA,qDAEA,kBACA,aACA,2BACA,4BACA,uBACA,mBACA,aACA,kBACA,sBACA,oCACA,mDAEA,uBACE,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/atoms/RadioButton/RadioButton.scss"],"names":[],"mappings":"AAOA,iBACE,yEAEA,6FAKA,qDAEA,kBACA,aACA,2BACA,4BACA,uBACA,mBACA,aACA,kBACA,sBACA,oCACA,mDAEA,uBACE,8CAGF,0BACE,uDAEA,sCAGF,2BACE,WACA,oBAGF,4BACE,qCACA,sCACA,kBACA,2CACA","file":"RadioButton.css"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/atoms/Switch/Switch.scss"],"names":[],"mappings":"AAOA,YACE,0GAKA,0EACA,yBACA,mDACA,+CAEA,6DAEA,kBACE,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/atoms/Switch/Switch.scss"],"names":[],"mappings":"AAOA,YACE,0GAKA,0EACA,yBACA,mDACA,+CAEA,6DAEA,kBACE,yCAGF,qBACE,yDACA,qDACA,iDAGF,sBACE,WACA,oBAGF,uBACE,kBACA,WACA,qCACA,sBAEA,gCACE,kBACA,SACA,6BACA,8BACA,+BACA,kBACA,6BACA,sBACA,6BACA,yCACA,+CAGF,4BACE,qCACA,WACA,0DACA,iEACA","file":"Switch.css"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/molecules/FieldDecimal/FieldDecimal.scss"],"names":[],"mappings":"AAOA,mBACE,kDAEA,kBACA,WACA","file":"FieldDecimal.css"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BigDecimal } from '@rolster/commons';
|
|
2
|
+
import { FieldBoxProps } from '../../types';
|
|
3
|
+
import './FieldDecimal.css';
|
|
4
|
+
interface FieldDecimalProps extends FieldBoxProps<BigDecimal> {
|
|
5
|
+
decimals?: number;
|
|
6
|
+
symbol?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function RlsFieldDecimal(props: FieldDecimalProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
package/dist/esm/components/molecules/{FieldDouble/FieldDouble.js → FieldDecimal/FieldDecimal.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { renderClassStatus } from '../../../helpers/css';
|
|
4
|
-
import {
|
|
4
|
+
import { RlsInputDecimal } from '../../atoms/InputDecimal/InputDecimal';
|
|
5
5
|
import { RlsMessageFormError } from '../MessageFormError/MessageFormError';
|
|
6
|
-
import './
|
|
7
|
-
export function
|
|
6
|
+
import './FieldDecimal.css';
|
|
7
|
+
export function RlsFieldDecimal(props) {
|
|
8
8
|
const { children, formControl, identifier, msgErrorDisabled, rlsTheme } = props;
|
|
9
9
|
const disabled = useMemo(() => {
|
|
10
10
|
return formControl?.disabled || props.disabled;
|
|
@@ -15,8 +15,8 @@ export function RlsFieldDouble(props) {
|
|
|
15
15
|
error: formControl?.wrong,
|
|
16
16
|
disabled,
|
|
17
17
|
readonly: props.readOnly
|
|
18
|
-
}, 'rls-field-
|
|
18
|
+
}, 'rls-field-decimal');
|
|
19
19
|
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
20
|
-
return (_jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && _jsx("span", { className: "rls-field-box__label", children: children }), _jsx("div", { className: "rls-field-box__component", children: _jsx("div", { className: "rls-field-box__body", children: _jsx(
|
|
20
|
+
return (_jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && _jsx("span", { className: "rls-field-box__label", children: children }), _jsx("div", { className: "rls-field-box__component", children: _jsx("div", { className: "rls-field-box__body", children: _jsx(RlsInputDecimal, { ...props }) }) }), !msgErrorDisabled && (_jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
21
21
|
}
|
|
22
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=FieldDecimal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldDecimal.js","sourceRoot":"","sources":["../../../../../src/components/molecules/FieldDecimal/FieldDecimal.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAA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BAAmB,IAClB,SAAS,EAAC,sBAAsB,EAChC,WAAW,EAAE,WAAW,GACxB,CACH,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/molecules/LabelCheckBox/LabelCheckBox.scss"],"names":[],"mappings":"AAOA,oBACE,sBACA,yCACA,4BACA,+BACA,mCAEA,aACA,gCACA,mBAEA,8BACE,wBAEA,oBAGF,6BACE,2BAGF,8BACE,kCACA,6BACA,gCACA,wBAGF,+BACE,WAGF,0BACE,qCACA,0CACA,+CACA,mCACA,qEACA,iBACA,gCAEA,4BACE,eACA,iBACA,sBACA","file":"LabelCheckBox.css"}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/molecules/LabelCheckBox/LabelCheckBox.scss"],"names":[],"mappings":"AAOA,oBACE,6BACA,sBACA,yCACA,4BACA,+BACA,mCAEA,aACA,gCACA,mBAEA,8BACE,wBAEA,oBAGF,6BACE,2BAGF,8BACE,kCACA,6BACA,gCACA,wBAGF,+BACE,WAGF,0BACE,qCACA,0CACA,+CACA,mCACA,qEACA,iBACA,gCAEA,4BACE,eACA,iBACA,sBACA","file":"LabelCheckBox.css"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/molecules/LabelRadioButton/LabelRadioButton.scss"],"names":[],"mappings":"AAOA,uBACE,sBACA,yCACA,4BACA,+BACA,mCAEA,aACA,gCACA,mBAEA,iCACE,wBAEA,oBAGF,gCACE,2BAGF,iCACE,kCACA,6BACA,gCACA,wBAGF,kCACE,WAGF,6BACE,qCACA,0CACA,+CACA,mCACA,wEACA,iBACA,gCAEA,+BACE,eACA,iBACA,sBACA","file":"LabelRadioButton.css"}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/molecules/LabelRadioButton/LabelRadioButton.scss"],"names":[],"mappings":"AAOA,uBACE,6BACA,sBACA,yCACA,4BACA,+BACA,mCAEA,aACA,gCACA,mBAEA,iCACE,wBAEA,oBAGF,gCACE,2BAGF,iCACE,kCACA,6BACA,gCACA,wBAGF,kCACE,WAGF,6BACE,qCACA,0CACA,+CACA,mCACA,wEACA,iBACA,gCAEA,+BACE,eACA,iBACA,sBACA","file":"LabelRadioButton.css"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/molecules/LabelSwitch/LabelSwitch.scss"],"names":[],"mappings":"AAOA,kBACE,sBACA,yCACA,4BACA,+BACA,mCAEA,aACA,gCACA,mBAEA,4BACE,wBAEA,oBAGF,2BACE,2BAGF,4BACE,kCACA,6BACA,gCACA,wBAGF,6BACE,gBAGF,wBACE,qCACA,0CACA,+CACA,mCACA,mEACA,iBACA,gCAEA,0BACE,eACA,iBACA,sBACA","file":"LabelSwitch.css"}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/molecules/LabelSwitch/LabelSwitch.scss"],"names":[],"mappings":"AAOA,kBACE,6BACA,sBACA,yCACA,4BACA,+BACA,mCAEA,aACA,gCACA,mBAEA,4BACE,wBAEA,oBAGF,2BACE,2BAGF,4BACE,kCACA,6BACA,gCACA,wBAGF,6BACE,gBAGF,wBACE,qCACA,0CACA,+CACA,mCACA,mEACA,iBACA,gCAEA,0BACE,eACA,iBACA,sBACA","file":"LabelSwitch.css"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SealedPartial } from '@rolster/commons';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { RlsButtonType } from '../../atoms/Button/Button';
|
|
4
4
|
import { RlsTheme } from '../../definitions';
|
|
5
5
|
import './Confirmation.css';
|
|
6
|
-
export declare class ConfirmationResult extends
|
|
6
|
+
export declare class ConfirmationResult extends SealedPartial<void, void, {
|
|
7
7
|
approved: () => void;
|
|
8
8
|
reject: () => void;
|
|
9
9
|
}> {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { SealedPartial } from '@rolster/commons';
|
|
3
3
|
import { useCallback, useMemo, useState } from 'react';
|
|
4
4
|
import ReactDOM from 'react-dom';
|
|
5
5
|
import { renderClassStatus } from '../../../helpers/css';
|
|
6
6
|
import { reactI18n } from '../../../i18n';
|
|
7
7
|
import { RlsButton } from '../../atoms/Button/Button';
|
|
8
8
|
import './Confirmation.css';
|
|
9
|
-
export class ConfirmationResult extends
|
|
9
|
+
export class ConfirmationResult extends SealedPartial {
|
|
10
10
|
static approved() {
|
|
11
11
|
return new ConfirmationResult('approved');
|
|
12
12
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export * from './components/atoms/CheckBox/CheckBox';
|
|
|
8
8
|
export * from './components/atoms/Icon/Icon';
|
|
9
9
|
export * from './components/atoms/Image/Image';
|
|
10
10
|
export * from './components/atoms/Input/Input';
|
|
11
|
-
export * from './components/atoms/
|
|
11
|
+
export * from './components/atoms/InputDecimal/InputDecimal';
|
|
12
12
|
export * from './components/atoms/InputMoney/InputMoney';
|
|
13
13
|
export * from './components/atoms/InputNumber/InputNumber';
|
|
14
14
|
export * from './components/atoms/InputPassword/InputPassword';
|
|
@@ -30,7 +30,7 @@ export * from './components/molecules/Ballot/Ballot';
|
|
|
30
30
|
export * from './components/molecules/ButtonProgress/ButtonProgress';
|
|
31
31
|
export * from './components/molecules/ButtonToggle/ButtonToggle';
|
|
32
32
|
export * from './components/molecules/Content/Content';
|
|
33
|
-
export * from './components/molecules/
|
|
33
|
+
export * from './components/molecules/FieldDecimal/FieldDecimal';
|
|
34
34
|
export * from './components/molecules/FieldMoney/FieldMoney';
|
|
35
35
|
export * from './components/molecules/FieldNumber/FieldNumber';
|
|
36
36
|
export * from './components/molecules/FieldPassword/FieldPassword';
|
package/dist/esm/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export * from './components/atoms/CheckBox/CheckBox';
|
|
|
8
8
|
export * from './components/atoms/Icon/Icon';
|
|
9
9
|
export * from './components/atoms/Image/Image';
|
|
10
10
|
export * from './components/atoms/Input/Input';
|
|
11
|
-
export * from './components/atoms/
|
|
11
|
+
export * from './components/atoms/InputDecimal/InputDecimal';
|
|
12
12
|
export * from './components/atoms/InputMoney/InputMoney';
|
|
13
13
|
export * from './components/atoms/InputNumber/InputNumber';
|
|
14
14
|
export * from './components/atoms/InputPassword/InputPassword';
|
|
@@ -30,7 +30,7 @@ export * from './components/molecules/Ballot/Ballot';
|
|
|
30
30
|
export * from './components/molecules/ButtonProgress/ButtonProgress';
|
|
31
31
|
export * from './components/molecules/ButtonToggle/ButtonToggle';
|
|
32
32
|
export * from './components/molecules/Content/Content';
|
|
33
|
-
export * from './components/molecules/
|
|
33
|
+
export * from './components/molecules/FieldDecimal/FieldDecimal';
|
|
34
34
|
export * from './components/molecules/FieldMoney/FieldMoney';
|
|
35
35
|
export * from './components/molecules/FieldNumber/FieldNumber';
|
|
36
36
|
export * from './components/molecules/FieldPassword/FieldPassword';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0CAA0C,CAAC;AACzD,cAAc,kCAAkC,CAAC;AACjD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;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AAgE,CAAC;AAC/E,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kCAAkC,CAAC;AACjD,cAAc,kDAAkD,CAAC;AACjE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4DAA4D,CAAC;AAC3E,cAAc,sEAAsE,CAAC;AACrF,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sDAAsD,CAAC;AACrE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0DAA0D,CAAC;AACzE,cAAc,sDAAsD,CAAC;AACrE,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,oCAAoC,CAAC;AACnD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,wDAAwD,CAAC;AACvE,cAAc,0CAA0C,CAAC;AACzD,cAAc,0BAA0B,CAAC;AAEzC,cAAc,WAAW,CAAC;AAC1B,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolster/react-components",
|
|
3
|
-
"version": "18.25.
|
|
3
|
+
"version": "18.25.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Package containing UI components for React Project.",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"prepublishOnly": "npm run build"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@rolster/commons": "^3.
|
|
33
|
+
"@rolster/commons": "^3.1.2",
|
|
34
34
|
"@rolster/components": "^0.7.0",
|
|
35
35
|
"@rolster/dates": "^3.0.0",
|
|
36
36
|
"@rolster/forms": "^3.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/atoms/InputDouble/InputDouble.scss"],"names":[],"mappings":"AAOA,kBACE,yDACA,uCAEA,kBACA,WACA,sBAEA,8BACE,eACA","file":"InputDouble.css"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Double } from '@rolster/commons';
|
|
2
|
-
import { InputProps } from '../../types';
|
|
3
|
-
import './InputDouble.css';
|
|
4
|
-
interface InputDoubleProps extends InputProps<Double> {
|
|
5
|
-
decimals?: number;
|
|
6
|
-
symbol?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function RlsInputDouble(props: InputDoubleProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Double } from '@rolster/commons';
|
|
3
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
4
|
-
import { RlsAmount } from '../Amount/Amount';
|
|
5
|
-
import { RlsInput } from '../Input/Input';
|
|
6
|
-
import './InputDouble.css';
|
|
7
|
-
export function RlsInputDouble(props) {
|
|
8
|
-
const { decimals, formControl, identifier, onValue, symbol, value } = props;
|
|
9
|
-
const [valueInput, setValueInput] = useState((formControl?.value ?? value ?? Double.zero()).fixed);
|
|
10
|
-
const amount = useMemo(() => {
|
|
11
|
-
return formControl?.value?.fixed ?? valueInput;
|
|
12
|
-
}, [formControl?.value, valueInput]);
|
|
13
|
-
const onValueInput = useCallback((value) => {
|
|
14
|
-
const valueDouble = Double.create(value);
|
|
15
|
-
formControl ? formControl.setValue(valueDouble) : setValueInput(value);
|
|
16
|
-
onValue && onValue(valueDouble);
|
|
17
|
-
}, [formControl, onValue]);
|
|
18
|
-
const doubleProps = { ...props, formControl: undefined };
|
|
19
|
-
return (_jsx("div", { id: identifier, className: "rls-input-double", children: _jsx(RlsInput, { ...doubleProps, type: "number", value: valueInput, onValue: onValueInput, children: _jsx(RlsAmount, { value: amount, symbol: symbol, decimals: decimals }) }) }));
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=InputDouble.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InputDouble.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputDouble/InputDouble.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,mBAAmB,CAAC;AAO3B,MAAM,UAAU,cAAc,CAAC,KAAuB;IACpD,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAE5E,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAC1C,CAAC,WAAW,EAAE,KAAK,IAAI,KAAK,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CACrD,CAAC;IAEF,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,OAAO,WAAW,EAAE,KAAK,EAAE,KAAK,IAAI,UAAU,CAAC;IACjD,CAAC,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IAErC,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAa,EAAE,EAAE;QAChB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEzC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAEvE,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC,EACD,CAAC,WAAW,EAAE,OAAO,CAAC,CACvB,CAAC;IAEF,MAAM,WAAW,GAAG,EAAE,GAAG,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;IAEzD,OAAO,CACL,cAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAC,kBAAkB,YAC/C,KAAC,QAAQ,OACH,WAAW,EACf,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,YAAY,YAErB,KAAC,SAAS,IAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAI,GACvD,GACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/components/molecules/FieldDouble/FieldDouble.scss"],"names":[],"mappings":"AAOA,kBACE,kDAEA,kBACA,WACA","file":"FieldDouble.css"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Double } from '@rolster/commons';
|
|
2
|
-
import { FieldBoxProps } from '../../types';
|
|
3
|
-
import './FieldDouble.css';
|
|
4
|
-
interface FieldDoubleProps extends FieldBoxProps<Double> {
|
|
5
|
-
decimals?: number;
|
|
6
|
-
symbol?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function RlsFieldDouble(props: FieldDoubleProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FieldDouble.js","sourceRoot":"","sources":["../../../../../src/components/molecules/FieldDouble/FieldDouble.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;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