react-restyle-components 0.2.89 → 0.2.91
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/lib/src/core-components/__mocks__/styleMock.d.ts +2 -0
- package/lib/src/core-components/__mocks__/styleMock.d.ts.map +1 -0
- package/lib/src/core-components/__mocks__/styleMock.js +1 -0
- package/lib/src/core-components/index.d.ts +34 -0
- package/lib/src/core-components/index.d.ts.map +1 -0
- package/lib/src/core-components/index.js +33 -0
- package/lib/src/core-components/jest.config.d.ts +12 -0
- package/lib/src/core-components/jest.config.d.ts.map +1 -0
- package/lib/src/core-components/jest.config.js +10 -0
- package/lib/src/core-components/src/App.css +45 -0
- package/lib/src/core-components/src/App.d.ts +4 -0
- package/lib/src/core-components/src/App.d.ts.map +1 -0
- package/lib/src/core-components/src/App.js +9 -0
- package/lib/src/core-components/src/assets/styles/colors.css +217 -0
- package/lib/src/core-components/src/assets/styles/decorations.css +15 -0
- package/lib/src/core-components/src/assets/styles/fontface.css +17 -0
- package/lib/src/core-components/src/assets/styles/scrollbars.css +70 -0
- package/lib/src/core-components/src/assets/styles/typography.css +3 -0
- package/lib/src/core-components/src/atoms/button/Button.test.d.ts +2 -0
- package/lib/src/core-components/src/atoms/button/Button.test.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/button/Button.test.js +27 -0
- package/lib/src/core-components/src/atoms/button/Button.types.d.ts +26 -0
- package/lib/src/core-components/src/atoms/button/Button.types.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/button/Button.types.js +1 -0
- package/lib/src/core-components/src/atoms/button/button.component.d.ts +4 -0
- package/lib/src/core-components/src/atoms/button/button.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/button/button.component.js +18 -0
- package/lib/src/core-components/src/atoms/button/buttonGroup/buttonGroup.component.d.ts +7 -0
- package/lib/src/core-components/src/atoms/button/buttonGroup/buttonGroup.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/button/buttonGroup/buttonGroup.component.js +4 -0
- package/lib/src/core-components/src/atoms/check-box/checkBox.component.d.ts +10 -0
- package/lib/src/core-components/src/atoms/check-box/checkBox.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/check-box/checkBox.component.js +20 -0
- package/lib/src/core-components/src/atoms/check-box/checkBox.spec.d.ts +2 -0
- package/lib/src/core-components/src/atoms/check-box/checkBox.spec.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/check-box/checkBox.spec.js +32 -0
- package/lib/src/core-components/src/atoms/date-picker/date-picker.component.d.ts +12 -0
- package/lib/src/core-components/src/atoms/date-picker/date-picker.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/date-picker/date-picker.component.js +20 -0
- package/lib/src/core-components/src/atoms/form/form.component.d.ts +105 -0
- package/lib/src/core-components/src/atoms/form/form.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/form/form.component.js +87 -0
- package/lib/src/core-components/src/atoms/icons/icons.component.d.ts +11 -0
- package/lib/src/core-components/src/atoms/icons/icons.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/icons/icons.component.js +71 -0
- package/lib/src/core-components/src/atoms/input/input-otp.component.d.ts +14 -0
- package/lib/src/core-components/src/atoms/input/input-otp.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/input/input-otp.component.js +61 -0
- package/lib/src/core-components/src/atoms/input/input-otp.styles.css +35 -0
- package/lib/src/core-components/src/atoms/input/input-pin.component.d.ts +16 -0
- package/lib/src/core-components/src/atoms/input/input-pin.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/input/input-pin.component.js +76 -0
- package/lib/src/core-components/src/atoms/input/input.component.d.ts +18 -0
- package/lib/src/core-components/src/atoms/input/input.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/input/input.component.js +16 -0
- package/lib/src/core-components/src/atoms/input/input.styles.css +35 -0
- package/lib/src/core-components/src/atoms/input-dropdown/input-dropdown.component.d.ts +10 -0
- package/lib/src/core-components/src/atoms/input-dropdown/input-dropdown.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/input-dropdown/input-dropdown.component.js +44 -0
- package/lib/src/core-components/src/atoms/loader/loader.component.d.ts +6 -0
- package/lib/src/core-components/src/atoms/loader/loader.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/loader/loader.component.js +6 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-images.components.d.ts +9 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-images.components.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-images.components.js +7 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-table.components.d.ts +11 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-table.components.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-table.components.js +48 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-typography.components.d.ts +21 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-typography.components.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-typography.components.js +70 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-wrapped-view.components.d.ts +53 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-wrapped-view.components.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/pdf/pdf-wrapped-view.components.js +50 -0
- package/lib/src/core-components/src/atoms/radio/radio.component.d.ts +9 -0
- package/lib/src/core-components/src/atoms/radio/radio.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/radio/radio.component.js +20 -0
- package/lib/src/core-components/src/atoms/stepper/stepper.component.d.ts +9 -0
- package/lib/src/core-components/src/atoms/stepper/stepper.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/stepper/stepper.component.js +26 -0
- package/lib/src/core-components/src/atoms/tabs/tabs.component.d.ts +18 -0
- package/lib/src/core-components/src/atoms/tabs/tabs.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/tabs/tabs.component.js +19 -0
- package/lib/src/core-components/src/atoms/tabs/tabs.module.css +238 -0
- package/lib/src/core-components/src/atoms/timer/timer.component.d.ts +7 -0
- package/lib/src/core-components/src/atoms/timer/timer.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/timer/timer.component.js +76 -0
- package/lib/src/core-components/src/atoms/tooltip/Tooltip.types.d.ts +22 -0
- package/lib/src/core-components/src/atoms/tooltip/Tooltip.types.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/tooltip/Tooltip.types.js +1 -0
- package/lib/src/core-components/src/atoms/tooltip/tooltip.component.d.ts +10 -0
- package/lib/src/core-components/src/atoms/tooltip/tooltip.component.d.ts.map +1 -0
- package/lib/src/core-components/src/atoms/tooltip/tooltip.component.js +10 -0
- package/lib/src/core-components/src/helpers/constants.d.ts +4 -0
- package/lib/src/core-components/src/helpers/constants.d.ts.map +1 -0
- package/lib/src/core-components/src/helpers/constants.js +11 -0
- package/lib/src/core-components/src/hooks/index.d.ts +2 -0
- package/lib/src/core-components/src/hooks/index.d.ts.map +1 -0
- package/lib/src/core-components/src/hooks/index.js +1 -0
- package/lib/src/core-components/src/hooks/outside.hook.d.ts +2 -0
- package/lib/src/core-components/src/hooks/outside.hook.d.ts.map +1 -0
- package/lib/src/core-components/src/hooks/outside.hook.js +28 -0
- package/lib/src/core-components/src/index.css +118 -0
- package/lib/src/core-components/src/index.d.ts +2 -0
- package/lib/src/core-components/src/index.d.ts.map +1 -0
- package/lib/src/core-components/src/index.js +12 -0
- package/lib/src/core-components/src/library/assets/fonts/arima/arima-bold.ttf +0 -0
- package/lib/src/core-components/src/library/assets/fonts/arima/arima-regular.ttf +0 -0
- package/lib/src/core-components/src/library/assets/svg/CheckedBox.svg +14 -0
- package/lib/src/core-components/src/library/assets/svg/DownArrow.svg +14 -0
- package/lib/src/core-components/src/library/assets/svg/UnCheckbox.svg +3 -0
- package/lib/src/core-components/src/library/assets/svg/UpArrow.svg +14 -0
- package/lib/src/core-components/src/library/assets/svg/checkedRadio.svg +13 -0
- package/lib/src/core-components/src/library/assets/svg/datePicker.svg +3 -0
- package/lib/src/core-components/src/library/assets/svg/index.d.ts +10 -0
- package/lib/src/core-components/src/library/assets/svg/index.d.ts.map +1 -0
- package/lib/src/core-components/src/library/assets/svg/index.js +27 -0
- package/lib/src/core-components/src/library/assets/svg/timer copy.svg +3 -0
- package/lib/src/core-components/src/library/assets/svg/timer.svg +3 -0
- package/lib/src/core-components/src/library/assets/svg/uncheckRadio.svg +3 -0
- package/lib/src/core-components/src/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts +17 -0
- package/lib/src/core-components/src/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +101 -0
- package/lib/src/core-components/src/molecules/auto-complete-filter-single-select/auto-complete-filter-single-select.component.d.ts +13 -0
- package/lib/src/core-components/src/molecules/auto-complete-filter-single-select/auto-complete-filter-single-select.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/auto-complete-filter-single-select/auto-complete-filter-single-select.component.js +59 -0
- package/lib/src/core-components/src/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts +18 -0
- package/lib/src/core-components/src/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +109 -0
- package/lib/src/core-components/src/molecules/auto-complete-group-by/auto-complete-group-by.component.d.ts +10 -0
- package/lib/src/core-components/src/molecules/auto-complete-group-by/auto-complete-group-by.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/auto-complete-group-by/auto-complete-group-by.component.js +128 -0
- package/lib/src/core-components/src/molecules/auto-complete-group-by/auto-complete-group-by.component.test.d.ts +2 -0
- package/lib/src/core-components/src/molecules/auto-complete-group-by/auto-complete-group-by.component.test.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/auto-complete-group-by/auto-complete-group-by.component.test.js +9 -0
- package/lib/src/core-components/src/molecules/autocomplete/autocomplete.css +37 -0
- package/lib/src/core-components/src/molecules/autocomplete/autocomplete.d.ts +8 -0
- package/lib/src/core-components/src/molecules/autocomplete/autocomplete.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/autocomplete/autocomplete.js +108 -0
- package/lib/src/core-components/src/molecules/autocomplete/autocomplete.spec.d.ts +2 -0
- package/lib/src/core-components/src/molecules/autocomplete/autocomplete.spec.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/autocomplete/autocomplete.spec.js +79 -0
- package/lib/src/core-components/src/molecules/color-picker/color-picker.component.d.ts +6 -0
- package/lib/src/core-components/src/molecules/color-picker/color-picker.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/color-picker/color-picker.component.js +12 -0
- package/lib/src/core-components/src/molecules/color-picker/color-picker.css +24 -0
- package/lib/src/core-components/src/molecules/color-picker/color-picker.spec.d.ts +2 -0
- package/lib/src/core-components/src/molecules/color-picker/color-picker.spec.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/color-picker/color-picker.spec.js +7 -0
- package/lib/src/core-components/src/molecules/color-picker-modal/color-picker-modal.component.d.ts +15 -0
- package/lib/src/core-components/src/molecules/color-picker-modal/color-picker-modal.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/color-picker-modal/color-picker-modal.component.js +41 -0
- package/lib/src/core-components/src/molecules/color-picker-modal/color-picker-modal.css +45 -0
- package/lib/src/core-components/src/molecules/color-picker-modal/color-picker-modal.spec.d.ts +2 -0
- package/lib/src/core-components/src/molecules/color-picker-modal/color-picker-modal.spec.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/color-picker-modal/color-picker-modal.spec.js +7 -0
- package/lib/src/core-components/src/molecules/css-multiline-input/css-multiline-input.component.d.ts +11 -0
- package/lib/src/core-components/src/molecules/css-multiline-input/css-multiline-input.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/css-multiline-input/css-multiline-input.component.js +91 -0
- package/lib/src/core-components/src/molecules/css-multiline-input/css-properties.d.ts +8932 -0
- package/lib/src/core-components/src/molecules/css-multiline-input/css-properties.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/css-multiline-input/css-properties.js +161 -0
- package/lib/src/core-components/src/molecules/modal/modal.component.d.ts +10 -0
- package/lib/src/core-components/src/molecules/modal/modal.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/modal/modal.component.js +19 -0
- package/lib/src/core-components/src/molecules/modal-confirm/modal-confirm.component.d.ts +14 -0
- package/lib/src/core-components/src/molecules/modal-confirm/modal-confirm.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/modal-confirm/modal-confirm.component.js +21 -0
- package/lib/src/core-components/src/molecules/multi-select/multi-select.component.d.ts +9 -0
- package/lib/src/core-components/src/molecules/multi-select/multi-select.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/multi-select/multi-select.component.js +49 -0
- package/lib/src/core-components/src/molecules/multi-select-with-field/multi-select-with-field.component.d.ts +10 -0
- package/lib/src/core-components/src/molecules/multi-select-with-field/multi-select-with-field.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/multi-select-with-field/multi-select-with-field.component.js +58 -0
- package/lib/src/core-components/src/molecules/multi-selection-dropdown/multi-selection-dropdown.component.d.ts +9 -0
- package/lib/src/core-components/src/molecules/multi-selection-dropdown/multi-selection-dropdown.component.d.ts.map +1 -0
- package/lib/src/core-components/src/molecules/multi-selection-dropdown/multi-selection-dropdown.component.js +43 -0
- package/lib/src/core-components/src/reportWebVitals.d.ts +4 -0
- package/lib/src/core-components/src/reportWebVitals.d.ts.map +1 -0
- package/lib/src/core-components/src/reportWebVitals.js +12 -0
- package/lib/src/core-components/src/setupTests.d.ts +2 -0
- package/lib/src/core-components/src/setupTests.d.ts.map +1 -0
- package/lib/src/core-components/src/setupTests.js +5 -0
- package/lib/src/core-components/src/tc.module.css +1 -0
- package/lib/src/core-components/src/utils/index.d.ts +2 -0
- package/lib/src/core-components/src/utils/index.d.ts.map +1 -0
- package/lib/src/core-components/src/utils/index.js +1 -0
- package/lib/src/core-components/src/utils/utility.util.d.ts +3 -0
- package/lib/src/core-components/src/utils/utility.util.d.ts.map +1 -0
- package/lib/src/core-components/src/utils/utility.util.js +5 -0
- package/lib/src/core-utils/jest.config.d.ts +11 -0
- package/lib/src/core-utils/jest.config.d.ts.map +1 -0
- package/lib/src/core-utils/jest.config.js +9 -0
- package/lib/src/core-utils/src/calculation/calculation.spec.d.ts +2 -0
- package/lib/src/core-utils/src/calculation/calculation.spec.d.ts.map +1 -0
- package/lib/src/core-utils/src/calculation/calculation.spec.js +52 -0
- package/lib/src/core-utils/src/index.d.ts +8 -0
- package/lib/src/core-utils/src/index.d.ts.map +1 -0
- package/lib/src/core-utils/src/index.js +7 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/atoms/input/input.component.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAI5B,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,KAAK,wIAaf,UAAU,4CAyEZ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable no-console */
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import './input.styles.css';
|
|
5
|
+
import s from '../../tc.module.css';
|
|
6
|
+
import { cn } from '../../utils';
|
|
7
|
+
export const Input = ({ title, defaultValue, className, disable, hasError, errorMsg, defaultMsg, inputStyle, autoComplete, maxlength = 40, onChange, onBlur, }) => {
|
|
8
|
+
const [value, setValue] = useState(defaultValue);
|
|
9
|
+
const onKeyUpValue = (event) => {
|
|
10
|
+
onChange(event.target.value);
|
|
11
|
+
};
|
|
12
|
+
return (_jsxs("div", { className: cn(className, s.relative), children: [_jsx("input", { "data-testid": "inputElement", type: "text", name: "name", value: value, placeholder: " ", disabled: disable, className: cn(s['pt-3'], s['pb-2'], s['bg-transparent'], s['block'], s['w-full'], s['px-0'], s['mt-0'], s['rounded-none'], s['border-0'], s['border-b'], s['appearance-none'], s['focus:outline-none'], s['focus:ring-0'], s['focus:border-gray-secondary'], s['border-gray-secondary'], s['font-arimaRegular'], inputStyle), onChange: (e) => {
|
|
13
|
+
setValue(e.target.value);
|
|
14
|
+
onChange && onChange(e.target.value);
|
|
15
|
+
}, onKeyUp: onKeyUpValue, onBlur: (e) => onBlur && onBlur(e.target.value), autoComplete: autoComplete, maxLength: maxlength }), _jsx("label", { className: cn(s['absolute'], s['duration-300'], s['top-3'], s['-z-1'], s['origin-0'], s['text-gray-dark-secondary'], s['font-arimaRegular'], s['text-md']), children: title }), hasError && hasError?.type !== 'required' && (_jsx("span", { className: cn(s['text-sm'], s['text-red'], s['text-4xs']), id: "error", children: `${errorMsg || ''}` })), (!hasError || hasError?.type === 'required') && (_jsx("span", { className: cn(s['text-sm'], s['text-4xs']), id: "error", children: `${defaultMsg || ''}` }))] }));
|
|
16
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.-z-1 {
|
|
2
|
+
z-index: -1;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.origin-0 {
|
|
6
|
+
transform-origin: 0%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
input:focus ~ label,
|
|
10
|
+
input:not(:placeholder-shown) ~ label,
|
|
11
|
+
textarea:focus ~ label,
|
|
12
|
+
textarea:not(:placeholder-shown) ~ label,
|
|
13
|
+
select:focus ~ label,
|
|
14
|
+
select:not([value=""]):valid ~ label {
|
|
15
|
+
/* @apply transform; scale-75; -translate-y-6; */
|
|
16
|
+
--tw-translate-x: 0;
|
|
17
|
+
--tw-translate-y: 0;
|
|
18
|
+
--tw-rotate: 0;
|
|
19
|
+
--tw-skew-x: 0;
|
|
20
|
+
--tw-skew-y: 0;
|
|
21
|
+
transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))
|
|
22
|
+
rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
|
|
23
|
+
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
24
|
+
--tw-scale-x: 0.75;
|
|
25
|
+
--tw-scale-y: 0.75;
|
|
26
|
+
--tw-translate-y: -1.5rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
input:focus ~ label,
|
|
30
|
+
select:focus ~ label {
|
|
31
|
+
/* @apply text-black; left-0; */
|
|
32
|
+
--tw-text-opacity: 1;
|
|
33
|
+
color: "#696969";
|
|
34
|
+
left: 0px;
|
|
35
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface InputDropdownProps {
|
|
2
|
+
title: string;
|
|
3
|
+
items: Array<string>;
|
|
4
|
+
hasError?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
onChange?: (item: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const InputDropdown: ({ items, className, hasError, title, onChange, }: InputDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=input-dropdown.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-dropdown.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/atoms/input-dropdown/input-dropdown.component.tsx"],"names":[],"mappings":"AAIA,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,aAAa,qDAMvB,kBAAkB,4CAyIpB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useRef } from 'react';
|
|
3
|
+
import s from '../../tc.module.css';
|
|
4
|
+
import { cn } from '../../utils';
|
|
5
|
+
import { Icon } from '../icons/icons.component';
|
|
6
|
+
export const InputDropdown = ({ items, className, hasError, title, onChange, }) => {
|
|
7
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
8
|
+
const [value, setValue] = useState('');
|
|
9
|
+
const [filteredItems, setFilteredItems] = useState(items);
|
|
10
|
+
const useOutsideAlerter = (ref) => {
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
function handleClickOutside(event) {
|
|
13
|
+
if (ref.current &&
|
|
14
|
+
!ref.current.contains(event.target) &&
|
|
15
|
+
isOpen &&
|
|
16
|
+
isOpen)
|
|
17
|
+
setIsOpen(!isOpen);
|
|
18
|
+
}
|
|
19
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
20
|
+
return () => {
|
|
21
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
22
|
+
};
|
|
23
|
+
}, [ref]);
|
|
24
|
+
};
|
|
25
|
+
const handleInputChange = (event) => {
|
|
26
|
+
const inputValue = event.target.value;
|
|
27
|
+
setValue(inputValue);
|
|
28
|
+
const filtered = items.filter((item) => item.toLowerCase().includes(inputValue.toLowerCase()));
|
|
29
|
+
setFilteredItems(filtered);
|
|
30
|
+
onChange && onChange(inputValue);
|
|
31
|
+
};
|
|
32
|
+
const wrapperRef = useRef(null);
|
|
33
|
+
useOutsideAlerter(wrapperRef);
|
|
34
|
+
return (_jsxs("div", { className: cn(className, s['relative']), children: [_jsxs("div", { className: cn(s['flex'], s['flex-row'], s['items-center']), children: [_jsx("input", { type: "text", name: "name", placeholder: title, value: value, className: cn(s['pt-3'], s['pb-2'], s['w-full'], s['px-0'], s['mt-0'], s['bg-transparent'], s['border-gray-secondary'], s['border-0'], s['border-b'], s['appearance-none'], s['focus:outline-none'], s['focus:ring-0'], s['font-arimaRegular'], s['text-md']), onClick: () => {
|
|
35
|
+
setIsOpen(!isOpen);
|
|
36
|
+
}, onChange: handleInputChange }), !isOpen && (_jsx(_Fragment, { children: _jsx(Icon, { nameIcon: "MdKeyboardArrowDown", propsIcon: { size: '24', color: '#000000' }, onClick: () => {
|
|
37
|
+
setIsOpen(!isOpen);
|
|
38
|
+
} }) })), isOpen && (_jsx(Icon, { nameIcon: "MdKeyboardArrowUp", propsIcon: { size: '24', color: '#000000' }, onClick: () => {
|
|
39
|
+
setIsOpen(!isOpen);
|
|
40
|
+
} }))] }), isOpen && (_jsx("div", { className: cn(s['z-10'], s['w-full'], s['absolute'], s['text-base'], s['list-none'], s['bg-white'], s['rounded'], s['divide-y'], s['divide-gray-100'], s['shadow'], s['dark:bg-gray-700']), ref: wrapperRef, children: _jsx("ul", { className: s['py-1'], children: filteredItems?.map((item, index) => (_jsx("li", { className: cn(s['block'], s['py-2'], s['px-4'], s['text-md'], s['hover:bg-gray-100'], s['dark:hover:bg-gray-600'], s['dark:text-gray-200'], s['font-arimaRegular']), onClick: () => {
|
|
41
|
+
setValue(item);
|
|
42
|
+
setIsOpen(!isOpen);
|
|
43
|
+
}, children: item }, index))) }) })), hasError && (_jsx("span", { className: cn(s['text-primaryCharcoal'], s['text-4xs']), id: "error", children: `${title} is required` }))] }));
|
|
44
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface LoadingAnimateSpinProps {
|
|
2
|
+
classWarper?: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const LoadingAnimateSpin: ({ classWarper, className, }: LoadingAnimateSpinProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=loader.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/atoms/loader/loader.component.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,gCAG5B,uBAAuB,4CAwBzB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import s from '../../tc.module.css';
|
|
3
|
+
import { cn } from '../../utils';
|
|
4
|
+
export const LoadingAnimateSpin = ({ classWarper = '', className = '', }) => {
|
|
5
|
+
return (_jsx("div", { className: cn(s.absolute, s['justify-center'], s['items-center'], classWarper), children: _jsx("div", { className: cn(s['w-10'], s['h-10'], s['border-t-2'], s['border-b-2'], s['border-blue-500'], s['rounded-full'], s['animate-spin'], className) }) }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Style } from '@react-pdf/types';
|
|
2
|
+
interface PdfImageProps {
|
|
3
|
+
src?: string | any;
|
|
4
|
+
style?: Style | Style[];
|
|
5
|
+
fixed?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const PdfImage: ({ src, style, }: PdfImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=pdf-images.components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-images.components.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/atoms/pdf/pdf-images.components.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAC;AAEvC,UAAU,aAAa;IACrB,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,QAAQ,oBAGlB,aAAa,4CAWf,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Image } from '@react-pdf/renderer';
|
|
3
|
+
export const PdfImage = ({ src = 'https://picsum.photos/200/300', style, }) => {
|
|
4
|
+
return (_jsx(_Fragment, { children: _jsx(Image, { style: {
|
|
5
|
+
...style,
|
|
6
|
+
}, src: src }) }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Style } from '@react-pdf/types';
|
|
2
|
+
interface PdfTableProps {
|
|
3
|
+
style?: Style;
|
|
4
|
+
headerStyle?: Style;
|
|
5
|
+
headerFixed?: boolean;
|
|
6
|
+
fields: Array<any>;
|
|
7
|
+
data: Array<any>;
|
|
8
|
+
}
|
|
9
|
+
export declare const PdfTable: ({ headerFixed, fields, data, style, headerStyle, }: PdfTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=pdf-table.components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-table.components.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/atoms/pdf/pdf-table.components.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAC;AAqCvC,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CAClB;AAED,eAAO,MAAM,QAAQ,uDAMlB,aAAa,4CAiEf,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text, View, StyleSheet } from '@react-pdf/renderer';
|
|
3
|
+
import { PdfSmall } from './pdf-typography.components';
|
|
4
|
+
import { PdfBorderView } from './pdf-wrapped-view.components';
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
table: {
|
|
7
|
+
borderColor: '#000000',
|
|
8
|
+
borderWidth: 1,
|
|
9
|
+
marginHorizontal: 20,
|
|
10
|
+
flexFlow: 1,
|
|
11
|
+
},
|
|
12
|
+
tableRow: {
|
|
13
|
+
flexDirection: 'row',
|
|
14
|
+
},
|
|
15
|
+
headerBg: {
|
|
16
|
+
backgroundColor: '#aaa',
|
|
17
|
+
borderStyle: 'solid',
|
|
18
|
+
borderColor: '#000000',
|
|
19
|
+
borderWidth: 1,
|
|
20
|
+
},
|
|
21
|
+
tableCellHeader: {
|
|
22
|
+
margin: 2,
|
|
23
|
+
fontSize: 10,
|
|
24
|
+
fontWeight: 'bold',
|
|
25
|
+
textAlign: 'center',
|
|
26
|
+
},
|
|
27
|
+
tableCell: {
|
|
28
|
+
margin: 2,
|
|
29
|
+
fontSize: 12,
|
|
30
|
+
},
|
|
31
|
+
textCenter: {
|
|
32
|
+
textAlign: 'center',
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
export const PdfTable = ({ headerFixed = false, fields, data, style, headerStyle, }) => (_jsxs(View, { style: [styles.table, { ...style }], children: [_jsx(View, { style: [styles.tableRow, styles.headerBg, { ...headerStyle }], fixed: headerFixed, children: fields.map((item, index) => (_jsx(View, { style: [{ width: item.width + '%' }], children: _jsx(Text, { style: [styles.tableCellHeader], children: item?.title }) }, index))) }), data?.map((item, index) => (_jsx(View, { style: styles.tableRow, children: Object.entries(item).map((_item, _idx) => (_jsx(PdfBorderView, { style: {
|
|
36
|
+
width: fields[_idx]?.width + '%',
|
|
37
|
+
borderStyle: 'solid',
|
|
38
|
+
}, mh: 0, mv: 0, p: 0, bw: 1, borderColor: "#000000", children: typeof _item[1] == 'object' ? (_jsxs(_Fragment, { children: [_jsx(PdfSmall, { style: { textAlign: 'center' }, children: _item[1]?.panelDesc
|
|
39
|
+
? `Panel Description : ${_item[1]?.panelDesc} \n`
|
|
40
|
+
: '' }), _jsx(PdfSmall, { style: { textAlign: 'center' }, children: _item[1]?.panelMethodName
|
|
41
|
+
? `Panel Method Name: ${_item[1]?.panelMethodName} \n`
|
|
42
|
+
: '' }), _jsx(PdfSmall, { style: { textAlign: 'center' }, children: _item[1]?.testMethodName
|
|
43
|
+
? `Test Method Name: ${_item[1]?.testMethodName} \n`
|
|
44
|
+
: '' }), _jsx(PdfSmall, { style: { textAlign: 'center' }, children: _item[1]?.analyteDesc
|
|
45
|
+
? `Analyte Description: ${_item[1]?.analyteDesc} \n`
|
|
46
|
+
: '' }), _jsx(PdfSmall, { style: { textAlign: 'center' }, children: _item[1]?.analyteMethodName
|
|
47
|
+
? `Analyte Method Name: ${_item[1]?.analyteMethodName}`
|
|
48
|
+
: '' })] })) : (_jsx(PdfSmall, { style: { textAlign: 'center' }, children: _item[1] || '' })) }, _idx))) }, index)))] }));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Style } from '@react-pdf/types';
|
|
3
|
+
interface PdfTextProps {
|
|
4
|
+
fontWeight?: 'bold' | 'medium' | 'normal';
|
|
5
|
+
fontSize?: number;
|
|
6
|
+
fontFamily?: 'ArimaRegular' | 'ArimaBold' | string;
|
|
7
|
+
textAlign?: 'center' | 'left' | 'right';
|
|
8
|
+
style?: Style | Style[];
|
|
9
|
+
lineHeight?: number;
|
|
10
|
+
bottom?: number;
|
|
11
|
+
fixed?: boolean;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const PdfHeading: ({ fontWeight, fontSize, fontFamily, style, children, }: PdfTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const PdfSubHeading: ({ fontWeight, fontSize, fontFamily, style, children, }: PdfTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const PdfMedium: ({ fontWeight, fontSize, textAlign, fontFamily, style, children, }: PdfTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const PdfRegular: ({ fontWeight, fontSize, textAlign, fontFamily, style, children, }: PdfTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const PdfSmall: ({ fontSize, fontFamily, fontWeight, textAlign, lineHeight, fixed, style, children, }: PdfTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const PdfPageNumber: ({ style, bottom }: PdfTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=pdf-typography.components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-typography.components.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/atoms/pdf/pdf-typography.components.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAC;AAkBvC,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,cAAc,GAAG,WAAW,GAAG,MAAM,CAAC;IACnD,SAAS,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IACxC,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,UAAU,2DAMpB,YAAY,4CAad,CAAC;AAEF,eAAO,MAAM,aAAa,2DAMvB,YAAY,4CAad,CAAC;AAEF,eAAO,MAAM,SAAS,sEAOnB,YAAY,4CAcd,CAAC;AAEF,eAAO,MAAM,UAAU,sEAOpB,YAAY,4CAcd,CAAC;AAEF,eAAO,MAAM,QAAQ,yFASlB,YAAY,4CAgBd,CAAC;AAEF,eAAO,MAAM,aAAa,sBAA0B,YAAY,4CAiB/D,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text, Font } from '@react-pdf/renderer';
|
|
3
|
+
Font.register({
|
|
4
|
+
family: 'ArimaBold',
|
|
5
|
+
fonts: [
|
|
6
|
+
{
|
|
7
|
+
src: '../../../library/assets/fonts/arima/arima-bold.ttf',
|
|
8
|
+
fontStyle: 'normal',
|
|
9
|
+
fontWeight: 'bold',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
});
|
|
13
|
+
Font.register({
|
|
14
|
+
family: 'ArimaRegular',
|
|
15
|
+
src: '../../../library/assets/fonts/arima/arima-regular.ttf',
|
|
16
|
+
});
|
|
17
|
+
export const PdfHeading = ({ fontWeight = 'bold', fontSize = 22, fontFamily = 'ArimaRegular', style, children, }) => {
|
|
18
|
+
return (_jsx(Text, { style: {
|
|
19
|
+
fontWeight: fontWeight,
|
|
20
|
+
fontSize: fontSize,
|
|
21
|
+
fontFamily: fontFamily,
|
|
22
|
+
...style,
|
|
23
|
+
}, children: children }));
|
|
24
|
+
};
|
|
25
|
+
export const PdfSubHeading = ({ fontWeight = 'bold', fontSize = 20, fontFamily = 'ArimaRegular', style, children, }) => {
|
|
26
|
+
return (_jsx(Text, { style: {
|
|
27
|
+
fontWeight: fontWeight,
|
|
28
|
+
fontSize: fontSize,
|
|
29
|
+
fontFamily: fontFamily,
|
|
30
|
+
...style,
|
|
31
|
+
}, children: children }));
|
|
32
|
+
};
|
|
33
|
+
export const PdfMedium = ({ fontWeight = 'medium', fontSize = 16, textAlign = 'left', fontFamily = 'ArimaRegular', style, children, }) => {
|
|
34
|
+
return (_jsx(Text, { style: {
|
|
35
|
+
fontWeight: fontWeight,
|
|
36
|
+
fontSize: fontSize,
|
|
37
|
+
fontFamily: fontFamily,
|
|
38
|
+
textAlign: textAlign,
|
|
39
|
+
...style,
|
|
40
|
+
}, children: children }));
|
|
41
|
+
};
|
|
42
|
+
export const PdfRegular = ({ fontWeight = 'normal', fontSize = 12, textAlign = 'left', fontFamily = 'ArimaRegular', style, children, }) => {
|
|
43
|
+
return (_jsx(Text, { style: {
|
|
44
|
+
fontWeight: fontWeight,
|
|
45
|
+
fontSize: fontSize,
|
|
46
|
+
fontFamily: fontFamily,
|
|
47
|
+
textAlign: textAlign,
|
|
48
|
+
...style,
|
|
49
|
+
}, children: children }));
|
|
50
|
+
};
|
|
51
|
+
export const PdfSmall = ({ fontSize = 10, fontFamily = 'ArimaRegular', fontWeight = 'normal', textAlign = 'left', lineHeight = 0, fixed = false, style, children, }) => {
|
|
52
|
+
return (_jsx(Text, { style: {
|
|
53
|
+
fontSize: fontSize,
|
|
54
|
+
fontFamily: fontFamily,
|
|
55
|
+
fontWeight: fontWeight,
|
|
56
|
+
lineHeight: lineHeight,
|
|
57
|
+
textAlign: textAlign,
|
|
58
|
+
...style,
|
|
59
|
+
}, fixed: fixed, children: children }));
|
|
60
|
+
};
|
|
61
|
+
export const PdfPageNumber = ({ style, bottom = 55 }) => {
|
|
62
|
+
return (_jsx(Text, { style: {
|
|
63
|
+
position: 'absolute',
|
|
64
|
+
bottom: bottom,
|
|
65
|
+
right: 14,
|
|
66
|
+
fontSize: 10,
|
|
67
|
+
color: 'black',
|
|
68
|
+
...style,
|
|
69
|
+
}, render: ({ pageNumber, totalPages }) => `Page ${pageNumber} of ${totalPages}`, fixed: true }));
|
|
70
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Style } from '@react-pdf/types';
|
|
3
|
+
interface PdfViewProps {
|
|
4
|
+
mh?: number;
|
|
5
|
+
mt?: number;
|
|
6
|
+
mv?: number;
|
|
7
|
+
p?: number;
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
bg?: string;
|
|
10
|
+
bw?: number;
|
|
11
|
+
height?: string | number;
|
|
12
|
+
alignItems?: 'flex-end' | 'flex-start' | 'center';
|
|
13
|
+
flexDirection?: 'row' | 'column';
|
|
14
|
+
fixed?: boolean;
|
|
15
|
+
isBreak?: boolean;
|
|
16
|
+
isWrap?: boolean;
|
|
17
|
+
style?: Style | Style[] | any;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const PdfView: ({ mh, p, flexDirection, style, fixed, isBreak, alignItems, mt, isWrap, children, }: PdfViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const PdfBorderView: ({ mh, mv, p, borderColor, bw, style, flexDirection, fixed, isBreak, children, }: PdfViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
interface PdfHeaderProps {
|
|
23
|
+
bg?: string;
|
|
24
|
+
p?: number;
|
|
25
|
+
alignItems?: React.CSSProperties['alignItems'] | any;
|
|
26
|
+
fixed?: boolean;
|
|
27
|
+
style?: React.CSSProperties | any;
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export declare const PdfHeader: ({ bg, p, alignItems, fixed, style, children, }: PdfHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const PdfSubHeader: ({ bg, p, alignItems, fixed, style, children, }: PdfViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
interface PdfFooterViewProps {
|
|
33
|
+
bottom?: number;
|
|
34
|
+
left?: number;
|
|
35
|
+
right?: number;
|
|
36
|
+
bg?: string;
|
|
37
|
+
p?: number;
|
|
38
|
+
alignItems?: React.CSSProperties['alignItems'];
|
|
39
|
+
fixed?: boolean;
|
|
40
|
+
height?: string | number;
|
|
41
|
+
style?: React.CSSProperties | any;
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
export declare const PdfFooterView: ({ bottom, left, right, bg, p, alignItems, fixed, height, style, children, }: PdfFooterViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
interface GridProps {
|
|
46
|
+
cols?: number;
|
|
47
|
+
bg?: 'transparent' | string;
|
|
48
|
+
style?: Style | Style[];
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
export declare const PdfGrid: React.FunctionComponent<GridProps>;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=pdf-wrapped-view.components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-wrapped-view.components.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/atoms/pdf/pdf-wrapped-view.components.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAC;AAEvC,UAAU,YAAY;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,QAAQ,CAAC;IAClD,aAAa,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,GAAG,GAAG,CAAC;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,OAAO,uFAWjB,YAAY,4CAkBd,CAAC;AAEF,eAAO,MAAM,aAAa,oFAWvB,YAAY,4CAkBd,CAAC;AAEF,UAAU,cAAc;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,SAAS,mDAOnB,cAAc,4CAchB,CAAC;AAEF,eAAO,MAAM,YAAY,mDAOtB,YAAY,4CAcd,CAAC;AAEF,UAAU,kBAAkB;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,aAAa,gFAWvB,kBAAkB,4CAYpB,CAAC;AAEF,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAetD,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from '@react-pdf/renderer';
|
|
3
|
+
export const PdfView = ({ mh = 20, p = 2, flexDirection = 'column', style, fixed = false, isBreak = false, alignItems, mt, isWrap = true, children, }) => {
|
|
4
|
+
return (_jsx(View, { break: isBreak, style: {
|
|
5
|
+
marginHorizontal: mh,
|
|
6
|
+
marginTop: mt,
|
|
7
|
+
padding: p,
|
|
8
|
+
flexDirection: flexDirection,
|
|
9
|
+
alignItems: alignItems,
|
|
10
|
+
...style,
|
|
11
|
+
}, fixed: fixed, wrap: isWrap, children: children }));
|
|
12
|
+
};
|
|
13
|
+
export const PdfBorderView = ({ mh = 20, mv = 50, p = 2, borderColor = 'gray', bw = 2, style, flexDirection = 'column', fixed = false, isBreak = false, children, }) => {
|
|
14
|
+
return (_jsx(View, { break: isBreak, style: {
|
|
15
|
+
flexDirection: flexDirection,
|
|
16
|
+
marginHorizontal: mh,
|
|
17
|
+
marginVertical: mv,
|
|
18
|
+
padding: p,
|
|
19
|
+
borderColor: borderColor,
|
|
20
|
+
borderWidth: bw,
|
|
21
|
+
...style,
|
|
22
|
+
}, fixed: fixed, children: children }));
|
|
23
|
+
};
|
|
24
|
+
export const PdfHeader = ({ bg = 'orange', p = 10, alignItems = 'flex-start', fixed = false, style, children, }) => {
|
|
25
|
+
return (_jsx(View, { style: {
|
|
26
|
+
backgroundColor: bg,
|
|
27
|
+
alignItems: alignItems,
|
|
28
|
+
padding: p,
|
|
29
|
+
...style,
|
|
30
|
+
}, fixed: fixed, children: children }));
|
|
31
|
+
};
|
|
32
|
+
export const PdfSubHeader = ({ bg = 'yellow', p = 4, alignItems = 'flex-end', fixed = false, style, children, }) => {
|
|
33
|
+
return (_jsx(View, { style: {
|
|
34
|
+
backgroundColor: bg,
|
|
35
|
+
alignItems: alignItems,
|
|
36
|
+
padding: p,
|
|
37
|
+
...style,
|
|
38
|
+
}, fixed: fixed, children: children }));
|
|
39
|
+
};
|
|
40
|
+
export const PdfFooterView = ({ bottom = 0, left = 0, right = 0, bg = 'orange', p = 10, alignItems = 'center', fixed = false, height = '100%', style, children, }) => {
|
|
41
|
+
return (_jsx(View, { style: [
|
|
42
|
+
{ position: 'absolute', bottom, left, right, height },
|
|
43
|
+
{ backgroundColor: bg, padding: p, alignItems: alignItems, ...style },
|
|
44
|
+
], fixed: fixed, children: children }));
|
|
45
|
+
};
|
|
46
|
+
export const PdfGrid = ({ cols = 1, bg = 'white', style, children, }) => (_jsx(View, { style: {
|
|
47
|
+
width: `${100 / cols}%`,
|
|
48
|
+
backgroundColor: bg,
|
|
49
|
+
...style,
|
|
50
|
+
}, children: children }));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface RadioProps {
|
|
2
|
+
title: string;
|
|
3
|
+
data: Array<any>;
|
|
4
|
+
className?: string;
|
|
5
|
+
onChange: (item: any) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const Radio: ({ title, data, className, onChange, }: RadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=radio.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/atoms/radio/radio.component.tsx"],"names":[],"mappings":"AAMA,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,KAAA,KAAK,IAAI,CAAC;CAC1B;AAED,eAAO,MAAM,KAAK,0CAKf,UAAU,4CAuCZ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { CheckedRadio, UncheckRadio } from '../../library/assets/svg';
|
|
4
|
+
import { InputWrapper } from '../form/form.component';
|
|
5
|
+
import s from '../../tc.module.css';
|
|
6
|
+
import { cn } from '../../utils';
|
|
7
|
+
export const Radio = ({ title = 'Source', data = [], className, onChange, }) => {
|
|
8
|
+
const [list, setList] = useState(data);
|
|
9
|
+
const width = 20;
|
|
10
|
+
return (_jsx(_Fragment, { children: _jsx(InputWrapper, { label: title, children: list?.map((item, index) => (_jsx("div", { className: cn(className, s['flex'], s['items-center'], s['mb-1']), onClick: () => {
|
|
11
|
+
const result = list?.map((e, i) => {
|
|
12
|
+
if (i == index)
|
|
13
|
+
return { ...e, checked: true };
|
|
14
|
+
else
|
|
15
|
+
return { ...e, checked: false };
|
|
16
|
+
});
|
|
17
|
+
setList(result);
|
|
18
|
+
onChange(result?.find((item) => item.checked));
|
|
19
|
+
}, children: _jsxs("div", { className: cn(s['flex'], s['flex-row'], s['gap-1'], s['items-center']), children: [item.checked ? (_jsx(CheckedRadio, { width: width, height: width })) : (_jsx(UncheckRadio, { width: width, height: width })), _jsx("span", { className: cn(s['text-4xs']), children: item?.title })] }) }, index))) }) }));
|
|
20
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface StepperProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
steps: Array<string>;
|
|
4
|
+
currentStep: number;
|
|
5
|
+
onStepClick: (currentStep: any, index: any) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const Stepper: ({ className, steps, currentStep, onStepClick, }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=stepper.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/atoms/stepper/stepper.component.tsx"],"names":[],"mappings":"AAIA,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,WAAW,KAAA,EAAE,KAAK,KAAA,KAAK,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,OAAO,oDAKjB,YAAY,4CA+Hd,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import s from '../../tc.module.css';
|
|
3
|
+
import { cn } from '../../utils';
|
|
4
|
+
export const Stepper = ({ className = '', steps, currentStep = 1, onStepClick, }) => {
|
|
5
|
+
const finalClass = cn(className, s['w-full'], s['px-4'], s['sm:px-8']);
|
|
6
|
+
const progressClass = cn(s['absolute'], s['my-4'], s['top-1/2'], s['left-0'], s['h-0.5'], s['transform'], s['-translate-y-1/2'], s['bg-orange'], s['transition-width'], s['ease-in-out'], s['duration-500']);
|
|
7
|
+
const Steps = steps?.map((step, index) => {
|
|
8
|
+
let stepClass = cn(s['inline-block'], s['transform'], s['-translate-x-1/2'], s['pt-1'], s['w-8'], s['h-8'], s['rounded-full'], s['text-center']);
|
|
9
|
+
if (index < currentStep)
|
|
10
|
+
stepClass = cn(stepClass, s['font-medium'], s['border'], s['border-orange'], s['bg-background-secondary'], s['text-gray'], s['bg-white']);
|
|
11
|
+
else if (index > currentStep)
|
|
12
|
+
stepClass = cn(stepClass, s['font-medium'], s['border'], s['border-gray-dark-secondary'], s['text-gray'], s['bg-background-secondary'], s['bg-white']);
|
|
13
|
+
else if (currentStep === index)
|
|
14
|
+
stepClass = cn(stepClass, s['font-medium'], s['bg-orange'], s['text-white'], s['border']);
|
|
15
|
+
if (typeof onStepClick === 'function')
|
|
16
|
+
stepClass = cn(stepClass, s['cursor-pointer']);
|
|
17
|
+
return (_jsx("div", { style: { left: `${(index / (steps.length - 1)) * 100}%` }, className: cn(s['absolute']), children: _jsx("span", { className: cn(stepClass, s['font-arimaRegular'], s['text-4xs'], s['text-center'], s['z-2']), onClick: () => {
|
|
18
|
+
if (typeof onStepClick === 'function')
|
|
19
|
+
onStepClick(index + 1, step);
|
|
20
|
+
}, children: step }) }, step));
|
|
21
|
+
});
|
|
22
|
+
return (_jsxs("div", { className: finalClass, children: [_jsx("div", { className: cn(s['w-full'], s['relative'], s['z-0']), children: _jsx("div", { className: progressClass, style: {
|
|
23
|
+
// width: `${(currentStep / (steps.length - 1)) * 100}%`,
|
|
24
|
+
width: `100%`,
|
|
25
|
+
}, children: _jsx("div", { className: cn(s['w-3'], s['h-3'], s['bg-orange'], s['rounded-full'], s['absolute'], s['right-0'], s['top-1/2'], s['transform'], s['translate-x-1/2'], s['-translate-y-1/2']) }) }) }), _jsx("div", { className: cn(s['relative'], s['sm:block']), children: Steps })] }));
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TabProps {
|
|
3
|
+
title: string;
|
|
4
|
+
children: React.JSX.Element;
|
|
5
|
+
}
|
|
6
|
+
export declare const Tab: ({ title, children }: TabProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export interface TabsProps {
|
|
8
|
+
options: Array<{
|
|
9
|
+
title: string;
|
|
10
|
+
content?: React.JSX.Element;
|
|
11
|
+
inActive?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
onSelect?: (item: any, index: number) => void;
|
|
14
|
+
children: React.JSX.Element[];
|
|
15
|
+
}
|
|
16
|
+
export declare const Tabs: ({ options, onSelect, children }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=tabs.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/atoms/tabs/tabs.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAItC,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,GAAG,wBAAuB,QAAQ,4CAM9C,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,KAAK,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;QAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC,CAAC;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;CAC/B;AAED,eAAO,MAAM,IAAI,oCAAmC,SAAS,4CAqD5D,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import s from '../../tc.module.css';
|
|
4
|
+
import { cn } from '../../utils';
|
|
5
|
+
export const Tab = ({ title, children }) => {
|
|
6
|
+
return (_jsx("div", { className: cn(s.flex), children: children }, title));
|
|
7
|
+
};
|
|
8
|
+
export const Tabs = ({ options, onSelect, children }) => {
|
|
9
|
+
const [activeTab, setActiveTab] = useState(0);
|
|
10
|
+
const [selected, setSelected] = useState(options[0].title);
|
|
11
|
+
const tabs = React.Children.toArray(children).filter((child) => React.isValidElement(child) && child.type === Tab);
|
|
12
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: cn(s.flex, s['flex-col'], s['w-full']), children: [_jsx("div", { className: cn(s.flex, s['border-b']), children: options?.map((tab, index) => (_jsx("button", { type: "button", className: cn(s['py-2'], s['px-4'], s['mr-1'], s['border-none'], s['rounded-t-md'], s['shadow-inner'], s['cursor-pointer'], activeTab === index && s['bg-blue-500'], activeTab === index && s['border-none'], activeTab === index && s['text-white']), onClick: () => {
|
|
13
|
+
setSelected(tab?.title);
|
|
14
|
+
onSelect && onSelect(tab, index);
|
|
15
|
+
!tab.inActive && setActiveTab(index);
|
|
16
|
+
}, disabled: tab.inActive, children: tab.title }, index))) }), _jsx("div", { className: cn(s['p-2'], s.border, s['border-solid'], s['border-slate-600'], s['rounded-b-md']), children: options[activeTab]?.content
|
|
17
|
+
? options[activeTab]?.content
|
|
18
|
+
: tabs[options?.findIndex((item) => item.title === selected)] })] }) }));
|
|
19
|
+
};
|